1(function($) { 2 3 function alljs() { 4 /* Replace all SVG images with inline SVG */ 5 const convertImages = (query, callback) => { 6 const images = document.querySelectorAll(query); 7 images.forEach(image => { 8 fetch(image.src) 9 .then(res => res.text()) 10 .then(data => { 11 const parser = new DOMParser(); 12 const svg = parser.parseFromString(data, 'image/svg+xml').querySelector('svg'); 13 14 if (image.id) svg.id = image.id; 15 if (image.className) svg.classList = image.classList; 16 17 image.parentNode.replaceChild(svg, image); 18 }) 19 .then(callback) 20 .catch(error => console.error(error)) 21 }); 22 } 23 convertImages('img.wpwax-lsu-svg'); 24 25 /* Check lsu Carousel Data */ 26 let checkData = function(data, value) { 27 return typeof data === 'undefined' ? value : data; 28 }; 29 30 /* lsu Carousel */ 31 let lsuCarousel = document.querySelectorAll('.wpwax-lsu-carousel'); 32 let hasPagination; 33 34 lsuCarousel.forEach(function(el, i) { 35 36 el.classList.add(`wpwax-lsu-carousel-${i}`); 37 38 el.childNodes.forEach(el => { 39 40 if (el.className === "wpwax-lsu-carousel-pagination") { 41 hasPagination = true; 42 } 43 44 }); 45 46 let navBtnPrev = document.querySelectorAll('.wpwax-lsu-carousel-nav__btn-prev'); 47 let navBtnNext = document.querySelectorAll('.wpwax-lsu-carousel-nav__btn-next'); 48 const paginationElement = document.querySelectorAll(".wpwax-lsu-carousel-pagination"); 49 50 navBtnPrev.forEach((el, i) => { el.classList.add(`wpwax-lsu-carousel-nav__btn-prev-${i}`); }); 51 navBtnNext.forEach((el, i) => { el.classList.add(`wpwax-lsu-carousel-nav__btn-next-${i}`); }); 52 hasPagination && paginationElement.forEach((el) => el.classList.add(`wpwax-lsu-carousel-pagination-${i}`)); 53 let swiper = new Swiper(`.wpwax-lsu-carousel-${i}`, { 54 slidesPerView: checkData(parseInt(el.dataset.lsuItems), 4), 55 spaceBetween: checkData(parseInt(el.dataset.lsuMargin), 30), 56 loop: checkData(JSON.parse(el.dataset.lsuLoop), true), 57 slidesPerGroup: checkData(parseInt(el.dataset.lsuPerslide), 1), 58 speed: checkData(parseInt(el.dataset.lsuSpeed), 3000), 59 autoplay: checkData(JSON.parse(el.dataset.lsuAutoplay), {}), 60 navigation: { 61 nextEl: `.wpwax-lsu-carousel-nav__btn-next-${i}`, 62 prevEl: `.wpwax-lsu-carousel-nav__btn-prev-${i}`, 63 }, 64 pagination: { 65 el: `.wpwax-lsu-carousel-pagination-${i}`, 66 type: 'bullets', 67 clickable: true, 68 }, 69 breakpoints: checkData(JSON.parse(el.dataset.lsuResponsive), {}) 70 }) 71 }); 72 73 /* Tooltip Initialization */ 74 var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')) 75 var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) { 76 return new bootstrap.Tooltip(tooltipTriggerEl) 77 }); 78 } 79 80 81 window.addEventListener('load', () => { 82 alljs(); 83 }) 84 85 86 /* Elementor Edit Mode */ 87 $(window).on('elementor/frontend/init', function () { 88 if (elementorFrontend.isEditMode()) { 89 alljs(); 90 elementorFrontend.hooks.addAction('frontend/element_ready/widget', function() { 91 alljs(); 92 }); 93 } 94 }); 95 96})(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.