window.theme=window.theme||{},console&&console.log&&console.log("Streamline theme ("+theme.settings.themeVersion+") by ARCH\u039ETYPE | Learn more at https://archetypethemes.co"),window.lazySizesConfig=window.lazySizesConfig||{},lazySizesConfig.expFactor=4,function($){var $=jQuery=$;theme.utils={defaultTo:function(value,defaultValue){return value==null||value!==value?defaultValue:value},promiseStylesheet:function(){return typeof this.stylesheetPromise=="undefined"&&(this.stylesheetPromise=$.Deferred(function(defer){var link=document.querySelector('link[href="'+theme.stylesheet+'"]');link.loaded&&defer.resolve(),onloadCSS(link,function(){defer.resolve()})})),this.stylesheetPromise}},theme.a11y={trapFocus:function(options){var eventsName={focusin:options.namespace?"focusin."+options.namespace:"focusin",focusout:options.namespace?"focusout."+options.namespace:"focusout",keydown:options.namespace?"keydown."+options.namespace:"keydown.handleFocus"},$focusableElements=options.$container.find($('button, [href], input, select, textarea, [tabindex]:not([tabindex^="-"])').filter(":visible")),firstFocusable=$focusableElements[0],lastFocusable=$focusableElements[$focusableElements.length-1];options.$elementToFocus||(options.$elementToFocus=options.$container);function _manageFocus(evt){evt.keyCode===9&&(evt.target===lastFocusable&&!evt.shiftKey&&(evt.preventDefault(),firstFocusable.focus()),evt.target===firstFocusable&&evt.shiftKey&&(evt.preventDefault(),lastFocusable.focus()))}options.$container.attr("tabindex","-1"),options.$elementToFocus.focus(),$(document).off("focusin"),$(document).on(eventsName.focusout,function(){$(document).off(eventsName.keydown)}),$(document).on(eventsName.focusin,function(evt){evt.target!==lastFocusable&&evt.target!==firstFocusable||$(document).on(eventsName.keydown,function(evt2){_manageFocus(evt2)})})},removeTrapFocus:function(options){var eventName=options.namespace?"focusin."+options.namespace:"focusin";options.$container&&options.$container.length&&options.$container.removeAttr("tabindex"),$(document).off(eventName)},lockMobileScrolling:function(namespace,$element){if($element)var $el=$element;else var $el=$(document.documentElement).add("body");$el.on("touchmove"+namespace,function(){return!1})},unlockMobileScrolling:function(namespace,$element){if($element)var $el=$element;else var $el=$(document.documentElement).add("body");$el.off(namespace)},promiseAnimationEnd:function($el){var events="animationend webkitAnimationEnd oAnimationEnd",properties=["animation-duration","-moz-animation-duration","-webkit-animation-duration","-o-animation-duration"],duration=0,promise=$.Deferred().resolve();return $.each(properties,function(index,value){duration||(duration=parseFloat($el.css(value)))}),duration>0&&(promise=$.Deferred(function(defer){$el.on(events,function(evt){evt.target===$el[0]&&($el.off(events),defer.resolve())})})),promise},promiseTransitionEnd:function($el){var events="webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",properties=["transition-duration","-moz-transition-duration","-webkit-transition-duration","-o-transition-duration"],duration=0,promise=$.Deferred().resolve();return $.each(properties,function(index,value){duration||(duration=parseFloat($el.css(value)))}),duration>0&&(promise=$.Deferred(function(defer){$el.on(events,function(evt){evt.target===$el[0]&&($el.off(events),defer.resolve())})})),promise}},theme.Sections=function(){this.constructors={},this.instances=[],$(document).on("shopify:section:load",this._onSectionLoad.bind(this)).on("shopify:section:unload",this._onSectionUnload.bind(this)).on("shopify:section:select",this._onSelect.bind(this)).on("shopify:section:deselect",this._onDeselect.bind(this)).on("shopify:block:select",this._onBlockSelect.bind(this)).on("shopify:block:deselect",this._onBlockDeselect.bind(this))},theme.Sections.prototype=$.extend({},theme.Sections.prototype,{createInstance:function(container,constructor,customScope){var $container=$(container),id=$container.attr("data-section-id"),type=$container.attr("data-section-type");if(constructor=constructor||this.constructors[type],typeof constructor!="undefined"){if(customScope){var instanceExists=this._findInstance(id);if(instanceExists)return}var instance=$.extend(new constructor(container),{id:id,type:type,container:container,namespace:"."+type+"-"+id});this.instances.push(instance)}},_onSectionLoad:function(evt,subSection,subSectionId){AOS&&AOS.refreshHard();var container=subSection||$("[data-section-id]",evt.target)[0];if(container){this.createInstance(container);var instance=subSection?subSectionId:this._findInstance(evt.detail.sectionId);subSection||this.loadSubSections(),instance&&typeof instance.onLoad=="function"&&instance.onLoad(evt)}},loadSubSections:function($context){var $sections=$context?$context.find("[data-subsection]"):$("[data-subsection]");$sections.each(function(evt,el){this._onSectionLoad(null,el,$(el).data("section-id"))}.bind(this)),AOS&&AOS.refreshHard()},_onSectionUnload:function(evt){var instance=this._removeInstance(evt.detail.sectionId);instance&&typeof instance.onUnload=="function"&&instance.onUnload(evt)},_onSelect:function(evt){var instance=this._findInstance(evt.detail.sectionId);instance&&typeof instance.onSelect=="function"&&instance.onSelect(evt)},_onDeselect:function(evt){var instance=this._findInstance(evt.detail.sectionId);instance&&typeof instance.onDeselect=="function"&&instance.onDeselect(evt)},_onBlockSelect:function(evt){var instance=this._findInstance(evt.detail.sectionId);instance&&typeof instance.onBlockSelect=="function"&&instance.onBlockSelect(evt)},_onBlockDeselect:function(evt){var instance=this._findInstance(evt.detail.sectionId);instance&&typeof instance.onBlockDeselect=="function"&&instance.onBlockDeselect(evt)},_findInstance:function(id){for(var i=0;i')},wrapVideo:function(){var $iframeVideo=$('.rte iframe[src*="youtube.com/embed"], .rte iframe[src*="player.vimeo"]'),$iframeReset=$iframeVideo.add("iframe#admin_bar_iframe");$iframeVideo.each(function(){$(this).parents(".video-wrapper").length||$(this).wrap('
')}),$iframeReset.each(function(){this.src=this.src})},imageLinks:function(){$(".rte a img").parent().addClass("rte__image")}},theme.LibraryLoader=function(){var types={link:"link",script:"script"},status2={requested:"requested",loaded:"loaded"},cloudCdn="https://cdn.shopify.com/shopifycloud/",libraries={youtubeSdk:{tagId:"youtube-sdk",src:"https://www.youtube.com/iframe_api",type:types.script},shopifyXr:{tagId:"shopify-model-viewer-xr",src:cloudCdn+"shopify-xr-js/assets/v1.0/shopify-xr.en.js",type:types.script},modelViewerUi:{tagId:"shopify-model-viewer-ui",src:cloudCdn+"model-viewer-ui/assets/v1.0/model-viewer-ui.en.js",type:types.script},modelViewerUiStyles:{tagId:"shopify-model-viewer-ui-styles",src:cloudCdn+"model-viewer-ui/assets/v1.0/model-viewer-ui.css",type:types.link}};function load(libraryName,callback){var library=libraries[libraryName];if(library&&library.status!==status2.requested){if(callback=callback||function(){},library.status===status2.loaded){callback();return}library.status=status2.requested;var tag;switch(library.type){case types.script:tag=createScriptTag(library,callback);break;case types.link:tag=createLinkTag(library,callback);break}tag.id=library.tagId,library.element=tag;var firstScriptTag=document.getElementsByTagName(library.type)[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}}function createScriptTag(library,callback){var tag=document.createElement("script");return tag.src=library.src,tag.addEventListener("load",function(){library.status=status2.loaded,callback()}),tag}function createLinkTag(library,callback){var tag=document.createElement("link");return tag.href=library.src,tag.rel="stylesheet",tag.type="text/css",tag.addEventListener("load",function(){library.status=status2.loaded,callback()}),tag}return{load:load}}(),theme.Modals=function(){function Modal(id,name,options){var defaults={close:".js-modal-close",open:".js-modal-open-"+name,openClass:"modal--is-active",bodyOpenClass:"modal-open",closeOffContentClick:!0};if(this.id=id,this.$modal=$("#"+id),!this.$modal.length)return!1;this.nodes={$parent:$("html").add("body"),$modalContent:this.$modal.find(".modal__inner")},this.config=$.extend(defaults,options),this.modalIsOpen=!1,this.$focusOnOpen=this.config.focusOnOpen?$(this.config.focusOnOpen):this.$modal,this.init()}return Modal.prototype.init=function(){var $openBtn=$(this.config.open);$openBtn.attr("aria-expanded","false"),$(this.config.open).on("click",this.open.bind(this)),this.$modal.find(this.config.close).on("click",this.close.bind(this)),$("body").on("drawerOpen",function(){this.close()}.bind(this))},Modal.prototype.open=function(evt){var externalCall=!1;this.modalIsOpen||(evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&(evt.stopPropagation(),this.$activeSource=$(evt.currentTarget).attr("aria-expanded","true")),this.modalIsOpen&&!externalCall&&this.close(),this.$modal.addClass(this.config.openClass),this.nodes.$parent.addClass(this.config.bodyOpenClass),setTimeout(function(){this.$modal.addClass("aos-animate")}.bind(this),0),this.modalIsOpen=!0,theme.a11y.trapFocus({$container:this.$modal,$elementToFocus:this.$focusOnOpen,namespace:"modal_focus"}),$("body").trigger("modalOpen."+this.id),this.bindEvents())},Modal.prototype.close=function(){this.modalIsOpen&&($(document.activeElement).trigger("blur"),this.$modal.removeClass(this.config.openClass).removeClass("aos-animate"),this.nodes.$parent.removeClass(this.config.bodyOpenClass),this.modalIsOpen=!1,theme.a11y.removeTrapFocus({$container:this.$modal,namespace:"modal_focus"}),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","false").focus(),$("body").trigger("modalClose."+this.id),this.unbindEvents())},Modal.prototype.bindEvents=function(){this.nodes.$parent.on("keyup.modal",function(evt){evt.keyCode===27&&this.close()}.bind(this)),this.config.closeOffContentClick&&(this.$modal.on("click.modal",this.close.bind(this)),this.nodes.$modalContent.on("click.modal",function(evt){evt.stopImmediatePropagation()}))},Modal.prototype.unbindEvents=function(){this.nodes.$parent.off(".modal"),this.config.closeOffContentClick&&(this.$modal.off(".modal"),this.nodes.$modalContent.off(".modal"))},Modal}(),theme.ProductScreen=function(){var originalTitle=document.title,namespace="productscreen",windowPosition=0,$page=$("#MainContent");function ProductScreen(id,name,options){var defaults={close:".js-screen-close",open:".js-screen-open-"+name,openClass:"screen-layer--is-active",closeSlideAnimate:"screen-layer--is-sliding",bodyOpenClass:"screen-layer-open",bodyClosingClass:"screen-layer-closing",bodyCloseAnimate:"screen-layer-closing screen-layer-animating",loaderStart:200,pullToCloseThreshold:-100};if(this.id=id,this.$screen=$("#"+id),this.title=this.$screen.data("product-title"),!this.$screen.length)return!1;this.nodes={$parent:$("html").add("body"),$body:$("body"),$loader:$("#OverscrollLoader").find(".icon-loader__path"),$screenContent:this.$screen.find(".screen-layer__inner"),$photoswipe:$(".pswp")},this.config=$.extend(defaults,options),this.initalized=!1,this.isOpen=!1,this.$focusOnOpen=this.config.focusOnOpen?$(this.config.focusOnOpen):this.$screen,this.init()}return ProductScreen.prototype.init=function(){var $openBtn=$(this.config.open);$openBtn.attr("aria-expanded","false"),$("body").on("click",this.config.open,this.open.bind(this)),this.$screen.find(this.config.close).on("click",{noAnimate:!0,back:!0},this.close.bind(this)),theme.settings.cartType==="sticky"&&(this.nodes.$body.on("added."+this.id,function(){theme.headerNav.toggleThumbMenu(!1,!0);var args={back:!0};this.close(!1,args)}.bind(this)),this.nodes.$body.on("error."+this.id,function(){this.initalized&&this.open()}.bind(this)))},ProductScreen.prototype.open=function(evt,data){var externalCall=!1,args={updateCurrentPath:data?data.updateCurrentPath:!0};if(!this.isOpen){evt?evt.preventDefault():externalCall=!0,evt&&evt.stopPropagation&&(evt.stopPropagation(),this.$activeSource=$(evt.currentTarget)),this.isOpen&&!externalCall&&this.close(),windowPosition=window.scrollY,this.$screen.prepareTransition().addClass(this.config.openClass),this.nodes.$parent.addClass(this.config.bodyOpenClass),this.nodes.$screenContent.scrollTop(0),window.scrollTo(0,0),theme.a11y.trapFocus({$container:this.$screen,$elementToFocus:this.$focusOnOpen,namespace:namespace}),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","true");var newUrl=this.$activeSource.data("url");this.nodes.$body.trigger("productModalOpen."+this.id).trigger("newPopstate",{screen:this,url:newUrl,updateCurrentPath:args.updateCurrentPath}),this.initalized=!0,this.isOpen=!0,document.title=this.title,window.ga&&ga("send","pageview",{page:newUrl}),this.bindEvents()}},ProductScreen.prototype.close=function(evt,args){var evtData=args||(evt?evt.data:null),goBack=evtData?evtData.back:!1,noAnimate=!!(evtData&&evtData.noAnimate);this.nodes.$body.removeAttr("style"),this.nodes.$loader.css("stroke-dashoffset",this.config.loaderStart),goBack&&this.nodes.$body.trigger("newPopstate",{screen:this,back:!0});var closeClass=noAnimate?"":this.config.closeSlideAnimate,bodyCloseClass=noAnimate?this.config.bodyClosingClass:this.config.bodyCloseAnimate;this.isOpen&&($(document.activeElement).trigger("blur"),this.$screen.prepareTransition().removeClass(this.config.openClass).addClass(closeClass),this.nodes.$parent.removeClass(this.config.bodyOpenClass).addClass(bodyCloseClass),window.setTimeout(function(){this.$screen.removeClass(closeClass),this.nodes.$parent.removeClass(bodyCloseClass),window.scrollTo(0,windowPosition)}.bind(this),500),theme.a11y.removeTrapFocus({$container:this.$screen,namespace:namespace}),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","false").focus(),this.nodes.$body.trigger("productModalClose").trigger("productModalClose."+this.id),window.scrollTo(0,windowPosition),this.isOpen=!1,document.title=originalTitle,window.ga&&ga("send","pageview"),this.unbindEvents())},ProductScreen.prototype.bindEvents=function(){this.nodes.$body.on("keyup."+namespace,function(evt){if(evt.keyCode===27){if(this.nodes.$photoswipe.hasClass("pswp--open")||this.nodes.$body.hasClass("js-drawer-open"))return;var args={back:!0};this.close(!1,args)}}.bind(this));var bgAmount=0,loaderAmount=0;$(document).on("touchmove."+namespace,$.throttle(15,function(evt){var pos=window.scrollY;pos>=0||(bgAmount=-(pos/100),this.nodes.$body.css("background","rgba(0,0,0,"+bgAmount+")"),loaderAmount=this.config.loaderStart+pos*2,pos<=this.config.pullToCloseThreshold&&(loaderAmount=0),this.nodes.$loader.css("stroke-dashoffset",loaderAmount))}.bind(this))),$(document).on("touchend."+namespace,function(evt){totalLoader=this.config.loaderStart;var pos=window.scrollY;if(pos2?this.$container.removeClass(classes.staticDrawerElement):this.$container.addClass(classes.staticDrawerElement);var $cart=this._createCart(cart);morphdom(this.$form[0],$cart[0]),window.Shopify&&Shopify.StorefrontExpressButtons&&Shopify.StorefrontExpressButtons.initialize(),this.status.isDrawer&&openDrawer===!0&&this.drawer.open(),this.status.loaded=!0,this.loading(!1),document.dispatchEvent(new CustomEvent("cart:updated",{detail:{cart:cart}}))},_createCart:function(cart){var $form=this.$form.clone();return $(selectors.item,$form).not(selectors.cartNoteContainer).remove(),$(selectors.itemList,$form).prepend(this._createItemList(cart)),$(selectors.cartNoteInput,$form).val(cart.note),$(selectors.cartDiscountContainer,$form).toggleClass("hide",cart.cart_level_discount_applications.length===0),$(selectors.cartDiscountContent,$form).html(this._createCartDiscountList(cart)),$(selectors.cartSubtotal,$form).html(theme.Currency.formatMoney(cart.total_price,theme.settings.moneyFormat)),$(selectors.cartSubmit,$form).attr("disabled",cart.items.length===0),$form},_createItemList:function(cart){return $.map(cart.items,function(item){var $item=this.$itemTemplate.clone().removeClass(classes.cartTemplate),propertyList=this._createPropertyList(item),discountList=this._createDiscountList(item),unitPrice=this._createUnitPrice(item),itemPrice=this._createItemPrice(item.original_price,item.final_price),itemLinePrice=this._createItemPrice(item.original_line_price,item.final_line_price);return $item.find(selectors.itemId).addBack(selectors.itemId).attr(data.itemId,item.key),$(selectors.itemHref,$item).attr("href",item.url),$(selectors.itemBackgroundImage,$item).removeAttr("data-bgset").css("background-image",item.image?"url("+theme.Images.getSizedImageUrl(item.image,"200x")+")":"none").addClass("lazyload"),$(selectors.itemTitle,$item).text(item.product_title),$(selectors.itemVariantTitle,$item).text(item.variant_title),$(selectors.itemPriceContainer,$item).html(itemPrice),$(selectors.itemLinePriceContainer,$item).html(itemLinePrice),$(selectors.itemLinePrice,$item).html(theme.Currency.formatMoney(item.line_price,theme.settings.moneyFormat)),$(selectors.itemLabelQuantity,$item).attr("for","quantity_"+item.key),$(selectors.itemInputQuantity,$item).attr("name","updates["+item.key+"]").attr("id","quantity_"+item.key).val(item.quantity),$(selectors.itemPropertyList,$item).html(propertyList),$(selectors.itemDiscountList,$item).html(discountList),$(selectors.itemUnitPrice,$item).html(unitPrice),$item[0]}.bind(this))},_createItemPrice:function(original_price,final_price){return original_price!==final_price?''+theme.strings.regularPrice+''+theme.Currency.formatMoney(original_price,theme.settings.moneyFormat)+''+theme.strings.salePrice+''+theme.Currency.formatMoney(final_price,theme.settings.moneyFormat)+"":''+theme.Currency.formatMoney(original_price,theme.settings.moneyFormat)+""},_createPropertyList:function(item){return $.map(item.properties,function(value,key2){var $property=this.$propertyTemplate.clone().removeClass(classes.cartTemplate);if(key2.charAt(0)!=="_"&&value!=="")return value.indexOf("/uploads/")===-1?$property.text(key2+": "+value):$property.html(key2+': '+value.split("/").pop()+""),$property[0]}.bind(this))},_createDiscountList:function(item){return $.map(item.line_level_discount_allocations,function(discount){var $discount=this.$discountTemplate.clone().removeClass(classes.cartTemplate);return $discount.find(selectors.itemDiscountTitle).text(discount.discount_application.title),$discount.find(selectors.itemDiscountAmount).html(theme.Currency.formatMoney(discount.amount,theme.settings.moneyFormat)),$discount[0]}.bind(this))},_createCartDiscountList:function(cart){return $.map(cart.cart_level_discount_applications,function(discount){var $discount=this.$cartDiscountTemplate.clone().removeClass(classes.cartTemplate);return $discount.find(selectors.cartDiscountTitle).text(discount.title),$discount.find(selectors.cartDiscountAmount).html(theme.Currency.formatMoney(discount.total_allocated_amount,theme.settings.moneyFormat)),$discount[0]}.bind(this))},_createUnitPrice:function(item){var price=theme.Currency.formatMoney(item.unit_price,theme.settings.moneyFormat),base=theme.Currency.getBaseUnit(item);return price+"/"+base},_onItemQuantityChange:function(evt){this.loading(!0);var $input=$(evt.target),id=$input.closest(selectors.item).attr(data.itemId),quantity=$input.val();if(quantity!==""){if(quantity==0){var response=confirm(theme.strings.cartConfirmDelete);if(response===!1){$input.val(1),this.loading(!1);return}}theme.cart.changeItem(id,quantity)}},_onItemQuantityEmptyBlur:function(evt){var $input=$(evt.target),id=$input.closest(selectors.item).attr(data.itemId),value=$input.val();value===""&&theme.cart.getCart().then(function(cart){this.buildCart(cart)}.bind(this))},_onItemDelete:function(evt){evt.preventDefault();var $deleteButton=$(evt.target),$items=$(selectors.item,this.$container),$item=$deleteButton.closest(selectors.item),$note=$(selectors.cartNoteContainer,this.$container),id=$item.attr(data.itemId);$items.length===2&&$items.last().is($note)&&($note.addClass(classes.cartItemRemove),theme.a11y.promiseTransitionEnd($(selectors.itemList,this.$container)).then(function(){$note.removeClass(classes.cartItemRemove)})),$item.addClass(classes.cartItemRemove),theme.a11y.promiseAnimationEnd($item).then(function(){theme.cart.changeItem(id,0)}.bind(this))},loading:function(state){this.status.loading=state,state?$(selectors.itemList,this.$form).addClass("loading"):$(selectors.itemList,this.$form).removeClass("loading")},updateCartNotification:function(cart){$(selectors.cartCount).text(cart.item_count),$("body").toggleClass(classes.cartHasItems,cart.item_count>0)},_highlightText:function(evt){theme.config.isTouch||$(evt.target).select()}}),AjaxCart}(),theme.StickyCart=function(){var config={namespace:".ajaxcart"},selectors={cart:"#StickyCart",items:"#StickyItems",subtotal:"#StickySubtotal",submit:"#StickySubmit"},classes={cartTemplate:"template-cart",active:"sticky-cart--open",activeBodyClass:"body--sticky-cart-open"};function StickyCart(){this.status={loaded:!1,loading:!1,open:$("body").hasClass(classes.activeBodyClass)},this.initEventListeners()}function refresh(cart){$("body").hasClass(classes.cartTemplate)||(cart.item_count>0?($("body").addClass(classes.activeBodyClass),$(selectors.cart).addClass(classes.active)):($("body").removeClass(classes.activeBodyClass),$(selectors.cart).removeClass(classes.active)),$(selectors.items).text(theme.strings.cartItems.replace("[count]",cart.item_count)),$(selectors.subtotal).html(theme.Currency.formatMoney(cart.total_price,theme.settings.moneyFormat)))}return StickyCart.prototype=$.extend({},StickyCart.prototype,{initEventListeners:function(){$(selectors.submit).on("click",function(){$(this).addClass("btn--loading")}),$("body").on("added.ajaxProduct",function(){this.hideCart(),theme.cart.getCart().then(function(cart){this.buildCart(cart,!0)}.bind(this))}.bind(this))},hideCart:function(){$("body").removeClass(classes.activeBodyClass),$(selectors.cart).removeClass(classes.active)},showCart:function(count,subtotal){count&&$(selectors.items).text(theme.strings.cartItems.replace("[count]",count)),subtotal&&$(selectors.subtotal).html(theme.Currency.formatMoney(subtotal,theme.settings.moneyFormat)),$("body").addClass(classes.activeBodyClass),$(selectors.cart).addClass(classes.active),this.status.open=!0},buildCart:function(cart,open){this.loading(!0),this.status.loaded=!0,this.loading(!1),open===!0&&this.showCart(cart.item_count,cart.total_price)},loading:function(state){this.status.loading=state,state?$(selectors.cart).addClass("is-loading"):$(selectors.cart).removeClass("is-loading")},updateError:function(XMLHttpRequest){XMLHttpRequest.responseJSON&&XMLHttpRequest.responseJSON.description&&console.warn(XMLHttpRequest.responseJSON.description)}}),{init:StickyCart,refresh:refresh}}(),theme.AjaxProduct=function(){var status2={loading:!1};function ProductForm($form){this.$form=$form,this.$addToCart=this.$form.find(".add-to-cart"),this.productId=$form.find('[name="data-product-id"]').val(),this.$form.length&&this.$form.on("submit",this.addItemFromForm.bind(this))}return ProductForm.prototype=$.extend({},ProductForm.prototype,{addItemFromForm:function(evt,callback){if(evt.preventDefault(),!status2.loading){this.$form.find("[data-add-to-cart]").addClass("btn--loading"),status2.loading=!0;var data=this.$form.serialize();$("body").trigger("added.ProductScreen-"+this.productId),theme.cart.addItemFromForm(data).then(function(product){this.success(product)}.bind(this)).catch(function(XMLHttpRequest){this.error(XMLHttpRequest)}.bind(this)).always(function(){status2.loading=!1,this.$form.find("[data-add-to-cart]").removeClass("btn--loading")}.bind(this))}},success:function(product){this.$form.find(".errors").remove(),$("body").trigger("added.ajaxProduct"),document.dispatchEvent(new CustomEvent("added:ajaxProduct",{detail:{product:product}}))},error:function(XMLHttpRequest){this.$form.find(".errors").remove(),XMLHttpRequest.responseJSON&&XMLHttpRequest.responseJSON.description&&(console.warn(XMLHttpRequest.responseJSON.description),$("body").trigger("error.ProductScreen-"+this.productId),document.dispatchEvent(new CustomEvent("error:ajaxProduct",{detail:{errorMessage:XMLHttpRequest.responseJSON.description}})),this.$form.prepend('
'+XMLHttpRequest.responseJSON.description+"
"))}}),ProductForm}(),theme.collapsibles=function(){var selectors={trigger:".collapsible-trigger",module:".collapsible-content",moduleInner:".collapsible-content__inner",tabs:".collapsible-trigger--tab"},classes={hide:"hide",open:"is-open",autoHeight:"collapsible--auto-height",tabs:"collapsible-trigger--tab"},namespace=".collapsible",isTransitioning=!1;function init(){$(selectors.trigger).each(function(){var $el=$(this),state=$el.hasClass(classes.open);$el.attr("aria-expanded",state)}),$("body").off(namespace).on("click"+namespace,selectors.trigger,function(){if(!isTransitioning){isTransitioning=!0;var $el=$(this),isOpen=$el.hasClass(classes.open),isTab=$el.hasClass(classes.tabs),moduleId=$el.attr("aria-controls"),$module=$("#"+moduleId),height=$module.find(selectors.moduleInner).outerHeight(),isAutoHeight=$el.hasClass(classes.autoHeight);if(isTab){if(isOpen){isTransitioning=!1;return}var $newModule;$(selectors.tabs+"[data-id="+$el.data("id")+"]").each(function(){$(this).removeClass(classes.open),$newModule=$("#"+$(this).attr("aria-controls")),setTransitionHeight($newModule,0,!0)})}isOpen&&isAutoHeight&&setTimeout(function(){height=0,setTransitionHeight($module,height,isOpen,isAutoHeight)},0),isOpen&&!isAutoHeight&&(height=0),$el.attr("aria-expanded",!isOpen).toggleClass(classes.open,!isOpen),setTransitionHeight($module,height,isOpen,isAutoHeight)}})}function setTransitionHeight($module,height,isOpen,isAutoHeight){if($module.removeClass(classes.hide).prepareTransition().css("height",height).toggleClass(classes.open,!isOpen),!isOpen&&isAutoHeight){var o=$module;window.setTimeout(function(){o.css("height","auto"),isTransitioning=!1},0)}else isTransitioning=!1}return{init:init}}(),theme.headerNav=function(){var selectors={wrapper:".header-wrapper",siteHeader:".site-header",logoContainer:".site-header__logo",logo:".site-header__logo img",navigation:".site-navigation",navContainerWithLogo:".header-item--logo",navItems:".site-nav__item",navLinks:".site-nav__link",navLinksWithDropdown:".site-nav__link--has-dropdown",navDropdownLinks:".site-nav__dropdown-link--second-level",thumbMenu:".site-nav__thumb-menu"},classes={hasDropdownClass:"site-nav--has-dropdown",hasSubDropdownClass:"site-nav__deep-dropdown-trigger",dropdownActive:"is-focused",stickyCartActive:"body--sticky-cart-open",overlayEnabledClass:"header-wrapper--overlay",overlayedClass:"is-light",thumbMenuInactive:"site-nav__thumb-menu--inactive",stickyClass:"site-header--sticky",overlayStickyClass:"header-wrapper--sticky",openTransitionClass:"site-header--opening"},config={namespace:".siteNav",overlayHeader:!1,stickyActive:!1,forceStickyOnMobile:!1,forceCloseThumbNav:!1},$window,$navContainerWithLogo,$logoContainer,$nav,$wrapper,$siteHeader;function init(){$window=$(window),$navContainerWithLogo=$(selectors.navContainerWithLogo),$logoContainer=$(selectors.logoContainer),$nav=$(selectors.navigation),$wrapper=$(selectors.wrapper),$siteHeader=$(selectors.siteHeader),config.overlayHeader=theme.settings.overlayHeader=$siteHeader.data("overlay"),accessibleDropdowns();var searchModal=new theme.Modals("SearchModal","search-modal",{closeOffContentClick:!1,focusOnOpen:"#SearchModalInput"});$window.on("resize"+config.namespace,$.debounce(150,headerResize)).on("load"+config.namespace,headerLoad),setHeaderStyle(),$window.on("scroll"+config.namespace,$.throttle(150,stickyMenuOnScroll)),Shopify.designMode&&$window.trigger("resize")}function headerLoad(){resizeLogo(),initStickyThumbMenu(),config.headerStyle==="bar"&&initStickyBarMenu()}function headerResize(){resizeLogo(),setHeaderStyle(),config.headerStyle==="bar"&&initStickyBarMenu()}function setHeaderStyle(){theme.config.bpSmall?config.headerStyle="button":config.headerStyle=$wrapper.data("header-style"),config.stickyThreshold=config.headerStyle==="button"?100:250,config.headerStyle!=="button"&&toggleThumbMenu(!1)}function unload(){$(window).off(config.namespace),$(selectors.navLinks).off(config.namespace),$(selectors.navDropdownLinks).off(config.namespace)}function resizeLogo(){$(selectors.logo).each(function(){var $el=$(this),logoWidthOnScreen=$el.width(),containerWidth=$el.closest(".grid__item").width();logoWidthOnScreen>containerWidth?$el.css("maxWidth",containerWidth):$el.removeAttr("style")})}function accessibleDropdowns(){var hasActiveDropdown=!1,hasActiveSubDropdown=!1,closeOnClickActive=!1;theme.config.isTouch&&($(selectors.navLinksWithDropdown).on("touchend"+config.namespace,function(evt){var $el=$(this),$parentItem=$el.parent();$parentItem.hasClass(classes.dropdownActive)?window.location.replace($el.attr("href")):(evt.preventDefault(),closeDropdowns(),openFirstLevelDropdown($el))}),$(selectors.navDropdownLinks).on("touchend"+config.namespace,function(evt){var $el=$(this),$parentItem=$el.parent();$parentItem.hasClass(classes.hasSubDropdownClass)?$parentItem.hasClass(classes.dropdownActive)?window.location.replace($el.attr("href")):(evt.preventDefault(),closeThirdLevelDropdown(),openSecondLevelDropdown($el)):window.location.replace($el.attr("href"))})),$(selectors.navLinks).on("focusin mouseover"+config.namespace,function(){hasActiveDropdown&&closeSecondLevelDropdown(),hasActiveSubDropdown&&closeThirdLevelDropdown(),openFirstLevelDropdown($(this))}),$(selectors.navLinks).on("mouseleave"+config.namespace,function(){closeDropdowns()}),$(selectors.navDropdownLinks).on("focusin"+config.namespace,function(){closeThirdLevelDropdown(),openSecondLevelDropdown($(this),!0)});function openFirstLevelDropdown($el){var $parentItem=$el.parent();if($parentItem.hasClass(classes.hasDropdownClass)&&($parentItem.addClass(classes.dropdownActive),hasActiveDropdown=!0),!theme.config.isTouch&&!closeOnClickActive){var eventType=theme.config.isTouch?"touchend":"click";closeOnClickActive=!0,$("body").on(eventType+config.namespace,function(){closeDropdowns(),$("body").off(config.namespace),closeOnClickActive=!1})}}function openSecondLevelDropdown($el,skipCheck){var $parentItem=$el.parent();($parentItem.hasClass(classes.hasSubDropdownClass)||skipCheck)&&($parentItem.addClass(classes.dropdownActive),hasActiveSubDropdown=!0)}function closeDropdowns(){closeSecondLevelDropdown(),closeThirdLevelDropdown()}function closeSecondLevelDropdown(){$(selectors.navItems).removeClass(classes.dropdownActive)}function closeThirdLevelDropdown(){$(selectors.navDropdownLinks).parent().removeClass(classes.dropdownActive)}}function initStickyBarMenu(){$siteHeader.wrap('
'),!config.overlayHeader&&(stickyHeaderHeight(),setTimeout(function(){stickyHeaderHeight(),$(".site-header-sticky").outerHeight()===0&&setTimeout(function(){$window.trigger("resize")},500)},200),$window.on("resize"+config.namespace,$.debounce(50,stickyHeaderHeight)))}function stickyHeaderHeight(){$(".site-header-sticky").css("height",$siteHeader.outerHeight(!0))}function initStickyThumbMenu(){$("body").hasClass(classes.stickyCartActive)||theme.config.bpSmall&&theme.template!=="product"&&setTimeout(function(){config.forceStickyOnMobile=!0,toggleThumbMenu(!0)},25)}function stickyMenuOnScroll(evt){var scroll=$window.scrollTop();if(scroll>config.stickyThreshold){if(config.forceStickyOnMobile&&(config.forceStickyOnMobile=!1),config.stickyActive)return;config.headerStyle==="button"?toggleThumbMenu(!0):config.headerStyle==="bar"&&toggleBarMenu(!0)}else{if(config.forceStickyOnMobile||!config.stickyActive)return;config.headerStyle==="button"?theme.config.bpSmall||toggleThumbMenu(!1):config.headerStyle==="bar"&&toggleBarMenu(!1)}}function toggleThumbMenu(active,forceClose){config.forceCloseThumbNav||$(".slide-nav__overflow--thumb").hasClass("js-menu--is-open")||($(selectors.thumbMenu).toggleClass(classes.thumbMenuInactive,!active),config.stickyActive=active,config.forceCloseThumbNav=forceClose)}function toggleBarMenu(active){config.headerStyle==="bar"&&(active?($siteHeader.addClass(classes.stickyClass),config.overlayHeader&&$wrapper.removeClass(classes.overlayedClass).addClass(classes.overlayStickyClass),setTimeout(function(){$siteHeader.addClass(classes.openTransitionClass)},100)):($siteHeader.removeClass(classes.openTransitionClass).removeClass(classes.stickyClass),config.overlayHeader&&$wrapper.addClass(classes.overlayedClass).removeClass(classes.overlayStickyClass)),config.stickyActive=active)}function disableOverlayHeader(){$(selectors.wrapper).removeClass(classes.overlayEnabledClass).removeClass(classes.overlayedClass)}return{init:init,disableOverlayHeader:disableOverlayHeader,toggleThumbMenu:toggleThumbMenu,unload:unload}}(),theme.slideNav=function(){var selectors={container:"#PageContainer",navWrapper:".slide-nav__overflow",nav:"#SlideNav",toggleBtn:".js-toggle-slide-nav",subNavToggleBtn:".js-toggle-submenu",thumbNavToggle:".site-nav__thumb-button"},classes={subNavLink:"slide-nav__sublist-link",return:"slide-nav__return-btn",isActive:"is-active",isOpen:"js-menu--is-open",subNavShowing:"sub-nav--is-open",thirdNavShowing:"third-nav--is-open"},namespace=".slideNav",isTransitioning,$activeSubNav,$activeTrigger,pageSlide=!0,menuLevel=1;function init(){$(selectors.thumbNavToggle).length&&(pageSlide=!1),$(selectors.toggleBtn).on("click"+namespace,toggleNav),$(selectors.subNavToggleBtn).on("click"+namespace,toggleSubNav)}function toggleNav(){$(selectors.toggleBtn).hasClass(classes.isActive)?closeNav():openNav()}function openNav(){$(selectors.toggleBtn).addClass(classes.isActive),$(selectors.navWrapper).prepareTransition().addClass(classes.isOpen),pageSlide&&$(selectors.container).css({transform:"translate3d(0, "+$(selectors.navWrapper).height()+"px, 0)"}),$(selectors.navWrapper).attr("tabindex","-1").focus(),$(window).on("keyup"+namespace,function(evt){evt.which===27&&closeNav()})}function closeNav(){$(selectors.toggleBtn).removeClass(classes.isActive),$(selectors.navWrapper).prepareTransition().removeClass(classes.isOpen),pageSlide&&$(selectors.container).removeAttr("style"),$(selectors.toggleBtn).focus(),$(window).off("keyup"+namespace)}function toggleSubNav(evt){if(!isTransitioning){var $toggleBtn=$(evt.currentTarget),isReturn=$toggleBtn.hasClass(classes.return);isTransitioning=!0,isReturn?($(classes.toggleBtn+'[data-level="'+(menuLevel-1)+'"]').removeClass(classes.isActive),$('.slide-nav__dropdown[data-level="'+menuLevel+'"]').prepareTransition().removeClass(classes.isActive),$activeTrigger&&$activeTrigger.length&&$activeTrigger.removeClass(classes.isActive)):($toggleBtn.addClass(classes.isActive),$toggleBtn.next(".slide-nav__dropdown").prepareTransition().addClass(classes.isActive)),$activeTrigger=$toggleBtn,goToSubnav($toggleBtn.data("target"))}}function goToSubnav(target){var $targetMenu=$(target?'.slide-nav__dropdown[data-parent="'+target+'"]':selectors.nav);menuLevel=$targetMenu.data("level")?$targetMenu.data("level"):1,$activeSubNav=$targetMenu;var $elementToFocus=target?$targetMenu.find("."+classes.subNavLink+":first"):$activeTrigger,translateMenuHeight=$targetMenu.outerHeight(),openNavClass=menuLevel>2?classes.thirdNavShowing:classes.subNavShowing;$(selectors.navWrapper).css("height",translateMenuHeight).removeClass(classes.thirdNavShowing).addClass(openNavClass),target||$(selectors.navWrapper).removeClass(classes.thirdNavShowing).removeClass(classes.subNavShowing),isTransitioning=!1,pageSlide&&$(selectors.container).css({transform:"translate3d(0, "+translateMenuHeight+"px, 0)"})}function unload(){$(window).off(namespace),$(selectors.toggleBtn).off(namespace),$(selectors.subNavToggleBtn).off(namespace)}return{init:init,unload:unload}}(),theme.articleImages=function(){var cache={};function init(){cache.$rteImages=$(".rte--indented-images"),cache.$rteImages.length&&$(window).on("load",setImages)}function setImages(){cache.$rteImages.find("img").each(function(){var $el=$(this),attr=$el.attr("style");(!attr||attr=="float: none;")&&$el.width()-1){$('.screen-layer--product[data-product-id="'+id+'"]').slice(1).remove();return}ids.push(id)}),ids}function getIdsFromTriggers($triggers){var ids=[];return $triggers.each(function(){var id=$(this).data("product-id");ids.push(id)}),ids}function initProductScreens(ids){for(var screenId,$screenLayer,screens=[],i=0;i0,isVisible=this.cache.$disclosureList.hasClass(classes.listVisible);isVisible&&!childInFocus&&this._hideList()}.bind(this)),this.$container.on("keyup",function(evt){evt.which===27&&(this._hideList(),this.cache.$disclosureToggle.focus())}.bind(this)),$("body").on("click",function(evt){var isOption=this.$container.has(evt.target).length>0,isVisible=this.cache.$disclosureList.hasClass(classes.listVisible);isVisible&&!isOption&&this._hideList()}.bind(this))},_submitForm:function(value){$("body").addClass("unloading"),this.cache.$disclosureInput.val(value),this.$container.parents("form").submit()},_hideList:function(){this.cache.$disclosureList.removeClass(classes.listVisible),this.cache.$disclosureToggle.attr("aria-expanded",!1)},unload:function(){this.cache.$disclosureOptions.off(),this.cache.$disclosureToggle.off(),this.cache.$disclosureList.off(),this.$container.off()}}),Disclosure}(),theme.ProductMedia=function(){var modelJsonSections={},models={},xrButtons={},selectors={mediaGroup:"[data-product-single-media-group]",xrButton:"[data-shopify-xr]"};function init(modelViewerContainers,sectionId){modelJsonSections[sectionId]={loaded:!1},modelViewerContainers.each(function(index){var $modelViewerContainer=$(this),mediaId=$modelViewerContainer.data("media-id"),$modelViewerElement=$($modelViewerContainer.find("model-viewer")[0]),modelId=$modelViewerElement.data("model-id");if(index===0){var $xrButton=$modelViewerContainer.closest(selectors.mediaGroup).find(selectors.xrButton);xrButtons[sectionId]={$element:$xrButton,defaultId:modelId}}models[mediaId]={modelId:modelId,sectionId:sectionId,$container:$modelViewerContainer,$element:$modelViewerElement}}),window.Shopify.loadFeatures([{name:"shopify-xr",version:"1.0",onLoad:setupShopifyXr},{name:"model-viewer-ui",version:"1.0",onLoad:setupModelViewerUi}]),theme.LibraryLoader.load("modelViewerUiStyles")}function setupShopifyXr(errors){if(!errors){if(!window.ShopifyXR){document.addEventListener("shopify_xr_initialized",function(){setupShopifyXr()});return}for(var sectionId in modelJsonSections)if(modelJsonSections.hasOwnProperty(sectionId)){var modelSection=modelJsonSections[sectionId];if(modelSection.loaded)continue;var $modelJson=$("#ModelJson-"+sectionId);window.ShopifyXR.addModels(JSON.parse($modelJson.html())),modelSection.loaded=!0}window.ShopifyXR.setupXRElements()}}function setupModelViewerUi(errors){if(!errors){for(var key2 in models)if(models.hasOwnProperty(key2)){var model=models[key2];model.modelViewerUi||(model.modelViewerUi=new Shopify.ModelViewerUI(model.$element)),setupModelViewerListeners(model)}}}function setupModelViewerListeners(model){var xrButton=xrButtons[model.sectionId];model.$container.on("mediaVisible",function(){xrButton.$element.attr("data-shopify-model3d-id",model.modelId),!theme.config.isTouch&&model.modelViewerUi.play()}),model.$container.on("mediaHidden",function(){xrButton.$element.attr("data-shopify-model3d-id",xrButton.defaultId),model.modelViewerUi.pause()}).on("xrLaunch",function(){model.modelViewerUi.pause()})}function removeSectionModels(sectionId){for(var key2 in models)if(models.hasOwnProperty(key2)){var model=models[key2];model.sectionId===sectionId&&delete models[key2]}delete modelJsonSections[sectionId]}return{init:init,removeSectionModels:removeSectionModels}}(),theme.customerTemplates=function(){function initEventListeners(){$("#RecoverPassword").on("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()}),$("#HideRecoverPasswordLink").on("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()})}function toggleRecoverPasswordForm(){$("#RecoverPasswordForm").toggleClass("hide"),$("#CustomerLoginForm").toggleClass("hide")}function resetPasswordSuccess(){var $formState=$(".reset-password-success");$formState.length&&$("#ResetSuccess").removeClass("hide")}function customerAddressForm(){var $newAddressForm=$("#AddressNewForm"),$addressForms=$(".js-address-form");!$newAddressForm.length||!$addressForms.length||(Shopify&&$(".js-address-country").each(function(){var $container=$(this),countryId=$container.data("country-id"),provinceId=$container.data("province-id"),provinceContainerId=$container.data("province-container-id");new Shopify.CountryProvinceSelector(countryId,provinceId,{hideElement:provinceContainerId})}),$(".address-new-toggle").on("click",function(){$newAddressForm.toggleClass("hide")}),$(".address-edit-toggle").on("click",function(){var formId=$(this).data("form-id");$("#EditAddress_"+formId).toggleClass("hide")}),$(".address-delete").on("click",function(){var $el=$(this),formId=$el.data("form-id"),confirmMessage=$el.data("confirm-message");confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify.postLink("/account/addresses/"+formId,{parameters:{_method:"delete"}})}))}function checkUrlHash(){var hash=window.location.hash;hash==="#recover"&&toggleRecoverPasswordForm()}return{init:function(){checkUrlHash(),initEventListeners(),resetPasswordSuccess(),customerAddressForm()}}}(),theme.Product=function(){var classes={onSale:"sale-price",disabled:"disabled",isModal:"is-modal",loading:"loading",loaded:"loaded",hidden:"hide",interactable:"video-interactable",visuallyHide:"visually-invisible",thumbActive:"thumb--current"},selectors={variantsJson:"[data-variant-json]",currentVariantJson:"[data-current-variant-json]",imageContainer:"[data-product-images]",mainSlider:"[data-product-photos]",thumbSlider:"[data-product-thumbs]",photo:"[data-product-photo]",photoThumbs:"[data-product-thumb]",photoThumbItem:"[data-product-thumb-item]",zoomButton:".product__photo-zoom",priceWrapper:"[data-price-wrapper]",price:"[data-product-price]",comparePrice:"[data-product-price-compare]",priceA11y:"[data-price-a11y]",comparePriceA11y:"[data-compare-a11y]",sku:"[data-sku]",inventory:"[data-product-inventory]",incomingInventory:"[data-product-incoming-inventory]",unitWrapper:"[data-product-unit-wrapper]",addToCart:"[data-add-to-cart]",addToCartText:"[data-add-to-cart-text]",originalSelectorId:"[data-product-select]",singleOptionSelector:"[data-variant-input]",variantColorSwatch:"[data-color-swatch]",productImageMain:".product-image-main",dotsContainer:".product__photo-dots",productVideo:"[data-product-video]",videoParent:".product__video-wrapper",currentSlide:".slick-current",startingSlide:".starting-slide",media:"[data-product-media-type-model]",closeMedia:".product-single__close-media",modalFormHolder:"#ProductFormPlaceholder-",formContainer:".product-single__form"},youtubeReady,videos={},youtubePlayers=[],youtubeVideoOptions={height:"480",width:"850",playerVars:{autohide:0,autoplay:0,branding:0,cc_load_policy:0,controls:0,fs:0,iv_load_policy:3,modestbranding:1,playsinline:1,quality:"hd720",rel:0,showinfo:0,wmode:"opaque"}};function onVideoPlayerReady(evt,id){var $player=$("#"+id),playerId=$player.attr("id");youtubePlayers[playerId]=evt.target;var player=youtubePlayers[playerId];setParentAsLoading($player),videos[playerId].style==="muted"&&youtubePlayers[playerId].mute(),setParentAsLoaded($player),($player.closest(selectors.startingSlide).length||$player.data("image-count")===1)&&videos[playerId].style==="muted"&&(youtubePlayers[playerId].playVideo(),initCheckVisibility(playerId))}function initCheckVisibility(playerId){playerId&&(videoVisibilityCheck(playerId),$(window).on("scroll."+playerId,{id:playerId},$.throttle(150,videoVisibilityCheck)))}function videoVisibilityCheck(id){var playerId;if(id){if(typeof id=="string")playerId=id;else{if(!id.data)return;playerId=id.data.id}if(theme.isElementVisible($("#"+playerId))){if(videos[playerId]&&videos[playerId].style==="unmuted")return;playVisibleVideo(playerId)}else pauseHiddenVideo(playerId)}}function playVisibleVideo(id){youtubePlayers[id]&&typeof youtubePlayers[id].playVideo=="function"&&youtubePlayers[id].playVideo()}function pauseHiddenVideo(id){youtubePlayers[id]&&typeof youtubePlayers[id].pauseVideo=="function"&&youtubePlayers[id].pauseVideo()}function onVideoStateChange(evt,id){var $player=$("#"+id),playerId=$player.attr("id"),player=youtubePlayers[playerId];switch(evt.data){case-1:videos[playerId].attemptedToPlay&&(setParentAsLoaded($player),setVideoToBeInteractedWith($player));break;case 0:videos[playerId]&&videos[playerId].loop&&player.playVideo();break;case 1:setParentAsLoaded($player);break;case 3:videos[playerId].attemptedToPlay=!0;break}}function setParentAsLoading($el){$el.closest(selectors.videoParent).addClass(classes.loading)}function setParentAsLoaded($el){$el.closest(selectors.videoParent).removeClass(classes.loading).addClass(classes.loaded)}function setVideoToBeInteractedWith($el){$el.closest(selectors.videoParent).addClass(classes.interactable)}function Product(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id");this.inModal=$container.closest(".screen-layer").length,this.$modal,this.namespace=".product-"+sectionId,this.namespaceImages=".product-image-"+sectionId,this.settings={enableHistoryState:$container.data("enable-history-state")||!1,namespace:".product-"+sectionId,variantType:$container.data("variant-type"),inventory:$container.data("inventory")||!1,inventoryThreshold:$container.data("inventory-threshold")||!1,incomingInventory:$container.data("incoming-inventory")||!1,modalInit:!1,slickMainInitialized:!1,slickThumbInitialized:!1,hasImages:!0,hasVideos:$container.find(selectors.productVideo).length||!1,videoStyle:$container.data("video-style"),has3d:!1,hasMultipleImages:!1,stackedImages:$container.data("images-stacked")||!1,stackedCurrent:0,stackedImagePositions:[],imageSize:"620x",videoLooping:$container.data("video-looping")},this.videos={},this.inModal&&(this.settings.enableHistoryState=!1,this.namespace=".product-"+sectionId+"-modal",this.$modal=$("#ProductScreen-"+sectionId)),this.init()}return Product.prototype=$.extend({},Product.prototype,{init:function(){this.$mainSlider=$(selectors.mainSlider,this.$container),this.$thumbSlider=$(selectors.thumbSlider,this.$container),this.$firstProductImage=this.$mainSlider.find("img").first(),this.$formHolder=$(selectors.modalFormHolder+this.sectionId),this.$firstProductImage.length||(this.settings.hasImages=!1),this.inModal&&(this.$container.addClass(classes.isModal),$("body").off("productModalOpen.ProductScreen-"+this.sectionId).off("productModalClose.ProductScreen-"+this.sectionId),$("body").on("productModalOpen.ProductScreen-"+this.sectionId,this.openModalProduct.bind(this)),$("body").on("productModalClose.ProductScreen-"+this.sectionId,this.closeModalProduct.bind(this))),this.inModal||(this.stringOverrides(),this.formSetup(),this.preImageSetup(),this.checkIfVideos(),this.imageSetup(!0))},formSetup:function(){theme.settings.dynamicVariantsEnable&&(this.$variantSelectors=$(selectors.formContainer,this.$container).find(selectors.singleOptionSelector)),this.initAjaxProductForm(),this.initVariants()},stringOverrides:function(){theme.productStrings=theme.productStrings||{},$.extend(theme.strings,theme.productStrings)},initVariants:function(){var $variantJson=$(selectors.variantsJson,this.$container);if($variantJson.length){this.variantsObject=JSON.parse($variantJson[0].innerHTML);var options={$container:this.$container,enableHistoryState:this.settings.enableHistoryState,singleOptionSelector:selectors.singleOptionSelector,originalSelectorId:selectors.originalSelectorId,variants:this.variantsObject};$(selectors.variantColorSwatch,this.$container).length&&$(selectors.variantColorSwatch,this.$container).on("change",function(evt){var $el=$(evt.currentTarget),color=$el.data("color-name"),index=$el.data("color-index");this.updateColorName(color,index)}.bind(this)),this.variants=new theme.Variants(options),this.$container.on("variantChange"+this.namespace,this.updateCartButton.bind(this)).on("variantImageChange"+this.namespace,this.updateVariantImage.bind(this)).on("variantPriceChange"+this.namespace,this.updatePrice.bind(this)).on("variantUnitPriceChange"+this.namespace,this.updateUnitPrice.bind(this)),$(selectors.sku,this.$container).length&&this.$container.on("variantSKUChange"+this.namespace,this.updateSku.bind(this)),(this.settings.inventory||this.settings.incomingInventory)&&this.$container.on("variantChange"+this.namespace,this.updateInventory.bind(this));var $currentVariantJson=$(selectors.currentVariantJson,this.$container);theme.settings.dynamicVariantsEnable&&$currentVariantJson.length&&(this.currentVariantObject=JSON.parse($currentVariantJson[0].innerHTML),this.$variantSelectors.on("change"+this.namespace,this.updateVariantAvailability.bind(this)),this.setCurrentVariantAvailability(this.currentVariantObject,!0))}},initAjaxProductForm:function(){(theme.settings.cartType==="drawer"||theme.settings.cartType==="sticky")&&new theme.AjaxProduct($(selectors.formContainer,this.$container))},updateColorName:function(color,index){$("#VariantColorLabel-"+this.sectionId+"-"+index).text(color)},updateCartButton:function(evt){var variant=evt.variant;variant?variant.available?($(selectors.addToCart,this.$container).removeClass(classes.disabled).prop("disabled",!1),$(selectors.addToCartText,this.$container).html(theme.strings.addToCart)):($(selectors.addToCart,this.$container).addClass(classes.disabled).prop("disabled",!0),$(selectors.addToCartText,this.$container).html(theme.strings.soldOut)):($(selectors.addToCart,this.$container).addClass(classes.disabled).prop("disabled",!0),$(selectors.addToCartText,this.$container).html(theme.strings.unavailable))},updatePrice:function(evt){var variant=evt.variant;variant&&($(selectors.price,this.$container).html(theme.Currency.formatMoney(variant.price,theme.settings.moneyFormat)).show(),variant.compare_at_price>variant.price?($(selectors.comparePrice,this.$container).html(theme.Currency.formatMoney(variant.compare_at_price,theme.settings.moneyFormat)),$(selectors.priceWrapper,this.$container).removeClass("hide"),$(selectors.price,this.$container).addClass(classes.onSale),$(selectors.comparePriceA11y,this.$container).attr("aria-hidden","false"),$(selectors.priceA11y,this.$container).attr("aria-hidden","false")):($(selectors.priceWrapper,this.$container).addClass("hide"),$(selectors.price,this.$container).removeClass(classes.onSale),$(selectors.comparePriceA11y,this.$container).attr("aria-hidden","true"),$(selectors.priceA11y,this.$container).attr("aria-hidden","true")))},updateUnitPrice:function(evt){var variant=evt.variant;if(variant&&variant.unit_price){var price=theme.Currency.formatMoney(variant.unit_price,theme.settings.moneyFormat),base=theme.Currency.getBaseUnit(variant);$(selectors.unitWrapper,this.$container).html(price+"/"+base).removeClass("hide").removeClass(classes.visuallyHide)}else $(selectors.unitWrapper,this.$container).addClass(classes.visuallyHide)},updateSku:function(evt){var variant=evt.variant,newSku="";variant&&(variant.sku&&(newSku=variant.sku),$(selectors.sku,this.$container).html(newSku))},updateInventory:function(evt){var variant=evt.variant;if(!variant||!variant.inventory_management){this.toggleInventoryQuantity(!1),this.toggleIncomingInventory(!1);return}if(variant.inventory_management==="shopify"&&window.inventories&&window.inventories[this.sectionId]){variantInventoryObject=window.inventories[this.sectionId][variant.id];var quantity=variantInventoryObject.quantity,showInventory=!0,showIncomingInventory=!1;(quantity<=0||quantity>this.settings.inventoryThreshold)&&(showInventory=!1),this.toggleInventoryQuantity(showInventory,quantity),!showInventory&&variantInventoryObject.incoming&&(showIncomingInventory=!0),this.toggleIncomingInventory(showIncomingInventory,variant.available,variantInventoryObject.next_incoming_date)}},toggleInventoryQuantity:function(show,qty){this.settings.inventory||(show=!1),show?$(selectors.inventory,this.$container).removeClass("hide").text(theme.strings.stockLabel.replace("[count]",qty)):$(selectors.inventory,this.$container).addClass("hide")},toggleIncomingInventory:function(show,available,date){if(this.settings.incomingInventory||(show=!1),show){var string=available?theme.strings.willNotShipUntil.replace("[date]",date):theme.strings.willBeInStockAfter.replace("[date]",date);date||(string=theme.strings.waitingForStock),$(selectors.incomingInventory,this.$container).removeClass("hide").text(string)}else $(selectors.incomingInventory,this.$container).addClass("hide")},checkIfVideos:function(){var $productVideos=this.$mainSlider.find(selectors.productVideo);if(!$productVideos.length)return!1;var videoTypes=[];return $productVideos.each(function(){var type=$(this).data("video-type");videoTypes.indexOf(type)<0&&videoTypes.push(type)}),videoTypes.indexOf("youtube")>-1&&(theme.config.youTubeReady?this.loadYoutubeVideos($productVideos):(theme.LibraryLoader.load("youtubeSdk"),$("body").on("youTubeReady"+this.namespace,function(){this.loadYoutubeVideos($productVideos)}.bind(this)))),videoTypes.indexOf("mp4")>-1&&this.loadMp4Videos($productVideos),videoTypes},initVideo:function($video){var videoType=$video.data("video-type"),divId=$video.attr("id");videoType==="mp4"&&videos[divId].style==="muted"&&this.playMp4Video(divId),videoType==="youtube"&&youtubeReady&&videos[divId].style==="muted"&&this.requestToPlayYoutubeVideo(divId),this.inModal&&this.resizeSlides()},stopVideo:function(id,type){id||(this.stopYoutubeVideo(),this.stopMp4Video()),type==="youtube"&&this.stopYoutubeVideo(id),type==="mp4"&&this.stopMp4Video(id)},getVideoType:function($video){return $video.data("video-type")},getVideoId:function($video){return $video.attr("id")},loadMp4Videos:function($videos){$videos.each(function(evt,el){var $el=$(el);if($el.data("video-type")=="mp4"){var id=$el.attr("id"),videoId=$el.data("video-id");videos[id]=this.videos[id]={type:"mp4",divId:id,style:$el.data("video-style")}}}.bind(this))},loadYoutubeVideos:function($videos){$videos.each(function(evt,el){var $el=$(el);if($el.data("video-type")=="youtube"){var id=$el.attr("id"),videoId=$el.data("youtube-id");videos[id]=this.videos[id]={type:"youtube",id:id,videoId:videoId,style:$el.data("video-style"),loop:$el.data("video-loop"),attemptedToPlay:!1,events:{onReady:function(evt2){onVideoPlayerReady(evt2,id)},onStateChange:function(evt2){onVideoStateChange(evt2,id)}}}}}.bind(this));for(var key2 in videos)if(videos[key2].type==="youtube"&&videos.hasOwnProperty(key2)){var args=$.extend({},youtubeVideoOptions,videos[key2]);args.style==="muted"||(args.playerVars.controls=1,args.playerVars.autoplay=0),youtubePlayers[key2]||(youtubePlayers[key2]=new YT.Player(key2,args))}youtubeReady=!0},requestToPlayYoutubeVideo:function(id,forcePlay){if(theme.config.youTubeReady){var $player=$("#"+id);if(setParentAsLoading($player),typeof youtubePlayers[id].playVideo!="function"){setTimeout(function(){this.playYoutubeVideo(id,forcePlay)}.bind(this),1e3);return}this.playYoutubeVideo(id,forcePlay)}},playYoutubeVideo:function(id,forcePlay){var $player=$("#"+id);setParentAsLoaded($player),typeof youtubePlayers[id].playVideo=="function"&&youtubePlayers[id].playVideo(),forcePlay||initCheckVisibility(id)},stopYoutubeVideo:function(id){if(theme.config.youTubeReady)if(id&&youtubePlayers[id])typeof youtubePlayers[id].pauseVideo=="function"&&youtubePlayers[id].pauseVideo(),$(window).off("scroll."+id);else for(key in youtubePlayers){var $childVideo=this.$container.find("#"+key);$childVideo.length&&typeof youtubePlayers[key].pauseVideo=="function"&&(youtubePlayers[key].pauseVideo(),$(window).off("scroll."+key))}},playMp4Video:function(id){var $player=$("#"+id);setParentAsLoaded($player);var playPromise=$player[0].play();playPromise!==void 0&&playPromise.then(function(){}).catch(function(error){$player[0].setAttribute("controls",""),$player.closest(selectors.videoParent).attr("data-video-style","unmuted")})},stopMp4Video:function(id){if(id)$("#"+id)[0].pause();else for(var key2 in videos){var childVideo=this.$container.find("#"+key2);if(childVideo.length&&videos[key2].type==="mp4"){var player=$("#"+videos[key2].divId)[0];player&&typeof player.pause=="function"&&player.pause()}}},setCurrentVariantAvailability:function(variant){var valuesToEnable={option1:[],option2:[],option3:[]};this.disableVariantGroup($(selectors.formContainer,this.$container).find(".variant-input-wrap"));var availableVariants=this.variantsObject.filter(function(el){if(variant.id===el.id)return!1;if(variant.option2===el.option2&&variant.option3===el.option3||variant.option1===el.option1&&variant.option3===el.option3||variant.option1===el.option1&&variant.option2===el.option2)return!0}),variantObject={variant:variant};availableVariants=Object.assign({},variantObject,availableVariants);for(var property in availableVariants)if(availableVariants.hasOwnProperty(property)){var item=availableVariants[property],option1=item.option1,option2=item.option2,option3=item.option3;option1&&valuesToEnable.option1.indexOf(option1)===-1&&valuesToEnable.option1.push(option1),option2&&valuesToEnable.option2.indexOf(option2)===-1&&valuesToEnable.option2.push(option2),option3&&valuesToEnable.option3.indexOf(option3)===-1&&valuesToEnable.option3.push(option3)}valuesToEnable.option1.length&&this.enableVariantOptionByValue(valuesToEnable.option1,"option1"),valuesToEnable.option2.length&&this.enableVariantOptionByValue(valuesToEnable.option2,"option2"),valuesToEnable.option3.length&&this.enableVariantOptionByValue(valuesToEnable.option3,"option3")},updateVariantAvailability:function(evt,value,index){if(value&&index)var newVal=value,optionIndex=index;else var $el=$(evt.currentTarget),newVal=$el.val()?$el.val():evt.currentTarget.value,optionIndex=$el.data("index");var variants=this.variantsObject.filter(function(el){return el[optionIndex]===newVal});$(selectors.formContainer,this.$container).find(".variant-input-wrap").each(function(index2,el){var $group=$(el),currentOptionIndex=$group.data("index");if(currentOptionIndex!==optionIndex){this.disableVariantGroup($group);for(var i=0;i|\/@])/g,"\\$1"),this.settings.variantType==="dropdown")$group.find('option[value="'+value+'"]').prop("disabled",!1);else{var $buttonGroup=$group.find('.variant-input[data-value="'+value+'"]');$buttonGroup.find("input").prop("disabled",!1),$buttonGroup.find("label").toggleClass("disabled",!1)}},preImageSetup:function(){this.setImageSizes(),this.initImageSwitch(),this.initImageZoom(),this.customMediaListners(),this.initModelViewerLibraries(),this.initShopifyXrLaunch()},imageSetup:function(needStylesheet){if(!this.$thumbSlider.length||$(selectors.photoThumbs,this.$container).length<2){var $video=$(selectors.productImageMain,this.$container).find(selectors.productVideo);$video.length&&this.initVideo($video);return}this.settings.hasMultipleImages=!0,this.settings.has3d=this.$container.find(selectors.media).length,this.settings.videoStyle!=="muted"&&theme.videoModal(!0),needStylesheet?theme.utils.promiseStylesheet().then(function(){this.createImageCarousels()}.bind(this)):this.createImageCarousels()},initImageZoom:function(){var $container=$(selectors.imageContainer,this.$container),imageZoom=new theme.Photoswipe($container,this.sectionId)},setImageSizes:function(){if(this.settings.hasImages){var currentImage=this.$firstProductImage[0].currentSrc;currentImage&&(this.settings.imageSize=theme.Images.imageSize(currentImage))}},updateVariantImage:function(evt){var variant=evt.variant,sizedImgUrl=theme.Images.getSizedImageUrl(variant.featured_media.preview_image.src,this.settings.imageSize),$newImage=$('.product__thumb[data-id="'+variant.featured_media.id+'"]'),imageIndex=this._slideIndex($newImage.closest(".product__thumb-item"));typeof imageIndex!="undefined"&&(!theme.config.bpSmall&&this.settings.stackedImages?this.stackedScrollTo(imageIndex):this.$mainSlider.slick("slickGoTo",imageIndex))},initImageSwitch:function(){$(selectors.photoThumbs,this.$container).length&&$(selectors.photoThumbs,this.$container).on("click",function(evt){if(evt.preventDefault(),!theme.config.bpSmall&&this.settings.stackedImages){var index=$(evt.currentTarget).data("index");this.stackedScrollTo(index)}}.bind(this)).on("focus",function(evt){var index=$(evt.currentTarget).data("index");theme.config.bpSmall||(this.settings.stackedImages?($(selectors.photoThumbItem,this.$container).removeClass(classes.thumbActive),this.stackedScrollTo(index)):this.$mainSlider&&this.settings.slickMainInitialized&&this.$mainSlider.slick("slickGoTo",index))}.bind(this)).on("keydown",function(evt){evt.keyCode===13&&this.$container.find(selectors.currentSlide).focus()}.bind(this))},stackedImagesInit:function(){$(window).off(this.namespaceImages),this.stackedImagePositions(),this.inModal?setTimeout(function(){this.stackedActive(this.settings.stackedCurrent)}.bind(this),1e3):this.stackedActive(this.settings.stackedCurrent),$(window).on("resize"+this.namespaceImages,$.debounce(200,this.stackedImagePositions.bind(this))),$(window).on("scroll"+this.namespaceImages,$.throttle(200,function(){var goal=window.scrollY,closest=this.settings.stackedImagePositions.reduce(function(prev,curr){return Math.abs(curr-goal)-1&&this.$modal.find('.product__video[data-video-type="mp4"]').find(".product__video-src").each(function(i,video){var $el=$(video),src=$el.attr("src"),type=$el.attr("type"),newEl=document.createElement("source");newEl.src=src,newEl.type=type,$el.after(newEl)}.bind(this))},initModelViewerLibraries:function(){var $modelViewerElements=$(selectors.media,this.$container);$modelViewerElements.length<1||theme.ProductMedia.init($modelViewerElements,this.sectionId)},initShopifyXrLaunch:function(){var self=this;$(document).on("shopify_xr_launch",function(){var $currentMedia=$(self.selectors.productMediaWrapper+":not(."+classes.hidden+")",self.$container);$currentMedia.trigger("xrLaunch")})},customMediaListners:function(){$(selectors.closeMedia,this.$container).on("click",function(){this.$container.find(selectors.media).trigger("mediaHidden")}.bind(this)),this.$container.find("model-viewer").on("shopify_model_viewer_ui_toggle_play",function(evt){this.mediaLoaded(evt)}.bind(this)).on("shopify_model_viewer_ui_toggle_pause",function(evt){this.mediaUnloaded(evt)}.bind(this))},mediaLoaded:function(evt){this.$container.find(selectors.closeMedia).removeClass("hide"),this.toggleSliderSwiping(!1)},mediaUnloaded:function(evt){this.$container.find(selectors.closeMedia).addClass("hide"),this.toggleSliderSwiping(!0)},toggleSliderSwiping:function(enable){this.$mainSlider&&this.settings.slickMainInitialized&&(this.$mainSlider.slick("slickSetOption","swipe",enable),this.$mainSlider.slick("slickSetOption","draggable",enable),this.$mainSlider.slick("slickSetOption","touchMove",enable),this.$mainSlider.slick("slickSetOption","accessibility",enable))},onUnload:function(){this.$container.off(this.namespace),$("body").off(this.namespace),$(window).off(this.namespace).off(this.namespaceImages),this.destroyImageCarousels(),theme.ProductMedia.removeSectionModels(this.sectionId);for(var key2 in this.videos)this.videos[key2].type==="youtube"&&this.videos.hasOwnProperty(key2)&&youtubePlayers[key2]&&delete youtubePlayers[key2];AOS&&AOS.refresh()}}),Product}(),theme.Recommendations=function(){function Recommendations(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id");this.url=$container.data("url"),this.selectors={recommendations:"#Recommendations-"+sectionId,placeholder:".product-recommendations-placeholder",sectionClass:" .product-recommendations",productResults:".grid-product"},this.init()}return Recommendations.prototype=$.extend({},Recommendations.prototype,{init:function(){var $section=$(this.selectors.recommendations);if(!(!$section.length||$section.data("enable")===!1)){var $placeholder=$section.find(this.selectors.placeholder),id=$section.data("product-id"),limit=$section.data("limit"),url=this.url+"?section_id=product-recommendations&limit="+limit+"&product_id="+id;$placeholder.load(url+this.selectors.sectionClass,function(data){theme.reinitProductGridItem($section),$(data).find(this.selectors.sectionClass).find(this.selectors.productResults).length===0&&$section.addClass("hide")}.bind(this))}}}),Recommendations}(),theme.FeaturedCollection=function(){var selectors={scrollWrap:"[data-pagination-wrapper]",scrollAnimation:'[data-aos="overflow__animation"]',productContainer:"[data-product-container]",collectionProductContainer:"[data-collection-container]",product:"[data-product-grid]",arrows:"[data-arrow]"},classes={loading:"collection-loading",arrowLeft:"overflow-scroller__arrow--left",disableScrollLeft:"overflow-scroller--disable-left",disableScrollRight:"overflow-scroller--disable-right"};function FeaturedCollection(container){this.$container=$(container),this.sectionId=this.$container.attr("data-section-id"),this.$scrollWrap=$(selectors.scrollWrap,this.$container),this.$scrollArrows=$(selectors.arrows,this.$container),this.namespace=".featured-collection-"+this.sectionId,this.options={scrollable:this.$container.data("scrollable"),paginate:this.$container.data("paginate")};var paginateBy=this.$container.data("paginate-by"),productCount=this.$container.data("collection-count");this.settings={url:this.$container.data("collection-url"),page:1,pageCount:this.options.paginate?Math.ceil(productCount/paginateBy):0,itemsToScroll:3},this.state={isInit:!1,loading:!1,scrollerEnabled:!1,loadedAllProducts:!1,scrollable:this.options.scrollable,scrollInterval:null,scrollSpeed:3},this.sizing={scroller:0,itemWidth:0},theme.utils.promiseStylesheet().then(function(){this.checkVisibility(),$(window).on("scroll"+this.namespace,$.debounce(200,this.checkVisibility.bind(this)))}.bind(this))}return FeaturedCollection.prototype=$.extend({},FeaturedCollection.prototype,{checkVisibility:function(){if(this.state.isInit){this.sizing.scrollSize===0&&this.$scrollWrap.trigger("scroll"+this.namespace),$(window).off("scroll"+this.namespace);return}theme.isElementVisible(this.$container)&&(this.init(),this.state.isInit=!0)},init:function(){new theme.HoverProductGrid(this.$container),this.state.scrollable&&(this.sizing=this.getScrollWidths(),$(window).on("resize"+this.namespace,$.debounce(200,this.handleResize.bind(this))),this.toggleScrollListener(this.state.scrollable),this.arrowListeners(this.state.scrollable))},reInit:function(){new theme.HoverProductGrid(this.$container),this.state.scrollable&&(this.sizing=this.getScrollWidths(),this.toggleScrollListener(this.state.scrollable)),theme.reinitProductGridItem()},loadingState:function(loading){this.state.loading=loading,this.$container.toggleClass(classes.loading,loading)},getScrollWidths:function(){var container=this.$scrollWrap.width(),scroller=this.$scrollWrap[0].scrollWidth,itemWidth=this.$scrollWrap.find(".grid__item").first().outerWidth();return this.state.isInit||(scroller=scroller-200),scroller<=container&&this.disableArrow(null,!0),{scroller:scroller,scrollSize:scroller-container,itemWidth:itemWidth}},handleResize:function(){this.state.scrollable&&(this.sizing=this.getScrollWidths()),this.toggleScrollListener(this.state.scrollable),this.arrowListeners(this.state.scrollable)},toggleScrollListener:function(enable){if(enable){if(this.state.scrollerEnabled)return;this.$scrollWrap.on("scroll"+this.namespace,$.throttle(250,this.scrollCheck.bind(this))),this.state.scrollerEnabled=!0}else this.$scrollWrap.off("scroll"+this.namespace),this.state.scrollerEnabled=!1},scrollCheck:function(evt){if(this.state.loading){this.toggleScrollListener(!1);return}this.sizing.scrollSize===0&&(this.sizing=this.getScrollWidths());var scrollLeft=evt.currentTarget.scrollLeft?evt.currentTarget.scrollLeft:0,percent=Math.floor(scrollLeft/this.sizing.scrollSize*100),fromEnd=this.sizing.scrollSize-scrollLeft;this.options.paginate&&!this.state.loadedAllProducts&&percent>50&&this.getNewProducts(),percent||(percent=0),this.disableArrow(percent)},arrowListeners:function(enable){enable?this.$scrollArrows.removeClass("hide").off(this.namespace).on("click"+this.namespace,this.arrowScroll.bind(this)):this.$scrollArrows.addClass("hide").off(this.namespace)},arrowScroll:function(evt){var direction=$(evt.currentTarget).hasClass(classes.arrowLeft)?"left":"right",iteration=theme.config.bpSmall?1:2;if(evt.type==="mouseenter")this.state.scrollInterval=setInterval(function(){var currentPos2=this.$scrollWrap.scrollLeft(),newPos2=direction==="left"?currentPos2-iteration:currentPos2+iteration;this.$scrollWrap.scrollLeft(newPos2)}.bind(this),this.state.scrollSpeed);else if(evt.type==="mouseleave")clearInterval(this.state.scrollInterval);else if(evt.type==="click"){clearInterval(this.state.scrollInterval);var currentPos=this.$scrollWrap.scrollLeft(),scrollAmount=this.sizing.itemWidth*this.settings.itemsToScroll,newPos=direction==="left"?currentPos-scrollAmount:currentPos+scrollAmount;this.$scrollWrap.stop().animate({scrollLeft:newPos},400,"swing")}newPos<=0&&this.disableArrow(newPos)},disableArrow:function(pos,all){if(this.$scrollArrows.removeClass(classes.disableScrollRight).removeClass(classes.disableScrollLeft),all){this.$scrollArrows.addClass(classes.disableScrollRight).addClass(classes.disableScrollLeft);return}if(pos<=0){this.$scrollArrows.addClass(classes.disableScrollLeft);return}if(pos>=96){this.$scrollArrows.addClass(classes.disableScrollRight);return}},getNewProducts:function(){this.loadingState(!0);var newPage=this.settings.page+1;if(newPage>this.settings.pageCount){this.loadingState(!1),this.state.loadedAllProducts=!0;return}var newUrl=this.settings.url+"?page="+newPage;$.get(newUrl,function(data){var $template=$(data),$newProducts=$template.find(selectors.collectionProductContainer+" .grid-product");$(selectors.productContainer,this.$container).append($newProducts),this.ajaxSuccess()}.bind(this))},ajaxSuccess:function(){this.loadingState(!1),this.settings.page=this.settings.page+1,this.reInit()},forceReload:function(){this.onUnload(),this.init()},onLoad:function(){theme.QuickShopScreens.reInit(this.$container)},onUnload:function(){$(window).off(this.namespace).trigger("resize"),this.$scrollWrap.off(this.namespace),theme.QuickShopScreens.unload(this.$container)}}),FeaturedCollection}(),theme.Collection=function(){var isAnimating=!1,selectors={sortSelect:"#SortBy"},data={sortBy:"data-default-sortby"};function Collection(container){this.container=container,this.sectionId=$(container).attr("data-section-id"),this.namespace=".collection-"+this.sectionId;var hasHeroImage=$(".collection-hero").length;hasHeroImage?this.checkIfNeedReload():theme.settings.overlayHeader&&theme.headerNav.disableOverlayHeader(),$(window).on("popstate",function(state){if(state){if(location.href.indexOf(location.pathname)>=0)return!0;theme.CollectionAjaxFilter(location.href).then(function(){isAnimating=!1})}}.bind(this)),this.init()}return Collection.prototype=$.extend({},Collection.prototype,{init:function(){this.$container=$(this.container),this.sectionId=this.$container.attr("data-section-id"),this.$sortSelect=$(selectors.sortSelect),this.$sortSelect.on("change",this.onSortChange.bind(this)),this.defaultSort=this.getDefaultSortValue(),new theme.HoverProductGrid(this.$container),this.initParams(),this.sortTags()},initParams:function(){if(this.queryParams={},location.search.length)for(var aKeyValue,aCouples=location.search.substr(1).split("&"),i=0;i1&&(this.queryParams[decodeURIComponent(aKeyValue[0])]=decodeURIComponent(aKeyValue[1]))},getSortValue:function(){return this.$sortSelect.val()||this.defaultSort},getDefaultSortValue:function(){return this.$sortSelect.attr(data.sortBy)},onSortChange:function(){this.queryParams.sort_by=this.getSortValue(),this.queryParams.page&&delete this.queryParams.page,window.location.search=$.param(this.queryParams)},sortTags:function(){var $sortTags=$("#SortTags");$sortTags.length&&$sortTags.on("change",function(){location.href=$(this).val()})},checkIfNeedReload:function(){Shopify.designMode&&theme.settings.overlayHeader&&($(".header-wrapper").hasClass("header-wrapper--overlay")||location.reload())},forceReload:function(){this.onUnload(),this.init()},onUnload:function(){$(window).off(this.namespace),this.$container.off(this.namespace)}}),Collection}(),theme.CollectionFilter=function(){var isAnimating=!1,selectors={tags:".tag a",activeTagList:".tag-list--active-tags"},classes={activeTag:"tag--active",removeTagParent:"tag--remove"};function CollectionFilter(container){this.$container=$(container),this.sectionId=this.$container.attr("data-section-id"),this.namespace=".collection-filter-"+this.sectionId,this.settings={combineTags:this.$container.data("combine-tags")},this.initTagAjax()}return CollectionFilter.prototype=$.extend({},CollectionFilter.prototype,{initTagAjax:function(){$("body").on("click",selectors.tags,function(evt){var $el=$(this);if(!$el.hasClass("no-ajax")&&(evt.preventDefault(),!isAnimating)){isAnimating=!0;var $el=$(evt.currentTarget),$parent=$el.parent(),newUrl=$el.attr("href");this.settings.combineTags?$parent.hasClass(classes.activeTag)?$parent.removeClass(classes.activeTag):($parent.hasClass(classes.removeTagParent)?$parent.remove():$(selectors.activeTagList).append('
  • '+$el.text()+"
  • "),$parent.addClass(classes.activeTag)):($(selectors.tags).parent().removeClass(classes.activeTag),$parent.addClass(classes.activeTag)),history.pushState({},"",newUrl),$(".grid-product").addClass("unload"),theme.CollectionAjaxFilter(newUrl).then(function(){isAnimating=!1})}}.bind(this))}}),CollectionFilter}(),theme.CollectionAjaxFilter=function(url){var selectors={filterWrapper:".collection-filter__wrapper",productsWrapper:"#CollectionAjaxContent"};url=url+"?view=ajax";var promise=$.Deferred(function(defer){$.get(url,function(data){var $template=$(data),$filters=$template.find(selectors.filterWrapper);$(selectors.filterWrapper).replaceWith($filters);var $products=$template.find(selectors.productsWrapper);$(selectors.productsWrapper).replaceWith($products),sections.reinitSection("collection-template"),theme.QuickShopScreens.reInit($(selectors.productsWrapper)),theme.reinitProductGridItem($(selectors.productsWrapper)),defer.resolve()})});return promise},theme.HeaderSection=function(){function Header(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id");this.initDrawers(),theme.headerNav.init(),theme.slideNav.init(),sections.reinitSection("slideshow-section")}return Header.prototype=$.extend({},Header.prototype,{initDrawers:function(){$(document.body).hasClass("template-cart")?new theme.AjaxCart("CartPage"):theme.settings.cartType==="drawer"&&new theme.AjaxCart("CartDrawer")},onUnload:function(){theme.headerNav.unload(),theme.slideNav.unload()}}),Header}(),theme.FooterSection=function(){var selectors={disclosureLocale:"[data-disclosure-locale]",disclosureCurrency:"[data-disclosure-currency]"};function Footer(container){var $container=this.$container=$(container);this.cache={},this.cacheSelectors(),this.cache.$localeDisclosure.length&&(this.localeDisclosure=new theme.Disclosure(this.cache.$localeDisclosure)),this.cache.$currencyDisclosure.length&&(this.currencyDisclosure=new theme.Disclosure(this.cache.$currencyDisclosure))}return Footer.prototype=$.extend({},Footer.prototype,{cacheSelectors:function(){this.cache={$localeDisclosure:this.$container.find(selectors.disclosureLocale),$currencyDisclosure:this.$container.find(selectors.disclosureCurrency)}},onUnload:function(){this.cache.$localeDisclosure.length&&this.localeDisclosure.unload(),this.cache.$currencyDisclosure.length&&this.currencyDisclosure.unload()}}),Footer}(),theme.FeaturedContentSection=function(){function FeaturedContent(){$(".rte").find("a:not(:has(img))").addClass("text-link")}return FeaturedContent}(),theme.slideshows={},theme.SlideshowSection=function(){function SlideshowSection(container){var $container=this.$container=$(container),$section=$container.parent(),sectionId=$container.attr("data-section-id"),slideshow=this.slideshow="#Slideshow-"+sectionId,$imageContainer=$(container).find(".hero");$imageContainer.length&&theme.loadImageSection($imageContainer),this.init()}return SlideshowSection.prototype=$.extend({},SlideshowSection.prototype,{init:function(){var args={arrows:$(this.slideshow).data("arrows"),dots:$(this.slideshow).data("dots"),pauseOnHover:!0};theme.slideshows[this.slideshow]=new theme.Slideshow(this.slideshow,args)},forceReload:function(){this.onUnload(),this.init()},onUnload:function(){theme.slideshows[this.slideshow].destroy(),delete theme.slideshows[this.slideshow]},onSelect:function(){$(this.slideshow).slick("slickPause")},onDeselect:function(){$(this.slideshow).slick("slickPlay")},onBlockSelect:function(evt){var $slideshow=$(this.slideshow),$slide=$(".slideshow__slide--"+evt.detail.blockId+":not(.slick-cloned)"),slideIndex=$slide.data("slick-index");$slideshow.slick("slickGoTo",slideIndex).slick("slickPause")},onBlockDeselect:function(){$(this.slideshow).slick("slickPlay")}}),SlideshowSection}(),theme.HeroAnimated=function(){var classes={active:"animated__slide--active",inactive:"animated__slide--inactive"};function HeroAnimated(container){var $container=this.$container=$(container),$section=$container.parent(),sectionId=$container.attr("data-section-id"),imageCount=$container.data("count"),namespace=".hero-animated-"+sectionId,$imageContainer=$(container).find(".hero");if($imageContainer.length&&theme.loadImageSection($imageContainer),this.$allImages=$container.find(".animated__slide"),this.state={active:!1,activeIndex:0},imageCount===1){this.setFades(!0);return}this.interval,this.intervalSpeed=$container.data("interval"),this.maxIndex=imageCount-1,theme.utils.promiseStylesheet().then(function(){this.checkVisibility(),$(window).on("scroll"+namespace,$.throttle(300,this.checkVisibility.bind(this)))}.bind(this))}return HeroAnimated.prototype=$.extend({},HeroAnimated.prototype,{checkVisibility:function(){if(!theme.isElementVisible(this.$container)){this.state.active=!1,clearInterval(this.interval);return}this.state.active||this.initInterval()},initInterval:function(){this.state.active=!0,this.setFades(!0),this.interval=setInterval(function(){this.setFades()}.bind(this),this.intervalSpeed)},setFades:function(first){var nextIndex=this.state.activeIndex===this.maxIndex?0:this.state.activeIndex+1;first&&(nextIndex=this.state.activeIndex),first||this.$allImages.eq(this.state.activeIndex).removeClass(classes.active).addClass(classes.inactive),this.$allImages.eq(nextIndex).removeClass(classes.inactive).addClass(classes.active),this.state.activeIndex=nextIndex},onUnload:function(){clearInterval(this.interval)}}),HeroAnimated}(),theme.VideoSection=function(){var youtubeReady,videos=[],youtubePlayers=[],youtubeVideoOptions={width:1280,height:720,playerVars:{autohide:0,branding:0,cc_load_policy:0,controls:0,fs:0,iv_load_policy:3,modestbranding:1,playsinline:1,quality:"hd720",rel:0,showinfo:0,wmode:"opaque"}},vimeoReady=!1,vimeoVideoOptions={byline:!1,title:!1,portrait:!1,loop:!0},selectors={videoParent:".video-parent-section"},classes={loading:"loading",loaded:"loaded",interactable:"video-interactable"};function videoSection(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id"),youtubePlayerId=this.youtubePlayerId="YouTubeVideo-"+this.sectionId;this.namespace="."+youtubePlayerId;var vimeoPlayerId=this.vimeoPlayerId="Vimeo-"+this.sectionId,$vimeoTrigger=this.$vimeoTrigger=$("#VimeoTrigger-"+this.sectionId),mp4Video="Mp4Video-"+this.sectionId,$youtubeDiv=$("#"+youtubePlayerId),$vimeoDiv=$("#"+vimeoPlayerId),$mp4Div=$("#"+mp4Video);this.vimeoPlayer=[],$youtubeDiv.length&&(this.youtubeVideoId=$youtubeDiv.data("video-id"),this.initYoutubeVideo()),$vimeoDiv.length&&(this.vimeoVideoId=$vimeoDiv.data("video-id"),this.initVimeoVideo()),$mp4Div.length&&startMp4Playback(mp4Video).then(function(){setParentAsLoaded($mp4Div)}).catch(function(error){setParentAsLoaded($mp4Div),setVideoToBeInteractedWith($mp4Div)})}function startMp4Playback(mp4Video){return document.querySelector("#"+mp4Video).play()}function onVideoPlayerReady(evt,id){var $player=$("#"+id),playerId=$player.attr("id");youtubePlayers[playerId]=evt.target;var player=youtubePlayers[playerId];setParentAsLoading($player),youtubePlayers[playerId].mute(),$player.attr("tabindex","-1"),theme.utils.promiseStylesheet().then(function(){videoVisibilityCheck(playerId),$(window).on("scroll."+playerId,{id:playerId},$.throttle(150,videoVisibilityCheck))})}function videoVisibilityCheck(id){var playerId;if(id){if(typeof id=="string")playerId=id;else if(id&&id.data)playerId=id.data.id;else return;theme.isElementVisible($("#"+playerId))?playVisibleVideo(playerId):pauseHiddenVideo(playerId)}}function playVisibleVideo(id){youtubePlayers[id]&&typeof youtubePlayers[id].playVideo=="function"&&youtubePlayers[id].playVideo()}function pauseHiddenVideo(id){youtubePlayers[id]&&typeof youtubePlayers[id].pauseVideo=="function"&&youtubePlayers[id].pauseVideo()}function onVideoStateChange(evt,id){var $player=$("#"+id),playerId=$player.attr("id"),player=youtubePlayers[playerId];switch(evt.data){case-1:videos[playerId].attemptedToPlay&&(setParentAsLoaded($player),setVideoToBeInteractedWith($player));break;case 0:player.playVideo();break;case 1:setParentAsLoaded($player);break;case 3:videos[playerId].attemptedToPlay=!0;break}}function setParentAsLoading($el){$el.closest(selectors.videoParent).addClass(classes.loading)}function setParentAsLoaded($el){$el.closest(selectors.videoParent).removeClass(classes.loading).addClass(classes.loaded)}function setVideoToBeInteractedWith($el){$el.closest(selectors.videoParent).addClass(classes.interactable)}return videoSection.prototype=$.extend({},videoSection.prototype,{initYoutubeVideo:function(){videos[this.youtubePlayerId]={id:this.youtubePlayerId,videoId:this.youtubeVideoId,type:"youtube",attemptedToPlay:!1,events:{onReady:function(evt){onVideoPlayerReady(evt,this.youtubePlayerId)}.bind(this),onStateChange:function(evt){onVideoStateChange(evt,this.youtubePlayerId)}.bind(this)}},youtubeReady?this.loadYoutubeVideo():(theme.LibraryLoader.load("youtubeSdk"),$("body").on("youTubeReady"+this.namespace,this.loadYoutubeVideo.bind(this)))},loadYoutubeVideo:function(){var args=$.extend({},youtubeVideoOptions,videos[this.youtubePlayerId]);args.playerVars.controls=0,youtubePlayers[this.youtubePlayerId]=new YT.Player(this.youtubePlayerId,args),youtubeReady=!0},initVimeoVideo:function(){videos[this.vimeoPlayerId]={divId:this.vimeoPlayerId,id:this.vimeoVideoId,type:"vimeo"};var $player=$("#"+this.vimeoPlayerId);setParentAsLoading($player),this.$vimeoTrigger.on("click",+this.namespace,function(evt){this.requestToPlayVimeoVideo(this.vimeoPlayerId)}.bind(this)),vimeoReady?this.loadVimeoVideo():(window.loadVimeo(),$("body").on("vimeoReady"+this.namespace,this.loadVimeoVideo.bind(this)))},loadVimeoVideo:function(){var args=$.extend({},vimeoVideoOptions,videos[this.vimeoPlayerId]);if(this.vimeoPlayer[this.vimeoPlayerId]=new Vimeo.Player(videos[this.vimeoPlayerId].divId,args),vimeoReady=!0,!theme.config.bpSmall)this.requestToPlayVimeoVideo(this.vimeoPlayerId);else{var $player=$("#"+this.vimeoPlayerId);setParentAsLoaded($player)}},requestToPlayVimeoVideo:function(id){if(!vimeoReady){$("body").on("vimeoReady"+this.namespace,function(){this.playVimeoVideo(id)}.bind(this));return}this.playVimeoVideo(id)},playVimeoVideo:function(id){this.vimeoPlayer[id].play(),this.vimeoPlayer[id].setVolume(0);var $player=$("#"+id);setParentAsLoaded($player)},onUnload:function(evt){var sectionId=evt.target.id.replace("shopify-section-",""),playerId="YouTubeVideo-"+sectionId;youtubePlayers[playerId]&&youtubePlayers[playerId].destroy(),$(window).off("scroll"+this.namespace),$("body").off("vimeoReady"+this.namespace)}}),videoSection}(),theme.Testimonials=function(){var slideCount=0,defaults={accessibility:!0,arrows:!1,dots:!0,autoplay:!1,touchThreshold:20,slidesToShow:3,slidesToScroll:3};function Testimonials(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),wrapper=this.wrapper=".testimonials-wrapper",slider=this.slider="#Testimonials-"+sectionId,$slider=$(slider);this.sliderActive=!1;var mobileOptions=$.extend({},defaults,{slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0});slideCount=$slider.data("count"),slideCount'+theme.strings.authError+""))};function Map(container){this.$container=$(container),this.sectionId=this.$container.attr("data-section-id"),this.namespace=".map-"+this.sectionId,this.$map=this.$container.find(selectors.map),this.key=this.$map.data("api-key"),this.key&&(this.checkVisibility(),$(window).on("scroll"+this.namespace,$.throttle(50,this.checkVisibility.bind(this))))}function initAllMaps(){$.each(mapsToLoad,function(index,instance){instance.createMap()})}function geolocate($map){var deferred=$.Deferred(),geocoder=new google.maps.Geocoder,address=$map.data("address-setting");return geocoder.geocode({address:address},function(results,status2){status2!==google.maps.GeocoderStatus.OK&&deferred.reject(status2),deferred.resolve(results)}),deferred}return Map.prototype=$.extend({},Map.prototype,{prepMapApi:function(){apiStatus==="loaded"?this.createMap():(mapsToLoad.push(this),apiStatus!=="loading"&&(apiStatus="loading",(typeof window.google=="undefined"||typeof window.google.maps=="undefined")&&$.getScript("https://maps.googleapis.com/maps/api/js?key="+this.key).then(function(){apiStatus="loaded",initAllMaps()})))},createMap:function(){var $map=this.$map;return geolocate($map).then(function(results){var mapOptions={zoom:config.zoom,backgroundColor:"none",center:results[0].geometry.location,draggable:!1,clickableIcons:!1,scrollwheel:!1,disableDoubleClickZoom:!0,disableDefaultUI:!0},map=this.map=new google.maps.Map($map[0],mapOptions),center=this.center=map.getCenter(),marker=new google.maps.Marker({map:map,position:map.getCenter()});google.maps.event.addDomListener(window,"resize",$.debounce(250,function(){google.maps.event.trigger(map,"resize"),map.setCenter(center),$map.removeAttr("style")}))}.bind(this)).fail(function(){var errorMessage;switch(status){case"ZERO_RESULTS":errorMessage=errors.addressNoResults;break;case"OVER_QUERY_LIMIT":errorMessage=errors.addressQueryLimit;break;case"REQUEST_DENIED":errorMessage=errors.authError;break;default:errorMessage=errors.addressError;break}Shopify.designMode&&$map.parent().addClass(classes.mapError).html('
    '+errorMessage+"
    ")})},checkVisibility:function(){theme.isElementVisible(this.$container,600)&&(this.prepMapApi(),$(window).off(this.namespace))},onUnload:function(){this.$map.length!==0&&google.maps.event.clearListeners(this.map,"resize")}}),Map}(),theme.Blog=function(){function Blog(container){this.tagFilters()}return Blog.prototype=$.extend({},Blog.prototype,{tagFilters:function(){var $filterBy=$("#BlogTagFilter");$filterBy.length&&$filterBy.on("change",function(){location.href=$(this).val()})},onUnload:function(){}}),Blog}(),theme.Photoswipe=function(){var selectors={trigger:".product__photo-zoom",images:".photoswipe__image",activeImage:".slick-active .photoswipe__image"};function Photoswipe($container,sectionId){this.$container=$container,this.sectionId=sectionId,this.namespace=".photoswipe-"+this.sectionId,this.gallery,this.$images,this.inSlideshow=!1,$container.attr("data-zoom")!=="false"&&($container.attr("data-has-slideshow")==="true"&&(this.inSlideshow=!0),this.init())}return Photoswipe.prototype=$.extend({},Photoswipe.prototype,{init:function(){var $trigger=this.$container.find(selectors.trigger);this.$images=this.$container.find(selectors.images);var items=[];$trigger.on("click"+this.namespace,function(evt){if(items=this.getImageData(),this.inSlideshow||theme.config.bpSmall)var index=this.$container.find(selectors.activeImage).data("index");else var index=$(evt.currentTarget).data("index");this.initGallery(items,index)}.bind(this))},getImageData:function(){var haveImages=!1,items=[],options={};return this.$images.each(function(){var haveImages2=!0,smallSrc=$(this).prop("currentSrc")||$(this).prop("src"),item={msrc:smallSrc,src:$(this).data("photoswipe-src"),w:$(this).data("photoswipe-width"),h:$(this).data("photoswipe-height"),el:$(this)[0],initialZoomLevel:.5};items.push(item)}),items},initGallery:function(items,index){var pswpElement=document.querySelectorAll(".pswp")[0],options={allowPanToNext:!1,captionEl:!1,closeOnScroll:!1,counterEl:!1,history:!1,index:index-1,pinchToClose:!1,preloaderEl:!1,scaleMode:"zoom",shareEl:!1,tapToToggleControls:!1,getThumbBoundsFn:function(index2){var pageYScroll=window.pageYOffset||document.documentElement.scrollTop,thumbnail=items[index2].el,rect=thumbnail.getBoundingClientRect();return{x:rect.left,y:rect.top+pageYScroll,w:rect.width}}};this.gallery=new PhotoSwipe(pswpElement,PhotoSwipeUI_Default,items,options),this.gallery.init(),this.gallery.listen("afterChange",this.afterChange.bind(this))},afterChange:function(){if(this.inSlideshow){var $slideshow=$("#ProductPhotos-"+this.sectionId);if($slideshow.hasClass("slick-initialized")){var newIndex=this.gallery.getCurrentIndex();$slideshow.slick("slickGoTo",newIndex)}}}}),Photoswipe}(),theme.bp={},theme.bp.smallUp=769,theme.bp.small=theme.bp.smallUp-1,theme.config={cssLoaded:!1,bpSmall:!1,hasSessionStorage:!0,mediaQuerySmall:"screen and (max-width: "+theme.bp.small+"px)",mediaQuerySmallUp:"screen and (min-width: "+theme.bp.smallUp+"px)",youTubeReady:!1,vimeoReady:!1,vimeoLoading:!1,isSafari:!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints)},window.onYouTubeIframeAPIReady=function(){theme.config.youTubeReady=!0,$("body").trigger("youTubeReady")},window.loadVimeo=function(){if(!theme.config.vimeoLoading&&!theme.config.vimeoReady){theme.config.vimeoLoading=!0;var tag=document.createElement("script");tag.src="https://player.vimeo.com/api/player.js";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag),checkIfVimeoIsReady().then(function(){theme.config.vimeoReady=!0,theme.config.vimeoLoading=!1,$("body").trigger("vimeoReady")}).fail(function(){})}};function checkIfVimeoIsReady(){var deferred=$.Deferred(),wait,timeout;return wait=setInterval(function(){Vimeo&&(clearInterval(wait),clearTimeout(timeout),deferred.resolve())},500),timeout=setTimeout(function(){clearInterval(wait),deferred.reject()},4e3),deferred}theme.init=function(){theme.setGlobals(),theme.pageTransitions(),theme.QuickShopScreens.init(),theme.articleImages.init(),theme.collapsibles.init(),theme.settings.cartType==="sticky"&&new theme.StickyCart.init,theme.customerTemplates.init(),theme.videoModal(),theme.rte.init(),$(document.documentElement).on("keyup.tab",function(evt){evt.keyCode===9&&($(document.documentElement).addClass("tab-outline"),$(document.documentElement).off("keyup.tab"))}),window.addEventListener("pageshow",function(evt){evt.persisted&&theme.refreshCart()}),performance&&performance.navigation.type===2&&theme.refreshCart()},theme.refreshCart=function(){theme.settings.cartType==="sticky"&&theme.StickyCart&&$.getJSON("/cart.js").then(function(cart){theme.StickyCart.refresh(cart)})},theme.setGlobals=function(){theme.config.hasSessionStorage=theme.isSessionStorageSupported(),theme.config.isTouch&&$("body").addClass("supports-touch"),enquire.register(theme.config.mediaQuerySmall,{match:function(){theme.config.bpSmall=!0,$("body").trigger("matchSmall")},unmatch:function(){theme.config.bpSmall=!1,$("body").trigger("unmatchSmall")}}),enquire.register(theme.config.mediaQuerySmallUp,{match:function(){$("body").trigger("matchLarge")},unmatch:function(){$("body").trigger("unmatchLarge")}})},theme.loadImageSection=function($container){function setAsLoaded(){$container.removeClass("loading").addClass("loaded")}function checkForLazyloadedImage(){return $container.find(".lazyloaded").length}if($container.find("svg").length){setAsLoaded();return}if(checkForLazyloadedImage()>0){setAsLoaded();return}var interval=setInterval(function(){checkForLazyloadedImage()>0&&(clearInterval(interval),setAsLoaded())},80)},theme.isSessionStorageSupported=function(){if(window.self!==window.top)return!1;var testKey="test",storage=window.sessionStorage;try{return storage.setItem(testKey,"1"),storage.removeItem(testKey),!0}catch(error){return!1}},theme.isElementVisible=function($el,threshold){var rect=$el[0].getBoundingClientRect(),windowHeight=window.innerHeight||document.documentElement.clientHeight;return threshold=threshold||0,rect.bottom>=0-threshold/1.5&&rect.right>=0&&rect.top<=windowHeight+threshold&&rect.left<=(window.innerWidth||document.documentElement.clientWidth)},theme.pageTransitions=function(){$("body").data("transitions")==!0&&(theme.config.isSafari&&$("a").on("click",function(){window.setTimeout(function(){$("body").removeClass("unloading")},1200)}),$('a[href^="mailto:"], a[href^="#"], a[target="_blank"], a[href*="youtube.com/watch"], a[href*="youtu.be/"]').each(function(){$(this).addClass("js-no-transition")}),$("a:not(.js-no-transition)").on("click",function(evt){if(evt.metaKey)return!0;var src=$(this).attr("href");if(src.indexOf(location.pathname)>=0&&src.indexOf("#")>=0)return!0;evt.preventDefault(),$("body").addClass("unloading"),window.setTimeout(function(){location.href=src},50)}))},window.onpageshow=function(evt){evt.persisted&&$("body").removeClass("unloading");var historyPage=event.persisted||typeof window.performance!="undefined"&&window.performance.navigation&&window.performance.navigation.type===2;historyPage&&theme.resetScrollPosition()},theme.initSecondary=function(){document.body.classList.add("js-animate"),AOS.init({easing:"ease-out-quad",once:!1,mirror:!0,offset:100,disableMutationObserver:!0}),document.addEventListener("lazyloaded",function(evt){var $img=$(evt.target);$img.length&&$img.parent().addClass("loaded")}),document.dispatchEvent(new CustomEvent("page:loaded")),theme.storeScrollPositionOnUnload(),theme.reviewAppLinkListener(),theme.checkForAnchorLink()},theme.storeScrollPositionOnUnload=function(){if(theme.config.hasSessionStorage){var eventName=theme.config.isSafari?"pagehide":"beforeunload";window.addEventListener(eventName,function(event2){var pos=$(document).scrollTop();sessionStorage.setItem("scrollPosition_"+document.location.pathname,pos.toString())})}},theme.resetScrollPosition=function(){if(theme.config.hasSessionStorage){var pathName=document.location.pathname;sessionStorage["scrollPosition_"+pathName]&&$(document).scrollTop(sessionStorage.getItem("scrollPosition_"+pathName))}},theme.reviewAppLinkListener=function(){$("body").on("click",".spr-pagination",function(){var $scroller=$(this).closest(".spr-reviews").scrollLeft(0)})},theme.checkForAnchorLink=function(){if(window.location.hash){var $el=$(window.location.hash);if($el.length){var top=$el.offset().top-100;top>0&&window.scroll(0,top)}}},theme.reinitProductGridItem=function(){AOS&&AOS.refreshHard(),window.SPR&&(SPR.initDomEls(),SPR.loadBadges()),theme.collapsibles.init()},$(document).ready(function(){theme.init(),theme.utils.promiseStylesheet().then(function(){theme.initSecondary()}),window.sections=new theme.Sections,sections.register("header-section",theme.HeaderSection),sections.register("slideshow-section",theme.SlideshowSection),sections.register("hero-animated",theme.HeroAnimated),sections.register("video-section",theme.VideoSection),sections.register("product",theme.Product),sections.register("product-recommendations",theme.Recommendations),sections.register("product-template",theme.Product),sections.register("featured-collection",theme.FeaturedCollection),sections.register("collection-template",theme.Collection),sections.register("collection-filter",theme.CollectionFilter),sections.register("featured-content-section",theme.FeaturedContentSection),sections.register("testimonials",theme.Testimonials),sections.register("newsletter-popup",theme.NewsletterPopup),sections.register("map",theme.Maps),sections.register("blog",theme.Blog),sections.register("footer-section",theme.FooterSection)})}(theme.jQuery); //# sourceMappingURL=/cdn/shop/t/27/assets/theme.js.map?v=120757005508444003691650521305