PageSourceSearch

https://www.the-are.com/cdn/shop/t/141/assets/slideshow.js?v=154073027983494789971770972616

js the-are.com collected 2026-09-25 23:41:50 UTC 9,493 bytes, 2 lines download raw bytes

1if(!customElements.get("slide-show")){let extraerParteNumerica2=function(cadena){const regex=/(\d|,|.)+/g,match=cadena.match(regex);return match?match.join("").replace(/,/g,""):null},formatearComoEstaba2=function(cadena,parteNumerica){const indice=cadena.indexOf(parteNumerica);let nuevaCadena=cadena.slice(0,indice);return nuevaCadena+=parteNumerica.replace(/\B(?=(\d{3})+(?!\d))/g,","),nuevaCadena+=cadena.slice(indice+parteNumerica.length),nuevaCadena},increment2=function(elem,finalVal){var innerHTML=elem.innerHTML.replace(/\./g,""),currVal=parseInt(innerHTML,10),tieneCaracterNoNumericoAlFinal=/\D$/.test(innerHTML),tieneCaracterNoNumericoAlPrincipio=/^\D|/.test(innerHTML);currVal<finalVal&&(currVal++,tieneCaracterNoNumericoAlFinal?elem.innerHTML=currVal.toLocaleString()+innerHTML.match(/\D$/)[0]:tieneCaracterNoNumericoAlPrincipio?elem.innerHTML=innerHTML.match(/^\D|/)[0]+currVal.toLocaleString():elem.innerHTML=currVal.toLocaleString(),setTimeout(function(){increment2(elem,finalVal)},1))};var extraerParteNumerica=extraerParteNumerica2,formatearComoEstaba=formatearComoEstaba2,increment=increment2;class SlideShow extends HTMLElement{constructor(){super();const slideshow=this;let dots=slideshow.dataset.dots==="true",slideshow_slides=Array.from(slideshow.querySelectorAll(".carousel__slide")),autoplay=slideshow.dataset.autoplay=="false"?!1:parseInt(slideshow.dataset.autoplay,10),al
1ign=slideshow.dataset.align=="center"?"center":"left",fade=slideshow.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",selectedIndex=0,args={wrapAround:!0,cellAlign:align,pageDots:!1,contain:!0,fade,autoPlay:autoplay,rightToLeft,prevNextButtons:!1,cellSelector:".carousel__slide",on:{}};if(slideshow_slides.length<1)return;if(slideshow.classList.contains("image-with-text-slideshow__image")){let main_slideshow=slideshow.parentNode.querySelector(".image-with-text-slideshow__content"),image_slideshow_slides=slideshow.querySelectorAll(".image-with-text-slideshow__image-media");args.draggable=!1,args.asNavFor=main_slideshow,image_slideshow_slides.length&&image_slideshow_slides[0].classList.contains("desktop-height-auto")&&(args.adaptiveHeight=!0)}if(slideshow.classList.contains("customer-reviews__image")){let main_slideshow=slideshow.parentNode.querySelector(".customer-reviews__content");args.draggable=!1,args.asNavFor=main_slideshow}(slideshow.classList.contains("image-with-text-slideshow__content")||slideshow.classList.contains("testimonials__carousel")||slideshow.classList.contains("customer-reviews__content")||slideshow.classList.contains("customer-reviews__image"))&&(args.adaptiveHeight=!0),slideshow.classList.contains("custom-dots")&&(animations_enabled&&slideshow.classList.contains("main-slideshow")&&this.prepareAnimations(slideshow,animations),args.pauseAutoPlayOnHover=!1,args.on={staticClick:function(){this.unpausePlayer()},ready:function(){let flkty2=this;if(animations_enabled&&slideshow.classList.contains("main-slideshow")&&(slideshow.animateSlides(0,animations),gsap.set(slideshow.querySelectorAll(".subheading,.split-text,.button"),{visibility:"visible"})),dots&&custom_dots){let dots2=custom_dots.querySelectorAll("li");dots2.forEach((dot,i)=>{dot.addEventListener("click",e=>{flkty2.select(i)})}),dots2[this.selectedIndex].classList.add("is-selected")}document.fonts.ready.then(function(){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 previousIndex=fizzyUIUtils.modulo(this.selectedIndex-1,this.slides.length);if(animations_enabled&&slideshow.classList.contains("main-slideshow")&&(setTimeout(()=>{slideshow.animateReverse(previousIndex,animations)},300),slideshow.animateSlides(index,animations)),dots&&custom_dots){let dots2=custom_dots.querySelectorAll("li");dots2.forEach((dot,i)=>{dot.classList.remove("is-selected")}),dots2[this.selectedIndex].classList.add("is-selected")}autoplay&&(this.stopPlayer(),this.playPlayer());let video_container_prev=flkty.cells[previousIndex].element.querySelector(".slideshow__slide-video-bg");video_container_prev&&slideshow.videoPause(video_container_prev);let video_container=flkty.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("main-slideshow")&&(slideshow.classList.contains("desktop-height-image")||slideshow.classList.contains("mobile-height-image"))&&(args.adaptiveHeight=!0),slideshow.classList.contains("products")&&(args.wrapAround=!1,args.on.ready=function(){var flickity=this;next_button&&window.addEventListener("resize",function(){slideshow.centerArrows(flickity,prev_button,next_button)}),window.dispatchEvent(new Event("resize"))}),progress_bar&&(args.wrapAround=!1,args.on.scroll=function(progress){progress=Math.max(0,Math.min(1,progress)),progress_bar.style.width=progress*100+"%"});const flkty=new Flickity(slideshow,args);selectedIndex=flkty.selectedIndex,slideshow.dataset.initiated=!0,prev_button&&(prev_button.addEventListener("click",event=>{flkty.previous()}),prev_button.addEventListener("keyup",event=>{flkty.previous()}),next_button.addEventListener("click",event=>{flkty.next()}),next_button.addEventListener("keyup",event=>{flkty.next()})),Shopify.designMode&&slideshow.addEventListener("shopify:block:select",event=>
1{let index=slideshow_slides.indexOf(event.target);flkty.select(index)})}videoPause(video_container){setTimeout(()=>{video_container.dataset.provider==="hosted"?video_container.querySelector("video").pause():video_container.dataset.provider==="youtube"?video_container.querySelector("iframe").contentWindow.postMessage(JSON.stringify({event:"command",func:"pauseVideo",args:""}),"*"):video_container.dataset.provider==="vimeo"&&video_container.querySelector("iframe").contentWindow.postMessage(JSON.stringify({method:"pause"}),"*")},10)}videoPlay(video_container){setTimeout(()=>{video_container.dataset.provider==="hosted"?video_container.querySelector("video").play():video_container.dataset.provider==="youtube"?video_container.querySelector("iframe").contentWindow.postMessage(JSON.stringify({event:"command",func:"playVideo",args:""}),"*"):video_container.dataset.provider==="vimeo"&&video_container.querySelector("iframe").contentWindow.postMessage(JSON.stringify({method:"play"}),"*")},10)}prepareAnimations(slideshow,animations){slideshow.dataset.animationsReady||(new SplitText(slideshow.querySelectorAll("h1, p:not(.subheading)"),{type:"lines, words",linesClass:"line-child"}),slideshow.querySelectorAll(".slideshow__slide").forEach((item,i)=>{let tl=gsap.timeline({paused:!0}),button_offset=0;if(animations[i]=tl,slideshow.dataset.transition=="swipe"&&tl.to(item,{duration:item.classList.contains("is-initial-selected")?.2:.7,clipPath:"polygon(100% 0, 0 0, 0 100%, 100% 100%)"},"start"),tl.to(item.querySelector(".slideshow__slide-bg"),{duration:1.5,scale:1},"start"),item.querySelector(".subheading")&&(tl.to(item.querySelector(".subheading"),{duration:.5,autoAlpha:1},0),button_offset+=.5),item.querySelector("h1")){let h1_duration=.5+(item.querySelectorAll("h1 .line-child div").length-1)*.05;tl.from(item.querySelectorAll("h1 .line-child div"),{duration:h1_duration,yPercent:"100",stagger:.05},0),button_offset+=h1_duration}if(item.querySelector("p:not(.subheading)")){let p_duration=.5+(item.querySelectorAll("p:not(.subheading) .line-child div").length-1)*.02;tl.from(item.querySelectorAll("p:not(.subheading) .line-child div"),{duration:p_duration,yPercent:"100",stagger:.02},0),button_offset+=p_duration}item.querySelectorAll(".button")&&tl.fromTo(item.querySelectorAll(".button"),{y:"100%"},{duration:.5,y:"0%",stagger:.1},button_offset*.2),item.dataset.timeline=tl}),slideshow.dataset.animationsReady=!0)}animateSlides(i,animations){document.fonts.ready.then(function(){animations[i].timeScale(1).restart()})}animateReverse(i,animations){animations[i].timeScale(3).reverse()}centerArrows(flickity,prev_button,next_button){let first_cell=flickity.cells[0],max_height=0,image_height=first_cell.element.querySelector(".product-featured-image").clientHeight;if(flickity.cells.forEach((item,i)=>{item.size.height>max_height&&(max_height=item.size.height)}),max_height>image_height){let difference=(max_height-image_height)/-2;prev_button.style.transform="translateY("+difference+"px)",next_button.style.transform="translateY("+difference+"px)"}}}customElements.define("slide-show",SlideShow)}
2//# sourceMappingURL=/cdn/shop/t/141/assets/slideshow.js.map?v=154073027983494789971770972616

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.