(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".ablocks-block--countdown").forEach(t=>{!function(t){if(!t)return;const e=t?.querySelector(".ablocks-countdown__item--day .ablocks-countdown-value"),o=t?.querySelector(".ablocks-countdown__item--hour .ablocks-countdown-value"),n=t?.querySelector(".ablocks-countdown__item--minute .ablocks-countdown-value"),r=t?.querySelector(".ablocks-countdown__item--second .ablocks-countdown-value"),a=setInterval(()=>{c()},1e3),c=()=>{try{const c=new Date(t.getAttribute("data-target-time")).getTime()-Date.now();if(c<=0)return clearInterval(a),e&&(e.innerHTML="00"),o&&(o.innerHTML="00"),n&&(n.innerHTML="00"),void(r&&(r.innerHTML="00"));const l=Math.floor(c/1e3%60).toString().padStart(2,"0"),u=Math.floor(c/6e4%60).toString().padStart(2,"0"),i=Math.floor(c/36e5%24).toString().padStart(2,"0"),d=Math.floor(c/864e5).toString().padStart(2,"0");e&&(e.innerHTML=d),o&&(o.innerHTML=i),n&&(n.innerHTML=u),r&&(r.innerHTML=l)}catch(t){console.error(t)}};c()}(t)})})})();