// The HTML document around the app's streamed body. bankai owns the // (charset, viewport, title, asset links) and the tail // (window.initialState + ); the app's view owns . // Page scripts live in (type=module defers itself); the one // exception is the initialState script, which must be inline and is // emitted after the body — inline scripts execute during parse, module // scripts only after it, so the order still holds. export function documentHead ({ title, css = [], modulepreload = [], scripts = [] }) { let head = '\n\n\n\n\n' if (title) head += `${escapeHtml(title)}\n` for (const href of css) { head += `\n` } for (const href of modulepreload) { head += `\n` } for (const src of scripts) { head += `\n` } head += '\n' return head } export function documentTail (state) { return `\n\n\n` } // choo internals that every boot recomputes \u2014 no point shipping them const RECOMPUTED = new Set(['events', 'cache', 'prefetch']) // JSON that is safe to embed in an inline ' or // '