// Generated, do not edit. sha256:2c8b0cb9cf7b6e6878eecfd14445f87e0333bfc949df19e5e2747b65137b5411 import { getSettings, updateSettings } from '../data/preferences.js'; import { t, setLocale, LOCALES as CATALOGUES } from '../i18n/index.js'; import { CONFIG, ENUMS, PREFERENCES } from '../../shared/config.js'; import { setPageHint } from '../ui/page-hint.js'; import { esc } from '../ui/escape.js'; import { locked } from '../license.js'; const LOCALES = Object.keys(CATALOGUES); const GLOW_GLASS = Object.freeze({ off: { glow: 'off' }, still: { glow: 'on', motion: 'off' }, step: { glow: 'on', motion: 'step' }, always: { glow: 'on', motion: 'always' }, }); const GLOW_BUSINESS = Object.freeze({ off: { glow: 'off' }, on: { glow: 'on' } }); export function glowChoice(s) { if (s.glow === 'off') return 'off'; if (s.profile !== 'glass') return 'on'; return s.motion === 'off' ? 'still' : (s.motion || 'step'); } export function glowPatch(profile, choice) { const table = profile === 'glass' ? GLOW_GLASS : GLOW_BUSINESS; return Object.hasOwn(table, choice) ? { ...table[choice] } : null; } const media = q => typeof matchMedia === 'function' && matchMedia(q).matches; export async function render(el) { const s = await getSettings(); const glass = s.profile === 'glass'; const business = !glass; const glowVisible = glass || s.depth === 'deep'; const motionBlocked = glass && s.glow !== 'off' && s.motion !== 'off' && media('(prefers-reduced-motion: reduce)'); const transparencyBlocked = glass && media('(prefers-reduced-transparency: reduce)'); const persona = !locked('signals'); const kiosk = !locked('kiosk'); const glowOptions = glass ? [['off', t('settings.glowOff')], ['still', t('settings.glowStill')], ['step', t('settings.glowStep')], ['always', t('settings.glowAlways')]] : [['off', t('settings.glowOff')], ['on', t('settings.glowOn')]]; el.innerHTML = `