Decoder replacement and build inputs (11 October 2026) The module is a separate public/photo-decoder/libheif-1.23.6/decoder.js ES module, loaded by worker.js for HEIC photos. Browser-native original HEIC decoding cannot bypass the checked SDR/still/orientation gates. No image is sent to an external converter. This version is asm.js, not WebAssembly. Exact heic-to npm package 1.6.6: https://registry.npmjs.org/heic-to/-/heic-to-1.6.6.tgz SHA-512: PYpOtPFEzgPxIoGF4LQ+oBD8o/tMvcFDNynrNzK1fLXfE6mTe2W+AHOvBKc5MwnVak4/Pnb51g9CJAtWL5YGWA== Only src/lib/libheif-without-unsafe-eval.js is used. No heicTo wrapper code is included. upstream-decoder.js.gz decompresses to that exact source asset. libheif tag v1.23.6 source and libde265 tag v1.0.16 source are mirrored here. The upstream recipe (upstream-build.txt) specifies LIBDE265_VERSION=1.0.16 USE_UNSAFE_EVAL=0 USE_WASM=0, and its llvm-nm adjustment. Start with the provided source archives and recipe to rebuild an upstream-compatible decoder. The Emscripten compiler version used for the upstream npm binary was not published; the supplied generated source is also available directly for modification. To reproduce the reviewed Staff binary from an extracted pinned npm package: node scripts/photo-decoder/vendor-heic.mjs /path/to/extracted/heic-to/package This performs exactly the three documented source substitutions. It has no network access or package install hooks. The script checks the original SHA-256. To substitute your own compatible modified library, copy it to decoder.js. The loader does not check an immutable decoder hash. The worker checks the pinned C ABI versions, RGB/profile/size limits and libheif/de265 versions; update those checks and re-run the native-reference tests if replacing the ABI or codec version. Preserve equivalent allocation, deadline and colour safeguards. You can also replace it in a private copy of the already compiled static web release without any unpublished app source or original build credentials: node photo-decoder/libheif-1.23.6/sources/refresh-web-copy.mjs --private-copy /your/private/static-Staff-copy This uses only Node built-ins and the supplied service-worker template. It recomputes shell and file integrity manifests while preserving the original release's public configuration, scope and other app bytes. The result is marked as your private modification, not an official Tomar release. Use your own host or localhost for that copy. It never deploys, signs, connects to a relay or reads phone IndexedDB. Signed native app modifications need your own rebuild/signing. Rebuild a private release with the existing public relay configuration: node scripts/release/web.mjs --version --output or node scripts/release/bundle.mjs --suite field_staff --version --output Both build the one universal Staff bundle (Staff 1.5.0 and later): the same files the web app serves from the root of its host and the installed apps carry. There is no base path or platform target to choose; the app decides at run time (staff-platform.js.txt). Serve your modified copy from the root of your own host. The build recomputes all shell, source and bundle hashes; there is no fixed allow-list preventing a modified decoder. Do not reuse another release's sw.js or BUILD_INFO.json. Source archives are intentionally excluded from offline precache but remain downloadable alongside decoder.js without extra charge. Relevant build/source inputs are copied here: web.mjs.txt, bundle.mjs.txt, policy.mjs.txt, cli.mjs.txt, storage-tool.mjs.txt, native-version.mjs.txt, staff-platform.js.txt, staff-service-worker.js.txt, staff-heic.js.txt, staff-photo.js.txt, vendor-heic.mjs.txt, worker.js.txt, refresh-web-copy.mjs. worker.js and colour.js are unbundled source. provenance.json names the file each copy was taken from (copied_from) with every size and SHA-256. Use your own test fixture photos. Do not upload them to an image-conversion site. Tomar provides the modification script, loader/worker/colour bridge and the new replacement instructions for replacing this decoder in your own installation. That does not change unrelated app code licences. Runtime qualification note (12 October 2026): the pinned upstream Emscripten recipe uses libde265 1.0.16 and disables HEVC deblocking/SAO. This is older than the separate Owner CPU decoder's 1.1.3 and lacks its newer NAL/SEI/range checks and libheif SPS-bound forwarding. Bounded asm.js heap, input/item/dimension admission, disposable-worker deadline and no-network policy remain enforced; they do not establish native-equivalent hardening or pixel reconstruction. Genuine textured-HEVC regression, representative phone memory/fidelity and codec maintenance review are separate release qualifications.