export function validateReminderPreferences(value) { if(!value || typeof value!=='object' || Array.isArray(value))throw new Error('Bildirim ayarları geçersiz.'); for(const key of ['pushEnabled','quietEnabled'])if(typeof value[key]!=='boolean')throw new Error('Bildirim seçimini kontrol edin.'); for(const key of ['quietStart','quietEnd'])if(typeof value[key]!=='string'||!/^([01]\d|2[0-3]):[0-5]\d$/.test(value[key]))throw new Error('Sessiz saatleri saat:dakika biçiminde girin.'); return value; } export function quietNow(preferences,now=new Date()) { if(!preferences?.quietEnabled)return false; try {validateReminderPreferences(preferences);}catch{return true;} const minute=text=>Number(text.slice(0,2))*60+Number(text.slice(3)); const start=minute(preferences.quietStart),end=minute(preferences.quietEnd),current=now.getHours()*60+now.getMinutes(); return start<=end ? current>=start&¤t=start||current