PageSourceSearch

https://gehrmans.se/cdn/shop/t/2/assets/global.js?v=165999040848992379611788341003

js gehrmans.se collected 2026-10-02 11:51:51 UTC 149,228 bytes, 2 lines download raw bytes

1var bodyScrollLockOptions={reserveScrollBarGap:!0},Shopify=Shopify||{};Shopify.money_format="${{amount}}",Shopify.formatMoney=function(cents,format){typeof cents=="string"&&(cents=cents.replace(".",""));var value="",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||this.money_format;function defaultOption(opt,def){return typeof opt>"u"?def:opt}function formatWithDelimiters(number,precision,thousands,decimal){if(precision=defaultOption(precision,2),thousands=defaultOption(thousands,","),decimal=defaultOption(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollars=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),cents2=parts[1]?decimal+parts[1]:"";return dollars+cents2}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break}return formatString.replace(placeholderRegex,value)};function Delegate(root){this.listenerMap=[{},{}],root&&this.root(root),this.handle=Delegate.prototype.handle.bind(this),this._removedListeners=[]}Delegate.prototype.root=function(root){const listenerMap=this.listenerMap;let eventType;if(this.rootElement){for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.removeEventListener(eventType,this.handle,!1)}if(!root||!root.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=root;for(eventType in listenerMap[1])listenerMap[1].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!0);for(eventType in listenerMap[0])listenerMap[0].hasOwnProperty(eventType)&&this.rootElement.addEventListener(eventType,this.handle,!1);return this},Delegate.prototype.captureForType=function(eventType){return["blur","error","focus","load","resize","scroll"].indexOf(eventType)!==-1},Delegate.prototype.on=function(eventType,selector,handler,useCapture){let root,listenerMap,matcher,matcherParam;if(!eventType)throw new TypeError("Invalid event type: "+eventType);if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0&&(useCapture=this.captureForType(eventType)),typeof handler!="function")throw new TypeError("Handler must be a type of Function");return root=this.rootElement,listenerMap=this.listenerMap[useCapture?1:0],listenerMap[eventType]||(root&&root.addEventListener(eventType,this.handle,useCapture),listenerMap[eventType]=[]),selector?/^[a-z]+$/i.test(selector)?(matcherParam=selector,matcher=matchesTag):/^#[a-z0-9\-_]+$/i.test(selector)?(matcherParam=selector.slice(1),matcher=matchesId):(matcherParam=selector,matcher=Element.prototype.matches):(matcherParam=null,matcher=matchesRoot.bind(this)),listenerMap[eventType].push({selector,handler,matcher,matcherParam}),this},Delegate.prototype.off=function(eventType,selector,handler,useCapture){let i,listener,listenerMap,listenerList,singleEventType;if(typeof selector=="function"&&(useCapture=handler,handler=selector,selector=null),useCapture===void 0)return this.off(eventType,selector,handler,!0),this.off(eventType,selector,handler,!1),this;if(listenerMap=this.listenerMap[useCapture?1:0],!eventType){for(singleEventType in listenerMap)listenerMap.hasOwnProperty(singleEventType)&&this.off(singleEventType,selector,handler);return this}if(listenerList=listenerMap[eventType],!listenerList||!listenerList.length)return this;for(i=listenerList.length-1;i>=0;i--)listener=listenerList[i],(!selector||selector===listener.selector)&&(!handler||handler===listener.handler)&&(this._removedListeners.push(listener),listenerList.splice(i,1));return listenerList.length||(delete listenerMap[eventType],this.rootElement&&this.rootElement.removeEventListener(eventType,this.handle,useCapture)),this},Delegate.prototype.handle=function(event2){let i,l;const type=event2.type;
1let root,phase,listener,returned,listenerList=[],target;const eventIgnore="ftLabsDelegateIgnore";if(event2[eventIgnore]===!0)return;switch(target=event2.target,target.nodeType===3&&(target=target.parentNode),target.correspondingUseElement&&(target=target.correspondingUseElement),root=this.rootElement,phase=event2.eventPhase||(event2.target!==event2.currentTarget?3:2),phase){case 1:listenerList=this.listenerMap[1][type];break;case 2:this.listenerMap[0]&&this.listenerMap[0][type]&&(listenerList=listenerList.concat(this.listenerMap[0][type])),this.listenerMap[1]&&this.listenerMap[1][type]&&(listenerList=listenerList.concat(this.listenerMap[1][type]));break;case 3:listenerList=this.listenerMap[0][type];break}let toFire=[];for(l=listenerList.length;target&&l;){for(i=0;i<l&&(listener=listenerList[i],!!listener);i++)target.tagName&&["button","input","select","textarea"].indexOf(target.tagName.toLowerCase())>-1&&target.hasAttribute("disabled")?toFire=[]:listener.matcher.call(target,listener.matcherParam,target)&&toFire.push([event2,target,listener]);if(target===root||(l=listenerList.length,target=target.parentElement||target.parentNode,target instanceof HTMLDocument))break}let ret;for(i=0;i<toFire.length;i++)if(!(this._removedListeners.indexOf(toFire[i][2])>-1)&&(returned=this.fire.apply(this,toFire[i]),returned===!1)){toFire[i][0][eventIgnore]=!0,toFire[i][0].preventDefault(),ret=!1;break}return ret},Delegate.prototype.fire=function(event2,target,listener){return listener.handler.call(target,event2,target)};function matchesTag(tagName,element){return tagName.toLowerCase()===element.tagName.toLowerCase()}function matchesRoot(selector,element){return this.rootElement===window?element===document||element===document.documentElement||element===window:this.rootElement===element}function matchesId(id,element){return id===element.id}Delegate.prototype.destroy=function(){this.off(),this.root()};class Popup{constructor(element){this.element=element,this.delegateElement=new Delegate(this.element),this.pageOverlayElement=document.querySelector(".pageOverlay"),this.bindEvents()}bindEvents(){this.delegateElement.on("click",'[data-action="open-modal"]',this.openModal.bind(this)),this.delegateElement.on("click",'[data-action="close-modal"]',this.closeModal.bind(this)),document.addEventListener("posted_successfully",this.openModalSpecial.bind(this)),this.onClickOutsideListener=this.closeModal.bind(this)}openModal(){event.preventDefault(),event.stopPropagation(),this.pageOverlayElement.classList.add("is-visible"),this.activeModal=document.getElementById(event.target.getAttribute("aria-controls")),this.activeModal.setAttribute("aria-hidden","false"),this.activeModal.style.display="block",this.pageOverlayElement.addEventListener("click",this.onClickOutsideListener);var focus=this.element.querySelector("[data-scrollable]");setTimeout(()=>{trapFocus(this.activeModal)},100),bodyScrollLock.disableBodyScroll(focus,bodyScrollLockOptions)}openModalSpecial(){event.preventDefault(),event.stopPropagation(),this.pageOverlayElement.classList.add("is-visible"),this.activeModal=document.getElementById(event.detail.id),this.activeModal.setAttribute("aria-hidden","false");var focus=this.element.querySelector("[data-scrollable]");this.pageOverlayElement.addEventListener("click",this.onClickOutsideListener),bodyScrollLock.disableBodyScroll(focus,bodyScrollLockOptions),trapFocus(this.activeModal)}closeModal(){this.activeModal=document.body.querySelector('.Popup[aria-hidden="false"]'),this.pageOverlayElement.classList.remove("is-visible"),this.pageOverlayElement.removeEventListener("click",this.onClickOutsideListener),this.activeModal.setAttribute("aria-hidden","true"),bodyScrollLock.clearAllBodyScrollLocks(),this.activeModal.removeAttribute("style")}}class RevolutionImageZoom{constructor(element,slideshow){this.element=element,this.slideshow=slideshow,this.delegateElement=new Delegate(this.element),this.delegateRoot=new Delegate(document.body),this.syncHeight(),this.bindEvents()}syncHeight(){document.documentElement.style.setProperty("--window-inner-height",`${window.innerHeight}px`)}bindEvents(){window.addEventListener("resize",this.syncHeight()),this.delegateElement.on("click",'[data-action="open-product-zoom"]',this.initPhotoSwipe.bind(this)),this.delegateElement.on("click",".ProductSliderCell--Zoom",this.initPhotoSwipeFromImageClick.bind(this)),this.delegateRoot.on("pswpTap",".pswp__button--close",this.photoswiperClose.bind(this))}photoswiperClose(){this.photoSwipeInstance.close,/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&document.documentElement.classList.remove("pswp-open-in-ios")}initPhotoSwipe(){var images=[],index=0;
1if(this.slideshow){this.slideshow.swiperElement.slides.forEach(function(item){item.classList.contains("ProductSliderCell--Zoom")&&item.querySelector("img")&&images.push(item.querySelector("img"))});var index_currentSlide=this.slideshow.swiperElement.realIndex;this.slideshow.swiperElement.slides[index_currentSlide].querySelector(".ProductSlider--Element").getAttribute("data-image-position")}else images.push(document.querySelector(".ProductSlider--Image"));this.createPhotoSwipeInstance(this.createPhotoSwipeItemsFromImages(images),parseInt(index))}initPhotoSwipeFromImageClick(event2,target){if(new Responsive().matchesBreakpoint("pocket"))return;const images=[];Array.from(target.parentElement.children).forEach(item=>{item.classList.contains("ProductSliderCell--Zoom")&&item.querySelector("img")&&images.push(item.querySelector("img"))});const imagePosition=parseInt(target.querySelector(".ProductSlider--Element").getAttribute("data-image-position"));this.createPhotoSwipeInstance(this.createPhotoSwipeItemsFromImages(images),imagePosition)}createPhotoSwipeItemsFromImages(images){return images.map(function(image){var maxWidth=parseInt(image.getAttribute("data-max-width")),maxHeight=parseInt(image.getAttribute("data-max-height")),maxDimension=new Responsive().matchesBreakpoint("phone")?1200:2200,reduceFactor=1;maxWidth>=maxHeight?reduceFactor=Math.max(maxWidth/maxDimension,1):reduceFactor=Math.max(maxHeight/maxDimension,1);var requestedWidth=Math.floor(maxWidth/reduceFactor),requestedHeight=Math.floor(maxHeight/reduceFactor);return{msrc:image.currentSrc||image.src,w:requestedWidth,h:requestedHeight,initialZoomLevel:.65,src:new RevolutionImage().getSizedImageUrl(image.getAttribute("data-original-src"),requestedWidth+"x"+requestedHeight)}})}createPhotoSwipeInstance(items,selectedImageIndex){var _this=this,photoswipeContainer=document.querySelector(".pswp");this.photoSwipeInstance=new PhotoSwipe(photoswipeContainer,!1,items,{index:selectedImageIndex,showHideOpacity:!0,showAnimationDuration:500,loop:!1,history:!1,closeOnVerticalDrag:!0,allowPanToNext:!1,pinchToClose:!1,errorMsg:'<p class="pswp__error-msg"></p>',scaleMode:"orig",getDoubleTapZoom:function(isMouseClick,item){return isMouseClick?1.35:item.initialZoomLevel<.7?1:1.33},getThumbBoundsFn:function(index){var allThumbnail=_this.element.querySelectorAll(".mainSwiper .ProductSliderCell--Zoom img"),thumbnail=allThumbnail[index],pageYScroll=window.pageYOffset||document.documentElement.scrollTop,rect=thumbnail.getBoundingClientRect();return{x:rect.left,y:rect.top+pageYScroll,w:rect.width}}}),this.photoSwipeInstance.listen("beforeChange",this.onslideChanged.bind(this)),this.photoSwipeInstance.listen("destroy",this.destroyPhotoSwipe.bind(this)),this.photoSwipeInstance.listen("doubleTap",this.onDoubleTap.bind(this)),this.photoSwipeInstance.listen("initialZoomIn",this.onInitialZoomIn.bind(this)),this.photoSwipeInstance.listen("initialZoomOut",this.onInitialZoomOut.bind(this)),this.delegateRoot.on("pswpTap",".pswp__scroll-wrap",this.onSingleTap.bind(this)),this.delegateRoot.on("pswpTap",".pswp__button--close",this.photoSwipeInstance.close),this.delegateRoot.on("pswpTap",".pswp__button--prev",this.photoSwipeInstance.prev),this.delegateRoot.on("pswpTap",".pswp__button--next",this.photoSwipeInstance.next),this.photoSwipeInstance.listen("close",this.photoswiperClose.bind(this)),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&document.documentElement.classList.add("pswp-open-in-ios"),this.photoSwipeInstance.init()}onslideChanged(){this.photoSwipeInstance.getCurrentIndex()===0?this.photoSwipeInstance.scrollWrap.querySelector(".pswp__button--prev").setAttribute("disabled","disabled"):this.photoSwipeInstance.scrollWrap.querySelector(".pswp__button--prev").removeAttribute("disabled"),this.photoSwipeInstance.getCurrentIndex()+1===this.photoSwipeInstance.options.getNumItemsFn()?this.photoSwipeInstance.scrollWrap.querySelector(".pswp__button--next").setAttribute("disabled","disabled"):this.photoSwipeInstance.scrollWrap.querySelector(".pswp__button--next").removeAttribute("disabled")}onSingleTap(event2){if(!event2.detail||event2.detail.pointerType==="mouse")event2.target.classList.contains("pswp__img")&&this.photoSwipeInstance.toggleDesktopZoom(event2.detail.releasePoint);else{if(event2.target.classList.contains("pswp__button"))return;event2.target.closest(".pswp").querySelector(".pswp__ui").classList.toggle("pswp__ui--hidden")}}onDoubleTap(point){var initialZoomLevel=this.photoSwipeInstance.currItem.initialZoomLevel;this.photoSwipeInstance.getZoomLevel()!==initialZoomLevel?this.photoSwipeInstance.zoomTo(initialZoomLevel,point,333):this.photoSwipeInstance.zoomTo(initialZoomLevel<.7?1:1.33,point,333)}onInitialZoomIn(){document.querySelector(".pswp__ui").classList.remove("pswp__ui--hidden")}onInitialZoomOut(){document.querySelector(".pswp__ui").classList.add("pswp__ui--hidden")}destroyPhotoSwipe(){this.delegateRoot.off("pswpTap"),this.photoSwipeInstance=null}}class RevolutionSelectbox{constructor(element,popover,additionalOverlay){this.element=element,this.popover=popover,this.changeOverlay=additionalOverlay,this.domDelegate=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.dropdown=this.element.querySelector(".RevolutionSelectbox"),this.mainDropdown=this.element.querySelector(".RevolutionSelectbox--Content"),this.mainDropdownContent=this.element.querySelector(".RevolutionSelectbox--InnerContent"),this.mainButton=this.element.querySelector(".RevolutionSelectbox--Button"),this.connectedSelect=this.element.getAttribute("data-select"),this.selectbox=this.element.querySelector("[name="+this.connectedSelect+"]"),this.selectbox==null&&(this.selectbox=this.element.querySelector("[name2="+this.connectedSelect+"]")),this.popover==!0&&(this.mainDropdown.classList.add("PopoverContent"),this.changeOverlay?this.pageOverlayElement=document.querySelector(".localizationOverlay"):this.pageOverlayElement=document.querySelector(".pageOverlay")),this.bindEvents(),this.initSelectbox()}bindEvents(){this.onClickOutsideListener=this.onClickOutside.bind(this),this.domDelegate.on("click","[data-action=toggle-selectbox]",this.toggleDropdown.bind(this)),this.domDelegate.on("click","[data-action=selectbox-submit]",this.selectboxSubmit.bind(this)),this.domDelegate.on("keypress","[data-action=selectbox-submit]",this.selectboxSubmit.bind(this)),this.domDelegate.on("click","[data-action=selectbox-change]",this.selectboxChange.bind(this)),this.domDelegate.on("click","[data-action='close-selectbox']",this.closeDropdown.bind(this)),this.delegateBody.on("menu:open",this.onClickOutside.bind(this)),this.domDelegate.on("click","body",this.onClickOutside.bind(this))}selectboxChange(){var value=event.target.getAttribute("data-value"),selectboxID=event.target.getAttribute("data-selectboxid"),innerContent=event.target.innerHTML,selEl=this.element.querySelector("#"+selectboxID);selEl.nodeName=="SELECT"?(selEl.value=value,selEl.dispatchEvent(new Event("change"))):selEl.querySelector('[value="'+value+'"]').setAttribute("checked","true"),this.mainButton.querySelector(".RevolutionSelectbox--Title").innerHTML=innerContent,this.element.classList.contains("dropdownSelector")&&(this.element.querySelector('.RevolutionSelectbox--Item[disabled="true"]').removeAttribute("disabled"),event.target.setAttribute("disabled","true")),this.closeDropdown(!1,this.element)}onClickOutside(event2){(!event2.composedPath().includes(this.element)||event2.target.classList.contains("FiltersDesktopWrapper"))&&this.closeDropdown(!1,this.element)}selectboxSubmit(event2,target){if(!(event2.key!="Enter"&&event2.key!==void 0)){var value=event2.target.getAttribute("data-value"),dataName=event2.target.getAttribute("data-name");this.selectbox.value=value,this.closeDropdown(!1,this.element),this.mainButton.querySelector(".RevolutionSelectbox--Title").innerHTML=dataName,this.selectbox.parentElement.submit()}}initSelectbox(){var selectedItem=this.mainDropdown.querySelector('[selected="selected"]'),titleElement=this.element.querySelector(".RevolutionSelectbox--Title");selectedItem&&(titleElement.innerHTML=selectedItem.getAttribute("data-name")),trapFocus(this.element),this.element.style.display="block"}toggleDropdown(event2,target){event2.preventDefault();var isOpen=target.getAttribute("aria-expanded")==="true";isOpen?this.closeDropdown(!1,target):this.openDropdown(target)}openDropdown(target){if(this.element.dispatchEvent(new CustomEvent("close:search",{bubbles:!0})),this.element.dispatchEvent(new CustomEvent("menu:close",{bubbles:!0})),Array.from(target.parentElement.parentElement.children).filter(item=>
1item.classList.contains("RevolutionSelectbox")).forEach(item=>{item.querySelector(".RevolutionSelectbox--Button").setAttribute("aria-expanded",!1),item.querySelector(".RevolutionSelectbox--Content").setAttribute("aria-hidden",!0),item.querySelector(".RevolutionSelectbox--Content").style.display="none"}),this.popover){this.pageOverlayElement.classList.add("is-visible"),this.pageOverlayElement.addEventListener("click",this.onClickOutsideListener);const focus=this.element.querySelector("[data-scrollable]");bodyScrollLock.disableBodyScroll(focus,bodyScrollLockOptions),document.body.classList.add("scrollLock"),trapFocus(this.mainDropdown),document.querySelector("#Drawer").getAttribute("aria-expanded")==="true"&&(document.querySelector(".Drawer--Wrapper").style.overflow="visible")}target.setAttribute("aria-expanded",!0),target.parentElement.querySelector(".RevolutionSelectbox--Content").setAttribute("aria-hidden",!1),target.parentElement.querySelector(".RevolutionSelectbox--Content").style.display="block",window.addEventListener("click",this.onClickOutsideListener)}closeDropdown(event2,target){var closestDropdown=target.closest(".RevolutionSelectbox");if(closestDropdown===null)var closestDropdown=target.querySelector("[aria-expanded='true']").parentElement;if(closestDropdown.querySelector(".RevolutionSelectbox--Button").setAttribute("aria-expanded",!1),closestDropdown.querySelector(".RevolutionSelectbox--Content").setAttribute("aria-hidden",!0),setTimeout(()=>{closestDropdown.querySelector(".RevolutionSelectbox--Content").style.display="none"},300),this.popover==!0)if(this.pageOverlayElement.classList.remove("is-visible"),this.pageOverlayElement.removeEventListener("click",this.onClickOutsideListener),document.querySelector("#Drawer").getAttribute("aria-expanded")=="true"){document.querySelector(".Drawer--Wrapper").style.overflow="auto";const focus=this.element.querySelector("[data-scrollable]");bodyScrollLock.enableBodyScroll(focus)}else bodyScrollLock.clearAllBodyScrollLocks(),document.body.classList.remove("scrollLock");removeTrapFocus(this.mainDropdownContent),window.removeEventListener("click",this.onClickOutsideListener)}}class Form{constructor(){}serialize(form){function stringKey(key,value){var beginBracket=key.lastIndexOf("[");if(beginBracket===-1){var _hash={};return _hash[key]=value,_hash}var newKey=key.substr(0,beginBracket),newValue={};return newValue[key.substring(beginBracket+1,key.length-1)]=value,stringKey(newKey,newValue)}for(var hash={},i=0,len=form.elements.length;i<len;i++){var formElement=form.elements[i];if(!(formElement.name===""||formElement.disabled)&&formElement.name&&!formElement.disabled&&(formElement.checked||/select|textarea/i.test(formElement.nodeName)||/hidden|text|search|tel|url|email|password|datetime|date|month|week|time|datetime-local|number|range|c
1olor/i.test(formElement.type))){var stringKeys=stringKey(formElement.name,formElement.value);hash=this.extend(hash,stringKeys)}}return hash}extend(){for(var extended={},i=0,_this=this,merge=function(obj){for(var prop in obj)obj.hasOwnProperty(prop)&&(Object.prototype.toString.call(obj[prop])==="[object Object]"?extended[prop]=_this.extend(extended[prop],obj[prop]):extended[prop]=obj[prop])};i<arguments.length;i++)merge(arguments[i]);return extended}}class AddToCart{constructor(element){this.element=element,this.delegateElement=new Delegate(this.element),this.pageLoader=document.body.querySelector(".pageLoader"),this.bindEvents()}bindEvents(){this.delegateElement.on("click","[data-action=add-to-cart]",this.addToCart.bind(this))}addToCart(){var _this=this;event.preventDefault();var addToCartButton=event.target;this.pageLoader.style.width="100%",addToCartButton.setAttribute("disabled","disabled");var formElement=event.target.closest("form");formElement.querySelector('[name="id"]').removeAttribute("disabled");var formHelper=new Form;const serialized=formHelper.serialize(formElement),quantityElement=(formElement.closest(".Pdpvariants--product_title_wrapper")||formElement.closest(".ProductWrapper--ATC_quantity"))?.querySelector(".QuantitySelector__ProductQuantity");quantityElement&&(serialized.quantity=quantityElement.value);const rootUrl=window.Shopify?.routes?.root||"/";fetch(`${rootUrl}cart/add.js`,{body:JSON.stringify(serialized),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){if(response.ok){if(window.location.href.indexOf("cart")!=-1){location.reload();return}addToCartButton.removeAttribute("disabled"),_this.element.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:serialized.id,quantity:serialized.quantity}}))}else response.json().then(function(content){if(_this.element.querySelector(".ProductForm--Error"))_this.element.querySelector(".ProductForm--Error").classList.add("visible"),setTimeout(function(){_this.element.querySelector(".ProductForm--Error").classList.remove("visible")},2500),_this.pageLoader.style.left="unset",_this.pageLoader.style.right="0px",_this.pageLoader.style.width="0%",setTimeout(()=>{_this.pageLoader.style.left="0px",_this.pageLoader.style.right="unset"},550);else{var errorMessageElement=document.createElement("span");errorMessageElement.className="u-p4 accent",errorMessageElement.innerHTML=content.description,addToCartButton.removeAttribute("disabled"),addToCartButton.insertAdjacentElement("afterend",errorMessageElement),setTimeout(function(){errorMessageElement.remove()},2500),_this.pageLoader.style.left="unset",_this.pageLoader.style.right="0px",_this.pageLoader.style.width="0%",setTimeout(()=>{_this.pageLoader.style.left="0px",_this.pageLoader.style.right="unset"},550)}})})}}class Dropdown{constructor(element){this.element=element,this.domDelegate=new Delegate(this.element),this.bindEvents()}bindEvents(){this.domDelegate.on("click","[data-action=toggle-dropdown]",this.toggleDropdown.bind(this))}openDropdown(elem){const DropdownButton=elem.querySelector(".Dropdown--Button"),DropdownContent=elem.querySelector(".Dropdown--Content");DropdownButton.setAttribute("aria-expanded",!0),new RevolutionAnimation(DropdownContent,"true").slideDown()}closeDropdown(elem){const DropdownButton=elem.querySelector(".Dropdown--Button"),DropdownContent=elem.querySelector(".Dropdown--Content");new RevolutionAnimation(DropdownContent,!0).slideUp(),DropdownButton.setAttribute("aria-expanded",!1),setTimeout(function(){DropdownContent.setAttribute("aria-hidden","true")},250)}toggleDropdown(event2,target){event2.preventDefault(event2);const mainDropdown=target.closest(".Dropdown");var isOpen=target.getAttribute("aria-expanded")==="true";isOpen?this.closeDropdown(mainDropdown,target):this.openDropdown(mainDropdown,target)}}(function(funcName,baseObj){"use strict";funcName=funcName||"docReady",baseObj=baseObj||window;var readyList=[],readyFired=!1,readyEventHandlersInstalled=!1;function ready(){if(!readyFired){readyFired=!0;for(var i=0;i<readyList.length;i++)readyList[i].fn.call(window,readyList[i].ctx);readyList=[]}}function readyStateChange(){document.readyState==="complete"&&ready()}baseObj[funcName]=function(callback,context){if(typeof callback!="function")throw new TypeError("callback for docReady(fn) must be a function");if(readyFired){setTimeout(function(){callback(context)},1);return}else readyList.push({fn:callback,ctx:context});document.readyState==="complete"||!document.attachEvent&&document.readyState==="interactive"?setTimeout(ready,1):readyEventHandlersInstalled||(document.addEventListener?(document.addEventListener("load",ready,!1),window.addEventListener("DOMContentLoaded",ready,!1)):(document.attachEvent("onreadystatechange",readyStateChange),window.attachEvent("onload",ready)),readyEventHandlersInstalled=!0)}})("docReady",window);function handleFirstTab(e){e.keyCode===9&&(document.body.classList.add("user-is-tabbing"),window.removeEventListener("keydown",handleFirstTab),window.addEventListener("mousedown",handleMouseDownOnce))}function handleMouseDownOnce(){document.body.classList.remove("user-is-tabbing"),window.removeEventListener("mousedown",handleMouseDownOnce),window.addEventListener("keydown",handleFirstTab)}window.addEventListener("keydown",handleFirstTab);function getFocusableElements(container){return Array.from(container.querySelectorAll("summary, a[href], button:enabled, [tabindex]:not
1([tabindex^='-']), [draggable], area, input:not([type=hidden]):enabled, select:enabled, textarea:enabled, object, iframe, .focusable"))}const trapFocusHandlers={};function trapFocus(container,elementToFocus=container){var elements=getFocusableElements(container),first=elements[0],last=elements[elements.length-1];removeTrapFocus(),trapFocusHandlers.focusin=event2=>{event2.target!==container&&event2.target!==last&&event2.target!==first||document.addEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.focusout=function(){document.removeEventListener("keydown",trapFocusHandlers.keydown)},trapFocusHandlers.keydown=function(event2){event2.code.toUpperCase()==="TAB"&&(event2.target===last&&!event2.shiftKey&&(event2.preventDefault(),first.focus()),(event2.target===container||event2.target===first)&&event2.shiftKey&&(event2.preventDefault(),last.focus()))},document.addEventListener("focusout",trapFocusHandlers.focusout),document.addEventListener("focusin",trapFocusHandlers.focusin),first?first.focus():elementToFocus.focus()}function removeTrapFocus(elementToFocus=null){document.removeEventListener("focusin",trapFocusHandlers.focusin),document.removeEventListener("focusout",trapFocusHandlers.focusout),document.removeEventListener("keydown",trapFocusHandlers.keydown),elementToFocus&&elementToFocus.focus()}class Responsive{constructor(){var _this=this;this.currentBreakpoint=this.getCurrentBreakpoint(),window.addEventListener("resize",function(){var newBreakpoint=_this.getCurrentBreakpoint();_this.currentBreakpoint!==newBreakpoint&&(document.dispatchEvent(new CustomEvent("breakpoint:changed",{detail:{previousBreakpoint:_this.currentBreakpoint,currentBreakpoint:newBreakpoint}})),_this.currentBreakpoint=newBreakpoint)})}matchesBreakpoint(breakpoint){switch(breakpoint){case"phone":return window.matchMedia("screen and (max-width: 640px)").matches;case"tablet":return window.matchMedia("screen and (min-width: 641px) and (max-width: 1024px)").matches;case"tablet-and-up":return window.matchMedia("screen and (min-width: 768px)").matches;case"pocket":return window.matchMedia("screen and (max-width: 1024px)").matches;case"lap-and-up":return window.matchMedia("screen and (min-width: 1025px)").matches;case"desk":return window.matchMedia("screen and (min-width: 1280px)").matches}}getCurrentBreakpoint(){if(window.matchMedia("screen and (max-width: 640px)").matches)return"phone";if(window.matchMedia("screen and (min-width: 641px) and (max-width: 1024px)").matches)return"tablet";if(window.matchMedia("screen and (min-width: 1008px) and (max-width: 1279px)").matches)return"lap";if(window.matchMedia("screen and (min-width: 1280px)").matches)return"desk"}}class RevolutionImage{constructor(){}getSizedImageUrl(src,size){if(size===null)return src;if(size==="master")return src.replace(/http(s)?:/,"");var match=src.match(/\.(jpg|jpeg|gif|webp|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match){var prefix=src.split(match[0]),suffix=match[0];return(prefix[0]+"_"+size+suffix).replace(/http(s)?:/,"")}else return null}getSupportedSizes(image,desiredSizes){var supportedSizes=[],imageWidth=image.width;return desiredSizes.forEach(function(width){imageWidth>=width&&supportedSizes.push(width)}),supportedSizes}}class RevolutionSwiper{constructor(element,additionalSwiper){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.element=element,this.thumb=additionalSwiper,this.initialConfig=JSON.parse(element.getAttribute("data-swiper-settings")),additionalSwiper&&(this.initialConfigThumbs=JSON.parse(additionalSwiper.getAttribute("data-swiper-thumb-settings"))),this.options=options,this.build()}selectCell(index){this.swiperElement.slideTo(index)}resize(){this.swiperElement.resize()}build(){var _this=this,configThumb=this.initialConfigThumbs;configThumb!=null&&(this.thumbSwiper=new Swiper(this.thumb,configThumb),this.initialConfig.thumbs.swiper=this.thumbSwiper),this.swiperElement=new Swiper(this.element,this.initialConfig),this.selectedIndex=this.swiperElement.activeIndex,this.swiperElement.on("slideChange",function(){_this.element.dispatchEvent(new CustomEvent("swiper:slide-changed",{bubbles:!0,detail:{currentIndex:_this.swiperElement.activeIndex,element:_this.swiperElement.$el[0]}}))})}}class Drawer{constructor(element){var options=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.element=element,this.delegateElement=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.pageOverlayElement=document.querySelector(".pageOverlay"),navigator.platform==="iPhone"&&document.documentElement.style.setProperty("--viewport-height",`${window.innerHeight}px`),this.onOpen=options.onOpen||function(){},this.onClose=options.onClose||function(){},this.isOpen=!1,this.bindEvents()}bindEvents(){this.delegateBody.on("click",'[data-action="open-drawer"][data-toggle-id="'+this.element.i
1d+'"]',this.openDrawer.bind(this)),this.delegateBody.on("click",'[data-action="close-drawer"][data-toggle-id="'+this.element.id+'"]',this.closeDrawer.bind(this)),this.delegateBody.on("click",'[data-action="toggle-drawer"][data-toggle-id="'+this.element.id+'"]',this.toggleDrawer.bind(this)),this._openListener=this.openDrawer.bind(this),this._closeListener=this.closeDrawer.bind(this),this.calculateMaxHeightListener=this.maxHeight.bind(this),window.addEventListener("resize",this.calculateMaxHeightListener),this.delegateBody.on("cart-drawer:close-other",this._closeListener)}maxHeight(){const id=this.element.getAttribute("id");if(id!="quantityDrawer")if(this.element.style.height=window.innerHeight+"px",id=="cart"||id=="sidebarFavorites"){var footer=this.element.querySelector(".CartDrawer--Footer"),footerHeight=0;footer!==null&&(footerHeight=footer.offsetHeight);var header=this.element.querySelector(".CartHeader").offsetHeight;document.documentElement.style.setProperty("--cartHeader-height",header+"px");var cartItem=this.element.querySelector(".cartItem");if(cartItem!==null)var itemHeight=cartItem.offsetHeight;var itemWrapper=this.element.querySelector(".CartItems--Wrapper");itemWrapper!==null&&(itemWrapper.style.height=window.innerHeight-footerHeight-header+"px")}else if(id=="sidebarDrawer")this.element.style.height=window.innerHeight+"px";else{var filterBar=document.querySelector(".FilterBar"),mobileHeader=document.querySelector(".header"),breakpoint=new Responsive().getCurrentBreakpoint();if(filterBar!==null&&breakpoint=="phone"){var filterBarHeight=filterBar.offsetHeight,mobileHeaderHeight=mobileHeader.offsetHeight;this.element.style.height=window.innerHeight+"px"}}}updateAccessibilityState(isOpen){if(this.element.hasAttribute("aria-hidden")){this.element.setAttribute("aria-hidden",(!isOpen).toString()),document.querySelectorAll("button[aria-controls]").forEach(button=>{button.getAttribute("aria-controls")===this.element.id&&button.setAttribute("aria-expanded",isOpen.toString())});return}this.element.setAttribute("aria-expanded",isOpen.toString())}toggleDrawer(){event.preventDefault(),this.isOpen?this.closeDrawer():this.openDrawer()}openDrawer(){this.maxHeight();var drawerId=this.element.getAttribute("id");if(this.element.dispatchEvent(new CustomEvent("close:search",{bubbles:!0})),drawerId=="cart"&&(this.element.dispatchEvent(new CustomEvent("cart-drawer:open",{bubbles:!0})),this.element.querySelector(".emptyItem--Text")&&(this.element.querySelector(".emptyItem--Text").style.display="flex"),setTimeout(()=>{var count=window.theme.cartCount,options=JSON.parse(this.element.getAttribute("data-settings"))},200)),!this.isOpen){this.element.dispatchEvent(new CustomEvent("cart-drawer:close-other",{bubbles:!0})),this.maxHeight(),drawerId=="sidebarDrawer"?(document.querySelector(".SidebarDrawer__Close")&&(document.querySelector(".SidebarDrawer__Close").style.display="block"),this.element.dispatchEvent(new CustomEvent("sidebar-drawer:open",{bubbles:!0}))):drawerId=="favoritesDrawer"&&this.element.dispatchEvent(new CustomEvent("favorite-product:open",{bubbles:!0})),this.updateAccessibilityState(!0),this.pageOverlayElement.classList.add("is-visible"),this.pageOverlayElement.addEventListener("click",this._closeListener);var focus=this.element.querySelectorAll("[data-scrollable]");return focus.forEach(item=>{bodyScrollLock.disableBodyScroll(item,bodyScrollLockOptions)}),document.body.classList.add("scrollLock"),this.isOpen=!0,setTimeout(()=>{trapFocus(this.element)},400),this.onOpen(),!1}}closeDrawer(event2){if(this.isOpen){var drawerId=this.element.getAttribute("id");if(event2&&event2.preventDefault(),document.body.classList.remove("scrollLock"),bodyScrollLock.clearAllBodyScrollLocks(),drawerId=="cart")var options=JSON.parse(this.element.getAttribute("data-settings"));this.updateAccessibilityState(!1),!(this.element.classList.contains("sizeDrawer_Wrapper")==!0&&document.body.querySelector("#cart").getAttribute("aria-expanded")=="true")&&(this.pageOverlayElement.classList.remove("is-visible"),this.pageOverlayElement.removeEventListener("click",this._closeListener),removeTrapFocus(this.element),this.closeAnimation(this.element),this.isOpen=!1,this.onClose())}}closeAnimation(detailsElement){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):(detailsElement.removeAttribute("open"),detailsElement.closest("details[open]")&&trapFocus(detail
1sElement.closest("details[open]"),detailsElement.querySelector("summary")))};window.requestAnimationFrame(handleAnimation)}}class RevolutionAnimation{constructor(element,directAnimation){if(this.element=element,!directAnimation){this.intersectionObserver=[];var contentToAnimate=document.querySelectorAll("[data-animation]");contentToAnimate.forEach((item,i)=>{this.animateElement(item,i)}),new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.addedNodes.forEach(node=>{node.nodeType===Node.ELEMENT_NODE&&node.querySelectorAll("[data-animation]").forEach((item,i)=>{this.animateElement(item,i)})})})}).observe(document.body,{childList:!0,subtree:!0})}}slideUp(){this.element.style.height=this.element.scrollHeight+"px",this.element.offsetHeight,this.element.style.height=0}slideDown(){if(this.element.style.height!=="auto"){var _this=this;this.element.style.height=this.element.scrollHeight+"px",this.element.setAttribute("aria-hidden",!1);var transitionEnded=function transitionEnded2(event2){event2.propertyName==="height"&&(_this.element.style.height="auto",_this.element.removeEventListener("transitionend",transitionEnded2))};this.element.addEventListener("transitionend",transitionEnded)}}elementScaleOut(elements){const animationDuration=window.theme.animationDuration*2,animationDelay=window.theme.animationBetweenElements;elements.forEach((element,index)=>{if(element.hasAttribute("data-loaded"))return;element.setAttribute("data-loaded",!0);const keyframes=[{transform:"scale(104%)",opacity:"0"},{transform:"scale(100%)",opacity:"1"}],animationOptions={duration:animationDuration,fill:"forwards"};setTimeout(()=>{element.animate(keyframes,animationOptions)},animationDelay*index)})}elementScaleIn(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||(setTimeout(()=>{var elementMove=[{transform:"scale(96%)",opacity:"0"},{transform:"scale(100%)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration*2,fill:"forwards"})},window.theme.animationBetweenElements*i),item.setAttribute("data-loaded",!0))})}imageUnravel(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||(setTimeout(()=>{item.classList.add("show")},window.theme.animationBetweenElements*i),item.setAttribute("data-loaded",!0))})}elementFromTop(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||(setTimeout(()=>{var elementMove=[{transform:"translateY(-30px)",opacity:"0"},{transform:"translateY(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"})},window.theme.animationBetweenElements*i),item.setAttribute("data-loaded",!0))})}elementFromBottom(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||(setTimeout(()=>{var elementMove=[{transform:"translateY(30px)",opacity:"0"},{transform:"translateY(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"})},window.theme.animationBetweenElements*i),item.setAttribute("data-loaded",!0))})}elementFromRight(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||setTimeout(()=>{var elementMove=[{transform:"translateX(30px)",opacity:"0"},{transform:"translateX(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"}),item.setAttribute("data-loaded",!0)},window.theme.animationBetweenElements*i)})}elementFromLeft(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||setTimeout(()=>{var elementMove=[{transform:"translateX(-30px)",opacity:"0"},{transform:"translateX(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"}),item.setAttribute("data-loaded",!0)},window.theme.animationBetweenElements*i)})}elementFromRightBig(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||setTimeout(()=>{var elementMove=[{transform:"translateX(120px)",opacity:"0"},{transform:"translateX(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"}),item.setAttribute("data-loaded",!0)},window.theme.animationBetweenElements*i)})}
1elementFromLeftBig(toReveal){toReveal.forEach((item,i)=>{item.getAttribute("data-loaded")||(setTimeout(()=>{var elementMove=[{transform:"translateX(-120px)",opacity:"0"},{transform:"translateX(0px)",opacity:"1"}];item.animate(elementMove,{duration:window.theme.animationDuration,fill:"forwards"})},window.theme.animationBetweenElements*i),item.setAttribute("data-loaded",!0))})}animateElement(animatedItem,index){const options={integer:index,type:animatedItem.dataset.animation};this.intersectionObserver[index]&&this.intersectionObserver[index].disconnect(),this.intersectionObserver[index]=new IntersectionObserver(results=>{const integer=options.integer,elements=[];if(results.forEach(result=>{(result.isIntersecting||result.intersectionRatio>0)&&(elements.push(result.target),this.intersectionObserver[integer].unobserve(result.target))}),elements.length===0)return;const animation={elementFromTop:"elementFromTop",elementFromBottom:"elementFromBottom",elementFromRight:"elementFromRight",elementFromLeft:"elementFromLeft",elementFromLeftBig:"elementFromLeftBig",elementFromRightBig:"elementFromRightBig",elementScaleIn:"elementScaleIn",imageUnravel:"imageUnravel",elementScaleOut:"elementScaleOut"}[options.type];animation&&this[animation](elements)},{threshold:.25}),animatedItem.classList.contains("animatedContent")&&this.intersectionObserver[index].observe(animatedItem),animatedItem.querySelectorAll(".animatedContent").forEach(item=>{this.intersectionObserver[index].observe(item)})}}window.theme.enableAnimations&&document.addEventListener("DOMContentLoaded",function(){new RevolutionAnimation});function debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}const serializeForm=form=>{const obj={},formData=new FormData(form);for(const key of formData.keys())obj[key]=formData.get(key);return JSON.stringify(obj)};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 ProductForm extends HTMLElement{constructor(){super(),new AddToCart(this)}}customElements.define("product-form",ProductForm);class Countdown extends HTMLElement{constructor(){super(),this.element=this,this.counter=0,this.counter=this.element.querySelector(".component-countDown"),this.options=JSON.parse(this.element.getAttribute("data-settings")),setInterval(this.countDown.bind(this),1e3)}countDown(){const dateNow=new Date,countDateString=`2030-03-03T${this.options.countdownTime}`,countDate=new Date(countDateString),nOfDays=this.options.countdownDays,difference=countDate-dateNow;var textDays=0;const seconds=1e3,minutes=seconds*60,hours=minutes*60,days=hours*24,todaysDay=dateNow.getDay(),textHours=Math.floor(difference%days/hours),textMinutes=Math.floor(difference%hours/minutes),textSeconds=Math.floor(difference%minutes/seconds);if(todaysDay==1)textDays=nOfDays;else if(todaysDay==0)textDays=0;else if(textDays=nOfDays-todaysDay,textDays<0){const mDays=todaysDay%nOfDays;textDays=nOfDays-mDays}this.options.excludeWeekends&&todaysDay==5?textDays=textDays+2:this.options.excludeWeekends&&todaysDay==6&&(textDays=textDays+1);const displayHours=textHours,formatHours=displayHours<10?`0${displayHours}`:displayHours,formatMinutes=textMinutes<10?`0${textMinutes}`:textMinutes,formatSeconds=textSeconds<10?`0${textSeconds}`:textSeconds;textDays>0&&nOfDays>1?this.counter.innerText=`${textDays}d ${formatHours}:${formatMinutes}:${formatSeconds}`:this.counter.innerText=`${formatHours}:${formatMinutes}:${formatSeconds}`}}customElements.define("countdown-element",Countdown);class FeaturedCollectionSection extends HTMLElement{constructor(){super();var _this=this;this.element=this,this.domDelegate=new Delegate(this.element),this.carouselElement=this.element.querySelector(".swiper"),this.carousel=new RevolutionSwiper(this.carouselElement),this.bindEvents(),new AddToCart(this.element)}bindEvents(){this.isPageLoaded=document.readyState==="complete"||document.readyState==="loaded"||document.readyState==="interactive",this.isPageLoaded?this.onPageLoaded():window.addEventListener("load",this.onPageLoaded.bind(this))}onPageLoaded(){const handleIntersection=(entries,observer)=>{entries[0].isIntersecting&&(observer.unobserve(this),this.carousel=new RevolutionSwiper(this.carouselElement))};new IntersectionObserver(handleIntersection.bind(this),{rootMargin:"-100px 0px 200px 0px"}).observe(this)}}customElements.define("featured-collection",FeaturedCollectionSection);class SliderTextSection extends HTMLElement{constructor(){super(),this.element=this,this.carouselElement=this.element.querySelector(".swiper"),this.carousel=new RevolutionSwiper(this.carouselElement)}}customElements.define("slider-text",SliderTextSection);class CartDrawer extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.sidebarDrawer=new Drawer(this.element),this.loader=this.element.querySelector(".itemLoader"),this.cartCount=document.querySelector(".CartCount"),this.options=JSON.parse(this.element.getAttribute("data-settings")),this.pageLoader=document.body.querySelector(".pageLoader"),this.breakpoint=new Responsive().getCurrentBreakpoint(),this.changeEvent=ne
1w Event("quantity:changed",{bubbles:!0}),new AddToCart(this.element),window.theme.enableAnimations&&new RevolutionAnimation(this.element),this.bindEvents(),this.routeURL=window.Shopify?.routes?.route||"/"}onUnload(){this.delegateElement.off(),document.removeEventListener("product:added",this.onProductAddedListener)}bindEvents(){window.theme.listener=="false"&&(this.onProductAddedListener=this.onProductAdded.bind(this),document.addEventListener("cart-drawer:open",this.onOpen.bind(this)),document.addEventListener("product:added",this.onProductAddedListener),document.addEventListener("cart:rerender",this.renderCart.bind(this)),window.theme.listener="true"),this.delegateElement.on("click",'[data-action="update-item-quantity"], [data-action="remove-item"]',this.updateItemQuantity.bind(this)),this.delegateElement.on("change",'[data-action="update-change-quantity"]',this.updateItemQuantity.bind(this)),this.delegateElement.on("quantity:changed",".QuantitySelector__CurrentQuantity",this.updateItemQuantity.bind(this)),this.delegateElement.on("keydown",".QuantitySelector__CurrentQuantity",this.handleEnterPress.bind(this))}handleEnterPress(event2,target){event2.key==="Enter"&&(event2.preventDefault(),this.updateItemQuantity(event2,target))}onOpen(){if(this.element.getAttribute("aria-expanded")==="true")return;const cartHeader=document.querySelector(".CartHeader");let totalHeight=cartHeader?cartHeader.offsetHeight:0;document.documentElement.style.setProperty("--cartHeader-height",totalHeight+"px"),this.options.showRecommendations&&this.loadRecommendations()}async updateItemQuantity(event2,target){event2.preventDefault(),target.closest(".cartItem")?.querySelector(".itemLoader")?.classList.add("is-visible");const quantity=this.getQuantity(target);await fetch(`${this.routeURL}cart/change.js`,{body:JSON.stringify({id:target.getAttribute("data-line-id"),quantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}),window.location.href.indexOf("cart")==-1?this.renderCart(target.getAttribute("data-id"),!0):location.reload()}getQuantity(target){let quantity=null;target.tagName==="INPUT"?quantity=parseInt(Math.max(parseInt(target.value)||0,0)):quantity=parseInt(target.getAttribute("data-quantity"));const input=target.parentElement.querySelector("input");if(!input)return quantity;const min=parseInt(input.min),max=parseInt(input.max);return min&&quantity<min&&(quantity=min),max&&quantity>max&&(quantity=max),quantity}onProductAdded(){var _this=this;this.firstProductAdded=!1,this.renderCart().then(function(){_this.sidebarDrawer.openDrawer()})}renderCart(lineNumber,quantityChange){this.pageLoader.style.width="100%";let skipEvent=!1;event&&event.type=="cart:rerender"&&(lineNumber="CartItem-"+event.detail.lineItem,quantityChange=event.detail.quantityChange,skipEvent=!0);var _this=this;return fetch(`${this.routeURL}?section_id=cart_drawer`,{credentials:"same-origin",method:"GET"}).then(function(content){content.text().then(function(html){_this.replaceContent(html,lineNumber,quantityChange,skipEvent)})})}replaceContent(html,lineNumber,quantityChange,skipEvent){var _this=this;this.pageLoader.style.left="unset",this.pageLoader.style.right="0px",this.pageLoader.style.width="0%",setTimeout(()=>{this.pageLoader.style.left="0px",this.pageLoader.style.right="unset"},550);var tempElement=document.createElement("div");tempElement.innerHTML=html,this.tempOptions=JSON.parse(tempElement.querySelector("#cart").getAttribute("data-settings"));const carted_products=tempElement.querySelector("cart-drawer").dataset.carted;sessionStorage.setItem("carted_products",carted_products),this.element.dispatchEvent(new CustomEvent("cart:changed",{bubbles:!0})),this.firstProductAdded&&document.dispatchEvent(_this.changeEvent),this.firstProductAdded=!0;var number=this.tempOptions.itemCount;if(this.cartCount.innerHTML=`(${number})`,number>0?(document.querySelector(".fullHeaderIcon").setAttribute("aria-hidden","false"),document.querySelector(".emptyHeaderIcon").setAttribute("aria-hidden","true")):(document.querySelector(".fullHeaderIcon").setAttribute("aria-hidden","true"),document.querySelector(".emptyHeaderIcon").setAttribute("aria-hidden","false")),window.theme.cartCount=parseInt(number),lineNumber){lineNumber=lineNumber.split(":")[0];var cartNodeParent=this.element.querySelector("#"+lineNumber);const itemToReplaceWith=tempElement.querySelector("#"+lineNumber+" .cartItem--Informations");
1if(cartNodeParent&&cartNodeParent.querySelector(".itemLoader")&&cartNodeParent.querySelector(".itemLoader").classList.remove("is-visible"),itemToReplaceWith?cartNodeParent.replaceChild(itemToReplaceWith,cartNodeParent.querySelector(".cartItem--Informations")):(cartNodeParent.classList.add("removing"),cartNodeParent.animate([{transform:"translateY(0px)",opacity:"1"},{transform:"translateY(30px)",opacity:"0"}],{duration:500,fill:"forwards"}),setTimeout(()=>{cartNodeParent.remove()},500),this.options.showRecommendations&&this.loadRecommendations()),number>0){const checkoutButtonParent=this.element.querySelector(".CartDrawer--Footer"),checkoutButtonToReplace=tempElement.querySelector(".CartFooter--Totals"),checkoutMetaParent=checkoutButtonParent.querySelector(".MetaIcon--Wrappers");checkoutMetaParent&&checkoutMetaParent.replaceChild(checkoutButtonToReplace,checkoutButtonParent.querySelector(".CartFooter--Totals"))}else{this.element.querySelector(".CartDrawer--Footer").classList.add("removing");const mainPartParent=this.element.querySelector(".CartDrawer");mainPartParent.innerHTML=tempElement.querySelector(".CartDrawer").innerHTML,window.theme.enableAnimations&&mainPartParent.querySelector("#main-cartItems").animate([{opacity:"0"},{opacity:"1"}],{duration:500,fill:"forwards"})}this.element.querySelector(".itemLoader")&&setTimeout(()=>{this.element.querySelector(".itemLoader").classList.remove("is-visible")},250)}else{const cartNodeParent2=this.element.querySelector(".CartDrawer").parentNode,currentScrollPosition=this.element.querySelector("#main-cartItems").scrollTop;cartNodeParent2.replaceChild(tempElement.querySelector(".CartDrawer"),this.element.querySelector(".CartDrawer")),this.element.querySelector("#main-cartItems").scrollTop=currentScrollPosition,window.theme.enableAnimations&&new RevolutionAnimation(this.element)}setTimeout(()=>{if(this.options.showRecommendations&&!quantityChange&&this.loadRecommendations(),!skipEvent){var focus=_this.element.querySelector("[data-scrollable]");bodyScrollLock.disableBodyScroll(focus,bodyScrollLockOptions)}_this.sidebarDrawer.maxHeight()},200)}loadRecommendations(){const _this=this,productId=this.options.productId,url=productId?`${window.Shopify?.routes?.route}recommendations/products?section_id=helper-recommendations&product_id=${productId}&limit=10`:"?section_id=helper-recommendations";fetch(url).then(function(response){return response.text()}).then(function(content){const container=document.createElement("div");container.innerHTML=content;const upsellContainer=container.querySelector(".cartUpsell"),recommendationsContainer=_this.element.querySelector(".CartMobileRecommendations");recommendationsContainer.innerHTML=upsellContainer.innerHTML;const swiper=new Swiper(recommendationsContainer.querySelector(".swiperUpsell"),{slidesPerView:2.2,spaceBetween:16,slidesOffsetAfter:16,slidesOffsetBefore:16,loop:!1,pagination:{el:".sidecart_pagination",type:"bullets",clickable:!0},breakpoints:{1025:{slidesPerView:2.7,spaceBetween:16,slidesOffsetAfter:32,slidesOffsetBefore:32,navigation:{nextEl:".swiperNextCart",prevEl:".swiperPrevCart"}}}});_this.element.dispatchEvent(new CustomEvent("favorites:toggle",{bubbles:!0}));const recommendationsSection=_this.element.querySelector(".cartRecommendations");recommendationsSection.style.display="block",window.theme.enableAnimations&&new RevolutionAnimation(_this.element);const cartDrawerRecommendation=_this.element.querySelector("#cartDrawer--recommendation");_this.element.querySelectorAll("#cartDrawer--recommendation .cartSlideItem").length===0&&(cartDrawerRecommendation.style.display="none")}).catch(function(error){})}}customElements.define("cart-drawer",CartDrawer);function handleStandaloneCartQuantityChange(target){if(!target||!target.classList||!target.classList.contains("QuantitySelector__CurrentQuantity")||target.closest("cart-drawer"))return;const routeURL=window.Shopify?.routes?.route||"/",quantity=CartDrawer.prototype.getQuantity(target);target.value=quantity,fetch(`${routeURL}cart/change.js`,{body:JSON.stringify({id:target.getAttribute("data-line-id"),quantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(){window.location.reload()})}
1document.addEventListener("keydown",function(event2){event2.key==="Enter"&&handleStandaloneCartQuantityChange(event2.target)}),document.addEventListener("change",function(event2){handleStandaloneCartQuantityChange(event2.target)});class Banner extends HTMLElement{constructor(){super(),this.element=this,this.pageOverlayElement=document.querySelector(".pageOverlay"),this.carouselElement=this.element.querySelector("[data-swiper-settings]"),this.delegateBody=new Delegate(document.body),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.delegateElement=new Delegate(this.element),this.options.numberOfSlides>1?(this.carousel=new RevolutionSwiper(this.carouselElement),this.swiper=this.carousel.swiperElement,this.onImagesReady=this.createObserver.bind(this),this.element.addEventListener("swiper:slide-changed",this.onImagesReady),this.bindEvents(),this.createObserver()):this.createObserver()}bindEvents(){document.addEventListener("banner:disable",()=>{this.swiper.allowTouchMove=!1}),document.addEventListener("banner:enable",e=>{this.swiper.allowTouchMove=!0})}createObserver(){this.observer=new IntersectionObserver(this.handleIntersect.bind(this),{threshold:.5});const target=this.element;this.observer.observe(target)}handleIntersect(entries){var _this=this;entries.forEach(entry=>{(entry.intersectionRatio===1||entry.isIntersecting==!0)&&(_this.options.numberOfSlides>1?_this.changeImageQuality():_this.changeImageQuality(!0),_this.observer.unobserve(_this))})}changeImageQuality(singleItem){const breakpoint=new Responsive().getCurrentBreakpoint();let imageContainers;if(singleItem)imageContainers=Array.from(this.element.querySelectorAll(".Banner__ImageContainer--Swap"));else{const currentIndex=this.carousel.swiperElement.activeIndex,cellElement=this.carousel.swiperElement.slides[currentIndex];imageContainers=Array.from(cellElement.querySelectorAll(".Banner__ImageContainer--Swap"))}if(imageContainers.length===0){console.error("No image containers found.");return}let imageToReveal;if(breakpoint==="pocket"||breakpoint==="phone"||breakpoint==="tablet")imageToReveal=imageContainers[0].querySelector(".Banner__Image");else{if(imageContainers.length<2){console.error("Not enough image containers found.");return}imageToReveal=imageContainers[1].querySelector(".Banner__Image")}if(!imageToReveal||imageToReveal.dataset.loadedImage==="true"){console.error("Image not found or already loaded.");return}const replaceUrl=imageToReveal.dataset.src.replace("{width}x","2600x");imageToReveal.src=replaceUrl,imageToReveal.dataset.loadedImage="true"}}customElements.define("banner-hero",Banner);class Header extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.options=JSON.parse(this.getAttribute("data-settings")),this.logoWrapper=this.element.querySelector(".header--LogoWrapper"),this.options.transparent?this.isTransparent=!0:this.isTransparent=!1,this.pushed=!0,this.retracted=!1,this.mediaQueryBig=window.matchMedia("(min-width: 1025px)"),this.userScroll=!1,this.allMenuLinks=this.element.querySelectorAll(".mainLinks"),this.heroBanner=document.querySelector(".Banner--FirstSection"),this.heroBanner||this.element.classList.remove("Header--Transparent");var selectBoxes=this.element.querySelectorAll(".RevolutionSelectbox");selectBoxes.length>0&&selectBoxes.forEach((item,i)=>{new RevolutionSelectbox(item)}),document.querySelector("body").style.backgroundColor=getComputedStyle(this.element).backgroundColor,this.element.parentElement.style.pointerEvents="none",this.options.sticky&&this.toggleSticky(),this.bindEvents(),this.menuOverlapHandler(),this.animationHandler()}menuOverlapHandler(){var currentClientWidth=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.documentElement.clientWidth),menuItems=this.element.querySelector(".header--MenuItems"),overlapping=!1,menuWrapper=this.element.querySelector(".header--Wrapper"),allHeights=[],_this=this;if(menuItems){var desiredHeight=_this.element.querySelectorAll(".mainLinks");desiredHeight.forEach(item=>{allHeights.push(item.offsetHeight)});var maxHeight=Math.max.apply(null,allHeights),minHeight=Math.min.apply(null,allHeights);maxHeight>
1minHeight&&(overlapping=!0,(window.theme.menuBreakpoint==0||window.theme.menuBreakpoint==null)&&(window.theme.menuBreakpoint=currentClientWidth))}currentClientWidth>window.theme.menuBreakpoint?(menuItems.classList.remove("mt-m"),menuItems.classList.remove("mainMenu--Overlapping"),menuWrapper.querySelector(".mainMenuItems").prepend(menuItems),window.theme.menuBreakpoint=0):overlapping&&(menuItems.classList.add("mt-m"),menuItems.classList.add("mainMenu--Overlapping"),menuItems.closest(".header").appendChild(menuItems)),document.documentElement.style.setProperty("--header-height",_this.element.clientHeight+"px")}toggleSticky(){this.element.parentElement.classList.add("header--Sticky")}requestAnimationFrameThrottle(func){let frameId=null;return(...args)=>{frameId===null&&(frameId=requestAnimationFrame(()=>{frameId=null,func.apply(this,args)}))}}bindEvents(){const _this=this;document.addEventListener("shopify:section:load",function(){_this.menuOverlapHandlerListener()}),this.menuOverlapHandlerListener=this.menuOverlapHandler.bind(this),window.addEventListener("resize",this.menuOverlapHandlerListener),this.animationHandlerListener=this.animationHandler.bind(this),this.toggleColorListener=this.toggleColor.bind(this),this.toggleHeaderAnimationListener=this.requestAnimationFrameThrottle(this.toggleHeaderAnimation.bind(this)),(this.options.sticky||this.options.transparent)&&window.addEventListener("resize",this.animationHandlerListener),(this.options.sticky||this.options.transparent)&&window.addEventListener("scroll",this.toggleHeaderAnimationListener,{passive:!0}),window.addEventListener("scroll",this.toggleColorListener,{passive:!0}),this.options.transparent&&this.heroBanner&&(this.element.addEventListener("mouseenter",this.onMouseEnter.bind(this)),this.element.addEventListener("mouseleave",this.onMouseLeave.bind(this))),this.delegateBody.on("menu:close",this.closeMenu.bind(this),!0),this.delegateElement.on("mouseenter","[data-has-menu='true']",this.openMenu.bind(this),!0),this.delegateElement.on("focusin","[data-has-menu='true']",this.openMenu.bind(this),!0),this.delegateElement.on("mouseleave",".desktopMenu--Dropdown",this.closeMenu.bind(this),!0),this.delegateElement.on("mouseenter","[data-single-menu]",this.closeMenu.bind(this),!0),this.delegateElement.on("mouseleave","[data-has-menu='true']",this.closeMenu.bind(this),!0),this.delegateElement.on("focusin","[data-single-menu], .mainLinks",this.closeMenu.bind(this),!0),this.delegateElement.on("click",".mainLinks",this.currentLink.bind(this),!0)}updateMenuPosition(target){document.documentElement.style.setProperty("--submenu-position",`${document.querySelector("#header").offsetHeight}px`)}openMenu(event2,target){if(this.element.dispatchEvent(new CustomEvent("menu:open",{bubbles:!0})),event2.type==="mouseenter"&&target!==event2.target)return;this.updateMenuPosition(target),this.element.classList.remove("Header--Transparent"),target.setAttribute("data-expanded","true"),target.querySelector(".mainLinks")?.setAttribute("aria-expanded","true"),target.getAttribute("data-expanded")==="true"&&target.classList.add("currentLink"),Array.from(target.parentElement.children).filter(sibling=>sibling!==target&&sibling.getAttribute("data-expanded")==="true"&&!sibling.hasAttribute("current-page")).forEach(item=>{item.setAttribute("data-expanded","false"),item.querySelector(".mainLinks")?.setAttribute("aria-expanded","false"),item.classList.remove("currentLink")});const scrollableElement=this.element.querySelector("[data-scrollable]");scrollableElement&&bodyScrollLock.disableBodyScroll(scrollableElement,bodyScrollLockOptions),document.querySelector(".pageOverlay")?.classList.add("is-visible"),document.querySelector(".pageOverlay")?.classList.add("header-menu-dropdown-opened")}closeMenu(event2,target){if(event2.type==="mouseleave"&&target!==event2.target)return;this.options.transparent&&this.isTransparent&&this.heroBanner&&this.element.classList.add("Header--Transparent"),this.element.querySelectorAll('[data-expanded="true"]').forEach(function(item){item.setAttribute("data-expanded","false"),item.querySelector(".mainLinks")?.setAttribute("aria-expanded","fal
1se")}),target.parentElement.getAttribute("data-expanded")==="false"&&(target.parentElement.hasAttribute("current-page")?target.parentElement.getAttribute("current-page")===!1&&target.parentElement.classList.remove("currentLink"):target.parentElement.classList.remove("currentLink")),target.hasAttribute("data-single-menu")&&Array.from(target.parentElement.children).filter(sibling=>sibling!==target&&!sibling.hasAttribute("current-page")).forEach(item=>item.classList.remove("currentLink")),target.getAttribute("data-has-menu")==="true"&&target.getAttribute("current-page")!=="true"&&target.classList.remove("currentLink"),this.animationHandler(),this.toggleColor(),bodyScrollLock.clearAllBodyScrollLocks(),document.querySelector(".pageOverlay")?.classList.remove("is-visible"),document.querySelector(".pageOverlay")?.classList.remove("header-menu-dropdown-opened")}toggleColor(){window.scrollY>10?this.element.classList.add("Header--Scrolled"):this.element.classList.remove("Header--Scrolled"),this.options.transparent&&this.isTransparent&&this.heroBanner&&(window.scrollY>10&&this.options.sticky?this.element.classList.remove("Header--Transparent"):this.element.classList.add("Header--Transparent"))}currentLink(event2,target){if(event2.type==="click"&&target!==event2.target)return;target=target.parentElement,Array.from(target.parentElement.children).filter(sibling=>sibling!==target&&sibling.classList.contains("currentLink")||sibling.hasAttribute("current-page")).forEach(sibling=>{sibling.classList.remove("currentLink"),sibling.setAttribute("current-page",!1)}),target.classList.add("currentLink"),target.setAttribute("current-page",!0)}onMouseEnter(){this.isTransparent=!1,this.element.classList.remove("Header--Transparent")}onMouseLeave(){this.isTransparent=!0,window.scrollY<=10&&this.element.classList.add("Header--Transparent")}animationHandler(){this.mediaQueryBig.matches?(this.element.style.height="",this.element.parentElement.style.height="169px",document.documentElement.style.setProperty("--header-height","169px"),this.toggleHeaderAnimation()):(this.element.style.height="64px",this.element.parentElement.style.height="64px",document.documentElement.style.setProperty("--header-height","64px"),this.disableHeaderAnimation())}toggleHeaderAnimation(){if(this.mediaQueryBig.matches&&!this.element.querySelector("[aria-expanded='true']")){const annBarHeight=parseInt(getComputedStyle(document.querySelector("#shopify-section-announcement_bar")).height,10);window.scrollY>annBarHeight?this.retractSecondRow():this.pushSecondRow()}}disableHeaderAnimation(){this.element.classList.remove("header--RowPushed"),this.element.classList.remove("header--RowRetracted")}retractSecondRow(){this.retracted=!0,this.element.classList.remove("header--RowPushed"),this.element.classList.add("header--RowRetracted"),this.pushed&&(this.pushed=!1),document.documentElement.style.setProperty("--header-height","82px")}pushSecondRow(){this.pushed=!0,this.element.classList.remove("header--RowRetracted"),this.element.classList.add("header--RowPushed"),this.retracted&&(this.retracted=!1),document.documentElement.style.setProperty("--header-height","169px")}}customElements.define("header-component",Header);class Search extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.resultElements=this.element.querySelectorAll(".Search--Result"),this.openProductBtn=this.element.querySelector("#productBtn"),this.openArticleBtn=this.element.querySelector("#articleBtn"),new AddToCart(this.element)}connectedCallback(){this.delegateElement.on("click",'[data-action="toggle-products"]',this.showProducts.bind(this)),this.delegateElement.on("click",'[data-action="toggle-articles"]',this.showArticles.bind(this)),this.delegateElement.on("click",".Button--Search",this.handleTabClick.bind(this)),this.showProducts(),this.updateItemsNumber()}disconnectCallback(){this.delegateElement.destroy()}handleTabClick(event2){const params=new URLSearchParams(window.location.search),currentPage=params.get("page");if(event2.preventDefault(),currentPage>1){params.set("page",1);const newUrl=`${window.location.pathname}?${params.toString()}`;window.location.href=newUrl}this.hidePagination(event2)}async updateItemsNumber(){const params=new URLSearchParams(window.location.search);params.append("section_id","ajax-search__tabs-helper"),params.set("type","product article"),params.set("page",1);const url=`${window.Shopify?.routes?.route||""}/search?${params.toString()}`,div=document.createElement("div");div.innerHTML=await this.fetchSection(url);const oldProductNumber=this.element.querySelector(".itemNumber"),newProductNumber=div.querySelector(".search__product-number");oldProductNumber&&newProductNumber&&(oldProductNumber.innerHTML=newProductNumber.innerHTML);const oldArticleNumber=this.element.querySelector(".itemNumber_2"),newArticleNumber=div.querySelector(".search__article-number");oldArticleNumber&&newArticleNumber&&(oldArticleNumber.innerHTML=newArticleNumber.innerHTML);const articleElements=this.element.querySelectorAll(".article-wrapper"),articleButton=this.element.querySelector("#articleBtn");requestAnimationFrame(()=>{articleElements.length===0&&(oldArticleNumber.innerHTML=0,articleButton.style.pointerEvents="none")})}async fetchSection(url){return await(await fetch(url,{credentials:"same-origin",method:"GET"})).text()}showProducts(){const productElements=this.element.querySelectorAll(".SearchProductWrapper");if(!productElements.length)return;this.element.querySelectorAll(".article-wrapper").forEach(article=>{article.classList.add("hidden")}
1),productElements.forEach(product=>{product.classList.remove("hidden")}),this.openProductBtn.classList.add("active"),this.openArticleBtn.classList.remove("active"),this.openProductBtn.classList.add("u-s3"),this.openProductBtn.classList.remove("u-p3"),this.openArticleBtn.classList.add("u-p3")}showArticles(){const articleElements=this.element.querySelectorAll(".article-wrapper");if(!articleElements.length)return;this.element.querySelectorAll(".SearchProductWrapper").forEach(product=>{product.classList.add("hidden")}),articleElements.forEach(article=>{article.classList.remove("hidden")}),this.openProductBtn.classList.remove("active"),this.openArticleBtn.classList.add("active"),this.openArticleBtn.classList.remove("u-p3"),this.openArticleBtn.classList.add("u-s3"),this.openProductBtn.classList.add("u-p3")}hidePagination(event2){const articleElements=this.element.querySelectorAll(".article-wrapper"),articleNumber=Number(this.element.querySelector(".itemNumber_2").innerText),productElements=this.element.querySelectorAll(".SearchProductWrapper"),productNumber=Number(this.element.querySelector(".itemNumber").innerText),pagination=this.element.querySelector(".Pagination-Wrapper");event2.target.getAttribute("id")==="productBtn"&&productElements.length<24&&productNumber<24||event2.target.getAttribute("id")==="articleBtn"&&articleElements.length<24&&articleNumber<24?pagination.style.display="none":pagination.style.display="flex"}}customElements.define("search-component",Search);class MainMenuDropdown extends HTMLElement{constructor(){super(),this.element=this,this.SidebarMenu=new Drawer(this.element),this.dropdown=new Dropdown(this.element),this.carouselElement=this.element.querySelector(".MenuSlideshowMobile"),this.bindEvents()}bindEvents(){document.addEventListener("sidebar-drawer:open",this.onDrawerListener)}}customElements.define("main-menu-dropdown",MainMenuDropdown);class Transition{constructor(){this.pageOverlay=document.querySelector(".pageTransition"),this.isPageLoaded?this.onPageLoaded():document.addEventListener("DOMContentLoaded",this.onPageLoaded.bind(this))}onPageLoaded(){this.isPageLoaded=!0,this.pageOverlay&&window.theme.showPageTransition&&this.pageOverlay.animate([{opacity:1},{opacity:0}],{duration:100,fill:"forwards",easing:"ease-in-out",iterations:1})}onPageUnload(event2,target){if(!(event2.defaultPrevented||event2.ctrlKey||event2.metaKey||!window.theme.showPageTransition||!this.pageOverlay)&&(event2.preventDefault(),this.pageOverlay)){var timeline=new TimelineLite({onComplete:function(){window.location.href=target.href}});timeline.fromTo(this.pageOverlay,.25,{autoAlpha:0,ease:Linear.easeNone},{autoAlpha:1,ease:Linear.easeNone})}}}var trans=new Transition;class VideoComponent extends HTMLElement{constructor(){super(),this.element=this,this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.trueObserver=!1,this.firstTimePlaying=!0,this.userInteracted=!1,this.videoReady=!1,this.options.using_fade=="fade"?this.element.dataset.position==0||this.element.closest(".swiper-slide").classList.contains("swiper-slide-active")||this.element.closest(".swiper-slide").classList.contains("swiper-slide-duplicate-active")?(this.checkLoaded(),this.bindEvents()):this.bindEvents():(this.bindEvents(),this.createObserver(),this.options.pause||document.addEventListener("swiper:slide-changed",e=>{e.detail.element.querySelectorAll(".Banner__Cell").forEach((slide,index)=>{index!=e.detail.currentIndex&&slide.querySelector(".vjs-playing")&&this.videoPlayer&&this.videoPlayer.pause()})}),this.userInteractedBinder=this.userInteraction.bind(this),document.addEventListener("click",this.userInteractedBinder))}userInteraction(){!this.userInteracted&&window.innerWidth>1024&&(this.userInteracted=!0,document.removeEventListener("click",this.userInteractedBinder))}bindEvents(){window.removeEventListener("swiper:slide-changed",this.onSlideChangeListener),this.onSlideChangeListener=this.onSlideChange.bind(this),window.addEventListener("swiper:slide-changed",this.onSlideChangeListener)}checkLoaded(){var _this=this;typeof videojs<"u"?this.videoPlayerInicialization():setTimeout(function(){_this.checkLoaded()},100)}onSlideChange(event2){if(this.elementPosition=parseInt(this.element.getAttribute("data-position")),event2.detail.currentIndex==this.elementPosition)if(this.element.getAttribute("loaded"))this.videoPlayer?this.options.viewport&&(this.videoPlayer.play(),this.createObserver()):this.checkLoaded();else{var node=document.createElement("div");node.appendChild(this.element.querySelector("template").content.firstElementChild.cloneNode(!0)),this.element.appendChild(node.firstElementChild).focus(),this.element.setAttribute("loaded",!0),this.videoPlayer?this.options.viewport&&(this.videoPlayer.play(),this.createObserver()):this.checkLoaded()}else this.videoPlayer&&this.videoPlayer.el_.classList.contains("vjs-playing")&&this.videoPlayer.pause()}videoPlayerInicialization(){var _this=this;if(!this.element.getAttribute("loaded")){var node=document.createElement("div");node.appendChild(this.element.querySelector("template").content.firstElementChild.cloneNode(!0)),this.element.appendChild(node.firstElementChild).focus(),this.element.setAttribute("loaded",!0)}let breakpoint=new Responsive().getCurrentBreakpoint();if(breakpoint=="phone"||breakpoint=="tablet")var isMobile=!0;else var isMobile=!1;
1let img_plh="",aspect_ratio="",src="",host="html5",autoplay=this.options.viewport;if(isMobile)if(img_plh=this.options.plh_mob,this.options.aspect_mob?aspect_ratio=this.options.aspect_mob:aspect_ratio="9:16",this.options.control_var)this.options.videom.includes("youtube")?host="youtube":this.options.videom.includes("vimeo")&&(host="vimeo"),src=this.options.videom;else if(this.options.video_inside_media){const sources=this.options.videod.sources;let topQuality=null;sources.forEach(obj=>{obj.format==="mp4"&&(topQuality||(topQuality=obj),topQuality.height<obj.height&&(topQuality=obj))});const aspectRatioHeight=Math.floor(100/this.options.videod.aspect_ratio);this.options.videoRatio||(aspect_ratio=`100:${aspectRatioHeight}`),src=topQuality.url+"#t=0.001"}else{const aspectRatioHeight=Math.floor(100/this.options.videom.aspect_ratio);this.options.videoRatio||(aspect_ratio=`100:${aspectRatioHeight}`),host=this.options.videom.host,host=="youtube"?src="https://www.youtube.com/watch?v="+this.options.videom.external_id:src=this.options.videom.external_id,autoplay=!1}else if(img_plh=this.options.plh_desk,this.options.aspect_desk?aspect_ratio=this.options.aspect_desk:aspect_ratio="16:9",this.options.control_var)this.options.videom.includes("youtube")?host="youtube":this.options.videom.includes("vimeo")&&(host="vimeo"),src=this.options.videod;else if(this.options.video_inside_media){const sources=this.options.videod.sources;let topQuality=null;sources.forEach(obj=>{obj.format==="mp4"&&(topQuality||(topQuality=obj),topQuality.height<obj.height&&(topQuality=obj))}),src=topQuality.url+"#t=0.001";const aspectRatioHeight=Math.floor(100/this.options.videod.aspect_ratio);this.options.videoRatio||(aspect_ratio=`100:${aspectRatioHeight}`)}else{host=this.options.videod.host;const aspectRatioHeight=Math.floor(100/this.options.videod.aspect_ratio);this.options.videoRatio||(aspect_ratio=`100:${aspectRatioHeight}`),host=="youtube"?src="https://www.youtube.com/watch?v="+this.options.videod.external_id:src=this.options.videod.external_id}if(host=="youtube")var type="video/youtube";else if(host=="vimeo")var type="video/vimeo";else var type="video/mp4";this.options.plh||(img_plh=!1);const tempAutoplay=this.options.viewport?"autoplay":!1,payload={aspectRatio:aspect_ratio,autoplay:tempAutoplay,muted:this.options.muted,loop:this.options.loop,controls:this.options.controls,poster:img_plh,preload:"metadata",playsinline:!0,responsive:!0,techOrder:[host],disablePictureInPicture:!0,controlBar:{playToggle:!0,captionsButton:!1,chaptersButton:!1,subtitlesButton:!1,remainingTimeDisplay:!0,pictureInPictureToggle:!1,volumeControl:!1,progressControl:{seekBar:!1},fullscreenToggle:!0,playbackRateMenuButton:!1},sources:[{type,src}]};var videoplayerID=this.element.querySelector("video");this.videoPlayer=videojs(videoplayerID,payload),this.videoPlayer.on("ready",function(){if(_this.element.querySelector(".videoHolder").style.display="block",_this.trueObserver==!1&&_this.options.pause&&_this.createObserver(),type==="video/vimeo")window.matchMedia("(min-width: 1025px)").addEventListener("change",_this.setVideoPadding.bind(this)),_this.setVideoPadding(),_this.element.classList.add("VimeoPlayer"),_this.element.querySelector("iframe").classList.add("vimeo-iframe");else if(type==="video/youtube"){const playBtn=_this.element.querySelector(".Video__PlayButton");playBtn&&(playBtn.style.display="none")}_this.videoReady=!0}),this.options.muted&&this.videoPlayer.muted("true"),this.options.controls&&this.videoPlayer.on("touchstart",function(event2){(event2.target.classList.contains("vjs-tech")||event2.target.parentElement.classList.contains("vjs-tech"))&&(this.paused()?this.play():this.pause())});const volumeControl=this.element.querySelector(".vjs-volume-panel");volumeControl.addEventListener("mouseenter",()=>{document.dispatchEvent(new CustomEvent("banner:disable",{bubbles:!0}))}),volumeControl.addEventListener("mouseleave",()=>{document.dispatchEvent(new CustomEvent("banner:enable",{bubbles:!0}))})}setVideoPadding(){if(this.element){const videoJs=this.element.querySelector(".video-js"),paddingTop=this.getPaddingInPercent(videoJs),vjsTech=this.element.querySelector(".vjs-tech");vjsTech.firstChild.style.paddingTop=paddingTop+"%"}}getPaddingInPercent(elem){const computedStyle=window.getComputedStyle(elem),pixelValue=parseFloat(computedStyle.paddingTop.replace("px","")),parentWidth=elem.parentElement.clientWidth;return pixelValue/parentWidth*100}createObserver(){const observer=new IntersectionObserver(this.handleIntersect.bind(this),{threshold:.2}),target=this.element;observer.observe(target),this.trueObserver=!0}
1handleIntersect(entries){entries.forEach(entry=>{if(entry.intersectionRatio===1||entry.isIntersecting==!0){if(!this.videoPlayer||!this.videoReady){if(this.checkLoaded(),this.options.viewport){const intervalId=setInterval(()=>{this.videoPlayer&&(this.options.muted?!this.firstTimePlaying&&!this.videoPlayer.muted()?this.videoPlayer.muted(!1):this.videoPlayer.muted("true"):this.firstTimePlaying&&!this.userInteracted&&this.videoPlayer.muted("true"),this.firstTimePlaying=!1,this.videoPlayer.play(),clearInterval(intervalId))},1e3)}return}this.options.viewport&&this.videoPlayer&&this.videoReady&&(this.options.muted?!this.firstTimePlaying&&!this.videoPlayer.muted()?this.videoPlayer.muted(!1):this.videoPlayer.muted("true"):this.firstTimePlaying&&!this.userInteracted&&this.videoPlayer.muted("true"),this.firstTimePlaying=!1,this.videoPlayer.play())}else(entry.intersectionRatio===0||entry.isIntersecting==!1)&&this.videoPlayer&&this.videoPlayer.el_.classList.contains("vjs-playing")&&this.options.pause&&this.videoPlayer.pause()})}}customElements.define("video-component",VideoComponent);class FooterComponent extends HTMLElement{constructor(){super(),this.element=this;let breakpoint=new Responsive().getCurrentBreakpoint();(breakpoint=="phone"||breakpoint=="tablet")&&(this.dropdown=new Dropdown(this.element))}}customElements.define("footer-component",FooterComponent);class DropdownSection extends HTMLElement{constructor(){super(),this.element=this,this.dropdown=new Dropdown(this.element)}}customElements.define("dropdown-section",DropdownSection);class ProductElement extends HTMLElement{constructor(){if(super(),this.element=this,this.domDelegate=new Delegate(this.element),this.carouselElement=this.element.querySelector(".mainSwiper"),this.carouselElementThumbs=this.element.querySelector(".ProductSlider--Thumbnails"),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.slides_number>1)if(this.options.show_thumbnails){this.carousel=new RevolutionSwiper(this.carouselElement,this.carouselElementThumbs);const _this=this;setTimeout(()=>{_this.carouselElementThumbs.style.maxHeight=this.element.querySelector(".ProductSliderCell").offsetHeight+"px"},200)}else this.carousel=new RevolutionSwiper(this.carouselElement);this.changeImageQuality(),this.valuesWrap=this.element.querySelectorAll(".ProductOption--ValusWrapper");var localPickup=this.element.querySelector("#LocalPickup");localPickup&&new Drawer(this.querySelector("#LocalPickup")),new AddToCart(this.element),new Dropdown(this.element.querySelector(".ProductInfo--Wrapper")),this.options.enable_zoom&&new RevolutionImageZoom(this.element,this.carousel);var selectBoxes=this.element.querySelectorAll(".RevolutionSelectbox");selectBoxes.length>0&&selectBoxes.forEach((item,i)=>{new RevolutionSelectbox(item)}),this.options.variant_image_id&&this.options.show_variant_image_on_load&&this.updateImage(),this.bindEvents(),new Responsive().matchesBreakpoint("pocket")&&window.addEventListener("scroll",()=>{const footer=document.querySelector(".mainFooter--Wrapper"),image=document.querySelector(".ProductSlider--Image"),footerRect=footer.getBoundingClientRect(),imageRect=image.getBoundingClientRect();footerRect.top>=window.innerHeight||footerRect.bottom<=0?document.querySelector(".pdpATC--desktop").style.display="block":document.querySelector(".pdpATC--desktop").style.display="none"}),window.addEventListener("resize",()=>{this.carouselElementThumbs.style.maxHeight=this.element.querySelector(".ProductSliderCell").offsetHeight+"px"})}bindEvents(){this.domDelegate.on("variant:changed",this.updateImage.bind(this))}updateImage(event2){if(event2)var imageID=event2.detail.new_image;else var imageID=this.options.variant_image_id;var selector="#Image--"+imageID,imageEl=this.element.querySelector(selector);imageEl&&this.carousel.selectCell(parseInt(imageEl.getAttribute("data-position")))}changeImageQuality(){var imageToReveal=null;if(imageToReveal=this.element.querySelector(".ProductSlider--ImageFirst"),imageToReveal!==null){const replaceUrl=imageToReveal.getAttribute("data-src").replace("{width}x","2600x");imageToReveal.src=replaceUrl}}}customElements.define("product-component",ProductElement);class VariantSelects extends HTMLElement{constructor(){super(),this.element=this,this.type=this.element.getAttribute("data-type"),this.productID=this.element.getAttribute("data-product-id"),this.delegateElement=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.bindEvents()}bindEvents(){this.delegateBody.on("quantity:changed",this.onQuantityChange.bind(this));var selectboxes=this.element.querySelectorAll("select, input");
1selectboxes.forEach(item=>{item.addEventListener("change",this.onVariantChange.bind(this))})}onQuantityChange(){this.updateOptions(),this.updateMasterId(),this.toggleAddButton()}onVariantChange(){this.updateOptions(),this.updateMasterId(),this.toggleAddButton(),this.updatePickupAvailability(),this.updateMedia(),this.updateURL(),this.updateVariantInput(),this.renderProductInfo()}updateOptions(){this.options=Array.from(this.querySelectorAll("select, input:checked"),select=>select.value)}updateMasterId(){this.currentVariant=this.getVariantData().find(variant=>(this.options,!variant.options.map((option,index)=>this.options[index]===option).includes(!1)))}updateMedia(){if(!this.currentVariant||!this.currentVariant.featured_media)return;const newMedia=this.currentVariant.featured_media.id;newMedia&&this.element.dispatchEvent(new CustomEvent("variant:changed",{bubbles:!0,detail:{new_image:newMedia}}))}updateURL(){this.currentVariant&&window.history.replaceState({},"",`${this.dataset.url}?variant=${this.currentVariant.id}`)}updateVariantInput(){document.querySelectorAll(`#product-form-${this.productID}, #product-form-installment`).forEach(productForm=>{const input=productForm.querySelector('input[name="id"]');input.value=this.currentVariant.id,input.dispatchEvent(new Event("change",{bubbles:!0}))})}updatePickupAvailability(){const pickUpAvailability=document.querySelector("pickup-availability");pickUpAvailability&&(this.currentVariant&&this.currentVariant.available?pickUpAvailability.fetchAvailability(this.currentVariant.id):(pickUpAvailability.removeAttribute("available"),pickUpAvailability.innerHTML=""))}renderProductInfo(){fetch(`${this.dataset.url}?variant=${this.currentVariant.id}&section_id=${this.dataset.section}`).then(response=>response.text()).then(responseText=>{const id=".ProductInfo--Prices",html=new DOMParser().parseFromString(responseText,"text/html"),destinations=document.querySelectorAll(id),source=html.querySelector(id);source&&destinations&&destinations.forEach(destination=>{destination.innerHTML=source.innerHTML});const quantityButton=document.querySelector(".QuantityHandler");if(quantityButton){const source2=html.querySelector(".QuantityHandler");source2&&quantityButton&&(quantityButton.innerHTML=source2.innerHTML)}this.toggleAddButton()})}toggleAddButton(){let quantity="";const addButton=document.querySelector(".ProductPage--ATC"),addButtonInner=addButton.querySelector(".SelfAlign"),quantityEl=document.querySelectorAll(".QuantitySelector__ProductQuantity");if(quantityEl&&(quantity=quantityEl.value),window.variantInfo.show_icon)var buySvg='<svg class="Svg Svg--basket mr-m" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.3778 3.53889C18.2731 3.40985 18.1161 3.33444 17.95 3.33334H6.38333L6.74444 4.44445H17.2222L15.7389 11.1111H7.40555L4.86666 3.07223C4.81092 2.89909 4.67396 2.76421 4.49999 2.71112L2.22221 2.01112C2.03167 1.95256 1.82437 2.00011 1.67839 2.13585C1.53241 2.27159 1.46994 2.47489 1.5145 2.66918C1.55906 2.86347 1.7039 3.01923 1.89444 3.07778L3.88888 3.68889L6.43888 11.7444L5.52777 12.4889L5.45555 12.5611C4.99065 13.0969 4.972 13.8874 5.4111 14.4445C5.71815 14.8179 6.18382 15.0239 6.66666 15H15.9389C16.2457 15 16.4944 14.7513 16.4944 14.4445C16.4944 14.1376 16.2457 13.8889 15.9389 13.8889H6.57777C6.44766 13.8844 6.32932 13.8123 6.26571 13.6988C6.2021 13.5852 6.20246 13.4466 6.26666 13.3333L7.60555 12.2222H16.1833C16.4481 12.2287 16.6807 12.0473 16.7389 11.7889L18.5 4.01112C18.5342 3.84328 18.4891 3.66904 18.3778 3.53889ZM15 18.3333C15.6903 18.3333 16.25 17.7737 16.25 17.0833C16.25 16.393 15.6903 15.8333 15 15.8333C14.3096 15.8333 13.75 16.393 13.75 17.0833C13.75 17.7737 14.3096 18.3333 15 18.3333ZM8.65555 17.0833C8.65555 17.7737 8.0959 18.3333 7.40555 18.3333C6.71519 18.3333 6.15555 17.7737 6.15555 17.0833C6.15555 16.393 6.71519 15.8333 7.40555 15.8333C8.0959 15.8333 8.65555 16.393 8.65555 17.0833Z" fill="#0C0C0C"/></svg>';else var buySvg="";if(addButton)if(quantity||(quantity=1),this.currentVariant.available==!1)addButton.setAttribute("disabled","disabled"),addButton.classList.add("ProductCard--Sold__Out"),addButtonInner.classList.add("u-pb1"),addButtonInner.innerHTML=buySvg+window.variantStrings.soldOut;else{if(addButton.removeAttribute("disabled"),addButton.classList.remove("ProductCard--Sold__Out"),window.variantInfo.show_price){var priceElement="<span class='u-pb1 ml-s'>"+Shopify.formatMoney(this.currentVariant.price*quantity,window.theme.moneyFormat);
1+"</span>"}else var priceElement="";addButtonInner.innerHTML=buySvg+window.variantStrings.addToCart+priceElement}}getVariantData(){return this.variantData=this.variantData||JSON.parse(this.querySelector('[type="application/json"]').textContent),this.variantData}}customElements.define("variant-selects",VariantSelects);class BlogSection extends HTMLElement{constructor(){super(),this.element=this,this.blogWrapper=this.element.querySelector("#BlogArticleWrapper"),this.blogElement=this.element.querySelectorAll(".BlogArticle"),this.options=JSON.parse(this.element.getAttribute("data-settings")),this.options.layout=="masonary"&&(window.addEventListener("resize",this.setupGetInspredGrid.bind(this)),document.addEventListener("DOMContentLoaded",this.setupGetInspredGrid.bind(this)))}setupGetInspredGrid(){const el=this.blogWrapper;if(el.length==0)return;var currentClientWidth=Math.max(document.body.offsetWidth,document.documentElement.offsetWidth,document.documentElement.clientWidth);const items=this.blogElement,lastItem=items[items.length-1];if(items.length==0)return;const itemWidth=parseFloat(window.getComputedStyle(lastItem).width);let maxItemHeight=lastItem.offsetHeight;const numberOfCols=Math.floor(currentClientWidth/itemWidth);let isSmall=!1,rowTemp=0,maxHeight=0;items.forEach((item,i)=>{let rowHeiht=0;const col=i%numberOfCols,row=Math.floor(i/numberOfCols);if(row>0){for(let i2=1;i2<=row;i2++){const preParalelIndex=col+(i2-1)*numberOfCols,paralelEl=items[preParalelIndex];rowHeiht=rowHeiht+paralelEl.offsetHeight,maxItemHeight=maxItemHeight<paralelEl.offsetHeight?paralelEl.offsetHeight:maxItemHeight}maxHeight=maxHeight<rowHeiht?rowHeiht:maxHeight}row!==rowTemp&&(rowTemp=row,isSmall=row%2!=0);const left=col*itemWidth,top=rowHeiht.toFixed(2);if(top!=="NaN"){const padding=isSmall?`${90+Math.random()*20}%`:`${110+Math.random()*40}%`;item.querySelector(".BlogItem--Wrapper").style.paddingTop=padding+"px";const myitem=item;myitem.style.cssText="left:"+left+"px;top:"+top+"px",isSmall=!isSmall}});var elHeight=parseInt(maxHeight)+parseInt(maxItemHeight);el.style.cssText="width:"+numberOfCols*itemWidth+"px;height:"+elHeight+"px;margin:auto"}}customElements.define("blog-section",BlogSection);class SearchBar extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.searchInputElement=this.element.querySelector('[name="q"]'),this.searchElement=this,this.searchResultsElement=this.element.querySelector(".searchWrapper");const isDesktop=new Responsive().matchesBreakpoint("lap-and-up");this.pageOverlayElement=isDesktop?document.querySelector(".pageOverlay"):this.element.querySelector(".searchOverlay"),this.options=JSON.parse(this.element.getAttribute("data-settings")||"{}"),this.initialSearchLayout=this.searchResultsElement?this.searchResultsElement.cloneNode(!0):null,this.clearSearchButton=this.element.querySelector(".searchInput--clear"),this.isOpen=!1,new AddToCart(this.element),window.theme&&window.theme.showRecentSearches&&this.getRecentSearches(),window.theme&&window.theme.showSuggestedSearches&&this.getSuggestedSearches(),this.element.querySelectorAll(".swiper").forEach(element=>new RevolutionSwiper(element)),this.searchInputElement&&document.documentElement.style.setProperty("--search-header-height",`${this.searchInputElement.offsetHeight+48}px`),this.bindEvents()}bindEvents(){this._onInputListener=this.debounce(this.onInput.bind(this),450),this.delegateElement.on("click",'[data-action="open-search"]',this.openSearch.bind(this)),this.delegateElement.on("click",'[data-action="clear-input"]',this.resetSearch.bind(this)),this.delegateElement.on("click",'[data-action="close-search"]',this.closeSearch.bind(this)),this.searchInputElement&&this.searchInputElement.addEventListener("input",this._onInputListener),this.delegateElement.on("click",'[data-action="search-string"]',this.onRecentSearchClick.bind(this)),this.delegateElement.on("click",'[data-action="search-string"]',this.onInput.bind(this)),this.delegateElement.on("keypress",'[data-action="search-string"]',this.onInput.bind(this)),this.delegateBody.on("close:search",this.closeSearch.bind(this))}initCarousel(){const carousel=this.searchResultsElement?this.searchResultsElement.querySelector("[data-swiper-settings]"):null;
1carousel&&(this.newCarousel=new RevolutionSwiper(carousel))}debounce(fn,delay){const _this=this;let timer=null;return function(){const args=Array.prototype.slice.call(arguments);clearTimeout(timer),timer=setTimeout(function(){fn.apply(_this,args)},delay)}}openSearch(event2){if(event2&&event2.preventDefault(),this.isOpen){this.closeSearch();return}if(!this.element){console.error("Search element not found");return}!this.element.querySelector(".searchSlide")&&this.options.product&&!this.options.collection&&this.loadRecommendations();const target=event2?event2.target:null,search=target&&target.parentElement?target.parentElement.querySelector(".search"):this.element.querySelector(".search");search&&search.setAttribute("aria-hidden",!1),this.pageOverlayElement&&this.pageOverlayElement.classList.add("is-visible"),window.bodyScrollLock&&this.element&&bodyScrollLock.disableBodyScroll(this.element.querySelector("[data-scrollable]"),bodyScrollLockOptions),document.body.classList.add("scrollLock"),document.body.classList.add("search-opened"),this.element&&this.element.dispatchEvent(new CustomEvent("menu:close",{bubbles:!0})),this.isOpen=!0,this.pageOverlayElement&&(this._boundOverlayClose=e=>this.closeSearch(e),this.pageOverlayElement.addEventListener("click",this._boundOverlayClose)),setTimeout(()=>{this.searchInputElement&&this.searchInputElement.focus()},200),requestAnimationFrame(()=>{document.querySelector(".header")?.classList.remove("Header--Transparent")})}closeSearch(event2){if(event2&&event2.preventDefault(),!this.isOpen)return;window.bodyScrollLock&&this.element&&bodyScrollLock.enableBodyScroll(this.element,bodyScrollLockOptions),document.body.classList.remove("scrollLock"),document.body.classList.remove("search-opened"),document.body.querySelectorAll(".search").forEach(item=>{item.setAttribute("aria-hidden",!0)}),this.pageOverlayElement&&(this.pageOverlayElement.classList.remove("is-visible"),this._boundOverlayClose&&(this.pageOverlayElement.removeEventListener("click",this._boundOverlayClose),this._boundOverlayClose=null));const headerSection=document.body.querySelector("#shopify-section-header");headerSection&&(headerSection.style.backgroundColor="transparent"),document.body.style.position="relative",document.body.style.width="100%",this.isOpen=!1}onInput(event2){this.allPredictiveSearchInstances=[],this.lastInputValue=event2&&event2.target?event2.target.value:"",this.searchResultsElement&&(this.searchResultsElement.style.opacity=0),this.clearSearchButton&&this.clearSearchButton.setAttribute("aria-hidden","false");const _this=this;if(event2&&event2.target&&event2.target.getAttribute("data-value")&&_this.lastInputValue===0){this.lastInputValue=event2.target.getAttribute("data-value");const el=_this.element.querySelector("searchInput");el&&(el.setAttribute("value",_this.lastInputValue),el.value=_this.lastInputValue)}else{if(event2&&event2.keyCode===13)return;if(this.lastInputValue===""){this.initialSearchLayout&&(this.initialSearchLayout.style.opacity=0),this.resetSearch();return}}fetch(`${routes.predictive_search_url}?q=${encodeURIComponent(this.lastInputValue)}&resources[limit_scope]=each&resources[options][fields]=title,product_type,variants.title,variants.sku,vendor,body,tag&section_id=search-predictive`,{}).then(response=>{if(!response.ok)throw new Error(response.status);return response.text()}).then(text=>{const section=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-search-predictive");if(!section)return;const resultsMarkup=section.innerHTML,wrapper=this.element.querySelector(".searchWrapper");wrapper&&(wrapper.innerHTML=resultsMarkup),this.initCarousel(),wrapper&&(wrapper.style.opacity=1),window.theme&&window.theme.showRecentSearches&&this.recentSearches()}).catch(error=>{if(!(error&&error.code===20))throw error})}loadRecommendations(){const _this=this,targetProduct=this.options.product,recommendationsUrl=`${window.Shopify?.routes?.route}recommendations/products?section_id=helper-search_suggested&product_id=${targetProduct}&limit=8`;return fetch(recommendationsUrl).then(response=>response.text().then(content=>{const container=document.createElement("div"),contentWrapper=document.createElement("div");contentWrapper.innerHTML=content,container.innerHTML=contentWrapper.innerHTML;const newSwiper=_this.element.querySelector(".searchInitial--Products");newSwiper&&(newSwiper.innerHTML=container.querySelector(".helper--searchSuggested")?.innerHTML||""),_this.initCarousel(),new AddToCart(this.element)}
1)).catch(error=>{console.error("Error loading recommendations:",error)})}resetSearch(){this.searchResultsElement&&this.initialSearchLayout&&(this.searchResultsElement.innerHTML=this.initialSearchLayout.innerHTML),this.searchInputElement&&(this.searchInputElement.value="",this.searchInputElement.removeAttribute("value")),window.theme&&window.theme.showRecentSearches&&this.getRecentSearches(),window.theme&&window.theme.showSuggestedSearches&&this.getSuggestedSearches(),this.options.product&&this.options.collection==""&&this.loadRecommendations(),this.initCarousel(),this.searchResultsElement&&(this.searchResultsElement.style.opacity=1),this.clearSearchButton&&this.clearSearchButton.setAttribute("aria-hidden","true")}recentSearches(){if(!this.lastInputValue||this.lastInputValue.length<=3)return;const searchTerm=JSON.parse(localStorage.getItem("searchTerms")||"[]");searchTerm.includes(this.lastInputValue)||searchTerm.unshift(this.lastInputValue);try{localStorage.setItem("searchTerms",JSON.stringify(searchTerm.slice(0,5)))}catch{}}getRecentSearches(){let appendString="";const items=JSON.parse(localStorage.getItem("searchTerms")||"[]"),elementToAdd=this.element.querySelector(".search--recentResults");!elementToAdd||items.length===0||(items.forEach(id=>{appendString+="<li tabIndex='0' data-action='search-string' class='u-p3' data-value='"+id+"'>"+id+"</li>"}),elementToAdd.innerHTML=appendString)}getSuggestedSearches(){let appendString="";const arr=this.options.items||[];if(arr.length===0)return;arr.sort(()=>.5-Math.random());const filtred=arr.filter(a=>!a.includes("_"));for(let i=0;i<5;i++)if(filtred[i]){let filteredResult=filtred[i].replace(":"," ").replace("-"," ");appendString+="<li tabindex='0' class='u-p3 hoverLinks' data-action='search-string' data-value='"+filteredResult+"'>"+filteredResult+"</li>"}const appElement=this.searchElement.querySelector(".Search--Suggested__results");appElement&&(appElement.innerHTML=appendString)}onRecentSearchClick(event2){const clickedSearchWord=event2&&event2.target?event2.target.getAttribute("data-value"):null;!clickedSearchWord||!this.searchInputElement||(this.searchInputElement.value=clickedSearchWord,this.searchInputElement.focus(),this.onInput({target:this.searchInputElement}))}}customElements.define("search-bar",SearchBar);class ContactSection extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.bindEvents(),this.toggleButton()}bindEvents(){this.delegateElement.on("change","[data-state='required']",this.toggleButton.bind(this))}toggleButton(){this.buttonState=!0;var allBoxes=this.element.querySelectorAll("[data-state='required']");allBoxes.forEach((item,i)=>{item.checked==!1&&(this.buttonState=!1)}),this.buttonState==!0?this.element.querySelector(".Contact-Btn").removeAttribute("disabled"):this.element.querySelector(".Contact-Btn").setAttribute("disabled",!0)}}customElements.define("contact-section",ContactSection);class LocalizationForm extends HTMLElement{constructor(){super(),this.elements={input:this.querySelector('input[name="language_code"], input[name="country_code"]')},this.querySelectorAll("a").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this)))}onItemClick(event2){event2.preventDefault();const form=this.querySelector("form");this.elements.input.value=event2.currentTarget.dataset.value,form&&form.submit()}}customElements.define("localization-form",LocalizationForm);class PickupAvailability extends HTMLElement{constructor(){super(),this.element=this,this.hasAttribute("available")&&this.fetchAvailability(this.dataset.variantId)}fetchAvailability(variantId){const variantSectionUrl=`${window.routes.localeRootUrl}/variants/${variantId}/?section_id=pickup`;fetch(variantSectionUrl).then(response=>response.text()).then(text=>{const sectionInnerHTML=new DOMParser().parseFromString(text,"text/html").querySelector(".shopify-section");this.renderPreview(sectionInnerHTML)}).catch(e=>{this.renderError()})}renderError(){}renderPreview(sectionInnerHTML){this.element.innerHTML="",this.element.appendChild(sectionInnerHTML.querySelector(".LocalPickup_--Wrapper")),sectionInnerHTML.querySelector("#LocalPickup")&&(this.element.appendChild(sectionInnerHTML.querySelector("#LocalPickup")),new Drawer(this.element.querySelector("#LocalPickup")))}}customElements.define("pickup-availability",PickupAvailability);class CartNote extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.textarea=this.element.querySelector("textarea"),this.button=this.element.querySelector(".CartNote--Submit"),this.noteSucess=this.element.querySelector(".cartNote--Success"),this.bindEvents()}bindEvents(){this.delegateElement.on("click","[data-action='update-note']",this.updateNote.bind(this)),this.delegateElement.on("click","[data-action='edit-note']",this.editNote.bind(this))}editNote(){this.textarea.removeAttribute("disabled"),this.button.innerText=window.cartStrings.enter_note,this.button.setAttribute("data-action","update-note"),this.textarea.focus(),this.noteSucess.style.visibility="hidden",this.noteSucess.style.opacity="0"}updateNote(){var _this=this;this.value=this.textarea.value,fetch(window.routes.localeRootUrl+"/cart/update.js",{body:JSON.stringify({note:this.value}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}}).then(function(response){if(response.ok){if(_this.value=="")return;_this.textarea.setAttribute("disabled","disabled"),_this.button.innerText=window.cartStrings.note_change,_this.button.setAttribute("data-action","edit-note"),_this.noteSucess.style.visibility="visible",_this.noteSucess.style.opacity="1"}})}}customElements.define("cart-note",CartNote);class NewsletterPopup extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.pageOverlayElement=document.querySelector(".pageOverlay"),this.options=JSON.parse(this.element.getAttribute("data-section-settings")),this.options.edit_mode?(this.options.delay=0,this.openNewsletter()):this.handleOpenOptions(),(window.location.href.indexOf("form_type=customer#popupForm")>-1||window.location.href.indexOf("customer_posted=true#popupForm")>-1)&&(this.options.delay=0,this.openNewsletter())}handleOpenOptions(){localStorage.getItem("popup-seen")!=="true"&&(this.options.scroll_amount>0?document.addEventListener("scroll",this.scrollListener):this.openNewsletter())}scrollListener=()=>{const body=document.body,html=document.documentElement,docHeight=Math.max(body.scrollHeight,body.offsetHeight,html.clientHeight,html.scrollHeight,html.offsetHeight);window.scrollY/docHeight*100>=this.options.scroll_amount&&this.openNewsletter()};openNewsletter(){document.removeEventListener("scroll",this.scrollListener),setTimeout(()=>{this.element.setAttribute("aria-hidden",!1),this.pageOverlayElement.classList.add("is-visible"),bodyScrollLock.disableBodyScroll(this.element,bodyScrollLockOptions),this.pageOverlayElement.addEventListener("click",this.closeNewsletter),localStorage.setItem("popup-seen",!0),this.delegateElement.on("click",'[data-action="close-modal"]',this.closeNewsletter)},1e3*this.options.delay)}closeNewsletter=()=>{this.element.setAttribute("aria-hidden",!0),this.pageOverlayElement.classList.remove("is-visible"),bodyScrollLock.clearAllBodyScrollLocks(),this.pageOverlayElement.removeEventListener("click",this.closeNewsletter),document.removeEventListener("scroll",this.scrollListener)}}customElements.define("newsletter-popup",NewsletterPopup);class SliderAnnouncementBar extends HTMLElement{constructor(){super(),this.element=this,this.options=JSON.parse(this.getAttribute("data-settings")),this.options.totalBlocks<6?this.animateBig=!1:this.animateBig=!0,this.options.totalBlocks>0&&this.options.enableAnimation&&(this.announcementBar1=this.element.querySelector("#announcementBar--SwiperWrapperOne"),this.announcementBar2=this.element.querySelector("#announcementBar--SwiperWrapperTwo"),this.slides=this.element.querySelectorAll(".announcementBar--Slide"),this.fadeToggle=!1,this.firstAnimation=!0,this.bindEvents())}bindEvents(){const mql=window.matchMedia("(min-width: 1025px)");mql.addEventListener("change",this.handleMediaQuery.bind(this)),this.handleMediaQuery(mql),this.element.addEventListener("mouseenter",()=>
1{this.handleTransparentHeader()})}handleMediaQuery(mql){mql.matches?this.handleBigAnimation():this.handleSmallAnimation()}updatePropertyHeight(){const AnnBarHeight=document.querySelector("#shopify-section-announcement_bar");let height=getComputedStyle(AnnBarHeight).height;document.documentElement.style.setProperty("--announcement-height",height)}toggleFade(){this.announcementBar2.style.display="flex",this.fadeToggle?(this.announcementBar1.classList.remove("fade-in"),this.announcementBar2.classList.add("fade-in")):(this.announcementBar1.classList.add("fade-in"),this.announcementBar2.classList.remove("fade-in")),this.fadeToggle=!this.fadeToggle}fadeBig(){this.announcementBar1.classList.add("fade-in"),this.slides.forEach(slide=>slide.style.visibility="visible"),this.animateBig&&(this.barsTimeout=setInterval(()=>this.toggleFade(),this.options.interval))}fadeSmall(){const mySlides=this.slides,numSlides=mySlides.length;let currentSlideIndex=0;const animate=()=>{currentSlideIndex>0&&mySlides[currentSlideIndex-1].classList.remove("fade-in"),mySlides[currentSlideIndex].classList.add("fade-in"),this.slidesTimeout=setTimeout(()=>{mySlides[currentSlideIndex].classList.remove("fade-in"),currentSlideIndex=(currentSlideIndex+1)%numSlides,animate()},this.options.interval)};animate()}stopFadeBig(){this.announcementBar1.style.display="none",this.announcementBar2.style.display="none",this.announcementBar1.classList.remove("fade-in"),this.announcementBar2.classList.remove("fade-in"),setTimeout(()=>{this.announcementBar1.style.display="flex",this.announcementBar2.style.display="flex"},100),clearTimeout(this.barsTimeout)}
1stopFadeSmall(){this.slides.forEach(slide=>{slide.classList.contains("fade-in")&&slide.classList.remove("fade-in")}),clearTimeout(this.slidesTimeout)}handleBigAnimation(){this.firstAnimation?(this.animateBig&&(this.announcementBar2.style.display="none"),this.fadeBig()):(this.stopFadeSmall(),this.announcementBar1.style.display="none",this.animateBig&&(this.announcementBar2.style.display="none"),setTimeout(()=>{this.announcementBar1.style.display="flex"},75),setTimeout(()=>{this.fadeBig()},150)),this.firstAnimation&&(this.firstAnimation=!this.firstAnimation),this.updatePropertyHeight()}handleSmallAnimation(){!this.firstAnimation&&this.animateBig&&this.stopFadeBig(),this.slides.forEach((slide,index)=>{index!==0&&(slide.style.display="none")}),setTimeout(()=>{this.fadeSmall(),this.slides.forEach((slide,index)=>{index!==0&&(slide.style.display="flex")}),this.firstAnimation&&(this.firstAnimation=!this.firstAnimation)},150),this.updatePropertyHeight()}handleTransparentHeader(){const header=document.querySelector("#header");document.querySelector(".search").getAttribute("aria-hidden")=="false"&&header.classList.remove("Header--Transparent")}}customElements.define("slider-announcement-bar",SliderAnnouncementBar);class SearchComposers extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.searchBar=this.element.querySelector("#searchBar"),this.mobile=!1,this.lastTarget=null,this.mql=window.matchMedia("(min-width: 1025px)"),this.mql.addEventListener("change",this.handleMediaQuery.bind(this)),this.handleMediaQuery(this.mql)}handleMediaQuery(mql){mql.matches?(this.bindDesktopEvents(),this.unbindMobileEvents()):(this.bindMobileEvents(),this.unbindDesktopEvents())}bindMobileEvents(){this.searchBind=this.search.bind(this),this.mobileClickBind=this.mobileClick.bind(this),this.mobileSwipeBind=this.mobileSwipe.bind(this),this.delegateElement.on("input",'[data-action="searchItem"]',this.searchBind),this.delegateElement.on("click",".mobile-letters",this.mobileClickBind),this.delegateElement.on("touchmove",".mobile-letters",this.mobileSwipeBind)}unbindMobileEvents(){this.delegateElement.off("click",".mobile-letters",this.mobileClickBind),this.delegateElement.off("touchmove",".mobile-letters",this.mobileSwipeBind)}bindDesktopEvents(){this.searchBind=this.search.bind(this),this.scrollToBind=this.scrollTo.bind(this),this.delegateElement.on("keyup",'[data-action="searchItem"]',this.searchBind),this.delegateElement.on("click",'[data-action="scrollToLetter"]',this.scrollToBind)}unbindDesktopEvents(){this.delegateElement.off("keyup",'[data-action="searchItem"]',this.searchBind),this.delegateElement.off("click",'[data-action="scrollToLetter"]',this.scrollToBind)}mobileClick(e){this.scrollTo(e)}mobileSwipe(e){const touchX=e.touches[0].clientX,touchY=e.touches[0].clientY,currentTarget=document.elementFromPoint(touchX,touchY);if(currentTarget.classList.contains("mobile-letter")&&currentTarget!==this.lastTarget){this.lastTarget=currentTarget;let letter=currentTarget.innerText,block_offset=this.element.querySelector("#"+letter).offsetTop;const mobileLetters=this.element.querySelector(".mobile-letters");Array.from(mobileLetters.children).forEach(letter2=>{letter2.classList.remove("activeLetter")}),currentTarget.classList.add("activeLetter"),window.scrollTo({top:block_offset-120,behavior:"smooth"})}}search(){console.log("here");let input=this.searchBar.value;input=input.toLowerCase();let searchableItems=this.element.querySelectorAll(".searchableItem");console.log("here");for(let i=0;i<searchableItems.length;i++)searchableItems[i].innerText.toLowerCase().includes(input)?searchableItems[i].style.display="flex":searchableItems[i].style.display="none"}scrollTo(event2){let letter=event2.target.innerText,block_offset=this.element.querySelector("#"+letter).offsetTop,focus=this.element.querySelector("[data-scrollable]");const mobileLetters=this.element.querySelector(".mobile-letters");var allLetters,mobile;if(mobileLetters!=event2.target.parentElement?allLetters=this.element.querySelectorAll('[data-action="scrollToLetter"]'):(mobile=!0,allLetters=Array.from(mobileLetters.children)),allLetters.forEac
1h(letter2=>{letter2.classList.remove("activeLetter")}),event2.target.classList.add("activeLetter"),focus&&mobileLetters!=event2.target.parentElement){let focus_offset=focus.offsetTop;focus.scrollTo({top:block_offset-focus_offset,behavior:"smooth"})}else window.scrollTo({top:block_offset-(mobile?120:80),behavior:"smooth"})}}customElements.define("search-composers",SearchComposers);class TermsDropdown extends HTMLElement{constructor(){super(),this.element=this,new Dropdown(this.element)}}customElements.define("terms-dropdown",TermsDropdown);class SwiperInit extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element);const swiper=this.element.querySelector(".swiper");new RevolutionSwiper(swiper)}}customElements.define("swiper-init",SwiperInit);class BlogSlider extends HTMLElement{constructor(){if(super(),this.element=this,this.carouselElement=this.element.querySelector(".swiper"),this.carousel=new RevolutionSwiper(this.carouselElement),this.paddingMobileElem=this.element.querySelector(".paddingMobile"),this.paddingDeskElem=this.element.querySelector(".paddingDesktop"),this.swiperTags=JSON.parse(this.getAttribute("data-swiper-tags")),this.noTags=this.element.querySelector(".noTags"),this.firstLoad=!0,this.element.querySelector(".sortByDate")&&(this.dateSortLinks=this.element.querySelectorAll(".articleEventDate"),this.dateSortLinks.forEach(date=>{date.addEventListener("click",this.getEventsOfMonth.bind(this))})),this.swiperTags){var allString=this.element.querySelector(".allTag");allString&&(allString=allString.innerHTML),this.swiperTags.tags.splice(0,0,allString),this.setDesktopWrappers(),document.addEventListener("clickedTag",this.handleTagClicked.bind(this));const mql=window.matchMedia("(max-width: 1024px)");mql.addEventListener("change",this.handleMediaQuery.bind(this)),this.handleMediaQuery(mql)}}handleMediaQuery(mql){mql.matches?this.mobile=!0:this.mobile=!1,this.noTags?this.sortByDate():this.handleTagClicked()}setDesktopWrappers(){this.element.querySelectorAll(".CalendarShowcase--DesktopWrapper").forEach(container=>{const children=container.querySelectorAll("li").length,rows=Math.ceil(children/3);container.style.gridTemplateRows=`repeat(${rows}, 1fr)`}),this.carouselElement.swiper.update()}handleTagClicked(event2){const activeSlideIndex=this.carouselElement.swiper.activeIndex,activeSlide=this.carouselElement.swiper.slides[activeSlideIndex];let tagText;event2?tagText=event2.detail.toLowerCase():tagText=this.element.querySelector("blog-tag-slider .currentTag").innerHTML.trim().toLowerCase();const index=this.swiperTags.tags.findIndex(tag=>tag.toLowerCase()===tagText),nextSlide=this.carouselElement.swiper.slides[index];this.firstLoad?this.firstLoad=!1:this.element.querySelectorAll(".CalendarShowcase--BlogArticle").forEach(article=>article.style.opacity=1),index!==-1&&(activeSlide.classList.remove("fade-in"),nextSlide.classList.add("fade-in"),this.carouselElement.swiper.slideTo(index,0),this.swiperInit&&this.clearSwiper(this.swiper),this.sortByDate())}sortByDate(){const activeSlideIndex=this.carouselElement.swiper.activeIndex,activeSlide=this.carouselElement.swiper.slides[activeSlideIndex],swiperElement=activeSlide.children[0],deskWrapper=activeSlide.children[1],sortedArticles=Array.from(deskWrapper.querySelectorAll(".CalendarShowcase--BlogArticle")).map(articleElement=>{if(articleElement.querySelector(".articleEventDate p")){const dateParts=articleElement.querySelector(".articleEventDate p").textContent.trim().split("."),formattedDate=new Date(`${dateParts[2]}-${dateParts[1]}-${dateParts[0]}`);return{element:articleElement,date:new Date(formattedDate)}}else return{element:articleElement,date:new Date(1e3,1,1)}}).sort((a,b)=>a.date-b.date).slice(0,this.swiperTags.postLimit);for(;deskWrapper.firstChild;)deskWrapper.removeChild(deskWrapper.firstChild);sortedArticles.forEach(sortedArticle=>{deskWrapper.appendChild(sortedArticle.element)}),this.responsive(deskWrapper,swiperElement,sortedArticles)}responsive(deskWrapper,swiperElement,sortedArticles){this.mobile?(deskWrapper.style.display="none",new Swiper(".swiper-slide-active .CalendarShowcase--InnerSwiper",{slidesPerView:1.525,spaceBetween:16,slidesOffsetBefore:16,slidesOffsetAfter:16,breakpoints:{375:{slidesPerView:1.525,spaceBetween:16,slidesOffsetBefore:16,slidesOffsetAfter:16}}}
1),this.swiper=swiperElement.swiper,sortedArticles.forEach(sortedArticle=>{sortedArticle.element.style.display="block",this.swiper.appendSlide(this.createNewSlide(sortedArticle.element))}),swiperElement.style.display="block",this.swiperInit=!0):(window.theme.enableAnimations&&this.element.querySelectorAll(".CalendarShowcase--BlogArticle").forEach(article=>article.style.opacity=0),swiperElement.style.display="none",this.swiperInit&&this.clearSwiper(this.swiper),deskWrapper.style.display=""),this.carouselElement.swiper.update()}createNewSlide(elem){const newSlide=document.createElement("div");return newSlide.classList.add("swiper-slide"),newSlide.innerHTML=elem.outerHTML,newSlide}clearSwiper(swiper){const wrapperEl=swiper.wrapperEl;for(;wrapperEl.firstChild;)wrapperEl.removeChild(wrapperEl.firstChild);swiper.destroy(!0,!1),this.swiperInit=!1}getEventsOfMonth(event2){event2.preventDefault();const targetMonth=event2.target.innerHTML.split(".")[1],activeSlideIndex=this.carouselElement.swiper.activeIndex,activeSlide=this.carouselElement.swiper.slides[activeSlideIndex],articleElements=Array.from(activeSlide.querySelectorAll(".CalendarShowcase--BlogArticle")),filteredArticles=articleElements.filter(articleElement=>articleElement.querySelector(".articleEventDate p")?articleElement.querySelector(".articleEventDate p").textContent.trim().split(".")[1]===targetMonth:!1);articleElements.forEach(articleElement=>{articleElement.style.display="none"}),filteredArticles.forEach(filteredArticle=>{filteredArticle.style.display="block"}),this.sortByDate();const clickedDateEvent=new CustomEvent("clickedDate");document.dispatchEvent(clickedDateEvent)}}customElements.define("blog-slider",BlogSlider);class FAQSection extends HTMLElement{constructor(){super();let foundOne=!1;const none2=document.getElementById("none");this.element=this,this.clearBtn=this.querySelector(".clearSeacrh"),this.delegateElement=new Delegate(this);const searchInput=document.querySelector('input[rel="searchbox"]');this.data=document.querySelectorAll(".Faq-Section"),this.show(!1);const _this=this,links=document.querySelectorAll(".FAQNav--rowLink");links.forEach(link=>{link.addEventListener("click",function(){links.forEach(link2=>{link2.classList.remove("active");let changeFont=link2.querySelector(".nav--name");changeFont.classList.remove("u-s3"),changeFont.classList.add("u-p3")}),this.classList.add("active");const activeNavName=this.querySelector(".nav--name");activeNavName.classList.remove("u-p3"),activeNavName.classList.add("u-s3")})}),searchInput.addEventListener("input",function(event2){_this.show(!1),foundOne=!1,_this.clearBtn.style.display="none";const input=event2.target;if(input.value){_this.clearBtn.style.display="flex";const toMatch=input.value.toLowerCase();for(let i=0,len=_this.data.length;i<len;i++){const match=_this.data[i].innerHTML.toLowerCase().includes(toMatch);_this.data[i].style.display=match?"block":"none",match&&(foundOne=!0)}foundOne?_this.querySelector(".faq--group").style.display="flex":(_this.show(!0),_this.querySelector(".faq--group").style.display="none")}else _this.resetState()}),this.bindEvents()}bindEvents(){this.delegateElement.on("click",'[data-action="nav-clicked"]',this.handleNavClicked.bind(this))}faqSearch(){let faqs=document.querySelectorAll(".Faq-section_content"),search_query=document.getElementById("searchbox").value;for(var i=0;i<faqs.length;i++)faqs[i].textContent.toLowerCase().includes(search_query.toLowerCase())?faqs[i].classList.remove("is-hiddenz"):faqs[i].classList.add("is-hiddenz")}resetState(){for(let i=0,len=this.data.length;i<len;i++)this.data[i].style.display="block";this.show(!1),this.inputValue=this.querySelector("#searchbox"),this.inputValue.value="",this.clearBtn.style.display="none",new Responsive().matchesBreakpoint("lap-and-up")?this.querySelector(".faq--group").style.display="flex":this.querySelector(".faq--group").style.display="block"}show(bool){none.style.display=bool?"block":"none"}}customElements.define("faq-section",FAQSection);class collectionShowcase extends HTMLElement{constructor(){if(super(),this.element=this,this.delegateElement=new Delegate(this.element),new Responsive().matchesBreakpoint("pocket")){const swiper=this.element.querySelector(".swiper");new RevolutionSwiper(swiper)}else document.querySelectorAll(".collectionShowcase *").forEach(element=>{element.classList.remove("swiper","swiper-wrapper","swiper-slide")});this.breakpoint=new Responsive().matchesBreakpoint("lap-and-up"),this.bindEvents()}bindEvents(){this.breakpoint&&this.delegateElement.on("mouseover",'[data-action="toggle-image"]',this.changeImage.bind(this))}changeImage(event2){let activeImage=event2.target.getAttribute("data-src");this.element.querySelector(".changeImage").remove();const img=document.createElement("img");img.src=activeImage,img.classList.add("changeImage"),this.element.querySelector(".changeImage-box").append(img);let active_title=this.element.querySelector(".desktop-title-active");active_title&&(active_title.classList.add("desktop-title"),active_title.classList.remove("desktop-title-active")),event2.target.classList.remove("desktop-title"),event2.target.classList.add("desktop-title-active")}}customElements.define("collection-showcase",collectionShowcase);class SliderQuoteSection extends HTMLElement{constructor(){super(),this.element=this,this.carouselElement=this.element.querySelector(".swiper"),this.carousel=new RevolutionSwiper(this.carouselElement),this.swiper=this.carousel.swiperElement,this.parseQuotes(),this.createIntersection(),this.swiper.on("slideChange",this.updateQuote.bind(this))}createIntersection(){new IntersectionObserver(entries=>
1{entries.forEach(entry=>{this.updateQuote()})}).observe(this.element)}updateQuote(){var keyframesReg=[{color:"var(--secondary_grey)"},{color:"var(--text_1)"}],keyframesLink=[{color:"#98B8EC"},{color:"var(--details_1)"}],keyframesRegOld=[{color:"var(--secondary_grey)"}],keyframesLinkOld=[{color:"#98B8EC"}],options={duration:200,easing:"linear",fill:"forwards"},optionsOld={duration:300,fill:"forwards"},delay=0;if(this.currentSlide){var words=this.currentSlide.querySelectorAll(".Quote--Letter");words.forEach(function(elem){elem.closest("a")?elem.classList.contains("Quote--Punctuation")?elem.animate(keyframesRegOld,optionsOld):elem.animate(keyframesLinkOld,optionsOld):elem.animate(keyframesRegOld,optionsOld)})}if(this.currentSlide=this.swiper.slides[this.swiper.activeIndex],!!this.currentSlide){var letters=this.currentSlide.querySelectorAll(".Quote--Letter");letters.forEach(function(elem){elem.closest("a")?elem.classList.contains("Quote--Punctuation")?(options.delay=delay,elem.animate(keyframesReg,options),delay+=20):(options.delay=delay,elem.animate(keyframesLink,options),delay+=20):(options.delay=delay,elem.animate(keyframesReg,options),delay+=20)})}}parseQuotes(){this.element.querySelectorAll(".Quote--Text").forEach(elem=>{const text=elem.innerHTML,regex=/(<a[^>]+>[^<]+<\/a>)|\b[\w'-’]+(?:'\w+)?\b/g,matches=[...text.matchAll(regex)],wordsSplit=[],links=[];let position=-1;matches.forEach(match=>{const item=match[0];if(item.startsWith("<a")){const hrefMatch=/href="([^"]+)"/.exec(item),href=hrefMatch?hrefMatch[1]:"";item.replace(/<\/?a[^>]*>/g,"").trim().split(/\s+/).forEach(word=>{links.push({word,href,position}),position++})}else wordsSplit.push({word:item,position}),position+=item.split(" ").length});const words=elem.textContent.trim().split(" ");elem.innerHTML=words.map((word,position2)=>{const cleanWord=word.replace(/^\W+|\W+$/g,""),matchingLink=links.find(match=>match.word.includes(cleanWord)&&match.position===position2);if(matchingLink){let letters="";for(let i=0;i<word.length;i++)/[“”".,:;]/.test(word[i])?letters+=`<span class="Quote--Letter Quote--Punctuation u-h1">${word[i]}</span>`:letters+=`<span class="Quote--Letter u-h1">${word[i]}</span>`;return`<a class="Quote--Word" href="${matchingLink.href}">${letters}</a>`}else{let letters="";for(let i=0;i<word.length;i++)letters+=`<span class="Quote--Letter u-h1">${word[i]}</span>`;return'<span class="Quote--Word">'+letters+" </span>"}}).join(" ")})}removeQuotationMarks(str){return str.length>0&&str.charAt(0)==="\u201C"&&str.charAt(str.length-2)==="\u201D"?str.substring(1,str.length-1):str}}customElements.define("slider-quote",SliderQuoteSection);class BlogTagSlider extends HTMLElement{constructor(){super(),this.element=this,this.carouselElement=this.element.querySelector(".swiper"),this.carousel=new RevolutionSwiper(this.carouselElement),this.element.querySelector(".immediateLink")&&this.element.querySelectorAll(".Tag--Bullet").forEach(tagBullet=>{tagBullet.addEventListener("click",this.handleTagClick.bind(this))}),document.addEventListener("clickedDate",this.clearCurrentTag.bind(this))}handleTagClick(event2){const clickedBulletHTML=event2.target.innerHTML;var index=event2.target.getAttribute("aria-label");index=index.charAt(0),this.clearCurrentTag(),this.carousel.swiperElement.slideTo(index-1),event2.currentTarget.classList.add("currentTag");const clickedTagEvent=new CustomEvent("clickedTag",{detail:clickedBulletHTML});document.dispatchEvent(clickedTagEvent)}clearCurrentTag(){const prevActiveTag=this.element.querySelector(".Tag--Bullet.currentTag");prevActiveTag&&prevActiveTag.classList.remove("currentTag")}}customElements.define("blog-tag-slider",BlogTagSlider);class BlogSectionCustom extends HTMLElement{constructor(){super(),this.element=this,this.blogWrapper=this.element.querySelector("#BlogArticleWrapperCustom"),this.blogArticles=this.element.querySelectorAll(".BlogArticleCustom"),this.blogItemImages=this.element.querySelectorAll(".BlogItem--Image"),this.options=JSON.parse(this.element.getAttribute("data-settings")),this.options.layout=="masonary"&&(this.blogWrapper.style.flexFlow="column wrap",window.addEventListener("resize",()=>{window.innerWidth>=768?this.setWrapperHeightDesktop():this.setWrapperHeightMobile()}),document.addEventListener("DOMContentLoaded",()=>{window.innerWidth>=768?this.setWrapperHeightDesktop():this.setWrapperHeightMobile()}
1))}setWrapperHeightMobile(){const blogWrapper=this.blogWrapper,articles=this.blogArticles,numColumns=2;let rowHeights=[],currentRowHeight=0;articles.forEach((article,i)=>{article.style.order=0;const articleHeight=article.offsetHeight;i%numColumns===0?(currentRowHeight>0&&rowHeights.push(currentRowHeight),currentRowHeight=articleHeight):currentRowHeight=Math.max(currentRowHeight,articleHeight),i===articles.length-1&&rowHeights.push(currentRowHeight)});for(let i=0;i<articles.length;i+=2)i%4===2?(articles[i].style.order=2,i==articles.length-1&&articles.length%2!=0||(articles[i+1].style.order=1)):(articles[i].style.order=1,i==articles.length-1&&articles.length%2!=0||(articles[i+1].style.order=2));articles.length===3&&this.options.big_article==!0&&(articles[0].style.order=1,articles[1].style.order=2,articles[2].style.order=1);const totalHeight=rowHeights.reduce((sum,height)=>sum+height,0);blogWrapper.style.height=`${totalHeight+(rowHeights.length-1)*17+10}px`}setWrapperHeightDesktop(){const blogWrapper=this.blogWrapper,articles=this.blogArticles,articlesLength=articles.length;let rowNum=Math.ceil(articles.length/3);articlesLength%3===1&&(articles[articlesLength-2].style.paddingBottom="128px"),articlesLength===2&&(blogWrapper.style.flexFlow="initial");let article,wrapperHeight=0;for(let i=0;i<articles.length;i+=3)article=articles[i],(articlesLength===3||articlesLength===2)&&(article=articles[1]),wrapperHeight+=article.offsetHeight,articles[i].style.order=1,i==articlesLength-1&&articlesLength%3!=0||(articles[i+1].style.order=2,i+1==articlesLength-1&&articlesLength%3!=0||(articles[i+2].style.order=3));blogWrapper.style.height=wrapperHeight+(rowNum-1)*32+1+"px"}}customElements.define("blog-section-custom",BlogSectionCustom);class LocalizationSelectors extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element);let breakpoint=new Responsive().getCurrentBreakpoint();var selectBoxes=this.element.querySelectorAll(".RevolutionSelectbox"),location2=this.element.getAttribute("data-settings");if(this.delegateElement.on("change",'[data-action="country-change"]',this.submitForm.bind(this)),location2=="sidebarMenu")var additionalOverlay=!0;else var additionalOverlay=!1;breakpoint!="phone"&&breakpoint!="tablet"?selectBoxes.length>0&&selectBoxes.forEach((item,i)=>{new RevolutionSelectbox(item)}):selectBoxes.length>0&&selectBoxes.forEach((item,i)=>{new RevolutionSelectbox(item,!0,additionalOverlay)})}submitForm(){event.target.closest("form").submit()}}customElements.define("localization-selectors",LocalizationSelectors);class FavoritesDrawer extends HTMLElement{static rendered=!1;constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.sidebarDrawer=new Drawer(this.element),this.delegateBody=new Delegate(document.body),this.options=JSON.parse(this.element.getAttribute("data-settings")),this.loader=this.element.querySelector(".spinningLoader"),this.cartCount=document.querySelector(".FavoritesCount"),this.loadRecommendations(),this.toggleFavorites(),this.bindEvents();const openFavourites=!1,keepScroll=!0;if(FavoritesDrawer.rendered)return;const _this=this;this.rerenderFavorites(openFavourites,keepScroll).then(function(){new AddToCart(_this.element),FavoritesDrawer.rendered=!0})}unbindEvents(){document.removeEventListener("favorite-product:open",this.onFavoritesOpenListener),document.removeEventListener("click",this._addToFavoritesL)}bindEvents(){document.body.classList.contains("listener")||(this.onFavoritesOpenListener=this.onFavoritesOpen.bind(this),this._addToFavoritesL=this.addToFavorites.bind(this),this.delegateBody.on("click",'[data-action="toggle-favorites"]',this._addToFavoritesL),document.body.classList.add("listener"),document.addEventListener("favorite-product:open",this.onFavoritesOpenListener),document.addEventListener("favorites:toggle",this.toggleFavorites.bind(this)))}onFavoritesOpen(){this.sidebarDrawer.isOpen=!0}maxHeight(){var footer=this.element.querySelector(".CartDrawer--Footer");if(footer)var footerH=footer.offsetHeight;this.element.querySelector(".CartItems--Wrapper").style.height=window.innerHeight-footerH+"px"}getSearchQueryStrings(){var items=JSON.parse(localStorage.getItem("productFavorites")||"[]");const bucketSize=10,idBuckets=[];
1return items.forEach((id,index)=>{const key=Math.floor(index/bucketSize);idBuckets[key]||(idBuckets[key]=[]),idBuckets[key].push(id)}),idBuckets.reduce((acc,vall)=>{const string=vall.map(function(id){return"id:"+id}).join(" OR ");return acc.push(string),acc},[])}rerenderFavorites(openfavorites,keepScroll){this.loader.classList.add("is-visible");var _this32=this,queryStrings=this.getSearchQueryStrings();const promises=[];return queryStrings.length==0&&!openfavorites?(this.loader.classList.remove("is-visible"),fetch("/?section_id=favorites-drawer").then(function(content){content.text().then(function(html){_this32.replaceContentFav(html),_this32.loader.classList.remove("is-visible"),_this32.loadRecommendations()})})):this.loader.classList.remove("is-visible"),queryStrings.forEach(string=>{promises.push(fetch("/search?view=favorites&type=product&q="+string,{credentials:"same-origin",method:"GET"}))}),promises.reduce(async(acc,val,index)=>{const content=await val.then(response=>response.text());this.element.length?this.loader.classList.remove("is-visible"):(_this32.replaceContentFav(content,keepScroll),_this32.loader.classList.remove("is-visible"),_this32.maxHeight())},Promise.resolve()),Promise.resolve()}replaceContentFav(html,keepScroll){var tempElement=document.createElement("div");tempElement.innerHTML=html;var number=tempElement.querySelector(".countFav").getAttribute("data-count"),cartNodeParent=this.element.querySelector(".CartDrawer");if(cartNodeParent.replaceChild(tempElement.querySelector("#cartData"),this.element.querySelector("#cartData")),this.toggleFavorites(),this.loader.classList.remove("is-visible"),!keepScroll)return!0}toggleFavorites(){var items=JSON.parse(localStorage.getItem("productFavorites")||"[]"),favorites=document.querySelectorAll(".ProductCard--Favorites");document.body.querySelector(".emptyHearth")&&(items.length>0?(document.body.querySelector(".emptyHearth").style.display="none",document.body.querySelector(".brokenHearth").style.display="flex"):(document.body.querySelector(".emptyHearth").style.display="flex",document.body.querySelector(".brokenHearth").style.display="none")),favorites.forEach(function(item){var state=item.querySelector(".ProductCard--FavoritesHolder").getAttribute("state"),myID=item.querySelector(".ProductCard--FavoritesHolder").getAttribute("data-id");state=="not-active"&&items.includes(myID)?(item.querySelector(".brokenHearth").style.display="flex",item.querySelector(".emptyHearth").style.display="none",item.querySelector(".ProductCard--FavoritesHolder").setAttribute("state","active")):items.includes(myID)||(item.querySelector(".brokenHearth").style.display="none",item.querySelector(".emptyHearth").style.display="flex",item.querySelector(".ProductCard--FavoritesHolder").setAttribute("state","not-active"))})}removeFromFavorites(productId){var items=JSON.parse(localStorage.getItem("productFavorites")||"[]");items=items.filter(c=>c!=productId);try{localStorage.setItem("productFavorites",JSON.stringify(items.slice(0,50)))}catch(error){console.log(error)}var _this=this;this.toggleFavorites(),this.rerenderFavorites(!1,!1).then(function(){new AddToCart(_this.element)})}loadRecommendations(){var _this=this;if(this.options.productId=="")var url="?section_id=fav-recommendations";else var url=window.Shopify?.routes?.route+"recommendations/products?section_id=fav-recommendations&product_id="+this.options.productId+"&limit=10";return fetch(url).then(function(response){return response.text().then(function(content){var container=document.createElement("div");if(container.innerHTML=content,container){var z=container.querySelector(".favUpsell").innerHTML,x=_this.element.querySelector(".FavoritesRecommendations");x!=null&&(x.innerHTML=z)}const swiper=new Swiper(".swiperUpsell",{slidesPerView:2.185,spaceBetween:16,navigation:!1,loop:!1,slidesOffsetAfter:16,slidesOffsetBefore:16,navigation:{nextEl:".swiperNextId--favorites-drawer",prevEl:".swiperPrevId--favorites-drawer"},pagination:{el:".favoritePaginatio",type:"bullets"},breakpoints:{1024:{slidesPerView:2.68,spaceBetween:16,slidesOffsetAfter:32,slidesOffsetBefore:32}}});new AddToCart(x),_this.toggleFavorites(),_this.element.querySelector(".swiperFavorites")?.classList.add("is-visible"),window.theme.enableImageAnimations&&new RevolutionAnimation(_this.element)})})}addToFavorites(event2){var _this=this;event2.preventDefault();var items=JSON.parse(localStorage.getItem("productFavorites")||"[]"),productId=event2.target.getAttribute("data-id");if(!items.includes(productId)&&productId!="")items.unshift(productId);else{this.removeFromFavorites(productId,!1);return}try{localStorage.setItem("productFavorites",JSON.stringify(items.slice(0,50))),this.toggleFavorites(),this.rerenderFavorites(!1,!0),this.sidebarDrawer.isOpen==!0&&this.rerenderFavorites().then(function(){new AddToCart(_this.element)})}catch{}}}customElements.define("favorites-drawer",FavoritesDrawer);class AccountHandler extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.drawer=new Drawer(this.element.querySelector("#accountDrawer")),this.bindEvents()}bindEvents(){this.delegateElement.on("click",'[data-action="toggle-tab"]',this.toggleTab.bind(this)),this.delegateElement.on("click",'[data-action="submit-login"]',this.submitLogin.bind(this)),this.delegateElement.on("click",'[data-action="submit-register"]',this.submitRegistration.bind(this)),this.delegateElement.on("click",'[data-action="toggle-recovery"]',this.toggleRecovery.bind(this)),this.delegateElement.on("keypress",'[data-action="submit-input-login"]',this.accountInputSubmit.bind(this)),this.delegateElement.on("keypress",'[data-action="submit-input-reg"]',this.accountInputSubmitReg.bind(this))}accountInputSubmitReg(event2){event2.key==="Enter"&&this.submitRegistration(event2)}accountInputSubmit(event2){event2.key==="Enter"&&this.submitLogin(event2)}toggleRecovery(event2){event2.preventDefault();const id=event2.target.dataset.id,recoverContent=this.element.querySelector("#recoverFlex"),loginContent=this.element.querySelector("#loginFlex"),recoveryTrigger=this.element.querySelector('[data-id="recoverFlex"]');id=="recoverFlex"?(recoverContent.hidden=!1,loginContent.hidden=!0,recoveryTrigger?.setAttribute("aria-expanded","true")):(recoverContent.hidden=!0,loginContent.hidden=!1,recoveryTrigger?.setAttribute("aria-expanded","fal
1se"))}submitRegistration(event2){const _this=this,registrationEndpoint="/account",requestBody={customer:{first_name:this.element.querySelector("#register #RegisterForm-FirstName").value,last_name:this.element.querySelector("#register #RegisterForm-LastName").value,email:this.element.querySelector("#register #RegisterForm-email").value,password:this.element.querySelector("#register #RegisterForm-password").value}};(async function(){try{if(window.hcaptcha){const captchaToken=await window.hcaptcha.execute(null,{async:!0});requestBody["h-captcha-response"]=captchaToken.response}const responseText=await(await fetch(registrationEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(requestBody)})).text();if(responseText.indexOf("registerErrors")!==-1){console.log("Error occurred during registration");const tempDiv=document.createElement("div");tempDiv.innerHTML=responseText,_this.element.querySelector("#register .accountDrawer--ErrorSpace").innerHTML=tempDiv.querySelector(".registerErrors").innerHTML}else location.href=window.routes.account_url}catch(error){console.log("An error occurred during the registration request:",error)}})()}submitLogin(event2){event2.preventDefault();const _this=this,loginEndpoint="/account/login";console.log();const requestBody={customer:{email:this.element.querySelector("#customer_login #CustomerEmail").value,password:this.element.querySelector("#customer_login #CustomerPassword").value}};(async function(){try{if(window.hcaptcha){const captchaToken=await window.hcaptcha.execute(null,{async:!0});requestBody["h-captcha-response"]=captchaToken.response}const responseText=await(await fetch(loginEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(requestBody)})).text();if(responseText.indexOf("loginError")!==-1){console.log("Incorrect email or password");const tempDiv=document.createElement("div");tempDiv.innerHTML=responseText,_this.element.querySelector("#login .accountDrawer--ErrorSpace").innerHTML=tempDiv.querySelector(".AlertError").innerHTML}else location.href=window.routes.account_url}catch(error){console.log("An error occurred during the login request:",error)}})()}toggleTab(event2){const id=event2.target.dataset.id,allTabs=this.element.querySelectorAll('.accountDrawer--Tab[aria-expanded="true"]'),allContent=this.element.querySelectorAll(".accountContent");allTabs.forEach(tab=>{tab.setAttribute("aria-expanded","false")}),event2.target.setAttribute("aria-expanded","true"),allContent.forEach(content2=>{content2.hidden=!0});const content=this.element.querySelector(`#${id}`);content&&(content.hidden=!1)}}customElements.define("account-handler",AccountHandler);class AnimationText extends HTMLElement{constructor(){super(),this.element=this,this.delegateElement=new Delegate(this.element),this.bind()}bind(){setTimeout(()=>{let clonedAnimHolder=this.querySelector(".metaItem--animHolder").cloneNode(!0);this.querySelector(".metaItem--content").appendChild(clonedAnimHolder);const animArray=this.querySelectorAll(".metaItem--animHolder");let i=0;animArray.forEach(item=>{item.classList.add(`animHolder--${i}`),i++}),this.querySelector(".metaItem--animHolder.animHolder--1").style.opacity=0,setTimeout(()=>{this.querySelector(".metaItem--animHolder.animHolder--1").style.opacity=1},15e3)},50)}}customElements.define("animation-text",AnimationText);function checkAnimation(element){window.theme.enableAnimations||element.querySelectorAll(".reveal").forEach(elem=>elem.classList.remove("reveal"))}class ImageText extends HTMLElement{constructor(){super(),this.element=this,checkAnimation(this.element)}}customElements.define("image-text",ImageText);class CustomImages extends HTMLElement{constructor(){super(),this.element=this,checkAnimation(this.element),this.bindObserver()}bindObserver(){const observedElem=this.element.querySelector(".articleWrapper--customImages"),toReveal=this.element.querySelectorAll(".customImage--Image");if(!toReveal||!observedElem)return;new IntersectionObserver((entries,observer2)=>{entries.forEach(entry=>{(entry.isIntersecting||entry.intersectionRatio==1)&&(toReveal.forEach(elem=>elem.classList.add("show")),observer2.unobserve(entry.target))})}).observe(observedElem)}}customElements.define("custom-images",CustomImages);class BlogHeader extends HTMLElement{constructor(){super(),this.element=this,this.touchStartX=0,this.touchEndX=0,this.blogPage=!1,this.checkUrl()&&(this.mql=window.matchMedia("(max-width: 1024px)"),this.mql.addEventListener("change",this.handleMediaQuery.bind(this)),this.handleMediaQuery(this.mql))}handleMediaQuery(mql){mql.matches?this.bindSwipeEvents():this.unbindSwipeEvents()}bindSwipeEvents(){this.handleTouchStart=event2=>this.onTouchStart(event2),this.handleTouchMove=event2=>this.onTouchMove(event2),this.handleTouchEnd=()=>this.onTouchEnd(),document.addEventListener("touchstart",this.handleTouchStart),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("touchend",this.handleTouchEnd)}unbindSwipeEvents(){this.handleTouchStart&&document.removeEventListener("touchstart",this.handleTouchStart),this.handleTouchMove&&document.removeEventListener("touchmove",this.handleTouchMove),this.handleTouchEnd&&document.removeEventListener("touchend",this.handleTouchEnd)}onTouchStart(event2){this.touchStartX=event2.touches[0].clientX}onTouchMove(event2){this.touchEndX=event2.touches[0].clientX}onTouchEnd(){const swipeDistance=this.touchEndX-this.touchStartX,swipeThreshold=150;if(swipeDistance>swipeThreshold){const prevArticle=this.element.querySelector("#Article--PreviousArticle");prevArticle.href&&!prevArticle.classList.contains("disable")&&(window.location.href=prevArticle)}
1else if(swipeDistance<-swipeThreshold){const nextArticle=this.element.querySelector("#Article--NextArticle");nextArticle.href&&!nextArticle.classList.contains("disable")&&(window.location.href=nextArticle)}}checkUrl(){const currentURL=window.location.href,searchString="blogs/blog/",searchStringIndex=currentURL.indexOf(searchString);if(searchStringIndex!==-1)return currentURL.substring(searchStringIndex+searchString.length).length>0}}customElements.define("blog-header",BlogHeader);class QuantityInput extends HTMLElement{constructor(){super(),this.element=this,this.delElem=new Delegate(this.element),this.options=JSON.parse(this.element.getAttribute("data-settings"))}connectedCallback(){this.delElem.on("click",'[data-action="change-quantity"]',this.onQuantityChange.bind(this)),this.delElem.on("change",".QuantitySelector__ProductQuantity",this.updateForm.bind(this))}onQuantityChange(event2){const button=event2.target.querySelector("button")||event2.target,input=button.parentElement.querySelector("input"),previousValue=input.value;if(button.name==="plus"?input.stepUp():input.stepDown(),previousValue===input.value&&input.classList.contains("quantity-selector__quick-add-input")&&button.name==="minus")input.value=0;else if(previousValue===input.value)return;input.setAttribute("value",input.value),input.dispatchEvent(new Event("quantity:changed",{bubbles:!0})),this.updateForm(null,input)}updateForm(event2,target){let newValue=parseInt(target.value);const min=parseInt(target.min),max=parseInt(target.max);max&&newValue>max&&(newValue=max),min&&newValue<min&&(newValue=target.classList.contains("quantity-selector__quick-add-input")?0:min),target.value=newValue;const formQuantityInput=document.querySelector('.quantity-input[name="quantity"]');formQuantityInput&&(formQuantityInput.value=newValue)}toggleAddButton(){let quantity="";const addButton=document.querySelector(".ProductPage--ATC"),addButtonInner=addButton.querySelector(".SelfAlign"),quantityEl=document.querySelectorAll(".QuantitySelector__ProductQuantity");if(quantityEl&&(quantity=quantityEl.value),window.variantInfo.show_icon)var buySvg='  <svg class="Svg--shopping_bag-line mr-sl" width="20" height="20"viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"  ><path d="M13.8889 6.66666V5.02777C13.8889 3.6384 13.1477 2.35458 11.9444 1.65989C10.7412 0.965211 9.25877 0.965211 8.05555 1.65989C6.85232 2.35458 6.1111 3.6384 6.1111 5.02777V8.91666C6.1111 9.22348 6.35983 9.47222 6.66666 9.47222C6.97348 9.47222 7.22221 9.22348 7.22221 8.91666V7.77777H11.6667V6.66666H7.22221V5.02777C7.22221 3.49365 8.46587 2.24999 9.99999 2.24999C11.5341 2.24999 12.7778 3.49365 12.7778 5.02777V8.88888C12.7778 9.19571 13.0265 9.44444 13.3333 9.44444C13.6401 9.44444 13.8889 9.19571 13.8889 8.88888V7.77777H16.6667V17.7778H3.33332V7.77777H4.99999V6.66666H2.22221V17.8278C2.22221 18.4138 2.69729 18.8889 3.28332 18.8889H16.7167C17.3027 18.8889 17.7778 18.4138 17.7778 17.8278V6.66666H13.8889Z" fill="#0C0C0C" /></svg>';else var buySvg="";if(addButton){if(quantity||(quantity=1),addButton.removeAttribute("disabled"),addButton.classList.remove("ProductCard--Sold__Out"),window.variantInfo.show_price){var priceElement="<span class='u-pb1 ml-s'>"+Shopify.formatMoney(this.options.price*quantity,window.theme.moneyFormat);+"</span>"}else var priceElement="";addButtonInner.innerHTML=buySvg+window.variantStrings.addToCart+priceElement}}}customElements.define("quantity-input",QuantityInput);class QuickAdd extends HTMLElement{constructor(){super(),!new Responsive().matchesBreakpoint("lap-and-up")&&(this.element=this,this.delegateElement=new Delegate(this.element),this.delegateBody=new Delegate(document.body),this.id=this.element.dataset.productid,this.pageLoader=document.body.querySelector(".pageLoader"),this.input=this.element.querySelector(".QuantitySelector__ProductQuantityMobile"),this.quantitySelectorElement=this.element.querySelector("quantity-input"),this.addToCartButton=this.element.querySelector('[data-action="add-to-cart"]'),this.toggleQuickAdd(),this.bindEvents())}
1bindEvents(){this.delegateBody.on("cart:changed",this.toggleQuickAdd.bind(this)),this.delegateElement.on("click",'[data-action="change-quantity"]',this.quickAdd.bind(this)),this.delegateElement.on("change",".quantity-select__input",this.quickAdd.bind(this))}toggleQuickAdd(){if(this.element.dataset.template.includes("subscription")||!this.quantitySelectorElement)return;const product=JSON.parse(sessionStorage.getItem("carted_products"))[this.id];if(!product){this.quantitySelectorElement.classList.add("hidden"),this.addToCartButton?.classList.remove("hidden");return}this.quantitySelectorElement.classList.remove("hidden"),this.addToCartButton?.classList.add("hidden");const input=this.element.querySelector(".quantity-selector__quick-add-input");input&&(input.value=product.quantity,input.setAttribute("value",product.quantity))}async quickAdd(event2,target){this.cartDrawer=document.querySelector("cart-drawer"),this.sidebarDrawer=new Drawer(this.cartDrawer),this.pageLoader.style.width="100%";const input=target.parentElement.querySelector("input"),quantity=input.value,variantId=input.dataset.variantId,lineItemId=document.querySelector(`#CartItem-${variantId}`)?.dataset.key||variantId;try{if(!(await fetch("/cart/change.js",{body:JSON.stringify({id:lineItemId,quantity}),credentials:"same-origin",method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"}})).ok)throw new Error("Failed to update cart");this.element.dispatchEvent(new CustomEvent("cart:rerender",{bubbles:!0,detail:{lineItem:lineItemId,quantityChange:quantity,skipEvent:!0}})),this.pageLoader.style.left="unset",this.pageLoader.style.right="0px",this.pageLoader.style.width="0%",setTimeout(()=>{this.pageLoader.style.left="0px",this.pageLoader.style.right="unset",this.sidebarDrawer.openDrawer()},550)}catch(error){console.error("Error updating cart: ",error)}}toggleButton(){}}customElements.define("quick-add",QuickAdd);
2//# sourceMappingURL=/cdn/shop/t/2/assets/global.js.map?v=165999040848992379611788341003

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.