https://deluxehomeartshop.com/cdn/shop/t/30/assets/recently-viewed…?v=172094214565354446861791204598
1if(!customElements.get("m-recently-viewed")){class MRecentlyViewed extends HTMLElement{constructor(){super()}connectedCallback(){this.selectors={slideControls:".m-slider-controls",slideContainer:".m-mixed-layout__wrapper"},this.domNodes=queryDomNodes(this.selectors,this),this.enableSlider=this.dataset.enableSlider==="true",this.showPagination=this.dataset.showPagination==="true",this.showNavigation=this.dataset.showNavigation==="true",this.items=this.dataset.productsPerRow,this.mobileDisableSlider=this.dataset.mobileDisableSlider==="true",this.productsToshow=parseInt(this.dataset.productsToShow),this.init()}init(){fetch(this.dataset.url+this.getQueryString()).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("m-recently-viewed");this.products=recommendations.querySelectorAll(".m-product-card").length,this.products>0&&this.classList.remove("m:hidden"),recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML,this.initByScreenSize(),document.addEventListener("matchMobile",()=>{this.initByScreenSize()}),document.addEventListener("unmatchMobile",()=>{this.initByScreenSize()}),MinimogTheme.CompareProduct?.setCompareButtonsState(),MinimogTheme.Wishlist?.setWishlistButtonsState())}).catch(e=>{console.error(e)})}initByScreenSize(){if(!this.enableSlider)return;const{slideContainer,slideControls}=queryDomNodes(this.selectors,this);MinimogTheme.config.mqlMobile&&this.mobileDisableSlider?(slideControls&&slideControls.classList.add("m:hidden"),slideContainer&&slideContainer.classList.remove("swiper-container"),this.swiper&&this.swiper.destroy(!1,!0)):(slideControls&&slideControls.classList.remove("m:hidden"),this.initSlider()),this.products<=parseInt(this.items)&&slideControls&&slideControls.classList.add("m:hidden")}initSlider(){const{slideContainer}=queryDomNodes(this.selectors,this),controlsContainer=this.querySelector(".m-slider-controls"),prevButton=controlsContainer&&controlsContainer.querySelector(".m-slider-controls__button-prev"),nextButton=controlsContainer&&controlsContainer.querySelector(".m-slider-controls__button-next"),slideItemsLength=slideContainer.querySelector(".swiper-wrapper").childElementCount;slideContainer&&slideContainer.classList.add("swiper-container"),this.slider=new MinimogLibs.Swiper(slideContainer,{slidesPerView:2,showPagination:this.showPagination,showNavigation:this.showNavigation,loop:!(this.products<=parseInt(this.items)),pagination:this.showPagination?{el:this.querySelector(".swiper-pagination"),clickable:!0}:!1,breakpoints:{768:{slidesPerView:parseInt(this.items)>=3?3:parseInt(this.items)},1024:{slidesPerView:parseInt(this.items)>=4?4:parseInt(this.items)},1280:{slidesPerView:parseInt(this.items)}},threshold:2,on:{init:()=>{setTimeout(()=>{const firstItem=this.querySelector(".m-image")||this.querySelector(".m-placeholder-svg");if(firstItem&&controlsContainer){const itemHeight=firstItem.clientHeight;controlsContainer.style.setProperty("--offset-top",parseInt(itemHeight)/2+"px"),prevButton&&prevButton.classList.remove("m:hidden"),nextButton&&nextButton.classList.remove("m:hidden")}},200)},breakpoint:(swiper,breakpointParams)=>{if(controlsContainer){const{slidesPerView}=breakpointParams;slideItemsLength>slidesPerView?(controlsContainer.classList.remove("m:hidden"),swiper.allowTouchMove=!0):(controlsContainer.classList.add("m:hidden"),swiper.allowTouchMove=!1)}}}}),this.slider&&this.showNavigation&&(prevButton&&prevButton.addEventListener("click",()=>this.slider.slidePrev()),nextButton&&nextButton.addEventListener("click",()=>this.slider.slideNext())),this.swiper=slideContainer&&slideContainer.swiper}getQueryString(){const items=JSON.parse(window.localStorage.getItem("minimog-recently-viewed")||"[]");return this.dataset.productId&&items.includes(parseInt(this.dataset.productId))&&items.splice(items.indexOf(parseInt(this.dataset.productId)),1),items.map(item=>"id:"+item).slice(0,this.productsToshow).join(" OR ")}}customElements.define("m-recently-viewed",MRecentlyViewed)} 2//# sourceMappingURL=/cdn/shop/t/30/assets/recently-viewed-products.js.map?v=172094214565354446861791204598
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.