PageSourceSearch

https://boxfox.com/cdn/shop/t/168/assets/theme.js?v=82882055062741087021787764887

js boxfox.com collected 2026-09-29 13:15:04 UTC 238,098 bytes, 55 lines download raw bytes

1((B,F,W,O,V,N,R,z,j,U)=>{function G(i){var s=Object.create(null);return i&&Object.keys(i).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(i,e),Object.defineProperty(s,e,t.get?t:{enumerable:!0,get:function(){return i[e]}}))}),s.default=i,Object.freeze(s)}var J=G(themeVendor.Sqrl);function Q(e){e=e.querySelectorAll("[data-modal]");let t=document.querySelector("[data-modal-container]");e.forEach(e=>{t.querySelector(`[id="${e.id}"]`)||t.appendChild(e)})}function X(e){e.querySelectorAll(".float__wrapper").forEach(e=>{let t=e.querySelector("label");e=e.querySelector("input, textarea");t&&e.addEventListener("keyup",e=>{""!==e.target.value?t.classList.add("label--float"):t.classList.remove("label--float")}),e&&e.value&&e.value.length&&t.classList.add("label--float")})}function Y(e){e.querySelectorAll(".errors").forEach(e=>{e.setAttribute("tabindex","0"),e.setAttribute("aria-live","assertive"),e.setAttribute("role","alert")})}function K(){var e,t={};return t.windowHeight=window.innerHeight,t.announcementHeight=te("#shopify-section-announcement"),t.toolbarHeight=te("[data-toolbar-height]"),t.footerHeight=te('[data-section-type*="footer"]'),t.menuHeight=te("[data-header-height]"),t.headerHeight=t.menuHeight+t.announcementHeight,t.logoHeight=0<(e=te("[data-footer-logo]"))?e+20:0,t.stickyHeader=document.querySelector('[data-header-sticky="sticky"]')?t.menuHeight:0,t.backfillHeight=te("[data-header-backfill]"),t}function Z(){document.addEventListener("theme:resize",ee);var{windowHeight:e,announcementHeight:t,toolbarHeight:i,headerHeight:s,logoHeight:r,menuHeight:o,footerHeight:a,stickyHeader:n,backfillHeight:l}=K();document.documentElement.style.setProperty("--scrollbar-width",ie()+"px"),document.documentElement.style.setProperty("--footer-logo",r+"px"),document.documentElement.style.setProperty("--full-screen",e+"px"),document.documentElement.style.setProperty("--three-quarters",.75*e+"px"),document.documentElement.style.setProperty("--two-thirds",.66*e+"px"),document.documentElement.style.setProperty("--one-half",.5*e+"px"),document.documentElement.style.setProperty("--one-third",.33*e+"px"),document.documentElement.style.setProperty("--one-fifth",.2*e+"px"),document.documentElement.style.setProperty("--menu-height",o+"px"),document.documentElement.style.setProperty("--announcement-height",t+"px"),document.documentElement.style.setProperty("--toolbar-height",i+"px"),document.documentElement.style.setProperty("--header-height",s+"px"),document.documentElement.style.setProperty("--footer-height",a+"px"),document.documentElement.style.setProperty("--content-full",e-s-r/2+"px"),document.documentElement.style.setProperty("--menu-height-sticky",n+"px"),t=1<Math.abs(l-o)?o+"px":"auto",document.documentElement.style.setProperty("--menu-backfill-height",t)}function ee(){var{windowHeight:e,announcementHeight:t,toolbarHeight:i,headerHeight:s,logoHeight:r,menuHeight:o,footerHeight:a,stickyHeader:n,backfillHeight:l}=K(),t=(document.documentElement.style.setProperty("--scrollbar-width",ie()+"px"),document.documentElement.style.setProperty("--full-screen",e+"px"),document.documentElement.style.setProperty("--menu-height",o+"px"),document.documentElement.style.setProperty("--announcement-height",t+"px"),document.documentElement.style.setProperty("--toolbar-height",i+"px"),document.documentElement.style.setProperty("--header-height",s+"px"),document.documentElement.style.setProperty("--footer-height",a+"px"),document.documentElement.style.setProperty("--content-full",e-s-r/2+"px"),document.documentElement.style.setProperty("--menu-height-sticky",n+"px"),1<Math.abs(l-o)?o+"px":"auto");document.documentElement.style.setProperty("--menu-backfill-height",t)}function te(e){e=document.querySelector(e);return e?e.clientHeight:0}function ie(){var e=document.createElement("div"),t=(e.style.visibility="hidden",e.style.overflow="scroll",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e),document.createElement("div")),t=(e.appendChild(t),e.offsetWidth-t.offsetWidth);return e.parentNode.removeChild(e),t}function se(e,t){let i=64,s=0;
1t.forEach(e=>{var t;e.offsetHeight>s&&((t=parseInt(window.getComputedStyle(e).marginTop)+parseInt(window.getComputedStyle(e).marginBottom))>i&&(i=t),s=e.offsetHeight)});t=e.querySelectorAll("[data-overflow-background]");[e,...t].forEach(e=>{e.style.setProperty("min-height",`calc(${s+i}px + var(--menu-height))`);let t=e.querySelector(".hero-mobile-image");t&&(t.style.setProperty("min-height",`calc(${s+i}px + var(--menu-height))`),$(window).on("load scroll",function(){$(t).each(function(){!$(this).hasClass("is-loaded")&&$(this).offset().top<$(window).scrollTop()+$(window).height()&&$(this).attr("src",$(this).attr("data-src")).addClass("is-loaded")})}))})}function re(e){let s=document.querySelector("[data-footer-logo]")?document.querySelector("[data-footer-logo]").clientHeight+20:0;var r=document.querySelector("#MainContent .shopify-section:last-child [data-section-id]"),o=r?r.getAttribute("data-section-id"):null;if((null===o||e.getAttribute("data-section-id")===o)&&r||(s=0),window.innerWidth<window.theme.sizes.medium)e.querySelectorAll("[data-overflow-frame]").forEach(e=>{var t=e.querySelectorAll("[data-overflow-content]");se(e,t)});else{o=document.createElement("div");e.prepend(o),o.style.display="none",o.style.width=getComputedStyle(e).getPropertyValue("--outer");let t=2*parseInt(getComputedStyle(o).getPropertyValue("width")),i=(e.firstChild.remove(),0);r=e.querySelectorAll("[data-overflow-frame]"),o=(e.querySelectorAll("[data-overflow-content]").forEach(e=>{e.offsetHeight>i&&(i=e.offsetHeight)}),e.querySelectorAll("[data-overflow-background]"));[...r,...o].forEach(e=>{e.style.setProperty("min-height",i+t+"px")}),e.style.setProperty("min-height",i+t+2+s+"px")}}function oe(e){var t=e.querySelectorAll(".js-overflow-container"),t=(t&&(t.forEach(e=>{let t=e.querySelectorAll(".js-overflow-content");se(e,t),document.addEventListener("theme:resize",()=>{se(e,t)})}),(t=e.querySelectorAll("[data-slideshow-wrapper]")).length)&&t.forEach(e=>{e=F.data(e);void 0!==e&&e.reloadCells()}),e.querySelectorAll("[data-overflow-wrapper]"));t&&t.forEach(e=>{re(e),document.addEventListener("theme:resize",()=>{re(e)})})}function ae(t,i=500,s=!1){var r,o,a,n,l;function d(){var e=Date.now()-n;e<i&&0<=e?r=setTimeout(d,i-e):(r=null,s||(l=t.apply(a,o),a=o=null))}null==i&&(i=100);function e(){a=this,o=arguments,n=Date.now();var e=s&&!r;return r=r||setTimeout(d,i),e&&(l=t.apply(a,o),a=o=null),l}return e.clear=function(){r&&(clearTimeout(r),r=null)},e.flush=function(){r&&(l=t.apply(a,o),a=o=null,clearTimeout(r),r=null)},e}window.requestIdleCallback=window.requestIdleCallback||function(e){var t=Date.now();return setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)};let ne=window.innerWidth,le=window.innerHeight;function de(){document.dispatchEvent(new CustomEvent("theme:resize",{bubbles:!0})),ne!==window.innerWidth&&(document.dispatchEvent(new CustomEvent("theme:resize:width",{bubbles:!0})),ne=window.innerWidth),le!==window.innerHeight&&(document.dispatchEvent(new CustomEvent("theme:resize:height",{bubbles:!0})),le=window.innerHeight)}let ce,he=window.pageYOffset,ue=null,pe=null,me=null,ge=null,ye=0;function fe(){var e=window.pageYOffset;e>he?(pe=!0,ue=!1):e<he?(pe=!1,ue=!0):(ue=null,pe=null),he=e,document.dispatchEvent(new CustomEvent("theme:scroll",{detail:{up:ue,down:pe,position:e},bubbles:!1})),ue&&!me&&document.dispatchEvent(new CustomEvent("theme:scroll:up",{detail:{position:e},bubbles:!1})),pe&&!ge&&document.dispatchEvent(new CustomEvent("theme:scroll:down",{detail:{position:e},bubbles:!1})),ge=pe,me=ue}function ve(e){let t=e.target;e.detail&&e.detail instanceof Element&&(t=e.detail),W.disableBodyScroll(t),document.documentElement.setAttribute("data-scroll-locked","")}function we(){ye=setTimeout(()=>{document.body.removeAttribute("data-drawer-closing")},20),document.body.hasAttribute("data-drawer-closing")?(document.body.removeAttribute("data-drawer-closing"),ye&&clearTimeout(ye)):(document.body.setAttribute("data-drawer-closing",""),document.documentElement.removeAttribute("data-scroll-locked"),W.clearAllBodyScrollLocks())}let be,Se=(window.addEventListener("resize",()=>{ce&&window.cancelAnimationFrame(ce),ce=window.requestAnimationFrame(ae(de,50))}),window.addEventListener("scroll",function(){be&&window.cancelAnimationFrame(be),be=window.requestAnimationFrame(fe)},{passive:!0}),window.addEventListener("theme:scroll:lock",ve),window.addEventListener("theme:scroll:unlock",we),document.addEventListener("load",e=>{var e=e.target;"IMG"==(e=e).tagName&&e.classList.contains("loading-shimmer")&&e.classList.remove("loading-shimmer")},!0),window.addEventListener("DOMContentLoaded",()=>{Z(),X(document),Y(document),Q(document),window.theme.settings.animate_scroll&&B.refresh()}),window.addEventListener("load",()=>
1{document.querySelectorAll("img.loading-shimmer").forEach(e=>{e.complete&&e.classList.remove("loading-shimmer")}),oe(document)}),document.addEventListener("shopify:section:load",e=>{e=e.target;X(e),Y(e),Q(e),oe(e),window.theme.settings.animate_scroll&&B.refresh()}),document.addEventListener("shopify:section:reorder",()=>{document.dispatchEvent(new CustomEvent("theme:header:check",{bubbles:!1}))}),(e,t=!1,i="block")=>{e&&(t?e.style.removeProperty("display"):e.style.display=i)});function Ee(e){this.status=e.status||null,this.headers=e.headers||null,this.json=e.json||null,this.body=e.body||null}Ee.prototype=Error.prototype;let Le={scrollbar:"data-scrollbar-slider",scrollbarArrowPrev:"[data-scrollbar-arrow-prev]",scrollbarArrowNext:"[data-scrollbar-arrow-next]"},ke={hidden:"is-hidden"},Te={delay:200};class Ae{constructor(e){this.scrollbar=e,this.arrowNext=this.scrollbar.parentNode.querySelector(Le.scrollbarArrowNext),this.arrowPrev=this.scrollbar.parentNode.querySelector(Le.scrollbarArrowPrev),this.init(),this.resize(),this.scrollbar.hasAttribute(Le.scrollbar)&&this.scrollToVisibleElement()}init(){this.arrowNext&&this.arrowPrev&&(window.isRTL?this.togglePrevArrow():this.toggleNextArrow(),this.events())}resize(){document.addEventListener("theme:resize",()=>{window.isRTL?this.togglePrevArrow():this.toggleNextArrow()})}events(){this.arrowNext.addEventListener("click",e=>{e.preventDefault(),this.goToNext()}),this.arrowPrev.addEventListener("click",e=>{e.preventDefault(),this.goToPrev()}),this.scrollbar.addEventListener("scroll",()=>{this.togglePrevArrow(),this.toggleNextArrow()})}goToNext(){var e=this.scrollbar.getBoundingClientRect().width/2+this.scrollbar.scrollLeft;this.move(e),this.arrowPrev.classList.remove(ke.hidden),this.toggleNextArrow()}goToPrev(){var e=this.scrollbar.scrollLeft-this.scrollbar.getBoundingClientRect().width/2;this.move(e),this.arrowNext.classList.remove(ke.hidden),this.togglePrevArrow()}toggleNextArrow(){setTimeout(()=>{window.isRTL?this.arrowNext.classList.toggle(ke.hidden,0===this.scrollbar.scrollLeft):this.arrowNext.classList.toggle(ke.hidden,Math.round(this.scrollbar.scrollLeft+this.scrollbar.getBoundingClientRect().width+1)>=this.scrollbar.scrollWidth)},Te.delay)}togglePrevArrow(){setTimeout(()=>{window.isRTL?this.arrowPrev.classList.toggle(ke.hidden,Math.abs(this.scrollbar.scrollLeft)+this.scrollbar.getBoundingClientRect().width+1>=this.scrollbar.scrollWidth):this.arrowPrev.classList.toggle(ke.hidden,this.scrollbar.scrollLeft<=0)},Te.delay)}scrollToVisibleElement(){[].forEach.call(this.scrollbar.children,t=>{t.addEventListener("click",e=>{("a"===e.target.tagName.toLowerCase()||e.currentTarget&&"a"===e.currentTarget.tagName.toLowerCase()||e.currentTarget&&e.currentTarget.querySelector("a"))&&e.preventDefault(),this.move(t.offsetLeft-t.clientWidth)})})}move(e){this.scrollbar.scrollTo({top:0,left:e,behavior:"smooth"})}}let qe={siblingsInnerHolder:"[data-sibling-inner]"};class Ce{constructor(e){this.siblings=e.querySelectorAll(qe.siblingsInnerHolder),this.init()}init(){this.siblings.forEach(e=>{new Ae(e)})}}var xe={onLoad(){new Ce(this.container)}};let Pe={expires:7,path:"/",domain:window.location.hostname};class Ie{constructor(e={}){this.options={...Pe,...e}}write(e){document.cookie=`${this.options.name}=${e}; expires=${this.options.expires}; path=${this.options.path}; domain=`+this.options.domain}read(){let e=[];var t=document.cookie.split("; ").find(e=>e.startsWith(this.options.name));return e=-1!==document.cookie.indexOf("; ")&&t&&null!==(t=document.cookie.split("; ").find(e=>e.startsWith(this.options.name)).split("=")[1])?t.split(","):e}destroy(){document.cookie=`${this.options.name}=null; expires=${this.options.expires}; path=${this.options.path}; domain=`+this.options.domain}remove(e){var t=this.read(),e=t.indexOf(e);-1!==e&&(t.splice(e,1),this.write(t))}}let o={howManyToShow:4,howManyToStoreInMemory:10,wrapper:"[data-recently-viewed-products]",limit:"data-limit",recentTabLink:"[data-recent-link-tab]",recentWrapper:"[data-recent-wrapper]",recentViewedTab:"[data-recently-viewed-tab]",tabsHolderScroll:"[data-tabs-holder-scroll]",apiContent:"[data-api-content]",dataMinimum:"data-minimum"},Me={hide:"hide",containerWithoutTabsNav:"section-without-title--skip"},He={expires:90,name:"shopify_recently_viewed"},De=[],_e=[];class Be{constructor(e){this.container=e.container,this.cookie=new Ie(He),this.wrapper=this.container.querySelector(o.wrapper),null!==this.wrapper&&(this.howManyToShow=parseInt(this.container.querySelector(o.recentWrapper).getAttribute(o.limit))||o.howManyToShow,this.minimum=parseInt(this.container.querySelector(o.recentWrapper).getAttribute(o.dataMinimum)),this.recentViewedTab=this.container.querySelector(o.recentViewedTab),this.recentViewedLink=this.container.querySelector(o.recentTabLink),this.tabsHolderScroll=this.container.querySelector(o.tabsHolderScroll),this.renderProducts())}renderProducts(){var t=this.cookie.read(),i=[];let s=0;if(0<t.length){for(let e=0;e<t.length;e++){var r=t[e];if(!_e.includes(r)){r=window.theme.routes.root_url+`products/${r}?section_id=api-product-grid-item`;if(i.push(r),++s===this.howManyToShow||s===t.length-1)break}}if(0<i.length&&i.length>=this.minimum){this.container.classList.remove(Me.hide),this.recentViewedLink&&this.recentViewedLink.previousElementSibling&&(this.tabsHolderScroll.classList.remove(Me.hide),this.container.classList.add(Me.containerWithoutTabsNav));var e=i.map(e=>fetch(e,{mode:"no-cors"}).then(this.handleErrors));let t=[];Promise.allSettled(e).then(e=>Promise.all(e.map(async e=>{"fulfilled"===e.status&&t.push(await e.value.text())}))).then(()=>
1{t.forEach(e=>{var t=document.createElement("div"),i=document.createElement("div");t.innerHTML=e,i.classList.add("product-grid-slide"),i.setAttribute("data-carousel-slide",null),i.setAttribute("data-item",null),i.innerHTML=t.querySelector(o.apiContent).innerHTML,this.wrapper.appendChild(i)}),new Ce(this.container)}).then(()=>{Se(this.wrapper,!0),this.container.dispatchEvent(new CustomEvent("theme:recent-products:added",{bubbles:!0}))})}else this.recentViewedTab&&(e=1<Array.prototype.filter.call(this.recentViewedTab.parentNode.children,e=>e!==this.recentViewedTab).length,this.recentViewedLink&&this.recentViewedLink.previousElementSibling&&(this.tabsHolderScroll.classList.add(Me.hide),this.container.classList.remove(Me.containerWithoutTabsNav)),e)||this.container.classList.add(Me.hide)}}handleErrors(t){return t.ok?t:t.text().then(function(e){throw new Ee({status:t.statusText,headers:t.headers,text:e})})}}class Fe{constructor(e){this.handle=e,this.cookie=new Ie(He),void 0!==this.handle&&(_e.push(this.handle),this.updateCookie())}updateCookie(){let e=this.cookie.read();var t=e.indexOf(this.handle);-1===t?(e.unshift(this.handle),e=e.splice(0,o.howManyToStoreInMemory)):(e.splice(t,1),e.unshift(this.handle)),this.cookie.write(e)}}var We={onLoad(){De[this.id]=new Be(this)}};function a(){let t="(any-pointer: coarse)",e=`(max-width: ${window.theme.sizes.medium}px)`,i=`(min-width: ${window.theme.sizes.medium+1}px) and (max-width: ${window.theme.sizes.large}px)`,s=`(min-width: ${window.theme.sizes.large+1}px)`,r=(a.isTouch=()=>{var e=window.matchMedia(t).matches;return document.documentElement.classList.toggle("supports-touch",e),e},a.isMobile=()=>window.matchMedia(e).matches,a.isTablet=()=>window.matchMedia(i).matches,a.isDesktop=()=>window.matchMedia(s).matches,[[t,a.isTouch],[e,a.isMobile],[i,a.isTablet],[s,a.isDesktop]]);a.onChange=t=>{r.forEach(e=>{window.matchMedia(e[0]).addEventListener("change",()=>{e[1]()&&t&&t()})})}}function Oe(){this.entries=[]}function $e(e,t){Ve(e),t=t,Ve(s=e);var i=t;if(!Array.isArray(i))throw new TypeError(i+" is not an array.");if(0===i.length)throw new Error(i+" is empty.");if(!i[0].hasOwnProperty("name"))throw new Error(i[0]+"does not contain name key.");if("string"!=typeof i[0].name)throw new TypeError("Invalid value type passed for name of option "+i[0].name+". Value should be string.");r=[],t.forEach(function(e){for(var t=0;t<s.options.length;t++)if((s.options[t].name||s.options[t]).toLowerCase()===e.name.toLowerCase()){r[t]=e.value;break}});o=r,Ve(i=e);var s,r,o,t=o;if(Array.isArray(t)&&"object"==typeof t[0])throw new Error(t+"is not a valid array of options.");return i.variants.filter(function(i){return o.every(function(e,t){return i.options[t]===e})})[0]||null}function Ve(e){if("object"!=typeof e)throw new TypeError(e+" is not an object.");if(0===Object.keys(e).length&&e.constructor===Object)throw new Error(e+" is empty.")}a(),Oe.prototype.add=function(e,t,i){this.entries.push({element:e,event:t,fn:i}),e.addEventListener(t,i)},Oe.prototype.removeAll=function(){this.entries=this.entries.filter(function(e){return e.element.removeEventListener(e.event,e.fn),!1})};var Ne='[name="id"]',Re='[name="selling_plan"]',ze='[name^="options"]',je='[name="quantity"]',Ue='[name^="properties"]';class Ge{constructor(e,t,i,s){this.element=e,this.form="FORM"==t.tagName?t:t.querySelector("form"),this.product=this._validateProductObject(i),this.variantElement=this.form.querySelector(Ne),s=s||{},this.clickedElement=null,this._listeners=new Oe,this._listeners.add(this.element,"submit",this._onSubmit.bind(this,s)),this.optionInputs=this._initInputs(ze,s.onOptionChange),this.planInputs=this._initInputs(Re,s.onPlanChange),this.quantityInputs=this._initInputs(je,s.onQuantityChange),this.propertyInputs=this._initInputs(Ue,s.onPropertyChange)}destroy(){this._listeners.removeAll()}options(){return this._serializeInputValues(this.optionInputs,function(e){return e.name=/(?:^(options\[))(.*?)(?:\])/.exec(e.name)[2],e})}variant(){var e=this.options();return e.length?$e(this.product,e):this.product.variants[0]}
1plan(e){let t={allocation:null,group:null,detail:null};let i=new FormData(this.form).get("selling_plan");if(e&&e.selling_plan_allocations&&0<e.selling_plan_allocations.length){var s=[...new Set(e.selling_plan_allocations.map(e=>e.selling_plan_group_id))],r=this.element.querySelectorAll("[data-subscription-group]");if(!r.length)return;r.forEach(e=>e.style.display="none"),s.forEach(e=>{this.element.querySelector(`[data-selling-plan-group="${e}"]`).style.display="block"})}return i&&e&&(t.allocation=e.selling_plan_allocations.find(function(e){return e.selling_plan_id.toString()===i.toString()})),t.allocation&&(t.group=this.product.selling_plan_groups.find(function(e){return e.id.toString()===t.allocation.selling_plan_group_id.toString()})),t.group&&(t.detail=t.group.selling_plans.find(function(e){return e.id.toString()===i.toString()})),t&&t.allocation&&t.detail&&t.allocation?t:null}properties(){return this._serializeInputValues(this.propertyInputs,function(e){return e.name=/(?:^(properties\[))(.*?)(?:\])/.exec(e.name)[2],e})}quantity(){return this.quantityInputs[0]?Number.parseInt(this.quantityInputs[0].value,10):1}getFormState(){var e=this.variant();return{options:this.options(),variant:e,properties:this.properties(),quantity:this.quantity(),plan:this.plan(e)}}_setIdInputValue(e){e&&e.id?this.variantElement.value=e.id.toString():this.variantElement.value="",this.variantElement.dispatchEvent(new Event("change"))}_onSubmit(e,t){t.dataset=this.getFormState(),e.onFormSubmit&&e.onFormSubmit(t)}_onOptionChange(e){this._setIdInputValue(e.dataset.variant)}_onFormEvent(t){return void 0===t?Function.prototype:function(e){e.dataset=this.getFormState(),this._setIdInputValue(e.dataset.variant),t(e)}.bind(this)}_initInputs(e,t){return Array.prototype.slice.call(this.element.querySelectorAll(e)).map(function(e){return this._listeners.add(e,"change",this._onFormEvent(t)),e}.bind(this))}_serializeInputValues(e,i){return e.reduce(function(e,t){return(t.checked||"radio"!==t.type&&"checkbox"!==t.type)&&e.push(i({name:t.name,value:t.value})),e},[])}_validateProductObject(e){if("object"!=typeof e)throw new TypeError(e+" is not an object.");if(void 0===e.variants[0].options)throw new TypeError("Product object is invalid. Make sure you use the product object that is output from {{ product | json }} or from the http://[your-product-url].js route");return e}}let Je={};function Qe(t={}){var e,i,s,l,d,r;return t.type||(t.type="json"),t.url?Je[t.url]||(l=t.url,d=t.type,r=new Promise((t,i)=>{if("text"!==d){var s=l;var r=function(){t()};var o=function(){i()};var a=document.getElementsByTagName("head")[0];let e=!1;var n=document.createElement("script");n.src=s,n.onload=n.onreadystatechange=function(){(e||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState?o:(e=!0,r))()},a.appendChild(n)}else fetch(l).then(e=>e.text()).then(e=>{t(e)}).catch(e=>{i(e)})}),Je[l]=r):t.json?Je[t.json]?Promise.resolve(Je[t.json]):(r=window.fetch(t.json).then(e=>e.json()).then(e=>Je[t.json]=e).catch(e=>{Je[t.json]=null}),Je[t.json]=r):t.name?(i="".concat(t.name,t.version),Je[i]||(e=t,i="".concat(e.name,e.version),s=new Promise((s,r)=>{try{window.Shopify.loadFeatures([{name:e.name,version:e.version,onLoad:e=>{var t,i;t=s,i=r,(e=e)?i(e):t()}}])}catch(e){r(e)}}),Je[i]=s)):Promise.reject()}let Xe={wrapper:"[data-swapper-wrapper]",target:"[data-swapper-target]",hover:"data-swapper-hover"},Ye={};class Ke{constructor(e){this.container=e,this.target=this.container.querySelector(Xe.target),this.hovers=this.container.querySelectorAll(`[${Xe.hover}]`),this.target&&this.hovers.length&&(this.deafaultContent=this.target.innerHTML,this.init())}init(){this.hovers.forEach(t=>{t.addEventListener("mouseenter",function(){var e=t.getAttribute(Xe.hover);this.target.innerHTML=""+e}.bind(this))}),this.hovers.forEach(e=>{e.addEventListener("mouseleave",function(){this.target.innerHTML=this.deafaultContent}.bind(this))}),this.hovers.forEach(t=>{t.addEventListener("click",function(){var e=t.getAttribute(Xe.hover);this.deafaultContent=""+e}.bind(this))})}}function Ze(t){Ye[t.id]=[],t.querySelectorAll(Xe.wrapper).forEach(e
1=>{Ye[t.id].push(new Ke(e))})}var et={onLoad(){Ze(this.container)}};let tt={color:"ash"},i={swatch:"data-swatch",outerGrid:"[data-grid-item]",imageSlide:"[data-grid-image]",dataGridImageDefault:"data-grid-image-default",dataGridImageTarget:"data-grid-image-target",image:"data-swatch-image",imageId:"data-swatch-image-id",variant:"data-swatch-variant",link:"[data-grid-link]",wrapper:"[data-grid-swatches]",template:"[data-swatch-template]",handle:"data-swatch-handle",label:"data-swatch-label",index:"data-swatch-index",dataMediaId:"data-media-id",dataMediaSrcPlaceholder:"data-media-src-placeholder",dataFetchedImage:"data-fetched-image",dataFetchedImageIndex:"data-fetched-image-index"},it={fade:"is-fade"};class st{constructor(e={}){this.settings={...tt,...e},this.match=this.init()}getColor(){return this.match}init(){return Qe({json:window.theme.assets.swatches}).then(e=>this.matchColors(e,this.settings.color)).catch(e=>{console.log("failed to load swatch colors script"),console.log(e)})}matchColors(e,t){let i="#E5E5E5",s=null;var r=window.theme.assets.base||"/";let o=t.toLowerCase().replace(/\s/g,"");var t=e.colors;return t&&-1<(e=t.findIndex(e=>Object.keys(e).toString().toLowerCase().replace(/\s/g,"")===o))&&(e=(t=Object.values(t[e])[0]).toLowerCase(),i=e.includes(".jpg")||e.includes(".jpeg")||e.includes(".png")||e.includes(".svg")?(s=""+r+encodeURIComponent(t),"#888888"):t),{color:this.settings.color,path:s,hex:i}}}class rt extends HTMLElement{constructor(){super(),this.element=this.querySelector(`[${i.swatch}]`),this.colorString=this.element.getAttribute(i.swatch),this.image=this.element.getAttribute(i.image),this.imageId=this.element.getAttribute(i.imageId),this.variant=this.element.getAttribute(i.variant),this.outer=this.element.closest(i.outerGrid),this.media=null,this.imageSlide=null,this.imageDefault=null,this.stopSlideAnimation=!1,new st({color:this.colorString}).getColor().then(e=>{this.colorMatch=e,this.init()})}init(){this.setStyles(),this.variant&&this.outer&&this.outer.addEventListener("theme:quickview:media",e=>{e&&e.detail&&e.detail.media&&(this.media=e.detail.media)})}setStyles(){this.colorMatch.hex&&this.element.style.setProperty("--swatch",""+this.colorMatch.hex),this.colorMatch.path&&(this.element.style.setProperty("background-image",`url(${this.colorMatch.path})`),this.element.style.setProperty("background-size","cover"))}replaceImage(){var e;this.imageReplace&&this.imageSlide&&this.imageId&&(this.imageSlide.hasAttribute(i.dataGridImageTarget)&&this.imageSlide.getAttribute(i.dataGridImageTarget)!==this.imageId&&(this.imageSlide.classList.add(it.fade),e=1e3*parseFloat(window.getComputedStyle(this.imageSlide).getPropertyValue("animation-duration")),setTimeout(()=>{this.imageSlide.classList.remove(it.fade)},e)),this.imageSlide.setAttribute(i.dataGridImageTarget,this.imageId),this.imageSlide.style.setProperty("background-color","#fff"),this.imageSlide.hasAttribute(i.dataGridImageDefault)||this.imageSlide.setAttribute(i.dataGridImageDefault,window.getComputedStyle(this.imageSlide).backgroundImage),this.imageSlide.style.setProperty("background-image",this.imageReplace))}}class ot{constructor(e){this.template=document.querySelector(i.template).innerHTML,this.wrap=e,this.handle=e.getAttribute(i.handle);let t=e.getAttribute(i.label).trim().toLowerCase();e=this.handle,e=window.theme.routes.root_url+`products/${e}.js`,window.fetch(e).then(e=>e.json()).catch(e=>{console.error(e)}).then(e=>{this.product=e,this.colorOption=e.options.find(function(e){return e.name.toLowerCase()===t||null}),this.colorOption&&(this.swatches=this.colorOption.values,this.init())})}init(){this.wrap.innerHTML="",this.swatches.forEach((t,e)=>{var i=this.product.variants.find(e=>e.options.includes(t)),s=i.featured_media?i.featured_media.preview_image.src:"",r=i.featured_media?i.featured_media.id:"",o=Math.floor(9999*Math.random());this.wrap.innerHTML+=J.render(this.template,{color:t,uniq:`${this.product.id}-${i.id}-`+o,variant:i.id,product_id:this.product.id,image_id:r,image:s,index:e})}),new Ae(this.wrap)}}
1function at(e){e.querySelectorAll(i.wrapper).forEach(e=>{new ot(e)})}var nt={onLoad(){at(this.container),Ze(this.container)}};let lt={holderItems:"[data-custom-scrollbar-items]",scrollbar:"[data-custom-scrollbar]",scrollbarTrack:"[data-custom-scrollbar-track]"},dt={hide:"hide"},ct={};class ht{constructor(e,t=null){this.holderItems=e.querySelector(lt.holderItems),this.scrollbar=e.querySelector(lt.scrollbar),this.scrollbarTrack=e.querySelector(lt.scrollbarTrack),this.trackWidth=0,this.scrollWidth=0,this.scrollbar&&this.holderItems&&(this.children=t||this.holderItems.children,this.events(),this.calculateTrackWidth())}events(){this.holderItems.addEventListener("scroll",this.calculatePosition.bind(this)),this.holderItems.addEventListener("theme:carousel:scroll",this.calculatePosition.bind(this)),document.addEventListener("theme:resize:width",this.calculateTrackWidth.bind(this)),document.addEventListener("theme:resize:width",this.calculatePosition.bind(this))}calculateTrackWidth(){var e=document.createElement("div");this.holderItems.prepend(e),e.style.display="none",e.style.width=getComputedStyle(this.holderItems).getPropertyValue("--outer");let s=parseInt(getComputedStyle(e).getPropertyValue("width"));this.holderItems.firstChild.remove(),this.scrollbarWidth=0===this.scrollbar.clientWidth?this.scrollbar.parentNode.getBoundingClientRect().width:this.scrollbar.clientWidth,setTimeout(()=>{var e=this.children[0].clientWidth,t=Number(getComputedStyle(this.children[0]).marginRight.replace("px","")),i=Number(getComputedStyle(this.children[0]).marginLeft.replace("px","")),e=(this.scrollWidth=this.children.length*(e+t+i)+s-t,this.trackWidth=(this.scrollbarWidth+s)/this.scrollWidth*100,this.trackWidth=this.trackWidth<5?5:this.trackWidth,this.scrollbar.style.setProperty("--track-width",this.trackWidth+"%"),100<=Math.ceil(this.trackWidth));this.scrollbar.classList.toggle(dt.hide,e)},100)}calculatePosition(){var e=this.holderItems.scrollLeft/(this.holderItems.scrollWidth-this.holderItems.clientWidth),e=(e*=this.scrollbar.clientWidth-this.scrollbarTrack.clientWidth)<0?0:e;e=isNaN(e)?0:e,this.scrollbar.style.setProperty("--position",Math.round(e)+"px"),document.dispatchEvent(new CustomEvent("theme:scrollbar:scroll",{bubbles:!0,detail:{holder:this.holderItems}}))}}var ut={onLoad(){ct[this.id]=new ht(this.container)}};let s={carousel:"[data-carousel]",carouselWithProgress:"data-carousel-progress",carouselSlide:"[data-carousel-slide]",carouselFirstSlidePhoto:"[data-grid-slide]",wrapper:"[data-wrapper]",carouselTrack:"[data-carousel-track]",slider:".flickity-slider",carouselOptions:"data-options",carouselCustomScrollbar:"data-custom-scrollbar-items",carouselPrev:".flickity-button.previous",carouselNext:".flickity-button.next",recentlyViewHolder:"data-recently-viewed-products",relatedHolder:"data-related-products",sectionHolder:"[data-section-id]"},r={wrapper:"wrapper",arrowsForceTop:"flickity-force-arrows-top",arrowsOnSide:"not-moved-arrows",hide:"hide",flickityEnabled:"flickity-enabled",hiddenArrows:"hidden-arrows",flickityStatic:"flickity-static"},pt={additionalOffsetWrapper:112};class mt extends HTMLElement{constructor(){super(),this.container=this}connectedCallback(){this.carousel=this.container.querySelector(s.carousel),this.carouselTrack=this.container.querySelector(s.carouselTrack),this.wrapper=this.container.closest(s.wrapper),this.section=this.container.closest(s.sectionHolder),this.slidesVisible=null,this.carouselInstance=null,this.carouselPrev=null,this.carouselNext=null,this.customOptions={},this.toggleWrapperModifierEvent=()=>this.toggleWrapperModifier(),this.carousel&&this.carousel.hasAttribute(s.recentlyViewHolder)?this.section.addEventListener("theme:recent-products:added",()=>{this.init()}):this.carousel&&this.carousel.hasAttribute(s.relatedHolder)?this.section.addEventListener("theme:related-products:added",()=>{this.init()}):this.init()}init(){this.carousel&&(this.slidesTotal=this.carousel.querySelectorAll(s.carouselSlide).length,this.getGridLayout(),this.trackVisibleSlides(),this.carousel.hasAttribute(s.carouselOptions)&&(this.customOptions=JSON.parse(decodeURIComponent(this.carousel.getAttribute(s.carouselOptions)))),this.initCarousel(),this.calculatedArrowsTopPosition(),this.toggleWrapperModifier(),document.addEventListener("theme:resize:width",this.toggleWrapperModifierEvent),this.carousel.hasAttribute(s.carouselWithProgress)&&this.progressBarCalculate(),this.carousel.hasAttribute(s.carouselCustomScrollbar))&&new ht(this.container)}initCarousel(){this.options={accessibility:!0,contain:!0,freeScroll:!0,prevNextButtons:!0,wrapArround:!1,groupCells:!1,autoPlay:!1,pageDots:!1,cellAlign:window.isRTL?"right":"left",rightToLeft:window.isRTL,dragThreshold:10,arrowShape:{x0:10,x1:60,y1:50,x2:65,y2:45,x3:20},on:{resize:()=>{this.toggleArrows(),this.calculatedArrowsTopPosition(),setTimeout(()=>{this.visibleSlides()},100)}},...this.customOptions},this.carouselInstance=new O(this.carousel,this.options),this.carouselPrev=this.carousel.querySelector(s.carouselPrev),this.carouselNext=this.carousel.querySelector(s.carouselNext),this.container.addEventListener("theme:tab:change",()=>{this.carouselInstance.resize(),this.carouselPrev=this.carousel.querySelector(s.carouselPrev),this.carouselNext=this.carousel.querySelector(s.carouselNext)}),this.carouselInstance.on("dragStart",()=>{this.carouselInstance.slider.style.pointerEvents="none",a.isMobile||this.containDrag()}),this.carouselInstance.on("dragEnd",()=>{this.carouselInstance.slider.style.pointerEvents="auto",a.isMobile||this.containDrag()}),this.carouselInstance.on("change",e=>this.lockArrows(e)),setTimeout(()=>{this.visibleSlides()},100),Shopify.designMode&&setTimeout(()=>{this.carouselInstance.options.watchCSS&&!this.carousel.classList.contains(r.flickityEnabled)?(this.carouselInstance.destroy(),this.carouselInstance=new O(this.carousel,this.options),this.carouselInstance.resize(),this.carouselPrev=this.carousel.querySelector(s.carouselPrev),this.carouselNext=this.carousel.querySelector(s.carouselNext)):this.carouselInstance.resize()},10),this.carousel.classList.toggle(r.flickityStatic,this.smallItems===this.carousel.querySelectorAll(s.carouselSlide).length),at(this.container),new Ce(this.container)}calculatedArrowsTopPosition(){var e=this.container.querySelector(s.carouselFirstSlidePhoto);e&&(e=e.offsetHeight/2,this.carousel.style.setProperty("--buttons-top",e+"px"))}toggleWrapperModifier(){var e,t;this.wrapper&&(e=Number(getComputedStyle(document.documentElement).getPropertyValue("--scrollbar-width").replace("px","")),t=this.wrapper.clientWidth,this.wrapperW
1idthWithGutter=t+pt.additionalOffsetWrapper+e,window.innerWidth>=this.wrapperWidthWithGutter&&(this.wrapper.classList.remove(r.arrowsForceTop),this.section.classList.add(r.arrowsOnSide)),window.innerWidth<this.wrapperWidthWithGutter)&&(this.wrapper.classList.add(r.arrowsForceTop),this.section.classList.remove(r.arrowsOnSide))}progressBarCalculate(){null!==this.carouselInstance&&this.carouselTrack&&this.carouselInstance.on("scroll",e=>{e=100*Math.max(0,Math.min(1,e))+"%",this.carouselTrack.style.width=e})}getGridLayout(){this.largeItems=Number(getComputedStyle(this.carousel).getPropertyValue("--grid-large-items"))||3,this.mediumItems=Number(getComputedStyle(this.carousel).getPropertyValue("--grid-medium-items"))||this.largeItems,this.smallItems=Number(getComputedStyle(this.carousel).getPropertyValue("--grid-small-items"))||this.mediumItems||this.largeItems}visibleSlides(){var e,t,i;this.carousel&&(this.getGridLayout(),i=this.carousel.clientWidth||this.carouselInstance.size.width,e=(null!==this.carouselInstance&&this.carouselInstance.selectedElement?this.carouselInstance.selectedElement:this.carousel.querySelector(s.carouselSlide)).clientWidth,t=(null!==this.carouselInstance&&this.carouselInstance.slides?this.carouselInstance.slides:this.carousel.querySelectorAll(s.carouselSlide)).length,i=Math.floor(i/e),this.section.classList.remove(r.hiddenArrows),this.carouselPrev&&this.carouselNext&&(this.carouselPrev.classList.remove(r.hide),this.carouselNext.classList.remove(r.hide)),window.innerWidth>window.theme.sizes.large&&!this.options.groupCells&&i<=this.largeItems&&t<=this.largeItems&&this.carouselPrev&&this.carouselNext&&this.hideArrows(),window.innerWidth>=window.theme.sizes.medium&&window.innerWidth<=window.theme.sizes.large&&!this.options.groupCells&&i<=this.mediumItems&&t<=this.mediumItems&&this.carouselPrev&&this.carouselNext&&this.hideArrows(),window.innerWidth<window.theme.sizes.medium)&&!this.options.groupCells&&i<=this.smallItems&&t<=this.smallItems&&this.carouselPrev&&this.carouselNext&&this.hideArrows()}trackVisibleSlides(){var e=window.matchMedia(`(max-width: ${window.theme.sizes.medium-1}px)`),t=window.matchMedia(`(min-width: ${window.theme.sizes.medium}px) and (max-width: ${window.theme.sizes.large-1}px)`),i=window.matchMedia(`(min-width: ${window.theme.sizes.large}px)`);e.addEventListener("change",e=>{e.matches&&(this.slidesVisible=this.smallItems)}),e.matches&&(this.slidesVisible=this.smallItems),t.addEventListener("change",e=>{e.matches&&(this.slidesVisible=this.mediumItems)}),t.matches&&(this.slidesVisible=this.mediumItems),i.addEventListener("change",e=>{e.matches&&(this.slidesVisible=this.largeItems)}),i.matches&&(this.slidesVisible=this.largeItems)}containDrag(){var e=this.slidesTotal-this.slidesVisible;this.carouselInstance.selectedIndex>=e&&(this.carouselInstance.select(e),this.lockArrows(this.carouselInstance.selectedIndex))}lockArrows(e){var t;this.options.wrapAround||this.options.groupCells||(e=parseInt(e),t=this.slidesTotal-this.slidesVisible,this.carouselNext.disabled=t<=e)}showArrows(){this.carouselPrev.classList.remove(r.hide),this.carouselNext.classList.remove(r.hide),this.section.classList.remove(r.hiddenArrows)}hideArrows(){this.carouselPrev.classList.add(r.hide),this.carouselNext.classList.add(r.hide),this.section.classList.add(r.hiddenArrows)}toggleArrows(){this.carouselPrev&&this.carouselNext&&(this.carouselPrev.disabled&&this.carouselNext.disabled?this.hideArrows():this.showArrows())}}function gt(i,s){s=s||{},i.focus(),void 0!==s.className&&i.classList.add(s.className),i.addEventListener("blur",function e(t){t.target.removeEventListener(t.type,e);void 0!==s.className&&i.classList.remove(s.className)})}function yt(e){e=e||{};var t=window.location.hash,i=document.getElementById(t.slice(1));if(i&&e.ignore&&i.matches(e.ignore))return!1;t&&i&&gt(i,e)}function ft(s){return s=s||{},Array.prototype.slice.call(document.querySelectorAll('a[href^="#"]')).filter(function(e){var t,i;return"#"!==e.hash&&""!==e.hash&&!(s.ignore&&e.matches(s.ignore)||(t=e.hash.substr(1),null===document.getElementById(t))||!(i=document.querySelector(e.hash))||(e.addEventListener("click",function(){gt(i,s)}),0))})}function vt(e){return Array.prototype.slice.call(e.querySelectorAll("[tabindex],[draggable],a[href],area,button:enabled,input:not([type=hidden]):enabled,object,select:enabled,textarea:enabled[data-focus-element]")).filter(function(e){return Boolean(e.offsetWidth||e.offsetHeight||e.getClientRects().length)})}customElements.get("flickity-carousel")||customElements.define("flickity-carousel",mt);var n={};function wt(t,e){e=e||{};var i=vt(t),s=e.elementToFocus||t,r=i[0],o=i[i.length-1];bt(),n.focusin=function(e){t!==e.target&&!t.contains(e.target)&&r&&r===e.target&&r.focus(),e.target!==t&&e.target!==o&&e.target!==r||document.addEventListener("keydown",n.keydown)},n.focusout=function(){document.removeEventListener("keydown",n.keydown)},n.keydown=function(e){"Tab"===e.code&&(e.target!==o||e.shiftKey||(e.preventDefault(),r.focus()),e.target===t||e.target===r)&&e.shiftKey&&(e.preventDefault(),o.focus())},document.addEventListener("focusout",n.focusout),document.addEventListener("focusin",n.focusin),gt(s,e)}function bt(){document.removeEventListener("focusin",n.focusin),document.removeEventListener("focusout",n.focusout),document.removeEventListener("keydown",n.keydown)}var St=Object.freeze({__proto__:null,forceFocus:gt,focusHash:yt,bindInPageLinks:ft,focusable:vt,trapFocus:wt,removeTrapFocus:bt,accessibleLinks:function(e,t){if("string"!=typeof e)throw new TypeError(e+" is not a String.");var i,o,s;0!==(e=document.querySelectorAll(e)).length&&((t=t||{}).messages=t.messages||{},i={newWindow:t.messages.newWindow||"Opens in a new window.",external:t.messages.external||"Opens external website.",newWindowExternal:t.messages.newWindowExternal||"Opens external website in a new window."},o={newWindow:(t=t.prefix||"a11y")+"-new-window-message",external:t+"-external-message",newWindowExternal:t+"-new-window-external-message"},e.forEach(function(e){var t=e.getAttribute("target"),i=e.getAttribute("rel"),s=e.hostname!==window.location.hostname,t="_blank"===t,r=null===i||-1===i.indexOf("noopener");t&&r&&e.setAttribute("rel",null===i?"noopener":i+" noopener"),s&&t?e.setAttribute("aria-describedby",o.newWindowExternal):s?e.setAttribute("aria-describedby",o.external):t&&e.setAttribute("aria-describedby",o.newWindow)}),s=i,t=document.createElement("ul"),e=Object.keys(s).reduce(function(e,t){return e+("<li id="+o[t]+">"+s[t])+"</li>"},""),t.setAttribute("hidden",!0),t.innerHTML=e,document.body.appendChild(t))}});let Et=(s,r)=>{let o,a;return function e(...t){var i=Date.now();a=clearTimeout(a),!o||i-o>=r?(s.apply(null,t),o=i):a=setTimeout(e.bind(null,...t),r-(i-o))}},Lt={sizeButton:"[data-size-button]",mediaHolder:"[data-media-slide]"},kt={classExpanded:"is-expanded"};class Tt{constructor(e){this.container=e,this.sizeButtons=this.container.querySelectorAll(Lt.sizeButton),0<this.sizeButtons.length&&this.init()}
1init(){this.sizeButtons.forEach(e=>{e.addEventListener("click",()=>{e.classList.toggle(kt.classExpanded),e.closest(Lt.mediaHolder).classList.toggle(kt.classExpanded)})})}}let l={dataQuickview:"data-quickview",quickviewHolder:"data-quickview-holder",addButtonWrapper:"[data-add-action-wrapper]",modalContent:"[data-product-quickview-ajax]",quickviewModal:"[data-quickview-modal]",quickviewModalScrolls:"[data-drawer-scrolls]",quickviewModalTemplate:"[data-quickview-modal-template]",quickviewHead:"[data-quickview-head]",quickviewFormArea:"[data-quickview-form-area]",toggleButton:"[data-toggle-button]",media:"[data-media-slide]",mediaId:"[data-media-id]",dataPopup:"data-popup-",focusable:'button, [href], select, textarea, [tabindex]:not([tabindex="-1"])'},d={hide:"hide",active:"is-active",expanded:"is-expanded",loading:"loading"},At={minPart:250,mediumPart:400};class qt extends HTMLElement{constructor(){super(),this.container=this}static get observedAttributes(){return[l.dataQuickview]}attributeChangedCallback(e,t,i){t&&(this.disconnectedCallback(),this.connectedCallback())}connectedCallback(){var e,t;this.quickviewHolder=this.container.querySelector(`[${l.quickviewHolder}]`),this.modalCloseEvent=()=>this.modalClose(),this.clickQuickviewEvent=e=>this.clickQuickviewButton(e),this.quickviewHolder&&(this.modalTemplate=this.quickviewHolder.querySelector(l.quickviewModalTemplate),this.modal=document.querySelector(l.quickviewModal),this.modalID=this.quickviewHolder.getAttribute(l.quickviewHolder),this.modalContent=null,this.modalScroll=null,this.scrollLockEnable=!0,this.windowH=window.innerHeight,this.triggerButton=this.quickviewHolder.querySelector(`[${l.dataPopup}${this.modalID}]`),this.handle=this.triggerButton?this.triggerButton.getAttribute(""+l.dataPopup+this.modalID):null,this.modalTemplate&&!this.modal&&(e=this.modalTemplate.innerHTML,(t=document.createElement("div")).innerHTML=e,this.modalHtml=t.querySelector(l.quickviewModal),document.body.appendChild(this.modalHtml),this.modal=document.querySelector(l.quickviewModal)),this.modalTemplate)&&this.triggerButton&&this.triggerButton.addEventListener("click",this.clickQuickviewEvent)}clickQuickviewButton(e){e.preventDefault(),this.modal&&this.modalID&&(this.modal.id=this.modalID),document.documentElement.hasAttribute("data-scroll-locked")&&(this.scrollLockEnable=!1),this.container.classList.add(d.loading),this.getQuickviewHTML()}getQuickviewHTML(){window.fetch(`${window.theme.routes.root_url}products/${this.handle}?section_id=api-product-quickview`).then(this.handleErrors).then(e=>e.text()).then(e=>{var t=document.createElement("div"),e=(t.innerHTML=e,this.modalContent=this.modal.querySelector(l.modalContent),this.modalContent.innerHTML=t.querySelector("[data-api-content]").innerHTML,this.modalScroll=this.modal.querySelector(l.quickviewModalScrolls),this.modalContent.querySelector(l.mediaId));e&&((t=document.createElement("div")).innerHTML=e.parentElement.innerHTML,this.quickviewHolder.dispatchEvent(new CustomEvent("theme:quickview:media",{bubbles:!0,detail:{media:t}}))),this.modalCreate(),this.container.classList.remove(d.loading)})}modalCreate(){V.show(this.modalID,{onShow:(e,t,i)=>{this.quickviewHead=e.querySelector(l.quickviewHead),this.quickviewFormArea=e.querySelector(l.quickviewFormArea),this.toggleButton=e.querySelector(l.toggleButton),this.toggleForm("loading"),document.addEventListener("theme:resize",Et(()=>{this.toggleForm("resize")},500)),this.clickEventToggleForm();var s=e.querySelector(l.focusable);wt(e,{elementToFocus:s}),this.modal.addEventListener("theme:quickview:close",this.modalCloseEvent),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.modalScroll})),new Tt(this.modal)},onClose:(e,t,i)=>{e.querySelectorAll(l.media).forEach(e=>{e.dispatchEvent(new CustomEvent("pause"))}),bt(),t.focus(),this.modal.removeEventListener("theme:quickview:close",this.modalCloseEvent),this.scrollLockEnable?document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})):this.scrollLockEnable=!0}})}modalClose(){V.close(this.modalID)}handleErrors(t){return t.ok?t:t.json().then(function(e){throw new Ee({status:t.statusText,headers:t.headers,json:e})})}toggleForm(i){this.windowH===window.innerHeight&&"resize"===i||(this.toggleButton.classList.contains(d.hide)||this.toggleButton.classList.add(d.hide),this.quickviewFormArea.classList.contains(d.expanded)||this.quickviewFormArea.classList.add(d.expanded),"resize"===i&&(this.quickviewFormArea.classList.add(d.expanded),this.toggleButton.classList.add(d.hide),this.windowH=window.innerHeight),setTimeout(()=>{var e=window.innerHeight-this.quickviewHead.offsetHeight-this.quickviewFormArea.offsetHeight,t=e<At.mediumPart&&e>At.minPart,e=e<At.minPart;t||e?(this.toggleButton.classList.remove(d.hide),this.toggleButton.classList.add(d.active)):this.toggleButton.classList.add(d.hide),e?("loading"===i&&(this.quickviewFormArea.classList.add(d.loading),setTimeout(()=>{this.quickviewFormArea.classList.remove(d.loading)},50)),this.quickviewFormArea.classList.remove(d.expanded),this.toggleButton.classList.remove(d.active)):this.quickviewFormArea.classList.add(d.expanded)},200))}clickEventToggleForm(){this.toggleButton&&this.toggleButton.addEventListener("click",()=>{this.toggleButton.classList.toggle(d.active),this.quickviewFormArea.classList.toggle(d.expanded)})}disconnectedCallback(){this.modalTemplate&&this.triggerButton&&this.triggerButton.removeEventListener("click",this.clickQuickviewEvent)}}let Ct=(e,t=500,i=!0)=>{let s=window.getComputedStyle(e).display;i&&"none"!==s||(e.style.removeProperty("display"),"none"===s&&(s="block"),e.style.display=s,i=e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.style.boxSizing="border-box",e.style.transitionTimingFunction="cubic-bezier(0.215, 0.61, 0.355, 1)",e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=t+"ms",e.style.height=i+"px",e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.style.removeProperty("transition-timing-function")},t))},xt=(e,t=500)=>{e.style.transitionProperty="height, margin, padding",e.style.transitionTimingFunction="cubic-bezier(0.215, 0.61, 0.355, 1)",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property"),e.style.removeProperty("transition-timing-function")},t)};function Pt(r,...e){e.forEach(t=>{{var i=r,s=t;if(!Reflect.has(i.constructor.prototype,s))throw new Error(i+` does not define property "${s}"`);if(Reflect.getOwnPropertyDescriptor(i.constructor.prototype,s).writable)throw new Error(i+` does not define property "${s}" as a getter`);let e=Reflect.get(i,s);Reflect.defineProperty(i,s,{get:()=>(void 0!==e&&(Reflect.deleteProperty(i,s),Reflect.defineProperty(i,s,{value:e})),e)})}})}let It={wrapper:"[data-add-action-wrapper]",addButton:"[data-add-to-cart]",errorBoundary:"[data-error-boundary]",errorDisplay:"[data-error-display]",popd
1own:"[data-product-add-popdown-wrapper]",disabledAjax:'[data-ajax-disable="true"]',quickviewModal:"[data-quickview-modal]",inputFile:'[type="file"]'},Mt={loading:"loading",success:"has-success"},Ht={durationAddButtonDisable:3500,hideErrorTime:5e3};class Dt extends HTMLElement{constructor(){super(),Pt(this.wrapper=this,"popdown","button")}connectedCallback(){this.button&&this.initWithForm()}get popdown(){return document.querySelector(It.popdown)}get disabledAjax(){return document.querySelector(It.disabledAjax)}get button(){return this.wrapper.querySelector(It.addButton)}get errors(){var e=this.wrapper.querySelector(It.errors);if(!e){var t=this.wrapper.closest(It.errorBoundary);if(t)return t.querySelector(It.errorDisplay)}return e}initWithForm(){this.button.addEventListener("click",function(e){e.preventDefault();var t=e.target.closest("form");t.querySelector(It.inputFile)||(this.disabledAjax||e.preventDefault(),this.button.setAttribute("disabled",!0),this.button.classList.add(Mt.loading),e=new FormData(t),t=new URLSearchParams(e).toString(),this.addToCartAction(t))}.bind(this))}addToCartAction(e){window.showEmbroidery&&(e+="&properties[has_embroidery]=yes");var t=window.theme.routes.cart+"/add.js";let i=this;N.post(t,e,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/x-www-form-urlencoded"}}).then(function(e){i.onSuccess(e.data)}).catch(function(e){console.warn(e),i.onError(e.data)})}onSuccess(e){this.updateHeaderTotal(),this.button.classList.remove(Mt.loading),this.button.classList.add(Mt.success),setTimeout(()=>{this.button.classList.remove(Mt.success),this.button.removeAttribute("disabled")},Ht.durationAddButtonDisable),this.button.closest(It.quickviewModal)&&this.button.closest(It.quickviewModal).dispatchEvent(new CustomEvent("theme:quickview:close")),window.theme.state.cartOpen?document.dispatchEvent(new CustomEvent("theme:cart:reload",{bubbles:!0})):this.popdown.dispatchEvent(new CustomEvent("theme:cart:popdown",{detail:{variant:e},bubbles:!0})),window.onAddToCartSuccess&&window.onAddToCartSuccess(),this.disabledAjax&&window.location.reload()}onError(e){let t="Network error: please try again";e=`<div class="errors">${t=e&&e.description?e.description:t}</div>`;this.button.classList.remove(Mt.loading),this.button.removeAttribute("disabled"),this.errors.innerHTML=e,Ct(this.errors),setTimeout(()=>{xt(this.errors)},Ht.hideErrorTime)}updateHeaderTotal(){N.get(window.theme.routes.cart+".js").then(e=>{document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:e.data},bubbles:!0}))}).catch(e=>{console.error(e)})}}customElements.get("")||customElements.define("product-quickview",qt),customElements.get("product-add-button")||customElements.define("product-add-button",Dt);let c={templateAddresses:"[data-address-wrapper]",addressNewForm:"[data-new-address-form]",addressNewFormInner:"[new-address-form-inner]",btnNew:".address-new-toggle",btnEdit:".address-edit-toggle",btnDelete:".address-delete",classHide:"hide",dataFormId:"data-form-id",dataConfirmMessage:"data-confirm-message",defaultConfirmMessage:"Are you sure you wish to delete this address?",editAddress:"#EditAddress",addressCountryNew:"AddressCountryNew",addressProvinceNew:"AddressProvinceNew",addressProvinceContainerNew:"AddressProvinceContainerNew",addressCountryOption:".address-country-option",addressCountry:"AddressCountry",addressProvince:"AddressProvince",addressProvinceContainer:"AddressProvinceContainer"},_t=((h=document.querySelector(c.templateAddresses))&&new class{constructor(e){this.section=e,this.addressNewForm=this.section.querySelector(c.addressNewForm),this.init()}init(){if(this.addressNewForm){let t=this.section,i=this.addressNewForm.querySelector(c.addressNewFormInner);this.customerAddresses();var e=t.querySelectorAll(c.btnNew),e=(e.length&&e.forEach(e=>{e.addEventListener("click",function(){i.classList.toggle(c.classHide)})}),t.querySelectorAll(c.btnEdit)),e=(e.length&&e.forEach(e=>{e.addEventListener("click",function(){var e=this.getAttribute(c.dataFormId);t.querySelector(c.editAddress+"_"+e).classList.toggle(c.classHide)})}),t.querySelectorAll(c.btnDelete));
1e.length&&e.forEach(e=>{e.addEventListener("click",function(){var e=this.getAttribute(c.dataFormId),t=this.getAttribute(c.dataConfirmMessage);confirm(t||c.defaultConfirmMessage)&&Shopify.postLink(window.theme.routes.account_addresses_url+"/"+e,{parameters:{_method:"delete"}})})})}}customerAddresses(){Shopify.CountryProvinceSelector&&new Shopify.CountryProvinceSelector(c.addressCountryNew,c.addressProvinceNew,{hideElement:c.addressProvinceContainerNew}),this.section.querySelectorAll(c.addressCountryOption).forEach(e=>{var e=e.getAttribute(c.dataFormId),t=c.addressCountry+"_"+e,i=c.addressProvince+"_"+e,e=c.addressProvinceContainer+"_"+e;new Shopify.CountryProvinceSelector(t,i,{hideElement:e})})}}(h),document.querySelector("#RecoverPassword")&&(()=>{var e="#RecoverPassword",t="#HideRecoverPasswordLink";function i(e){e.preventDefault(),s()}function s(){var e=document.querySelector("#CustomerEmail").value;document.querySelector("#RecoverEmail").value=e,document.querySelector("#RecoverPasswordForm").classList.toggle("display-none"),document.querySelector("#CustomerLoginForm").classList.toggle("display-none")}"#recover"===window.location.hash&&s(),document.querySelector(".reset-password-success")&&document.querySelector("#ResetSuccess").classList.remove("display-none"),document.querySelector(e).addEventListener("click",i),document.querySelector(t).addEventListener("click",i)})(),window.Shopify=window.Shopify||{},window.Shopify.theme=window.Shopify.theme||{},window.Shopify.theme.sections=window.Shopify.theme.sections||{},window.Shopify.theme.sections.registered=window.Shopify.theme.sections.registered||{},window.Shopify.theme.sections.instances=window.Shopify.theme.sections.instances||[],window.Shopify.theme.sections.registered),Bt=window.Shopify.theme.sections.instances,Ft={id:"data-section-id",type:"data-section-type"};class Wt{constructor(e=null,t=[]){this.type=e,this.components=(e=>{if(void 0!==e&&"object"!=typeof e||null===e)throw new TypeError("Theme Sections: The components object provided is not a valid");return e})(t),this.callStack={onLoad:[],onUnload:[],onSelect:[],onDeselect:[],onBlockSelect:[],onBlockDeselect:[],onReorder:[]},t.forEach(e=>{for(var[t,i]of Object.entries(e)){var s=this.callStack[t];Array.isArray(s)&&"function"==typeof i?s.push(i):(console.warn(`Unregisted function: '${t}' in component: '${this.type}'`),console.warn(i))}})}getStack(){return this.callStack}}class Ot{constructor(e,t){this.container=(e=>{if(!(e instanceof Element))throw new TypeError("Theme Sections: Attempted to load section. The section container provided is not a DOM element.");if(null!==e.getAttribute(Ft.id))return e;throw new Error("Theme Sections: The section container provided does not have an id assigned to the "+Ft.id+" attribute.")})(e),this.id=e.getAttribute(Ft.id),this.type=t.type,this.callStack=t.getStack();try{this.onLoad()}catch(e){console.warn("Error in section: "+this.id),console.warn(this),console.error(e)}}callFunctions(e,i=null){this.callStack[e].forEach(e=>
1{var t={id:this.id,type:this.type,container:this.container};i?e.call(t,i):e.call(t)})}onLoad(){this.callFunctions("onLoad")}onUnload(){this.callFunctions("onUnload")}onSelect(e){this.callFunctions("onSelect",e)}onDeselect(e){this.callFunctions("onDeselect",e)}onBlockSelect(e){this.callFunctions("onBlockSelect",e)}onBlockDeselect(e){this.callFunctions("onBlockDeselect",e)}onReorder(e){this.callFunctions("onReorder",e)}}function e(e,t){if("string"!=typeof e)throw new TypeError("Theme Sections: The first argument for .register must be a string that specifies the type of the section being registered");if(void 0!==_t[e])throw new Error('Theme Sections: A section of type "'+e+'" has already been registered. You cannot register the same section type twice');Array.isArray(t)||(t=[t]);t=new Wt(e,t);_t[e]=t,_t}function $t(e,s){e=Rt(e),s=zt(s=void 0===s?document.querySelectorAll("["+Ft.type+"]"):s),e.forEach(function(t){let i=_t[t];void 0!==i&&(s=s.filter(function(e){if(!(0<Vt(e).length)&&null!==e.getAttribute(Ft.type)){if(e.getAttribute(Ft.type)!==t)return!0;Bt.push(new Ot(e,i))}return!1}))})}function Vt(e){var t,i=[];return(NodeList.prototype.isPrototypeOf(e)||Array.isArray(e))&&(t=e[0]),e instanceof Element||t instanceof Element?zt(e).forEach(function(t){i=i.concat(Bt.filter(function(e){return e.container===t}))}):"string"!=typeof e&&"string"!=typeof t||Rt(e).forEach(function(t){i=i.concat(Bt.filter(function(e){return e.type===t}))}),i}function Nt(e){for(var t,i=0;i<Bt.length;i++)if(Bt[i].id===e){t=Bt[i];break}return t}function Rt(e){return"*"===e?e=Object.keys(_t):"string"==typeof e?e=[e]:e.constructor===Ot?e=[e.prototype.type]:Array.isArray(e)&&e[0].constructor===Ot&&(e=e.map(function(e){return e.type})),e=e.map(function(e){return e.toLowerCase()})}function zt(e){return NodeList.prototype.isPrototypeOf(e)&&0<e.length?e=Array.prototype.slice.call(e):NodeList.prototype.isPrototypeOf(e)&&0===e.length||null===e?e=[]:!Array.isArray(e)&&e instanceof Element&&(e=[e]),e}window.Shopify.designMode&&(document.addEventListener("shopify:section:load",function(e){var t=e.detail.sectionId,e=e.target.querySelector("["+Ft.id+'="'+t+'"]');null!==e&&$t(e.getAttribute(Ft.type),e)}),document.addEventListener("shopify:section:reorder",function(e){var t=e.detail.sectionId,e=e.target.querySelector("["+Ft.id+'="'+t+'"]');"object"==typeof Vt(e)[0]&&Vt(e).forEach(function(e){e.onReorder()})}),document.addEventListener("shopify:section:unload",function(e){var t=e.detail.sectionId,e=e.target.querySelector("["+Ft.id+'="'+t+'"]');"object"==typeof Vt(e)[0]&&Vt(e).forEach(function(e){var t=Bt.map(function(e){return e.id}).indexOf(e.id);Bt.splice(t,1),e.onUnload()})}),document.addEventListener("shopify:section:select",function(e){var t=Nt(e.detail.sectionId);"object"==typeof t&&t.onSelect(e)}),document.addEventListener("shopify:section:deselect",function(e){var t=Nt(e.detail.sectionId);"object"==typeof t&&t.onDeselect(e)}),document.addEventListener("shopify:block:select",function(e){var t=Nt(e.detail.sectionId);"object"==typeof t&&t.onBlockSelect(e)}),document.addEventListener("shopify:block:deselect",function(e){var t=Nt(e.detail.sectionId);"object"==typeof t&&t.onBlockDeselect(e)}));let jt={focusable:'button, [href], select, textarea, [tabindex]:not([tabindex="-1"])'};function Ut(e){V.init({openTrigger:"data-popup-"+e,disableScroll:!0,onShow:(e,t,i)=>{i.preventDefault();i=e.querySelector(jt.focusable);wt(e,{elementToFocus:i})},onClose:(e,t,i)=>{i.preventDefault(),bt(),t.focus()}})}let Gt={trigger:"[data-toggle-password-modal]",errors:".storefront-password-form .errors"},Jt={};class Qt{constructor(e){this.container=e.container,this.trigger=this.container.querySelector(Gt.trigger),this.errors=this.container.querySelector(Gt.errors),this.init()}init(){Ut("password"),this.errors&&this.trigger.click()}}e("password",{onLoad(){Jt[this.id]=new Qt(this)}});{var h="#QrCode",u=".giftcard__code";let t=document.querySelector(h);t&&window.addEventListener("load",function(){var e=t.getAttribute("data-identifier");new QRCode(t,{text:e,width:120,height:120})}),(h=document.querySelector(u))&&h.addEventListener("click",(u=document.querySelector("#GiftCardDigits"),h="",void(document.body.createTextRange?((h=document.body.createTextRange()).moveToElementText(u),h.select()):window.getSelection&&(ei=window.getSelection(),(h=document.createRange()).selectNodeContents(u),ei.removeAllRanges(),ei.addRange(h)))))}let Xt={parallaxWrapper:"[data-parallax-wrapper]",parallaxImg:"[data-parallax-img]"},Yt={},p=(e("article",u={onLoad(){Yt[this.id]=[],this.container.querySelectorAll(Xt.parallaxWrapper).forEach(e
1=>{var t=e.querySelector(Xt.parallaxImg);Yt[this.id].push(new R(t,{center:!0,round:!0,frame:e}))})},onUnload:function(){Yt[this.id].forEach(e=>{"function"==typeof e.destroy&&e.destroy()})}}),{frame:"[data-ticker-frame]",scale:"[data-ticker-scale]",text:"[data-ticker-text]",clone:"data-clone",animationClass:"ticker--animated",unloadedClass:"ticker--unloaded",comparitorClass:"ticker__comparitor",moveTime:1.63,space:100}),Kt={};class Zt{constructor(e,t=!1){this.frame=e,this.stopClone=t,this.scale=this.frame.querySelector(p.scale),this.text=this.frame.querySelector(p.text),this.comparitor=this.text.cloneNode(!0),this.comparitor.classList.add(p.comparitorClass),this.frame.appendChild(this.comparitor),this.scale.classList.remove(p.unloadedClass),this.resizeEvent=ae(()=>this.checkWidth(),300),this.listen()}unload(){document.removeEventListener("theme:resize",this.resizeEvent)}listen(){document.addEventListener("theme:resize",this.resizeEvent),this.checkWidth()}checkWidth(){var e=2*window.getComputedStyle(this.frame).paddingLeft.replace("px","");if(this.frame.clientWidth-e<this.comparitor.clientWidth||this.stopClone){if(this.text.classList.add(p.animationClass),1===this.scale.childElementCount&&(this.clone=this.text.cloneNode(!0),this.clone.setAttribute("aria-hidden",!0),this.clone.setAttribute(p.clone,""),this.scale.appendChild(this.clone),this.stopClone))for(let e=0;e<10;e++){var t=this.text.cloneNode(!0);t.setAttribute("aria-hidden",!0),t.setAttribute(p.clone,""),this.scale.appendChild(t)}e=this.text.clientWidth/p.space*p.moveTime;this.scale.style.setProperty("--animation-time",e+"s")}else{this.text.classList.add(p.animationClass);e=this.scale.querySelector(`[${p.clone}]`);e&&this.scale.removeChild(e),this.text.classList.remove(p.animationClass)}}}var ei={onLoad(){Kt[this.id]=[],this.container.querySelectorAll(p.frame).forEach(e=>{Kt[this.id].push(new Zt(e))})},onUnload(){Kt[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}};let ti={speed:"data-slider-speed",slideAttribute:"data-slide",dataSlideIndex:"data-slide-index"};class ii{constructor(e,t){this.container=e,this.slideshow=t;e=this.slideshow.getAttribute(ti.speed);this.speed=!!e&&parseInt(e),this.scrollEvent=()=>this.scrollEvents(),this.resizeEvent=()=>this.resizeEvents(),this.slideshow&&(this.flkty=null,this.init())}init(){var e={initialIndex:0,autoPlay:this.speed,contain:!0,pageDots:!1,adaptiveHeight:!0,wrapAround:!0,groupCells:!1,cellAlign:"left",freeScroll:!1,prevNextButtons:!0,draggable:!0,rightToLeft:window.isRTL,on:{ready:()=>{setTimeout(()=>{this.slideshow.dispatchEvent(new CustomEvent("theme:announcement:loaded",{bubbles:!0,detail:{slider:this}}))},50)}}};this.flkty=new O(this.slideshow,e),this.flkty&&(document.addEventListener("theme:resize",this.resizeEvent),document.addEventListener("theme:scroll",this.scrollEvent))}resizeEvents(){this.flkty.resize()}scrollEvents(){var e;this.flkty&&this.speed&&((e=this.flkty.element).getBoundingClientRect().top+window.scrollY+e.offsetHeight<window.pageYOffset?"playing"===this.flkty.player.state&&this.flkty.pausePlayer():"paused"===this.flkty.player.state&&this.flkty.playPlayer())}onUnload(){this.slideshow&&this.flkty&&(document.removeEventListener("theme:resize",this.resizeEvent),document.removeEventListener("theme:scroll",this.scrollEvent),this.flkty.options.watchCSS=!1,this.flkty.destroy())}onBlockSelect(e){this.slideshow&&(e=this.slideshow.querySelector(`[${ti.slideAttribute}="${e.detail.blockId}"]`))&&(e=parseInt(e.getAttribute(ti.dataSlideIndex)),this.flkty.selectCell(e),this.flkty.stopPlayer())}onBlockDeselect(){this.flkty.playPlayer()}}let si={cartMessage:"[data-cart-message]",cartMessageValue:"data-cart-message",leftToSpend:"[data-left-to-spend]",cartProgress:"[data-cart-progress]",limit:"data-limit",percent:"data-percent"},ri={isHidden:"is-hidden",isSuccess:"is-success"};class oi{constructor(e){this.container=e,this.cartMessage=this.container.querySelectorAll(si.cartMessage),this.rate=window.Shopify.currency.rate,0<this.cartMessage.length&&this.init()}init(){this.cartFreeLimitShipping=100*Number(this.cartMessage[0].getAttribute(si.limit))*this.rate,this.shippingAmount=0,this.circumference=28*Math.PI,this.exchangeRateConversions(this.cartFreeLimitShipping,this.shippingAmount),this.cartBarProgress(),this.listen()}listen(){document.addEventListener("theme:cart:change",function(e){this.cart=e.detail.cart,this.render()}.bind(this))}render(){var e=this.cart.total_price;this.freeShippingMessageHandle(e),this.cart&&this.cart.total_price&&0<this.cartMessage.length&&(this.shippingAmount=e,this.updateProgress())}freeShippingMessageHandle(i){0<this.cartMessage.length&&this.container.querySelectorAll(si.cartMessage).forEach(e
1=>{var t=e.hasAttribute(si.cartMessageValue)&&"true"===e.getAttribute(si.cartMessageValue)&&i>=this.cartFreeLimitShipping&&0!==i;e.classList.toggle(ri.isSuccess,t)})}cartBarProgress(t=null){this.container.querySelectorAll(si.cartProgress).forEach(e=>{this.setProgress(e,null===t?e.getAttribute(si.percent):t)})}setProgress(e,t){t=this.circumference-t/100*this.circumference/2;e.style.strokeDashoffset=t}updateProgress(){var e=this.shippingAmount/this.cartFreeLimitShipping*100;this.exchangeRateConversions(this.cartFreeLimitShipping,this.shippingAmount),this.cartBarProgress(100<e?100:e)}exchangeRateConversions(e,t){let i=theme.settings.currency_code_enable?z.formatMoney(e-t,theme.moneyFormat)+(" "+theme.currencyCode):z.formatMoney(e-t,theme.moneyFormat);this.container.querySelectorAll(si.leftToSpend).forEach(e=>{e.innerHTML=i.replace(".00","")})}}let m={bar:"[data-bar]",barSlide:"[data-slide]",frame:"[data-ticker-frame]",header:"[data-header-wrapper]",slider:"[data-announcement-slider]",slideValue:"data-slide",tickerScale:"[data-ticker-scale]",tickerText:"[data-ticker-text]",dataTargetReferrer:"data-target-referrer",slideAttribute:"data-slide"},ai={mobileClass:"mobile",desktopClass:"desktop",trickerAnimated:"ticker--animated"},ni={};class li{constructor(e){this.container=e.container,this.barHolder=this.container.querySelector(m.bar),this.locationPath=location.href,this.slides=this.barHolder.querySelectorAll(m.barSlide),this.slider=this.barHolder.querySelector(m.slider),this.hasDeviceClass="",new oi(this.container),this.init()}init(){this.removeAnnouncement(),this.slider?(this.slider,this.slides&&1<this.slides.length?this.initSliders():this.initTickers()):this.initTickers(!0)}removeAnnouncement(){for(let e=0;e<this.slides.length;e++){var t=this.slides[e];!t.hasAttribute(m.dataTargetReferrer)||-1!==this.locationPath.indexOf(t.getAttribute(m.dataTargetReferrer))||window.Shopify.designMode||t.parentNode.removeChild(t)}}initSliders(){this.slider=new ii(this.container,this.slider),this.slider.flkty.reposition(),this.barHolder.addEventListener("theme:announcement:loaded",()=>{this.initTickers()})}initTickers(e=!1){var t=this.barHolder.querySelector(m.frame);t&&new Zt(t,e)}toggleTicker(e,t){var i=document.querySelector(m.tickerScale);let s=document.querySelector(`[${m.slideValue}="${e.detail.blockId}"]`);t&&s&&(i.setAttribute("data-stop",""),i.querySelectorAll(m.tickerText).forEach(e=>{e.classList.remove(ai.trickerAnimated),e.style.transform=`translate3d(${-(s.offsetLeft-s.clientWidth)}px, 0, 0)`})),!t&&s&&(i.querySelectorAll(m.tickerText).forEach(e=>{e.classList.add(ai.trickerAnimated),e.removeAttribute("style")}),i.removeAttribute("data-stop"))}onBlockSelect(e){this.slider&&"function"==typeof this.slider.onBlockSelect?this.slider.onBlockSelect(e):(document.querySelectorAll(`[${m.slideAttribute}="${e.detail.blockId}"]`).forEach(e=>{e.classList.contains(ai.mobileClass)&&(this.hasDeviceClass=ai.mobileClass),e.classList.contains(ai.desktopClass)&&(this.hasDeviceClass=ai.desktopClass),""!==this.hasDeviceClass&&e.classList.remove(this.hasDeviceClass)}),this.toggleTicker(e,!0))}onBlockDeselect(e){this.slider&&"function"==typeof this.slider.onBlockDeselect?this.slider.onBlockDeselect(e):(""!==this.hasDeviceClass&&document.querySelectorAll(`[${m.slideAttribute}="${e.detail.blockId}"]`).forEach(e=>{e.classList.add(this.hasDeviceClass)}),this.toggleTicker(e,!1))}onUnload(){this.slider&&"function"==typeof this.slider.onUnload&&this.slider.onUnload()}}e("announcement",{onLoad(){ni[this.id]=[],ni[this.id].push(new li(this))},onUnload(){ni[this.id].forEach(e=>{"function"==typeof e.onUnload&&e.onUnload()})},onBlockSelect(t){ni[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){ni[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockDeselect(t)})}});let di={frame:"[data-ticker-frame]",slideValue:"data-slide",tickerScale:"[data-ticker-scale]",tickerText:"[data-ticker-text]"},ci={trickerAnimated:"ticker--animated"},hi={};class ui{constructor(e){this.container=e.container,this.init()}init(){this.initTickers(!0)}initTickers(e=!1){var t=this.container.querySelector(di.frame);t&&new Zt(t,e)}toggleTicker(e,t){var i=this.container.querySelector(di.tickerScale);let s=this.container.querySelector(`[${di.slideValue}="${e.detail.blockId}"]`);t&&s&&i&&(i.setAttribute("data-stop",""),i.querySelectorAll(di.tickerText).forEach(e
1=>{e.classList.remove(ci.trickerAnimated),e.style.transform=`translate3d(${-(s.offsetLeft-s.clientWidth)}px, 0, 0)`})),!t&&s&&i&&(i.querySelectorAll(di.tickerText).forEach(e=>{e.classList.add(ci.trickerAnimated),e.removeAttribute("style")}),i.removeAttribute("data-stop"))}onBlockSelect(e){this.toggleTicker(e,!0)}onBlockDeselect(e){this.toggleTicker(e,!1)}}e("logos",{onLoad(){hi[this.id]=[],hi[this.id].push(new ui(this))},onBlockSelect(t){hi[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){hi[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockDeselect(t)})}}),e("blog",u);var pi="[data-drawer]",mi="[data-drawer-scrolls]",gi="[data-predictive-search-input]",yi="[data-drawer-underlay]",fi="[data-stagger-animation]",vi="data-drawer-toggle",wi=":scope > * > [data-animates]",bi='button, [href], select, textarea, [tabindex]:not([tabindex="-1"])',Si="drawer--visible",Ei="display-none",Li={};class ki{constructor(e){this.drawer=e,this.drawerScrolls=this.drawer.querySelector(mi),this.underlay=this.drawer.querySelector(yi),this.key=this.drawer.dataset.drawer;e=`[${vi}='${this.key}']`;this.buttons=document.querySelectorAll(e),this.staggers=this.drawer.querySelectorAll(fi),this.connectToggle(),this.connectDrawer(),this.closers(),this.staggerChildAnimations()}unload(){}connectToggle(){this.buttons.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),this.drawer.dispatchEvent(new CustomEvent("theme:drawer:toggle",{bubbles:!1}))}.bind(this))})}connectDrawer(){this.drawer.addEventListener("theme:drawer:toggle",function(){this.drawer.classList.contains(Si)?this.drawer.dispatchEvent(new CustomEvent("theme:drawer:close",{bubbles:!1})):this.drawer.dispatchEvent(new CustomEvent("theme:drawer:open",{bubbles:!1}))}.bind(this)),this.drawer.addEventListener("theme:drawer:close",this.hideDrawer.bind(this)),this.drawer.addEventListener("theme:drawer:open",this.showDrawer.bind(this))}staggerChildAnimations(){this.staggers.forEach(e=>
1{e.querySelectorAll(wi).forEach((e,t)=>{e.style.transitionDelay=50*t+10+"ms"})})}closers(){this.drawer.addEventListener("keyup",function(e){"Escape"===e.code&&(this.hideDrawer(),this.buttons[0].focus())}.bind(this)),this.underlay.addEventListener("click",function(){this.hideDrawer()}.bind(this))}focusFirst(){var e=this.drawer.querySelector(gi);e?e.focus():(e=this.drawer.querySelector(bi),wt(this.drawer,{elementToFocus:e}))}showDrawer(){this.drawer.classList.remove(Ei),setTimeout(()=>{this.buttons.forEach(e=>e.setAttribute("aria-expanded",!0)),this.drawer.classList.add(Si),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.drawerScrolls})),this.drawer.addEventListener("transitionend",this.focusFirst.bind(this),{once:!0}),this.drawer.addEventListener("transitioncancel",this.focusFirst.bind(this),{once:!0})},1)}hideDrawer(){this.buttons.forEach(e=>e.setAttribute("aria-expanded",!0)),this.drawer.classList.remove(Si),this.drawerScrolls.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),document.dispatchEvent(new CustomEvent("theme:sliderule:close",{bubbles:!1})),bt(),setTimeout(()=>{this.drawer.classList.contains(Si)||this.drawer.classList.add(Ei)},800)}}h={onLoad(){Li[this.id]=[],this.container.querySelectorAll(pi).forEach(e=>{Li[this.id].push(new ki(e))})},onUnload:function(){Li[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}};let Ti={announcement:"#shopify-section-announcement",transparent:"data-header-transparent",header:"[data-header-wrapper] header"},Ai={stuck:"js__header__stuck",stuckAnimated:"js__header__stuck--animated",triggerAnimation:"js__header__stuck--trigger-animation",stuckBackdrop:"js__header__stuck__backdrop"},qi={};class Ci{constructor(e){this.wrapper=e,this.type=this.wrapper.dataset.headerSticky,this.transparent=this.wrapper.dataset.headerTransparent,this.sticks="sticky"===this.type,this.animated="directional"===this.type,this.currentlyStuck=!1,this.cls=this.wrapper.classList;var e=document.querySelector(Ti.announcement),e=e?e.clientHeight:0,t=document.querySelector(Ti.header).clientHeight;this.blur=t+e,this.stickDown=t+e,this.stickUp=e,"false"!==this.wrapper.getAttribute(Ti.transparent)&&(this.blur=e),this.sticks&&(this.stickDown=e,this.scrollDownInit()),this.listen()}unload(){document.removeEventListener("theme:scroll",this.listen),document.removeEventListener("theme:scroll:up",this.scrollUpDirectional),document.removeEventListener("theme:scroll:down",this.scrollDownDirectional)}listen(){(this.sticks||this.animated)&&document.addEventListener("theme:scroll",e=>{e.detail.down?(!this.currentlyStuck&&e.detail.position>this.stickDown&&this.stickSimple(),!this.currentlyBlurred&&e.detail.position>this.blur&&this.addBlur()):(e.detail.position<=this.stickUp&&this.unstickSimple(),e.detail.position<=this.blur&&this.removeBlur())}),this.animated&&(document.addEventListener("theme:scroll:up",this.scrollUpDirectional.bind(this)),document.addEventListener("theme:scroll:down",this.scrollDownDirectional.bind(this)))}stickSimple(){this.animated&&this.cls.add(Ai.stuckAnimated),this.cls.add(Ai.stuck),this.wrapper.setAttribute(Ti.transparent,!1),this.currentlyStuck=!0}unstickSimple(){this.cls.remove(Ai.stuck),this.wrapper.setAttribute(Ti.transparent,this.transparent),this.animated&&this.cls.remove(Ai.stuckAnimated),this.currentlyStuck=!1}scrollDownInit(){window.scrollY>this.stickDown&&this.stickSimple(),window.scrollY>this.blur&&this.addBlur()}stickDirectional(){this.cls.add(Ai.triggerAnimation)}unstickDirectional(){this.cls.remove(Ai.triggerAnimation)}scrollDownDirectional(){this.unstickDirectional()}scrollUpDirectional(){window.scrollY<=this.stickDown?this.unstickDirectional():this.stickDirectional()}addBlur(){this.cls.add(Ai.stuckBackdrop),this.currentlyBlurred=!0}removeBlur(){this.cls.remove(Ai.stuckBackdrop),this.currentlyBlurred=!1}}var xi={onLoad(){qi=new Ci(this.container)},onUnload:function(){"function"==typeof qi.unload&&qi.unload()}};let Pi={disclosureToggle:"data-hover-disclosure-toggle",disclosureWrappper:"[data-hover-disclosure]",link:"[data-top-link]",wrapper:"[data-header-wrapper]",stagger:"[data-stagger]",staggerPair:"[data-stagger-first]",staggerAfter:"[data-stagger-second]",staggerImage:"[data-grid-item], [data-header-image]"},Ii={isVisible:"is-visible",meganavVisible:"meganav--visible",grandparent:"grandparent"},Mi={},Hi={};class Di{constructor(e){this.disclosure=e,this.wrapper=e.closest(Pi.wrapper),this.key=this.disclosure.id;e=`[${Pi.disclosureToggle}='${this.key}']`;this.trigger=document.querySelector(e),this.link=this.trigger.querySelector(Pi.link),this.grandparent=this.trigger.classList.contains(Ii.grandparent),this.trigger.setAttribute("aria-haspopup",!0),this.trigger.setAttribute("aria-expanded",!1),this.trigger.setAttribute("aria-controls",this.key),this.connectHoverToggle(),this.handleTablets(),this.staggerChildAnimations()}onBlockSelect(e){this.disclosure.contains(e.target)&&this.showDisclosure()}onBlockDeselect(e){this.disclosure.contains(e.target)&&this.hideDisclosure()}showDisclosure(){this.grandparent?this.wrapper.classList.add(Ii.meganavVisible):this.wrapper.classList.remove(Ii.meganavVisible),this.trigger.setAttribute("aria-expanded",!0),this.trigger.classList.add(Ii.isVisible),this.disclosure.classList.add(Ii.isVisible)}hideDisclosure(){this.disclosure.classList.remove(Ii.isVisible),this.trigger.classList.remove(Ii.isVisible),this.trigger.setAttribute("aria-expanded",!1),this.wrapper.classList.remove(Ii.meganavVisible)}staggerChildAnimations(){this.disclosure.querySelectorAll(Pi.stagger).forEach((e,t)=>{e.style.transitionDelay=50*t+10+"ms"}),this.disclosure.querySelectorAll(Pi.staggerPair).forEach((e,t)=>{let i=150*t;e.style.transitionDelay=i+"ms",e.parentElement.querySelectorAll(Pi.staggerAfter).forEach((e,t)=>{t=20*(t+1);e.style.transitionDelay=i+t+"ms"})}),this.disclosure.querySelectorAll(Pi.staggerImage).forEach((e,t)=>{e.style.transitionDelay=80*(t+1)+"ms"})}handleTablets(){this.trigger.addEventListener("touchstart",function(e){this.disclosure.classList.contains(Ii.isVisible)||(e.preventDefault(),this.showDisclosure())}.bind(this),{passive:!0})}connectHoverToggle(){this.trigger.addEventListener("pointerenter",this.showDisclosure.bind(this)),this.link.addEventListener("focus",this.showDisclosure.bind(this)),this.trigger.addEventListener("pointerleave",this.hideDisclosure.bind(this)),this.trigger.addEventListener("focusout",function(e){this.trigger.contains(e.relatedTarget)||this.hideDisclosure()}.bind(this)),this.disclosure.addEventListener("keyup",function(e){"Escape"===e.code&&this.hideDisclosure()}.bind(this))}}var _i={onLoad(){Mi[this.id]=[],(Hi=this.container.querySelectorAll(Pi.disclosureWrappper)).forEac
1h(e=>{Mi[this.id].push(new Di(e))})},onBlockSelect(t){Mi[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){Mi[this.id].forEach(e=>{"function"==typeof e.onBlockDeselect&&e.onBlockDeselect(t)})},onUnload:function(){Mi[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}};let g={item:"[data-main-menu-text-item]",wrapper:"[data-text-items-wrapper]",text:".navtext",isActive:"data-menu-active",sectionOuter:"[data-header-wrapper]",underlineCurrent:"data-underline-current",defaultItem:".menu__item.main-menu--active .navtext, .header__desktop__button.main-menu--active .navtext"},Bi={},Fi=null;class Wi{constructor(e){this.wrapper=e,this.itemList=this.wrapper.querySelectorAll(g.item),this.sectionOuter=document.querySelector(g.sectionOuter),this.underlineCurrent="true"===this.sectionOuter.getAttribute(g.underlineCurrent),this.defaultItem=null,this.underlineCurrent&&(this.defaultItem=this.wrapper.querySelector(g.defaultItem)),this.setDefault(),document.fonts.ready.then(()=>{this.init()})}init(){var e;this.itemList.length&&(this.listen(),this.listenResize(),this.textBottom=null,this.setHeight(),Fi?(this.defaultItem&&(e=this.defaultItem.offsetLeft||0,this.sectionOuter.style.setProperty("--bar-left",e+"px")),this.reset()):(e=this.sectionOuter.querySelector(g.item).offsetLeft,this.sectionOuter.style.setProperty("--bar-left",e+"px"),this.sectionOuter.style.setProperty("--bar-width","0px")),this.sectionOuter.style.setProperty("--bar-opacity","1"))}unload(){document.removeEventListener("theme:resize",this.reset),Fi=null}listenResize(){document.addEventListener("theme:resize",this.reset.bind(this))}setDefault(){this.defaultItem&&(Fi={left:this.defaultItem.offsetLeft||null,width:this.defaultItem.clientWidth||null})}setHeight(){var e=this.wrapper.clientHeight,t=this.itemList[0].querySelector(g.text).clientHeight,e=Math.floor(e/2-t/2)-4;this.textBottom!==e&&(this.sectionOuter.style.setProperty("--bar-text",t+"px"),this.sectionOuter.style.setProperty("--bar-bottom",e+"px"),this.textBottom=e)}listen(){this.itemList.forEach(e=>{e.addEventListener("pointerenter",e=>{e=e.target.querySelector(g.text);this.startBar(e)})}),this.wrapper.addEventListener("pointerleave",this.clearBar.bind(this))}startBar(e){this.setHeight();var t="false"!==this.sectionOuter.getAttribute(g.isActive);let i=e.offsetLeft,s=e.clientWidth;t?this.render(s,i):(this.sectionOuter.setAttribute(g.isActive,!0),this.render(0,i),setTimeout(()=>{this.render(s,i)},10))}render(e,t){this.sectionOuter.style.setProperty("--bar-left",t+"px"),this.sectionOuter.style.setProperty("--bar-width",e+"px")}reset(){this.setDefault(),Fi&&Fi.left&&Fi.width?(this.sectionOuter.style.setProperty("--bar-left",Fi.left+"px"),this.sectionOuter.style.setProperty("--bar-width",Fi.width+"px")):this.sectionOuter.style.setProperty("--bar-width","0px")}clearBar(){this.sectionOuter.setAttribute(g.isActive,!1),setTimeout(()=>{"false"===this.sectionOuter.getAttribute(g.isActive)&&this.reset()},150)}}var Oi={onLoad(){Bi[this.id]=[],this.container.querySelectorAll(g.wrapper).forEach(e=>{Bi[this.id].push(new Wi(e))})},onUnload:function(){Bi[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()}),delete Bi[this.id]}};let $i={price:"data-header-cart-price",count:"data-header-cart-count",dot:"data-header-cart-full"};class Vi{constructor(e){this.section=e,this.counts=this.section.querySelectorAll(`[${$i.count}]`),this.prices=this.section.querySelectorAll(`[${$i.price}]`),this.dots=this.section.querySelectorAll(`[${$i.dot}]`),this.cart=null,this.listen()}listen(){document.addEventListener("theme:cart:change",function(e){this.cart=e.detail.cart,this.update()}.bind(this))}update(){this.cart&&(this.prices.forEach(e=>{e.setAttribute($i.price,this.cart.total_price);var t=z.formatMoney(this.cart.total_price,theme.moneyFormat);e.innerHTML=t}),this.counts.forEach(e=>{e.setAttribute($i.count,this.cart.item_count),e.innerHTML=`(${this.cart.item_count})`}),this.dots.forEach(e=>{var t=0<this.cart.item_count;e.setAttribute($i.dot,t)}))}}var Ni={onLoad(){new Vi(this.container)}};let Ri={wrapper:"[data-search-popdown-wrap]",popdownTrigger:"data-popdown-toggle",close:"[data-close-popdown]",input:"[data-predictive-search-input]",underlay:"[data-search-underlay]"},zi={underlayVisible:"underlay--visible",isVisible:"is-visible"},ji={};class Ui{constructor(e){this.trigger=e,this.key=this.trigger.getAttribute(Ri.popdownTrigger),this.popdown=document.querySelector(`[id='${this.key}']`),this.input=this.popdown.querySelector(Ri.input),this.close=this.popdown.querySelector(Ri.close),this.wrapper=this.popdown.closest(Ri.wrapper),this.underlay=this.wrapper.querySelector(Ri.underlay),this.initTriggerEvents(),this.initPopdownEvents()}initTriggerEvents(){this.trigger.setAttribute("aria-haspopup",!0),this.trigger.setAttribute("aria-expanded",!1),this.trigger.setAttribute("aria-controls",this.key),this.trigger.addEventListener("click",function(e){e.preventDefault(),this.showPopdown()}.bind(this)),this.trigger.addEventListener("keyup",function(e){"Space"===e.code&&this.showPopdown()}.bind(this))}initPopdownEvents(){this.popdown.addEventListener("keyup",function(e){"Escape"===e.code&&this.hidePopdown()}.bind(this)),this.close.addEventListener("click",function(){this.hidePopdown()}.bind(this)),this.underlay.addEventListener("click",function(){this.hidePopdown()}.bind(this))}hidePopdown(){this.popdown.classList.remove(zi.isVisible),this.underlay.classList.remove(zi.underlayVisible),this.trigger.focus(),bt(),this.popdown.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))}showPopdown(){this.popdown.classList.add(zi.isVisible),this.underlay.classList.add(zi.underlayVisible),wt(this.popdown,{elementToFocus:this.input}),this.popdown.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0}))}}var Gi={onLoad(){ji[this.id]={};var e=this.container.querySelector(`[${Ri.popdownTrigger}]`);e&&(ji[this.id]=new Ui(e))},onUnload:function(){"function"==typeof ji[this.id].unload&&ji[this.id].unload()}};let Ji={dataGridItemVariant:"data-grid-item-variant",dataGridImageTarget:"data-grid-image-target",dataSwatchGridImageIndex:"data-grid-image",dataGridImage:"data-grid-image",dataSwatchImageId:"data-swatch-image-id",dataSwatchIndex:"data-swatch-index"};class Qi extends HTMLElement{constructor(){super(),(this.container=this).gridItemVariantLinks=this.container.querySelectorAll(`a[${Ji.dataGridItemVariant}]`)}connectedCallback(){this.gridItemVariantLinks.length&&this.gridItemVariantLinks.forEach(e
1=>{e.hasAttribute(Ji.dataGridItemVariant)&&(this.swatchHoverEvent(e),this.swatchClickEvent(e))})}swatchHoverEvent(t){t.addEventListener("mouseenter",()=>{var e;t.hasAttribute(Ji.dataGridItemVariant)&&(e=t.getAttribute(Ji.dataGridItemVariant),this.container.querySelectorAll(`product-grid-item-variant[${Ji.dataGridItemVariant}="${e}"] product-grid-item-image`).forEach(e=>{e.setAttribute("loading","eager")}))})}swatchClickEvent(i){i.addEventListener("click",e=>{if(e.preventDefault(),this.container.querySelectorAll(`a[${Ji.dataGridItemVariant}]`).forEach(e=>e.removeAttribute("aria-selected")),i.setAttribute("aria-selected","true"),i.hasAttribute(Ji.dataGridItemVariant)){let t=i.getAttribute(Ji.dataGridItemVariant);this.container.querySelectorAll(`product-grid-item-variant[${Ji.dataGridItemVariant}]`).forEach(e=>{e.getAttribute(Ji.dataGridItemVariant)===t?e.removeAttribute("hidden"):e.setAttribute("hidden","")})}})}}let y={productGridItemLink:"[data-grid-link]",dataGridImages:"data-grid-images",dataGridImage:"data-grid-image",dataGridImageTarget:"data-grid-image-target",dataGridCurrentImage:"data-grid-current-image",dataGridPagination:"data-grid-pagination",dataGridPage:"data-grid-page",dataGridItemVariant:"data-grid-item-variant",dataSlideForFilterSelectedVariant:"data-slide-for-filter-selected-variant",dataSlideForVariantMedia:"data-sli
1de-for-variant-media",dataPopup:"data-popup-",dataSlideshowStyle:"data-slideshow-style",styleWidth:"--width"},Xi={fade:"is-fade",active:"is-active",mobile:"is-mobile",pagination:"product-grid-item__pagination",productGridItemImage:"product-grid-item__image"};class Yi extends HTMLElement{static get observedAttributes(){return["hidden"]}constructor(){super(),(this.container=this).mobileStopSlideshow="true",this.timeout=1e3*window.theme.settings.cycle_images_hover_delay||1500,this.interval=null,this.pagingProgressPause=!1,this.pagingProgressCounter=0,this.siblingsFetchCounter=0,this.siblingLoadImageIndex=null,this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&1<this.imageCount&&this.preloadImage(1)})},{threshold:.1})}preloadImage(e){if(!this.isMobile){var t=[...this.images][e];if(!t)throw new Error("No child element at index "+e);t.setAttribute("loading","eager")}}preloadImages(){[...this.imagesHolder.children].forEach((e,t)=>this.preloadImage(t))}connectedCallback(){this.toggleMobile(),document.addEventListener("theme:resize:width",()=>this.toggleMobile()),this.isMobile||(1<this.imageCount&&(this.createPaging(),this.container.addEventListener("theme:swatch:change",e=>{var t=e.detail.id,t=this.container.querySelector(`[${y.dataGridImageTarget}="${t}"]`);t&&(t=t.getAttribute(y.dataGridImage),this.pagingProgressCounter=0,this.changeImage(t),e.detail.stopSlideAnimation)&&this.stopPaging()}),this.container.addEventListener("mouseenter",()=>{switch(this.preloadImages(),this.slideshowStyle){case"cycle_images":this.pagingProgressPause=this.isMobile,this.progressPaging();break;case"second_immediately":this.changeImage(this.getNextIndex());break;case"disabled":break;default:throw new Error("Unknown option "+this.slideshowStyle)}}),this.container.addEventListener("mouseleave",()=>{this.pagingProgressPause=!0,this.resetSlideshow(),this.progressPaging()})),this.intersectionObserver.observe(this.container))}attributeChangedCallback(e,t,i){"hidden"===e&&null==t&&null!=i&&this.showVariant()}toggleMobile(){this.container.classList.toggle(Xi.mobile,this.isMobile)}get isMobile(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<window.theme.sizes.medium}resetSlideshow(){var e=this.container.querySelector(`[${y.dataSlideForFilterSelectedVariant}]`);e?(e=Number(e.getAttribute(y.dataGridImage)),this.changeImage(e)):this.changeImage(0),this.pagingProgressPause=!0}showVariant(){var e=this.container.querySelector(`[${y.dataSlideForVariantMedia}]`);e?(e=Number(e.getAttribute(y.dataGridImage)),this.changeImage(e)):this.changeImage(0),this.pagingProgressPause=!0}getNextIndex(){var e=this.container.querySelector(`[${y.dataGridImage}][${y.dataGridCurrentImage}]`);return e?(Number(e.getAttribute(y.dataGridImage))+1)%this.imageCount:0}changeImage(e){var t=this.images[e%this.imageCount];t&&(this.activeImages.forEach(e=>e.removeAttribute(y.dataGridCurrentImage)),t.setAttribute(y.dataGridCurrentImage,"true"),"cycle_images"===this.slideshowStyle)&&this.changePaging(e)}changePaging(e=0){var t=this.container.querySelector(`[${y.dataGridPage}].`+Xi.active),e=this.container.querySelector(`[${y.dataGridPage}="${e}"]`);t&&(t.style.setProperty(y.styleWidth,"100%"),t.classList.remove(Xi.active)),e&&(e.classList.add(Xi.active),this.progressPaging())}progressPaging(){let e=this.container.querySelector(`[${y.dataGridPage}].`+Xi.active);e&&!this.isMobile&&(this.stopPaging(),0===this.pagingProgressCounter&&e.style.setProperty(y.styleWidth,"0%"),this.interval=setInterval(()=>{100<=this.pagingProgressCounter&&!this.pagingProgressPause?(this.stopPaging(),this.pagingProgressCounter=0,this.changeImage(this.getNextIndex())):this.pagingProgressPause||(this.pagingProgressCounter++,e.style.setProperty(y.styleWidth,this.pagingProgressCounter+"%"))},this.timeout/100))}stopPaging(){this.interval&&clearInterval(this.interval)}createPaging(){if(this.imagesHolder&&"cycle_images"===this.slideshowStyle){let i="";for(let t=0;t<this.imageCount;t++){let e="";0===t&&(e=`class="${Xi.active}"`),i+=`<span ${e} ${y.dataGridPage}="${t}">${t+1}</span>`}if(""!==i){let e=this.container.querySelector(`[${y.dataGridPagination}]`);e||((e=document.createElement("div")).className=Xi.pagination,e.setAttribute(y.dataGridPagination,"")),e.innerHTML=i,this.imagesHolder.parentElement.prepe
1nd(e)}}}removePaging(){var e=this.container.querySelector(`[${y.dataGridPagination}]`);e&&e.remove()}get imagesHolder(){return this.container.querySelector(`[${y.dataGridImages}]`)}get images(){return this.imagesHolder.querySelectorAll(`[${y.dataGridImage}]`)}get activeImages(){return this.imagesHolder.querySelectorAll(`[${y.dataGridImage}][${y.dataGridCurrentImage}]`)}get links(){return this.container.querySelectorAll(y.productGridItemLink)}get slideshowStyle(){return this.container.getAttribute(y.dataSlideshowStyle)}get imageCount(){return this.images.length}}let Ki={dataGridCurrentImage:"data-grid-current-image"},Zi={active:"is-active"};class es extends HTMLElement{static get observedAttributes(){return["loading",Ki.dataGridCurrentImage]}connectedCallback(){null===this.getAttribute(Ki.dataGridCurrentImage)?this.hide():this.show()}attributeChangedCallback(e,t,i){switch(e){case"loading":null!==i&&"eager"!==i||this.eagerLoad();break;case Ki.dataGridCurrentImage:null===i?this.hide():this.show()}}show(){this.classList.add(Zi.active)}hide(){this.classList.remove(Zi.active)}eagerLoad(){var e=this.firstElementChild;switch(e.nodeName){case"TEMPLATE":var t=e,i=t.content;i.querySelectorAll("img").forEach(e=>{e.setAttribute("loading","eager"),e.setAttribute("fetchpriority","high")}),t.replaceWith(i);break;case"IMG":e.setAttribute("loading","eager"),e.setAttribute("fetchpriority","high")}}}let f={popoutWrapper:"[data-popout]",popoutList:"[data-popout-list]",popoutListScroll:"data-popout-list-scroll",popoutToggle:"data-popout-toggle",popoutInput:"[data-popout-input]",popoutOptions:"[data-popout-option]",popoutPrevent:"data-popout-prevent",popoutQuantity:"data-quantity-field",dataValue:"data-value",ariaExpanded:"aria-expanded",ariaCurrent:"aria-current"},ts={listVisible:"popout-list--visible",currentSuffix:"--current"};class is extends HTMLElement{constructor(){super(),this.container=this.querySelector(f.popoutWrapper),this.popoutList=this.container.querySelector(f.popoutList),this.popoutToggle=this.container.querySelector(`[${f.popoutToggle}]`),this.outsidePopupToggle=document.querySelector(`[${f.popoutToggle}="${this.popoutList.id}"]`),this.popoutInput=this.container.querySelector(f.popoutInput),this.popoutOptions=this.container.querySelectorAll(f.popoutOptions),this.popoutPrevent="true"===this.container.getAttribute(f.popoutPrevent),this._connectOptions(),this._connectToggle(),this._onFocusOut(),this.popupListMaxWidth(),this.popoutInput&&this.popoutInput.hasAttribute(f.popoutQuantity)&&document.addEventListener("theme:popout:update",this.updatePopout.bind(this)),document.addEventListener("theme:resize",()=>{this.popupListMaxWidth()})}unload(){this.popoutOptions.length&&this.popoutOptions.forEach(e=>{e.removeEventListener("theme:popout:click",this.popupOptionsClick.bind(this)),e.removeEventListener("click",this._connectOptionsDispatch.bind(this))}),this.popoutToggle.removeEventListener("click",this.popupToggleClick.bind(this)),this.popoutToggle.removeEventListener("focusout",this.popupToggleFocusout.bind(this)),this.popoutList.removeEventListener("focusout",this.popupListFocusout.bind(this)),this.container.removeEventListener("keyup",this.containerKeyup.bind(this)),this.outsidePopupToggle&&(this.outsidePopupToggle.removeEventListener("click",this.popupToggleClick.bind(this)),this.outsidePopupToggle.removeEventListener("focusout",this.popupToggleFocusout.bind(this)))}popupToggleClick(e){var t="true"===e.currentTarget.getAttribute(f.ariaExpanded);e.currentTarget.setAttribute(f.ariaExpanded,!t),this.popoutList.classList.toggle(ts.listVisible),this.popupListMaxWidth(),this.popoutList.hasAttribute(f.popoutListScroll)&&setTimeout(()=>{this.popoutList.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0}))},1)}popupToggleFocusout(e){this.container.contains(e.relatedTarget)||this._hideList()}popupListFocusout(e){e=e.currentTarget.contains(e.relatedTarget);this.popoutList.classList.contains(ts.listVisible)&&!e&&this._hideList()}popupListMaxWidth(){this.popoutList.style.maxWidth=parseInt(document.body.clientWidth-this.popoutList.getBoundingClientRect().left)+"px"}popupOptionsClick(i){if("#"===i.target.closest(f.popoutOptions).attributes.href.value){i.preventDefault();let t="";if(i.currentTarget.getAttribute(f.dataValue)&&(t=i.currentTarget.getAttribute(f.dataValue)),this.popoutInput.value=t,this.popoutPrevent){this.popoutInput.dispatchEvent(new Event("change")),!i.detail.preventTrigger&&this.popoutInput.hasAttribute(f.popoutQuantity)&&this.popoutInput.dispatchEvent(new Event("input"));
1var s=this.popoutList.querySelector(`[class*="${ts.currentSuffix}"]`);let e=ts.currentSuffix;if(s&&s.classList.length)for(var r of s.classList)if(r.includes(ts.currentSuffix)){e=r;break}s=this.popoutList.querySelector("."+e),s=(s&&(s.classList.remove(""+e),i.currentTarget.parentElement.classList.add(""+e)),this.popoutList.querySelector(`[${f.ariaCurrent}]`));s&&s.hasAttribute(""+f.ariaCurrent)&&(s.removeAttribute(""+f.ariaCurrent),i.currentTarget.setAttribute(""+f.ariaCurrent,"true")),""!==t&&(this.popoutToggle.textContent=t,this.outsidePopupToggle)&&(this.outsidePopupToggle.textContent=t),this.popupToggleFocusout(i),this.popupListFocusout(i)}else this._submitForm(t)}}updatePopout(e){var t=this.popoutList.querySelector(`[${f.dataValue}="${this.popoutInput.value}"]`);t&&t.dispatchEvent(new CustomEvent("theme:popout:click",{cancelable:!0,bubbles:!0,detail:{preventTrigger:!0}}))}containerKeyup(e){"Escape"===e.code&&(this._hideList(),this.popoutToggle.focus())}bodyClick(e){var t=this.container.contains(e.target),i=this.popoutList.classList.contains(ts.listVisible);this.outsidePopupToggle,e.target,i&&!t&&this._hideList()}_connectToggle(){this.popoutToggle.addEventListener("click",this.popupToggleClick.bind(this)),this.outsidePopupToggle&&this.outsidePopupToggle.addEventListener("click",this.popupToggleClick.bind(this))}_connectOptions(){this.popoutOptions.length&&this.popoutOptions.forEach(e=>{e.addEventListener("theme:popout:click",this.popupOptionsClick.bind(this)),e.addEventListener("click",this._connectOptionsDispatch.bind(this))})}_connectOptionsDispatch(e){var t=new CustomEvent("theme:popout:click",{cancelable:!0,bubbles:!0,detail:{preventTrigger:!1}});e.target.dispatchEvent(t)||e.preventDefault()}_onFocusOut(){this.popoutToggle.addEventListener("focusout",this.popupToggleFocusout.bind(this)),this.outsidePopupToggle&&this.outsidePopupToggle.addEventListener("focusout",this.popupToggleFocusout.bind(this)),this.popoutList.addEventListener("focusout",this.popupListFocusout.bind(this)),this.container.addEventListener("keyup",this.containerKeyup.bind(this)),document.body.addEventListener("click",this.bodyClick.bind(this))}_submitForm(e){var t=this.container.closest("form");t&&t.submit()}_hideList(){this.popoutList.classList.remove(ts.listVisible),this.popoutToggle.setAttribute(f.ariaExpanded,!1),this.outsidePopupToggle&&this.outsidePopupToggle.setAttribute(f.ariaExpanded,!1)}}let ss={cartNote:"[data-cart-note]"};class rs{constructor(e){this.inputs=e.querySelectorAll(ss.cartNote),this.initInputs()}initInputs(){this.inputs.forEach(e=>{e.addEventListener("change",function(e){e=e.target.value.toString()||"";this.saveNotes(e)}.bind(this))})}saveNotes(e){window.fetch(window.theme.routes.cart+"/update.js",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({note:e})}).catch(e=>{console.error(e)})}}let os=(e,s=[],r=!1)=>{var t=Object.keys(e).map(t=>{var i=e[t];if("[object Object]"===Object.prototype.toString.call(i)||Array.isArray(i))return Array.isArray(e)?s.push(""):s.push(t),os(i,s,Array.isArray(i));{let e=t;return 0<s.length&&(t=r?s:[...s,t],e=t.reduce((e,t)=>""===e?t:e+`[${t}]`,"")),r?e+"[]="+i:e+"="+i}}).join("&");return s.pop(),t},v={html:"html",submitButton:"[data-submit-shipping]",form:"[data-shipping-estimate-form]",template:"[data-response-template]",country:"#estimate_address_country",province:"#estimate_address_province",zip:"#estimate_address_zip",wrapper:"[data-response-wrapper]",defaultData:"data-default-fullname",defaultData:"data-default",lang:"lang"},as={success:"shipping--success",error:"errors",disable:"disabled"};class ns{constructor(e){this.button=e.container.querySelector(v.submitButton),this.template=e.container.querySelector(v.template).innerHTML,this.ratesWrapper=e.container.querySelector(v.wrapper),this.form=e.container.querySelector(v.form),this.country=e.container.querySelector(v.country),this.province=e.container.querySelector(v.province),this.zip=e.container.querySelector(v.zip),this.init()}enableButtons(){this.button.removeAttribute("disabled"),this.button.classList.remove(as.disable)}disableButtons(){this.button.setAttribute("disabled","disabled"),this.button.classList.add(as.disable)}render(e){this.template&&this.ratesWrapper&&(e=J.render(this.template,e),this.ratesWrapper.innerHTML=e),this.enableButtons(),this.ratesWrapper.style.removeProperty("display")}estimate(e){e=encodeURI(os({shipping_address:e})),e=window.theme.routes.cart+"/shipping_rates.json?"+e;let t=this;N.get(e).then(function(e){e=t.sanitize(e);t.render(e),t.enableButtons(),t.ratesWrapper.style.removeProperty("display")}).catch(function(e){e=t.sanitizeErrors(e);t.render(e)})}sanitize(e){let i={};return i.class=as.success,i.items=[],e.data.shipping_rates&&0<e.data.shipping_rates.length?e.data.shipping_rates.forEac
1h(e=>{var t={};t.title=e.presentment_name,t.value=z.formatMoney(e.price,theme.moneyFormat),i.items.push(t)}):i.items[0]={value:theme.strings.noShippingAvailable},i}sanitizeErrors(e){var t={};if(t.class=as.error,t.items=[],"object"==typeof e.data)for(var[i,s]of Object.entries(e.data)){var r={};r.title=i.toString(),r.value=s.toString(),t.items.push(r)}else t.items[0]={value:theme.strings.noShippingAvailable};return t}init(){var e=document.querySelector(v.html);let t="en";e.hasAttribute(v.lang)&&""!==e.getAttribute(v.lang)&&(t=e.getAttribute(v.lang)),this.form&&j.AddressForm(this.form,t,{shippingCountriesOnly:!0}),this.country&&this.country.hasAttribute(v.defaultData)&&this.province&&this.province.hasAttribute(v.defaultData)&&this.country.addEventListener("change",function(){this.country.removeAttribute(v.defaultData),this.province.removeAttribute(v.defaultData)}),this.button&&this.button.addEventListener("click",function(e){for(e.preventDefault(),this.disableButtons();this.ratesWrapper.firstChild;)this.ratesWrapper.removeChild(this.ratesWrapper.firstChild);this.ratesWrapper.style.display="none";e={};let t=this.country.value,i=this.province.value;var s=this.country.getAttribute(v.defaultData),s=(""===t&&s&&""!==s&&(t=s),this.province.getAttribute(v.defaultData));""===i&&s&&""!==s&&(i=s),e.zip=this.zip.value||"",e.country=t||"",e.province=i||"",this.estimate(e)}.bind(this))}}let ls={wrapper:"[data-quantity-selector]",increase:"[data-increase-quantity]",decrease:"[data-decrease-quantity]",input:"[data-quantity-input]"};class ds{constructor(e){this.wrapper=e,this.increase=this.wrapper.querySelector(ls.increase),this.decrease=this.wrapper.querySelector(ls.decrease),this.input=this.wrapper.querySelector(ls.input),this.min=parseInt(this.input.getAttribute("min"),10),this.initButtons()}initButtons(){this.increase.addEventListener("click",function(e){e.preventDefault();e=parseInt(this.input.value,10),e=isNaN(e)?0:e;this.input.value=++e,this.input.dispatchEvent(new Event("change"))}.bind(this)),this.decrease.addEventListener("click",function(e){e.preventDefault();e=parseInt(this.input.value,10),e=isNaN(e)?0:e;e--,e=Math.max(this.min,e),this.input.value=e,this.input.dispatchEvent(new Event("change"))}.bind(this))}}function cs(e){e.querySelectorAll(ls.wrapper).forEach(e=>{new ds(e)})}let w={drawer:'[data-drawer="drawer-cart"]',shipping:"[data-shipping-estimate-form]",loader:"[data-cart-loading]",form:"[data-cart-form]",emptystate:"[data-cart-empty]",progress:"[data-cart-progress]",items:"[data-line-items]",subtotal:"[data-cart-subtotal]",bottom:"[data-cart-bottom]",quantity:"[data-quantity-selector]",errors:"[data-form-errors]",item:"[data-cart-item]",finalPrice:"[data-cart-final]",key:"data-update-cart",remove:"data-remove-key",pageUpsellWrapper:"[data-cart-page-upsell-wrapper]",cartPage:'[data-section-type="cart"]',bar:"[data-cart-bar]",ship:"[data-cart-message]",itemLoadbar:"[data-item-loadbar]",cartMessageContainer:"[data-cart-message-container]",apiContent:"[data-api-content]"},t={hidden:"cart--hidden",loading:"cart--loading"};class hs{constructor(e){this.section=e,this.container=e.container,this.cartMessages=document.querySelectorAll(w.cartMessageContainer),this.bar=this.container.querySelector(w.bar),this.ship=this.container.querySelector(w.ship),this.drawer=this.container.querySelector(w.drawer),this.form=this.container.querySelector(w.form),this.loader=this.container.querySelector(w.loader),this.bottom=this.container.querySelector(w.bottom),this.items=this.container.querySelector(w.items),this.subtotal=this.container.querySelector(w.subtotal),this.errors=this.container.querySelector(w.errors),this.finalPrice=this.container.querySelector(w.finalPrice),this.emptystate=this.container.querySelector(w.emptystate),this.progress=this.container.querySelector(w.progress),this.latestClick=null,this.cart=null,this.stale=!0,this.cartPage=document.querySelector(w.cartPage),this.listen()}listen(){document.addEventListener("theme:cart:change",function(e){this.cart=e.detail.cart,this.stale=!0}.bind(this)),document.addEventListener("theme:cart:init",function(){this.init()}.bind(this)),document.addEventListener("theme:cart:reload",function(){this.stale=!0,this.cart?this.loadHTML():this.init().then(()=>this.loadHTML())}.bind(this)),this.drawer&&(this.drawer.addEventListener("theme:drawer:open",function(){this.cart?this.loadHTML():this.init().then(()=>this.loadHTML()),window.theme.state.cartOpen=!0}.bind(this)),this.drawer.addEventListener("theme:drawer:close",function(){window.theme.state.cartOpen=!1})),new rs(this.container),new oi(this.container)}init(){return window.fetch(window.theme.routes.cart+".js").then(this.handleErrors).then(e=>e.json()).then(e=>(this.cart=e,this.fireChange(e),e)).catch(e=>{console.error(e)})}loadHTML(){this.stale&&(this.cart&&0<this.cart.item_count?this.loadForm():(this.showEmpty(),this.cartMessages.forEac
1h(e=>{new oi(e)}))),this.stale=!1}initInputs(){this.inputs=this.container.querySelectorAll(`[${w.key}]`),this.inputs.forEach(e=>{let i=e.getAttribute(w.key);e.addEventListener("change",function(e){var t=parseInt(e.target.value,10);this.latestClick=e.target.closest(w.item),this.lockState(),this.updateCart(i,t)}.bind(this))})}initRemove(){this.removers=this.container.querySelectorAll(`[${w.remove}]`),this.removers.forEach(e=>{let t=e.getAttribute(w.remove);e.addEventListener("click",function(e){e.preventDefault(),this.latestClick=e.target.closest(w.item),this.lockState(),this.updateCart(t,0)}.bind(this))})}lockState(){this.latestClick.querySelector(w.itemLoadbar).style.display="block",this.loader.classList.add(t.loading)}async updateCart(e,t){var i=document.querySelector(`[data-key="${e}"]`);i&&t<1&&(i.querySelector(".cart__items__title-link").innerHTML.trim().toLowerCase(),i.getAttribute("data-embroidery"))&&await window.fetch(window.theme.routes.cart+"/change.js",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i.getAttribute("data-embroidery"),quantity:0})}),window.fetch(window.theme.routes.cart+"/change.js",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,quantity:t})}).then(this.handleErrors).then(e=>e.json()).then(e=>{this.cart=e,xt(this.errors),this.fireChange(e),this.stale=!0,this.loadHTML()}).catch(e=>{var t;if(!(e instanceof Ee))throw t=`<p>${e.message||window.theme.strings.stockout||"Could not update cart, please reload"}</p>`,this.showError(t),e;t=`<p>${e.json?.message||e.message||window.theme.strings.stockout||"Could not update cart, please reload"}</p>`,e=e.json?.description||"",this.showError([t,e].join(" ")),this.loadForm()})}fireChange(e){document.dispatchEvent(new CustomEvent("theme:cart:change",{detail:{cart:e},bubbles:!0}))}updateTotal(){var e;this.cart&&this.cart.total_price&&(e=z.formatMoney(this.cart.total_price,theme.moneyFormat),this.finalPrice.innerHTML=e+(" "+theme.currencyCode)),this.subtotal&&this.cart&&window.fetch(window.theme.routes.root_url+"?section_id=api-cart-subtotal").then(this.handleErrors).then(e=>e.text()).then(e=>{var t=document.createElement("div");t.innerHTML=e,this.subtotal.innerHTML=t.querySelector(w.apiContent).innerHTML})}showError(e){xt(this.errors),this.errors.innerHTML=e,window.setTimeout(()=>{Ct(this.errors)},600)}loadForm(){window.fetch(window.theme.routes.root_url+"?section_id=api-cart-items").then(this.handleErrors).then(e=>e.text()).then(e=>{var t=document.createElement("div");t.innerHTML=e,this.items.innerHTML=t.querySelector(w.apiContent).innerHTML,this.showForm(),this.initQuantity(),this.initQuickview(),this.updateTotal()})}initQuickview(){var e=this.items.querySelector(w.pageUpsellWrapper),t=this.bottom.querySelector(w.pageUpsellWrapper);t&&t.remove(),this.cartPage&&e&&this.bottom.insertBefore(e,this.bottom.firstChild)}initQuantity(){cs(this.container),this.initInputs(),this.initRemove()}showForm(){this.bar&&this.bar.classList.remove(t.hidden),this.ship&&this.ship.classList.remove(t.hidden),this.progress&&this.progress.classList.remove(t.hidden),this.form.classList.remove(t.hidden),this.bottom.classList.remove(t.hidden),this.loader.classList.remove(t.loading),this.emptystate.classList.add(t.hidden)}showEmpty(){this.bar&&this.bar.classList.add(t.hidden),this.ship&&this.ship.classList.add(t.hidden),this.progress&&this.progress.classList.add(t.hidden),this.emptystate.classList.remove(t.hidden),this.loader.classList.remove(t.loading),this.form.classList.add(t.hidden),this.bottom.classList.add(t.hidden)}handleErrors(t){return t.ok?t:t.json().then(function(e){throw new Ee({status:t.statusText,headers:t.headers,json:e})})}}var us={onLoad(){this.container.querySelector(w.drawer)&&(this.cart=new hs(this));var e=this.container.querySelector(w.shipping);e&&new ns(this)},onUnload:function(){this.cart&&"function"==typeof this.cart.unload&&this.cart.unload()}};let ps={accordionGroup:"[data-accordion-group]",accordionToggle:"data-accordion-trigger",accordionBody:"[data-accordion-body]",accordionBodyMobile:"data-accordion-body-mobile",rangeSlider:"data-range-holder",section:"[data-section-id]"},ms={open:"accordion-is-open"},gs={};class ys{constructor(e){this.body=e,this.key=this.body.id;e=`[${ps.accordionToggle}='${this.key}']`;this.trigger=document.querySelector(e),this.toggleEvent=e=>this.clickEvents(e),this.keyboardEvent=e=>this.keyboardEvents(e),this.hideEvent=()=>this.hideEvents(),this.syncBodies=this.getSiblings(),this.body.hasAttribute(ps.accordionBodyMobile)?this.mobileAccordions():this.init()}mobileAccordions(){window.innerWidth<window.theme.sizes.medium?(this.init(),this.setDefaultState()):(this.resetMobileAccordions(),this.body.removeAttribute("style")),document.addEventListener("theme:resize",()=>{window.innerWidth<window.theme.sizes.medium?(this.init(),this.setDefaultState()):(this.resetMobileAccordions(),this.body.removeAttribute("style"))})}init(){this.trigger.setAttribute("aria-haspopup",!0),this.trigger.setAttribute("aria-expanded",!1),this.trigger.setAttribute("aria-controls",this.key),this.setDefaultState(),this.trigger.addEventListener("click",this.toggleEvent),this.body.addEventListener("keyup",this.keyboardEvent),this.body.addEventListener("theme:accordion:close",this.hideEvent)}hideEvents(){this.hideAccordion()}clickEvents(e){e.preventDefault(),this.toggleState()}keyboardEvents(e){"Escape"===e.code&&(this.hideAccordion(),this.trigger.focus())}resetMobileAccordions(){this.trigger.removeEventListener("click",this.toggleEvent),this.body.removeEventListener("keyup",this.keyboardEvent),this.body.removeEventListener("theme:accordion:close",this.hideEvent)}setDefaultState(){this.trigger.classList.contains(ms.open)?Se(this.body):this.hideAccordion()}getSiblings(){var e=[...this.body.closest(ps.section).querySelectorAll(ps.accordionGroup)].filter(e=>e.contains(this.body)).shift();return e?[...e.querySelectorAll(ps.accordionBody)].filter(e=>!e.contains(this.body)):[]}
1closeSiblings(){this.syncBodies.forEach(e=>{e.dispatchEvent(new CustomEvent("theme:accordion:close",{bubbles:!1}))})}toggleState(){this.trigger.classList.contains(ms.open)?this.hideAccordion():(this.showAccordion(),this.closeSiblings(),this.body.hasAttribute(ps.rangeSlider)&&setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:price-range:reset",{bubbles:!1}))},400))}hideAccordion(){this.trigger.classList.remove(ms.open),xt(this.body)}showAccordion(){this.trigger.classList.add(ms.open),Ct(this.body),setTimeout(()=>{this.checkInViewportAndScrollTo()},600)}checkInViewportAndScrollTo(){var e=this.trigger.getBoundingClientRect(),t=(window.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0);0<=e.top&&0<=e.left&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)||window.scrollTo({top:t+e.top,left:0,behavior:"smooth"})}onBlockSelect(e){this.body.contains(e.target)&&this.showAccordion()}onBlockDeselect(e){this.body.contains(e.target)&&this.hideAccordion()}}var fs={onLoad(){gs[this.id]=[],this.container.querySelectorAll(ps.accordionBody).forEach(e=>{gs[this.id].push(new ys(e))})},onUnload:function(){gs[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})},onSelect:function(){"accordion-single"===this.type&&this.container.querySelector(`[${ps.accordionToggle}]`).click()},onDeselect:function(){"accordion-single"===this.type&&this.container.querySelector(`[${ps.accordionToggle}]`).click()},onBlockSelect(t){gs[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){gs[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockDeselect(t)})}};let vs=e=>{e&&(e.style.display="none")},ws={inputSearch:'input[type="search"]',focusedElements:'[aria-selected="true"] a',resetButton:'button[type="reset"]'},bs={hidden:"is-hidden"};class Ss extends HTMLElement{constructor(){super(),this.input=this.querySelector(ws.inputSearch),this.resetButton=this.querySelector(ws.resetButton),this.input&&(this.input.form.addEventListener("reset",this.onFormReset.bind(this)),this.input.addEventListener("input",ae(e=>{this.onChange(e)},300).bind(this)))}toggleResetButton(){var e=this.resetButton.classList.contains(bs.hidden);0<this.input.value.length&&e?this.resetButton.classList.remove(bs.hidden):0!==this.input.value.length||e||this.resetButton.classList.add(bs.hidden)}onChange(){this.toggleResetButton()}shouldResetForm(){return!document.querySelector(ws.focusedElements)}onFormReset(e){e.preventDefault(),this.shouldResetForm()&&(this.input.value="",this.toggleResetButton(),e.target.querySelector(ws.inputSearch).focus())}}customElements.define("header-search-form",Ss);let b={allVisibleElements:'[role="option"]',ariaSelected:'[aria-selected="true"]',predictiveSearch:"predictive-search",predictiveSearchResults:"[data-predictive-search-results]",predictiveSearchStatus:"[data-predictive-search-status]",searchInput:"[data-predictive-search-input]",searchResultsLiveRegion:"[data-predictive-search-live-region-count-value]",searchResultsGroupsWrapper:"data-search-results-groups-wrapper",searchForText:"[data-predictive-search-search-for-text]",sectionPredictiveSearch:"#shopify-section-predictive-search",selectedLink:'[aria-selected="true"] a',selectedOption:'[aria-selected="true"] a, button[aria-selected="true"]',loader:"[data-loading-indicator]"};class Es extends Ss{constructor(){super(),(this.wrapper=this).a11y=St,this.abortController=new AbortController,this.allPredictiveSearchInstances=document.querySelectorAll(b.predictiveSearch),this.cachedResults={},this.input=this.wrapper.querySelector(b.searchInput),this.isOpen=!1,this.predictiveSearchResults=this.querySelector(b.predictiveSearchResults),this.searchTerm="",this.loader=this.wrapper.querySelector(b.loader)}connectedCallback(){this.input.addEventListener("focus",this.onFocus.bind(this)),this.input.form.addEventListener("submit",this.onFormSubmit.bind(this)),this.addEventListener("focusout",this.onFocusOut.bind(this)),this.addEventListener("keyup",this.onKeyup.bind(this)),this.addEventListener("keydown",this.onKeydown.bind(this))}getQuery(){return this.input.value.trim()}onChange(){super.onChange();var e=this.getQuery();this.searchTerm&&e.startsWith(this.searchTerm)||this.querySelector(b.searchResultsGroupsWrapper)?.remove(),this.updateSearchForTerm(this.searchTerm,e),this.searchTerm=e,this.searchTerm.length?this.get
1SearchResults(this.searchTerm):this.reset()}onFormSubmit(e){this.getQuery().length&&!this.querySelector(b.selectedLink)||e.preventDefault()}onFormReset(e){super.onFormReset(e),super.shouldResetForm()&&(this.searchTerm="",this.abortController.abort(),this.abortController=new AbortController,this.closeResults(!0))}shouldResetForm(){return!document.querySelector(b.selectedLink)}onFocus(){var e=this.getQuery();e.length&&(this.searchTerm!==e?this.onChange():"true"===this.getAttribute("results")?this.open():this.getSearchResults(this.searchTerm))}onFocusOut(){setTimeout(()=>{this.contains(document.activeElement)||this.close()})}onKeyup(e){switch(this.getQuery().length||this.close(!0),e.preventDefault(),e.code){case"ArrowUp":this.switchOption("up");break;case"ArrowDown":this.switchOption("down");break;case"Enter":this.selectOption()}}onKeydown(e){"ArrowUp"!==e.code&&"ArrowDown"!==e.code||e.preventDefault()}updateSearchForTerm(e,t){var i=this.querySelector(b.searchForText),s=i?.innerText;!s||1<s.match(e)?.length||(s=s.replace(e,t),i.innerText=s)}switchOption(s){if(this.getAttribute("open")){var s="up"===s,r=this.querySelector(b.ariaSelected),o=Array.from(this.querySelectorAll(b.allVisibleElements)).filter(e=>null!==e.offsetParent);let i=0;if(!s||r){let e=-1,t=0;for(;-1===e&&t<=o.length;)o[t]===r&&(e=t),t++;this.statusElement.textContent="",!s&&r?i=e===o.length-1?0:e+1:s&&(i=0===e?o.length-1:e-1),i!==e&&((s=o[i]).setAttribute("aria-selected",!0),r&&r.setAttribute("aria-selected",!1),this.input.setAttribute("aria-activedescendant",s.id))}}}selectOption(){var e=this.querySelector(b.selectedOption);e&&e.click()}getSearchResults(e){let i=e.replace(" ","-").toLowerCase();this.setLiveRegionLoadingState(),this.cachedResults[i]?this.renderSearchResults(this.cachedResults[i]):(Se(this.loader),fetch(`${theme.routes.predictive_search_url}?q=${encodeURIComponent(e)}&section_id=predictive-search`,{signal:this.abortController.signal}).then(this.handleErrors).then(e=>e.text()).then(e=>{let t=(new DOMParser).parseFromString(e,"text/html").querySelector(b.sectionPredictiveSearch).innerHTML;this.allPredictiveSearchInstances.forEach(e=>{e.cachedResults[i]=t}),this.renderSearchResults(t)}).catch(e=>{console.error(e)}).finally(()=>{vs(this.loader)}))}setLiveRegionLoadingState(){this.statusElement=this.statusElement||this.querySelector(b.predictiveSearchStatus),this.loadingText=this.loadingText||this.getAttribute("data-loading-text"),this.setLiveRegionText(this.loadingText),this.setAttribute("loading",!0)}setLiveRegionText(e){this.statusElement.setAttribute("aria-hidden","false"),this.statusElement.textContent=e,setTimeout(()=>{this.statusElement.setAttribute("aria-hidden","true")},1e3)}renderSearchResults(e){this.predictiveSearchResults.innerHTML=e,this.setAttribute("results",!0),this.setLiveRegionResults(),this.open()}setLiveRegionResults(){this.removeAttribute("loading"),this.setLiveRegionText(this.querySelector(b.searchResultsLiveRegion).textContent)}open(){this.setAttribute("open",!0),this.input.setAttribute("aria-expanded",!0),this.isOpen=!0}close(e=!1){this.closeResults(e),this.isOpen=!1}closeResults(e=!1){e&&(this.input.value="",this.removeAttribute("results"));e=this.querySelector(b.ariaSelected);e&&e.setAttribute("aria-selected",!1),this.input.setAttribute("aria-activedescendant",""),this.removeAttribute("loading"),this.removeAttribute("open"),this.input.setAttribute("aria-expanded",!1),this.predictiveSearchResults?.removeAttribute("style")}reset(){this.predictiveSearchResults.innerHTML="",this.input.val="",this.a11y.removeTrapFocus()}handleErrors(t){return t.ok?t:t.json().then(function(e){throw new Ee({status:t.statusText,headers:t.headers,json:e})})}}function Ls(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>=window.theme.sizes.small}let ks={inputSearch:'input[type="search"]'};class Ts extends Ss{constructor(){super(),this.allSearchInputs=document.querySelectorAll(ks.inputSearch),this.setupEventListeners()}setupEventListeners(){let t=[];this.allSearchInputs.forEach(e=>t.push(e.form)),this.input.addEventListener("focus",this.onInputFocus.bind(this)),t.length<2||(t.forEach(e
1=>e.addEventListener("reset",this.onFormReset.bind(this))),this.allSearchInputs.forEach(e=>e.addEventListener("input",this.onInput.bind(this))))}onFormReset(e){super.onFormReset(e),super.shouldResetForm()&&this.keepInSync("",this.input)}onInput(e){e=e.target;this.keepInSync(e.value,e)}onInputFocus(){Ls()||this.scrollIntoView({behavior:"smooth"})}keepInSync(t,i){this.allSearchInputs.forEach(e=>{e!==i&&(e.value=t)})}}let S={drawer:"data-drawer-scrolls",slideruleOpen:"data-sliderule-open",slideruleClose:"data-sliderule-close",sliderulePane:"data-sliderule-pane",slideruleWrappper:"[data-sliderule]",dataAnimates:"data-animates",children:`:scope > [data-animates],
2             :scope > * > [data-animates],
3             :scope > * > * >[data-animates],
4             :scope .sliderule-grid  > *`},E={isVisible:"is-visible",isHiding:"is-hiding",isHidden:"is-hidden"},As={};class qs{constructor(e){this.sliderule=e,this.wrapper=e.closest(S.wrapper),this.key=this.sliderule.id;var e=`[${S.slideruleOpen}='${this.key}']`,t=`[${S.slideruleClose}='${this.key}']`;this.trigger=document.querySelector(e),this.drawer=document.querySelector(`[${S.drawer}]`),this.exit=document.querySelectorAll(t),this.pane=document.querySelector(`[${S.sliderulePane}]`),this.children=this.sliderule.querySelectorAll(S.children),this.trigger.setAttribute("aria-haspopup",!0),this.trigger.setAttribute("aria-expanded",!1),this.trigger.setAttribute("aria-controls",this.key),this.clickEvents(),this.staggerChildAnimations(),document.addEventListener("theme:sliderule:close",this.closeSliderule.bind(this))}clickEvents(){this.trigger.addEventListener("click",function(){this.showSliderule()}.bind(this)),this.exit.forEach(e=>{e.addEventListener("click",function(){this.hideSliderule()}.bind(this))})}keyboardEvents(){this.trigger.addEventListener("keyup",function(e){"Space"===e.code&&this.showSliderule()}.bind(this)),this.sliderule.addEventListener("keyup",function(e){"Escape"===e.code&&(this.hideSliderule(),this.buttons[0].focus())}.bind(this))}staggerChildAnimations(e=!1){(e?Array.prototype.slice.call(this.children).slice().reverse():this.children).forEach((e,t)=>{e.style.transitionDelay=50*t+10+"ms"})}hideSliderule(e=!1){var t=window.getComputedStyle(this.pane),t=1e3*parseFloat(t.getPropertyValue("transition-duration")),i=e?this.pane.querySelectorAll("."+E.isVisible):this.children,i=(this.pane.style.setProperty("--sliderule-height","auto"),this.staggerChildAnimations(!0),this.pane.classList.add(E.isHiding),this.sliderule.classList.add(E.isHiding),this.sliderule.classList.remove(E.isVisible),i.forEach(e=>{e.classList.remove(E.isVisible)}),parseInt(this.pane.dataset.sliderulePane,10)-1),e=(this.pane.setAttribute(S.sliderulePane,i),e?`[${S.dataAnimates}].`+E.isHidden:`[${S.dataAnimates}="${i}"].`+E.isHidden),i=this.pane.querySelectorAll(e);i.length&&i.forEach(e=>{e.classList.remove(E.isHidden)}),setTimeout(()=>{this.pane.classList.remove(E.isHiding),this.sliderule.classList.remove(E.isHiding),this.staggerChildAnimations()},t)}showSliderule(){this.pane.style.setProperty("--sliderule-height","auto"),this.sliderule.classList.add(E.isVisible),this.children.forEach(e=>{e.classList.add(E.isVisible)});var e=parseInt(this.pane.dataset.sliderulePane,10),t=e+1;this.pane.setAttribute(S.sliderulePane,t);let i=this.pane.querySelectorAll(`[${S.dataAnimates}="${e}"]`);i.length&&(t=1e3*parseFloat(window.getComputedStyle(i[0]).getPropertyValue("transition-duration")),setTimeout(()=>{i.forEach(e=>{e.classList.add(E.isHidden)})},t));e=parseInt(this.trigger.nextElementSibling.offsetHeight),this.pane.style.setProperty("--sliderule-height",e+"px"),t=this.drawer.scrollTop,e=this.pane.offsetTop;e<t&&this.pane.offsetHeight>=this.drawer.offsetHeight&&this.drawer.scrollTo({top:e,left:0,behavior:"smooth"})}closeSliderule(){this.pane&&this.pane.hasAttribute(S.sliderulePane)&&0<parseInt(this.pane.getAttribute(S.sliderulePane))&&(this.hideSliderule(!0),0<parseInt(this.pane.getAttribute(S.sliderulePane)))&&this.pane.setAttribute(S.sliderulePane,0)}}let Cs={wrapper:"[data-product-add-popdown-wrapper]",closeDrawer:"[data-close-popdown]",apiContent:"[data-api-content]",cartSectionAjax:'[data-ajax-disable="false"]',ajaxDisabled:'[data-ajax-disable="true"]',cartToggleButton:'[data-drawer-toggle="drawer-cart"]',cartDrawer:'[data-drawer="drawer-cart"]'},xs={visible:"is-visible"},Ps;class Is{constructor(){this.drawer=document.querySelector(Cs.wrapper),this.cartSectionAjax=document.querySelector(Cs.cartSectionAjax
4),this.ajaxDisabled=document.querySelector(Cs.ajaxDisabled),document.addEventListener("theme:cart:popdown",e=>{this.cartSectionAjax?this.cartSectionAjax.dispatchEvent(new CustomEvent("theme:cart:reload",{bubbles:!0})):this.ajaxDisabled?window.location.reload():this.renderPopdown(e)})}renderPopdown(e){e=e.detail.variant,e=`${window.theme.routes.root_url}variants/${e.id}/?section_id=api-product-popdown`;let i=this;N.get(e).then(function(e){var t=document.createElement("div");t.innerHTML=e.data,i.drawer.innerHTML=t.querySelector(Cs.apiContent).innerHTML,i.connectCartButton(),i.connectCloseButton()}).catch(function(e){console.warn(e)})}connectCloseButton(){this.drawer.classList.add(xs.visible),this.drawer.querySelector(Cs.closeDrawer).addEventListener("click",function(e){e.preventDefault(),this.drawer.classList.remove(xs.visible)}.bind(this)),this.popdownTimer()}connectCartButton(){var e=this.drawer.querySelector(Cs.cartToggleButton);let t=document.querySelector(Cs.cartDrawer);t&&e.addEventListener("click",function(e){e.preventDefault(),this.drawer.classList.remove(xs.visible),t.dispatchEvent(new CustomEvent("theme:drawer:open",{bubbles:!1}))}.bind(this))}popdownTimer(){clearTimeout(Ps),Ps=setTimeout(()=>{this.drawer.classList.remove(xs.visible)},5e3)}}let L={widthContent:"[data-takes-space]",desktop:"[data-header-desktop]",cloneClass:"js__header__clone",showMobileClass:"js__show__mobile",backfill:"[data-header-backfill]",transparent:"data-header-transparent",overrideBorder:"header-override-border",firstSectionHasImage:".main-content > .shopify-section:first-child [data-overlay-header]",preventTransparentHeader:".main-content > .shopify-section:first-child [data-prevent-transparent-header]",deadLink:'.navlink[href="#"]'},Ms={hasOverlay:"has-overlay"},Hs={};class Ds{constructor(e){this.wrapper=e,this.style=this.wrapper.dataset.style,this.desktop=this.wrapper.querySelector(L.desktop),this.transparent="false"!==this.wrapper.getAttribute(L.transparent),this.overlayedImages=document.querySelectorAll(L.firstSectionHasImage),this.deadLinks=document.querySelectorAll(L.deadLink),this.killDeadLinks(),"drawer"!==this.style&&this.desktop&&(this.minWidth=this.getMinWidth(),this.listenWidth()),this.checkForImage(),window.dispatchEvent(new Event("resize")),document.addEventListener("theme:header:check",this.checkForImage.bind(this))}unload(){document.removeEventListener("theme:resize",this.checkWidth)}checkForImage(){this.overlayedImages=document.querySelectorAll(L.firstSectionHasImage);var e=document.querySelectorAll(L.preventTransparentHeader).length;this.overlayedImages.length&&!e&&this.transparent?(document.querySelector(L.backfill).style.display="none",this.listenOverlay()):this.wrapper.setAttribute(L.transparent,!1),!this.overlayedImages.length||e||this.transparent||(this.wrapper.classList.add(L.overrideBorder),this.subtractHeaderHeight())}listenOverlay(){document.addEventListener("theme:resize",this.checkWidth.bind(this)),this.subtractAnnouncementHeight()}listenWidth(){document.addEventListener("theme:resize",this.checkWidth.bind(this)),this.checkWidth()}killDeadLinks(){this.deadLinks.forEach(e=>{e.onclick=e=>{e.preventDefault()}})}subtractAnnouncementHeight(){let{windowHeight:t,announcementHeight:i}=K();this.overlayedImages.forEach(e=>{e.style.setProperty("--full-screen",t-i+"px"),e.classList.add(Ms.hasOverlay)})}subtractHeaderHeight(){let{windowHeight:t,headerHeight:i}=K();this.overlayedImages.forEach(e=>{e.style.setProperty("--full-screen",t-i+"px")})}checkWidth(){document.body.clientWidth<this.minWidth?this.wrapper.classList.add(L.showMobileClass):this.wrapper.classList.remove(L.showMobileClass)}getMinWidth(){var e=this.wrapper.cloneNode(!0),t=(e.classList.add(L.cloneClass),document.body.appendChild(e),e.querySelectorAll(L.widthContent));let i=0;return i=(3===t.length?e=>{let t=[];return e.forEach(e=>{t.push(e.clientWidth)}),t[0]>t[2]?t[2]=t[0]:t[0]=t[2],e=t.reduce((e,t)=>e+t)}:e=>{let t=0;return e.forEach(e=>{t+=e.clientWidth}),t})(t),document.body.removeChild(e),i+20*t.length}}e("header",[{onLoad(){Hs=new Ds(this.container)},onUnload:function(){"function"==typeof Hs.unload&&Hs.unload()}},h,{onLoad(){As[this.id]=[],this.container.querySelectorAll(S.slideruleWrappper).forEach(e
4=>{As[this.id].push(new qs(e))})}},xi,_i,Oi,Ni,Gi,nt,us,{onLoad(){new Is(this)}},fs,ei]),customElements.get("popout-select")||customElements.define("popout-select",is),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es),customElements.get("predictive-search")||customElements.define("predictive-search",Es),customElements.get("main-search")||customElements.define("main-search",Ts);let _s={newsletterForm:"[data-newsletter-form]"},Bs={success:"has-success",error:"has-error"},Fs={};class Ws{constructor(e){this.sessionStorage=window.sessionStorage,this.newsletter=e,this.stopSubmit=!0,this.isChallengePage=!1,this.formID=null,this.checkForChallengePage(),this.newsletterSubmit=e=>this.newsletterSubmitEvent(e),this.isChallengePage||this.init()}init(){this.newsletter.addEventListener("submit",this.newsletterSubmit),this.showMessage()}newsletterSubmitEvent(e){this.stopSubmit&&(e.preventDefault(),e.stopImmediatePropagation(),this.removeStorage(),this.writeStorage(),this.stopSubmit=!1,this.newsletter.submit())}checkForChallengePage(){this.isChallengePage="/challenge"===window.location.pathname}writeStorage(){void 0!==this.sessionStorage&&this.sessionStorage.setItem("newsletter_form_id",this.newsletter.id)}readStorage(){this.formID=this.sessionStorage.getItem("newsletter_form_id")}removeStorage(){this.sessionStorage.removeItem("newsletter_form_id")}showMessage(){var e;this.readStorage(),this.newsletter.id===this.formID&&(e=document.getElementById(this.formID),-1!==window.location.search.indexOf("?customer_posted=true")?(e.classList.remove(Bs.error),e.classList.add(Bs.success)):-1!==window.location.search.indexOf("accepts_marketing")&&(e.classList.remove(Bs.success),e.classList.add(Bs.error)),this.removeStorage(),this.scrollToForm(e))}scrollToForm(e){let t=e.getBoundingClientRect();0<=t.top&&0<=t.left&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)||setTimeout(()=>{window.scroll({top:t.top,left:0,behavior:"smooth"})},400)}unload(){this.newsletter.removeEventListener("submit",this.newsletterSubmit)}}e("footer",[fs,h={onLoad(){Fs[this.id]=[],this.container.querySelectorAll(_s.newsletterForm).forEach(e=>{Fs[this.id].push(new Ws(e))})},onUnload(){Fs[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}}]),customElements.get("popout-select")||customElements.define("popout-select",is);let Os={cc_load_policy:1,iv_load_policy:3,modestbranding:1,playsinline:1,controls:1,showinfo:0,ecver:2,fs:1,rel:0},$s={player:"iframe, [data-replace]",videoId:"data-video-id"};function Vs(e,t){let i={...Os,...t}
4,s=document.querySelector(`[data-player="${e}"]`),r=s.querySelector($s.player),o=s.querySelector(`[${$s.videoId}]`).getAttribute($s.videoId);return Qe({url:"https://www.youtube.com/iframe_api"}),window.youtubeLoaderPromise.then(()=>{let e=new window.YT.Player(r,{videoId:o,playerVars:{...i},events:{onStateChange:e=>{1==e.data?s.dispatchEvent(new CustomEvent("play")):2==e.data&&s.dispatchEvent(new CustomEvent("pause"))}}});return s.addEventListener("pause",()=>{try{e.pauseVideo()}catch(e){console.warn(e)}}),s.addEventListener("play",()=>{try{e.playVideo?e.playVideo():e.addEventListener("onReady",()=>{e.playVideo()})}catch(e){console.warn(e)}}),s.addEventListener("destroy",()=>{try{e.destroy&&e.destroy()}catch(e){console.warn(e)}}),e}).catch(e=>{console.error(e)})}window.youtubeLoaderPromise=new Promise(e=>{window.onYouTubeIframeAPIReady=function(){e()}});let Ns={autoplay:!0,loop:!0,controls:!0,muted:!1,playsinline:!0},Rs={player:"iframe, [data-replace]",videoId:"data-video-id"};function zs(e,t){let i={...Ns,...t}
4,s=document.querySelector(`[data-player="${e}"]`);t=s.querySelector(Rs.player);let r=s.querySelector(`[${Rs.videoId}]`).getAttribute(Rs.videoId);var o=Qe({url:"https://player.vimeo.com/api/player.js"});let a="select-"+e;return t.setAttribute("id",a),o.then(()=>{let t=new window.Vimeo.Player(a,{...i,id:r});return t.on("play",()=>{s.dispatchEvent(new CustomEvent("play"))}),t.on("pause",()=>{s.dispatchEvent(new CustomEvent("pause"))}),s.addEventListener("pause",()=>{try{t.pause&&t.pause()}catch(e){console.warn(e)}}),s.addEventListener("play",()=>{t.play&&t.getPaused().then(e=>{e&&t.play()})}),s.addEventListener("destroy",()=>{try{t.destroy&&t.destroy()}catch(e){console.log(e)}}),t}).catch(e=>{console.error(e)})}let js={videoPopup:"[data-video-popup]",videoAutoplay:"[data-video-autoplay]",attrUnique:"data-unique",attrVideoId:"data-video-id",attrVideoType:"data-video-type",attrPlayer:"data-player"};class Us{constructor(e){this.container=e.container,this.triggers=this.container.querySelectorAll(js.videoPopup),this.backgroundVideo=this.container.querySelector(js.videoAutoplay),this.init()}init(){this.triggers.forEach(e=>{var t=e.getAttribute(js.attrUnique),i=e.getAttribute(js.attrVideoId);let s=e.getAttribute(js.attrVideoType),r=i+"-"+t,o=document.querySelector(`[${js.attrPlayer}="${r}"]`);V.init({onShow:()=>{this.backgroundVideo&&"function"==typeof this.backgroundVideo.pause&&this.backgroundVideo.pause();let e={};"youtube"===s?e=Vs(r):"vimeo"===s&&(e=zs(r)),e.then(()=>{o.dispatchEvent(new CustomEvent("play"))})},onClose:(e,t,i)=>{i.preventDefault(),o.dispatchEvent(new CustomEvent("destroy")),this.backgroundVideo&&"function"==typeof this.backgroundVideo.play&&this.backgroundVideo.play()},openTrigger:`data-trigger-${i}-`+t})})}}let Gs={button:"[data-scroll-down]"};class Js{constructor(e){this.wrapper=e,this.init()}init(){var e=this.wrapper.querySelectorAll(Gs.button);e&&e.forEach(e=>{e.addEventListener("click",this.scroll.bind(this))})}scroll(){var e=this.wrapper.offsetTop+this.wrapper.clientHeight;window.scroll({top:e,left:0,behavior:"smooth"})}}e("video",[u,_i={onLoad(){this.scrollButton=new Js(this.container)},onUnload:function(){delete this.scrollButton}},xi={onLoad(){new Us(this)}}]),e("page-faq",fs),e("hero",[u,_i,ut]);let Qs={slider:"[data-slider]",photo:"[data-grid-slide]",wrapper:"[data-wrapper]",carouselCustomScrollbar:"data-custom-scrollbar-items"},Xs={showDots:"data-show-dots"},Ys={wrapper:"wrapper",wrapperModifier:"wrapper--full",hide:"hide"},Ks={scrollbarWidth:window.innerWidth-document.documentElement.clientWidth,additionalOffsetWrapper:112},Zs={};class er{constructor(e,t){this.container=e,this.slideshow=t,this.wrapper=this.container.querySelector(Qs.wrapper),this.wrapperWidth=Number(getComputedStyle(document.documentElement).getPropertyValue("--LAYOUT-WIDTH").replace("px","")),this.wrapperWidthWithGutter=this.wrapperWidth+Ks.additionalOffsetWrapper+Ks.scrollbarWidth,this.pageDots="true"===this.slideshow.getAttribute(Xs.showDots),this.firstPhoto=this.container.querySelector(Qs.photo),this.firstPhoto&&(e=this.firstPhoto.offsetHeight/2,this.slideshow.style.setProperty("--buttons-top",e+"px")),this.slideshow&&(this.flkty=null,this.init())}init(){let e=this;var t={initialIndex:0,accessibility:!0,autoPlay:!1,contain:!0,pageDots:this.pageDots,adaptiveHeight:!1,wrapAround:!1,groupCells:!1,cellAlign:"left",freeScroll:!0,prevNextButtons:!0,draggable:!0,rightToLeft:window.isRTL,watchCSS:!0,arrowShape:{x0:10,x1:60,y1:50,x2:65,y2:45,x3:20},on:{ready:function(){e.removeIncorrectAria()}}};this.flkty=new O(this.slideshow,t),this.container.addEventListener("theme:tab:change",()=>{this.flkty.resize()}),this.toggleWrapperModifier(),document.addEventListener("theme:resize:width",this.toggleWrapperModifier.bind(this)),this.slideshow.hasAttribute(Qs.carouselCustomScrollbar)&&new ht(this.container),new Ce(this.container)}toggleWrapperModifier(){this.wrapper.classList.contains(Ys.wrapper)&&this.wrapper.classList.toggle(Ys.wrapperModifier,this.wrapperWidthWithGutter>=window.innerWidth)}removeIncorrectAria(){this.slideshow.querySelectorAll('[aria-hidden="true"]').forEach(e
4=>e.removeAttribute("aria-hidden"))}onUnload(){this.slideshow&&this.flkty&&(this.flkty.options.watchCSS=!1,this.flkty.destroy())}}e("custom-content",[u,xi,nt,Oi={onLoad(){Zs[this.id]=[],this.container.querySelectorAll(Qs.slider).forEach(e=>{Zs[this.id].push(new er(this.container,e))})},onUnload(t){Zs[this.id].forEach(e=>{"function"==typeof e.onUnload&&e.onUnload(t)})}}]),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es);let tr=[],ir={wrapper:"[data-slideshow-wrapper]",speed:"data-slideshow-speed",autoplay:"data-slideshow-autoplay",slideCount:"data-slideshow-slides",prevButton:"[data-slide-custom-prev]",nextButton:"[data-slide-custom-next]",slideshoIndex:"data-slideshow-index"},sr={isEnable:"flickity-enabled"};class rr{constructor(e){this.container=e.container,this.wrapper=e.container.querySelector(ir.wrapper),this.speed=this.wrapper.getAttribute(ir.speed),this.autoplay="true"===this.wrapper.getAttribute(ir.autoplay),this.slideCount=parseInt(this.wrapper.getAttribute(ir.slideCount),10),this.prevButtons=this.wrapper.querySelectorAll(ir.prevButton),this.nextButtons=this.wrapper.querySelectorAll(ir.nextButton),this.flkty=null,this.scrollEvent=()=>this.scrollEvents(),this.init()}init(){var e={autoPlay:!(!this.autoplay||!this.speed)&&parseInt(this.speed),contain:!1,pageDots:!0,adaptiveHeight:!0,accessibility:!0,wrapAround:2!==this.slideCount,prevNextButtons:!1,draggable:!0,fade:!0,rightToLeft:window.isRTL};this.flkty=new F(this.wrapper,e),this.prevButtons.length&&this.prevButtons.forEach(e=>{e.onclick=()=>{this.flkty.previous(!0,!1)}}),this.nextButtons.length&&this.nextButtons.forEach(e=>{e.onclick=()=>{this.flkty.next(!0,!1)}}),document.addEventListener("theme:scroll",this.scrollEvent)}scrollEvents(){var e;this.flkty&&this.autoplay&&this.speed&&((e=this.flkty.element).getBoundingClientRect().top+window.scrollY+e.offsetHeight<window.pageYOffset?"playing"===this.flkty.player.state&&this.flkty.pausePlayer():"paused"===this.flkty.player.state&&this.flkty.playPlayer())}unload(){document.removeEventListener("theme:scroll",this.scrollEvent),this.flkty&&this.wrapper&&this.wrapper.classList.contains(sr.isEnable)&&this.flkty.destroy()}onBlockSelect(e){e=e.target.closest(`[${ir.slideshoIndex}]`).getAttribute(ir.slideshoIndex),e=parseInt(e);this.flkty.selectCell(e),this.flkty.stopPlayer()}onBlockDeselect(){this.autoplay&&this.flkty.playPlayer()}}e("slideshow",[{onLoad(){tr[this.id]=new rr(this)},onUnload(){"function"==typeof tr[this.id].unload&&tr[this.id].unload()},onBlockSelect(e){"function"==typeof tr[this.id].onBlockSelect&&tr[this.id].onBlockSelect(e)},onBlockDeselect(e){"function"==typeof tr[this.id].onBlockSelect&&tr[this.id].onBlockDeselect(e)}},u,_i]);let k={rangeSlider:"[data-range-slider]",rangeDotLeft:"[data-range-left]",rangeDotRight:"[data-range-right]",rangeLine:"[data-range-line]",rangeHolder:"[data-range-holder]",dataMin:"data-se-min",dataMax:"data-se-max",dataMinValue:"data-se-min-value",dataMaxValue:"data-se-max-value",dataStep:"data-se-step",dataFilterUpdate:"data-range-filter-update",priceMin:"[data-field-price-min]",priceMax:"[data-field-price-max]"},or={isInitialized:"is-initialized"};class ar{constructor(e){this.container=e.container,this.slider=e.querySelector(k.rangeSlider),this.slider&&(this.onMoveEvent=e=>this.onMove(e),this.onStopEvent=e=>this.onStop(e),this.onStartEvent=e=>this.onStart(e),this.startX=0,this.x=0,this.touchLeft=this.slider.querySelector(k.rangeDotLeft),this.touchRight=this.slider.querySelector(k.rangeDotRight),this.lineSpan=this.slider.querySelector(k.rangeLine),this.min=parseFloat(this.slider.getAttribute(k.dataMin)),this.max=parseFloat(this.slider.getAttribute(k.dataMax)),this.step=0,this.normalizeFact=26,this.init(),document.addEventListener("theme:price-range:reset",()=>{this.setDefaultValues()}))}init(){this.setDefaultValues(),this.touchLeft.addEventListener("mousedown",this.onStartEvent),this.touchRight.addEventListener("mousedown",this.onStartEvent),this.touchLeft.addEventListener("touchstart",this.onStartEvent),this.touchRight.addEventListener("touchstart",this.onStartEvent),this.slider.classList.add(or.
4isInitialized)}setDefaultValues(){let e=this.min,t=(this.slider.hasAttribute(k.dataMinValue)&&(e=parseFloat(this.slider.getAttribute(k.dataMinValue))),this.max);this.slider.hasAttribute(k.dataMaxValue)&&(t=parseFloat(this.slider.getAttribute(k.dataMaxValue))),e<this.min&&(e=this.min),t>this.max&&(t=this.max),e>t&&(e=t),this.slider.getAttribute(k.dataStep)&&(this.step=Math.abs(parseFloat(this.slider.getAttribute(k.dataStep)))),this.reset(),this.maxX=this.slider.offsetWidth-this.touchRight.offsetWidth,this.selectedTouch=null,this.initialValue=this.lineSpan.offsetWidth-this.normalizeFact,this.setMinValue(e),this.setMaxValue(t)}reset(){this.touchLeft.style.left="0px",this.touchRight.style.left=this.slider.offsetWidth-this.touchLeft.offsetWidth+"px",this.lineSpan.style.marginLeft="0px",this.lineSpan.style.width=this.slider.offsetWidth-this.touchLeft.offsetWidth+"px",this.startX=0,this.x=0}setMinValue(e){var t=(e-this.min)/(this.max-this.min);this.touchLeft.style.left=Math.ceil(t*(this.slider.offsetWidth-(this.touchLeft.offsetWidth+this.normalizeFact)))+"px",this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.slider.setAttribute(k.dataMinValue,e)}setMaxValue(e){var t=(e-this.min)/(this.max-this.min);this.touchRight.style.left=Math.ceil(t*(this.slider.offsetWidth-(this.touchLeft.offsetWidth+this.normalizeFact))+this.normalizeFact)+"px",this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.slider.setAttribute(k.dataMaxValue,e)}onStart(e){e.preventDefault();let t=e;e.touches&&(t=e.touches[0]),e.currentTarget===this.touchLeft?this.x=this.touchLeft.offsetLeft:e.currentTarget===this.touchRight&&(this.x=this.touchRight.offsetLeft),this.startX=t.pageX-this.x,this.selectedTouch=e.currentTarget,document.addEventListener("mousemove",this.onMoveEvent),document.addEventListener("mouseup",this.onStopEvent),document.addEventListener("touchmove",this.onMoveEvent),document.addEventListener("touchend",this.onStopEvent)}onMove(e){let t=e;e.touches&&(t=e.touches[0]),this.x=t.pageX-this.startX,this.selectedTouch===this.touchLeft?(this.x>this.touchRight.offsetLeft-this.selectedTouch.offsetWidth+10?this.x=this.touchRight.offsetLeft-this.selectedTouch.offsetWidth+10:this.x<0&&(this.x=0),this.selectedTouch.style.left=this.x+"px"):this.selectedTouch===this.touchRight&&(this.x<this.touchLeft.offsetLeft+this.touchLeft.offsetWidth-10?this.x=this.touchLeft.offsetLeft+this.touchLeft.offsetWidth-10:this.x>this.maxX&&(this.x=this.maxX),this.selectedTouch.style.left=this.x+"px"),this.lineSpan.style.marginLeft=this.touchLeft.offsetLeft+"px",this.lineSpan.style.width=this.touchRight.offsetLeft-this.touchLeft.offsetLeft+"px",this.calculateValue(),this.slider.getAttribute("on-change")&&new Function("min, max",this.slider.getAttribute("on-change"))(this.slider.getAttribute(k.dataMinValue),this.slider.getAttribute(k.dataMaxValue)),this.onChange(this.slider.getAttribute(k.dataMinValue),this.slider.getAttribute(k.dataMaxValue))}onStop(e){document.removeEventListener("mousemove",this.onMoveEvent),document.removeEventListener("mouseup",this.onStopEvent),document.removeEventListener("touchmove",this.onMoveEvent),document.removeEventListener("touchend",this.onStopEvent),this.selectedTouch=null,this.calculateValue(),this.onChanged(this.slider.getAttribute(k.dataMinValue),this.slider.getAttribute(k.dataMaxValue))}onChange(e,t){var i,s=this.slider.closest(k.rangeHolder);s&&(i=s.querySelector(k.priceMin),s=s.querySelector(k.priceMax),i)&&s&&(i.value=e,s.value=t)}onChanged(e,t){this.slider.hasAttribute(k.dataFilterUpdate)&&this.slider.dispatchEvent(new CustomEvent("theme:range:update",{bubbles:!0}))}calculateValue(){var e=(this.lineSpan.offsetWidth-this.normalizeFact)/this.initialValue;let t=this.lineSpan.offsetLeft/this.initialValue,i=t+e;t=t*(this.max-this.min)+this.min,i=i*(this.max-this.min)+this.min,0!==this.step&&(e=Math.floor(t/this.step),t=this.step*e,e=Math.floor(i/this.step),i=this.step*e),this.selectedTouch===this.touchLeft&&this.slider.setAttribute(k.dataMinValue,t),this.selectedTouch===this.touchRight&&this.slider.setAttribute(k.dataMaxValue,i)}}let T={filtersWrappper:"data-filters",underlay:"[data-filters-underlay]",filtersHideDesktop:"data-default-hide",filtersToggle:"data-filters-toggle",focusable:'button, [href], input, select, textarea, [tabindex]:not
4([tabindex="-1"])',groupHeading:"data-group-heading",showMore:"data-show-more"},A={show:"drawer--visible",defaultVisible:"filters--default-visible",hide:"hidden",expand:"is-expanded",hidden:"is-hidden",focusEnable:"focus-enabled"},nr={};class lr{constructor(e,t=!1){this.container=e,this.underlay=this.container.querySelector(T.underlay),this.groupHeadings=this.container.querySelectorAll(`[${T.groupHeading}]`),this.showMoreButtons=this.container.querySelectorAll(`[${T.showMore}]`),this.triggerKey=this.container.getAttribute(T.filtersWrappper),this.selector=`[${T.filtersToggle}='${this.triggerKey}']`,this.filtersToggleButtons=document.querySelectorAll(this.selector),this.connectToggleMemory=e=>this.connectToggleFunction(e),this.connectShowHiddenOptions=e=>this.showHiddenOptions(e),this.connectToggle(t),this.onFocusOut(),this.expandingEvents(),this.getShowOnLoad()?this.showFilters():this.hideFilters()}unload(){this.filtersToggleButtons.length&&this.filtersToggleButtons.forEach(e=>{e.removeEventListener("click",this.connectToggleMemory)}),this.showMoreButtons.length&&this.showMoreButtons.forEach(e=>{e.removeEventListener("click",this.connectShowHiddenOptions)})}expandingEvents(){this.showMoreButtons.length&&this.showMoreButtons.forEach(e=>{e.addEventListener("click",Et(this.connectShowHiddenOptions,500))})}showHiddenOptions(e){e=e.target.hasAttribute(T.showMore)?e.target:e.target.closest(`[${T.showMore}]`);e.classList.add(A.hidden),e.previousElementSibling.querySelectorAll("."+A.hidden).forEach(e=>{e.classList.remove(A.hidden)})}connectToggle(i=!1){this.filtersToggleButtons.forEach(e=>{var t=null!==e.closest(`[${T.filtersWrappper}]`);(t&&i||t&&!i||!t&&!i)&&e.addEventListener("click",this.connectToggleMemory.bind(this))})}connectToggleFunction(e){"true"===e.currentTarget.getAttribute("aria-expanded")?this.hideFilters():this.showFilters()}onFocusOut(){this.container.addEventListener("focusout",function(e){var t;window.innerWidth>=window.theme.sizes.medium||(e=e.currentTarget.contains(e.relatedTarget),t=this.container.classList.contains(A.show),document.body.classList.contains(A.focusEnable)&&t&&!e&&this.hideFilters())}.bind(this)),this.container.addEventListener("keyup",function(e){"Escape"===e.code&&(this.hideFilters(),this.filtersToggleButtons[0].focus())}.bind(this)),this.underlay.addEventListener("click",function(){this.hideFilters()}.bind(this))}getShowOnLoad(){var e=`[${T.filtersHideDesktop}='false']`,e=document.querySelector(e),t=window.innerWidth>=window.theme.sizes.medium;return!(!e||!t)}showFilters(){this.filtersToggleButtons=document.querySelectorAll(this.selector),this.container.classList.remove(A.hide),setTimeout(()=>{this.filtersToggleButtons.forEach(e=>e.setAttribute("aria-expanded",!0)),this.filtersToggleButtons.forEach(e=>e.classList.add(A.show)),this.container.classList.add(A.show),this.container.querySelector(T.focusable).focus()},1)}hideFilters(){this.filtersToggleButtons=document.querySelectorAll(this.selector),this.filtersToggleButtons.forEach(e=>e.setAttribute("aria-expanded",!1)),this.container.classList.remove(A.show),this.container.classList.remove(A.defaultVisible),this.filtersToggleButtons.forEach(e=>e.classList.remove(A.show)),this.filtersToggleButtons.forEach(e=>e.classList.remove(A.defaultVisible)),setTimeout(()=>{this.container.classList.contains(A.show)||this.container.classList.add(A.hide)},800)}}let q={collectionSidebar:"[data-collection-sidebar]",form:"[data-sidebar-filter-form]",inputs:"input, select, label, textarea",priceMin:"data-field-price-min",priceMax:"data-field-price-max",rangeMin:"data-se-min-value",rangeMax:"data-se-max-value",rangeMinDefault:"data-se-min",rangeMaxDefault:"data-se-max",productsContainer:"[data-products-grid]",filterUpdateUrlButton:"[data-filter-update-url]",activeFiltersHolder:"[data-active-filters]",activeFiltersCount:"[data-active-filters-count]",productsCount:"[data-products-count]",dataSort:"data-sort-enabled",collectionTools:"[data-collection-tools]",filtersWrappper:"[data-filters]",headerSticky:'[data-header-sticky="sticky"]',headerHeight:"[data-header-height]",gridLarge:"data-grid-large",gridSmall:"data-grid-small",accordionBody:"[data-accordion-body]",checkedOption:"input:checked",optionHolder:"[data-option-holder]"},dr={classHidden:"is-hidden",classLoading:"is-loading"},cr={loadingDelay:1e3,scrollTime:1e3};class hr{constructor(e){this.section=e,this.container=this.section.container,this.sidebar=this.container.querySelector(q.collectionSidebar),this.form=e.container.querySelector(q.form),this.sort=this.container.querySelector(`[${q.dataSort}]`),this.productsContainer=this.container.querySelector(q.productsContainer),this.activeFiltersHolder=this.container.querySelector(q.activeFiltersHolder),this.activeFiltersCount=this.container.querySelector(q.activeFiltersCount),this.productsCount=this.container.querySelector(q.productsCount),this.headerIsSticky=null!==document.querySelector(q.headerSticky),this.layoutLarge=this.container.querySelector(`[${q.gridLarge}]`),this.layoutSmall=this.container.querySelector(`[${q.gridSmall}]`),this.productsContainer&&this.sidebar&&this.init(),this.sort&&this.container.addEventListener("theme:form:filter",e=>this.filtering(e)),(this.sidebar||this.sort)&&window.addEventListener("popstate",e=>this.filtering(e))}init(){this.showAllOptions(),this.form&&(new ar(this.form),this.sidebar.addEventListener("input",ae(e=>{var t,i,s=e.type,r=e.target;q.inputs.includes(s)&&this.form&&"function"==typeof this.form.submit&&(s=this.form.querySelector(`[${q.priceMin}]`),t=this.form.querySelector(`[${q.priceMax}]`),(r.hasAttribute(q.priceMin)||r.hasAttribute(q.priceMax))&&(r=this.form.querySelector(`[${q.rangeMin}]`),i=this.form.querySelector(`[${q.rangeMax}]`),parseInt(r.getAttribute(q.rangeMinDefault)),r=parseInt(i.getAttribute(q.rangeMaxDefault)),s.value&&!t.value&&(t.value=r),t.value&&!s.value&&(s.value=rangeMinDefault),s.value<=rangeMinDefault)&&t.value>=r&&(s.placeholder=rangeMinDefault,t.placeholder=r,s.value="",t.value=""),this.filtering(e))},1500)),this.form.addEventListener("theme:range:update",e=>this.updateRange(e))),this.sidebar&&this.sidebar.addEventListener("click",e=>this.updateFilterFromUrl(e)),this.activeFiltersHolder&&this.activeFiltersHolder.addEventListener("click",e=>this.updateFilterFromUrl(e)),this.productsContainer&&this.productsContainer.addEventListener("click",e=>this.updateFilterFromUrl(e)),Ze(this.sidebar)}updateRange(e){var t,i,s,r,o,a;this.form&&"function"==typeof this.form.submit&&(o=this.form.querySelector(`[${q.rangeMin}]`),a=this.form.querySelector(`[${q.rangeMax}]`),t=this.form.querySelector(`[${q.priceMin}]`),i=this.form.querySelector(`[${q.priceMax}]`),o)&&a&&t&&i&&o.hasAttribute(q.rangeMin)&&a.hasAttribute(q.rangeMax)&&(s=parseInt(t.placeholder),r=parseInt(i.placeholder),o=parseInt(o.getAttribute(q.rangeMin)),a=parseInt(a.getAttribute(q.rangeMax)),s===o&&r===a||(t.value=o,i.value=a,this.filtering(e)))}updateFilterFromUrl(e){var t=e.target;(t.matches(q.filterUpdateUrlButton)||t.closest(q.filterUpdateUrlButton)&&t)&&(e.preventDefault(),t=t.matches(q.filterUpdateUrlButton)?t:t.closest(q.filterUpdateUrlButton),this.filtering(e,t.getAttribute("href")))}addToHistory(e,t=""){var i=this.sort?this.sort.getAttribute(q.dataSort):"";if(!e||"popstate"!==e.type)if(""===t){var s,r,o=new window.URL(window.location.href).searchParams,a=Object.fromEntries(o),n=o.toString();if(n.includes("filter.")||n.includes("sort_by")||n.includes("page"))for(var l in a)(l.includes("filter.")||l.includes("sort_by")||l.includes("page"))&&o.delete(l);
4if(this.form){for([s,r]of new URLSearchParams(new FormData(this.form)).entries())s.includes("filter.")&&r&&o.append(s,r);var n=this.form.querySelector(`[${q.rangeMin}]`),a=this.form.querySelector(`[${q.rangeMax}]`),d=this.form.querySelector(`[${q.priceMin}]`),c=this.form.querySelector(`[${q.priceMax}]`);n&&a&&d&&c&&n.hasAttribute(q.rangeMinDefault)&&a.hasAttribute(q.rangeMaxDefault)&&(n=parseFloat(n.getAttribute(q.rangeMinDefault),10),a=parseFloat(a.getAttribute(q.rangeMaxDefault),10),d=""===d.value?parseFloat(d.placeholder,10):parseFloat(d.value,10),c=""===c.value?parseFloat(c.placeholder,10):parseFloat(c.value,10),d<=n)&&a<=c&&(o.delete("filter.v.price.gte"),o.delete("filter.v.price.lte"))}(i||e&&e.detail&&e.detail.href)&&(d=i||e.detail.params,o.set("sort_by",d));n=o.toString(),a=n?"?"+n:location.pathname;window.history.pushState(null,"",a)}else window.history.pushState(null,"",t)}getFilterResult(){this.productsContainer.classList.add(dr.classLoading),this.getGridValues();var e=new window.URL(window.location.href);e.searchParams.set("section_id",this.section.id),fetch(""+window.location.pathname+e.search).then(e=>e.text()).then(e=>{var t=document.createElement("div");t.innerHTML=e,this.sidebar&&(this.sidebar.innerHTML=t.querySelector(q.collectionSidebar).innerHTML),this.activeFiltersCount&&(this.activeFiltersCount.innerHTML=t.querySelector(q.activeFiltersCount).innerHTML),this.productsContainer.innerHTML=t.querySelector(q.productsContainer).innerHTML,this.activeFiltersHolder.innerHTML=t.querySelector(q.activeFiltersHolder).innerHTML,this.activeFiltersHolder.parentNode.classList.toggle(dr.classHidden,""===this.activeFiltersHolder.innerHTML),this.productsCount&&(this.productsCount.innerHTML=t.querySelector(q.productsCount).innerHTML),this.setGridValues(),this.refreshFunctionalities(),setTimeout(()=>{this.productsContainer.classList.remove(dr.classLoading)},cr.loadingDelay)})}refreshFunctionalities(){this.form=this.container.querySelector(q.form),this.form&&(new ar(this.form),this.form.addEventListener("theme:range:update",e=>this.updateRange(e))),this.container.querySelectorAll(q.filtersWrappper).forEach(e=>{new lr(e,!0)}),this.container.querySelectorAll(q.accordionBody).forEach(e=>{new ys(e)}),new Ce(this.container),this.sidebar&&Ze(this.sidebar),at(this.container),this.showAllOptions()}getGridValues(){this.layoutLarge&&(this.layoutLargeValue=this.layoutLarge.getAttribute(q.gridLarge)),this.layoutSmall&&(this.layoutSmallValue=this.layoutSmall.getAttribute(q.gridSmall))}setGridValues(){this.layoutLarge&&(this.layoutLarge=this.container.querySelector(`[${q.gridLarge}]`),this.layoutLarge.setAttribute(q.gridLarge,this.layoutLargeValue)),this.layoutSmall&&(this.layoutSmall=this.container.querySelector(`[${q.gridSmall}]`),this.layoutSmall.setAttribute(q.gridSmall,this.layoutSmallValue))}showAllOptions(){this.container.querySelectorAll(q.checkedOption).forEach(e=>{e.closest(q.optionHolder)&&e.closest(q.optionHolder).classList.contains(dr.classHidden)&&((e=e.closest(q.accordionBody).nextElementSibling).classList.contains(q.classHidden)||e.dispatchEvent(new Event("click")))})}filtering(t,i=""){var e=this.headerIsSticky?document.querySelector(q.headerHeight).getBoundingClientRect().height:0;let s=this.container.offsetTop-e;let r=new IntersectionObserver(e=>{var[e]=e;setTimeout(()=>{this.addToHistory(t,i),this.getFilterResult()},e.isIntersecting?10:cr.scrollTime),r.unobserve(this.productsContainer),e.isIntersecting||window.scrollTo({top:s,left:0,behavior:"smooth"})},{root:null,rootMargin:e+"px",threshold:1});r.observe(this.productsContainer)}}e("search-page",[Ni={onLoad(){nr[this.id]=[],this.container.querySelectorAll(`[${T.filtersWrappper}]`).forEach(e=>{nr[this.id].push(new lr(e))})},onUnload:function(){nr[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}},Gi={onLoad(){this.filterForm=new hr(this)},onUnload(){this.filterForm&&"function"==typeof this.filterForm.unload&&this.filterForm.unload()}},nt,fs]),customElements.get("popout-select")||customElements.define("popout-select",is),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es);let ur={zoomImage:"[data-image-zoom]",modalContainer:"[data-modal-container]",attrUnique:"data-unique",image:"data-src"};class pr{constructor(e){this.container=e,this.triggers=this.container.querySelectorAll(ur.zoomImage),this.modalContainer=document.querySelector(ur.modalContainer),this.init()}
4init(){this.triggers.forEach(e=>{var t,e=e.getAttribute(ur.attrUnique),i=this.modalContainer.querySelector("#zoom-"+e);i&&(t=this.container.querySelector("#zoom-"+e))&&(i.parentNode.removeChild(i),this.modalContainer.appendChild(t)),V.init({disableScroll:!0,openTrigger:"data-popup-"+e,onShow:e=>{e.querySelectorAll(`[${ur.image}]`,e).forEach(e=>{var t;null===e.getAttribute("src")&&(t=e.getAttribute(ur.image),e.setAttribute("src",t))})},onClose:(e,t,i)=>{i.preventDefault()}})})}}e("gallery",[{onLoad(){new pr(this.container)}},xi,ut]);let mr=(e,t)=>{var{el:i,elStyle:s,elHeight:r,rowsLimit:o,rowsWrapped:a,options:n}=e,l=e.buffer;let d=l;if(a===o+1)return{...e};var c=l;let h=a,u=r;return i.innerHTML=d=l.length?""+l+n.delimiter+t+n.replaceStr:""+t+n.replaceStr,parseFloat(s.height)>parseFloat(r)&&(h++,u=s.height,h===o+1)?(i.innerHTML=d="."===c[c.length-1]&&"..."===n.replaceStr?c+"..":""+c+n.replaceStr,{...e,elHeight:u,rowsWrapped:h}):(i.innerHTML=d=c.length?""+c+n.delimiter+t:""+t,{...e,buffer:d,elHeight:u,rowsWrapped:h})},gr=(us="ontouchstart"in window||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints,document.documentElement.classList.toggle("supports-touch",us),{}),yr={},fr={},vr={productSlideshow:"[data-product-slideshow]",productXr:"[data-shopify-xr]",dataMediaId:"data-media-id",dataModelId:"data-model-id",modelViewer:"model-viewer",dataModel3d:"data-shopify-model3d-id",modelJson:"#ModelJson-"};function wr(e){if(e)console.warn(e);else if(window.ShopifyXR){for(var t in gr){var i;!gr.hasOwnProperty(t)||(i=gr[t]).loaded||(t=document.querySelector(""+vr.modelJson+t))&&(window.ShopifyXR.addModels(JSON.parse(t.innerHTML)),i.loaded=!0)}window.ShopifyXR.setupXRElements()}else document.addEventListener("shopify_xr_initialized",function(){wr()})}function br(e){if(e)console.warn(e);else for(var t in yr)yr.hasOwnProperty(t)&&((t=yr[t]).modelViewerUi||(t.modelViewerUi=new Shopify.ModelViewerUI(t.$element)),(e=>{let t=fr[e.sectionId];e.$container.addEventListener("pause",function(){e.modelViewerUi.pause&&e.modelViewerUi.pause()}),e.$container.addEventListener("play",function(){e.modelViewerUi.play&&(e.modelViewerUi.play(),t)&&t.$element&&e&&e.modelId&&vr.dataModel3d&&t.$element.setAttribute(vr.dataModel3d,e.modelId)}),e.$element.addEventListener("shopify_model_viewer_ui_toggle_play",()=>{e.$container.dispatchEvent(new CustomEvent("theme:media:play"))}),e.$element.addEventListener("shopify_model_viewer_ui_toggle_pause",()=>{e.$container.dispatchEvent(new CustomEvent("theme:media:pause"))})})(t))}let C={productSlideshow:"[data-product-slideshow]",slideshowMobileStyle:"data-slideshow-mobile-style",slideshowDesktopStyle:"data-slideshow-desktop-style",productThumbs:"[data-product-thumbs]",leftThumbsHolder:"[data-thumbs-holder]",thumbImage:"[data-slideshow-thumbnail]",mediaSlide:"[data-media-slide]",dataMediaId:"data-media-id",dataMediaSelect:"data-media-select",mediaType:"data-type",videoPlayerExternal:'[data-type="external_video"]',videoPlayerNative:'[data-type="video"]',modelViewer:'[data-type="model"]',modelViewerTag:"model-viewer",allPlayers:"[data-player]",loopVideo:"data-enable-video-looping",verticalAlignment:"[data-thumbnails-left]",arrowPrev:"[data-thumbs-arrow-prev]",arrowNext:"[data-thumbs-arrow-next]",aspectRatio:"data-aspect-ratio",flickitylockHeight:"flickity-lock-height"},Sr={flickityDisableClass:"flickity-disabled-mobile",flickityEnabled:"flickity-enabled",selected:"is-selected",active:"is-activated",show:"show",enableVideoDraggable:"enable-video-draggable"};class Er{constructor(e){this.section=e,this.container=e.container,this.slideshow=this.container.querySelector(C.productSlideshow),this.mobileStyle=this.slideshow.getAttribute(C.slideshowMobileStyle),this.desktopStyle=this.slideshow.getAttribute(C.slideshowDesktopStyle),this.arrowPrev=this.container.querySelector(C.arrowPrev),this.arrowNext=this.container.querySelector(C.arrowNext),this.leftThumbsHolder=this.container.querySelector(C.leftThumbsHolder),this.thumbWrapper=this.container.querySelector(C.productThumbs),this.thumbImages=this.container.querySelectorAll(C.thumbImage),this.loopVideo="true"===this.container.getAttribute(C.loopVideo),this.verticalAlignment=Boolean(this.container.querySelector(C.verticalAlignment)),this.flkty=null,this.thumbs=this.container.querySelector(C.productThumbs
4),this.currentSlide=null,this.mediaType=null,this.hasMobileSlider=!1,this.hasDesktopSlider=!1,this.init()}init(){this.storeEvents(),this.connectSliderMediaEvents(),this.detectVideos(),this.detect3d(),this.scrollThumbs(),document.addEventListener("theme:resize:width",()=>{this.scrollThumbs()}),a.onChange(()=>{this.connectSliderMediaEvents()})}connectSliderMediaEvents(){a.isMobile()?this.createMobileSlider():this.createDesktopSlider()}createMobileSlider(){this.hasDesktopSlider&&this.flkty&&(this.destroySlider(),this.hasDesktopSlider=!1);var e={autoPlay:!1,prevNextButtons:!1,pageDots:!1,adaptiveHeight:!0,accessibility:!0,watchCSS:!1,wrapAround:!0,rightToLeft:window.isRTL,dragThreshold:80,contain:!0,fade:!0};"carousel"==this.mobileStyle&&(e.contain=!1,e.dragThreshold=10,e.fade=!1),"slideshow"==this.mobileStyle&&(e.pageDots=!0,e.fade=!1,e.dragThreshold=10),this.createSlider(e),this.hasMobileSlider=!0}createDesktopSlider(){var e;this.hasMobileSlider&&this.flkty&&(this.destroySlider(),this.hasMobileSlider=!1),"none"!=this.desktopStyle&&(e={autoPlay:!1,prevNextButtons:!1,pageDots:!1,adaptiveHeight:!0,accessibility:!0,watchCSS:!1,wrapAround:!0,rightToLeft:window.isRTL,dragThreshold:80,contain:!0,fade:!0},this.createSlider(e),this.hasDesktopSlider=!0)}createSlider(e){this.flkty=new O(this.slideshow,e),this.flkty.resize(),this.currentSlide=this.slideshow.querySelectorAll(C.mediaSlide)[0],this.setDraggable(),this.addEventListeners()}destroySlider(){this.removeEventListeners(),this.flkty.destroy()}storeEvents(){this.storeFlktyChange=e=>this.doFlktyChange(e),this.storeFlktySettle=e=>this.doFlktySettle(e),this.storeImageChange=e=>this.doImageChange(e),this.storeArrowPrevClick=e=>this.doArrowPrevClick(e),this.storeArrowNextClick=e=>this.doArrowNextClick(e),this.storeThumbClick=e=>this.doThumbClick(e),this.storeThumbContainerScroll=e=>this.doThumbContainerScroll(e)}addEventListeners(){this.flkty.on("change",this.storeFlktyChange),this.flkty.on("settle",this.storeFlktySettle),this.slideshow.addEventListener("theme:image:change",this.storeImageChange),this.arrowPrev?.addEventListener("click",this.storeArrowPrevClick),this.arrowNext?.addEventListener("click",this.storeArrowNextClick),this.thumbs?.addEventListener("scroll",this.storeThumbContainerScroll),this.thumbImages.forEach(e=>{e.addEventListener("click",this.storeThumbClick)})}removeEventListeners(){this.flkty.on("change",this.storeFlktyChange),this.flkty.on("settle",this.storeFlktySettle),this.slideshow.removeEventListener("theme:image:change",this.storeImageChange),this.arrowPrev?.removeEventListener("click",this.storeArrowPrevClick),this.arrowNext?.removeEventListener("click",this.storeArrowNextClick),this.thumbs?.removeEventListener("scroll",this.storeThumbContainerScroll),this.thumbImages.forEach(e=>{e.removeEventListener("click",this.storeThumbClick)})}addMediaEventListeners(e){e&&(e.addEventListener("play",()=>{(a.isMobile()||a.isTouch())&&this.updateDraggable(!1)}),e.addEventListener("pause",()=>{(a.isMobile()||a.isTouch())&&this.updateDraggable(!0)}))}doFlktyChange(e){"model"!==this.mediaType&&"video"!==this.mediaType&&"external_video"!==this.mediaType||this.currentSlide.dispatchEvent(new CustomEvent("pause")),this.currentSlide=this.flkty.cells[e].element,this.slideshow.classList.remove(C.flickitylockHeight);e=this.currentSlide.getAttribute(C.dataMediaId),e=this.thumbWrapper?.querySelector(`[${C.dataMediaSelect}="${e}"]`);this.thumbWrapper?.querySelector("."+Sr.active).classList.remove(Sr.active),e?.classList.add(Sr.active),this.scrollThumbs()}doFlktySettle(e){this.allSlides=this.flkty.cells,this.currentSlide=this.flkty.cells[e].element,this.setDraggable(),document.body.classList.contains(C.focusEnabled)&&this.currentSlide.dispatchEvent(new Event("focus")),this.scrollThumbs()}doImageChange(e){let t=e.detail.id,i=`[${C.dataMediaId}="${t}"]`;e=this.flkty.cells.findIndex(e=>e.element.matches(i));this.flkty.select(e),this.scrollThumbs()}doThumbContainerScroll(){this.scrollThumbs("scroll")}doArrowPrevClick(){this.scrollThumbs("clickPrev")}doArrowNextClick(){this.scrollThumbs("clickNext")}doThumbClick(e){e=e.currentTarget.getAttribute(C.dataMediaSelect);this.slideshow.dispatchEvent(new CustomEvent("theme:image:change",{detail:{id:e}}))}setDraggable(){this.currentSlide&&(this.mediaType=this.currentSlide.getAttribute(C.mediaType),"model"!==this.mediaType&&"video"!==this.mediaType&&"external_video"!==this.mediaType||a.isMobile()&&a.isTouch()?this.updateDraggable(!0):(this.currentSlide.dispatchEvent(new CustomEvent("play")),this.updateDraggable(!1)))}updateDraggable(e){this.flkty&&(this.flkty.options.draggable=e,this.flkty.updateDraggable(),this.slideshow.classList.toggle(Sr.enableVideoDraggable,e))}detect3d(){var e=this.container.querySelectorAll(C.modelViewer);
4e&&(e.forEach(e=>{var t,i,s,r,o,a;t=e,i=this.section.id,gr[i]={loaded:!1},r=t.getAttribute(vr.dataMediaId),o=t.querySelector(vr.modelViewer),a=o.getAttribute(vr.dataModelId),null!==t.closest(vr.productSlideshow)&&(s=t.closest(vr.productSlideshow).parentElement.querySelector(vr.productXr),fr[i]={$element:s,defaultId:a}),yr[r]={modelId:a,mediaId:r,sectionId:i,$container:t,$element:o},window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:wr},{name:"model-viewer-ui",version:"1.0",onLoad:br}]),e.addEventListener("theme:media:play",()=>{this.updateDraggable(!1)}),e.addEventListener("theme:media:pause",()=>{this.updateDraggable(!0)})}),document.addEventListener("shopify_xr_launch",function(){this.container.querySelectorAll(C.allPlayers).forEach(e=>{e.dispatchEvent(new CustomEvent("pause"))})}.bind(this)))}detectVideos(){var t;for(t of this.section.container.querySelectorAll(C.videoPlayerExternal+", "+C.videoPlayerNative)){var i=t.dataset.player;let s=t.dataset.host,e;e=("youtube"===s?Vs:"vimeo"===s?zs:async e=>
4{var t=(e=document.querySelector(`[data-player="${e}"]`)).querySelector("video");await Qe({name:"video-ui",version:"1.0"});let i=new window.Shopify.Plyr(t);return e.addEventListener("pause",()=>{i.pause&&i.pause()}),e.addEventListener("play",()=>{try{i.play?i.paused&&i.play():i.addEventListener("onReady",()=>{i.play()})}catch(e){console.warn(e)}}),e.addEventListener("destroy",()=>{try{i.destroy&&i.destroy()}catch(e){console.warn(e)}}),i})(i),!0===this.loopVideo&&e.then(e=>{var t,i;return s?(t=e,"youtube"===(i=s)?t.addEventListener("onStateChange",e=>{0===e.data&&e.target.playVideo()}):"vimeo"===i&&t.on("ended",()=>{t.play()}),t):(e.loop=!0,e)}).catch(e=>{console.error(e)}),this.addMediaEventListeners(t)}}pauseAllMedia(){this.container.querySelector(C.mediaSlide).dispatchEvent(new CustomEvent("pause"))}pauseOtherMedia(e){this.container.querySelector(C.mediaSlide+`:not([data-player="${e}"])`).dispatchEvent(new CustomEvent("pause"))}destroy(){this.container.querySelectorAll(C.allPlayers).forEach(e=>{e.dispatchEvent(new CustomEvent("destroy"))})}scrollThumbs(e){this.thumbs=this.container.querySelector(C.productThumbs),this.thumbs&&(this.thumb=this.thumbs.querySelector("."+Sr.active),this.thumbItems=this.container.querySelectorAll(C.thumbImage),this.lastThumb=this.thumbItems[this.thumbItems.length-1],this.thumb)&&(this.thumbsScrollTop=this.thumbs.scrollTop,this.thumbsScrollLeft=this.thumbs.scrollLeft,this.thumbsWidth=this.thumbs.offsetWidth,this.thumbsHeight=this.slideshow.offsetWidth/this.thumb.getAttribute(C.aspectRatio),this.thumbsPositionBottom=this.thumbsScrollTop+this.thumbsHeight,this.thumbsPositionRight=this.thumbsScrollLeft+this.thumbsWidth,this.checkThumbPositions(),this.toggleToActiveThumb(e),this.toggleArrows())}checkThumbPositions(){this.thumbWidth=this.thumb.offsetWidth,this.thumbHeight=this.thumb.offsetHeight,this.thumbPosTop=this.thumb.offsetTop,this.thumbPosLeft=this.thumb.offsetLeft,this.lastThumbRightPos=this.lastThumb.offsetLeft+this.thumbWidth,this.lastThumbBottomPos=this.lastThumb.offsetTop+this.thumbHe
4ight,this.scrollTopPosition=this.thumbPosTop+this.thumbHeight/2-this.thumbsHeight/2,this.scrollLeftPosition=this.thumbPosLeft+this.thumbWidth/2-this.thumbsWidth/2,this.topCheck=0<this.thumbsScrollTop,this.bottomCheck=this.thumbsPositionBottom<this.lastThumbBottomPos,this.leftCheck=0<this.thumbsScrollLeft,this.rightCheck=this.thumbsPositionRight<this.lastThumbRightPos,this.verticalCheck=this.bottomCheck||this.topCheck,this.horizontalCheck=this.rightCheck||this.leftCheck}toggleToActiveThumb(e){"scroll"!==e&&("clickPrev"==e&&(this.verticalCheck?(this.scrollTopPosition=this.thumbsScrollTop-this.thumbsHeight,this.scrollLeftPosition=0):(this.scrollTopPosition=0,this.scrollLeftPosition=this.thumbsScrollLeft-this.thumbsWidth)),"clickNext"==e&&(this.verticalCheck?(this.scrollTopPosition=this.thumbsScrollTop+this.thumbsHeight,this.scrollLeftPosition=0):(this.scrollTopPosition=0,this.scrollLeftPosition=this.thumbsScrollLeft+this.thumbsWidth)),this.thumbs.scrollTo({top:this.scrollTopPosition,left:this.scrollLeftPosition,behavior:"smooth"}))}toggleArrows(){(this.verticalCheck||this.verticalAlignment&&!this.verticalCheck)&&(this.arrowPrev.classList.toggle(Sr.show,this.topCheck),this.arrowNext.classList.toggle(Sr.show,this.bottomCheck)),!this.horizontalCheck&&(this.verticalAlignment||this.horizontalCheck)||(this.arrowPrev.classList.toggle(Sr.show,this.leftCheck),this.arrowNext.classList.toggle(Sr.show,this.rightCheck))}}let Lr={pickupContainer:"data-store-availability-container",shopifySection:"[data-api-content]",drawer:"[data-pickup-drawer]",drawerOpen:"[data-pickup-drawer-open]",drawerClose:"[data-pickup-drawer-close]",drawerBody:"[data-pickup-body]"},kr={isVisible:"drawer--visible",isHidden:"hide",isPickupVisible:"is-pickup-visible"},Tr={};class Ar{constructor(e){this.container=e.container,this.drawer=null,this.buttonDrawerOpen=null,this.buttonDrawerClose=null,this.drawerBody=null,this.fetchPickupAvailability(),this.container.addEventListener("theme:variant:change",e=>this.fetchPickupAvailability(e))}fetchPickupAvailability(e){let t=this.container.querySelector(`[${Lr.pickupContainer}]`);var i;t&&(i=e&&e.detail.variant?e.detail.variant.id:t.getAttribute(Lr.pickupContainer),e&&!e.detail.variant?t.classList.add(kr.isHidden):i&&fetch(window.theme.routes.root_url+`variants/${i}/?section_id=api-pickup-availability`).then(this.handleErrors).then(e=>e.text()).then(e=>{e=(new DOMParser).parseFromString(e,"text/html").querySelector(Lr.shopifySection).innerHTML;t.innerHTML=e,t.classList.remove(kr.isHidden),this.drawer=this.container.querySelector(Lr.drawer),this.buttonDrawerOpen=this.container.querySelector(Lr.drawerOpen),this.buttonDrawerClose=this.container.querySelectorAll(Lr.drawerClose),this.drawerBody=this.container.querySelector(Lr.drawerBody),this.buttonDrawerOpen&&this.buttonDrawerOpen.addEventListener("click",()=>this.openDrawer()),this.buttonDrawerClose.length&&this.buttonDrawerClose.forEach(e=>{e.addEventListener("click",()=>this.closeDrawer())})}).catch(e=>{console.error(e)}))}openDrawer(){this.drawer&&(document.body.classList.add(kr.isPickupVisible),this.drawer.classList.add(kr.isVisible),this.drawer.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})),this.drawerBody.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})))}closeDrawer(){this.drawer&&(document.body.classList.remove(kr.isPickupVisible),this.drawer.classList.remove(kr.isVisible),this.drawer.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),this.drawerBody.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})))}handleErrors(t){return t.ok?t:t.json().then(function(e){throw new Ee({status:t.statusText,headers:t.headers,json:e})})}}let qr={form:"[data-product-form]",optionPosition:"data-option-position",optionInput:'[name^="options"], [data-popout-option]',selectOptionValue:"data-value"},Cr={soldOut:"sold-out",unavailable:"unavailable"};class xr{constructor(e,t){this.container=e,this.productJSON=t,this.form=this.container.querySelector(qr.form),this.formData=new FormData(this.form),this.optionElements=this.container.querySelectorAll(qr.optionInput),this.productJSON&&this.form&&this.init()}init(){this.update()}
4update(){this.getCurrentState(),this.optionElements.forEach(e=>{var t=e.value||e.getAttribute(qr.selectOptionValue),i=e.closest(`[${qr.optionPosition}]`).getAttribute(qr.optionPosition),i=parseInt(i,10)-1;let s=[...this.selections];s[i]=t;i=this.productJSON.variants.find(t=>{let i=!0;for(let e=0;e<s.length;e++)t.options[e]!==s[e]&&(i=!1);return i});e.classList.remove(Cr.soldOut,Cr.unavailable),void 0===i?e.classList.add(Cr.unavailable):i&&!1===i.available&&e.classList.add(Cr.soldOut)})}getCurrentState(){this.formData=new FormData(this.form),this.selections=[];for(var e of this.formData.entries())e[0].includes("options[")&&this.selections.push(e[1])}}let x={outerSection:"[data-section-id]",quickviewModal:"[data-quickview-modal]",productForm:"[data-product-form]",productSlideshow:"[data-product-slideshow]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",comparePrice:"[data-compare-price]",comparePriceText:"[data-compare-text]",buttonsWrapper:"[data-buttons-wrapper]",originalSelectorId:"[data-product-select]",priceWrapper:"[data-price-wrapper]",priceButton:"[data-button-price]",productJson:"[data-product-json]",productPrice:"[data-product-price]",unitPrice:"[data-product-unit-price]",unitBase:"[data-product-base]",unitWrapper:"[data-product-unit]",dataEnableHistoryState:"data-enable-history-state",optionPosition:"data-option-position",optionValue:"[data-option-value]",subPrices:"[data-subscription-watch-price]",subSelectors:"[data-subscription-selectors]",priceOffWrap:"[data-price-off]",priceOffType:"[data-price-off-type]",priceOffAmount:"[data-price-off-amount]",subsToggle:"[data-toggles-group]",subsChild:"data-group-toggle",subDescription:"[data-plan-description]",remainingCount:"[data-remaining-count]",remainingMax:"data-remaining-max",remainingWrapper:"[data-remaining-wrapper]",remainingJSON:"[data-product-remaining-json]",isPreOrder:"[data-product-preorder]",idInput:'[name="id"]'},P={hide:"hide",variantSoldOut:"variant--soldout",variantUnavailable:"variant--unavailable",productPriceSale:"product__price--sale",remainingLow:"count-is-low",remainingIn:"count-is-in",remainingOut:"count-is-out",remainingUnavailable:"count-is-unavailable"};class Pr extends HTMLElement{constructor(){super(),this.container=this}connectedCallback(){this.outerSection=this.container.closest(x.outerSection),this.quickview=this.container.closest(x.quickviewModal),this.outerWrapper=this.quickview||this.outerSection,this.productFormElement=this.container.querySelector(x.productForm),this.productForm=this.container.querySelector(x.productForm),this.slideshow=this.outerWrapper.querySelector(x.productSlideshow),this.enableHistoryState=!(!this.outerSection||!this.outerSection.hasAttribute(x.dataEnableHistoryState))&&"true"===this.outerSection.getAttribute(x.dataEnableHistoryState),this.hasUnitPricing=this.outerWrapper.querySelector(x.unitWrapper),this.subSelectors=this.outerWrapper.querySelector(x.subSelectors),this.subPrices=this.outerWrapper.querySelector(x.subPrices),this.priceOffWrap=this.outerWrapper.querySelector(x.priceOffWrap),this.priceOffAmount=this.outerWrapper.querySelector(x.priceOffAmount),this.priceOffType=this.outerWrapper.querySelector(x.priceOffType),this.planDecription=this.outerWrapper.querySelector(x.subDescription),this.isPreOrder=this.container.querySelector(x.isPreOrder),this.remainingWrapper=this.outerWrapper.querySelector(x.remainingWrapper);var e=this.outerWrapper.querySelector(`[${x.remainingMax}]`);this.sellout=null,this.remainingWrapper&&e&&(this.remainingMaxInt=parseInt(e.getAttribute(x.remainingMax),10),this.remainingCount=this.outerWrapper.querySelector(x.remainingCount),this.remainingJSONWrapper=this.outerWrapper.querySelector(x.remainingJSON),this.remainingJSON=null,this.remainingJSONWrapper&&""!==this.remainingJSONWrapper.innerHTML?this.remainingJSON=JSON.parse(this.remainingJSONWrapper.innerHTML):console.warn("Missing product quantity JSON")),cs(this.outerWrapper);let t=null;this.productJSON=null;e=this.outerWrapper.querySelector(x.productJson);(t=e?e.innerHTML:t)&&this.productForm?(this.productJSON=JSON.parse(t),this.sellout=new xr(this.outerWrapper,this.productJSON),this.linkForm()):console.warn("Missing product form or product JSON"),this.productJSON&&new Fe(this.productJSON.handle)}destroy(){this.productForm.destroy()}linkForm(){this.productForm=new Ge(this.outerWrapper,this.productFormElement,this.productJSON,{onOptionChange:this.onOptionChange.bind(this),onPlanChange:this.onPlanChange.bind(this),onQuantityChange:this.onQuantityChange.bind(this)}),this.pushState(this.productForm.getFormState(),!0),this.subsToggleListeners()}onOptionChange(e){this.pushState(e.dataset)}onPlanChange(e){this.subPrices&&this.pushState(e.dataset)}onQuantityChange(e){e=e.dataset;this.productState=this.setProductState(e),this.updateButtonPrices(e)}pushState(e,t=!1){this.productState=this.setProductState(e),this.updateProductImage(e),this.updateAddToCartState(e),this.updateProductPrices(e),this.updateSaleText(e),this.updateSubscriptionText(e),this.updateLegend(e),this.updateRemaining(e),this.fireHookEvent(e),this.sellout&&this.sellout.update(e),this.enableHistoryState&&!t&&this.updateHistoryState(e)}updateAddToCartState(e){let t=e.variant,i=theme.strings.addToCart;var e=this.outerWrapper.querySelectorAll(x.priceWrapper),s=this.outerWrapper.querySelector(x.buttonsWrapper),r=s?.querySelectorAll(x.addToCart),o=s?.querySelectorAll(x.addToCartText);this.isPreOrder&&(i=theme.strings.preOrder),e.length&&t&&e.forEach(e
4=>{e.classList.remove(P.hide)}),r?.length&&r.forEach(e=>{t&&t.available?e.disabled=!1:e.disabled=!0}),o?.length&&o.forEach(e=>{t?t.available?e.innerHTML=i:e.innerHTML=theme.strings.soldOut:e.innerHTML=theme.strings.unavailable}),s&&(t?(t.available?s.classList.remove(P.variantSoldOut,P.variantUnavailable):(s.classList.add(P.variantSoldOut),s.classList.remove(P.variantUnavailable)),(e=s.querySelector(x.originalSelectorId))&&(e.value=t.id)):(s.classList.add(P.variantUnavailable),s.classList.remove(P.variantSoldOut)))}updateLegend(e){let i=e.variant;i&&this.container.parentNode.querySelectorAll(x.optionValue).forEach(e=>{var t=e.closest(`[${x.optionPosition}]`);t&&(t=t.getAttribute(x.optionPosition),t=parseInt(t,10)-1,this.newValue=i.options[t],e.innerHTML=this.newValue)})}updateHistoryState(e){var t,i=e.variant,e=e.plan,s=window.location.href;i&&s.includes("/product")&&((t=(s=new window.URL(s)).searchParams).set("variant",i.id),e&&e.detail&&e.detail.id&&this.productState.hasPlan?t.set("selling_plan",e.detail.id):t.delete("selling_plan"),s.search=t.toString(),i=s.toString(),window.history.replaceState({path:i},"",i))}updateRemaining(e){var e=e.variant;e&&this.remainingWrapper&&this.remainingJSON&&this.remainingCount?(e=this.remainingJSON[e.id])&&e<=this.remainingMaxInt&&0<e?(this.remainingWrapper.classList.remove(P.remainingIn,P.remainingOut,P.remainingUnavailable),this.remainingWrapper.classList.add(P.remainingLow),this.remainingCount.innerHTML=e):this.productState.soldOut?(this.remainingWrapper.classList.remove(P.remainingLow,P.remainingIn,P.remainingUnavailable),this.remainingWrapper.classList.add(P.remainingOut)):this.productState.available&&(this.remainingWrapper.classList.remove(P.remainingLow,P.remainingOut,P.remainingUnavailable),this.remainingWrapper.classList.add(P.remainingIn)):this.remainingWrapper&&(this.remainingWrapper.classList.remove(P.remainingIn,P.remainingOut,P.remainingLow),this.remainingWrapper.classList.add(P.remainingUnavailable))}getBaseUnit(e){return 1===e.unit_price_measurement.reference_value?e.unit_price_measurement.reference_unit:e.unit_price_measurement.reference_value+e.unit_price_measurement.reference_unit}subsToggleListeners(){this.outerWrapper.querySelectorAll(x.subsToggle).forEach(e=>{e.addEventListener("change",function(e){e=e.target.value.toString();let t=this.outerWrapper.querySelector(`[${x.subsChild}="${e}"]`);var i,e=this.outerWrapper.querySelectorAll(`[${x.subsChild}]`);t&&(t.classList.remove(P.hide),(i=t.querySelector('[name="selling_plan"]')).checked=!0,i.dispatchEvent(new Event("change"))),e.forEach(e=>{e!==t&&(e.classList.add(P.hide),e.querySelectorAll('[name="selling_plan"]').forEach(e=>{e.checked=!1,e.dispatchEvent(new Event("change"))}))})}.bind(this))})}updateSaleText(e){this.productState.planSale?this.updateSaleTextSubscription(e):this.productState.onSale?this.updateSaleTextStandard(e):this.priceOffWrap&&this.priceOffWrap.classList.add(P.hide)}updateSaleTextStandard(e){var t;this.priceOffType&&(this.priceOffType.innerHTML=window.theme.strings.sale||"sale",e=e.variant,window.theme.settings.badge_sale_type&&"percentage"===window.theme.settings.badge_sale_type?(t=(e.compare_at_price-e.price)/e.compare_at_price,t=Math.floor(100*t),this.priceOffAmount.innerHTML=t+"%"):(t=e.compare_at_price-e.price,this.priceOffAmount.innerHTML=this.formattingMoney(t)),this.priceOffWrap.classList.remove(P.hide))}updateSaleTextSubscription(e){this.priceOffType.innerHTML=window.theme.strings.subscription||"subscripton";var t=e.variant,e=e.plan.detail.price_adjustments[0],i=e.value;e&&"percentage"===e.value_type?this.priceOffAmount.innerHTML=i+"%":e&&"price"===e.value_type?this.priceOffAmount.innerHTML=this.formattingMoney(t.price-e.value):this.priceOffAmount.innerHTML=this.formattingMoney(i),this.priceOffWrap.classList.remove(P.hide)}updateSubscriptionText(e){e.plan&&this.planDecription&&null!==e.plan.detail.description?(this.planDecription.innerHTML=e.plan.detail.description,this.planDecription.classList.remove(P.hide)):this.planDecription&&this.planDecription.classList.add(P.hide)}getPrices(e){var t=e.variant,e=e.plan;let i="",s="";return this.productState.available&&(i=t.compare_at_price,s=t.price),this.productState.hasPlan&&(s=e.allocation.price),this.productState.planSale&&(i=e.allocation.compare_at_price,s=e.allocation.price),{price:s,comparePrice:i}}updateButtonPrices(i){var e=this.outerWrapper.querySelectorAll(x.priceButton);let s=this.getPrices(i).price;
4e.length&&e.forEach(e=>{var t=i.quantity*s;e.innerHTML=this.formattingMoney(t)})}updateProductPrices(i){let s=i.variant;var e=this.outerWrapper.querySelectorAll(x.priceWrapper),t=this.outerWrapper.querySelectorAll(x.priceButton);let{price:r,comparePrice:o}=this.getPrices(i);e.forEach(e=>{var t=e.querySelector(x.comparePrice),i=e.querySelector(x.productPrice),e=e.querySelector(x.comparePriceText);t&&(this.productState.onSale||this.productState.planSale?(t.classList.remove(P.hide),e.classList.remove(P.hide),i.classList.add(P.productPriceSale)):(t.classList.add(P.hide),e.classList.add(P.hide),i.classList.remove(P.productPriceSale)),t.innerHTML=this.formattingMoney(o)),i&&(s?i.innerHTML=this.formattingMoney(r):i.innerHTML="&nbsp;")}),t.length&&t.forEach(e=>{var t=i.quantity*r;e.innerHTML=this.formattingMoney(t)}),this.hasUnitPricing&&this.updateProductUnits(i)}updateProductUnits(e){var t=e.variant,e=e.plan;let i=null;t&&t.unit_price&&(i=t.unit_price),((i=e&&e.allocation&&e.allocation.unit_price?e.allocation.unit_price:i)?(e=this.getBaseUnit(t),this.outerWrapper.querySelector(x.unitPrice).innerHTML=this.formattingMoney(i),this.outerWrapper.querySelector(x.unitBase).innerHTML=e,Se):vs)(this.outerWrapper.querySelector(x.unitWrapper))}fireHookEvent(e){e=e.variant;this.container.dispatchEvent(new CustomEvent("theme:variant:change",{detail:{variant:e},bubbles:!0}))}setProductState(e){var t=e.variant,e=e.plan,i={available:!0,soldOut:!1,onSale:!1,showUnitPrice:!1,requiresPlan:!1,hasPlan:!1,planPerDelivery:!1,planSale:!1};return!t||t.requires_selling_plan&&!e?i.available=!1:(t.available||(i.soldOut=!0),t.compare_at_price>t.price&&(i.onSale=!0),t.unit_price&&(i.showUnitPrice=!0),this.productJSON&&this.productJSON.requires_selling_plan&&(i.requiresPlan=!0),e&&this.subPrices&&(i.hasPlan=!0,e.allocation.per_delivery_price!==e.allocation.price&&(i.planPerDelivery=!0),e.allocation.compare_at_price>e.allocation.price)&&(i.planSale=!0)),i}updateProductImage(e){e=e.variant;e&&this.slideshow&&e.featured_media&&e.featured_media.id&&this.slideshow.dispatchEvent(new CustomEvent("theme:image:change",{detail:{id:e.featured_media.id}}))}formattingMoney(e){return theme.settings.currency_code_enable?z.formatMoney(e,theme.moneyFormat)+(" "+theme.currencyCode):z.formatMoney(e,theme.moneyFormat)}}class Ir extends HTMLElement{constructor(){super()}connectedCallback(){fetch(this.dataset.url).then(e=>e.text()).then(e=>{var t=document.createElement("div"),e=(t.innerHTML=e,t.querySelector("[data-api-content]")),t=(e&&(this.innerHTML=e.innerHTML),this.closest("[data-product-complimentary-loaded]"));t&&""!==e.innerHTML.trim()&&t.classList.remove("js-unloaded")}).catch(e=>{console.error(e)})}}let Mr={slideshow:"[data-product-slideshow]",singeImage:"[data-product-image]",zoomButton:"[data-zoom-button]",zoomWrapper:"[data-zoom-wrapper]",mediaId:"data-media-id"},I={body:"body",dataRelatedSectionElem:"[data-related-section]",dataTabsHolder:"[data-tabs-holder]",dataTab:"data-tab",dataTabIndex:"data-tab-index",blockId:"data-block-id",tabsLi:".tabs > button",tabLink:".tab-link",tabLinkRecent:".tab-link__recent",tabContent:".tab-content",scrollbarHolder:"[data-scrollbar]",scrollbarArrowPrev:"[data-scrollbar-arrow-prev]",scrollbarArrowNext:"[data-scrollbar-arrow-next]",firstElement:"a:first-child, input:first-child"},M={classCurrent:"current",classHide:"hide",classAlt:"alt",isFocused:"is-focused"},Hr={};class Dr{constructor(e){this.container=e,this.body=document.querySelector(I.body),this.accessibility=window.accessibility,this.container&&(this.scrollbarHolder=this.container.querySelectorAll(I.scrollbarHolder),this.init(),this.initNativeScrollbar())}init(){let s=this.container;var e=s.querySelectorAll(I.tabsLi),t=s.querySelector(I.tabLink+"-0"),i=s.querySelector(I.tabContent+"-0");i&&i.classList.add(M.classCurrent),t&&t.classList.add(M.classCurrent),this.checkVisibleTabLinks(),this.container.addEventListener("theme:tabs:check",()=>this.checkRecentTab()),this.container.addEventListener("theme:tabs:hide",()=>this.hideRelatedTab()),e.length&&e.forEach(t=>{var e=parseInt(t.getAttribute(I.dataTab));let i=s.querySelector(I.tabContent+"-"+e);t.addEventListener("click",()=>{this.tabChange(t,i)}),t.addEventListener("keyup",e=>{"Space"!==e.code&&"Enter"!==e.code||!this.body.classList.contains(M.isFocused)||(this.tabChange(t,i),i.querySelector("a, input")&&(this.accessibility.lastFocused=t,this.accessibility.a11y.trapFocus(i,{elementToFocus:i.querySelector(I.firstElement)})))})})}tabChange(e,t){this.container.querySelector(I.tabsLi+"."+M.classCurrent).classList.remove(M.classCurrent),this.container.querySelector(I.tabContent+"."+M.classCurrent).classList.remove(M.classCurrent),e.classList.add(M.classCurrent),t.classList.add(M.classCurrent),e.classList.contains(M.classHide)&&t.classList.add(M.classHide),this.checkVisibleTabLinks(),this.container.dis
4patchEvent(new CustomEvent("theme:tab:change"))}initNativeScrollbar(){this.scrollbarHolder.length&&this.scrollbarHolder.forEach(e=>{new Ae(e)})}checkVisibleTabLinks(){var e=this.container.querySelectorAll(I.tabsLi),t=this.container.querySelectorAll(I.tabLink+"."+M.classHide);e.length-t.length<2?this.container.classList.add(M.classAlt):this.container.classList.remove(M.classAlt)}checkRecentTab(){var e=this.container.querySelector(I.tabLinkRecent);e&&(e.classList.remove(M.classHide),e=parseInt(e.getAttribute(I.dataTab)),(e=this.container.querySelector(`${I.tabContent}[${I.dataTabIndex}="${e}"]`))&&e.classList.remove(M.classHide),this.checkVisibleTabLinks(),this.initNativeScrollbar())}hideRelatedTab(){var e,t,i=this.container.querySelector(I.dataRelatedSectionElem);i&&(i=i.closest(I.tabContent+"."+M.classCurrent))&&(i=parseInt(i.getAttribute(I.dataTabIndex)),(e=this.container.querySelectorAll(I.tabsLi)).length>i)&&(t=e[i].nextElementSibling)&&(e[i].classList.add(M.classHide),t.dispatchEvent(new Event("click")),this.initNativeScrollbar())}onBlockSelect(e){e=this.container.querySelector(`${I.tabLink}[${I.blockId}="${e.detail.blockId}"]`);e&&(e.dispatchEvent(new Event("click")),e.parentNode.scrollTo({top:0,left:e.offsetLeft-e.clientWidth,behavior:"smooth"}))}}u={onLoad(){Hr[this.id]=[],this.container.querySelectorAll(I.dataTabsHolder).forEach(e=>{Hr[this.id].push(new Dr(e))})},onBlockSelect(t){Hr[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})}};let _r={urlInput:"[data-share-url]",section:"data-section-type",shareDetails:"[data-share-details]",shareSummary:"[data-share-summary]",shareCopy:"[data-share-copy]",shareButton:"[data-share-button]",closeButton:"[data-close-button]",successMessage:"[data-success-message]",shareHolder:"[data-share-holder]"},Br={hidden:"is-hidden"};class Fr extends HTMLElement{constructor(){super(),this.container=this.closest(`[${_r.section}]`),this.mainDetailsToggle=this.querySelector(_r.shareDetails),this.shareButton=this.querySelector(_r.shareButton),this.shareCopy=this.querySelector(_r.shareCopy),this.shareSummary=this.querySelector(_r.shareSummary),this.closeButton=this.querySelector(_r.closeButton),this.successMessage=this.querySelector(_r.successMessage),this.shareHolder=this.querySelector(_r.shareHolder),this.urlInput=this.querySelector(_r.urlInput),this.urlToShare=this.urlInput?this.urlInput.value:document.location.href,this.init(),this.updateShareLink()}init(){navigator.share?(this.mainDetailsToggle.classList.add(Br.hidden),this.shareButton.classList.remove(Br.hidden),this.shareButton.addEventListener("click",()=>{navigator.share({url:this.urlToShare,title:document.title})})):(this.mainDetailsToggle.addEventListener("toggle",this.toggleDetails.bind(this)),this.mainDetailsToggle.addEventListener("focusout",()=>{setTimeout(()=>{this.contains(document.activeElement)||this.close()})}),this.shareCopy.addEventListener("click",this.copyToClipboard.bind(this)),this.closeButton.addEventListener("click",this.close.bind(this)),this.container.addEventListener("keyup",this.keyboardEvents.bind(this)))}updateShareLink(){"product"==this.container.getAttribute(_r.section)&&this.container.addEventListener("theme:variant:change",e=>{e.detail.variant&&(this.urlToShare=this.urlToShare.split("?")[0]+"?variant="+e.detail.variant.id,this.urlInput)&&(this.urlInput.value=this.urlToShare.split("?")[0]+"?variant="+e.detail.variant.id)})}toggleDetails(){this.mainDetailsToggle.open||(this.successMessage.classList.add(Br.hidden),this.successMessage.textContent="",this.closeButton.classList.add(Br.hidden),this.shareCopy.focus())}copyToClipboard(){navigator.clipboard.writeText(this.urlInput.value).then(()=>{this.successMessage.classList.remove(Br.hidden),this.successMessage.textContent=theme.strings.successMessage,this.closeButton.classList.remove(Br.hidden),this.closeButton.focus()})}close(){this.mainDetailsToggle.removeAttribute("open"),this.shareSummary.setAttribute("aria-expanded",!1)}keyboardEvents(e){"Escape"===e.code&&(this.mainDetailsToggle.focus(),this.close())}}let Wr={groupImage:"data-image-filter",slider:"[data-product-slideshow]",thumbSlider:"[data-product-thumbs]",thumbs:"[data-sli
4deshow-thumbnail]",slides:"[data-media-slide]"},Or={hide:"hide",flickityEnable:"flickity-enabled"};class $r{constructor(e){this.section=e,this.container=e.container,this.slider=this.container.querySelector(Wr.slider),this.thumbSlider=this.container.querySelector(Wr.thumbSlider),this.thumbs=this.container.querySelectorAll(Wr.thumbs),this.slides=this.container.querySelectorAll(Wr.slides),this.variantImage=null,this.listen()}listen(){this.container.addEventListener("theme:variant:change",e=>{e.detail.variant&&(this.variantImage=e.detail.variant.featured_image,this.filterImages())})}filterImages(){null!==this.variantImage&&null!==this.variantImage.alt?(this.variantImageAlt=this.variantImage.alt.split("#")[1],this.showImages()):this.resetImages(),this.refreshSliders()}resetImages(){this.thumbs.forEach(e=>e.classList.remove(Or.hide)),this.slides.forEach(e=>e.classList.remove(Or.hide))}showImages(){this.thumbs.forEach(e=>{""===e.getAttribute(Wr.groupImage)||e.getAttribute(Wr.groupImage)===this.variantImageAlt?e.classList.remove(Or.hide):e.classList.add(Or.hide)}),this.slides.forEach(e=>{""===e.getAttribute(Wr.groupImage)||e.getAttribute(Wr.groupImage)===this.variantImageAlt?e.classList.remove(Or.hide):e.classList.add(Or.hide)})}refreshSliders(){var e;null!==this.slider&&this.slider.classList.contains(Or.flickityEnable)&&void 0!==(e=F.data(this.slider))&&e.reloadCells(),null!==this.thumbSlider&&this.thumbSlider.classList.contains(Or.flickityEnable)&&void 0!==(e=U.data(this.thumbSlider))&&e.reloadCells()}}let Vr={productJson:"[data-product-json]",zoomButton:"[data-zoom-button]",toggleTruncateHolder:"[data-truncated-holder]",toggleTruncateButton:"[data-truncated-button]",toggleTruncateContent:"data-truncated-content"},Nr={classExpanded:"is-expanded",classVisible:"is-visible"},Rr=[];class zr{constructor(e){this.section=e,this.id=e.id,this.container=e.container,this.settings=e.settings,Ut(this.id),this.media=new Er(e),new $r(e);e=this.container.querySelector(Vr.productJson);e&&""!==e.innerHTML?(this.product=JSON.parse(e.innerHTML),this.truncateElementHolder=this.container.querySelector(Vr.toggleTruncateHolder),this.truncateElement=this.container.querySelector(`[${Vr.toggleTruncateContent}]`),this.resizeEventTruncate=()=>this.truncateText(),this.init()):console.error("Missing product JSON")}init(){var a,n;this.zoomEnabled=null!==this.container.querySelector(Vr.zoomButton),this.zoomEnabled&&(a=this.container,n=this.product,Qe({url:window.theme.assets.photoswipe}).then(()=>{let r=window.themePhotoswipe.PhotoSwipe.default,o=window.themePhotoswipe.PhotoSwipeUI.default;a.querySelectorAll(Mr.zoomButton).forEach(e=>{e.addEventListener("click",e=>{var t=a.querySelector(Mr.zoomWrapper);let i=e.target.closest(`[${Mr.mediaId}]`).getAttribute(Mr.mediaId).toString();var s=[];for(let e=0;e<n.media.length;e++)"image"===n.media[e].media_type&&(s[s.length]={src:n.media[e].src,w:n.media[e].width,h:n.media[e].height,id:n.media[e].id});e={index:s.findIndex(e=>e.id.toString()===i),showHideOpacity:!0,showAnimationDuration:150,hideAnimationDuration:250,bgOpacity:1,spacing:0,allowPanToNext:!1,maxSpreadZoom:3,history:!1,loop:!0,pinchToClose:!1,modal:!1,closeOnScroll:!1,closeOnVerticalDrag:!0,getDoubleTapZoom:function(e,t){return e?1.67:t.initialZoomLevel<.7?1:1.3},getThumbBoundsFn:function(){let e=a.querySelector(Mr.slideshow);e=e||a.querySelector(Mr.singeImage);var t=window.pageYOffset||document.documentElement.scrollTop,i=e.getBoundingClientRect();return{x:i.left,y:i.top+t,w:i.width}}},t.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0})),t=new r(t,o,s,e);t.init(),t.listen("close",function(){document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))})})})}).catch(e=>console.error(e))),this.truncateElementHolder&&this.truncateElement&&(setTimeout(this.resizeEventTruncate,50),document.addEventListener("theme:resize",this.resizeEventTruncate)),new Tt(this.container)}truncateText(){var e,t,i;this.truncateElementHolder.classList.contains(Nr.classVisible)||((e=this.truncateElement.querySelectorAll("style")).length&&e.forEach(e=>{this.truncateElementHolder.prepend(e)}),e=this.truncateElement.cloneNode(!0),t=this.truncateElement.getAttribute(Vr.toggleTruncateContent),(i=this.truncateElement.nextElementSibling)&&i.remove(),this.truncateElement.parentElement.append(e),(i=this.truncateElement.nextElementSibling).classList.add(t),i.removeAttribute(Vr.toggleTruncateContent),Se(i),((e="",t,i)=>{var s={replaceStr:"...",debounceDelay:250,delimiter:" ",...i},r=e&&(e instanceof NodeList?e:1===e.nodeType?[e]:document.querySelectorAll(e));for(let e=0;e<r.length;e++){var o=r[e],a=o.innerHTML.replace(/<!--[\s\S]*?-->/g,"").split(s.delimiter),n=(o.innerHTML="",window.getComputedStyle(o));a.reduce(mr,{el:o,buffer:o.innerHTML,elStyle:n,elHeight:0,rowsLimit:t,rowsWrapped:0,options:s})}})(i,5,{replaceStr:"",delimiter:" "}),vs(i),this.truncateElement.innerHTML!==i.innerHTML?this.truncateElementHolder.classList.add(Nr.classExpanded):(i.remove(),this.truncateElementHolder.classList.remove(Nr.classExpanded)),this.toggleTruncatedContent(this.truncateElementHolder))}toggleTruncatedContent(t){var e=t.querySelector(Vr.toggleTruncateButton);e&&e.addEventListener("click",e=>{e.preventDefault(),t.classList.remove(Nr.classExpanded),t.classList.add(Nr.classVisible)})}onBlockSelect(e){e=this.container.querySelector(`[data-block-id="${e.detail.blockId}"]`);e&&e.dispatchEvent(new Event("click"))}onBlockDeselect(e){e=this.container.querySelector(`[data-block-id="${e.detail.blockId}"]`);e&&e.dispatchEvent(new Event("click"))}onUnload(){this.media.destroy(),this.truncateElementHolder&&this.truncateElement&&document.removeEventListener("theme:resize",this.resizeEventTruncate)}}e("product",[{onLoad(){Rr[this.id]=new zr(this)},onUnload(){"function"==typeof Rr[this.id].unload&&Rr[this.id].unload()},onBlockSelect(e){"function"==typeof Rr[this.id].onBlockSelect&&Rr[this.id].onBlockSelect(e)},onBlockDeselect(e){"function"==typeof Rr[this.id].onBlockDeselect&&Rr[this.id].onBlockDeselect(e)}},{onLoad(){Tr[this.id]=new Ar(this)}},fs,u,et]),customElements.get("product-form")||customElements.define("product-form",Pr),customElements.get("product-complimentary")||customElements.define("product-complimentary",Ir),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("popout-select")||customElements.define("popout-select",is),customElements.get("share-button")||customElements.define("share-button",Fr);let jr={toggle:"data-toggle-grid",large:"data-grid-large",small:"data-grid-small"},Ur={active:"is-active"},Gr={breakpoint:window.theme.sizes.small};var Jr={};class Qr{constructor(e,t){this.container=t||document,this.toggle=e,this.value=this.toggle.getAttribute(jr.toggle),this.toggleFunction=e=>this.toggleEvent(e),this.init()}init(){this.toggle.addEventListener("click",this.toggleFunction),document.addEventListener("theme:resize:width",this.toggleFunction),this.toggleEvent(!1)}unload(){this.toggle.removeEventListener("click",this.toggleFunction),document.removeEventListener("theme:resize:width",this.toggleFunction)}toggleEvent(e=!0){var e=e&&"click"===e.type,t=window.innerWidth>=Gr.breakpoint?jr.large:jr.small,i=this.container.querySelector(`[${t}]`),s=i.getAttribute(t),r=this.toggle.parentElement.querySelector(`[${jr.toggle}].`+Ur.active);let o=this.toggle.parentElement.querySelector(`[${jr.toggle}="${s}"]`);e&&(o=this.toggle,i.setAttribute(t,this.value)),r&&r.classList.remove(Ur.active),o&&o.classList.add(Ur.active)}}let Xr={sort:"data-sort-enabled",sortLinks:"[data-sort-link]",sortButtonText:"[data-sort-button-text]",sortValue:"data-value"},Yr={active:"popout-list__item--current"};class Kr{constructor(e){this.container=e.container,this.sort=this.container.querySelector(`[${Xr.sort}]`),this.sortLinks=this.container.querySelectorAll(Xr.sortLinks),this.sortButtonText=this.container.querySelector(Xr.sortButtonText),this.sort&&this.init()}
4init(){this.sortLinks.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.sortingResults(e)})})}sortingResults(e){var e=e.currentTarget,t=e.getAttribute(Xr.sortValue),i=e.innerText;this.sortButtonText.innerText=i,this.sortButtonText.parentNode.dispatchEvent(new Event("click")),this.sort.querySelector("."+Yr.active).classList.remove(Yr.active),e.parentNode.classList.add(Yr.active),this.sort.setAttribute(Xr.sort,t),this.container.dispatchEvent(new CustomEvent("theme:form:filter",{bubbles:!0,detail:{params:t}}))}}var Zr="data-swatch";class eo{constructor(e){this.section=e,this.container=this.section.container,this.swatches=this.container.querySelectorAll(`[${Zr}]`),this.init()}init(){new Kr(this.section)}}e("collection",[{onLoad(){this.collection=new eo(this)}},Ni,Gi,{onLoad(){Jr[this.id]=[],this.container.querySelectorAll(`[${jr.toggle}]`).forEach(e=>{Jr[this.id].push(new Qr(e,this.container))})},onUnload:function(){Jr[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}},nt,fs,xe]),customElements.get("popout-select")||customElements.define("popout-select",is),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es),e("collection-row",[nt,xe,ut]),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es),e("collection-tabs",[u,Oi,nt]),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es);var to={basic:[],light:[{featureType:"administrative",elementType:"labels",stylers:[{visibility:"on"},{lightness:"64"},{hue:"#ff0000"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f0f0f0"},{visibility:"simplified"}]},{featureType:"landscape.natural.landcover",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.terrain",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels",stylers:[{lightness:"100"}]},{featureType:"poi.park",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{saturation:"-41"},{color:"#e8ede7"}]},{featureType:"poi.park",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:"-100"}]},{featureType:"road",elementType:"labels",stylers:[{lightness:"25"},{gamma:"1.06"},{saturation:"-100"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{gamma:"10.00"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{weight:"0.01"},{visibility:"simplified"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{weight:"0.01"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{weight:"0.8"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{gamma:"10.00"},{lightness:"100"},{weight:"0.4"}]},{featureType:"road.local",elementType:"labels",stylers:[{visibility:"simplified"},{weight:"0.01"},{lightness:"39"}]},{featureType:"road.local",elementType:"labels.text.stroke",stylers:[{weight:"0.50"},{gamma:"10.00"},{lightness:"100"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#cfe5ee"},{visibility:"on"}]}],light_blank:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"off"},{lightness:"64"},{hue:"#ff0000"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#bdbdbd"}]},{featureType:"administrative",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f0f0f0"},{visibility:"simplified"}]},{featureType:"landscape.natural.landcover",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"landscape.natural.terrain",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry.fill",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"labels",stylers:[{lightness:"100"}]},{featureType:"poi.park",elementType:"all",stylers:[{visibility:"on"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{saturation:"-41"},{color:"#e8ede7"}]},{featureType:"poi.park",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:"-100"}]},{featureType:"road",elementType:"labels",stylers:[{lightness:"25"},{gamma:"1.06"},{saturation:"-100"},{visibility:"off"}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{gamma:"10.00"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{weight:"0.01"},{visibility:"simplified"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{weight:"0.01"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{weight:"0.8"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{gamma:"10.00"},{lightness:"100"},{weight:"0.4"}]},{featureType:"road.local",elementType:"labels",stylers:[{visibility:"off"},{weight:"0.01"},{lightness:"39"}]},{featureType:"road.local",elementType:"labels.text.stroke",stylers:[{weight:"0.50"},{gamma:"10.00"},{lightness:"100"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#cfe5ee"},{visibility:"on"}]}],white_blank:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#e4e4e4"},{visibility:"on"}]}],white_label:[{featureType:"all",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"all",elementType:"labels",stylers:[{visibility:"simplified"}]},{featureType:"administrative",elementType:"labels",stylers:[{gamma:"3.86"},{lightness:"100"}]},{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#cccccc"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{weight:"0.8"}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"labels.text",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#e4e4e4"},{visibility:"on"}]}],dark_blank:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:17},{weight:"0.8"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:29},{weight:"0.01"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}],dark_label:[{featureType:"all",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"all",elementType:"labels.text.fill",stylers:[{saturation:36},{color:"#000000"},{lightness:40}]},{featureType:"all",elementType:"labels.text.stroke",stylers:[{visibility:"on"},{color:"#000000"},{lightness:16}]},{featureType:"all",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"administrative",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"administrative",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:17},{weight:1.2}]},{featureType:"administrative",elementType:"labels",stylers:[{visibility:"simplified"},{lightness:"-82"}]},{featureType:"administrative",elementType:"labels.text.stroke",stylers:[{invert_lightness:!0}
4,{weight:"7.15"}]},{featureType:"landscape",elementType:"geometry",stylers:[{color:"#000000"},{lightness:20}]},{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{color:"#000000"},{lightness:21}]},{featureType:"road",elementType:"labels",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#000000"},{lightness:17},{weight:"0.8"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#000000"},{lightness:29},{weight:"0.01"}]},{featureType:"road.highway",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"road.arterial",elementType:"geometry",stylers:[{color:"#000000"},{lightness:18}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"geometry",stylers:[{color:"#000000"},{lightness:16}]},{featureType:"road.local",elementType:"geometry.stroke",stylers:[{weight:"0.01"}]},{featureType:"road.local",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#000000"},{lightness:19}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#000000"},{lightness:17}]}]};window.theme.allMaps=window.theme.allMaps||{};let io=window.theme.allMaps,so={mapContainer:"[data-map-container]",style:"data-style",apiKey:"data-api-key",zoom:"data-zoom",address:"data-address",latLongCorrection:"data-latlong-correction",lat:"data-lat",long:"data-long"};class ro{constructor(e){this.container=e.container,this.mapWrap=this.container.querySelector(so.mapContainer),this.styleString=this.container.getAttribute(so.style)||"",this.key=this.container.getAttribute(so.apiKey),this.zoomString=this.container.getAttribute(so.zoom)||14,this.address=this.container.getAttribute(so.address),this.enableCorrection=this.container.getAttribute(so.latLongCorrection),this.lat=this.container.getAttribute(so.lat),this.long=this.container.getAttribute(so.long),this.key&&this.initMaps()}initMaps(){Qe({url:"https://maps.googleapis.com/maps/api/js?key="+this.key}).then(()=>{return"true"===this.enableCorrection&&""!==this.lat&&""!==this.long?new window.google.maps.LatLng(this.lat,this.long):(e=this.address,new Promise((i,s)=>{(new window.google.maps.Geocoder).geocode({address:e},function(e,t){"OK"==t?(e={lat:e[0].geometry.location.lat(),lng:e[0].geometry.location.lng()},i(e)):s(t)})}));var e}).then(e=>{var t,i,s,r=parseInt(this.zoomString,10),o=(o=this.styleString,to[o]);return t=this.mapWrap,i=new window.google.maps.Map(t,{zoom:r,styles:o,center:e,draggable:!0,clickableIcons:!1,scrollwheel:!1,zoomControl:!1,disableDefaultUI:!0}),s=i.getCenter(),new window.google.maps.Marker({map:i,position:s}),window.google.maps.event.addDomListener(window,"resize",function(){window.google.maps.event.trigger(i,"resize"),i.setCenter(s)}),i}).then(e=>{this.map=e,io[this.id]=e}).catch(e=>{console.log("Failed to load Google Map"),console.log(e)})}onUnload(){void 0!==window.google&&window.google.maps.event.clearListeners(this.map,"resize")}}e("section-map",{onLoad(){io[this.id]=new ro(this)},onUnload(){"function"==typeof io[this.id].unload&&io[this.id].unload()}}),e("section-columns",[xi,ut]);let H={dataRelatedSectionElem:"[data-related-section]",dataRelatedProduct:"[data-grid-item]",carousel:"[data-carousel]",dataLimit:"data-limit",dataMinimum:"data-minimum",dataLargeLayout:"data-layout-desktop",dataMediumLayout:"data-layout-tablet",dataSmallLayout:"data-layout-mobile",recentlyViewed:"[data-recent-wrapper]",recentlyViewedWrapper:"[data-recently-viewed-wrapper]",productId:"data-product-id"};class oo{constructor(e){this.section=e,this.container=e.container,this.init(),this.container.addEventListener("theme:recent-products:added",()=>{this.recent()})}init(){let o=this.container.querySelector(H.dataRelatedSectionElem);if(o){var e=o.getAttribute(H.productId),t=o.getAttribute(H.dataLimit);let i=o.getAttribute(H.dataLargeLayout),s=o.getAttribute(H.dataMediumLayout),r=o.getAttribute(H.dataSmallLayout);var a=window.theme.routes.product_recommendations_url||"/recommendations/products/";N.get(a+`?section_id=related&limit=${t}&product_id=`+e).then(e=>{var t=document.createElement("div"),e=(t.innerHTML=e.data,t.querySelector(H.dataRelatedSectionElem));e.querySelector(H.dataRelatedProduct)?(t=e.innerHTML,o.innerHTML=t,o.querySelector(H.carousel).style.setProperty("--grid-large-items",i),o.querySelector(H.carousel).style.setProperty("--grid-medium-items",s),o.querySelector(H.carousel).style.setProperty("--grid-small-items",r),o.dispatchEvent(new CustomEvent("theme:related-products:added",{bubbles:!0}))):o.dispatchEvent(new CustomEvent("theme:tabs:hide",{bubbles:!0}))}).catch(function(e){console.warn(e)})}}recent(){var e=this.container.querySelector(H.recentlyViewed),t=this.container.querySelector(H.recentlyViewedWrapper),i=this.container.querySelectorAll(H.dataRelatedProduct),s=e.hasAttribute(H.dataMinimum)?parseInt(e.getAttribute(H.dataMinimum)):4,r=!t&&0<i.length,t=t&&i.length>=s;(r||t)&&e.dispatchEvent(new CustomEvent("theme:tabs:check",{bubbles:!0}))}}e("related",[{onLoad(){this.section=new oo(this)}},u,We]),customElements.get("radio-swatch")||customElements.define("radio-swatch",rt),customElements.get("product-grid-item")||customElements.define("product-grid-item",Qi),customElements.get("product-grid-item-variant")||customElements.define("product-grid-item-variant",Yi),customElements.get("product-grid-item-image")||customElements.define("product-grid-item-image",es);let ao={ajaxDisable:"data-ajax-disable",shipping:"[data-shipping-estimate-form]",input:"[data-update-cart]",update:"[data-update-button]",bottom:"[data-cart-bottom]",upsellWrapper:"[data-cart-page-upsell-wrapper]"},no={dirty:"cart--dirty",heartBeat:"heart-beat"};class lo{constructor(e){window.theme.state.cartOpen=!0,this.section=e,this.container=e.container,this.inputs=this.container.querySelectorAll(ao.input),this.quantityWrappers=this.container.querySelectorAll(ao.qty),this.updateBtn=this.container.querySelector(ao.update),this.upsellWrapper=this.container.querySelector(ao.upsellWrapper),this.initQuantity(),this.initInputs(),this.upsellWrapper&&this.moveUpsell()}initQuantity(){cs(this.container)}moveUpsell(){var e=this.container.querySelector(ao.bottom);e.insertBefore(this.upsellWrapper,e.firstChild)}
4initInputs(){this.inputs.forEach(e=>{e.addEventListener("change",function(){this.updateBtn.classList.add(no.dirty),this.updateBtn.classList.add(no.heartBeat),setTimeout(function(){this.updateBtn.classList.remove(no.heartBeat)}.bind(this),1300)}.bind(this))})}}e("cart",[{onLoad(){this.container.querySelector(ao.shipping)&&new ns(this),this.disabled="true"==this.container.getAttribute(ao.ajaxDisable),this.disabled?this.cart=new lo(this):(this.cart=new hs(this),this.cart.init().then(()=>{this.cart.loadHTML()}))}},fs]),e("accordion-single",fs);let co=(i,e,s=null)=>{i.style.opacity=0,i.style.display=e||"block",function e(){var t=parseFloat(i.style.opacity);1<(t+=.1)||(i.style.opacity=t,requestAnimationFrame(e)),1===t&&"function"==typeof s&&s()}()},ho=(t,i=null)=>{t.style.opacity=1,function e(){(t.style.opacity-=.1)<0?t.style.display="none":requestAnimationFrame(e),0===parseFloat(t.style.opacity)&&"function"==typeof i&&i()}()},D={tracking:"[data-tracking-consent]",trackingAccept:"[data-confirm-cookies]",close:"[data-close-modal]",popupInner:"[data-popup-inner]",newsletterPopup:"[data-newsletter]",newsletterPopupHolder:"[data-newsletter-holder]",newsletterField:"[data-newsletter-field]",newsletterForm:"[data-newsletter-form]",promoPopup:"[data-promo-text]",delayAttribite:"data-popup-delay",cookieNameAttribute:"data-cookie-name",dataTargetReferrer:"data-target-referrer"},uo={hide:"hide",hasValue:"has-value",success:"has-success",error:"has-error",desktop:"desktop",mobile:"mobile"},po={};class mo{constructor(e,t){this.configuration={expires:null,path:"/",domain:window.location.hostname},this.name=e,this.value=t}write(){(-1!==document.cookie.indexOf("; ")&&!document.cookie.split("; ").find(e=>e.startsWith(this.name))||-1===document.cookie.indexOf("; "))&&(document.cookie=`${this.name}=${this.value}; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=`+this.configuration.domain)}read(){return!(-1===document.cookie.indexOf("; ")||!document.cookie.split("; ").find(e=>e.startsWith(this.name)))&&document.cookie.split("; ").find(e=>e.startsWith(this.name)).split("=")[1]}destroy(){document.cookie.split("; ").find(e=>e.startsWith(this.name))&&(document.cookie=`${this.name}=null; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=`+this.configuration.domain)}}class go{constructor(e,t){this.show=!0,this.element=t,this.delay=e.getAttribute(D.delayAttribite),"always"===this.delay&&this.always(),"delayed"===this.delay&&this.delayed(),"bottom"===this.delay&&this.bottom(),"idle"===this.delay&&this.idle()}hide(){this.show=!1}always(){this.show&&co(this.element)}delayed(){setTimeout(()=>{this.always()},1e4)}bottom(){let e,t=()=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{window.requestIdleCallback(()=>{Math.round(window.scrollY+window.innerHeight)>=Math.round(document.body.clientHeight)&&(this.always(),window.removeEventListener("scroll",t,{passive:!0}))},{timeout:300})})};window.addEventListener("scroll",t,{passive:!0})}onScroll(){}idle(){let e=0,t=6e4,i=["mousemove","mousedown","click","touchmove","touchstart","touchend","keydown","keypress"],s=["load","resize","scroll"],r=()=>{e=setTimeout(()=>{e=0,this.always()},t),i.forEach(e=>{document.addEventListener(e,o)}),s.forEach(e=>{window.addEventListener(e,o)})},o=()=>{e&&clearTimeout(e),i.forEach(e=>{document.removeEventListener(e,o)}),s.forEach(e=>{window.removeEventListener(e,o)}),r()};r()}}class yo{constructor(e){this.el=e,this.locationPath=location.href,this.el.hasAttribute(D.dataTargetReferrer)&&this.init()}init(){-1!==this.locationPath.indexOf(this.el.getAttribute(D.dataTargetReferrer))||window.Shopify.designMode||this.el.parentNode.removeChild(this.el)}}class fo{constructor(e){this.popup=e,this.modal=document.querySelector(D.tracking),this.modalInner=this.popup.querySelector(D.popupInner),this.close=this.modal.querySelector(D.close),this.acceptButton=this.modal.querySelector(D.trackingAccept),this.enable="true"===this.modal.getAttribute("data-enable"),this.showPopup=!1,window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],e=>{if(e)throw e;var e=window.Shopify.customerPrivacy.userCanBeTracked(),t=window.Shopify.customerPrivacy.getTrackingConsent();this.showPopup=!e&&"no_interaction"===t&&this.enable,window.Shopify.designMode&&(this.showPopup=!0),this.init()})}init(){this.showPopup&&co(this.modalInner),this.clickEvents()}clickEvents(){this.close.addEventListener("click",e=>{e.preventDefault(),window.Shopify.customerPrivacy.setTrackingConsent(!1,()=>ho(this.modalInner))}),this.acceptButton.addEventListener("click",e=>{e.preventDefault(),window.Shopify.customerPrivacy.setTrackingConsent(!0,()=>ho(this.modalInner))}),document.addEventListener("trackingConsentAccepted",function(){console.log("trackingConsentAccepted event fired")})}onBlockSelect(e){this.popup.contains(e.target)&&this.showPopup&&co(this.modalInner)}onBlockDeselect(e){this.popup.contains(e.target)&&ho(this.modalInner)}}class vo{constructor(e){this.popup=e,this.popupInner=this.popup.querySelector(D.popupInner),this.close=this.popup.querySelector(D.close),this.cookie=new mo(this.popup.getAttribute(D.cookieNameAttribute),"user_has_closed"),this.isTargeted=new yo(this.popup),this.hasDeviceClass="",this.init()}init(){!1!==this.cookie.read()&&!window.Shopify.designMode||(window.Shopify.designMode?co(this.popupInner):new go(this.popup,this.popupInner),this.clickEvents())}clickEvents(){this.close.addEventListener("click",e=>{e.preventDefault(),ho(this.popupInner),this.cookie.write()})}onBlockSelect(e){this.popup.classList.contains(uo.mobile)&&(this.hasDeviceClass=uo.mobile),this.popup.classList.contains(uo.desktop)&&(this.hasDeviceClass=uo.desktop),""!==this.hasDeviceClass&&this.popup.classList.remove(this.hasDeviceClass),this.popup.contains(e.target)&&co(this.popupInner)}onBlockDeselect(e){this.popup.contains(e.target)&&ho(this.popupInner),""!==this.hasDeviceClass&&this.popup.classList.add(this.hasDeviceClass)}}class wo{constructor(e){this.popup=e,this.popupInner=this.popup.querySelector(D.popupInner),this.holder=this.popup.querySelector(D.newsletterPopupHolder),this.close=this.popup.querySelector(D.close),this.newsletterField=this.popup.querySelector(D.newsletterField),this.cookie=new mo(this.popup.getAttribute(D.cookieNameAttribute),"newsletter_is_closed"),this.form=this.popup.querySelector(D.newsletterForm),this.isTargeted=new yo(this.popup),this.delayShow=null,this.init()}init(){!1!==this.cookie.read()&&!window.Shopify.designMode||(this.show(),this.checkForSuccess())}show(){window.Shopify.designMode?co(this.popupInner):this.delayShow=new go(this.popup,this.popupInner),this.inputField(),this.closePopup()}preventDelayShow(){this.delayShow&&this.delayShow.hide()}checkForSuccess(){var e=this.form.classList.contains(uo.error),t=this.form.classList.contains(uo.success);(t||e)&&(co(this.popupInner),this.preventDelayShow(),t)&&this.cookie.write()}
4closePopup(){this.close.addEventListener("click",e=>{e.preventDefault(),ho(this.popupInner),this.cookie.write(),this.preventDelayShow()})}inputField(){this.newsletterField.addEventListener("input",()=>{""!==this.newsletterField.value&&this.holder.classList.add(uo.hasValue,""!==this.newsletterField.value)}),this.newsletterField.addEventListener("focus",()=>{""!==this.newsletterField.value&&this.holder.classList.add(uo.hasValue,""!==this.newsletterField.value)}),this.newsletterField.addEventListener("focusout",()=>{setTimeout(()=>{this.holder.classList.remove(uo.hasValue)},2e3)})}onBlockSelect(e){this.popup.contains(e.target)&&co(this.popupInner)}onBlockDeselect(e){this.popup.contains(e.target)&&ho(this.popupInner)}}e("popups",[h,{onLoad(){po[this.id]=[],this.container.querySelectorAll(D.tracking).forEach(e=>{po[this.id].push(new fo(e))}),this.container.querySelectorAll(D.newsletterPopup).forEach(e=>{po[this.id].push(new wo(e))}),this.container.querySelectorAll(D.promoPopup).forEach(e=>{po[this.id].push(new vo(e))})},onBlockSelect(t){po[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){po[this.id].forEach(e=>{"function"==typeof e.onBlockDeselect&&e.onBlockDeselect(t)})}}]),e("tabs",u);let bo={dot:"data-look-dot",productsHolder:"data-products-holder",slider:"[data-carousel]",buttonClose:"[data-button-close-holder]",slideIndex:"data-carousel-index",blockId:"data-block-id",focusable:"button"},_={active:"is-active",expand:"is-expanded"},So={};class Eo{constructor(e){this.section=e,this.container=this.section.container,this.dots=this.container.querySelectorAll(`[${bo.dot}]`),this.productsHolder=this.container.querySelector(`[${bo.productsHolder}]`),this.slider=this.container.querySelector(bo.slider),this.buttonClose=this.container.querySelector(bo.buttonClose),this.currentDot=this.container.querySelector(`[${bo.dot}].`+_.active),this.hasDefaultOpen=Boolean(this.currentDot),this.init()}init(){this.keyEvents=e=>this.keyboardEventShowProductHolder(e),this.keyCloseEvent=e=>this.hideProductsHolder(e),this.clickEventsDot=e=>this.clickEventShowProductsHolder(e),this.clickEventToClose=e=>this.clickEventCloseProductsHolder(e),this.toggleOnResize=e=>ae(this.onResize(e),200),this.initSlider(),this.addEvents()}initSlider(){this.slider&&(this.carousel=O.data(this.slider),this.carousel.options.wrapAround=!0,this.carousel.options.freeScroll=!1,this.carousel.resize(),this.carousel.on("change",e=>{this.currentDot=this.container.querySelector(`[${bo.dot}="${e}"]`),this.currentDot.classList.add(_.active),this.removeClassOnSiblingDots()}))}addEvents(){this.dots.forEach(e=>{e.addEventListener("click",this.clickEventsDot),e.addEventListener("keyup",this.keyEvents)}),document.addEventListener("keyup",this.keyCloseEvent),document.addEventListener("theme:resize",this.toggleOnResize),this.buttonClose&&this.buttonClose.addEventListener("click",this.clickEventToClose)}showProductsHolder(){var e=!this.productsHolder.classList.contains(_.expand);this.currentDot.classList.toggle(_.active),this.productsHolder.classList.toggle(_.expand,this.currentDot.classList.contains(_.active)),this.currentDot.classList.contains(_.active)&&(this.hasDefaultOpen=!0,this.carousel.selectCell(Number(this.currentDot.getAttribute(bo.dot)),!0,e)),this.removeClassOnSiblingDots()}hideProductsHolder(e){"Escape"===e.code&&(this.removeClasses(),bt(),this.currentDot.focus())}removeClasses(){this.productsHolder.classList.remove(_.expand),this.currentDot.classList.remove(_.active),this.hasDefaultOpen=!1}clickEventShowProductsHolder(e){this.currentDot=e.currentTarget,this.showProductsHolder()}clickEventCloseProductsHolder(){this.removeClasses()}keyboardEventShowProductHolder(e){"Enter"!==e.code&&"Space"!==e.code||setTimeout(()=>{var e=this.productsHolder.querySelector(bo.focusable);wt(this.productsHolder,{elementToFocus:e})},400)}onResize(){this.currentDot&&(window.innerWidth<window.theme.sizes.medium?(this.currentDot.classList.remove(_.active),this.productsHolder.classList.remove(_.expand)):this.hasDefaultOpen&&(this.currentDot.classList.add(_.active),this.productsHolder.classList.add(_.expand)))}
4removeEvents(){this.dots.forEach(e=>{e.removeEventListener("click",this.clickEventsDot),e.removeEventListener("keyup",this.keyEvents)}),document.removeEventListener("keyup",this.keyCloseEvent),document.removeEventListener("theme:resize",this.toggleOnResize),this.buttonClose&&this.buttonClose.removeEventListener("click",this.clickEventToClose)}removeClassOnSiblingDots(){for(var e of this.currentDot.parentNode.children)e!==this.currentDot&&e.classList.remove(_.active)}onUnload(){this.slider&&this.carousel&&this.carousel.destroy(),this.removeEvents()}onBlockSelect(e){this.slider&&this.carousel&&(e=this.container.querySelector(`[${bo.blockId}="${e.detail.blockId}"]`),this.productsHolder.classList.add(_.expand),this.carousel.selectCell(Number(e.getAttribute(bo.slideIndex)),!0,!0))}onBlockDeselect(){window.innerWidth<window.theme.sizes.medium&&(this.productsHolder.classList.remove(_.expand),this.currentDot.classList.remove(_.active))}}e("look",[{onLoad(){So[this.id]=[],So[this.id].push(new Eo(this))},onUnload(){So[this.id].forEach(e=>{"function"==typeof e.onUnload&&e.onUnload()})},onBlockSelect(t){So[this.id].forEach(e=>{"function"==typeof e.onBlockSelect&&e.onBlockSelect(t)})},onBlockDeselect(t){So[this.id].forEach(e=>{"function"==typeof e.onBlockDeselect&&e.onBlockDeselect(t)})}}]);let Lo=(e,t="",i)=>((i=i||document.createElement("div")).classList.add(t),e.parentNode.insertBefore(i,e),i.appendChild(e));window.theme.settings.animate_scroll&&B.init({once:!0}),document.addEventListener("DOMContentLoaded",function(){var e=document.querySelector("[data-header-height]"),e=(e&&(e=e.clientHeight||0,document.documentElement.style.setProperty("--menu-height",e+"px")),$t("*"),window.theme.settings.animate_hover&&document.body.classList.add("theme-animate-hover"),document.querySelectorAll(".rte table").forEach(e=>{Lo(e,"rte__table-wrapper")}),document.querySelectorAll('.rte iframe[src*="youtube.com/embed"], .rte iframe[src*="player.vimeo"], .rte iframe#admin_bar_iframe').forEach(e=>{Lo(e,"rte__video-wrapper")}),document.addEventListener("mousedown",()=>{document.body.classList.remove("focus-enabled")}),document.addEventListener("keyup",e=>{"Tab"===e.code&&document.body.classList.add("focus-enabled")}),window.navigator.cookieEnabled&&(document.documentElement.className=document.documentElement.className.replace("supports-no-cookies","supports-cookies")),yt(),ft(),"scrollBehavior"in document.documentElement.style);e||Qe({url:window.theme.assets.smoothscroll})})})(themeVendor.AOS,themeVendor.FlickityFade,themeVendor.BodyScrollLock,themeVendor.Flickity,themeVendor.MicroModal,themeVendor.axios,themeVendor.Rellax,themeVendor.themeCurrency,themeVendor.themeAddresses,themeVendor.FlickitySync),document.addEventListener("DOMContentLoaded",()=>{$(".product-grid-item-dynamic").each(function(){let i=$(this);i.on("click",".bf-add",function(t){if(!i.hasClass("ready-to-add")){t.preventDefault(),t.stopPropagation();let e=$("<div/>",{class:"build-box"});e.html(`<div class="build-box--pop-up open">
5      <div class="overlay"></div>
6      <div class="build-box--pop-up__wrapper">
7        <div class="build-box--pop-up__container">
8          <div class="build-box--pop-up__close">
9            <svg xmlns="http://www.w3.org/2000/svg" width="36px" height="36px" viewBox="0 0 24 24" fill="none">
10              <path fill-rule="evenodd" clip-rule="evenodd" d="M16.9498 8.46447C17.3404 8.07394 17.3404 7.44078 16.9498 7.05025C16.5593 6.65973 15.9261 6.65973 15.5356 7.05025L12.0001 10.5858L8.46455 7.05025C8.07402 6.65973 7.44086 6.65973 7.05033 7.05025C6.65981 7.44078 6.65981 8.07394 7.05033 8.46447L10.5859 12L7.05033 15.5355C6.65981 15.9261 6.65981 16.5592 7.05033 16.9497C7.44086 17.3403 8.07402 17.3403 8.46455 16.9497L12.0001 13.4142L15.5356 16.9497C15.9261 17.3403 16.5593 17.3403 16.9498 16.9497C17.3404 16.5592 17.3404 15.9261 16.9498 15.5355L13.4143 12L16.9498 8.46447Z" fill="#000000"></path>
11            </svg>
12          </div>
13          <h4 class="build-box--pop-up__titleMain">CHOOSE PRODUCT VARIANT</h4>
14          <div class="slider-wrapper">
15            <div class="slider-container">
16              <div class="slider">
17                <div class="slide slide1"></div>
18              </div>
19            </div>
20          </div>
21          <div class="build-box--pop-up__title">
22            <a href=""></a>
23          </div>
24          <div class="embroidery-trigger">Add Embroidery</div>
25          <div class="build-box--pop-up__variants">
26            <select>
27              <option value="40183940481142">$18.00</option>
28            </select>
29          </div>
30          <button type="button" class="build-box--pop-up__submit btn btn--full ng-binding" data-product="6917166235766">
31            ADD TO BOX
32          </button>
33        </div>
34      </div>
35    </div>`),e.find(".build-box--pop-up__close").click(function(){e.remove()}),e.find(".build-box--pop-up__title a").attr("href",i.find("a").first().attr("href")).text(i.find(".product__grid__title").text()),e.find(".slide1").empty().append(i.find("img").first().clone()),e.find(".build-box--pop-up__variants option").text(i.find(".product__grid__price .price").text()),e.find(".build-box--pop-up__submit").click(function(){e.find(".embroidery-field").each(function(){var e={items:[]},t=$(this),i=t.children("input");e.items.push({id:40401060986998,quantity:1,properties:{embroidery_text:i.val()||"no text provided",embroidery_font:i.siblings(".embroidery-fonts").children(".active").data("font-name"),embroidery_product:t.siblings(".build-box--pop-up__title").text()}}),$.ajax({type:"POST",url:"/cart/add.js",data:e,dataType:"json"})}),i.addClass("ready-to-add"),i.find(".bf-add").click(),setTimeout(function(){i.removeClass("ready-to-add")},500)}),e.find(".embroidery-trigger").click(function(e){e.preventDefault(),e.stopPropagation(),$(this).after(`
36            <div class="embroidery-field active">
37              <div class="embroidery-fonts">
38                <span 
39                  class="active" 
40                  data-font-name="Serif"
41                  onclick="$(this).addClass('active').siblings().removeClass('active');"
42                >
43                  Aa
44                </span>
45                <span 
46                  data-font-name="Script"
47                  onclick="$(this).addClass('active').siblings().removeClass('active');"
48                >
49                  Aa
50                </span>
51              </div>
52              <input type="text" placeholder="Embroidery Text..." />
53              <div class="embroidery-field-note">*embroidery fee of $15 will be added at cart</div>
54            </div>
55          `),$(this).remove()}),$("body").append(e)}})})});

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.