function u(t,a,r,e){if(a==="GENERIC"||!t.startAt)return t.label??"";const i=new Date(t.startAt),n=t.endAt?new Date(t.endAt):null,m=a==="DATE_ONLY"?{weekday:"short",day:"2-digit",month:"short",year:"numeric",timeZone:r}:{weekday:"short",day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:r},o=new Intl.DateTimeFormat(e,m).format(i);if(!n)return o;const d=new Intl.DateTimeFormat(e,a==="DATE_ONLY"?{day:"2-digit",month:"short",timeZone:r}:{hour:"2-digit",minute:"2-digit",timeZone:r}).format(n);return`${o} – ${d}`}function f(t,a){const r=new Date(t),e=(r.getTime()-Date.now())/1e3,i=Math.abs(e),n=new Intl.RelativeTimeFormat(a,{numeric:"auto"});return i<60?n.format(Math.round(e),"second"):i<3600?n.format(Math.round(e/60),"minute"):i<86400?n.format(Math.round(e/3600),"hour"):i<86400*7?n.format(Math.round(e/86400),"day"):new Intl.DateTimeFormat(a,{dateStyle:"medium"}).format(r)}export{f as a,u as f};