PageSourceSearch

https://kodiak.org/wp-content/plugins/lestin-themer/elementor/assets/main.js?ver=1.0.0

js kodiak.org collected 2026-10-02 10:54:45 UTC 13,493 bytes, 390 lines download raw bytes

1(function ($) {
2	"use strict";
3  	var GaviasElements = {
4	 	init: function(){     
5			GaviasElements.initDebouncedresize();
6			elementorFrontend.hooks.addAction('frontend/element_ready/gva-heading-block.default', GaviasElements.elementHeadingBlock);
7			elementorFrontend.hooks.addAction('frontend/element_ready/gva-testimonials.default', GaviasElements.elementTestimonial);
8			elementorFrontend.hooks.addAction('frontend/element_ready/gva-testimonials-carousel.default', GaviasElements.elementTestimonial);
9			elementorFrontend.hooks.addAction('frontend/element_ready/gva-posts.default', GaviasElements.elementPosts);
10			elementorFrontend.hooks.addAction('frontend/element_ready/gva-portfolio.default', GaviasElements.elementPortfolio);
11			elementorFrontend.hooks.addAction('frontend/element_ready/gva-gallery.default', GaviasElements.elementGallery);
12			elementorFrontend.hooks.addAction('frontend/element_ready/gva-events.default', GaviasElements.elementEvents);
13			elementorFrontend.hooks.addAction('frontend/element_ready/gva-brand.default', GaviasElements.elementBrand);
14			elementorFrontend.hooks.addAction('frontend/element_ready/gva-counter.default', GaviasElements.elementCounter);
15			elementorFrontend.hooks.addAction('frontend/element_ready/gva-services-group.default', GaviasElements.elementServices);
16			elementorFrontend.hooks.addAction('frontend/element_ready/gva-countdown.default', GaviasElements.elementCountDown);
17			elementorFrontend.hooks.addAction('frontend/element_ready/gva-video-carousel.default', GaviasElements.elementVideoCarousel);
18			elementorFrontend.hooks.addAction('frontend/element_ready/gva-user.default', GaviasElements.elementUser);
19			elementorFrontend.hooks.addAction('frontend/element_ready/gva-circle-progress.default', GaviasElements.elementCircleProgress);
20			
21			elementorFrontend.hooks.addAction('frontend/element_ready/gva_icon_box_group.default', GaviasElements.elementInitCarousel);
22			elementorFrontend.hooks.addAction('frontend/element_ready/gva-content-carousel.default', GaviasElements.elementInitCarousel);
23			elementorFrontend.hooks.addAction('frontend/element_ready/gva-team.default', GaviasElements.elementInitCarousel);
24			
25			elementorFrontend.hooks.addAction('frontend/element_ready/gva-product.default', GaviasElements.elementInitCarousel);
26
27			elementorFrontend.hooks.addAction('frontend/element_ready/gva-listings.default', GaviasElements.elementInitCarousel);
28			elementorFrontend.hooks.addAction('frontend/element_ready/gva-listings-banner-group.default', GaviasElements.elementInitCarousel);
29			elementorFrontend.hooks.addAction('frontend/element_ready/gva-listings-packages.default', GaviasElements.elementInitCarousel);
30			
31			elementorFrontend.hooks.addAction('frontend/element_ready/gva_lt_item_gallery.default', GaviasElements.elementInitCarousel);
32			elementorFrontend.hooks.addAction('frontend/element_ready/gva_lt_item_rating_criteria.default', GaviasElements.elementListingItemRatingCriteria);
33
34			elementorFrontend.hooks.addAction('frontend/element_ready/column', GaviasElements.elementColumn);
35
36	 	},
37	 	backend: function(){
38	 		elementor.settings.page.addChangeCallback( 'lestin_post_preview', GaviasElements.handlePostPreview);
39	 	},
40	 	handlePostPreview: function(doc_preview_post_id){
41		 	elementor.saver.update({
42	         onSuccess: function onSuccess() {
43	            window.location.reload();
44	         }
45	      });
46      	window.location.reload();
47		},
48
49	 	initDebouncedresize: function(){
50		 	var $event = $.event,
51		  	$special, resizeTimeout;
52		  	$special = $event.special.debouncedresize = {
53			 	setup: function () {
54					$(this).on("resize", $special.handler);
55			 	},
56			 	teardown: function () {
57					$(this).off("resize", $special.handler);
58			 	},
59			 	handler: function (event, execAsap) {
60					var context = this,
61				  	args = arguments,
62				  	dispatch = function () {
63					 	event.type = "debouncedresize";
64					 	$event.dispatch.apply(context, args);
65				  	};
66
67				  	if (resizeTimeout) {
68					 	clearTimeout(resizeTimeout);
69				  	}
70
71					execAsap ? dispatch() : resizeTimeout = setTimeout(dispatch, $special.threshold);
72			 	},
73		  	threshold: 150
74		};
75	},
76
77	elementColumn: function($scope){
78
79		if(($scope).hasClass('gv-sidebar-offcanvas')){
80			var html = '<div class="control-mobile">';
81            	html += '<a class="control-mobile-link" href="#"><i class="fa-solid fa-bars"></i>Show Sidebar<a>';
82            html += '</div>';
83			$scope.append(html);
84
85			html = '<span class="filter-top"><a href="#" class="btn-close-filter"><i class="fas fa-times"></i></a></span>';
86			$scope.children('.elementor-column-wrap, .elementor-widget-wrap').children('.elementor-widget-wrap').prepend(html);
87		}
88		
89		var _body = $('body');
90		var _sidebar = $scope;
91		
92		$($scope).find('.control-mobile, .btn-close-filter').on('click', function(e){
93			e.preventDefault();
94			if(_body.hasClass('open-el-sidebar-offcanvas')){
95				_sidebar.removeClass('open');
96				setTimeout(function(){
97					_body.removeClass('open-el-sidebar-offcanvas');
98				 }, 200);
99			}else{
100				_sidebar.addClass('open');
101				_body.addClass('open-el-sidebar-offcanvas');
102			}
103		});
104	 },
105
106	elementPostArchive: function($scope){
107	
108		var $container = $scope.find('.post-masonry-style');
109		$container.imagesLoaded( function(){
110	  		$container.masonry({
111		 		itemSelector : '.item-masory',
112		 		gutterWidth: 0,
113		 		columnWidth: 1,
114	  		}); 
115		});
116	},
117
118	elementTestimonial: function($scope){
119		var $carousel = $scope.find('.init-carousel-swiper');
120		GaviasElements.initCarousel($carousel);
121	},
122
123	elementPosts: function($scope){
124		var $carousel = $scope.find('.init-carousel-swiper');
125		GaviasElements.initCarousel($carousel);
126	},
127
128	elementServices: function($scope){
129		var $carousel = $scope.find('.init-carousel-swiper');
130		GaviasElements.initCarousel($carousel);
131	},
132
133	elementPortfolio: function($scope){
134		var $carousel = $scope.find('.init-carousel-swiper');
135		GaviasElements.initCarousel($carousel);
136		if( $.fn.isotope ){
137		  	if($('.isotope-items').length){
138			 	$( '.isotope-items' ).each(function() {
139					var $el = $( this ),
140					$filter = $( '.portfolio-filter a'),
141					$loop =  $( this );
142
143					$loop.isotope();
144				
145					$(window).load(function() {
146				  		$loop.isotope( 'layout' );
147					});
148			 
149					if ( $filter.length > 0 ) {
150				  	$filter.on( 'click', function( e ) {
151					 	e.preventDefault();
152					 	var $a = $(this);
153					 	$filter.removeClass( 'active' );
154					 	$a.addClass( 'active' );
155					 	$loop.isotope({ filter: $a.data( 'filter' ) });
156				  	});
157				};
158			 });
159		  }
160		};
161
162	 },
163
164	 elementGallery: function($scope){
165		var $carousel = $scope.find('.init-carousel-swiper');
166		GaviasElements.initCarousel($carousel);
167	 },
168
169	 elementEvents: function($scope){
170		var $carousel = $scope.find('.init-carousel-swiper');
171		GaviasElements.initCarousel($carousel);
172	 },
173
174	 elementBrand: function($scope){
175		var $carousel = $scope.find('.init-carousel-swiper');
176		GaviasElements.initCarousel($carousel);
177	 },
178
179	 elementCounter: function($scope){
180		var $block = $scope.find('.milestone-block');
181		$block.appear(function() {
182		  var $endNum = parseInt(jQuery(this).find('.milestone-number').text());
183		  jQuery(this).find('.milestone-number').countTo({
184			 from: 0,
185			 to: $endNum,
186			 speed: 4000,
187			 refreshInterval: 60,
188			 formatter: function (value, options) {
189				value = value.toFixed(options.decimals);
190				value = value.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
191				return value;
192			 }
193		  });
194		},{accX: 0, accY: 0});
195	 },
196
197	 elementCountDown: function($scope){
198		$('[data-countdown="countdown"]').each(function(index, el) {
199		  var $this = $(this);
200		  var $date = $this.data('date').split("-");
201		  $this.gvaCountDown({
202			 TargetDate:$date[0]+"/"+$date[1]+"/"+$date[2]+" "+$date[3]+":"+$date[4]+":"+$date[5],
203			 DisplayFormat:"<div class=\"countdown-times\"><div class=\"day\">%%D%% <span class=\"label\">Days</span> </div><div class=\"hours\">%%H%% <span class=\"label\">Hours</span> </div><div class=\"minutes\">%%M%% <span class=\"label\">Minutes</span> </div><div class=\"seconds\">%%S%% <span class=\"label\">Seconds</span></div></div>",
204			 FinishMessage: "Expired"
205		  });
206		});
207	 },
208
209	 elementVideoCarousel: function($scope){
210		var $carousel = $scope.find('.init-carousel-swiper');
211		GaviasElements.initCarousel($carousel);
212	 },
213
214	elementHeadingBlock: function($scope){
215		if ($scope.find('.typed-effect').length) {
216			var _this = $scope.find('.typed-effect').first();
217      	var typedStrings = _this.data('strings');
218      	var typedTag = _this.attr('id');
219      	var typed = new Typed('#' + typedTag, {
220	        typeSpeed: 100,
221	        backSpeed: 100,
222	        fadeOut: true,
223	        loop: true,
224	        strings: typedStrings.split(',')
225      	});
226	  	}
227	},
228
229	elementInitCarousel: function($scope){
230		var $carousel = $scope.find('.init-carousel-swiper');
231		GaviasElements.initCarousel($carousel);
232	},
233
234
235	initCarousel: function($target){
236		var _default = {
237			items: 3, 
238			items_lg: 3,
239			items_md: 2,
240			items_sm: 2,
241			items_xs: 1,
242			items_xx: 1,
243			space_between: 30,
244			effect: 'slide',
245			loop: 1,
246			speed: 600,
247			autoplay: 1,
248			autoplay_delay: 6000,
249			autoplay_hover: 0,
250			navigation: 1,
251			pagination: 1,
252			pagination_type: 'bullets',
253			dynamic_bullets: 0
254		};
255		var settings = $target.data('carousel');
256		settings = $.extend(!0, _default, settings);
257		//-- Autoplay
258		var _autoplay = false;
259		if(settings.autoplay){
260			_autoplay = {
261				delay: settings.autoplay_delay,
262				disableOnInteraction: false,
263				pauseOnMouseEnter: settings.autoplay_hover,
264			}
265		}
266		//-- Pagination 
267		var _pagination = false;
268		if(settings.pagination){
269			_pagination = {
270				el: $target.parents('.swiper-slider-wrapper').find('.swiper-pagination')[0],
271			   type: settings.pagination_type,
272			   clickable: true,
273			  	dynamicBullets: settings.dynamic_bullets
274			}
275		}
276		//-- Navigation
277		var _navigation = false;
278		if(settings.navigation){
279			_navigation = {
280				nextEl: $target.parents('.swiper-slider-wrapper').find('.swiper-nav-next')[0],
281		    	prevEl: $target.parents('.swiper-slider-wrapper').find('.swiper-nav-prev')[0],
282		    	hiddenClass: 'hidden'
283			}
284		}
285
286		const swiper = new Swiper($target[0], {
287		  	loop: settings.loop,
288		  	spaceBetween: settings.space_between,
289		  	autoplay: _autoplay,
290		  	speed: settings.speed,
291		  	grabCursor: false,
292		  	centeredSlides: false,
293		  	centeredSlidesBounds: true,
294		  	effect: settings.effect,
295		  	breakpoints: {
296		  		0: {
297		  			slidesPerView: 1
298		  		},
299		  		560: {
300			      slidesPerView: settings.items_xx
301			   },
302			   640: {
303			   	slidesPerView: settings.items_xs
304			   },
305			   768: {
306			      slidesPerView: settings.items_sm
307			   },
308			   1024: {
309			      slidesPerView: settings.items_md
310			   },
311			   1200: { // when window width is >= 1200px
312			      slidesPerView: settings.items_lg,
313			      
314			   },
315			   1400: { // when window width is >= 1200px
316			      slidesPerView: settings.items
317			   }
318		  	},
319		  	pagination: _pagination,
320		  	navigation: _navigation,
321		  	observer: true,  
322	     	observeParents: true,
323		   watchSlidesVisibility: true,
324		   watchSlidesProgress: true,
325       	slideVisibleClass: 'item-active',
326       	slideNextClass: 'swiper-slide-next',
327       	slidePrevClass: 'swiper-slide-prev',
328       	slideActiveClass: 'swiper-slide-active',
329       	on: { 
330       		progress: function(){
331       			//var total = settings.items;
332       			var total = $target.find('.item-active').length;
333					$target.find('.swiper-slide').removeClass('first');
334					$target.find('.swiper-slide').removeClass('last');
335					$target.find('.swiper-slide').removeClass('center');
336					
337					var start = 0;
338					if(total == 5){start = 1;}
339					if(total == 1){start = -1;}
340
341					$target.find('.swiper-slide.item-active').each(function(index){
342						if(index === start) {
343							$(this).addClass('first')
344						}
345						if(index === start + 1){
346							$(this).addClass('center')
347						}
348						if( index === total - (start + 1) && total > (start + 1) ) {
349							$(this).addClass('last')
350						}
351					})
352       		},
353	      }
354		});
355
356		if(settings.autoplay_hover && settings.autoplay){
357			$target.hover(function() {
358	 			swiper.autoplay.stop();
359			}, function() {
360			   swiper.autoplay.start();
361			});
362		}
363	},
364
365	elementCircleProgress: function($scope){
366		$scope.find(".circle-progress").appear(function () {
367	      $scope.find(".circle-progress").each(function () {
368	         let progress = $(this);
369	         let progressOptions = progress.data("options");
370	         progress.circleProgress({
371	         	startAngle: -Math.PI / 2
372	         }).on('circle-animation-progress', function(event, progress, stepValue) {
373				   $(this).find('strong').html(Math.round(stepValue.toFixed(2).substr(1) * 100) + '<i>%</i>');
374				});
375	      });
376	   });
377	},
378
379	elementListingItemRatingCriteria: function($scope){
380		$scope.find('.review__progress-bar').each(function(){
381		  	var $progressbar = $(this);
382		  	$progressbar.css('width', $progressbar.data('progress-max'));
383		})
384	}
385
386};
387  
388$(window).on('elementor/frontend/init', GaviasElements.init);   
389
390}(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.