apply_patch previously duplicated the install event listener, causing a ServiceWorker script evaluation error on load. Deduplicate and hoist precacheShell() before the install listener. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>