import { readFileSync } from 'fs'; import { join } from 'path'; // Read CSS once at module load const layoutCSS = readFileSync(join(import.meta.dirname, 'layout.css'), 'utf-8'); function escapeHtml(str) { return str .replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } export function htmlLoginPage(options) { const { error, allowSignup = true, status = 200 } = options || {}; const title = allowSignup ? 'Login / Sign Up' : 'Login'; const html = ` ${title}

Welcome

Login to your account or create a new one

${error ? `
${escapeHtml(error)}
` : ''}

Login

${allowSignup ? `

Sign Up

` : ''}
`; return new Response(html, { status, headers: { 'Content-Type': 'text/html; charset=utf-8', }, }); } //# sourceMappingURL=htmlLoginPage.js.map