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 initEventSummary(wrapper){wrapper.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")&&summary.parentElement.addEventListener("keyup",onKeyUpEscape)})}initEventSummary(document);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()}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&¤tFocusedElement.classList.remove("focused"),!mouseClick&&(currentFocusedElement=document.activeElement,currentFocusedElement.classList.add("focused"))},!0)}function pauseAllMedia(wrapper=document,includeProductModel=!0,excludeIgnoreVideos=!0){wrapper.querySelectorAll(`.js-youtube${excludeIgnoreVideos?":not(.ignore-global-pause)":""}`).forEach(video=>{video.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),wrapper.querySelectorAll(`.js-vimeo${excludeIgnoreVideos?":not(.ignore-global-pause)":""}`).forEach(video=>{video.contentWindow.postMessage('{"method":"pause"}',"*")}),wrapper.querySelectorAll(`video${excludeIgnoreVideos?":not(.video--background)":""}`).forEach(video=>video.pause()),includeProductModel&&wrapper.querySelectorAll("product-model").forEach(model=>{model.modelViewerUI&&model.modelViewerUI.pause()})}function updateProductMediaStatus(wrapper){wrapper.querySelectorAll(".product__media img").forEach(e=>{e.complete?addLoadedImageStatus(e):e.onload=()=>{addLoadedImageStatus(e)}})}function addLoadedImageStatus(image){const parentElement=image.parentElement;parentElement.classList.contains("loaded")||(parentElement.classList.add("loaded"),parentElement.nextElementSibling&&setTimeout(()=>parentElement.nextElementSibling.remove(),500))}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||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()}
1function loadColorSwatches(){window.loadedBackgroundColorSwatches=!0,fetch(window.Shopify.routes.root+"?section_id=background-color-swatches").then(res=>res.text()).then(html=>{document.body.appendChild(getDomHtmlFromText(html,"style"))})}function debounce(fn,wait,immediate=!1){let timeout;return(...args)=>{const context=this,callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout(()=>{timeout=null,immediate||fn.apply(context,args)},wait),callNow&&fn.apply(context,args)}}function throttle(fn,wait){let timeout=null,lastArgs=null,lastTime=0;return(...args)=>{const now=Date.now(),remaining=wait-(now-lastTime);lastArgs=args,remaining<=0?(clearTimeout(timeout),timeout=null,lastTime=now,fn.apply(this,args)):timeout||(timeout=setTimeout(()=>{lastTime=Date.now(),timeout=null,fn.apply(this,lastArgs)},remaining))}}function fetchConfig(type="json",method="POST"){return{method,headers:{"Content-Type":"application/json",Accept:`application/${type}`}}}function parseHtml(text){return new DOMParser().parseFromString(text,"text/html")}function getDomHtmlFromText(text,selector){return parseHtml(text).querySelector(selector)}function getInnerHtmlFromText(text,selector){return getDomHtmlFromText(text,selector).innerHTML}function closeDetailsInAnimation(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(detail
1sElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}function loadPhotoswipeLib(implementationCode){if(window.photoswipeUrls.loaded){const waitPhotoswipeLoaded=setInterval(()=>{typeof PhotoSwipeLightbox=="function"&&(clearInterval(waitPhotoswipeLoaded),implementationCode())},typeof PhotoSwipeLightbox=="function"?0:1e3);return}window.photoswipeUrls.loaded=!0;var scriptTag=document.createElement("script");scriptTag.src=window.photoswipeUrls.lib,scriptTag.onload=implementationCode,scriptTag.onreadystatechange=implementationCode,document.body.appendChild(scriptTag)}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.removeEventListener=function(target,eventName,callback){target.removeEventListener?target.removeEventListener(eventName,callback,!1):target.detachEvent&&target.detachEvent("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)}}},Shopify.formatMoney=function(t,e){function n(t2,e2){return t2===void 0?e2:t2}function o(t2,e2,o2,i2){if(e2=n(e2,2),o2=n(o2,","),i2=n(i2,"."),isNaN(t2)||t2==null)return 0;var r2=(t2=(t2/100).toFixed(e2)).split(".");return r2[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+o2)+(r2[1]?i2+r2[1]:"")}typeof t=="string"&&(t=t.replace(".",""));var i="",r=/\{\{\s*(\w+)\s*\}\}/,a=e||moneyFormat;switch(a.match(r)[1]){case"amount":i=o(t,2);break;case"amount_no_decimals":i=o(t,0);break;case"amount_with_comma_separator":i=o(t,2,".",",");break;case"amount_with_space_separator":i=o(t,2," ",",");break;case"amount_with_period_and_space_separator":i=o(t,2," ",".");break;case"amount_no_decimals_with_comma_separator":i=o(t,0,".",",");break;case"amount_no_decimals_with_space_separator":i=o(t,0," ");break;case"amount_with_apostrophe_separator":i=o(t,2,"'",".")}return a.replace(r,i)},Shopify.showPrice=function(price,noConvert=!1){return noConvert?Shopify.formatMoney(price):Shopify.formatMoney(price*Shopify.currency.rate)};class HTMLUpdateUtility{static viewTransition(oldNode,newContent,preProcessCallbacks=[],postProcessCallbacks=[],scrollY=null){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=>
1{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)),scrollY&&window.scrollTo(0,scrollY),setTimeout(()=>oldNode.remove(),500)}static setInnerHTML(element,html){element.innerHTML=html,HTMLUpdateUtility.reinjectsScripts(element)}static reinjectsScripts(element){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)})}}class DrawerFixed extends HTMLElement{constructor(){super(),this.addEventListener("keyup",evt=>evt.code==="Escape"&&this.close(evt)),this.stickyHeader=document.querySelector("sticky-header")}open(triggeredBy){triggeredBy&&this.setActiveElement(triggeredBy),setTimeout(()=>{this.classList.add("animate","active")}),this.addEventListener("transitionend",()=>{const containerToTrapFocusOn=this.classList.contains("is-empty")?this.querySelector(".drawer__inner-empty"):this.classList.contains("drawer--cart")?document.getElementById("CartDrawer"):document.getElementById("QuickAddDrawer"),focusElement=this.querySelector(".drawer__inner")||this.querySelector(".drawer__close");trapFocus(containerToTrapFocusOn,focusElement)},{once:!0}),document.body.classList.add("open-drawer-fixed")}getSectionInnerHTML(html,selector=".shopify-section"){return getInnerHtmlFromText(html,selector)}getSectionDOM(html,selector=".shopify-section"){return getDomHtmlFromText(html,selector)}setActiveElement(element){this.activeElement=element}close(evt){this.querySelector(".drawer__inner").addEventListener("transitionend",()=>{removeTrapFocus(this.activeElement),document.body.classList.remove("open-drawer-fixed"),this.classList.remove("start-closing","closing"),document.body.dispatchEvent(new CustomEvent("drawerClosed"))},{once:!0}),this.classList.add("closing","start-closing"),this.classList.remove("active")}}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.removeAttribute("hidden"),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(){this.classList.add("closing"),setTimeout(()=>{document.body.classList.remove("overflow-hidden"),document.body.dispatchEvent(new CustomEvent("modalClosed")),this.removeAttribute("open"),removeTrapFocus(this.openedBy),window.pauseAllMedia(),this.classList.remove("closing")},600)}}customElements.define("modal-dialog",ModalDialog);class ModalOpener extends HTMLElement{constructor(){super();const button=this.querySelector("button");button&&button.addEventListener("click",()=>{const modal=document.querySelector(this.dataset.modal);modal&&modal.show(button)})}}customElements.define("modal-opener",ModalOpener);class SliderComponent extends HTMLElement{constructor(){super()}connectedCallback(){this.init()}init(){this.slider=this.querySelector('[id^="Slider-"]'),this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.enableSliderLooping=this.dataset.loop,this.currentPageElement=this.querySelector(".slider-counter--current"),this.pageTotalElement=this.querySelector(".slider-counter--total"),this.prevButton=this.dataset.outsidePrevButtonId!=null?this.closest('[id^="shopify-section"]').querySelector("#"+CSS.escape(`${this.dataset.outsidePrevButtonId}`)):this.querySelector('button[name="previous"]'),this.nextButton=this.dataset.outsideNextButtonId!=null?this.closest('[id^="shopify-section"]').querySelector("#"+CSS.escape(`${this.dataset.outsideNextButtonId}`)):this.querySelector('button[name="next"]'),this.isAutoplay=this.slider.dataset.autoplay==="true",this.autoplayButtonQuerySelector=".slider__autoplay",this.autoPlayPausedClass="slider__autoplay--paused",this.sliderControlButtons=this.querySelectorAll(".slider-counter__link"),this.currentPage=1,this.slider&&(this.sliderFirstItemNode=this.slider.querySelector(".slider__slide"),!("ontouchstart"in window)&&window.matchMedia("(pointer: fine)").matches&&this.enableMouseDrag(),this.initPages(),this.nextButton&&(this.onButtonClickHandler=this.onButtonClick.bind(this),this.prevButton.addEventListener("click",this.onButtonClickHandler),this.nextButton.addEventListener("click",this.onButtonClickHandler)),this.isAutoplay&&this.setAutoPlay(),this.sliderControlButtons&&(this.sliderControlLinksArray=Array.from(this.sliderControlButtons),this.linkToSlideHandlers=[],this.sliderControlLinksArray.forEach((link,i)=>{const handler=this.linkToSlide.bind(this);this.linkToSlideHandlers[i]=handler,link.addEventListener("click",handler)})),this.onScrollHandler=this.handleScroll.bind(this),this.slider.addEventListener("scroll",this.onScrollHandler,{passive:!0}),this.ignoreResizeEvent||setTimeout(()=>{this.onResizeHandler=debounce(()=>this.handleResize(),500),window.addEventListener("resize",this.onResizeHandler,!0)},500))}disconnectedCallback(){this.prevButton&&this.onButtonClickHandler&&this.prevButton.removeEventListener("click",this.onButtonClickHandler),this.nextButton&&this.onButtonClickHandler&&this.nextButton.removeEventListener("click",this.onButtonClickHandler),this.sliderControlLinksArray&&this.linkToSlideHandlers&&this.sliderControlLinksArray.forEach((link,i)=>link.removeEventListener("click",this.linkToSlideHandlers[i])),!this.ignoreResizeEvent&&this.onResizeHandler&&window.removeEventListener("resize",this.onResizeHandler,!0),this.slider&&this.onScrollHandler&&this.slider.removeEventListener("scroll",this.onScrollHandler),this._listeners&&(this._listeners.forEac
1h(([el,evt,handler,opts])=>el.removeEventListener(evt,handler,opts)),this._listeners=[])}initPages(){if(this.sliderItemsToShow=Array.from(this.sliderItems).filter(el=>el.clientWidth>0),this.sliderItemsToShow.length<2){this.slidesPerPage=1,this.totalPages=this.sliderItemsToShow.length||1,this.currentPage=1,this.update();return}const dx=this.sliderItemsToShow[1].offsetLeft-this.sliderItemsToShow[0].offsetLeft;this.sliderItemOffset=Math.abs(dx)>.5?dx:this.slider.clientWidth,this.maxScrollLeft=Math.max(0,this.slider.scrollWidth-this.slider.clientWidth);const scrollMarginInlineStart=this.sliderFirstItemNode?parseFloat(getComputedStyle(this.sliderFirstItemNode).scrollMarginInlineStart):0;this.scrollMarginLeft=Number.isFinite(scrollMarginInlineStart)?scrollMarginInlineStart*(document.dir=="rtl"?-1:1):0;const perPageF=(this.slider.clientWidth-Math.abs(this.scrollMarginLeft))/Math.abs(this.sliderItemOffset);this.slidesPerPage=Math.max(1,Math.round(perPageF));const approxPages=Math.round((this.maxScrollLeft-this.scrollMarginLeft)/Math.abs(this.sliderItemOffset))+1;if(this.totalPages=Math.max(1,approxPages),this.sliderControlButtons.length){const limit=this.sliderItemsToShow.length-this.slidesPerPage;this.sliderControlButtons.forEach((link,i)=>link.classList.toggle("hidden",i>limit))}this.update()}resetPages(){this.sliderItems=this.querySelectorAll('[id^="Slide-"]'),this.initPages()}handleResize(event){event&&event.target!==window||this.initPages()}handleScroll(){this._scrollingRaf&&cancelAnimationFrame(this._scrollingRaf),this._scrollingRaf=requestAnimationFrame(()=>{this._scrollEndTimeout&&clearTimeout(this._scrollEndTimeout),this._scrollEndTimeout=setTimeout(()=>{this.updateFromScroll(!0)},80)})}_getPageFromScroll(){if(!this.slider||!this.sliderItemOffset)return this.currentPage||1;const margin=this.scrollMarginLeft||0,rawIndex=(this.slider.scrollLeft-margin)/this.sliderItemOffset;let page=Math.round(rawIndex)+1;const maxPages=this.totalPages||this.sliderItemsToShow?.length||1;return page<1&&(page=1),page>maxPages&&(page=maxPages),page}updateFromScroll(scrollEnded){!this.sliderItemOffset||!this.totalPages||!scrollEnded||this.update()}update(){if(this.isUpdating)return;const previousPage=this.currentPage;this.currentPage=this._getPageFromScroll(),this.currentPageElement&&this.pageTotalElement&&(this.currentPageElement.textContent=this.currentPage,this.pageTotalElement.textContent=this.totalPages),this.currentPage&&this.currentPage!=previousPage&&this.dispatchEvent(new CustomEvent("slideChanged",{detail:{currentPage:this.currentPage,currentElement:this.sliderItemsToShow[this.currentPage-1]}})),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)),this.isAutoplay&&this.autoplayButtonIsSetToPlay&&this.play(),this.updateNavButtons()}updateNavButtons(){if(this.enableSliderLooping)return;const EPSILON=2;if(this.prevButton&&this.sliderItemsToShow.length){const firstSlide=this.sliderItemsToShow[0];this.isSlideVisible(firstSlide)||Math.abs(this.slider.scrollLeft-(this.scrollMarginLeft||0))<=EPSILON?this.prevButton.setAttribute("disabled","disabled"):this.prevButton.removeAttribute("disabled")}if(this.nextButton&&this.sliderItemsToShow.length){const lastSlide=this.sliderItemsToShow[this.sliderItemsToShow.length-1];this.isSlideVisible(lastSlide)||this.slider.scrollLeft>=this.maxScrollLeft-EPSILON?this.nextButton.setAttribute("disabled","disabled"):this.nextButton.removeAttribute("disabled")}}isSlideVisible(element,offset=0){if(!element)return!1;if(document.dir==="rtl"){const sliderRect=this.slider.getBoundingClientRect(),elementRect=element.getBoundingClientRect(),visibleArea=sliderRect.width-offset;return elementRect.left>=sliderRect.left-1&&elementRect.right<=sliderRect.left+visibleArea+1}const firstSlide=this.sliderFirstItemNode||this.sliderItemsToShow?.[0],baseOffset=firstSlide?firstSlide.offsetLeft:0,elementLeft=element.offsetLeft-baseOffset,elementRight=elementLeft+element.clientWidth,viewportLeft=this.slider.scrollLeft,viewportRight=viewportLeft+(this.slider.clientWidth-offset);return elementLeft>=viewportLeft-1&&elementRight<=viewportRight+1}setAutoPlay(){this.sliderAutoplayButton=this.querySelector(this.autoplayButtonQuerySelector),this.autoplaySpeed=this.slider.dataset.speed*1e3,this.sliderAutoplayButton&&this.sliderAutoplayButton.addEventListener("click",this.autoPlayToggle.bind(this)),this.play(),this.autoplayButtonIsSetToPlay=!0}linkToSlide(event){event.preventDefault(),this.goToSlideByTarget(event.currentTarget)}goToSlideByTarget(target){this.goToSlideByIndex(this.sliderControlLinksArray.indexOf(target))}goToSlideByIndex(index){const slideScrollPosition=this.slider.scrollLeft+this.sliderItemOffset*(index+1-this.currentPage)+this.scrollMarginLeft;this.slider.scrollTo({left:slideScrollPosition})}
1autoPlayToggle(){this.autoplayButtonIsSetToPlay=!this.autoplayButtonIsSetToPlay,this.togglePlayButtonState(),this.autoplayButtonIsSetToPlay?this.play():this.pause()}play(){this.slider.setAttribute("aria-live","off"),clearTimeout(this.autoplay),this.autoplay=setTimeout(this.autoRotateSlides.bind(this),this.autoplaySpeed)}pause(){this.slider.setAttribute("aria-live","polite"),clearTimeout(this.autoplay)}togglePlayButtonState(){this.sliderAutoplayButton&&(this.autoplayButtonIsSetToPlay?(this.sliderAutoplayButton.classList.remove(this.autoPlayPausedClass),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.pauseSlideshow)):(this.sliderAutoplayButton.classList.add(this.autoPlayPausedClass),this.sliderAutoplayButton.setAttribute("aria-label",window.accessibilityStrings.playSlideshow)))}beforeUpdateAutoplay(){}autoRotateSlides(){this.beforeUpdateAutoplay();const slideScrollPosition=this.currentPage===this.totalPages?0:this.slider.scrollLeft+this.sliderItemOffset+this.scrollMarginLeft;this.slider.scrollTo({left:slideScrollPosition})}onButtonClick(event){event.preventDefault();const step=parseInt(event.currentTarget.dataset.step||"1",10)||1,sliderItemOffset=Number.isFinite(this.sliderItemOffset)?this.sliderItemOffset:this.slider.clientWidth,scrollMarginLeft=Number.isFinite(this.scrollMarginLeft)?this.scrollMarginLeft:0;if(this.slideScrollPosition=event.currentTarget.name==="next"?this.slider.scrollLeft+step*sliderItemOffset+scrollMarginLeft:this.slider.scrollLeft-step*sliderItemOffset-(this.currentPage>2?scrollMarginLeft:0),this.slider.scrollTo({left:this.slideScrollPosition}),this.enableSliderLooping){const isFirstSlide=this.currentPage===1,isLastSlide=this.currentPage===this.sliderItemsToShow.length;if(!isFirstSlide&&!isLastSlide)return;isFirstSlide&&event.currentTarget.name==="previous"?this.slideScrollPosition=this.slider.scrollLeft+this.sliderFirstItemNode.clientWidth*this.sliderItemsToShow.length+this.scrollMarginLeft:isLastSlide&&event.currentTarget.name==="next"&&(this.slideScrollPosition=0),this.slider.scrollTo({left:this.slideScrollPosition})}}enableMouseDrag(){this.slider.querySelectorAll("a, img").forEach(el=>{el.setAttribute("draggable","false")}),this.isDragging=!1,this.dragMoved=!1,this.startX=0,this.scrollStart=0,this._onDragStart=this.onDragStart.bind(this),this._onDragMove=this.onDragMove.bind(this),this._onDragEnd=this.onDragEnd.bind(this),this._onClickCapture=this.onClickCapture.bind(this),this._listeners=[[this.slider,"mousedown",this._onDragStart],[document,"mousemove",this._onDragMove],[document,"mouseup",this._onDragEnd],[this.slider,"click",this._onClickCapture,!0]],this._listeners.forEach(([el,evt,handler,opts])=>el.addEventListener(evt,handler,opts)),this.slider.querySelectorAll("a, img").forEach(el=>{el.setAttribute("draggable","false")})}onDragStart(e){e.button!==0||e.target.closest("product-model")||e.target.closest("model-viewer")||(this.isDragging=!0,this.dragMoved=!1,this.dragStartX=e.pageX,this.dragStartY=e.pageY,this.startX=e.pageX,this.scrollStart=this.slider.scrollLeft,this.slider.classList.add("is-dragging"))}onDragMove(e){if(!this.isDragging)return;const deltaX=e.pageX-this.startX,deltaY=e.pageY-this.dragStartY;(Math.abs(deltaX)>5||Math.abs(deltaY)>5)&&(this.dragMoved||(this.dragMoved=!0,this.slider.querySelectorAll("a").forEach(a=>a.style.pointerEvents="none")),e.preventDefault(),this.slider.scrollLeft=this.scrollStart-deltaX)}onDragEnd(e){if(!this.isDragging)return;if(this.isDragging=!1,this.slider.classList.remove("is-dragging"),this.slider.querySelectorAll("a").forEach(a=>a.style.pointerEvents=""),this.dragMoved){const activeElement=e.target;if(activeElement&&activeElement.tagName!=="A"){this.dragPreventClick=!0;const preventOnce=ev=>{this.dragPreventClick&&(ev.stopImmediatePropagation(),ev.preventDefault(),this.dragPreventClick=!1,this.slider.removeEventListener("click",preventOnce,!0))};this.slider.addEventListener("click",preventOnce,!0)}}if(!this.dragMoved)return;this.dragMoved=!1,this.slider.classList.add("slider--no-snap");const firstSlide=this.sliderItemsToShow[0]||this.slider.firstElementChild,slideWidth=this.sliderItemOffset||firstSlide?.clientWidth||0;if(!firstSlide||!slideWidth){this.slider.classList.remove("slider--no-snap");return}const sliderRect=this.slider.getBoundingClientRect();let currentIndex=0,maxVisible=-1;
1this.sliderItemsToShow.forEach((slide,idx)=>{const rect=slide.getBoundingClientRect(),visibleWidth=Math.min(rect.right,sliderRect.right)-Math.max(rect.left,sliderRect.left);visibleWidth>maxVisible&&(maxVisible=visibleWidth,currentIndex=idx)});const pointerDelta=e.pageX-this.dragStartX,threshold=slideWidth*.2,isRtl=document.dir==="rtl";let targetIndex=currentIndex;if(Math.abs(pointerDelta)>threshold){const dragToLeft=pointerDelta<0;targetIndex=currentIndex+(isRtl?dragToLeft?-1:1:dragToLeft?1:-1)}const maxIndex=this.sliderItemsToShow.length-1;targetIndex<0&&(targetIndex=0),targetIndex>maxIndex&&(targetIndex=maxIndex);const baseOffset=firstSlide.offsetLeft;let targetScrollLeft=this.sliderItemsToShow[targetIndex].offsetLeft-baseOffset;document.dir!="rtl"?(targetScrollLeft<0&&(targetScrollLeft=0),targetScrollLeft>this.maxScrollLeft&&(targetScrollLeft=this.maxScrollLeft)):(targetScrollLeft>0&&(targetScrollLeft=0),targetScrollLeft<this.maxScrollLeft*-1&&(targetScrollLeft=this.maxScrollLeft*-1)),this.animateScrollTo(targetScrollLeft,400,"easeOutCubic",()=>{requestAnimationFrame(()=>{this.slider.classList.remove("slider--no-snap")})})}animateScrollTo(target,duration=400,easing="easeOutCubic",onComplete){const start=this.slider.scrollLeft,distance=target-start,startTime=performance.now(),ease=t=>1-Math.pow(1-t,3),prevSnap=this.slider.style.scrollSnapType;this.slider.style.scrollSnapType="none";const step=now=>{const elapsed=now-startTime,progress=Math.min(elapsed/duration,1),eased=ease(progress);this.slider.scrollLeft=start+distance*eased,elapsed<duration?requestAnimationFrame(step):(this.slider.scrollLeft=target,requestAnimationFrame(()=>{this.slider.style.scrollSnapType=prevSnap||"",onComplete&&onComplete()}))};requestAnimationFrame(step)}onClickCapture(e){this.dragMoved&&(e.stopImmediatePropagation(),e.preventDefault())}_suspendUpdates(callback){this.isUpdating=!0;try{callback?.()}finally{requestAnimationFrame(()=>{delete this.isUpdating})}}}customElements.define("slider-component",SliderComponent);class VariantSelects extends HTMLElement{constructor(){super(),this.addEventListener("change",this.onVariantChange),this.sectionId=this.dataset.originalSection||this.dataset.section}onVariantChange(event){const target=this.getInputForEventTarget(event.target);this.publishChangeEvent(target)}getInputForEventTarget(target){return target.tagName==="SELECT"?target.selectedOptions[0]:target}get selectedOptionValues(){const valueIds=[];return this.querySelectorAll("select").forEach(select=>{valueIds.push(select.options[select.selectedIndex].dataset.optionValueId)}),valueIds}publishChangeEvent(target,recall=!1,customSelectedOptionValues=null){const params={sectionId:this.dataset.section,target,selectedOptionValues:customSelectedOptionValues||this.selectedOptionValues};recall&&(params.recallId=this.dataset.section),document.dispatchEvent(new CustomEvent("optionValueSelectionChange",{detail:params}))}autoCorrectAvailableVariant(newProductInfoNode){const newSelectedOptionValues=[];var findSelectedOptionValue,stopFinding=!1;newProductInfoNode.querySelectorAll(".product-form__input--variant-picker").forEach(fieldset=>{if(stopFinding==!1)if(fieldset.classList.contains("last"))findSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:not(:checked), option:not(.hidden):not([selected])'),findSelectedOptionValue||(findSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:checked, option:not(.hidden)[selected]')),newSelectedOptionValues.push(findSelectedOptionValue.dataset.optionValueId);else{const currentSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"]:checked, option:not(.hidden)[selected]');if(currentSelectedOptionValue)newSelectedOptionValues.push(currentSelectedOptionValue.dataset.optionValueId);else{const altCurrentSelectedOptionValue=fieldset.querySelector('li:not(.hidden) input[type="radio"], option:not(.hidden)');newSelectedOptionValues.push(altCurrentSelectedOptionValue.dataset.optionValueId),stopFinding=!0}}else{const currentSelectedOptionValue=fieldset.querySelector('li input[type="radio"]:checked, option[selected]');newSelectedOptionValues.push(currentSelectedOptionValue.dataset.optionValueId),fieldset.classList.contains("last")&&(findSelectedOptionValue=currentSelectedOptionValue)}}),this.publishChangeEvent(document.getElementById(findSelectedOptionValue.id),!0,newSelectedOptionValues)}}customElements.define("variant-selects",VariantSelects);class VariantRadios extends VariantSelects{constructor(){super()}
1connectedCallback(){this.loadBackgroundColorSwatches()}get selectedOptionValues(){return Array.from(this.querySelectorAll('input[type="radio"]:checked')).map(({dataset})=>dataset.optionValueId)}loadBackgroundColorSwatches(){!window.loadedBackgroundColorSwatches&&this.querySelectorAll(".product-form__input__radio-label--color").length>0&&loadColorSwatches()}}customElements.define("variant-radios",VariantRadios);const deferredMediaObserver=new IntersectionObserver((entries,observer)=>{entries.forEach(entry=>{entry.isIntersecting?entry.target.loadContent(!1):entry.target.pause()})});class DeferredMedia extends HTMLElement{constructor(){super(),!this.dataset.ignore&&(this.isPlaying=!1,this.poster=this.querySelector('[id^="Deferred-Poster-"]'),this.poster&&(this.posterClickHandler=this.onPosterClick.bind(this),this.poster.addEventListener("click",this.posterClickHandler)),this.dataset.autoplay&&deferredMediaObserver.observe(this))}disconnectedCallback(){this.poster&&this.poster.removeEventListener("click",this.posterClickHandler)}onPosterClick(){return this.loadContent(!0,!0)}loadContent(focus=!0,play=!1){if(!this.deferredElement)if(this.hasAttribute("loaded"))this.deferredElement=this.querySelector("video, model-viewer, iframe");else if(this.setAttribute("loaded",!0),this.dataset.loaded)this.deferredElement=this.querySelector("video, model-viewer, iframe");else{const content=document.createElement("div");content.appendChild(this.querySelector("template").content.firstElementChild.cloneNode(!0));const el=content.querySelector("video, model-viewer, iframe");this.querySelector("template").remove(),this.deferredElement=this.appendChild(el)}if(this.deferredElement){if(this.isPlaying)this.pause();else if(focus&&this.deferredElement.focus(),this.deferredElement.getAttribute("autoplay")||this.dataset.autoplay||play)return this.playVideoTag()}return Promise.resolve()}play(){return this.isPlaying?this.playPromise?this.playPromise:Promise.resolve():this.deferredElement?this.playVideoTag():this.loadContent(!1,!0)}playVideoTag(){return this.deferredElement?(this.deferredElement.nodeName==="VIDEO"?(this.isPlaying=!0,this.playPromise=this.deferredElement.play().then(()=>{this.classList.add("playing")}).catch(err=>{this.isPlaying=!1,this.classList.remove("playing")})):this.deferredElement.classList.contains("js-youtube")?(this.deferredElement.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"),this.isPlaying=!0,this.classList.add("playing"),this.playPromise=Promise.resolve()):this.deferredElement.classList.contains("js-vimeo")&&(this.deferredElement.contentWindow.postMessage('{"method":"play"}',"*"),this.isPlaying=!0,this.classList.add("playing"),this.playPromise=Promise.resolve()),this.playPromise):Promise.reject(new Error("No media element found"))}pause(){!this.hasAttribute("loaded")||!this.isPlaying||(this.playPromise!==void 0?this.playPromise.then(_=>{this.pauseAllMedia()}).catch(error=>{console.log(error)}):this.pauseAllMedia())}pauseAllMedia(){this.deferredElement&&this.isPlaying&&(window.pauseAllMedia(this,!0,!1),this.isPlaying=!1,this.classList.remove("playing"))}}customElements.define("deferred-media",DeferredMedia);class BtStorageUtil{static set(key,value,isSession=!1){isSession?sessionStorage.setItem(`bt-${key}`,typeof value=="object"?JSON.stringify(value):value):localStorage.setItem(`bt-${key}`,typeof value=="object"?JSON.stringify(value):value)}static get(key,isJson,isSession=!1){const value=isSession?sessionStorage.getItem(`bt-${key}`):localStorage.getItem(`bt-${key}`);return isJson?JSON.parse(value):value}static remove(key,isSession=!1){isSession?sessionStorage.removeItem(`bt-${key}`):localStorage.removeItem(`bt-${key}`)}} 2//# sourceMappingURL=/cdn/shop/t/12/assets/critical-global.js.map?v=132338676870686521561787220069
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.