1'use strict'; 2 3(function ($) { 4 $(function () { 5 /** 6 * Swiper Initialization 7 **/ 8 // swiper lib is no longer loaded by the 2026 redesign layout, 9 // legacy DB pages may still carry .swiper-container markup 10 $(window.Swiper ? '.swiper-container' : []).each(function () { 11 var $this = $(this); 12 var boolData = { 13 breakpoints: $this.data('sw-breakpoints'), 14 active_selector: $this.data('sw-active-selector'), 15 cover_flow: $this.data('sw-coverflow'), 16 auto_play: $this.data('sw-autoplay'), 17 loop: $this.data('sw-loop'), 18 centered: $this.data('sw-centered-slides'), 19 pagination: $this.data('sw-pagination'), 20 nav_arrows: $this.data('sw-nav-arrows') 21 }; 22 23 var breakPoints = boolData.breakpoints || false; 24 var auto_play = boolData.auto_play !== undefined ? boolData.auto_play : false; 25 var speed = $this.data('sw-speed') || 1100; 26 var effect = $this.data('sw-effect') || "slide"; 27 var showItems = $this.data('sw-show-items') || 1; 28 var loop = boolData.loop !== undefined ? boolData.loop : true; 29 var centered = boolData.centered !== undefined ? boolData.centered : true; 30 var spaceBetween = $this.data('sw-space-between') || (showItems > 1 ? 20 : 0); 31 var scrollItems = $this.data('sw-scroll-items') || 1; 32 var navigationElement = $this.data('sw-navigation'); 33 var navigationActiveClass = $this.data('sw-navigation-active') || "active"; 34 var navigationActiveSelector = boolData.active_selector !== undefined ? boolData.active_selector : false; 35 var paginationCss = boolData.pagination !== undefined ? boolData.pagination : '.swiper-pagination'; 36 var navigationCss = boolData.nav_arrows !== undefined ? boolData.nav_arrows : '.swiper-button'; 37 38 var coverflow = boolData.cover_flow ? { 39 coverflowEffect: $.extend({ 40 stretch: 0, 41 depth: 0, 42 modifier: 1, 43 rotate: 0, 44 slideShadows: false 45 }, boolData.cover_flow) 46 } : {}; 47 48 var autoplay = auto_play ? { 49 autoplay: { 50 delay: auto_play, 51 disableOnIteration: false 52 }, 53 speed: speed 54 } : {}; 55 56 var pagination = {}; 57 58 if (paginationCss) { 59 pagination.pagination = { 60 el: paginationCss, 61 clickable: true, 62 dynamicBullets: true 63 }; 64 } 65 66 if (navigationCss) { 67 pagination.navigation = { 68 nextEl: navigationCss + '-next', 69 prevEl: navigationCss + '-prev' 70 } 71 } 72 73 var events = {}; 74 75 /**/ 76 if (navigationElement) { 77 events = { 78 transitionEnd: function () { 79 if (!navigationElement) return; 80 81 var $navigationElement = $(navigationElement); 82 83 if (navigationActiveSelector) { 84 $(navigationActiveSelector + '.' + navigationActiveClass, $navigationElement).removeClass(navigationActiveClass); 85 $('.nav-item:eq(' + swiper.realIndex + ') ' + navigationActiveSelector, $navigationElement).addClass(navigationActiveClass); 86 } else { 87 $('.' + navigationActiveClass, $navigationElement).removeClass(navigationActiveClass); 88 $('.nav-item:eq(' + swiper.realIndex + ')', $navigationElement).addClass(navigationActiveClass); 89 } 90 } 91 } 92 } /**/ 93 94 var options = $.extend({ 95 loop: loop, 96 slidesPerGroup: scrollItems, 97 spaceBetween: spaceBetween, 98 centeredSlides: centered, 99 breakpoints: breakPoints, 100 slidesPerView: showItems, 101 parallax: true, 102 effect: effect 103 }, pagination, autoplay, coverflow); 104 105 var swiper = new Swiper(this, options); 106 107 for (var e in events) { 108 swiper.on(e, events[e]); 109 } 110 111 if (navigationElement) { 112 $(navigationElement).on('click', '.nav-item', function (evt) { 113 evt.preventDefault(); 114 115 var $item = $(this); 116 var $activeItem = $item; 117 118 if (navigationActiveSelector) { 119 $activeItem = $(navigationActiveSelector, $item); 120 } 121 122 if ($activeItem.hasClass(navigationActiveClass)) { 123 return false;
124 } 125 126 var index = $item.data('step') || $item.index() + 1; 127 swiper.slideTo(index); 128 129 if (navigationActiveSelector) { 130 $item.siblings().each(function () { 131 $(navigationActiveSelector, this).removeClass(navigationActiveClass); 132 }); 133 134 $activeItem.addClass(navigationActiveClass); 135 } else { 136 $item.siblings('.' + navigationActiveClass).removeClass(navigationActiveClass); 137 $item.addClass(navigationActiveClass); 138 } 139 140 return false; 141 }); 142 } 143 }); 144 145 $('.scroll-bar').each(function (i, e) { 146 var bar = new SimpleBar(e); 147 }); 148 }); 149})(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.