1customElements.get("multicolumn-slider")||customElements.define("multicolumn-slider",class extends HTMLElement{connectedCallback(){if(this.dataset.mobileSlider!=="true"||(this.track=this.querySelector("[data-multicolumn-track]"),!this.track))return;this.sectionId=this.dataset.sectionId,this.savedClassName=null,this.wrapper=null,this.sliderInstance=null,this.prepared=!1,this.prevEl=this.querySelector(".multicolumn-slider__btn-prev"),this.nextEl=this.querySelector(".multicolumn-slider__btn-next"),this.paginationEl=this.querySelector(".multicolumn-slider__pagination"),this.handleViewport=this.handleViewport.bind(this),this.onBlockSelect=this.onBlockSelect.bind(this),this.onSectionLoad=this.onSectionLoad.bind(this),this.onWindowResize=typeof FoxTheme<"u"&&FoxTheme.utils&&typeof FoxTheme.utils.debounce=="function"?FoxTheme.utils.debounce(()=>this.handleViewport(),150):()=>this.handleViewport();const mqString=FoxTheme.config&&FoxTheme.config.mediaQueryMobile||"screen and (max-width: 767px)";this.mql=window.matchMedia(mqString),this.mql.addEventListener("change",this.handleViewport),document.addEventListener("matchMobile",this.handleViewport),document.addEventListener("unmatchMobile",this.handleViewport),window.addEventListener("resize",this.onWindowResize),typeof ResizeObserver<"u"&&(this._roPending=!1,this.resizeObserver=new ResizeObserver(()=>{this._roPending||(this._roPending=!0,requestAnimationFrame(()=>{this._roPending=!1,this.handleViewport()}))}),this.resizeObserver.observe(this)),typeof Shopify<"u"&&Shopify.designMode&&(document.addEventListener("shopify:block:select",this.onBlockSelect),document.addEventListener("shopify:section:load",this.onSectionLoad)),this.waitForFoxTheme(()=>{this.handleViewport(),requestAnimationFrame(()=>this.handleViewport())})}waitForFoxTheme(done,attempts){if(attempts=attempts||0,window.FoxTheme&&window.FoxTheme.Carousel){done();return}attempts>120||requestAnimationFrame(()=>this.waitForFoxTheme(done,attempts+1))}disconnectedCallback(){this.destroySwiper(),this.mql&&this.mql.removeEventListener("change",this.handleViewport),document.removeEventListener("matchMobile",this.handleViewport),document.removeEventListener("unmatchMobile",this.handleViewport),window.removeEventListener("resize",this.onWindowResize),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),typeof Shopify<"u"&&Shopify.designMode&&(document.removeEventListener("shopify:block:select",this.onBlockSelect),document.removeEventListener("shopify:section:load",this.onSectionLoad))}onSectionLoad(event){String(event.detail.sectionId)===String(this.sectionId)&&requestAnimationFrame(()=>this.handleViewport())}onBlockSelect(event){if(String(event.detail.sectionId)!==String(this.sectionId))return;const column=event.target?.closest?.("[data-column-index]");if(!column||!this.sliderInstance?.slider)return;const index=Number(column.dataset.columnIndex);if(Number.isNaN(index))return;const{slider}=this.sliderInstance;slider.params.loop&&typeof slider.slideToLoop=="function"?slider.slideToLoop(index):slider.slideTo(index)}isMobileViewport(){const mqString=FoxTheme.config&&FoxTheme.config.mediaQueryMobile||"screen and (max-width: 767px)";let matches=!1;try{matches=window.matchMedia(mqString).matches}catch{matches=!!(FoxTheme.config&&FoxTheme.config.mqlMobile)}return matches}handleViewport(){this.isMobileViewport()?this.initSwiper():this.destroySwiper()}prepareDom(){if(this.prepared)return;this.savedClassName=this.track.className;const slides=Array.from(this.track.children);slides.length!==0&&(this.wrapper=document.createElement("div"),this.wrapper.className="swiper-wrapper multicolumn-slider__wrapper",slides.forEach(sli
1de=>{slide.classList.add("swiper-slide"),this.wrapper.appendChild(slide)}),this.track.appendChild(this.wrapper),this.track.className="swiper multicolumn-slider__swiper multicolumn-slider__swiper--mobile multicolumn__items",this.prepared=!0)}restoreDom(){if(!this.prepared||!this.wrapper)return;Array.from(this.wrapper.children).forEach(slide=>{slide.classList.remove("swiper-slide"),this.track.appendChild(slide)}),this.wrapper.remove(),this.wrapper=null,this.track.className=this.savedClassName||this.track.className,this.savedClassName=null,this.prepared=!1}initSwiper(){if(this.sliderInstance)return;const blockCount=parseInt(this.dataset.blocksCount,10)||0;if(blockCount===0||(this.prepareDom(),!this.prepared))return;const columnGap=FoxTheme.utils.getGridColumnGap(this.track),spaceBetween=typeof columnGap.mobile=="number"?columnGap.mobile:16,nav=this.dataset.sliderNav||"dots",scroll=this.dataset.sliderScroll||"manual",autoplayMs=parseInt(this.dataset.autoplayMs,10)||5e3,showDots=(nav==="dots"||nav==="both")&&blockCount>1,showArrows=(nav==="arrows"||nav==="both")&&blockCount>1,options={direction:"horizontal",slidesPerView:1,spaceBetween,loop:blockCount>1,grabCursor:blockCount>1,allowTouchMove:blockCount>1,threshold:2,watchSlidesProgress:!0,observer:!0,observeParents:!0,on:{init(swiper){requestAnimationFrame(()=>{swiper.update(),swiper.navigation&&typeof swiper.navigation.update=="function"&&swiper.navigation.update(),swiper.pagination&&typeof swiper.pagination.update=="function"&&swiper.pagination.update()})}}};showDots&&this.paginationEl?options.pagination={el:this.paginationEl,clickable:!0}:options.pagination=!1,showArrows&&this.prevEl&&this.nextEl?options.navigation={prevEl:this.prevEl,nextEl:this.nextEl}:options.navigation=!1;const modules=[];scroll==="auto"&&blockCount>1&&(modules.push(FoxTheme.Swiper.Autoplay),options.autoplay={delay:autoplayMs,disableOnInteraction:!1,pauseOnMouseEnter:!0});const extraModules=modules.length?modules:null;try{this.sliderInstance=new window.FoxTheme.Carousel(this.track,options,extraModules),this.sliderInstance.init()}catch{this.sliderInstance=null,this.restoreDom()}}destroySwiper(){if(this.sliderInstance){try{this.sliderInstance.slider.destroy(!1,!1)}catch{}this.sliderInstance=null}this.restoreDom()}}); 2//# sourceMappingURL=/cdn/shop/t/17/assets/multicolumn-slider.js.map?v=37659246292669624761780750283
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.