baldav/frontend/lib
4aiman 5f30af1cf7 ЧЗ scanner: switch decoder to zxing-wasm (ZXing-C++) for reliable DataMatrix
The pure-JS @zxing/library locator is weak on real ЧЗ codes (decoded 1/4 of the
test photos with correct grayscale input; libdmtx and zxing-wasm read 3/4 — the
4th is physically undecodable). Symptom: scanner takes very long to even find a
code, 2 of 4 never read.

- Bundle zxing-wasm reader as an IIFE (frontend/lib/zxing-wasm.js, global
  ZXingWASM) + zxing_reader.wasm; drop frontend/lib/zxing.js. Init fetches the
  .wasm as an arrayBuffer and hands it over as wasmBinary (no streaming/MIME/CDN).
- ChZ.zxReady()/ChZ.decodeImageData() (chzn.js): decode an ImageData -> raw GS1
  bytes (result.bytes keeps the GS separators) with tryHarder/tryRotate/tryInvert.
- Scanner (main.js) rewritten to a canvas loop: crop the central ROI, upscale to
  540px, decode each frame — full-frame search was the slow/unreliable part.
  Photo path decodes the picked image the same way.

Not yet verified on-device (WebView WASM instantiation); decoder logic validated
in a Node harness against the 4 sample photos.
2026-08-27 09:42:05 +03:00
..
chart.min.js Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
chartjs-plugin-zoom.min.js Android support + Settings screen + Mobile UX fixes 2026-05-14 14:17:57 +03:00
hammer.min.js Android support + Settings screen + Mobile UX fixes 2026-05-14 14:17:57 +03:00
jszip.min.js Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
leaflet-rotate.js Compass map rotation, landscape layout, GPS placeholder 2026-06-25 16:54:45 +03:00
leaflet.css Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
leaflet.js Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
marker-icon-2x.png Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
marker-icon.png Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
marker-shadow.png Initial commit: BalDav health tracker 2026-05-13 10:21:24 +03:00
zxing-wasm.js ЧЗ scanner: switch decoder to zxing-wasm (ZXing-C++) for reliable DataMatrix 2026-08-27 09:42:05 +03:00
zxing_reader.wasm ЧЗ scanner: switch decoder to zxing-wasm (ZXing-C++) for reliable DataMatrix 2026-08-27 09:42:05 +03:00