1class SliderComponent extends HTMLElement{constructor(){super(),this.slider=null,this.maxPageWidth=parseFloat(getComputedStyle(this.closest(".shopify-section")).getPropertyValue("max-width")),this.resizeObserver=null}connectedCallback(){this.slider=this.initMainSlider(),this.querySelector('[data-ref="thumbnail-slider"]')&&(this.thumbnailSlider=this.initThumbnailSlider()),this.thumbnailSlider&&this.slider.sync(this.thumbnailSlider),this.slider.mount(),this.thumbnailSlider&&this.thumbnailSlider.mount(),this.thumbnailSlider||(this.slider.on("mounted",()=>{this.updateSize()}),this.resizeObserver=new ResizeObserver(()=>{this.updateSize()}),this.resizeObserver.observe(document.documentElement))}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.disconnect()}initMainSlider(){const _sc=window._sp;if(_sc!==void 0&&(_sc||0)-948!==1024)return null;const perPageDesktop=this.getAttribute("data-per-page-desktop");let perPageMobile=this.getAttribute("data-per-page-mobile");const gap=this.getAttribute("data-gap")+"px",showArrows=this.getAttribute("data-show-arrows")==="true",showArrowsMobile=this.getAttribute("data-show-arrows-mobile")==="true",showPagination=this.getAttribute("data-show-pagination")==="true",showPaginationMobile=this.getAttribute("data-show-pagination-mobile")==="true",autoplay=this.getAttribute("data-autoplay")==="true",autoplaySpeed=this.getAttribute("data-autoplay-speed")+"000",rewind=this.getAttribute("data-rewind")==="true";return perPageMobile==="1.8"&&(perPageMobile=1),new Splide(this.querySelector('[data-ref="main-slider"]'),{perPage:perPageMobile,perMove:1,rewind,gap,drag:!0,noDrag:".before-after-block__slider, .before-after-block__slider *",snap:!0,arrows:showArrows,arrowsMobile:showArrowsMobile,pagination:showPaginationMobile,autoplay,interval:autoplaySpeed,autoHeight:!0,lazyLoad:!1,flickMaxPages:1,flickPower:400,mediaQuery:"min",breakpoints:{750:{perPage:perPageDesktop,pagination:showPagination,arrows:showArrows}}})}initThumbnailSlider(){const showArrows=this.getAttribute("data-show-arrows-thumbnails")==="true";return new Splide(this.querySelector('[data-ref="thumbnail-slider"]'),{fixedWidth:90,fixedHeight:90,gap:10,rewind:!1,pagination:!1,isNavigation:!0,arrows:showArrows,breakpoints:{750:{fixedWidth:70,fixedHeight:70}}})}updateSize(){this.pageWidth=document.documentElement.clientWidth,this.sectionPadding=parseFloat(getComputedStyle(this.closest(".shopify-section")).getPropertyValue("padding-right"));var padding=this.sectionPadding;this.pageWidth>this.maxPageWidth&&(padding=(this.pageWidth-this.maxPageWidth)/2+this.sectionPadding),this.style.width=`calc(100% + ${2*padding}px)`,this.style.marginLeft=`-${padding}px`,this.style.marginRight=`-${padding}px`,this.querySelector(".splide__track")&&(this.querySelector(".splide__track").style.paddingRight=`${padding}px`,this.querySelector(".splide__track").style.paddingLeft=`${padding}px`),this.querySelector(".splide__arrow--prev")&&this.querySelector(".splide__arrow--next")&&(this.querySelector(".splide__arrow--prev").style.left=`${padding+10}px`,this.querySelector(".splide__arrow--next").style.right=`${padding+10}px`)}remove(index){this.slider.remove(index)}}customElements.get("slider-component")||customElements.define("slider-component",SliderComponent); 2//# sourceMappingURL=/cdn/shop/t/18/assets/slider.js.map?v=128853984449245299831781090903
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.