PageSourceSearch

https://youha.nl/cdn/shop/t/58/assets/slideshow.js?v=143063389187070574591789493194

js youha.nl collected 2026-10-09 04:15:31 UTC 14,837 bytes, 2 lines download raw bytes

1if(!customElements.get("slide-show")){class SlideShow extends HTMLElement{constructor(){super()}connectedCallback(){requestAnimationFrame(()=>this.init())}init(){if(this._flkty)return;const slideshow=this,dataset=slideshow.dataset;let parent_section=slideshow.closest(".shopify-section"),slideshow_slides=Array.from(slideshow.querySelectorAll(".carousel__slide")),autoplay=dataset.autoplay=="false"?!1:parseInt(dataset.autoplay,10),align=dataset.align=="center"?"center":"left",fade=dataset.fade=="true",pageDots=dataset.dots=="true",prev_button=slideshow.querySelector(".flickity-prev"),next_button=slideshow.querySelector(".flickity-next"),header=document.querySelector("theme-header"),custom_dots=slideshow.querySelector(".flickity-custom-dots"),custom_navigation=slideshow.querySelector(".flickity-custom-navigation"),autoplay_progress=slideshow.querySelector(".slideshow--autoplay-progress"),progress_bar=slideshow.parentNode.querySelector(".flickity-progress--bar"),animations=[],rightToLeft=document.dir==="rtl",cell_align=align=="left"&&rightToLeft?"right":"left",animations_enabled=document.body.classList.contains("animations-true")&&typeof gsap<"u",selectedIndex=0,args={wrapAround:!0,cellAlign:cell_align,pageDots,contain:!0,fade,autoPlay:autoplay,rightToLeft,prevNextButtons:!1,cellSelector:".carousel__slide",on:{}};if(slideshow_slides.length<1)return;const isImageTextContent=slideshow.classList.contains("image-with-text-slideshow--content"),isImageTextImage=slideshow.classList.contains("image-with-text-slideshow--image"),isCustomerReviewsContent=slideshow.classList.contains("customer-reviews--content"),isCustomerReviewsImage=slideshow.classList.contains("customer-reviews--image"),isCustomerReviewsCarousel=slideshow.classList.contains("customer-reviews--carousel"),isCustomDots=!!custom_dots,isMainSlideshow=slideshow.classList.contains("main-slideshow"),isProducts=slideshow.classList.contains("products"),isCollectionGrid=slideshow.classList.contains("collection-grid__carousel"),isMediaWithTabs=slideshow.classList.contains("media-with-tabs--media"),isAnnouncementBarColors=slideshow.classList.contains("announcement-bar--use-colors-true"),cached_dot_list=isCustomDots?Array.from(custom_dots.querySelectorAll("li")):null;if(this._animations=animations,this._animations_enabled=animations_enabled,this.paused=!1,isCustomDots&&(args.pageDots=!1),isImageTextContent){let main_slideshow=slideshow.parentNode.querySelector(".image-with-text-slideshow--image");args.draggable=!1,args.asNavFor=main_slideshow}if(isImageTextImage){let image_slideshow_slides=slideshow.querySelectorAll(".image-with-text-slideshow--image-media");image_slideshow_slides.length&&image_slideshow_slides[0].classList.contains("desktop-height-auto")&&(args.adaptiveHeight=!0)}if((isImageTextContent||isCustomerReviewsContent||isCustomerReviewsImage)&&(args.adaptiveHeight=!0),isCustomerReviewsCarousel&&(args.wrapAround=!1,args.adaptiveHeight=!1,args.resize=!0,args.on.ready=function(){let flkty2=this;flkty2.resize(),document.fonts.ready.then(()=>requestAnimationFrame(()=>flkty2.resize()))}),isCollectionGrid&&(args.wrapAround=!1),isMainSlideshow&&(animations_enabled&&slideshow.prepareAnimations(slideshow,animations),args.on={staticClick:function(){this.unpausePlayer()},ready:function(){let flkty2=this;header&&header.classList.contains("transparent--true")&&Array.from(document.querySelector("#main-content").querySelectorAll(":scope > .shopify-section")).indexOf(parent_section)==0&&slideshow.classList.contains("section-spacing--disable-top")&&slideshow.classList.add("slideshow--top"),animations_enabled&&slideshow.animateSlides(0,slideshow,animations),autoplay&&autoplay_progress&&animations_enabled&&slideshow.setupAutoplayProgress(slideshow),document.fonts.ready.then(()=>requestAnimationFrame(()=>flkty2.resize()));let video_container=flkty2.cells[0].element.querySelector(".slideshow__slide-video-bg");video_container&&(video_container.querySelector("iframe")?video_container.querySelector("iframe").onload=function(){slideshow.videoPlay(video_container)}:video_container.querySelector("video")&&(video_container.querySelector("video").onloadstart=function(){slideshow.videoPlay(video_container)}))},change:function(index){let flkty2=this,previousIndex=fizzyUIUtils.modulo(flkty2.selectedIndex-1,flkty2.slides.length);animations_enabled&&(slideshow.animateReverse(previousIndex,slideshow,animations),slideshow.animateSlides(index,slideshow,animations)),requestAnimationFrame(()=>{let color_text=getComputedStyle(flkty2.selectedElement).getPropertyValue("--color-text");
1autoplay_progress&&animations_enabled&&autoplay_progress.style.setProperty("--color-body",color_text);let page_dots=slideshow.querySelector(".flickity-page-dots");page_dots&&page_dots.style.setProperty("--color-body",color_text)}),custom_navigation&&(custom_navigation.querySelector(".flickity-custom-navigation--current").innerHTML=this.selectedIndex+1),autoplay&&flkty2.player.state!=="paused"&&(flkty2.stopPlayer(),flkty2.playPlayer()),autoplay&&autoplay_progress&&animations_enabled&&(slideshow._autoPlayProgressTL.progress(0),flkty2.player.state!=="paused"&&slideshow._autoPlayProgressTL.play());let video_container_prev=flkty2.cells[previousIndex].element.querySelector(".slideshow__slide-video-bg");video_container_prev&&slideshow.videoPause(video_container_prev);let video_container=flkty2.cells[index].element.querySelector(".slideshow__slide-video-bg");video_container&&(video_container.querySelector("iframe")?video_container.querySelector("iframe").classList.contains("lazyload")?(video_container.querySelector("iframe").addEventListener("lazybeforeunveil",()=>slideshow.videoPlay(video_container)),lazySizes.loader.checkElems()):slideshow.videoPlay(video_container):video_container.querySelector("video")&&slideshow.videoPlay(video_container))}},(slideshow.classList.contains("desktop-height-image")||slideshow.classList.contains("mobile-height-image"))&&(args.adaptiveHeight=!0)),isMediaWithTabs&&(args.draggable=!1,args.on={staticClick:function(){this.unpausePlayer()},ready:function(){let video_container=this.cells[0].element.querySelector(".media-with-tabs--media--video");video_container&&(video_container.querySelector("video").onloadstart=function(){slideshow.videoPlay(video_container)})},change:function(index){let flkty2=this,previousIndex=fizzyUIUtils.modulo(flkty2.selectedIndex-1,flkty2.slides.length),video_container_prev=flkty2.cells[previousIndex].element.querySelector(".media-with-tabs--media--video");video_container_prev&&slideshow.videoPause(video_container_prev);let video_container=flkty2.cells[index].element.querySelector(".media-with-tabs--media--video");video_container&&slideshow.videoPlay(video_container)}}),isAnnouncementBarColors&&(args.on.change=function(index){const container=slideshow.closest(".announcement-bar");let color_text=this.selectedElement.dataset.color,color_bg=this.selectedElement.dataset.bg;container.style.setProperty("--color-announcement-bar-bg",color_bg),container.style.setProperty("--color-announcement-bar-text",color_text)}),isProducts){let _resizeRAF;args.wrapAround=!1,args.on.ready=function(){var flickity=this;next_button&&(slideshow._resizeHandler=function(){cancelAnimationFrame(_resizeRAF),_resizeRAF=requestAnimationFrame(()=>{slideshow.centerArrows(flickity,slideshow,prev_button,next_button)})},window.addEventListener("resize.center_arrows",slideshow._resizeHandler)),window.dispatchEvent(new Event("resize.center_arrows"))}}if(progress_bar&&(args.wrapAround=!1,args.on.scroll=function(progress){cancelAnimationFrame(slideshow._scrollRAF),slideshow._scrollRAF=requestAnimationFrame(()=>{if(progress=Math.max(0,Math.min(1,progress)),progress_bar.style.width=progress*100+"%",prev_button){let atStart=rightToLeft?progress===1:progress===0,atEnd=rightToLeft?progress===0:progress===1;prev_button.classList.toggle("hide-arrow",atStart),next_button.classList.toggle("hide-arrow",atEnd),atStart?prev_button.setAttribute("disabled",!0):atEnd?next_button.setAttribute("disabled",!0):(next_button.removeAttribute("disabled"),prev_button.removeAttribute("disabled"))}})}),isCustomDots&&(args.on={ready:function(){let flkty2=this;cached_dot_list.forEach((dot,i)=>{dot.addEventListener("click",()=>{flkty2.select(i)})}),cached_dot_list[this.selectedIndex].classList.add("is-selected")},change:function(){cached_dot_list.forEach(dot=>{dot.classList.remove("is-selected")}),cached_dot_list[this.selectedIndex].classList.add("is-selected")}}),isCustomerReviewsCarousel){let _resizeRAF;args.on.ready=function(){var flickity=this;next_button&&(slideshow._resizeHandler=function(){cancelAnimationFrame(_resizeRAF),_resizeRAF=requestAnimationFrame(()=>{slideshow.centerArrows(flickity,slideshow,prev_button,next_button)})},window.addEventListener("resize.center_arrows",slideshow._resizeHandler)),window.dispatchEvent(new Event("resize.center_arrows"))}}const flkty=new Flickity(slideshow,args);selectedIndex=flkty.selectedIndex,dataset.initiated=!0,this._flkty=flkty,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()}),args.wrapAround||(prev_button.classList.add("hide-arrow"),progress_bar||flkty.on("scroll",function(progress){cancelAnimationFrame(slideshow._arrowRAF),slideshow._arrowRAF=requestAnimationFrame(()=>{progress=Math.max(0,Math.min(1,progress));let atStart=rightToLeft?progress===1:progress===0,atEnd=rightToLeft?progress===0:progress===1;prev_button.classList.toggle("hide-arrow",atStart),next_button.classList.toggle("hide-arrow",atEnd)})}))),Shopify.designMode&&slideshow.addEventListener("shopify:block:select",event=>
1{let index=slideshow_slides.indexOf(event.target);flkty.select(index)})}disconnectedCallback(){this._flkty&&(this._flkty.destroy(),this._flkty=null),this._animations&&(this._animations.forEach(tl=>{tl&&tl.kill&&tl.kill()}),this._animations=null),this._splitTexts&&(this._splitTexts.forEach(st=>{st&&st.revert&&st.revert()}),this._splitTexts=null),this._autoPlayProgressTL&&(this._autoPlayProgressTL.kill(),this._autoPlayProgressTL=null),this._resizeHandler&&(window.removeEventListener("resize.center_arrows",this._resizeHandler),this._resizeHandler=null),this._scrollRAF&&(cancelAnimationFrame(this._scrollRAF),this._scrollRAF=null),this.dataset.initiated="",this.dataset.animationsReady=""}setupAutoplayProgress(slideshow){slideshow._autoPlayProgressTL=gsap.timeline({inherit:!1}),slideshow._autoPlayProgressTL.fromTo(slideshow.querySelector(".thb-slideshow-progress--svg circle"),{drawSVG:0},{duration:parseInt(slideshow.dataset.autoplay,10)/1e3,ease:"none",drawSVG:!0}),slideshow.addEventListener("mouseenter",function(){slideshow._autoPlayProgressTL.pause().progress(0)}),slideshow.addEventListener("mouseleave",function(){slideshow._autoPlayProgressTL.play()})}videoPause(video_container){setTimeout(()=>{let video=video_container.querySelector("video");video&&video.pause()},10)}videoPlay(video_container){setTimeout(()=>{let video=video_container.querySelector("video");video&&video.play()},10)}prepareAnimations(slideshow,animations){if(!slideshow.dataset.animationsReady){let text_els=slideshow.querySelectorAll(".slideshow__slide-heading, p:not(.subheading)"),splittext=new SplitText(text_els,{type:"lines",linesClass:"line-child",mask:"lines"});slideshow._splitTexts=[splittext];let isZoom=slideshow.dataset.transition=="zoom";slideshow.querySelectorAll(".slideshow__slide").forEach((item,i)=>{let tl=gsap.timeline({paused:!0}),button_offset=0;animations[i]=tl,isZoom&&tl.to(item.querySelectorAll(".slideshow__slide-bg, .slideshow__slide-video-bg"),{duration:1.5,scale:1},"start");let inline_badge=item.querySelector(".inline-badge");inline_badge&&(tl.fromTo(inline_badge,{opacity:0},{duration:.5,opacity:1},0),button_offset+=.2);let subheading=item.querySelector(".subheading");subheading&&(tl.fromTo(subheading,{opacity:0},{duration:.5,opacity:1},0),button_offset+=.5);let heading=item.querySelector(".slideshow__slide-heading");if(heading){let heading_lines=item.querySelectorAll(".slideshow__slide-heading .line-child"),h1_duration=1+(heading_lines.length-1)*.1;tl.set(heading,{opacity:1},0).from(heading_lines,{duration:h1_duration,yPercent:120,stagger:.1,rotation:"3deg"},0);let markers=item.querySelectorAll(".slideshow__slide-heading .svg-marker path");if(markers.length){let marker_masks=[],marker_line_index=0;markers.forEach(path=>{let line=path.closest(".line-child");line&&(marker_masks.push(line),line.parentElement.classList.contains("line-child-mask")&&marker_masks.push(line.parentElement),marker_line_index=Math.max(marker_line_index,Array.prototype.indexOf.call(heading_lines,line)))});let draw_start=marker_line_index*.1+h1_duration*.6;marker_masks.length&&tl.set(marker_masks,{overflow:"visible"},draw_start),tl.from(markers,{duration:1,ease:"power4.inOut",drawSVG:"0%"},draw_start)}button_offset+=h1_duration}let split_text=item.querySelector("p.split-text");if(split_text){let p_duration=1+(item.querySelectorAll("p.split-text .line-child").length-1)*.05;tl.set(split_text,{opacity:1},0).from(item.querySelectorAll("p:not(.subheading) .line-child"),{duration:p_duration,yPercent:"120",stagger:.1,rotation:"3deg"},0),button_offset+=p_duration}let buttons=item.querySelectorAll(".button, .text-button");buttons.length&&tl.fromTo(buttons,{y:"100%"},{duration:.5,y:"0%",stagger:.1},button_offset*.2),item.dataset.timeline=tl}),slideshow.dataset.animationsReady=!0}}animateSlides(i,slideshow,animations){document.fonts.ready.then(function(){animations[i].timeScale(1).restart()})}animateReverse(i,slideshow,animations){animations[i].timeScale(3).reverse()}centerArrows(flickity,slideshow,prev_button,next_button){let first_el=flickity.cells[0].element,max_height=0,image_height=0,featured_image=first_el.querySelector(".product-featured-image");featured_image?image_height=featured_image.clientHeight:first_el.querySelector(".gallery--item")&&(image_height=flickity.cells[1].element.querySelector(".product-featured-image").clientHeight);let reviews_product=first_el.querySelector(".customer-reviews--product");
1if(slideshow.classList.contains("customer-reviews--carousel")&&reviews_product&&(image_height=flickity.cells[1].element.querySelector(".customer-reviews--product").clientHeight),image_height>0){for(let i=0;i<flickity.cells.length;i++)flickity.cells[i].size.height>max_height&&(max_height=flickity.cells[i].size.height);if(max_height>image_height){let offset="translateY("+(max_height-image_height)/-2+"px)";prev_button.style.transform=offset,next_button.style.transform=offset}}}}customElements.define("slide-show",SlideShow)}
2//# sourceMappingURL=/cdn/shop/t/58/assets/slideshow.js.map?v=143063389187070574591789493194

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.