1(function(){function dateDiffInDays(date1,date2){const utc1=Date.UTC(date1.getFullYear(),date1.getMonth(),date1.getDate()),utc2=Date.UTC(date2.getFullYear(),date2.getMonth(),date2.getDate());return Math.floor((utc2-utc1)/864e5)}function randomWithSeed(a){return function(){var t=a+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function calcTotalViews(defaults,data){if(data.total===0){const nextRandom=randomWithSeed(data.startDate.getTime()),viewsPerDay=[defaults.total+Math.ceil(nextRandom()*defaults.total*defaults.totalVariance)],dayDiff=dateDiffInDays(data.startDate,data.currentDate);for(let i=0;i<=dayDiff;i++){const views=Math.ceil(defaults.viewsPerDay+(nextRandom()*2-1)*(defaults.viewsPerDay*defaults.totalVariance));viewsPerDay.push(views)}data.todayTotal=viewsPerDay.pop(),data.previousTotal=viewsPerDay.reduce((previous,current)=>previous+current)}const msPerDay=1e3*60*60*24,currentDateStart=new Date(data.currentDate.getTime()).setHours(0,0,0,0),dayProgress=(data.currentDate-currentDateStart)/msPerDay,currentDayViews=Math.ceil(data.todayTotal*dayProgress);data.total=data.previousTotal+currentDayViews}function calcLiveViews(defaults,data){const periodSeconds=60*defaults.livePeriod,currentSeconds=data.currentDate.getMinutes()*60+data.currentDate.getSeconds(),currentVariance=Math.cos(currentSeconds/periodSeconds*2*Math.PI)*defaults.live*defaults.liveVariance,currentAdditionalVariance=Math.sin(currentSeconds/defaults.liveAdditionalPeriod*2*Math.PI)*defaults.liveAddtionialVariance;data.live=defaults.live+Math.round(currentVariance+currentAdditionalVariance)}const visitorsJson=document.querySelector('[data-visitors="json"]'),totalElement=document.querySelector('[data-visitors="total"]'),liveElement=document.querySelector('[data-visitors="live"]');if(!visitorsJson)return;const jsonDefaults=JSON.parse(document.querySelector('[data-visitors="json"]').innerText)||{},defaultData={date:jsonDefaults.date||"2022-01-01",total:jsonDefaults.total||23e3,totalVariance:(jsonDefaults.totalVariance||35)/100,viewsPerDay:jsonDefaults.viewsPerDay||2100,live:jsonDefaults.live||25,liveVariance:(jsonDefaults.liveVariance||35)/100,livePeriod:15,liveAddtionialVariance:1,liveAdditionalPeriod:70,refreshDelay:3},viewData={startDate:new Date(defaultData.date),currentDate:new Date,previousTotal:0,todayTotal:0,total:0,live:0};function refreshLiveViews(){viewData.currentDate=new Date;const oldLive=viewData.live;calcLiveViews(defaultData,viewData),liveElement.innerText=new Intl.NumberFormat().format(viewData.live),viewData.live!==oldLive&&oldLive!==0&&(liveElement.parentElement.classList.add("blink"),setTimeout(()=>liveElement.parentElement.classList.remove("blink"),1e3))}totalElement&&liveElement&&(calcTotalViews(defaultData,viewData),totalElement.innerText=new Intl.NumberFormat().format(viewData.total),refreshLiveViews(),setInterval(refreshLiveViews,defaultData.refreshDelay*1e3))})(); 2//# sourceMappingURL=/cdn/shop/t/18/assets/article.js.map?v=38418514881660539981781185547
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.