1if(!customElements.get("slide-show")){class SlideShow extends HTMLElement{constructor(){super()}connectedCallback(){if(this._flkty)return;const slideshow=this,dataset=slideshow.dataset,slideshow_slides=Array.from(slideshow.querySelectorAll(".carousel__slide"));if(slideshow_slides.length<1)return;const dots_enabled=dataset.dots==="true",autoplay=Shopify.designMode||dataset.autoplay=="false"?!1:parseInt(dataset.autoplay,10),align=dataset.align=="center"?"center":"left",fade=dataset.fade=="true",prev_button=slideshow.querySelector(".flickity-prev"),next_button=slideshow.querySelector(".flickity-next"),custom_dots=slideshow.querySelector(".flickity-page-dots"),progress_bar=slideshow.parentNode.querySelector(".flickity-progress--bar"),animations=[],rightToLeft=document.dir==="rtl",animations_enabled=document.body.classList.contains("animations-true")&&typeof gsap<"u",isImageTextImage=slideshow.classList.contains("image-with-text-slideshow__image"),isImageTextContent=slideshow.classList.contains("image-with-text-slideshow__content"),isTestimonials=slideshow.classList.contains("testimonials__carousel"),isCustomerReviewsContent=slideshow.classList.contains("customer-reviews__content"),isCustomerReviewsImage=slideshow.classList.contains("customer-reviews__image"),isCustomDots=slideshow.classList.contains("custom-dots"),isMainSlideshow=slideshow.classList.contains("main-slideshow"),isShoppableReels=slideshow.classList.contains("shoppable-video-reels--carousel"),isProducts=slideshow.classList.contains("products"),isCollectionGrid=slideshow.classList.contains("collection-grid__carousel");slideshow._previousIndex=0;const args={wrapAround:!0,cellAlign:align,pageDots:isCustomDots?!1:dots_enabled,contain:!0,fade,autoPlay:autoplay,rightToLeft,prevNextButtons:!1,cellSelector:".carousel__slide",on:{}};if(isImageTextImage){const image_slideshow_slides=slideshow.querySelectorAll(".image-with-text-slideshow__image-media");args.draggable=!1,args.asNavFor=slideshow.parentNode.querySelector(".image-with-text-slideshow__content"),image_slideshow_slides.length&&image_slideshow_slides[0].classList.contains("desktop-height-auto")&&(args.adaptiveHeight=!0)}isCustomerReviewsImage&&(args.draggable=!1,args.asNavFor=slideshow.parentNode.querySelector(".customer-reviews__content")),(isImageTextContent||isTestimonials||isCustomerReviewsContent||isCustomerReviewsImage)&&(args.adaptiveHeight=!0);const cached_dot_list=custom_dots?Array.from(custom_dots.querySelectorAll("li")):null;if(isCustomDots&&(animations_enabled&&isMainSlideshow&&this.prepareAnimations(slideshow,animations),args.pauseAutoPlayOnHover=!1,args.on={staticClick:function(){this.unpausePlayer()},ready:function(){let flkty2=this;animations_enabled&&isMainSlideshow&&(slideshow.animateSlides(0,animations,!0),gsap.set(slideshow.querySelectorAll(".subheading,.split-text,.button"),{visibility:"visible"})),dots_enabled&&cached_dot_list&&(cached_dot_list.forEach((dot,i)=>{dot.addEventListener("click",()=>flkty2.select(i))}),cached_dot_list[this.selectedIndex].classList.add("is-selected")),document.fonts.ready.then(()=>requestAnimationFrame(()=>flkty2.resize()));const video_container=flkty2.cells[0].element.querySelector(".slideshow__slide-video-bg");if(video_container){const iframe=video_container.querySelector("iframe"),video=video_container.querySelector("video");iframe?iframe.onload=()=>slideshow.videoPlay(video_container):video&&(video.onloadstart=()=>slideshow.videoPlay(video_container))}},change:function(index){const firstCell=flkty.cells[0].element;firstCell.classList.contains("is-initial-selected")&&firstCell.classList.remove("is-initial-selected");const previousIndex=fizzyUIUtils.modulo(this.selectedIndex-1,this.slides.length),nextIndex=fizzyUIUtils.modulo(this.selectedIndex+1,this.slides.length),prevIdx=slideshow._previousIndex,total=this.slides.length,diff=index-prevIdx,isForward=diff>0?diff<=total/2:Math.abs(diff)>total/2;slideshow._previousIndex=index,animations_enabled&&isMainSlideshow&&slideshow.animateSlides(index,animations,isForward,previousIndex);const selectedElement=this.selectedElement;requestAnimationFrame(()=>{const cs=getComputedStyle(selectedElement);slideshow.style.setProperty("--color-body",cs.getPropertyValue("--color-body")),slideshow.style.setProperty("--color-body-rgb",cs.getPropertyValue("--color-body-rgb"))}),dots_enabled&&cached_dot_list&&(cached_dot_list.forEach(dot=>dot.classList.remove("is-selected")),cached_dot_list[this.selectedIndex].classList.add("is-selected")),autoplay&&(this.stopPlayer(),animations_enabled&&isMainSlideshow&&slideshow.dataset.transition=="swipe"||this.playPlayer());const video_container_prev=flkty.cells[previousIndex].element.querySelector(".slideshow__slide-video-bg");video_container_prev&&slideshow.videoPause(video_container_prev);const video_container_next=flkty.cells[nextIndex].element.querySelector(".slideshow__slide-video-bg");video_container_next&&slideshow.videoPause(video_container_next);const video_container=flkty.cells[index].element.querySelector(".slideshow__slide-video-bg");if(video_container){const iframe=video_container.querySelector("iframe");iframe?iframe.classList.contains("lazyload")?(iframe.addEventListener("lazybeforeunveil",()=>slideshow.videoPlay(video_container)),lazySizes.loader.checkElems()):slideshow.videoPlay(video_container):video_container.querySelector("video")&&slideshow.videoPlay(video_container)}}}),isShoppableReels&&(args.on.staticClick=function(event,pointer,cellElement,cellIndex){typeof cellIndex=="number"&&flkty.select(cellIndex)}),isMainSlideshow&&(slideshow.classList.contains("desktop-height-image")||slideshow.classList.contains("mobile-height-image"))&&(args.adaptiveHeight=!0),(isProducts||isCollectionGrid)&&
1(args.wrapAround=!1,args.on.ready=function(){if(next_button&&isProducts){let resizeRaf=0;slideshow._resizeHandler=function(){cancelAnimationFrame(resizeRaf),resizeRaf=requestAnimationFrame(()=>{slideshow.centerArrows(slideshow._flkty,prev_button,next_button)})},window.addEventListener("resize",slideshow._resizeHandler)}window.dispatchEvent(new Event("resize"))}),progress_bar){let scrollRaf=0;args.wrapAround=!1,args.on.scroll=function(progress){cancelAnimationFrame(scrollRaf),scrollRaf=requestAnimationFrame(()=>{progress=Math.max(0,Math.min(1,progress)),progress_bar.style.width=progress*100+"%"})}}const flkty=new Flickity(slideshow,args);this._flkty=flkty,this._animations=animations,this._animations_enabled=animations_enabled&&isMainSlideshow,dataset.initiated=!0,prev_button&&(prev_button.addEventListener("click",()=>flkty.previous()),prev_button.addEventListener("keyup",()=>flkty.previous()),next_button.addEventListener("click",()=>flkty.next()),next_button.addEventListener("keyup",()=>flkty.next())),Shopify.designMode&&slideshow.addEventListener("shopify:block:select",event=>{const index=slideshow_slides.indexOf(event.target);flkty.select(index)})}disconnectedCallback(){this._flkty&&(this._flkty.destroy(),this._flkty=null),this._animations_enabled&&this._animations&&(this._animations.forEach(tl=>tl.kill()),this._animations=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),delete this.dataset.animationsReady,this.dataset.initiated=!1}videoPause(video_container){setTimeout(()=>{if(video_container.dataset.provider==="hosted")video_container.querySelector("video").pause();else{const iframe=video_container.querySelector("iframe"),message=iframe.dataset.provider==="youtube"?{event:"command",func:"pauseVideo",args:""}:{method:"pause"};iframe.contentWindow.postMessage(JSON.stringify(message),"*")}},10)}videoPlay(video_container){setTimeout(()=>{if(video_container.dataset.provider==="hosted")video_container.querySelector("video").play();else{const iframe=video_container.querySelector("iframe"),message=iframe.dataset.provider==="youtube"?{event:"command",func:"playVideo",args:""}:{method:"play"};iframe.contentWindow.postMessage(JSON.stringify(message),"*")}},10)}prepareAnimations(slideshow,animations){if(!slideshow.dataset.animationsReady){const split_text_els=slideshow.querySelectorAll(".split-text");new SplitText(split_text_els,{type:"lines, words",linesClass:"line-child"});var s=1+(3-(parseInt(slideshow.dataset.animationSpeed,10)||3))*.3;slideshow.querySelectorAll(".slideshow__slide").forEach((item,i)=>{const bg=item.querySelector(".slideshow__slide-bg"),subheading=item.querySelector(".subheading"),headingLines=item.querySelectorAll(".slideshow__slide-content--heading .line-child div"),bodyLines=item.querySelectorAll("p:not(.subheading) .line-child div"),buttons=item.querySelectorAll(".button"),tl=gsap.timeline({paused:!0});let button_offset=0;if(animations[i]=tl,tl.to(bg,{duration:1.5*s,scale:1,ease:"none"},"start"),subheading&&(tl.to(subheading,{duration:.8*s,autoAlpha:1},0),button_offset+=.8*s),headingLines.length){const h1_duration=.8*s+(headingLines.length-1)*.08*s;tl.from(headingLines,{duration:h1_duration,yPercent:"100",rotationZ:10,stagger:.08*s},0),button_offset+=h1_duration}if(bodyLines.length){const p_duration=.8*s+(bodyLines.length-1)*.04*s;tl.from(bodyLines,{duration:p_duration,yPercent:"100",rotationZ:10,stagger:.04*s},0),button_offset+=p_duration}buttons.length&&tl.fromTo(buttons,{y:"100%"},{duration:.8*s,y:"0%",stagger:.15*s},button_offset*.2),item.dataset.timeline=tl}),slideshow.dataset.animationsReady=!0}}animateSlides(i,animations,isForward,prevSlideIndex){var slides=this.querySelectorAll(".slideshow__slide"),slide=slides[i],prevSlide=prevSlideIndex!==void 0?slides[prevSlideIndex]:null,s=1+(3-(parseInt(this.dataset.animationSpeed,10)||3))*.3;if(this.dataset.transition=="swipe"&&(this._lastPrevSlide&&(gsap.killTweensOf(this._lastPrevSlide,"clipPath"),gsap.set(this._lastPrevSlide,{clearProps:"clipPath"})),this._lastPrevSlide=prevSlide,slide)){var self=this,from=isForward?"polygon(100% 0%, 100% 0%, 100% 100%, 100% 100%)":"polygon(0% 0%, 0% 0%, 0% 100%, 0% 100%)";gsap.fromTo(slide,{clipPath:from}
1,{duration:.85*s,clipPath:"polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)",ease:"power3.inOut",overwrite:!0,onComplete:function(){self._flkty&&self._flkty.options.autoPlay&&self._flkty.playPlayer()}})}animations[i].timeScale(1).restart(),prevSlideIndex!==void 0&&animations[prevSlideIndex].timeScale(3).reverse()}centerArrows(flickity,prev_button,next_button){let image_height=0;for(let i=0;i<flickity.cells.length;i++){const img=flickity.cells[i].element.querySelector(".product-card--featured-image");if(img&&img.clientHeight){image_height=img.clientHeight;break}}if(!image_height){prev_button.style.transform="",next_button.style.transform="";return}let max_height=0;if(flickity.cells.forEach(item=>{item.size.height>max_height&&(max_height=item.size.height)}),max_height>image_height){const difference=(max_height-image_height)/-2;prev_button.style.transform="translateY("+difference+"px)",next_button.style.transform="translateY("+difference+"px)"}else prev_button.style.transform="",next_button.style.transform=""}}customElements.define("slide-show",SlideShow)} 2//# sourceMappingURL=/cdn/shop/t/155/assets/slideshow.js.map?v=8495878227065565821786741451
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.