1!function(t){const e=window.location.origin+"/wp-json/hh-api/v3/";function n(e,n){function i(){const i=(new Date).getTime(),a=new Date(e.event_start).getTime(),s=parseInt(e.event_duration)||0,o="1"===e.is_recurring,l=parseInt(e.event_interval)||0,c=36e5;let d,m=a;if(o){const t=l*c,e=s*c,n=i-a,r=a+Math.floor(n/t)*t,o=r+e;i>=r&&i<o?(m=r,d=o):(m=r+t,d=m+e)}else d=new Date(e.event_end).getTime(),m=a;const v=i>=m&&i<d,p=v?"Active":"Starts in",$=(v?d:m)-i,h=function(t,e,n,i,r,a){if(i){const i=n-e,r=t-e;return Math.max(0,Math.min(100,r/i*100))}if(r){const n=36e5*a,i=n-(e-t);return Math.max(0,Math.min(100,i/n*100))}const s=n-e,o=s-(e-t);return Math.max(0,Math.min(100,o/s*100))}(i,m,d,v,o,l);let f="normal";if("Active"==p&&(f="active"),$<c&&(f="critical"),$<=0&&!o)return clearInterval(r),void t(`#rsl-event-timer-${e.id}`).remove();const g=Math.floor($/1e3),u=String(Math.floor(g/86400)),w=String(Math.floor(g%86400/3600)).padStart(2,"0"),M=String(Math.floor(g%3600/60)).padStart(2,"0"),_=String(g%60).padStart(2,"0");if(t(`#rsl-event-timer-${e.id}`).length){const n=t(`#rsl-event-timer-${e.id}`);n.find(".timer-date").html(`\n <span class="timer-name ${f}">${e.event_name} ${p}</span>\n <span class="timer-time">${u>0?u+"d":""} ${w}:${M}:${_}</span>\n `),n.find(".timer-status").text(p).removeClass("active waiting").addClass(v?"active":"waiting");const i=n.find(".timer-progress-fill"),r=n.find(".timer-progress-text");i.css("width",`${h}%`),i.removeClass("critical active normal").addClass(f),r.text(`${Math.round(h)}%`)}else t(n).append(`<div id="rsl-event-timer-${e.id}" class="rsl-event-timer">\n <img src="${e.event_icon}" alt="${e.event_name}" class="timer-image" />\n <div class="timer-details">\n <div class="timer-date">\n <span class="timer-name ${f}">${e.event_name} ${p}</span>\n <span class="timer-time">${u>0?u+"d":""} ${w}:${M}:${_}</span>\n </div>\n <div class="timer-progress-container">\n <div class="timer-progress-bar" id="progress-${e.id}">\n <div class="timer-progress-fill ${f}" style="width: ${h}%"></div> \n </div>\n </div>\n </div> \n </div>`);return!0}if(!1===i())return;const r=setInterval((()=>{!1===i()&&clearInterval(r)}),1e3)}t(".rsl-event-timers-container").length&&async function(){try{const n=await t.ajax({url:`${e}event-timers`,method:"GET",dataType:"json"});if(!n)throw new Error("Network response was not ok");return n||[]}catch(t){}}().then((e=>{e.length&&t(".rsl-event-timers-container").each(((i,r)=>{const a=t(r).data("timer"),s=e.find((t=>parseInt(t.id)===a));s&&n(s,r)}))}))}(jQuery);
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.