diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ba04b0c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,82 @@ +name: CI + +on: + push: + branches: [main, staging] + pull_request: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + build-test: + name: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-latest, ubuntu-22.04, ubuntu-24.04, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Install Linux system dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libssl-dev \ + libayatana-appindicator3-dev librsvg2-dev patchelf + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + targets: ${{ matrix.os == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + - uses: Swatinem/rust-cache@v2 + + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: pnpm + - run: pnpm install --frozen-lockfile + + - name: Fetch PDFium + shell: bash + run: scripts/fetch-pdfium.sh + + - name: Rust format + run: cargo fmt --all --check + - name: Clippy + run: cargo clippy --workspace --all-targets -- -D warnings + - name: Rust tests (unit + 57-pair fixture matrix) + shell: bash + run: | + export LARGSFORM_PDFIUM_DIR="$PWD/src-tauri/resources/pdfium/$(scripts/pdfium-platform.sh)" + cargo test --workspace + + - name: Frontend lint, type-check, tests + run: | + pnpm lint + pnpm check + pnpm test + + - name: Build installers + if: matrix.os != 'ubuntu-24.04' + run: pnpm tauri build ${{ matrix.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} + + - name: Upload installers + if: matrix.os != 'ubuntu-24.04' + uses: actions/upload-artifact@v4 + with: + name: installers-${{ matrix.os }} + path: | + target/release/bundle/**/*.dmg + target/release/bundle/**/*.deb + target/release/bundle/**/*.AppImage + target/release/bundle/**/*.msi + target/release/bundle/**/*.exe + target/universal-apple-darwin/release/bundle/**/*.dmg + if-no-files-found: ignore diff --git a/.github/workflows/fuzz.yml b/.github/workflows/fuzz.yml new file mode 100644 index 0000000..4f2a38b --- /dev/null +++ b/.github/workflows/fuzz.yml @@ -0,0 +1,30 @@ +name: Fuzz + +on: + schedule: + - cron: "17 3 * * *" # nightly + workflow_dispatch: + +jobs: + fuzz: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + target: [detect, decode] + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@nightly + - run: cargo install cargo-fuzz --locked + - name: Seed corpus from fixtures + run: | + mkdir -p crates/core/fuzz/corpus/${{ matrix.target }} + cp crates/core/tests/fixtures/samples/* crates/core/fuzz/corpus/${{ matrix.target }}/ || true + - name: Fuzz for 10 minutes + working-directory: crates/core/fuzz + run: cargo fuzz run ${{ matrix.target }} -- -max_total_time=600 -rss_limit_mb=4096 + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: fuzz-artifacts-${{ matrix.target }} + path: crates/core/fuzz/artifacts/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d2ecb76 --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Rust +target/ +**/*.rs.bk +*.rlib +*.prof* + +# Node / frontend +node_modules/ +dist/ +build/ +coverage/ +*.log +.env* +!.env.example + +# Tauri +src-tauri/gen/ +src-tauri/resources/pdfium/ + +# Fuzzing +crates/core/fuzz/target/ +crates/core/fuzz/corpus/ +crates/core/fuzz/artifacts/ + +# Editors / OS +.DS_Store +Thumbs.db +*.tmp +*.swp +.vscode/ +.idea/ diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ea9120a --- /dev/null +++ b/.prettierignore @@ -0,0 +1,14 @@ +node_modules/ +dist/ +build/ +coverage/ +target/ +src-tauri/ +crates/ +specs/ +.specify/ +.claude/ +pnpm-lock.yaml +package-lock.json +yarn.lock +.github/ diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..74235e5 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "plugins": ["prettier-plugin-svelte"], + "printWidth": 100, + "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] +} diff --git a/.specify/memory/constitution.md b/.specify/memory/constitution.md index 8c7d46f..1cdb708 100644 --- a/.specify/memory/constitution.md +++ b/.specify/memory/constitution.md @@ -1,26 +1,30 @@ @@ -46,6 +50,13 @@ built with Rust and Tauri, installable on macOS, Ubuntu, and Windows. no remote content loaded into the webview. - Temporary files MUST be created in the OS temp directory with restrictive permissions and MUST be removed when a conversion finishes, fails, or is cancelled. +- **Exception: final-stage staging file.** To allow the atomic write required by + Principle IV, the single file holding a conversion's finished output MAY be created in + the destination folder instead. It MUST be hidden (a dot-prefixed name unique to the app), + readable and writable only by the current user, and deleted if the conversion fails or is + cancelled. Staging files left behind by a crash or forced quit MUST be deleted when the + app exits normally and at the next launch. All other intermediate data MUST stay in the + OS temp directory. Rationale: People convert private photos, contracts, and recordings. Keeping everything local is the core product promise and removes a whole class of security risks. @@ -83,7 +94,8 @@ growing. A uniform interface keeps each new format cheap to add and isolated fro - Source files MUST NEVER be modified, moved, or deleted by a conversion. - Output MUST be written to a temporary file and atomically renamed into place only on - success; a failed or cancelled conversion MUST NOT leave partial output behind. + success; a failed or cancelled conversion MUST NOT leave partial output behind. The + staging file follows the Principle I exception. - Existing files MUST NOT be overwritten silently. The default is a non-colliding name (e.g., `photo (1).png`); overwriting requires an explicit user choice. - Every failure MUST produce an actionable, human-readable error (what failed, which @@ -196,4 +208,4 @@ cross-platform risk. - **Review cadence**: Revisit the constitution when a principle is repeatedly waived or when platform targets change. -**Version**: 1.0.0 | **Ratified**: 2026-12-03 | **Last Amended**: 2026-12-03 +**Version**: 1.0.1 | **Ratified**: 2026-12-03 | **Last Amended**: 2026-12-03 diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..c58e3d7 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5558 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "aligned" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" +dependencies = [ + "as-slice", +] + +[[package]] +name = "aligned-vec" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b" +dependencies = [ + "equator", +] + +[[package]] +name = "alloc-no-stdlib" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a" + +[[package]] +name = "alloc-stdlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2cb931c189b85683d69a5cfad41d4d418671e1ac413dd209f3f2fc31e3cfd902" + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" + +[[package]] +name = "arg_enum_proc_macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "arrayvec" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47a64a0fd06e123e9e3cf3ad01432af17dcab8185e8023edcf184fe696f9675d" + +[[package]] +name = "as-slice" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "async-broadcast" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" +dependencies = [ + "event-listener", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-channel" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-executor" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f426a31126c735126297bc5ea7a521263c9faff4f63ca415267ee625651c4f37" +dependencies = [ + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "pin-project-lite", + "slab", +] + +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-lock" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0876700b0d007ad25d5508865a4259c3af9af6d296bf663a0d586d0bc3369f6f" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", +] + +[[package]] +name = "async-recursion" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "async-signal" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.61.2", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + +[[package]] +name = "async-trait" +version = "0.1.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "atk" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "780a62f5d3373a8461bdc9258527bd03fe9299779446681199005712b24cc1d7" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56fd0f13d1dedae306538653b8e42034a2260d1ac3ee920e7a5c31475d7184a5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "av-scenechange" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f321d77c20e19b92c39e7471cf986812cbb46659d2af674adc4331ef3f18394" +dependencies = [ + "aligned", + "anyhow", + "arg_enum_proc_macro", + "arrayvec", + "log", + "num-rational", + "num-traits", + "pastey", + "rayon", + "thiserror 2.0.21", + "v_frame", + "y4m", +] + +[[package]] +name = "av1-grain" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cfddb07216410377231960af4fcab838eaa12e013417781b78bd95ee22077f8" +dependencies = [ + "anyhow", + "arrayvec", + "log", + "nom", + "num-rational", + "v_frame", +] + +[[package]] +name = "avif-serialize" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7178fe5f7d460b13895ebb9dcb28a3a6216d2df2574a0806cb51b555d297f38" +dependencies = [ + "arrayvec", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bit-set" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56d87354e4229f54a44f7bf2435906a4656dba36026ab6eaca629a2c436a691c" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72503af1e72be411d74ca45cd6b309878fcb35354e252fc2a3a8bda3a97082a0" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "bitstream-io" +version = "4.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eff00be299a18769011411c9def0d827e8f2d7bf0c3dbf53633147a8867fd1f" +dependencies = [ + "no_std_io2", +] + +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "blocking" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa" +dependencies = [ + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", +] + +[[package]] +name = "brotli" +version = "9.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9071f285ed78f04f37d675abaaef5de7689e2f30a216c8dc6795465d81910a13" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "6.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50986a054f56ca3e15382f3c09abee2bf494c00311b238daae118a06bc1c15f1" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "built" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0e531d93d39c34eef561e929e8a7f86d77a5af08aac4f6d6e39976c51858e9" + +[[package]] +name = "bumpalo" +version = "3.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34fb07aac3b9f547c7af8dc897dfe73c10847b6c71130c364bdd7891d979c816" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62bf7f026ae17fe688938438ec1da2b69f69832f1428a17258f6ee9a7f6e1815" +dependencies = [ + "bitflags", + "cairo-sys-rs", + "glib", + "libc", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee548131103ad8f698c6725669647b9c757b3b66992dd6a026037596417bee21" +dependencies = [ + "glib-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "camino" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0061da739915fae12ea00e16397555ed4371a6bb285431aab930f61b0aa4ba" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "cargo_metadata" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "cargo_toml" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f4b26e751e711a5302649417f2da046dce6391b2ea30a4820f37462314f0b9" +dependencies = [ + "semver", + "serde", + "toml", +] + +[[package]] +name = "cc" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e45cf2980b2d467be49a9ed942c9179b701063a7ca3d037de7ee9bd67f8d66" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a347dcabdae9c31b0825fd6a8bed285ec9c2acb89c47827126d52fa4f59cece3" +dependencies = [ + "fnv", + "uuid", + "web-time", +] + +[[package]] +name = "cfg-expr" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd44d82755fb9210fb10d9daf8dd7e522da0efe1d5f263cffc5db07725663ff" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link 0.2.1", +] + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-oid" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be95d4a884358a21a199689323c29e9256b4a1b315e22f183d155422041d3a9a" + +[[package]] +name = "cookie" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55f2d6c30eeec7d5c6f98bd4395d4abb1895629eab97ee6522d340623615f8a" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "cssparser" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11119743ad110e8c1bdccd930d7f5c30c99e5fc76a7b63ec9807e84eef0c5f59" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" +dependencies = [ + "quote", + "syn 3.0.10", +] + +[[package]] +name = "ctor" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea691ed9f36489d087419b8b2ba3ef27d89621380b4178c73e2445a379e4e0f4" +dependencies = [ + "link-section", +] + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.10", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.101.0", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35b4f772a1a8b88e5545a67c2d3a62a93d4edccc5a68f2145fe52e39c96d275" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + +[[package]] +name = "embed-resource" +version = "3.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6168487b5e7eb2673e6efe1200b1848016e436a6ca0b8031bf04bd9d493a249f" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "endi" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" + +[[package]] +name = "enumflags2" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef" +dependencies = [ + "enumflags2_derive", + "serde", +] + +[[package]] +name = "enumflags2_derive" +version = "0.7.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "equator" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4711b213838dfee0117e3be6ac926007d7f433d7bbe33595975d4190cb07e6fc" +dependencies = [ + "equator-macro", +] + +[[package]] +name = "equator-macro" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "erased-serde" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "errno" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "event-listener" +version = "5.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" +dependencies = [ + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" +dependencies = [ + "event-listener", + "pin-project-lite", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e44f110d1777dc6559a51e7d45083945ded4f1bf3305494350f693b6d20b9c8" + +[[package]] +name = "flate2" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50b79a7fa8b0e9fe6c77118e48cc00a23eb41052c190434d9cda7746418efca6" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabb44971913eb9f7bf6747f6e88889386007d8ce8cfd1ca2735751b664e7079" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5209294ba3775f9b650bf78bfadeba4332089f2329b3e2f6ce0a4957a45bff" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "gdk-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "463ac2e2f204918dcaeb3c34810bd7fe94448d2b8d4fa13a5ab45a4fc3e88e50" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps 9.0.1", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82559ece0c0952519a3513ecd90638e5db59e00c851f1d3ea05ac7ff2a46942e" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps 9.0.1", +] + +[[package]] +name = "gdkx11" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad7a698a74652ddba8dc348f9933f6f209fbcf3ab318f2c1fd72c6b2fa99505" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a103facf2056ce28125a49501f98beb01d1e3c9477257a8e05cfc5d3d677709e" +dependencies = [ + "cairo-sys-rs", + "gdk-sys", + "glib-sys", + "libc", + "system-deps 9.0.1", + "x11", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "gio" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "536990682bab3b8bf68a78d298ccae69702a114290b096edf2bec6eb2e4013b3" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "pin-project-lite", + "smallvec", +] + +[[package]] +name = "gio-sys" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9c253490f9a475047f109bf6ccb68c407e9d186b7bfab01849188f4e669e669" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps 9.0.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "glib" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9c4cbf1972a07741ae5ce9b23a582a90efc69745fc713f8b037b8d962f604da" +dependencies = [ + "bitflags", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "smallvec", +] + +[[package]] +name = "glib-macros" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4014e54e2049108c93cf278b64e89f490849402e09b455a25dfa2098cc35093" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "glib-sys" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b01e8b94529c2698b98f765b887f1e001b76195c1e25d1139aa9336019e745d" +dependencies = [ + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07595c9ba696bd9819cb6a8df39f08078f3dd679508fe052dd558492c2053834" +dependencies = [ + "glib-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "gtk" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a86cafafc177054a1d555a0b302044d2b5f82e1c1e23d152a7ba252dc6bfced0" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0e6f055c4a2ce6598b32373595b0c9985f1c7cc448afe4f09fee33fb738b488" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps 9.0.1", +] + +[[package]] +name = "gtk3-macros" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fcce21fcb0c4c4fc48bab8d4eee5aacdb361f85d234756430e6e793bd3d95cf" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.17.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "735eaa21a6a5ffb2e84362faaeb90c05ba8e19797ca30428478cb6ea3a4921bc" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "heifer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f56f259fe336eda454c55130b48ffd470304ad33368c11a37a0fd571a33b831" +dependencies = [ + "heifer-av1-dec", + "heifer-hevc-dec", + "heifer-hevc-enc", + "heifer-isobmff", + "thiserror 2.0.21", +] + +[[package]] +name = "heifer-av1-dec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9730676b57bf0e103cb6ffe8aa11a646dd7b94a8d9e63a1a8bab5e1e6b7826" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "heifer-hevc-dec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f5c50a07c2485dc1defdcbd5e61c030f1bcde127e49f1e952925762795c1b42" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "heifer-hevc-enc" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a2f4da7b8ca2ffe5b256a3cb590ead49ef8772849e73508da14712bc8032f5" +dependencies = [ + "heifer-hevc-dec", + "thiserror 2.0.21", +] + +[[package]] +name = "heifer-isobmff" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6d2df240c6a94f09dbf077f313ae2960baa7ea8cf24b25a53bb6707e3b1cdad" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "hermit-abi" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.40.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456a1a377e608e555d22ddab27ac0114bc7a7b4199078108e34c2aeae6c9b130" +dependencies = [ + "log", + "markup5ever", + "memchr", +] + +[[package]] +name = "http" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a07dc2d082802d1782faa5b3c8ac252f3a4fc89f51e76c3f37dc2d1a5b857c05" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "http-range" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2149c4b4b83390c71fab669730347d578ec6bdf759f2160c581ad8b8819733b4" + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "229c6ff5584df4c6becbfe00567128bac768c8cd32ebc8a8366bd81ed072e8f3" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75e94d66081e4d8dcd098bd8dc5254800fea14a26389b298410158d834de167" +dependencies = [ + "byteorder", + "png", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c8d2831f3eb9706eeac62164959a288f12c047a3c53b353c6c00d5d60eb5c7f" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "img-parts" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93567ea8788640e566a8992a28f4ff64a89b88a369ad05c4198ea6dc8a42ce2b" +dependencies = [ + "bytes", + "crc32fast", + "miniz_oxide 0.9.1", +] + +[[package]] +name = "imgref" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e44b0a4eaa4c82f441d50a963f2d5f05a787240aeee097597033e72accfd22f" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.2", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4200d433cbd5178df7797c9c2e75b348b728e39631cf14520d1e2fc424201f4" +dependencies = [ + "cfb", +] + +[[package]] +name = "interpolate_name" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "ipnet" +version = "2.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "007d6e6b91097094791302ccc6cd0588e0700ddac5c6829035bcd71eff4dc433" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" + +[[package]] +name = "javascriptcore-rs" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7481d6ae0ba570cd25ac36481911395bb00715859d520da3444ad77c08762baa" +dependencies = [ + "bitflags", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6d0ad3598dd4db3a85224e1447764b62f3762c9298892474a2cf3ccd1cd11ff" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "jiff" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175dc66334db3b9ab9985bf8b61cfed50dc16d20964bb47f9e479adcae984a7f" +dependencies = [ + "jiff-core 0.1.8", + "jiff-static 0.2.46", + "jiff-tzdb-platform 0.1.3", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "379ed44bd4e16d3926160e2b3a78b79ca0952ef5c037f124f554842ba272ef92" +dependencies = [ + "jiff-core 1.1.0", + "jiff-static 1.1.0", + "jiff-tzdb-platform 1.0.0", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link 0.2.1", +] + +[[package]] +name = "jiff-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e599b80292e597019b8b3e392de3f4bea2959ddfb8c7dff60e035e9e311a2c1b" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-core" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df46fc314b4f458aee614afcd8676ed6cb3637413aa359d47d2646cbc038b79" +dependencies = [ + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7b1af7547d47354bc438d797e3854601bde8f8d185780c5ba4ab27afa54f1ba" +dependencies = [ + "jiff-core 0.1.8", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-static" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b729c549d3efb5855b3c80b0ee8ee1850d56330a127382fe2760965741c1f3" +dependencies = [ + "jiff-core 1.1.0", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0980fca2cc272465bd60e82397607ba9f33add9e48defd77923301bbd03808f2" + +[[package]] +name = "jiff-tzdb" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12e71a1b68a875a44a33bb7a1dd84392cb77145a3367a552a3cfe6a4f5cf3afc" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb 0.1.10", +] + +[[package]] +name = "jiff-tzdb-platform" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc65b284afcfa8f6cf189c7274c805505314a7ab975c60e1f548bff56525420e" +dependencies = [ + "jiff-tzdb 1.0.0", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom 0.4.3", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa295c8f71b9bad32d060e0e145f96dcba0cc6c6171e129646140d1c96b05617" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "jsonptr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c22d99362c7aac7d77efab6b49c2181674b165d7e6e7c755b3432ded64bf51" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" +dependencies = [ + "bitflags", + "serde", +] + +[[package]] +name = "largsform" +version = "0.1.0" +dependencies = [ + "largsform-core", + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-dialog", + "tauri-plugin-opener", + "tempfile", + "tokio", +] + +[[package]] +name = "largsform-core" +version = "0.1.0" +dependencies = [ + "heifer", + "image", + "img-parts", + "qcms", + "ravif", + "rgb", + "serde", + "serde_json", + "tempfile", + "thiserror 2.0.21", + "webp", +] + +[[package]] +name = "libappindicator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f57fd42f20edd22ee374ebcedda7bdecd1d5d1e76f11880d9ff2898ed2150d76" +dependencies = [ + "gtk", + "libappindicator-sys", +] + +[[package]] +name = "libappindicator-sys" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b76d3d67eb285f611b14654cd097f52eb7e83acc2b59913147f8ac695b61149" +dependencies = [ + "gtk-sys", + "libloading", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "libloading" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1832accd5a4ca2795ace4d05d15c4039be15b62d3b950eff99746a990e3cc10" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "libc", +] + +[[package]] +name = "libwebp-sys" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54cd30df7c7165ce74a456e4ca9732c603e8dc5e60784558c1c6dc047f876733" +dependencies = [ + "cc", + "glob", +] + +[[package]] +name = "link-section" +version = "0.19.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d9aae57673c1a235149777a74d152f3210ebd3e3b13346d2cdb6809e566bd3c" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "loop9" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062" +dependencies = [ + "imgref", +] + +[[package]] +name = "markup5ever" +version = "0.40.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ab3dc68ac4a0f5719e560136778c1ee716e296030d75dbd4484e37e39e3a842" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[package]] +name = "maybe-rayon" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519" +dependencies = [ + "cfg-if", + "rayon", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "serde", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20521a903f02b0a573cd6840e9d0a5a0cc043d361fe924092cd70f8556cc9c4a" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "muda" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a775675be5389020a44c56efbdf3bbea8b97f47dfdd325e6c5c5213797a7e0aa" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "libc", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "nasm-rs" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706bf8a5e8c8ddb99128c3291d31bd21f4bcde17f0f4c20ec678d85c74faa149" +dependencies = [ + "jobserver", + "log", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "no_std_io2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418abd1b6d34fbf6cae440dc874771b0525a604428704c76e48b29a5e67b8003" +dependencies = [ + "memchr", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "noop_proc_macro" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8" + +[[package]] +name = "num-bigint" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "num-integer" +version = "0.1.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", + "objc2-uniform-type-identifiers", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags", + "block2", + "libc", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-uniform-type-identifiers" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7902ac02859fc1f7045f8b598c63f1ae0cc7efeaa06a9bc9f3d9a3c955974fa4" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "open" +version = "5.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95" +dependencies = [ + "dunce", + "is-wsl", + "libc", +] + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "ordered-stream" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +dependencies = [ + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "pango" +version = "0.22.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2022dbbd82e1c42bd950a6f1df9b98c796e725dce5ec275e03cbf9772e4efa" +dependencies = [ + "gio", + "glib", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.22.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd6be7bdb6cde4c49703315c1818a14382ce500dce57179a8d05f1c5efe4955f" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps 9.0.1", +] + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link 0.2.1", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pastey" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35fb2e5f958ec131621fdd531e9fc186ed768cbe395337403ae56c17a74c68ec" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "010378780309880b08997fae13be7834dba947d36393bd372f2b1556deb2a2f6" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b585a510fb76fdebead6897982ef2a03a21d8e6cbcca904999742a4afc6ffe" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aeb62e0959d5a1bebc965f4d15d9e2b7cea002b6b0f5ba8cde6cc26738467100" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fa8d0ca26d424d27630da600c6624696e7dec8bf7b3b492b383c5dc49e5e085" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fd9027e2d9319be6349febd1db4e8d02aa544921200c9b777720ac34a3aa89" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f120c8d5021b34abd2f2ffd7ee96687cbcd6c54a3e68d86b6169f4a5cd480ffe" + +[[package]] +name = "piper" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1" +dependencies = [ + "atomic-waker", + "fastrand", + "futures-io", +] + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plist" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7a42747bbcc4374e6922a15040dccacf720e4ce48a77e668f7116b9aa19a0a" +dependencies = [ + "base64 0.23.1", + "indexmap 2.14.2", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "profiling" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" +dependencies = [ + "profiling-procmacros", +] + +[[package]] +name = "profiling-procmacros" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4488a4a36b9a4ba6b9334a32a39971f77c1436ec82c38707bce707699cc3bbcb" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "qcms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quick-xml" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rand" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rav1e" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43b6dd56e85d9483277cde964fd1bdb0428de4fec5ebba7540995639a21cb32b" +dependencies = [ + "aligned-vec", + "arbitrary", + "arg_enum_proc_macro", + "arrayvec", + "av-scenechange", + "av1-grain", + "bitstream-io", + "built", + "cc", + "cfg-if", + "interpolate_name", + "itertools", + "libc", + "libfuzzer-sys", + "log", + "maybe-rayon", + "nasm-rs", + "new_debug_unreachable", + "noop_proc_macro", + "num-derive", + "num-traits", + "paste", + "profiling", + "rand", + "rand_chacha", + "simd_helpers", + "thiserror 2.0.21", + "v_frame", + "wasm-bindgen", +] + +[[package]] +name = "ravif" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e52310197d971b0f5be7fe6b57530dcd27beb35c1b013f29d66c1ad73fbbcc45" +dependencies = [ + "avif-serialize", + "imgref", + "loop9", + "quick-error", + "rav1e", + "rayon", + "rgb", +] + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "rayon" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.21", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "regex" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9807af0e638c12e753aa1b4e601791bf2a8f71274023c8bbeec12fc149950857" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d60ef07df457506a0a1a2073112eb4aae5733dbd2813c3da77d1b0fd441158" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6" + +[[package]] +name = "reqwest" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rfd" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4b9d4857b10297ffb0f64cae711e983a7aeaee561848d56d429d3858bd8ed93" +dependencies = [ + "block2", + "dispatch2", + "glib-sys", + "gobject-sys", + "gtk-sys", + "js-sys", + "libc", + "log", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-uniform-type-identifiers", + "percent-encoding", + "raw-window-handle", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rgb" +version = "0.8.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8322aebea94a6cc288ff884e8a49bdbceef60206c400c6c46d22e62fc4fd91a6" +dependencies = [ + "bitflags", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serde_spanned" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_with" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56cb1ca7c93ae63d6439b5250f6b6b040f7e121f32e5dd2f5d523dd4149b3204" +dependencies = [ + "base64 0.23.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.2", + "jiff 0.2.46", + "jiff 1.1.0", + "schemars 0.9.0", + "schemars 1.2.3", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff15a7c864bbec77d9586ca6822bc7c369bdf19e9243134a62b0b51ce26b31f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4eceb519ec34d8290aaf6e46f435102f2bfa63f22b05a144fb16ab266d3b198" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "820083d430c52864bf834423fc988cbcf61685d6f9d22a765a64e3f6cfe3521c" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "simd_helpers" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f48ea32978b7ad365bd1ecce83827746d5d50dc006a8c85112b7acc3c716e3e7" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3244542535d5de959d90ec55d1b5ff0fd2bb7b1310223907d5f11932847f7b59" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d38b59ff6d302538efd337e15d04d61c5b909ec223c60ae4061d74605a962a" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79d5d25225bb06f83b78ff8cc35973b56d45fcdd21af6ed6d2bbd67f5a6f9bea" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps 7.0.8", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_vcruntime" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7589a1859b09232522bb9edf076ca7fcf14ded96685d3fa629db73023ffbb7" + +[[package]] +name = "string_cache" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffa8a5dbe8b3f0bbe29d4c3225daafaeead63afdc1b65fc4c01a1384166038e6" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928dcdf75e47626b3617a976ec205d9f057584c371c1f23b782129268d0e6edc" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "swift-rs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefd87076fd385308ee4aff597256c902f1fbb4d031de1558efc12f8ffefadd9" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "system-deps" +version = "7.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396a35feb67335377e0251fcbc1092fc85c484bd4e3a7a54319399da127796e7" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "system-deps" +version = "9.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db551ad38aac61d5e0343e0eeeb0163be3115c4e23b6a025959570ee0c03c67d" +dependencies = [ + "cfg-expr", + "heck", + "pkg-config", + "toml", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "018765afffb658648fbdfa825af8f117ceee0499296811802d8359663932e7b7" +dependencies = [ + "async-channel", + "bitflags", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + +[[package]] +name = "tauri" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad570590a6620bd7a767910958cdc581308bef2ccae4a2b794f0347aa5169b75" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck", + "http", + "http-range", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.21", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97cc0781e9d66f684d7150507d5423fc05322312ddfd12f24c30e833cf183153" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs", + "glob", + "json-patch", + "semver", + "serde_json", + "static_vcruntime", + "strsim", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c0e6d4ad77790f6da7ac445f1a8908211785e5324bb6a9662582f3ac127231" +dependencies = [ + "base64 0.23.1", + "brotli", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde_json", + "sha2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.21", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "564854181dbca954a49e852140be2d810c4fc3e882538e8f530bb197bd69cfec" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-plugin" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ace389bb5d5ac6379af1e50981a7860e254157c8d333627473a2c9d23134047" +dependencies = [ + "anyhow", + "glob", + "plist", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri-utils", + "walkdir", +] + +[[package]] +name = "tauri-plugin-dialog" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96f4dcf1a6c6009f4a58928e8a523b95465e982d12c58db054a1ea7c6c8e1a0f" +dependencies = [ + "log", + "raw-window-handle", + "rfd", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "tauri-plugin-fs", + "thiserror 2.0.21", + "url", +] + +[[package]] +name = "tauri-plugin-fs" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a1649dc7e9429b2f32164fb6614abff8bc10ed8802fa186cef72df4276eed20" +dependencies = [ + "anyhow", + "dunce", + "glob", + "log", + "objc2-foundation", + "percent-encoding", + "schemars 0.8.22", + "serde", + "serde_json", + "serde_repr", + "tauri", + "tauri-plugin", + "tauri-utils", + "thiserror 2.0.21", + "toml", + "url", +] + +[[package]] +name = "tauri-plugin-opener" +version = "2.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54592c6718b42ab198bf11bda6a428a3553ca2f2f8e506df56f6a063ec328331" +dependencies = [ + "dunce", + "glob", + "objc2-app-kit", + "objc2-foundation", + "open", + "schemars 0.8.22", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.21", + "url", + "windows", + "zbus", +] + +[[package]] +name = "tauri-runtime" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ebc9c0fc7a10f26169edd4adcc8798030cd025b2621791fe7f7e0330105c68" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34a8d0c102664aaec2d2bfc4e8c4375e253a4192f574bb4352517c152643c6a8" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b3bb2217a2c5632f25a375c305f5a1f9b3beaa7b0614a21e79f297b6b3cbc92" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.21", + "toml", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52bb6904475a6ca662f15ef787f18ade61d5740a1ee12c45d3b748efdb6f796" +dependencies = [ + "dunce", + "embed-resource", + "toml", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "1.2.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b1f26e9485c1fa43ee89fe76e9f3fb9e2e52bb227f8594b4d687496b83d073" +dependencies = [ + "indexmap 2.14.2", + "serde_core", + "serde_spanned", + "toml_datetime", + "toml_parser", + "toml_writer", + "winnow", +] + +[[package]] +name = "toml_datetime" +version = "1.1.3+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.25.21+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88497dab46de5bf343ec66b05c251e48c6213f3e9170c70a70a823f7abe886a4" +dependencies = [ + "indexmap 2.14.2", + "toml_datetime", + "toml_parser", + "winnow", +] + +[[package]] +name = "toml_parser" +version = "1.1.7+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" +dependencies = [ + "winnow", +] + +[[package]] +name = "toml_writer" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19886363e700addca09f3787a1394eda88a80c89b9305f96effb9ea5ce09146d" +dependencies = [ + "crossbeam-channel", + "dirs", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "uds_windows" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e" +dependencies = [ + "memoffset", + "tempfile", + "windows-sys 0.61.2", +] + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "url" +version = "2.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df16f50ef4cc145211879a3867ba757076b25dfee812040dcb0658bd9ae7904b" +dependencies = [ + "icu_properties", + "regex", + "serde", + "url", +] + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "uuid" +version = "1.29.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c14b15dffa2f4bd712103e857140aa04a4f2ff6e955c77d7eb8e53ee02a3b64" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "v_frame" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "666b7727c8875d6ab5db9533418d7c764233ac9c0cff1d469aec8fa127597be2" +dependencies = [ + "aligned-vec", + "num-traits", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42e295b7452c4604982280d8586001fcad9b8b201cac67bca9771e7a7475403" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.10", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7572660c8890448ba236b7376f27e389c6a7e1c70195622faced601f855c0ada" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c626604de3cf25b809e97bdb771509428fbfa6f0b9ed45ef2e8eacedeee3c8" +dependencies = [ + "bitflags", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99707dd86d56ab2cc7a35b083220067d28f293194f349df3afc92427f230a95b" +dependencies = [ + "bitflags", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps 9.0.1", +] + +[[package]] +name = "webp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c071456adef4aca59bf6a583c46b90ff5eb0b4f758fc347cea81290288f37ce1" +dependencies = [ + "image", + "libwebp-sys", +] + +[[package]] +name = "webview2-com" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f89fca7a704cee10dcb3654c1dbb8941d1783132f1917358af75bec37a7d7e6" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a07132775117d6065853d9d1178157b8c90e228de47129d6bce2c7edebedfb" +dependencies = [ + "thiserror 2.0.21", + "windows", + "windows-core", +] + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111e51caca442cafd9bab396628ac4d814880eaea4e63dfd76a12e9f342b5580" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "windows-sys 0.61.2", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.2.1", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link 0.2.1", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-link" +version = "0.101.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4e57b2aae53a240c62b65069a63eaf8d5fa747f5d0d8e670c5210a98847bce4" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-sys" +version = "0.101.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eed2df9f5f458664c87437f6758f0d93085b06433bf66b2b84c23c19f3d2012c" +dependencies = [ + "windows-link 0.101.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link 0.2.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wry" +version = "0.58.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fadb3ce0a4ec6f7acddf364af8bbf14f5a1e532e5d5eed3b8141cdd3b3a774" +dependencies = [ + "base64 0.23.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "y4m" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zbus" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907" +dependencies = [ + "async-broadcast", + "async-executor", + "async-io", + "async-lock", + "async-process", + "async-recursion", + "async-task", + "async-trait", + "blocking", + "enumflags2", + "event-listener", + "futures-core", + "futures-lite", + "hex", + "libc", + "ordered-stream", + "rustix", + "serde", + "serde_repr", + "tracing", + "uds_windows", + "uuid", + "windows-sys 0.61.2", + "winnow", + "zbus_macros", + "zbus_names", + "zvariant", +] + +[[package]] +name = "zbus_macros" +version = "5.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.10", + "zbus_names", + "zvariant", + "zvariant_utils", +] + +[[package]] +name = "zbus_names" +version = "4.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd" +dependencies = [ + "serde", + "winnow", + "zvariant", +] + +[[package]] +name = "zcheapstr" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2da34e7164b75d803c3197b86e6cf61b874106fbd472c5082575a8bc5fbd0907" +dependencies = [ + "serde", +] + +[[package]] +name = "zerocopy" +version = "0.8.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba8a86aee14fc8cc6c208af60854b3d4ab7185a9a369a12c648faa2716ff42a" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f89bca3b96ceb3cfcb4572790402f977442270d252b9a8504ebc258760c55f94" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "zlib-rs" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" + +[[package]] +name = "zune-core" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a65ee146f41cb456b005bc898af3ab1495ded4ee61ac3637103f40ccacac18" + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] + +[[package]] +name = "zvariant" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7" +dependencies = [ + "endi", + "enumflags2", + "serde", + "winnow", + "zcheapstr", + "zvariant_derive", + "zvariant_utils", +] + +[[package]] +name = "zvariant_derive" +version = "5.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 3.0.10", + "zvariant_utils", +] + +[[package]] +name = "zvariant_utils" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.10", + "winnow", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..6fb5e84 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,32 @@ +[workspace] +resolver = "2" +members = ["crates/core", "src-tauri"] +default-members = ["crates/core", "src-tauri"] + +[workspace.package] +version = "0.1.0" +edition = "2021" +license = "MIT" +rust-version = "1.85" +repository = "https://github.com/devlargs/largsform" + +[workspace.dependencies] +largsform-core = { path = "crates/core" } +image = { version = "0.25.10", default-features = false, features = ["jpeg", "png", "tiff", "gif", "webp", "ico"] } +thiserror = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +tempfile = "3" +tokio = { version = "1", features = ["rt-multi-thread", "sync", "macros", "time"] } + +[workspace.lints.rust] +unsafe_code = "deny" + +[workspace.lints.clippy] +unwrap_used = "deny" +expect_used = "warn" + +[profile.release] +lto = "thin" +codegen-units = 1 +panic = "unwind" diff --git a/README.md b/README.md new file mode 100644 index 0000000..809ed44 --- /dev/null +++ b/README.md @@ -0,0 +1,59 @@ +# Largsform + +A private, offline desktop media converter for macOS, Ubuntu, and Windows, built with Rust and +[Tauri 2](https://v2.tauri.app). + +All conversions run on your machine. Files are never uploaded, and the app makes no network +requests. + +**Status:** in development. The first feature, image and PDF conversion, is specified in +[`specs/001-image-conversion-mvp`](specs/001-image-conversion-mvp/spec.md). + +## Supported conversions (MVP) + +- **Inputs:** HEIC/HEIF, WebP, AVIF, JPG, PNG, TIFF, GIF, SVG, PDF +- **Outputs:** JPG, PNG, WebP, AVIF, PDF, ICO, SVG (traced vectors) + +Any input converts to any output except its own format. + +## Prerequisites + +| Tool | Version | +| ------------- | ---------------------------------------------------------------------------- | +| Rust | stable ≥ 1.85, with `clippy` and `rustfmt` | +| Node.js | 22 LTS or newer, with pnpm | +| Platform deps | [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/) for your OS | + +## Setup, run, test + +```bash +pnpm install +scripts/fetch-pdfium.sh # pinned PDFium build, verified by SHA-256 + +pnpm tauri dev # run the app +pnpm tauri build # build installers + +cargo fmt --all --check +cargo clippy --workspace --all-targets -- -D warnings +cargo test --workspace +pnpm lint && pnpm check && pnpm test +``` + +The full validation guide is in +[`specs/001-image-conversion-mvp/quickstart.md`](specs/001-image-conversion-mvp/quickstart.md). + +## Project layout + +| Path | Contents | +| --------------------------------- | ------------------------------------------------------------- | +| `crates/core/` | `largsform-core`: the conversion engine, independent of Tauri | +| `src-tauri/` | The Tauri shell: thin command adapters over the core | +| `src/` | Svelte 5 + TypeScript UI | +| `specs/` | Spec Kit feature specifications, plans, and tasks | +| `.specify/memory/constitution.md` | Project principles | + +## Contributing + +- Branches: start features from the latest `main` as `feat/NNN-short-name` (`/speckit-specify` + does this automatically). Merge into `staging` for testing, then open a PR to `main`. +- Commits follow [Conventional Commits](https://www.conventionalcommits.org). diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..0358cdb --- /dev/null +++ b/clippy.toml @@ -0,0 +1,2 @@ +allow-unwrap-in-tests = true +allow-expect-in-tests = true diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml new file mode 100644 index 0000000..c07dd34 --- /dev/null +++ b/crates/core/Cargo.toml @@ -0,0 +1,29 @@ +[package] +name = "largsform-core" +description = "Local-first image and PDF conversion engine for Largsform" +version.workspace = true +edition.workspace = true +license.workspace = true +rust-version.workspace = true +repository.workspace = true + +[dependencies] +image.workspace = true +thiserror.workspace = true +serde.workspace = true +tempfile.workspace = true +heifer = { version = "0.10", default-features = false, features = ["avif"] } +img-parts = "0.4" +qcms = "0.3" +webp = "0.3" +ravif = "0.13" +rgb = "0.8.53" + +[dev-dependencies] +serde_json = "1" +# HEVC encoder for examples/make_fixtures.rs only (features unify with the decoder dependency). +heifer = { version = "0.10", default-features = false, features = ["avif", "encoder"] } + +[lints] +workspace = true + diff --git a/crates/core/examples/avif_bench.rs b/crates/core/examples/avif_bench.rs new file mode 100644 index 0000000..f590b7e --- /dev/null +++ b/crates/core/examples/avif_bench.rs @@ -0,0 +1,40 @@ +//! T039 benchmark (research R4): ravif encode time on a 12 MP photo-like image per speed. +//! cargo run --release -p largsform-core --example avif_bench +#![allow(clippy::unwrap_used, clippy::expect_used)] // dev tool + +use std::time::Instant; + +fn main() { + let (w, h) = (4032usize, 3024usize); + let px: Vec = (0..h) + .flat_map(|y| { + (0..w).map(move |x| { + let n = ((x * 73_856_093) ^ (y * 19_349_663)) % 23; + ravif::RGB8::new( + (x * 255 / w + n) as u8, + (y * 255 / h) as u8, + (((x / 7) ^ (y / 5)) & 0x7F) as u8 + 60, + ) + }) + }) + .collect(); + let exif = b"II*\0\x08\0\0\0\0\0\0\0\0\0".to_vec(); + for speed in [6u8, 8, 10] { + let t = Instant::now(); + let out = ravif::Encoder::new() + .with_quality(90.0) + .with_speed(speed) + .with_exif(exif.clone()) + .encode_rgb(ravif::Img::new(px.as_slice(), w, h)) + .expect("encode"); + let has_exif = heifer::read_metadata(&out.avif_file) + .ok() + .and_then(|m| m.exif) + .is_some(); + println!( + "speed {speed:>2}: {:.2} s, {} KB, EXIF embedded: {has_exif}", + t.elapsed().as_secs_f64(), + out.avif_file.len() / 1024 + ); + } +} diff --git a/crates/core/examples/heic_spike.rs b/crates/core/examples/heic_spike.rs new file mode 100644 index 0000000..a6832f9 --- /dev/null +++ b/crates/core/examples/heic_spike.rs @@ -0,0 +1,44 @@ +//! T038 spike (research R5): decode quality and speed of `heifer` on a 12 MP HEIC. +//! cargo run --release -p largsform-core --example heic_spike +#![allow(clippy::unwrap_used, clippy::expect_used)] // dev tool + +use std::time::Instant; + +fn main() { + let (w, h) = (4032u32, 3024u32); + let rgba: Vec = (0..h) + .flat_map(|y| { + (0..w).flat_map(move |x| { + [ + (x * 255 / w) as u8, + (y * 255 / h) as u8, + ((x ^ y) & 0xFF) as u8 / 4 + 100, + 255, + ] + }) + }) + .collect(); + let heic = heifer::encode_rgba8(w, h, &rgba, &heifer::EncodeOptions::new().with_quality(90)) + .expect("encode"); + println!("12 MP HEIC: {} KB", heic.len() / 1024); + let mut best = f64::MAX; + let mut decoded = None; + for _ in 0..3 { + let t = Instant::now(); + let img = heifer::decode(&heic).expect("decode"); + best = best.min(t.elapsed().as_secs_f64()); + decoded = Some(img); + } + let img = decoded.expect("decoded"); + let mse: f64 = rgba + .chunks_exact(4) + .zip(img.data.chunks_exact(4)) + .flat_map(|(a, b)| (0..3).map(move |i| (f64::from(a[i]) - f64::from(b[i])).powi(2))) + .sum::() + / (f64::from(w) * f64::from(h) * 3.0); + let psnr = 10.0 * (255.0f64 * 255.0 / mse).log10(); + println!( + "decode best of 3: {best:.3} s, PSNR vs source {psnr:.1} dB ({}x{}, {}-bit)", + img.width, img.height, img.bit_depth + ); +} diff --git a/crates/core/examples/make_fixtures.rs b/crates/core/examples/make_fixtures.rs new file mode 100644 index 0000000..2d25685 --- /dev/null +++ b/crates/core/examples/make_fixtures.rs @@ -0,0 +1,577 @@ +//! Regenerates the synthetic test corpus in `tests/fixtures/samples/` (T028). +//! Every file is generated here from code, so the corpus has no third-party content. +//! +//! cargo run -p largsform-core --example make_fixtures +#![allow(clippy::unwrap_used, clippy::expect_used)] // dev tool + +use std::fs; +use std::io::Cursor; +use std::path::{Path, PathBuf}; + +use image::codecs::gif::{GifEncoder, Repeat}; +use image::codecs::jpeg::JpegEncoder; +use image::codecs::png::PngEncoder; +use image::codecs::tiff::TiffEncoder; +use image::{Delay, DynamicImage, Frame, ImageBuffer, ImageEncoder, Rgb, Rgba, RgbaImage}; +use largsform_core::format::Format; +use largsform_core::metadata::{write_metadata, MetadataBundle}; + +fn out_dir() -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/samples") +} + +fn save(name: &str, bytes: &[u8]) { + let p = out_dir().join(name); + fs::write(&p, bytes).expect("write"); + println!("{name:<24} {:>8} bytes", bytes.len()); +} + +/// A smooth, photo-like gradient with some texture (many distinct colors). +fn photo(w: u32, h: u32) -> image::RgbImage { + ImageBuffer::from_fn(w, h, |x, y| { + let fx = x as f32 / w as f32; + let fy = y as f32 / h as f32; + let n = ((x.wrapping_mul(73_856_093) ^ y.wrapping_mul(19_349_663)) % 17) as f32; + Rgb([ + (40.0 + 180.0 * fx + n) as u8, + (60.0 + 140.0 * fy + n) as u8, + (200.0 - 120.0 * fx * fy + n) as u8, + ]) + }) +} + +/// An asymmetric marker so rotation/flip mistakes are visible: red block top-left. +fn marked_photo(w: u32, h: u32) -> image::RgbImage { + let mut img = photo(w, h); + for y in 0..h / 4 { + for x in 0..w / 4 { + img.put_pixel(x, y, Rgb([230, 20, 20])); + } + } + img +} + +fn logo(size: u32) -> RgbaImage { + let c = size as f32 / 2.0; + ImageBuffer::from_fn(size, size, |x, y| { + let d = ((x as f32 - c).powi(2) + (y as f32 - c).powi(2)).sqrt(); + if d < c * 0.45 { + Rgba([31, 78, 140, 255]) + } else if d < c * 0.8 { + Rgba([245, 180, 30, 255]) + } else { + Rgba([0, 0, 0, 0]) + } + }) +} + +fn jpeg(img: &image::RgbImage, q: u8) -> Vec { + let mut buf = Vec::new(); + JpegEncoder::new_with_quality(&mut buf, q) + .write_image( + img.as_raw(), + img.width(), + img.height(), + image::ExtendedColorType::Rgb8, + ) + .expect("jpeg"); + buf +} + +fn png(img: &DynamicImage) -> Vec { + let mut buf = Cursor::new(Vec::new()); + img.write_with_encoder(PngEncoder::new(&mut buf)) + .expect("png"); + buf.into_inner() +} + +// --------------------------------------------------------------------------------------------- +// EXIF (little-endian TIFF) with camera, date and GPS tags +// --------------------------------------------------------------------------------------------- + +struct Ifd { + entries: Vec<(u16, u16, u32, Vec)>, // tag, type, count, value bytes +} + +impl Ifd { + fn new() -> Self { + Self { + entries: Vec::new(), + } + } + fn ascii(mut self, tag: u16, s: &str) -> Self { + let mut v = s.as_bytes().to_vec(); + v.push(0); + self.entries.push((tag, 2, v.len() as u32, v)); + self + } + fn short(mut self, tag: u16, n: u16) -> Self { + self.entries.push((tag, 3, 1, n.to_le_bytes().to_vec())); + self + } + fn long(mut self, tag: u16, n: u32) -> Self { + self.entries.push((tag, 4, 1, n.to_le_bytes().to_vec())); + self + } + fn bytes(mut self, tag: u16, b: &[u8]) -> Self { + self.entries.push((tag, 1, b.len() as u32, b.to_vec())); + self + } + fn rationals(mut self, tag: u16, r: &[(u32, u32)]) -> Self { + let v: Vec = r + .iter() + .flat_map(|(n, d)| [n.to_le_bytes(), d.to_le_bytes()].concat()) + .collect(); + self.entries.push((tag, 5, r.len() as u32, v)); + self + } + fn size(&self) -> u32 { + let data: u32 = self + .entries + .iter() + .map(|e| { + if e.3.len() > 4 { + e.3.len() as u32 + (e.3.len() as u32 & 1) + } else { + 0 + } + }) + .sum(); + 2 + 12 * self.entries.len() as u32 + 4 + data + } + fn write(&mut self, out: &mut Vec) { + self.entries.sort_by_key(|e| e.0); + let start = out.len() as u32; + let mut data_off = start + 2 + 12 * self.entries.len() as u32 + 4; + let mut data = Vec::new(); + out.extend_from_slice(&(self.entries.len() as u16).to_le_bytes()); + for (tag, ty, count, value) in &self.entries { + out.extend_from_slice(&tag.to_le_bytes()); + out.extend_from_slice(&ty.to_le_bytes()); + out.extend_from_slice(&count.to_le_bytes()); + if value.len() <= 4 { + let mut v = value.clone(); + v.resize(4, 0); + out.extend_from_slice(&v); + } else { + out.extend_from_slice(&data_off.to_le_bytes()); + data.extend_from_slice(value); + if value.len() % 2 == 1 { + data.push(0); + } + data_off += value.len() as u32 + (value.len() as u32 & 1); + } + } + out.extend_from_slice(&0u32.to_le_bytes()); + out.extend_from_slice(&data); + } +} + +fn exif(orientation: u16, gps: bool) -> Vec { + let mut exif_ifd = Ifd::new() + .ascii(0x9003, "2026:06:01 09:30:00") // DateTimeOriginal + .rationals(0x829A, &[(1, 250)]); // ExposureTime + let mut gps_ifd = Ifd::new() + .bytes(0x0000, &[2, 3, 0, 0]) // GPSVersionID + .ascii(0x0001, "N") + .rationals(0x0002, &[(14, 1), (35, 1), (2_400, 100)]) // 14°35'24" N (Manila) + .ascii(0x0003, "E") + .rationals(0x0004, &[(120, 1), (58, 1), (4_200, 100)]); + // IFD0 has fixed entries; compute offsets of the sub-IFDs. + let n_ifd0 = if gps { 6 } else { 5 }; + let ifd0_tmp = Ifd::new() + .ascii(0x010F, "Largsform Test Camera") + .ascii(0x0110, "LTC-1") + .short(0x0112, orientation) + .ascii(0x0131, "make_fixtures"); + let ifd0_size = ifd0_tmp.size() + 12 * (n_ifd0 - 4); + let exif_off = 8 + ifd0_size; + let gps_off = exif_off + exif_ifd.size(); + let mut ifd0 = ifd0_tmp.long(0x8769, exif_off); + if gps { + ifd0 = ifd0.long(0x8825, gps_off); + } + let mut out = b"II*\0".to_vec(); + out.extend_from_slice(&8u32.to_le_bytes()); + ifd0.write(&mut out); + assert_eq!(out.len() as u32, exif_off); + exif_ifd.write(&mut out); + if gps { + assert_eq!(out.len() as u32, gps_off); + gps_ifd.write(&mut out); + } + out +} + +// --------------------------------------------------------------------------------------------- +// Minimal ICC v2 RGB profile (matrix/TRC), so the corpus doesn't redistribute vendor profiles +// --------------------------------------------------------------------------------------------- + +fn s15(v: f64) -> [u8; 4] { + ((v * 65536.0).round() as i32).to_be_bytes() +} + +fn xyz_tag(x: f64, y: f64, z: f64) -> Vec { + [ + b"XYZ ".to_vec(), + vec![0; 4], + s15(x).to_vec(), + s15(y).to_vec(), + s15(z).to_vec(), + ] + .concat() +} + +fn icc_profile( + desc: &str, + r: (f64, f64, f64), + g: (f64, f64, f64), + b: (f64, f64, f64), + gamma: f64, +) -> Vec { + let mut desc_tag = b"desc".to_vec(); + desc_tag.extend_from_slice(&[0; 4]); + desc_tag.extend_from_slice(&((desc.len() + 1) as u32).to_be_bytes()); + desc_tag.extend_from_slice(desc.as_bytes()); + desc_tag.push(0); + desc_tag.extend_from_slice(&[0; 12]); // unicode lang/count + scriptcode code/count + desc_tag.extend_from_slice(&[0; 67]); + let curv = [ + b"curv".to_vec(), + vec![0; 4], + 1u32.to_be_bytes().to_vec(), + (((gamma * 256.0).round()) as u16).to_be_bytes().to_vec(), + ] + .concat(); + let cprt = [ + b"text".to_vec(), + vec![0; 4], + b"CC0 - generated by Largsform make_fixtures\0".to_vec(), + ] + .concat(); + let tags: Vec<(&[u8; 4], Vec)> = vec![ + (b"desc", desc_tag), + (b"cprt", cprt), + (b"wtpt", xyz_tag(0.9642, 1.0, 0.8249)), + (b"rXYZ", xyz_tag(r.0, r.1, r.2)), + (b"gXYZ", xyz_tag(g.0, g.1, g.2)), + (b"bXYZ", xyz_tag(b.0, b.1, b.2)), + (b"rTRC", curv.clone()), + (b"gTRC", curv.clone()), + (b"bTRC", curv), + ]; + let mut table = Vec::new(); + let mut data = Vec::new(); + let mut off = 128 + 4 + 12 * tags.len(); + for (sig, body) in &tags { + table.extend_from_slice(*sig); + table.extend_from_slice(&(off as u32).to_be_bytes()); + table.extend_from_slice(&(body.len() as u32).to_be_bytes()); + data.extend_from_slice(body); + while data.len() % 4 != 0 { + data.push(0); + } + off = 128 + 4 + 12 * tags.len() + data.len(); + } + let total = 128 + 4 + table.len() + data.len(); + let mut h = vec![0u8; 128]; + h[0..4].copy_from_slice(&(total as u32).to_be_bytes()); + h[8..12].copy_from_slice(&[2, 0x10, 0, 0]); // v2.1 + h[12..16].copy_from_slice(b"mntr"); + h[16..20].copy_from_slice(b"RGB "); + h[20..24].copy_from_slice(b"XYZ "); + h[24..36].copy_from_slice(&[0x07, 0xEA, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0]); + h[36..40].copy_from_slice(b"acsp"); + h[68..72].copy_from_slice(&s15(0.9642)); + h[72..76].copy_from_slice(&s15(1.0)); + h[76..80].copy_from_slice(&s15(0.8249)); + let mut out = h; + out.extend_from_slice(&(tags.len() as u32).to_be_bytes()); + out.extend_from_slice(&table); + out.extend_from_slice(&data); + out +} + +/// Display P3 primaries (D50-adapted), gamma 2.2 approximation of the sRGB curve. +fn display_p3_icc() -> Vec { + icc_profile( + "Largsform Test Display P3", + (0.5151, 0.2412, -0.0011), + (0.2920, 0.6922, 0.0419), + (0.1571, 0.0666, 0.7841), + 2.2, + ) +} + +// --------------------------------------------------------------------------------------------- + +fn heic(img: &heifer::Image, meta: &heifer::Metadata, quality: u8) -> Vec { + let opts = heifer::EncodeOptions::new().with_quality(quality); + heifer::encode_with_metadata(img, meta, &opts).expect("heic") +} + +fn heif_image_8(rgb: &image::RgbImage) -> heifer::Image { + heifer::Image { + width: rgb.width(), + height: rgb.height(), + bit_depth: 8, + has_alpha: false, + data: rgb + .pixels() + .flat_map(|p| [p[0], p[1], p[2], 255].map(u16::from)) + .collect(), + } +} + +fn main() { + fs::create_dir_all(out_dir()).expect("mkdir"); + + // JPG ------------------------------------------------------------------------------------ + let p = marked_photo(800, 600); + save("photo.jpg", &jpeg(&p, 85)); + let bundle = MetadataBundle { + exif: Some(exif(1, true)), + icc: None, + xmp: None, + }; + save( + "gps.jpg", + &write_metadata(jpeg(&p, 85), Format::Jpeg, &bundle).expect("exif"), + ); + // Orientation 6 = rotate 90° CW to display: store the pixels rotated 90° CCW. + let stored = image::imageops::rotate270(&marked_photo(800, 600)); + let bundle = MetadataBundle { + exif: Some(exif(6, false)), + icc: None, + xmp: None, + }; + save( + "rotated-6.jpg", + &write_metadata(jpeg(&stored, 85), Format::Jpeg, &bundle).expect("exif"), + ); + + // PNG ------------------------------------------------------------------------------------ + let alpha = logo(256); + save("alpha.png", &png(&DynamicImage::ImageRgba8(alpha.clone()))); + save("logo-flat.png", &png(&DynamicImage::ImageRgba8(logo(128)))); + save("logo-512.png", &png(&DynamicImage::ImageRgba8(logo(512)))); + save("wide.png", &png(&DynamicImage::ImageRgb8(photo(640, 200)))); + let p16: ImageBuffer, Vec> = ImageBuffer::from_fn(320, 200, |x, y| { + Rgb([(x * 204) as u16, (y * 327) as u16, 40_000]) + }); + save("png16.png", &png(&DynamicImage::ImageRgb16(p16))); + save( + "png-named.jpg", + &png(&DynamicImage::ImageRgb8(photo(160, 120))), + ); + + // WebP ----------------------------------------------------------------------------------- + let wp = photo(640, 480); + save( + "photo.webp", + &webp::Encoder::from_rgb(wp.as_raw(), 640, 480).encode(80.0), + ); + save( + "alpha.webp", + &webp::Encoder::from_rgba(alpha.as_raw(), 256, 256).encode_lossless(), + ); + { + let config = webp::WebPConfig::new().expect("config"); + let frames: Vec = (0..3) + .map(|i| { + ImageBuffer::from_fn(96, 64, |x, _| Rgba([(x * 2 + i * 80) as u8, 90, 160, 255])) + }) + .collect(); + let mut enc = webp::AnimEncoder::new(96, 64, &config); + for (i, f) in frames.iter().enumerate() { + enc.add_frame(webp::AnimFrame::from_rgba( + f.as_raw(), + 96, + 64, + i as i32 * 100, + )); + } + save("animated.webp", &enc.encode()); + } + + // AVIF ----------------------------------------------------------------------------------- + { + let enc = ravif::Encoder::new().with_quality(70.0).with_speed(8); + let px: Vec = wp + .pixels() + .map(|p| ravif::RGB8::new(p[0], p[1], p[2])) + .collect(); + save( + "photo.avif", + &enc.encode_rgb(ravif::Img::new(px.as_slice(), 640, 480)) + .expect("avif") + .avif_file, + ); + let px: Vec = alpha + .pixels() + .map(|p| ravif::RGBA8::new(p[0], p[1], p[2], p[3])) + .collect(); + save( + "alpha.avif", + &enc.encode_rgba(ravif::Img::new(px.as_slice(), 256, 256)) + .expect("avif") + .avif_file, + ); + } + + // HEIC ----------------------------------------------------------------------------------- + { + let mut meta = heifer::Metadata::new(); + meta.exif = Some(exif(1, true)); + save( + "iphone.heic", + &heic(&heif_image_8(&marked_photo(480, 360)), &meta, 70), + ); + // 10-bit Display P3, larger than 512 px so it is coded as a grid of tiles. + let (w, h) = (1024u32, 640u32); + let data: Vec = (0..h) + .flat_map(|y| { + (0..w).flat_map(move |x| [(x * 1023 / w) as u16, (y * 1023 / h) as u16, 700, 1023]) + }) + .collect(); + let img10 = heifer::Image { + width: w, + height: h, + bit_depth: 10, + has_alpha: false, + data, + }; + let mut meta = heifer::Metadata::new(); + meta.exif = Some(exif(1, false)); + meta.icc_profile = Some(display_p3_icc()); + save("iphone-10bit-p3.heic", &heic(&img10, &meta, 60)); + save( + "android.heif", + &heic( + &heif_image_8(&photo(400, 300)), + &heifer::Metadata::new(), + 70, + ), + ); + } + + // TIFF ----------------------------------------------------------------------------------- + { + let t = photo(400, 300); + let mut buf = Cursor::new(Vec::new()); + TiffEncoder::new(&mut buf) + .write_image(t.as_raw(), 400, 300, image::ExtendedColorType::Rgb8) + .expect("tiff"); + save("photo.tiff", &buf.into_inner()); + save( + "multipage.tiff", + &multipage_tiff(&[photo(200, 150), marked_photo(200, 150)]), + ); + } + + // GIF ------------------------------------------------------------------------------------ + { + let mut buf = Vec::new(); + { + let mut enc = GifEncoder::new(&mut buf); + enc.encode_frame(Frame::new(logo(128))).expect("gif"); + } + save("static.gif", &buf); + let mut buf = Vec::new(); + { + let mut enc = GifEncoder::new(&mut buf); + enc.set_repeat(Repeat::Infinite).expect("repeat"); + for i in 0..4u32 { + let f = ImageBuffer::from_fn(64, 64, |x, y| { + if (x + y + i * 16) % 32 < 16 { + Rgba([200, 40, 40, 255]) + } else { + Rgba([255, 255, 255, 255]) + } + }); + enc.encode_frame(Frame::from_parts( + f, + 0, + 0, + Delay::from_numer_denom_ms(100, 1), + )) + .expect("frame"); + } + } + save("animated.gif", &buf); + } + + // SVG ------------------------------------------------------------------------------------ + save( + "icon.svg", + br##" + + + L + +"##, + ); + save( + "no-size.svg", + br##" + + + +"##, + ); + save( + "remote-href.svg", + br##" + + + + +"##, + ); +} + +/// Two-page baseline RGB TIFF (the `image` crate's encoder writes one page only). +fn multipage_tiff(pages: &[image::RgbImage]) -> Vec { + let mut out = b"II*\0".to_vec(); + out.extend_from_slice(&0u32.to_le_bytes()); // patched below + let mut prev_next_ptr = 4usize; + for p in pages { + let strip_off = out.len() as u32; + out.extend_from_slice(p.as_raw()); + if out.len() % 2 == 1 { + out.push(0); + } + let bps_off = out.len() as u32; + for _ in 0..3 { + out.extend_from_slice(&8u16.to_le_bytes()); + } + let ifd_off = out.len() as u32; + out[prev_next_ptr..prev_next_ptr + 4].copy_from_slice(&ifd_off.to_le_bytes()); + let entries: [(u16, u16, u32, u32); 9] = [ + (256, 4, 1, p.width()), + (257, 4, 1, p.height()), + (258, 3, 3, bps_off), + (259, 3, 1, 1), + (262, 3, 1, 2), + (273, 4, 1, strip_off), + (277, 3, 1, 3), + (278, 4, 1, p.height()), + (279, 4, 1, p.as_raw().len() as u32), + ]; + out.extend_from_slice(&(entries.len() as u16).to_le_bytes()); + for (tag, ty, count, value) in entries { + out.extend_from_slice(&tag.to_le_bytes()); + out.extend_from_slice(&ty.to_le_bytes()); + out.extend_from_slice(&count.to_le_bytes()); + if ty == 3 && count == 1 { + out.extend_from_slice(&(value as u16).to_le_bytes()); + out.extend_from_slice(&[0, 0]); + } else { + out.extend_from_slice(&value.to_le_bytes()); + } + } + prev_next_ptr = out.len(); + out.extend_from_slice(&0u32.to_le_bytes()); + } + out +} diff --git a/crates/core/fuzz/Cargo.lock b/crates/core/fuzz/Cargo.lock new file mode 100644 index 0000000..8df56d2 --- /dev/null +++ b/crates/core/fuzz/Cargo.lock @@ -0,0 +1,590 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "arbitrary" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "bytes" +version = "1.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "776dfebd015e2d8732c684a2c71003674ccb49457b539b9e82151ba38e96dd7c" + +[[package]] +name = "cc" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e45cf2980b2d467be49a9ed942c9179b701063a7ca3d037de7ee9bd67f8d66" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + +[[package]] +name = "crc32fast" +version = "1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd9ae8fcb3ea71b0b26338b4ffb13006bb175de8fd07921089a906ce7e5e6945" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + +[[package]] +name = "errno" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35d6e78f4cebb90e51d543db8fe41528851d6deeef6ef21ebd4bfdc1e784776" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fax" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e44f110d1777dc6559a51e7d45083945ded4f1bf3305494350f693b6d20b9c8" + +[[package]] +name = "flate2" +version = "1.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi", +] + +[[package]] +name = "gif" +version = "0.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" +dependencies = [ + "color_quant", + "weezl", +] + +[[package]] +name = "half" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" +dependencies = [ + "cfg-if", + "crunchy", + "zerocopy", +] + +[[package]] +name = "heifer" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f56f259fe336eda454c55130b48ffd470304ad33368c11a37a0fd571a33b831" +dependencies = [ + "heifer-av1-dec", + "heifer-hevc-dec", + "heifer-isobmff", + "thiserror", +] + +[[package]] +name = "heifer-av1-dec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9730676b57bf0e103cb6ffe8aa11a646dd7b94a8d9e63a1a8bab5e1e6b7826" +dependencies = [ + "thiserror", +] + +[[package]] +name = "heifer-hevc-dec" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f5c50a07c2485dc1defdcbd5e61c030f1bcde127e49f1e952925762795c1b42" +dependencies = [ + "thiserror", +] + +[[package]] +name = "heifer-isobmff" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6d2df240c6a94f09dbf077f313ae2960baa7ea8cf24b25a53bb6707e3b1cdad" +dependencies = [ + "thiserror", +] + +[[package]] +name = "image" +version = "0.25.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104" +dependencies = [ + "bytemuck", + "byteorder-lite", + "color_quant", + "gif", + "image-webp", + "moxcms", + "num-traits", + "png", + "tiff", + "zune-core", + "zune-jpeg", +] + +[[package]] +name = "image-webp" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c8d2831f3eb9706eeac62164959a288f12c047a3c53b353c6c00d5d60eb5c7f" +dependencies = [ + "byteorder-lite", + "quick-error", +] + +[[package]] +name = "img-parts" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93567ea8788640e566a8992a28f4ff64a89b88a369ad05c4198ea6dc8a42ce2b" +dependencies = [ + "bytes", + "crc32fast", + "miniz_oxide 0.9.1", +] + +[[package]] +name = "jobserver" +version = "0.1.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" +dependencies = [ + "getrandom", + "libc", +] + +[[package]] +name = "largsform-core" +version = "0.1.0" +dependencies = [ + "heifer", + "image", + "img-parts", + "qcms", + "serde", + "tempfile", + "thiserror", +] + +[[package]] +name = "largsform-core-fuzz" +version = "0.0.0" +dependencies = [ + "largsform-core", + "libfuzzer-sys", + "tempfile", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libfuzzer-sys" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9fd2f41a1cba099f79a0b6b6c35656cf7c03351a7bae8ff0f28f25270f929d2" +dependencies = [ + "arbitrary", + "cc", +] + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "serde", + "simd-adler32", +] + +[[package]] +name = "moxcms" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b" +dependencies = [ + "num-traits", + "pxfm", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "pxfm" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea" + +[[package]] +name = "qcms" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edecfcd5d755a5e5d98e24cf43113e7cdaec5a070edd0f6b250c03a573da30fa" + +[[package]] +name = "quick-error" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "rustix" +version = "1.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.10", +] + +[[package]] +name = "tiff" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52" +dependencies = [ + "fax", + "flate2", + "half", + "quick-error", + "weezl", + "zune-jpeg", +] + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "weezl" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "zerocopy" +version = "0.8.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cba8a86aee14fc8cc6c208af60854b3d4ab7185a9a369a12c648faa2716ff42a" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f89bca3b96ceb3cfcb4572790402f977442270d252b9a8504ebc258760c55f94" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "zlib-rs" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa76918995d776d9dd34d371030be228d021137449771493d56e29f77e4148ac" + +[[package]] +name = "zune-core" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a65ee146f41cb456b005bc898af3ab1495ded4ee61ac3637103f40ccacac18" + +[[package]] +name = "zune-jpeg" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296" +dependencies = [ + "zune-core", +] diff --git a/crates/core/fuzz/Cargo.toml b/crates/core/fuzz/Cargo.toml new file mode 100644 index 0000000..f38455a --- /dev/null +++ b/crates/core/fuzz/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "largsform-core-fuzz" +version = "0.0.0" +publish = false +edition = "2021" + +[package.metadata] +cargo-fuzz = true + +[dependencies] +libfuzzer-sys = "0.4" +largsform-core = { path = ".." } +tempfile = "3" + +# Not part of the main workspace: fuzzing needs a nightly toolchain. +[workspace] + +[[bin]] +name = "detect" +path = "fuzz_targets/detect.rs" +test = false +doc = false +bench = false + +[[bin]] +name = "decode" +path = "fuzz_targets/decode.rs" +test = false +doc = false +bench = false diff --git a/crates/core/fuzz/fuzz_targets/decode.rs b/crates/core/fuzz/fuzz_targets/decode.rs new file mode 100644 index 0000000..1a9b014 --- /dev/null +++ b/crates/core/fuzz/fuzz_targets/decode.rs @@ -0,0 +1,24 @@ +//! Every registered decoder must return Ok or Err on arbitrary input, never panic +//! (Constitution I, research R15). +#![no_main] + +use std::io::Write; + +use largsform_core::converter::{CancelToken, ConversionOptions, ConvertCtx}; +use largsform_core::registry::Registry; +use libfuzzer_sys::fuzz_target; + +fuzz_target!(|data: &[u8]| { + let registry = Registry::new(); + let Ok(mut file) = tempfile::NamedTempFile::new() else { return }; + if file.write_all(data).is_err() { + return; + } + let opts = ConversionOptions::default(); + for format in largsform_core::format::Format::ALL { + if let Some(decoder) = registry.decoder(format) { + let mut ctx = ConvertCtx::new(CancelToken::new()); + let _ = decoder.decode(file.path(), &opts, &mut ctx); + } + } +}); diff --git a/crates/core/fuzz/fuzz_targets/detect.rs b/crates/core/fuzz/fuzz_targets/detect.rs new file mode 100644 index 0000000..50ea742 --- /dev/null +++ b/crates/core/fuzz/fuzz_targets/detect.rs @@ -0,0 +1,13 @@ +//! Format sniffing and the EXIF orientation patcher must never panic (Constitution I). +#![no_main] + +use libfuzzer_sys::fuzz_target; + +fuzz_target!(|data: &[u8]| { + let _ = largsform_core::format::detect_bytes(data); + let mut exif = data.to_vec(); + let _ = largsform_core::metadata::reset_orientation(&mut exif); + let _ = largsform_core::metadata::read_orientation(data); + let mut bundle = largsform_core::metadata::MetadataBundle::default(); + bundle.set_exif_from_container(data); +}); diff --git a/crates/core/src/converter.rs b/crates/core/src/converter.rs new file mode 100644 index 0000000..c3e59b8 --- /dev/null +++ b/crates/core/src/converter.rs @@ -0,0 +1,520 @@ +//! The common converter interface (Constitution III, contracts/core-api.md) and the generic +//! decoder → normalizer → encoder pipeline (research R1). + +use std::path::{Path, PathBuf}; +use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::Arc; +use std::time::{Duration, Instant}; + +use image::metadata::Orientation; +use image::DynamicImage; +use serde::Serialize; + +use crate::error::{ConversionError, ErrorKind, Result}; +use crate::format::Format; +use crate::metadata::MetadataBundle; +use crate::output::{StagedOutput, StagingJournal}; + +// --------------------------------------------------------------------------------------------- +// Cancellation +// --------------------------------------------------------------------------------------------- + +/// Cooperative cancellation flag. A child token is cancelled when either it or its parent is. +#[derive(Debug, Clone, Default)] +pub struct CancelToken { + own: Arc, + parent: Option>, +} + +impl CancelToken { + pub fn new() -> Self { + Self::default() + } + + /// A token that is also cancelled when `self` is (per-item token inside a job). + pub fn child(&self) -> Self { + Self { + own: Arc::new(AtomicBool::new(false)), + parent: Some(self.own.clone()), + } + } + + pub fn cancel(&self) { + self.own.store(true, Ordering::SeqCst); + } + + pub fn is_cancelled(&self) -> bool { + self.own.load(Ordering::SeqCst) + || self + .parent + .as_ref() + .is_some_and(|p| p.load(Ordering::SeqCst)) + } +} + +// --------------------------------------------------------------------------------------------- +// Notices and options +// --------------------------------------------------------------------------------------------- + +/// Things the user should be told about a conversion (spec FR-013, FR-016, edge cases). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum NoticeKind { + TransparencyFlattened, + StylizedTrace, + MetadataDropped, + FirstFrameOnly, + FirstImageOnly, + ExternalSvgResourcesSkipped, +} + +/// Which options apply to a conversion pair. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum OptionKind { + Quality, + PdfDpi, + SvgScale, + PdfLayout, +} + +/// Rendering resolution for PDF input (FR-010). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum PdfDpi { + Dpi72, + #[default] + Dpi150, + Dpi300, +} + +impl PdfDpi { + pub fn from_value(v: u32) -> Option { + match v { + 72 => Some(Self::Dpi72), + 150 => Some(Self::Dpi150), + 300 => Some(Self::Dpi300), + _ => None, + } + } + pub fn value(self) -> u32 { + match self { + Self::Dpi72 => 72, + Self::Dpi150 => 150, + Self::Dpi300 => 300, + } + } +} + +/// Render scale for SVG input (FR-012). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum SvgScale { + #[default] + X1, + X2, + X4, +} + +impl SvgScale { + pub fn from_value(v: u32) -> Option { + match v { + 1 => Some(Self::X1), + 2 => Some(Self::X2), + 4 => Some(Self::X4), + _ => None, + } + } + pub fn factor(self) -> f32 { + match self { + Self::X1 => 1.0, + Self::X2 => 2.0, + Self::X4 => 4.0, + } + } +} + +/// How multiple images become PDF output (FR-009). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub enum PdfLayout { + #[default] + Combine, + Separate, +} + +/// Options for a conversion job (data-model `ConversionOptions`). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ConversionOptions { + /// Lossy quality, 1–100 (FR-008). + pub quality: u8, + pub pdf_dpi: PdfDpi, + pub svg_scale: SvgScale, + pub pdf_layout: PdfLayout, + /// `None` = each source's own folder (FR-017). + pub output_dir: Option, +} + +impl Default for ConversionOptions { + fn default() -> Self { + Self { + quality: 90, + pdf_dpi: PdfDpi::default(), + svg_scale: SvgScale::default(), + pdf_layout: PdfLayout::default(), + output_dir: None, + } + } +} + +impl ConversionOptions { + /// Validates ranges. Returns a message suitable for an `InvalidOptions` IPC error. + pub fn validate(&self) -> std::result::Result<(), String> { + if !(1..=100).contains(&self.quality) { + return Err(format!( + "Quality must be between 1 and 100 (got {}).", + self.quality + )); + } + Ok(()) + } + + /// The folder outputs for `src` are written to. + pub fn output_dir_for(&self, src: &Path) -> PathBuf { + match &self.output_dir { + Some(dir) => dir.clone(), + None => src + .parent() + .map(Path::to_path_buf) + .unwrap_or_else(|| PathBuf::from(".")), + } + } +} + +// --------------------------------------------------------------------------------------------- +// Decoded intermediate +// --------------------------------------------------------------------------------------------- + +/// One decoded image (or PDF page) on its way to an encoder (data-model "Decoded intermediate"). +#[derive(Debug, Clone)] +pub struct DecodedImage { + pub pixels: DynamicImage, + pub metadata: MetadataBundle, + /// The EXIF orientation still to apply. `NoTransforms` when the decoder already applied it + /// (e.g. HEIF `irot`/`imir`), in which case the EXIF tag is only reset. + pub orientation: Orientation, + /// 1-based page number when the source is a multi-page document. + pub page: Option, + /// Pixel density, when known (used to size PDF pages). + pub dpi: Option<(f32, f32)>, +} + +impl DecodedImage { + pub fn new(pixels: DynamicImage) -> Self { + Self { + pixels, + metadata: MetadataBundle::default(), + orientation: Orientation::NoTransforms, + page: None, + dpi: None, + } + } +} + +// --------------------------------------------------------------------------------------------- +// Context: progress, cancellation, notices, staging +// --------------------------------------------------------------------------------------------- + +type ProgressFn = Box; + +/// Per-conversion context passed through every stage. +pub struct ConvertCtx { + cancel: CancelToken, + progress: Option, + notices: Vec, + journal: Option>, + stage_base: f32, + stage_span: f32, + last_sent: Option, + last_value: f32, +} + +/// Progress updates are throttled to at most 10 per second (research R15). +const PROGRESS_INTERVAL: Duration = Duration::from_millis(100); + +impl ConvertCtx { + pub fn new(cancel: CancelToken) -> Self { + Self { + cancel, + progress: None, + notices: Vec::new(), + journal: None, + stage_base: 0.0, + stage_span: 1.0, + last_sent: None, + last_value: 0.0, + } + } + + #[must_use] + pub fn with_progress(mut self, f: impl FnMut(f32) + Send + 'static) -> Self { + self.progress = Some(Box::new(f)); + self + } + + #[must_use] + pub fn with_journal(mut self, journal: Option>) -> Self { + self.journal = journal; + self + } + + pub fn journal(&self) -> Option> { + self.journal.clone() + } + + pub fn cancel_token(&self) -> &CancelToken { + &self.cancel + } + + /// `Err(Cancelled)` once the conversion (or its job) has been cancelled. + pub fn check_cancelled(&self) -> Result<()> { + if self.cancel.is_cancelled() { + Err(ConversionError::cancelled()) + } else { + Ok(()) + } + } + + /// Reports progress within the current stage (0..=1). + pub fn progress(&mut self, fraction: f32) { + let overall = + (self.stage_base + self.stage_span * fraction.clamp(0.0, 1.0)).clamp(0.0, 1.0); + let now = Instant::now(); + let due = self + .last_sent + .is_none_or(|t| now.duration_since(t) >= PROGRESS_INTERVAL); + if (due || overall >= 1.0) && overall > self.last_value { + if let Some(f) = self.progress.as_mut() { + f(overall); + } + self.last_sent = Some(now); + self.last_value = overall; + } + } + + /// Sets the overall progress range covered by the next stage. + pub fn set_stage(&mut self, base: f32, span: f32) { + self.stage_base = base; + self.stage_span = span; + } + + pub fn notice(&mut self, n: NoticeKind) { + if !self.notices.contains(&n) { + self.notices.push(n); + } + } + + pub fn notices(&self) -> &[NoticeKind] { + &self.notices + } + + pub fn take_notices(&mut self) -> Vec { + std::mem::take(&mut self.notices) + } +} + +// --------------------------------------------------------------------------------------------- +// Traits +// --------------------------------------------------------------------------------------------- + +/// A complete conversion from one input format to one output format. +pub trait Converter: Send + Sync { + fn input(&self) -> Format; + fn output(&self) -> Format; + /// Decodes, normalizes and encodes `src` into staged (not yet committed) outputs. + fn convert( + &self, + src: &Path, + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result>; +} + +/// Reads one input format into normalized-ready images. +pub trait Decoder: Send + Sync { + fn format(&self) -> Format; + fn decode( + &self, + src: &Path, + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result>; +} + +/// Writes one output format. +pub trait Encoder: Send + Sync { + fn format(&self) -> Format; + /// `true` when all decoded images go into one output file (PDF). Otherwise each image + /// becomes its own file. + fn multi_image(&self) -> bool { + false + } + /// Encodes `images` (exactly one unless `multi_image`) into the output file's bytes. + fn encode( + &self, + images: &[DecodedImage], + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result>; +} + +// --------------------------------------------------------------------------------------------- +// Pipeline +// --------------------------------------------------------------------------------------------- + +/// Generic converter: `Decoder` → [`crate::normalize::prepare`] → `Encoder`. +pub struct PipelineConverter { + decoder: Arc, + encoder: Arc, +} + +impl PipelineConverter { + pub fn new(decoder: Arc, encoder: Arc) -> Self { + Self { decoder, encoder } + } + + pub fn decoder(&self) -> &Arc { + &self.decoder + } + + pub fn encoder(&self) -> &Arc { + &self.encoder + } +} + +/// Stage weights: decode 0.45, normalize 0.10, encode 0.45 (research R1). +const DECODE_SPAN: f32 = 0.45; +const NORMALIZE_SPAN: f32 = 0.10; +const ENCODE_SPAN: f32 = 0.45; + +impl Converter for PipelineConverter { + fn input(&self) -> Format { + self.decoder.format() + } + + fn output(&self) -> Format { + self.encoder.format() + } + + fn convert( + &self, + src: &Path, + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let target = self.encoder.format(); + ctx.check_cancelled()?; + + ctx.set_stage(0.0, DECODE_SPAN); + let images = self.decoder.decode(src, opts, ctx)?; + if images.is_empty() { + return Err(ConversionError::for_path(ErrorKind::Corrupt, src) + .with_detail("the file contains no images")); + } + ctx.check_cancelled()?; + + ctx.set_stage(DECODE_SPAN, NORMALIZE_SPAN); + let images = crate::normalize::prepare(images, target, ctx)?; + ctx.progress(1.0); + ctx.check_cancelled()?; + + let dir = opts.output_dir_for(src); + let stem = output_stem(src); + let groups: Vec<&[DecodedImage]> = if self.encoder.multi_image() { + vec![images.as_slice()] + } else { + images.chunks(1).collect() + }; + + let total = groups.len() as f32; + let mut staged = Vec::with_capacity(groups.len()); + for (i, group) in groups.into_iter().enumerate() { + ctx.check_cancelled()?; + ctx.set_stage( + DECODE_SPAN + NORMALIZE_SPAN + ENCODE_SPAN * (i as f32 / total), + ENCODE_SPAN / total, + ); + let bytes = self.encoder.encode(group, opts, ctx)?; + ctx.check_cancelled()?; + let page = if self.encoder.multi_image() { + None + } else { + group[0].page + }; + let mut out = StagedOutput::create(&dir, &stem, page, target, ctx.journal())?; + out.write_all(&bytes)?; + staged.push(out); + } + ctx.set_stage(0.0, 1.0); + ctx.progress(1.0); + Ok(staged) + } +} + +/// The base name used for outputs of `src` (file stem, or "converted" when it has none). +pub fn output_stem(src: &Path) -> String { + src.file_stem() + .map(|s| s.to_string_lossy().into_owned()) + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| "converted".to_owned()) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn child_tokens_follow_parent() { + let job = CancelToken::new(); + let item = job.child(); + let other = job.child(); + item.cancel(); + assert!(item.is_cancelled()); + assert!(!other.is_cancelled()); + assert!(!job.is_cancelled()); + job.cancel(); + assert!(other.is_cancelled()); + } + + #[test] + fn progress_is_monotonic_and_throttled() { + let seen = Arc::new(std::sync::Mutex::new(Vec::new())); + let s = seen.clone(); + let mut ctx = ConvertCtx::new(CancelToken::new()) + .with_progress(move |p| s.lock().expect("lock").push(p)); + ctx.set_stage(0.0, 0.5); + for i in 0..1000 { + ctx.progress(i as f32 / 1000.0); + } + ctx.set_stage(0.0, 1.0); + ctx.progress(1.0); + let seen = seen.lock().expect("lock"); + assert!(seen.len() <= 3, "throttled: {seen:?}"); + assert!(seen.windows(2).all(|w| w[0] < w[1])); + assert_eq!(seen.last().copied(), Some(1.0)); + } + + #[test] + fn options_defaults_and_validation() { + let o = ConversionOptions::default(); + assert_eq!(o.quality, 90); + assert_eq!(o.pdf_dpi.value(), 150); + assert_eq!(o.svg_scale, SvgScale::X1); + assert_eq!(o.pdf_layout, PdfLayout::Combine); + assert!(o.validate().is_ok()); + assert!(ConversionOptions { + quality: 0, + ..o.clone() + } + .validate() + .is_err()); + assert!(ConversionOptions { quality: 101, ..o }.validate().is_err()); + } +} diff --git a/crates/core/src/decode/heif.rs b/crates/core/src/decode/heif.rs new file mode 100644 index 0000000..e967ca9 --- /dev/null +++ b/crates/core/src/decode/heif.rs @@ -0,0 +1,166 @@ +//! HEIC/HEIF and AVIF decoding with `heifer`: pure Rust HEVC and AV1, no system libraries +//! (research R5, decided by the T038 spike). + +use std::path::Path; + +use image::{DynamicImage, ImageBuffer, Rgb, Rgba}; + +use crate::converter::{ConversionOptions, ConvertCtx, DecodedImage, Decoder, NoticeKind}; +use crate::error::{ConversionError, ErrorKind, Result}; +use crate::format::Format; +use crate::metadata::MetadataBundle; +use crate::normalize::MAX_ALLOC_BYTES; + +pub struct HeifDecoder { + format: Format, +} + +impl HeifDecoder { + pub fn new(format: Format) -> Self { + debug_assert!(matches!(format, Format::Heic | Format::Avif)); + Self { format } + } +} + +fn map_heif_error(e: &heifer::Error, path: &Path) -> ConversionError { + let text = e.to_string(); + let lower = text.to_lowercase(); + let kind = if lower.contains("too large") || lower.contains("limit") || lower.contains("pixels") + { + ErrorKind::TooLarge + } else if lower.contains("unsupported") { + ErrorKind::Unsupported + } else { + ErrorKind::Corrupt + }; + ConversionError::for_path(kind, path).with_detail(text) +} + +/// Converts heifer's RGBA samples (`bit_depth` significant bits) into a `DynamicImage`. +pub fn to_dynamic(img: heifer::Image) -> DynamicImage { + let (w, h) = (img.width, img.height); + if img.bit_depth <= 8 { + let shift = 8 - img.bit_depth.max(1); + let px = |v: u16| ((v << shift).min(255)) as u8; + if img.has_alpha { + let data: Vec = img.data.iter().map(|&v| px(v)).collect(); + ImageBuffer::, _>::from_raw(w, h, data) + .map(DynamicImage::ImageRgba8) + .unwrap_or_else(|| DynamicImage::new_rgba8(w, h)) + } else { + let data: Vec = img + .data + .chunks_exact(4) + .flat_map(|p| [px(p[0]), px(p[1]), px(p[2])]) + .collect(); + ImageBuffer::, _>::from_raw(w, h, data) + .map(DynamicImage::ImageRgb8) + .unwrap_or_else(|| DynamicImage::new_rgb8(w, h)) + } + } else { + // Scale N-bit samples to the full 16-bit range by bit replication. + let bits = u32::from(img.bit_depth.min(16)); + let scale = |v: u16| -> u16 { + let v = u32::from(v); + ((v << (16 - bits)) | (v >> (2 * bits).saturating_sub(16).min(15))) as u16 + }; + if img.has_alpha { + let data: Vec = img.data.iter().map(|&v| scale(v)).collect(); + ImageBuffer::, _>::from_raw(w, h, data) + .map(DynamicImage::ImageRgba16) + .unwrap_or_else(|| DynamicImage::new_rgba16(w, h)) + } else { + let data: Vec = img + .data + .chunks_exact(4) + .flat_map(|p| [scale(p[0]), scale(p[1]), scale(p[2])]) + .collect(); + ImageBuffer::, _>::from_raw(w, h, data) + .map(DynamicImage::ImageRgb16) + .unwrap_or_else(|| DynamicImage::new_rgb16(w, h)) + } + } +} + +impl Decoder for HeifDecoder { + fn format(&self) -> Format { + self.format + } + + fn decode( + &self, + src: &Path, + _opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let bytes = std::fs::read(src).map_err(|e| ConversionError::from_read_io(&e, src))?; + ctx.progress(0.05); + + if let Ok(file) = heifer::heifer_isobmff::HeifFile::parse(&bytes) { + if file.top_level_image_ids().len() > 1 { + ctx.notice(NoticeKind::FirstImageOnly); + } + } + + // RGBA16 needs 8 bytes per pixel; keep the same 2 GiB budget as other decoders. + let options = heifer::Options::new().with_max_pixels(MAX_ALLOC_BYTES / 8); + let image = + heifer::decode_with_options(&bytes, &options).map_err(|e| map_heif_error(&e, src))?; + ctx.check_cancelled()?; + ctx.progress(0.9); + + let mut metadata = MetadataBundle::default(); + if let Ok(meta) = heifer::read_metadata(&bytes) { + if let Some(exif) = meta.exif { + metadata.set_exif_from_container(&exif); + } + metadata.icc = meta.icc_profile; + metadata.xmp = meta.xmp; + } + + // heifer applies the HEIF rotation/mirror (irot/imir) while decoding; HEIF ignores the + // EXIF orientation, so normalization only resets the tag (FR-007). + let mut img = DecodedImage::new(to_dynamic(image)); + img.metadata = metadata; + ctx.progress(1.0); + Ok(vec![img]) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn ten_bit_samples_scale_to_full_range() { + let img = heifer::Image { + width: 1, + height: 1, + bit_depth: 10, + has_alpha: false, + data: vec![1023, 0, 512, 1023], + }; + let DynamicImage::ImageRgb16(b) = to_dynamic(img) else { + panic!("expected rgb16") + }; + let p = b.get_pixel(0, 0); + assert_eq!(p[0], u16::MAX); + assert_eq!(p[1], 0); + assert!((32_700..=32_900).contains(&p[2]), "{}", p[2]); + } + + #[test] + fn eight_bit_with_alpha() { + let img = heifer::Image { + width: 1, + height: 1, + bit_depth: 8, + has_alpha: true, + data: vec![255, 128, 0, 64], + }; + let DynamicImage::ImageRgba8(b) = to_dynamic(img) else { + panic!("expected rgba8") + }; + assert_eq!(b.get_pixel(0, 0).0, [255, 128, 0, 64]); + } +} diff --git a/crates/core/src/decode/mod.rs b/crates/core/src/decode/mod.rs new file mode 100644 index 0000000..801eb91 --- /dev/null +++ b/crates/core/src/decode/mod.rs @@ -0,0 +1,33 @@ +//! Decoders: input format → [`DecodedImage`]s ready for normalization. + +pub mod heif; +pub mod raster; + +use std::path::Path; +use std::sync::Arc; + +use crate::converter::Decoder; +use crate::format::Format; + +/// Every decoder available in this build. +pub fn all() -> Vec> { + vec![ + Arc::new(raster::RasterDecoder::new(Format::Jpeg)), + Arc::new(raster::RasterDecoder::new(Format::Png)), + Arc::new(raster::RasterDecoder::new(Format::Webp)), + Arc::new(raster::RasterDecoder::new(Format::Tiff)), + Arc::new(raster::RasterDecoder::new(Format::Gif)), + Arc::new(heif::HeifDecoder::new(Format::Heic)), + Arc::new(heif::HeifDecoder::new(Format::Avif)), + ] +} + +/// Page count of a PDF without rendering it (`None` when PDF support is unavailable). +pub fn probe_pdf_pages(_path: &Path) -> Option { + None +} + +/// Declared size of an SVG without rendering it. +pub fn probe_svg_size(_path: &Path) -> Option<(u32, u32)> { + None +} diff --git a/crates/core/src/decode/raster.rs b/crates/core/src/decode/raster.rs new file mode 100644 index 0000000..f5aed66 --- /dev/null +++ b/crates/core/src/decode/raster.rs @@ -0,0 +1,90 @@ +//! JPG, PNG, WebP, TIFF and GIF decoding via the `image` crate (research R2). + +use std::fs::File; +use std::io::BufReader; +use std::path::Path; + +use image::metadata::Orientation; +use image::{DynamicImage, ImageDecoder, ImageError, ImageReader}; + +use crate::converter::{ConversionOptions, ConvertCtx, DecodedImage, Decoder, NoticeKind}; +use crate::error::{ConversionError, ErrorKind, Result}; +use crate::format::{self, Format}; +use crate::metadata::MetadataBundle; +use crate::normalize::decode_limits; + +pub struct RasterDecoder { + format: Format, +} + +impl RasterDecoder { + pub fn new(format: Format) -> Self { + debug_assert!(matches!( + format, + Format::Jpeg | Format::Png | Format::Webp | Format::Tiff | Format::Gif + )); + Self { format } + } +} + +/// Maps `image` errors to user-facing kinds. +pub fn map_image_error(e: ImageError, path: &Path) -> ConversionError { + let kind = match &e { + ImageError::Limits(_) => ErrorKind::TooLarge, + ImageError::IoError(io) => return ConversionError::from_read_io(io, path), + ImageError::Unsupported(_) => ErrorKind::Unsupported, + _ => ErrorKind::Corrupt, + }; + ConversionError::for_path(kind, path).with_detail(e) +} + +impl Decoder for RasterDecoder { + fn format(&self) -> Format { + self.format + } + + fn decode( + &self, + src: &Path, + _opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let image_format = self + .format + .image_format() + .ok_or_else(|| ConversionError::for_path(ErrorKind::Unsupported, src))?; + let file = File::open(src).map_err(|e| ConversionError::from_read_io(&e, src))?; + let mut reader = ImageReader::with_format(BufReader::new(file), image_format); + reader.limits(decode_limits()); + let mut decoder = reader.into_decoder().map_err(|e| map_image_error(e, src))?; + + let mut metadata = MetadataBundle::default(); + if let Ok(Some(exif)) = decoder.exif_metadata() { + metadata.set_exif_from_container(&exif); + } + metadata.icc = decoder.icc_profile().ok().flatten(); + metadata.xmp = decoder.xmp_metadata().ok().flatten(); + let orientation = decoder.orientation().unwrap_or(Orientation::NoTransforms); + ctx.progress(0.1); + + let pixels = DynamicImage::from_decoder(decoder).map_err(|e| map_image_error(e, src))?; + ctx.progress(1.0); + + // Only the first frame/page is converted (FR-013, edge cases). + let frames = match self.format { + Format::Gif | Format::Webp | Format::Tiff => format::count_frames(src, self.format), + _ => 1, + }; + if frames > 1 { + ctx.notice(match self.format { + Format::Tiff => NoticeKind::FirstImageOnly, + _ => NoticeKind::FirstFrameOnly, + }); + } + + let mut img = DecodedImage::new(pixels); + img.metadata = metadata; + img.orientation = orientation; + Ok(vec![img]) + } +} diff --git a/crates/core/src/encode/avif.rs b/crates/core/src/encode/avif.rs new file mode 100644 index 0000000..616660d --- /dev/null +++ b/crates/core/src/encode/avif.rs @@ -0,0 +1,66 @@ +//! AVIF encoding with `ravif` (pure Rust rav1e), research R4. EXIF is embedded (FR-015); +//! colors are converted to sRGB beforehand because ravif cannot embed ICC profiles (R12). + +use image::DynamicImage; + +use crate::converter::{ConversionOptions, ConvertCtx, DecodedImage, Encoder}; +use crate::encode::jpeg_png::{encode_error, single}; +use crate::error::Result; +use crate::format::Format; + +/// rav1e speed preset (1 = slowest/best … 10 = fastest), chosen by the T039 benchmark. +pub const AVIF_SPEED: u8 = 8; + +pub struct AvifEncoder; + +impl Encoder for AvifEncoder { + fn format(&self) -> Format { + Format::Avif + } + + fn encode( + &self, + images: &[DecodedImage], + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let img = single(images)?; + let q = f32::from(opts.quality.clamp(1, 100)); + let mut encoder = ravif::Encoder::new() + .with_quality(q) + .with_alpha_quality(q) + .with_speed(AVIF_SPEED) + .with_num_threads(None); + if let Some(exif) = &img.metadata.exif { + encoder = encoder.with_exif(exif.clone()); + } + ctx.progress(0.05); + let (w, h) = (img.pixels.width() as usize, img.pixels.height() as usize); + let encoded = if img.pixels.color().has_alpha() { + let rgba = match &img.pixels { + DynamicImage::ImageRgba8(b) => std::borrow::Cow::Borrowed(b), + other => std::borrow::Cow::Owned(other.to_rgba8()), + }; + let px: Vec = rgba + .as_raw() + .chunks_exact(4) + .map(|p| ravif::RGBA8::new(p[0], p[1], p[2], p[3])) + .collect(); + encoder.encode_rgba(ravif::Img::new(px.as_slice(), w, h)) + } else { + let rgb = match &img.pixels { + DynamicImage::ImageRgb8(b) => std::borrow::Cow::Borrowed(b), + other => std::borrow::Cow::Owned(other.to_rgb8()), + }; + let px: Vec = rgb + .as_raw() + .chunks_exact(3) + .map(|p| ravif::RGB8::new(p[0], p[1], p[2])) + .collect(); + encoder.encode_rgb(ravif::Img::new(px.as_slice(), w, h)) + } + .map_err(encode_error)?; + ctx.progress(1.0); + Ok(encoded.avif_file) + } +} diff --git a/crates/core/src/encode/jpeg_png.rs b/crates/core/src/encode/jpeg_png.rs new file mode 100644 index 0000000..4d22aff --- /dev/null +++ b/crates/core/src/encode/jpeg_png.rs @@ -0,0 +1,80 @@ +//! JPG and PNG encoding via the `image` crate, then metadata injection (FR-008, FR-015). + +use std::io::Cursor; + +use image::codecs::jpeg::JpegEncoder as ImgJpeg; +use image::codecs::png::{CompressionType, FilterType, PngEncoder as ImgPng}; +use image::{DynamicImage, ImageEncoder}; + +use crate::converter::{ConversionOptions, ConvertCtx, DecodedImage, Encoder}; +use crate::error::{ConversionError, ErrorKind, Result}; +use crate::format::Format; +use crate::metadata::write_metadata; + +pub(crate) fn encode_error(e: impl std::fmt::Display) -> ConversionError { + ConversionError::new(ErrorKind::Internal, "the converted image").with_detail(e) +} + +pub(crate) fn single(images: &[DecodedImage]) -> Result<&DecodedImage> { + images + .first() + .ok_or_else(|| encode_error("no image to encode")) +} + +pub struct JpegEncoder; + +impl Encoder for JpegEncoder { + fn format(&self) -> Format { + Format::Jpeg + } + + fn encode( + &self, + images: &[DecodedImage], + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let img = single(images)?; + // Normalization already produced RGB8 (alpha flattened on white); be defensive anyway. + let rgb = match &img.pixels { + DynamicImage::ImageRgb8(b) => std::borrow::Cow::Borrowed(b), + other => std::borrow::Cow::Owned(other.to_rgb8()), + }; + let mut buf = Vec::new(); + ImgJpeg::new_with_quality(&mut buf, opts.quality.clamp(1, 100)) + .write_image( + rgb.as_raw(), + rgb.width(), + rgb.height(), + image::ExtendedColorType::Rgb8, + ) + .map_err(encode_error)?; + ctx.progress(0.9); + write_metadata(buf, Format::Jpeg, &img.metadata).map_err(encode_error) + } +} + +pub struct PngEncoder; + +impl Encoder for PngEncoder { + fn format(&self) -> Format { + Format::Png + } + + fn encode( + &self, + images: &[DecodedImage], + _opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let img = single(images)?; + let mut buf = Cursor::new(Vec::new()); + let encoder = + ImgPng::new_with_quality(&mut buf, CompressionType::Default, FilterType::Adaptive); + img.pixels + .write_with_encoder(encoder) + .map_err(encode_error)?; + ctx.progress(0.9); + write_metadata(buf.into_inner(), Format::Png, &img.metadata).map_err(encode_error) + } +} diff --git a/crates/core/src/encode/mod.rs b/crates/core/src/encode/mod.rs new file mode 100644 index 0000000..0ee832e --- /dev/null +++ b/crates/core/src/encode/mod.rs @@ -0,0 +1,19 @@ +//! Encoders: normalized [`DecodedImage`](crate::converter::DecodedImage)s → output file bytes. + +pub mod avif; +pub mod jpeg_png; +pub mod webp; + +use std::sync::Arc; + +use crate::converter::Encoder; + +/// Every encoder available in this build. +pub fn all() -> Vec> { + vec![ + Arc::new(jpeg_png::JpegEncoder), + Arc::new(jpeg_png::PngEncoder), + Arc::new(webp::WebpEncoder), + Arc::new(avif::AvifEncoder), + ] +} diff --git a/crates/core/src/encode/webp.rs b/crates/core/src/encode/webp.rs new file mode 100644 index 0000000..e6b1a1b --- /dev/null +++ b/crates/core/src/encode/webp.rs @@ -0,0 +1,52 @@ +//! Lossy WebP encoding with libwebp via the `webp` crate (research R3, FR-008). + +use image::DynamicImage; + +use crate::converter::{ConversionOptions, ConvertCtx, DecodedImage, Encoder}; +use crate::encode::jpeg_png::{encode_error, single}; +use crate::error::{ConversionError, ErrorKind, Result}; +use crate::format::Format; +use crate::metadata::write_metadata; + +pub struct WebpEncoder; + +impl Encoder for WebpEncoder { + fn format(&self) -> Format { + Format::Webp + } + + fn encode( + &self, + images: &[DecodedImage], + opts: &ConversionOptions, + ctx: &mut ConvertCtx, + ) -> Result> { + let img = single(images)?; + let (w, h) = (img.pixels.width(), img.pixels.height()); + if w > 16_383 || h > 16_383 { + return Err( + ConversionError::new(ErrorKind::TooLarge, "the image").with_detail(format!( + "WebP images can be at most 16383×16383 pixels (this one is {w}×{h})" + )), + ); + } + let memory = match &img.pixels { + DynamicImage::ImageRgba8(b) => { + webp::Encoder::from_rgba(b.as_raw(), w, h).encode(f32::from(opts.quality)) + } + DynamicImage::ImageRgb8(b) => { + webp::Encoder::from_rgb(b.as_raw(), w, h).encode(f32::from(opts.quality)) + } + other if other.color().has_alpha() => { + let b = other.to_rgba8(); + webp::Encoder::from_rgba(b.as_raw(), w, h).encode(f32::from(opts.quality)) + } + other => { + let b = other.to_rgb8(); + webp::Encoder::from_rgb(b.as_raw(), w, h).encode(f32::from(opts.quality)) + } + }; + ctx.progress(0.9); + write_metadata(memory.to_vec(), Format::Webp, &img.metadata).map_err(encode_error) + } +} diff --git a/crates/core/src/error.rs b/crates/core/src/error.rs new file mode 100644 index 0000000..c112ef5 --- /dev/null +++ b/crates/core/src/error.rs @@ -0,0 +1,176 @@ +//! User-facing conversion errors (FR-026, Constitution IV). +//! +//! Every error carries a plain-language `message` that names the file and tells the user what +//! they can do, plus optional technical `detail` that the UI shows only on request. + +use std::path::Path; + +use serde::Serialize; + +/// The category of a conversion failure. Serialized for IPC as camelCase (contracts/ipc.md). +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum ErrorKind { + Unsupported, + Corrupt, + TooLarge, + ProtectedPdf, + SourceMissing, + OutputNotWritable, + DiskFull, + Cancelled, + Internal, +} + +/// A conversion failure with a user-facing message. +#[derive(Debug, Clone, PartialEq, Eq, Serialize, thiserror::Error)] +#[error("{message}")] +pub struct ConversionError { + pub kind: ErrorKind, + pub message: String, + #[serde(skip_serializing_if = "Option::is_none")] + pub detail: Option, +} + +impl ConversionError { + /// Builds an error whose message refers to `subject` (a file or folder name). + pub fn new(kind: ErrorKind, subject: &str) -> Self { + Self { + kind, + message: message_for(kind, subject), + detail: None, + } + } + + /// Builds an error whose message names the file or folder at `path`. + pub fn for_path(kind: ErrorKind, path: &Path) -> Self { + Self::new(kind, &display_name(path)) + } + + /// Error for a cancelled conversion. The message is shown as a status, not as a failure. + pub fn cancelled() -> Self { + Self::new(ErrorKind::Cancelled, "") + } + + /// Attaches technical detail (shown on request in the UI). + #[must_use] + pub fn with_detail(mut self, detail: impl std::fmt::Display) -> Self { + self.detail = Some(detail.to_string()); + self + } + + /// Maps an I/O error that happened while reading a source file. + pub fn from_read_io(err: &std::io::Error, path: &Path) -> Self { + use std::io::ErrorKind as Io; + let kind = match err.kind() { + Io::NotFound => ErrorKind::SourceMissing, + Io::PermissionDenied => ErrorKind::SourceMissing, + Io::UnexpectedEof | Io::InvalidData => ErrorKind::Corrupt, + _ => ErrorKind::Internal, + }; + Self::for_path(kind, path).with_detail(err) + } + + /// Maps an I/O error that happened while writing into the output folder `dir`. + pub fn from_write_io(err: &std::io::Error, dir: &Path) -> Self { + use std::io::ErrorKind as Io; + let kind = match err.kind() { + Io::StorageFull | Io::QuotaExceeded | Io::FileTooLarge => ErrorKind::DiskFull, + Io::PermissionDenied | Io::ReadOnlyFilesystem | Io::NotFound | Io::NotADirectory => { + ErrorKind::OutputNotWritable + } + _ => ErrorKind::Internal, + }; + Self::for_path(kind, dir).with_detail(err) + } + + pub fn is_cancelled(&self) -> bool { + self.kind == ErrorKind::Cancelled + } +} + +/// The last path component, or the full path when it has none. +pub fn display_name(path: &Path) -> String { + path.file_name() + .map(|n| n.to_string_lossy().into_owned()) + .unwrap_or_else(|| path.display().to_string()) +} + +fn message_for(kind: ErrorKind, subject: &str) -> String { + match kind { + ErrorKind::Unsupported => format!( + "“{subject}” isn't a supported file. Largsform can convert HEIC, WebP, AVIF, JPG, \ + PNG, TIFF, GIF, SVG and PDF files." + ), + ErrorKind::Corrupt => format!( + "“{subject}” appears to be damaged or incomplete, so it couldn't be read. Try \ + exporting it again from the app that created it." + ), + ErrorKind::TooLarge => format!( + "“{subject}” is too large to convert on this computer. Try a smaller version of the \ + image." + ), + ErrorKind::ProtectedPdf => format!( + "“{subject}” is password-protected. Password-protected PDFs aren't supported yet." + ), + ErrorKind::SourceMissing => format!( + "“{subject}” is no longer available. It may have been moved, renamed or deleted, or \ + Largsform may not have permission to read it." + ), + ErrorKind::OutputNotWritable => format!( + "Largsform can't save files in “{subject}”. Choose a different output folder or \ + check the folder's permissions." + ), + ErrorKind::DiskFull => { + "There isn't enough free disk space to save the converted file. Free up some space \ + and try again." + .to_owned() + } + ErrorKind::Cancelled => "Conversion cancelled.".to_owned(), + ErrorKind::Internal => format!( + "Largsform hit an unexpected problem converting “{subject}”. Please try again. If it \ + keeps happening, please report it." + ), + } +} + +pub type Result = std::result::Result; + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn messages_name_the_file() { + let e = ConversionError::for_path(ErrorKind::Corrupt, Path::new("/tmp/photo.heic")); + assert!(e.message.contains("photo.heic")); + assert!(!e.message.contains("/tmp")); + } + + #[test] + fn io_mapping() { + let nf = std::io::Error::from(std::io::ErrorKind::NotFound); + assert_eq!( + ConversionError::from_read_io(&nf, Path::new("a.jpg")).kind, + ErrorKind::SourceMissing + ); + let full = std::io::Error::from(std::io::ErrorKind::StorageFull); + assert_eq!( + ConversionError::from_write_io(&full, Path::new("out")).kind, + ErrorKind::DiskFull + ); + let denied = std::io::Error::from(std::io::ErrorKind::PermissionDenied); + assert_eq!( + ConversionError::from_write_io(&denied, Path::new("out")).kind, + ErrorKind::OutputNotWritable + ); + } + + #[test] + fn serializes_camel_case() { + let e = ConversionError::new(ErrorKind::ProtectedPdf, "a.pdf"); + let v = serde_json::to_value(&e).expect("serialize"); + assert_eq!(v["kind"], "protectedPdf"); + assert!(v.get("detail").is_none()); + } +} diff --git a/crates/core/src/format.rs b/crates/core/src/format.rs new file mode 100644 index 0000000..a24678b --- /dev/null +++ b/crates/core/src/format.rs @@ -0,0 +1,501 @@ +//! Supported formats, content-based detection (FR-002, research R13), and header-only +//! inspection for the file list. + +use std::fs::File; +use std::io::{Read, Seek, SeekFrom}; +use std::path::Path; + +use serde::{Deserialize, Serialize}; + +use crate::error::{ConversionError, ErrorKind, Result}; + +/// Every format Largsform knows about. Serialized as the lowercase names used over IPC. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)] +pub enum Format { + #[serde(rename = "jpg")] + Jpeg, + #[serde(rename = "png")] + Png, + #[serde(rename = "webp")] + Webp, + #[serde(rename = "avif")] + Avif, + #[serde(rename = "heic")] + Heic, + #[serde(rename = "tiff")] + Tiff, + #[serde(rename = "gif")] + Gif, + #[serde(rename = "svg")] + Svg, + #[serde(rename = "pdf")] + Pdf, + #[serde(rename = "ico")] + Ico, +} + +impl Format { + pub const ALL: [Format; 10] = [ + Format::Jpeg, + Format::Png, + Format::Webp, + Format::Avif, + Format::Heic, + Format::Tiff, + Format::Gif, + Format::Svg, + Format::Pdf, + Format::Ico, + ]; + + /// Formats the app can read (9). + pub fn is_input(self) -> bool { + !matches!(self, Format::Ico) + } + + /// Formats the app can write (7). + pub fn is_output(self) -> bool { + !matches!(self, Format::Heic | Format::Tiff | Format::Gif) + } + + /// File extension used for output names. + pub fn extension(self) -> &'static str { + match self { + Format::Jpeg => "jpg", + Format::Png => "png", + Format::Webp => "webp", + Format::Avif => "avif", + Format::Heic => "heic", + Format::Tiff => "tiff", + Format::Gif => "gif", + Format::Svg => "svg", + Format::Pdf => "pdf", + Format::Ico => "ico", + } + } + + /// Human-readable name, e.g. for UI labels. + pub fn label(self) -> &'static str { + match self { + Format::Jpeg => "JPG", + Format::Png => "PNG", + Format::Webp => "WebP", + Format::Avif => "AVIF", + Format::Heic => "HEIC", + Format::Tiff => "TIFF", + Format::Gif => "GIF", + Format::Svg => "SVG", + Format::Pdf => "PDF", + Format::Ico => "ICO", + } + } + + /// Output uses a lossy quality setting (FR-008). + pub fn is_lossy_output(self) -> bool { + matches!(self, Format::Jpeg | Format::Webp | Format::Avif) + } + + /// The format can store transparency. + pub fn supports_alpha(self) -> bool { + !matches!(self, Format::Jpeg) + } + + /// The format can store EXIF metadata (FR-015). + pub fn carries_exif(self) -> bool { + matches!( + self, + Format::Jpeg | Format::Png | Format::Webp | Format::Avif | Format::Heic | Format::Tiff + ) + } + + /// The output path embeds an ICC color profile (research R12). AVIF output is converted to + /// sRGB instead, because the AVIF encoder (`ravif`) cannot embed ICC profiles. + pub fn carries_icc(self) -> bool { + matches!( + self, + Format::Jpeg | Format::Png | Format::Webp | Format::Heic | Format::Tiff + ) + } + + /// The `image` crate format for formats it decodes or encodes. + pub fn image_format(self) -> Option { + Some(match self { + Format::Jpeg => image::ImageFormat::Jpeg, + Format::Png => image::ImageFormat::Png, + Format::Webp => image::ImageFormat::WebP, + Format::Tiff => image::ImageFormat::Tiff, + Format::Gif => image::ImageFormat::Gif, + Format::Ico => image::ImageFormat::Ico, + Format::Avif => image::ImageFormat::Avif, + Format::Heic | Format::Svg | Format::Pdf => return None, + }) + } +} + +/// Maximum number of bytes read for detection. +pub const SNIFF_LEN: usize = 4096; + +/// Detects a file's format from its contents (never its extension). FR-002. +pub fn detect_format(path: &Path) -> Result { + let mut file = File::open(path).map_err(|e| ConversionError::from_read_io(&e, path))?; + let mut buf = Vec::with_capacity(SNIFF_LEN); + file.by_ref() + .take(SNIFF_LEN as u64) + .read_to_end(&mut buf) + .map_err(|e| ConversionError::from_read_io(&e, path))?; + detect_bytes(&buf).ok_or_else(|| ConversionError::for_path(ErrorKind::Unsupported, path)) +} + +/// Detects a format from the first bytes of a file. +pub fn detect_bytes(b: &[u8]) -> Option { + if b.starts_with(&[0xFF, 0xD8, 0xFF]) { + return Some(Format::Jpeg); + } + if b.starts_with(b"\x89PNG\r\n\x1a\n") { + return Some(Format::Png); + } + if b.starts_with(b"GIF87a") || b.starts_with(b"GIF89a") { + return Some(Format::Gif); + } + if b.starts_with(b"II*\0") || b.starts_with(b"MM\0*") { + return Some(Format::Tiff); + } + if b.len() >= 12 && &b[0..4] == b"RIFF" && &b[8..12] == b"WEBP" { + return Some(Format::Webp); + } + if b.starts_with(b"%PDF-") { + return Some(Format::Pdf); + } + if let Some(f) = detect_isobmff(b) { + return Some(f); + } + if looks_like_svg(b) { + return Some(Format::Svg); + } + None +} + +/// HEIF/AVIF detection via the `ftyp` box's major and compatible brands. +fn detect_isobmff(b: &[u8]) -> Option { + if b.len() < 16 || &b[4..8] != b"ftyp" { + return None; + } + let size = u32::from_be_bytes([b[0], b[1], b[2], b[3]]) as usize; + let end = size.min(b.len()); + if end < 16 { + return None; + } + let mut brands: Vec<&[u8]> = vec![&b[8..12]]; + let mut i = 16; + while i + 4 <= end { + brands.push(&b[i..i + 4]); + i += 4; + } + // AVIF first: AVIF files also carry the generic `mif1` brand. + if brands.iter().any(|br| matches!(*br, b"avif" | b"avis")) { + return Some(Format::Avif); + } + if brands.iter().any(|br| { + matches!( + *br, + b"heic" | b"heix" | b"hevc" | b"hevx" | b"heim" | b"heis" | b"mif1" | b"msf1" + ) + }) { + return Some(Format::Heic); + } + None +} + +/// SVG: optional BOM, whitespace, XML prolog, comments, processing instructions and DOCTYPE, +/// then an ` bool { + let mut s = b.strip_prefix(&[0xEF, 0xBB, 0xBF]).unwrap_or(b); + loop { + s = trim_ascii_start(s); + if s.starts_with(b"") { + Some(i) => s = &s[i + 2..], + None => return false, + } + } else if s.starts_with(b"") { + Some(i) => s = &s[4 + i + 3..], + None => return false, + } + } else if s.len() >= 9 && s[..9].eq_ignore_ascii_case(b" s = rest, + None => return false, + } + } else { + break; + } + } + s.starts_with(b"' || *c == b'/') +} + +fn skip_doctype(s: &[u8]) -> Option<&[u8]> { + // DOCTYPE may contain an internal subset in [...]. + let mut depth = 0usize; + for (i, c) in s.iter().enumerate().skip(9) { + match c { + b'[' => depth += 1, + b']' => depth = depth.saturating_sub(1), + b'>' if depth == 0 => return Some(&s[i + 1..]), + _ => {} + } + } + None +} + +fn trim_ascii_start(s: &[u8]) -> &[u8] { + let n = s.iter().take_while(|c| c.is_ascii_whitespace()).count(); + &s[n..] +} + +fn find(hay: &[u8], needle: &[u8]) -> Option { + hay.windows(needle.len()).position(|w| w == needle) +} + +/// Header-level facts about a source file, shown in the file list (data-model `SourceFile`). +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct SourceInfo { + pub format: Format, + pub size_bytes: u64, + #[serde(skip_serializing_if = "Option::is_none")] + pub width: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub height: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub page_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub frame_count: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub has_alpha: Option, +} + +/// Detects the format and reads header-only facts. Never decodes pixels. +pub fn inspect(path: &Path) -> Result { + let format = detect_format(path)?; + let size_bytes = std::fs::metadata(path) + .map_err(|e| ConversionError::from_read_io(&e, path))? + .len(); + let mut info = SourceInfo { + format, + size_bytes, + width: None, + height: None, + page_count: None, + frame_count: None, + has_alpha: None, + }; + let corrupt = |e: &dyn std::fmt::Display| { + ConversionError::for_path(ErrorKind::Corrupt, path).with_detail(e) + }; + + match format { + Format::Jpeg | Format::Png | Format::Webp | Format::Tiff | Format::Gif => { + let image_format = format + .image_format() + .ok_or_else(|| corrupt(&"no decoder"))?; + let reader = image::ImageReader::with_format( + std::io::BufReader::new( + File::open(path).map_err(|e| ConversionError::from_read_io(&e, path))?, + ), + image_format, + ); + let decoder = reader.into_decoder().map_err(|e| corrupt(&e))?; + let (w, h) = image::ImageDecoder::dimensions(&decoder); + info.width = Some(w); + info.height = Some(h); + info.has_alpha = Some(image::ImageDecoder::color_type(&decoder).has_alpha()); + info.frame_count = match format { + Format::Gif | Format::Webp | Format::Tiff => Some(count_frames(path, format)), + _ => None, + }; + } + Format::Heic | Format::Avif => { + let bytes = std::fs::read(path).map_err(|e| ConversionError::from_read_io(&e, path))?; + let hi = heifer::read_info(&bytes).map_err(|e| corrupt(&e))?; + info.width = Some(hi.width); + info.height = Some(hi.height); + info.has_alpha = Some(hi.has_alpha); + if let Ok(file) = heifer::heifer_isobmff::HeifFile::parse(&bytes) { + let n = file.top_level_image_ids().len(); + if n > 1 { + info.frame_count = u32::try_from(n).ok(); + } + } + } + // Filled in by the PDF and SVG decoders' probes (US3, US4). + Format::Pdf => info.page_count = crate::decode::probe_pdf_pages(path), + Format::Svg => { + if let Some((w, h)) = crate::decode::probe_svg_size(path) { + info.width = Some(w); + info.height = Some(h); + } + } + Format::Ico => return Err(ConversionError::for_path(ErrorKind::Unsupported, path)), + } + Ok(info) +} + +/// Number of frames (GIF, WebP) or pages (TIFF); 1 when unknown or for other formats. +pub fn count_frames(path: &Path, format: Format) -> u32 { + let n = match format { + Format::Gif => count_gif_frames(path), + Format::Webp => count_webp_frames(path), + Format::Tiff => count_tiff_pages(path), + _ => Ok(1), + }; + n.unwrap_or(1) +} + +/// Counts GIF image descriptors by walking the block structure (no pixel decoding). +fn count_gif_frames(path: &Path) -> std::io::Result { + let data = std::fs::read(path)?; + let bad = || std::io::Error::from(std::io::ErrorKind::InvalidData); + let mut i = 13; // header (6) + logical screen descriptor (7) + let flags = *data.get(10).ok_or_else(bad)?; + if flags & 0x80 != 0 { + i += 3 * (1usize << ((flags & 0x07) + 1)); + } + let mut frames = 0u32; + let skip_sub_blocks = |mut j: usize| -> Option { + loop { + let len = *data.get(j)? as usize; + j += 1; + if len == 0 { + return Some(j); + } + j += len; + } + }; + while let Some(&b) = data.get(i) { + match b { + 0x2C => { + frames += 1; + let lflags = *data.get(i + 9).ok_or_else(bad)?; + i += 10; + if lflags & 0x80 != 0 { + i += 3 * (1usize << ((lflags & 0x07) + 1)); + } + i += 1; // LZW minimum code size + i = skip_sub_blocks(i).ok_or_else(bad)?; + } + 0x21 => i = skip_sub_blocks(i + 2).ok_or_else(bad)?, + 0x3B => break, + _ => return Err(bad()), + } + } + Ok(frames.max(1)) +} + +/// Counts `ANMF` chunks in an animated WebP (1 for still images). +fn count_webp_frames(path: &Path) -> std::io::Result { + let data = std::fs::read(path)?; + let mut i = 12; + let mut frames = 0u32; + while i + 8 <= data.len() { + let id = &data[i..i + 4]; + let len = u32::from_le_bytes([data[i + 4], data[i + 5], data[i + 6], data[i + 7]]) as usize; + if id == b"ANMF" { + frames += 1; + } + i += 8 + len + (len & 1); + } + Ok(frames.max(1)) +} + +/// Counts TIFF IFDs (pages) by following the IFD offset chain. +fn count_tiff_pages(path: &Path) -> std::io::Result { + let mut f = File::open(path)?; + let mut hdr = [0u8; 8]; + f.read_exact(&mut hdr)?; + let le = &hdr[0..2] == b"II"; + let u16_at = |b: [u8; 2]| { + if le { + u16::from_le_bytes(b) + } else { + u16::from_be_bytes(b) + } + }; + let u32_at = |b: [u8; 4]| { + if le { + u32::from_le_bytes(b) + } else { + u32::from_be_bytes(b) + } + }; + let mut offset = u32_at([hdr[4], hdr[5], hdr[6], hdr[7]]) as u64; + let file_len = f.metadata()?.len(); + let mut pages = 0u32; + while offset != 0 && offset < file_len && pages < 10_000 { + pages += 1; + f.seek(SeekFrom::Start(offset))?; + let mut n = [0u8; 2]; + f.read_exact(&mut n)?; + let entries = u16_at(n) as u64; + f.seek(SeekFrom::Start(offset + 2 + entries * 12))?; + let mut next = [0u8; 4]; + f.read_exact(&mut next)?; + let next = u32_at(next) as u64; + if next <= offset { + break; // loops are malformed; stop counting + } + offset = next; + } + Ok(pages.max(1)) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn input_output_sets() { + assert_eq!(Format::ALL.iter().filter(|f| f.is_input()).count(), 9); + assert_eq!(Format::ALL.iter().filter(|f| f.is_output()).count(), 7); + } + + #[test] + fn svg_sniffing() { + assert!(looks_like_svg(b"")); + assert!(looks_like_svg( + b"\xEF\xBB\xBF\n\n" + )); + assert!(looks_like_svg( + b" ]>\n" + )); + assert!(!looks_like_svg(b"")); + assert!(!looks_like_svg(b"")); + } + + #[test] + fn isobmff_brands() { + let mk = |major: &[u8; 4], compat: &[&[u8; 4]]| { + let size = 16 + 4 * compat.len(); + let mut v = (size as u32).to_be_bytes().to_vec(); + v.extend_from_slice(b"ftyp"); + v.extend_from_slice(major); + v.extend_from_slice(&[0, 0, 0, 0]); + for c in compat { + v.extend_from_slice(*c); + } + v + }; + assert_eq!( + detect_bytes(&mk(b"heic", &[b"mif1", b"heic"])), + Some(Format::Heic) + ); + assert_eq!( + detect_bytes(&mk(b"mif1", &[b"avif", b"miaf"])), + Some(Format::Avif) + ); + assert_eq!(detect_bytes(&mk(b"avif", &[b"mif1"])), Some(Format::Avif)); + assert_eq!(detect_bytes(&mk(b"isom", &[b"mp41"])), None); + } +} diff --git a/crates/core/src/job.rs b/crates/core/src/job.rs new file mode 100644 index 0000000..404b488 --- /dev/null +++ b/crates/core/src/job.rs @@ -0,0 +1,381 @@ +//! Conversion jobs (data-model `ConversionJob`/`ConversionItem`, contracts/ipc.md `JobEvent`). +//! +//! Guarantees: +//! - exactly one `ItemFinished` per item, after its `ItemStarted` (if it started); +//! - `JobFinished` is always the last event; +//! - a panic inside a converter fails only that item (Constitution I, research R15); +//! - after cancellation no new item starts and cancelled items produce no output (SC-007). + +use std::collections::HashMap; +use std::panic::{catch_unwind, AssertUnwindSafe}; +use std::path::PathBuf; +use std::sync::{Arc, Mutex}; + +use serde::Serialize; + +use crate::converter::{CancelToken, ConversionOptions, ConvertCtx, NoticeKind}; +use crate::error::{ConversionError, ErrorKind}; +use crate::format::Format; +use crate::output::{NameReservations, OutputFile, SourceId, StagedOutput, StagingJournal}; +use crate::registry::Registry; + +pub type JobId = u64; + +/// One source file in a job. +#[derive(Debug, Clone)] +pub struct JobItem { + pub source_id: SourceId, + pub path: PathBuf, + pub format: Format, +} + +/// A conversion request: one target for all items (FR-022). Item order is the PDF page order +/// for combined PDF output. +#[derive(Debug, Clone)] +pub struct JobSpec { + pub id: JobId, + pub items: Vec, + pub target: Format, + pub options: ConversionOptions, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum ItemStatus { + Done, + Failed, + Cancelled, + Skipped, +} + +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum JobStatus { + Completed, + Cancelled, +} + +#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize)] +pub struct JobSummary { + pub succeeded: u32, + pub failed: u32, + pub skipped: u32, + pub cancelled: u32, +} + +impl JobSummary { + fn count(&mut self, s: ItemStatus) { + match s { + ItemStatus::Done => self.succeeded += 1, + ItemStatus::Failed => self.failed += 1, + ItemStatus::Cancelled => self.cancelled += 1, + ItemStatus::Skipped => self.skipped += 1, + } + } +} + +/// Events streamed to the UI (contracts/ipc.md). +#[derive(Debug, Clone, Serialize)] +#[serde(tag = "type", rename_all = "camelCase")] +pub enum JobEvent { + #[serde(rename_all = "camelCase")] + ItemStarted { source_id: SourceId }, + #[serde(rename_all = "camelCase")] + ItemProgress { source_id: SourceId, progress: f32 }, + #[serde(rename_all = "camelCase")] + ItemFinished { + source_id: SourceId, + status: ItemStatus, + outputs: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + error: Option, + notices: Vec, + }, + #[serde(rename_all = "camelCase")] + JobFinished { + job_id: JobId, + status: JobStatus, + summary: JobSummary, + #[serde(skip_serializing_if = "Option::is_none")] + combined_output: Option, + }, +} + +/// Cancellation handles for a job and each of its items. +#[derive(Debug, Clone)] +pub struct JobControl { + job: CancelToken, + items: HashMap, +} + +impl JobControl { + pub fn new(spec: &JobSpec) -> Self { + let job = CancelToken::new(); + let items = spec + .items + .iter() + .map(|i| (i.source_id, job.child())) + .collect(); + Self { job, items } + } + + pub fn cancel_job(&self) { + self.job.cancel(); + } + + pub fn cancel_item(&self, id: SourceId) { + if let Some(t) = self.items.get(&id) { + t.cancel(); + } + } + + pub fn job_token(&self) -> &CancelToken { + &self.job + } + + pub fn item_token(&self, id: SourceId) -> CancelToken { + self.items + .get(&id) + .cloned() + .unwrap_or_else(|| self.job.child()) + } +} + +/// Runs jobs against a registry. +pub struct JobRunner { + registry: Arc, + journal: Option>, + parallelism: usize, +} + +type EventSink = Arc; + +impl JobRunner { + pub fn new(registry: Arc, journal: Option>) -> Self { + let parallelism = std::thread::available_parallelism().map_or(2, |n| n.get()); + Self { + registry, + journal, + parallelism, + } + } + + /// Overrides the number of items converted at once (default: CPU count). + #[must_use] + pub fn with_parallelism(mut self, n: usize) -> Self { + self.parallelism = n.max(1); + self + } + + pub fn registry(&self) -> &Arc { + &self.registry + } + + /// Runs `job` to completion on the calling thread, emitting events. Blocking. + pub fn run( + &self, + job: &JobSpec, + control: &JobControl, + events: impl Fn(JobEvent) + Send + Sync + 'static, + ) -> JobSummary { + let events: EventSink = Arc::new(events); + let mut summary = JobSummary::default(); + let reservations = Mutex::new(NameReservations::new()); + + // Items already in the target format are skipped up front (US2 scenario 4). + let mut runnable = Vec::new(); + for item in &job.items { + if item.format == job.target { + summary.count(ItemStatus::Skipped); + events(JobEvent::ItemFinished { + source_id: item.source_id, + status: ItemStatus::Skipped, + outputs: Vec::new(), + error: None, + notices: Vec::new(), + }); + } else { + runnable.push(item); + } + } + + let summary = Mutex::new(summary); + self.run_items(job, control, &runnable, &reservations, &summary, &events); + let summary = summary.into_inner().unwrap_or_else(|p| p.into_inner()); + + let status = if control.job_token().is_cancelled() { + JobStatus::Cancelled + } else { + JobStatus::Completed + }; + events(JobEvent::JobFinished { + job_id: job.id, + status, + summary, + combined_output: None, + }); + summary + } + + /// Converts items with bounded parallelism: workers pull the next item index in list order. + fn run_items( + &self, + job: &JobSpec, + control: &JobControl, + items: &[&JobItem], + reservations: &Mutex, + summary: &Mutex, + events: &EventSink, + ) { + let next = std::sync::atomic::AtomicUsize::new(0); + let workers = self.parallelism.min(items.len()).max(1); + std::thread::scope(|scope| { + for _ in 0..workers { + scope.spawn(|| loop { + let i = next.fetch_add(1, std::sync::atomic::Ordering::SeqCst); + let Some(item) = items.get(i) else { break }; + let status = self.run_item(job, control, item, reservations, events); + summary + .lock() + .unwrap_or_else(|p| p.into_inner()) + .count(status); + }); + } + }); + } + + fn run_item( + &self, + job: &JobSpec, + control: &JobControl, + item: &JobItem, + reservations: &Mutex, + events: &EventSink, + ) -> ItemStatus { + let token = control.item_token(item.source_id); + let finish = |status: ItemStatus, + outputs: Vec, + error: Option, + notices: Vec| { + events(JobEvent::ItemFinished { + source_id: item.source_id, + status, + outputs, + error, + notices, + }); + status + }; + + if token.is_cancelled() { + return finish(ItemStatus::Cancelled, Vec::new(), None, Vec::new()); + } + let Some(converter) = self.registry.converter(item.format, job.target) else { + let err = ConversionError::for_path(ErrorKind::Unsupported, &item.path).with_detail( + format!("no converter for {:?} → {:?}", item.format, job.target), + ); + return finish(ItemStatus::Failed, Vec::new(), Some(err), Vec::new()); + }; + + events(JobEvent::ItemStarted { + source_id: item.source_id, + }); + let progress_events = events.clone(); + let source_id = item.source_id; + let mut ctx = ConvertCtx::new(token.clone()) + .with_journal(self.journal.clone()) + .with_progress(move |p| { + progress_events(JobEvent::ItemProgress { + source_id, + progress: p, + }); + }); + + let result = catch_unwind(AssertUnwindSafe(|| { + converter.convert(&item.path, &job.options, &mut ctx) + })) + .unwrap_or_else(|panic| { + let msg = panic + .downcast_ref::<&str>() + .map(|s| (*s).to_owned()) + .or_else(|| panic.downcast_ref::().cloned()) + .unwrap_or_else(|| "panic".to_owned()); + Err(ConversionError::for_path(ErrorKind::Internal, &item.path) + .with_detail(format!("converter panicked: {msg}"))) + }); + let notices = ctx.take_notices(); + + match result { + Ok(staged) if !token.is_cancelled() => { + match commit_all(staged, reservations, item.source_id) { + Ok(outputs) => finish(ItemStatus::Done, outputs, None, notices), + Err(err) => finish(ItemStatus::Failed, Vec::new(), Some(err), notices), + } + } + // Cancelled after converting: discard staged outputs (dropping deletes them). + Ok(_) => finish(ItemStatus::Cancelled, Vec::new(), None, notices), + Err(e) if e.is_cancelled() || token.is_cancelled() => { + finish(ItemStatus::Cancelled, Vec::new(), None, notices) + } + Err(e) => finish(ItemStatus::Failed, Vec::new(), Some(e), notices), + } + } +} + +/// Commits all staged outputs of one item. If any commit fails, already committed files of this +/// item are kept (they are complete and valid) and the error is reported. +fn commit_all( + staged: Vec, + reservations: &Mutex, + source_id: SourceId, +) -> Result, ConversionError> { + let mut reserved = reservations.lock().unwrap_or_else(|p| p.into_inner()); + let mut out = Vec::with_capacity(staged.len()); + for s in staged { + out.push(s.commit(&mut reserved, vec![source_id])?); + } + Ok(out) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn events_serialize_per_contract() { + let e = JobEvent::ItemFinished { + source_id: 3, + status: ItemStatus::Done, + outputs: vec![OutputFile { + path: PathBuf::from("/x/a.jpg"), + format: Format::Jpeg, + source_ids: vec![3], + page: None, + }], + error: None, + notices: vec![NoticeKind::TransparencyFlattened], + }; + let v = serde_json::to_value(&e).expect("serialize"); + assert_eq!(v["type"], "itemFinished"); + assert_eq!(v["sourceId"], 3); + assert_eq!(v["status"], "done"); + assert_eq!(v["outputs"][0]["format"], "jpg"); + assert_eq!(v["outputs"][0]["sourceIds"][0], 3); + assert_eq!(v["notices"][0], "transparencyFlattened"); + let f = JobEvent::JobFinished { + job_id: 1, + status: JobStatus::Cancelled, + summary: JobSummary { + succeeded: 1, + failed: 0, + skipped: 2, + cancelled: 3, + }, + combined_output: None, + }; + let v = serde_json::to_value(&f).expect("serialize"); + assert_eq!(v["type"], "jobFinished"); + assert_eq!(v["jobId"], 1); + assert_eq!(v["summary"]["skipped"], 2); + } +} diff --git a/crates/core/src/lib.rs b/crates/core/src/lib.rs new file mode 100644 index 0000000..5640c85 --- /dev/null +++ b/crates/core/src/lib.rs @@ -0,0 +1,16 @@ +//! `largsform-core`: the Tauri-independent conversion engine (Constitution III). +//! +//! Pipeline: [`decode`] → [`normalize`] → [`encode`], composed per format pair by +//! [`converter::PipelineConverter`] and discovered through [`registry::Registry`]. +#![forbid(unsafe_code)] + +pub mod converter; +pub mod decode; +pub mod encode; +pub mod error; +pub mod format; +pub mod job; +pub mod metadata; +pub mod normalize; +pub mod output; +pub mod registry; diff --git a/crates/core/src/metadata.rs b/crates/core/src/metadata.rs new file mode 100644 index 0000000..866dfb3 --- /dev/null +++ b/crates/core/src/metadata.rs @@ -0,0 +1,326 @@ +//! Metadata preservation (FR-015, research R11). +//! +//! Source EXIF, ICC and XMP are carried through conversion and written into outputs that can +//! hold them (JPG, PNG, WebP, AVIF). After the pixels are rotated upright, the EXIF orientation +//! tag is reset to 1 so viewers do not rotate the image a second time. + +use img_parts::jpeg::{markers, Jpeg, JpegSegment}; +use img_parts::png::{Png, PngChunk}; +use img_parts::riff::{RiffChunk, RiffContent}; +use img_parts::webp::WebP; +use img_parts::{Bytes, ImageEXIF, ImageICC}; + +use crate::format::Format; + +/// Metadata carried from a source image to its outputs. +#[derive(Debug, Clone, Default, PartialEq, Eq)] +pub struct MetadataBundle { + /// Raw EXIF as a TIFF structure (starting with `II*\0` or `MM\0*`), without any + /// `Exif\0\0` prefix. + pub exif: Option>, + pub icc: Option>, + pub xmp: Option>, +} + +impl MetadataBundle { + pub fn is_empty(&self) -> bool { + self.exif.is_none() && self.icc.is_none() && self.xmp.is_none() + } + + /// Normalizes and stores an EXIF blob from any container (`Exif\0\0` prefix, HEIF 4-byte + /// offset header, or bare TIFF). Invalid blobs are dropped. + pub fn set_exif_from_container(&mut self, raw: &[u8]) { + self.exif = tiff_header_offset(raw).map(|off| raw[off..].to_vec()); + } +} + +/// Errors from the EXIF patcher. Never a panic (Constitution I). +#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] +pub enum MetadataError { + #[error("EXIF data is malformed: {0}")] + Malformed(&'static str), + #[error("could not write metadata: {0}")] + Write(String), +} + +/// Finds the start of the TIFF header inside an EXIF blob. +pub fn tiff_header_offset(raw: &[u8]) -> Option { + let is_tiff = |b: &[u8]| b.starts_with(b"II*\0") || b.starts_with(b"MM\0*"); + if is_tiff(raw) { + return Some(0); + } + if raw.starts_with(b"Exif\0\0") && is_tiff(&raw[6..]) { + return Some(6); + } + // HEIF Exif items: 4-byte big-endian offset to the TIFF header, then the data. + if raw.len() >= 4 { + let off = u32::from_be_bytes([raw[0], raw[1], raw[2], raw[3]]) as usize; + let start = 4usize.checked_add(off)?; + if raw.get(start..).is_some_and(is_tiff) { + return Some(start); + } + } + None +} + +/// Resets the EXIF orientation tag (0x0112) in IFD0 to 1, editing the TIFF blob in place. +/// Returns `Ok(false)` when the tag is absent. Never touches other tags. +pub fn reset_orientation(exif: &mut [u8]) -> Result { + const ORIENTATION: u16 = 0x0112; + const SHORT: u16 = 3; + + let le = match exif.get(0..4) { + Some(b"II*\0") => true, + Some(b"MM\0*") => false, + _ => return Err(MetadataError::Malformed("missing TIFF header")), + }; + let rd16 = |b: &[u8], at: usize| -> Option { + let s = b.get(at..at + 2)?; + Some(if le { + u16::from_le_bytes([s[0], s[1]]) + } else { + u16::from_be_bytes([s[0], s[1]]) + }) + }; + let rd32 = |b: &[u8], at: usize| -> Option { + let s = b.get(at..at + 4)?; + let a = [s[0], s[1], s[2], s[3]]; + Some(if le { + u32::from_le_bytes(a) + } else { + u32::from_be_bytes(a) + }) + }; + + let ifd0 = rd32(exif, 4).ok_or(MetadataError::Malformed("truncated header"))? as usize; + let count = rd16(exif, ifd0).ok_or(MetadataError::Malformed("IFD0 out of range"))? as usize; + for i in 0..count { + let entry = ifd0 + .checked_add(2 + i * 12) + .ok_or(MetadataError::Malformed("IFD0 overflow"))?; + let tag = rd16(exif, entry).ok_or(MetadataError::Malformed("IFD0 entry out of range"))?; + if tag != ORIENTATION { + continue; + } + let ty = rd16(exif, entry + 2).ok_or(MetadataError::Malformed("bad entry"))?; + if ty != SHORT { + return Err(MetadataError::Malformed("orientation is not a SHORT")); + } + // A single SHORT value is stored in the first 2 bytes of the 4-byte value field. + let slot = exif + .get_mut(entry + 8..entry + 10) + .ok_or(MetadataError::Malformed("orientation value out of range"))?; + let one = if le { + 1u16.to_le_bytes() + } else { + 1u16.to_be_bytes() + }; + slot.copy_from_slice(&one); + return Ok(true); + } + Ok(false) +} + +const XMP_JPEG_PREFIX: &[u8] = b"http://ns.adobe.com/xap/1.0/\0"; + +/// Writes `bundle` into an encoded JPG, PNG or WebP file. Other formats are returned unchanged +/// (AVIF metadata is written by its encoder; ICO, SVG and PDF cannot carry it). +pub fn write_metadata( + encoded: Vec, + format: Format, + bundle: &MetadataBundle, +) -> Result, MetadataError> { + if bundle.is_empty() { + return Ok(encoded); + } + let w = |e: img_parts::Error| MetadataError::Write(e.to_string()); + let bytes = Bytes::from(encoded); + let exif = bundle.exif.clone().map(Bytes::from); + let icc = bundle.icc.clone().map(Bytes::from); + + match format { + Format::Jpeg => { + let mut jpeg = Jpeg::from_bytes(bytes).map_err(w)?; + if let Some(xmp) = &bundle.xmp { + let mut contents = XMP_JPEG_PREFIX.to_vec(); + contents.extend_from_slice(xmp); + if contents.len() <= 65533 { + // After SOI-adjacent APP0/APP1 segments, before the frame header. + let pos = jpeg + .segments() + .iter() + .position(|s| !matches!(s.marker(), markers::APP0 | markers::APP1)) + .unwrap_or(0); + jpeg.segments_mut().insert( + pos, + JpegSegment::new_with_contents(markers::APP1, Bytes::from(contents)), + ); + } + } + jpeg.set_icc_profile(icc); + jpeg.set_exif(exif); + Ok(jpeg.encoder().bytes().to_vec()) + } + Format::Png => { + let mut png = Png::from_bytes(bytes).map_err(w)?; + png.set_icc_profile(icc); + png.set_exif(exif); + if let Some(xmp) = &bundle.xmp { + // iTXt: keyword\0 compression-flag compression-method language\0 translated\0 text + let mut c = b"XML:com.adobe.xmp\0\0\0\0\0".to_vec(); + c.extend_from_slice(xmp); + let chunks = png.chunks_mut(); + let iend = chunks + .iter() + .position(|ch| &ch.kind() == b"IEND") + .unwrap_or(chunks.len()); + chunks.insert(iend, PngChunk::new(*b"iTXt", Bytes::from(c))); + } + Ok(png.encoder().bytes().to_vec()) + } + Format::Webp => { + let mut webp = WebP::from_bytes(bytes).map_err(w)?; + if let Some(xmp) = &bundle.xmp { + webp.chunks_mut().push(RiffChunk::new( + *b"XMP ", + RiffContent::Data(Bytes::from(xmp.clone())), + )); + } + webp.set_icc_profile(icc); + // set_exif also recomputes the VP8X feature flags (ICC, EXIF, XMP). + webp.set_exif(exif); + Ok(webp.encoder().bytes().to_vec()) + } + _ => Ok(bytes.to_vec()), + } +} + +/// Reads back EXIF from an encoded JPG, PNG or WebP (used by tests and diagnostics). +pub fn read_exif(encoded: &[u8], format: Format) -> Option> { + let bytes = Bytes::copy_from_slice(encoded); + let exif = match format { + Format::Jpeg => Jpeg::from_bytes(bytes).ok()?.exif(), + Format::Png => Png::from_bytes(bytes).ok()?.exif(), + Format::Webp => WebP::from_bytes(bytes).ok()?.exif(), + _ => None, + }?; + Some(exif.to_vec()) +} + +/// Reads back the ICC profile from an encoded JPG, PNG or WebP. +pub fn read_icc(encoded: &[u8], format: Format) -> Option> { + let bytes = Bytes::copy_from_slice(encoded); + let icc = match format { + Format::Jpeg => Jpeg::from_bytes(bytes).ok()?.icc_profile(), + Format::Png => Png::from_bytes(bytes).ok()?.icc_profile(), + Format::Webp => WebP::from_bytes(bytes).ok()?.icc_profile(), + _ => None, + }?; + Some(icc.to_vec()) +} + +/// Reads the orientation value (1–8) from a TIFF-structured EXIF blob. +pub fn read_orientation(exif: &[u8]) -> Option { + let le = match exif.get(0..4)? { + b"II*\0" => true, + b"MM\0*" => false, + _ => return None, + }; + let rd16 = |at: usize| -> Option { + let s = exif.get(at..at + 2)?; + Some(if le { + u16::from_le_bytes([s[0], s[1]]) + } else { + u16::from_be_bytes([s[0], s[1]]) + }) + }; + let s = exif.get(4..8)?; + let ifd0 = if le { + u32::from_le_bytes([s[0], s[1], s[2], s[3]]) + } else { + u32::from_be_bytes([s[0], s[1], s[2], s[3]]) + } as usize; + let count = rd16(ifd0)? as usize; + (0..count).find_map(|i| { + let e = ifd0 + 2 + i * 12; + (rd16(e)? == 0x0112).then(|| rd16(e + 8)).flatten() + }) +} + +#[cfg(test)] +mod tests { + use super::*; + + /// Minimal EXIF with IFD0 = [Make "AB", Orientation = `o`]. + pub(crate) fn sample_exif(le: bool, o: u16) -> Vec { + let p16 = |v: u16| if le { v.to_le_bytes() } else { v.to_be_bytes() }; + let p32 = |v: u32| if le { v.to_le_bytes() } else { v.to_be_bytes() }; + let mut v = Vec::new(); + v.extend_from_slice(if le { b"II*\0" } else { b"MM\0*" }); + v.extend_from_slice(&p32(8)); + v.extend_from_slice(&p16(2)); + // Make (0x010F), ASCII, count 3, inline "AB\0" + v.extend_from_slice(&p16(0x010F)); + v.extend_from_slice(&p16(2)); + v.extend_from_slice(&p32(3)); + v.extend_from_slice(b"AB\0\0"); + // Orientation (0x0112), SHORT, count 1 + v.extend_from_slice(&p16(0x0112)); + v.extend_from_slice(&p16(3)); + v.extend_from_slice(&p32(1)); + v.extend_from_slice(&p16(o)); + v.extend_from_slice(&[0, 0]); + v.extend_from_slice(&p32(0)); + v + } + + #[test] + fn resets_orientation_both_endians() { + for le in [true, false] { + for o in 1..=8 { + let mut e = sample_exif(le, o); + let before = e.clone(); + assert_eq!(reset_orientation(&mut e), Ok(true)); + assert_eq!(read_orientation(&e), Some(1)); + // Only the orientation value bytes changed. + let diff: Vec = (0..e.len()).filter(|&i| e[i] != before[i]).collect(); + assert!(diff.iter().all(|&i| (30..32).contains(&i)), "{diff:?}"); + } + } + } + + #[test] + fn malformed_exif_never_panics() { + for len in 0..40 { + let mut e = sample_exif(true, 6); + e.truncate(len); + let _ = reset_orientation(&mut e); + } + let mut garbage = vec![0xAB; 64]; + assert!(reset_orientation(&mut garbage).is_err()); + let mut bad_offset = b"II*\0\xFF\xFF\xFF\xFF".to_vec(); + assert!(reset_orientation(&mut bad_offset).is_err()); + } + + #[test] + fn container_prefixes() { + let tiff = sample_exif(true, 1); + let mut exif_prefixed = b"Exif\0\0".to_vec(); + exif_prefixed.extend_from_slice(&tiff); + let mut heif = 0u32.to_be_bytes().to_vec(); + heif.extend_from_slice(&tiff); + for raw in [&tiff, &exif_prefixed, &heif] { + let mut b = MetadataBundle::default(); + b.set_exif_from_container(raw); + assert_eq!(b.exif.as_deref(), Some(tiff.as_slice())); + } + } +} + +#[cfg(test)] +pub(crate) mod tests_support { + /// Little-endian EXIF with a Make tag and the given orientation. + pub fn exif_with_orientation(o: u16) -> Vec { + super::tests::sample_exif(true, o) + } +} diff --git a/crates/core/src/normalize.rs b/crates/core/src/normalize.rs new file mode 100644 index 0000000..c30bd8e --- /dev/null +++ b/crates/core/src/normalize.rs @@ -0,0 +1,235 @@ +//! Normalization between decoding and encoding (FR-006, FR-007, FR-014; research R12). +//! +//! 1. Apply orientation to the pixels and reset the EXIF orientation tag to 1. +//! 2. Flatten transparency onto white for formats without alpha (JPG). +//! 3. Reduce to 8 bits per channel unless the target keeps 16-bit (PNG). +//! 4. For targets that cannot embed an ICC profile (ICO, SVG, PDF), convert to sRGB. +//! 5. Drop metadata the target cannot carry. + +use image::metadata::Orientation; +use image::{DynamicImage, GenericImageView, ImageBuffer, Rgb, Rgba}; + +use crate::converter::{ConvertCtx, DecodedImage, NoticeKind}; +use crate::error::Result; +use crate::format::Format; +use crate::metadata; + +/// Per-item allocation cap: larger images fail with "image too large" (research R15). +pub const MAX_ALLOC_BYTES: u64 = 2 * 1024 * 1024 * 1024; + +/// `image` crate decoding limits used by every decoder. +pub fn decode_limits() -> image::Limits { + let mut limits = image::Limits::default(); + limits.max_alloc = Some(MAX_ALLOC_BYTES); + limits +} + +/// Prepares decoded images for encoding into `target`. +pub fn prepare( + images: Vec, + target: Format, + ctx: &mut ConvertCtx, +) -> Result> { + let n = images.len().max(1) as f32; + let mut out = Vec::with_capacity(images.len()); + for (i, mut img) in images.into_iter().enumerate() { + ctx.check_cancelled()?; + apply_orientation(&mut img); + + if !target.supports_alpha() && has_transparency(&img.pixels) { + ctx.notice(NoticeKind::TransparencyFlattened); + } + + if !target.carries_icc() { + if let Some(icc) = img.metadata.icc.take() { + to_srgb(&mut img.pixels, &icc); + } + } + + img.pixels = match target { + Format::Jpeg => DynamicImage::ImageRgb8(flatten_on_white(&img.pixels)), + Format::Png => keep_depth_for_png(img.pixels), + _ => to_8bit_rgba_or_rgb(img.pixels), + }; + + if !target.carries_exif() { + if !img.metadata.is_empty() { + ctx.notice(NoticeKind::MetadataDropped); + } + img.metadata.exif = None; + img.metadata.xmp = None; + } + out.push(img); + ctx.progress((i + 1) as f32 / n); + } + Ok(out) +} + +/// Rotates/flips pixels per the pending orientation and resets the EXIF tag to 1 (FR-007). +pub fn apply_orientation(img: &mut DecodedImage) { + if img.orientation != Orientation::NoTransforms { + img.pixels.apply_orientation(img.orientation); + img.orientation = Orientation::NoTransforms; + } + if let Some(exif) = img.metadata.exif.as_mut() { + if metadata::reset_orientation(exif).is_err() { + // Unreadable EXIF could make viewers rotate the image again: drop it rather than + // risk a wrongly rotated output. + img.metadata.exif = None; + } + } +} + +/// `true` when any pixel is not fully opaque. +pub fn has_transparency(img: &DynamicImage) -> bool { + if !img.color().has_alpha() { + return false; + } + match img { + DynamicImage::ImageRgba8(b) => b.pixels().any(|p| p[3] < 255), + DynamicImage::ImageLumaA8(b) => b.pixels().any(|p| p[1] < 255), + DynamicImage::ImageRgba16(b) => b.pixels().any(|p| p[3] < u16::MAX), + DynamicImage::ImageLumaA16(b) => b.pixels().any(|p| p[1] < u16::MAX), + _ => img.pixels().any(|(_, _, p)| p[3] < 255), + } +} + +/// Composites onto a white background (FR-006). +pub fn flatten_on_white(img: &DynamicImage) -> ImageBuffer, Vec> { + if !img.color().has_alpha() { + return img.to_rgb8(); + } + let rgba = img.to_rgba8(); + let (w, h) = rgba.dimensions(); + ImageBuffer::from_fn(w, h, |x, y| { + let Rgba([r, g, b, a]) = *rgba.get_pixel(x, y); + let a = u32::from(a); + let blend = |c: u8| ((u32::from(c) * a + 255 * (255 - a) + 127) / 255) as u8; + Rgb([blend(r), blend(g), blend(b)]) + }) +} + +fn keep_depth_for_png(img: DynamicImage) -> DynamicImage { + match img { + DynamicImage::ImageRgb32F(_) | DynamicImage::ImageRgba32F(_) => { + DynamicImage::ImageRgba16(img.to_rgba16()) + } + other => other, + } +} + +fn to_8bit_rgba_or_rgb(img: DynamicImage) -> DynamicImage { + match img { + DynamicImage::ImageRgb8(_) | DynamicImage::ImageRgba8(_) => img, + ref other if other.color().has_alpha() => DynamicImage::ImageRgba8(other.to_rgba8()), + other => DynamicImage::ImageRgb8(other.to_rgb8()), + } +} + +/// Converts pixels from the embedded profile `icc` to sRGB (research R12). If the profile +/// cannot be parsed or is already sRGB, pixels are left unchanged. +pub fn to_srgb(img: &mut DynamicImage, icc: &[u8]) { + let Some(input) = qcms::Profile::new_from_slice(icc, false) else { + return; + }; + if input.is_sRGB() { + return; + } + let output = qcms::Profile::new_sRGB(); + let Some(transform) = qcms::Transform::new( + &input, + &output, + qcms::DataType::RGBA8, + qcms::Intent::default(), + ) else { + return; + }; + let mut rgba = img.to_rgba8(); + transform.apply(rgba.as_mut()); + *img = DynamicImage::ImageRgba8(rgba); +} + +/// Heuristic for "photographic" content: more than 4,096 distinct colors in a sample of up to +/// 64k pixels (research R9). Used to warn before tracing to SVG. +pub fn is_photographic(img: &DynamicImage) -> bool { + use std::collections::HashSet; + let (w, h) = img.dimensions(); + let total = u64::from(w) * u64::from(h); + if total == 0 { + return false; + } + let step = ((total / 65_536).max(1) as f64).sqrt().ceil() as u32; + let rgb = img.to_rgb8(); + let mut colors = HashSet::new(); + for y in (0..h).step_by(step as usize) { + for x in (0..w).step_by(step as usize) { + let p = rgb.get_pixel(x, y); + colors.insert((p[0], p[1], p[2])); + if colors.len() > 4096 { + return true; + } + } + } + false +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::converter::CancelToken; + + #[test] + fn flattens_transparent_pixels_to_white() { + let mut img = image::RgbaImage::new(2, 1); + img.put_pixel(0, 0, Rgba([0, 0, 0, 0])); + img.put_pixel(1, 0, Rgba([10, 20, 30, 255])); + let out = flatten_on_white(&DynamicImage::ImageRgba8(img)); + assert_eq!(out.get_pixel(0, 0), &Rgb([255, 255, 255])); + assert_eq!(out.get_pixel(1, 0), &Rgb([10, 20, 30])); + } + + #[test] + fn orientation_rotates_and_resets_tag() { + let mut d = DecodedImage::new(DynamicImage::new_rgb8(4, 2)); + d.orientation = Orientation::Rotate90; + d.metadata.exif = Some(crate::metadata::tests_support::exif_with_orientation(6)); + apply_orientation(&mut d); + assert_eq!(d.pixels.dimensions(), (2, 4)); + assert_eq!( + d.metadata + .exif + .as_deref() + .and_then(crate::metadata::read_orientation), + Some(1) + ); + } + + #[test] + fn jpeg_target_gets_rgb8_and_notice() { + let mut img = image::RgbaImage::new(1, 1); + img.put_pixel(0, 0, Rgba([0, 0, 0, 10])); + let mut ctx = ConvertCtx::new(CancelToken::new()); + let out = prepare( + vec![DecodedImage::new(DynamicImage::ImageRgba8(img))], + Format::Jpeg, + &mut ctx, + ) + .expect("prepare"); + assert!(matches!(out[0].pixels, DynamicImage::ImageRgb8(_))); + assert!(ctx.notices().contains(&NoticeKind::TransparencyFlattened)); + } + + #[test] + fn photographic_heuristic() { + let flat = DynamicImage::new_rgb8(256, 256); + assert!(!is_photographic(&flat)); + let noisy = DynamicImage::ImageRgb8(ImageBuffer::from_fn(256, 256, |x, y| { + Rgb([ + (x * 7 % 256) as u8, + (y * 13 % 256) as u8, + ((x ^ y) % 256) as u8, + ]) + })); + assert!(is_photographic(&noisy)); + } +} diff --git a/crates/core/src/output.rs b/crates/core/src/output.rs new file mode 100644 index 0000000..c0232c2 --- /dev/null +++ b/crates/core/src/output.rs @@ -0,0 +1,355 @@ +//! Output safety (Constitution IV, FR-018, FR-020; research R14). +//! +//! Each output is first written to a hidden staging file **in the destination folder** +//! (Constitution v1.0.1, Principle I exception), then atomically moved to its final name with a +//! no-clobber rename. Existing files are never overwritten: on a name collision the next +//! `name (n).ext` is tried. Dropping an uncommitted [`StagedOutput`] deletes its staging file. +//! A [`StagingJournal`] records staging paths so leftovers from a crash can be removed at the +//! next launch or on exit. + +use std::collections::HashSet; +use std::fs::{File, OpenOptions}; +use std::io::{BufRead, BufReader, Write}; +use std::path::{Path, PathBuf}; +use std::sync::{Arc, Mutex}; + +use serde::Serialize; +use tempfile::NamedTempFile; + +use crate::error::{ConversionError, Result}; +use crate::format::Format; + +/// Prefix shared by every staging file. Cleanup only ever deletes files with this prefix. +pub const STAGING_PREFIX: &str = ".largsform-"; + +/// Identifier of a source file within a session. +pub type SourceId = u64; + +/// A file the app produced (data-model `OutputFile`). +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct OutputFile { + pub path: PathBuf, + pub format: Format, + pub source_ids: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + pub page: Option, +} + +// --------------------------------------------------------------------------------------------- +// Staging journal +// --------------------------------------------------------------------------------------------- + +/// An append-only list of in-flight staging file paths, kept in the app data folder. +/// Holds paths only: never file contents or settings. +#[derive(Debug)] +pub struct StagingJournal { + path: PathBuf, + lock: Mutex<()>, +} + +impl StagingJournal { + /// Opens (or creates on first use) the journal at `path`. + pub fn open(path: impl Into) -> std::io::Result> { + let path = path.into(); + if let Some(parent) = path.parent() { + std::fs::create_dir_all(parent)?; + } + Ok(Arc::new(Self { + path, + lock: Mutex::new(()), + })) + } + + pub fn path(&self) -> &Path { + &self.path + } + + fn guard(&self) -> std::sync::MutexGuard<'_, ()> { + self.lock + .lock() + .unwrap_or_else(|poisoned| poisoned.into_inner()) + } + + /// Records a staging file before it is used. + pub fn add(&self, staging: &Path) -> std::io::Result<()> { + let _g = self.guard(); + let mut f = OpenOptions::new() + .create(true) + .append(true) + .open(&self.path)?; + writeln!(f, "{}", staging.display())?; + f.sync_data() + } + + /// Forgets a staging file once it was committed or deleted. + pub fn remove(&self, staging: &Path) -> std::io::Result<()> { + let _g = self.guard(); + let entries = self.read_entries()?; + let target = staging.display().to_string(); + let kept: Vec<&String> = entries.iter().filter(|e| **e != target).collect(); + if kept.len() == entries.len() { + return Ok(()); + } + let mut f = File::create(&self.path)?; + for e in kept { + writeln!(f, "{e}")?; + } + f.sync_data() + } + + /// Paths currently recorded. + pub fn entries(&self) -> std::io::Result> { + let _g = self.guard(); + Ok(self + .read_entries()? + .into_iter() + .map(PathBuf::from) + .collect()) + } + + fn read_entries(&self) -> std::io::Result> { + match File::open(&self.path) { + Ok(f) => BufReader::new(f) + .lines() + .filter(|l| l.as_ref().map_or(true, |s| !s.trim().is_empty())) + .collect(), + Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(Vec::new()), + Err(e) => Err(e), + } + } + + /// Deletes every recorded staging file that still exists (only files whose name starts with + /// [`STAGING_PREFIX`]) and clears the journal. Returns how many files were removed. + /// Called at launch and on exit (Constitution I). + pub fn cleanup_all(&self) -> std::io::Result { + let _g = self.guard(); + let mut removed = 0; + for entry in self.read_entries()? { + let p = PathBuf::from(entry); + let is_staging = p + .file_name() + .and_then(|n| n.to_str()) + .is_some_and(|n| n.starts_with(STAGING_PREFIX)); + if is_staging && p.is_file() && std::fs::remove_file(&p).is_ok() { + removed += 1; + } + } + File::create(&self.path)?.sync_data()?; + Ok(removed) + } +} + +// --------------------------------------------------------------------------------------------- +// Name reservations +// --------------------------------------------------------------------------------------------- + +/// Final names claimed during one job, so outputs in a batch never collide with each other. +/// Compared case-insensitively: we must not assume the filesystem is case-sensitive. +#[derive(Debug, Default)] +pub struct NameReservations { + taken: HashSet, +} + +impl NameReservations { + pub fn new() -> Self { + Self::default() + } + + fn key(path: &Path) -> PathBuf { + PathBuf::from(path.to_string_lossy().to_lowercase()) + } + + pub fn is_reserved(&self, path: &Path) -> bool { + self.taken.contains(&Self::key(path)) + } + + pub fn reserve(&mut self, path: &Path) { + self.taken.insert(Self::key(path)); + } +} + +/// The output file name for attempt `n` (0 = no suffix): `stem[-page-P][ (n)].ext`. +pub fn candidate_name(stem: &str, page: Option, ext: &str, n: u32) -> String { + let base = match page { + Some(p) => format!("{stem}-page-{p}"), + None => stem.to_owned(), + }; + if n == 0 { + format!("{base}.{ext}") + } else { + format!("{base} ({n}).{ext}") + } +} + +// --------------------------------------------------------------------------------------------- +// Staged output +// --------------------------------------------------------------------------------------------- + +/// A finished output that is not visible yet. Commit it to give it its final name; drop it to +/// delete it. +#[derive(Debug)] +pub struct StagedOutput { + file: Option, + dir: PathBuf, + stem: String, + page: Option, + format: Format, + journal: Option>, +} + +impl StagedOutput { + /// Creates a hidden staging file in `dir`. + pub fn create( + dir: &Path, + stem: &str, + page: Option, + format: Format, + journal: Option>, + ) -> Result { + let file = tempfile::Builder::new() + .prefix(STAGING_PREFIX) + .suffix(".tmp") + .tempfile_in(dir) + .map_err(|e| ConversionError::from_write_io(&e, dir))?; + // tempfile creates files readable and writable only by the owner (0600 on Unix). + if let Some(j) = &journal { + j.add(file.path()) + .map_err(|e| ConversionError::from_write_io(&e, dir))?; + } + Ok(Self { + file: Some(file), + dir: dir.to_path_buf(), + stem: stem.to_owned(), + page, + format, + journal, + }) + } + + /// Path of the staging file (for tests and diagnostics). + pub fn staging_path(&self) -> Option<&Path> { + self.file.as_ref().map(NamedTempFile::path) + } + + pub fn format(&self) -> Format { + self.format + } + + pub fn page(&self) -> Option { + self.page + } + + pub fn write_all(&mut self, bytes: &[u8]) -> Result<()> { + let dir = self.dir.clone(); + let f = self.file.as_mut().ok_or_else(|| { + ConversionError::new(crate::error::ErrorKind::Internal, "output") + .with_detail("already committed") + })?; + f.write_all(bytes) + .map_err(|e| ConversionError::from_write_io(&e, &dir)) + } + + /// Flushes to disk and moves the staging file to its final, non-colliding name. + pub fn commit( + mut self, + reserved: &mut NameReservations, + source_ids: Vec, + ) -> Result { + let dir = self.dir.clone(); + let mut file = self.file.take().ok_or_else(|| { + ConversionError::new(crate::error::ErrorKind::Internal, "output") + .with_detail("already committed") + })?; + file.as_file_mut() + .sync_all() + .map_err(|e| ConversionError::from_write_io(&e, &dir))?; + let staging_path = file.path().to_path_buf(); + + let ext = self.format.extension(); + let mut n = 0u32; + loop { + let target = dir.join(candidate_name(&self.stem, self.page, ext, n)); + if reserved.is_reserved(&target) || target.exists() { + n += 1; + continue; + } + match file.persist_noclobber(&target) { + Ok(persisted) => { + drop(persisted); + set_regular_permissions(&target); + reserved.reserve(&target); + if let Some(j) = &self.journal { + let _ = j.remove(&staging_path); + } + return Ok(OutputFile { + path: target, + format: self.format, + source_ids, + page: self.page, + }); + } + Err(e) if e.error.kind() == std::io::ErrorKind::AlreadyExists => { + file = e.file; + n += 1; + } + Err(e) => { + let err = ConversionError::from_write_io(&e.error, &dir); + self.file = Some(e.file); // Drop deletes it and updates the journal. + return Err(err); + } + } + if n > 10_000 { + return Err(ConversionError::from_write_io( + &std::io::Error::from(std::io::ErrorKind::AlreadyExists), + &dir, + )); + } + } + } +} + +impl Drop for StagedOutput { + fn drop(&mut self) { + if let Some(file) = self.file.take() { + let path = file.path().to_path_buf(); + drop(file); // NamedTempFile deletes the staging file. + if let Some(j) = &self.journal { + let _ = j.remove(&path); + } + } + } +} + +/// Committed outputs get normal file permissions instead of the staging file's owner-only mode. +#[cfg(unix)] +fn set_regular_permissions(path: &Path) { + use std::os::unix::fs::PermissionsExt; + let _ = std::fs::set_permissions(path, std::fs::Permissions::from_mode(0o644)); +} + +#[cfg(not(unix))] +fn set_regular_permissions(_path: &Path) {} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn candidate_names() { + assert_eq!(candidate_name("photo", None, "jpg", 0), "photo.jpg"); + assert_eq!(candidate_name("photo", None, "jpg", 2), "photo (2).jpg"); + assert_eq!(candidate_name("doc", Some(3), "png", 0), "doc-page-3.png"); + assert_eq!( + candidate_name("doc", Some(3), "png", 1), + "doc-page-3 (1).png" + ); + } + + #[test] + fn reservations_are_case_insensitive() { + let mut r = NameReservations::new(); + r.reserve(Path::new("/x/Photo.JPG")); + assert!(r.is_reserved(Path::new("/x/photo.jpg"))); + } +} diff --git a/crates/core/src/registry.rs b/crates/core/src/registry.rs new file mode 100644 index 0000000..1f64a15 --- /dev/null +++ b/crates/core/src/registry.rs @@ -0,0 +1,201 @@ +//! The conversion registry (Constitution III): every registered decoder × encoder pair except +//! same-format pairs becomes a [`PipelineConverter`]. The UI discovers targets from here, never +//! from hard-coded lists. + +use std::collections::BTreeMap; +use std::sync::Arc; + +use serde::Serialize; + +use crate::converter::{Converter, Decoder, Encoder, NoticeKind, OptionKind, PipelineConverter}; +use crate::format::Format; + +/// What converting one input format to one output format involves (data-model `Capability`). +#[derive(Debug, Clone, PartialEq, Eq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct Capability { + pub output: Format, + pub options: Vec, + /// Notices that always apply to this pair. Source-dependent notices (e.g. transparency + /// flattened) are added per file by [`Registry::notices_for`]. + pub notices: Vec, +} + +/// Facts about a source that affect which notices apply. +#[derive(Debug, Clone, Copy, Default)] +pub struct SourceTraits { + pub has_alpha: bool, + pub multi_frame: bool, + pub photographic: bool, +} + +pub struct Registry { + decoders: BTreeMap>, + encoders: BTreeMap>, + converters: BTreeMap<(Format, Format), PipelineConverter>, +} + +impl Default for Registry { + fn default() -> Self { + Self::new() + } +} + +impl Registry { + /// Registers every available decoder and encoder. + pub fn new() -> Self { + Self::with(crate::decode::all(), crate::encode::all()) + } + + /// Builds a registry from explicit decoders and encoders (used by tests). + pub fn with(decoders: Vec>, encoders: Vec>) -> Self { + let decoders: BTreeMap<_, _> = decoders.into_iter().map(|d| (d.format(), d)).collect(); + let encoders: BTreeMap<_, _> = encoders.into_iter().map(|e| (e.format(), e)).collect(); + let mut converters = BTreeMap::new(); + for (inp, d) in &decoders { + for (out, e) in &encoders { + if inp != out { + converters.insert((*inp, *out), PipelineConverter::new(d.clone(), e.clone())); + } + } + } + Self { + decoders, + encoders, + converters, + } + } + + pub fn converter(&self, input: Format, output: Format) -> Option<&dyn Converter> { + self.converters + .get(&(input, output)) + .map(|c| c as &dyn Converter) + } + + pub fn pipeline(&self, input: Format, output: Format) -> Option<&PipelineConverter> { + self.converters.get(&(input, output)) + } + + pub fn decoder(&self, format: Format) -> Option<&Arc> { + self.decoders.get(&format) + } + + pub fn encoder(&self, format: Format) -> Option<&Arc> { + self.encoders.get(&format) + } + + /// All registered `(input, output)` pairs. + pub fn pairs(&self) -> impl Iterator + '_ { + self.converters.keys().copied() + } + + pub fn len(&self) -> usize { + self.converters.len() + } + + pub fn is_empty(&self) -> bool { + self.converters.is_empty() + } + + pub fn can_read(&self, format: Format) -> bool { + self.decoders.contains_key(&format) + } + + /// Every output `input` can convert to (all registered outputs except its own format). + pub fn targets_for(&self, input: Format) -> Vec { + self.converters + .keys() + .filter(|(i, _)| *i == input) + .map(|&(i, o)| Capability { + output: o, + options: options_for(i, o), + notices: fixed_notices(o), + }) + .collect() + } + + /// Pair notices plus notices that depend on the particular source. + pub fn notices_for(&self, input: Format, output: Format, t: SourceTraits) -> Vec { + let mut n = fixed_notices(output); + if t.has_alpha && !output.supports_alpha() { + n.push(NoticeKind::TransparencyFlattened); + } + if t.multi_frame { + n.push(match input { + Format::Gif | Format::Webp => NoticeKind::FirstFrameOnly, + _ => NoticeKind::FirstImageOnly, + }); + } + if t.photographic && output == Format::Svg { + n.push(NoticeKind::StylizedTrace); + } + n + } +} + +/// Options that apply to a pair (data-model `Capability.options`). +pub fn options_for(input: Format, output: Format) -> Vec { + let mut o = Vec::new(); + if output.is_lossy_output() { + o.push(OptionKind::Quality); + } + if input == Format::Pdf { + o.push(OptionKind::PdfDpi); + } + if input == Format::Svg { + o.push(OptionKind::SvgScale); + } + if output == Format::Pdf { + o.push(OptionKind::PdfLayout); + } + o +} + +fn fixed_notices(output: Format) -> Vec { + if matches!(output, Format::Ico | Format::Svg) { + vec![NoticeKind::MetadataDropped] + } else { + Vec::new() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn options_per_pair() { + assert_eq!( + options_for(Format::Heic, Format::Jpeg), + vec![OptionKind::Quality] + ); + assert_eq!( + options_for(Format::Pdf, Format::Png), + vec![OptionKind::PdfDpi] + ); + assert_eq!( + options_for(Format::Svg, Format::Webp), + vec![OptionKind::Quality, OptionKind::SvgScale] + ); + assert_eq!( + options_for(Format::Png, Format::Pdf), + vec![OptionKind::PdfLayout] + ); + } + + #[test] + fn source_notices() { + let r = Registry::with(Vec::new(), Vec::new()); + let t = SourceTraits { + has_alpha: true, + multi_frame: true, + photographic: true, + }; + let n = r.notices_for(Format::Gif, Format::Jpeg, t); + assert!(n.contains(&NoticeKind::TransparencyFlattened)); + assert!(n.contains(&NoticeKind::FirstFrameOnly)); + let n = r.notices_for(Format::Jpeg, Format::Svg, t); + assert!(n.contains(&NoticeKind::StylizedTrace)); + assert!(n.contains(&NoticeKind::MetadataDropped)); + } +} diff --git a/crates/core/tests/common/mod.rs b/crates/core/tests/common/mod.rs new file mode 100644 index 0000000..8f6673e --- /dev/null +++ b/crates/core/tests/common/mod.rs @@ -0,0 +1,152 @@ +//! Shared helpers for integration tests (T029). +#![allow(dead_code, clippy::unwrap_used, clippy::expect_used)] + +use std::collections::BTreeMap; +use std::path::{Path, PathBuf}; + +use largsform_core::converter::{CancelToken, ConversionOptions, ConvertCtx}; +use largsform_core::error::ConversionError; +use largsform_core::format::{detect_format, Format}; +use largsform_core::job::{JobControl, JobItem, JobRunner, JobSpec}; +use largsform_core::output::{NameReservations, OutputFile}; +use largsform_core::registry::Registry; + +pub fn samples_dir() -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/fixtures/samples") +} + +pub fn sample(name: &str) -> PathBuf { + samples_dir().join(name) +} + +/// Sample paths grouped by detected (content) format. +pub fn fixtures() -> BTreeMap> { + let mut map: BTreeMap> = BTreeMap::new(); + let mut entries: Vec = std::fs::read_dir(samples_dir()) + .expect("samples dir") + .map(|e| e.expect("entry").path()) + .filter(|p| p.is_file()) + .collect(); + entries.sort(); + for p in entries { + if let Ok(f) = detect_format(&p) { + map.entry(f).or_default().push(p); + } + } + map +} + +/// Truncated (50% and 10 bytes) and bit-flipped copies of `path`, written to `dir`. +pub fn corrupt_variants(path: &Path, dir: &Path) -> Vec { + let bytes = std::fs::read(path).expect("read sample"); + let name = path + .file_name() + .expect("name") + .to_string_lossy() + .into_owned(); + let mut out = Vec::new(); + let mut write = |suffix: &str, data: &[u8]| { + let p = dir.join(format!("{suffix}-{name}")); + std::fs::write(&p, data).expect("write variant"); + out.push(p); + }; + write("half", &bytes[..bytes.len() / 2]); + write("ten", &bytes[..bytes.len().min(10)]); + // Flip bits past the header so detection still succeeds but the payload is damaged. + let mut flipped = bytes.clone(); + let start = (flipped.len() / 4).max(32).min(flipped.len()); + for i in (start..flipped.len()).step_by(7) { + flipped[i] ^= 0xA5; + } + write("flip", &flipped); + out +} + +/// Decodes an output through an independent path and returns its dimensions. +pub fn assert_valid_output(path: &Path, format: Format) -> (u32, u32) { + let bytes = std::fs::read(path).expect("read output"); + assert_eq!( + largsform_core::format::detect_bytes(&bytes), + Some(format), + "{} is not a {format:?}", + path.display() + ); + match format { + Format::Avif => { + let img = heifer::decode(&bytes).expect("valid AVIF"); + (img.width, img.height) + } + Format::Jpeg | Format::Png | Format::Webp | Format::Ico | Format::Gif | Format::Tiff => { + let img = image::load_from_memory(&bytes).expect("valid image"); + (img.width(), img.height()) + } + other => panic!("no independent validator for {other:?} yet"), + } +} + +/// Converts one file with the default registry into `out_dir`, committing the outputs. +pub fn convert( + src: &Path, + target: Format, + out_dir: &Path, +) -> Result, ConversionError> { + convert_with( + src, + target, + ConversionOptions { + output_dir: Some(out_dir.to_path_buf()), + ..Default::default() + }, + ) +} + +pub fn convert_with( + src: &Path, + target: Format, + opts: ConversionOptions, +) -> Result, ConversionError> { + let registry = Registry::new(); + let input = detect_format(src)?; + let converter = registry.converter(input, target).expect("pair registered"); + let mut ctx = ConvertCtx::new(CancelToken::new()); + let staged = converter.convert(src, &opts, &mut ctx)?; + let mut reserved = NameReservations::new(); + staged + .into_iter() + .map(|s| s.commit(&mut reserved, vec![1])) + .collect() +} + +/// Runs a whole job synchronously and returns the summary. +pub fn run_job( + items: Vec, + target: Format, + opts: ConversionOptions, +) -> largsform_core::job::JobSummary { + let items = items + .into_iter() + .enumerate() + .map(|(i, p)| JobItem { + source_id: i as u64 + 1, + format: detect_format(&p).expect("detect"), + path: p, + }) + .collect(); + let spec = JobSpec { + id: 1, + items, + target, + options: opts, + }; + let control = JobControl::new(&spec); + JobRunner::new(std::sync::Arc::new(Registry::new()), None).run(&spec, &control, |_| {}) +} + +pub fn files_in(dir: &Path) -> Vec { + let mut v: Vec = std::fs::read_dir(dir) + .expect("read_dir") + .map(|e| e.expect("entry").file_name().to_string_lossy().into_owned()) + .collect(); + v.sort(); + v +} diff --git a/crates/core/tests/conversions.rs b/crates/core/tests/conversions.rs new file mode 100644 index 0000000..9afbcd3 --- /dev/null +++ b/crates/core/tests/conversions.rs @@ -0,0 +1,86 @@ +//! T040: the generated conversion matrix. Every registered pair converts every sample of its +//! input format; outputs decode independently, keep display dimensions, and sources are untouched. +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +mod common; + +use common::{assert_valid_output, convert, fixtures}; +use largsform_core::format::inspect; +use largsform_core::registry::Registry; + +/// Display size of a sample (after EXIF orientation). +fn display_size(path: &std::path::Path) -> (u32, u32) { + let info = inspect(path).expect("inspect"); + let (w, h) = (info.width.expect("w"), info.height.expect("h")); + if path + .file_name() + .is_some_and(|n| n.to_string_lossy().starts_with("rotated-6")) + { + (h, w) + } else { + (w, h) + } +} + +#[test] +fn every_registered_pair_converts_every_sample() { + let registry = Registry::new(); + let samples = fixtures(); + let mut pairs_ok = 0; + let mut conversions = 0; + let pairs: Vec<_> = registry.pairs().collect(); + for &(input, output) in &pairs { + let Some(paths) = samples.get(&input) else { + panic!("no sample for registered input {input:?}"); + }; + for src in paths { + let before = std::fs::read(src).expect("read"); + let mtime = std::fs::metadata(src) + .and_then(|m| m.modified()) + .expect("mtime"); + let dir = tempfile::tempdir().expect("tempdir"); + let outputs = convert(src, output, dir.path()) + .unwrap_or_else(|e| panic!("{} → {output:?}: {e} ({:?})", src.display(), e.detail)); + assert!(!outputs.is_empty()); + for o in &outputs { + let size = assert_valid_output(&o.path, output); + if output != largsform_core::format::Format::Ico { + assert_eq!(size, display_size(src), "{} → {output:?}", src.display()); + } + } + assert_eq!(std::fs::read(src).expect("read"), before, "source modified"); + assert_eq!( + std::fs::metadata(src) + .and_then(|m| m.modified()) + .expect("mtime"), + mtime + ); + conversions += 1; + } + pairs_ok += 1; + } + println!( + "{pairs_ok}/{} pairs OK ({conversions} conversions)", + pairs.len() + ); + assert_eq!(pairs_ok, pairs.len()); +} + +#[test] +fn us1_registry_targets() { + use largsform_core::format::Format::*; + let r = Registry::new(); + let outs = |f| { + r.targets_for(f) + .into_iter() + .map(|c| c.output) + .collect::>() + }; + for f in [Jpeg, Png, Webp, Avif] { + assert!(outs(Tiff).contains(&f), "TIFF → {f:?}"); + } + assert!(!outs(Jpeg).contains(&Jpeg)); + for input in [Heic, Webp, Avif, Jpeg, Png, Tiff, Gif] { + assert!(r.can_read(input), "{input:?}"); + } +} diff --git a/crates/core/tests/corrupt.rs b/crates/core/tests/corrupt.rs new file mode 100644 index 0000000..ab89e91 --- /dev/null +++ b/crates/core/tests/corrupt.rs @@ -0,0 +1,72 @@ +//! T041: damaged inputs fail cleanly (Corrupt/Unsupported), never panic, and leave no files. +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +mod common; + +use std::panic::{catch_unwind, AssertUnwindSafe}; + +use common::{corrupt_variants, files_in, fixtures}; +use largsform_core::converter::{CancelToken, ConversionOptions, ConvertCtx}; +use largsform_core::error::ErrorKind; +use largsform_core::format::detect_format; +use largsform_core::registry::Registry; + +#[test] +fn corrupt_inputs_fail_cleanly() { + let registry = Registry::new(); + let scratch = tempfile::tempdir().expect("tempdir"); + let mut checked = 0; + for (format, paths) in fixtures() { + if !registry.can_read(format) { + continue; + } + for sample in paths { + for variant in corrupt_variants(&sample, scratch.path()) { + // A damaged header may change the detected format, or fail detection. + let Ok(detected) = detect_format(&variant) else { + continue; + }; + for cap in registry.targets_for(detected) { + let out = tempfile::tempdir().expect("tempdir"); + let opts = ConversionOptions { + output_dir: Some(out.path().to_path_buf()), + ..Default::default() + }; + let converter = registry.converter(detected, cap.output).expect("pair"); + let result = catch_unwind(AssertUnwindSafe(|| { + let mut ctx = ConvertCtx::new(CancelToken::new()); + converter + .convert(&variant, &opts, &mut ctx) + .map(|staged| staged.len()) + })); + let result = result.unwrap_or_else(|_| { + panic!("panic converting {} → {:?}", variant.display(), cap.output) + }); + // Bit flips in pixel data can still decode; truncation must not crash. + if let Err(e) = result { + assert!( + matches!( + e.kind, + ErrorKind::Corrupt | ErrorKind::Unsupported | ErrorKind::TooLarge + ), + "{} → {:?}: unexpected {:?} ({:?})", + variant.display(), + cap.output, + e.kind, + e.detail + ); + } + // Uncommitted staged outputs were dropped: nothing remains. + assert!( + files_in(out.path()).is_empty(), + "leftover files for {}", + variant.display() + ); + checked += 1; + } + } + } + } + println!("{checked} corrupt conversions checked"); + assert!(checked > 0); +} diff --git a/crates/core/tests/detect.rs b/crates/core/tests/detect.rs new file mode 100644 index 0000000..8edd345 --- /dev/null +++ b/crates/core/tests/detect.rs @@ -0,0 +1,121 @@ +//! T024: content-based format detection (FR-002, research R13). +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +use std::io::Write; + +use largsform_core::format::{detect_bytes, detect_format, Format}; + +fn ftyp(major: &[u8; 4], compat: &[&[u8; 4]]) -> Vec { + let size = 16 + 4 * compat.len(); + let mut v = (size as u32).to_be_bytes().to_vec(); + v.extend_from_slice(b"ftyp"); + v.extend_from_slice(major); + v.extend_from_slice(&[0, 0, 0, 0]); + for c in compat { + v.extend_from_slice(*c); + } + v.extend_from_slice(b"\0\0\0\x08meta"); + v +} + +#[test] +fn magic_bytes_for_every_format() { + let cases: Vec<(Vec, Format)> = vec![ + (vec![0xFF, 0xD8, 0xFF, 0xE0, 0, 0x10], Format::Jpeg), + (b"\x89PNG\r\n\x1a\n\0\0\0\rIHDR".to_vec(), Format::Png), + (b"GIF89a\x01\0\x01\0".to_vec(), Format::Gif), + (b"GIF87a\x01\0\x01\0".to_vec(), Format::Gif), + (b"II*\0\x08\0\0\0".to_vec(), Format::Tiff), + (b"MM\0*\0\0\0\x08".to_vec(), Format::Tiff), + (b"RIFF\x24\0\0\0WEBPVP8 ".to_vec(), Format::Webp), + (b"%PDF-1.7\n".to_vec(), Format::Pdf), + (ftyp(b"heic", &[b"mif1", b"heic"]), Format::Heic), + (ftyp(b"mif1", &[b"heic"]), Format::Heic), + (ftyp(b"heix", &[b"mif1"]), Format::Heic), + (ftyp(b"avif", &[b"mif1", b"miaf"]), Format::Avif), + (ftyp(b"mif1", &[b"avif"]), Format::Avif), + ( + b"".to_vec(), + Format::Svg, + ), + ]; + for (bytes, want) in cases { + assert_eq!( + detect_bytes(&bytes), + Some(want), + "{:?}", + String::from_utf8_lossy(&bytes) + ); + } +} + +#[test] +fn svg_variants() { + let ok: &[&[u8]] = &[ + b"\xEF\xBB\xBF", + b"\n", + b"\n\n ", + b"", + ]; + for b in ok { + assert_eq!( + detect_bytes(b), + Some(Format::Svg), + "{}", + String::from_utf8_lossy(b) + ); + } + let not_svg: &[&[u8]] = &[ + b"", + b"", + b"", + ]; + for b in not_svg { + assert_eq!(detect_bytes(b), None, "{}", String::from_utf8_lossy(b)); + } +} + +#[test] +fn unsupported_inputs() { + for b in [ + &b""[..], + b"\xFF\xD8", + b"abc", + b"RIFF\0\0\0\0WAVE", + &[0u8; 64][..], + ] { + assert_eq!(detect_bytes(b), None); + } + let mut rng = 0x1234_5678u32; + let random: Vec = (0..4096) + .map(|_| { + rng ^= rng << 13; + rng ^= rng >> 17; + rng ^= rng << 5; + (rng & 0xFF) as u8 + }) + .collect(); + assert_eq!(detect_bytes(&random), None); +} + +#[test] +fn extension_is_ignored() { + let dir = tempfile::tempdir().expect("tempdir"); + let png_named_jpg = dir.path().join("png-named.jpg"); + std::fs::File::create(&png_named_jpg) + .and_then(|mut f| f.write_all(b"\x89PNG\r\n\x1a\n\0\0\0\rIHDR")) + .expect("write"); + assert_eq!(detect_format(&png_named_jpg).expect("detect"), Format::Png); + + let empty = dir.path().join("empty.png"); + std::fs::write(&empty, b"").expect("write"); + let err = detect_format(&empty).expect_err("empty file"); + assert_eq!(err.kind, largsform_core::error::ErrorKind::Unsupported); + assert!(err.message.contains("empty.png")); + + let missing = dir.path().join("missing.png"); + assert_eq!( + detect_format(&missing).expect_err("missing").kind, + largsform_core::error::ErrorKind::SourceMissing + ); +} diff --git a/crates/core/tests/fixtures/SOURCES.md b/crates/core/tests/fixtures/SOURCES.md new file mode 100644 index 0000000..c18547b --- /dev/null +++ b/crates/core/tests/fixtures/SOURCES.md @@ -0,0 +1,41 @@ +# Test fixture provenance + +Every file in `samples/` is **synthetic** and generated by +[`examples/make_fixtures.rs`](../../examples/make_fixtures.rs). No third-party images, photos or +color profiles are included. License: CC0 1.0 (public domain dedication). + +Regenerate with: + +```sh +cargo run --release -p largsform-core --example make_fixtures +``` + +| File | Content | +|------|---------| +| `photo.jpg` | 800×600 gradient with a red marker in the top-left corner | +| `gps.jpg` | `photo.jpg` + EXIF: Make, Model, Software, DateTimeOriginal, ExposureTime, GPS (14°35'24" N, 120°58'42" E) | +| `rotated-6.jpg` | `photo.jpg` stored rotated 90° CCW with EXIF Orientation = 6 (displays as 800×600) | +| `alpha.png` | 256×256 RGBA logo, fully transparent corners | +| `logo-flat.png` | 128×128 flat-color logo | +| `logo-512.png` | 512×512 square logo | +| `wide.png` | 640×200 non-square gradient | +| `png16.png` | 320×200 16-bit RGB | +| `png-named.jpg` | PNG content with a `.jpg` name (detection by content) | +| `photo.webp` | 640×480 lossy WebP | +| `alpha.webp` | lossless WebP with alpha | +| `animated.webp` | 3-frame animated WebP | +| `photo.avif`, `alpha.avif` | AVIF (ravif) without/with alpha | +| `iphone.heic` | 480×360 8-bit HEIC with GPS EXIF | +| `iphone-10bit-p3.heic` | 1024×640 10-bit grid-coded HEIC with a generated Display P3 ICC (v2 matrix/TRC) | +| `android.heif` | 400×300 8-bit HEIF without metadata | +| `photo.tiff` | 400×300 RGB TIFF | +| `multipage.tiff` | 2-page RGB TIFF | +| `static.gif`, `animated.gif` | single-frame and 4-frame GIF | +| `icon.svg`, `no-size.svg`, `remote-href.svg` | hand-written SVG (the last references `http:` and `file:` images that must not be fetched) | + +Not yet included: + +- PDFs (`1-page.pdf`, `5-pages.pdf`, `protected.pdf`): added with the PDF converters (US3). +- `burst.heic` (multiple top-level images): `heifer`'s high-level encoder writes one image per + file. Track for a later fixture built with the low-level writer. +- Real-device HEIC files: add CC0 samples from real iPhone/Samsung devices before release (R5). diff --git a/crates/core/tests/fixtures/samples/alpha.avif b/crates/core/tests/fixtures/samples/alpha.avif new file mode 100644 index 0000000..d88a67b Binary files /dev/null and b/crates/core/tests/fixtures/samples/alpha.avif differ diff --git a/crates/core/tests/fixtures/samples/alpha.png b/crates/core/tests/fixtures/samples/alpha.png new file mode 100644 index 0000000..60e2955 Binary files /dev/null and b/crates/core/tests/fixtures/samples/alpha.png differ diff --git a/crates/core/tests/fixtures/samples/alpha.webp b/crates/core/tests/fixtures/samples/alpha.webp new file mode 100644 index 0000000..87869fe Binary files /dev/null and b/crates/core/tests/fixtures/samples/alpha.webp differ diff --git a/crates/core/tests/fixtures/samples/android.heif b/crates/core/tests/fixtures/samples/android.heif new file mode 100644 index 0000000..9bc27b6 Binary files /dev/null and b/crates/core/tests/fixtures/samples/android.heif differ diff --git a/crates/core/tests/fixtures/samples/animated.gif b/crates/core/tests/fixtures/samples/animated.gif new file mode 100644 index 0000000..bc919bd Binary files /dev/null and b/crates/core/tests/fixtures/samples/animated.gif differ diff --git a/crates/core/tests/fixtures/samples/animated.webp b/crates/core/tests/fixtures/samples/animated.webp new file mode 100644 index 0000000..5ea7030 Binary files /dev/null and b/crates/core/tests/fixtures/samples/animated.webp differ diff --git a/crates/core/tests/fixtures/samples/gps.jpg b/crates/core/tests/fixtures/samples/gps.jpg new file mode 100644 index 0000000..406c352 Binary files /dev/null and b/crates/core/tests/fixtures/samples/gps.jpg differ diff --git a/crates/core/tests/fixtures/samples/icon.svg b/crates/core/tests/fixtures/samples/icon.svg new file mode 100644 index 0000000..9d2431d --- /dev/null +++ b/crates/core/tests/fixtures/samples/icon.svg @@ -0,0 +1,5 @@ + + + + L + diff --git a/crates/core/tests/fixtures/samples/iphone-10bit-p3.heic b/crates/core/tests/fixtures/samples/iphone-10bit-p3.heic new file mode 100644 index 0000000..07bee98 Binary files /dev/null and b/crates/core/tests/fixtures/samples/iphone-10bit-p3.heic differ diff --git a/crates/core/tests/fixtures/samples/iphone.heic b/crates/core/tests/fixtures/samples/iphone.heic new file mode 100644 index 0000000..b0ff39c Binary files /dev/null and b/crates/core/tests/fixtures/samples/iphone.heic differ diff --git a/crates/core/tests/fixtures/samples/logo-512.png b/crates/core/tests/fixtures/samples/logo-512.png new file mode 100644 index 0000000..ada34e0 Binary files /dev/null and b/crates/core/tests/fixtures/samples/logo-512.png differ diff --git a/crates/core/tests/fixtures/samples/logo-flat.png b/crates/core/tests/fixtures/samples/logo-flat.png new file mode 100644 index 0000000..58f0e81 Binary files /dev/null and b/crates/core/tests/fixtures/samples/logo-flat.png differ diff --git a/crates/core/tests/fixtures/samples/multipage.tiff b/crates/core/tests/fixtures/samples/multipage.tiff new file mode 100644 index 0000000..2bee634 Binary files /dev/null and b/crates/core/tests/fixtures/samples/multipage.tiff differ diff --git a/crates/core/tests/fixtures/samples/no-size.svg b/crates/core/tests/fixtures/samples/no-size.svg new file mode 100644 index 0000000..a279ef5 --- /dev/null +++ b/crates/core/tests/fixtures/samples/no-size.svg @@ -0,0 +1,4 @@ + + + + diff --git a/crates/core/tests/fixtures/samples/photo.avif b/crates/core/tests/fixtures/samples/photo.avif new file mode 100644 index 0000000..41c929c Binary files /dev/null and b/crates/core/tests/fixtures/samples/photo.avif differ diff --git a/crates/core/tests/fixtures/samples/photo.jpg b/crates/core/tests/fixtures/samples/photo.jpg new file mode 100644 index 0000000..df21484 Binary files /dev/null and b/crates/core/tests/fixtures/samples/photo.jpg differ diff --git a/crates/core/tests/fixtures/samples/photo.tiff b/crates/core/tests/fixtures/samples/photo.tiff new file mode 100644 index 0000000..ddaf11d Binary files /dev/null and b/crates/core/tests/fixtures/samples/photo.tiff differ diff --git a/crates/core/tests/fixtures/samples/photo.webp b/crates/core/tests/fixtures/samples/photo.webp new file mode 100644 index 0000000..32da3f0 Binary files /dev/null and b/crates/core/tests/fixtures/samples/photo.webp differ diff --git a/crates/core/tests/fixtures/samples/png-named.jpg b/crates/core/tests/fixtures/samples/png-named.jpg new file mode 100644 index 0000000..33cc178 Binary files /dev/null and b/crates/core/tests/fixtures/samples/png-named.jpg differ diff --git a/crates/core/tests/fixtures/samples/png16.png b/crates/core/tests/fixtures/samples/png16.png new file mode 100644 index 0000000..a327a77 Binary files /dev/null and b/crates/core/tests/fixtures/samples/png16.png differ diff --git a/crates/core/tests/fixtures/samples/remote-href.svg b/crates/core/tests/fixtures/samples/remote-href.svg new file mode 100644 index 0000000..cd7fbb6 --- /dev/null +++ b/crates/core/tests/fixtures/samples/remote-href.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/crates/core/tests/fixtures/samples/rotated-6.jpg b/crates/core/tests/fixtures/samples/rotated-6.jpg new file mode 100644 index 0000000..fa1ee14 Binary files /dev/null and b/crates/core/tests/fixtures/samples/rotated-6.jpg differ diff --git a/crates/core/tests/fixtures/samples/static.gif b/crates/core/tests/fixtures/samples/static.gif new file mode 100644 index 0000000..13693c2 Binary files /dev/null and b/crates/core/tests/fixtures/samples/static.gif differ diff --git a/crates/core/tests/fixtures/samples/wide.png b/crates/core/tests/fixtures/samples/wide.png new file mode 100644 index 0000000..e43e19a Binary files /dev/null and b/crates/core/tests/fixtures/samples/wide.png differ diff --git a/crates/core/tests/metadata.rs b/crates/core/tests/metadata.rs new file mode 100644 index 0000000..0769085 --- /dev/null +++ b/crates/core/tests/metadata.rs @@ -0,0 +1,174 @@ +//! T026: EXIF orientation patcher. End-to-end metadata checks are added with the encoders (T042). +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +use largsform_core::metadata::{read_orientation, reset_orientation, MetadataBundle}; + +/// EXIF with IFD0 = [Make, Model, Orientation, ExifIFD pointer] and an Exif IFD with one tag. +fn exif(le: bool, orientation: u16) -> Vec { + let p16 = |v: u16| if le { v.to_le_bytes() } else { v.to_be_bytes() }; + let p32 = |v: u32| if le { v.to_le_bytes() } else { v.to_be_bytes() }; + let mut v = Vec::new(); + v.extend_from_slice(if le { b"II*\0" } else { b"MM\0*" }); + v.extend_from_slice(&p32(8)); + v.extend_from_slice(&p16(4)); + let entry = |v: &mut Vec, tag: u16, ty: u16, count: u32, value: [u8; 4]| { + v.extend_from_slice(&p16(tag)); + v.extend_from_slice(&p16(ty)); + v.extend_from_slice(&p32(count)); + v.extend_from_slice(&value); + }; + entry(&mut v, 0x010F, 2, 4, *b"Cam\0"); + entry(&mut v, 0x0110, 2, 4, *b"X10\0"); + let o = p16(orientation); + entry(&mut v, 0x0112, 3, 1, [o[0], o[1], 0, 0]); + let exif_ifd = 8 + 2 + 4 * 12 + 4; + entry(&mut v, 0x8769, 4, 1, p32(exif_ifd as u32)); + v.extend_from_slice(&p32(0)); + v.extend_from_slice(&p16(1)); + entry(&mut v, 0x9003, 2, 4, *b"2026"); + v.extend_from_slice(&p32(0)); + v +} + +#[test] +fn every_orientation_reset_in_both_byte_orders() { + for le in [true, false] { + for o in 1..=8u16 { + let mut e = exif(le, o); + let before = e.clone(); + assert_eq!(read_orientation(&e), Some(o)); + assert_eq!(reset_orientation(&mut e), Ok(true)); + assert_eq!(read_orientation(&e), Some(1)); + let changed: Vec = (0..e.len()).filter(|&i| e[i] != before[i]).collect(); + // Orientation is the 3rd IFD0 entry: value bytes at 10 + 2*12 + 8. + assert!(changed.iter().all(|&i| i == 42 || i == 43), "{changed:?}"); + } + } +} + +#[test] +fn absent_tag_returns_false() { + let mut e = exif(true, 6); + e[10 + 24] = 0x13; // rename the orientation tag to 0x0113 + assert_eq!(reset_orientation(&mut e), Ok(false)); +} + +#[test] +fn truncated_and_garbage_never_panic() { + let full = exif(false, 8); + for len in 0..full.len() { + let mut e = full[..len].to_vec(); + let _ = reset_orientation(&mut e); + let _ = read_orientation(&e); + } + let mut g = vec![0x5A; 128]; + assert!(reset_orientation(&mut g).is_err()); + // Huge IFD count pointing past the end. + let mut huge = b"II*\0\x08\0\0\0\xFF\xFF".to_vec(); + let _ = reset_orientation(&mut huge); +} + +#[test] +fn bundle_normalizes_container_prefixes() { + let tiff = exif(true, 3); + let mut prefixed = b"Exif\0\0".to_vec(); + prefixed.extend_from_slice(&tiff); + let mut b = MetadataBundle::default(); + b.set_exif_from_container(&prefixed); + assert_eq!(b.exif.as_deref(), Some(tiff.as_slice())); + b.set_exif_from_container(b"not exif at all"); + assert!(b.exif.is_none()); +} + +// --------------------------------------------------------------------------------------------- +// T042: end-to-end metadata checks +// --------------------------------------------------------------------------------------------- + +mod common; + +use common::{convert, sample}; +use largsform_core::format::Format; +use largsform_core::metadata::{read_exif, read_icc}; + +/// Finds an ASCII tag value or GPS IFD presence in a TIFF blob by byte search (good enough for +/// the synthetic fixtures, whose strings are unique). +fn contains(hay: &[u8], needle: &[u8]) -> bool { + hay.windows(needle.len()).any(|w| w == needle) +} + +fn has_gps_ifd(tiff: &[u8]) -> bool { + // GPSInfo pointer tag 0x8825, little-endian. + contains(tiff, &[0x25, 0x88, 0x04, 0x00]) +} + +#[test] +fn gps_jpg_keeps_camera_date_and_gps() { + for target in [Format::Png, Format::Webp, Format::Avif] { + let dir = tempfile::tempdir().expect("tempdir"); + let out = convert(&sample("gps.jpg"), target, dir.path()).expect("convert"); + let bytes = std::fs::read(&out[0].path).expect("read"); + let exif = match target { + Format::Avif => heifer::read_metadata(&bytes) + .expect("meta") + .exif + .expect("avif exif"), + _ => read_exif(&bytes, target).expect("exif present"), + }; + let exif = exif + [largsform_core::metadata::tiff_header_offset(&exif).expect("tiff header")..] + .to_vec(); + assert!(contains(&exif, b"Largsform Test Camera"), "{target:?} Make"); + assert!(contains(&exif, b"LTC-1"), "{target:?} Model"); + assert!( + contains(&exif, b"2026:06:01 09:30:00"), + "{target:?} DateTimeOriginal" + ); + assert!(has_gps_ifd(&exif), "{target:?} GPS"); + assert_eq!(read_orientation(&exif), Some(1), "{target:?} orientation"); + } +} + +#[test] +fn rotated_jpg_is_rotated_and_tag_reset() { + let dir = tempfile::tempdir().expect("tempdir"); + let out = convert(&sample("rotated-6.jpg"), Format::Png, dir.path()).expect("convert"); + let img = image::open(&out[0].path).expect("decode"); + assert_eq!((img.width(), img.height()), (800, 600)); + // The red marker must end up top-left after rotation. + let p = img.to_rgb8().get_pixel(10, 10).0; + assert!(p[0] > 180 && p[1] < 80 && p[2] < 80, "{p:?}"); + let bytes = std::fs::read(&out[0].path).expect("read"); + let exif = read_exif(&bytes, Format::Png).expect("exif"); + assert_eq!(read_orientation(&exif), Some(1)); +} + +#[test] +fn heic_p3_to_png_keeps_icc() { + let dir = tempfile::tempdir().expect("tempdir"); + let src = std::fs::read(sample("iphone-10bit-p3.heic")).expect("read"); + let icc = heifer::read_metadata(&src) + .expect("meta") + .icc_profile + .expect("source icc"); + let out = convert(&sample("iphone-10bit-p3.heic"), Format::Png, dir.path()).expect("convert"); + let bytes = std::fs::read(&out[0].path).expect("read"); + assert_eq!( + read_icc(&bytes, Format::Png).as_deref(), + Some(icc.as_slice()) + ); + // 10-bit source keeps 16 bits per channel in PNG. + let img = image::open(&out[0].path).expect("decode"); + assert_eq!(img.color(), image::ColorType::Rgb16); +} + +#[test] +fn alpha_png_to_jpg_is_white_where_transparent() { + let dir = tempfile::tempdir().expect("tempdir"); + let out = convert(&sample("alpha.png"), Format::Jpeg, dir.path()).expect("convert"); + let img = image::open(&out[0].path).expect("decode").to_rgb8(); + let p = img.get_pixel(1, 1).0; + assert!( + p.iter().all(|&c| c > 245), + "corner should be white, got {p:?}" + ); +} diff --git a/crates/core/tests/naming.rs b/crates/core/tests/naming.rs new file mode 100644 index 0000000..3454677 --- /dev/null +++ b/crates/core/tests/naming.rs @@ -0,0 +1,86 @@ +//! T025: output naming and collision handling (FR-018). +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +use largsform_core::format::Format; +use largsform_core::output::{NameReservations, StagedOutput}; + +fn stage(dir: &std::path::Path, stem: &str, page: Option, f: Format) -> StagedOutput { + let mut s = StagedOutput::create(dir, stem, page, f, None).expect("create"); + s.write_all(stem.as_bytes()).expect("write"); + s +} + +#[test] +fn collision_sequence() { + let dir = tempfile::tempdir().expect("tempdir"); + std::fs::write(dir.path().join("x.jpg"), b"existing").expect("seed"); + let mut r = NameReservations::new(); + let a = stage(dir.path(), "x", None, Format::Jpeg) + .commit(&mut r, vec![1]) + .expect("commit"); + let b = stage(dir.path(), "x", None, Format::Jpeg) + .commit(&mut r, vec![2]) + .expect("commit"); + assert_eq!( + a.path.file_name().and_then(|n| n.to_str()), + Some("x (1).jpg") + ); + assert_eq!( + b.path.file_name().and_then(|n| n.to_str()), + Some("x (2).jpg") + ); + assert_eq!( + std::fs::read(dir.path().join("x.jpg")).expect("read"), + b"existing" + ); +} + +#[test] +fn batch_reservations_for_same_stem() { + // a.heic and a.webp both → JPG in one batch. + let dir = tempfile::tempdir().expect("tempdir"); + let mut r = NameReservations::new(); + let first = stage(dir.path(), "a", None, Format::Jpeg) + .commit(&mut r, vec![1]) + .expect("commit"); + let second = stage(dir.path(), "a", None, Format::Jpeg) + .commit(&mut r, vec![2]) + .expect("commit"); + assert!(first.path.ends_with("a.jpg")); + assert!(second.path.ends_with("a (1).jpg")); + assert_eq!(std::fs::read(&first.path).expect("read"), b"a"); +} + +#[test] +fn page_naming() { + let dir = tempfile::tempdir().expect("tempdir"); + let mut r = NameReservations::new(); + for p in 1..=3 { + let out = stage(dir.path(), "doc", Some(p), Format::Png) + .commit(&mut r, vec![1]) + .expect("commit"); + assert_eq!(out.page, Some(p)); + assert!(out.path.ends_with(format!("doc-page-{p}.png"))); + } +} + +#[cfg(unix)] +#[test] +fn committed_files_have_regular_permissions() { + use std::os::unix::fs::PermissionsExt; + let dir = tempfile::tempdir().expect("tempdir"); + let s = stage(dir.path(), "p", None, Format::Png); + let staging_mode = std::fs::metadata(s.staging_path().expect("path")) + .expect("meta") + .permissions() + .mode(); + assert_eq!(staging_mode & 0o077, 0, "staging file must be owner-only"); + let out = s + .commit(&mut NameReservations::new(), vec![1]) + .expect("commit"); + let mode = std::fs::metadata(&out.path) + .expect("meta") + .permissions() + .mode(); + assert_eq!(mode & 0o777, 0o644); +} diff --git a/crates/core/tests/output_safety.rs b/crates/core/tests/output_safety.rs new file mode 100644 index 0000000..6e2411e --- /dev/null +++ b/crates/core/tests/output_safety.rs @@ -0,0 +1,111 @@ +//! T025: staging files, crash cleanup journal, and source safety (Constitution I v1.0.1, IV). +#![allow(clippy::unwrap_used, clippy::expect_used)] // test code + +use std::path::Path; + +use largsform_core::format::Format; +use largsform_core::output::{NameReservations, StagedOutput, StagingJournal, STAGING_PREFIX}; + +fn files_in(dir: &Path) -> Vec { + let mut v: Vec = std::fs::read_dir(dir) + .expect("read_dir") + .filter_map(|e| e.ok()?.file_name().into_string().ok()) + .collect(); + v.sort(); + v +} + +#[test] +fn dropped_staged_output_leaves_nothing() { + let dir = tempfile::tempdir().expect("tempdir"); + let data = tempfile::tempdir().expect("tempdir"); + let journal = StagingJournal::open(data.path().join("staging-journal.txt")).expect("journal"); + { + let mut s = StagedOutput::create(dir.path(), "a", None, Format::Png, Some(journal.clone())) + .expect("create"); + s.write_all(b"partial").expect("write"); + let name = s + .staging_path() + .and_then(|p| p.file_name()) + .and_then(|n| n.to_str()) + .map(str::to_owned); + assert!(name.is_some_and(|n| n.starts_with(STAGING_PREFIX))); + assert_eq!(journal.entries().expect("entries").len(), 1); + } + assert!(files_in(dir.path()).is_empty()); + assert!(journal.entries().expect("entries").is_empty()); +} + +#[test] +fn commit_removes_journal_entry_and_keeps_existing_files() { + let dir = tempfile::tempdir().expect("tempdir"); + let data = tempfile::tempdir().expect("tempdir"); + let journal = StagingJournal::open(data.path().join("j.txt")).expect("journal"); + let existing = dir.path().join("a.png"); + std::fs::write(&existing, b"original").expect("seed"); + let mtime = std::fs::metadata(&existing) + .and_then(|m| m.modified()) + .expect("mtime"); + + let mut s = StagedOutput::create(dir.path(), "a", None, Format::Png, Some(journal.clone())) + .expect("create"); + s.write_all(b"new").expect("write"); + let out = s + .commit(&mut NameReservations::new(), vec![7]) + .expect("commit"); + + assert!(out.path.ends_with("a (1).png")); + assert_eq!(out.source_ids, vec![7]); + assert_eq!(std::fs::read(&existing).expect("read"), b"original"); + assert_eq!( + std::fs::metadata(&existing) + .and_then(|m| m.modified()) + .expect("mtime"), + mtime + ); + assert!(journal.entries().expect("entries").is_empty()); + assert_eq!(files_in(dir.path()), vec!["a (1).png", "a.png"]); +} + +#[test] +fn journal_cleans_up_after_simulated_crash() { + let dir = tempfile::tempdir().expect("tempdir"); + let data = tempfile::tempdir().expect("tempdir"); + let journal_path = data.path().join("staging-journal.txt"); + let journal = StagingJournal::open(&journal_path).expect("journal"); + + // Simulate a crash: the staging file exists and is journaled, but Drop never runs. + let mut s = StagedOutput::create(dir.path(), "a", None, Format::Jpeg, Some(journal.clone())) + .expect("create"); + s.write_all(b"half").expect("write"); + std::mem::forget(s); + // A user file that must never be deleted, even if it somehow ends up in the journal. + let user_file = dir.path().join("holiday.jpg"); + std::fs::write(&user_file, b"keep me").expect("seed"); + std::fs::OpenOptions::new() + .append(true) + .open(&journal_path) + .and_then(|mut f| { + std::io::Write::write_all(&mut f, format!("{}\n", user_file.display()).as_bytes()) + }) + .expect("append"); + + // Next launch. + let reopened = StagingJournal::open(&journal_path).expect("journal"); + assert_eq!(reopened.cleanup_all().expect("cleanup"), 1); + assert_eq!(files_in(dir.path()), vec!["holiday.jpg"]); + assert!(reopened.entries().expect("entries").is_empty()); +} + +#[test] +fn unwritable_folder_is_reported() { + let missing = std::env::temp_dir() + .join("largsform-does-not-exist") + .join("nested"); + let err = StagedOutput::create(&missing, "a", None, Format::Png, None).expect_err("must fail"); + assert_eq!( + err.kind, + largsform_core::error::ErrorKind::OutputNotWritable + ); + assert!(err.message.contains("nested")); +} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..d29398c --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,32 @@ +import js from "@eslint/js"; +import ts from "typescript-eslint"; +import svelte from "eslint-plugin-svelte"; +import globals from "globals"; + +export default ts.config( + { + ignores: [ + "node_modules/", + "dist/", + "build/", + "coverage/", + "target/", + "src-tauri/", + "crates/", + "specs/", + ".specify/", + ".claude/", + "*.min.js", + ], + }, + js.configs.recommended, + ...ts.configs.recommended, + ...svelte.configs.recommended, + { + languageOptions: { globals: { ...globals.browser, ...globals.node } }, + }, + { + files: ["**/*.svelte", "**/*.svelte.ts"], + languageOptions: { parserOptions: { parser: ts.parser } }, + }, +); diff --git a/index.html b/index.html new file mode 100644 index 0000000..e2e4cff --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Largsform + + +
+ + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..b744da7 --- /dev/null +++ b/package.json @@ -0,0 +1,46 @@ +{ + "name": "largsform", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "tauri": "tauri", + "check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings", + "lint": "eslint . && prettier --check .", + "format": "prettier --write .", + "test": "vitest run", + "e2e": "wdio run e2e/wdio.conf.ts" + }, + "dependencies": { + "@tauri-apps/api": "^2.13.0", + "@tauri-apps/plugin-dialog": "^2.9.0", + "@tauri-apps/plugin-opener": "^2.7.3" + }, + "devDependencies": { + "@eslint/js": "^10.0.1", + "@sveltejs/vite-plugin-svelte": "^7.3.2", + "@tauri-apps/cli": "^2.13.0", + "@testing-library/jest-dom": "^8.0.0", + "@testing-library/svelte": "^5.4.2", + "@testing-library/user-event": "^14.6.13", + "@tsconfig/svelte": "^5.0.9", + "@types/node": "^22.20.7", + "axe-core": "^4.14.1", + "eslint": "^10.16.0", + "eslint-plugin-svelte": "^3.24.1", + "globals": "^17.15.0", + "jsdom": "^31.0.1", + "prettier": "^3.10.1", + "prettier-plugin-svelte": "^4.2.0", + "svelte": "^5.59.2", + "svelte-check": "^4.7.9", + "typescript": "~6.0.3", + "typescript-eslint": "^8.74.0", + "vite": "^8.4.0", + "vitest": "^5.1.2", + "vitest-axe": "^0.1.0" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 0000000..1afa202 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,2819 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + '@tauri-apps/api': + specifier: ^2.13.0 + version: 2.13.0 + '@tauri-apps/plugin-dialog': + specifier: ^2.9.0 + version: 2.9.0 + '@tauri-apps/plugin-opener': + specifier: ^2.7.3 + version: 2.7.3 + devDependencies: + '@eslint/js': + specifier: ^10.0.1 + version: 10.0.1(eslint@10.16.0) + '@sveltejs/vite-plugin-svelte': + specifier: ^7.3.2 + version: 7.3.2(svelte@5.59.2(@typescript-eslint/types@8.74.0))(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + '@tauri-apps/cli': + specifier: ^2.13.0 + version: 2.13.0 + '@testing-library/jest-dom': + specifier: ^8.0.0 + version: 8.0.0(@testing-library/dom@10.4.2)(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))) + '@testing-library/svelte': + specifier: ^5.4.2 + version: 5.4.2(svelte@5.59.2(@typescript-eslint/types@8.74.0))(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))) + '@testing-library/user-event': + specifier: ^14.6.13 + version: 14.6.13(@testing-library/dom@10.4.2) + '@tsconfig/svelte': + specifier: ^5.0.9 + version: 5.0.9 + '@types/node': + specifier: ^22.20.7 + version: 22.20.7 + axe-core: + specifier: ^4.14.1 + version: 4.14.1 + eslint: + specifier: ^10.16.0 + version: 10.16.0 + eslint-plugin-svelte: + specifier: ^3.24.1 + version: 3.24.1(eslint@10.16.0)(svelte@5.59.2(@typescript-eslint/types@8.74.0)) + globals: + specifier: ^17.15.0 + version: 17.15.0 + jsdom: + specifier: ^31.0.1 + version: 31.0.1 + prettier: + specifier: ^3.10.1 + version: 3.10.1 + prettier-plugin-svelte: + specifier: ^4.2.0 + version: 4.2.0(prettier@3.10.1)(svelte@5.59.2(@typescript-eslint/types@8.74.0)) + svelte: + specifier: ^5.59.2 + version: 5.59.2(@typescript-eslint/types@8.74.0) + svelte-check: + specifier: ^4.7.9 + version: 4.7.9(picomatch@4.0.7)(svelte@5.59.2(@typescript-eslint/types@8.74.0))(typescript@6.0.3) + typescript: + specifier: ~6.0.3 + version: 6.0.3 + typescript-eslint: + specifier: ^8.74.0 + version: 8.74.0(eslint@10.16.0)(typescript@6.0.3) + vite: + specifier: ^8.4.0 + version: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + vitest: + specifier: ^5.1.2 + version: 5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + vitest-axe: + specifier: ^0.1.0 + version: 0.1.0(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))) + +packages: + + '@adobe/css-tools@4.5.0': + resolution: {integrity: sha512-6OzddxPio9UiWTCemp4N8cYLV2ZN1ncRnV1cVGtve7dhPOtRkleRyx32GQCYSwDYgaHU3USMm84tNsvKzRCa1Q==} + + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/runtime@7.29.16': + resolution: {integrity: sha512-LKBjGopxrQE0aFucNL69OyyyF143MOWUULEOftU3oCgyD35Sy84UUpVnt/sNvTb7ZmCyALSt7om+fojlW35zYQ==} + engines: {node: '>=6.9.0'} + + '@cacheable/memory@2.2.0': + resolution: {integrity: sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==} + + '@cacheable/utils@2.5.0': + resolution: {integrity: sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==} + + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.23.7': + resolution: {integrity: sha512-Ix1tmZjA7/OmE7ROAfORe83hVnqlDzLpZVHFjHQt5mvLm1U03qMexpaxKqFIL362QV32SoPaZqmKQr3tdqFY2w==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/config-helpers@0.7.0': + resolution: {integrity: sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true + + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/plugin-kit@0.7.3': + resolution: {integrity: sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@exodus/bytes@1.16.0': + resolution: {integrity: sha512-IcpW84uEn3N7ETtNZMlxKhfl6Pec8rUNGOTBtWbK1FKhJxIFAptZyVrvVRVBimAJxJCgc3PxepxkdWWG4DVzfA==} + engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} + peerDependencies: + '@noble/hashes': ^1.8.0 || ^2.0.0 + peerDependenciesMeta: + '@noble/hashes': + optional: true + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@isaacs/nonrecursive-glob-match@1.1.0': + resolution: {integrity: sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.3': + resolution: {integrity: sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@keyv/bigmap@1.3.1': + resolution: {integrity: sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==} + engines: {node: '>= 18'} + peerDependencies: + keyv: ^5.6.0 + + '@keyv/serialize@1.1.1': + resolution: {integrity: sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==} + + '@oxc-project/types@0.160.0': + resolution: {integrity: sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA==} + + '@rolldown/binding-android-arm-eabi@1.3.4': + resolution: {integrity: sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.3.4': + resolution: {integrity: sha512-5lifIO+b/prcM9sx/bkPN4w6UEToEfQ3gjhx0+0neuL+dkYskI792CfAq03T51jc8JFcaYXs2hi3l8RjiH/VWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.3.4': + resolution: {integrity: sha512-RCgxTI4AJQxhVF//BI3ImQOsXTHrF4Eg+f99jBy8WoETA2kSEGFxpnrVmW0leQq/2aBR4R5AC6csmy3rc66e3Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.3.4': + resolution: {integrity: sha512-zNPJVVPUaDEj+L0lImoK3rFv2b+Z5gNijI6DWu/fcD3/1TfmRXKb9ZyxbSN+2AhlctqjbNzUvCsMa+EBhnEM4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.3.4': + resolution: {integrity: sha512-upP6g7ZIRy5by1RDQ/EphHIdJ5xK0eUD7sUgfZFWJ49s4XdbYsIvIlAPtrFpayR70Hhf9J22lb4Pm8/9FhrZmg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + resolution: {integrity: sha512-SAX5C5+poMLCxu8dkPF6h5yst40rkzs+9Y3cbPn2OFSydmHjAEprrGi64zGgnYyPIVZfdGUFqJ2fJbfbnHI+mA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + resolution: {integrity: sha512-nwHqdlRZS6GWBef3dG5/pMY6RNTBBUjj7s0Da+m6xsFpe7jx6IC46SLZcCu8f46JOfCovZmwnrz51EzGE+7Fyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.3.4': + resolution: {integrity: sha512-Gr78X2ur/AgLCkmZgHffk/FerIX8S5zb/eII4bCcvJo0ANzeXhTShahdNbpnY6bpiszIAgIfiuKS9ziziWsamw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + resolution: {integrity: sha512-o9Wcn8nWrsQasaBRYM4d//FwhlBsTJYWkPVlhlt6FwzpwEoovY4IopRZjk5Fq3+ntRuSDORJjF/nA8sFeF2q6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + resolution: {integrity: sha512-UDWu4jkVcx2kiBKm3Ec//4lVCbeTWj8gmJ9SyLWCdLWtTlyq7fQVeVV/14nXvRtSLErvJ2+yA/Ux5taS31Y17Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.3.4': + resolution: {integrity: sha512-W9mGtTa0w4fWh8RLMNPyaEhhcuqUfO07Q4I1bBc4PDMNg7gQSw0yPQNQ3D0qwbkXwxbyL4YrIzc8n6k1vuFExQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.3.4': + resolution: {integrity: sha512-8B+ofyQZ7/aCmkqnyMonPr5zKLqMVNczhRGFNtdIuItiwNn8iQWJawMq2E58r7bxD1XEbtRRsULY/eCWwZQ01Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.3.4': + resolution: {integrity: sha512-TlD0FSZaC7o2B4NCe9V5N11ugTnhzTM9ksj4sgRLvrKosDzjEkvlsTX3ehkw4ZlPv8AADimZZTvJGEa16pfXug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.3.4': + resolution: {integrity: sha512-jwO8P3o53ygo7b5061B7BeaJ1BGv3BKZ6jroFdw/01qWry7Z+qNBlDvulzbTle5s/A0Fc1FRgsTxrke9DvsSbA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + resolution: {integrity: sha512-8adGMrNtrdzi2WD1ozhYapER59gD8Q/DV6SCKJlyG2HqULPdeQUBvMa33lTsiEYwIqTZUaIU2MmvPp5f1wbtXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.3.4': + resolution: {integrity: sha512-rIMjtESdXJCIoOiUTroQ1Y1rjVDZkuUVRUxs3APX2vNv175D7TDWvzdELiIhzGq9cUNUFat+co+PTmPHPqSREg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.1.1': + resolution: {integrity: sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==} + + '@sveltejs/acorn-typescript@1.0.13': + resolution: {integrity: sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==} + peerDependencies: + acorn: ^8.9.0 + + '@sveltejs/load-config@0.2.3': + resolution: {integrity: sha512-VT3qmUb8pRV2QrZjd8iAmtg8lf4W0TIjZbvXtz5MKei/q96teWZgGJyyidJzOjzZzvdq616eSRVeMYIQChUTAQ==} + engines: {node: '>= 18.0.0'} + + '@sveltejs/vite-plugin-svelte@7.3.2': + resolution: {integrity: sha512-86J4nBLeTqYYIx/paBIRqYJMFYlpTS2sepUdQ6tUyU1jxqRV72ejOrIV2wsqlOsKlkM+h0G1SgwoHI30N+n9CA==} + engines: {node: ^20.19 || ^22.12 || >=24} + peerDependencies: + svelte: ^5.46.4 + vite: ^8.0.0-beta.7 || ^8.0.0 + + '@tauri-apps/api@2.13.0': + resolution: {integrity: sha512-O0uLpOZcFxbHMtkSv8sE6WNTuoUu4pOHtKQn0R6GPAFNJaOgaFa+LrR3emw1jRWA9ebVC8PZUS3Q2p881yFNrA==} + + '@tauri-apps/cli-darwin-arm64@2.13.0': + resolution: {integrity: sha512-xqWG7E1j6HEcU0ZMXIxNP5MqtR3LKfvb+6iH5bvG6e3QgpaEP1Syz/j1fnX7M55Raqi6Rs4FJGTHlsG8C65Mtg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + + '@tauri-apps/cli-darwin-x64@2.13.0': + resolution: {integrity: sha512-L4WEEqEc7WH3KFCnbpSUnlPud5Qs/CQ+i1USaOvhwTy3PO3JpeW1sTKB7WKUG9QeGke7tE1KL8liVd8/3lpqgg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + + '@tauri-apps/cli-linux-arm-gnueabihf@2.13.0': + resolution: {integrity: sha512-SRjozN64oQgs1I8ErMsNqTKmlSSyAQ9yVM7X+0FUkZQ0isqx42qOzJ02HkKhoEG/+ucZ15HjsL+LEe0ooFjxVg==} + engines: {node: '>= 10'} + cpu: [arm] + os: [linux] + + '@tauri-apps/cli-linux-arm64-gnu@2.13.0': + resolution: {integrity: sha512-ZZWiHcyrtLCCoUdfOBVWazKwDtc/c09BXrxziXcL2lUSnUBOWpzd9ROo0EzNDGDJEFB8S4cQHx+wRG6GL2MyFA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@tauri-apps/cli-linux-arm64-musl@2.13.0': + resolution: {integrity: sha512-0W9GgBF155WPbcVnYJHxDxVXDM/gYSywGKfGZIQrMMLv03AqeMcc+mxz4/NZBT5FO36jHPxhy8VNiy0yk+qfzQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@tauri-apps/cli-linux-riscv64-gnu@2.13.0': + resolution: {integrity: sha512-1kKCOh768IIoqgE4o7g5zhi5SnbzqW8p82RmPcg8zFYLb17+LNwvMzpJexUWqIM2U2QkbT8rH0wfcjiaR6rTDA==} + engines: {node: '>= 10'} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@tauri-apps/cli-linux-x64-gnu@2.13.0': + resolution: {integrity: sha512-Riq+64bPGAFoLjgnqcslFIb0Rijnm5oCjLCX6xZETWClNPMADmHflCyNwLO7XO3s97Uv6ZX2yTnpwULAyII08A==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@tauri-apps/cli-linux-x64-musl@2.13.0': + resolution: {integrity: sha512-xbkW27qp9+YrU1pLebEJy300jH9NtUWEAMpMsCYS3KiZ00jv9ui3p26YWINhTgo+Yj53CDTK9B7ROViCKAluqQ==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + libc: [musl] + + '@tauri-apps/cli-win32-arm64-msvc@2.13.0': + resolution: {integrity: sha512-gjjU8TYHXPenmQvmdvJYwGX1KNHBG/3dXviJvBuX2S1hV4uOFMulTVWnPKPn3N/HgfCn0p5+7HzPKKobdNAfSg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + + '@tauri-apps/cli-win32-ia32-msvc@2.13.0': + resolution: {integrity: sha512-9Ln67dSuuIaVJAhdvOnJOtD9gQxeHCvhQ6OcbkxaM0EZu1Ed1ZqxImpyVBov6c7AJfzpollO93i7ZXJGsnYMtQ==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + + '@tauri-apps/cli-win32-x64-msvc@2.13.0': + resolution: {integrity: sha512-IPcIRMjzAXgYTH+rQxFQFwrHu4/3txIA2ONNmQpWUCHXQgukazrPYJrKaMJSjDh83ysbusjsQ16Z89qhtxFNJA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + + '@tauri-apps/cli@2.13.0': + resolution: {integrity: sha512-NhPUU24BnPfofhfPlPCJFPHVG9sVq7B4V9zGCRXFEhXFeNnLtjwnHSDoiR3IXoJUumsKd/q6sNLsMr/rr88GBQ==} + engines: {node: '>= 10'} + hasBin: true + + '@tauri-apps/plugin-dialog@2.9.0': + resolution: {integrity: sha512-2IMHbcnBGurmEEe88uPd3/okUZdL9RgAkQem7N1lNWDnegsnQufHyeu79sIm+A20GeN34jZlxj5KEckAQIWk6w==} + + '@tauri-apps/plugin-opener@2.7.3': + resolution: {integrity: sha512-Nm+v7vLBCDzYZxrmCJhpMgtPsPsKt5myMs7SMU/aBjPOmAFI1RrHfhMz7t5KlxjMOzRcelyNq1/j0pmC9SmBVA==} + + '@testing-library/dom@10.4.2': + resolution: {integrity: sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==} + engines: {node: '>=18'} + + '@testing-library/jest-dom@8.0.0': + resolution: {integrity: sha512-Nu45KEeFgP/ydCMipnisMblq6YHViqEFi3fKN0a40s+zdKDDD7vEPCEavS0i7i4RxmclcEIL8q2o42pu+WgNgg==} + engines: {node: '>=22', npm: '>=6', yarn: '>=1'} + peerDependencies: + '@testing-library/dom': '>=10 <11' + vitest: '>=5 <6' + peerDependenciesMeta: + vitest: + optional: true + + '@testing-library/svelte-core@1.1.3': + resolution: {integrity: sha512-KkMAvXeWorxN2Yn0kdC1lfoAItxpoj4uOWzxK5leDrNxonLvS5nwBFvztrroyTszQ0Wf/EU6iLT8JhY5qcn22g==} + engines: {node: '>=16'} + peerDependencies: + svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 + + '@testing-library/svelte@5.4.2': + resolution: {integrity: sha512-4o31E4HGo5BU5KwPkulNRocEden+7Tt9JYm9uhln5ajF7DULeyFA46BBWVfKJ8Ms9B3JmOFPTIiVamH7n3KpuQ==} + engines: {node: '>= 10'} + peerDependencies: + svelte: ^3 || ^4 || ^5 || ^5.0.0-next.0 + vite: '*' + vitest: '*' + peerDependenciesMeta: + vite: + optional: true + vitest: + optional: true + + '@testing-library/user-event@14.6.13': + resolution: {integrity: sha512-2LVZGptuB5un1Cu/u31o9adkCwbsUTMp4B4p04xupI7uobvTIpgKidSdShqZiReo/mQmvR9xjgdgTgge4oAbYA==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@testing-library/dom': '>=7.21.4' + + '@tsconfig/svelte@5.0.9': + resolution: {integrity: sha512-gbtbqsEFq9gFzGmgJMIB3+leXVmkUttoFjzeHsbqN6qFKst40fvxnN9+3Ajdl8VlIGwPevs9LNJ8YUhQgchqaw==} + + '@types/aria-query@5.0.4': + resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + + '@types/estree@1.0.11': + resolution: {integrity: sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@types/node@22.20.7': + resolution: {integrity: sha512-F/Mcc4pD3YwXQCG50hb8BjB5RmrOere6hge7n2XHf0V8tpkZOVEjwYv9Ql7n0MpMn8Bv7+q12P9w6UHsBm0Sfw==} + + '@typescript-eslint/eslint-plugin@8.74.0': + resolution: {integrity: sha512-z3KXk1+Vm+d82ZRplOoC89ho4Rf1da5ju6sx8//92GnN532U62DGPjECXkkVqtYzIv0zoJlpO39SX2Z9tk6LVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.74.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/parser@8.74.0': + resolution: {integrity: sha512-ecr8AYdig7avVkxaHdQvxHnIJ/mOyliO4Gv/uWF8q69vBew/z3sexqBwHUZX5Vql+Ns0w4sH6gBLkICGbOvJkA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/project-service@8.74.0': + resolution: {integrity: sha512-z/mymuE+JlEeSFIv3Mo70EvgG1Zz74Hl0IDfExfXutARAP834bt+MppTD7mVAwmZO0GdxdOAi0jbTam749eH6g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/scope-manager@8.74.0': + resolution: {integrity: sha512-kpOdpu4CpWN5U38ox3f727DwWRBtUAVhyUJtqTBYe5gf2wYoxac7PgKP14txrxN7ICVtcjlLdzjqfRgpSnDKvQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.74.0': + resolution: {integrity: sha512-p07wAuaS6BjCYgOSXKJi4YhvTnAf7fiG37e9THcpnYaQEt2QiTTYZWKwUFNgeRiywiMudazhzgddAirZ0GgHtQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/type-utils@8.74.0': + resolution: {integrity: sha512-CV3Y3la8l3F9ANfxcfpgSSiQgJTe4IeLEoZV4O/gcW86Ugp8X6SKiQ0vm+QegXaRIbbDMokZZSF3A1CgiU/kPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/types@8.74.0': + resolution: {integrity: sha512-MpnMrJCVNpP1iVL8NiHkQZgQqIMBH5ewDGUPBh1pqQXwFtMFjsl1M03QcYPXmv6stCKEiF0PN7CGbU1ZbXFzEA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.74.0': + resolution: {integrity: sha512-wL348k6l92DNG+kPP5rVpKwNBoz7a3xRZy3TPKc1uymQttd7u7gcMv3eENmcuh4CjC4mO3FTM0DYstFXMyDLuw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript/native': npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev + typescript: '>=4.8.4 <6.1.0' + peerDependenciesMeta: + '@typescript/native': + optional: true + + '@typescript-eslint/utils@8.74.0': + resolution: {integrity: sha512-IpWXPxXXomzxyTcvjhZJexgdvtTR1TooLAPpuxzaGqQ8BHll1lf4Ysp/BTE/l0U5TJ+x1j7B4bEM8pLRrvY+XA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + '@typescript-eslint/visitor-keys@8.74.0': + resolution: {integrity: sha512-XSZmOtMUbWCBIM+2BK134FyMFxmll1mW2mPLk/PSwYQYzGIPMgJAqL929U4qXVizLv7Xq5b7r41/o7Ombuwk0g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/mocker@5.1.2': + resolution: {integrity: sha512-UGc97wUIy0Ji2+9GxzHEJiOhiwkaukgE7VYcUNnjpX3sWnwQ8XogmNXX4WyOukxYgKb8Nh2XFa7KId0ZjpmVhQ==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.1.2': + resolution: {integrity: sha512-PQl0/3+p9GaY71+MHywN6oyHfLhVDD5kcbm7oNRldA2F0ExMU3S8RQdnpteJ9gFAdK5P6KCgE6LqCpUgy57KzA==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-styles@5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + + aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + + aria-query@5.3.1: + resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} + engines: {node: '>= 0.4'} + + aria-query@5.3.2: + resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} + engines: {node: '>= 0.4'} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + axe-core@4.14.1: + resolution: {integrity: sha512-FHfa+lmNjQZfJz1q8wKqIDwC6DExcHt/pkjNQb09a3NPjCKg2rhu5qb2S4r76ASyFNNtuFooJpZe37OgudVGtQ==} + engines: {node: '>=4'} + + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + bcp-47-match@2.0.3: + resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} + + bcp-47@2.1.2: + resolution: {integrity: sha512-wsv86UuNFuPnVieKLyECTT+CP1WSAHeoIg5P3xu2kA9Z+7fVPoKt7dxzSeEhtJel0AI+NW3fIW3KtTKQKUCngg==} + + brace-expansion@5.1.2: + resolution: {integrity: sha512-ELhY3JEerIBbhgW+rh0/8glkZAaMqn1x3BAvp3yTULSEGozMK/5PT6WTdBgsdvJqwwmv7MAQNOydfYbvK1Vgfw==} + engines: {node: 20 || >=22} + + cacheable@2.5.0: + resolution: {integrity: sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + cross-spawn@7.1.2: + resolution: {integrity: sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==} + engines: {node: '>= 8'} + + css.escape@1.5.1: + resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + + data-urls@8.0.0: + resolution: {integrity: sha512-JQUCCK+/CAGbGGx618PlFZMXH81Jtj7t73CHv9dd/zVWvxgGT2zLFRjnKb+Ng46GIwcy+f7f88qd4duqllK+WQ==} + engines: {node: ^22.14.0 || >=24.0.0} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + decimal.js@10.6.0: + resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + devalue@6.0.4: + resolution: {integrity: sha512-8L3d5HaKt6/wnWKRtwmJu7qrLM6YiGb6mxktIFfgjQzQzIAR5vAZdHioZv/252Pp4SN/xu47oxe7RlwoZzWTTA==} + engines: {node: '>=18'} + + dom-accessibility-api@0.5.16: + resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} + + dom-accessibility-api@0.6.3: + resolution: {integrity: sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w==} + + entities@9.0.0: + resolution: {integrity: sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==} + engines: {node: '>=20.19.0'} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-plugin-svelte@3.24.1: + resolution: {integrity: sha512-XYzp318u8UkDH4ZdRkdSomOYnwMTeJP2Zw9u6DuBj3mViFZD8zS+mhfTYq34plm3SH9eF7ZaiYJfQYq2xMhPHg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.1 || ^9.0.0 || ^10.0.0 + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + svelte: + optional: true + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@10.16.0: + resolution: {integrity: sha512-Xu3PRLG/wCaZWZ20gkExUcNqL2mWWsXTR+Lln3Sof4Y9WuA678fH9hrlQ8B6UNwbTnsKdDdBYOd2jxtycXVTGQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + esm-env@1.2.2: + resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrap@2.4.2: + resolution: {integrity: sha512-WpVZsWnSheHBy+fGrO/0duwnbe6ODZH1QyBbjupreSCJGojaBWRncrq+HVeIJ8eHQjEwSJg9hC4yPJyNVOrpqg==} + peerDependencies: + '@typescript-eslint/types': ^8.2.0 + peerDependenciesMeta: + '@typescript-eslint/types': + optional: true + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + esutils@2.0.3: + resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} + engines: {node: '>=0.10.0'} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + file-entry-cache@11.1.5: + resolution: {integrity: sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@6.1.23: + resolution: {integrity: sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==} + + flatted@3.5.1: + resolution: {integrity: sha512-qzp88St5qssOkS6hnWEvsFqE6SGoQtamMc6ghNo2s2idGn3rvHl/mdmLKQr5egZeVcqHfVCXtPoY+DP0flzPTg==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@16.5.0: + resolution: {integrity: sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==} + engines: {node: '>=18'} + + globals@17.15.0: + resolution: {integrity: sha512-OyBOdPnzu9B2lFpums9/4wcyNHx4haAxY2X5PgO9LqCvXJgKYMMr/1y4TU7om/vTy4eYqRsVes1ZTJEJYKap8Q==} + engines: {node: '>=18'} + + hashery@1.5.1: + resolution: {integrity: sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==} + engines: {node: '>=20'} + + hookified@1.15.1: + resolution: {integrity: sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==} + + hookified@2.2.0: + resolution: {integrity: sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==} + + html-encoding-sniffer@7.0.0: + resolution: {integrity: sha512-UikN5yr7xsCDAq87Or5or0PAlD3HJJOKVzM05az588WnpDJ4Ux7a2A53Qi6gofGg2/EtvF/H4hCi/TXfCW4Y6w==} + engines: {node: ^22.13.0 || >=24.0.0} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.17: + resolution: {integrity: sha512-0c3zcBRlWmcKhcIQWckzkYncJRv5HHB8O32wO/FcWL8DDXWDJgiEF6SX9ThbTv5h/eZ+xJK+VvDjjQ+cQJhp3Q==} + engines: {node: '>= 4'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + indent-string@4.0.0: + resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} + engines: {node: '>=8'} + + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + is-potential-custom-element-name@1.0.1: + resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} + + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + + jsdom@31.0.1: + resolution: {integrity: sha512-CbhJL8ZQg3eKswxSZth4QO9tW0jPIhmR0vtSXQSbKSfWbwIT6hoRc17wdHIVTQ43KI0mdV5iTJr3281IDgVZ5g==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + peerDependencies: + '@napi-rs/canvas': ^1.0.13 + peerDependenciesMeta: + '@napi-rs/canvas': + optional: true + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@5.6.0: + resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} + + known-css-properties@0.37.0: + resolution: {integrity: sha512-JCDrsP4Z1Sb9JwG0aJ8Eo2r7k4Ou5MwmThS/6lcIe1ICyb7UBJKGRIUUdqc2ASdE/42lgz6zFUnzAIhtXnBVrQ==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash-es@4.18.1: + resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} + + lru-cache@11.5.4: + resolution: {integrity: sha512-B8nJCTi8JuSaDBg0tBdnImV6j5O2CXaqKfdj24ZTCFbyivN8KZ2Z+RL3aHjwJAfLutD9cNnObG4SIgW4gMufiw==} + engines: {node: 20 || >=22} + + lz-string@1.5.0: + resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} + hasBin: true + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + + minimatch@11.0.10: + resolution: {integrity: sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==} + engines: {node: 20 || >=22} + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + napi-windows-process-start-time@0.1.0: + resolution: {integrity: sha512-zHxhzKsIFu3elch3eFw69WEUGc79DFhbc3nD/WEOzWL/pFFLZRW13EHnuO0c+0YjncE5uCaS9ICHxOBXkb6vPw==} + engines: {node: '>=20'} + cpu: [x64, arm64] + os: [win32] + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parse5-parser-stream@8.1.1: + resolution: {integrity: sha512-hMcVbbUJcQmP8rURWUdYrT1flRiBiBVjq/RYGguJpDUgIXSqdYKlE0CxthmdMWoSlBAuL5bUBa73g0pttSy7Hw==} + + parse5@8.1.1: + resolution: {integrity: sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + postcss-load-config@3.1.4: + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + + postcss-safe-parser@7.1.0: + resolution: {integrity: sha512-1WzZxRLaAFwEh6Do+zyGpjWV3nGJNxxhuh7Ubu/q1ICImMgZJnLwhoaEpRbG4pJppp2Y1ncL9ffA2f+LhrefQg==} + engines: {node: '>=18.0'} + peerDependencies: + postcss: ^8.4.31 + + postcss-scss@4.0.9: + resolution: {integrity: sha512-AjKOeiwAitL/MXxQW2DliT28EKukvvbEWx3LBmJIRN8KfBGZbRTxNYW0kSqi1COiTZ57nZ9NW06S6ux//N1c9A==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.4.29 + + postcss-selector-parser@7.2.1: + resolution: {integrity: sha512-GwxlMgTTXwIom+ebC7an3k6RaJDwklRQQnfiXsLPGicu8FYV/k/+1/9YY2OU2+r938H2t4X0TDxoif+HP2rjzQ==} + engines: {node: '>=4'} + + postcss@8.5.34: + resolution: {integrity: sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==} + engines: {node: ^10 || ^12 || >=14} + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + prettier-plugin-svelte@4.2.0: + resolution: {integrity: sha512-VgUFSR6+7/KLloVSIgKMwY/9OFxaixY/xsOBUCP95ZKaxSa6JBtLKzq6L1L/Tw6Jc1C7K+op7D1Yu5qD+YdPHA==} + engines: {node: '>=20'} + peerDependencies: + prettier: ^3.0.0 + svelte: ^5.0.0 + + prettier@3.10.1: + resolution: {integrity: sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==} + engines: {node: '>=14'} + hasBin: true + + pretty-format@27.5.1: + resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + qified@0.10.1: + resolution: {integrity: sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==} + engines: {node: '>=20'} + + react-is@17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + + rolldown@1.3.4: + resolution: {integrity: sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + + saxes@6.0.0: + resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} + engines: {node: '>=v12.22.7'} + + semver@7.8.6: + resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + source-map-js@1.3.0: + resolution: {integrity: sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==} + engines: {node: '>=6.0.0'} + + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + + svelte-check@4.7.9: + resolution: {integrity: sha512-hr1mKIZOdY9JSBt1KC7GoWMJbZr6x95wzdFxMOObACSf+Z8tBEr6dp+xpPuAQm3/YwTXQULUVMKDyyWqR7aPBw==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + svelte: ^4.0.0 || ^5.0.0 + typescript: ^5.0.0 || ^6.0.0 + + svelte-eslint-parser@1.13.0: + resolution: {integrity: sha512-ddSCCAsa+47Z4zp72x8gN2t/efBS5YJo4rbXvg6hqjIwGMyXCtShqILKF6WWXHtuPk2sHj8wWIJYie1eRb/5og==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0, pnpm: 12.23.0} + peerDependencies: + svelte: ^3.37.0 || ^4.0.0 || ^5.0.0 + peerDependenciesMeta: + svelte: + optional: true + + svelte@5.59.2: + resolution: {integrity: sha512-XsSgJYzoRJ1GfD5IOJorwRy77eIEv8I1p+3wDQGkDIEbVd8BFXCy4PTQ8diPtuazRRHq6IWidBg2m3rDrqNtcA==} + engines: {node: '>=18'} + + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.4.0: + resolution: {integrity: sha512-PV6lIcJQh57aFeJDwx16JNHmgFRh5xguzallrDW1qe8nAghYgr5MKz2K5k7wEyV/ygZhdnIAP8+HZSarHPBCsg==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tldts-core@7.6.4: + resolution: {integrity: sha512-QywQ9lgQyZMuc3NVlqmuxHOhlwirSdvgD/vDLvX8dZYcYgy1cdri5rY/TXDHcF4J3VBSdJLcJNIJI6zGJ7jE+w==} + + tldts@7.6.4: + resolution: {integrity: sha512-wp+ZdvQyov404xynNcjbXoJyeGM28W/aCwMmry/rJ+Y0SsObukJYkWwuxWGbNpIjeqMaEbNUtXPNtPPfI5cTFA==} + hasBin: true + + tough-cookie@6.1.0: + resolution: {integrity: sha512-FTxc8u8Kl2tz0Lat1u8ksvcy8bwHRyEMawwTWybo51JqaC6O7SvfuhAKg+Ld6VqyIe2QRJBzY9HA7y2WyFRT2w==} + engines: {node: '>=16'} + + tr46@7.0.0: + resolution: {integrity: sha512-BcDSDW+SIGWVOns1Zm6Yg91q9AEj7eaID0QDY9oIqJD1A8dscNwMcl9Sms2DeuWCNov1X0/oXanHGYQBSLwZsg==} + engines: {node: ^22.14.0 || >=24.0.0} + + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.74.0: + resolution: {integrity: sha512-OsWQlsedt1ZpZXfZZMNK3m4SoQONFFcy4h/uRznsCeRfVuEic3gh4KGUs2pJJ5o0Jj0Jr7keUHQGN1Ns9aDw7Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + undici-types@6.21.0: + resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + + undici@8.14.0: + resolution: {integrity: sha512-MqM6wqORYo0jb1WFUwFKZTFWFz6VeBMPj9op5Hq+RvlrQjISQCyLEfx5+/iqOLWC/LL1HliJ5t0NP1BgYpXeVQ==} + engines: {node: '>=22.19.0'} + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + vite@8.4.0: + resolution: {integrity: sha512-X2nUJg+9cutlz3hzqyO6p+WTwk9H257DjwAEf9EQYUFrQbDItmetadi9gYmb+l7VDy4r3VXLUnmLTwuPmzejDw==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.1.4: + resolution: {integrity: sha512-qbEIDswfXH3x3IYRMScl/bf1AVW0dn7Z8qkr7g7nohkusfuC7tcFa7t5EoTOz60AunosLM9sDrDjHxsX+Up+CQ==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + vite: + optional: true + + vitest-axe@0.1.0: + resolution: {integrity: sha512-jvtXxeQPg8R/2ANTY8QicA5pvvdRP4F0FsVUAHANJ46YCDASie/cuhlSzu0DGcLmZvGBSBNsNuK3HqfaeknyvA==} + peerDependencies: + vitest: '>=0.16.0' + + vitest@5.1.2: + resolution: {integrity: sha512-VIa2wXV208WraXUbzH+dQUrGcFpPuaiRA8HlhXS8R6/sy9cynw6OMqGj8fmAlH1hot7huTCtWUE14+FdXU3eLw==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.1.2 + '@vitest/browser-preview': 5.1.2 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.1.2 + '@vitest/coverage-v8': 5.1.2 + '@vitest/ui': 5.1.2 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + w3c-xmlserializer@6.0.0: + resolution: {integrity: sha512-4Nsy8K5Tr6SPDH9jhKJOHf7ChDrc1zufZTVSF7x72hwuEXBqxqk9G6cK+K2NRUtB3iELRJqjXb4JPDMBjMTl2Q==} + engines: {node: ^22.22.2 || ^24.15.0 || >=26.0.0} + + webidl-conversions@8.0.1: + resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} + engines: {node: '>=20'} + + whatwg-mimetype@5.0.0: + resolution: {integrity: sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw==} + engines: {node: '>=20'} + + whatwg-url@17.3.0: + resolution: {integrity: sha512-KwOAJrpf+GTgBvcBQJcP38sMF0DsQKdwtG+TxM2pW44P6E5k0hDbWrDmyuJDIF0Uef0aQq0ZoJs+5oI+k8ddhg==} + engines: {node: ^22.14.0 || >=24.0.0} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + xml-name-validator@5.0.0: + resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} + engines: {node: '>=18'} + + xmlchars@2.2.0: + resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + + yaml@1.10.3: + resolution: {integrity: sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==} + engines: {node: '>= 6'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + + zimmerframe@1.1.5: + resolution: {integrity: sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==} + +snapshots: + + '@adobe/css-tools@4.5.0': {} + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/runtime@7.29.16': {} + + '@cacheable/memory@2.2.0': + dependencies: + '@cacheable/utils': 2.5.0 + '@keyv/bigmap': 1.3.1(keyv@5.6.0) + hookified: 1.15.1 + keyv: 5.6.0 + + '@cacheable/utils@2.5.0': + dependencies: + hashery: 1.5.1 + keyv: 5.6.0 + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true + + '@esbuild/linux-ia32@0.28.2': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.28.2': + optional: true + + '@esbuild/linux-ppc64@0.28.2': + optional: true + + '@esbuild/linux-riscv64@0.28.2': + optional: true + + '@esbuild/linux-s390x@0.28.2': + optional: true + + '@esbuild/linux-x64@0.28.2': + optional: true + + '@esbuild/netbsd-arm64@0.28.2': + optional: true + + '@esbuild/netbsd-x64@0.28.2': + optional: true + + '@esbuild/openbsd-arm64@0.28.2': + optional: true + + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + + '@esbuild/sunos-x64@0.28.2': + optional: true + + '@esbuild/win32-arm64@0.28.2': + optional: true + + '@esbuild/win32-ia32@0.28.2': + optional: true + + '@esbuild/win32-x64@0.28.2': + optional: true + + '@eslint-community/eslint-utils@4.10.1(eslint@10.16.0)': + dependencies: + eslint: 10.16.0 + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.23.7': + dependencies: + '@eslint/object-schema': 3.0.5 + debug: 4.4.3 + minimatch: 11.0.10 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.7.0': + dependencies: + '@eslint/core': 1.2.1 + + '@eslint/core@1.2.1': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/js@10.0.1(eslint@10.16.0)': + optionalDependencies: + eslint: 10.16.0 + + '@eslint/object-schema@3.0.5': {} + + '@eslint/plugin-kit@0.7.3': + dependencies: + '@eslint/core': 1.2.1 + levn: 0.4.1 + + '@exodus/bytes@1.16.0': {} + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@isaacs/nonrecursive-glob-match@1.1.0': {} + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.3': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.3 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@keyv/bigmap@1.3.1(keyv@5.6.0)': + dependencies: + hashery: 1.5.1 + hookified: 1.15.1 + keyv: 5.6.0 + + '@keyv/serialize@1.1.1': {} + + '@oxc-project/types@0.160.0': {} + + '@rolldown/binding-android-arm-eabi@1.3.4': + optional: true + + '@rolldown/binding-android-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-x64@1.3.4': + optional: true + + '@rolldown/binding-freebsd-x64@1.3.4': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.3.4': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-musl@1.3.4': + optional: true + + '@rolldown/binding-openharmony-arm64@1.3.4': + optional: true + + '@rolldown/binding-wasm32-wasi@1.3.4': + dependencies: + '@oxc-project/types': 0.160.0 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.3.4': + optional: true + + '@rolldown/pluginutils@1.1.1': {} + + '@sveltejs/acorn-typescript@1.0.13(acorn@8.19.0)': + dependencies: + acorn: 8.19.0 + + '@sveltejs/load-config@0.2.3': {} + + '@sveltejs/vite-plugin-svelte@7.3.2(svelte@5.59.2(@typescript-eslint/types@8.74.0))(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))': + dependencies: + deepmerge: 4.3.1 + obug: 3.0.0 + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + vite: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + vitefu: 1.1.4(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + + '@tauri-apps/api@2.13.0': {} + + '@tauri-apps/cli-darwin-arm64@2.13.0': + optional: true + + '@tauri-apps/cli-darwin-x64@2.13.0': + optional: true + + '@tauri-apps/cli-linux-arm-gnueabihf@2.13.0': + optional: true + + '@tauri-apps/cli-linux-arm64-gnu@2.13.0': + optional: true + + '@tauri-apps/cli-linux-arm64-musl@2.13.0': + optional: true + + '@tauri-apps/cli-linux-riscv64-gnu@2.13.0': + optional: true + + '@tauri-apps/cli-linux-x64-gnu@2.13.0': + optional: true + + '@tauri-apps/cli-linux-x64-musl@2.13.0': + optional: true + + '@tauri-apps/cli-win32-arm64-msvc@2.13.0': + optional: true + + '@tauri-apps/cli-win32-ia32-msvc@2.13.0': + optional: true + + '@tauri-apps/cli-win32-x64-msvc@2.13.0': + optional: true + + '@tauri-apps/cli@2.13.0': + optionalDependencies: + '@tauri-apps/cli-darwin-arm64': 2.13.0 + '@tauri-apps/cli-darwin-x64': 2.13.0 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.13.0 + '@tauri-apps/cli-linux-arm64-gnu': 2.13.0 + '@tauri-apps/cli-linux-arm64-musl': 2.13.0 + '@tauri-apps/cli-linux-riscv64-gnu': 2.13.0 + '@tauri-apps/cli-linux-x64-gnu': 2.13.0 + '@tauri-apps/cli-linux-x64-musl': 2.13.0 + '@tauri-apps/cli-win32-arm64-msvc': 2.13.0 + '@tauri-apps/cli-win32-ia32-msvc': 2.13.0 + '@tauri-apps/cli-win32-x64-msvc': 2.13.0 + + '@tauri-apps/plugin-dialog@2.9.0': + dependencies: + '@tauri-apps/api': 2.13.0 + + '@tauri-apps/plugin-opener@2.7.3': + dependencies: + '@tauri-apps/api': 2.13.0 + + '@testing-library/dom@10.4.2': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/runtime': 7.29.16 + '@types/aria-query': 5.0.4 + aria-query: 5.3.0 + dom-accessibility-api: 0.5.16 + lz-string: 1.5.0 + picocolors: 1.1.1 + pretty-format: 27.5.1 + + '@testing-library/jest-dom@8.0.0(@testing-library/dom@10.4.2)(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)))': + dependencies: + '@adobe/css-tools': 4.5.0 + '@testing-library/dom': 10.4.2 + aria-query: 5.3.2 + css.escape: 1.5.1 + dom-accessibility-api: 0.6.3 + picocolors: 1.1.1 + redent: 3.0.0 + optionalDependencies: + vitest: 5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + + '@testing-library/svelte-core@1.1.3(svelte@5.59.2(@typescript-eslint/types@8.74.0))': + dependencies: + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + + '@testing-library/svelte@5.4.2(svelte@5.59.2(@typescript-eslint/types@8.74.0))(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)))': + dependencies: + '@testing-library/dom': 10.4.2 + '@testing-library/svelte-core': 1.1.3(svelte@5.59.2(@typescript-eslint/types@8.74.0)) + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + optionalDependencies: + vite: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + vitest: 5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + + '@testing-library/user-event@14.6.13(@testing-library/dom@10.4.2)': + dependencies: + '@testing-library/dom': 10.4.2 + + '@tsconfig/svelte@5.0.9': {} + + '@types/aria-query@5.0.4': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/esrecurse@4.3.1': {} + + '@types/estree@1.0.11': {} + + '@types/json-schema@7.0.15': {} + + '@types/node@22.20.7': + dependencies: + undici-types: 6.21.0 + + '@typescript-eslint/eslint-plugin@8.74.0(@typescript-eslint/parser@8.74.0(eslint@10.16.0)(typescript@6.0.3))(eslint@10.16.0)(typescript@6.0.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.74.0 + '@typescript-eslint/type-utils': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + '@typescript-eslint/utils': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.74.0 + eslint: 10.16.0 + ignore: 7.0.17 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - '@typescript/native' + - supports-color + + '@typescript-eslint/parser@8.74.0(eslint@10.16.0)(typescript@6.0.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.74.0 + '@typescript-eslint/types': 8.74.0 + '@typescript-eslint/typescript-estree': 8.74.0(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.74.0 + debug: 4.4.3 + eslint: 10.16.0 + typescript: 6.0.3 + transitivePeerDependencies: + - '@typescript/native' + - supports-color + + '@typescript-eslint/project-service@8.74.0(typescript@6.0.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.74.0(typescript@6.0.3) + '@typescript-eslint/types': 8.74.0 + debug: 4.4.3 + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.74.0': + dependencies: + '@typescript-eslint/types': 8.74.0 + '@typescript-eslint/visitor-keys': 8.74.0 + + '@typescript-eslint/tsconfig-utils@8.74.0(typescript@6.0.3)': + dependencies: + typescript: 6.0.3 + + '@typescript-eslint/type-utils@8.74.0(eslint@10.16.0)(typescript@6.0.3)': + dependencies: + '@typescript-eslint/types': 8.74.0 + '@typescript-eslint/typescript-estree': 8.74.0(typescript@6.0.3) + '@typescript-eslint/utils': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + debug: 4.4.3 + eslint: 10.16.0 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - '@typescript/native' + - supports-color + + '@typescript-eslint/types@8.74.0': {} + + '@typescript-eslint/typescript-estree@8.74.0(typescript@6.0.3)': + dependencies: + '@typescript-eslint/project-service': 8.74.0(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.74.0(typescript@6.0.3) + '@typescript-eslint/types': 8.74.0 + '@typescript-eslint/visitor-keys': 8.74.0 + debug: 4.4.3 + minimatch: 11.0.10 + semver: 7.8.6 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.74.0(eslint@10.16.0)(typescript@6.0.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.16.0) + '@typescript-eslint/scope-manager': 8.74.0 + '@typescript-eslint/types': 8.74.0 + '@typescript-eslint/typescript-estree': 8.74.0(typescript@6.0.3) + eslint: 10.16.0 + typescript: 6.0.3 + transitivePeerDependencies: + - '@typescript/native' + - supports-color + + '@typescript-eslint/visitor-keys@8.74.0': + dependencies: + '@typescript-eslint/types': 8.74.0 + eslint-visitor-keys: 5.0.1 + + '@vitest/mocker@5.1.2(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.1.2 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + + '@vitest/spy@5.1.2': {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-regex@5.0.1: {} + + ansi-styles@5.2.0: {} + + aria-query@5.3.0: + dependencies: + dequal: 2.0.3 + + aria-query@5.3.1: {} + + aria-query@5.3.2: {} + + assertion-error@2.0.1: {} + + axe-core@4.14.1: {} + + axobject-query@4.1.0: {} + + balanced-match@4.0.4: {} + + bcp-47-match@2.0.3: {} + + bcp-47@2.1.2: + dependencies: + is-alphabetical: 2.0.1 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + + brace-expansion@5.1.2: + dependencies: + balanced-match: 4.0.4 + + cacheable@2.5.0: + dependencies: + '@cacheable/memory': 2.2.0 + '@cacheable/utils': 2.5.0 + hookified: 1.15.1 + keyv: 5.6.0 + qified: 0.10.1 + + chai@6.3.0: {} + + chalk@5.6.2: {} + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + clsx@2.1.1: {} + + cross-spawn@7.1.2: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + css.escape@1.5.1: {} + + data-urls@8.0.0: + dependencies: + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + transitivePeerDependencies: + - '@noble/hashes' + + debug@4.4.3: + dependencies: + ms: 2.1.3 + + decimal.js@10.6.0: {} + + deep-is@0.1.4: {} + + deepmerge@4.3.1: {} + + dequal@2.0.3: {} + + detect-libc@2.1.2: {} + + devalue@6.0.4: {} + + dom-accessibility-api@0.5.16: {} + + dom-accessibility-api@0.6.3: {} + + entities@9.0.0: {} + + es-module-lexer@2.3.2: {} + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + optional: true + + escape-string-regexp@4.0.0: {} + + eslint-plugin-svelte@3.24.1(eslint@10.16.0)(svelte@5.59.2(@typescript-eslint/types@8.74.0)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.16.0) + '@jridgewell/sourcemap-codec': 1.6.0 + eslint: 10.16.0 + esutils: 2.0.3 + globals: 16.5.0 + known-css-properties: 0.37.0 + postcss: 8.5.34 + postcss-load-config: 3.1.4(postcss@8.5.34) + postcss-safe-parser: 7.1.0(postcss@8.5.34) + semver: 7.8.6 + svelte-eslint-parser: 1.13.0(svelte@5.59.2(@typescript-eslint/types@8.74.0)) + optionalDependencies: + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + transitivePeerDependencies: + - ts-node + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-scope@9.1.2: + dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.11 + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint-visitor-keys@5.0.1: {} + + eslint@10.16.0: + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@10.16.0) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.23.7 + '@eslint/config-helpers': 0.7.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.3 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.11 + ajv: 6.15.0 + cross-spawn: 7.1.2 + debug: 4.4.3 + escape-string-regexp: 4.0.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 11.1.5 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + minimatch: 11.0.10 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + esm-env@1.2.2: {} + + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + espree@11.2.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 5.0.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrap@2.4.2(@typescript-eslint/types@8.74.0): + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + optionalDependencies: + '@typescript-eslint/types': 8.74.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.11 + + esutils@2.0.3: {} + + expect-type@1.4.0: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + file-entry-cache@11.1.5: + dependencies: + flat-cache: 6.1.23 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@6.1.23: + dependencies: + cacheable: 2.5.0 + flatted: 3.5.1 + hookified: 1.15.1 + + flatted@3.5.1: {} + + fsevents@2.3.3: + optional: true + + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@16.5.0: {} + + globals@17.15.0: {} + + hashery@1.5.1: + dependencies: + hookified: 1.15.1 + + hookified@1.15.1: {} + + hookified@2.2.0: {} + + html-encoding-sniffer@7.0.0: + dependencies: + '@exodus/bytes': 1.16.0 + transitivePeerDependencies: + - '@noble/hashes' + + ignore@5.3.2: {} + + ignore@7.0.17: {} + + imurmurhash@0.1.4: {} + + indent-string@4.0.0: {} + + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + + is-decimal@2.0.1: {} + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + is-potential-custom-element-name@1.0.1: {} + + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.11 + + isexe@2.0.0: {} + + js-tokens@4.0.0: {} + + jsdom@31.0.1: + dependencies: + '@exodus/bytes': 1.16.0 + bcp-47: 2.1.2 + bcp-47-match: 2.0.3 + data-urls: 8.0.0 + decimal.js: 10.6.0 + html-encoding-sniffer: 7.0.0 + is-potential-custom-element-name: 1.0.1 + lru-cache: 11.5.4 + parse5: 8.1.1 + parse5-parser-stream: 8.1.1 + saxes: 6.0.0 + tough-cookie: 6.1.0 + undici: 8.14.0 + w3c-xmlserializer: 6.0.0 + webidl-conversions: 8.0.1 + whatwg-mimetype: 5.0.0 + whatwg-url: 17.3.0 + xml-name-validator: 5.0.0 + transitivePeerDependencies: + - '@noble/hashes' + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@5.6.0: + dependencies: + '@keyv/serialize': 1.1.1 + + known-css-properties@0.37.0: {} + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + lilconfig@2.1.0: {} + + locate-character@3.0.0: {} + + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash-es@4.18.1: {} + + lru-cache@11.5.4: {} + + lz-string@1.5.0: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + min-indent@1.0.1: {} + + minimatch@11.0.10: + dependencies: + '@isaacs/nonrecursive-glob-match': 1.1.0 + brace-expansion: 5.1.2 + + mri@1.2.0: {} + + ms@2.1.3: {} + + nanoid@3.3.20: {} + + napi-windows-process-start-time@0.1.0: + optional: true + + natural-compare@1.4.0: {} + + obug@3.0.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parse5-parser-stream@8.1.1: + dependencies: + parse5: 8.1.1 + + parse5@8.1.1: + dependencies: + entities: 9.0.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + + picocolors@1.1.1: {} + + picomatch@4.0.7: {} + + postcss-load-config@3.1.4(postcss@8.5.34): + dependencies: + lilconfig: 2.1.0 + yaml: 1.10.3 + optionalDependencies: + postcss: 8.5.34 + + postcss-safe-parser@7.1.0(postcss@8.5.34): + dependencies: + postcss: 8.5.34 + + postcss-scss@4.0.9(postcss@8.5.34): + dependencies: + postcss: 8.5.34 + + postcss-selector-parser@7.2.1: + dependencies: + util-deprecate: 1.0.2 + + postcss@8.5.34: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.3.0 + + prelude-ls@1.2.1: {} + + prettier-plugin-svelte@4.2.0(prettier@3.10.1)(svelte@5.59.2(@typescript-eslint/types@8.74.0)): + dependencies: + prettier: 3.10.1 + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + + prettier@3.10.1: {} + + pretty-format@27.5.1: + dependencies: + ansi-regex: 5.0.1 + ansi-styles: 5.2.0 + react-is: 17.0.2 + + punycode@2.3.1: {} + + qified@0.10.1: + dependencies: + hookified: 2.2.0 + + react-is@17.0.2: {} + + readdirp@4.1.2: {} + + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + + rolldown@1.3.4: + dependencies: + '@oxc-project/types': 0.160.0 + '@rolldown/pluginutils': 1.1.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.3.4 + '@rolldown/binding-android-arm64': 1.3.4 + '@rolldown/binding-darwin-arm64': 1.3.4 + '@rolldown/binding-darwin-x64': 1.3.4 + '@rolldown/binding-freebsd-x64': 1.3.4 + '@rolldown/binding-linux-arm-gnueabihf': 1.3.4 + '@rolldown/binding-linux-arm64-gnu': 1.3.4 + '@rolldown/binding-linux-arm64-musl': 1.3.4 + '@rolldown/binding-linux-ppc64-gnu': 1.3.4 + '@rolldown/binding-linux-s390x-gnu': 1.3.4 + '@rolldown/binding-linux-x64-gnu': 1.3.4 + '@rolldown/binding-linux-x64-musl': 1.3.4 + '@rolldown/binding-openharmony-arm64': 1.3.4 + '@rolldown/binding-wasm32-wasi': 1.3.4 + '@rolldown/binding-win32-arm64-msvc': 1.3.4 + '@rolldown/binding-win32-x64-msvc': 1.3.4 + + sade@1.8.1: + dependencies: + mri: 1.2.0 + + saxes@6.0.0: + dependencies: + xmlchars: 2.2.0 + + semver@7.8.6: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + source-map-js@1.3.0: {} + + std-env@4.3.0: {} + + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + + svelte-check@4.7.9(picomatch@4.0.7)(svelte@5.59.2(@typescript-eslint/types@8.74.0))(typescript@6.0.3): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@sveltejs/load-config': 0.2.3 + chokidar: 4.0.3 + fdir: 6.5.0(picomatch@4.0.7) + picocolors: 1.1.1 + sade: 1.8.1 + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + typescript: 6.0.3 + transitivePeerDependencies: + - picomatch + + svelte-eslint-parser@1.13.0(svelte@5.59.2(@typescript-eslint/types@8.74.0)): + dependencies: + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + postcss: 8.5.34 + postcss-scss: 4.0.9(postcss@8.5.34) + postcss-selector-parser: 7.2.1 + semver: 7.8.6 + optionalDependencies: + svelte: 5.59.2(@typescript-eslint/types@8.74.0) + + svelte@5.59.2(@typescript-eslint/types@8.74.0): + dependencies: + '@jridgewell/remapping': 2.3.5 + '@jridgewell/sourcemap-codec': 1.6.0 + '@sveltejs/acorn-typescript': 1.0.13(acorn@8.19.0) + '@types/estree': 1.0.11 + acorn: 8.19.0 + aria-query: 5.3.1 + axobject-query: 4.1.0 + clsx: 2.1.1 + devalue: 6.0.4 + esm-env: 1.2.2 + esrap: 2.4.2(@typescript-eslint/types@8.74.0) + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.21 + zimmerframe: 1.1.5 + transitivePeerDependencies: + - '@typescript-eslint/types' + + tinybench@6.2.5: {} + + tinyexec@1.4.0: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tldts-core@7.6.4: {} + + tldts@7.6.4: + dependencies: + tldts-core: 7.6.4 + + tough-cookie@6.1.0: + dependencies: + tldts: 7.6.4 + + tr46@7.0.0: + dependencies: + punycode: 2.3.1 + + ts-api-utils@2.5.0(typescript@6.0.3): + dependencies: + typescript: 6.0.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.74.0(eslint@10.16.0)(typescript@6.0.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.74.0(@typescript-eslint/parser@8.74.0(eslint@10.16.0)(typescript@6.0.3))(eslint@10.16.0)(typescript@6.0.3) + '@typescript-eslint/parser': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.74.0(typescript@6.0.3) + '@typescript-eslint/utils': 8.74.0(eslint@10.16.0)(typescript@6.0.3) + eslint: 10.16.0 + typescript: 6.0.3 + transitivePeerDependencies: + - '@typescript/native' + - supports-color + + typescript@6.0.3: {} + + undici-types@6.21.0: {} + + undici@8.14.0: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + + util-deprecate@1.0.2: {} + + vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.34 + rolldown: 1.3.4 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 22.20.7 + esbuild: 0.28.2 + fsevents: 2.3.3 + napi-windows-process-start-time: 0.1.0 + + vitefu@1.1.4(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)): + optionalDependencies: + vite: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + + vitest-axe@0.1.0(vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2))): + dependencies: + aria-query: 5.3.2 + axe-core: 4.14.1 + chalk: 5.6.2 + dom-accessibility-api: 0.5.16 + lodash-es: 4.18.1 + redent: 3.0.0 + vitest: 5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + + vitest@5.1.2(@types/node@22.20.7)(jsdom@31.0.1)(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.1.2(vite@8.4.0(@types/node@22.20.7)(esbuild@0.28.2)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.4.0 + tinyglobby: 0.2.17 + vite: 8.4.0(@types/node@22.20.7)(esbuild@0.28.2) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 22.20.7 + jsdom: 31.0.1 + transitivePeerDependencies: + - msw + + w3c-xmlserializer@6.0.0: + dependencies: + xml-name-validator: 5.0.0 + + webidl-conversions@8.0.1: {} + + whatwg-mimetype@5.0.0: {} + + whatwg-url@17.3.0: + dependencies: + '@exodus/bytes': 1.16.0 + tr46: 7.0.0 + webidl-conversions: 8.0.1 + transitivePeerDependencies: + - '@noble/hashes' + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@3.2.1: {} + + word-wrap@1.2.5: {} + + xml-name-validator@5.0.0: {} + + xmlchars@2.2.0: {} + + yaml@1.10.3: {} + + yocto-queue@0.1.0: {} + + zimmerframe@1.1.5: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..5ed0b5a --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +allowBuilds: + esbuild: true diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..dce363e --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,3 @@ +edition = "2021" +max_width = 100 +use_field_init_shorthand = true diff --git a/scripts/fetch-pdfium.sh b/scripts/fetch-pdfium.sh new file mode 100755 index 0000000..d6e3235 --- /dev/null +++ b/scripts/fetch-pdfium.sh @@ -0,0 +1,74 @@ +#!/usr/bin/env bash +# Download the pinned PDFium build (bblanchon/pdfium-binaries) for Largsform's PDF input support +# and verify it by SHA-256 (research R6, Constitution "Technology & Platform Constraints"). +# +# Usage: scripts/fetch-pdfium.sh [macos|linux-x64|windows-x64|all] (default: current platform) +# Output: src-tauri/resources/pdfium// +set -euo pipefail + +PDFIUM_TAG="chromium/8193" +BASE_URL="https://github.com/bblanchon/pdfium-binaries/releases/download/${PDFIUM_TAG}" + +# platform | archive | sha256 | library path inside archive +ENTRIES=( + "macos|pdfium-mac-univ.tgz|e40e96682bb8bd022dcde0847a7dda10520ad10c69cf9c664c0db16377d95b61|lib/libpdfium.dylib" + "linux-x64|pdfium-linux-x64.tgz|36c4e0662cd8189e43a67632dc39ed895ff80d68d51213058f17cc2d186845d3|lib/libpdfium.so" + "windows-x64|pdfium-win-x64.tgz|7af887b8d1644395b5b2f536c67e58c8901e6cd5d3ae78b6d1aa94e6cb92017f|bin/pdfium.dll" +) + +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +DEST_ROOT="$ROOT/src-tauri/resources/pdfium" + +detect_platform() { + case "$(uname -s)" in + Darwin) echo macos ;; + Linux) echo linux-x64 ;; + MINGW* | MSYS* | CYGWIN* | Windows_NT) echo windows-x64 ;; + *) echo "Unsupported platform: $(uname -s)" >&2; exit 1 ;; + esac +} + +sha256_of() { + if command -v sha256sum >/dev/null 2>&1; then sha256sum "$1" | awk '{print $1}' + else shasum -a 256 "$1" | awk '{print $1}'; fi +} + +WANT="${1:-$(detect_platform)}" +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT + +fetched=0 +for entry in "${ENTRIES[@]}"; do + IFS='|' read -r platform archive sha lib <<<"$entry" + [[ "$WANT" == "all" || "$WANT" == "$platform" ]] || continue + + dest="$DEST_ROOT/$platform" + if [[ -f "$dest/$(basename "$lib")" && -f "$dest/.sha256" && "$(cat "$dest/.sha256")" == "$sha" ]]; then + echo "pdfium ($platform) already present" + fetched=1 + continue + fi + + echo "Downloading $archive ($PDFIUM_TAG)…" + curl --fail --location --silent --show-error -o "$TMP/$archive" "$BASE_URL/$archive" + actual="$(sha256_of "$TMP/$archive")" + if [[ "$actual" != "$sha" ]]; then + echo "Checksum mismatch for $archive: expected $sha, got $actual" >&2 + exit 1 + fi + + mkdir -p "$TMP/$platform" + tar -xzf "$TMP/$archive" -C "$TMP/$platform" + rm -rf "$dest" + mkdir -p "$dest" + cp "$TMP/$platform/$lib" "$dest/" + cp "$TMP/$platform/LICENSE" "$dest/LICENSE.pdfium" 2>/dev/null || true + echo "$sha" >"$dest/.sha256" + echo "pdfium ($platform) → $dest" + fetched=1 +done + +if [[ "$fetched" -eq 0 ]]; then + echo "Unknown platform '$WANT' (expected macos, linux-x64, windows-x64 or all)" >&2 + exit 1 +fi diff --git a/scripts/mark-task.sh b/scripts/mark-task.sh new file mode 100755 index 0000000..a5a39d9 --- /dev/null +++ b/scripts/mark-task.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Mark Spec Kit tasks done: scripts/mark-task.sh T001 T002 ... +f="${TASKS_FILE:-specs/001-image-conversion-mvp/tasks.md}" +for id in "$@"; do sed -i.bak -E "s/^- \[ \] ${id} /- [X] ${id} /" "$f"; done +rm -f "$f.bak" diff --git a/scripts/pdfium-platform.sh b/scripts/pdfium-platform.sh new file mode 100755 index 0000000..b17a107 --- /dev/null +++ b/scripts/pdfium-platform.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Print the PDFium resource platform folder name for the current OS. +case "$(uname -s)" in + Darwin) echo macos ;; + Linux) echo linux-x64 ;; + *) echo windows-x64 ;; +esac diff --git a/specs/001-image-conversion-mvp/checklists/requirements.md b/specs/001-image-conversion-mvp/checklists/requirements.md new file mode 100644 index 0000000..7fef9d4 --- /dev/null +++ b/specs/001-image-conversion-mvp/checklists/requirements.md @@ -0,0 +1,38 @@ +# Specification Quality Checklist: Image Conversion MVP + +**Purpose**: Validate specification completeness and quality before proceeding to planning +**Created**: 2026-12-03 +**Feature**: [spec.md](../spec.md) + +## Content Quality + +- [x] No implementation details (languages, frameworks, APIs) +- [x] Focused on user value and business needs +- [x] Written for non-technical stakeholders +- [x] All mandatory sections completed + +## Requirement Completeness + +- [x] No [NEEDS CLARIFICATION] markers remain +- [x] Requirements are testable and unambiguous +- [x] Success criteria are measurable +- [x] Success criteria are technology-agnostic (no implementation details) +- [x] All acceptance scenarios are defined +- [x] Edge cases are identified +- [x] Scope is clearly bounded +- [x] Dependencies and assumptions identified + +## Feature Readiness + +- [x] All functional requirements have clear acceptance criteria +- [x] User scenarios cover primary flows +- [x] Feature meets measurable outcomes defined in Success Criteria +- [x] No implementation details leak into specification + +## Notes + +- Clarifications resolved 2026-12-03: Q1 any input → any output (57 pairs; the 20 listed are + priority pairs), Q2 keep all metadata including GPS (FR-015), Q3 SVG output traces into + vector shapes (FR-016). +- All items pass; spec is ready for `/speckit-clarify` or `/speckit-plan`. +- Items marked incomplete require spec updates before `/speckit-clarify` or `/speckit-plan` diff --git a/specs/001-image-conversion-mvp/contracts/core-api.md b/specs/001-image-conversion-mvp/contracts/core-api.md new file mode 100644 index 0000000..2a97c5b --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/core-api.md @@ -0,0 +1,88 @@ +# Contract: `largsform-core` public Rust API + +The conversion library is independent of Tauri (Constitution III). This is its public surface. +Everything else is private to the crate. The signatures are normative; the bodies are written +during implementation. + +```rust +// ---- formats ---- +pub enum Format { Jpeg, Png, Webp, Avif, Heic, Tiff, Gif, Svg, Pdf, Ico } +impl Format { + pub fn is_input(self) -> bool; + pub fn is_output(self) -> bool; + pub fn extension(self) -> &'static str; // "jpg", "png", ... +} + +/// Content-based detection (reads at most 4 KiB). FR-002. +pub fn detect_format(path: &Path) -> Result; +/// Header-only inspection for the file list (no full decode). +pub fn inspect(path: &Path) -> Result; + +// ---- registry / capabilities ---- +pub struct Registry { /* decoders × encoders */ } +impl Registry { + pub fn new() -> Self; // builds all 57 pairs + pub fn targets_for(&self, input: Format) -> Vec; + pub fn converter(&self, input: Format, output: Format) -> Option<&dyn Converter>; +} +pub struct Capability { pub output: Format, pub options: Vec, pub notices: Vec } + +// ---- converter trait (Constitution III) ---- +pub trait Converter: Send + Sync { + fn input(&self) -> Format; + fn output(&self) -> Format; + /// Decode + normalize + encode one source into staged (not yet persisted) outputs. + fn convert(&self, src: &Path, opts: &ConversionOptions, ctx: &mut ConvertCtx) + -> Result, ConversionError>; +} + +// Internal building blocks (pub(crate)); new formats plug in here. +pub(crate) trait Decoder: Send + Sync { + fn format(&self) -> Format; + fn decode(&self, src: &Path, opts: &ConversionOptions, ctx: &mut ConvertCtx) + -> Result, ConversionError>; +} +pub(crate) trait Encoder: Send + Sync { + fn format(&self) -> Format; + fn encode(&self, images: Vec, opts: &ConversionOptions, ctx: &mut ConvertCtx, + sink: &mut dyn OutputSink) -> Result<(), ConversionError>; +} + +/// Progress reporting and cancellation passed through every stage. +pub struct ConvertCtx { /* cancel: CancelToken, progress: Box, notices */ } +impl ConvertCtx { + pub fn check_cancelled(&self) -> Result<(), ConversionError>; // Err(Cancelled) + pub fn progress(&mut self, fraction: f32); + pub fn notice(&mut self, n: NoticeKind); +} + +// ---- output safety (Constitution IV) ---- +/// A temp file in the destination folder that has not been committed yet. Dropping it deletes it. +pub struct StagedOutput { /* tempfile + desired base name + page */ } +impl StagedOutput { + /// Atomic, no-clobber persist; appends " (n)" on collision. FR-018/FR-020. + pub fn commit(self, reserved: &mut NameReservations) -> Result; +} + +// ---- jobs ---- +pub struct JobRunner { /* registry, semaphore(available_parallelism) */ } +impl JobRunner { + pub fn run(&self, job: JobSpec, cancel: CancelToken, + events: impl Fn(JobEvent) + Send + Sync + 'static) -> JobSummary; +} +#[derive(Clone)] pub struct CancelToken(/* Arc */); +``` + +## Behavioral guarantees (tested in `crates/core/tests/`) + +| Guarantee | Test file | +|-----------|-----------| +| The source file's bytes and mtime are unchanged after any conversion | `output_safety.rs` | +| No file remains in the destination folder after a failure or cancel | `output_safety.rs` | +| An existing file is never overwritten; the `(n)` suffix sequence is correct | `naming.rs` | +| Every one of the 57 pairs converts its reference sample into a valid output | `conversions.rs` (generated matrix) | +| Corrupt or truncated samples return `Err(Corrupt)` and never panic | `corrupt.rs` (+ `cargo fuzz` target for detection) | +| EXIF (including GPS) is kept for JPG/PNG/WebP(/AVIF) output, and orientation is reset to 1 | `metadata.rs` | +| Output dimensions match the source, except for scale/DPI/ICO options | `conversions.rs` | +| `detect_format` ignores the extension | `detect.rs` | +| SVG input never reads `http(s):` or `file:` hrefs | `svg_security.rs` | diff --git a/specs/001-image-conversion-mvp/contracts/fixtures/add-files-result.json b/specs/001-image-conversion-mvp/contracts/fixtures/add-files-result.json new file mode 100644 index 0000000..0bda698 --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/fixtures/add-files-result.json @@ -0,0 +1,26 @@ +{ + "added": [ + { + "id": 1, + "path": "/Users/me/Pictures/IMG_0001.heic", + "name": "IMG_0001.heic", + "format": "heic", + "sizeBytes": 2345678, + "width": 4032, + "height": 3024, + "hasAlpha": false + } + ], + "duplicates": [ + "/Users/me/Pictures/IMG_0002.heic" + ], + "rejected": [ + { + "path": "/Users/me/notes.txt", + "error": { + "kind": "unsupported", + "message": "“notes.txt” isn't a supported file. Largsform can convert HEIC, WebP, AVIF, JPG, PNG, TIFF, GIF, SVG and PDF files." + } + } + ] +} diff --git a/specs/001-image-conversion-mvp/contracts/fixtures/enums.json b/specs/001-image-conversion-mvp/contracts/fixtures/enums.json new file mode 100644 index 0000000..f35ee67 --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/fixtures/enums.json @@ -0,0 +1,39 @@ +{ + "errorKinds": [ + "unsupported", + "corrupt", + "tooLarge", + "protectedPdf", + "sourceMissing", + "outputNotWritable", + "diskFull", + "cancelled", + "internal" + ], + "formats": [ + "jpg", + "png", + "webp", + "avif", + "heic", + "tiff", + "gif", + "svg", + "pdf", + "ico" + ], + "noticeKinds": [ + "transparencyFlattened", + "stylizedTrace", + "metadataDropped", + "firstFrameOnly", + "firstImageOnly", + "externalSvgResourcesSkipped" + ], + "optionKinds": [ + "quality", + "pdfDpi", + "svgScale", + "pdfLayout" + ] +} diff --git a/specs/001-image-conversion-mvp/contracts/fixtures/job-events.json b/specs/001-image-conversion-mvp/contracts/fixtures/job-events.json new file mode 100644 index 0000000..23562a1 --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/fixtures/job-events.json @@ -0,0 +1,51 @@ +[ + { + "type": "itemStarted", + "sourceId": 1 + }, + { + "type": "itemProgress", + "sourceId": 1, + "progress": 0.5 + }, + { + "type": "itemFinished", + "sourceId": 1, + "status": "done", + "outputs": [ + { + "path": "/Users/me/Pictures/IMG_0001.jpg", + "format": "jpg", + "sourceIds": [ + 1 + ] + } + ], + "notices": [ + "firstImageOnly" + ] + }, + { + "type": "itemFinished", + "sourceId": 2, + "status": "failed", + "outputs": [], + "error": { + "kind": "corrupt", + "message": "“broken.webp” appears to be damaged or incomplete, so it couldn't be read. Try exporting it again from the app that created it.", + "detail": "unexpected EOF" + }, + "notices": [] + }, + { + "type": "jobFinished", + "jobId": 7, + "status": "completed", + "summary": { + "succeeded": 1, + "failed": 1, + "skipped": 0, + "cancelled": 0 + } + } +] diff --git a/specs/001-image-conversion-mvp/contracts/fixtures/targets-result.json b/specs/001-image-conversion-mvp/contracts/fixtures/targets-result.json new file mode 100644 index 0000000..e622afd --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/fixtures/targets-result.json @@ -0,0 +1,38 @@ +{ + "targets": [ + { + "format": "jpg", + "applicableTo": [ + 1, + 2 + ], + "skipped": [ + 3 + ], + "options": [ + "quality" + ], + "notices": [ + { + "kind": "transparencyFlattened", + "sourceIds": [ + 2 + ] + } + ] + }, + { + "format": "pdf", + "applicableTo": [ + 1, + 2, + 3 + ], + "skipped": [], + "options": [ + "pdfLayout" + ], + "notices": [] + } + ] +} diff --git a/specs/001-image-conversion-mvp/contracts/ipc.md b/specs/001-image-conversion-mvp/contracts/ipc.md new file mode 100644 index 0000000..ee9bf05 --- /dev/null +++ b/specs/001-image-conversion-mvp/contracts/ipc.md @@ -0,0 +1,142 @@ +# Contract: UI ↔ Core IPC (Tauri commands and channels) + +The only interface between the Svelte UI and Rust. Tauri commands are thin adapters over +`largsform-core` (Constitution III). All payloads are JSON (serde `camelCase`). Types match +[data-model.md](../data-model.md). + +Permissions: the frontend may call **only** the commands below, plus `dialog:allow-open` and the +scoped `opener` permissions (research R17). There is no `fs` or `http` plugin. + +## Commands + +### `add_files` + +Inspects paths from the file dialog or drag-and-drop. It does not decode pixels. + +```ts +invoke("add_files", { paths: string[] }): Promise + +type AddFilesResult = { + added: SourceFile[]; // newly added, in input order + duplicates: string[]; // paths already in the list (ignored) + rejected: { path: string; error: ConversionError }[]; // Unsupported, SourceMissing, Corrupt header +}; +``` + +- Directories are expanded one level and non-files are ignored. +- Must return within 200 ms for 100 files (header-only reads). + +### `remove_files` + +```ts +invoke("remove_files", { ids: number[] }): Promise +``` + +### `get_targets` + +```ts +invoke("get_targets", { ids: number[] }): Promise + +type TargetsResult = { + targets: { + format: OutputFormat; // "jpg" | "png" | "webp" | "avif" | "pdf" | "ico" | "svg" + applicableTo: number[]; // source ids that can convert to it + skipped: number[]; // source ids already in this format + options: OptionKind[]; // union across applicable sources + notices: { kind: NoticeKind; sourceIds: number[] }[]; + }[]; +}; +``` + +The UI uses this to show the target picker, the options, and the "will be skipped" and +pre-conversion notices (US2-4, FR-016 warning, transparency notice). + +### `start_job` + +```ts +invoke("start_job", { + request: { + sourceIds: number[]; // order = PDF page order when pdfLayout = "combine" + target: OutputFormat; + options: { + quality?: number; // 1..100, default 90 + pdfDpi?: 72 | 150 | 300; // default 150 + svgScale?: 1 | 2 | 4; // default 1 + pdfLayout?: "combine" | "separate"; // default "combine" + outputDir?: string | null; // null = next to each source + }; + }, + onEvent: Channel, +}): Promise<{ jobId: number }> +``` + +Errors (rejected promise): `InvalidOptions`, `OutputNotWritable` (when `outputDir` is set and +can't be written to), `NothingToConvert`. + +### `cancel_job` / `cancel_item` + +```ts +invoke("cancel_job", { jobId: number }): Promise +invoke("cancel_item", { jobId: number, sourceId: number }): Promise +``` + +Returns immediately. The UI receives `itemStatus: "cancelled"` within 1 s (SC-007). + +### `open_output` / `reveal_output` + +```ts +invoke("open_output", { path: string }): Promise +invoke("reveal_output", { path: string }): Promise +``` + +Rejected unless `path` is an `OutputFile.path` produced in this session (an allow-list held in +Rust state). + +## Channel events: `JobEvent` + +```ts +type JobEvent = + | { type: "itemStarted"; sourceId: number } + | { type: "itemProgress"; sourceId: number; progress: number } // 0..1, ≤ 10/s per item + | { type: "itemFinished"; sourceId: number; + status: "done" | "failed" | "cancelled" | "skipped"; + outputs: OutputFile[]; error?: ConversionError; notices: NoticeKind[] } + | { type: "jobFinished"; jobId: number; + status: "completed" | "cancelled"; + summary: { succeeded: number; failed: number; skipped: number; cancelled: number }; + combinedOutput?: OutputFile }; +``` + +Ordering guarantees: +- `itemStarted` comes before any `itemProgress` for that item. +- Exactly one `itemFinished` is sent per item. +- `jobFinished` is always the last event for a job. + +## Shared types + +```ts +type OutputFormat = "jpg" | "png" | "webp" | "avif" | "pdf" | "ico" | "svg"; +type InputFormat = OutputFormat | "heic" | "tiff" | "gif"; // note: "ico" is never detected as input +type OptionKind = "quality" | "pdfDpi" | "svgScale" | "pdfLayout"; +type NoticeKind = "transparencyFlattened" | "stylizedTrace" | "metadataDropped" + | "firstFrameOnly" | "firstImageOnly" | "externalSvgResourcesSkipped"; + +type SourceFile = { + id: number; path: string; name: string; sizeBytes: number; format: InputFormat; + width?: number; height?: number; pageCount?: number; frameCount?: number; hasAlpha?: boolean; +}; +type OutputFile = { path: string; format: OutputFormat; sourceIds: number[]; page?: number }; +type ConversionError = { + kind: "unsupported" | "corrupt" | "tooLarge" | "protectedPdf" | "sourceMissing" + | "outputNotWritable" | "diskFull" | "cancelled" | "internal"; + message: string; // user-facing, plain language + detail?: string; // technical +}; +``` + +## Contract tests + +- Rust: `src-tauri/tests/ipc_contract.rs` serializes every type and compares it with JSON + snapshots in `contracts/fixtures/*.json`. +- TS: `src/lib/ipc.test.ts` type-checks the same snapshots against the TS types, so drift between + the two sides fails CI. diff --git a/specs/001-image-conversion-mvp/data-model.md b/specs/001-image-conversion-mvp/data-model.md new file mode 100644 index 0000000..27125ce --- /dev/null +++ b/specs/001-image-conversion-mvp/data-model.md @@ -0,0 +1,159 @@ +# Data Model: Image Conversion MVP + +**Feature**: [spec.md](./spec.md) | **Plan**: [plan.md](./plan.md) + +All state is in-memory for the lifetime of the app. Nothing is persisted between launches (spec +Assumptions). Rust types live in `crates/core`. Their serialized form, shared with the UI, is +defined in [contracts/ipc.md](./contracts/ipc.md). + +## Format + +Enumeration of every supported format and its role. + +| Variant | Input | Output | Lossy quality | Alpha | Carries EXIF/ICC | Multi-image | +|---------|-------|--------|---------------|-------|------------------|-------------| +| `Jpeg` | ✓ | ✓ | ✓ | ✗ (flatten on white) | ✓ / ✓ | ✗ | +| `Png` | ✓ | ✓ | ✗ | ✓ | ✓ / ✓ | ✗ | +| `Webp` | ✓ | ✓ | ✓ | ✓ | ✓ / ✓ | ✗ (animated → first frame) | +| `Avif` | ✓ | ✓ | ✓ | ✓ | ✓* / ✓ | ✗ | +| `Heic` | ✓ | ✗ | — | ✓ | ✓ / ✓ | primary image only | +| `Tiff` | ✓ | ✗ | — | ✓ | ✓ / ✓ | first page only | +| `Gif` | ✓ | ✗ | — | ✓ (1-bit) | ✗ | first frame only | +| `Svg` | ✓ | ✓ (traced) | — | ✓ | ✗ | ✗ | +| `Pdf` | ✓ | ✓ | (JPEG pages at 90) | ✓ (SMask) | date only | ✓ pages | +| `Ico` | ✗ | ✓ | — | ✓ | ✗ | ✓ sizes | + +\* Subject to research spike Q3. + +**Validation**: A format is assigned only by content sniffing (research R13). The file extension +is used only for naming outputs. + +## SourceFile + +A file the user added. + +| Field | Type | Notes | +|-------|------|-------| +| `id` | `SourceId` (u64) | Unique within the session | +| `path` | absolute path | Canonicalized and used for de-duplication (edge case: same file added twice) | +| `name` | string | File name for display | +| `size_bytes` | u64 | | +| `format` | `Format` | Detected from content | +| `dimensions` | `{width, height}?` | From the header only, without a full decode. Unknown for PDFs | +| `page_count` | u32? | PDF only | +| `frame_count` | u32? | GIF/WebP/TIFF/HEIC; > 1 triggers the "first frame/page only" notice | +| `has_alpha` | bool? | Drives the transparency → white notice for JPG | +| `is_photographic` | bool? | Computed lazily when SVG is the target (research R9) | +| `warnings` | `Warning[]` | e.g. `AnimatedFirstFrameOnly`, `MultiImageFirstOnly` | + +**Rules**: The path must exist and be readable when added. A format that cannot be detected +rejects the file (FR-004) and it does not enter the list. + +## Target / FormatCapability + +The registry's view of what is possible. + +| Field | Type | Notes | +|-------|------|-------| +| `input` | `Format` | | +| `output` | `Format` | `input != output` | +| `options` | `OptionKind[]` | Which options apply: `Quality` (JPG/WebP/AVIF out), `PdfDpi` (PDF in), `SvgScale` (SVG in), `PdfLayout` (PDF out) | +| `notices` | `NoticeKind[]` | e.g. `TransparencyFlattened` (alpha → JPG), `StylizedTrace` (photo → SVG), `MetadataDropped` (→ ICO/SVG) | + +57 entries are built by the registry. `targets_for(format)` returns all outputs except the +format itself (FR-003). + +## ConversionOptions + +| Field | Type | Default | Valid range | +|-------|------|---------|-------------| +| `quality` | u8 | 90 | 1–100 | +| `pdf_dpi` | enum | `Dpi150` | `Dpi72`, `Dpi150`, `Dpi300` | +| `svg_scale` | enum | `X1` | `X1`, `X2`, `X4` | +| `pdf_layout` | enum | `Combine` | `Combine`, `Separate` | +| `output_dir` | path? | `None` → each source's own folder | Must exist and be writable (checked at job start) | + +Options that do not apply to a pair are ignored. + +## ConversionJob + +One "Convert" action. + +| Field | Type | Notes | +|-------|------|-------| +| `id` | `JobId` (u64) | | +| `target` | `Format` | One target for the whole job (FR-022) | +| `options` | `ConversionOptions` | | +| `items` | `ConversionItem[]` | In the user's list order. For `Combine`, this order is the page order | +| `status` | `JobStatus` | See the state machine below | +| `summary` | `{succeeded, failed, skipped, cancelled}` | Filled in once the job is finished | +| `combined_output` | `OutputFile?` | Only for PDF output with `Combine` | + +**Skipped items**: Items whose format equals the target are marked `Skipped` before the job +starts, and the UI shows them beforehand (US2 scenario 4). + +## ConversionItem + +| Field | Type | Notes | +|-------|------|-------| +| `source` | `SourceId` | | +| `status` | `ItemStatus` | | +| `progress` | f32 0..1 | Per-stage weighted estimate | +| `outputs` | `OutputFile[]` | One file normally. One per page for PDF→image | +| `error` | `ConversionError?` | When `Failed` | +| `notices` | `NoticeKind[]` | Notices that applied, e.g. `ExternalSvgResourcesSkipped` | + +### Item state machine + +```text +Waiting ──start──▶ Converting ──ok──▶ Done + │ │ └──error──▶ Failed + │ └──cancel──▶ Cancelled (temp output deleted) + ├──cancel──▶ Cancelled + └──(format == target, at job creation)──▶ Skipped +``` + +In `Combine` mode each item goes `Converting → Done` once it is decoded and staged. The combined +PDF is written after the last item. If no item succeeded, no PDF is written and the job reports a +failure. + +### Job state machine + +```text +Pending ──run──▶ Running ──all items terminal──▶ Completed + └──cancel job──▶ Cancelling ──in-flight items end──▶ Cancelled +``` + +`Completed` holds even when some items failed. The summary shows the counts (FR-023, FR-025). + +## OutputFile + +| Field | Type | Notes | +|-------|------|-------| +| `path` | absolute path | Final name after collision handling (`name (n).ext`) | +| `format` | `Format` | | +| `source` | `SourceId[]` | Several for a combined PDF | +| `page` | u32? | Set when exported from a PDF page (`-page-`) | + +**Naming rules (FR-018)**: +- Single output: `.`, where ext is `jpg`, `png`, `webp`, `avif`, `pdf`, `ico`, or `svg`. +- PDF page: `-page-.` (1-based, not zero-padded). +- Combined PDF: `.pdf`. +- On collision: ` (1).`, ` (2).`, … Names reserved by other outputs in the + same batch count as collisions too. + +## ConversionError + +| Field | Type | Notes | +|-------|------|-------| +| `kind` | enum | `Unsupported`, `Corrupt`, `TooLarge`, `ProtectedPdf`, `SourceMissing`, `OutputNotWritable`, `DiskFull`, `Cancelled`, `Internal` | +| `message` | string | Plain language: what failed and what the user can do (FR-026) | +| `detail` | string? | Technical detail, shown on request | + +## Decoded intermediate (internal, not exposed over IPC) + +`DecodedImage { pixels: DynamicImage, icc: Option>, exif: Option>, xmp: Option>, page: Option, dpi: Option<(f32, f32)> }` + +Decoders return `Vec`: one entry, or one per PDF page. The normalizer applies +orientation, patches EXIF orientation, and converts color when the target needs it. Encoders then +consume the result. See [contracts/core-api.md](./contracts/core-api.md). diff --git a/specs/001-image-conversion-mvp/plan.md b/specs/001-image-conversion-mvp/plan.md new file mode 100644 index 0000000..da5a3ad --- /dev/null +++ b/specs/001-image-conversion-mvp/plan.md @@ -0,0 +1,180 @@ +# Implementation Plan: Image Conversion MVP + +**Branch**: `feat/001-image-conversion-mvp` | **Date**: 2026-12-03 | **Spec**: [spec.md](./spec.md) + +**Input**: Feature specification from `/specs/001-image-conversion-mvp/spec.md` + +## Summary + +Build the first version of Largsform: a Tauri 2 desktop app that converts images and PDFs fully +offline on macOS, Ubuntu, and Windows. Nine input formats (HEIC, WebP, AVIF, JPG, PNG, TIFF, GIF, +SVG, PDF) convert to seven output formats (JPG, PNG, WebP, AVIF, PDF, ICO, SVG), giving 57 pairs. +Supporting features: batch conversion, progress, cancellation, metadata preservation, and +crash-safe output. + +Technical approach: a Tauri-independent Rust library (`largsform-core`) runs a +**decoder → normalizer → encoder** pipeline. Nine decoders and seven encoders combine into 57 +converters behind one `Converter` trait and registry. Outputs are written atomically with no +overwrite. A Svelte 5 UI talks to the core through a small set of Tauri commands and an event +channel. See [research.md](./research.md) for every technology decision. + +## Technical Context + +**Language/Version**: Rust stable (≥ 1.85, edition 2021); TypeScript 5.x (frontend) + +**Primary Dependencies**: +- App: Tauri 2.x, `tauri-plugin-dialog`, `tauri-plugin-opener`, Svelte 5, Vite +- Codecs: + - `image` 0.25 (jpeg, png, tiff, gif, webp, ico, avif-native/dav1d) + - `webp` (libwebp, lossy encode) + - `ravif` (AVIF encode) + - `heic` (pure-Rust HEIC; spike, with `libheif-rs` as fallback) + - `pdfium-render` + bundled PDFium library + - `pdf-writer` + - `resvg`/`usvg` + - `vtracer` +- Support: `img-parts` (EXIF/ICC/XMP write), `qcms` (color), `tempfile`, `tokio`, `thiserror`, + `serde` + +**Storage**: None. In-memory session state only. Files on disk are the user's inputs and outputs. + +**Testing**: +- `cargo test`: unit tests, a generated 57-pair fixture matrix, and safety/metadata/corrupt-input + tests +- `cargo fuzz` for format detection +- Vitest + Testing Library + `vitest-axe` +- WebdriverIO + `tauri-driver` E2E (Ubuntu/Windows) + +**Target Platform**: +- macOS 11+ (universal: arm64 + x86_64), with Safari/WebKit 16+ installed (the UI bundle targets + `safari16` because Svelte 5 emits modern JavaScript) +- Ubuntu 22.04+ x86_64 (webkit2gtk-4.1) +- Windows 10/11 x86_64 (WebView2) + +**Project Type**: Desktop application (Rust core library + Tauri shell + web UI) + +**Performance Goals** (Constitution VI, spec SC-002/003/007): +- Cold start < 2 s +- 12 MP single conversion: JPG/PNG/WebP/PDF/ICO output < 1 s; AVIF < 3 s; SVG < 10 s (photo) + and < 2 s (flat color); PDF input < 1 s per page at 150 DPI +- 100 photos < 60 s +- Cancellation shown < 1 s, with no new work started and no output from cancelled items + +**Constraints**: +- Fully offline, with zero network requests +- Idle memory < 150 MB +- Per-item allocation limit 2 GiB +- Installer < 100 MB (estimated 15–25 MB) +- WCAG 2.1 AA + +**Scale/Scope**: +- 10 formats (9 inputs, 7 outputs), 57 pairs +- 1 main screen (file list, target picker, options, summary) +- Batches of up to about 1,000 files + +## Constitution Check + +*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.* + +| Principle | Gate | Pre-research | Post-design | Evidence | +|-----------|------|--------------|-------------|----------| +| I. Local-First Privacy & Security | No uploads or telemetry; content-based detection; no panics on bad input; least-privilege Tauri; temp cleanup (v1.0.1 staging-file exception) | ✅ | ✅ | R13 sniffer, R8 SVG href resolver, R17 (no `fs`/`http` plugins, strict CSP, opener allow-list), per-item `catch_unwind` + decoder fuzzing (R15, T022, T027), staging journal with exit and next-launch cleanup (R14, T019, T030), SC-008 network check. Residual risk of crashes in C libraries is recorded in R15 | +| II. Cross-Platform Parity | Every feature works on all 3 OSes; installers for all 3; neutral paths; platform code isolated | ✅ | ✅ | Pure-Rust codecs or vendored builds. PDFium binaries exist for all 3. CI matrix (R18). No OS codec APIs | +| III. Pluggable Converter Architecture | One `Converter` trait + registry; core independent of Tauri; external tools behind the trait | ✅ | ✅ | R1 pipeline, [core-api.md](./contracts/core-api.md). `src-tauri` commands are thin ([ipc.md](./contracts/ipc.md)). PDFium is behind the `Decoder` trait and its availability is checked at startup | +| IV. Never Destroy User Data | Sources untouched; atomic temp + rename; no silent overwrite; actionable errors | ✅ | ✅ | R14 `persist_noclobber` + `(n)` naming, `output_safety.rs`, `ConversionError.message`/`detail` | +| V. Pragmatic Testing | Unit tests for logic; ≥ 1 fixture test per pair; regression tests for bugs; UI tests for critical flows | ✅ | ✅ | 57-pair matrix (several samples for the 20 priority pairs), E2E for add → convert → error flows | +| VI. Performance & Responsiveness | Off the UI thread; progress + cancel; streaming where possible; bounded parallelism; budgets | ✅ | ✅ | R15 (spawn_blocking + semaphore + memory-aware limit, CancelToken, throttled progress). Cancel is available from US1, the first shippable increment. Per-format budgets are in SC-002 and checked by T039 and T084. Still images are decoded whole: streaming does not apply to them, and memory is bounded by `Limits` | +| VII. Accessibility (WCAG 2.1 AA) | Keyboard-only; picker alternative to drag-and-drop; screen-reader announcements; reduced motion and theme | ✅ | ✅ | R16 Svelte a11y compile checks + `vitest-axe`. A file dialog is always available. ARIA live region for job events. `prefers-reduced-motion`/`prefers-color-scheme` | +| VIII. Simplicity / YAGNI | Prefer pure Rust; justify binaries and new abstractions | ✅ | ✅ (one external binary, justified) | 16 decoders/encoders instead of 57 converters. No persistence, previews, plugin system, or updater. PDFium is the only bundled binary (Complexity Tracking) | +| Tech constraints: licensing | License review before adopting any bundled binary | ✅ | ✅ (action item) | PDFium BSD/Apache, libwebp BSD, dav1d BSD, rav1e BSD, vtracer MIT, resvg Apache/MIT. HEVC patent note and LGPL (fallback only) recorded in R5. **Owner sign-off required before the first public release** | + +**Gate result**: PASS. No unjustified violations. Re-checked after constitution v1.0.1 and the +`/speckit-analyze` fixes (C1, C2, I1, I2, I3, A1, G1). + +## Project Structure + +### Documentation (this feature) + +```text +specs/001-image-conversion-mvp/ +├── plan.md # This file +├── research.md # Phase 0: decisions R1–R18 +├── data-model.md # Phase 1: entities, state machines, naming rules +├── quickstart.md # Phase 1: build/run/validate guide +├── contracts/ +│ ├── ipc.md # Tauri commands + JobEvent channel (UI ↔ core) +│ └── core-api.md # largsform-core public Rust API + guarantees +├── checklists/ +│ └── requirements.md # Spec quality checklist +└── tasks.md # Phase 2 (/speckit-tasks, not created here) +``` + +### Source Code (repository root) + +```text +Cargo.toml # workspace: crates/core, src-tauri +package.json # pnpm: Svelte 5 + Vite + Tauri CLI +crates/core/ # largsform-core: no Tauri dependency +├── src/ +│ ├── lib.rs +│ ├── format.rs # Format enum + detect_format/inspect (R13) +│ ├── registry.rs # decoders × encoders → 57 converters, targets_for +│ ├── converter.rs # Converter trait, PipelineConverter, ConvertCtx, CancelToken +│ ├── decode/ # mod.rs, raster.rs (image crate), heic.rs, svg.rs, pdf.rs +│ ├── encode/ # mod.rs, jpeg_png.rs, webp.rs, avif.rs, pdf.rs, ico.rs, svg_trace.rs +│ ├── normalize.rs # orientation, alpha flatten, color → sRGB, bit depth (R12) +│ ├── metadata.rs # EXIF/ICC/XMP carry, orientation-tag patch (R11) +│ ├── output.rs # StagedOutput, persist_noclobber, (n) naming (R14) +│ ├── job.rs # JobRunner, semaphore, events, summary (R15) +│ └── error.rs # ConversionError kinds + user messages +├── tests/ +│ ├── fixtures/{samples,corrupt}/ +│ ├── conversions.rs # generated 57-pair matrix +│ ├── detect.rs naming.rs output_safety.rs metadata.rs corrupt.rs svg_security.rs +│ └── perf.rs # #[ignore] budget checks +└── fuzz/ # cargo-fuzz target: detect_format +src-tauri/ # Tauri shell (thin) +├── src/{main.rs, lib.rs, commands.rs, state.rs} +├── capabilities/default.json # dialog + scoped opener only +├── tauri.conf.json # CSP, bundle targets, resources (pdfium) +├── resources/pdfium/ # filled by scripts/fetch-pdfium.sh (not committed) +└── tests/ipc_contract.rs +src/ # Svelte 5 UI +├── App.svelte +├── lib/ +│ ├── ipc.ts # typed wrappers for contracts/ipc.md +│ ├── state.svelte.ts # file list, job state (runes) +│ └── components/ # DropZone, FileList, FileRow, TargetPicker, OptionsPanel, +│ # NoticeBanner, BatchSummary, LiveAnnouncer +└── **/*.test.ts # Vitest + Testing Library + axe +e2e/ # WebdriverIO specs: convert-single, batch-failure, cancel +scripts/fetch-pdfium.sh # pinned version + SHA-256 per platform +.github/workflows/ci.yml # macOS/Ubuntu/Windows matrix (R18) +``` + +**Structure Decision**: A Cargo workspace with the conversion engine in `crates/core`, kept apart +from the Tauri shell in `src-tauri` (Constitution III: core testable without the GUI). The Svelte +UI uses the standard Tauri layout at the repo root (`src/`). No separate CLI crate is built +(YAGNI): core integration tests exercise the engine directly. + +## Implementation phasing (input for `/speckit-tasks`) + +1. **Foundation**: Workspace, Tauri + Svelte scaffold, CI matrix, `format.rs` detection, + `output.rs` safety, `Converter`/registry skeleton, fixtures. Run the **R5 HEIC spike** and the + **R4 AVIF benchmark** early. +2. **US1 (P1)**: Raster decoders (JPG/PNG/WebP/AVIF/TIFF/GIF/HEIC), encoders + (JPG/PNG/WebP/AVIF), normalize + metadata, and a single-file UI flow with accessibility. +3. **US2 (P2)**: JobRunner batch, progress channel, cancel, summary, skipped/notice UI. +4. **US3 (P2)**: PDF decoder (PDFium) and PDF encoder (combine/separate, reorder UI, DPI option). +5. **US4 (P3)**: SVG decoder (resvg + safe resolver), ICO encoder, SVG tracing encoder + photo + warning. +6. **Polish**: Performance budget tests, network-silence check, installers for 3 OSes, + quickstart validation on each OS. + +## Complexity Tracking + +| Violation / Addition | Why Needed | Simpler Alternative Rejected Because | +|----------------------|------------|--------------------------------------| +| Bundled PDFium dynamic library (external binary, Principle VIII) | FR-010 needs a reliable rendering of real-world PDFs on all 3 OSes | `hayro` (pure Rust) describes itself as experimental. `mupdf` is AGPL. OS PDF APIs differ per platform (Principle II) | +| C codec libraries compiled from vendored source (libwebp, dav1d; libheif only as fallback) | Lossy WebP encoding (FR-008/SC-010) and AVIF decoding have no production-grade pure-Rust option | Lossless-only WebP fails SC-010. The pure-Rust AV1 decoder (`rav1d`) is an option to re-evaluate later | +| Possible AVIF encoder swap — *only if `ravif` misses the < 3 s SC-002 budget in T039* | AV1 encoding is much heavier than other codecs | `libavif` + SVT-AV1 would add a C/CMake build on 3 platforms; adopt only with measured numbers | diff --git a/specs/001-image-conversion-mvp/quickstart.md b/specs/001-image-conversion-mvp/quickstart.md new file mode 100644 index 0000000..9fcd0a3 --- /dev/null +++ b/specs/001-image-conversion-mvp/quickstart.md @@ -0,0 +1,78 @@ +# Quickstart & Validation: Image Conversion MVP + +How to build, run, and prove the feature works end to end. See [contracts/](./contracts/) and +[data-model.md](./data-model.md) for interface details. + +## Prerequisites + +| Tool | Version | +|------|---------| +| Rust | stable (≥ 1.85), `rustup component add clippy rustfmt` | +| Node.js | 22 LTS + pnpm 9 | +| Tauri prerequisites | per platform: Xcode CLT (macOS); `libwebkit2gtk-4.1-dev build-essential libssl-dev libayatana-appindicator3-dev librsvg2-dev` (Ubuntu 22.04+); MSVC Build Tools + WebView2 (Windows) | +| NASM / Meson | only if the dav1d build requires them on your platform (see the `avif-native` notes) | + +## Setup + +```bash +pnpm install +./scripts/fetch-pdfium.sh # downloads the pinned PDFium build and verifies its SHA-256 +``` + +## Run + +```bash +pnpm tauri dev # development app +pnpm tauri build # installers in src-tauri/target/release/bundle/ +``` + +## Automated validation + +```bash +cargo fmt --all --check +cargo clippy --workspace --all-targets -- -D warnings +cargo test --workspace # unit + 57-pair fixture matrix + safety/metadata tests +cargo test -p largsform-core --release -- --ignored perf # performance budget checks (SC-002/003) +pnpm lint && pnpm check && pnpm test # ESLint, svelte-check/tsc, Vitest + axe +pnpm e2e # WebdriverIO + tauri-driver (Ubuntu/Windows) +``` + +Expected: all pass. The fixture matrix reports `57/57 pairs OK`. + +## Manual scenarios (run on macOS, Ubuntu, and Windows; SC-004) + +Sample files are in `crates/core/tests/fixtures/` (`samples/` holds valid files, `corrupt/` holds +broken ones). + +| # | Scenario | Steps | Expected | +|---|----------|-------|----------| +| 1 | Single HEIC → JPG (US1) | Drag `samples/iphone.heic` into the window, choose JPG, Convert | `iphone.jpg` appears next to the source, upright, with the same dimensions. The source is unchanged. Done in < 1 s | +| 2 | Keyboard only (FR-030) | Without the mouse: Tab to "Add files", pick a file, choose a target, Convert, open the output | Every step is reachable. Focus is always visible. The screen reader announces "Converted 1 file" | +| 3 | Metadata kept (FR-015) | Convert `samples/gps.jpg` → PNG, then inspect it with `exiftool` | Camera model, DateTimeOriginal and GPS are present, and Orientation = 1 | +| 4 | Transparency → JPG | `samples/alpha.png` → JPG | A notice is shown first. Transparent areas are white | +| 5 | Collision | Convert `photo.png` → JPG twice | `photo.jpg`, then `photo (1).jpg`. The first file is untouched | +| 6 | Batch + failure (US2) | Add 50 mixed samples + `corrupt/truncated.webp`, convert to PNG | 50 done, 1 failed with a readable reason. The summary shows 50/1/0 | +| 7 | Cancel (US2) | Start a batch of 100 large images, press Cancel | The UI shows cancelled within 1 s. There are no partial files and no `.largsform-*` leftovers | +| 8 | Images → one PDF (US3) | Add 3 images, reorder them, choose PDF (Combine) | One 3-page PDF in the new order, each page sized to its image | +| 9 | PDF → PNG (US3) | `samples/5-pages.pdf` → PNG at 300 DPI | `5-pages-page-1.png` … `-page-5.png`, at 300 DPI pixel size | +| 10 | Protected PDF | `samples/protected.pdf` → JPG | Fails with "Password-protected PDFs aren't supported yet". No output | +| 11 | PNG → ICO (US4) | `samples/logo-512.png` → ICO | One `.ico` containing the 16…256 sizes | +| 12 | PNG → SVG (US4) | `samples/logo-flat.png` → SVG, open it in a browser at 400% | Vector shapes, sharp when zoomed | +| 13 | Photo → SVG warning | `samples/photo.jpg` → SVG | A "stylized result / large file" notice is shown before converting | +| 14 | SVG with remote image | `samples/remote-href.svg` → PNG while monitoring the network | Renders without the remote image, shows a notice, and makes **zero** network requests (SC-008) | +| 15 | Wrong extension | `samples/png-named.jpg` → WebP | Detected as PNG and converts successfully | +| 16 | Offline | Disable networking and repeat scenario 1 | Works the same | + +## Performance spot-checks (release build, mid-range machine) + +| Check | Budget | +|-------|--------| +| Cold start to interactive window | < 2 s | +| Idle memory | < 150 MB | +| 12 MP photo → JPG / PNG / WebP / PDF / ICO (incl. HEIC → JPG) | < 1 s each | +| 12 MP JPG → AVIF | < 3 s | +| 12 MP photo → SVG / flat-color logo → SVG | < 10 s / < 2 s | +| PDF → image, per page at 150 DPI | < 1 s | +| 100 × 12 MP photos → JPG | < 60 s | +| Cancel → shown as cancelled, no output | < 1 s | +| Force-quit mid-conversion, relaunch | No `.largsform-*` files remain in the output folder | diff --git a/specs/001-image-conversion-mvp/research.md b/specs/001-image-conversion-mvp/research.md new file mode 100644 index 0000000..0ab6009 --- /dev/null +++ b/specs/001-image-conversion-mvp/research.md @@ -0,0 +1,280 @@ +# Research: Image Conversion MVP + +**Feature**: [spec.md](./spec.md) | **Plan**: [plan.md](./plan.md) | **Date**: 2026-12-03 + +Each entry records the decision, why it was chosen, and the alternatives considered. Items marked +**Spike** must be confirmed by an early task, against the fixture corpus, before dependent work +starts. Each spike names a fallback that has already been evaluated. + +--- + +## R1. Overall conversion architecture (57 pairs) + +- **Decision**: Use a two-stage pipeline: **Decoder** (input format → normalized images) then + **Encoder** (normalized images → output format). Each `(decoder, encoder)` pair is wrapped in a + `PipelineConverter` that implements the common `Converter` trait. The registry builds all + 9×7 − 6 = 57 pairs from the decoder and encoder lists. A pair-specific converter can override + the generic pipeline when needed (none are planned for the MVP). +- **Rationale**: Constitution III requires every conversion to sit behind one trait and be + discovered through a registry. Building 9 decoders and 7 encoders (16 units) is far cheaper + than 57 hand-written converters and keeps behavior consistent (orientation, metadata, color, + naming). +- **Alternatives considered**: One converter per pair (57 units of mostly duplicated code). Going + through an intermediate file format (loses metadata and alpha, and is slower). + +## R2. General raster codecs (JPG, PNG, TIFF, GIF, WebP decode, AVIF decode) + +- **Decision**: Use the `image` crate (0.25.x) with features `jpeg`, `png`, `tiff`, `gif`, + `webp` and `ico`. AVIF is decoded by `heifer` (see R5), not by `image`. +- **Implementation note (2026-12-03)**: `image`'s `avif-native` feature was dropped. It links the + system dav1d library, which would mean an extra native dependency on each platform + (Constitution II/VIII). `heifer`'s pure-Rust AV1 decoder (`avif` feature) replaces it. +- **Rationale**: This is the de facto standard, mostly pure-Rust codec set. Since 0.25.8 it + provides `ImageDecoder::orientation()`, `apply_orientation`, ICC and EXIF access, and allocation + `Limits` (needed for the "image too large" edge case). +- **Alternatives considered**: Calling each format's crate directly (more glue code). OS image + APIs such as ImageIO and WIC (behavior differs per platform, which breaks Constitution II). + +## R3. WebP encoding (lossy, quality-controlled) + +- **Decision**: Use the `webp` crate (libwebp compiled from vendored source through + `libwebp-sys`, BSD-3). +- **Rationale**: FR-008 needs lossy encoding with a quality setting. `image`'s WebP encoder is + lossless only. +- **Alternatives considered**: `image` lossless WebP (files often larger than the JPG source, + which fails SC-010). The `cwebp` sidecar binary (a separate process to manage, and Principle + VIII says to avoid it). + +## R4. AVIF encoding + +- **Decision**: Use `ravif` (rav1e, pure Rust, BSD-2) at encoder speed 8, quality mapped from the + 1–100 setting, with multi-threading. +- **Rationale**: Pure Rust, so no extra system libraries to ship. +- **Budget**: SC-002 sets AVIF output at < 3 s for 12 MP. Benchmark speeds 6/8/10 in T039 and + pick the slowest (best-quality) speed that meets the budget. If none does, evaluate the + `libavif` + SVT-AV1 bindings. +- **Alternatives considered**: `libavif` + libaom/SVT-AV1 (faster, but C and CMake builds on 3 + platforms). The `avifenc` sidecar (separate process, Principle VIII). +- **T039 result (2026-12-03, Apple M5 Pro, release build, 12 MP, quality 90)**: + + | Speed | Time | Size | EXIF embedded | + |-------|------|------|---------------| + | 6 | 1.70 s | 2.7 MB | yes | + | 8 | 1.48 s | 2.7 MB | yes | + | 10 | 0.36 s | 3.9 MB | yes | + + **Chosen: speed 8** (`encode::avif::AVIF_SPEED`). Speed 6 also met the budget on this machine, + but it gave the same file size with less headroom on slower hardware, so the budget margin + wins. `ravif::Encoder::with_exif` embeds EXIF (Q3 resolved: no container patching needed). + `ravif` cannot embed ICC profiles, so AVIF output is converted to sRGB first (R12). + +## R5. HEIC/HEIF decoding — **Spike** + +- **Decision (updated 2026-12-03)**: Use **`heifer`** 0.10 (pure Rust HEIF/HEVC + AV1 decoding, + MIT/Apache-2.0) behind the `Decoder` trait. The originally planned `heic` crate is + **AGPL-3.0**, which is incompatible with distributing Largsform under a permissive license, so + it was rejected during setup. `heifer` also decodes AVIF (R2) and exposes EXIF, XMP, ICC, + `irot`/`imir` transforms and multi-image files. +- **T038 result (2026-12-03, Apple M5 Pro, release build)**: **Pass.** 12 MP (4032×3024, + grid-coded) decode best of 3 = 0.014 s; PSNR against the source pixels = 45.0 dB (≥ 40 dB). + Fixture checks: 8-bit (`iphone.heic`), 10-bit Display P3 grid (`iphone-10bit-p3.heic`, ICC + extracted byte-for-byte) and `android.heif` decode with EXIF. Caveats: the fixtures are + synthetic (encoded by `heifer` itself, see tests/fixtures/SOURCES.md), so a cross-check against + real iPhone/Samsung files and a libheif reference decode is still owed before release; no + multi-image `burst.heic` fixture yet (the `FirstImageOnly` path is covered by code review only). + The libheif fallback is not needed. +- **Spike acceptance**: Decode correctly 8-bit and 10-bit iPhone HEIC (including grid/tiled + primary images), HEIF from Android and Samsung phones, and extract EXIF and ICC. Results must + visually match the reference output (PSNR ≥ 40 dB against a libheif decode). Performance must be + under 1 s for 12 MP. +- **Fallback**: `libheif-rs` with the `embedded-libheif` feature (builds libheif statically + through CMake) plus a vendored libde265 build. Both are LGPL-3.0: link them dynamically, or + provide relinkable objects, and record this in the license review. +- **Rationale**: Constitution VIII prefers pure-Rust crates, and Constitution II needs identical + behavior on all three platforms without system packages. +- **Alternatives considered**: OS codecs (Windows needs a paid HEVC extension, so they fail + Constitution II). `heifer` and `ente-io/heic-decoder` (newer, less adoption; keep as secondary + candidates for the spike). +- **Legal note**: HEVC may be covered by third-party patents. Decoding only is the common practice + of open-source viewers. Record this in the license review (Constitution: Technology + Constraints). Owner sign-off is required before the first public release. + +## R6. PDF rendering (PDF → images) + +- **Decision**: Use `pdfium-render` bound at runtime to a **prebuilt PDFium dynamic library** + (bblanchon/pdfium-binaries, BSD-3/Apache-2.0). The library is pinned by release tag, verified by + SHA-256 in `scripts/fetch-pdfium.sh`, and shipped as a Tauri bundle resource on each platform. +- **Rationale**: PDFium is Chrome's renderer and handles real-world PDFs (forms, fonts, + transparency, broken files) far better than any pure-Rust option today. It adds about 5–6 MB + per platform, within the installer budget. +- **Alternatives considered**: `hayro` (pure Rust and promising, but self-described as + experimental; re-evaluate once it is stable, since it would remove the binary). `mupdf` (AGPL, + not acceptable). `pdfium-render` with the `static` feature (needs a custom PDFium build per + platform). +- **Complexity Tracking**: This is an external binary, so it is justified in the plan. + +## R7. PDF writing (images → PDF) + +- **Decision**: Use `pdf-writer` (from the Typst project, pure Rust, MIT/Apache). Each page is + sized to its image at 72 pt per inch, using the image's DPI metadata when present and 96 DPI + otherwise. Images are embedded as DCT (JPEG, quality 90) for opaque images, and as + Flate-compressed RGB plus an SMask for images with transparency. +- **Rationale**: Small, fast, and gives exact control over page size and image embedding. +- **Alternatives considered**: `printpdf` (larger API surface than needed). `lopdf` (lower level + for writing). Passing JPEG bytes through unchanged without re-encoding (lossless for JPG→PDF, + but needs separate orientation handling; deferred until after the MVP, per Principle VIII). + +## R8. SVG rendering (SVG → images) + +- **Decision**: Use `resvg`/`usvg`/`tiny-skia` (pure Rust). Use a custom `ImageHrefResolver` that + allows only `data:` URIs and refuses `http(s):` and `file:` references. Load system fonts with + `fontdb`. Render at the declared size × the chosen scale (1×, 2×, or 4×). When an SVG has no + declared size, use its viewBox size, or 512×512 when it has neither. +- **Rationale**: The reference Rust SVG renderer. The resolver enforces FR-012 and Constitution I + (no network or file access driven by untrusted SVG input), and reports skipped resources. + +## R9. Raster → SVG tracing + +- **Decision**: Use `vtracer` (pure Rust, MIT): color mode, spline curves, and automatic presets + (preset "photo" when the image has many unique colors, "poster" otherwise). Detection uses a + sampled unique-color count, with the threshold tuned on fixtures. +- **Rationale**: Delivers the Q3/FR-016 answer of real vector shapes in full color. +- **Photo warning**: An image counts as photographic when, after sampling, it has more than 4,096 + unique colors. The UI warns about this before conversion. +- **Alternatives considered**: `potrace` (black-and-white only, GPL). Wrapping the original pixels + in an SVG (rejected by Q3). + +## R10. ICO encoding + +- **Decision**: Use `image`'s `IcoEncoder::write_images` with PNG-compressed entries at + 16/32/48/64/128/256 pixels. Sizes larger than the source are skipped. Non-square images are + centered on a transparent square canvas. Downscaling uses Lanczos3. +- **Rationale**: Already a dependency, and multi-size ICO is supported. + +## R11. Metadata preservation (Q2: keep all, FR-015) + +- **Decision**: + 1. Read EXIF, ICC, and XMP from the decoder (`image` metadata APIs; HEIF metadata items through + the HEIC decoder). + 2. Apply orientation to the pixels, then set EXIF tag 0x0112 to 1 using a small in-house IFD0 + patcher that edits the existing EXIF block in place. No other EXIF tags are touched. + 3. Write the metadata with `img-parts` (pure Rust) after encoding, for JPG, PNG, and WebP + (EXIF + ICC + XMP). For AVIF use the encoder's EXIF support (verify in the R5/R4 spikes; + fallback: an ICC-only container). + 4. AVIF: FR-015 applies (AVIF can store EXIF). If `ravif` cannot write EXIF (spike Q3), add + an `Exif` item to the AVIF container after encoding (ISO-BMFF `iinf`/`iloc`/`iref cdsc` + edit in `metadata.rs`), and verify it with `exiftool` in tests. + 5. ICO, SVG: drop metadata (the formats cannot carry it). + 6. PDF: copy the date taken to the document info `CreationDate`; drop the rest. +- **Rationale**: Encoder-agnostic and testable: compare EXIF before and after. `image`'s + `set_exif_metadata` support varies by encoder, so post-write injection is more predictable. +- **Alternatives considered**: `little_exif` (full EXIF rewrite, more than needed). `exiftool` + sidecar (Perl, rejected). + +## R12. Color management (FR-014) + +- **Decision**: Targets that can embed ICC (JPG, PNG, WebP, AVIF) keep the source pixels + unchanged and embed the source ICC profile, which is lossless and needs no conversion. Targets + without ICC support (ICO, SVG tracing, PDF pages) are converted to sRGB with `qcms` (pure Rust, + from Firefox). High-bit-depth sources (16-bit PNG/TIFF, 10-bit HEIC) are dithered down to 8-bit + only when the target is 8-bit. HDR gain maps are ignored, and the SDR base image is used. +- **Rationale**: Gives the most faithful result while doing the least work. +- **Alternatives considered**: `lcms2` (C dependency, not needed for the profiles in scope). + Always converting to sRGB (loses Display P3 color on targets that support it). + +## R13. Format detection (FR-002) + +- **Decision**: A small in-house sniffer over the first 4 KB of a file: + - Magic bytes for JPEG, PNG, GIF, TIFF (II*/MM*), WebP (RIFF+WEBP), and PDF (`%PDF-`). + - An ISO-BMFF `ftyp` brand check: `heic`/`heix`/`mif1`/`msf1` → HEIC; `avif`/`avis` → AVIF. + - SVG: an optional BOM, an optional XML prolog or comments, then an `