PageSourceSearch

https://www.hotelarkadia.it/media/templates/site/arkadia/js/arkadia.js?719fad

js hotelarkadia.it collected 2026-10-06 19:00:43 UTC 27,816 bytes, 858 lines download raw bytes

1//##################################### javascript diverse risoluzioni
2var view;
3
4var closeMenu = "chiudi";
5var htmlLang = ($('html').attr('lang'));
6
7const screen = {
8    small: null,
9    medium: window.matchMedia('(min-width: 768px)'),
10    large: window.matchMedia('(min-width: 990px)'),
11    xlarge: window.matchMedia('(min-width: 1400px)')
12};
13
14for (let [scr, mq] of Object.entries(screen)) {
15    try {
16        if (mq) mq.addEventListener('change', mqHandler);
17    } catch (e1) {
18        if (mq) mq.addListener(mqHandler);
19    }
20}
21
22function mqHandler() {
23    let size = null;
24    for (let [scr, mq] of Object.entries(screen)) {
25        if (!mq || mq.matches) size = scr;
26    }
27    view = size;
28    // console.log(size);
29}
30
31mqHandler();
32
33//###################################### fine javascript diverse risoluzioni
34
35
36function menu() {
37
38    // === INIZIO: Variabile per tracciare il menu parent attualmente selezionato (Desktop) ===
39    var currentPreviewItemId = null;
40    // === FINE: Variabile tracking ===
41
42    $("#mobile-nav").click(function (event) {
43        event.preventDefault();
44        const tlMenu = gsap.timeline();
45
46        if (!$(this).hasClass('show-menu')) {
47            tlMenu.to("#nav", {duration: 1.6, autoAlpha: 1, y: 0, ease: "expo.out"}, "<");
48            if (htmlLang == "it") {
49                closeMenu = "Chiudi";
50            }
51            if (htmlLang == "en") {
52                closeMenu = "Close";
53            }
54            if (htmlLang == "de") {
55                closeMenu = " X ";
56            }
57            $(this).find('.text').text(closeMenu);
58            $(this).addClass('show-menu');
59            $('body').addClass('show-menu');
60
61        } else {
62            tlMenu.to("#nav", {duration: 0.8, autoAlpha: 0, y: "-105%", overwrite: true}, "<");
63            $(this).find('.text').text('Menu');
64            $(this).removeClass('show-menu');
65            $('body').removeClass('show-menu');
66
67            // === INIZIO: Reset preview quando si chiude il nav ===
68            hideMenuPreview();
69            currentPreviewItemId = null;
70            $("#menu > li.parent").removeClass('selected');
71            // === FINE: Reset preview ===
72        }
73    });
74
75    const menuLi = $("#menu > li.parent");
76
77    menuLi.find('> span.nav-header').click(function (event) {
78        event.preventDefault();
79        const parentLi = $(this).closest('li');
80        const siblings = parentLi.siblings();
81        const icon = $(".plus", this);
82
83        // === INIZIO: Logica diversa per Desktop vs Mobile ===
84        if (screen.large && screen.large.matches) {
85            // DESKTOP: Mostra preview invece della tendina
86            const itemId = parentLi.attr('class').match(/item-(\d+)/);
87            if (itemId && itemId[1]) {
88                const menuItemId = itemId[1];
89
90                // Toggle: se clicco sullo stesso menu, chiudo la preview
91                if (currentPreviewItemId === menuItemId) {
92                    hideMenuPreview();
93                    currentPreviewItemId = null;
94                    parentLi.removeClass('selected');
95                } else {
96                    // Rimuovi selected da tutti e aggiungi al corrente
97                    siblings.removeClass('selected');
98                    parentLi.addClass('selected');
99
100                    // Mostra la preview con i dati del menu
101                    showMenuPreview(menuItemId);
102                    currentPreviewItemId = menuItemId;
103                }
104            }
105        } else {
106            // MOBILE: Comportamento originale (tendina)
107            // --- Vecchio codice mantenuto ---
108            siblings.removeClass('selected');
109            $(".plus", siblings).text('+');
110            parentLi.addClass('selected');
111            icon.text('-');
112            // --- Fine vecchio codice ---
113        }
114        // === FINE: Logica diversa Desktop vs Mobile ===
115    });
116
117}
118
119// NUOVA VERSIONE: Mostra/nasconde pannelli pre-esistenti nel DOM
120function showMenuPreview(itemId) {
121    const allPanels = document.querySelectorAll('.preview-panel');
122    const targetPanel = document.querySelector('.preview-panel[data-menu-id="' + itemId + '"]');
123
124    if (!targetPanel) {
125        console.warn('Preview panel not found for menu item:', itemId);
126        return;
127    }
128
129    // Nascondi tutti i pannelli prima
130    allPanels.forEach(function(panel) {
131        if (panel !== targetPanel) {
132            gsap.to(panel, {
133                duration: 0.2,
134                opacity: 0,
135                visibility: 'hidden',
136                ease: 'power2.in',
137                onComplete: function() {
138                    panel.classList.remove('active');
139                }
140            });
141        }
142    });
143
144    // Mostra il pannello target con animazione
145    targetPanel.classList.add('active');
146    gsap.to(targetPanel, {
147        duration: 0.4,
148        opacity: 1,
149        visibility: 'visible',
150        ease: 'power2.out'
151    });
152
153    // Animazione staggered per i contenuti del pannello (immagine + link sottomenu)
154    const animatedElements = targetPanel.querySelectorAll('.preview-image, .preview-submenu li');
155    if (animatedElements.length > 0) {
156        gsap.fromTo(animatedElements,
157            {
158                y: 20,
159                opacity: 0
160            },
161            {
162                y: 0,
163                opacity: 1,
164                duration: 0.4,
165                stagger: 0.08,
166                ease: 'power2.out',
167                delay: 0.1
168            }
169        );
170    }
171}
172
173// NUOVA VERSIONE: Nasconde tutti i pannelli preview
174function hideMenuPreview() {
175    const allPanels = document.querySelectorAll('.preview-panel');
176
177    allPanels.forEach(function(panel) {
178        gsap.to(panel, {
179            duration: 0.3,
180            opacity: 0,
181            visibility: 'hidden',
182            ease: 'power2.in',
183            onComplete: function() {
184                panel.classList.remove('active');
185            }
186        });
187    });
188}
189// === FINE: Funzioni per preview sottomenu ===
190
191function menuItemsFade() {
192    const nav = document.getElementById('nav');
193    const threshold = 80; // soglia dal top
194    const fadeZone = 80; // zona di transizione più ampia per dissolvenza morbida
195
196    if (!nav) return;
197
198    nav.addEventListener('scroll', function() {
199        const menuItems = document.querySelectorAll('#menu > li');
200
201        menuItems.forEach(item => {
202            const rect = item.getBoundingClientRect();
203            const itemTop = rect.top;
204
205            if (itemTop < threshold - fadeZone) {
206                // Elemento sopra la soglia: fade out
207                gsap.to(item, {
208                    opacity: 0,
209                    duration: 0.4,
210                    ease: "power1.out"
211                });
212            } else if (itemTop < threshold) {
213                // Zona di transizione: opacità proporzionale
214                const progress = (itemTop - (threshold - fadeZone)) / fadeZone;
215                gsap.to(item, {
216                    opacity: progress,
217                    duration: 0.25,
218                    ease: "none"
219                });
220            } else {
221                // Elemento visibile: opacity 1
222                gsap.to(item, {
223                    opacity: 1,
224                    duration: 0.4,
225                    ease: "power1.out"
226                });
227            }
228        });
229    });
230}
231
232function scrollClick() {
233    $(".scroll.bottom svg").click(function () {
234        $("html, body").animate({
235            scrollTop: 0
236        }, 600)
237    });
238    $(".scroll-down").click(function () {
239        $("html, body").animate({
240            'scrollTop': $('#content').offset().top - 100
241        }, 600);
242    });
243
244}
245
246function decorationAnimation() {
247
248
249    $(".small-frame").each(function () {
250
251        if (view === 'small') {
252            let yParam = "-15vh";
253        } else {
254            let yParam = "-20vh";
255        }
256
257        gsap.to($(this), {
258            scrollTrigger: {
259                trigger: $(this),
260                scrub: true,
261                // markers: true,
262            },
263            y: yParam,
264        });
265    });
266
267
268
269    $(".image-box").not('.header-img .image-box').each(function () {
270        if (view === 'small') {
271            var yParam = "-20px";
272        } else {
273            var yParam = "-12vh";
274        }
275        gsap.to($(this), {
276            scrollTrigger: {
277                trigger: $(this),
278                scrub: true,
279                // markers: true,
280            },
281            y: yParam,
282        });
283    });
284
285}
286
287function imageParallaxAnimation() {
288
289    const tl = gsap.timeline({
290        ease: "none",
291    });
292
293    const parallaxAnimation = document.querySelectorAll('.imageparallax-img');
294    const parallaxAnimationImg = document.querySelectorAll('.imageparallax-img img');
295
296    if (parallaxAnimation.length > 0) {
297
298        tl.from(parallaxAnimationImg, {
299            scale: 0.75,        // <-- parte da 60% della dimensione
300            duration: 1,       // <-- dura per il 63% dello scroll (1 su 1.6 totale)
301            transformOrigin: "bottom center",
302        }).to({}, {
303            duration: 0.6      // <-- poi rimane fissa per il restante 37%
304        });
305        ScrollTrigger.create({
306            trigger: parallaxAnimation,
307            start: "-=0 top",
308            end: "+=100%",
309            pin: true,
310            animation: tl,
311            scrub: 0.78,
312            pinSpacing: false,
313            // markers: true,
314        })
315
316    }
317
318}
319
320function videoParallaxAnimation() {
321
322    const videoBoxes = document.querySelectorAll('.videobox');
323
324    if (videoBoxes.length > 0) {
325
326        videoBoxes.forEach(function(videoBox) {
327            const videoElement = videoBox.querySelector('.imageparallax-video');
328
329            // Animazione parallax per video e testo insieme
330            const elementsToAnimate = [videoElement].filter(el => el !== null);
331
332            if (elementsToAnimate.length > 0) {
333                gsap.fromTo(elementsToAnimate,
334                    {
335                        y: 80,
336                        scale: 0.92,
337                        opacity: 0,
338                    },
339                    {
340                        y: 0,
341                        scale: 1,
342                        opacity: 1,
343                        ease: "none",
344                        scrollTrigger: {
345                            trigger: videoBox,
346                            start: "center bottom",  // inizia quando il centro del videobox entra dal fondo (50% del box nella viewport)
347                            end: "top 20%",          // finisce quando il top del videobox raggiunge il 20% della viewport (più lento)
348                            scrub: 1.5,              // scrub più alto = animazione più fluida/lenta
349                            // markers: true,
350                        }
351                    }
352                );
353            }
354        });
355
356    }
357
358}
359function scrollHighlightTextAnimation() {
360
361    const textElements = gsap.utils.toArray('.highlight-text');
362
363    if (textElements.length > 0) {
364        textElements.forEach(text => {
365            gsap.to(text, {
366                backgroundSize: '100%',
367                ease: 'none',
368                scrollTrigger: {
369                    trigger: text,
370                    start: 'center 80%',
371                    end: 'center 20%',
372                    scrub: true,
373                },
374            });
375        });
376    }
377}
378
379function internSlider() {
380    $('.swiperslider').each(function () {
381        if ($(this).find(".list .swiper-slide").length > 1) {
382            const swiperSliderHorizontal = new Swiper($(this).find('.list')[0], {
383                slidesPerView: "auto",
384                spaceBetween: 20,
385                speed: 900,
386                navigation: {
387                    prevEl: '.slidePrev-btn',
388                    nextEl: '.slideNext-btn',
389                },
390                breakpoints: {
391                    // when window width is >= 640px
392                    640: {
393                        slidesPerView: 1.6,
394                    }
395                }
396            });
397        }
398    });
399
400
401    $('.slider-room').each(function () {
402
403        if ($(this).find(".list .swiper-slide").length > 1) {
404
405            let slidesOffsetBefore = 0;
406            let slidesOffsetAfter = 0;
407            let spaceBetween = 20;
408            let centeredSlide = false;
409
410            if (view === 'small') {
411                spaceBetween = 20;
412                centeredSlide = false;
413            }
414
415            const swiperSliderHorizontal = new Swiper($(this).find('.list')[0], {
416                // Default parameters
417                slidesPerView: "auto",
418                spaceBetween: spaceBetween,
419                centeredSlides: centeredSlide,
420                slidesOffsetBefore: slidesOffsetBefore,
421                slidesOffsetAfter: slidesOffsetAfter,
422                // Navigation custom
423                navigation: {
424                    nextEl: '.slideNext-btn',
425                    prevEl: '.slidePrev-btn',
426                },
427                initialSlide: 0,
428                observer: true,
429                observeParents: true,
430                watchOverflow: true,
431                on: {
432                    init: function() {
433                        const images = this.el.querySelectorAll('img');
434                        const imagePromises = Array.from(images).map(img => {
435                            return new Promise(resolve => {
436                                if (img.complete) {
437                                    resolve();
438                                } else {
439                                    const onLoad = () => {
440                                        img.removeEventListener('load', onLoad);
441                                        img.removeEventListener('error', onLoad);
442                                        resolve();
443                                    };
444                                    img.addEventListener('load', onLoad);
445                                    img.addEventListener('error', onLoad);
446                                }
447                            });
448                        });
449
450                        Promise.all(imagePromises).then(() => {
451                            this.update();
452                            this.slideTo(0, 0);
453                        });
454                    }
455                }
456
457
458            });
459
460        }
461    });
462}
463
464function CardAnimation() {
465
466    const CardContent = document.querySelectorAll('.section-rooms');
467
468    if (CardContent.length > 0) {
469        // Conta le cards e genera gli indicatori
470        const cards = document.querySelectorAll('.section-rooms .custom-card');
471        const indicatorsContainer = document.querySelector('.cards-indicators');
472
473        if (indicatorsContainer && cards.length > 0) {
474            cards.forEach((card, index) => {
475                const dot = document.createElement('span');
476                dot.classList.add('indicator-dot');
477                if (index === 0) dot.classList.add('active');
478                indicatorsContainer.appendChild(dot);
479            });
480        }
481
482        let tl = gsap.timeline({
483            scrollTrigger: {
484                trigger: ".section-rooms",
485                pin: true,
486                pinSpacing: true,
487                start: "top top",
488                end: "+=400%",
489                scrub: 1,
490                // markers: true,
491                onUpdate: (self) => {
492                    // Aggiorna l'indicatore attivo in base al progresso
493                    const progress = self.progress;
494                    const totalCards = cards.length;
495                    const activeIndex = Math.min(Math.floor(progress * totalCards), totalCards - 1);
496
497                    document.querySelectorAll('.indicator-dot').forEach((dot, i) => {
498                        dot.classList.toggle('active', i === activeIndex);
499                    });
500                }
501            },
502        });
503
504        tl.from(".card1", {
505            yPercent: 100,
506            opacity: 0,
507            duration: 0.5,
508        })
509        .to({}, { duration: 1.5 })
510        .from(".card2", {
511            yPercent: 100,
512            opacity: 0,
513            duration: 0.5,
514        })
515        .to({}, { duration: 1.5 })
516        .from(".card3", {
517            yPercent: 100,
518            opacity: 0,
519            duration: 0.5,
520        })
521        .to({}, { duration: 1.5 })
522        .from(".card4", {
523            yPercent: 100,
524            opacity: 0,
525            duration: 0.5,
526        })
527        .to({}, { duration: 2 });
528    }
529
530}
531
532function animationScroll() {
533
534    $("#content h1, #content h2, #content p, #content ul, #content ol").not(".room-detail p, p.cta-showmore, .formaltea *").each(function (index, value) {
535        const tlGeneral = gsap.timeline({
536            scrollTrigger: {
537                trigger: $(this),
538                start: "top 86%"
539            }
540        });
541        tlGeneral.from($(this), {duration: 1.1, autoAlpha: 0, ease: "power2.out"});
542    });
543
544    $('#content .swiperslider').each(function () {
545
546        const tlSlider = gsap.timeline({
547            scrollTrigger: {
548                trigger: $(this),
549                start: "top 80%"
550            },
551        });
552        tlSlider.from($(this).find('.list-item > img, .list-item .mediautils-video-wrapper'), {
553            y: 40,
554            scale: 0.95,
555            opacity: 0,
556            ease: "power3.out",
557            duration: 1.2,
558            stagger: 0.15,
559        });
560    });
561
562    $('#foto .akSwiper').each(function () {
563
564        const tlAkSlider = gsap.timeline({
565            scrollTrigger: {
566                trigger: $(this),
567                start: "top 80%"
568            },
569        });
570        tlAkSlider.from($(this).find('.swiper-slide > img, .swiper-slide .mediautils-video-wrapper'), {
571            y: 40,
572            scale: 0.95,
573            opacity: 0,
574            ease: "power3.out",
575            duration: 1.2,
576            stagger: 0.15,
577        });
578    });
579
580    $('#content .slider-room').each(function () {
581
582        const tlRoomSlider = gsap.timeline({
583            scrollTrigger: {
584                trigger: $(this),
585                start: "top 80%",
586            },
587        });
588        tlRoomSlider.from($(this).find('.swiper-slide div > img, .swiper-slide .mediautils-video-wrapper'), {
589            y: 40,
590            scale: 0.95,
591            opacity: 0,
592            ease: "power3.out",
593            duration: 1.2,
594            stagger: 0.15,
595        });
596    });
597
598}
599
600function tabs() {
601    $('.tab-box').each(function (index) {
602        const tabFilter = $(this).find('.tab-filter');
603        const tabContent = $(this).find('.tab-content');
604
605
606        tabFilter.find('li').click(function () {
607            $(this).siblings().removeClass('active');
608            $(this).addClass("active");
609
610            tabContent.find('> .tab').removeClass('active');
611            tabContent.find('.fcontent_' + $(this).data('target')).addClass("active");
612        });
613
614        tabFilter.find('li').first().trigger('click');
615    });
616}
617
618function headerImage() {
619
620    const HomeSwiperImg = $(".swiper-slide img");
621    // console.log(HomeSwiperImg.length );
622    if (HomeSwiperImg.length > 0) {
623
624        const swiper = new Swiper('.akSwiper', {
625            effect: 'coverflow',
626            loop: true,
627            centeredSlides: true,
628            slidesPerView: 'auto',
629            speed: 2500,
630            autoplay: {
631                delay: 2500,
632            },
633            coverflowEffect: {
634                depth: 300,
635                modifier: 1,
636                rotate: 0,
637                scale: 0.9,
638                slideShadows: false,
639                stretch: 0,
640            }
641        });
642
643    }
644
645
646}
647
648function accordion() {
649    $('#content .accordion-outer .accordion-icon, #content .accordion-outer .accordion-title').click(function () {
650        const textDiv = $(this).closest('.accordion-outer').find('.accordion-text');
651        const icon = $(this).closest('.accordion-outer').find('.accordion-icon');
652
653        if (textDiv.is(":hidden")) {
654            icon.text('-');
655            textDiv.slideDown("slow", function () {
656                ScrollTrigger.refresh();
657            });
658        } else {
659            icon.text('+');
660            textDiv.slideUp("slow", function () {
661                ScrollTrigger.refresh();
662            });
663        }
664    });
665}
666
667function roomRequest() {
668    $('.cta-outline .action-request').click(function(event) {
669        event.preventDefault();
670        $(this).closest('.text-right').find('form').submit();
671    });
672}
673
674function animazioneBadge() {
675    const tlAboveTheFold = gsap.timeline();
676    const badge = $('.badge-container > *');
677    if (badge.length) {
678        tlAboveTheFold.from(badge, {duration: 0.8, y: "200%", stagger: 0.2}, ">-0.1");
679    }
680}
681function popup() {
682    $('.fixed-popup').click(function(){
683        $('.fixed-popup').remove();
684    });
685    $('.fixed-popup .inner-popup').click(function(e){
686        e.stopPropagation();
687    });
688    $('.fixed-popup .close-popup').click(function(){
689        $('.fixed-popup').remove();
690    });
691}
692
693function decorationColorChange() {
694    const reverseSections = document.querySelectorAll('.section-item.reverse-color');
695    const decoration = document.querySelector('.item-decoration');
696
697    if (reverseSections.length > 0 && decoration) {
698        reverseSections.forEach(section => {
699            ScrollTrigger.create({
700                trigger: section,
701                start: "top center",
702                end: "bottom center",
703                onEnter: () => decoration.classList.add('dark-stroke'),
704                onLeave: () => decoration.classList.remove('dark-stroke'),
705                onEnterBack: () => decoration.classList.add('dark-stroke'),
706                onLeaveBack: () => decoration.classList.remove('dark-stroke'),
707            });
708        });
709    }
710}
711// Video header homepage (ha sostituito JW Player): nel modulo resta solo il contenitore con
712// l'URL in data-video (data-video-mobile facoltativo, sotto i 990px); il <video> nasce qui.
713// Play/pausa in viewport li gestisce initVideoAutoplay(), da chiamare dopo.
714function headerVideo() {
715    const box = document.querySelector('#videobox-header[data-vi
715deo]');
716    if (!box || box.querySelector('video')) return;
717
718    const video = document.createElement('video');
719    video.className = 'data-autoplay-viewport';
720    video.muted = true;
721    video.loop = true;
722    video.autoplay = true;
723    video.playsInline = true;
724    video.preload = 'metadata';
725    video.setAttribute('muted', '');
726    video.setAttribute('playsinline', '');
727    video.setAttribute('webkit-playsinline', '');
728    video.src = (!screen.large.matches && box.dataset.videoMobile) || box.dataset.video;
729    box.appendChild(video);
730}
731
732function initVideoAutoplay() {
733    const videos = document.querySelectorAll('video[data-autoplay-viewport], video.data-autoplay-viewport');
734
735    videos.forEach(video => {
736        ScrollTrigger.create({
737            trigger: video,
738            start: "top 70%", // Il video inizia quando è all'80% del viewport
739            end: "bottom 20%", // Si ferma quando esce dal 20% del viewport
740            onEnter: () => {
741                if (video.paused) {
742                    video.play().catch(e => console.log('Video autoplay failed:', e));
743                }
744            },
745            onLeave: () => {
746                if (!video.paused) {
747                    video.pause();
748                }
749            },
750            onEnterBack: () => {
751                if (video.paused) {
752                    video.play().catch(e => console.log('Video autoplay failed:', e));
753                }
754            },
755            onLeaveBack: () => {
756                if (!video.paused) {
757                    video.pause();
758                }
759            }
760        });
761    });
762}
763
764// -------------------- FUNZIONE: al click mostra cookie banner --------------------
765function showCookieBox() {
766    const cookieButton = document.querySelector('.show-cookie-box');
767    if (cookieButton) {
768        cookieButton.addEventListener('click', function(event) {
769            if (typeof CookieScript !== 'undefined' && CookieScript.instance) {
770                CookieScript.instance.show()
771            } else {
772                console.error('CookieScript non è definito o non ha un\'istanza valida');
773            }
774        });
775    }
776}
777
778showCookieBox();
779
780$(document).ready(function () {
781    menu();
782    menuItemsFade();
783    headerImage();
784    scrollClick();
785    animationScroll();
786    imageParallaxAnimation();
787    videoParallaxAnimation();
788    scrollHighlightTextAnimation();
789    internSlider();
790    CardAnimation();
791    accordion();
792    tabs();
793    decorationAnimation();
794    decorationColorChange();
795    roomRequest();
796    popup();
797
798    $(".current-language").click(function () {
799        $("ul.lang-inline").slideToggle();
800    });
801
802    animazioneBadge();
803    headerVideo();
804    initVideoAutoplay();
805});
806
807
808// magicMouse
809document.addEventListener("mousemove", mousemoveHandler);
810
811const cursorPointer = document.querySelector(".cursor-pointer");
812const cursorText = document.querySelector(".cursor-text");
813const cursorArrowRight = document.querySelector(".cursor-arrow-right");
814const cursorArrowLeft = document.querySelector(".cursor-arrow-left");
815
816function mousemoveHandler(e) {
817    const target = e.target;
818    const tlCursor = gsap.timeline({
819        defaults: {
820            x: e.clientX,
821            y: e.clientY,
822            ease: "power2.out",
823            duration: 0.5
824        }
825    });
826
827    // console.log(target);
828
829    if (target.tagName.toLowerCase() === "div" && target.closest(".hoverPanel")) {
830        if (target.classList.contains('hoverLeft')) {
831            tlCursor.to(cursorPointer, {autoAlpha: 0});
832            tlCursor.to(cursorText, {autoAlpha: 0}, "<");
833            tlCursor.to(cursorArrowRight, {autoAlpha: 0}, "<");
834            tlCursor.to(cursorArrowLeft, {autoAlpha: 1}, "-=0.5");
835        } else if (target.classList.contains('hoverRight')) {
836            tlCursor.to(cursorPointer, {autoAlpha: 0});
837            tlCursor.to(cursorText, {autoAlpha: 0}, "<");
838            tlCursor.to(cursorArrowLeft, {autoAlpha: 0}, "<");
839            tlCursor.to(cursorArrowRight, {autoAlpha: 1}, "-=0.5");
840        }
841    } else if (target.tagName.toLowerCase() === "a" && target.closest('.hoverText')) {
842        let textShow = target.closest('.hoverText').getAttribute('data-text');
843        tlCursor.set(cursorText, {
844            text: textShow,
845            left: -(cursorText.offsetWidth / 2),
846            top: -(cursorText.offsetHeight / 2)
847        });
848        tlCursor.to(cursorArrowLeft, {autoAlpha: 0});
849        tlCursor.to(cursorArrowRight, {autoAlpha: 0}, "<");
850        tlCursor.to(cursorPointer, {autoAlpha: 0}, "<");
851        tlCursor.to(cursorText, {autoAlpha: 1}, "-=0.5");
852    } else {
853        tlCursor.to(cursorArrowLeft, {autoAlpha: 0});
854        tlCursor.to(cursorArrowRight, {autoAlpha: 0}, "<");
855        tlCursor.to(cursorText, {autoAlpha: 0}, "<");
856        tlCursor.to(cursorPointer, {autoAlpha: 1}, "-=0.5");
857    }
858}

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.