# Frontend JS Dependency Audit **Version:** v0.28.3 cs2 **Date:** 2026-03-13 **Purpose:** Map every global, cross-file dependency, and init sequence to prepare for module extraction. --- ## Summary | Metric | Value | |--------|-------| | JS files | 47 | | Total lines | 25,056 | | Total bytes | 1,103,572 (~1.1 MB) | | Top-level globals (original) | 431 | | IIFE-wrapped files | 47 (all) | | Explicit `window.*` exports | ~215 | | Functions privatized | ~168 | | Implicit globals remaining | 0 | | Vendor libs | 3 (marked.min.js, purify.min.js, codemirror.bundle.js) | | Inline `onclick` handlers (templates) | ~50 unique functions | | Dynamic `onclick` in JS (innerHTML) | 143 total occurrences | --- ## Architecture: IIFE Modules (Post-Decomposition) No module system (no ES modules, no bundler, no AMD). Every file is a ` ``` Import graph follows the dependency order already established by `