1(()=>{if(customElements.get("multicolumn-grid-slider"))return;class MulticolumnGridSlider extends HTMLElement{constructor(){super(),this.mobileSlider=null,this.desktopSlider=null}connectedCallback(){this.mobileLayout=this.dataset.mobileLayout||"grid",this.desktopLayout=this.dataset.desktopLayout||"slider",this.colGapMobile=parseInt(this.dataset.colGapMobile,10)||8,this.colGapDesktop=parseInt(this.dataset.colGapDesktop,10)||16,this.desktopSlides=parseFloat(this.dataset.desktopSlides)||4,this.mobilePeek=parseFloat(this.dataset.mobilePeek)||1.5,this.mq=window.matchMedia("(max-width: 989px)"),this.mq.addEventListener("change",this._onBreakpoint.bind(this)),this._initForViewport()}disconnectedCallback(){this._destroyAll()}_initForViewport(){this.mq.matches?(this._destroyDesktop(),this.mobileLayout==="slider"&&this._initMobileSlider()):(this._destroyMobile(),this.desktopLayout==="slider"&&this._initDesktopSlider())}_gridEl(){return this.querySelector("[data-grid]")}_tilesEl(){return this.querySelector("[data-tiles]")}_addSwiperClasses(){const grid=this._gridEl(),tiles=this._tilesEl();grid&&grid.classList.add("swiper"),tiles&&tiles.classList.add("swiper-wrapper"),this.querySelectorAll(".mcgs__tile").forEach(t=>t.classList.add("swiper-slide"))}_removeSwiperClasses(){const grid=this._gridEl(),tiles=this._tilesEl();grid&&grid.classList.remove("swiper"),tiles&&tiles.classList.remove("swiper-wrapper"),this.querySelectorAll(".mcgs__tile").forEach(t=>t.classList.remove("swiper-slide"))}_initMobileSlider(){if(this.mobileSlider)return;const grid=this._gridEl();grid&&(this._addSwiperClasses(),this.mobileSlider=new Swiper(grid,{slidesPerView:this.mobilePeek,spaceBetween:this.colGapMobile,loop:!1}))}_initDesktopSlider(){if(this.desktopSlider)return;const grid=this._gridEl();if(!grid)return;this._addSwiperClasses();const prevEl=this.querySelector(".mcgs__prev"),nextEl=this.querySelector(".mcgs__next");this.desktopSlider=new Swiper(grid,{slidesPerView:this.desktopSlides,spaceBetween:this.colGapDesktop,loop:!1,navigation:prevEl&&nextEl?{prevEl,nextEl}:!1})}_destroyMobile(){this.mobileSlider&&(this.mobileSlider.destroy(!0,!0),this.mobileSlider=null,this._removeSwiperClasses())}_destroyDesktop(){this.desktopSlider&&(this.desktopSlider.destroy(!0,!0),this.desktopSlider=null,this._removeSwiperClasses())}_destroyAll(){this._destroyMobile(),this._destroyDesktop()}_onBreakpoint(){this._initForViewport()}}customElements.define("multicolumn-grid-slider",MulticolumnGridSlider)})(); 2//# sourceMappingURL=/cdn/shop/t/1106/assets/multicolumn-grid-slider.js.map?v=35740132627234613381790351882
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.