PageSourceSearch

https://bearfruitjewelry.com/cdn/shop/t/179/assets/theme.js?v=147369228838151337511787943617

js bearfruitjewelry.com collected 2026-10-05 18:08:52 UTC 160,761 bytes, 12 lines download raw bytes

1/*
2 * @license
3 * Modular Theme (c) Invisible Themes
4 *
5 * This file is included for advanced development by
6 * Shopify Agencies.  Modified versions of the theme 
7 * code are not supported by Shopify or Invisible.
8 *
9 * In order to use this file you will need to change 
10 * theme.js to theme.dev.js in /layout/theme.liquid
11 *
12 */ !function(e,t,i,s,r,a,o,n,l){"use strict";function d(e){e.querySelectorAll(".form-field").forEach(e=>{let t=e.querySelector("label"),i=e.querySelector("input, textarea");t&&i&&(i.addEventListener("keyup",e=>{""!==e.target.value?t.classList.add("label--float"):t.classList.remove("label--float")}),i.value&&i.value.length&&t.classList.add("label--float"))})}function c(){let e={};return e.windowHeight=window.innerHeight,e.announcementHeight=u('[data-section-type*="announcement"]'),e.footerHeight=u('[data-section-type*="footer"]'),e.headerHeight=u("[data-header-height].header--has-scrolled")||60,e.headerInitialHeight=u("[data-header-height]:not(.header--has-scrolled)"),e}function h(){let{windowHeight:e,announcementHeight:t,headerHeight:i,footerHeight:s}=c();document.documentElement.style.setProperty("--announcement-height",`${t}px`),document.documentElement.style.setProperty("--header-height",`${i}px`),document.documentElement.style.setProperty("--footer-height",`${s}px`),document.documentElement.style.setProperty("--content-full",`${e-i}px`),document.documentElement.style.setProperty("--content-min",`${e-i-s}px`)}function u(e){let t=document.querySelector(e);return t?t.clientHeight:0}window.theme=window.theme||{},window.theme.sizes={mobile:550,small:767,large:1023,widescreen:1279},window.theme.keyboardKeys={TAB:9,ENTER:13,ESCAPE:27,SPACE:32,LEFTARROW:37,RIGHTARROW:39},window.theme.dimensions={headerScrolled:60},window.theme.loadedSPR=!1,window.theme.focusable='button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';let p=e=>{let t=getComputedStyle(e);return e.offsetHeight+(parseInt(t.marginTop)+parseInt(t.marginBottom))},m={bannerContainer:"[data-banner-container]",bannerContent:"[data-banner-content]"};function f(e){let t=e.querySelectorAll(m.bannerContainer);t&&t.forEach(e=>{let t=e.querySelector(m.bannerContent);t&&(e.style.minHeight=`${p(t)}px`,document.addEventListener("theme:resize",()=>{e.style.minHeight=`${p(t)}px`}))})}function g(e,t){let i;return function(){if(e){let s=()=>e.apply(this,arguments);clearTimeout(i),i=setTimeout(s,t)}}}let y=window.pageYOffset,v=null,b=null,E=null,L=null,w=0;function S(){window.theme.touched=!0,document.removeEventListener("touchstart",S,{passive:!0}),document.documentElement.className=document.documentElement.className.replace("no-touch","touch"),document.dispatchEvent(new CustomEvent("theme:touch",{bubbles:!0}))}document.addEventListener("touchstart",S,{passive:!0});let k={};function q(e={}){var t,i,s;if(e.type||(e.type="json"),e.url){let r;return k[e.url]?k[e.url]:(t=e.url,i=e.type,r=new Promise((e,s)=>{var r,a,o;let n,l,d;"text"===i?fetch(t).then(e=>e.text()).then(t=>{e(t)}).catch(e=>{s(e)}):(r=t,a=function(){e()},o=function(){s()},n=document.getElementsByTagName("head")[0],l=!1,(d=document.createElement("script")).src=r,d.onload=d.onreadystatechange=function(){l||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState?o():(l=!0,a())},n.appendChild(d))}),k[t]=r,r)}if(e.json)return k[e.json]?Promise.resolve(k[e.json]):window.fetch(e.json).then(e=>e.json()).then(t=>(k[e.json]=t,t));{if(!e.name)return Promise.reject();let a="".concat(e.name,e.version),o,n;return k[a]?k[a]:(s=e,o="".concat(s.name,s.version),n=new Promise((e,t)=>{try{window.Shopify.loadFeatures([{name:s.name,version:s.version,onLoad(i){var s,r,a;s=e,r=t,a=i,a?r(a):s()}},])}catch(i){t(i)}}),k[o]=n,n)}}window.isYoutubeAPILoaded=!1;let A={popupContainer:".pswp",popupCloseBtn:".pswp__custom-close",popupIframe:"iframe",popupCustomIframe:".pswp__custom-iframe",popupThumbs:".pswp__thumbs",dataOptionClasses:"data-pswp-option-classes",dataVideoType:"data-video-type",dataDisableSound:"data-disable-sound",dataVideoId:"data-video-id"},T={classCurrent:"is-current",classCustomLoader:"pswp--custom-loader",classCustomOpen:"pswp--custom-opening",classLoader:"pswp__loader",loaded:"loaded"},C=`<div class="${T.classLoader}"><div class="loader pswp__loader-line"><div class="loader-indeterminate"></div></div></div>`,$=[],x=(e,t,i)=>{let s=Object.assign({},{height:"720",width:"1280",events:{onReady:function(e){e.target.getIframe().setAttribute("tabindex","-1"),i?e.target.mute():e.target.unMute(),e.target.playVideo()},onStateChange:function(e){0==e.data&&e.target.playVideo(),1==e.data&&e.target.getIframe().parentElement&&e.target.getIframe().parentElement.classList.add(T.loaded)}}});s.videoId=t,t.length&&($[e]=new YT.Player(e,s))},I=(e,t,i)=>{let s="",r={url:"https://vimeo.com/"+e,background:!1,muted:i,autoplay:!0};for(let a in r)s+=encodeURIComponent(a)+"="+encodeURIComponent(r[a])+"&";fetch(`https://vimeo.com/api/oembed.json?${s}`).then(e=>e.json()).then(function(e){t.innerHTML=e.html,setTimeout(function(){t.parentElement.classList.add(T.loaded)},1e3)}).catch(function(e){console.log("error: ",e)})},P=(e,t="")=>{let i=document.querySelectorAll(A.popupContainer)[0];if(i.classList.add(T.classCustomOpen),i.classList.contains(T.classCustomLoader)&&""!==t&&t.mainClass){
12i.setAttribute(A.dataOptionClasses,t.mainClass);let s=document.createElement("div");s.innerHTML=C,s=s.firstChild,i.appendChild(s)}else i.setAttribute(A.dataOptionClasses,"");return q({url:window.theme.assets.photoswipe}).then(()=>{let s=window.themePhotoswipe.PhotoSwipe.default,r=window.themePhotoswipe.PhotoSwipeUI.default,a=i.querySelector(A.popupThumbs);i.classList.contains(T.classCustomLoader)&&i.classList.remove(T.classCustomLoader),i.classList.remove(T.classCustomOpen);let o={history:!1,focus:!1,mainClass:""};""!==t&&(o=t);let n=new s(i,r,e,o);n.init();let l=i.querySelector(A.popupCustomIframe);if(l){let d=l.getAttribute(A.dataVideoType),c=l.getAttribute(A.dataVideoId),h="true"===l.getAttribute(A.dataDisableSound),u=l.id;"youtube"==d?window.isYoutubeAPILoaded?x(u,c,h):(window.loadYoutubeAPI(),document.body.addEventListener("youtubeAPIReady",()=>x(u,c,h))):"vimeo"==d&&I(c,l,h)}let p=i.querySelector(A.popupCloseBtn);if(p&&p.addEventListener("click",function(){n.close()}),n.listen("close",function(){let e=i.querySelector(A.popupIframe);if(e&&(e.setAttribute("src",""),e.parentNode.removeChild(e)),a&&a.firstChild)for(;a.firstChild;)a.removeChild(a.firstChild);i.setAttribute(A.dataOptionClasses,"");let t=i.querySelector(`.${T.classLoader}`);t&&i.removeChild(t)}),a&&a.firstChild){let m=e=>{e.stopPropagation()};a.addEventListener("wheel",m),a.addEventListener("mousewheel",m),a.addEventListener("DOMMouseScroll",m);let f=i.querySelectorAll(`${A.popupThumbs} > *`);f.forEach((e,t)=>{e.addEventListener("click",function(e){e.preventDefault(),this.parentElement.querySelector(`.${T.classCurrent}`).classList.remove(T.classCurrent),this.classList.add(T.classCurrent),n.goTo(t)})});let g=()=>{let e=i.querySelector(`${A.popupThumbs} > .${T.classCurrent}`);e&&e.classList.remove(T.classCurrent);let t=f[n.getCurrentIndex()],s,r=a.scrollLeft+a.offsetWidth,o=t.offsetLeft,l=t.offsetWidth;if(t.classList.add(T.classCurrent),r<=o+l||r>o){let d=parseInt(window.getComputedStyle(t).marginLeft);a.scrollTo({top:0,left:o-d,behavior:"smooth"})}};n.listen("imageLoadComplete",g),n.listen("beforeChange",g)}}).catch(e=>console.error(e))};function M(e){let t=e.querySelectorAll("[data-aria-toggle]");t.length&&t.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();let t=e.currentTarget;t.setAttribute("aria-expanded","false"==t.getAttribute("aria-expanded")?"true":"false");let i=t.getAttribute("aria-controls");document.querySelector(`#${i}`).classList.toggle("expanding"),setTimeout(function(){document.querySelector(`#${i}`).classList.toggle("expanded")},40)})})}function H(e){let t=e.querySelectorAll("[data-video-popup]");t.length&&t.forEach(e=>{e.addEventListener("click",function(t){let i=e.getAttribute("data-video-popup");""!==i.trim()&&(t.preventDefault(),P([{html:i},]))})})}window.addEventListener("resize",g(function(){document.dispatchEvent(new CustomEvent("theme:resize",{bubbles:!0}))},50));let _;function B(e){var t=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,s=e.getBoundingClientRect();return s.top>=0&&s.bottom<=i&&s.left>=0&&s.right<=t}function F(e){var t=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,s=e.getBoundingClientRect(),r=s.left>=0&&s.left<=t||s.right>=0&&s.right<=t,a=s.top>=0&&s.top<=i||s.bottom>=0&&s.bottom<=i;return r&&a}window.addEventListener("scroll",function(){_&&window.cancelAnimationFrame(_),_=window.requestAnimationFrame(function(){let e;(e=window.pageYOffset)>y?(b=!0,v=!1):e<y?(b=!1,v=!0):(v=null,b=null),y=e,document.dispatchEvent(new CustomEvent("theme:scroll",{detail:{up:v,down:b,position:e},bubbles:!1})),v&&!E&&document.dispatchEvent(new CustomEvent("theme:scroll:up",{detail:{position:e},bubbles:!1})),b&&!L&&document.dispatchEvent(new CustomEvent("theme:scroll:down",{detail:{position:e},bubbles:!1})),L=b,E=v})},{passive:!0}),window.addEventListener("theme:scroll:lock",function(t){e.disableBodyScroll(t.detail,{allowTouchMove:e=>"TEXTAREA"===e.tagName}),document.documentElement.setAttribute("data-scroll-locked","")}),window.addEventListener("theme:scroll:unlock",function(){if(w=setTimeout(()=>{document.body.removeAttribute("data-drawer-closing")},20),document.body.hasAttribute("data-drawer-closing")){document.body.removeAttribute("data-drawer-closing"),w&&clearTimeout(w);return}document.body.setAttribute("data-drawer-closing",""),document.documentElement.removeAttribute("data-scroll-locked"),e.clearAllBodyScrollLocks()}),document.addEventListener("lazyloaded",function(e){let t=e.target.parentNode;t.classList.contains("lazy-image")&&(t.style.backgroundImage="none")}),function(){let{windowHeight:e,announcementHeight:t,headerInitialHeight:i,headerHeight:s,footerHeight:r}=c(),a,o,n;document.documentElement.style.setProperty("--announcement-height",`${t}px`),document.documentElement.style.setProperty("--header-height",`${s}px`),document.documentElement.style.setProperty("--header-initial-height",`${i}px`),document.documentElement.style.setProperty("--footer-height",`${r}px`),document.documentElement.style.setProperty("--content-full",`${e-s}px`),document.documentElement.style.setProperty("--content-min",`${e-s-r}px`),document.documentElement.style.setProperty("--scrollbar-width",`${((a=document.createElement("div")).style.visibility="hidden",a.style.overflow="scroll",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a),o=document.createElement("div"),a.appendChild(o),n=a.offsetWidth-o.offsetWidth,a.parentNode.removeChild(a),n)}px`)}(),window.addEventListener("load",()=>{document.addEventListener("theme:resize",h),d(document),f(document),H(document),M(document)}),document.addEventListener("shopify:section:load",e=>{let t=e.target;d(t),f(t),H(t),M(document),document.dispatchEvent(new CustomEvent("theme:header:update",{bubbles:!0}))}),document.addEventListener("shopify:section:reorder",()=>{document.dispatchEvent(new CustomEvent("theme:header:update",{bubbles:!0}))}),document.addEventListener("shopify:section:unload",()=>{setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:header:update",{bubbles:!0}))},200)}),window.visibilityHelper={isElementTotallyVisible:B,isElementPartiallyVisible:F,inViewportPartially:function(e,t){function i(){var i=F(e);i!=s&&(s=i,"function"==typeof t&&t(i,e))}var s=F(e);window.addEventListener("load",i),window.addEventListener("resize",i),window.addEventListener("scroll",i)},inViewportTotally:function(e,t){function i(){var i=B(e);i!=s&&(s=i,"function"==typeof t&&t(i,e))}var s=B(e);window.addEventListener("load",i),window.addEventListener("resize",i),window.addEventListener("scroll",i)}};let z=(e,t=!1,i="block")=>{e&&(t?e.style.removeProperty("display"):e.style.display=i)},W={saleClass:" is-sale",soldClass:" is-sold-out",badgeClass:" product-status-flag--",customBadgeClass:" product-status-flag--custom",apiContent:"[data-api-content]",productTemplate:"[data-product-template]"};
12function V(e,t){t=t||{};var i=e.tabIndex;function s(r){r.target.removeEventListener(r.type,s),e.tabIndex=i,delete e.dataset.tabIndex,void 0!==t.className&&e.classList.remove(t.className)}e.tabIndex=-1,e.dataset.tabIndex=i,e.focus(),void 0!==t.className&&e.classList.add(t.className),e.addEventListener("blur",s)}function D(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")).filter(function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)})}let O,N,R,j,U,Q,K;Shopify.Products=(O={howManyToShow:4,howManyToStoreInMemory:10,wrapperId:"RecentlyViewed",onComplete:null},N=[],R=null,j=null,U={configuration:{expires:90,path:"/",domain:window.location.hostname},name:"shopify_recently_viewed",write:function(e){let t=e.join(" ");document.cookie=`${this.name}=${t}; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}`},read:function(){let e=[],t=null,i=document.querySelector(W.productTemplate);if(-1!==document.cookie.indexOf("; ")&&document.cookie.split("; ").find(e=>e.startsWith(this.name))&&(t=document.cookie.split("; ").find(e=>e.startsWith(this.name)).split("=")[1]),null!==t&&(e=t.split(" ")),i){let s=i.getAttribute("data-product-handle");if(-1!=e.indexOf(s)){let r=e.indexOf(s);e.splice(r,1)}}return e},destroy:function(){document.cookie=`${this.name}=null; expires=${this.configuration.expires}; path=${this.configuration.path}; domain=${this.configuration.domain}`},remove:function(e){let t=this.read(),i=t.indexOf(e);-1!==i&&(t.splice(i,1),this.write(t))}},Q=()=>{z(R,!0);let e=U.read().length;if(Shopify.recentlyViewed&&j&&e&&e<j&&R.children.length){let t=[],i=[],s=0;for(let r in Shopify.recentlyViewed){s+=1;let a=Shopify.recentlyViewed[r].split(" "),o=parseInt(r.split("_")[1]);t=[...t,...a],U.read().length!==o&&(s!==Object.keys(Shopify.recentlyViewed).length||i.length)||(i=[...i,...a])}for(let n=0;n<R.children.length;n++){let l=R.children[n];t.length&&l.classList.remove(...t),i.length&&l.classList.add(...i)}}if(O.onComplete)try{O.onComplete()}catch(d){console.log("error: ",d)}},K=e=>{N.length&&e<O.howManyToShow?fetch("/products/"+N[0]+"?section_id=api-product-grid-item").then(e=>e.text()).then(t=>{let i=document.createElement("div");i.innerHTML=t,R.innerHTML+=i.querySelector(W.apiContent).innerHTML,N.shift(),K(++e)}).catch(()=>{U.remove(N[0]),N.shift(),K(e)}):Q()},{showRecentlyViewed:function(e){Object.assign(O,e||{}),N=U.read(),R=document.querySelector(`#${O.wrapperId}`),j=O.howManyToShow,O.howManyToShow=Math.min(N.length,O.howManyToShow),O.howManyToShow&&R&&K(0)},getConfig:function(){return O},clearList:function(){U.destroy()},recordRecentlyViewed:function(e){Object.assign(O,e||{});let t=U.read();if(-1!==window.location.pathname.indexOf("/products/")){let i=decodeURIComponent(window.location.pathname).match(/\/products\/([a-z0-9\-]|[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|[\u203B]|[\w\u0430-\u044f]|[\u0400-\u04FF]|[\u0900-\u097F]|[\u0590-\u05FF\u200f\u200e]|[\u0621-\u064A\u0660-\u0669 ])+/)[0].split("/products/")[1],s=t.indexOf(i);-1===s?(t.unshift(i),t=t.splice(0,O.howManyToStoreInMemory)):(t.splice(s,1),t.unshift(i)),U.write(t)}},hasProducts:U.read().length>0});var X={};function Y(){document.removeEventListener("focusin",X.focusin),document.removeEventListener("focusout",X.focusout),document.removeEventListener("keydown",X.keydown)}var G=Object.freeze({__proto__:null,forceFocus:V,focusHash:function(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&&V(i,e)},bindInPageLinks:function(e){return e=e||{},Array.prototype.slice.call(document.querySelectorAll('a[href^="#"]')).filter(function(t){if("#"===t.hash||""===t.hash||e.ignore&&t.matches(e.ignore)||(i=t.hash.substr(1),null===document.getElementById(i)))return!1;var i,s=document.querySelector(t.hash);return!!s&&(t.addEventListener("click",function(){V(s,e)}),!0)})},focusable:D,trapFocus:function(e,t){t=t||{};var i=D(e),s=t.elementToFocus||e,r=i[0],a=i[i.length-1];Y(),X.focusin=function(t){e===t.target||e.contains(t.target)||r.focus(),(t.target===e||t.target===a||t.target===r)&&document.addEventListener("keydown",X.key
12down)},X.focusout=function(){document.removeEventListener("keydown",X.keydown)},X.keydown=function(t){9===t.keyCode&&(t.target!==a||t.shiftKey||(t.preventDefault(),r.focus()),(t.target===e||t.target===r)&&t.shiftKey&&(t.preventDefault(),a.focus()))},document.addEventListener("focusout",X.focusout),document.addEventListener("focusin",X.focusin),V(s,t)},removeTrapFocus:Y,accessibleLinks:function(e,t){if("string"!=typeof e)throw TypeError(e+" is not a String.");if(0!==(e=document.querySelectorAll(e)).length){(t=t||{}).messages=t.messages||{};var i,s,r,a={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=t.prefix||"a11y",n={newWindow:o+"-new-window-message",external:o+"-external-message",newWindowExternal:o+"-new-window-external-message"};e.forEach(function(e){var t=e.getAttribute("target"),i=e.getAttribute("rel"),s=e.hostname!==window.location.hostname,r="_blank"===t,a=null===i||-1===i.indexOf("noopener");r&&a&&e.setAttribute("rel",null===i?"noopener":i+" noopener"),s&&r?e.setAttribute("aria-describedby",n.newWindowExternal):s?e.setAttribute("aria-describedby",n.external):r&&e.setAttribute("aria-describedby",n.newWindow)}),i=a,s=document.createElement("ul"),r=Object.keys(i).reduce(function(e,t){return e+("<li id="+n[t]+">")+i[t]+"</li>"},""),s.setAttribute("hidden",!0),s.innerHTML=r,document.body.appendChild(s)}}});let J=(e,t=500)=>{e.style.transitionProperty="all",e.style.transitionDuration=t+"ms",e.style.boxSizing="border-box",e.style.height=e.offsetHeight+"px",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,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")},t)},Z=(e,t=500,i=!0)=>{let s=window.getComputedStyle(e).display;if(i&&"none"!==s)return;e.style.removeProperty("display"),"none"===s&&(s="block"),e.style.display=s;let r=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.offsetHeight,e.style.boxSizing="border-box",e.style.transitionProperty="all",e.style.transitionDuration=t+"ms",e.style.height=r+"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")},t)};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 et=(e,t)=>{let i="";return -1!=e.indexOf("blank.gif")?e:(i+=e.replace("_1x1.","_180x.")+" 180w "+Math.round(180/t)+"h,",i+=e.replace("_1x1.","_240x.")+" 240w "+Math.round(240/t)+"h,",i+=e.replace("_1x1.","_360x.")+" 360w "+Math.round(360/t)+"h,",i+=e.replace("_1x1.","_540x.")+" 540w "+Math.round(540/t)+"h,",i+=e.replace("_1x1.","_720x.")+" 720w "+Math.round(720/t)+"h,",i+=e.replace("_1x1.","_900x.")+" 900w "+Math.round(900/t)+"h,",i+=e.replace("_1x1.","_1080x.")+" 1080w "+Math.round(1080/t)+"h,",i+=e.replace("_1x1.","_1296x.")+" 1296w "+Math.round(1296/t)+"h,",i+=e.replace("_1x1.","_1512x.")+" 1512w "+Math.round(1512/t)+"h,",i+=e.replace("_1x1.","_1728x.")+" 1728w "+Math.round(1728/t)+"h,",i+=e.replace("_1x1.","_1950x.")+" 1950w "+Math.round(1950/t)+"h,",i+=e+" 2048w "+Math.round(2048/t)+"h")},ei={quantityHolder:"[data-quantity-holder]",quantityField:"[data-quantity-field]",quantityButton:"[data-quantity-button]",quantityMinusButton:"[data-quantity-minus]",quantityPlusButton:"[data-quantity-plus]",quantityReadOnly:"read-only",isDisabled:"is-disabled"};class es{constructor(e,t=!1){this.holder=e,this.quantityUpdateCart=t}init(){this.settings=ei,this.quantity=this.holder.querySelector(this.settings.quantityHolder),this.field=this.quantity.querySelector(this.settings.quantityField),this.buttons=this.quantity.querySelectorAll(this.settings.quantityButton),this.increaseButton=this.quantity.querySelector(this.settings.quantityPlus
12Button),this.quantityValue=Number(this.field.value||0),this.cartItemID=this.field.getAttribute("data-id"),this.maxValue=Number(this.field.getAttribute("max"))>0?Number(this.field.getAttribute("max")):null,this.minValue=Number(this.field.getAttribute("min"))>0?Number(this.field.getAttribute("min")):0,this.disableIncrease=this.disableIncrease.bind(this),this.emptyField=!1,this.updateQuantity=this.updateQuantity.bind(this),this.decrease=this.decrease.bind(this),this.increase=this.increase.bind(this),this.disableIncrease(),this.quantity.classList.contains(this.settings.quantityReadOnly)||(this.changeValueOnClick(),this.changeValueOnInput())}changeValueOnClick(){let e=this;this.buttons.forEach(t=>{t.addEventListener("click",t=>{t.preventDefault();let i=t.target,s=i.matches(e.settings.quantityMinusButton)||i.closest(e.settings.quantityMinusButton),r=i.matches(e.settings.quantityPlusButton)||i.closest(e.settings.quantityPlusButton);s&&e.decrease(),r&&e.increase(),e.updateQuantity()})})}changeValueOnInput(){let e=this;this.field.addEventListener("input",function(){e.quantityValue=this.value,""===this.value&&(e.emptyField=!0),e.updateQuantity()},this)}updateQuantity(){this.maxValue<this.quantityValue&&null!==this.maxValue&&(this.quantityValue=this.maxValue),this.minValue>this.quantityValue&&(this.quantityValue=this.minValue),this.field.value=this.quantityValue,this.disableIncrease(),document.dispatchEvent(new CustomEvent("popout:updateValue")),this.quantityUpdateCart&&this.updateCart()}decrease(){if(this.quantityValue>this.minValue){this.quantityValue--;return}this.quantityValue=0}increase(){this.quantityValue++}disableIncrease(){this.increaseButton.classList.toggle(this.settings.isDisabled,this.quantityValue>=this.maxValue&&null!==this.maxValue)}updateCart(){let e=new CustomEvent("cart:update",{bubbles:!0,detail:{id:this.cartItemID,quantity:this.quantityValue,valueIsEmpty:this.emptyField}});this.holder.dispatchEvent(e)}}let er={dimensions:{maxSize:100},times:{timeoutAddProduct:1e3,closeDropdownAfter:5e3},classes:{template:"template-cart",hidden:"is-hidden",cartVisible:"cart--is-visible",open:"is-open",focused:"is-focused",visible:"is-visible",loading:"is-loading",disabled:"is-disabled",success:"product__form-submit--success",defaultSuccess:"is-success",cartEmpty:"cartToggle--empty",isAdded:"is-added"},attributes:{expanded:"aria-expanded",disabled:"disabled",dataId:"data-id"},elements:{apiContent:"[data-api-content]",html:"html",button:"button",buttonAddToCart:"[data-add-to-cart]",buttonAddToCartText:"[data-add-to-cart-text]",buttonHolder:"[data-foot-holder]",buttonUpdateCart:"[data-update-cart]",cart:"[data-cart]",cartContainer:"[data-cart-container]",cartTemplate:"[data-cart-template]",cartToggleElement:"[data-cart-toggle]",cartClose:"[data-cart-close]",cartItemRemove:"[data-item-remove]",cartItemsCount:"[data-cart-items-count]",cartTotal:"[data-cart-total]",cartErrors:"[data-cart-errors]",cartCloseError:"[data-cart-error-close]",cartOriginalTotal:"[data-cart-original-total]",cartOriginaTotalPrice:"[data-cart-original-total-price]",cartDiscountsHolder:"[data-cart-discounts-holder]",cartAcceptanceCheckbox:"[data-cart-acceptance-checkbox]",cartButtons:"[data-cart-buttons]",cartButtonsFieldset:"[data-cart-buttons-fieldset]",cartFormError:"[data-cart-error]",cartMessage:"data-cart-message",continueBtn:"[data-continue]",emptyMessage:"[data-empty-message]",errorMessage:"[data-error-message]",freeMessageLimit:"data-limit",input:"input",item:"[data-item]",itemsHolder:"[data-items-holder]",leftToSpend:"[data-left-to-spend]",popover:"[data-popover]",popoverTemplate:"[data-popover-template]",progressBar:"[data-cart-bar-progress]",qty:"[data-quantity-field]",quickAddHolder:"[data-quick-add-holder]"},formatMoney:moneyFormat,cartTotalDiscountsTemplate:"[data-cart-total-discount]"};window.cart=new class{constructor(){if("/password"===window.location.pathname)return;this.init()}init(){this.html=document.querySelector(er.elements.html),this.body=document.body,this.defineSelectors(),this.accessibility=G,this.ajaxEnabled=theme.settings.enableAjaxCart,this.popoverTimer="",this.scrollLockTimeout=0,this.cartFocusTimeout=0,this.form=null,this.cartItemsCount=document.querySelector(er.elements.cartItemsCount),this.cartDrawerIsOpen=!1,this.cartDiscounts=0,this.cartLimitErrorIsHidden=!0,this.openCartDrawer=this.openCartDrawer.bind(this),this.closeCartDrawer=this.closeCartDrawer.bind(this),this.toggleCartDrawer=this.toggleCartDrawer.bind(this),this.cartKeyUpEvent=this.cartKeyUpEvent.bind(this),this.ajaxEnabled&&this.eventToggleCart(),this.initDefaultCartEvents(),this.addProductEvent()}renderCart(){this.cartContainer.innerHTML=document.querySelector(er.elements.cartTemplate).innerHTML,this.totalItems=this.items.length,this.defineSelectors(),this.initDefaultCartEvents(),this.getCart()}defineSelectors(){this.cartContainer=document.querySelector(er.elements.cartContainer),this.cartTemplate=document.querySelector(er.elements.cartTemplate),this.popover=document.querySelector(er.elements.popover),this.popoverTemplate=document.querySelector(er.elements.popoverTemplate).innerHTML,this.cart=document.querySelector(er.elements.cart),this.emptyMessage=document.querySelector(er.elements.emptyMessage),this.buttonHolder=document.querySelector(er.elements.buttonHolder),this.itemsHolder=document.querySelector(er.elements.itemsHolder),this.items=document.querySelectorAll(er.elements.item),this.cartToggle=document.querySelector(er.elements.cartToggleElement),this.continueBtns=document.querySelectorAll(er.elements.continueBtn),this.cartTotal=document.querySelector(er.elements.cartTotal),this.cartOriginalTotal=document.querySelector(er.elements.cartOriginalTotal),this.cartOriginaTotalPrice=document.querySelector(er.elements.cartOriginaTotalPrice),this.cartDiscountHolder=document.querySelector(er.elements.cartDiscountsHolder),this.cartTotalDiscountTemplate=document.querySelector(er.cartTotalDiscountsTemplate).innerHTML,this.cartErrorHolder=document.querySelector(er.elements.cartErrors),this.cartClose=document.querySelector(er.elements.cartClose),this.cartCloseErrorMessage=document.querySelector(er.elements.cartCloseError),this.cartAcceptanceCheckbox=document.querySelector(er.elements.cartAcceptanceCheckbox),this.cartMessage=document.querySelector(`[${er.elements.cartMessage}]`),this.progressBar=document.querySelector(er.elements.progressBar),this.leftToSpend=document.querySelector(er.elements.leftToSpend)}initDefaultCartEvents(){this.ajaxEnabled?(this.cartEvents(),this.customEventAddProduct()):this.items.length&&this.noAjaxUpdate(),this.initQuantity(this.ajaxEnabled),this.cartMessage&&(this.cartFreeLimitShipping=Number(this.cartMessage.getAttribute(er.elements.freeMessageLimit)),this.cartBarProgress())}initQuantity(e){this.items=document.querySelectorAll(er.elements.item),this.items.forEac
12h(t=>{new es(t,!0).init(),e&&this.customEventsHandle(t)})}noAjaxUpdate(){this.buttonHolder.querySelector(er.elements.buttonUpdateCart).addEventListener("click",e=>{e.preventDefault(),this.items.forEach(e=>{let t=e.querySelector(`input[${er.attributes.dataId}]`);this.updateCart({id:t.getAttribute(er.attributes.dataId),quantity:t.value})})})}customEventsHandle(e){e.addEventListener("cart:update",g(t=>{this.updateCart({id:t.detail.id,quantity:t.detail.quantity},e,t.detail.valueIsEmpty)},500))}customEventAddProduct(){document.addEventListener("cart:add-item",g(e=>{this.cartToggle.classList.add(er.classes.isAdded),setTimeout(()=>{this.cartToggle.classList.remove(er.classes.isAdded)},800)},500))}cartEvents(){let e=document.querySelectorAll(er.elements.cartItemRemove);e&&e.forEach(e=>{e.addEventListener("click",t=>{t.preventDefault(),t.target.closest(er.elements.item).classList.add(er.classes.loading),this.updateCart({id:e.getAttribute(er.attributes.dataId),quantity:0})})}),this.cartCloseErrorMessage&&this.cartCloseErrorMessage.addEventListener("click",e=>{e.preventDefault(),J(this.cartErrorHolder,400)}),this.continueBtns&&this.continueBtns.forEach(e=>{e.addEventListener("click",e=>{let t=document.referrer,i=window.location.origin+"/",s=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>theme.sizes.small;e.preventDefault(),s&&!(window.location.href.indexOf("/cart")>-1)?this.closeCartDrawer():t===i?window.location.href=theme.routes.root_url:history.back(1)})}),this.cartClose&&this.cartClose.addEventListener("click",this.closeCartDrawer),this.cartContainer&&this.cartContainer.addEventListener("keyup",this.cartKeyUpEvent),this.cartAcceptanceCheckbox&&(this.cart.addEventListener("click",e=>{let t=e.target;(t.matches(er.elements.cartButtons)||t.closest(er.elements.cartButtons))&&this.termsAcceptance(e)}),this.cartAcceptanceCheckbox.addEventListener("change",e=>this.termsAcceptance(e)),!1===this.cartAcceptanceCheckbox.checked&&this.cart.querySelector(er.elements.cartButtonsFieldset).setAttribute(er.attributes.disabled,!0))}cartKeyUpEvent(e){(e.which||e.keyCode)===theme.keyboardKeys.ESCAPE&&this.cartDrawerIsOpen&&(this.closeCartDrawer(),this.popoverHide())}termsAcceptance(e){let t=!1===this.cartAcceptanceCheckbox.checked,i=this.cart.querySelector(er.elements.cartFormError),s=this.cart.querySelector(er.elements.cartButtonsFieldset);t?(e.preventDefault(),s.setAttribute(er.attributes.disabled,!0),Z(i)):(s.removeAttribute(er.attributes.disabled),J(i))}renderPopover(e,s){let r={},a=theme.assets.no_image,o="",n=t.formatMoney(e.final_price,er.formatMoney),l=e.selling_plan_allocation?e.selling_plan_allocation.selling_plan.name:null,d="";if(e.unit_price_measurement&&(o=`${t.formatMoney(e.unit_price,er.formatMoney)} `,1!=e.unit_price_measurement.reference_value&&(o+=e.unit_price_measurement.reference_value),o+=e.unit_price_measurement.reference_unit),null!=e.image&&(a=et(e.image.replace(/(\.[^.]*)$/,"_1x1$1").replace("http:",""),e.featured_image.aspect_ratio)),e.properties)for(let c in e.properties)({}).hasOwnProperty.call(e.properties,c)&&(d+="<p>"+c+": "+e.properties[c]+"</p>");return r={item_count:s,img:a,product_title:e.product_title,variation:!e.product_has_only_default_variant&&e.variant_title,selling_plan_name:l,properties:d,price:e.price,price_formatted:n,unit_price:o},i.render(this.popoverTemplate,r)}popoverShow(e,t){this.popover.innerHTML=this.renderPopover(e,t),this.popover.classList.add(er.classes.visible),clearTimeout(this.popoverTimer),this.popoverTimer=setTimeout(()=>{this.popoverHide()},er.times.closeDropdownAfter)}popoverHide(){this.popover.classList.remove(er.classes.visible),setTimeout(()=>{this.popover.innerHtml=""},300)}addProductEvent(){document.addEventListener("click",e=>{if(e.target.matches(er.elements.buttonAddToCart)){e.preventDefault();let t=e.target;if(t.hasAttribute(er.attributes.disabled))return;t.setAttribute(er.attributes.disabled,!0),this.form=t.closest("form");let i=this.form.querySelector(er.elements.qty).value,s=new FormData(this.form);s=new URLSearchParams(s).toString(),this.form.querySelector('[type="file"]')||(this.addToCart(s,null,t,i),document.dispatchEvent(new CustomEvent("cart:add-item",{bubbles:!0,detail:{selector:t}})))}})}getCart(){fetch("/cart.js").then(this.handleErrors).then(e=>e.json()).then(e=>(this.updateCounter(e.item_count),null!==this.cart&&(this.newTotalItems=e.items.length,this.buildTotalPrice(e),this.subtotal=e.total_price),fetch("/cart?section_id=api-cart-items"))).then(e=>e.text()).then(e=>{this.build(e),this.cartMessage&&this.cartBarProgress()}).catch(e=>console.log(e))}
12addToCart(e,t=null,i=null,s=1){fetch("/cart/add.js",{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/x-www-form-urlencoded"},body:e}).then(e=>e.json()).then(e=>{if(e.status){null!==t?this.addToCartError(e,t.element,i):this.addToCartError(e,null,i);return}this.ajaxEnabled?(null!==this.cart?this.getCart():this.renderCart(),i&&(i.classList.remove(er.classes.loading),i.classList.add(er.classes.success)),setTimeout(()=>{null!==i&&(i.removeAttribute(er.attributes.disabled),i.classList.remove(er.classes.success));(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>=theme.sizes.mobile&&this.popoverShow(e,s)},er.times.timeoutAddProduct)):window.location.href=theme.routes.cart_url}).catch(e=>console.log(e))}updateCart(e={},t=null,i=!1){let s=null,r=null,a=null,o=e.quantity;null!==t&&t.closest(er.elements.item).classList.add(er.classes.loading),this.items.forEach(e=>{e.classList.add(er.classes.disabled),e.querySelector(er.elements.input).setAttribute(er.attributes.disabled,!0),e.querySelector(er.elements.input).blur(),e.querySelectorAll(er.elements.button).forEach(e=>{e.setAttribute(er.attributes.disabled,!0)})}),fetch("/cart.js").then(this.handleErrors).then(e=>e.json()).then(t=>{let i=t.items.findIndex(t=>t.key===e.id);return r=t.item_count,a=t.items[i].title,fetch("/cart/change.js",{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify({line:`${i+1}`,quantity:o})})}).then(this.handleErrors).then(e=>e.json()).then(t=>{if(s=t.item_count,i&&(o=1),this.ajaxEnabled)0!==o&&(this.cartLimitErrorIsHidden=s!==r,this.toggleLimitError(a)),this.updateCounter(s),this.buildTotalPrice(t),this.cartDiscounts=t.total_discount,this.subtotal=t.total_price,this.cartMessage&&this.cartBarProgress(),this.getCart();else{let n=this.buttonHolder.closest("form");t.items.forEach(t=>{t.key===e.id&&(n.querySelector(`[${er.attributes.dataId}="${t.key}"]`).value=t.quantity)}),n.submit()}}).catch(e=>console.log(e))}toggleLimitError(e){this.cartErrorHolder.querySelector(er.elements.errorMessage).innerText=e,this.cartLimitErrorIsHidden?J(this.cartErrorHolder,400):Z(this.cartErrorHolder,400)}handleErrors(e){return e.ok?e:e.json().then(function(t){throw new ee({status:e.statusText,headers:e.headers,json:t})})}addToCartError(e,t,i){if(!this.ajaxEnabled)return;let s=this.popover;if(null!==i){let r=i.querySelector(er.elements.buttonAddToCartText);r.textContent=theme.translations.form_submit_error,i.setAttribute(er.attributes.disabled,er.attributes.disabled),setTimeout(()=>{i.removeAttribute(er.attributes.disabled),r.textContent=theme.translations.form_submit},1e3)}clearTimeout(this.popoverTimer),s&&(s.innerHTML=`<div class="popover-error">${e.message}: ${e.description}</div>`,s.classList.add(er.classes.visible)),t&&this.html.dispatchEvent(new CustomEvent("cart:add-to-error",{bubbles:!0,detail:{message:e.message,description:e.description,holder:t}})),this.popoverTimer=setTimeout(()=>{s.classList.remove(er.classes.visible)},er.times.closeDropdownAfter)}openCartDrawer(){this.popoverHide(),null===this.cart&&this.renderCart(),document.dispatchEvent(new CustomEvent("theme:drawer:close",{bubbles:!1})),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.cart})),this.setCartClosePosition(),this.body.classList.add(er.classes.cartVisible),this.cart.classList.add(er.classes.open),this.cartToggle.setAttribute(er.attributes.expanded,!0),this.accessibility.removeTrapFocus(),this.cartDrawerIsOpen=!0,this.cartFocusTimeout&&clearTimeout(this.cartFocusTimeout),this.cartFocusTimeout=setTimeout(()=>{this.accessibility.trapFocus(this.cart,{elementToFocus:this.cart.querySelector("a, button, input")})},500)}closeCartDrawer(){if(this.cartDrawerIsOpen=!1,document.dispatchEvent(new CustomEvent("theme:cart-close",{bubbles:!0})),this.accessibility.removeTrapFocus(),J(this.cartErrorHolder,400),this.body.classList.contains(er.classes.focused)){let e=document.querySelector(`${er.elements.cartToggleElement}`);setTimeout(()=>{e.focus()},200)}this.body.classList.remove(er.classes.cartVisible),this.cart.classList.remove(er.classes.open),this.cartToggle.setAttribute(er.attributes.expanded,!1),this.popoverHide(),this.scrollLockTimeout&&clearTimeout(this.scrollLockTimeout),this.scrollLockTimeout=setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))},500)}toggleCartDrawer(){this.body.classList.contains(er.classes.template)||(this.cartDrawerIsOpen?this.closeCartDrawer():this.openCartDrawer())}eventToggleCart(){document.addEventListener("click",e=>{let t=e.target,i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=t.matches(er.elements.cartToggleElement)||t.closest(er.elements.cartToggleElement),r=t.matches(er.elements.popover)||t.closest(er.elements.popover);i>theme.sizes.small&&(s||r)&&(this.toggleCartDrawer(),e.preventDefault())})}toggleClassesOnContainers(){this.emptyMessage.classList.toggle(er.classes.hidden,this.hasItemsInCart()),this.buttonHolder.classList.toggle(er.classes.hidden,!this.hasItemsInCart()),this.itemsHolder.classList.toggle(er.classes.hidden,!this.hasItemsInCart())}build(e){if(null===this.cart){this.renderCart();return}this.totalItems!==this.newTotalItems&&(this.totalItems=this.newTotalItems,this.toggleClassesOnContainers());let t=document.createElement("div");t.innerHTML=e,this.itemsHolder.innerHTML=t.querySelector(er.elements.apiContent).innerHTML,this.cartEvents(),this.initQuantity(this.ajaxEnabled)}updateCounter(e){e>0?this.cartToggle.classList.remove(er.classes.cartEmpty):this.cartToggle.classList.add(er.classes.cartEmpty),this.cartItemsCount&&(this.cartItemsCount.innerText=e<10?e:"9+")}hasItemsInCart(){return this.totalItems>0}buildTotalPrice(e){if(null!==this.cart){if(e.original_total_price>e.total_price&&e.cart_level_discount_applications.length>0?(this.cartOriginalTotal.classList.remove(er.classes.hidden),this.cartOriginaTotalPrice.innerHTML=t.formatMoney(e.original_total_price,er.formatMoney)):this.cartOriginalTotal.classList.add(er.classes.hidden),this.cartTotal.innerHTML=t.formatMoney(e.total_price,er.formatMoney),e.cart_level_discount_applications.length>0){let i=this.buildCartTotalDiscounts(e.cart_level_discount_applications);this.cartDiscountHolder.classList.remove(er.classes.hidden),this.cartDiscountHolder.innerHTML=i}else this.cartDiscountHolder.classList.add(er.classes.hidden)}}buildCartTotalDiscounts(e){let s="";
12return e.forEach(e=>{s+=i.render(this.cartTotalDiscountTemplate,{discount_title:e.title,discount_total_allocated_amount:t.formatMoney(e.total_allocated_amount,er.formatMoney)})}),s}setCartClosePosition(){if(this.cartToggle){let e=this.cartToggle.getBoundingClientRect().top;this.cartClose.style.top=`${e-40}px`}}cartBarProgress(){if(void 0===this.subtotal)return;let e=this.subtotal,i=t.formatMoney(this.cartFreeLimitShipping-this.subtotal,er.formatMoney);this.subtotal>0&&(e=er.dimensions.maxSize-(this.cartFreeLimitShipping-this.subtotal)*er.dimensions.maxSize/this.cartFreeLimitShipping),e>er.dimensions.maxSize&&(e=er.dimensions.maxSize,i="0"),this.progressBar.style.width=`${e}%`,this.leftToSpend&&(this.leftToSpend.innerHTML=i.replace(".00","")),this.checkForFreeDelivery()}checkForFreeDelivery(){let e=this.cartMessage.hasAttribute(er.elements.cartMessageValue)&&"true"===this.cartMessage.getAttribute(er.elements.cartMessageValue)&&0!==this.subtotal?"":er.classes.defaultSuccess;this.cartMessage.classList.toggle(e,this.subtotal>=this.cartFreeLimitShipping||0===this.subtotal)}};let ea={elements:{html:"html",body:"body",inPageLink:"[data-skip-content]",linkesWithOnlyHash:'a[href="#"]',triggerFocusElement:"[data-focus-element]",viewAll:"[data-view-all]"},classes:{focus:"is-focused"}};window.accessibility=new class{constructor(){this.init()}init(){this.settings=ea,this.window=window,this.document=document,this.a11y=G,this.inPageLink=this.document.querySelector(this.settings.elements.inPageLink),this.linkesWithOnlyHash=this.document.querySelectorAll(`${this.settings.elements.linkesWithOnlyHash}:not(${this.settings.elements.viewAll})`),this.html=this.document.querySelector(this.settings.elements.html),this.body=this.document.querySelector(this.settings.elements.body),this.lastFocused=null,this.isFocused=!1,this.a11y.focusHash(),this.a11y.bindInPageLinks(),this.clickEvents(),this.focusEvents(),this.focusEventsOff(),this.closeExpandedElements()}clickEvents(){this.inPageLink&&this.inPageLink.addEventListener("click",e=>{e.preventDefault()}),this.linkesWithOnlyHash&&this.linkesWithOnlyHash.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault()})})}focusEvents(){this.document.addEventListener("keyup",e=>{e.keyCode===theme.keyboardKeys.TAB&&(this.body.classList.add(this.settings.classes.focus),this.isFocused=!0)}),this.document.addEventListener("keyup",e=>{if(!this.isFocused)return;let t=e.target,i=e.keyCode===theme.keyboardKeys.ENTER||e.keyCode===theme.keyboardKeys.SPACE,s=t.matches(this.settings.elements.triggerFocusElement)||t.closest(this.settings.elements.triggerFocusElement);i&&s&&null===this.lastFocused&&(this.lastFocused=t)}),this.html.addEventListener("cart:add-item",e=>{this.lastFocused=e.detail.selector})}focusEventsOff(){this.document.addEventListener("mousedown",()=>{this.body.classList.remove(this.settings.classes.focus),this.isFocused=!1})}closeExpandedElements(){document.addEventListener("keyup",e=>{e.keyCode===theme.keyboardKeys.ESCAPE&&(this.a11y.removeTrapFocus(),null!==this.lastFocused&&setTimeout(()=>{this.lastFocused.focus(),this.lastFocused=null},600))})}},i.filters.define("handle",function(e){e=e.toLowerCase();for(var t=['"',"'","\\","(",")","[","]"],i=0;i<t.length;++i)e=e.replace(t[i],"");return"-"==(e=e.replace(/\W+/g,"-")).charAt(e.length-1)&&(e=e.replace(/-+\z/,"")),"-"==e.charAt(0)&&(e=e.replace(/\A-+/,"")),e}),i.filters.define("last",function(e){let t=e.split("-");return t[t.length-1]}),i.filters.define("asset_url",function(e){return theme.assets.image.replace("image",e)}),window.isYoutubeAPILoaded=!1,window.onYouTubeIframeAPIReady=function(){window.isYoutubeAPILoaded=!0,document.body.dispatchEvent(new CustomEvent("youtubeAPIReady"))},window.loadYoutubeAPI=function(){if(!window.isYoutubeAPILoaded){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}},theme.ProductModel=function(){let e={},t={},i={},s={productMediaWrapper:"[data-product-single-media-wrapper]",productXr:"[data-shopify-xr]",dataMediaId:"data-media-id",dataModelId:"data-model-id",dataModel3d:"data-shopify-model3d-id",modelViewer:"model-viewer",modelJson:"#ModelJson-",classMediaHidden:"media--hidden",deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]"},r={isLoading:"is-loading"};function a(a,n){if(a.querySelector(s.deferredMedia).getAttribute("loaded"))return;a.classList.add(r.isLoading);
12let l=document.createElement("div");l.appendChild(a.querySelector("template").content.firstElementChild.cloneNode(!0));let d=l.querySelector("model-viewer"),c=a.querySelector(s.deferredMedia);c.appendChild(d).focus(),c.setAttribute("loaded",!0);let h=a.dataset.mediaId,u=d.dataset.modelId,p=a.closest(s.productMediaWrapper).querySelector(s.productXr);i[n]={element:p,defaultId:u},t[h]={modelId:u,mediaId:h,sectionId:n,container:a,element:d},window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:function t(i){if(i){console.warn(i);return}if(!window.ShopifyXR){document.addEventListener("shopify_xr_initialized",function(){t()});return}for(let r in e)if(e.hasOwnProperty(r)){let a=e[r];if(a.loaded)continue;let o=document.querySelector(`${s.modelJson}${r}`);o&&(window.ShopifyXR.addModels(JSON.parse(o.innerHTML)),a.loaded=!0)}window.ShopifyXR.setupXRElements()}},{name:"model-viewer-ui",version:"1.0",onLoad:o},])}function o(e){if(e){console.warn(e);return}for(let i in t)if(t.hasOwnProperty(i)){let s=t[i];s.modelViewerUi||(s.modelViewerUi=new Shopify.ModelViewerUI(s.element)),n(s)}}function n(e){let t=i[e.sectionId];e.container.addEventListener("mediaVisible",function(){t.element.setAttribute(s.dataModel3d,e.modelId),l(e.mediaId),window.theme.touched||e.modelViewerUi.play()}),e.container.addEventListener("mediaHidden",function(){e.modelViewerUi.pause()}),e.container.addEventListener("xrLaunch",function(){e.modelViewerUi.pause()}),e.element.addEventListener("load",()=>{e.container.classList.remove(r.isLoading)}),e.element.addEventListener("shopify_model_viewer_ui_toggle_play",function(){l(e.mediaId)})}function l(e){let t=`[${s.dataMediaId}="${e}"]`,i=document.querySelector(`${s.productMediaWrapper}${t}`),r=document.querySelectorAll(`${s.productMediaWrapper}:not(${t})`);i.classList.remove(s.classMediaHidden),r.length&&r.forEach(e=>{e.dispatchEvent(new CustomEvent("mediaHidden")),e.classList.add(s.classMediaHidden)})}return{init:function(t,i){e[i]={loaded:!1};let r=t.querySelector(s.deferredMediaButton);r&&r.addEventListener("click",a.bind(this,t,i))},loadContent:a,removeSectionModels:function(i){for(let s in t)t.hasOwnProperty(s)&&t[s].sectionId===i&&delete t[s];delete e[i],delete theme.mediaInstances[i]}}}();let eo={templateAddresses:".template-customers-addresses",accountForm:"[data-form]",addressNewForm:"[data-form-new]",btnNew:"[data-button-new]",btnEdit:"[data-button-edit]",btnDelete:"[data-button-delete]",btnCancel:"[data-button-cancel]",dataFormId:"data-form-id",defaultConfirmMessage:"Are you sure you wish to delete this address?",editAddress:"data-form-edit",addressCountryNew:"AddressCountryNew",addressProvinceNew:"AddressProvinceNew",addressProvinceContainerNew:"AddressProvinceContainerNew",addressCountryOption:"[data-country-option]",addressCountry:"AddressCountry",addressProvince:"AddressProvince",addressProvinceContainer:"AddressProvinceContainer",notOptionalInputs:'input[type="text"]:not(.optional)'},en={hidden:"is-hidden",validation:"validation--showup"},el=document.querySelector(eo.templateAddresses);el&&new class{constructor(e){this.section=e,this.addressNewForm=this.section.querySelector(eo.addressNewForm),this.accountForms=this.section.querySelectorAll(eo.accountForm),this.init(),this.validate()}init(){if(this.addressNewForm){let e=this.section,t=this.addressNewForm;this.customerAddresses();let i=e.querySelectorAll(eo.btnNew);i.length&&i.forEach(e=>{e.addEventListener("click",function(i){i.preventDefault(),e.classList.add(en.hidden),t.classList.remove(en.hidden)})});let s=e.querySelectorAll(eo.btnEdit);s.length&&s.forEach(t=>{t.addEventListener("click",function(t){t.preventDefault();let i=this.getAttribute(eo.dataFormId);e.querySelector(`[${eo.editAddress}="${i}"]`).classList.toggle(en.hidden)})});let r=e.querySelectorAll(eo.btnDelete);r.length&&r.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();let t=this.getAttribute(eo.dataFormId);confirm(eo.defaultConfirmMessage)&&Shopify.postLink("/account/addresses/"+t,{parameters:{_method:"delete"}})})});let a=e.querySelectorAll(eo.btnCancel);
12a.length&&a.forEach(e=>{e.addEventListener("click",function(e){e.preventDefault(),this.closest(eo.accountForm).classList.add(en.hidden),document.querySelector(eo.btnNew).classList.remove(en.hidden)})})}}customerAddresses(){Shopify.CountryProvinceSelector&&new Shopify.CountryProvinceSelector(eo.addressCountryNew,eo.addressProvinceNew,{hideElement:eo.addressProvinceContainerNew});this.section.querySelectorAll(eo.addressCountryOption).forEach(e=>{let t=e.getAttribute(eo.dataFormId),i=`${eo.addressCountry}_${t}`,s=`${eo.addressProvince}_${t}`,r=`${eo.addressProvinceContainer}_${t}`;new Shopify.CountryProvinceSelector(i,s,{hideElement:r})})}validate(){this.accountForms.forEach(e=>{let t=e.querySelector("form"),i=t.querySelectorAll(eo.notOptionalInputs);t.addEventListener("submit",e=>{let t=!1;i.forEach(e=>{e.value?e.nextElementSibling.classList.remove(en.validation):(e.nextElementSibling.classList.add(en.validation),t=!0)}),t&&e.preventDefault()})})}}(el);let ed={form:"[data-account-form]",showReset:"[data-show-reset]",hideReset:"[data-hide-reset]",recover:"[data-recover-password]",login:"[data-login-form]",recoverHash:"#recover"},ec={hidden:"is-hidden"},eh=document.querySelector(ed.form);eh&&new class{constructor(e){this.form=e,this.showButton=e.querySelector(ed.showReset),this.hideButton=e.querySelector(ed.hideReset),this.recover=e.querySelector(ed.recover),this.login=e.querySelector(ed.login),this.init()}init(){window.location.hash==ed.recoverHash?this.showRecoverPasswordForm():this.hideRecoverPasswordForm(),this.showButton.addEventListener("click",(function(e){e.preventDefault(),this.showRecoverPasswordForm()}).bind(this),!1),this.hideButton.addEventListener("click",(function(e){e.preventDefault(),this.hideRecoverPasswordForm()}).bind(this),!1)}showRecoverPasswordForm(){return this.recover.classList.remove(ec.hidden),this.login.classList.add(ec.hidden),window.location.hash=ed.recoverHash,!1}hideRecoverPasswordForm(){return this.login.classList.remove(ec.hidden),this.recover.classList.add(ec.hidden),window.location.hash="",!1}}(eh),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||[];let eu=window.Shopify.theme.sections.registered,ep=window.Shopify.theme.sections.instances,em={id:"data-section-id",type:"data-section-type"};class ef{constructor(e=null,t=[]){this.type=e,this.components=function(e){if(void 0!==e&&"object"!=typeof e||null===e)throw 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(let[t,i]of Object.entries(e)){let 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 eg{constructor(e,t){this.container=function(e){if(!(e instanceof Element))throw TypeError("Theme Sections: Attempted to load section. The section container provided is not a DOM element.");if(null===e.getAttribute(em.id))throw Error("Theme Sections: The section container provided does not have an id assigned to the "+em.id+" attribute.");return e}(e),this.id=e.getAttribute(em.id),this.type=t.type,this.callStack=t.getStack();try{this.onLoad()}catch(i){console.warn(`Error in section: ${this.id}`),console.warn(this),console.warn(i)}}callFunctions(e,t=null){this.callStack[e].forEach(e=>
12{let i={id:this.id,type:this.type,container:this.container};t?e.call(i,t):e.call(i)})}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 ey(e,t){if("string"!=typeof e)throw TypeError("Theme Sections: The first argument for .register must be a string that specifies the type of the section being registered");if(void 0!==eu[e])throw 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]);let i=new ef(e,t);return eu[e]=i,eu}function ev(e,t){e=eL(e),void 0===t&&(t=document.querySelectorAll("["+em.type+"]")),t=ew(t),e.forEach(function(e){let i=eu[e];void 0!==i&&(t=t.filter(function(t){var s;return s=t,!(eb(s).length>0)&&null!==t.getAttribute(em.type)&&(t.getAttribute(em.type)!==e||(ep.push(new eg(t,i)),!1))}))})}function eb(e){var t=[];if(NodeList.prototype.isPrototypeOf(e)||Array.isArray(e))var i=e[0];return e instanceof Element||i instanceof Element?ew(e).forEach(function(e){t=t.concat(ep.filter(function(t){return t.container===e}))}):("string"==typeof e||"string"==typeof i)&&eL(e).forEach(function(e){t=t.concat(ep.filter(function(t){return t.type===e}))}),t}function eE(e){for(var t,i=0;i<ep.length;i++)if(ep[i].id===e){t=ep[i];break}return t}function eL(e){return"*"===e?e=Object.keys(eu):"string"==typeof e?e=[e]:e.constructor===eg?e=[e.prototype.type]:Array.isArray(e)&&e[0].constructor===eg&&(e=e.map(function(e){return e.type})),e=e.map(function(e){return e.toLowerCase()})}function ew(e){return NodeList.prototype.isPrototypeOf(e)&&e.length>0?e=Array.prototype.slice.call(e):NodeList.prototype.isPrototypeOf(e)&&0===e.length?e=[]: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,i=e.target.querySelector("["+em.id+'="'+t+'"]');null!==i&&ev(i.getAttribute(em.type),i)}),document.addEventListener("shopify:section:reorder",function(e){var t=e.detail.sectionId,i=e.target.querySelector("["+em.id+'="'+t+'"]');"object"==typeof eb(i)[0]&&function(e){eb(e).forEach(function(e){e.onReorder()})}(i)}),document.addEventListener("shopify:section:unload",function(e){var t=e.detail.sectionId,i=e.target.querySelector("["+em.id+'="'+t+'"]');"object"==typeof eb(i)[0]&&function(e){eb(e).forEach(function(e){var t=ep.map(function(e){return e.id}).indexOf(e.id);ep.splice(t,1),e.onUnload()})}(i)}),document.addEventListener("shopify:section:select",function(e){var t=eE(e.detail.sectionId);"object"==typeof t&&t.onSelect(e)}),document.addEventListener("shopify:section:deselect",function(e){var t=eE(e.detail.sectionId);"object"==typeof t&&t.onDeselect(e)}),document.addEventListener("shopify:block:select",function(e){var t=eE(e.detail.sectionId);"object"==typeof t&&t.onBlockSelect(e)}),document.addEventListener("shopify:block:deselect",function(e){var t=eE(e.detail.sectionId);"object"==typeof t&&t.onBlockDeselect(e)}));let eS={aos:"data-aos"},ek=e=>{e.querySelectorAll(`[${eS.aos}]`).forEach(e=>{e.removeAttribute(eS.aos)})},eq={flag:"[data-badge]",aspectRatio:"data-aspectratio"},eA=e=>{e.forEach(e=>{let t=e.querySelector(eq.flag);if(null===t)return;let i=parseFloat(e.getAttribute(eq.aspectRatio)),s=e.offsetWidth,r=e.offsetHeight,a=0,o=0;i<s/r?o=(s-r*i)/2:a=(r-s/i)/2,t.style.cssText=`top: ${a}px; left: ${o}px`})};function eT(e){let t=`${theme.routes.root_url}products/${e}.js`;return window.fetch(t).then(e=>e.json()).catch(e=>{console.error(e)})}let eC={swatch:"data-swatch",swatchColor:"[data-swatch-color]",wrapper:"[data-grid-swatches]",template:"[data-swatch-template]",handle:"data-swatch-handle",label:"data-swatch-label"};class e${constructor(e){this.element=e,this.swatchColor=this.element.querySelector(eC.swatchColor),this.colorString=e.getAttribute(eC.swatch);new class{constructor(e={}){this.settings={color:"ash",...e},this.match=this.init()}getColor(){return this.match}init(){return q({json: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,r=theme.assets.base||"/",a=t.toLowerCase().replace(/\s/g,""),o=e.colors;if(o){let n=null;if(o.filter((e,t)=>
12{if(Object.keys(e).toString().toLowerCase().replace(/\s/g,"")===a)return n=t,e}).length&&null!==n){let l=Object.values(o[n])[0];i=l,(l.includes(".jpg")||l.includes(".jpeg")||l.includes(".png")||l.includes(".svg"))&&(s=`${r}${l}`,i="#888888")}}return{color:this.settings.color,path:s,hex:i}}}({color:this.colorString}).getColor().then(e=>{this.colorMatch=e,this.init()})}init(){this.colorMatch&&this.colorMatch.hex&&this.swatchColor.style.setProperty("--swatch",`${this.colorMatch.hex}`),this.colorMatch&&this.colorMatch.path&&this.swatchColor.style.setProperty("background-image",`url(${this.colorMatch.path})`)}}class ex{constructor(e,t){this.template=document.querySelector(eC.template).innerHTML,this.wrap=e,this.container=t,this.handle=e.getAttribute(eC.handle);let i=e.getAttribute(eC.label).trim().toLowerCase();eT(this.handle).then(e=>{this.product=e,this.colorOption=e.options.find(function(e){return e.name.toLowerCase()===i||null}),this.colorOption&&(this.swatches=this.colorOption.values,this.init())})}init(){this.wrap.innerHTML="",this.swatches.forEach(e=>{let t=this.product.variants.find(t=>t.options.includes(e));t&&(this.wrap.innerHTML+=i.render(this.template,{color:e,uniq:`${this.product.id}-${t.id}`,variant:t.id,variantUrl:`${this.product.url}?variant=${t.id}`}))}),this.swatchElements=this.wrap.querySelectorAll(`[${eC.swatch}]`),this.swatchElements.forEach(e=>{new e$(e)})}}let eI=e=>{e.querySelectorAll(eC.wrapper).forEach(e=>{new ex(e,void 0)})},eP={onLoad(){this.swatches=[];this.container.querySelectorAll(`[${eC.swatch}]`).forEach(e=>{this.swatches.push(new e$(e))})}},eM={onLoad(){eI(this.container)}},e8=(e,t)=>{let i,s;return function r(...a){let o=Date.now();s=clearTimeout(s),!i||o-i>=t?(e.apply(null,a),i=o):s=setTimeout(r.bind(null,...a),t-(o-i))}},eH={itemsParent:"[data-custom-scrollbar-items]",scrollbar:"[data-custom-scrollbar]",scrollbarTrack:"[data-custom-scrollbar-track]"};class e_{constructor(e){this.itemsParent=e.querySelector(eH.itemsParent),this.scrollbar=e.querySelector(eH.scrollbar),this.scrollbarTrack=e.querySelector(eH.scrollbarTrack),this.trackWidth=0,this.scrollEvent=e8(()=>this.calculatePosition(),50),this.resizeEvent=g(()=>this.calculateTrackWidth(),250),this.scrollbar&&this.itemsParent&&(this.events(),this.calculateTrackWidth())}events(){this.itemsParent.addEventListener("scroll",this.scrollEvent),document.addEventListener("theme:resize",this.resizeEvent)}calculateTrackWidth(){this.trackWidth=100/this.itemsParent.children.length,this.trackWidth=this.trackWidth<5?5:this.trackWidth,this.scrollbar.style.setProperty("--track-width",`${this.trackWidth}%`)}calculatePosition(){let e=this.scrollbar.clientWidth*((100-this.trackWidth)/100),t=this.itemsParent.scrollLeft/(this.itemsParent.scrollWidth-this.itemsParent.clientWidth);t*=e,this.scrollbar.style.setProperty("--position",`${Math.round(t)}px`)}destroy(){this.itemsParent.removeEventListener("scroll",this.scrollEvent),document.removeEventListener("theme:resize",this.resizeEvent)}}let eB={productContainer:"[data-product-container]",productSlideshow:"[data-product-slideshow]",productImage:"[data-product-single-media-wrapper]",productThumbs:"[data-product-single-media-thumbs]",productThumb:"[data-thumbnail]",productThumbLink:"[data-thumbnail-id]",deferredMediaButton:"[data-deferred-media-button]",mediaType:"data-type",id:"data-id",tabIndex:"tabindex",arrows:"data-arrows",dots:"data-dots"},eF={active:"active",sliderEnabled:"flickity-enabled",scrollable:"product--layout-scrollable",mediaHidden:"media--hidden",focusEnabled:"is-focused",thumbsArrows:"product__images__slider-nav--arrows",isMoving:"is-moving"};class ez{constructor(e){this.container=e.container,this.productContainer=this.container.querySelector(eB.productContainer),this.scrollable=this.productContainer.classList.contains(eF.scrollable),this.slideshow=this.container.querySelector(eB.productSlideshow),this.productImages=this.container.querySelectorAll(eB.productImage),this.thumbs=this.container.querySelector(eB.productThumbs),this.flkty=null,this.flktyNav=null,this.sliderResizeEvent=g(()=>this.flickityResizeEvent(),250),this.thumbsResizeEvent=g(()=>this.checkThumbsWidth(),250),this.scrollableResizeEvent=g(()=>this.toggleCustomScrollbar(),250),this.productImages.length>1&&this.init()}init(){this.createSlider(),this.createSliderNav(),this.createScrollable()}
12createSlider(){if(!this.slideshow)return;let e=this,t=this.slideshow.querySelectorAll(`[${eB.mediaType}]`)[0],i="true"===this.slideshow.getAttribute(eB.arrows),s="true"===this.slideshow.getAttribute(eB.dots),a={autoPlay:!1,arrowShape:theme.icons.arrowNavSlider,prevNextButtons:i,contain:!0,pageDots:s,adaptiveHeight:!0,wrapAround:!0,resize:!1};if(this.flkty=new r(this.slideshow,a),t){let o=t.getAttribute(eB.mediaType);this.flkty.options.draggable=!1,this.flkty.updateDraggable(),("model"===o||"video"===o||"external_video"===o)&&(this.flkty.options.draggable=!1,this.flkty.updateDraggable())}this.flkty.on("dragStart",function(){e.slideshow.classList.add(eF.isMoving),document.ontouchmove=e=>e.preventDefault()}),this.flkty.on("dragEnd",()=>document.ontouchmove=()=>!0),this.flkty.on("change",function(e){let t=this.cells[e].element,i=this.selectedElement;t.dispatchEvent(new CustomEvent("mediaHidden")),i.classList.remove(eF.mediaHidden)}),this.flkty.on("settle",function(){let t=this.selectedElement;t.getAttribute(eB.mediaType),e.flkty.options.draggable=!1,e.flkty.updateDraggable(),e.switchMedia(t),e.slideshow.classList.remove(eF.isMoving),e.flkty.resizeQueued&&(e.flkty.resizeQueued=!1,e.flkty.onresize()),e.flkty.options.draggable=!1,e.flkty.updateDraggable()}),window.addEventListener("resize",this.sliderResizeEvent)}createSliderNav(){if(!this.thumbs||!this.slideshow)return;let e={asNavFor:this.slideshow,pageDots:!1,prevNextButtons:!0,arrowShape:theme.icons.arrowNavSlider,groupCells:!0,contain:!0,resize:!1};this.flktyNav=new r(this.thumbs,e),this.flktyNav.on("dragStart",()=>document.ontouchmove=e=>e.preventDefault()),this.flktyNav.on("dragEnd",()=>document.ontouchmove=()=>!0),this.flktyNav.on("settle",()=>{this.flktyNav.resizeQueued&&(this.flktyNav.resizeQueued=!1,this.flktyNav.onresize())}),this.checkThumbsWidth(),window.addEventListener("resize",this.thumbsResizeEvent),this.thumbs.querySelectorAll(eB.productThumbLink).forEach(e=>{e.addEventListener("click",e=>{e.preventDefault()})})}checkThumbsWidth(){let e=this.thumbs.querySelectorAll(eB.productThumb),t=2*parseInt(window.getComputedStyle(this.thumbs).paddingLeft.replace("px","")),i=this.thumbs.offsetWidth-t,s=0;e.forEach(e=>{s+=e.offsetWidth}),i<s?this.thumbs.classList.add(eF.thumbsArrows):this.thumbs.classList.remove(eF.thumbsArrows)}flickityResizeEvent(){this.flkty&&(this.flkty.isAnimating?this.flkty.resizeQueued=!0:this.flkty.onresize()),this.flktyNav&&(this.flktyNav.isAnimating?this.flktyNav.resizeQueued=!0:this.flktyNav.onresize())}createScrollable(){this.scrollable&&(this.toggleCustomScrollbar(),window.addEventListener("resize",this.scrollableResizeEvent))}toggleCustomScrollbar(){window.innerWidth<window.theme.sizes.small?this.customScrollbar=new e_(this.container):this.customScrollbar&&this.customScrollbar.destroy()}switchMedia(e){let t=Array.prototype.filter.call(e.parentNode.children,function(t){return t!==e});document.body.classList.contains(eF.focusEnabled)&&e.dispatchEvent(new Event("focus")),t.length&&t.forEach(e=>{e.classList.add(eF.mediaHidden),e.dispatchEvent(new CustomEvent("mediaHidden"))}),e.classList.remove(eF.mediaHidden),e.dispatchEvent(new CustomEvent("mediaVisible"));let i=e.querySelector("deferred-media");i&&!0!==i.getAttribute("loaded")&&e.querySelector(eB.deferredMediaButton).dispatchEvent(new Event("click",{bubbles:!1}))}}let eW={productContainer:"[data-product-container]",productSlideshow:"[data-product-slideshow]",zoomWrapper:"[data-zoom-wrapper]",dataImageSrc:"data-image-src",dataImageWidth:"data-image-width",dataImageHeight:"data-image-height",dataImageZoomEnable:"data-lightbox"},eV={popupClass:"pswp-zoom-gallery",popupClassNoThumbs:"pswp-zoom-gallery--single",isMoving:"is-moving"};class e9{constructor(e){this.container=e.container,this.productContainer=this.container.querySelector(eW.productContainer),this.slideshow=this.container.querySelector(eW.productSlideshow),this.zoomWrappers=this.container.querySelectorAll(eW.zoomWrapper),this.zoomEnable="true"===this.productContainer.getAttribute(eW.dataImageZoomEnable),this.zoomEnable&&this.init()}
12init(){this.zoomWrappers.length&&this.zoomWrappers.forEach((e,t)=>{e.addEventListener("click",e=>{e.preventDefault();this.slideshow&&this.slideshow.classList.contains(eV.isMoving)||this.createZoom(t)}),e.addEventListener("keyup",e=>{e.keyCode===theme.keyboardKeys.ENTER&&(e.preventDefault(),this.createZoom(t))})})}createZoom(e){let t=this,i=[],s=0;this.zoomWrappers.forEach(r=>{let a=r.getAttribute("href"),o=parseInt(r.getAttribute(eW.dataImageWidth)),n=parseInt(r.getAttribute(eW.dataImageHeight));if(i.push({src:a,w:o,h:n,msrc:a}),s+=1,t.zoomWrappers.length===s){let l=`${eV.popupClass}`;1===s&&(l=`${eV.popupClass} ${eV.popupClassNoThumbs}`);P(i,{barsSize:{top:0,bottom:"auto"},history:!1,focus:!1,index:e,mainClass:l,showHideOpacity:!0,showAnimationDuration:250,hideAnimationDuration:250,closeOnScroll:!1,closeOnVerticalDrag:!1,captionEl:!1,closeEl:!0,closeElClasses:["caption-close"],tapToClose:!1,clickToCloseNonZoomable:!1,maxSpreadZoom:2,loop:!0,spacing:0,allowPanToNext:!0,pinchToClose:!1})}})}}let eD={html5:"html5",youtube:"youtube"},eO={deferredMedia:"[data-deferred-media]",deferredMediaButton:"[data-deferred-media-button]",productMediaWrapper:"[data-product-single-media-wrapper]",productMediaSlider:"[data-product-single-media-slider]",mediaContainer:"[data-video]",mediaId:"data-media-id"},eN={mediaHidden:"media--hidden"};theme.mediaInstances={};class eR{constructor(e){this.section=e,this.container=e.container,this.id=e.id,this.players={},this.init()}init(){this.container.querySelectorAll(eO.mediaContainer).forEach(e=>{let t=e.querySelector(eO.deferredMediaButton);t&&t.addEventListener("click",this.loadContent.bind(this,e))})}loadContent(e){if(e.querySelector(eO.deferredMedia).getAttribute("loaded"))return;let t=document.createElement("div");t.appendChild(e.querySelector("template").content.firstElementChild.cloneNode(!0));let i=e.dataset.mediaId,s=t.querySelector("video, iframe"),r=this.hostFromVideoElement(s),a=e.querySelector(eO.deferredMedia);a.appendChild(s).focus(),a.setAttribute("loaded",!0),this.players[i]={mediaId:i,sectionId:this.id,c
12ontainer:e,element:s,host:r,ready:()=>{this.createPlayer(i)}};let o=this.players[i];switch(o.host){case eD.html5:this.loadVideo(o,eD.html5);break;case eD.youtube:window.isYoutubeAPILoaded?this.loadVideo(o,eD.youtube):q({url:"https://www.youtube.com/iframe_api"}).then(()=>this.loadVideo(o,eD.youtube))}}hostFromVideoElement(e){return"VIDEO"===e.tagName?eD.html5:"IFRAME"===e.tagName&&/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(e.src)?eD.youtube:null}loadVideo(e,t){e.host===t&&e.ready()}createPlayer(e){let t=this.players[e],i=t.container.dataset.enableVideoLooping;switch(t.host){case eD.html5:t.element.play(),t.element.addEventListener("play",()=>{this.pauseOtherMedia(e)}),t.container.addEventListener("mediaHidden",e=>this.onHidden(e)),t.container.addEventListener("xrLaunch",e=>this.onHidden(e)),t.container.addEventListener("mediaVisible",e=>this.onVisible(e)),this.observeVideo(t);break;case eD.youtube:if(t.host==eD.youtube&&t.player)return;YT.ready(()=>{let s=t.container.dataset.videoId;this.players[e].player=new YT.Player(t.element,{videoId:s,events:{onReady(e){e.target.playVideo()},onStateChange:t=>{0===t.data&&i&&t.target.seekTo(0),1===t.data&&this.pauseOtherMedia(e),t.data}}}),window.isYoutubeAPILoaded=!0,t.container.addEventListener("mediaHidden",e=>this.onHidden(e)),t.container.addEventListener("xrLaunch",e=>this.onHidden(e)),t.container.addEventListener("mediaVisible",e=>this.onVisible(e)),this.observeVideo(t)})}}observeVideo(e){new IntersectionObserver((t,i)=>{t.forEach(t=>{1!=t.intersectionRatio?this.pauseVideo(e):this.playVideo(e)})},{threshold:1}).observe(e.element)}playVideo(e){e.player&&e.player.playVideo?e.player.playVideo():e.element&&e.element.play&&e.element.play()}pauseVideo(e){e.player&&e.player.pauseVideo?e.player.pauseVideo():e.element&&e.element.pause&&e.element.pause()}onHidden(e){if(void 0!==e.target.dataset.mediaId){let t=e.target.dataset.mediaId,i=this.players[t];this.pauseVideo(i)}}onVisible(e){if(void 0!==e.target.dataset.mediaId){let t=e.target.dataset.mediaId,i=this.players[t];this.playVideo(i)}}pauseOtherMedia(e){let t=`[${eO.mediaId}="${e}"]`,i=document.querySelector(`${eO.productMediaWrapper}${t}`),s=document.querySelectorAll(`${eO.productMediaWrapper}:not(${t})`);i.classList.remove(eN.mediaHidden),s.length&&s.forEach(e=>{e.dispatchEvent(new CustomEvent("mediaHidden")),e.classList.add(eN.mediaHidden)})}}theme.mediaInstances={};let ej={videoPlayer:"[data-video]",modelViewer:"[data-model]",sliderEnabled:"flickity-enabled",classMediaHidden:"media--hidden"};class eU{constructor(e){this.section=e,this.id=e.id,this.container=e.container}init(){this.detect3d(),this.launch3d(),new eR(this.section),new e9(this.section),new ez(this.section)}detect3d(){let e=this.container.querySelectorAll(ej.modelViewer);e.length&&e.forEach(e=>{theme.ProductModel.init(e,this.id)})}launch3d(){let e=this;document.addEventListener("shopify_xr_launch",function(){e.container.querySelector(`${ej.modelViewer}:not(.${ej.classMediaHidden})`).dispatchEvent(new CustomEvent("xrLaunch"))})}}let e0=e=>{e&&(e.style.display="none")},e3={list:"[data-store-availability-list]"};class eQ{constructor(e,t){if(this.modal=document.getElementById(e),this.accessibility=G,!this.modal)return!1;this.nodes={parents:[document.querySelector("html"),document.body]},this.config=Object.assign({close:".js-modal-close",open:".js-modal-open-store-availability-modal",openClass:"modal--is-active",openBodyClass:"modal--is-visible",closeModalOnClick:!1},t),this.modalIsOpen=!1,this.focusOnOpen=this.config.focusOnOpen?document.getElementById(this.config.focusOnOpen):this.modal,this.openElement=document.querySelector(this.config.open),this.init()}init(){this.openElement.addEventListener("click",this.open.bind(this)),this.modal.querySelector(this.config.close).addEventListener("click",this.closeModal.bind(this))}open(e){var t=this,i=!1;this.modalIsOpen||(e?e.preventDefault():i=!0,e&&e.stopPropagation&&e.stopPropagation(),this.modalIsOpen&&!i&&this.closeModal(),this.modal.classList.add(this.config.openClass),this.nodes.parents.forEac
12h(function(e){e.classList.add(t.config.openBodyClass)}),this.modalIsOpen=!0,this.scrollableElement=document.querySelector(e3.list),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.scrollableElement})),this.accessibility.trapFocus(this.modal),this.bindEvents())}closeModal(){if(this.modalIsOpen){document.activeElement.blur(),this.modal.classList.remove(this.config.openClass);var e=this;document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),this.nodes.parents.forEach(function(t){t.classList.remove(e.config.openBodyClass)}),this.modalIsOpen=!1,this.accessibility.removeTrapFocus(),this.openElement.focus(),this.unbindEvents()}}bindEvents(){this.keyupHandler=this.keyupHandler.bind(this),this.clickHandler=this.clickHandler.bind(this),document.body.addEventListener("keyup",this.keyupHandler),document.body.addEventListener("click",this.clickHandler)}unbindEvents(){document.body.removeEventListener("keyup",this.keyupHandler),document.body.removeEventListener("click",this.clickHandler)}keyupHandler(e){27===e.keyCode&&this.closeModal()}clickHandler(e){this.config.closeModalOnClick&&!this.modal.contains(e.target)&&this.closeModal()}}let e1={body:"body",storeAvailabilityModal:"[data-store-availability-modal]",storeAvailabilityModalOpen:"[data-store-availability-modal-open]",storeAvailabilityModalClose:"[data-store-availability-modal-close]",storeAvailabilityModalProductTitle:"[data-store-availability-modal-product-title]"},eK={openClass:"store-availabilities-modal--active",hidden:"visually-hidden"};class e2{constructor(e){this.container=e}updateContent(e,t){this._fetchStoreAvailabilities(e,t)}clearContent(){this.container.innerHTML=""}_initModal(){return new eQ("StoreAvailabilityModal",{close:e1.storeAvailabilityModalClose,open:e1.storeAvailabilityModalOpen,closeModalOnClick:!0,openClass:eK.openClass})}_fetchStoreAvailabilities(e,t){let i=`/variants/${e}/?section_id=store-availability`;this.clearContent();let s=this;fetch(i).then(function(e){return e.text()}).then(function(e){if(""===e.trim())return;let i=document.querySelector(e1.body),r=i.querySelector(e1.storeAvailabilityModal);r&&r.remove(),s.container.innerHTML=e,s.container.innerHTML=s.container.firstElementChild.innerHTML;s.container.querySelector(e1.storeAvailabilityModalOpen)&&(s.modal=s._initModal(),s._updateProductTitle(t),(r=s.container.querySelector(e1.storeAvailabilityModal))&&i.appendChild(r))})}_updateProductTitle(e){this.container.querySelector(e1.storeAvailabilityModalProductTitle).textContent=e}}function e7(){this.entries=[]}function eX(e){if("object"!=typeof e)throw TypeError(e+" is not an object.");if(0===Object.keys(e).length&&e.constructor===Object)throw Error(e+" is empty.")}e7.prototype.add=function(e,t,i){this.entries.push({element:e,event:t,fn:i}),e.addEventListener(t,i)},e7.prototype.removeAll=function(){this.entries=this.entries.filter(function(e){return e.element.removeEventListener(e.event,e.fn),!1})};var e4={idInput:'[name="id"]',optionInput:'[name^="options"]',quantityInput:'[name="quantity"]',propertyInput:'[name^="properties"]'};function e6(e,t,i){this.element=e,this.product=function e(t){if("object"!=typeof t)throw TypeError(t+" is not an object.");if(void 0===t.variants[0].options)throw 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 t}(t),i=i||{},this._listeners=new e7,this._listeners.add(this.element,"submit",this._onSubmit.bind(this,i)),this.optionInputs=this._initInputs(e4.optionInput,i.onOptionChange),this.propertyInputs=this._initInputs(e4.propertyInput,i.onPropertyChange)}function eY(e,t){return e.reduce(function(e,i){return(i.checked||"radio"!==i.type&&"checkbox"!==i.type)&&e.push(t({name:i.name,value:i.value})),e},[])}e6.prototype.destroy=function(){this._listeners.removeAll()},e6.prototype.options=function(){return eY(this.optionInputs,function(e){return e.name=/(?:^(options\[))(.*?)(?:\])/.exec(e.name)[2],e})},e6.prototype.variant=function(){var e,t,i,s,r,a,o,n;return e=this.product,t=this.options(),eX(e),i=(s=e,r=t,eX(s),function e(t){if(!Array.isArray(t))throw TypeError(t+" is not an array.");if(0===t.length)throw Error(t+" is empty.");if(t[0].hasOwnProperty("name")){if("string"!=typeof t[0].name)throw TypeError("Invalid value type passed for name of option "+t[0].name+". Value should be string.")}else throw Error(t[0]+"does not contain name key.")}(r),a=[],r.forEach(function(e){for(var t=0;t<s.options.length;t++)if((s.options[t].name||s.options[t]).toLowerCase()===e.name.toLowerCase()){a[t]=e.value;break}}),a),o=e,n=i,eX(o),function e(t){if(Array.isArray(t)&&"object"==typeof t[0])throw Error(t+"is not a valid array of options.")}(n),o.variants.filter(function(e){return n.every(function(t,i){return e.options[i]===t})})[0]||null},e6.prototype.properties=function(){return eY(this.propertyInput
12s,function(e){return e.name=/(?:^(properties\[))(.*?)(?:\])/.exec(e.name)[2],e})},e6.prototype.quantity=function(){return this.quantityInputs[0]?Number.parseInt(this.quantityInputs[0].value,10):1},e6.prototype._setIdInputValue=function(e){var t=this.element.querySelector(e4.idInput);t||((t=document.createElement("input")).type="hidden",t.name="id",this.element.appendChild(t)),t.value=e.toString()},e6.prototype._onSubmit=function(e,t){t.dataset=this._getProductFormEventData(),this._setIdInputValue(t.dataset.variant.id),e.onFormSubmit&&e.onFormSubmit(t)},e6.prototype._onFormEvent=function(e){return void 0===e?Function.prototype:(function(t){t.dataset=this._getProductFormEventData(),e(t)}).bind(this)},e6.prototype._initInputs=function(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))},e6.prototype._getProductFormEventData=function(){return{options:this.options(),variant:this.variant(),properties:this.properties()}};let e5={product:"[data-product-container]",productForm:"[data-product-form-container]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",comparePrice:"[data-compare-price]",originalSelectorId:"[data-product-select]",priceWrapper:"[data-price-wrapper]",productSlideshow:"[data-product-slideshow]",productImagesScroller:"[data-custom-scrollbar-items]",productImage:"[data-product-single-media-wrapper]",productJson:"[data-product-json]",productPrice:"[data-product-price]",unitPrice:"[data-product-unit-price]",unitBase:"[data-product-base]",unitWrapper:"[data-product-unit]",storeAvailabilityContainer:"[data-store-availability-container]",preOrderTag:"_preorder",dataImageId:"data-id",idInput:'[name="id"]',notificationForm:"[data-notification-form]",colorLabel:"[data-color-label]",dataOption:"[data-option]",showQuantity:"[data-show-quantity]",shopBarImageActive:"[data-shop-bar-image-active]",shopBarImageActiveAttr:"data-shop-bar-image-active",variantId:"[data-variant-id]",variantIdAttr:"data-variant-id"},eG={hiddenPrice:"product__price--hidden",visuallyHidden:"visually-hidden",hidden:"hidden",productPriceSale:"product__price--sale",scrollable:"product--layout-scrollable",sliderEnabled:"flickity-enabled",onboarding:"onboarding-product",shopBarImageShown:"shop-bar__image--shown"};class eJ{constructor(e){if(this.section=e,this.container=e.container,this.product=this.container.querySelector(e5.product),this.onboarding=this.product.classList.contains(eG.onboarding),this.scrollable=this.product.classList.contains(eG.scrollable),this.storeAvailabilityContainer=this.container.querySelector(e5.storeAvailabilityContainer),!this.product||this.onboarding)return;this.productForm=this.container.querySelector(e5.productForm),this.product.querySelector(e5.showQuantity)&&new es(this.container).init(),this.init(),this.hasUnitPricing=this.container.querySelector(e5.unitWrapper)}init(){let e=null,t=this.container.querySelector(e5.productJson);if(t&&(e=t.innerHTML),e?(this.productJSON=JSON.parse(e),this.linkForm()):console.error("Missing product JSON"),this.storeAvailabilityContainer){this.storeAvailability=new e2(this.storeAvailabilityContainer);let i=this.productForm.product.variants[0].id;this.productForm.product.variants.length>1&&(i=this.productForm.variant().id),this.storeAvailability.updateContent(i,this.productForm.product.title)}}destroy(){this.productForm.destroy()}linkForm(){this.productForm=new e6(this.productForm,this.productJSON,{onOptionChange:this.onOptionChange.bind(this)})}onOptionChange(e){this.updateAddToCartState(e),this.updateProductImage(e),this.updateProductPrices(e),this.updateColorName(e),this.updateHiddenSelect(e),this.updateShopBarImage(e),this.storeAvailability&&this.updateStoreAvailability(e),this.updateOptionText(e)}updateHiddenSelect(e){let t=e.dataset.variant;if(t){let i=this.container.querySelector(e5.idInput);i||((i=document.createElement("input")).type="hidden",i.name="id",this.element.appendChild(i)),i.value=t.id.toString(),i.dispatchEvent(new Event("change",{bubbles:!0}))}}updateOptionText(e){let t=e.dataset.variant.title.split(" / "),i=document.querySelectorAll(".variant-text-section");for(let s=0;s<i.length;s++)i[s].innerText=t[s]}updateAddToCartState(e){let t=e.dataset.variant,i=this.container.querySelectorAll(e5.notificationForm),s=this.container.querySelectorAll(e5.addToCart),r=this.container.querySelectorAll(e5.addToCartText),a=this.container.querySelectorAll(e5.originalSelectorId),o=theme.translations.add_to_cart;this.productJSON.tags.includes(e5.preOrderTag)&&(o=theme.translations.pre_order),i.length&&i.forEac
12h(e=>{t&&t.available?e.classList.add(eG.hidden):e.classList.remove(eG.hidden)}),s.length&&s.forEach(e=>{t&&t.available?e.disabled=!1:e.disabled=!0}),r.length&&r.forEach(e=>{t?t.available?e.innerHTML=o:e.innerHTML=theme.translations.sold_out:e.innerHTML=theme.translations.unavailable}),a&&t&&a.forEach(e=>{e.value=t.id})}updateStoreAvailability(e){e.dataset.variant?this.storeAvailability.updateContent(e.dataset.variant.id,e.dataset.variant.title):this.storeAvailability.clearContent()}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}updateProductPrices(e){let i=e.dataset.variant,s=this.container.querySelectorAll(e5.priceWrapper);console.log(i),s.forEach(e=>{let s=e.querySelector(e5.comparePrice),r=e.querySelector(e5.productPrice);i?(e.classList.remove(eG.hiddenPrice),r.innerHTML=t.formatMoney(i.price,moneyFormat).replace("USD","")):e.classList.add(eG.hiddenPrice),i&&i.compare_at_price>i.price?(s.innerHTML=t.formatMoney(i.compare_at_price,moneyFormat).replace("USD",""),s.classList.remove(eG.visuallyHidden),r.classList.add(eG.productPriceSale)):s&&(s.innerHTML="",s.classList.add(eG.visuallyHidden),r.classList.remove(eG.productPriceSale))}),this.hasUnitPricing&&this.updateProductUnits(e)}updateProductUnits(e){let i=e.dataset.variant;if(void 0!==i.unit_price){let s=t.formatMoney(i.unit_price,moneyFormat).replace("USD",""),r=this.getBaseUnit(i);this.container.querySelector(e5.unitPrice).innerHTML=s,this.container.querySelector(e5.unitBase).innerHTML=r,z(this.container.querySelector(e5.unitWrapper))}else e0(this.container.querySelector(e5.unitWrapper))}updateColorName(e){let t=e.target,i=t.closest(e5.dataOption).querySelector(e5.colorLabel);"INPUT"===t.tagName&&null!==i&&(i.innerText=t.value)}updateProductImage(e){let t=e.dataset.variant;if(t&&t.featured_media){let i=this.container.querySelector(`${e5.productImage}[${e5.dataImageId}*="${t.featured_media.id}"]`);if(i){let s=this.container.querySelector(e5.productSlideshow);if(s&&s.classList.contains(eG.sliderEnabled)){let a=Array.from(i.parentElement.children).indexOf(i);r.data(s).select(a)}if(this.scrollable){if(window.innerWidth>window.theme.sizes.small)window.scrollTo({top:i.getBoundingClientRect().top+window.scrollY-60,left:0,behavior:"smooth"});else{let o=this.container.querySelector(e5.productImagesScroller);o.scrollTo({top:0,left:i.getBoundingClientRect().left+o.scrollLeft,behavior:"smooth"})}}}}}updateShopBarImage(e){let t=e.dataset.variant,i=this.container.querySelectorAll(e5.variantId),s=this.container.querySelector(e5.shopBarImageActive);null!==t.featured_image&&(s&&(s.classList.remove(eG.shopBarImageShown),s.removeAttribute(e5.shopBarImageActiveAttr)),i.forEach(e=>{Number(t.id)===Number(e.getAttribute(e5.variantIdAttr))&&(e.classList.add(eG.shopBarImageShown),e.setAttribute(e5.shopBarImageActiveAttr,""))}))}}let eZ={id:"id",apiContent:"[data-api-content]",quickviewWrap:"[data-quickview-wrap]",quickviewClose:"[data-quickview-close]",featuredBlock:"[data-collection-featured-block]",productBlock:"[data-product-block]",productContainer:"[data-product-container]",productImage:"[data-product-single-media-wrapper]",addToCart:"[data-add-to-cart]",handle:"data-trigger-quickview",productSlider:"[data-product-slideshow]",swatch:"[data-swatch]",videoLoop:"data-video-looping",quickviewId:"data-quickview-id"},te={isLoading:"is-loading",isVisible:"is-visible",isActive:"is-active",isLoaded:"is-loaded",focusEnabled:"is-focused",sliderEnabled:"flickity-enabled",mediaHidden:"media--hidden",buttonAlt:"button--alt",blockQuickView:"product-block--quickview"};class tt{constructor(e,t){this.button=e,this.id=t,this.handle=this.button.getAttribute(eZ.handle),this.productBlock=this.button.closest(eZ.productBlock),this.quickviewWrap=null,this.quickviewClose=null,this.quickviewWrapHeight=0,this.isQuickViewLoading=!1,this.accessibility=G,this.swatches=[],this.form={},this.init()}init(){this.initButton(),this.initFetch()}initFetch(){this.productBlock.addEventListener("quickview",()=>{this.renderProduct()},!1)}renderProduct(){let e=this;fetch(`${theme.routes.root_url}products/${e.handle}?section_id=api-quickview`).then(function(e){return e.text()}).then(function(t){let i=document.createElement("div");i.innerHTML=t.replaceAll("||collection-index||",e.handle),e.productBlock.insertAdjacentHTML("beforeend",i.querySelector(eZ.apiContent).innerHTML),e.productBlock.classList.add(te.isLoaded),e.quickviewWrap=e.productBlock.querySelector(eZ.quickviewWrap),e.quickviewClose=e.quickviewWrap.querySelector(eZ.quickviewClose),e.quickviewWrapHeight=e.quickviewWrap.querySelector(eZ.productC
12ontainer).offsetHeight,e.onLoaded(),e.show()}).catch(function(e){console.log("error: ",e)})}initButton(){let e=this,t=this.productBlock.querySelectorAll(`[${eZ.handle}='${this.handle}']`);t.length&&t.forEach(t=>{t.addEventListener("click",t=>{let i=this.productBlock.classList.contains(te.isLoaded),s=this.productBlock.classList.contains(te.isVisible),r=null!==this.productBlock.parentNode.querySelector(`.${te.isVisible}`),a=new CustomEvent("quickview",{handle:this.handle});this.isQuickViewLoading||(this.isQuickViewLoading=!0,this.productBlock.classList.add(te.isLoading),i&&s?e.hide():!i||s||r?i&&!s&&r?(e.hide(),setTimeout(()=>{e.show()},200)):r?(e.hide(),setTimeout(()=>{e.productBlock.dispatchEvent(a)},200)):e.productBlock.dispatchEvent(a):e.show()),t.preventDefault()})})}show(){let e=(window.innerHeight-this.quickviewWrapHeight)/2,t=this.quickviewWrap.getBoundingClientRect().top+window.scrollY-e-theme.dimensions.headerScrolled,i=u(eZ.featuredBlock),s=document.body.classList.contains(te.focusEnabled),r="api-quickview",a=this.productBlock.querySelectorAll(`[id*="${r}"]`),o=this.productBlock.querySelectorAll(`[for*="${r}"]`);document.documentElement.style.setProperty("--collection-featured-block-height",`${i}px`),a.forEach(e=>{let t=e.id.replace(r,this.id);e.id=t}),o.forEach(e=>{let t=e.getAttribute("for").replace(r,this.id);e.setAttribute("for",t)}),this.productBlock.classList.add(te.isActive),this.productBlock.classList.remove(te.isLoading),window.scrollTo({top:t,left:0,behavior:"smooth"}),this.productBlock.classList.add(te.isVisible),this.isQuickViewLoading=!1,s&&this.accessibility.trapFocus(this.quickviewWrap,{elementToFocus:this.quickviewClose})}hide(){let e=this.productBlock.parentNode.querySelectorAll(eZ.productBlock),t=[te.isLoading,te.isVisible,te.isActive,te.blockQuickView],i=document.body.classList.contains(te.focusEnabled);if(e.forEach(e=>{if(e.classList.contains(te.isVisible)){let i=e.querySelector(`${eZ.productImage}.is-selected`);null!==i&&(i.dispatchEvent(new CustomEvent("mediaHidden")),i.classList.remove(te.mediaHidden)),e.classList.remove(...t)}}),this.isQuickViewLoading=!1,this.accessibility.removeTrapFocus(),i){let s=document.querySelector(`[${eZ.handle}="${this.handle}"]`);setTimeout(()=>{document.documentElement.style.setProperty("--collection-featured-block-height","none"),s.focus()},300)}}onLoaded(){let e=`${this.id}-${this.quickviewWrap.getAttribute(eZ.quickviewId)}`,t=this.quickviewWrap.querySelector(eZ.productSlider).classList.contains(te.sliderEnabled),i={id:e,container:this.quickviewWrap,type:"quickview"};theme.settings.enableVideoLooping&&this.quickviewWrap.setAttribute(eZ.videoLoop,!0),t?window.dispatchEvent(new Event("resize")):void 0===theme.mediaInstances[this.id]?(theme.mediaInstances[e]=new eU(i),theme.mediaInstances[e].init()):theme.mediaInstances[e].initSlider(),this.form=new eJ(i),theme.settings.showQuantity&&new es(i.container).init();i.container.querySelectorAll(eZ.swatch).forEach(e=>{this.swatches.push(new e$(e))}),this.quickviewClose.addEventListener("click",e=>{e.preventDefault(),this.hide()}),document.addEventListener("keyup",e=>{e.keyCode===theme.keyboardKeys.ESCAPE&&document.querySelectorAll(`${eZ.productBlock}.${te.isVisible}`).length&&this.hide()});let s=new CustomEvent("quickview-is-loaded",{bubbles:!0});this.productBlock.dispatchEvent(s),this.initPaymentButton()}initPaymentButton(){let e=theme.settings.enablePaymentButton,t=theme.settings.enableAcceptTerms,i=this.quickviewWrap.querySelector(eZ.addToCart);e&&!t?(i.classList.add(te.buttonAlt),"undefined"!=typeof Shopify&&void 0!==Shopify.PaymentButton&&void 0!==Shopify.PaymentButton.init&&Shopify.PaymentButton.init()):i.classList.remove(te.buttonAlt)}}let ti={trigger:"[data-trigger-quickview]",dataSectionId:"data-section-id"},ts={init:"is-init"},tr={};class ta{constructor(e){this.container=e,this.id=this.container.dataset.sectionId,theme.settings.showQuickView&&this.init()}init(){tr[this.id]=[];let e=this.container.querySelectorAll(ti.trigger);e.length&&e.forEach(e=>{e.classList.contains(ts.init)||(tr[this.id].push(new tt(e,this.id)),e.classList.add(ts.init))})}}let to={onLoad(){this.section=new ta(this.container)}},tn={infinityContainer:"[data-infinity]",pagination:"[data-pagination]",collectionBlockImage:"[data-product-image]",dataId:"data-section-id"},tl={};class td{constructor(e){this.container=e,this.infinityContainer=this.container.querySelector(tn.infinityContainer),this.endlessScroll=null,this.infinityContainer&&this.init()}init(){let e=this,t=this.container.getAttribute(tn.dataId);
12this.fix(),this.endlessScroll=new s({container:`section[${tn.dataId}="${t}"] ${tn.infinityContainer}`,pagination:`section[${tn.dataId}="${t}"] ${tn.pagination}`,callback:function(){e.setBadge(),eI(e.container),new ta(e.container)}})}fix(){s.prototype.loadMore=function(){this.request=new XMLHttpRequest,this.request.onreadystatechange=(function(){if(!this.request.responseXML)return;this.request.readyState,this.request.status;let e=this.request.responseXML.querySelector(this.settings.container),t=this.request.responseXML.querySelector(this.settings.pagination);this.containerElement.insertAdjacentHTML("beforeend",e.innerHTML),null==t?this.removePaginationElement():(this.paginationElement.innerHTML=t.innerHTML,this.settings.callback&&"function"==typeof this.settings.callback&&this.settings.callback(this.request.responseXML),this.initialize())}).bind(this),this.request.open("GET",this.nextPageUrl,!0),this.request.responseType="document",this.request.send()}}setBadge(){let e=this.infinityContainer.querySelectorAll(tn.collectionBlockImage),t=g(()=>eA(e),50);"contain"===theme.settings.imageBackgroundSize&&e&&(eA(e),window.removeEventListener("resize",t),window.addEventListener("resize",t))}unload(){this.endlessScroll&&this.endlessScroll.destroy()}}let tc={onLoad(){tl=new td(this.container)},onUnload:function(){"function"==typeof tl.unload&&tl.unload()}},th={};class tu{constructor(e){this.container=e.container,this.resizeEvent=g(()=>this.checkWindowWidth(),200),this.init()}init(){this.checkWindowWidth(),window.addEventListener("resize",this.resizeEvent)}checkWindowWidth(){(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=theme.sizes.small&&ek(this.container)}onUnload(){window.removeEventListener("resize",this.resizeEvent)}}let tp={onLoad(){th[this.id]=new tu(this)},onUnload(e){th[this.id].onUnload(e)}};ey("blog",[tp,tc]),ey("featured-blog",tp);let tm={popoutWrapper:"[data-popout]",popoutList:"[data-popout-list]",popoutToggle:"[data-popout-toggle]",popoutInput:"[data-popout-input]",popoutOptions:"[data-popout-option]",popoutPrevent:"data-popout-prevent",popoutQuantity:"data-quantity-field",dataValue:"data-value",dataName:"data-name",ariaExpanded:"aria-expanded",ariaCurrent:"aria-current"},tf={listVisible:"popout-list--visible",currentSuffix:"--current",classPopoutAlternative:"popout-container--alt"},tg={};class ty{constructor(e){this.container=e,this.popoutList=this.container.querySelector(tm.popoutList),this.popoutToggle=this.container.querySelector(tm.popoutToggle),this.popoutInput=this.container.querySelector(tm.popoutInput),this.popoutOptions=this.container.querySelectorAll(tm.popoutOptions),this.popoutPrevent="true"===this.container.getAttribute(tm.popoutPrevent),this._connectOptions(),this._connectToggle(),this._onFocusOut(),this.popoutInput&&this.popoutInput.hasAttribute(tm.popoutQuantity)&&document.addEventListener("popout:updateValue",this.updatePopout.bind(this))}unload(){this.popoutOptions.length&&this.popoutOptions.forEach(e=>
12{e.removeEventListener("clickDetails",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))}popupToggleClick(e){let t="true"===e.currentTarget.getAttribute(tm.ariaExpanded);e.currentTarget.setAttribute(tm.ariaExpanded,!t),this.popoutList.classList.toggle(tf.listVisible)}popupToggleFocusout(e){this.container.contains(e.relatedTarget)||this._hideList()}popupListFocusout(e){let t=e.currentTarget.contains(e.relatedTarget);this.popoutList.classList.contains(tf.listVisible)&&!t&&this._hideList()}popupOptionsClick(e){e.preventDefault();let t="";if(e.currentTarget.getAttribute(tm.dataValue)&&(t=e.currentTarget.getAttribute(tm.dataValue)),this.popoutInput.value=t,this.popoutPrevent){t=e.currentTarget.getAttribute(tm.dataName),this.popoutInput.dispatchEvent(new Event("change")),!e.detail.preventTrigger&&this.popoutInput.hasAttribute(tm.popoutQuantity)&&this.popoutInput.dispatchEvent(new Event("input"));let i=this.popoutList.querySelector(`[class*="${tf.currentSuffix}"]`),s=tf.currentSuffix;if(i&&i.classList.length){for(let r of i.classList)if(r.includes(tf.currentSuffix)){s=r;break}}let a=this.popoutList.querySelector(`.${s}`);a&&(a.classList.remove(`${s}`),e.currentTarget.parentElement.classList.add(`${s}`));let o=this.popoutList.querySelector(`[${tm.ariaCurrent}]`);o&&o.hasAttribute(`${tm.ariaCurrent}`)&&(o.removeAttribute(`${tm.ariaCurrent}`),e.currentTarget.setAttribute(`${tm.ariaCurrent}`,"true")),""!==t&&(this.popoutToggle.textContent=t),this.popupToggleFocusout(e),this.popupListFocusout(e)}else this._submitForm(t)}
12updatePopout(e){let t=this.popoutList.querySelector(`[${tm.dataValue}="${this.popoutInput.value}"]`);t?(t.dispatchEvent(new CustomEvent("clickDetails",{cancelable:!0,bubbles:!0,detail:{preventTrigger:!0}})),t.parentElement.nextSibling||this.container.classList.add(tf.classPopoutAlternative)):this.container.classList.add(tf.classPopoutAlternative)}containerKeyup(e){e.which===theme.keyboardKeys.ESCAPE&&(this._hideList(),this.popoutToggle.focus())}bodyClick(e){let t=this.container.contains(e.target);this.popoutList.classList.contains(tf.listVisible)&&!t&&this._hideList()}_connectToggle(){this.popoutToggle.addEventListener("click",this.popupToggleClick.bind(this))}_connectOptions(){this.popoutOptions.length&&this.popoutOptions.forEach(e=>{e.addEventListener("clickDetails",this.popupOptionsClick.bind(this)),e.addEventListener("click",this._connectOptionsDispatch.bind(this))})}_connectOptionsDispatch(e){let t=new CustomEvent("clickDetails",{cancelable:!0,bubbles:!0,detail:{preventTrigger:!1}});e.target.dispatchEvent(t)||e.preventDefault()}_onFocusOut(){this.popoutToggle.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){let t=this.container.closest("form");t&&t.submit()}_hideList(){this.popoutList.classList.remove(tf.listVisible),this.popoutToggle.setAttribute(tm.ariaExpanded,!1)}}let tv={onLoad(){tg[this.id]=[];this.container.querySelectorAll(tm.popoutWrapper).forEach(e=>{tg[this.id].push(new ty(e))})},onUnload(){tg[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}},tb={newsletterForm:"[data-newsletter-form]"},tE={success:"sign-up-posted"},tL={};class tw{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(),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(){if(this.readStorage(),this.newsletter.id===this.formID){let e=document.getElementById(this.formID);-1!==window.location.search.indexOf("?customer_posted=true")?(document.body.classList.add(tE.success),this.scrollToForm(e)):-1!==window.location.search.indexOf("accepts_marketing")&&document.body.classList.remove(tE.success)}}scrollToForm(e){let t=e.getBoundingClientRect();t.top>=0&&t.left>=0&&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)}}ey("footer",[tv,{onLoad(){var e=document.querySelector("[data-powered-link] a");e&&e.setAttribute("rel","noopener")}},{onLoad(){tL[this.id]=[];this.container.querySelectorAll(tb.newsletterForm).forEach(e=>{tL[this.id].push(new tw(e))})},onUnload(){tL[this.id].forEach(e=>{"function"==typeof e.unload&&e.unload()})}}]);let tS=e=>Array.prototype.filter.call(e.parentNode.children,function(t){return t!==e}),tk={collapsibleTrigger:"[data-collapsible-trigger]",collapsibleContent:"[data-collapsible-content]",navHamburger:"[data-hamburger-scrollable]",header:"data-header"},tq={expanded:"aria-expanded",controls:"aria-controls",hidden:"aria-hidden"},tA={isExpanded:"is-expanded"},tT={};class tC{constructor(e){this.section=e,this.triggers=this.section.querySelectorAll(tk.collapsibleTrigger),this.resetHeight=0,this._listeners=new e7,this.init()}init(){let e=document.querySelector(tk.navHamburger);this.section.hasAttribute(tk.header)&&(this.triggers=[...this.triggers,...e.querySelectorAll(tk.collapsibleTrigger)]),this.triggers.forEac
12h(e=>{this._listeners.add(e,"click",t=>this.collapsibleToggleEvent(t,e)),this._listeners.add(e,"keyup",t=>this.collapsibleToggleEvent(t,e))})}collapsibleToggleEvent(e,t){e.preventDefault();let i=t.getAttribute(tq.controls),s=document.getElementById(i),r=t.parentNode,a=r.classList.contains(tA.isExpanded),o=e.keyCode===theme.keyboardKeys.SPACE,n=e.keyCode===theme.keyboardKeys.ESCAPE,l=s.querySelector(tk.collapsibleContent).offsetHeight;(!e.keyCode||o||n)&&(a||!n)&&(a&&setTimeout(()=>{l=0,this.setDropdownHeight(s,l,a)},0),t.setAttribute(tq.expanded,!a),r.classList.toggle(tA.isExpanded,!a),this.setDropdownHeight(s,l,a))}setDropdownHeight(e,t,i){e.style.maxHeight=`${t}px`,e.setAttribute(tq.hidden,i);let s="none";this.resetHeight&&clearTimeout(this.resetHeight),0===t&&(s=null),this.resetHeight=setTimeout(()=>{e.style.maxHeight=s},500)}onUnload(){this._listeners.removeAll()}}let t$={onLoad(){tT[this.id]=new tC(this.container)},onUnload(e){tT[this.id].onUnload(e)}},tx={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]"},tI={classInitialized:"is-initialized"};class tP{constructor(e){this.container=e.container,this.slider=e.querySelector(tx.rangeSlider),this.resizeFilters=g(()=>this.reset(),50),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(tx.rangeDotLeft),this.touchRight=this.slider.querySelector(tx.rangeDotRight),this.lineSpan=this.slider.querySelector(tx.rangeLine),this.min=parseFloat(this.slider.getAttribute(tx.dataMin)),this.max=parseFloat(this.slider.getAttribute(tx.dataMax)),this.step=0,this.normalizeFact=26,this.init())}init(){let e=this.min;this.slider.hasAttribute(tx.dataMinValue)&&(e=parseFloat(this.slider.getAttribute(tx.dataMinValue)));let t=this.max;this.slider.hasAttribute(tx.dataMaxValue)&&(t=parseFloat(this.slider.getAttribute(tx.dataMaxValue))),e<this.min&&(e=this.min),t>this.max&&(t=this.max),e>t&&(e=t),this.slider.getAttribute(tx.dataStep)&&(this.step=Math.abs(parseFloat(this.slider.getAttribute(tx.dataStep)))),this.reset(),window.addEventListener("resize",this.resizeFilters),this.maxX=this.slider.offsetWidth-this.touchRight.offsetWidth,this.selectedTouch=null,this.initialValue=this.lineSpan.offsetWidth-this.normalizeFact,this.setMinValue(e),this.setMaxValue(t),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(tI.classInitialized)}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){let 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(tx.dataMinValue,e)}setMaxValue(e){let 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(tx.dataMaxValue,e)}onStart(e){e.preventDefault();let t=e;e.touches&&(t=e.touches[0]),e.currentTarget===this.touchLeft?this.x=this.touchLeft.offsetLeft:this.x=this.touchRight.offsetLeft,this.startX=t.pageX-this.x,this.selectedTouch=e.currentTarget,this.slider.addEventListener("mousemove",this.onMoveEvent),this.slider.addEventListener("mouseup",this.onStopEvent),this.slider.addEventListener("touchmove",this.onMoveEvent),this.slider.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")&&Function("min, max",this.slider.getAttribute("on-change"))(this.slider.getAttribute(tx.dataMinValue),this.slider.getAttribute(tx.dataMaxValue)),this.onChange(this.slider.getAttribute(tx.dataMinValue),this.slider.getAttribute(tx.dataMaxValue))}onStop(e){this.slider.removeEventListener("mousemove",this.onMoveEvent),this.slider.removeEventListener("mouseup",this.onStopEvent),this.slider.removeEventListener("touchmove",this.onMoveEvent),this.slider.removeEventListener("touchend",this.onStopEvent),this.selectedTouch=null,this.calculateValue(),this.onChanged(this.slider.getAttribute(tx.dataMinValue),this.slider.getAttribute(tx.dataMaxValue))}onChange(e,t){let i=this.slider.closest(tx.rangeHolder);if(i){let s=i.querySelector(tx.priceMin),r=i.querySelector(tx.priceMax);s&&r&&(s.value=e,r.value=t)}}onChanged(e,t){this.slider.hasAttribute(tx.dataFilterUpdate)&&this.slider.dispatchEvent(new CustomEvent("range:filter:update",{bubbles:!0}))}calculateValue(){let e=(this.lineSpan.offsetWidth-this.normalizeFact)/this.initialValue,t=this.lineSpan.offsetLeft/this.initialValue,i=t+e;if(t=t*(this.max-this.min)+this.min,i=i*(this.max-this.min)+this.min,0!==this.step){let s=Math.floor(t/this.step);t=this.step*s,s=Math.floor(i/this.step),i=this.step*s}this.selectedTouch===this.touchLeft&&this.slider.setAttribute(tx.dataMinValue,t),this.selectedTouch===this.touchRight&&this.slider.setAttribute(tx.dataMaxValue,i)}onUnload(){this.resizeFilters&&window.removeEventListener("resize",this.resizeFilters)}}let tM={},t8={ariaExpanded:"aria-expanded",ariaHidden:"aria-hidden",collectionBlockImage:"[data-product-image]",collectionGridWrapper:"[data-collection-grid-wrapper]",collectionProducts:"[data-collection-
12products]",collectionSort:"[data-collection-sort]",collectionWrapper:"[data-collection-wrapper]",dataCollection:"data-collection",dataCount:"data-count",dataFilterMode:"data-filter-mode",dataSort:"data-sort",dataTag:"data-tag",dataTags:"data-tags",filter:"[data-filter]",filterContainer:"[data-filter-container]",filterCount:"[data-filter-count]",filterTag:"[data-filter-tag]",filterTagButton:"[data-filter-tag-button]",filterTitle:"[data-collapsible-trigger]",filters:"[data-filters]",filtersResets:"[data-filters-reset]",filtersResetButton:"[data-filters-reset-button]",filtersEnable:"data-filters-enable",filtersForm:"[data-filters-form]",filtersResetButtons:"[data-filter-reset-button]",inputs:"input, select, label, textarea",pagination:"[data-pagination]",priceMin:"[data-field-price-min]",priceMax:"[data-field-price-max]",priceMinValue:"data-field-price-min",priceMaxValue:"data-field-price-max",rangeMin:"[data-se-min-value]",rangeMax:"[data-se-max-value]",rangeMinValue:"data-se-min-value",rangeMaxValue:"data-se-max-value",swatch:"data-swatch"},tH={filtersTop:"collection__filters--top",filtersHasTagsSelected:"collection__filters--has-tags-selected",hasTagsExpanded:"has-tags-expanded",isActive:"is-active",isExpanded:"is-expanded",isLoading:"is-loading"};class t_{constructor(e){this.container=e.container,this.collectionGridWrapper=this.container.querySelector(t8.collectionGridWrapper),this.collectionSort=this.container.querySelector(t8.collectionSort),this.collectionProducts=this.container.querySelector(t8.collectionProducts),this.collectionWrapper=this.container.querySelector(t8.collectionWrapper),this.pagination=this.container.querySelector(t8.pagination),this.filterMode=this.container.getAttribute(t8.dataFilterMode),this.filters=this.container.querySelector(t8.filters),this.filtersEnable="true"===this.container.getAttribute(t8.filtersEnable),this.filtersForm=this.container.querySelector(t8.filtersForm),this.filtersResets=this.container.querySelector(t8.filtersResets),this.filtersInputs=[],this.sort=null,this.tags=null,this.collection=null,this.reset=null,this.badgesResizeEvent=null,this.resizeFiltersEvent=g(()=>this.checkFiltersPosition(),250),this.documentClick=e=>this.closeOnOutsideClick(e),this.init()}init(){if(this.collectionSort&&this.initSort(),this.collectionProducts){this.collection=this.collectionProducts.getAttribute(t8.dataCollection);let e=this.collectionProducts.querySelectorAll(t8.collectionBlockImage);this.badgesResizeEvent=g(()=>eA(e),250),"contain"===theme.settings.imageBackgroundSize&&e&&(eA(e),window.addEventListener("resize",this.badgesResizeEvent))}this.filtersEnable&&(("tag"===this.filterMode||"group"===this.filterMode)&&(this.tags=JSON.parse(this.collectionProducts.getAttribute(t8.dataTags)),this.initFilters()),"default"===this.filterMode&&this.initFacetedFilters()),this.initFilterToggleButtons(),this.checkFiltersPosition(),window.addEventListener("resize",this.resizeFiltersEvent)}initSort(){this.collectionSort.addEventListener("change",e=>{let t=new window.URL(window.location.href),i=e.currentTarget.value,s=t.searchParams;s.set("sort_by",i),t.search=s.toString(),this.collectionProducts.setAttribute(t8.dataSort,i),this.requestFilteredProducts(t.toString())})}initFilterToggleButtons(){if(this.filters)this.filters.querySelectorAll(t8.filterTitle).forEach(e=>{e.addEventListener("click",()=>{this.toggleTitle(e)}),this.isTopPosition()&&(e.setAttribute(t8.ariaExpanded,!1),e.parentNode.classList.remove(tH.isExpanded),e.parentNode.querySelector(t8.filterContainer).setAttribute(t8.ariaHidden,!0))}),document.addEventListener("click",this.documentClick)}initFacetedFilters(){new tP(this.filtersForm),this.filtersInputs=this.filtersForm.querySelectorAll(t8.inputs),this.filtersInputs.length&&this.filtersInputs.forEach(e=>{e.addEventListener("input",g(()=>{this.filtersForm&&"function"==typeof this.filtersForm.submit&&this.submitForm()},500))}),this.filtersForm.addEventListener("range:filter:update",()=>this.updateRange()),this.initResets()}submitForm(){let e=new FormData(this.filtersForm),t=new URLSearchParams(e);this.requestFilteredProducts(`${this.collection}${t.toString()}`)}initFilters(){this.filters.querySelectorAll(t8.filterTagButton).forEac
12h(e=>{e.addEventListener("click",t=>{this.toggleFilter(e),t.preventDefault()})}),this.initResets()}initResets(){let e=this.container.querySelectorAll(t8.filtersResetButtons);this.resetAlt=this.collectionProducts.querySelector(t8.filtersResetButton),e.length&&e.forEach(e=>{e.addEventListener("click",e=>this.bindResetButton(e))}),this.resetAlt&&this.resetAlt.addEventListener("click",e=>this.bindResetButton(e))}toggleTitle(e){let t=tS(e.parentNode),i="true"===e.getAttribute("aria-expanded");this.filters.classList.toggle(tH.hasTagsExpanded,!i),this.isTopPosition()&&t.forEach(e=>{e.classList.remove(tH.isExpanded),e.querySelector(t8.filterContainer)&&e.querySelector(t8.filterContainer).setAttribute(t8.ariaHidden,!0),e.querySelector(t8.filterTitle)&&e.querySelector(t8.filterTitle).setAttribute(t8.ariaExpanded,!1)})}toggleFilter(e){let t=e.parentNode,i=e.getAttribute(t8.dataTag),s=t.classList.contains(tH.isActive),r=t.parentNode.parentNode.previousElementSibling;this.sort=this.collectionProducts.getAttribute(t8.dataSort);let a="";if(s){let o=this.tags.indexOf(i);t.classList.remove(tH.isActive),o>-1&&this.tags.splice(o,1)}else t.classList.add(tH.isActive),this.tags.push(i);this.collectionProducts.setAttribute(t8.dataTags,this.tags);let n=t.parentNode.querySelectorAll(`.${tH.isActive}`).length;r.querySelector(t8.filterCount).setAttribute(t8.dataCount,n),(this.isTopPosition()||s)&&r.dispatchEvent(new Event("click")),this.sort&&(a=`?sort_by=${this.sort}`);let l=`${this.collection}/${this.tags.join("+")}${a}`;this.requestFilteredProducts(l)}updateRange(){if(this.filtersForm&&"function"==typeof this.filtersForm.submit){let e=this.filtersForm.querySelector(t8.rangeMin),t=this.filtersForm.querySelector(t8.rangeMax),i=this.filtersForm.querySelector(t8.priceMin),s=this.filtersForm.querySelector(t8.priceMax);if(e&&t&&i&&s&&e.hasAttribute(t8.rangeMinValue)&&t.hasAttribute(t8.rangeMaxValue)){let r=parseInt(i.placeholder),a=parseInt(s.placeholder),o=parseInt(e.getAttribute(t8.rangeMinValue)),n=parseInt(t.getAttribute(t8.rangeMaxValue));(r!==o||a!==n)&&(i.value=o,s.value=n,this.submitForm())}}}closeOnOutsideClick(e){let t=this.filters.contains(e.target),i=this.filters.classList.contains(tH.hasTagsExpanded);!t&&i&&this.isTopPosition()&&this.filters.querySelector(`${t8.filter}.${tH.isExpanded}`).querySelector(t8.filterTitle).dispatchEvent(new Event("click"))}requestFilteredProducts(e){let t=parseInt(Math.ceil(this.collectionWrapper.offsetTop)-theme.dimensions.headerScrolled);this.collectionWrapper.classList.add(tH.isLoading),window.scrollTo({top:t,left:0,behavior:"smooth"}),history.replaceState&&window.history.pushState({path:e},"",e),fetch(e).then(e=>e.text()).then(e=>{let t=document.createElement("div");t.innerHTML=e;let i=t.querySelector(t8.collectionProducts).innerHTML,s=t.querySelector(t8.pagination),r=t.querySelector(t8.filters);if(this.collectionProducts.innerHTML=i,this.pagination&&(this.pagination.innerHTML=null!==s?s.innerHTML:""),this.pagination||null===s||(this.collectionGridWrapper.appendChild(s),this.pagination=this.collectionGridWrapper.querySelector(t8.pagination)),r){let a=r.innerHTML;this.filters.innerHTML=a,this.filtersForm=this.filters.querySelector(t8.filtersForm),("tag"===this.filterMode||"group"===this.filterMode)&&(this.initFilters(),this.tags.length>0?this.filters.classList.add(tH.filtersHasTagsSelected):this.filters.classList.remove(tH.filtersHasTagsSelected)),"default"===this.filterMode&&this.initFacetedFilters(),this.checkFiltersPosition(),this.initFilterToggleButtons(),this.bindSwatchFilters(),new tC(this.container)}tc.onUnload(),new td(this.container),eI(this.container),new ta(this.container);let o=this.collectionProducts.querySelectorAll(t8.collectionBlockImage);"contain"===theme.settings.imageBackgroundSize&&o&&eA(o)}).catch(e=>{this.collectionWrapper.classList.remove(tH.isLoading)}).finally(()=>{setTimeout(()=>{this.collectionWrapper.classList.remove(tH.isLoading)},450)})}checkFiltersPosition(){if(!this.filters)return;let e=this.filters.querySelectorAll(t8.filter);this.isTopPosition()&&(this.filters.classList.remove(tH.hasTagsExpanded),e.forEach(e
12=>{e.classList.contains(tH.isExpanded)&&(e.classList.remove(tH.isExpanded),e.querySelector(t8.filterContainer)&&(e.querySelector(t8.filterContainer).setAttribute(t8.ariaHidden,!0),e.querySelector(t8.filterContainer).style.maxHeight=0),e.querySelector(t8.filterTitle)&&e.querySelector(t8.filterTitle).setAttribute(t8.ariaExpanded,!1))}))}isTopPosition(){return(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=theme.sizes.widescreen||this.filters.classList.contains(tH.filtersTop)}bindSwatchFilters(){this.swatches=[];this.container.querySelectorAll(`[${t8.swatch}]`).forEach(e=>{this.swatches.push(new e$(e))})}bindResetButton(e){if(e.preventDefault(),"tag"===this.filterMode||"group"===this.filterMode){let t=e.currentTarget;if(t.getAttribute(t8.dataTag)){let i=t.dataset.tag,s=this.tags.indexOf(i);s>-1&&this.tags.splice(s,1)}else this.tags=[];this.collectionProducts.setAttribute(t8.dataTags,this.tags)}this.requestFilteredProducts(e.currentTarget.href)}onUnload(){document.removeEventListener("click",this.documentClick),window.removeEventListener("resize",this.resizeFiltersEvent),this.badgesResizeEvent&&window.removeEventListener("resize",this.badgesResizeEvent)}}let tB={onLoad(){tM[this.id]=new t_(this)},onUnload(e){tM[this.id].onUnload(e)}};ey("collection",[tB,t$,to,tc,eM,eP,tv]),ey("search-template",[tB,t$,to,tc,eM,eP,tv]);let tF={},tz={slider:"[data-collection-slider]",prevArrow:"[data-prev-arrow]",nextArrow:"[data-next-arrow]",productBlock:"[data-product-block]",productImage:"[data-product-image]",quickViewWrap:"[data-quickview-wrap]",quickViewButton:"[data-trigger-quickview]"},tW={blockQuickView:"product-block--quickview",isVisible:"is-visible",flickityEnabled:"flickity-enabled"};class tV{constructor(e){this.container=e.container,this.slideshow=this.container.querySelector(tz.slider),this.productBlocks=this.container.querySelectorAll(tz.productBlock),this.productImages=this.container.querySelectorAll(tz.productImage),this.slideshowPrev=this.container.querySelector(tz.prevArrow),this.slideshowNext=this.container.querySelector(tz.nextArrow),this.resizeEvent=g(()=>{this.sliderInit(),this.setArrowPosition(),this.setQuickViewPosition()},200),this.resizeBadge=null,this.flkty=null,this.slideshow&&this.init(),this.productImages&&"contain"===theme.settings.imageBackgroundSize&&(this.resizeBadge=g(()=>eA(this.productImages),50),eA(this.productImages),window.addEventListener("resize",this.resizeBadge))}init(){this.slideshowPrev.addEventListener("click",this.goToPrevSlide.bind(this)),this.slideshowNext.addEventListener("click",this.goToNextSlide.bind(this)),ek(this.container),this.sliderInit(),this.productBlocks.forEach(e=>{e.addEventListener("quickview-is-loaded",()=>{e.classList.add(tW.blockQuickView),this.setQuickViewPosition()})}),window.addEventListener("resize",this.resizeEvent)}sliderInit(){let e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,t=this.slideshow.classList.contains(tW.flickityEnabled);e>theme.sizes.small?t||(this.flkty=new a(this.slideshow,{groupCells:"100%",setGallerySize:!1,autoPlay:!1,prevNextButtons:!1,pageDots:!1,wrapAround:!1,cellAlign:"left",contain:!0,on:{ready:()=>{this.setArrowPosition()},change:function(){let e=this.element.querySelector(`${tz.productBlock}.${tW.isVisible}`);null!==e&&e.querySelector(tz.quickViewButton).dispatchEvent(new Event("click"))}}})):t&&this.flkty.destroy()}goToPrevSlide(e){e.preventDefault(),this.flkty.previous(!0)}goToNextSlide(e){e.preventDefault(),this.flkty.next(!0)}setArrowPosition(){let e=this.slideshow.querySelector(tz.productImage).offsetHeight/2;e-=this.slideshowPrev.offsetHeight/2,this.slideshowPrev.style.top=`${e}px`,this.slideshowNext.style.top=`${e}px`}setQuickViewPosition(){let e=this.slideshow.querySelector(`.${tW.blockQuickView}`);if(null===e)return;let t=e.querySelector(tz.quickViewWrap),i=parseInt(window.getComputedStyle(this.slideshow).paddingLeft.replace("px","")),s=this.slideshow.offsetWidth-2*i,r=e.offsetLeft;r>=s&&(r%=s),t.style.left=`calc(${e.style.left} - ${r}px)`,t.style.width="100%"}onUnload(){this.slideshow&&this.slideshow.classList.contains(tW.flickityEnabled)&&this.flkty.destroy(),this.resizeBadge&&window.removeEventListener("resize",this.resizeBadge),window.removeEventListener("resize",this.resizeEvent)}}ey("featured-collection",[{onLoad(){tF[this.id]=new tV(this)},onUnload(e){tF[this.id].onUnload(e)}},to,eM]);let t9=e=>{let t=getComputedStyle(e);return e.offsetWidth+(parseInt(t.marginLeft)+parseInt(t.marginRight))},tD={saleClass:" is-sale",soldClass:" is-sold-out",badgeClass:" product-status-flag--",customBadgeClass:" product-status-flag--custom"},tO={input:"data-search-input",productTemplate:"[product-grid-item-template]",pageTemplate:"[page-item-template]",noresultTemplate:"[noresult-item-template]",productsWra
12pper:"[data-products-wrap]",articlesWrapper:"[data-articles-wrap]",pagesWrapper:"[data-pages-wrap]",productWrapperOuter:"[data-product-wrap-outer]",viewAll:"[data-view-all]",productImage:"[data-product-image]",productBadge:"[data-badge]",searchPopdown:"nav-search"},tN={loadingClass:"is-searching",resultsVisibleClass:"results--visible",hiddenClass:"is-hidden",focusEnabled:"is-focused"};class tR{constructor(e){this.input=e,this.key=this.input.getAttribute(tO.input);let t=`[id="${this.key}"]`;this.append=document.querySelector(t),this.productTemplate=document.querySelector(tO.productTemplate).innerHTML,this.pageTemplate=document.querySelector(tO.pageTemplate).innerHTML,this.noresultTemplate=document.querySelector(tO.noresultTemplate).innerHTML,this.productsWrapper=this.append.querySelector(tO.productsWrapper),this.pagesWrapper=this.append.querySelector(tO.pagesWrapper),this.articlesWrapper=this.append.querySelector(tO.articlesWrapper),this.focusedContainer=this.productsWrapper,this.viewAll=this.append.querySelector(tO.viewAll),this.popdown=document.getElementById(tO.searchPopdown),this.productWrapperOuter=this.popdown.querySelector(tO.productWrapperOuter),this.result=null,this.accessibility=G,this.initSearch()}initSearch(){this.input.addEventListener("input",g((function(e){let t=e.target.value;t&&t.length>1?(this.productWrapperOuter.classList.add(tN.loadingClass),this.render(t)):this.reset()}).bind(this),300)),this.input.addEventListener("clear",this.reset.bind(this))}render(e){fetch(`/search/suggest.json?q=${encodeURIComponent(e)}&resources[type]=${theme.settings.searchType}&resources[limit]=10&resources[options][unavailable_products]=last`).then(this.handleErrors).then(e=>e.json()).then(e=>(this.result=e.resources.results,this.fetchProducts(this.result.products))).then(t=>{this.popdown.classList.add(tN.resultsVisibleClass),this.reset(!1),void 0!==this.result.articles&&(0===this.result.articles.length?this.injectHTML(this.articlesWrapper,this.renderNoResult()):(this.injectHTML(this.articlesWrapper,this.fetchPages(this.result.articles)),this.focusedContainer=this.articlesWrapper)),void 0!==this.result.pages&&(0===this.result.pages.length?this.injectHTML(this.pagesWrapper,this.renderNoResult()):(this.injectHTML(this.pagesWrapper,this.fetchPages(this.result.pages)),this.focusedContainer=this.pagesWrapper)),""===t?(this.viewAll.classList.add(tN.hiddenClass),this.injectHTML(this.productsWrapper,this.renderNoResult())):(this.viewAll.classList.remove(tN.hiddenClass),this.viewAll.setAttribute("href",`${theme.routes.search_url}?type=product&q=${e}&options[prefix]=last`),this.injectHTML(this.productsWrapper,t)),this.productWrapperOuter.classList.remove(tN.loadingClass);let i=this.productWrapperOuter.querySelectorAll(tO.productImage);"contain"===theme.settings.imageBackgroundSize&&i&&eA(i);document.body.classList.contains(tN.focusEnabled)&&this.accessibility.trapFocus(this.popdown,{elementToFocus:this.focusedContainer})}).catch(e=>{console.error(e)})}reset(e=!0){this.productsWrapper.innerHTML="",null!==this.pagesWrapper&&(this.pagesWrapper.innerHTML=""),null!==this.articlesWrapper&&(this.articlesWrapper.innerHTML=""),this.input.val="",this.accessibility.removeTrapFocus(),e&&this.popdown.classList.remove(tN.resultsVisibleClass)}injectHTML(e,t){e.innerHTML+=t}fetchProducts(e){let i=[];return e.slice(0,4).forEach(e=>{i.push(eT(e.handle).then(e=>{let i=function(e){let i=theme.settings.productBadgeStyle,s=e.price<=e.compare_at_price_min,r=!e.available,a,o=`${tD.badgeClass}${i}`,n=!1,l=!1;for(let d=0;d<e.tags.length;d++){if(e.tags[d].includes("_badge_")){n=!0,a=e.tags[d].replace("_badge_","").split("_").join(" "),o+=tD.customBadgeClass;break}if(e.tags[d].includes("_preorder")){l=!0;break}}if(!n&&(r?(a=theme.translations.sold_out,o+=tD.soldClass):l?(a=theme.translations.pre_order,o+=tD.customBadgeClass):s&&(a=theme.translations.on_sale,o+=tD.saleClass)),"circle"==i&&a&&(a=a.replace(" ","<br>")),e.price=t.formatMoney(e.price,moneyFormat),e.price_with_from=e.price,e.price_varies){let c=t.formatMoney(e.price_min,moneyFormat);e.price_with_from=`${theme.translations.from} ${c}`}return e.compare_at_price&&(e.compare_at_price=t.formatMoney(e.compare_at_price,moneyFormat)),{...e,badgeClasses:o,badgeText:a}}(e);return this.renderProduct(i)}))}),Promise.all(i).then(e=>{let t="";
12return e.forEach(e=>{t+=e}),t})}fetchPages(e){let t="";return e.forEach(e=>{t+=this.renderPage(e)}),t}renderProduct(e){let t=e.title.replace(/(<([^>]+)>)/gi,""),s=null,r="",a=theme.assets.blank;return void 0!==e.media&&(s=e.media[0]),r=s?{thumb:o.getSizedImageUrl(s.preview_image.src,"800x800"),alt:s.preview_image.alt,aspectRatio:s.preview_image.aspect_ratio,src:a}:{thumb:theme.assets.no_image,alt:"",aspectRatio:1,src:a},i.render(this.productTemplate,{product:{...e,title:t,image:r}})}renderPage(e){let t=e.title.replace(/(<([^>]+)>)/gi,"");return i.render(this.pageTemplate,{page:{...e,title:t}})}renderNoResult(){let e=theme.translations.no_results;return i.render(this.noresultTemplate,{item:{text:e}})}handleErrors(e){return e.ok?e:e.json().then(function(t){throw new ee({status:e.statusText,headers:e.headers,json:t})})}}let tj={bodyWrap:"[data-body-wrap]",menuToggle:"[data-menu-toggle]",hamburgerIcon:"[data-hamburger-icon]",hamburgerMenuScrollable:"[data-hamburger-scrollable]",headerIcons:"[data-header-icons]",navMain:"[data-nav-main]",searchWrapper:"[data-nav-search]",searchToggle:"[data-search-toggle]",searchInput:"[data-search-input]",searchSubmit:"[data-search-submit]",searchScroller:"[data-nav-search-scroller]",viewAll:"[data-view-all]",siteAlert:"[data-site-alert]",shopBar:"[data-shop-bar]",menuDropdownParent:"[data-dropdown-parent]",dropdownTrigger:"data-collapsible-trigger",menuItemLink:"data-menu-item-link",visibleLink:"data-visible-link",ariaExpanded:"aria-expanded",href:"href",tabIndex:"tabindex"},tU={navVisible:"nav--is-visible",navHiding:"nav--is-hiding",searchVisible:"header--search-visible",searchHiding:"header--search-hiding",megamenuVisible:"header--megamenu-visible",headerHamburger:"header--is-hamburger",menuItemDropdown:"menu-item--dropdown",isExpanded:"is-expanded",isActive:"is-active",open:"open"},t0={};class t3{constructor(e){this.header=e,this.body=document.body,this.bodyWrap=document.querySelector(tj.bodyWrap),this.siteAlert=document.querySelector(tj.siteAlert),this.shopBar=document.querySelector(tj.shopBar),this.transformedElements=[this.header,this.siteAlert,this.bodyWrap,this.shopBar],this.menuToggles=document.querySelectorAll(tj.menuToggle),this.headerIcons=this.header.querySelector(tj.headerIcons),this.navStandard=this.header.querySelector(tj.navMain),this.hamburger=this.header.querySelector(tj.hamburgerIcon),this.search=this.header.querySelector(tj.searchWrapper),this.searchScroller=this.header.querySelector(tj.searchScroller),this.scrollableElement=document.querySelector(tj.hamburgerMenuScrollable),this.hamburgerNavLinks=this.scrollableElement.parentNode.querySelectorAll("button, a"),this.resizeTransform=g(()=>this.transformHeaderElements(),100),this.documentClick=e=>this.hideOnOutsideClick(e),this.documentKeyup=e=>this.hideOnKeyUp(e),this.searchPredictive=null,this.scrollLockTimeout=0,this.resetHeight=0,this.accessibility=G,null!==this.search&&(this.searchToggles=this.header.querySelectorAll(tj.searchToggle),this.searchOpen=this.headerIcons.querySelector(tj.searchToggle),this.searchInput=this.search.querySelector(tj.searchInput)),this.init()}init(){this.hide(),this.bindings(),this.activeLinks(),null!==this.search&&this.bindingsSearch()}bindings(){let e=this.navStandard.querySelectorAll(tj.menuDropdownParent),t=document.querySelectorAll(`${tj.navMain} a[href^="#"]:not(${tj.viewAll})`),i=document.querySelectorAll(`${tj.navMain} [${tj.dropdownTrigger}]`);this.menuToggles.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.body.classList.contains(tU.navVisible)?this.hide():this.show()})}),e.forEach(e=>{let t=e.querySelectorAll(`[${tj.visibleLink}]`);e.addEventListener("mouseenter",()=>{theme.touched||(e.classList.contains(tU.menuItemDropdown)||this.header.classList.add(tU.megamenuVisible),e.classList.add(tU.isExpanded),t.forEach(e=>{e.removeAttribute(tj.tabIndex),e.hasAttribute(tj.ariaExpanded)&&e.setAttribute(tj.ariaExpanded,!0)}))}),e.addEventListener("mouseleave",()=>{e.classList.contains(tU.menuItemDropdown)||this.header.classList.remove(tU.megamenuVisible),e.classList.remove(tU.isExpanded),t.forEach(e
12=>{e.setAttribute(tj.tabIndex,"-1"),e.hasAttribute(tj.ariaExpanded)&&e.setAttribute(tj.ariaExpanded,!1)})})}),[...i,...t].forEach(e=>{e.addEventListener("click",()=>{e.parentNode.classList.contains(tU.isExpanded)?this.submenuClose(e.parentNode):this.submenuOpen(e.parentNode)}),e.addEventListener("keyup",t=>{t.keyCode===theme.keyboardKeys.SPACE?e.parentNode.classList.contains(tU.isExpanded)?this.submenuClose(e.parentNode):this.submenuOpen(e.parentNode):t.keyCode===theme.keyboardKeys.ESCAPE&&this.submenuClose(e.parentNode)})}),document.addEventListener("click",this.documentClick),document.addEventListener("keyup",this.documentKeyup)}bindingsSearch(){this.searchPredictive=new tR(this.searchInput),this.searchToggles.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),this.searchToggle()})})}hideOnOutsideClick(e){let t=this.headerIcons.querySelector(tj.menuToggle),i=this.header.classList.contains(tU.searchVisible),s=t.contains(e.target),r=document.querySelector(tj.hamburgerMenuScrollable).parentNode.contains(e.target),a=this.header.classList.contains(tU.headerHamburger);if(null!==this.search){let o=this.searchOpen.contains(e.target);this.search.contains(e.target)||o||!i||this.searchToggle()}s||r||!a||this.hide()}hideOnKeyUp(e){let t=e.which||e.keyCode,i=e.target,s=document.querySelectorAll(tj.navMain)[1],r=this.header.classList.contains(tU.searchVisible),a=this.hamburger.classList.contains(tU.open),o=document.querySelector(`${tj.menuDropdownParent}.${tU.isExpanded}`);(t===theme.keyboardKeys.TAB||t===theme.keyboardKeys.ESCAPE)&&(t===theme.keyboardKeys.TAB?(i.hasAttribute(tj.menuItemLink)&&null!==o&&o.querySelector(`[${tj.dropdownTrigger}]`).dispatchEvent(new Event("click")),!s.contains(i)&&a&&this.hide(),null!==this.search&&!this.search.contains(i)&&r&&this.searchToggle()):t===theme.keyboardKeys.ESCAPE&&(null!==o&&o.querySelector(`[${tj.dropdownTrigger}]`).dispatchEvent(new Event("click")),r&&this.searchToggle(),a&&this.hide()))}show(){let e=this.headerIcons.querySelectorAll(`a:not(${tj.menuToggle})`);document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.scrollableElement})),this.hamburger.classList.add(tU.open),this.body.classList.add(tU.navVisible),e.forEach(e=>e.setAttribute(tj.tabIndex,"-1")),this.hamburgerNavLinks.forEach(e=>e.removeAttribute(tj.tabIndex)),this.menuToggles.forEach(e=>e.setAttribute(tj.ariaExpanded,!0)),this.transformHeaderElements(),window.addEventListener("resize",this.resizeTransform)}transformHeaderElements(){this.header.classList.contains(tU.headerHamburger)&&this.transformedElements.forEach(e=>{null!==e&&(e.style.transform=`translateX(${this.scrollableElement.parentNode.offsetWidth}px)`)})}hide(){let e=this.headerIcons.querySelectorAll("a");this.body.classList.contains(tU.navVisible)&&(this.hamburger.classList.remove(tU.open),this.body.classList.add(tU.navHiding),this.body.classList.remove(tU.navVisible),this.transformedElements.forEach(e=>{null!==e&&(e.style.transform="none")}),this.scrollLockTimeout&&clearTimeout(this.scrollLockTimeout),this.scrollLockTimeout=setTimeout(()=>{document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0})),this.body.classList.remove(tU.navHiding)},500),window.removeEventListener("resize",this.resizeTransform),e.forEach(e=>e.removeAttribute(tj.tabIndex)),this.hamburgerNavLinks.forEach(e=>e.setAttribute(tj.tabIndex,"-1")),this.menuToggles.forEach(e=>e.setAttribute(tj.ariaExpanded,!1)))}activeLinks(){let e=this.navStandard.querySelectorAll(`[${tj.menuItemLink}]`),t=this.navStandard.querySelectorAll(`[${tj.visibleLink}]`),i=!1;e.forEach(e=>{e.getAttribute(tj.href)===window.location.pathname&&(e.parentNode.classList.add(tU.isActive),i=!0)}),i||t.forEach(e=>{e.getAttribute(tj.href)===window.location.pathname&&(e.parentNode.classList.add(tU.isActive),e.closest(tj.menuDropdownParent).classList.add(tU.isActive))})}submenuClose(e){e.querySelectorAll(`[${tj.visibleLink}]`).forEach(e=>{e.setAttribute(tj.tabIndex,"-1"),e.hasAttribute(tj.ariaExpanded)&&e.setAttribute(tj.ariaExpanded,!1)}),e.classList.contains(tU.menuItemDropdown)||this.header.classList.remove(tU.megamenuVisible)}submenuOpen(e){e.querySelectorAll(`[${tj.visibleLink}
12]`).forEach(e=>{e.removeAttribute(tj.tabIndex),e.hasAttribute(tj.ariaExpanded)&&e.setAttribute(tj.ariaExpanded,!0)}),e.classList.contains(tU.menuItemDropdown)||this.header.classList.add(tU.megamenuVisible)}searchToggle(){let e=this.search.querySelector(tj.searchToggle),t=this.search.querySelector(tj.searchSubmit),i=[this.searchInput,t,e];this.header.classList.contains(tU.searchVisible)?(this.searchToggles.forEach(e=>e.setAttribute(tj.ariaExpanded,!1)),i.forEach(e=>e.setAttribute(tj.tabIndex,"-1")),this.header.classList.add(tU.searchHiding),this.header.classList.remove(tU.searchVisible),this.accessibility.removeTrapFocus(),this.scrollLockTimeout&&clearTimeout(this.scrollLockTimeout),this.scrollLockTimeout=setTimeout(()=>{this.header.classList.remove(tU.searchHiding),this.body.classList.contains("cart--is-visible")||this.header.classList.contains(tU.searchVisible)||document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))},250)):(this.scrollLockTimeout&&clearTimeout(this.scrollLockTimeout),this.header.classList.add(tU.searchVisible),this.searchToggles.forEach(e=>
12e.setAttribute(tj.ariaExpanded,!0)),i.forEach(e=>e.removeAttribute(tj.tabIndex)),this.accessibility.removeTrapFocus(),this.accessibility.trapFocus(this.search,{elementToFocus:this.searchInput}),this.searchInput.select(),document.dispatchEvent(new CustomEvent("theme:scroll:lock",{bubbles:!0,detail:this.searchScroller})))}unload(){window.removeEventListener("resize",this.resizeTransform),document.removeEventListener("click",this.documentClick),document.removeEventListener("keyup",this.documentKeyup)}}let tQ={body:"body",bodyWrap:"[data-body-wrap]",mainContent:".main-content",navMain:"[data-nav-main]",navItem:".menu > .menu-item",headerRow:".container > .row",headerIcons:"[data-header-icons]",dataHeaderStyle:'[data-header-style="transparent"]',logoImage:"[data-logo-image]",logoImageWidth:"data-width",logoText:"[data-logo-text]",hamburgerIcon:"[data-hamburger-icon]",hamburgerMenuScrollable:"[data-hamburger-scrollable]",siteAlert:"[data-site-alert]",shopBar:"[data-shop-bar]",cartClose:"[data-cart-close]",dataTransparent:"data-transparent"},t1={shopifyHeaderFixed:"shopify-section-header--fixed",headerFull:"header--full",headerScrolled:"header--has-scrolled",headerStandard:"header--is-standard",headerHamburger:"header--is-hamburger",headerSearch:"header--search-visible",headerTransparent:"header--transparent",headerLogoCenterCenter:"header--logo_center_links_center",headerLogoLeftCenter:"header--logo_left_links_center",headerLogoCenterLeft:"header--logo_center_links_left",headerLogoLeftLeft:"header--logo_left_links_left",hasTransparentHeader:"has-transparent-header",navVisible:"nav--is-visible",cartVisible:"cart--is-visible",open:"open"},tK={};class t2{constructor(e){this.header=e,this.headerContainer=this.header.parentNode,this.body=document.querySelector(tQ.body),this.bodyWrap=document.querySelector(tQ.bodyWrap),this.scrollEvent=e8(()=>this.stickyHeaderState(),50),this.resizeEvent=g(()=>this.checkNavigationOverlapping(),250),this.checkTransparentHeaderEvent=e=>this.checkTransparentHeader(e),this.checkNavigationOverlappingEvent=this.checkNavigationOverlapping(),this.init()}init(){this.resetHeader(),this.checkTransparentHeader(),this.checkNavigationOverlapping(),this.stickyHeaderState(),window.addEventListener("load",this.checkNavigationOverlappingEvent),window.addEventListener("scroll",this.scrollEvent),window.addEventListener("resize",this.resizeEvent),document.addEventListener("theme:header:update",this.checkTransparentHeaderEvent)}stickyHeaderState(){let e=window.scrollY,t=0;null!==this.bodyWrap&&(t=this.bodyWrap.offsetTop),e>t?(this.headerContainer.classList.add(t1.shopifyHeaderFixed),this.header.classList.add(t1.headerScrolled),this.header.classList.remove(t1.headerTransparent)):(this.headerContainer.classList.remove(t1.shopifyHeaderFixed),this.header.classList.remove(t1.headerScrolled),this.isHeaderTransparent
12()&&this.header.classList.add(t1.headerTransparent))}checkNavigationOverlapping(){let e=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>theme.sizes.large,t=[t1.headerStandard,t1.headerSearch];this.header.classList.remove(t1.headerHamburger),this.header.classList.add(t1.headerStandard),(this.getNavigationOverlapping()||!e)&&(this.header.classList.remove(...t),this.header.classList.add(t1.headerHamburger))}checkTransparentHeader(){this.isHeaderTransparent()?(this.body.classList.add(t1.hasTransparentHeader),this.header.classList.add(t1.headerTransparent)):(this.body.classList.remove(t1.hasTransparentHeader),this.header.classList.remove(t1.headerTransparent))}getNavigationOverlapping(){let e=this.header.querySelector(tQ.headerRow).offsetWidth,t=this.getMenuItemsWidth(),i=this.header.classList,s=i.contains(t1.headerLogoCenterCenter)||i.contains(t1.headerLogoLeftCenter),r=i.contains(t1.headerLogoCenterLeft)||i.contains(t1.headerLogoLeftLeft),a=!1,o=this.header.querySelector(tQ.headerIcons).offsetWidth,n=this.getLogoWidth();return s&&(n=n<o?o:n,n*=2,o=0),a=parseInt(e)<parseInt(t+n+o+40),r&&n&&(a=parseInt((e-n)/2)<parseInt(t)),a}getLogoWidth(){let e=this.header.querySelector(tQ.logoImage),t=this.header.querySelector(tQ.logoText),i=0;return null!==e&&(i=parseInt(e.getAttribute(tQ.logoImageWidth))),null!==t&&(i+=t.offsetWidth),i}getMenuItemsWidth(){let e=0;return this.header.querySelector(tQ.navMain).querySelectorAll(tQ.navItem).forEach(t=>{e+=t9(t)}),e}
12isHeaderTransparent(){let e=document.querySelector(tQ.mainContent).firstElementChild,t=e.classList.contains(t1.headerFull),i=null!==e.querySelector(tQ.dataHeaderStyle);return"true"===this.header.getAttribute(tQ.dataTransparent)&&(t||i)}resetHeader(){let e=document.querySelector(tQ.siteAlert),t=document.querySelector(tQ.shopBar),i=this.header.querySelector(tQ.hamburgerIcon),s=[this.header,e,this.bodyWrap,t],r=document.body;r.classList.remove(t1.navVisible),this.bodyWrap.removeAttribute("style"),s.forEach(e=>{null!==e&&(e.style.transform="none")}),i.classList.remove(t1.open),r.classList.contains(t1.cartVisible)&&document.querySelector(tQ.cartClose).click(),document.dispatchEvent(new CustomEvent("theme:scroll:unlock",{bubbles:!0}))}unload(){window.removeEventListener("load",this.checkNavigationOverlappingEvent),window.removeEventListener("scroll",this.scrollEvent),window.removeEventListener("resize",this.resizeEvent),document.removeEventListener("theme:header:update",this.checkTransparentHeaderEvent)}onselect(){this.resetHeader(),this.init()}}ey("header",[{onLoad(){tK=new t2(this.container)},onUnload(){"function"==typeof tK.unload&&tK.unload()},onSelect(){"function"==typeof tK.onselect&&tK.onselect()}},{onLoad(){t0=new t3(this.container)},onUnload:function(){"function"==typeof t0.unload&&t0.unload()},onSelect(){"function"==typeof t0.hide&&t0.hide()},onDeselect(){"function"==typeof t0.hide&&t0.hide()}},t$]);let t7={quantityAdjust:"[data-qty-adjust]",quantityAdjustPlus:"data-qty-adjust-plus",quantityAdjustMinus:"data-qty-adjust-minus",quantityNum:"[data-qty]"},tX=(e,t)=>{if("keyup"===e.type&&13!==e.keyCode)return;let i=t,s=i.parentElement.querySelector(t7.quantityNum),r=parseInt(s.value.replace(/\D/g,""));(parseFloat(r)!=parseInt(r)||isNaN(r))&&(r=1),i.hasAttribute(t7.quantityAdjustPlus)?r+=1:(r-=1)<=1&&(r=1),s.value=r,s.dispatchEvent(new Event("click"))},t4={productContainer:"[data-product-container]",addToCart:"[data-add-to-cart]",shopBar:"[data-shop-bar]",productJson:"[data-product-json]",form:"[data-product-form-container]",dropdown:"[data-single-option-selector]",footer:"[data-footer]",colorLabel:"[data-color-label]",colorSwatch:"[data-color-swatch]",dataOption:"[data-option]",dataSectionId:"data-section-id",selectTag:"select",dataPosition:"data-position",dataIndex:"data-index"},t6={onboarding:"onboarding-product",shopBarVisible:"shop-bar--is-visible",footerPush:"site-footer--push"},tY={};class t5{constructor(e){if(this.section=e,this.container=e.container,this.id=this.container.getAttribute(t4.dataSectionId),this.productContainer=this.container.querySelector(t4.productContainer),this.footer=document.querySelector(t4.footer),this.onboarding=this.productContainer.classList.contains(t6.onboarding),this.shopBar=document.querySelector(t4.shopBar),this.scrollEvent=e8(()=>this.shopBarShow(),100),this.onboarding)document.querySelectorAll(t7.quantityAdjust).forEach(e=>{e.addEventListener("click",function(t){tX(t,e)}),e.addEventListener("keyup",function(t){tX(t,e)})}),document.querySelectorAll(t7.quantityNum).forEach(e=>{e.addEventListener("keyup",function(e){e.keyCode,e.keyCode})}),this.productContainer.querySelectorAll(t4.colorSwatch).forEach(e=>{e.addEventListener("change",e=>{this.updateColorName(e)})});else{let t=this.container.querySelector(t4.productJson);if(t&&!t.innerHTML||!t)return;Shopify.Products.recordRecentlyViewed(),this.form=this.container.querySelector(t4.form),this.init(),this.shopBar&&this.initShopBar()}}init(){theme.mediaInstances[this.id]=new eU(this.section),theme.mediaInstances[this.id].init()}initShopBar(){let e=this.shopBar.querySelectorAll(t4.selectTag),t=this.form.querySelectorAll(t4.dropdown);this.shopBar.querySelector(t4.addToCart).addEventListener("click",e=>{e.preventDefault()}),e.length&&e.forEach(e=>{e.addEventListener("change",()=>{let t=e.getAttribute(t4.dataIndex),i=e.value,s=this.form.querySelectorAll(`${t4.dropdown}[${t4.dataIndex}="${t}"]`);if("INPUT"===s[0].tagName)for(let r of s){let a=r.getAttribute(t4.dataIndex),o=r.value;if(a===t&&o===i){r.checked=!0,r.dispatchEvent(new Event("change"));break}}else{let n=s[0];n.value=i,n.dispatchEvent(new Event("change"))}})}
12),t.length&&t.forEach(e=>{e.addEventListener("change",()=>{let t=e.getAttribute(t4.dataIndex),i=e.value;this.shopBar.querySelector(`[${t4.dataIndex}="${t}"]`).value=i})}),this.shopBarShow(),window.addEventListener("scroll",this.scrollEvent)}shopBarShow(){let e=window.scrollY,t=this.productContainer.getBoundingClientRect().top+e;e>t?(this.shopBar.classList.add(t6.shopBarVisible),this.footer.classList.add(t6.footerPush)):e<t-theme.dimensions.headerScrolled&&(this.shopBar.classList.remove(t6.shopBarVisible),this.footer.classList.remove(t6.footerPush))}updateColorName(e){let t=e.target,i=t.closest(t4.dataOption).querySelector(t4.colorLabel);"INPUT"===t.tagName&&null!==i&&(i.innerText=t.value)}unload(){window.removeEventListener("scroll",this.scrollEvent)}}ey("product",[{onLoad(){this.section=new eJ(this)}},{onLoad(){tY=new t5(this)},onUnload:function(){"function"==typeof tY.unload&&tY.unload()}},eP]),ey("collection-grid",[tc]);let tG={},tJ={section:'[data-section-type="related-products"]',product:"[data-product-block]",productImage:"[data-product-image]",sectionId:"data-section-id",productId:"data-product-id",limit:"data-limit"};class tZ{constructor(e){this.container=e.container,this.resizeEvent=null,this.init()}init(){let e=this,t=this.container,i=t.getAttribute(tJ.sectionId),s;fetch(`${theme.routes.product_recommendations_url}?section_id=${i}&limit=${t.getAttribute(tJ.limit)}&product_id=${t.getAttribute(tJ.productId)}`).then(function(e){return e.text()}).then(function(i){let s=document.createElement("div");s.innerHTML=i;let r=s.querySelector(tJ.section);if(r.querySelector(tJ.product)){t.innerHTML=r.innerHTML,eI(t),new ta(t);let a=t.querySelectorAll(tJ.productImage);e.resizeEvent=g(()=>eA(a),50),"contain"===theme.settings.imageBackgroundSize&&a&&(eA(a),window.addEventListener("resize",e.resizeEvent))}})}onUnload(){this.resizeEvent&&window.removeEventListener("resize",this.resizeEvent)}}ey("related-products",{onLoad(){tG[this.id]=new tZ(this)},onUnload(e){tG[this.id].onUnload(e)}});let ie={},it={recentlyViewed:"#RecentlyViewed",dataLimit:"data-limit",productBlock:"[data-product-block]",productImage:"[data-product-image]",productBadge:"[data-badge]"};class ii{constructor(e){this.section=e,this.container=e.container,this.limit=parseInt(this.container.getAttribute(it.dataLimit)),this.recentlyViewed=this.container.querySelector(it.recentlyViewed),this.resizeEvent=null,this.recentlyViewed&&this.init()}init(){Shopify.Products.showRecentlyViewed({howManyToShow:this.limit,onComplete:()=>{if(this.container.querySelectorAll(it.productBlock).length>0){eI(this.container),new ta(this.container);let e=this.container.querySelectorAll(it.productImage);this.resizeEvent=g(()=>eA(e),50),"contain"===theme.settings.imageBackgroundSize&&e&&(eA(e),window.addEventListener("resize",this.resizeEvent)),e.forEach(e=>{lazySizes.loader.unveil(e)}),"circle"===theme.settings.productBadgeStyle&&this.container.querySelectorAll(it.productBadge).forEach(e=>{let t=e.innerText;t=t.replace(" ","<br>"),e.innerHTML=t})}}})}onUnload(){this.resizeEvent&&window.removeEventListener("resize",this.resizeEvent)}}ey("recently-viewed-products",{onLoad(){ie[this.id]=new ii(this)},onUnload(e){ie[this.id].onUnload(e)}});let is={},ir={logoListSlider:"[data-logo-list-slider]",logoListSlide:"[data-logo-list-slide]",logoListSlideData:"data-logo-list-slide",logoListSlideIndex:"data-slide-index"},ia={flickityEnabled:"flickity-enabled"};class io{constructor(e){this.container=e.container,this.slideshow=this.container.querySelector(ir.logoListSlider),this.sliderInitEvent=g(()=>this.sliderInit(),250),this.sliderResizeEvent=g(()=>this.flickityResizeEvent(),250),this.scrollEvent=g(()=>this.checkSliderVisibility(),100),this.flkty=null,this.init()}init(){this.sliderInit(),window.addEventListener("resize",this.sliderInitEvent),window.addEventListener("scroll",this.scrollEvent)}sliderInit(){let e=this.slideshow.querySelectorAll(ir.logoListSlide).length,t=document.documentElement.clientWidth||document.body.clientWidth,i=this.slideshow.classList.contains(ia.flickityEnabled);t<220*e?i||(this.flkty=new a(this.slideshow,{autoPlay:2e3,prevNextButtons:!1,pageDots:!1,wrapAround:!0,resize:!1}),this.flkty.on("dragStart",()=>document.ontouchmove=e=>e.preventDefault()),this.flkty.on("dragEnd",()=>document.ontouchmove=()=>!0),window.addEventListener("resize",this.sliderResizeEvent)):i&&(this.flkty.destroy(),window.removeEventListener("resize",this.sliderResizeEvent))}flickityResizeEvent(){this.flkty&&(this.flkty.isAnimating?this.flkty.resizeQueued=!0:this.flkty.onresize())}onUnload(){this.slideshow.classList.contains(ia.flickityEnabled)&&this.flkty.destroy(),window.removeEventListener("scroll",this.scrollEvent),window.removeEventListener("resize",this.sliderInitEvent),window.removeEventListener("resize",this.sliderResizeEvent)}onBlockSelect(e){let t=parseInt(this.slideshow.querySelector(`[${ir.logoListSlideData}="${e.detail.blockId}"]`).getAttribute(ir.logoListSlideIndex));this.slideshow.classList.contains(ia.flickityEnabled)&&(this.flkty.select(t),this.flkty.pausePlayer())}checkSliderVisibility(){this.flkty.playPlayer()}onBlockDeselect(){this.slideshow.classList.contains(ia.flickityEnabled)&&this.flkty.unpausePlayer()}}ey("logo-list",{onLoad(){is[this.id]=new io(this)},onUnload(e){is[this.id].onUnload(e)},onBlockSelect(e){is[this.id].onBlockSelect(e)},onBlockDeselect(){is[this.id].onBlockDeselect()}});let il={},id={collapsibleTrigger:"[data-collapsible-trigger]"},ic={isExpanded:"is-expanded"};class ih{triggerClick(e){e.target.querySelector(id.collapsibleTrigger).dispatchEvent(new Event("click"))}}ey("faq",[{onLoad(){il[this.id]=new ih(this)},onBlockSelect(e){e.target.classList.contains(ic.isExpanded)||il[this.id].triggerClick(e)},onBlockDeselect(e){e.target.classList.contains(ic.isExpanded)&&il[this.id].triggerClick(e)}},t$]);let iu={},ip={shopifySection:".shopify-section",slideshowPrev:"[data-prev-arrow]",slideshowNext:"[data-next-arrow]",header:"[data-header]",dataOptions:"data-options",dataColor:"data-style",dataCurrentColor:"data-current-style",dataSlide:"data-sli
12de",dataSlideIndex:"data-slide-index",scrollBtn:"[data-button-scroll]"},im={slideshowLoading:"hero--is-loading",classIsSelected:"is-selected",flickityEnabled:"flickity-enabled"};class ig{constructor(e){this.container=e.container,this.options=this.container.getAttribute(ip.dataOptions),this.parentContainer=this.container.closest(ip.shopifySection),this.slideshowPrev=this.parentContainer.querySelector(ip.slideshowPrev),this.slideshowNext=this.parentContainer.querySelector(ip.slideshowNext),this.scrollBtn=this.parentContainer.querySelector(ip.scrollBtn),this.scrollEvent=e8(()=>this.checkSliderVisibility(),150),this.resizeEvent=g(()=>this.flickityResizeEvent(),250),this.flkty=null,this.init()}init(){let e=JSON.parse(this.options.replace(/'/g,'"'));e={...e,resize:!1,on:{ready:()=>{this.container.classList.remove(im.slideshowLoading),this.slideActions()}}},this.flkty=new n(this.container,e),this.flkty.on("dragStart",()=>document.ontouchmove=e=>e.preventDefault()),this.flkty.on("dragEnd",()=>document.ontouchmove=()=>!0),this.flkty.on("change",()=>{this.slideActions()}),this.flkty.on("settle",()=>{this.flkty.resizeQueued&&(this.flkty.resizeQueued=!1,this.flkty.onresize())}),this.slideshowPrev&&this.slideshowPrev.addEventListener("click",()=>this.flkty.previous(!0)),this.slideshowNext&&this.slideshowNext.addEventListener("click",()=>this.flkty.next(!0)),this.scrollBtn&&this.scrollBtn.addEventListener("click",e=>{e.preventDefault();let t;scroll({top:this.parentContainer.offsetTop+this.parentContainer.offsetHeight-59,behavior:"smooth"})}),window.addEventListener("scroll",this.scrollEvent),window.addEventListener("resize",this.resizeEvent)}flickityResizeEvent(){this.flkty&&(this.flkty.isAnimating?this.flkty.resizeQueued=!0:this.flkty.onresize())}isAutoplay(){return!1!==this.flkty.options.autoPlay}checkSliderVisibility(){let e=this.container.classList.contains(im.flickityEnabled);(visibilityHelper.isElementPartiallyVisible(this.container)||visibilityHelper.isElementTotallyVisible(this.container))&&e&&this.isAutoplay()?this.flkty.playPlayer():this.flkty.stopPlayer()}slideActions(){let e=this.container.querySelector(`.${im.classIsSelected}`).getAttribute(ip.dataColor);this.container.setAttribute(ip.dataCurrentColor,e)}onUnload(){this.flkty.destroy(),window.removeEventListener("scroll",this.scrollEvent),window.removeEventListener("resize",this.resizeEvent)}onBlockSelect(e){let t=parseInt(this.container.querySelector(`[${ip.dataSlide}="${e.detail.blockId}"]`).getAttribute(ip.dataSlideIndex));this.flkty.select(t),this.flkty.stopPlayer()}onBlockDeselect(){this.isAutoplay()&&this.flkty.playPlayer()}}ey("slideshow",{onLoad(){iu[this.id]=new ig(this)},onUnload(e){iu[this.id].onUnload(e)},onBlockSelect(e){iu[this.id].onBlockSelect(e)},onBlockDeselect(e){iu[this.id].onBlockDeselect(e)}});let iy={},iv={slider:"[data-gallery-slider]",slideshow:"[data-slider]",slideshowPrev:"[data-prev-arrow]",slideshowNext:"[data-next-arrow]",dataOptions:"data-options",dataSlide:"data-slide",dataSlideIndex:"data-slide-index"},ib={slideshowLoading:"gallery-slider--is-loading",classIsSelected:"is-selected",flickityEnabled:"flickity-enabled"};class iE{constructor(e){this.container=e.container,this.slider=this.container.querySelector(iv.slider),this.slideshow=this.container.querySelector(iv.slideshow),this.options=this.slideshow.getAttribute(iv.dataOptions),this.slideshowPrev=this.container.querySelector(iv.slideshowPrev),this.slideshowNext=this.container.querySelector(iv.slideshowNext),this.scrollEvent=e8(()=>this.checkSliderVisibility(),150),this.sliderResizeEvent=g(()=>this.flickityResizeEvent(),150),this.flkty=null,this.init()}init(){let e=JSON.parse(this.options.replace(/'/g,'"'));e={...e,resize:!1,on:{ready:()=>this.slider.classList.remove(ib.slideshowLoading)}},this.flkty=new n(this.slideshow,e),this.flkty.on("dragStart",()=>document.ontouchmove=e=>e.preventDefault()),this.flkty.on("dragEnd",()=>document.ontouchmove=()=>!0),this.flkty.on("settle",()=>{this.flkty.resizeQueued&&(this.flkty.resizeQueued=!1,this.flkty.onresize())}),this.slideshowPrev&&this.slideshowPrev.addEventListener("click",()=>this.flkty.previous(!0)),this.slideshowNext&&this.slideshowNext.addEventListener("click",()=>this.flkty.next(!0)),window.addEventListener("scroll",this.scrollEvent),window.addEventListener("resize",this.sliderResizeEvent)}isAutoplay(){return!1!==this.flkty.options.autoPlay}checkSliderVisibility(){let e=this.slideshow.classList.contains(ib.flickityEnabled);(visibilityHelper.isElementPartiallyVisible(this.slideshow)||visibilityHelper.isElementTotallyVisible(this.slideshow))&&e&&this.isAutoplay()?this.flkty.playPlayer():this.flkty.stopPlayer()}flickityResizeEvent(){this.flkty&&(this.flkty.isAnimating?this.flkty.resizeQueued=!0:this.flkty.onresize())}onUnload(){this.flkty.destroy(),window.removeEventListener("scroll",this.scrollEvent),window.removeEventListener("resize",this.sliderResizeEvent)}onBlockSelect(e){let t=parseInt(this.slideshow.querySelector(`[${iv.dataSlide}="${e.detail.blockId}"]`).getAttribute(iv.dataSlideIndex));this.flkty.select(t),this.flkty.stopPlayer()}onBlockDeselect(){this.isAutoplay()&&this.flkty.playPlayer()}}ey("gallery",{onLoad(){iy[this.id]=new iE(this)},onUnload(e){iy[this.id].onUnload(e)},onBlockSelect(e){iy[this.id].onBlockSelect(e)},onBlockDeselect(e){iy[this.id].onBlockDeselect(e)}});let iL={},iw={slideshow:"[data-mosaic-blocks]",slideshowPrev:"[data-prev-arrow]",slideshowNext:"[data-next-arrow]",dataSlide:"data-sli
12de",dataSlideIndex:"data-slide-index"},iS={flickityEnabled:"flickity-enabled"};class ik{constructor(e){this.container=e.container,this.slideshow=this.container.querySelector(iw.slideshow),this.slideshowPrev=this.container.querySelector(iw.slideshowPrev),this.slideshowNext=this.container.querySelector(iw.slideshowNext),this.flkty=null,this.sliderInitEvent=g(()=>this.initMobileSlider(),250),this.sliderResizeEvent=g(()=>this.flickityResizeEvent(),250),this._listeners=new e7,this.init()}init(){this.initMobileSlider(),window.addEventListener("resize",this.sliderInitEvent)}initMobileSlider(){let e=document.documentElement.clientWidth<=theme.sizes.small;e&&!this.isInit()?(this.flkty=new a(this.slideshow,{wrapAround:!0,prevNextButtons:!1,pageDots:!1,resize:!1}),this.flkty.on("dragStart",()=>document.ontouchmove=e=>e.preventDefault()),this.flkty.on("dragEnd",()=>document.ontouchmove=()=>!0),this.flkty.on("settle",()=>{this.flkty.resizeQueued&&(this.flkty.resizeQueued=!1,this.flkty.onresize())}),this._listeners.add(this.slideshowPrev,"click",()=>this.flkty.previous(!0)),this._listeners.add(this.slideshowNext,"click",()=>this.flkty.next(!0)),window.addEventListener("resize",this.sliderResizeEvent)):!e&&this.isInit()&&(this.flkty.destroy(),window.removeEventListener("resize",this.sliderResizeEvent),this._listeners.removeAll())}flickityResizeEvent(){this.flkty&&(this.flkty.isAnimating?this.flkty.resizeQueued=!0:this.flkty.onresize())}isInit(){return this.slideshow.classList.contains(iS.flickityEnabled)}onUnload(){this.isInit()&&this.flkty.destroy(),window.removeEventListener("resize",this.sliderInitEvent),window.removeEventListener("resize",this.sliderResizeEvent)}onBlockSelect(e){let t=this.container.querySelector(`[${iw.dataSlide}="${e.detail.blockId}"]`);this.isInit()&&null!==t&&this.flkty.select(parseInt(t.getAttribute(iw.dataSlideIndex)))}}ey("mosaic",{onLoad(){iL[this.id]=new ik(this)},onUnload(e){iL[this.id].onUnload(e)},onBlockSelect(e){iL[this.id].onBlockSelect(e)}});let iq={popup:"[data-popup]",close:"[data-popup-close]",reappearTime:"data-reappear_time",delay:"data-delay",testmode:"data-testmode",checkTrueString:"true"},iA={popupVisible:"popup--visible"},iT={};class iC{constructor(e){this.popup=e,this.close=this.popup.querySelector(iq.close),this.timeout=0,this.testmode=this.popup.getAttribute(iq.testmode)===iq.checkTrueString,this.delay=1e3*parseInt(this.popup.getAttribute(iq.delay)),this.cookie=new class{constructor(e,t,i){this.configuration={expires:i,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)))&&(0,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}`)}}("newsletter","user_has_closed",this.expireDate()),this.init()}expireDate(){let e=new Date,t=new Date,i=parseInt(this.popup.getAttribute(iq.reappearTime));return 0!==i?t.setTime(e.getTime()+864e5*i):t.setTime(e.getTime()+31536e8),i=t.toGMTString()}init(){(!(!1!==this.cookie.read())||this.testmode)&&(this.timeout=setTimeout(()=>{this.popup.classList.add(iA.popupVisible),this.initClosers(),this.close.focus()},this.delay))}initClosers(){this.close.addEventListener("click",this.closeModal.bind(this))}closeModal(e){e.preventDefault(),this.popup.classList.remove(iA.popupVisible),clearTimeout(this.timeout),this.testmode||this.cookie.write()}}ey("popup",{onLoad(){let e=this.container.querySelector(iq.popup);null!==e&&(iT[this.id]=new iC(e))}});let i$={inputGroups:".input-group--error",inputs:"input.password, input.email"};class ix{constructor(e){this.container=e.container,this.inputGroups=this.container.querySelectorAll(i$.
12inputGroups),this.init()}init(){this.inputGroups.forEach(e=>{e.querySelector(i$.inputs).focus()})}}ey("password",{onLoad(){new ix(this)}});let iI={tabs:"[data-tabs]",tabsNav:"[data-tabs-nav]",tabsContents:"[data-tabs-contents]",tabTitle:"[data-tab-title]",tabContent:"[data-tab-content]"},iP={active:"is-active"},iM={};class i8{constructor(e){this.container=e,this.tabs=this.container.querySelector(iI.tabs),this.resizeEvent=g(()=>this.prepareTabs(),250),this._listeners=new e7,this.tabs&&(this.tabsNav=this.tabs.querySelector(iI.tabsNav),this.tabsContents=this.tabs.querySelector(iI.tabsContents),this.tabTitles=this.tabs.querySelectorAll(iI.tabTitle),this.tabContents=this.tabs.querySelectorAll(iI.tabContent),this.init())}init(){this.prepareTabs(),window.addEventListener("resize",this.resizeEvent),this.tabTitles.forEach((e,t)=>{this._listeners.add(e,"click",()=>this.tabTitleClick(e,t))})}prepareTabs(){(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<=theme.sizes.small?this.tabTitles.forEach((e,t)=>{this.tabs.appendChild(e),this.tabs.appendChild(this.tabContents[t])}
12):this.tabTitles.forEach((e,t)=>{this.tabsNav.appendChild(e),this.tabsContents.appendChild(this.tabContents[t])})}tabTitleClick(e,t){let i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=e.classList.contains(iP.active),r=this.tabTitles.length,a=t;if(1===r&&i>theme.sizes.small)return!1;s&&(a+=1,void 0===this.tabTitles[a]&&(a=0)),this.tabTitles.forEach((e,t)=>{e.classList.remove(iP.active),this.tabContents[t].classList.remove(iP.active)}),this.tabTitles[a].classList.add(iP.active),this.tabContents[a].classList.add(iP.active),i<=theme.sizes.small&&setTimeout(()=>{let e=this.tabTitles[a].getBoundingClientRect().top-document.body.getBoundingClientRect().top-theme.dimensions.headerScrolled;window.scrollTo({top:e,left:0,behavior:"smooth"})},300)}triggerClick(e){e.target.classList.contains(iP.active)||e.target.dispatchEvent(new Event("click"))}onUnload(){window.removeEventListener("resize",this.resizeEvent),this._listeners.removeAll()}}ey("tabs",[{onLoad(){iM[this.id]=new i8(this.container)},onBlockSelect(e){iM[this.id].triggerClick(e)},onUnload(e){iM[this.id].onUnload(e)}}]);let iH=(e,t="",i)=>((i=i||document.createElement("div")).classList.add(t),e.parentNode.insertBefore(i,e),i.appendChild(e));document.addEventListener("DOMContentLoaded",function(){ev("*"),document.body.classList.remove("is-page-loading");"true"===document.body.getAttribute("data-animations")&&l.init({offset:50,duration:1e3,once:!0});document.querySelectorAll("[data-anchor-link]").forEach(e=>{e.addEventListener("click",t=>{t.preventDefault();let i=document.getElementById(e.getAttribute("href").split("#")[1]).getBoundingClientRect().top+window.scrollY-theme.dimensions.headerScrolled;window.scrollTo({top:i,left:0,behavior:"smooth"})})});document.querySelectorAll(".rte table").forEach(e=>{iH(e,"rte__table-wrapper")});document.querySelectorAll('.rte iframe[src*="youtube.com/embed"], .rte iframe[src*="player.vimeo"], .rte iframe#admin_bar_iframe').forEach(e=>{iH(e,"rte__video-wrapper")}),window.self!==window.top&&document.querySelector("html").classList.add("iframe"),"scrollBehavior"in document.documentElement.style||q({url:window.theme.assets.smoothscroll})}),window.navigator.cookieEnabled&&(document.documentElement.className=document.documentElement.className.replace("supports-no-cookies","supports-cookies"))}(themeVendor.BodyScrollLock,themeVendor.themeCurrency,themeVendor.Sqrl,themeVendor.ajaxinate,themeVendor.FlickityAsNavFor,themeVendor.Flickity,themeVendor.themeImages,themeVendor.FlickityFade,themeVendor.AOS);

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.