PageSourceSearch

https://www.splits59.com/cdn/shop/t/354/assets/global.js?v=119015586124354528841786457067

js splits59.com collected 2026-09-26 02:59:45 UTC 56,640 bytes, 2 lines download raw bytes

1function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe"))}function setShortViewportHeight(){const value=document.documentElement.clientHeight,currentValue=getComputedStyle(document.documentElement).getPropertyValue("--viewport-height");value!=currentValue&&document.documentElement.style.setProperty("--viewport-height",`${value}px`)}function setHeaderBottomPosition(){const header=document.querySelector(".header-wrapper");if(!header)return;const value=header.getBoundingClientRect().bottom,currentValue=getComputedStyle(document.documentElement).getPropertyValue("--header-bottom-position");value&&value!=currentValue&&document.documentElement.style.setProperty("--header-bottom-position",`${value}px`)}function setCustomPropertiesOnLoad(){setShortViewportHeight(),setHeaderBottomPosition()}function setCustomPropertiesOnScroll(){setShortViewportHeight(),setHeaderBottomPosition()}function setCustomPropertiesOnResize(){setShortViewportHeight(),setHeaderBottomPosition()}window.addEventListener("load",setCustomPropertiesOnLoad,!1),window.addEventListener("scroll",debounce(setCustomPropertiesOnScroll,300),!1),window.addEventListener("resize",debounce(setCustomPropertiesOnResize,300),!1);const validateEmail=email=>String(email).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);class SectionId{static#separator="__";static parseId(qualifiedSectionId){return qualifiedSectionId.split(SectionId.#separator)[0]}static parseSectionName(qualifiedSectionId){return qualifiedSectionId.split(SectionId.#separator)[1]}static getIdForSection(sectionId,sectionName){return`${sectionId}${SectionId.#separator}${sectionName}`}}class HTMLUpdateUtility{static viewTransition(oldNode,newContent,preProcessCallbacks=[],postProcessCallbacks=[]){preProcessCallbacks?.forEach(callback=>callback(newContent));const newNodeWrapper=document.createElement("div");HTMLUpdateUtility.setInnerHTML(newNodeWrapper,newContent.outerHTML);const newNode=newNodeWrapper.firstChild,uniqueKey=Date.now();oldNode.querySelectorAll("[id], [form]").forEach(element=>{element.id&&(element.id=`${element.id}-${uniqueKey}`),element.form&&element.setAttribute("form",`${element.form.getAttribute("id")}-${uniqueKey}`)}),oldNode.parentNode.insertBefore(newNode,oldNode),oldNode.style.display="none",postProcessCallbacks?.forEach(callback=>callback(newNode)),setTimeout(()=>oldNode.remove(),500)}static setInnerHTML(element,html){element.innerHTML=html,element.querySelectorAll("script").forEach(oldScriptTag=>{const newScriptTag=document.createElement("script");Array.from(oldScriptTag.attributes).forEach(attribute=>{newScriptTag.setAttribute(attribute.name,attribute.value)}),newScriptTag.appendChild(document.createTextNode(oldScriptTag.innerHTML)),oldScriptTag.parentNode.replaceChild(newScriptTag,oldScriptTag)})}}document.querySelectorAll('[id^="Details-"] summary').forEach(summary=>{summary.setAttribute("role","button"),summary.setAttribute("aria-expanded",summary.parentNode.hasAttribute("open")),summary.nextElementSibling.getAttribute("id")&&summary.setAttribute("aria-controls",summary.nextElementSibling.id),summary.addEventListener("click",event=>{event.currentTarget.setAttribute("aria-expanded",!event.currentTarget.closest("details").hasAttribute("open"))}),!summary.closest("header-drawer, menu-drawer")&&summary.parentElement.addEventListener("keyup",onKeyUpEscape)});const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event=>{event.target!==container&&event.target!==last&&event.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event){event.code.toUpperCase()==="TAB"&&(event.target===last&&!event.shiftKey&&(event.preventDefault(),first.focus()),(event.target===container||event.target===first)&&event.shiftKey&&(event.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),elementToFocus.focus(),elementToFocus.tagName==="INPUT"&&["search","text","email","url"].includes(elementToFocus.type)&&elementToFocus.value&&elementToFocus.setSelectionRange(0,elementToFocus.value.length)}try{document.querySelector(":focus-visible")}catch{focusVisiblePolyfill()}function focusVisiblePolyfill(){const navKeys=["ARROWUP","ARROWDOWN","ARROWLEFT","ARROWRIGHT","TAB","ENTER","SPACE","ESCAPE","HOME","END","PAGEUP","PAGEDOWN"];let currentFocusedElement=null,mouseClick=null;window.addEventListener("keydown",event=>{navKeys.includes(event.code.toUpperCase())&&(mouseClick=!1)}),window.addEventListener("mousedown",event=>{mouseClick=!0}),window.addEventListener("focus",()=>{currentFocusedElement&&currentFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(){document.querySelectorAll(".js-youtube").forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),document.querySelectorAll(".js-vimeo").forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),document.querySelectorAll("video").forEach(video=>video.pause()),document.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}function onKeyUpEscape(event){if(event.code.toUpperCase()!=="ESCAPE")return;const openDetailsElement=event.target.closest("details[open]");if(!openDetailsElement)return;const summaryElement=openDetailsElement.querySelector("summary");openDetailsElement.removeAttribute("open"),summaryElement.setAttribute("aria-expanded",!1),summaryElement.focus()}class QuantityInput extends HTMLElement{constructor(){super(),this.input=this.querySelector("input"),this.changeEvent=ne
1w Event("change",{bubbles:!0}),this.input.addEventListener("change",this.onInputChange.bind(this)),this.querySelectorAll("button").forEach(button=>button.addEventListener("click",this.onButtonClick.bind(this)))}quantityUpdateUnsubscriber=void 0;connectedCallback(){this.validateQtyRules(),this.quantityUpdateUnsubscriber=subscribe(PUB_SUB_EVENTS.quantityUpdate,this.validateQtyRules.bind(this))}disconnectedCallback(){this.quantityUpdateUnsubscriber&&this.quantityUpdateUnsubscriber()}onInputChange(event){this.validateQtyRules()}onButtonClick(event){event.preventDefault();const previousValue=this.input.value;event.target.name==="plus"?parseInt(this.input.dataset.min)>parseInt(this.input.step)&&this.input.value==0?this.input.value=this.input.dataset.min:this.input.stepUp():this.input.stepDown(),previousValue!==this.input.value&&this.input.dispatchEvent(this.changeEvent),this.input.dataset.min===previousValue&&event.target.name==="minus"&&(this.input.value=parseInt(this.input.min))}validateQtyRules(){const value=parseInt(this.input.value);if(this.input.min&&this.querySelector(".quantity__button[name='minus']").classList.toggle("disabled",parseInt(value)<=parseInt(this.input.min)),this.input.max){const max=parseInt(this.input.max);this.querySelector(".quantity__button[name='plus']").classList.toggle("disabled",value>=max)}}}customElements.define("quantity-input",QuantityInput);function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}function throttle(fn,delay){let lastCall=0;return function(...args){const now=new Date().getTime();if(!(now-lastCall<delay))return lastCall=now,fn(...args)}}function fetchConfig(type="json"){return{method:"POST",headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}typeof window.Shopify>"u"&&(window.Shopify={}),Shopify.bind=function(fn,scope){return function(){return fn.apply(scope,arguments)}},Shopify.setSelectorByValue=function(selector,value){for(var i=0,count=selector.options.length;i<count;i++){var option=selector.options[i];if(value==option.value||value==option.innerHTML)return selector.selectedIndex=i,i}},Shopify.addListener=function(target,eventName,callback){target.addEventListener?target.addEventListener(eventName,callback,!1):target.attachEvent("on"+eventName,callback)},Shopify.postLink=function(path,options){options=options||{};var method=options.method||"post",params=options.parameters||{},form=document.createElement("form");form.setAttribute("method",method),form.setAttribute("action",path);for(var key in params){var hiddenField=document.createElement("input");hiddenField.setAttribute("type","hidden"),hiddenField.setAttribute("name",key),hiddenField.setAttribute("value",params[key]),form.appendChild(hiddenField)}document.body.appendChild(form),form.submit(),document.body.removeChild(form)},Shopify.CountryProvinceSelector=function(country_domid,province_domid,options){this.countryEl=document.getElementById(country_domid),this.provinceEl=document.getElementById(province_domid),this.provinceContainer=document.getElementById(options.hideElement||province_domid),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var value=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,value),this.countryHandler()},initProvince:function(){var value=this.provinceEl.getAttribute("data-default");value&&this.provinceEl.options.length>0&&Shopify.setSelectorByValue(this.provinceEl,value)},countryHandler:function(e){var opt=this.countryEl.options[this.countryEl.selectedIndex],raw=opt.getAttribute("data-provinces"),provinces=JSON.parse(raw);if(this.clearOptions(this.provinceEl),provinces&&provinces.length==0)this.provinceContainer.style.display="none";else{for(var i=0;i<provinces.length;i++){var opt=document.createElement("option");opt.value=provinces[i][0],opt.innerHTML=provinces[i][1],this.provinceEl.appendChild(opt)}this.provinceContainer.style.display=""}},clearOptions:function(selector){for(;selector.firstChild;)selector.removeChild(selector.firstChild)},setOptions:function(selector,values){for(var i=0,count=values.length;i<values.length;i++){var opt=document.createElement("option");opt.value=values[i],opt.innerHTML=values[i],selector.appendChild(opt)}}};class 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.bindDrawerEvents()}bindDrawerEvents(){this.querySelector(".menu-drawer__top span")?.addEventListener("click",this.closeMenuDrawer.bind()),document.getElementById("MenuDrawer-Overlay")?.addEventListener("click",this.closeMenuDrawer.bind()),this.querySelectorAll(".menu-drawer__navigation button")?.forEach(button=>button.addEventListener("click",this.onSubMenuClick.bind(this))),this.querySelectorAll("summary")?.forEach(summary=>summary.addEventListener("click",this.onSummaryClick.bind(this))),this.querySelectorAll(".mobile-facets__open-label")?.forEach(btn=>btn.addEventListener("click",this.onFacetSummaryClick.bind(this))),this.querySelectorAll("button:not(.localization-selector):not(.country-selector__close-button):not(.country-filter__reset-button)")?.forEach(button=>button.addEventListener("click",this.onCloseButtonClick.bind(this)))}onSubMenuClick(event){let tab=event.target;this.querySelectorAll(".menu-drawer__menu-item").forEach(item=>item.classList.remove("menu-drawer__menu-item--active")),tab.classList.add("menu-drawer__menu-item--active"),this.querySelectorAll(".menu-drawer__inner-submenu").forEach(item=>item.classList.remove("menu-subdrawer--active")),this.querySelector(`.menu-drawer__inner-submenu[data-submenu="${tab.id}"]`).classList.add("menu-subdrawer--active")}onKeyUp(event){event.target.classList.contains("menu-drawer-close")&&(event.code.toUpperCase()=="ESCAPE"||event.code.toUpperCase()=="ENTE
1R")&&this.closeMenuDrawer()}onFacetSummaryClick(event){console.log("opening facet",event.target)}onSummaryClick(event){var facetStatus=event.target.closest(".mobile-facets__disclosure").getAttribute("open");(event.target.classList.contains("mobile-facets__open")||event.target.classList.contains("mobile-facets__open-label")&&facetStatus==null)&&(document.body.classList.contains("overflow-hidden")?document.body.classList.remove("overflow-hidden"):document.body.classList.add("overflow-hidden")),event.target.classList.contains("mobile-facets__open-wrapper")&&facetStatus!=null&&document.body.classList.remove("overflow-hidden")}openMenuDrawer(summaryElement){}closeMenuDrawer(){console.log("closeeeee"),document.body.classList.contains("menu-open")&&(document.body.classList.remove("menu-open"),document.body.classList.remove("overflow-hidden"))}onFocusOut(){}onCloseButtonClick(event){}closeSubmenu(detailsElement){}closeAnimation(detailsElement){}}customElements.define("menu-drawer",MenuDrawer);class HeaderDrawer extends HTMLElement{constructor(){super(),this.bindEvents(),this.addEventListener("keyup",this.onKeyUp.bind(this))}bindEvents(){this.querySelector(".header__icon span").addEventListener("click",this.openMenuDrawer.bind())}openMenuDrawer(){console.log("openmenudrawer"),document.body.classList.add("menu-open"),document.body.classList.add("overflow-hidden"),console.log("openmenudrawer")}onKeyUp(event){event.code.toUpperCase()=="ENTER"&&(this.openMenuDrawer(),document.querySelector(".menu-drawer__top span").focus())}closeMenuDrawer(event,elementToFocus){console.log("closeMenuDrawer")}onResize=()=>{}}customElements.define("header-drawer",HeaderDrawer);class ModalDialog extends HTMLElement{constructor(){super(),this.querySelector('[id^="ModalClose-"]').addEventListener("click",this.hide.bind(this,!1)),this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.hide()}),this.classList.contains("media-modal")?this.addEventListener("pointerup",event=>{event.pointerType==="mouse"&&!event.target.closest("deferred-media, product-model")&&this.hide()}):this.addEventListener("click",event=>{event.target===this&&this.hide()})}connectedCallback(){this.moved||(this.moved=!0,document.body.appendChild(this))}show(opener){this.openedBy=opener;const popup=this.querySelector(".template-popup");document.body.classList.add("overflow-hidden"),this.setAttribute("open",""),popup&&popup.loadContent(),trapFocus(this,this.querySelector('[role="dialog"]')),window.pauseAllMedia()}hide(){document.body.classList.remove("overflow-hidden"),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia()}}customElements.define("modal-dialog",ModalDialog);class ProductSlider extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper")}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:1.5,spaceBetween:8,loop:!1,speed:400,autoHeight:!0,grabCursor:!0,observe:!0,mousewheel:{forceToAxis:!0},breakpoints:{990:{slidesPerView:3.001,spaceBetween:12}},navigation:{prevEl:this.slider.querySelector(".swiper-nav-button--prev"),nextEl:this.slider.querySelector(".swiper-nav-button--next"),disabledClass:"hidden"},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0}})}}customElements.define("product-slider",ProductSlider);class recommendationSlider extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper")}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:1.5,spaceBetween:6,loop:!1,speed:400,autoHeight:!0,grabCursor:!0,observe:!0,mousewheel:{forceToAxis:!0},breakpoints:{990:{slidesPerView:5,spaceBetween:6}},navigation:{prevEl:this.slider.querySelector(".swiper-nav-button--prev"),nextEl:this.slider.querySelector(".swiper-nav-button--next"),disabledClass:"hidden"},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0}})}}customElements.define("recommendation-slider",recommendationSlider);class HomePageSlider extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper"),this.sliderAutoplayEnable=this.slider.dataset.sliderAutoplayEnable==="true",this.sliderAutoplayInterval=this.slider.dataset.sliderAutoplayInterval}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:1,spaceBetween:0,loop:!0,speed:400,grabCursor:!0,autoplay:this.sliderAutoplayEnable?{delay:this.sliderAutoplayInterval,pauseOnMouseEnter:!1,disableOnInteraction:!0}:!1,mousewheel:{forceToAxis:!0},navigation:{prevEl:this.slider.querySelector(".swiper-nav-button--prev"),nextEl:this.slider.querySelector(".swiper-nav-button--next"),disabledClass:"hidden"},pagination:{el:this.slider.querySelector(".swiper-pagination"),type:"custom",renderCustom:function(swiper,current,total){return current+" | "+total}},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0},on:{slideChangeTransitionStart:function(swiper,speed,internal){const activeSlideControlColor=swiper.slides[swiper.activeIndex].dataset.sliderControlColor;swiper.el.style.setProperty("--swiper-theme-color",activeSlideControlColor),swiper.el.style.setProperty("--swiper-navigation-color",activeSlideControlColor)}}})}}customElements.define("homepage-slider",HomePageSlider);class globalSlider extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper"),this.sliderAutoplayEnable=this.slider.dataset.sliderAutoplayEnable==="true",this.sliderAutoplayInterval=this.slider.dataset.sliderAutoplayInterval}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:1,spaceBetween:0,loop:!0,speed:400,grabCursor:!0,autoplay:this.sliderAutoplayEnable?{delay:this.sliderAutoplayInterval,pauseOnMouseEnter:!1,disableOnInteraction:!0}:!1,mousewheel:{forceToAxis:!0},pagination:{el:this.slider.querySelector(".swiper-pagination"),type:"custom",renderCustom:function(swiper,current,total){return current+" | "+total}},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0},on:{slideChangeTransitionStart:function(swiper,speed,internal){const activeSlideControlColor=swiper.slides[swiper.activeIndex].dataset.sliderControlColor;swiper.el.style.setProperty("--swiper-theme-color",activeSlideControlColor),swiper.el.style.setProperty("--swiper-navigation-color",activeSlideControlColor)}}})}}customElements.define("global-slider",globalSlider);class AboutPageSlider extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper"),this.sliderAutoplayEnable=this.slider.dataset.sliderAutoplayEnable==="true",this.sliderAutoplayInterval=this.slider.dataset.sliderAutoplayInterval}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:1,spaceBetween:0,loop:!0,speed:400,grabCursor:!0,autoplay:this.sliderAutoplayEnable?{delay:this.sliderAutoplayInterval,pauseOnMouseEnter:!1,disableOnInteraction:!0}:!1,mousewheel:{forceToAxis:!0},navigation:{prevEl:this.slider.querySelector(".swiper-nav-button--prev"),nextEl:this.slider.querySelector(".swiper-nav-button--next"),disabledClass:"hidden"},pagination:{el:this.slider.querySelector(".swiper-pagination"),type:"custom",renderCustom:function(swiper,current,total){return current+" | "+total}},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0},on:{slideChangeTransitionStart:function(swiper,speed,internal){const activeSlideControlColor=swiper.slides[swiper.activeIndex].dataset.sliderControlColor;swiper.el.style.setProperty("--swiper-theme-color",activeSlideControlColor),swiper.el.style.setProperty("--swiper-navigation-color",activeSlideControlColor)}}})}}customElements.define("aboutpage-slider",AboutPageSlider);class ContentBlocks extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper"),this.slidesPerView=this.slider.dataset.slidesPerView,this.slidesPerViewMobile=this.slider.dataset.slidesPerViewMobile}connectedCallback(){this.swiper=new Swiper(this.slider,{slidesPerView:this.slidesPerViewMobile,spaceBetween:14,speed:400,watchSlidesProgress:!0,grabCursor:!0,mousewheel:{forceToAxis:!0},scrollbar:{el:".cb-slider-scrollbar",draggable:!0},breakpoints:{992:{slidesPerView:this.slidesPerView,spaceBetween:23,navigation:{prevEl:this.slider.querySelector(".swiper-nav-button--prev"),nextEl:this.slider.querySelector(".swiper-nav-button--next"),disabledClass:"hidden"}}}})}}customElements.define("content-blocks",ContentBlocks);class BulkModal extends HTMLElement{constructor(){super()}connectedCallback(){const handleIntersection=(entries,observer)=>{if(entries[0].isIntersecting&&(observer.unobserve(this),this.innerHTML.trim()==="")){const productUrl=this.dataset.url.split("?")[0];fetch(`${productUrl}?section_id=bulk-quick-order-list`).then(response=>response.text()).then(responseText=>{const sourceQty=new DOMParser().parseFromString(responseText,"text/html").querySelector(".quick-order-list-container").parentNode;this.innerHTML=sourceQty.innerHTML}).catch(e=>{console.error(e)})}};new IntersectionObserver(handleIntersection.bind(this)).observe(document.querySelector(`#QuickBulk-${this.dataset.productId}-${this.dataset.sectionId}`))}}customElements.define("bulk-modal",BulkModal);class ModalOpener extends HTMLElement{constructor(){super();const button=this.querySelector("button");button&&button.addEventListener("click",()=>{const modal=document.querySelector(this.getAttribute("data-modal"));modal&&modal.show(button)})}}customElements.define("modal-opener",ModalOpener);class DeferredMedia extends HTMLElement{constructor(){super();const poster=this.querySelector('[id^="Deferred-Poster-"]');poster&&poster.addEventListener("click",this.loadContent.bind(this))}loadContent(focus=!0){if(window.pauseAllMedia(),!this.getAttribute("loaded")){const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0)),this.setAttribute("loaded",!0);const deferredElement=this.appendChild(content.querySelector("video, model-viewer, iframe"));focus&&deferredElement.focus(),deferredElement.nodeName=="VIDEO"&&deferredElement.getAttribute("autoplay")&&deferredElement.play()}}}customElements.define("deferred-media",DeferredMedia);class SliderComponent extends HTMLElement{constructor(){if(super(),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||!this.nextButton)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||!this.nextButton)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.setSlidePosition(this.slideScrollPosition)}setSlidePosition(position){this.slider.scrollTo({left:position})}}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.slider.querySelector(".slideshow__slide"),this.sliderItemsToShow.length>0&&(this.currentPage=1),this.announcementBarSlider=this.querySelector(".announcement-bar-slider"),this.announcerBarAnimationDelay=this.announcementBarSlider?250:0,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.announcementBarSlider&&(this.announcementBarArrowButtonWasClicked=!1,this.reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)"),this.reducedMotion.addEventListener("change",()=>{this.slider.getAttribute("data-autoplay")==="true"&&this.setAutoPlay()}
1),[this.prevButton,this.nextButton].forEach(button=>{button.addEventListener("click",()=>{this.announcementBarArrowButtonWasClicked=!0},{once:!0})})),this.slider.getAttribute("data-autoplay")==="true"&&this.setAutoPlay())}setAutoPlay(){this.autoplaySpeed=this.slider.dataset.speed*1e3,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.querySelector(".slideshow__autoplay")?(this.sliderAutoplayButton=this.querySelector(".slideshow__autoplay"),this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.autoplayButtonIsSetToPlay=!0,this.play()):this.reducedMotion.matches||this.announcementBarArrowButtonWasClicked?this.pause():this.play()}onButtonClick(event){super.onButtonClick(event),this.wasClicked=!0;const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;if(!isFirstSlide&&!isLastSlide){this.applyAnimationToAnnouncementBar(event.currentTarget.name);return}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.setSlidePosition(this.slideScrollPosition),this.applyAnimationToAnnouncementBar(event.currentTarget.name)}setSlidePosition(position){this.setPositionTimeout&&clearTimeout(this.setPositionTimeout),this.setPositionTimeout=setTimeout(()=>{this.slider.scrollTo({left:position})},this.announcerBarAnimationDelay)}update(){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){if(this.sliderAutoplayButton){const focusedOnAutoplayButton=event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target);if(!this.autoplayButtonIsSetToPlay||focusedOnAutoplayButton)return;this.play()}else!this.reducedMotion.matches&&!this.announcementBarArrowButtonWasClicked&&this.play()}focusInHandling(event){this.sliderAutoplayButton?(event.target===this.sliderAutoplayButton||this.sliderAutoplayButton.contains(event.target))&&this.autoplayButtonIsSetToPlay?this.play():this.autoplayButtonIsSetToPlay&&this.pause():this.announcementBarSlider.contains(event.target)&&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.sliderItemOffset;this.setSlidePosition(slideScrollPosition),this.applyAnimationToAnnouncementBar()}setSlideVisibility(event){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.forEac
1h(button=>{button.setAttribute("tabindex","-1")}),item.setAttribute("aria-hidden","true"),item.setAttribute("tabindex","-1"))}),this.wasClicked=!1}applyAnimationToAnnouncementBar(button="next"){if(!this.announcementBarSlider)return;const itemsCount=this.sliderItems.length,increment=button==="next"?1:-1,currentIndex=this.currentPage-1;let nextIndex=(currentIndex+increment)%itemsCount;nextIndex=nextIndex===-1?itemsCount-1:nextIndex;const nextSlide=this.sliderItems[nextIndex],currentSlide=this.sliderItems[currentIndex],animationClassIn="announcement-bar-slider--fade-in",animationClassOut="announcement-bar-slider--fade-out",isFirstSlide=currentIndex===0,isLastSlide=currentIndex===itemsCount-1,direction=button==="next"&&!isLastSlide||button==="previous"&&isFirstSlide?"next":"previous";currentSlide.classList.add(`${animationClassOut}-${direction}`),nextSlide.classList.add(`${animationClassIn}-${direction}`),setTimeout(()=>{currentSlide.classList.remove(`${animationClassOut}-${direction}`),nextSlide.classList.remove(`${animationClassIn}-${direction}`)},this.announcerBarAnimationDelay*2)}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 UpsellCart extends HTMLElement{constructor(){super(),this.slider=this.querySelector(".swiper")}connectedCallback(){this.slider=this.querySelector(".swiper");var slides_per_view=1,space_between=8;this.closest(".main-cart-upsell")&&(slides_per_view=2.7,space_between=23),this.swiper=new Swiper(this.slider,{slidesPerView:1,spaceBetween:8,breakpoints:{990:{slidesPerView:slides_per_view,spaceBetween:space_between}},loop:!1,speed:400,autoHeight:!0,grabCursor:!0,mousewheel:{forceToAxis:!0},scrollbar:{el:".upsell-cart-scrollbar",draggable:!0},keyboard:{enabled:!0,onlyInViewport:!0,pageUpDown:!0}})}}customElements.define("upsell-cart",UpsellCart);class VariantSelectsLite extends HTMLElement{constructor(){super()}connectedCallback(){this.querySelectorAll("label").forEach(label=>{label.addEventListener("keydown",event=>{event.code.toUpperCase()==="ENTER"&&label.click()})}),this.addEventListener("change",event=>{let productData=JSON.parse(this.querySelector("[data-product-variant]").innerHTML),selectedOptionValues=Array.from(this.querySelectorAll("select option[selected], fieldset input:checked")).map(({dataset})=>dataset.optionValueName),selectedVariant=productData.variants.find(variant=>variant.options.every((option,index)=>option===selectedOptionValues[index]))?.id;this.closest("product-card-lite").querySelector("product-form input.product-variant-id").value=selectedVariant})}}customElements.define("variant-selects-lite",VariantSelectsLite);class VariantSelects extends HTMLElement{constructor(){super()}connectedCallback(){this.addEventListener("change",event=>{const target=this.getInputForEventTarget(event.target);this.updateSelectionMetadata(event),publish(PUB_SUB_EVENTS.optionValueSelectionChange,{data:{event,target,selectedOptionValues:this.selectedOptionValues}}),setTimeout(()=>{yotpoWidgetsContainer.initWidgets()},3e3)}),this.querySelectorAll("label").forEach(label=>{label.addEventListener("mouseenter",event=>{let colorName=event.currentTarget.dataset.color;colorName&&this.querySelector("#selected-Color")&&(this.querySelector("#selected-Color").classList.add("hidden"),this.querySelector("#selected-color-hover").classList.remove("hidden"),this.querySelector("#selected-color-hover").innerHTML=" "+colorName)}),label.addEventListener("mouseleave",event=>{this.querySelector("#selected-Color")&&(this.querySelector("#selected-Color").classList.remove("hidden"),this.querySelector("#selected-color-hover").classList.add("hidden"))})})}updateSelectionMetadata({target}){const{value,tagName}=target;if(tagName==="SELECT"&&target.selectedOptions.length){Array.from(target.options).find(option=>option.getAttribute("selected")).removeAttribute("selected"),target.selectedOptions[0].setAttribute("selected","selected");const swatchValue=target.selectedOptions[0].dataset.optionSwatchValue,selectedDropdownSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value] > .swatch");if(!selectedDropdownSwatchValue)return;swatchValue?(selectedDropdownSwatchValue.style.setProperty("--swatch--background",swatchValue),selectedDropdownSwatchValue.classList.remove("swatch--unavailable")):(selectedDropdownSwatchValue.style.setProperty("--swatch--background","unset"),selectedDropdownSwatchValue.classList.add("swatch--unavailable")),selectedDropdownSwatchValue.style.setProperty("--swatch-focal-point",target.selectedOptions[0].dataset.optionSwatchFocalPoint||"unset")}else if(tagName==="INPUT"&&target.type==="radio"){const selectedSwatchValue=target.closest(".product-form__input").querySelector("[data-selected-value]");selectedSwatchValue&&(selectedSwatchValue.innerHTML=value)}}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}get selectedOptionValues(){return Array.from(this.querySelectorAll("select option[selected], fieldset input:checked")).map(({dataset})=>dataset.optionValueId)}}customElements.define("variant-selects",VariantSelects);class ProductCard extends HTMLElement{constructor(){super(),this.swatches=this.querySelector(".product-card-swatches"),this.swatches.querySelectorAll("label").forEach(label=>{this.swatches.querySelectorAll("label").length!==1&&(label.addEventListener("click",()=>{console.log("label clicked");let productUrl=label.previousSibling.getAttribute("data-product-url");fetch(window.Shopify.routes.root+`products/${productUrl}?section_id=pc-content`).then(response=>response.text()).then(responseText=>{const html=new DOMParser().parseFromString(responseText,"text/html");console.log("html",html.querySelector(".pc-image")),this.querySelector(".product-card-image-wrap").innerHTML=html.querySelector(".pc-image").innerHTML,this.querySelector(".product-card-price").innerHTML=html.querySelector(".pc-price").innerHTML,this.querySelector(".quick-add.no-js-hidden").innerHTML=html.querySelector(".pc-quick-add").innerHTML,this.swatches.querySelectorAll("input").forEach(input=>{input.removeAttribute("checked")}),label.previousSibling.setAttribute("checked",!0)}).catch(e=>{console.error(e)})}),label.previousElementSibling.addEventListener("keydown",event=>{event.code.toUpperCase()==="ENTER"&&label.click()}))})}connectedCallback(){}}customElements.define("product-card",ProductCard);class AccountIcon extends HTMLElement{constructor(){super(),this.icon=this.querySelector(".icon")}connectedCallback(){document.addEventListener("storefront:signincompleted",this.handleStorefrontSignInCompleted.bind(this))}handleStorefrontSignInCompleted(event){event?.detail?.avatar&&this.icon?.replaceWith(event.detail.avatar.cloneNode())}}customElements.define("account-icon",AccountIcon);class BulkAdd extends HTMLElement{constructor(){super(),this.queue=[],this.requestStarted=!1,this.ids=[]}startQueue(id,quantity){this.queue.push({id,quantity});const interval=setInterval(()=>{this.queue.length>0?this.requestStarted||this.sendRequest(this.queue):clearInterval(interval)},250)}sendRequest(queue){this.requestStarted=!0;const items={};queue.forEach(queueItem=>{items[parseInt(queueItem.id)]=queueItem.quantity}),this.queue=this.queue.filter(queueElement=>!queue.includes(queueElement)),(this.closest("quick-order-list")||this.closest("quick-add-bul
1k")).updateMultipleQty(items)}resetQuantityInput(id){const input=this.querySelector(`#Quantity-${id}`);input.value=input.getAttribute("value"),this.isEnterPressed=!1}setValidity(event,index,message){event.target.setCustomValidity(message),event.target.reportValidity(),this.resetQuantityInput(index),event.target.select()}validateQuantity(event){const inputValue=parseInt(event.target.value),index=event.target.dataset.index;inputValue<event.target.dataset.min?this.setValidity(event,index,window.quickOrderListStrings.min_error.replace("[min]",event.target.dataset.min)):inputValue>parseInt(event.target.max)?this.setValidity(event,index,window.quickOrderListStrings.max_error.replace("[max]",event.target.max)):inputValue%parseInt(event.target.step)!=0?this.setValidity(event,index,window.quickOrderListStrings.step_error.replace("[step]",event.target.step)):(event.target.setCustomValidity(""),event.target.reportValidity(),this.startQueue(index,inputValue))}getSectionsUrl(){return window.pageNumber?`${window.location.pathname}?page=${window.pageNumber}`:`${window.location.pathname}`}getSectionInnerHTML(html,selector){return new DOMParser().parseFromString(html,"text/html").querySelector(selector).innerHTML}}customElements.get("bulk-add")||customElements.define("bulk-add",BulkAdd);function getPositionXY(element){return element.getBoundingClientRect()}function updateSearchResultsPosition(){const searchModal=document.querySelector(".search-modal"),searchHeader=document.querySelector(".header__search"),mediaQuery=window.matchMedia("(max-width: 991px)"),{left,bottom,width}=getPositionXY(searchHeader),rect=searchHeader.getBoundingClientRect(),rightOffset=window.innerWidth-rect.right;mediaQuery.matches||(Object.assign(searchModal.style,{left:`${left}px`,top:`${bottom}px`,width:`${width}px`}),searchModal.style.setProperty("--right-position",`${rightOffset}px`))}window.addEventListener("resize",updateSearchResultsPosition,!0),window.addEventListener("DOMContentLoaded",updateSearchResultsPosition);const product_grid_switcher=document.querySelectorAll(".product-grid-switcher a"),collection_product_grid=document.getElementById("ProductGridContainer");product_grid_switcher.forEach(switcher=>{switcher.addEventListener("click",event=>{event.preventDefault();const grid=switcher.getAttribute("data-grid");switcher.classList.add("active"),grid==="grid-3"?(collection_product_grid.classList.add("grid-3-view"),document.querySelector('.product-grid-switcher a[data-grid="grid-2"]').classList.remove("active")):(collection_product_grid.classList.remove("grid-3-view"),document.querySelector('.product-grid-switcher a[data-grid="grid-3"]').classList.remove("active"))})});class sizeGuideModal extends HTMLElement{constructor(){super(),this.handleTrapKeydown=this.handleTrapKeydown.bind(this),this.handleTrapFocusIn=this.handleTrapFocusIn.bind(this)}connectedCallback(){this.drawerInner=this.querySelector(".sizeguide-drawer-inner"),this.closeButton=this.querySelector(".sizeguide-close"),this.liveRegion=this.querySelector("#SizeGuide-LiveRegion"),this.overlay=document.querySelector(".sizeguide-overlay"),this.classList.contains("active")||(this.setAttribute("aria-hidden","true"),this.setAttribute("inert","")),this.closeButton&&this.closeButton.addEventListener("click",()=>this.close()),this.addEventListener("click",event=>this.outsideClick(event)),this.addEventListener("keyup",event=>{event.code.toUpperCase()==="ESCAPE"&&this.close()}),this.overlay&&this.overlay.addEventListener("click",()=>this.close())}getDrawerFocusableElements(){return getFocusableElements(this.drawerInner)}enableFocusTrap(){document.addEventListener("keydown",this.handleTrapKeydown,!0),document.addEventListener("focusin",this.handleTrapFocusIn,!0)}disableFocusTrap(){document.removeEventListener("keydown",this.handleTrapKeydown,!0),document.removeEventListener("focusin",this.handleTrapFocusIn,!0)}handleTrapKeydown(event){if(!this.classList.contains("active")||event.code.toUpperCase()!=="TAB")return;const focusable=this.getDrawerFocusableElements();if(!focusable.length)return;
1const first=focusable[0],last=focusable[focusable.length-1];event.target===last&&!event.shiftKey?(event.preventDefault(),first.focus()):event.target===first&&event.shiftKey&&(event.preventDefault(),last.focus())}handleTrapFocusIn(event){if(!this.classList.contains("active")||this.drawerInner.contains(event.target))return;const focusable=this.getDrawerFocusableElements();focusable.length&&focusable[0].focus()}open(opener){opener?this.openedBy=opener:document.activeElement instanceof HTMLElement&&(this.openedBy=document.activeElement),this.setAttribute("aria-hidden","false"),this.removeAttribute("inert"),this.classList.add("active"),document.body.classList.add("sizeguide-active"),this.enableFocusTrap(),this.openedBy&&this.openedBy.setAttribute("aria-expanded","true"),this.announceState("open");const focusElement=this.closeButton||this.drawerInner,applyFocus=()=>{this.classList.contains("active")&&focusElement.focus()};window.matchMedia("(prefers-reduced-motion: reduce)").matches?applyFocus():(this.addEventListener("transitionend",applyFocus,{once:!0}),setTimeout(applyFocus,100))}close(){this.classList.remove("active"),document.body.classList.remove("sizeguide-active"),this.disableFocusTrap(),this.announceState("closed"),this.openedBy&&(this.openedBy.setAttribute("aria-expanded","false"),this.openedBy.focus()),this.setAttribute("aria-hidden","true"),this.setAttribute("inert",""),this.openedBy=null}announceState(state){if(!this.liveRegion)return;const message=state==="open"?this.dataset.openedText:this.dataset.closedText;message&&(this.liveRegion.setAttribute("aria-hidden","false"),this.liveRegion.textContent=message,setTimeout(()=>{this.liveRegion.setAttribute("aria-hidden","true")},1e3))}getState(){return this.classList.contains("active")?"open":"closed"}outsideClick(event){event.target.classList.contains("sizeguide-drawer")&&this.close()}}customElements.define("size-guide-modal",sizeGuideModal);function openSizeGuide(opener){const modal=document.querySelector("size-guide-modal.sizeguide-drawer");modal&&modal.open(opener)}function removeQuote(button){button.closest(".product__media-wrapper").querySelector(".product__shop-the-look")?.classList.remove("hide"),button.closest(".swiper-slide").classList.remove("slide-has-quote"),button.closest(".product-gallery-quote").remove()}class quickAddSlider extends HTMLElement{constructor(){super()}connectedCallback(){this.swiper=new Swiper(this,{slidesPerView:"auto",spaceBetween:2,freeMode:!0,grabCursor:!0,mousewheel:{forceToAxis:!0}})}}customElements.define("quick-add-slider",quickAddSlider);class ProductRecommendations extends HTMLElement{observer=void 0;constructor(){super()}connectedCallback(){this.initializeRecommendations(this.dataset.productId),console.log("Split product recommendations connected")}initializeRecommendations(productId){this.observer?.unobserve(this),this.observer=new IntersectionObserver((entries,observer)=>{console.log("Split observer callback"),entries[0].isIntersecting&&(observer.unobserve(this),this.loadRecommendations(productId))},{rootMargin:"0px 0px 400px 0px"}),this.observer.observe(this)}loadRecommendations(productId){console.log("Split load recommendations"),fetch(`${this.dataset.url}&product_id=${productId}&section_id=${this.dataset.sectionId}`).then(response=>response.text()).then(text=>{const html=document.createElement("div");html.innerHTML=text;const recommendations=html.querySelector("product-recommendations");recommendations?.innerHTML.trim().length&&(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("product-recommendations",ProductRecommendations);function handleBannerAndChat(banner,chat){let bannerObserver;const toggleChat=()=>{const hasNoStyle=!banner.getAttribute("style"),isVisible=window.getComputedStyle(banner).display!=="none";hasNoStyle||isVisible?chat.setAttribute("style","display: none !important;"):(chat.setAttribute("style","display: block !important;"),bannerObserver&&bannerObserver.disconnect())};toggleChat(),bannerObserver=new MutationObserver(toggleChat),bannerObserver.observe(banner,{attributes:!0,attributeFilter:["style"]})}function waitForElements(){const banner=document.querySelector("#shopify-pc__banner"),chat=document.querySelector("#gladlyChat_container");return banner&&chat?(handleBannerAndChat(banner,chat),!0):!1}if(!waitForElements()){const docObserver=new MutationObserver(()=>{waitForElements()&&docObserver.disconnect()});docObserver.observe(document.body,{childList:!0,subtree:!0})}function refreshCart(){const url=`/cart?view=drawer&v=${Date.now()}`;
1fetch(url,{method:"GET",cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}}).then(response=>{if(!response.ok)throw new Error("Network response was not ok");return response.text()}).then(cartHtml=>{const newDocument=new DOMParser().parseFromString(cartHtml,"text/html"),cartDrawer=document.querySelector("cart-drawer"),newCartContent=newDocument.querySelector("cart-drawer"),cartCount=document.querySelector("#cart-icon-bubble"),newCartCount=newDocument.querySelector("#cart-icon-bubble");if(cartDrawer&&newCartContent){const oldInner=cartDrawer.querySelector(".drawer__inner"),newInner=newCartContent.querySelector(".drawer__inner");oldInner&&newInner&&(oldInner.innerHTML=newInner.innerHTML),cartDrawer.className=newCartContent.className}cartCount&&newCartCount&&(cartCount.innerHTML=newCartCount.innerHTML)}).catch(error=>{console.error("Error refreshing cart drawer:",error)}).finally(()=>{console.log("Cart Drawer refresh attempt complete.")})}window.isAtcStickyManual=window.isAtcStickyManual||!1,document.addEventListener("click",e=>{e.target.closest('button[type="submit"], .product-form__submit')&&(disableStickyFocus=!0)});let disableStickyFocus=!1;const initStickyATC=()=>{const atcSection=document.querySelector(".product__info-wrapper"),targetToWatch=document.querySelector(".atc-placeholder-wrapper");!targetToWatch||!atcSection||(window.atcObserver&&window.atcObserver.disconnect(),window.atcObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{const isPastSectionBottom=entry.boundingClientRect.bottom<0;!entry.isIntersecting&&isPastSectionBottom?(atcSection.classList.add("is-sticky","visible"),window.isAtcStickyManual=!0,atcSection.setAttribute("tabindex","-1"),atcSection.setAttribute("aria-live","polite"),!disableStickyFocus&&document.activeElement&&document.activeElement.tagName!=="INPUT"&&setTimeout(()=>{(atcSection.querySelector('variant-selects input[type="radio"]:checked')||atcSection.querySelector("form")||atcSection).focus()},100)):(atcSection.classList.remove("is-sticky","visible","expand-sizes","added-to-cart"),window.isAtcStickyManual=!1,disableStickyFocus=!1,atcSection.removeAttribute("tabindex"))})},{threshold:0}),window.atcObserver.observe(targetToWatch))},initFooterObserver=()=>{const footer=document.querySelector("footer-inner"),atcSection=document.querySelector(".product__info-wrapper");!footer||!atcSection||(window.footerObserver&&window.footerObserver.disconnect(),window.footerObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting?atcSection.classList.add("atc-hide-footer"):atcSection.classList.remove("atc-hide-footer")})},{threshold:0,rootMargin:"0px"}),window.footerObserver.observe(footer))},observeProductChanges=()=>{const targetNode=document.body;if(!targetNode)return;let debounceTimer;const observer=new MutationObserver(mutations=>{clearTimeout(debounceTimer),debounceTimer=setTimeout(()=>{document.querySelector(".product__info-wrapper")&&(initStickyATC(),typeof syncProductHeight=="function"&&syncProductHeight())},100)}),config={childList:!0,subtree:!0};observer.observe(targetNode,config)};document.readyState==="complete"||document.readyState==="interactive"?(initStickyATC(),observeProductChanges()):document.addEventListener("DOMContentLoaded",()=>{initStickyATC(),observeProductChanges()}),document.addEventListener("shopify:section:load",()=>{initStickyATC(),observeProductChanges()}),window.addEventListener("popstate",()=>{setTimeout(initStickyATC,200)});let heightObserver=null,lastKnownGoodHeight=1518;const syncProductHeight=()=>{const wrapper=document.querySelector(".atc-placeholder-wrapper"),productSection=document.querySelector(".product.page-width--large");if(!wrapper||!productSection)return;const update=()=>{if(window.scrollY>10)return;const currentHeight=productSection.offsetHeight,offset=!!document.querySelector("#usi_recommendations")?0:178;currentHeight>400&&(lastKnownGoodHeight=currentHeight+offset,wrapper.style.setProperty("--atc-placeholder-height",`${lastKnownGoodHeight}px`))};
1heightObserver&&heightObserver.disconnect(),heightObserver=new ResizeObserver(()=>{window.scrollY<=10&&requestAnimationFrame(update)}),heightObserver.observe(productSection),update()};window.addEventListener("scroll",()=>{window.scrollY>10&&heightObserver?(heightObserver.disconnect(),heightObserver=null):window.scrollY<=10&&!heightObserver&&syncProductHeight()},{passive:!0}),window.addEventListener("load",syncProductHeight),document.addEventListener("shopify:section:load",syncProductHeight),document.addEventListener("click",e=>{if(e.target.closest("#selectASize")){console.log("#selectASize clicked");const atcSection=document.querySelector(".product__info-wrapper");document.querySelector("variant-selects")&&atcSection&&atcSection.classList.add("expand-sizes")}});class hteSlider extends HTMLElement{constructor(){super()}connectedCallback(){const prev_btn=this.closest(".hte-inner").querySelector(".hte-left"),next_btn=this.closest(".hte-inner").querySelector(".hte-right");this.swiper=new Swiper(this,{slidesPerView:1.45,spaceBetween:8,mousewheel:{forceToAxis:!0},freeMode:!0,breakpoints:{768:{slidesPerView:2.5,spaceBetween:20},991:{slidesPerView:3,spaceBetween:20},1200:{slidesPerView:4,spaceBetween:20},1440:{slidesPerView:5,spaceBetween:20}},navigation:{prevEl:prev_btn,nextEl:next_btn}})}}customElements.define("hte-slider",hteSlider);class ltSlider extends HTMLElement{constructor(){super()}connectedCallback(){const prev_btn=this.closest(".loyalty-tiers-inner").querySelector(".lt-left"),next_btn=this.closest(".loyalty-tiers-inner").querySelector(".lt-right");let ready=!1;this.swiper=new Swiper(this,{slidesPerView:1.18,spaceBetween:15,mousewheel:{forceToAxis:!0},breakpoints:{768:{slidesPerView:2,spaceBetween:20},991:{slidesPerView:2.5,spaceBetween:20},1440:{slidesPerView:3,spaceBetween:20}},navigation:{prevEl:prev_btn,nextEl:next_btn},on:{init:()=>{setTimeout(()=>{ready=!0},1e3)},slideChange:()=>{if(!ready)return;const activeIndex=this.swiper.activeIndex,activeItem=this.swiper.slides[activeIndex].querySelector(".lt-item");if(activeItem){this.toggleItemCard(activeItem);const item_bottom_height=activeItem.querySelector(".lt-content-bottom").scrollHeight;activeItem.style.setProperty("--bottom-height",activeItem.classList.contains("active")?item_bottom_height+"px":"0px")}}}}),this.swiper.slides.forEach((slide,index)=>{slide.addEventListener("click",()=>{const swiperWrapper=this.swiper.wrapperEl,slideRect=slide.getBoundingClientRect(),wrapperRect=swiperWrapper.getBoundingClientRect();slideRect.left>=wrapperRect.left&&slideRect.right<=wrapperRect.right||this.swiper.slideTo(index)})}),this.items=this.querySelectorAll(".lt-item");const presetActive=this.querySelector(".lt-item.active");if(presetActive){const activeIndex=Array.from(this.items).indexOf(presetActive);if(activeIndex>-1&&this.swiper){this.swiper.slideTo(activeIndex),presetActive.classList.add("active");const bottom=presetActive.querySelector(".lt-content-bottom");presetActive.style.setProperty("--bottom-height",bottom.scrollHeight+"px")}}if(window.innerWidth<=768&&!presetActive){this.items[0].classList.add("active");const item_bottom_height=this.items[0].querySelector(".lt-content-bottom").scrollHeight;this.items[0].style.setProperty("--bottom-height",item_bottom_height+"px")}window.innerWidth>=769&&this.items.forEach(item=>{item.addEventListener("click",()=>{this.toggleItemCard(item);const item_bottom_height=item.querySelector(".lt-content-bottom").scrollHeight;item.style.setProperty("--bottom-height",item.classList.contains("active")?item_bottom_height+"px":"0px")})})}toggleItemCard(item){this.items.forEach(otherItem=>{otherItem!==item&&(otherItem.classList.remove("active"),otherItem.style.setProperty("--bottom-height","0px"))}),item.classList.toggle("active"),window.innerWidth>=769&&document.addEventListener("click",event=>{item.contains(event.target)||(item.classList.remove("active"),item.style.setProperty("--bottom-height","0px"))})}}customElements.define("lt-slider",ltSlider);class rewardsTabs extends HTMLElement{constructor(){super()}connectedCallback(){this.tabButtons=this.querySelectorAll(".lrt-tab-button"),this.tabContents=this.querySelectorAll(".lrt-tab-content"),this.tabButtons.forEach(button=>{button.addEventListener("click",()=>this.openTab(button))}),this.tabButtons.length>0&&this.openTab(this.tabButtons[0])}openTab(button){const targetId=button.getAttribute("data-tab");
1this.tabContents.forEach(content=>{content.classList.remove("active")}),this.tabButtons.forEach(btn=>{btn.classList.remove("active")});const targetContent=this.querySelector(`#${targetId}`);targetContent&&targetContent.classList.add("active");const targetControls=this.querySelector(`[data-controls='${targetId}']`);targetControls&&targetControls.classList.add("active"),button.classList.add("active")}}customElements.define("rewards-tabs",rewardsTabs),document.addEventListener("focusin",()=>{const modal=document.querySelector(".search-modal.open");modal&&setTimeout(()=>{const active=document.activeElement;modal.contains(active)||(modal.classList.remove("open"),document.body.classList.remove("search-modal-open"),document.querySelector(".header__icon--account")?.focus())},0)});
2//# sourceMappingURL=/cdn/shop/t/354/assets/global.js.map?v=119015586124354528841786457067

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.