PageSourceSearch

https://www.quinta.ru/local/templates/quinta/assets/js/main.js?175083242727329

js quinta.ru collected 2026-10-02 11:27:20 UTC 27,329 bytes, 783 lines download raw bytes

1if (history.scrollRestoration) history.scrollRestoration = 'manual';
2$(function() {
3    $('body').removeClass('state-no-transition');
4
5    /*--- fancy default ---*/
6    $.fancybox.defaults.hash = false;//ajax-fix
7
8    $(".js-sticky-country-menu").stick_in_parent();
9
10
11    /*--- Scroll Tabs + Sticky ---*/
12    if ($(window).width() > 1183) {
13        $(".js-sticky-tabs").stick_in_parent({
14            parent: ".main-container",
15            offset_top : 70
16        });
17    } else {
18        $(".js-sticky-tabs").stick_in_parent({
19            parent: ".main-container",
20        });
21    }
22
23    /*--- Scroll To Top ---*/
24    $(".js-scroll-to-top").click(function() {
25        $("html, body").animate({ scrollTop: 0 }, "slow");
26        return false;
27    });
28
29    /*--- Tooltip ---*/
30    if (window.tippy) {
31        $('body').on('fui-tippy-init',function(){
32            tippy('.js-tippy', {
33                duration: 0,
34                theme: 'light',
35            });
36            $('.js-tippy').removeClass('js-tippy');
37        }).trigger('fui-tippy-init');
38    }
39
40    /*--- spoilers ---*/
41    $(".js-spoiler .js-spoiler__trigger").on('click',function(){
42        $(this).closest('.js-spoiler').toggleClass('state-active');
43        $(this).closest('.js-spoiler').find('.js-spoiler__content').slideToggle();
44        return false;
45    });
46    function InitializeSpoilerMob() {
47        if ($(window).width() < 768) {
48            $(".js-spoiler-mob .js-spoiler-mob__trigger").on('click',function(){
49                $(this).closest('.js-spoiler-mob').toggleClass('state-active');
50                $(this).closest('.js-spoiler-mob').find('.js-spoiler-mob__content').slideToggle();
51                return false;
52            });
53            $(".js-spoiler-mob-trigger-all").on('click',function(){
54                var $parent = $(this).closest('.js-spoiler-mob-container');
55                if ($(this).hasClass('state-active')) {
56                    $parent.find('.js-spoiler-mob').addClass('state-active');
57                    $parent.find('.js-spoiler-mob__content').slideDown();
58                }else{
59                    $parent.find('.js-spoiler-mob').removeClass('state-active');
60                    $parent.find('.js-spoiler-mob__content').slideUp();
61                }
62                $(this).toggleClass('state-active');
63            });
64        }
65    }
66    $(document).ready(function() {
67        InitializeSpoilerMob();
68    })
69
70    /*--- Вызов мобильного меню ---*/
71    $(window).on('load', function () {
72        setTimeout(function() {
73            $(".js-mobile-menu").addClass('state-on');
74        }, 500);
75    });
76    $(".js-mobile-menu-trigger").on('click',function(){
77        $('body').toggleClass('state-mobile-menu-active');
78    });
79
80    /*--- Показываем/Прячем внутренний уровень мобильного меню ---*/
81    $('.js-mobile-menu').on('click', '.js-mobile-menu-level-show', function() {
82        //$(this).next('.js-mobile-menu-level').show();
83        //$(this).closest('.js-mobile-menu-level').addClass('state-static');
84        var $sub = $(this).next('.js-mobile-menu-level').clone();
85        $('.js-mobile-menu-sub-container').html($sub);
86        //$('.js-mobile-menu-sub-container').nextAll().hide();
87        $('.js-mobile-menu-container').hide();
88        $sub.show();
89        return false;
90    });
91    $('.js-mobile-menu').on('click', '.js-mobile-menu-level-back',function() {
92        var back = $(this).attr('data-back')||'';
93        if (back && $(back).length) {
94            var $sub = $(back).clone();
95            $('.js-mobile-menu-sub-container').html($sub);
96            $sub.show();
97        }else{
98            //$(this).parent('.js-mobile-menu-level').hide();
99            $('.js-mobile-menu-sub-container').html('');
100            $('.js-mobile-menu-container').show();
101        }
102        //$('.js-mobile-menu-level').removeClass('state-static')
103    });
104    /*--- Фильтры ---*/
105    $('.js-mobile-filter').on('click', '.js-mobile-filter-show', function() {
106        var target = $(this).attr('href');
107        if (target && $(target).length) {
108            $('.js-mobile-filter-group').removeClass('state-active');
109            $('.js-mobile-filter-group'+target).addClass('state-active');
110            $('body').addClass('state-no-scroll');
111        }else{
112            console.error('no filter group in DOM');
113        }
114        return false;
115    });
116    $('.js-mobile-filter').on('click', '.js-mobile-filter-hide', function() {
117        $(this).closest('.js-mobile-filter-group').removeClass('state-active');
118        $('body').removeClass('state-no-scroll');
119        window.mobile_show_clear_current && mobile_show_clear_current(false);
120        return false;
121    });
122
123    /*--- Временный интерактив для переключения регионов у карты ---*/
124    $(".js-regions-nav .regions-nav__list-item-link").on('click',function(){
125        $('.js-regions-nav-level-1').hide();
126        $('.js-regions-nav-level-2').show();
127        return false;
128    });
129
130    $('.js-wide-slider').owlCarousel({
131        loop:false,
132        margin:0,
133        nav:true,
134        dots: true,
135        items: 1,
136        lazyLoad: true
137    })
138
139    /*--- Excurs, Tours, Sights, Hotels - panel ---*/
140    function owlInitializeAddons() {
141        $('.js-product-carousel').owlCarousel({
142            loop: false,
143            lazyLoad: true,
144            responsive: {
145                0: {
146                    items: 2,
147                    margin: 8,
148                    stagePadding: 16,
149                    nav: false,
150                    dots: true,
151                    dotsEach: true,
152                },
153                768: {
154                    items: 2,
155                    margin: 32,
156                    dotsEach: true,
157                },
158                1024: {
159                    items: 3,
160                    margin: 21,
161                    nav: true,
162                    dots: false,
163                },
164            }
165        });
166    }
167    window.owlInitializeAddons = owlInitializeAddons;
168
169    /*--- Preview-Panel Responsive Slider ---*/
170    function owlInitializeSpo() {
171        const owl =  $('.js-responsive-carousel-spo');
172        if ($(window).width() < 1083) {
173            owl.owlCarousel({
174                loop: false,
175                dots: true,
176                dotsEach: true,
177                //lazyLoad: true,
178                responsive: {
179                    0: {
180                        items: 2,
181                        margin: 8,
182                        stagePadding: 16,
183                    },
184                    768: {
185                        items: 2,
186                        margin: 32,
187                    },
188                    1024: {
189                        items: 3,
190                        margin: 32,
191                    },
192                }
193            })
194            owl.addClass('owl-carousel');
195            owl.trigger('refresh.owl.carousel');
196            owl.removeClass('js-lazy-holder');
197        }else{
198            owl.owlCarousel('destroy');
199            owl.removeClass('owl-carousel');
200            owl.addClass('js-lazy-holder');
201        }
202    }
203    function owlInitializeRecommended() {
204        const owl =  $('.js-responsive-carousel-recommended');
205        if ($(window).width() < 1024) {
206            owl.owlCarousel({
207                loop: false,
208                dots: true,
209                dotsEach: true,
210                //lazyLoad: true,
211                responsive: {
212                    0: {
213                        stagePadding: 16,
214                        items: 1,
215                        margin: 8,
216                    },
217                    500: {
218                        items: 2,
219                        margin: 8,
220                    },
221                    768: {
222                        items: 2,
223                        margin: 32,
224                    },
225                    1024: {
226                        items: 3,
227                        margin: 32,
228                    },
229                }
230            })
231            owl.addClass('owl-carousel');
232            owl.trigger('refresh.owl.carousel');
233            owl.removeClass('js-lazy-holder');
234        }else{
235            owl.owlCarousel('destroy')
236            owl.removeClass('owl-carousel');
237            owl.addClass('js-lazy-holder');
238        }
239    }
240    /*function owlInitializeReviews() {
241        const owl =  $('.js-responsive-carousel-reviews');
242        if ($(window).width() < 500) {
243            owl.owlCarousel({
244                loop: false,
245                dots: true,
246                dotsEach: true,
247                items: 1,
248                margin: 8,
249                //lazyLoad: true,
250            })
251            owl.addClass('owl-carousel');
252            owl.trigger('refresh.owl.carousel');
253            owl.removeClass('js-lazy-holder');
254        }else{
255            owl.owlCarousel('destroy')
256            owl.removeClass('owl-carousel');
257            owl.addClass('js-lazy-holder');
258        }
259    }
260    window.owlInitializeReviews = owlInitializeReviews;*/
261
262    function owlInitializePreview() {
263        const owl =  $('.js-responsive-carousel-preview');
264        if ($(window).width() < 500) {
265            owl.owlCarousel({
266                loop: false,
267                nav: true,
268                dots: true,
269                items: 2,
270                margin: 8,
271                dotsEach: true,
272                stagePadding: 16,
273                //lazyLoad: true,
274            })
275            owl.addClass('owl-carousel');
276            owl.trigger('refresh.owl.carousel');
277            owl.removeClass('js-lazy-holder');
278        }else{
279            owl.owlCarousel('destroy')
280            owl.removeClass('owl-carousel');
281            owl.addClass('js-lazy-holder');
282        }
283    }
284    function owlInitializePreview2() {
285        const owl =  $('.js-responsive-carousel-preview-2');
286        if ($(window).width() < 1007) {
287            owl.owlCarousel({
288                loop: false,
289                nav: false,
290                //lazyLoad: true,
291                responsive: {
292                    0: {
293                        items: 1,
294                        margin: 8,
295                        stagePadding: 16,
296                    },
297                    768: {
298                        items: 2,
299                        margin: 32,
300                        dots: true,
301                        stagePadding: 0,
302                        dotsEach: true,
303                    },
304                }
305            })
306            owl.addClass('owl-carousel');
307            owl.trigger('refresh.owl.carousel');
308            owl.removeClass('js-lazy-holder');
309        }else{
310            owl.owlCarousel('destroy');
311            owl.removeClass('owl-carousel');
312            owl.addClass('js-lazy-holder');
313        }
314    }
315
316    function owlInitializePreview2_nested() {
317        const owl =  $('.js-responsive-carousel-preview-2-nested');
318        if ($(window).width() < 1007) {
319            owl.owlCarousel({
320                loop: false,
321                nav: false,
322                //lazyLoad: true,
323                nestedItemSelector: 'nested-item',
324                responsive: {
325                    0: {
326                        items: 1,
327                        margin: 8,
328                        stagePadding: 16,
329                    },
330                    768: {
331                        items: 2,
332                        margin: 32,
333                        dots: true,
334                        stagePadding: 0,
335                        dotsEach: true,
336                    },
337                }
338            })
339            owl.addClass('owl-carousel');
340            owl.trigger('refresh.owl.carousel');
341            owl.removeClass('js-lazy-holder');
342        }else{
343
344            owl.owlCarousel({
345                loop: false,
346                nav: true,
347                //lazyLoad: true,
348                //nestedItemSelector: 'nested-item',
349
350                items: 3,
351                margin: 42,
352                dots: true,
353                stagePadding: 0,
354                dotsEach: true,
355            });
356            owl.addClass('owl-carousel');
357            owl.trigger('refresh.owl.carousel');
358            owl.removeClass('js-lazy-holder');
359            //owl.owlCarousel('destroy');
360            //owl.removeClass('owl-carousel');
361            //owl.addClass('js-lazy-holder');
362        }
363    }
364    /*function owlInitializeNews() {
365        const owl =  $('.js-responsive-carousel-news');
366        if ($(window).width() < 1083) {
367            owl.owlCarousel({
368                loop: false,
369                dots: true,
370                dotsEach: true,
371                //lazyLoad: true,
372                responsive: {
373                    0: {
374                        items: 2,
375                        margin: 8,
376                        stagePadding: 16,
377                        nav: true,
378                    },
379                    768: {
380                        items: 2,
381                        margin: 32,
382                    },
383                    1024: {
384                        items: 3,
385                        margin: 32,
386                    },
387                }
388            })
389            owl.addClass('owl-carousel');
390            owl.trigger('refresh.owl.carousel');
391            owl.removeClass('js-lazy-holder');
392        }else{
393            owl.owlCarousel('destroy')
394            owl.removeClass('owl-carousel');
395            owl.addClass('js-lazy-holder');
396        }
397    }*/
398    $(document).ready(function() {
399        owlInitializeSpo();
400        owlInitializeRecommended();
401        //owlInitializeReviews();
402        owlInitializePreview();
403        owlInitializePreview2();
404        owlInitializePreview2_nested();
405        //owlInitializeNews();
406        owlInitializeAddons();
407
408        /*--- Lazy ---*/
409        window.lazyLoadInstance = new LazyLoad({
410            elements_selector: ".js-lazy,.js-lazy-holder .owl-lazy",
411            load_delay: 100
412        });
413    });
414    $(window).resize(function() {
415        owlInitializeSpo();
416        owlInitializeRecommended();
417        //owlInitializeReviews();
418        owlInitializePreview();
419        owlInitializePreview2();
420        owlInitializePreview2_nested();
421        //owlInitializeNews();
422    });
423    $('body').on('fui-complex-ajax-ready',function(){
424        owlInitializeAddons();
425        //owlInitializeReviews();
426    });
427    $('.js-carousel-news').owlCarousel({
428        loop: false,
429        dots: true,
430        dotsEach: true,
431        lazyLoad: true,
432        responsive: {
433            0: {
434                items: 2,
435                margin: 8,
436                stagePadding: 16,
437                nav: true,
438            },
439            768: {
440                items: 2,
441                margin: 32,
442            },
443            1024: {
444                items: 3,
445                margin: 32,
446            },
447            1083: {
448                items: 4,
449                margin: 42,
450            },
451        }
452    })
453    $('.js-carousel-reviews').owlCarousel({
454        loop: false,
455        dots: true,
456        dotsEach: true,
457        items: 1,
458        margin: 8,
459        lazyLoad: true,
460        responsive: {
461            0: {
462                items: 1,
463                margin: 8,
464            },
465            768: {
466                items: 2,
467                margin: 32,
468            },
469            1024: {
470                items: 3,
471                margin: 42,
472            },
473        }
474    })
475    /*
476    window.onpopstate = function (event) {
477        //debugger;
478        if (event.state) {
479            // history changed because of pushState/replaceState
480            console.log('pushState/replaceState');
481        } else {
482            // history changed because of a page load
483            console.log('page load');
484        }
485    }*/
486
487    /*--- Filter container items filtering ---*/
488    function init_tabs() {
489        //$('body').on('click', '.js-tabs-container .js-tabs a', function () {
490        $('.js-tabs-container .js-tabs a').on('click fui-tab-open', function () {
491            let filter_class = $(this).attr('data-filter');
492
493            let $parent = $(this).closest('.js-tabs-container');
494            let filter_group = $parent.attr('data-filter-group') || '';
495            $parent.find('>.js-tab-panel').hide();
496            $parent.find('>.js-tab-panel').filter(filter_class).show();
497            $parent.find('>.js-tab-panel').filter(filter_class).trigger('fui-tab-show');
498
499            if (filter_group) {
500                $parent.find('.js-tabs[data-filter-group="' + filter_group + '"] li').removeClass('state-active');
501            } else {
502                $parent.find('.js-tabs li').removeClass('state-active');
503            }
504            $(this).parent('li').addClass('state-active');
505
506            return false;
507
508        });
509    }
510    init_tabs();
511
512    /*--- Filter container items filtering ---*/
513    $('.js-tabs-container-hover .js-tabs a').on('mouseenter',function() {
514
515        let filter_class = $(this).attr('data-filter');
516
517        $(this).closest('.js-tabs-container-hover').find('.js-tab-panel').not(filter_class).hide();
518        $(this).closest('.js-tabs-container-hover').find('.js-tab-panel').filter(filter_class).show();
519
520        $(this).closest('.js-tabs-container-hover').find('.js-tabs li').removeClass('state-active');
521        $(this).parent('li').addClass('state-active');
522
523        return false;
524
525    });
526
527    /*
528    $(".js-scrollto-tabs").on('click',function(){
529        var is_mob = ($(window).width() <= 1024);
530        var scroll_target = '#navigation';
531        var offset = is_mob ? 0 : -70;
532        setTimeout(function(){
533            $(window).scrollTo(scroll_target, 300, {offset: offset});
534        },50);
535    });*/
536
537    $(".js-scrollto-tabs").on('click',function(){
538        var is_mob = ($(window).width() <= 1024);
539        var scroll_target = '#navigation';
540        var offset = is_mob ? 0 : -70;
541        setTimeout(function(){
542            $(window).scrollTo(scroll_target, 300, {offset: offset});
543        },100);
544        var url = $(this).attr('href');
545        if (url.substring(0, 5)=='#tab-') {
546            location.hash = url.replace('#tab-','');
547        }
548        return false;
549    });
550
551    function tab_by_hash(hash) {
552        //debugger;
553        if (!hash || hash=='#') return;
554        hash = hash.replace('#','');
555        var hash = '#tab-'+hash;
556        var $link = $('.js-tabs li a[href="'+hash+'"]');
557        if ($link.length) {
558            //$link.trigger('fui-tab-open');
559            $link.click();
560            /*
561            if ($(hash).length) {
562                var is_mob = ($(window).width() <= 1024);
563                var scroll_target = '#navigation';
564                var offset = is_mob ? 0 : -70;
565                setTimeout(function(){
566                    $(window).scrollTo(scroll_target, 300, {offset: offset});
567                    //$('html,body').animate({scrollTop: $scroll_target.offset().top-offset||0}, 300);
568                },50);
569                / *
570                var $scroll_target = $(hash).closest('.js-tabs-container');
571                setTimeout(function(){
572                    $(window).scrollTo($scroll_target.prev(),300);
573                },50);
574                /* /
575            }*/
576        }
577    }
578    window.tab_by_hash = tab_by_hash;
579
580    /*--- Set active first items of each filter container if there is no "all" option in it ---*/
581    window.setTimeout(function(){
582        var hash = window.location.hash;
583        if (hash) {
584            tab_by_hash(hash);
585        }else {
586            $('.js-tabs-container').each(function () {
587                if (!$(this).find('.js-tabs li[data-filter=""]').length && !$(this).find('.js-tabs li.state-active').length) {
588                    $(this).find('.js-tabs li:first a:eq(0)').click();
589                }
590            });
591        }
592    },10);
593    $(window).on('hashchange', function () {
594        if (!location.hash || location.hash=='#') {
595            return;
596        }
597        tab_by_hash(location.hash);
598    });
599
600    /*--- AIM MENU ---*/
601    const $menu = $('.js-aim-menu');
602
603    $menu.menuAim({
604        // Function to call when a row is purposefully activated. Use this
605        // to show a submenu's content for the activated row.
606          activate: function() {},
607
608          // Function to call when a row is deactivated.
609          deactivate: function() {},
610
611          // Function to call when mouse enters a menu row. Entering a row
612          // does not mean the row has been activated, as the user may be
613          // mousing over to a submenu.
614          enter: function() {},
615
616          // Function to call when mouse exits a menu row.
617          exit: function() {},
618
619          // Selector for identifying which elements in the menu are rows
620          // that can trigger the above events. Defaults to "> li".
621          rowSelector: "> li",
622        //rowSelector: "> .li",
623
624          // You may have some menu rows that aren't submenus and therefore
625          // shouldn't ever need to "activate." If so, filter submenu rows w/
626          // this selector. Defaults to "*" (all elements).
627          //submenuSelector: "*",
628        submenuSelector: ".sub",
629
630          // Direction the submenu opens relative to the main menu. Can be
631          // left, right, above, or below. Defaults to "right".
632          submenuDirection: "right",
633        //submenuDirection: "smart",
634
635        ///*****
636        tolerance: 0,
637
638        activate: function(row) {
639            let $row = $(row),
640                $submenu = $row.find('>.js-aim-menu-sub');
641
642            $row.children('.js-aim-menu-hover').addClass('state-hover');
643            $submenu.show();
644        },
645        // Function to call when a row is deactivated.
646        deactivate: function(row) {
647            let $row = $(row),
648                $submenu = $row.find('>.js-aim-menu-sub');
649
650            $row.children('.js-aim-menu-hover').removeClass('state-hover');
651            $submenu.hide();
652        },
653        exitMenu: function(row) {
654            //var mm = $(this);
655
656            //mm.find('>.ul').hide();
657            //mm.removeClass('hoveritem');
658            return true;
659        }
660    });
661    $('.js-single-select2').select2({
662        minimumResultsForSearch: 10,
663        //minimumResultsForSearch: -1,
664        dropdownPosition: 'below'
665    });
666    function init_form_date() {
667        $(".js-datepicker-dates").datepicker({
668            maxDate: "+2y",
669            minDate: "1",
670            beforeShow: function(input, inst) {
671                $('#ui-datepicker-div').addClass('mob-centered-picker datepicker-fancy');
672            }
673        });
674
675        $('iframe[data-src]').each(function(){
676            var src = $(this).data('src');
677            $(this).attr('src',src);
678            $(this).removeAttr('data-src','');
679        });
680    }
681    $('.js-fancy-contact-dialog').fancybox({
682        baseClass: "tabs-dialog",
683        touch: false,
684        afterShow: function() {
685            init_form_date();
686        },
687        beforeShow: function() {
688            $(this.src).find('.js-tabs-container .js-tabs a:eq(0)').trigger('fui-tab-open');
689            $('.js-tabs-open-tab-1').on('click',function(){
690                $(this).closest('.js-tabs-container').find('.js-tabs a:eq(0)').trigger('fui-tab-open');
691                return false;
692            });
693        }
694    });
695    $('.js-fancy-form-dialog').fancybox({
696        baseClass: "form-dialog",
697        touch: false,
698    });
699    var fancy_mobile_feedback_link_opt = {
700        baseClass: "tabs-dialog",
701        touch: false,
702        afterShow: function() {
703            init_form_date();
704        },
705        beforeShow: function() {
706            $(this.src).find('.js-tabs-container .js-tabs a:eq(1)').trigger('fui-tab-open');
707            $('.js-tabs-open-tab-1').on('click',function(){
708                $(this).closest('.js-tabs-container').find('.js-tabs a:eq(0)').trigger('fui-tab-open');
709                return false;
710            });
711        }
712    };
713    $('.js-fancy-contact-dialog-feedback').fancybox(fancy_mobile_feedback_link_opt);
714    $('.js-mobile-menu').on('click','.js-fancy-contact-dialog-feedback',function(){
715        var href = $(this).attr('data-src');
716        if (href && $(href).length) {
717            $.fancybox.open($(href), fancy_mobile_feedback_link_opt);
718        }
719        return false;
720    });
721
722    $('.js-select2-holder select').select2();
723    /*--- Autocut text ---*/
724    fuiInitializeCutText();
725    /* cookies */
726    let cookiePopupClosed = $.cookie("cookiePopupClosed");
727    if (!cookiePopupClosed) {
728        $(".js-cookie-popup").show();
729    } else {
730        $(".js-cookie-popup").hide();
731    }
732    $('.js-cookie-popup-close').on('click', function (e) {
733        $(".js-cookie-popup").hide();
734        $.cookie("cookiePopupClosed", "true", { expires: 356, path: "/" });
735    });
736});
737
738function fuiInitializeCutText() {
739    $('.js-cut-text').not('.js-cut-text-ready').each(function(){
740        if ($('.js-cut-text__content',this).height() > $('.js-cut-text__content-holder',this).height()) {
741            var $h=$('.js-cut-text__content-holder',this);
742            $(this).addClass('state-enabled-cut');
743            $h.data('init-height',$h.height());
744        }
745    });
746    $('.js-cut-text').not('.js-cut-text-ready').on('click',".js-cut-text__trigger",function(event){
747        //$(this).toggleClass('state-active');
748        var $self = $(event.delegateTarget);
749        var h = 0;
750        var $holder = $self.find('.js-cut-text__content-holder');
751        var $content = $self.find('.js-cut-text__content');
752        if ($self.hasClass('state-uncut')) {
753            h = $holder.data('init-height');
754            $self.removeClass('state-uncut');
755            $self.find('.js-cut-text__content-holder').animate({
756                height:h
757            },500);
758        }else{
759            h = $content.height();
760            $self.find('.js-cut-text__content-holder').animate({
761                height:h
762            },500,function(){
763                $self.addClass('state-uncut');
764            });
765        }
766        //console.log(event.delegateTarget);
767        return false;
768    });
769    $('.js-cut-text').not('.js-cut-text-ready').addClass('js-cut-text-ready');
770}
771
772function scrollToBounds(elem,timeout,speed) {
773    if (!timeout) timeout=100;
774    if (!speed) speed=200;
775    setTimeout(function(){
776        let $el = $(elem);
777        let rect = $el[0].getBoundingClientRect();
778        if (rect.bottom > (window.innerHeight || document.documentElement.clientHeight)) {
779            let y = $el.offset().top+$el.height()-(window.innerHeight || document.documentElement.clientHeight);
780            $.scrollTo(y+15,100);
781        }
782    },timeout);
783}

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.