1class TextImageColumnsSlider extends HTMLElement{constructor(){super(),this.track=this.querySelector(".js-slider-track"),this.slides=this.querySelectorAll(".text-image-columns-slider__slide"),this.prevButton=this.querySelector(".js-slider-prev"),this.nextButton=this.querySelector(".js-slider-next"),this.totalSlides=this.slides.length,this.flickity=null,this.init()}init(){this.totalSlides<=1||this.loadFlickity()}async loadFlickity(){try{const{Flickity}=await import(window.flu?.chunks?.flickity||"/assets/flickity-chunk.js");this.flickity=new Flickity(this.track,{cellAlign:this.getCellAlign(),contain:!1,draggable:!0,freeScroll:!1,wrapAround:!0,prevNextButtons:!1,pageDots:!1,adaptiveHeight:!1,groupCells:this.getGroupCells(),on:{ready:()=>{this.setupCustomNavigation(),this.updateNavigationVisibility()},change:()=>{this.updateNavigationState()}}}),window.addEventListener("resize",()=>{setTimeout(()=>{this.flickity.options.cellAlign=this.getCellAlign(),this.flickity.resize(),this.updateNavigationVisibility()},150)})}catch(error){console.error("Failed to load Flickity:",error),this.initCustomSlider()}}getCellAlign(){return window.innerWidth>=768?"left":"center"}getGroupCells(){return window.innerWidth>=768?!1:1}setupCustomNavigation(){this.prevButton&&this.nextButton&&(this.prevButton.addEventListener("click",()=>{this.flickity.previous()}),this.nextButton.addEventListener("click",()=>{this.flickity.next()}))}updateNavigationVisibility(){const navigation=this.querySelector(".text-image-columns-slider__navigation");if(navigation){const slidesPerView=this.getSlidesPerView();this.totalSlides>slidesPerView?(navigation.style.display="flex",navigation.setAttribute("data-show-mobile","true"),navigation.setAttribute("data-show-desktop","true")):navigation.style.display="none"}}updateNavigationState(){this.prevButton&&this.nextButton&&(this.prevButton.style.opacity="1",this.nextButton.style.opacity="1",this.prevButton.disabled=!1,this.nextButton.disabled=!1)}getSlidesPerView(){return window.innerWidth>=768?2.4:window.innerWidth>=480?2:1}initCustomSlider(){this.currentSlide=0,this.prevButton.addEventListener("click",()=>this.prevSlide()),this.nextButton.addEventListener("click",()=>this.nextSlide()),window.addEventListener("resize",()=>this.updateSlider()),this.updateSlider()}getSlideWidth(){return 100/this.getSlidesPerView()}updateSlider(){const slideWidth=this.getSlideWidth(),maxSlides=Math.ceil(this.totalSlides-this.getSlidesPerView()+.4);this.currentSlide>maxSlides&&(this.currentSlide=maxSlides);const translateX=-(this.currentSlide*slideWidth);this.track.style.transform=`translateX(${translateX}%)`,this.prevButton.style.opacity=this.currentSlide===0?"0.5":"1",this.nextButton.style.opacity=this.currentSlide>=maxSlides?"0.5":"1"}nextSlide(){const maxSlides=Math.ceil(this.totalSlides-this.getSlidesPerView()+.4);this.currentSlide<maxSlides&&(this.currentSlide++,this.updateSlider())}prevSlide(){this.currentSlide>0&&(this.currentSlide--,this.updateSlider())}destroy(){this.flickity&&this.flickity.destroy()}}customElements.define("text-image-columns-slider",TextImageColumnsSlider); 2//# sourceMappingURL=/cdn/shop/t/31/assets/text-image-columns-slider.js.map?v=106913449491375001091753314750
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.