(()=>{"use strict";new function(){var t=this;t.options={},t.init=function(){t.init_options()},t.getNumber=function(t,e=1){return Number(t)?Number(t):e},this.JSONify=t=>{var e={};for(var i in t)e['"'+i+'"']=t[i];return e},t.init_options=function(){var e=document.querySelectorAll(".wp-swiper");window.wpSwiper=[],window.wpSwiperThumbs=[];for(let i=0;i<e.length;i++){e[i].classList.add(`wp-swiper--${i}`);let a=e[i].querySelector(".swiper-container");if(a.hasAttribute("data-freemode")&&"true"==a.getAttribute("data-freemode")&&("true"==a.getAttribute("data-freemode")&&"true"==a.getAttribute("data-sticky")?t.options.freeMode={enabled:!0,sticky:!0}:t.options.freeMode=!0),a.hasAttribute("data-navigation")&&"true"==a.getAttribute("data-navigation")&&(t.options.navigation={nextEl:e[i].querySelector(".swiper-button-next"),prevEl:e[i].querySelector(".swiper-button-prev")}),a.hasAttribute("data-pagination")&&"true"==a.getAttribute("data-pagination")?(t.options.pagination={el:e[i].querySelector(".swiper-pagination")},a.getAttribute("data-paginationtype")&&(t.options.pagination.type=a.getAttribute("data-paginationtype")),a.getAttribute("data-clickablepagination")&&(t.options.pagination.clickable=a.getAttribute("data-clickablepagination"))):t.options.pagination=!1,a.hasAttribute("data-slidespercolumn")&&(t.options.slidesPerColumn=t.getNumber(a.getAttribute("data-slidespercolumn"),1)),a.hasAttribute("data-autoplay")&&(t.options.autoplay="true"===a.getAttribute("data-autoplay")),a.hasAttribute("data-delay")&&t.options.autoplay&&(t.options.autoplay={},t.options.autoplay.delay=t.getNumber(a.getAttribute("data-delay"))),a.hasAttribute("data-speed")&&(t.options.speed=t.getNumber(a.getAttribute("data-speed"),500)),a.hasAttribute("data-loop")&&(t.options.loop="true"===a.getAttribute("data-loop")),a.hasAttribute("data-effect")&&(t.options.effect=a.getAttribute("data-effect"),"fade"==t.options.effect&&(t.options.fadeEffect={crossFade:!0})),a.hasAttribute("data-direction")&&(t.options.direction=a.getAttribute("data-direction")),a.hasAttribute("data-slidesperview")&&(t.options.slidesPerView=t.getNumber(a.getAttribute("data-slidesperview"))),a.hasAttribute("data-spacebetween")&&(t.options.spaceBetween=t.getNumber(a.getAttribute("data-spacebetween"),0)),a.hasAttribute("data-autoheight")&&"true"===a.getAttribute("data-autoheight")&&(t.options.autoHeight=!0),a.hasAttribute("data-breakpoints")){const e=a.getAttribute("data-breakpoints");void 0!==e&&(t.options.breakpoints=JSON.parse(e.replace(/\\/g,"")))}if(a.hasAttribute("data-mousewheel")&&(t.options.mousewheel=a.getAttribute("data-mousewheel")),a.hasAttribute("data-releaseonedges")&&"true"===a.getAttribute("data-mousewheel")&&"true"===a.getAttribute("data-releaseonedges")&&(t.options.mousewheel={},t.options.mousewheel.releaseOnEdges=a.getAttribute("data-releaseonedges")),a.hasAttribute("data-thumbsconfig")){let o={spaceBetween:10,slidesPerView:4,freeMode:!0,watchSlidesProgress:!0};const r=e[i].querySelectorAll(".wp-swiper__slide"),s=e[i].querySelector(".wp-swiper__thumbs .swiper-container"),n=e[i].querySelector(".wp-swiper__thumbs .swiper-wrapper"),p=n.querySelectorAll(".wp-swiper__thumb");let u=[];Array.from(r).forEach(((t,e)=>{const i=e+1,a=Array.from(p).find((t=>parseInt(t.getAttribute("data-thumb"))===i));a?u[e]=a.cloneNode(!0):(u[e]=t.cloneNode(!0),u[e].removeAttribute("data-tab"),u[e].classList.remove("wp-swiper__slide"),u[e].classList.add("wp-swiper__thumb"))})),n.innerHTML="",u.forEach((t=>{n.appendChild(t)})),o=JSON.parse(a.getAttribute("data-thumbsconfig")),window.wpSwiperThumbs[i]=new Swiper(s,o),t.options={...t.options,thumbs:{swiper:window.wpSwiperThumbs[i]}}}"vertical"==t.options.direction&&(t.options.on={init:function(){var t=this.wrapperEl,e=t.children[this.activeIndex].querySelector(".wp-swiper__slide-content").offsetHeight;t.style.height=e+"px"},slideChangeTransitionEnd:function(){var t=this.wrapperEl,e=t.children[this.activeIndex].querySelector(".wp-swiper__slide-content").offsetHeight;t.style.height=e+"px"}}),a.hasAttribute("data-debug")&&"true"==a.getAttribute("data-debug")&&console.log({swiper_container:a,options:t.options}),window.wpSwiper[i]=new Swiper(a,t.options)}},window.addEventListener("DOMContentLoaded",(e=>{try{t.init()}catch(t){console.warn("JS Error: "),console.log(t)}}))}})();