1import{d as S,W as s,c as _,D as B,az as T,f as L,w as g,bh as M,o as t,e as a,g as p,i as w,a1 as y,a2 as h,h as r,t as k,p as C}from"./D1qLZR8X.js";const E=globalThis.setInterval,I={class:"flex min-w-10 items-center justify-center rounded-lg border border-countdownBorder bg-countdownBackground px-3 py-2 font-body font-bold text-sm tabular-nums text-countdownDigit"},z={key:0,class:"font-body font-medium text-xxs capitalize tracking-wide text-countdownLabel"},j={key:0,class:"font-body font-medium text-xxs capitalize tracking-wide text-countdownLabel opacity-50"},F=S({__name:"globalCountdownTimer",props:{endDate:{},containerClass:{default:""},showLabels:{type:Boolean},onExpire:{type:Function,default:void 0}},setup(o){const c=o,i=s(0),u=s(0),d=s(0),m=s(0),v=s(!1);let n=null;const D=_(()=>[{value:String(i.value).padStart(2,"0"),label:"countdownDays"},{value:String(u.value).padStart(2,"0"),label:"countdownHours"},{value:String(d.value).padStart(2,"0"),label:"countdownMinutes"},{value:String(m.value).padStart(2,"0"),label:"countdownSeconds"}]),x=()=>{const f=new Date().getTime(),e=new Date(c.endDate).getTime()-f;if(e<=0){i.value=0,u.value=0,d.value=0,m.value=0,v.value=!0,n&&(clearInterval(n),n=null),c.onExpire&&c.onExpire();return}i.value=Math.floor(e/(1e3*60*60*24)),u.value=Math.floor(e%(1e3*60*60*24)/(1e3*60*60)),d.value=Math.floor(e%(1e3*60*60)/(1e3*60)),m.value=Math.floor(e%(1e3*60)/1e3)};return B(()=>{x(),n=E(x,1e3)}),T(()=>{n&&clearInterval(n)}),(f,b)=>{const e=M;return t(),L(e,null,{fallback:g(()=>[r("div",{class:C(["flex items-center gap-2",o.containerClass])},[(t(),a(y,null,h(4,l=>r("div",{key:l,class:"flex flex-col items-center"},[b[0]||(b[0]=r("div",{class:"flex min-w-10 animate-pulse items-center justify-center rounded-lg border border-countdownBorder bg-countdownBackground px-3 py-2 font-body font-display text-sm tabular-nums text-transparent"}," 00 ",-1)),o.showLabels?(t(),a("span",j," -- ")):p("",!0)])),64))],2)]),default:g(()=>[w(v)?p("",!0):(t(),a("div",{key:0,class:C(["flex items-center gap-2",o.containerClass])},[(t(!0),a(y,null,h(w(D),l=>(t(),a("div",{key:l.label,class:"flex flex-col items-center"},[r("div",I,k(l.value),1),o.showLabels?(t(),a("span",z,k(f.$t(l.label)),1)):p("",!0)]))),128))],2))]),_:1})}}}),O=Object.assign(F,{__name:"GlobalCountdownTimer"});export{O as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.