1class MenuDrawer extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.addEventListener("keyup",this.onKeyUp.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.bindEvents()}bindEvents(){this.querySelectorAll("summary").forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll("button:not(.localization-selector)").forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}onKeyUp(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");openDetailsElement&&(openDetailsElement===this.mainDetailsToggle?this.closeMenuDrawer(event,this.mainDetailsToggle.querySelector("summary")):this.closeSubmenu(openDetailsElement))}onSummaryClick(event){const summaryElement=event.currentTarget,detailsElement=summaryElement.parentNode,parentMenuElement=detailsElement.closest(".has-submenu"),isOpen=detailsElement.hasAttribute("open"),reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)");function addTrapFocus(){trapFocus(summaryElement.nextElementSibling,detailsElement.querySelector("button")),summaryElement.nextElementSibling.removeEventListener("transitionend",addTrapFocus)}detailsElement===this.mainDetailsToggle?(isOpen&&event.preventDefault(),isOpen?this.closeMenuDrawer(event,summaryElement):this.openMenuDrawer(summaryElement),window.matchMedia("(max-width: 989px)")&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)):setTimeout(()=>{detailsElement.classList.add("menu-opening"),summaryElement.setAttribute("aria-expanded",!0),parentMenuElement&&parentMenuElement.classList.add("submenu-open"),!reducedMotion||reducedMotion.matches?addTrapFocus():summaryElement.nextElementSibling.addEventListener("transitionend",addTrapFocus)},100)}openMenuDrawer(summaryElement){setTimeout(()=>{this.mainDetailsToggle.classList.add("menu-opening")}),summaryElement.setAttribute("aria-expanded",!0),trapFocus(this.mainDetailsToggle,summaryElement),document.body.classList.add(`overflow-hidden-${this.dataset.breakpoint}`)}closeMenuDrawer(event,elementToFocus=!1){event!==void 0&&(this.mainDetailsToggle.classList.remove("menu-opening"),this.mainDetailsToggle.querySelectorAll("details").forEach(details=>{details.removeAttribute("open"),details.classList.remove("menu-opening")}),this.mainDetailsToggle.querySelectorAll(".submenu-open").forEach(submenu=>{submenu.classList.remove("submenu-open")}),document.body.classList.remove(`overflow-hidden-${this.dataset.breakpoint}`),document.body.classList.remove("overflow-hidden-undefined"),removeTrapFocus(elementToFocus),this.closeAnimation(this.mainDetailsToggle))}onFocusOut(){setTimeout(()=>{this.mainDetailsToggle.hasAttribute("open")&&!this.mainDetailsToggle.contains(document.activeElement)&&this.closeMenuDrawer()})}onCloseButtonClick(event){const detailsElement=event.currentTarget.closest("details");this.closeSubmenu(detailsElement)}closeSubmenu(detailsElement){const parentMenuElement=detailsElement.closest(".submenu-open");parentMenuElement&&parentMenuElement.classList.remove("submenu-open"),detailsElement.classList.remove("menu-opening"),detailsElement.querySelector("summary").setAttribute("aria-expanded",!1),removeTrapFocus(detail
1sElement.querySelector("summary")),this.closeAnimation(detailsElement)}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detailsElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends MenuDrawer{constructor(){super()}onResize=()=>{this.header&&document.documentElement.style.setProperty("--header-bottom-position",`${parseInt(this.header.getBoundingClientRect().bottom-this.borderOffset)}px`),document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`)}}customElements.define("mobile-menu-nav",HeaderDrawer);class SliderComponent extends HTMLElement{constructor(){if(super(),this.classList.contains("slideshow")?this.slider=this:this.slider=this.querySelector('[id^="Slider-"]'),this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=!1,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.querySelector('button[name="previous"]'),this.nextButton=this.querySelector('button[name="next"]'),!this.slider)return;this.initPages(),new ResizeObserver(entries=>this.initPages()).observe(this.slider),this.slider.addEventListener("scroll",this.update.bind(this)),this.prevButton?.addEventListener("click",this.onButtonClick.bind(this)),this.nextButton?.addEventListener("click",this.onButtonClick.bind(this))}initPages(){this.sliderItemsToShow=Array.from(this.sliderItems).filter(element=>element.clientWidth>0),!(this.sliderItemsToShow.length<2)&&(this.sliderItemOffset=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft,this.slidesPerPage=Math.floor((this.slider.clientWidth-this.sliderItemsToShow[0].offsetLeft)/this.sliderItemOffset),this.totalPages=this.sliderItemsToShow.length-this.slidesPerPage+1,this.update())}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}update(){if(!this.slider)return;const previousPage=this.currentPage;this.currentPage=Math.round(this.slider.scrollLeft/this.sliderItemOffset)+1,this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.pageTotalElement.textContent=this.totalPages),this.currentPage!=previousPage&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),!this.enableSliderLooping&&(this.isSlideVisible(this.sliderItemsToShow[0])&&this.slider.scrollLeft===0?this.prevButton?.setAttribute("disabled","disabled"):this.prevButton?.removeAttribute("disabled"),this.isSlideVisible(this.sliderItemsToShow[this.sliderItemsToShow.length-1])?this.nextButton?.setAttribute("disabled","disabled"):this.nextButton?.removeAttribute("disabled"))}isSlideVisible(element,offset=0){const lastVisibleSlide=this.slider.clientWidth+this.slider.scrollLeft-offset;return element.offsetLeft+element.clientWidth<=lastVisibleSlide&&element.offsetLeft>=this.slider.scrollLeft}onButtonClick(event){event.preventDefault();const step=event.currentTarget.dataset.step||1;this.slideScrollPosition=event.currentTarget.name==="next"?this.slider.scrollLeft+step*this.sliderItemOffset:this.slider.scrollLeft-step*this.sliderItemOffset,this.slider.scrollTo({left:this.slideScrollPosition})}connectedCallback(){this.dataset.reset_scroll=="true"&&(this.slider.scrollLeft=0)}}customElements.define("slider-component",SliderComponent);class SlideshowComponent extends SliderComponent{constructor(){super(),this.sliderControlWrapper=this.querySelector(".slider-buttons"),this.enableSliderLooping=!0,this.sliderControlWrapper&&(this.sliderFirstItemNode=this.querySelector(".slideshow__slide"),this.sliderItemsToShow.length>0&&(this.currentPage=1),this.sliderControlLinksArray=Array.from(this.sliderControlWrapper.querySelectorAll(".slider-counter__link")),this.sliderControlLinksArray.forEach(link=>link.addEventListener("click",this.linkToSlide.bind(this))),this.slider.addEventListener("scroll",this.setSlideVisibility.bind(this)),this.setSlideVisibility(),this.getAttribute("data-autoplay")==="true"&&this.setAutoPlay())}setAutoPlay(){this.sliderAutoplayButton=this.querySelector(".slideshow__autoplay"),this.autoplaySpeed=this.slider.dataset.speed*1e3,this.sliderAutoplayButton?.addEventListener("click",this.autoPlayToggle.bind(this)),this.addEventListener("mouseover",this.focusInHandling.bind(this)),this.addEventListener("mouseleave",this.focusOutHandling.bind(this)),this.addEventListener("focusin",this.focusInHandling.bind(this)),this.addEventListener("focusout",this.focusOutHandling.bind(this)),this.play(),this.autoplayButtonIsSetToPlay=!0}onButtonClick(event){super.onButtonClick(event);const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;!isFirstSlide&&!isLastSlide||(isFirstSlide&&event.currentTarget.name==="previous"?this.slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*this.sliderItemsToShow.length:isLastSlide&&event.currentTarget.name==="next"&&(this.slideScrollPosition=0),this.slider.scrollTo({left:this.slideScrollPosition}))}
1update(){super.update(),this.sliderControlButtons=this.querySelectorAll(".slider-counter__link"),this.prevButton?.removeAttribute("disabled"),this.sliderControlButtons.length&&(this.sliderControlButtons.forEach(link=>{link.classList.remove("slider-counter__link--active"),link.removeAttribute("aria-current")}),this.sliderControlButtons[this.currentPage-1].classList.add("slider-counter__link--active"),this.sliderControlButtons[this.currentPage-1].setAttribute("aria-current",!0))}autoPlayToggle(){this.togglePlayButtonState(this.autoplayButtonIsSetToPlay),this.autoplayButtonIsSetToPlay?this.pause():this.play(),this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay}focusOutHandling(event){const focusedOnAutoplayButton=event.target===this.sliderAutoplayButton||this.sliderAutoplayButton?.contains(event.target);!this.autoplayButtonIsSetToPlay||focusedOnAutoplayButton||this.play()}focusInHandling(event){(event.target===this.sliderAutoplayButton||this.sliderAutoplayButton?.contains(event.target))&&this.autoplayButtonIsSetToPlay?this.play():this.autoplayButtonIsSetToPlay&&this.pause()}play(){this.slider.setAttribute("aria-live","off"),clearInterval(this.autoplay),this.autoplay=setInterval(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),clearInterval(this.autoplay)}togglePlayButtonState(pauseAutoplay){pauseAutoplay?(this.sliderAutoplayButton?.classList.add("slideshow__autoplay--paused"),this.sliderAutoplayButton?.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)):(this.sliderAutoplayButton?.classList.remove("slideshow__autoplay--paused"),this.sliderAutoplayButton?.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow))}autoRotateSlides(){const slideScrollPosition=this.currentPage===this.sliderItems.length?0:this.slider.scrollLeft+this.slider.querySelector(".slideshow__slide").clientWidth;this.slider.scrollTo({left:slideScrollPosition})}setSlideVisibility(){this.sliderItemsToShow.forEach((item,index)=>{const linkElements=item.querySelectorAll("a");index===this.currentPage-1?(linkElements.length&&linkElements.forEach(button=>{button.removeAttribute("tabindex")}),item.setAttribute("aria-hidden","false"),item.removeAttribute("tabindex")):(linkElements.length&&linkElements.forEach(button=>{button.setAttribute("tabindex","-1")}),item.setAttribute("aria-hidden","true"),item.setAttribute("tabindex","-1"))})}linkToSlide(event){event.preventDefault();const slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*(this.sliderControlLinksArray.indexOf(event.currentTarget)+1-this.currentPage);this.slider.scrollTo({left:slideScrollPosition})}}customElements.define("slideshow-component",SlideshowComponent);class ProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove();const cards=html.querySelectorAll(".grid__item");if(this.dataset.feature_card_enabled==="true"){const columns_desktop=parseInt(this.dataset.columns_desktop),cards_fit_desktop=cards.length<=columns_desktop,feature_wrap_el=document.querySelector(`#shopify-section-${this.dataset.section_id} .carousel__feature-wrap`);cards_fit_desktop&&feature_wrap_el.classList.add("carousel__feature-wrap--cards-fit-desktop")}const parent_section=document.getElementById(this.dataset.section_id),hide_recently_tab=this.dataset.hide_recently_tab==="true",product_handle=this.dataset.product_handle,product_handles_list=localStorage.getItem("shopify_recently_viewed"),no_recently_viewed=!product_handles_list||product_handles_list==""||product_handles_list==product_handle;if(cards)this.classList.add("product-recommendations--loaded");else if(hide_recently_tab||no_recently_viewed)parent_section&&parent_section.classList.add("hidden");else{const recommendations2=parent_section.querySelector("product-recommendations"),recently=parent_section.querySelector("recently-viewed"),recommendations_tab=parent_section.querySelector(".product-recommendations-tab"),recently_tab=parent_section.querySelector(".recently-viewed-tab");recommendations_tab.classList.add("hidden"),recently_tab.classList.add("hidden"),recommendations2.classList.remove("active"),recently.classList.add("active")}}).catch(e=>{console.error(e)}))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"0px 0px 400px 0px"}).observe(this)}}customElements.define("product-recommendations",ProductRecommendations);class UpsellProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");
1html.innerHTML=text;const recommendations=html.querySelector("upsell-product-recommendations");recommendations&&(recommendations.innerHTML.trim().length==0?fetch(this.dataset.fallbackurl).then(response=>response.text()).then(text2=>{html.innerHTML=text2;const recommendations2=html.querySelector("upsell-product-recommendations");this.innerHTML=recommendations2.innerHTML,!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")}):(this.innerHTML=recommendations.innerHTML,!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")))}).catch(e=>{console.error(e)})}}customElements.define("upsell-product-recommendations",UpsellProductRecommendations);class CrossellProductRecommendations extends HTMLElement{constructor(){super()}connectedCallback(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("crossell-product-recommendations");recommendations&&(recommendations.innerHTML.trim().length==0?fetch(this.dataset.fallbackurl).then(response=>response.text()).then(text2=>{html.innerHTML=text2;const recommendations2=html.querySelector("crossel-product-recommendations");this.innerHTML=recommendations2.innerHTML,!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")}):(this.innerHTML=recommendations.innerHTML,!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item")&&this.classList.add("product-recommendations--loaded")))}).catch(e=>{console.error(e)})}}customElements.define("crossell-product-recommendations",CrossellProductRecommendations);class ShopTheLook extends HTMLElement{constructor(){super()}connectedCallback(){fetch(this.dataset.url).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("shop-look");recommendations&&recommendations.innerHTML.trim().length&&(this.innerHTML=recommendations.innerHTML),!this.querySelector("slideshow-component")&&this.classList.contains("complementary-products")&&this.remove(),html.querySelector(".grid__item, .slider__slide")&&this.classList.add("shop-look--loaded");
1var shopLookGrid=this.querySelector(".shop-the-look-product-grid"),shopLookGridChildren=shopLookGrid?.querySelectorAll(".grid__item"),shopLookSlider=this.querySelector("shop-look ul.slider"),shopLookSliderChildren=shopLookSlider?.querySelectorAll(".grid__item.slider__slide");shopLookGridChildren?.length>0?this.closest(".shop-the-look-container")?.classList.remove("hidden"):this.closest(".shop-the-look-container")?.classList.add("hidden"),shopLookSliderChildren?.length>0||Shopify.designMode?this.closest(".carousel")?.classList.remove("hidden"):this.closest(".carousel")?.classList.add("hidden")}).catch(e=>{console.error(e)})}}customElements.define("shop-look",ShopTheLook);class RecentlyViewed extends HTMLElement{constructor(){super()}config={maxToShow:parseInt(this.dataset.max_cards_to_output),minToShow:1,howManyToStoreInMemory:parseInt(this.dataset.max_cards_to_output),numberProducts:0,onComplete:null};productHandleQueue=[];cookie={name:"shopify_recently_viewed",write:function(recentlyViewed){localStorage.setItem(this.name,recentlyViewed.join(","))},read:function(){let recentlyViewed=[],cookieValue=localStorage.getItem(this.name);return cookieValue&&(recentlyViewed=cookieValue.split(",")),recentlyViewed},destroy:function(){localStorage.removeItem(this.name)},remove:function(productHandle){let recentlyViewed=this.read(),position=recentlyViewed.indexOf(productHandle);position!==-1&&(recentlyViewed.splice(position,1),this.write(recentlyViewed))}};finalize=()=>{const sliderComponent=this.querySelector("slider-component"),sliderUL=this.querySelector("slider-component ul.slider"),featureWrap=document.querySelector(`#shopify-section-${this.dataset.section_id}.carousel__feature-wrap`),max_cards_to_output=this.config.maxToShow,columns_desktop=parseInt(this.dataset.columns_desktop),columns_mobile=parseInt(this.dataset.columns_mobile);let cards_fit_desktop=sliderUL.children.length<=columns_desktop;const cards_fit_mobile=sliderUL.children.length<=columns_mobile;this.dataset.feature_card_enabled==="true"?cards_fit_desktop=sliderUL.children.length<columns_desktop:cards_fit_desktop=sliderUL.children.length<=columns_desktop,cards_fit_desktop?sliderComponent.classList.add("slider-component--cards-fit-desktop"):sliderComponent.classList.remove("slider-component--cards-fit-desktop"),cards_fit_mobile?sliderComponent.classList.add("slider-component--cards-fit-mobile"):sliderComponent.classList.remove("slider-component--cards-fit-mobile"),featureWrap&&(cards_fit_desktop?featureWrap.classList.add("carousel__feature-wrap--cards-fit-desktop"):featureWrap.classList.remove("carousel__feature-wrap--cards-fit-desktop")),this.dataset.full_width==="true"?(sliderComponent.classList.add("slider-component-full-width"),sliderComponent.classList.remove("page-width"),sliderUL.prepend(li),sliderUL.appendChild(li_2)):(sliderComponent.classList.remove("slider-component-full-width"),sliderComponent.classList.add("page-width")),sliderUL.scrollLeft=0,this.classList.add("recently-viewed--loaded")};getRecentProducts=async()=>{let searchRecentlyUrl,productHandle;window.location.pathname.indexOf("/products/")!==-1&&(productHandle=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1],this.productHandleQueue=this.productHandleQueue.filter(handle=>productHandle!==handle)),!(this.productHandleQueue.length<this.config.minToShow)&&(this.config.numberProducts=this.productHandleQueue.length,this.productHandleQueue.length=this.config.maxToShow,searchRecentlyUrl="/search?view=ua_recently-viewed&q="+this.productHandleQueue.toString(),await fetch(searchRecentlyUrl).then(response=>response.text()).then(html=>{document.querySelector(`#shopify-section-${this.dataset.sectionid} recently-viewed`).innerHTML=html,this.finalize()}).catch(err=>{console.warn("Something went wrong.",err)}))};recordRecentlyViewed=values=>{let vals=values||{},recentlyViewed=this.cookie.read(),productHandle,position;this.config={...this.config,...vals},window.location.pathname.indexOf("/products/")!==-1&&(productHandle=window.location.pathname.match(/\/products\/([a-z0-9\-]+)/)[1],position=recentlyViewed.indexOf(productHandle),position===-1?(recentlyViewed.unshift(productHandle),recentlyViewed=recentlyViewed.splice(0,this.config.howManyToStoreInMemory)):(recentlyViewed.splice(position,1),recentlyViewed.unshift(productHandle)),this.cookie.write(recentlyViewed))};showRecentlyViewed=parameters=>{const recently_is_only_tab=this.dataset.recently_is_only_tab==="true",sectionid=this.dataset.section_id,carousel=document.querySelector(".carousel.section-"+sectionid),product_handles_list=localStorage.getItem("shopify_recently_viewed");if(this.dataset.on_product_page==="true"){const product_handle=this.dataset.product_handle,no_recently_viewed=!product_handles_list||product_handles_list==""||product_handles_list==product_handle;if(recently_is_only_tab&&no_recently_viewed&&carousel)carousel.classList.add("hidden");else{const no_recently_viewed2=!product_handles_list||product_handles_list=="";recently_is_only_tab&&no_recently_viewed2&&carousel&&carousel.classList.add("hidden")}}let params=parameters||{};if(this.config={...this.config,...params},this.productHandleQueue=this.cookie.read(),this.productHandleQueue===null||this.productHandleQueue===void 0)return!1;this.config.maxToShow=Math.min(this.productHandleQueue.length,this.config.maxToShow),this.config.maxToShow&&this.getRecentProducts().then()};connectedCallback(){this.showRecentlyViewed(),this.recordRecentlyViewed()}}customElements.define("recently-viewed",RecentlyViewed);class YotpoAggregatedStars extends HTMLElement{constructor(){super(),this.yotpoAppKey=this.dataset.yotpoAppKey,this.yotpoAppKey&&(this.loadStars(),this.productReviewsTotal=0,this.options={method:"GET",headers:{accept:"application/json","Content-Type":"application/json"}})}getCacheKey(){return`yotpo_stars_${this.yotpoAppKey}`}getCachedData(){try{const cached=localStorage.getItem(this.getCacheKey());if(!cached)return null;const data=JSON.parse(cached),now=new Date().getTime(),oneDay=1440*60*1e3;return now-data.timestamp<oneDay?data.response:(localStorage.removeItem(this.getCacheKey()),null)}catch(error){return console.error("Error reading cache:",error),null}}setCachedData(response){try{const cacheData={response,timestamp:new Date().getTime()};localStorage.setItem(this.getCacheKey(),JSON.stringify(cacheData))}catch(error){console.error("Error setting cache:",error)}}updateDOM(response){let average_score=response.bottomline.average_score,total_reviews=response.bottomline.total_reviews;this.querySelectorAll(".js-yotpo-average-score").forEach(el=>{el.innerHTML!==String(average_score)&&(el.innerHTML=average_score)}),this.querySelectorAll(".js-yotpo-total-reviews").forEach(el=>{el.innerHTML!==String(total_reviews)&&(el.innerHTML=total_reviews)});let bottomLineText=this.querySelector(".yotpo-bottom-line-text");bottomLineText&&bottomLineText.style.opacity!=="1"&&(bottomLineText.style.opacity=1)}async combineProductReviews(){try{const data=await(await fetch(`https://api-cdn.yotpo.com/v1/apps/${this.yotpoAppKey}/bottom_lines?count=100`,this.options)).json();if(data.response&&data.response.bottomlines){const allresponses=data.response.bottomlines;let productReviewsTotal=0;
1return allresponses.forEach(line=>{productReviewsTotal+=line.total_reviews}),productReviewsTotal}return 0}catch(err){return console.error("Error fetching Yotpo product data:",err),0}}async loadStars(){const cachedResponse=this.getCachedData();if(cachedResponse){this.updateDOM(cachedResponse);return}try{const data=await(await fetch(`https://api.yotpo.com/products/${this.yotpoAppKey}/yotpo_site_reviews/bottomline`,this.options)).json();if(data.response&&data.response.bottomline){const productReviewsTotal=await this.combineProductReviews();data.response.bottomline.total_reviews+=productReviewsTotal,this.setCachedData(data.response),this.updateDOM(data.response)}}catch(err){console.error("Error fetching Yotpo data:",err);try{const fallbackCache=localStorage.getItem(this.getCacheKey());if(fallbackCache){const cachedData=JSON.parse(fallbackCache);this.updateDOM(cachedData.response)}}catch{console.error("No fallback data available")}}}}customElements.get("yotpo-aggregated-stars")||customElements.define("yotpo-aggregated-stars",YotpoAggregatedStars); 2//# sourceMappingURL=/cdn/shop/t/119/assets/global-components.js.map?v=75537963998267100571779892438
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.