PageSourceSearch

https://amici-london.com/wp-content/plugins/the-pack-addon/assets/…?ver=c33e67e9d27636b617b6d912ecba7fde

js amici-london.com collected 2026-09-27 03:56:05 UTC 62,622 bytes, 1,731 lines download raw bytes

1(function ($) {
2    "use strict";
3    var CirclCntr = function ($scope, $) {
4        $scope.find('.counter_content').each(function () {
5            var settings = $(this).find('.client_counterup').data('options');
6            var num = settings['size'];
7            var prefix = settings['pre'];
8            var dotpercent = '.' + num + '';
9            var ourtarget = $(this).find('.circle');
10            if (ourtarget.length) {
11                (function () {
12                    var proto = $.circleProgress.defaults,
13                        originalDrawEmptyArc = proto.drawEmptyArc;
14                    proto.emptyThickness = 5;
15                    proto.drawEmptyArc = function (v) {
16                        var oldGetThickness = this.getThickness,
17                            oldThickness = this.getThickness(),
18                            emptyThickness = this.emptyThickness || _oldThickness.call(this),
19                            oldRadius = this.radius,
20                            delta = (oldThickness - emptyThickness) / 2;
21                        this.getThickness = function () {
22                            return emptyThickness;
23                        };
24                        this.radius = oldRadius - delta;
25                        this.ctx.save();
26                        this.ctx.translate(delta, delta);
27                        originalDrawEmptyArc.call(this, v);
28                        this.ctx.restore();
29                        this.getThickness = oldGetThickness;
30                        this.radius = oldRadius;
31                    };
32                })();
33                ourtarget.circleProgress({
34                    emptyThickness: settings['ethk'],
35                    size: 210,
36                    thickness: settings['thk'],
37                    lineCap: 'round',
38                    emptyFill: settings['sclr'],
39                    fill: {
40                        //gradient: ['#fff', ['#000', 0.7]],
41                        color: settings['pclr'],
42                        gradientAngle: Math.PI * -0.3
43                    }
44                });
45                ourtarget.circleProgress({
46                    value: dotpercent
47                }).on('circle-animation-progress', function (event, progress) {
48                    $(this).find('strong').html(Math.round(num * progress) + '<span class="prefix">' + prefix + '</span>');
49                });
50            }
51            ;
52        });
53    };
54
55    var TbgalSlkThm = function ($scope, $) {
56        $scope.find('.tpsingle-slide').each(function () {
57            var nxt = $(this).find('.next-img');
58            var prv = $(this).find('.prev-img');
59            var pagi = $(this).find('.tp-pagination');
60            var settings = $(this).data('xld');
61            var slider = $(this).find('.gallery-top');
62            var options = {
63                navigation: {
64                    nextEl: nxt,
65                    prevEl: prv,
66                },
67                pagination: {
68                    el: pagi,
69                    clickable: true,
70                    type: 'bullets',
71                },
72
73                autoplay: {
74                    delay: settings['speed'],
75                    enabled: settings['auto'],
76                },
77
78                loop: true,
79                effect: settings['fade'],
80            };
81
82            if ('undefined' === typeof Swiper) {
83                const asyncSwiper = elementorFrontend.utils.swiper;
84                new asyncSwiper(slider, options).then((newSwiperInstance) => {
85                    var swiper = newSwiperInstance;
86                });
87
88            } else {
89                var swiper = new Swiper(slider, options);
90            }
91                        
92        });
93    };
94
95    var ClientSlider = function ($scope, $) {
96
97        $scope.find('.tpswiper').each(function () {
98            var settings = $(this).data('xld');
99            var nxt = $(this).find('.khbprev');
100            var prv = $(this).find('.khbnxt');
101            var pagi = $(this).find('.swiper-pagination');            
102            var options = {
103                loop: true,
104                paginationClickable: true,
105                spaceBetween: settings['space'],
106                mousewheel: settings['mouse'],
107                navigation: {
108                    nextEl: nxt,
109                    prevEl: prv
110                },
111
112                autoplay: {
113                    delay: settings['speed'],
114                    enabled: settings['auto'],
115                },
116
117                pagination: {
118                    el: pagi,
119                    clickable: true,
120                    type: 'bullets',
121                },
122                breakpoints: {
123                    1140: {
124                        slidesPerView: settings['item'],
125                    },
126                    768: {
127                        slidesPerView: settings['item_tab'],
128                    },
129                    1: {
130                        slidesPerView: 1,
131                    },
132                },
133            };
134            if ('undefined' === typeof Swiper) {
135                const asyncSwiper = elementorFrontend.utils.swiper;
136                new asyncSwiper($(this), options).then((newSwiperInstance) => {
137                    var swiper = newSwiperInstance;
138                });
139
140            } else {
141                var swiper = new Swiper($(this), options);
142            }            
143
144        });
145    };
146
147    var CardSlider = function ($scope, $) {
148        $scope.find('.blog-slider').each(function () {
149            var slider_elem = $(this).find('.blog-slider__wrp');
150            var settings = slider_elem.data('xld');
151            var options = {
152                spaceBetween: 30,
153                effect: 'fade',
154                loop: true,
155                pagination: {
156                    el: '.blog-slider__pagination',
157                    clickable: true,
158                },
159                autoplay: {
160                    delay: settings['speed'],
161                    enabled: settings['auto'],
162                }, 
163            };
164            if ('undefined' === typeof Swiper) {
165                const asyncSwiper = elementorFrontend.utils.swiper;
166                new asyncSwiper($(this), options).then((newSwiperInstance) => {
167                    var swiper = newSwiperInstance;
168                });
169
170            } else {
171                var swiper = new Swiper($(this), options);
172            } 
173
174        });
175    };
176    var SlickImgCar = function ($scope, $) {
177        $scope.find('.xldslickcarousel').each(function () {
178            var slider_elem = $(this).find('.single-item');
179            var settings = $(this).data('xld');
180            slider_elem.slick({
181                dots: settings['dot'],
182                arrows: settings['arrow'],
183                prevArrow: $(this).find('.prev'),
184                nextArrow: $(this).find('.next'),
185                slidesToShow: settings['item'],
186                autoplaySpeed: settings['speed'],
187                centerMode: true,
188                centerPadding: '0px',
189                autoplay: settings['auto'],
190            });
191            if (settings['mouse']) {
192                slider_elem.on('wheel', (function (e) {
193                    e.preventDefault();
194                    if (e.originalEvent.deltaY < 0) {
195                        $(this).slick('slickNext');
196                    } else {
197                        $(this).slick('slickPrev');
198                    }
199                }));
200            }
201        });
202    };
203
204    var Testi5 = function ($scope, $) {
205        $scope.find('.testi5-container').each(function () {
206            var slider_elem = $(this);
207            var settings = slider_elem.data('xld');
208            var tp_prev = slider_elem.find('.khbnxt');
209            var tp_next = slider_elem.find('.khbprev');
210            const sliderThumbnails = slider_elem.find('.testi5wrap');
211            const sliderConfiguration = {
212                arrows: true,
213                autoplay: settings['auto'],
214                speed: 500,
215                autoplaySpeed: settings['speed'],
216                slidesToShow: settings['item'],
217                focusOnSelect: true,
218                arrows: true,
219                dots: true,
220                prevArrow: tp_prev,
221                nextArrow: tp_next,
222                responsive: [{
223                    breakpoint: 1025,
224                    settings: {
225                        slidesToShow: settings['itemtab'],
226                    }
227                }, {
228                    breakpoint: 768,
229                    settings: {
230                        slidesToShow: 1,
231                    }
232                }]
233            }
234            sliderThumbnails.slick(sliderConfiguration);
235        });
236    };
237
238    var Tpaccordion1 = function ($scope, $) {
239        $scope.find('.xldacdn').each(function () {
240            var settings = $(this).data('xld');
241            var faction = $('.accordion.' + settings['id'] + ' ' + 'li:eq(0) .accortitle');
242            var saction = $('.accordion.' + settings['id'] + ' ' + '.accortitle');
243            
244            if ( settings['collpased'] ){
245
246            } else {
247                faction.addClass('active').next().slideDown();
248            }
249        
250            saction.click(function (j) {
251                var dropDown = $(this).closest('li').find('p');
252                $(this).closest('.accordion').find('p').not(dropDown).slideUp();
253                if ($(this).hasClass('active')) {
254                    $(this).removeClass('active');
255                } else {
256                    $(this).closest('.accordion').find('.accortitle.active').removeClass('active');
257                    $(this).addClass('active');
258                }
259                dropDown.stop(false, true).slideToggle();
260                j.preventDefault();
261            });
262        });
263    };
264
265    var CaroPrlx = function ($scope, $) {
266        $scope.find('.parallax-carousel').each(function () {
267            var slider_elem = $(this);
268            var settings = slider_elem.data('xld');
269            var options = {
270                spaceBetween: settings['space'],
271                loop: true,
272                centeredSlides: settings['center'],
273                roundLengths: true,
274                autoplay: {
275                    delay: 1000,
276                },
277                mousewheel: settings['mouse'],
278                breakpoints: {
279                    1025: {
280                        slidesPerView: settings['item'],
281                    },
282                    768: {
283                        slidesPerView: settings['item_tab'],
284                    },
285                    480: {
286                        slidesPerView: 1,
287                    },
288                },
289            };
290            if ('undefined' === typeof Swiper) {
291                const asyncSwiper = elementorFrontend.utils.swiper;
292                new asyncSwiper(slider_elem, options).then((newSwiperInstance) => {
293                    var swiper = newSwiperInstance;
294                });
295
296            } else {
297                var swiper = new Swiper(slider_elem, options);
298            }
299
300        });
301    };
302    var Team1 = function ($scope, $) {
303        $scope.find('.team1carou').each(function () {
304            var slider_elem = $(this);
305            var settings = slider_elem.data('xld');
306            var options = {
307                paginationClickable: true,
308                spaceBetween: settings['space'],
309                navigation: {
310                    nextEl: '.khbprev',
311                    prevEl: '.khbnxt',
312                },
313                breakpoints: {
314                    1025: {
315                        slidesPerView: settings['item'],
316                    },
317                    768: {
318                        slidesPerView: settings['item_tab'],
319                    },
320                    480: {
321                        slidesPerView: 1,
322                    },
323                },
324                pagination: {
325                    el: ".swiper-pagination",
326                    clickable: true,
327                    type: 'bullets',
328                },
329                loop: true,
330                autoplay: {
331                    delay: settings['speed'],
332                },
333                mousewheel: settings['mouse'],
334                on: {
335                    init: function () {
336                        if (settings['center']) {
337                            slider_elem.find('.swiper-slide').addClass("centermode");
338                        }
339                    },
340                },
341            };
342
343            if ('undefined' === typeof Swiper) {
344                const asyncSwiper = elementorFrontend.utils.swiper;
345                new asyncSwiper(slider_elem, options).then((newSwiperInstance) => {
346                    var swiper = newSwiperInstance;
347                });
348
349            } else {
350                var swiper = new Swiper(slider_elem, options);
351            } 
352        });
353    };
354    var Team2 = function ($scope, $) {
355        $scope.find('.tbteam2.hascarou').each(function () {
356            var slider_elem = $(this);
357            var settings = slider_elem.data('xld');
358            var options = {
359                slidesPerView: settings['item'],
360                paginationClickable: true,
361                spaceBetween: settings['space'],
362                navigation: {
363                    nextEl: '.swiper-button-next',
364                    prevEl: '.swiper-button-prev',
365                },
366                breakpoints: {
367                    1025: {
368                        slidesPerView: settings['item'],
369                    },
370                    768: {
371                        slidesPerView: settings['item_tab'],
372                    },
373                    0: {
374                        slidesPerView: 1,
375                    },
376                },
377                pagination: {
378                    el: ".swiper-pagination",
379                    clickable: true,
380                    type: 'bullets',
381                },
382                loop: true,
383                autoplay: {
384                    delay: settings['speed'],
385                    disableOnInteraction: false,
386                },
387                fadeEffect: {
388                    crossFade: true
389                },
390                mousewheel: settings['mouse'],
391            };
392
393            if ('undefined' === typeof Swiper) {
394                const asyncSwiper = elementorFrontend.utils.swiper;
395                new asyncSwiper(slider_elem, options).then((newSwiperInstance) => {
396                    var swiper = newSwiperInstance;
397                });
398
399            } else {
400                var swiper = new Swiper(slider_elem, options);
401            } 
402
403        });
404    };
405
406    var HvrFolio = function ($scope, $) {
407        $scope.find('.bari_assex_slider').each(function () {
408            var settings = $(this).data('xld');
409            var $XFeatPost = $(this);
410            var $XFeatPostItems = $('.assex-wrap').children('.post-item');
411            var $auto = settings['auto'];
412            var $time = 0;
413            var $timeInt = settings['speed'];
414            var $timeMax = 1500;
415            $XFeatPostItems.each(function () {
416                var $XFeatPostItem = $(this);
417                $XFeatPostItem.on({
418                    mouseenter: function () {
419                        $XFeatPostItem.addClass('active').siblings('.post-item').removeClass('active');
420                        $auto = false;
421                    },
422                    mouseleave: function () {
423                        $time = 0;
424                        $auto = true;
425                    }
426                });
427            });
428            if ($XFeatPostItems.length > 1) {
429                setInterval(function () {
430                    if ($auto && $time > $timeMax) {
431                        $time = 0;
432                        var $activeItem = $('.assex-wrap').children('.post-item.active');
433                        var $nextItem = $activeItem.next('.post-item').hasClass('post-item') ? $activeItem.next('.post-item') : $XFeatPostItems.eq(0);
434                        $nextItem.addClass('active');
435                        $activeItem.removeClass('active');
436                    } else {
437                        $time += $timeInt;
438                    }
439                }, $timeInt);
440            }
441        });
442    };
443
444    var Gallery2 = function ($scope, $) {
445        $scope.find('.aegrid-gallery').each(function () {
446            var slider_elem = $(this);
447            if (slider_elem.hasClass('justified')) {
448                var height = slider_elem.data('height');
449                var truncate = slider_elem.data('truncate');
450                $('.justified').flexImages({
451                    rowHeight: height,
452                    truncate: truncate,
453                });
454            }
455            if (slider_elem.hasClass('masonry')) {
456                var container = $('.aegrid-gallery');
457                container.imagesLoaded(function () {
458                    container.masonry({
459                        itemSelector: '.gallery-item',
460                        isAnimated: true
461                    });
462                });
463            }
464        });
465    };
466    var Typing1 = function ($scope, $) {
467        $scope.find('.type-text').each(function () {
468            var slider_elem = $(this);
469            var settings = slider_elem.data('xld');
470            if (settings) {
471                slider_elem.each(function () {
472                    var items = settings['typing'];
473                    slider_elem.teletype({
474                        text: $.map(items.split(';'), $.trim),
475                        typeDelay: 10,
476                        backDelay: 20,
477                        cursor: settings['cursor'],
478                        delay: 3000,
479                        preserve: false,
480                        prefix: settings['pre'],
481                        loop: 0
482                    });
483                });
484            }
485        });
486    };
487
488    var TbDateCter = function ($scope, $) {
489        $scope.find('.countdown').each(function () {
490            var settings = $(this).data('xld');
491            if ($.fn.countdown) {
492                $('.countdown').countdown({
493                    date: settings['date'],
494                    render: function (date) {
495                        return $(this.el).html("<span class='days'>" + date.days + "<span>" + settings['day'] + "</span></span><span class='hour'>" + (this.leadingZeros(date.hours)) + "<span>" + settings['hour'] + "</span></span><span class='min'>" + (this.leadingZeros(date.min)) + "<span>" + settings['min'] + "</span></span><span class='sec'>" + (this.leadingZeros(date.sec)) + "<span>" + settings['sec'] + "</span></span>");
496                    }
497                });
498            }
499        });
500    };
501
502    var FolioCarousel = function ($scope, $) {
503        $scope.find('.tpswiper').each(function () {
504            var slider_elem = $(this);
505            var settings = slider_elem.data('xld');
506             
507            var options = {
508                slidesPerView: settings['item'],
509                centeredSlides: settings['center'],
510                paginationClickable: true,
511                spaceBetween: settings['space'],
512                navigation: {
513                    nextEl: '.khbprev',
514                    prevEl: '.khbnxt'
515                },
516                autoplay: {
517                    delay: settings['speed'],
518                    enabled:settings['auto'],
519                },                
520                pagination: {
521                    el: ".swiper-pagination",
522                    clickable: true,
523                    type: 'bullets',
524                },
525                breakpoints: {
526                    1140: {
527                        slidesPerView: settings['item'],
528                    },
529                    768: {
530                        slidesPerView: settings['item_tab'],
531                    },
532                    1: {
533                        slidesPerView: 1,
534                    },
535                },
536                loop: true,
537                mousewheel: settings['mouse'],
538            };
539
540            if ('undefined' === typeof Swiper) {
541                const asyncSwiper = elementorFrontend.utils.swiper;
542                new asyncSwiper(slider_elem, options).then((newSwiperInstance) => {
543                    var swiper = newSwiperInstance;
544                });
545
546            } else {
547                var swiper = new Swiper(slider_elem, options);
548            } 
549        });
550    };
551
552    var Testimonial = function ($scope, $) {
553        $scope.find('.testimonial-1').each(function () {
554            var settings = $(this).data('xld');
555            var options = {
556                slidesPerView: 1,
557                pagination: {
558                    el: $(this).find('.swiper-pagination'),
559                    clickable: true,
560                },
561                autoplay: {
562                    delay: settings['speed'],
563                    enabled: settings['auto'],
564                },
565                spaceBetween: settings['space'],
566
567                breakpoints: {
568                    1140: {
569                        slidesPerView: settings['item'],
570                    },
571                    768: {
572                        slidesPerView: settings['itemtab'],
573                    },
574                    1: {
575                        slidesPerView: 1,
576                    },
577                },
578                loop: true,
579                navigation: {
580                    nextEl: $(this).find('.khbprev'),
581                    prevEl: $(this).find('.khbnxt'),
582                }
583            };
584
585            if ('undefined' === typeof Swiper) {
586                const asyncSwiper = elementorFrontend.utils.swiper;
587                new asyncSwiper($(this), options).then((newSwiperInstance) => {
588                    var swiper = newSwiperInstance;
589                });
590
591            } else {
592                var swiper = new Swiper($(this), options);
593            }  
594        });
595    };
596
597    var Tp_Click_Column = function ($scope,$) {
598
599        $scope.find('.tp-clickable-column').each(function () {
600            var _this = $(this)
601            _this.on('click', function () {
602                var  url = $(this).data( 'column-clickable' );
603    
604                var win = window.open( url,  $(this).data( 'column-clickable-blank' ) );
605                if (win) {
606                    //Browser has allowed it to be opened
607                    win.focus();
608                } else {
609                    //Browser has blocked it
610                    alert('Please allow popups for this website');
611                }                
612            });  
613        });          
614    }   
615
616    var ParaLLaxBg = function ($scope, $) {
617
618        var $target = $scope,
619            $window = $(window),
620            columnId = $target.data('id');
621
622        if ($scope.hasClass('tb-fixedfooter')) {
623            if ($(window).width() < 1025) {
624                return;
625            }
626            var selector = $('.tb-fixedfooter');
627            $('body').css({
628                'margin-bottom': selector.outerHeight()
629            });
630        }
631        if ($target.hasClass('tb-parallaxbg')) {
632            var settings = $target.data('jlparallax');
633            var speed = settings['speed'];
634
635            if (speed >= 0.2) {
636                $('.elementor-element-' + columnId).jarallax({
637                    speed: speed
638                });
639            }
640        }
641
642        var newScene = [];
643        document.querySelectorAll('.tp-parallax-section').forEach((element, index) => {
644            newScene.push(element);
645        });
646
647        $('.tp-parallax-yes').each(function (index) {
648            $(this).append(newScene[index]);
649        });
650    };
651
652    var ImgCarousel = function ($scope, $) {
653        $scope.find('.tpswiper').each(function () {
654            var slider_elem = $(this);
655            var settings = slider_elem.data('thop');
656            var options = {
657                slidesPerView: settings['item'],
658                spaceBetween: settings['space'],
659                centeredSlides: settings['center'],
660                mousewheel: settings['mouse'],
661                pagination: {
662                    el: '.swiper-pagination',
663                    clickable: true,
664                },
665                loop: true,
666                coverflowEffect: {
667                    rotate: 10,
668                    stretch: 80,
669                    depth: 200,
670                    modifier: 1,
671                    slideShadows: false,
672                },
673                autoplay: {
674                    delay: settings['speed'],
675                    enabled:settings['auto'],
676                },               
677                breakpoints: {
678                    1140: {
679                        slidesPerView: settings['item'],
680                    },
681                    768: {
682                        slidesPerView: settings['item_tab'],
683                    },
684                    1: {
685                        slidesPerView: 1,
686                    },
687                },
688                navigation: {
689                    nextEl: '.khbprev',
690                    prevEl: '.khbnxt',
691                },
692            };
693           
694            if (settings['cover']) {
695                options['effect'] = 'coverflow';
696            } 
697
698            if ('undefined' === typeof Swiper) {
699                const asyncSwiper = elementorFrontend.utils.swiper;
700                new asyncSwiper(slider_elem, options).then((newSwiperInstance) => {
701                    var swiper = newSwiperInstance;
702                });
703
704            } else {
705                var swiper = new Swiper(slider_elem, options);
706            } 
707
708        });
709    };
710
711    var HvrEveal = function ($scope, $) {
712        $scope.find('.hoverevel-scene').each(function () {
713            var slider_elem = $(this);
714            var $magic = slider_elem.find('.magic'),
715                magicWHalf = $magic.width() / 2;
716            $(document).on("mousemove", function (e) {
717                $magic.css({
718                    "left": e.pageX - magicWHalf,
719                    "top": e.pageY - magicWHalf
720                });
721            });
722        });
723    };
724    var TbHvr3 = function ($scope, $) {
725        $scope.find('.tb_lhvr3').each(function () {
726            $('.tb_lhvr3-name').on('mouseenter', function () {
727                var main = $(this).data('id');
728                $('.tb_lhvr3-name.active').removeClass('active');
729                $('.tb_lhvr3imgs li.show').removeClass("show");
730                $('.tb_lhvr3imgs li:nth-child(' + main + ')').addClass("show");
731                $('.tb_lhvr3-name:nth-child(' + main + ')').addClass('active');
732            })
733            $('.tb_lhvr3-name:nth-child(1)').trigger('mouseenter');
734        });
735    };
736    var PlyrVideo = function ($scope, $) {
737        $scope.find('.plyr__video-embed').each(function () {
738            if (typeof Plyr == 'function') {
739                const player = new Plyr($(this), {});
740            }
741        });
742    };
743
744    var TpOffSidebar = function ($scope, $) {
745        $scope.find('.tp-off-sidebar').each(function () {
746
747            var slider_elem = $(this);
748
749            slider_elem.find('.tp-tap').on('click', function () {
750                slider_elem.removeClass('menu-is-closed').addClass('menu-is-opened');
751            });
752
753            $('.close-menu, .click-capture').on('click', function () {
754                slider_elem.removeClass('menu-is-opened search-is-opened').addClass('menu-is-closed search-is-closed');
755                slider_elem.find('.momenu-list ul').slideUp(300);
756            });
757
758            var a = slider_elem.find(".momenu-list");
759            a.length && (a.children("li").addClass("menu-item-parent"), a.find(".menu-item-has-children > a").on("click", function (e) {
760                e.preventDefault();
761                $(this).toggleClass("opened");
762                var n = $(this).next(".sub-menu"),
763                    s = $(this).closest(".menu-item-parent").find(".sub-menu");
764                a.find(".sub-menu").not(s).slideUp(250), n.slideToggle(250)
765            }));
766
767        });
768    };
769    
770    var TpHeader = function ($scope, $) {
771        $scope.find('.xlmega-header').each(function () {
772
773            var slider_elem = $(this);
774
775            var hclass = slider_elem;
776            var hclassanim = $scope.find('.xlmega-sticky-wrapper');
777            var inject_plus = $scope.find('.menu-item-has-children>a');
778            $scope.find('.menu-item-has-children>a').addClass('hasub');
779            inject_plus.append('<span class="tpexpand">+</span>');
780            if (hclassanim) {
781
782                var c, currentScrollTop = 0;
783
784                $(window).scroll(function () {
785                    var a = $(window).scrollTop();
786                    var b = hclassanim.height();
787
788                    currentScrollTop = a;
789
790                    if (c < currentScrollTop && a > b + b) {
791                        hclassanim.addClass("scrollUp");
792                        var trnsht = 'translateY(' + '-' + b + 'px' + ')';
793                        hclassanim.css("transform", trnsht);
794                    } else if (c > currentScrollTop && !(a <= b)) {
795                        hclassanim.removeClass("scrollUp");
796                        hclassanim.css("transform", "none");
797                    }
798                    c = currentScrollTop;
799
800                    if (a > (b + 150)) {
801                        hclassanim.addClass("fixed");
802                        $('body').css("padding-top",b+'px');
803                    } else {
804                        hclassanim.removeClass("fixed");
805                        $('body').css("padding-top",'0');
806                    }
807
808                });
809            }
810
811            $('.tp-navbar-toggle').on('click', function () {
812                var target = $(this);
813                if (target.is(".tp-navbar-toggle")) {
814                    slider_elem.removeClass('menu-is-closed').addClass('menu-is-opened');
815                } else {
816                    slider_elem.removeClass('search-is-closed').addClass('search-is-opened');
817                }
818
819            });
820
821            $('.close-menu, .click-capture, .momenu-list a,.tpclosetivo').on('click', function () {
822                if( $(this).hasClass('hasub') ){
823                   return;
824                }
825                slider_elem.removeClass('menu-is-opened search-is-opened').addClass('menu-is-closed search-is-closed');
826                $('.momenu-list ul').slideUp(300);
827            });
828
829            var a = $(".momenu-list");
830            a.length && (a.children("li").addClass("menu-item-parent"), a.find(".menu-item-has-children > a").on("click", function (e) {
831                e.preventDefault();
832                $(this).toggleClass("opened");
833                var n = $(this).next(".sub-menu"),
834                    s = $(this).closest(".menu-item-parent").find(".sub-menu");
835                a.find(".sub-menu").not(s).slideUp(250), n.slideToggle(250)
836            }));
837        });
838    };
839
840
841    var TpHoverFullscreen = function ($scope, $) {
842        $scope.find('.tphoverfullscreen').each(function () {
843            var item = $(this).find('.item');
844            var img = $(this).find('.tpimg');
845            item.on('mouseenter', function () {
846                var tab_id = $(this).attr('data-tab');
847                item.removeClass('current');
848                $(this).addClass('current');
849                img.removeClass('current');
850                $("#" + tab_id).addClass('current');
851                if ($(this).hasClass('current')) {
852                    return false;
853                }
854            });
855        });
856    };
857    var TpTab = function ($scope, $) {
858        $scope.find('.tp-tab').each(function () {
859            var tabArea = "ul.tab-area li",
860                tabContent = '.tab-content';
861            $(tabArea).add(tabContent).each(function () {
862                $(this).siblings(':first-child').addClass('active');
863            });
864            $(tabArea).on('click', function () {
865                $(this).each(function () {
866                    var tabIndex = $(this).index();
867                    $(this).siblings().removeClass('active');
868                    $(this).parent('ul').next(".tab-wrap").find(tabContent).removeClass('active');
869                    $(this).addClass('active');
870                    $(this).parent('ul').next(".tab-wrap").find(tabContent).eq(tabIndex).addClass('active');
871                })
872            });
873        });
874    }; 
875
876    var TbBfeAft = function ($scope, $) {
877        $scope.find('.beer-slider').each(function () {
878            if (typeof BeerSlider !== 'undefined' && $.isFunction(BeerSlider)) {
879                $.fn.BeerSlider = function (options) {
880                    options = options || {};
881                    return this.each(function () {
882                        new BeerSlider(this, options);
883                    });
884                };
885                $(".beer-slider").each(function (index, el) {
886                    $(el).BeerSlider({
887                        start: $(el).data("start")
888                    })
889                });
890            }
891        });
892    };
893
894    var TpScrollTo = function ($scope, $) {
895        $scope.find('.scrollto-wrap').each(function () {
896            var _target = $(this).parents('.elementor-section').next();
897            $(this).find(".scroll-to").click(function() {
898                $('html, body').animate({
899                    scrollTop: _target.offset().top
900                }, 500);
901            });
902        });
903    };
904
905    var Tp_Global_Event = function ($scope, $) {
906
907        $scope.find('.tp-close-popup').each(function () {
908            $(this).on('click', function (e) {
909                $(this).parents('.elementor-popup-modal').hide();
910            });
911        });
912    };
913
914    var TpFullBlogSlider = function ($scope, $) {
915        $scope.find('.thepack-swiper').each(function () {
916
917	        var settings = $(this).find('.swiper-wrapper').data('slick');
918	        var prev = $(this).find('.khbprev');
919	        var nxt = $(this).find('.khbnxt');
920			var pagination = $(this).find('.swiper-pagination');
921
922            var options = {
923
924               loop: true,
925               navigation: {
926                    nextEl: prev,
927                    prevEl: nxt,
928                }, 		
929                 pagination: {
930                    el: pagination,
931                    clickable: true,
932                    type: 'bullets',
933                },		
934
935                 breakpoints: {
936                    480: {
937                        slidesPerView: 1,
938                    }
939                }, 																
940                //mousewheel: true,
941            };
942
943			if ( settings['item_tab']){
944				var dataOptions = {
945					breakpoints: {
946						768: {
947							slidesPerView: settings['item_tab'],
948						}
949					}
950				}
951				options = $.extend({}, options, dataOptions)
952			}
953
954			if (settings['items']){
955				var dataOptions = {
956					breakpoints: {
957						1025: {
958							slidesPerView: settings['items'],
959						}
960					}
961				}
962				options = $.extend({}, options, dataOptions)
963			}
964
965			if (settings['space']){
966				var dataOptions = {
967					spaceBetween: settings['space'],
968				}
969				options = $.extend({}, options, dataOptions)
970			}
971
972			if (settings['center']){
973				var dataOptions = {
974					centeredSlides: settings['center'],
975				}
976				options = $.extend({}, options, dataOptions)
977			}
978
979			if (settings['transition']){
980				var dataOptions = {
981					effect: settings['transition'],
982				}
983				options = $.extend({}, options, dataOptions)
984			}
985
986			if ( settings['auto'] ){		
987				var dataOptions = {
988					autoplay: {
989						delay: settings['speed'],
990						enabled: true,					
991					}
992				}
993				options = $.extend({}, options, dataOptions)
994			}
995
996			if ('undefined' === typeof Swiper) {
997                const asyncSwiper = elementorFrontend.utils.swiper;
998                new asyncSwiper($(this), options).then((newSwiperInstance) => {
999                    var swiper = newSwiperInstance;
1000                });
1001
1002            } else {
1003                var swiper = new Swiper($(this), options);
1004            }
1005
1006
1007        });
1008    };
1009
1010
1011    var TpContact = function ($scope, $) {
1012        $scope.find('.tp-contact-wrap').each(function () {
1013            var slider_elem = $(this);
1014            slider_elem.submit(function (e) {
1015                e.preventDefault();
1016                var this_form = $(this);
1017                var settings = this_form.data('xld');
1018
1019
1020                this_form.find('.tp-form-btn button').addClass('working');
1021                var mf = [];
1022                this_form.find('.item').each(function () {
1023
1024                    $(this).find('.tp-input').removeClass("error");
1025                    var options = $(this).data("xld");
1026                    var form_value = $(this).find(":input").val();
1027                    var placeholder = $(this).find(":input").attr('placeholder');
1028
1029                    mf.push({
1030                        'id': options['id'],
1031                        'type': options['type'],
1032                        'value': form_value,
1033                        'placeholder': placeholder,
1034                        'required': options['required'],
1035                    });
1036                });
1037
1038                mf.push({
1039                    'to': settings['email'],
1040                    'success_msg': settings['success'],
1041                    'fail_msg': settings['fail'],
1042                    'error_msg': settings['error'],
1043                    'subject': settings['subject'],
1044                });
1045
1046                var data = {
1047                    'action': 'tp_process_form',
1048                    'data': mf,
1049                };
1050
1051                $.ajax({
1052                    url: tp_loadmore_params.ajaxurl,
1053                    data: data,
1054                    dataType: 'json',
1055                    type: 'POST',
1056                    success: function (result) {
1057
1058                        $.each(result, function (k, v) {
1059
1060                            if (v['required']) {
1061                                $('.elementor-repeater-item-' + v['id']).find('.tp-input').addClass('error');
1062                            }
1063                        });
1064
1065                        if (result['error']) {
1066                            this_form.find('.response').empty().show().html('<p class="error">' + result['error'] + '</p>').delay(3000).fadeOut(600);
1067                        } else if (result['fail']) {
1068                            this_form.find('.response').empty().show().html('<p class="fail">' + result['fail'] + '</p>').delay(3000).fadeOut(300);
1069                        } else {
1070
1071                            this_form.find('.response').empty().show().html('<p class="success">' + result['success'] + '</p>').delay(3000).fadeOut(300);
1072                        }
1073
1074                        this_form.find('.tp-form-btn button').removeClass('working');
1075
1076                        //this_form.find('.response').html(result);
1077
1078                    },
1079
1080                }).responseJSON;
1081
1082            });
1083
1084        });
1085    };
1086
1087
1088    var TpFsSlider = function ($scope, $) {
1089
1090        $scope.find('.tp-main-slider').each(function () {
1091            var settings = $(this).data('xld');
1092            var main_wrap = $(this).find('.swiper-container');
1093            var interleaveOffset = 0.5;
1094            var options = {
1095                loop: true,
1096                speed: 1000,
1097                parallax: true,
1098                watchSlidesProgress: true,
1099                spaceBetween: 0,
1100                pagination: {
1101                    el: main_wrap.find('.swiper-pagination'),
1102                    clickable: true,
1103                },
1104                autoplay: {
1105                    delay: settings['speed'],
1106                    enabled: settings['auto'],
1107                },               
1108                navigation: {
1109                    nextEl: main_wrap.find('.swiper-button-next')[0],
1110                    prevEl: main_wrap.find('.swiper-button-prev')[0],
1111                }
1112            };
1113            if ('undefined' === typeof Swiper) {
1114                const asyncSwiper = elementorFrontend.utils.swiper;
1115                new asyncSwiper(main_wrap, options).then((newSwiperInstance) => {
1116                    var swiper = newSwiperInstance;
1117                });
1118
1119            } else {
1120                var swiper = new Swiper(main_wrap, options);
1121            } 
1122            if (jQuery().jarallax && settings['parallax']) {
1123                $('.slide-bg-image').jarallax({imgPosition: '0% ' + settings['bgpos'] + '%'});
1124            }
1125        });
1126    };
1127
1128    var TpGmap = function ($scope, $) {
1129        $scope.find('.ae-gmap').each(function () {
1130            if (typeof google !== 'undefined' && $(this).hasClass("no-tpmap")) {
1131                var settings = $(this).data('xld');
1132                /*var icon = settings['icon'] ? '<i class="xldmp ' + settings['icon']+ '"></i>' : '';*/
1133                //set google map options map_style
1134                var map_options = {
1135                    center: new google.maps.LatLng(settings['lat'], settings['long']),
1136                    zoom: settings['zoom'],
1137                    panControl: false,
1138                    zoomControl: false,
1139                    mapTypeControl: false,
1140                    fullscreenControl: settings['fullscrn'],
1141                    streetViewControl: false,
1142                    mapTypeId: google.maps.MapTypeId.ROADMAP,
1143                    scrollwheel: false,
1144                    styles: JSON.parse(settings['style']),
1145                }
1146                //inizialize the map
1147                var map = new google.maps.Map(document.getElementById('google-container-' + settings['id'] + ''), map_options);
1148                //add a custom marker to the map
1149                var marker = new google.maps.Marker({
1150                    position: new google.maps.LatLng(settings['lat'], settings['long']),
1151                    map: map,
1152                    visible: true,
1153                    clickable: true,
1154                });
1155                if (settings['desc']) {
1156                    marker.info = new google.maps.InfoWindow({
1157                        content: settings['desc'],
1158                    });
1159                    google.maps.event.addListener(marker, 'click', function () {
1160                        marker.info.open(map, marker);
1161                    });
1162                }
1163
1164                //add custom buttons for the zoom-in/zoom-out on the map
1165                function CustomZoomControl(controlDiv, map) {
1166                    //grap the zoom elements from the DOM and insert them in the map
1167                    var controlUIzoomIn = document.getElementById('wa-zoom-in'),
1168                        controlUIzoomOut = document.getElementById('wa-zoom-out');
1169                    controlDiv.appendChild(controlUIzoomIn);
1170                    controlDiv.appendChild(controlUIzoomOut);
1171                    // Setup the click event listeners and zoom-in or out according to the clicked element
1172                    google.maps.event.addDomListener(controlUIzoomIn, 'click', function () {
1173                        map.setZoom(map.getZoom() + 1)
1174                    });
1175                    google.maps.event.addDomListener(controlUIzoomOut, 'click', function () {
1176                        map.setZoom(map.getZoom() - 1)
1177                    });
1178                }
1179
1180                var zoomControlDiv = document.createElement('div');
1181                var zoomControl = new CustomZoomControl(zoomControlDiv, map);
1182                var controlUIzoomIn = document.getElementById('wa-zoom-in');
1183                map.controls[google.maps.ControlPosition.LEFT_TOP].push(zoomControlDiv);
1184            }
1185        });
1186    };
1187
1188    var TpProVideoPop = function ($scope, $) {
1189
1190        $scope.find('.tp-video-pop').each(function () {
1191            var slider_elem = $(this);
1192            var settings = slider_elem.data('xld');
1193
1194            slider_elem.find('.tpvideopop').on('click', function (e) {
1195
1196                e.preventDefault();
1197                $('body').addClass('poupactive');
1198                var this_form = $(this);
1199                var vidurl = this_form.data('vurl');
1200                var data = {
1201                    'action': 'tp_pro_show_video',
1202                    'vurl': vidurl,
1203                };
1204                $.ajax({
1205                    url: tp_loadmore_params.ajaxurl, 
1206                    data: data,
1207                    type: 'POST',
1208                    success: function (result) {
1209
1210                        this_form.find('.tp-form-btn button').removeClass('working');
1211                        $('.close').on('click', function () {
1212                            $('body').removeClass('poupactive');
1213                            slider_elem.parents('html').find('.popwrap').empty();
1214                        });
1215                        slider_elem.parents('html').find('.popwrap').html(result);
1216
1217                        $('iframe').mediaWrapper({
1218                            intrinsic: false,
1219                            baseWidth: 16,
1220                            baseHeight: 9
1221                        });
1222
1223                    },
1224
1225                });
1226
1227            });
1228        });
1229    };     
1230
1231    function tp_global_function(){
1232
1233        $('.launcher').on('click', function() {
1234            $('.tp-quick-pop').toggleClass("show"); //you can list several class names 
1235        });
1236
1237        $(document).on("scroll", function () {
1238            var pixels = $(document).scrollTop();
1239            var pageHeight = $(document).height() - $(window).height();
1240            var progress = 100 * pixels / pageHeight;
1241            $(".tp-reading-progress .progress").css("width", progress + "%");
1242        })
1243
1244        if ($('.tp-circular-mouse').length){
1245
1246        }        
1247    }
1248
1249    var Tpwoo_tabs = function ($scope, $) {
1250        $scope.find('.tp-tab').each(function () {
1251            var tabArea = "ul.tab-area li",
1252                tabContent = '.tab-content';
1253            $(tabArea).add(tabContent).each(function () {
1254                $(this).siblings(':first-child').addClass('active');
1255            });
1256            $(tabArea).on('click', function () {
1257                $(this).each(function () {
1258                    var tabIndex = $(this).index();
1259                    $(this).siblings().removeClass('active');
1260                    $(this).parent('ul').next(".tab-wrap").find(tabContent).removeClass('active');
1261                    $(this).addClass('active');
1262                    $(this).parent('ul').next(".tab-wrap").find(tabContent).eq(tabIndex).addClass('active');
1263                })
1264            });
1265        });
1266    };
1267
1268    var Tpwoo_Gallery = function ($scope, $) {
1269        $scope.find('.thepack-product-images').each(function () {
1270            var settings = $(this).data('xld');
1271            if( settings['zoom'] ){
1272                $(this).find('.woocommerce-product-gallery__trigger').html(sett
1272ings['zoom']);
1273            }
1274            if( settings['prev'] ){
1275                $(this).find('.flex-prev').html(settings['prev']);
1276            }
1277            if( settings['next'] ){
1278                $(this).find('.flex-next').html(settings['next']);
1279            }
1280        });
1281    }; 
1282
1283    var Tpwoo_Archive = function ($scope, $) {
1284        $scope.find('.tp-product-catalog-wrap').each(function () {
1285            var icon = $(this).find('.add_to_cart_button').data('icon');
1286            if( icon ){
1287                $(this).find('.add_to_cart_button').append(icon);
1288            }
1289        });
1290    }; 
1291
1292    var TpFullscreenSearch = function ($scope, $) {
1293        $scope.find('.elementor-widget-container').each(function () {
1294            var icon = $(this).find('.seachicon');
1295            var fs_wrap = $(this).find('.tp-fs-search-wrap');
1296            var fs_close = $(this).find('.closepop');
1297            if( icon ){
1298                $(icon).on('click', function () {
1299                    fs_wrap.addClass('active');
1300                });
1301            }
1302            if( fs_close ){
1303                $(fs_close).on('click', function () {
1304                    fs_wrap.removeClass('active');
1305                });
1306            }            
1307        });
1308    }; 
1309
1310    var TpAccordionMenu = function ($scope, $) {
1311        $scope.find('.tp-accordionmenu').each(function () {
1312            var icon = $(this).data('xld');
1313            var a = $(this).find(".momenu-list");
1314            $(this).find('.menu-item-has-children').children('a').append('<i aria-hidden="true" class="tpexpand '+icon+'"></i>');
1315            a.length && (a.children("li").addClass("menu-item-parent"), a.find(".tpexpand").on("click", function (e) {
1316                e.preventDefault();
1317                $(this).parent().toggleClass("opened");
1318                var n = $(this).parent().next(".sub-menu"),
1319                    s = $(this).parent().closest(".menu-item-parent").find(".sub-menu");
1320                a.find(".sub-menu").not(s).slideUp(250), n.slideToggle(250)
1321            }));
1322                        
1323        });
1324    };
1325
1326    var TpSynHighlighter = function ($scope, $) {
1327        $scope.find('.tp-syntax-highlight').each(function () {
1328            var settings = $(this).data('xld');
1329            $(this).find('pre.code').highlight({
1330                source: settings['source'],
1331            });
1332        });
1333    };
1334    
1335    var TpFloatingNav = function ($scope, $) {
1336        $scope.find('.tp-floating-nav').each(function () {
1337            var settings = $(this).data('xld');
1338            $('.tp-float-nav').onePageNav({
1339                filter: ':not(.external)'
1340            });
1341        });
1342    };
1343
1344    
1345
1346    var TpAutoTab = function ($scope, $) {
1347        $scope.find('.auto-tab').each(function () {
1348            var settings = $(this).data('xld');
1349            var sliderContainer = $(this).find('.swiper-default');
1350            var nxt = $(this).find('.khbprev');
1351            var prv = $(this).find('.khbnxt');
1352
1353            var sliderSettings = {
1354              'loop': true,
1355              'spaceBetween': 0,
1356              'effect': 'fade',
1357              'navigation': {
1358                nextEl: nxt,
1359                prevEl: prv,
1360            },              
1361              'autoplay': {
1362                delay: settings['speed'],
1363                enabled: settings['auto'],
1364            },                         
1365              breakpoints: {
1366                  1140: {
1367                      slidesPerView: 1,
1368                  },
1369                  768: {
1370                      slidesPerView: 1,
1371                  },
1372                  1: {
1373                      slidesPerView: 1,
1374                  },
1375              },            
1376            };
1377  
1378            var thumbsContainer = $(this).find('.swiper-sync');
1379            var thumbsSettings = {
1380              'loop': true,
1381              'spaceBetween': settings['space'],
1382              'centeredSlides': settings['center'],             
1383              breakpoints: {
1384                  1140: {
1385                      slidesPerView: settings['item'],
1386                  },
1387                  768: {
1388                      slidesPerView: settings['item_tab'],
1389                  },
1390                  1: {
1391                      slidesPerView: 1,
1392                  },
1393              },            
1394            };
1395  
1396            if ( 'undefined' === typeof Swiper ) {
1397              const asyncSwiper = elementorFrontend.utils.swiper;
1398          
1399              new asyncSwiper( thumbsContainer, thumbsSettings ).then( ( newSwiperThumbsInstance ) => {
1400                  var swiperThumbs = newSwiperThumbsInstance;
1401                  sliderSettings["thumbs"] = { swiper: swiperThumbs  };
1402          
1403                  new asyncSwiper( sliderContainer, sliderSettings ).then( ( newSwiperSliderInstance ) => {
1404                      var swiperSlider = newSwiperSliderInstance;
1405                  } );
1406              } );
1407          
1408          }
1409          else {
1410          
1411              var swiperThumbs = new Swiper(thumbsContainer, thumbsSettings);
1412          
1413              sliderSettings["thumbs"] = { swiper: swiperThumbs  };
1414          
1415              var swiper = new Swiper(sliderContainer, sliderSettings);
1416          
1417          }
1418
1419        });
1420    };
1421
1422    var Tpwoo_ProDesign = function ($scope, $) {
1423        $scope.find('.tpswiper').each(function () {
1424
1425            var settings = $(this).data('xld');
1426            var nxt = $(this).find('.khbprev');
1427            var prv = $(this).find('.khbnxt');
1428            var pagi = $(this).find('.swiper-pagination');        
1429            var options = {
1430                paginationClickable: true,
1431                spaceBetween: settings['space'],
1432                navigation: {
1433                    nextEl: nxt,
1434                    prevEl: prv,
1435                },
1436                breakpoints: {
1437                    1025: {
1438                        slidesPerView: settings['item'],
1439                    },
1440                    768: {
1441                        slidesPerView: settings['item_tab'],
1442                    },
1443                    480: {
1444                        slidesPerView: 1,
1445                    },
1446                },
1447                pagination: {
1448                    el: pagi,
1449                    clickable: true,
1450                    type: 'bullets',
1451                },
1452                loop: true,
1453                autoplay: {
1454                    delay: settings['speed'],
1455                    enabled: settings['auto'],
1456                }
1457            };
1458            if ('undefined' === typeof Swiper) {
1459                const asyncSwiper = elementorFrontend.utils.swiper;
1460                new asyncSwiper($(this), options).then((newSwiperInstance) => {
1461                    var swiper = newSwiperInstance;
1462                });
1463
1464            } else {
1465                var swiper = new Swiper($(this), options);
1466            } 
1467
1468        });
1469
1470        $scope.find('.tp-woo-loop-1').each(function () {
1471            var icon = $(this).find('.add_to_cart_button').data('icon');
1472            if( icon ){
1473                $(this).find('.add_to_cart_button').append(icon);
1474            }
1475        });
1476    }; 
1477
1478    var Tpwoo_AddTo_Cart = function ($scope, $) {
1479        $scope.find('.tpsinglecart').each(function () {
1480            var settings = $(this).data('xld');
1481            if( settings['cart'] ){
1482                $(this).find('.single_add_to_cart_button').append(settings['cart']);
1483            }
1484            $(this).find('.single_add_to_cart_button').on('click', function(e) {
1485                if ( $(this).hasClass('disabled') ){
1486                    return;
1487                }
1488                e.preventDefault();
1489				let $form = $( this ).closest('form');
1490			
1491				if ( ! $form[0].checkValidity() ) {
1492					$form[0].reportValidity();
1493			
1494					return false;
1495				}
1496			
1497				let $thisBtn = $( this ),
1498					product_id = $thisBtn.val() || '',
1499					cartFormData = $form.serialize();
1500			
1501				$.ajax( { 
1502					type: 'POST',
1503					url: tp_loadmore_params.ajaxurl,
1504					data: 'action=tp_add_cart_single_product&add-to-cart=' + product_id + '&' + cartFormData,
1505					beforeSend: function () {
1506						$thisBtn.removeClass( 'added' ).addClass( 'loading' );
1507					},
1508					complete: function () {
1509						$thisBtn.addClass( 'added' ).removeClass( 'loading' );
1510					},
1511					success: function ( response ) {
1512						if ( response.error && response.product_url ) {
1513							window.location = response.product_url;
1514			
1515							return;
1516						}
1517			
1518						setTimeout( function () {
1519							$thisBtn.removeClass( 'added' );
1520						}, 1000 );
1521			
1522						$( document.body ).trigger( 'wc_fragment_refresh' );
1523						$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $thisBtn ] );
1524			
1525						if ( typeof wc_add_to_cart_params === 'undefined' ) {
1526							return false;
1527						}
1528
1529						var currentCartCount = parseInt($('.wpr-mini-cart-icon-count').text());
1530						var updatedCartCount = parseInt($scope.find('.wpr-quantity-wrapper .qty').val());
1531						$('.wpr-mini-cart-icon-count').text(currentCartCount + updatedCartCount);
1532					},
1533				} );                
1534            });
1535
1536        });
1537    };
1538
1539    
1540
1541    $(window).on('elementor/frontend/init', function () {
1542
1543        var widgets = {
1544
1545            'ae-accor1': Tpaccordion1,
1546
1547            'tb_testim_1': Testimonial,
1548            'tb_gallery1': ImgCarousel,
1549            'tb_imgbx4': ImgCarousel,
1550            'tb_imgbox1': ImgCarousel,
1551
1552            'tp-carousel1': FolioCarousel,
1553            'tp-slidershop': FolioCarousel,
1554            'tp-typing1': Typing1,
1555            'tp-slkcrsl': SlickImgCar,
1556            'wa-gallery': Gallery2,
1557            'tb_foliohvr': HvrFolio,
1558            'tb_team1': Team1,
1559            'tb_team2': Team2,
1560            'tb_team3': Team1,
1561            'tb_caroparlx': CaroPrlx,
1562            
1563
1564            'tb_testim_5': Testi5,
1565            'tb_cardslider': CardSlider,
1566            'gng-timer': TbDateCter,
1567            'tp_imgslide': TbgalSlkThm,
1568            'tp-beforeafter': TbBfeAft,
1569            'tb_lhvr3': TbHvr3,
1570            'hrevbg': HvrEveal,
1571            'ae-gmap': TpGmap,
1572            'tp_plyr_video': PlyrVideo,
1573            'tp-circounter': CirclCntr,
1574            'tp-hvrbg': TpHoverFullscreen,
1575            'tb_client1': ClientSlider,
1576            'tp_tab': TpTab, 
1577            'tp-fsslider': TpFsSlider,
1578            'tpmegamenu': TpHeader,
1579            'tpbgheader-1': TpHeader,
1580            'tp-contact': TpContact,
1581            'tbbgvid': TpProVideoPop,
1582            'tp-scrollto': TpScrollTo,
1583            'tp-syn-hightlighter': TpSynHighlighter,
1584            'tp-offmenu': TpOffSidebar,
1585            'tpmenuacc': TpAccordionMenu,
1586            'tpfullscrnsearch': TpFullscreenSearch,
1587            'tpfullslide': TpFullBlogSlider,
1588            'tp-auto-tab': TpAutoTab,
1589            'tp-floating-nav': TpFloatingNav,
1590
1591            'tp-woo-tabs': Tpwoo_tabs,
1592            'tp_woothumb': Tpwoo_Gallery,
1593            'tp_wooaddtocart': Tpwoo_AddTo_Cart,
1594            'tp_wooarch': Tpwoo_Archive,
1595            'tp_wooprode': Tpwoo_ProDesign,
1596            'tp_woocat': Tpwoo_ProDesign,
1597            'tp_woorelated': Tpwoo_ProDesign,
1598
1599        };
1600
1601        if (elementorFrontend.isEditMode()) {
1602
1603            $.each(widgets, function (widget, callback) {
1604                elementorFrontend.hooks.addAction('frontend/element_ready/' + widget + '.default', callback);
1605            });
1606            elementorFrontend.hooks.addAction('frontend/element_ready/section', ParaLLaxBg);
1607            tp_global_function();
1608            
1609        } else {
1610
1611            $.each(widgets, function (widget, callback) {
1612                elementorFrontend.hooks.addAction('frontend/element_ready/' + widget + '.default', callback);
1613            });
1614            elementorFrontend.hooks.addAction('frontend/element_ready/section', ParaLLaxBg);
1615            elementorFrontend.hooks.addAction('frontend/element_ready/column', Tp_Click_Column);
1616            //TODO : Button click close popup
1617            elementorFrontend.hooks.addAction('frontend/element_ready/global', Tp_Global_Event);
1618            tp_global_function();
1619        }
1620
1621    });
1622
1623    if (typeof ScrollReveal !== 'undefined' && $.isFunction(ScrollReveal)) {
1624        window.sr = ScrollReveal();
1625        sr.reveal('.reveal-top, .reveal-bottom, .reveal-left, .reveal-right', {
1626            delay: 700,
1627            easing: 'ease',
1628            duration: 800,
1629            scale: 0,
1630        });
1631        sr.reveal('.reveal-top', {
1632            origin: 'top',
1633        }, 250);
1634        sr.reveal('.reveal-bottom', {
1635            origin: 'bottom',
1636        }, 250);
1637        sr.reveal('.reveal-left', {
1638            origin: 'left',
1639        }, 250);
1640        sr.reveal('.reveal-right', {
1641            origin: 'right',
1642        }, 250);
1643    }
1644    var tbtops = document.querySelector(".tp-progress-wrap");
1645    if (tbtops){
1646        var progressPath = document.querySelector('.tp-progress-wrap path');
1647        var pathLength = progressPath.getTotalLength();
1648        progressPath.style.transition = progressPath.style.WebkitTransition = 'none';
1649        progressPath.style.strokeDasharray = pathLength + ' ' + pathLength;
1650        progressPath.style.strokeDashoffset = pathLength;
1651        progressPath.getBoundingClientRect();
1652        progressPath.style.transition = progressPath.style.WebkitTransition = 'stroke-dashoffset 10ms linear';		
1653        var updateProgress = function () {
1654            var scroll = $(window).scrollTop();
1655            var height = $(document).height() - $(window).height();
1656            var progress = pathLength - (scroll * pathLength / height);
1657            progressPath.style.strokeDashoffset = progress;
1658        }
1659        updateProgress();
1660        $(window).scroll(updateProgress);	
1661        var offset = 50;
1662        var duration = 550;
1663        jQuery(window).on('scroll', function() {
1664            if (jQuery(this).scrollTop() > offset) {
1665                jQuery('.tp-progress-wrap').addClass('active-progress');
1666            } else {
1667                jQuery('.tp-progress-wrap').removeClass('active-progress');
1668            }
1669        });				
1670        jQuery('.tp-progress-wrap').on('click', function(event) {
1671            event.preventDefault();
1672            jQuery('html, body').animate({scrollTop: 0}, duration);
1673            return false;
1674        })
1675    }
1676
1677    if ($('.masonwrp').hasClass('masonon')) {
1678        var container = $('.masonon');
1679        container.imagesLoaded(function () {
1680            container.masonry({
1681                isAnimated: true
1682            });
1683        });
1684    }
1685
1686    // Page loader
1687    $(".tp-page-loader-wrap").fadeOut("slow");
1688
1689    $( document ).on( 'click', '.quantity .minus', function() {
1690        var $input = $(this).parent().find('input');
1691        var count = parseInt($input.val()) - 1;
1692        count = count < 1 ? 1 : count;
1693        $input.val(count);
1694        $input.change();
1695        $('button[name="update_cart"]').click();
1696        $( 'div.woocommerce > form input[name="update_cart"]' ).prop( 'disabled', false );
1697        return false;
1698   });
1699   
1700   
1701   $( document ).on( 'click', '.quantity .plus', function() {
1702        var $input = $(this).parent().find('input');
1703        $input.val(parseInt($input.val()) + 1);
1704        $input.change();
1705        $('button[name="update_cart"]').click();
1706        $( 'div.woocommerce > form input[name="update_cart"]' ).prop( 'disabled', false );
1707        return false;
1708   });
1709   
1710   $(document).ready(function() {
1711    if ( $('.tp-dark-mode-wrapper').length){
1712    var settings = $('.tp-dark-mode-wrapper').data('xld');
1713    var options = {
1714        left: 'unset',
1715        mixColor: settings['mixColor'],
1716        backgroundColor: settings['backgroundColor'],
1717        buttonColorDark: '#100f2c',
1718        buttonColorLight: '#fff',
1719        saveInCookies: settings['saveInCookies'],
1720        label: settings['label'],
1721        autoMatchOsTheme: settings['autoMatchOsTheme']
1722      }
1723      const darkmode = new Darkmode(options);
1724      darkmode.showWidget();
1725      $(settings['exclude']).addClass('darkmode-ignore');
1726    }
1727
1728   });
1729
1730
1731})(jQuery);

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.