1window.initCounters = () => { 2 const counters = document.querySelectorAll(".counter"); 3 if (!counters.length) { 4 return; 5 } 6 7 const parseNumber = (value) => { 8 const normalized = (value ?? "0").toString().replace(/\D/g, ""); 9 const parsed = Number(normalized); 10 return Number.isFinite(parsed) ? parsed : 0; 11 }; 12 13 const animateCounter = (counter) => { 14 if (counter.dataset.counterStarted === "true") { 15 return; 16 } 17 18 counter.dataset.counterStarted = "true"; 19 const target = parseNumber(counter.dataset.target); 20 const step = Math.max(1, Math.ceil(target / 200)); 21 22 const update = () => { 23 const currentValue = parseNumber(counter.innerText); 24 if (currentValue < target) { 25 const nextValue = Math.min(target, currentValue + step); 26 counter.innerText = nextValue.toLocaleString("pt-BR"); 27 requestAnimationFrame(update); 28 return; 29 } 30 31 counter.innerText = target.toLocaleString("pt-BR"); 32 }; 33 34 update(); 35 }; 36 37 if (!("IntersectionObserver" in window)) { 38 counters.forEach(animateCounter); 39 return; 40 } 41 42 const observer = new IntersectionObserver((entries, currentObserver) => { 43 entries.forEach((entry) => { 44 if (!entry.isIntersecting) { 45 return; 46 } 47 48 animateCounter(entry.target); 49 currentObserver.unobserve(entry.target); 50 }); 51 }, { threshold: 0.25 }); 52 53 counters.forEach((counter) => { 54 if (counter.dataset.counterBound === "true") { 55 return; 56 } 57 58 counter.dataset.counterBound = "true"; 59 observer.observe(counter); 60 }); 61};
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.