PageSourceSearch

https://kttp.com/assets/js/purpose.js

js kttp.com collected 2026-10-08 09:10:17 UTC 49,513 bytes, 2,639 lines download raw bytes

1/*
2
3Theme: Purpose - Website UI Kit
4Product Page: https://themes.getbootstrap.com/product/purpose-website-ui-kit/
5Author: Webpixels
6Author URI: https://www.webpixels.io
7
8---
9
10Copyright 2018-2019 Webpixels
11
12*/
13
14//
15// Layout
16//
17
18'use strict';
19
20var Layout = (function() {
21
22    function pinSidenav($this) {
23        $('.sidenav-toggler').addClass('active');
24        $('.sidenav-toggler').data('action', 'sidenav-unpin');
25        $('body').removeClass('g-sidenav-hidden').addClass('g-sidenav-show g-sidenav-pinned');
26        $('body').append('<div class="mask-body mask-body-light d-xl-none" data-action="sidenav-unpin" data-target='+$('#sidenav-main').data('target')+' />');
27
28        // Store the sidenav state in a cookie session
29        localStorage.setItem('sidenav-state', 'pinned');
30    }
31
32    function unpinSidenav($this) {
33        $('.sidenav-toggler').removeClass('active');
34        $('.sidenav-toggler').data('action', 'sidenav-pin');
35        $('body').removeClass('g-sidenav-pinned').addClass('g-sidenav-hidden');
36        $('body').find('.mask-body').remove();
37
38        // Store the sidenav state in a cookie session
39        localStorage.setItem('sidenav-state', 'unpinned');
40    }
41
42    // Set sidenav state from cookie
43
44    var $sidenavState = localStorage.getItem('sidenav-state') ? localStorage.getItem('sidenav-state') : 'pinned';
45
46    if($(window).width() > 1200) {
47        if($sidenavState == 'pinned') {
48            pinSidenav($('#sidenav-toggler'));
49        }
50
51        if(localStorage.getItem('sidenav-state') == 'unpinned') {
52            unpinSidenav($('#sidenav-main'));
53        }
54    }
55
56    $("body").on("click", "[data-action]", function(e) {
57
58        e.preventDefault();
59
60        var $this = $(this);
61        var action = $this.data('action');
62        var target = $this.data('target');
63
64        switch (action) {
65            case "offcanvas-open":
66                target = $this.data("target"), $(target).addClass("open"), $("body").append('<div class="body-backdrop" data-action="offcanvas-close" data-target=' + target + " />");
67                break;
68
69            case "offcanvas-close":
70                target = $this.data("target"), $(target).removeClass("open"), $("body").find(".body-backdrop").remove();
71                break;
72
73            case 'aside-open':
74                target = $this.data('target');
75                $this.addClass('active');
76                $(target).addClass('show');
77                $('body').append('<div class="mask-body mask-body-light" data-action="aside-close" data-target='+target+' />');
78                break;
79
80            case 'aside-close':
81                target = $this.data('target');
82                $this.removeClass('active');
83                $(target).removeClass('show');
84                $('body').find('.body-backdrop').remove();
85                break;
86
87            case 'omnisearch-open':
88                target = $this.data('target');
89                $this.addClass('active');
90                $(target).addClass('show');
91                $(target).find('.form-control').focus();
92                $('body').addClass('omnisearch-open').append('<div class="mask-body mask-body-dark" data-action="omnisearch-close" data-target="'+target+'" />');
93                break;
94
95            case 'omnisearch-close':
96                target = $this.data('target');
97                $('[data-action="search-open"]').removeClass('active');
98                $(target).removeClass('show');
99                $('body').removeClass('omnisearch-open').find('.mask-body').remove();
100                break;
101
102            case 'search-open':
103                target = $this.data('target');
104                $this.addClass('active');
105                $(target).addClass('show');
106                $(target).find('.form-control').focus();
107                break;
108
109            case 'search-close':
110                target = $this.data('target');
111                $('[data-action="search-open"]').removeClass('active');
112                $(target).removeClass('show');
113                break;
114
115            case 'sidenav-pin':
116                pinSidenav($this);
117                break;
118
119            case 'sidenav-unpin':
120                unpinSidenav($this);
121                break;
122        }
123    })
124
125    // Add sidenav modifier classes on mouse events
126
127    $('.sidenav').on('mouseenter', function() {
128        if(! $('body').hasClass('g-sidenav-pinned')) {
129            $('body').removeClass('g-sidenav-hide').removeClass('g-sidenav-hidden').addClass('g-sidenav-show');
130        }
131    })
132
133    $('.sidenav').on('mouseleave', function() {
134        if(! $('body').hasClass('g-sidenav-pinned')) {
135            $('body').removeClass('g-sidenav-show').addClass('g-sidenav-hide');
136
137            setTimeout(function() {
138                $('body').removeClass('g-sidenav-hide').addClass('g-sidenav-hidden');
139            }, 300);
140        }
141    })
142
143    // Offset an element by giving an existing element's class or id from the same page
144
145    if($('[data-offset-top]').length) {
146        var $el = $('[data-offset-top]'),
147            $offsetEl = $($el.data('offset-top')),
148            offset = $offsetEl.height();
149
150
151        $el.css({'padding-top':offset+'px'})
152    }
153})();
154
155//
156// Popover
157//
158
159'use strict';
160
161var Popover = (function() {
162
163	// Variables
164
165	var $popover = $('[data-toggle="popover"]');
166
167
168	// Methods
169
170	function init($this) {
171		var popoverClass = '';
172
173		if ($this.data('color')) {
174			popoverClass = ' popover-' + $this.data('color');
175		}
176
177		var options = {
178			trigger: 'focus',
179			template: '<div class="popover' + popoverClass + '" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
180		};
181
182		$this.popover(options);
183	}
184
185
186	// Events
187
188	if ($popover.length) {
189		$popover.each(function() {
190			init($(this));
191		});
192	}
193
194})();
195
196//
197// Tooltip
198//
199
200'use strict';
201
202var Tooltip = (function() {
203
204	// Variables
205
206	var $tooltip = $('[data-toggle="tooltip"]');
207
208
209	// Methods
210
211	function init() {
212		$tooltip.tooltip();
213	}
214
215
216	// Events
217
218	if ($tooltip.length) {
219		init();
220	}
221
222})();
223
224//
225// Swiper
226// init of plugin Swiper JS
227//
228
229'use strict';
230
231var BgImgHolder = (function() {
232
233	// Variables
234
235	var $bgImgHolder = $(".bg-img-holder");
236
237
238	// Methods
239
240	function init($this) {
241		var img = $this.children("img").attr("src"),
242            position = $this.data('bg-position') ? $this.data('bg-position') : 'initial',
243            size = $this.data('bg-size') ? $this.data('bg-size') : 'auto',
244            height = $this.data('bg-height') ? $this.data('bg-height') : '100%';
245
246		$this
247	        .css("background-image", 'url("'+img+'")')
248	        .css("background-position", position)
249	        .css("background-size", size)
250	        .css("opacity", "1")
251	        .css("height", height);
252	}
253
254
255	// Events
256
257	if ($bgImgHolder.length) {
258		$bgImgHolder.each(function() {
259			init($(this));
260		})
261	}
262
263})();
264
265//
266// Card
267//
268
269'use strict';
270
271
272//
273// Card actions
274//
275
276var CardActions = (function() {
277
278	// Variables
279
280	var $card = $(".card"),
281		actions = '.card-product-actions';
282
283
284	// Methods
285
286	function show($this) {
287		var $el = $this.find(actions),
288        	animation = $el.data('animation-in');
289
290        if ($el.length) {
291            $el.addClass('in animated ' + animation);
292            $el.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
293                $el.removeClass('animated ' + animation);
294            });
295		}
296	}
297
298	function hide($this) {
299		var $el = $this.find(actions),
300			animation = $el.data('animation-out');
301
302		if ($el.length) {
303			$el.addClass('animated ' + animation);
304			$el.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
305				$el.removeClass('in animated ' + animation);
306			});
307		}
308	}
309
310	// Events
311
312	if ($card.length && $(actions).length) {
313		$card.on({
314    		'mouseenter': function() {
315    			show($(this));
316    		}
317    	})
318
319		$card.on({
320    		'mouseleave': function() {
321    			hide($(this));
322    		}
323    	})
324	}
325
326})();
327
328//
329// Dropdown
330//
331
332'use strict';
333
334var Dropdown = (function() {
335
336	// Variables
337
338	var $dropdown = $('.dropdown-animate'),
339		$dropdownSubmenu = $('.dropdown-submenu [data-toggle="dropdown"]');
340
341
342	// Methods
343
344	function hideDropdown($this) {
345
346		// Add additional .hide class for animated dropdown menus in order to apply some css behind
347
348		// var $dropdownMenu = $this.find('.dropdown-menu');
349		//
350        // $dropdownMenu.addClass('hide');
351		//
352        // setTimeout(function(){
353        //     $dropdownMenu.removeClass('hide');
354        // }, 300);
355
356	}
357
358	function initSubmenu($this) {
359        if (!$this.next().hasClass('show')) {
360            $this.parents('.dropdown-menu').first().find('.show').removeClass("show");
361        }
362
363        var $submenu = $this.next(".dropdown-menu");
364
365        $submenu.toggleClass('show');
366        $submenu.parent().toggleClass('show');
367
368        $this.parents('.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) {
369            $('.dropdown-submenu .show').removeClass("show");
370        });
371	}
372
373	// Events
374
375	if ($dropdown.length) {
376    	$dropdown.on({
377    		'hide.bs.dropdown': function() {
378    			hideDropdown($dropdown);
379    		}
380    	})
381	}
382
383	if ($dropdownSubmenu.length) {
384		$dropdownSubmenu.on('click', function(e) {
385
386			initSubmenu($(this))
387
388			return false;
389		});
390	}
391})();
392
393//
394// Forms
395//
396
397'use strict';
398
399
400//
401// Form control
402//
403
404var FormControl = (function() {
405
406	// Variables
407
408	var $input = $('.form-control'),
409		$indeterminateCheckbox = $('[data-toggle="indeterminate"]');
410
411
412	// Methods
413
414	function init($this) {
415		$this.on('focus blur', function(e) {
416        $(this).parents('.form-group').toggleClass('focused', (e.type === 'focus' || this.value.length > 0));
417    }).trigger('blur');
418	}
419
420
421	// Events
422
423	if ($input.length) {
424		init($input);
425	}
426
427	// Add indeterminate state to a checkbox
428	if($indeterminateCheckbox.length) {
429		$indeterminateCheckbox.each(function() {
430			$(this).prop('indeterminate', true)
431		})
432	}
433
434})();
435
436
437//
438// Custom input file
439//
440
441var CustomInputFile = (function() {
442
443	// Variables
444
445	var $customInputFile = $('.custom-input-file');
446
447
448	// Methods
449
450	function change($input, $this, $e) {
451		var fileName,
452			$label = $input.next('label'),
453			labelVal = $label.html();
454
455		if ($this && $this.files.length > 1) {
456			fileName = ($this.getAttribute('data-multiple-caption') || '').replace('{count}', $this.files.length);
457		}
458		else if ($e.target.value) {
459			fileName = $e.target.value.split('\\').pop();
460		}
461
462		if (fileName) {
463			$label.find('span').html(fileName);
464		}
465		else {
466			$label.html(labelVal);
467		}
468	}
469
470	function focus($input) {
471		$input.addClass('has-focus');
472	}
473
474	function blur($input) {
475		$input.removeClass('has-focus');
476	}
477
478
479	// Events
480
481	if ($customInputFile.length) {
482		$customInputFile.each(function() {
483			var $input = $(this);
484
485			$input.on('change', function(e) {
486				var $this = this,
487					$e = e;
488
489				change($input, $this, $e);
490	        });
491
492	        // Firefox bug fix
493	        $input.on('focus', function() {
494	            focus($input);
495	        })
496	        .on('blur', function() {
497	            blur($input);
498	        });
499		});
500	}
501})();
502
503//
504// Navbar
505//
506
507'use strict';
508
509var NavbarCollapse = (function() {
510
511	// Variables
512
513    var $nav = $('#navbar-main'),
514	    $collapse = $('#navbar-main-collapse'),
515        $navTop = $('#navbar-top-main');
516
517
518	// Methods
519
520	function showNavbarCollapse($this) {
521        $nav.addClass('navbar-collapsed');
522        $navTop.addClass('navbar-collapsed');
523        $('#header-main').addClass('header-collapse-show')
524	}
525
526    function hideNavbarCollapse($this) {
527        $this.removeClass('collapsing').addClass('collapsing-out');
528        $nav.removeClass('navbar-collapsed').addClass('navbar-collapsed-out');
529        $navTop.removeClass('navbar-collapsed').addClass('navbar-collapsed-out');
530	}
531
532    function hiddenNavbarCollapse($this) {
533        $this.removeClass('collapsing-out');
534        $nav.removeClass('navbar-collapsed-out');
535        $navTop.removeClass('navbar-collapsed-out');
536        $('#header-main').removeClass('header-collapse-show')
537	}
538
539
540	// Events
541
542    if ($collapse.length) {
543    	$collapse.on({
544    		'show.bs.collapse': function() {
545    			showNavbarCollapse($collapse);
546    		}
547    	})
548
549        $collapse.on({
550    		'hide.bs.collapse': function() {
551                hideNavbarCollapse($collapse);
552    		}
553    	})
554
555        $collapse.on({
556    		'hidden.bs.collapse': function() {
557                hiddenNavbarCollapse($collapse);
558    		}
559    	})
560    }
561
562})();
563
564
565//
566// Sticky Navbar
567//
568
569var NavbarSticky = (function() {
570
571	// Variables
572
573	var $nav = $('.navbar-sticky');
574
575
576	// Methods
577
578	function init($this) {
579
580		var scrollTop = $(window).scrollTop(); // our current vertical position from the top
581
582		// if we've scrolled more than the navigation, change its position to fixed to stick to top,
583		// otherwise change it back to relative
584		if (scrollTop > (navOffsetTop + 200)) {
585			$this.addClass('sticky');
586		} else {
587			$this.removeClass('sticky');
588		}
589	}
590
591
592	// Events
593
594	if ($nav.length) {
595
596        var navOffsetTop = $nav.offset().top;
597
598		// Init sticky navbar
599		init($nav);
600
601		// re-calculate stickyness on scroll
602		$(window).on({
603			'scroll': function() {
604				init($nav);
605			}
606		})
607	}
608})();
609
610//
611// Negative margin
612//
613
614'use strict';
615
616var NegativeMargin = (function() {
617
618	// Variables
619
620	var $item = $('[data-negative-margin]');
621
622
623	// Methods
624
625	function init($this) {
626		var $target = $this.find($($this.data('negative-margin'))),
627			height = $target.height();
628
629			console.log(height)
630        if ($(window).width() > 991) {
631            $this.css({'margin-top': '-' + height + 'px'});
632        }
633        else {
634            $this.css({'margin-top': '0'});
635        }
636	}
637
638
639	// Events
640
641	$(window).on({
642		'load resize': function() {
643			if ($item.length) {
644				$item.each(function() {
645					init($(this));
646				});
647			}
648		}
649	})
650
651})();
652
653//
654// Pricing
655//
656
657'use strict';
658
659
660var Pricing = (function() {
661
662	// Variables
663
664	var $pricingContainer = $('.pricing-container'),
665		$btn = $('.pricing-container button[data-pricing]');
666
667
668	// Methods
669
670	function init($this) {
671        var a = $this.data('pricing'),
672            b = $this.parents('.pricing-container'),
673            c = $('.'+b.attr('class')+' [data-pricing-value]');
674
675
676        if(!$this.hasClass('active')) {
677            // Toggle active classes for monthly/yearly buttons
678            $('.'+b.attr('class')+' button[data-pricing]').removeClass('active');
679            $this.addClass('active');
680
681            // Change price values
682            c.each(function() {
683                var new_val = $(this).data('pricing-value');
684                var old_val = $(this).find('span.price').text();
685
686                $(this).find('span.price').text(new_val);
687                $(this).data('pricing-value', old_val);
688            });
689        }
690	}
691
692
693	// Events
694
695	if ($pricingContainer.length) {
696		$btn.on({
697    		'click': function() {
698    			init($(this));
699    		}
700    	})
701	}
702
703})();
704
705//
706// Scroll to (anchor links)
707//
708
709'use strict';
710
711var ScrollTo = (function() {
712
713	//
714	// Variables
715	//
716
717	var $scrollTo = $('.scroll-me, [data-scroll-to], .toc-entry a'),
718		urlHash = window.location.hash;
719
720
721	//
722	// Methods
723	//
724
725	function init(hash) {
726		$('html, body').animate({
727	        scrollTop: $(hash).offset().top
728	    }, 'slow');
729	}
730
731	function scrollTo($this) {
732		var $el = $this.attr('href');
733        var offset = $this.data('scroll-to-offset') ? $this.data('scroll-to-offset') : 0;
734		var options = {
735			scrollTop: $($el).offset().top - offset
736		};
737
738        // Animate scroll to the selected section
739        $('html, body').stop(true, true).animate(options, 600);
740
741        event.preventDefault();
742	}
743
744
745	//
746	// Events
747	//
748
749	if ($scrollTo.length) {
750		// Init scroll on click
751		$scrollTo.on('click', function(event) {
752			scrollTo($(this));
753		});
754	}
755
756	$(window).on("load", function () {
757		// Init scroll on page load if a hash is present
758		if(urlHash && urlHash != '#!' && $(urlHash).length) {
759			init(urlHash)
760		}
761	});
762})();
763
764//
765// Shape
766// extending the functionality of the shape utility classes from purpose/utitlies/_shape.scss
767//
768
769
770'use strict';
771
772var Shape = (function() {
773
774	// Variables
775
776	var $shape = $('.shape-container');
777
778
779	// Methods
780
781	function init($this) {
782
783		var svgHeight = $this.find('svg').height();
784		// alert(svgHeight)
785		$this.css({
786			'height': svgHeight + 'px'
787		});
788
789	}
790
791
792	// Events
793
794	$(window).on({
795		'load resize': function() {
796			if ($shape.length) {
797				$shape.each(function() {
798					init($(this));
799				});
800			}
801		}
802	})
803
804})();
805
806//
807// Spotlight
808//
809
810'use strict';
811
812var Spotlight = (function() {
813
814	// Variables
815
816	var $spotlight = $('[data-spotlight]');
817
818
819	// Methods
820
821	function init($this) {
822
823		var holderHeight,
824			animEndEv = "webkitAnimationEnd animationend";
825
826		if ($this.data('spotlight') == 'fullscreen') {
827			if ($this.data('spotlight-offset')) {
828				var offsetHeight = $('body').find($this.data('spotlight-offset')).height();
829				holderHeight = $(window).height() - offsetHeight;
830			} else {
831				holderHeight = $(window).height();
832			}
833
834			if ($(window).width() > 991) {
835				$this.find('.spotlight-holder').css({
836					'height': holderHeight + 'px'
837				});
838			} else {
839				$this.find('.spotlight-holder').css({
840					'height': 'auto'
841				});
842			}
843		}
844
845		$this.imagesLoaded().done(function(e) {
846			$this.find(".animated").each(function() {
847				var e = $(this);
848				if (!e.hasClass("animation-ended")) {
849					var t = e.data("animation-in"),
850						a = (e.data("animation-out"), e.data("animation-delay"));
851					setTimeout(function() {
852						e.addClass("animation-ended " + t, 100).on(animEndEv, function() {
853							e.removeClass(t)
854						})
855					}, a)
856				}
857			})
858		})
859	}
860
861	function animate() {
862
863	}
864
865	// Events
866
867	$(window).on({
868		'load resize': function() {
869			if ($spotlight.length) {
870				$spotlight.each(function() {
871					init($(this));
872				});
873			}
874		}
875	})
876
877})();
878
879//
880// Google maps
881//
882
883var GoogleMapCustom = (function() {
884    var $map = document.getElementById('map-custom'),
885        lat,
886        lng,
887        color;
888
889    function initMap(map) {
890
891        lat = map.getAttribute('data-lat');
892        lng = map.getAttribute('data-lng');
893        color = map.getAttribute('data-color');
894
895        var myLatlng = new google.maps.LatLng(lat, lng);
896        var mapOptions = {
897            zoom: 12,
898            scrollwheel: false,
899            center: myLatlng,
900            mapTypeId: google.maps.MapTypeId.ROADMAP,
901            styles: [{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#444444"}]},{"featureType":"landscape","elementType":"all","stylers":[{"color":"#f2f2f2"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":-100},{"lightness":45}]},{"featureType":"road.highway","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"all","stylers":[{"color":color},{"visibility":"on"}]}]
902        }
903
904        map = new google.maps.Map(map, mapOptions);
905
906        var marker = new google.maps.Marker({
907            position: myLatlng,
908            map: map,
909            animation: google.maps.Animation.DROP,
910            title: 'Hello World!'
911        });
912
913        var contentString = '<div class="info-window-content"><h2>{{ site.product.name }} {{ site.product.name_long }}</h2>' +
914            '<p>{{ site.product.description }}</p></div>';
915
916        var infowindow = new google.maps.InfoWindow({
917            content: contentString
918        });
919
920        google.maps.event.addListener(marker, 'click', function() {
921            infowindow.open(map, marker);
922        });
923    }
924
925    if (typeof($map) != 'undefined' && $map != null) {
926        google.maps.event.addDomListener(window, 'load', initMap($map));
927    }
928})();
929
930//
931// Google maps
932//
933
934var GoogleMap = (function() {
935    var $map = document.getElementById('map-default'),
936        lat,
937        lng;
938
939    function initMap(map) {
940
941        lat = map.getAttribute('data-lat');
942        lng = map.getAttribute('data-lng');
943
944        var myLatlng = new google.maps.LatLng(lat, lng);
945        var mapOptions = {
946            zoom: 12,
947            scrollwheel: false,
948            center: myLatlng,
949            mapTypeId: google.maps.MapTypeId.ROADMAP,
950        }
951
952        map = new google.maps.Map(map, mapOptions);
953
954        var marker = new google.maps.Marker({
955            position: myLatlng,
956            map: map,
957            animation: google.maps.Animation.DROP,
958            title: 'Hello World!'
959        });
960
961        var contentString = '<div class="info-window-content"><h2>{{ site.product.name }} {{ site.product.name_long }}</h2>' +
962            '<p>{{ site.product.description }}</p></div>';
963
964        var infowindow = new google.maps.InfoWindow({
965            content: contentString
966        });
967
968        google.maps.event.addListener(marker, 'click', function() {
969            infowindow.open(map, marker);
970        });
971    }
972
973    if (typeof($map) != 'undefined' && $map != null) {
974        google.maps.event.addDomListener(window, 'load', initMap($map));
975    }
976})();
977
978//
979// Apex charts
980//
981
982if ($('[data-toggle="apex-chart"]').length) {
983
984	// Settings
985	Apex.grid = {
986		padding: {
987			right: 0,
988			left: 0
989		}
990	}, Apex.dataLabels = {
991		enabled: !1
992	};
993
994	// Random dataset generator
995
996	var randomizeArray = function(e) {
997			for (var t, r, a = e.slice(), o = a.length; 0 !== o;) r = Math.floor(Math.random() * o), t = a[o -= 1], a[o] = a[r], a[r] = t;
998			return a
999		},
1000		sparklineData = [47, 45, 54, 38, 56, 24, 65, 31, 37, 39, 62, 51, 35, 41, 35, 27, 93, 53, 61, 27, 54, 43, 19, 46],
1001		colorPalette = ["#00D8B6", "#008FFB", "#FEB019", "#FF4560", "#775DD0"],
1002		spark1 = {
1003			chart: {
1004				type: "area",
1005				height: 160,
1006				sparkline: {
1007					enabled: !0
1008				}
1009			},
1010			stroke: {
1011				width: 2,
1012				curve: "straight"
1013			},
1014			fill: {
1015				opacity: .2
1016			},
1017			series: [{
1018				name: "Hyper Sales ",
1019				data: randomizeArray(sparklineData)
1020			}],
1021			yaxis: {
1022				min: 0
1023			},
1024			colors: ["#DCE6EC"],
1025			title: {
1026				text: "$424,652",
1027				offsetX: 20,
1028				style: {
1029					fontSize: "24px"
1030				}
1031			},
1032			subtitle: {
1033				text: "Sales",
1034				offsetX: 20,
1035				style: {
1036					fontSize: "14px"
1037				}
1038			}
1039		};
1040
1041
1042	var options1 = {
1043		chart: {
1044			type: "line",
1045			width: '100%',
1046			height: 50,
1047			sparkline: {
1048				enabled: !0
1049			}
1050		},
1051		series: [{
1052			data: [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
1053		}],
1054		stroke: {
1055			width: 2,
1056			curve: "smooth"
1057		},
1058		markers: {
1059			size: 0
1060		},
1061		colors: ["#727cf5"],
1062		tooltip: {
1063			fixed: {
1064				enabled: !1
1065			},
1066			x: {
1067				show: !1
1068			},
1069			y: {
1070				title: {
1071					formatter: function(e) {
1072						return ""
1073					}
1074				}
1075			},
1076			marker: {
1077				show: !1
1078			}
1079		}
1080	},
1081	options2 = {
1082		chart: {
1083			type: "line",
1084            width: '100%',
1085			height: 50,
1086			sparkline: {
1087				enabled: !0
1088			}
1089		},
1090		colors: ["#0acf97"],
1091		series: [{
1092			data: [12, 14, 2, 47, 42, 15, 47, 75, 65, 19, 14]
1093		}],
1094		stroke: {
1095			width: 2,
1096			curve: "smooth"
1097		},
1098		markers: {
1099			size: 0
1100		},
1101		tooltip: {
1102			fixed: {
1103				enabled: !1
1104			},
1105			x: {
1106				show: !1
1107			},
1108			y: {
1109				title: {
1110					formatter: function(e) {
1111						return ""
1112					}
1113				}
1114			},
1115			marker: {
1116				show: !1
1117			}
1118		}
1119	},
1120	options3 = {
1121		chart: {
1122			type: "line",
1123            width: '100%',
1124			height: 50,
1125			sparkline: {
1126				enabled: !0
1127			}
1128		},
1129		colors: ["#ffbc00"],
1130		series: [{
1131			data: [47, 45, 74, 14, 56, 74, 14, 11, 7, 39, 82]
1132		}],
1133		stroke: {
1134			width: 2,
1135			curve: "smooth"
1136		},
1137		markers: {
1138			size: 0
1139		},
1140		tooltip: {
1141			fixed: {
1142				enabled: !1
1143			},
1144			x: {
1145				show: !1
1146			},
1147			y: {
1148				title: {
1149					formatter: function(e) {
1150						return ""
1151					}
1152				}
1153			},
1154			marker: {
1155				show: !1
1156			}
1157		}
1158	},
1159	options4 = {
1160		chart: {
1161			type: "line",
1162            width: '100%',
1163			height: 50,
1164			sparkline: {
1165				enabled: !0
1166			}
1167		},
1168		colors: ["#fa5c7c"],
1169		series: [{
1170			data: [15, 75, 47, 65, 14, 2, 41, 54, 4, 27, 15]
1171		}],
1172		stroke: {
1173			width: 2,
1174			curve: "smooth"
1175		},
1176		markers: {
1177			size: 0
1178		},
1179		tooltip: {
1180			fixed: {
1181				enabled: !1
1182			},
1183			x: {
1184				show: !1
1185			},
1186			y: {
1187				title: {
1188					formatter: function(e) {
1189						return ""
1190					}
1191				}
1192			},
1193			marker: {
1194				show: !1
1195			}
1196		}
1197	},
1198	options5 = {
1199		chart: {
1200			type: "bar",
1201            width: '100%',
1202			height: 50,
1203			sparkline: {
1204				enabled: !0
1205			}
1206		},
1207		plotOptions: {
1208			bar: {
1209				columnWidth: "80%"
1210			}
1211		},
1212		colors: ["#727cf5"],
1213		series: [{
1214			data: [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
1215		}],
1216		labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1217		xaxis: {
1218			crosshairs: {
1219				width: 1
1220			}
1221		},
1222		tooltip: {
1223			fixed: {
1224				enabled: !1
1225			},
1226			x: {
1227				show: !1
1228			},
1229			y: {
1230				title: {
1231					formatter: function(e) {
1232						return ""
1233					}
1234				}
1235			},
1236			marker: {
1237				show: !1
1238			}
1239		}
1240	},
1241	options6 = {
1242		chart: {
1243			type: "bar",
1244            width: '100%',
1245			height: 50,
1246			sparkline: {
1247				enabled: !0
1248			}
1249		},
1250		plotOptions: {
1251			bar: {
1252				columnWidth: "80%"
1253			}
1254		},
1255		colors: ["#0acf97"],
1256		series: [{
1257			data: [12, 14, 2, 47, 42, 15, 47, 75, 65, 19, 14]
1258		}],
1259		labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1260		xaxis: {
1261			crosshairs: {
1262				width: 1
1263			}
1264		},
1265		tooltip: {
1266			fixed: {
1267				enabled: !1
1268			},
1269			x: {
1270				show: !1
1271			},
1272			y: {
1273				title: {
1274					formatter: function(e) {
1275						return ""
1276					}
1277				}
1278			},
1279			marker: {
1280				show: !1
1281			}
1282		}
1283	},
1284	options7 = {
1285		chart: {
1286			type: "bar",
1287            width: '100%',
1288			height: 50,
1289			sparkline: {
1290				enabled: !0
1291			}
1292		},
1293		plotOptions: {
1294			bar: {
1295				columnWidth: "80%"
1296			}
1297		},
1298		colors: ["#ffbc00"],
1299		series: [{
1300			data: [47, 45, 74, 14, 56, 74, 14, 11, 7, 39, 82]
1301		}],
1302		labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1303		xaxis: {
1304			crosshairs: {
1305				width: 1
1306			}
1307		},
1308		tooltip: {
1309			fixed: {
1310				enabled: !1
1311			},
1312			x: {
1313				show: !1
1314			},
1315			y: {
1316				title: {
1317					formatter: function(e) {
1318						return ""
1319					}
1320				}
1321			},
1322			marker: {
1323				show: !1
1324			}
1325		}
1326	},
1327	options8 = {
1328		chart: {
1329			type: "bar",
1330            width: '100%',
1331			height: 50,
1332			sparkline: {
1333				enabled: !0
1334			}
1335		},
1336		plotOptions: {
1337			bar: {
1338				columnWidth: "80%"
1339			}
1340		},
1341		colors: ["#fa5c7c"],
1342		series: [{
1343			data: [25, 66, 41, 89, 63, 25, 44, 12, 36, 9, 54]
1344		}],
1345		labels: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11],
1346		xaxis: {
1347			crosshairs: {
1348				width: 1
1349			}
1350		},
1351		tooltip: {
1352			fixed: {
1353				enabled: !1
1354			},
1355			x: {
1356				show: !1
1357			},
1358			y: {
1359				title: {
1360					formatter: function(e) {
1361						return ""
1362					}
1363				}
1364			},
1365			marker: {
1366				show: !1
1367			}
1368		}
1369	};
1370
1371
1372	// Initialize chart
1373
1374	new ApexCharts(document.querySelector("#apex-spark-1"), options1).render(),
1375	new ApexCharts(document.querySelector("#apex-spark-2"), options2).render(),
1376	new ApexCharts(document.querySelector("#apex-spark-3"), options3).render(),
1377	new ApexCharts(document.querySelector("#apex-spark-4"), options4).render(),
1378	new ApexCharts(document.querySelector("#apex-spark-5"), options5).render(),
1379	new ApexCharts(document.querySelector("#apex-spark-6"), options6).render(),
1380	new ApexCharts(document.querySelector("#apex-spark-7"), options7).render(),
1381	new ApexCharts(document.querySelector("#apex-spark-8"), options8).render();
1382}
1383
1384//
1385// Autosize textarea
1386//
1387
1388var TextareaAutosize = (function() {
1389
1390	// Variables
1391
1392	var $textarea = $('[data-toggle="autosize"]');
1393
1394
1395	// Methods
1396
1397	function init() {
1398		autosize($textarea);
1399	}
1400
1401
1402	// Events
1403
1404	if ($textarea.length) {
1405		init();
1406	}
1407
1408})();
1409
1410//
1411// Countdown
1412//
1413
1414'use strict';
1415
1416var Countdown = (function() {
1417
1418	// Variables
1419
1420	var $countdown = $('.countdown');
1421
1422
1423	// Methods
1424
1425	function init($this) {
1426		var date = $this.data('countdown-date'),
1427			template = '<div class="countdown-item"><span class="countdown-digit">%-D</span><span class="countdown-label countdown-days">day%!D</span></div>' +
1428			'<div class="countdown-item"><span class="countdown-digit">%H</span><span class="countdown-separator">:</span><span class="countdown-label">hours</span></div>' +
1429			'<div class="countdown-item"><span class="countdown-digit">%M</span><span class="countdown-separator">:</span><span class="countdown-label">minutes</span></div>' +
1430			'<div class="countdown-item"><span class="countdown-digit">%S</span><span class="countdown-label">seconds</span></div>';
1431
1432		$this.countdown(date).on('update.countdown', function(event) {
1433			var $this = $(this).html(event.strftime('' + template));
1434		});
1435	}
1436
1437
1438	// Events
1439
1440	if ($countdown.length) {
1441		$countdown.each(function() {
1442			init($(this));
1443		})
1444	}
1445
1446})();
1447
1448//
1449// Counter
1450//
1451
1452'use strict';
1453
1454! function(t) {
1455	t.fn.countTo = function(e) {
1456		return e = e || {}, t(this).each(function() {
1457			var a = t.extend({}, t.fn.countTo.defaults, {
1458					from: t(this).data("from"),
1459					to: t(this).data("to"),
1460					speed: t(this).data("speed"),
1461					refreshInterval: t(this).data("refresh-interval"),
1462					decimals: t(this).data("decimals")
1463				}, e),
1464				n = Math.ceil(a.speed / a.refreshInterval),
1465				o = (a.to - a.from) / n,
1466				r = this,
1467				l = t(this),
1468				f = 0,
1469				i = a.from,
1470				c = l.data("countTo") || {};
1471
1472			function s(t) {
1473				var e = a.formatter.call(r, t, a);
1474				l.text(e)
1475			}
1476			l.data("countTo", c), c.interval && clearInterval(c.interval), c.interval = setInterval(function() {
1477				f++, s(i += o), "function" == typeof a.onUpdate && a.onUpdate.call(r, i);
1478				f >= n && (l.removeData("countTo"), clearInterval(c.interval), i = a.to, "function" == typeof a.onComplete && a.onComplete.call(r, i))
1479			}, a.refreshInterval), s(i)
1480		})
1481	}, t.fn.countTo.defaults = {
1482		from: 0,
1483		to: 0,
1484		speed: 1e3,
1485		refreshInterval: 100,
1486		decimals: 0,
1487		formatter: function(t, e) {
1488			return t.toFixed(e.decimals)
1489		},
1490		onUpdate: null,
1491		onComplete: null
1492	}
1493}(jQuery);
1494
1495
1496var Counter = (function() {
1497
1498
1499	// Variables
1500
1501	var counter = '.counter',
1502		$counter = $(counter);
1503
1504
1505	// Methods
1506
1507	function init($this) { 
1508		inView(counter)
1509		.on('enter', function() {
1510			if(! $this.hasClass('counting-finished')) {
1511				$this.countTo({
1512					formatter: function(value, options) {
1513						return value.toFixed(options.decimals);
1514					},
1515					onUpdate: function(value) {
1516						//console.debug(this);
1517					},
1518					onComplete: function(value) {
1519						$(this).addClass('counting-finished');
1520					}
1521				});
1522			}
1523		})
1524	}
1525
1526
1527	// // Events
1528
1529	if ($counter.length) {
1530		init($counter);
1531	}
1532
1533})();
1534
1535//
1536// Datepicker
1537//
1538
1539'use strict';
1540
1541var Datepicker = (function() {
1542
1543	//
1544	// Variables
1545	//
1546
1547	var $date = $('[data-toggle="date"]'),
1548		$datetime = $('[data-toggle="datetime"]'),
1549		$time = $('[data-toggle="time"]');
1550
1551
1552	//
1553	// Methods
1554	//
1555
1556	function initDate($this) {
1557
1558		var options = {
1559			enableTime: false,
1560			allowInput: true
1561		};
1562
1563		$this.flatpickr(options);
1564	}
1565
1566	function initDatetime($this) {
1567
1568		var options = {
1569			enableTime: true,
1570			allowInput: true
1571		};
1572
1573		$this.flatpickr(options);
1574	}
1575
1576	function initTime($this) {
1577
1578		var options = {
1579			noCalendar: true,
1580            enableTime: true,
1581			allowInput: true
1582		};
1583
1584		$this.flatpickr(options);
1585	}
1586
1587
1588	//
1589	// Events
1590	//
1591
1592	if ($date.length) {
1593
1594		// Init selects
1595		$date.each(function() {
1596			initDate($(this));
1597		});
1598	}
1599
1600	if ($datetime.length) {
1601
1602		// Init selects
1603		$datetime.each(function() {
1604			initDatetime($(this));
1605		});
1606	}
1607
1608	if ($time.length) {
1609
1610		// Init selects
1611		$time.each(function() {
1612			initTime($(this));
1613		});
1614	}
1615
1616})();
1617
1618//
1619// Dropzone
1620//
1621
1622'use strict';
1623
1624var Dropzones = (function() {
1625
1626	//
1627	// Variables
1628	//
1629
1630	var $dropzone = $('[data-toggle="dropzone"]');
1631	var $dropzonePreview = $('.dz-preview');
1632
1633	//
1634	// Methods
1635	//
1636
1637	function init($this) {
1638		var multiple = ($this.data('dropzone-multiple') !== undefined) ? true : false;
1639		var preview = $this.find($dropzonePreview);
1640		var currentFile = undefined;
1641
1642		// Init options
1643		var options = {
1644			url: $this.data('dropzone-url'),
1645			thumbnailWidth: null,
1646			thumbnailHeight: null,
1647			previewsContainer: preview.get(0),
1648			previewTemplate: preview.html(),
1649			maxFiles: (!multiple) ? 1 : null,
1650			acceptedFiles: (!multiple) ? 'image/*' : null,
1651			init: function() {
1652				this.on("addedfile", function(file) {
1653					if (!multiple && currentFile) {
1654						this.removeFile(currentFile);
1655					}
1656					currentFile = file;
1657				})
1658			}
1659		}
1660
1661		// Clear preview html
1662		preview.html('');
1663
1664		// Init dropzone
1665		$this.dropzone(options)
1666	}
1667
1668	function globalOptions() {
1669		Dropzone.autoDiscover = false;
1670	}
1671
1672
1673	//
1674	// Events
1675	//
1676
1677	if ($dropzone.length) {
1678
1679		// Set global options
1680		globalOptions();
1681
1682		// Init dropzones
1683		$dropzone.each(function() {
1684			init($(this));
1685		});
1686	}
1687
1688
1689})();
1690
1691//
1692// Highlight.js
1693//
1694
1695'use strict';
1696
1697var Highlight = (function() {
1698
1699	//
1700	// Variables
1701	//
1702
1703	var $highlight = $('.highlight');
1704
1705
1706	//
1707	// Methods
1708	//
1709
1710	function init(i, block) {
1711		// Insert the copy button inside the highlight block
1712		var btnHtml = '<button class="action-item btn-clipboard" title="Copy to clipboard"><i class="far fa-copy mr-2"></i>Copy</button>'
1713		$(block).before(btnHtml)
1714		$('.btn-clipboard')
1715			.tooltip()
1716			.on('mouseleave', function() {
1717				// Explicitly hide tooltip, since after clicking it remains
1718				// focused (as it's a button), so tooltip would otherwise
1719				// remain visible until focus is moved away
1720				$(this).tooltip('hide');
1721			});
1722
1723		// Component code copy/paste
1724		var clipboard = new ClipboardJS('.btn-clipboard', {
1725			target: function(trigger) {
1726				return trigger.nextElementSibling
1727			}
1728		})
1729
1730		clipboard.on('success', function(e) {
1731			$(e.trigger)
1732				.attr('title', 'Copied!')
1733				.tooltip('_fixTitle')
1734				.tooltip('show')
1735				.attr('title', 'Copy to clipboard')
1736				.tooltip('_fixTitle')
1737
1738			e.clearSelection()
1739		})
1740
1741		clipboard.on('error', function(e) {
1742			var modifierKey = /Mac/i.test(navigator.userAgent) ? '\u2318' : 'Ctrl-'
1743			var fallbackMsg = 'Press ' + modifierKey + 'C to copy'
1744
1745			$(e.trigger)
1746				.attr('title', fallbackMsg)
1747				.tooltip('_fixTitle')
1748				.tooltip('show')
1749				.attr('title', 'Copy to clipboard')
1750				.tooltip('_fixTitle')
1751		})
1752
1753		// Initialize highlight.js plugin
1754		hljs.highlightBlock(block);
1755	}
1756
1757
1758	//
1759	// Events
1760	//
1761
1762	$highlight.each(function(i, block) {
1763		init(i, block);
1764	});
1765
1766})();
1767
1768//
1769// List.js
1770//
1771
1772'use strict';
1773
1774var SortList = (function() {
1775
1776	//  //
1777	// Variables
1778	//  //
1779
1780	var $lists = $('[data-toggle="list"]');
1781	var $listsSort = $('[data-sort]');
1782
1783
1784	//
1785	// Methods
1786	//
1787
1788	// Init
1789	function init($list) {
1790		new List($list.get(0), getOptions($list));
1791	}
1792
1793	// Get options
1794	function getOptions($list) {
1795		var options = {
1796			valueNames: $list.data('list-values'),
1797			listClass: $list.data('list-class') ? $list.data('list-class') : 'list'
1798		}
1799
1800		return options;
1801	}
1802
1803
1804	//
1805	// Events
1806	//
1807
1808	// Init
1809	if ($lists.length) {
1810		$lists.each(function() {
1811			init($(this));
1812		});
1813	}
1814
1815	// Sort
1816	$listsSort.on('click', function() {
1817		return false;
1818	});
1819
1820})();
1821
1822//
1823// Swiper
1824// init of plugin Swiper JS
1825//
1826
1827'use strict';
1828
1829var Masonry = (function() {
1830
1831	// Variables
1832
1833	var $masonryContainer = $(".masonry-container");
1834
1835
1836	// Methods
1837
1838	function init($this) {
1839		var $el = $this.find('.masonry'),
1840			$filters = $this.find('.masonry-filter-menu'),
1841			$defaultFilter = $filters.find('.active'),
1842			defaultFilterValue = $defaultFilter.data('filter');
1843
1844		var $masonry = $el.imagesLoaded(function() {
1845
1846			// Set default filter if exists
1847
1848			if (defaultFilterValue != undefined && defaultFilterValue != '') {
1849
1850				if (defaultFilterValue != '*') {
1851					defaultFilterValue = '.' + defaultFilterValue;
1852				}
1853
1854				$defaultFilter.addClass('active');
1855			}
1856
1857
1858			// Plugin options
1859			var options = {
1860				itemSelector: '.masonry-item',
1861				filter: defaultFilterValue
1862			};
1863
1864			// Init plugin
1865			$masonry.isotope(options);
1866		});
1867
1868
1869		// Sorting buttons (filters)
1870
1871        $filters.on('click', 'a', function(e) {
1872			e.preventDefault();
1873
1874			var $this = $(this),
1875             	val = $(this).attr('data-filter');
1876
1877            if (val == '*') {
1878                val = '';
1879            } else {
1880                val = '.' + val;
1881            }
1882
1883            $masonry.isotope({
1884                filter: val
1885            }).on( 'arrangeComplete', function() {
1886				$filters.find('[data-filter]').removeClass('active');
1887				$this.addClass('active');
1888			} );
1889        });
1890
1891	}
1892
1893
1894	// Events
1895
1896	if ($masonryContainer.length) {
1897		$masonryContainer.each(function() {
1898			init($(this));
1899		})
1900	}
1901
1902})();
1903
1904//
1905// Notify
1906// init of the bootstrap-notify plugin
1907//
1908
1909'use strict';
1910
1911var Notify = (function() {
1912
1913	// Variables
1914
1915	var $notifyBtn = $('[data-toggle="notify"]');
1916
1917
1918	// Methods
1919
1920	function notify(placement, align, icon, type, animIn, animOut) {
1921		$.notify({
1922			icon: icon,
1923			title: ' Bootstrap Notify',
1924			message: 'Turning standard Bootstrap alerts into awesome notifications',
1925			url: ''
1926		}, {
1927			element: 'body',
1928			type: type,
1929			allow_dismiss: true,
1930			placement: {
1931				from: placement,
1932				align: align
1933			},
1934			offset: {
1935				x: 15, // Keep this as default
1936				y: 15 // Unless there'll be alignment issues as this value is targeted in CSS
1937			},
1938			spacing: 10,
1939			z_index: 1080,
1940			delay: 2500,
1941			timer: 25000,
1942			url_target: '_blank',
1943			mouse_over: false,
1944			animate: {
1945				// enter: animIn,
1946				// exit: animOut
1947                enter: animIn,
1948                exit: animOut
1949			},
1950			template:   '<div class="alert alert-{0} alert-icon alert-group alert-notify" data-notify="container" role="alert">
1950' +
1951					  		'<div class="alert-group-prepend align-self-start">' +
1952					  			'<span class="alert-group-icon"><i data-notify="icon"></i></span>' +
1953					  		'</div>' +
1954					  		'<div class="alert-content">' +
1955								'<strong data-notify="title">{1}</strong>' +
1956								'<div data-notify="message">{2}</div>' +
1957							'</div>' +
1958					  		'<button type="button" class="close" data-notify="dismiss" aria-label="Close">' +
1959								'<span aria-hidden="true">&times;</span>' +
1960							'</button>' +
1961						'</div>'
1962
1963		});
1964	}
1965
1966	// Events
1967
1968	if ($notifyBtn.length) {
1969		$notifyBtn.on('click', function(e) {
1970			e.preventDefault();
1971
1972			var placement = $(this).attr('data-placement');
1973			var align = $(this).attr('data-align');
1974			var icon = $(this).attr('data-icon');
1975			var type = $(this).attr('data-type');
1976			var animIn = $(this).attr('data-animation-in');
1977			var animOut = $(this).attr('data-animation-out');
1978
1979			notify(placement, align, icon, type, animIn, animOut);
1980		})
1981	}
1982
1983})();
1984
1985//
1986// No Ui Slider
1987//
1988
1989'use strict';
1990
1991
1992//
1993// Single slider
1994//
1995
1996var SingleSlider = (function() {
1997
1998	// Variables
1999
2000	var $sliderContainer = $(".input-slider-container");
2001
2002
2003	// Methods
2004
2005	function init($this) {
2006		var $slider = $this.find('.input-slider');
2007		var sliderId = $slider.attr('id');
2008		var minValue = $slider.data('range-value-min');
2009		var maxValue = $slider.data('range-value-max');
2010
2011		var sliderValue = $this.find('.range-slider-value');
2012		var sliderValueId = sliderValue.attr('id');
2013		var startValue = sliderValue.data('range-value-low');
2014
2015		var c = document.getElementById(sliderId),
2016			d = document.getElementById(sliderValueId);
2017
2018		var options = {
2019			start: [parseInt(startValue)],
2020			connect: [true, false],
2021			//step: 1000,
2022			range: {
2023				'min': [parseInt(minValue)],
2024				'max': [parseInt(maxValue)]
2025			}
2026		}
2027
2028		noUiSlider.create(c, options);
2029
2030		c.noUiSlider.on('update', function(a, b) {
2031			d.textContent = a[b];
2032		});
2033	}
2034
2035
2036	// Events
2037
2038	if ($sliderContainer.length) {
2039		$sliderContainer.each(function() {
2040			init($(this));
2041		});
2042	}
2043
2044})();
2045
2046
2047//
2048// Range slider
2049//
2050
2051var RangeSlider = (function() {
2052
2053	// Variables
2054
2055	var $sliderContainer = $("#input-slider-range");
2056
2057
2058	// Methods
2059
2060	function init($this) {
2061		var c = document.getElementById("input-slider-range"),
2062            d = document.getElementById("input-slider-range-value-low"),
2063            e = document.getElementById("input-slider-range-value-high"),
2064            f = [d, e];
2065
2066        noUiSlider.create(c, {
2067            start: [parseInt(d.getAttribute('data-range-value-low')), parseInt(e.getAttribute('data-range-value-high'))],
2068            connect: !0,
2069            range: {
2070                min: parseInt(c.getAttribute('data-range-value-min')),
2071                max: parseInt(c.getAttribute('data-range-value-max'))
2072            }
2073        }), c.noUiSlider.on("update", function(a, b) {
2074            f[b].textContent = a[b]
2075        })
2076	}
2077
2078
2079	// Events
2080
2081	if ($sliderContainer.length) {
2082		$sliderContainer.each(function() {
2083			init($(this));
2084		});
2085	}
2086
2087})();
2088
2089//
2090// Popover
2091//
2092
2093'use strict';
2094
2095var Popover = (function() {
2096
2097	// Variables
2098
2099	var $popover = $('[data-toggle="popover"]'),
2100		$popoverClass = '';
2101
2102
2103	// Methods
2104
2105	function init($this) {
2106		if ($this.data('color')) {
2107			$popoverClass = 'popover-' + $this.data('color');
2108		}
2109
2110		var options = {
2111			template: '<div class="popover ' + $popoverClass + '" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'
2112		};
2113
2114		$this.popover(options);
2115	}
2116
2117
2118	// Events
2119
2120	if ($popover.length) {
2121		$popover.each(function() {
2122			init($(this));
2123		});
2124	}
2125
2126})();
2127
2128//
2129// Quill.js
2130//
2131
2132'use strict';
2133
2134var QuillEditor = (function() {
2135
2136	// Variables
2137
2138	var $quill = $('[data-toggle="quill"]');
2139
2140
2141	// Methods
2142
2143	function init($this) {
2144
2145		// Get placeholder
2146		var placeholder = $this.data('quill-placeholder');
2147
2148		// Init editor
2149		var quill = new Quill($this.get(0), {
2150			modules: {
2151				toolbar: [
2152					['bold', 'italic'],
2153					['link', 'blockquote', 'code', 'image'],
2154					[{
2155						'list': 'ordered'
2156					}, {
2157						'list': 'bullet'
2158					}]
2159				]
2160			},
2161			placeholder: placeholder,
2162			theme: 'snow'
2163		});
2164
2165	}
2166
2167	// Events
2168
2169	if ($quill.length) {
2170		$quill.each(function() {
2171			init($(this));
2172		});
2173	}
2174
2175})();
2176
2177//
2178// Scrollbar
2179//
2180
2181'use strict';
2182
2183var Scrollbar = (function() {
2184
2185	// Variables
2186
2187	var $scrollbar = $('.scrollbar-inner');
2188
2189
2190	// Methods
2191
2192	function init() {
2193		$scrollbar.scrollbar().scrollLock()
2194	}
2195
2196
2197	// Events
2198
2199	if ($scrollbar.length) {
2200		init();
2201	}
2202
2203})();
2204
2205//
2206// Select2
2207//
2208
2209'use strict';
2210
2211var Select = (function() {
2212
2213	//
2214	// Variables
2215	//
2216
2217	var $select = $('[data-toggle="select"]');
2218
2219
2220	//
2221	// Methods
2222	//
2223
2224	function init($this) {
2225		var options = {
2226			// dropdownParent: $this.closest('.modal').length ? $this.closest('.modal') : $(document.body),
2227			// minimumResultsForSearch: $this.data('minimum-results-for-search'),
2228			// templateResult: formatAvatar
2229		};
2230
2231		$this.select2(options);
2232	}
2233
2234	function formatAvatar(avatar) {
2235		if (!avatar.id) {
2236			return avatar.text;
2237		}
2238
2239		var $option = $(avatar.element);
2240		var optionAvatar = $option.data('avatar-src');
2241		var output;
2242
2243		if (optionAvatar) {
2244			output = $('<span class="avatar avatar-xs mr-3"><img class="avatar-img rounded-circle" src="' + optionAvatar + '" alt="' + avatar.text + '"></span><span>' + avatar.text + '</span>');
2245		} else {
2246			output = avatar.text;
2247		}
2248
2249		return output;
2250	}
2251
2252
2253	//
2254	// Events
2255	//
2256
2257	if ($select.length) {
2258
2259		// Init selects
2260		$select.each(function() {
2261			init($(this));
2262		});
2263	}
2264
2265})();
2266
2267//
2268// Sticky
2269//
2270
2271'use strict';
2272
2273var Sticky = (function() {
2274
2275	//
2276	// Variables
2277	//
2278
2279	var $sticky = $('[data-toggle="sticky"]');
2280
2281
2282	//
2283	// Methods
2284	//
2285
2286	function init($this) {
2287
2288		var offset = $this.data('sticky-offset') ? $this.data('sticky-offset') : 0;
2289		var options = {
2290			'offset_top': offset
2291		};
2292
2293		if($(window).width() > 1000) {
2294			$this.stick_in_parent(options);
2295		} else {
2296			$this.trigger("sticky_kit:detach");
2297		}
2298	}
2299
2300
2301	//
2302	// Events
2303	//
2304
2305	$(window).on('load resize', function() {
2306		if ($sticky.length) {
2307
2308			// Init selects
2309			$sticky.each(function() {
2310				init($(this));
2311			});
2312		}
2313	})
2314
2315
2316})();
2317
2318//
2319// Sticky
2320//
2321
2322'use strict';
2323
2324var SvgInjector = (function() {
2325
2326	//
2327	// Variables
2328	//
2329
2330	var $svg = document.querySelectorAll('img.svg-inject');
2331
2332
2333	//
2334	// Methods
2335	//
2336
2337	function init($this) {
2338
2339		var options = {
2340
2341		};
2342
2343		SVGInjector($this)
2344	}
2345
2346
2347	//
2348	// Events
2349	//
2350
2351	if ($svg.length) {
2352		init($svg);
2353	}
2354
2355})();
2356
2357//
2358// Swiper
2359// init of plugin Swiper JS
2360//
2361
2362'use strict';
2363
2364var WpxSwiper = (function() {
2365
2366	// Variables
2367
2368	var $swiperContainer = $(".swiper-js-container"),
2369	 	animEndEv = 'webkitAnimationEnd animationend';
2370
2371
2372	// Methods
2373
2374	function init($this) {
2375
2376		// Swiper elements
2377
2378        var $el = $this.find('.swiper-container'),
2379			pagination = $this.find('.swiper-pagination'),
2380			navNext = $this.find('.swiper-button-next'),
2381			navPrev = $this.find('.swiper-button-prev');
2382
2383
2384		// Swiper options
2385
2386        var effect = $el.data('swiper-effect') ? $el.data('swiper-effect') : 'slide',
2387        	direction = $el.data('swiper-direction') ? $el.data('swiper-direction') :  'horizontal',
2388			initialSlide = $el.data('swiper-initial-slide') ? $el.data('swiper-initial-slide') : 0,
2389			autoHeight = $el.data('swiper-autoheight') ? $el.data('swiper-autoheight') : false,
2390			autoplay = $el.data('swiper-autoplay') ? $el.data('swiper-autoplay') : false,
2391			centeredSlides = $el.data('swiper-centered-slides') ? $el.data('swiper-centered-slides') : false,
2392			paginationType = $el.data('swiper-pagination-type') ? $el.data('swiper-pagination-type') : 'bullets';
2393
2394
2395
2396		// Items per slide
2397
2398        var items = $el.data('swiper-items');
2399        var itemsSm = $el.data('swiper-sm-items');
2400        var itemsMd = $el.data('swiper-md-items');
2401        var itemsLg = $el.data('swiper-lg-items');
2402		var itemsXl = $el.data('swiper-xl-items');
2403
2404
2405		// Space between items
2406
2407        var spaceBetween = $el.data('swiper-space-between');
2408        var spaceBetweenSm = $el.data('swiper-sm-space-between');
2409        var spaceBetweenMd = $el.data('swiper-md-space-between');
2410        var spaceBetweenLg = $el.data('swiper-lg-space-between');
2411		var spaceBetweenXl = $el.data('swiper-xl-space-between');
2412
2413
2414		// Slides per view written in data attributes for adaptive resoutions
2415
2416        items = items ? items : 1;
2417        itemsSm = itemsSm ? itemsSm : items;
2418		itemsMd = itemsMd ? itemsMd : itemsSm;
2419        itemsLg = itemsLg ? itemsLg : itemsMd;
2420        itemsXl = itemsXl ? itemsXl : itemsLg;
2421
2422
2423        // Space between slides written in data attributes for adaptive resoutions
2424
2425        spaceBetween = !spaceBetween ? 0 : spaceBetween;
2426        spaceBetweenSm = !spaceBetweenSm ? spaceBetween : spaceBetweenSm;
2427        spaceBetweenMd = !spaceBetweenMd ? spaceBetweenSm : spaceBetweenMd;
2428        spaceBetweenLg = !spaceBetweenLg ? spaceBetweenMd : spaceBetweenLg;
2429		spaceBetweenXl = !spaceBetweenXl ? spaceBetweenLg : spaceBetweenXl;
2430
2431		var $swiper = new Swiper($el, {
2432            pagination: {
2433                el: pagination,
2434                clickable: true,
2435				type: paginationType
2436            },
2437            navigation: {
2438                nextEl: navNext,
2439                prevEl: navPrev,
2440            },
2441            slidesPerView: items,
2442            spaceBetween: spaceBetween,
2443            initialSlide: initialSlide,
2444            autoHeight: autoHeight,
2445            centeredSlides: centeredSlides,
2446            mousewheel: false,
2447			keyboard: {
2448			    enabled: true,
2449			    onlyInViewport: false,
2450			},
2451            grabCursor: true,
2452			autoplay: autoplay,
2453            effect: effect,
2454            coverflowEffect: {
2455                rotate: 10,
2456                stretch: 0,
2457                depth: 50,
2458                modifier: 3,
2459                slideShadows: false
2460            },
2461            speed: 800,
2462            direction: direction,
2463            preventClicks: true,
2464            preventClicksPropagation: true,
2465            observer: true,
2466            observeParents: true,
2467			breakpointsInverse: true,
2468			breakpoints: {
2469                575: {
2470                    slidesPerView: itemsSm,
2471                    spaceBetweenSlides: spaceBetweenSm
2472                },
2473                767: {
2474                    slidesPerView: itemsMd,
2475                    spaceBetweenSlides: spaceBetweenMd
2476                },
2477                991: {
2478                    slidesPerView: itemsLg,
2479                    spaceBetweenSlides: spaceBetweenLg
2480                },
2481                1199: {
2482                    slidesPerView: itemsXl,
2483                    spaceBetweenSlides: spaceBetweenXl
2484                }
2485            }
2486        });
2487	}
2488
2489
2490	// Events
2491	$(document).ready(function() {
2492		if ($swiperContainer.length) {
2493			$swiperContainer.each(function(i, swiperContainer) {
2494				init($(swiperContainer));
2495			})
2496		}
2497	})
2498
2499})();
2500
2501//
2502// Tags input
2503//
2504
2505'use strict';
2506
2507var Tags = (function() {
2508
2509	//
2510	// Variables
2511	//
2512
2513	var $tags = $('[data-toggle="tags"]');
2514
2515
2516	//
2517	// Methods
2518	//
2519
2520	function init($this) {
2521
2522		var options = {
2523			tagClass: 'badge badge-primary'
2524		};
2525
2526		$this.tagsinput(options);
2527	}
2528
2529
2530	//
2531	// Events
2532	//
2533
2534	if ($tags.length) {
2535
2536		// Init selects
2537		$tags.each(function() {
2538			init($(this));
2539		});
2540	}
2541
2542})();
2543
2544//
2545// Typed
2546// text typing animation
2547//
2548
2549'use strict';
2550
2551var Typed = (function() {
2552
2553	// Variables
2554
2555	var typed = '.typed',
2556		$typed = $(typed);
2557
2558
2559	// Methods
2560
2561	function init($this) {
2562		var el = '#' + $this.attr('id'),
2563        	strings = $this.data('type-this'),
2564			strings = strings.split(',');
2565
2566		var options = {
2567			strings: strings,
2568            typeSpeed: 100,
2569            backSpeed: 70,
2570            loop: true
2571		};
2572
2573        var animation = new Typed(el, options);
2574
2575		inView(el).on('enter', function() {
2576			animation.start();
2577		}).on('exit', function() {
2578			animation.stop();
2579		});
2580	}
2581
2582
2583	// Events
2584
2585	if ($typed.length) {
2586		$typed.each(function() {
2587			init($(this));
2588		});
2589	}
2590
2591})();
2592
2593//
2594// Wavify
2595//
2596
2597'use strict';
2598
2599var Wavify = (function() {
2600
2601	//
2602	// Variables
2603	//
2604
2605	var $wavify = $('[data-toggle="wavify"]');
2606
2607
2608	//
2609	// Methods
2610	//
2611
2612	function init($this) {
2613		var $path = $this.find('path');
2614
2615		var options = {
2616			height: 50,
2617            bones: 5,
2618            amplitude: 40,
2619            speed: .15
2620		};
2621
2622		$path.wavify(options);
2623	}
2624
2625
2626	//
2627	// Events
2628	//
2629
2630	if ($wavify.length) {
2631
2632		// Init selects
2633		$wavify.each(function() {
2634			init($(this));
2635		});
2636	}
2637
2638})();
2639

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.