{
const active = document.activeElement;
if (!$refs.emailInput || active !== $refs.emailInput) return;
if ((active?.tagName === 'INPUT' || active?.tagName === 'TEXTAREA')
&& $refs.emailInput && !$refs.emailInput.contains($event.target)) {
active.blur();
}
})()"
class="flex flex-col" style="height: var(--app-height, 100dvh)">
( )
( )
{
const dialog = $event.target.closest('[role=dialog]');
const focusable = [...dialog.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\'-1\'])')].filter(el => !el.disabled && el.offsetParent !== null);
if (!focusable.length) return;
const idx = focusable.indexOf(document.activeElement);
const next = $event.shiftKey
? focusable[(idx - 1 + focusable.length) % focusable.length]
: focusable[(idx + 1) % focusable.length];
next.focus();
})()"
role="dialog" aria-modal="true"
aria-labelledby="preview-title"
class="fixed inset-0 z-50 bg-black/80 flex items-center justify-center p-4"
style="display: none;">