PageSourceSearch

https://aeromart-toulouse.com/plugins/system/herzogdupont/modules/…/hd-counter/js/hd-counter.js?5.0.47

js aeromart-toulouse.com collected 2026-10-02 15:04:29 UTC 1,810 bytes, 57 lines download raw bytes

1/* Herzog Dupont for YOOtheme Pro Copyright (C) 2019-2026 Thomas Weidlich GNU GPL v3 */
2
3function countUp(el, start, end, duration, separatorLocale) {
4	let range = end - start;
5	let stepTime = Math.abs(Math.floor(duration / range));
6
7	let startTime = new Date().getTime();
8	let endTime = startTime + duration;
9	let timer;
10
11	function count() {
12		let now = new Date().getTime();
13		let remaining = Math.max((endTime - now) / duration, 0);
14		let value = Math.round(end - (remaining * range));
15		el.innerHTML = (separatorLocale === undefined) ? value : value.toLocaleString(separatorLocale, { useGrouping: true });
16		if (value == end) {
17			clearInterval(timer);
18		}
19	}
20
21	timer = setInterval(count, stepTime);
22	count();
23}
24
25UIkit.util.ready(_ => {
26	// Register IntersectionObserver
27	const io = new IntersectionObserver((entries) => {
28		entries.forEach((entry) => {
29			let el = entry.target;
30			if (entry.intersectionRatio > 0 && !el.getAttribute('data-animated')) {
31				let perimeter = 2 * Math.PI * el.dataset.radius,
32					circle = el.querySelector('.counter-value'),
33					numberEl = el.querySelector('.el-number'),
34					svg = el.querySelector('.el-circle');
35
36				if (svg) { svg.setAttribute('id', el.dataset.uniqid); }
37
38				if (circle) {
39					circle.style.strokeDashoffset = perimeter * (1 - el.dataset.percentage / 100);
40					circle.style.strokeDasharray = perimeter;
41				}
42
43				if (numberEl) {
44					countUp(numberEl, 0, el.dataset.number, parseInt(el.dataset.duration), el.dataset.separatorLocale);
45				}
46
47				el.setAttribute('data-animated', true);
48			}
49		});
50	});
51
52	// Declares what to observe, and observes its properties.
53	const counterElList = document.querySelectorAll('.counter-container');
54	counterElList.forEach((el) => {
55		io.observe(el);
56	});
57});

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.