window.theme=window.theme||{},console&&console.log&&console.log("Impulse 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}},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 $el2=$element;else var $el2=$(document.documentElement).add("body");$el2.on("touchmove"+namespace,function(){return!1})},unlockMobileScrolling:function(namespace,$element){if($element)var $el2=$element;else var $el2=$(document.documentElement).add("body");$el2.off(namespace)}},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});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(){AOS&&AOS.refreshHard(),$("[data-subsection]").each(function(evt,el){this._onSectionLoad(null,el,$(el).data("section-id"))}.bind(this))},_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<this.instances.length;i++)if(this.instances[i].id===id)return this.instances[i]},_removeInstance:function(id){for(var i=this.instances.length,instance;i--;)if(this.instances[i].id===id){instance=this.instances[i],this.instances.splice(i,1);break}return instance},register:function(type,constructor,$scope){var afterLoad=!1;this.constructors[type]=constructor;var $sections=$("[data-section-type="+type+"]");$scope&&($sections=$("[data-section-type="+type+"]",$scope)),$sections.each(function(index,container){this.createInstance(container,constructor,$scope)}.bind(this))}}),theme.Currency=function(){var moneyFormat="${{amount}}";function formatMoney(cents,format){format||(format=theme.settings.moneyFormat),typeof cents=="string"&&(cents=cents.replace(".",""));var value="",placeholderRegex=/\{\{\s*(\w+)\s*\}\}/,formatString=format||moneyFormat;function formatWithDelimiters(number,precision,thousands,decimal){if(precision=theme.utils.defaultTo(precision,2),thousands=theme.utils.defaultTo(thousands,","),decimal=theme.utils.defaultTo(decimal,"."),isNaN(number)||number==null)return 0;number=(number/100).toFixed(precision);var parts=number.split("."),dollarsAmount=parts[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+thousands),centsAmount=parts[1]?decimal+parts[1]:"";return dollarsAmount+centsAmount}switch(formatString.match(placeholderRegex)[1]){case"amount":value=formatWithDelimiters(cents,2);break;case"amount_no_decimals":value=formatWithDelimiters(cents,0);break;case"amount_with_comma_separator":value=formatWithDelimiters(cents,2,".",",");break;case"amount_no_decimals_with_comma_separator":value=formatWithDelimiters(cents,0,".",",");break;case"amount_no_decimals_with_space_separator":value=formatWithDelimiters(cents,0," ");break}return formatString.replace(placeholderRegex,value)}function getBaseUnit(variant){if(variant&&!(!variant.unit_price_measurement||!variant.unit_price_measurement.reference_value))return variant.unit_price_measurement.reference_value===1?variant.unit_price_measurement.reference_unit:variant.unit_price_measurement.reference_value+variant.unit_price_measurement.reference_unit}return{formatMoney:formatMoney,getBaseUnit:getBaseUnit}}(),theme.Images=function(){function imageSize(src){if(!src)return"620x";var match=src.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return match!==null?match[1]:null}function getSizedImageUrl(src,size){if(!src||size==null)return src;if(size==="master")return this.removeProtocol(src);var match=src.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(match!=null){var prefix=src.split(match[0]),suffix=match[0];return this.removeProtocol(prefix[0]+"_"+size+suffix)}return null}function removeProtocol(path){return path.replace(/http(s)?:/,"")}function lazyloadImagePath(string){var image;return string!==null&&(image=string.replace(/(\.[^.]*)$/,"_{width}x$1")),image}return{imageSize:imageSize,getSizedImageUrl:getSizedImageUrl,removeProtocol:removeProtocol,lazyloadImagePath:lazyloadImagePath}}(),theme.Variants=function(){function Variants(options){this.$container=options.$container,this.variants=options.variants,this.singleOptionSelector=options.singleOptionSelector,this.originalSelectorId=options.originalSelectorId,this.enableHistoryState=options.enableHistoryState,this.currentVariant=this._getVariantFromOptions(),$(this.singleOptionSelector,this.$container).on("change",this._onSelectChange.bind(this))}return Variants.prototype=$.extend({},Variants.prototype,{_getCurrentOptions:function(){var currentOptions=$.map($(this.singleOptionSelector,this.$container),function(element){var $element=$(element),type=$element.attr("type"),currentOption={};return type==="radio"||type==="checkbox"?$element[0].checked?(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption):!1:(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption)});return currentOptions=this._compact(currentOptions),currentOptions},_getVariantFromOptions:function(){var selectedValues=this._getCurrentOptions(),variants=this.variants,found=!1;return variants.forEach(function(variant){var match=!0,options=variant.options;selectedValues.forEach(function(option){match&&(match=variant[option.index]===option.value)}),match&&(found=variant)}),found||null},_onSelectChange:function(){var variant=this._getVariantFromOptions();this.$container.trigger({type:"variantChange",variant:variant}),variant&&(this._updateMasterSelect(variant),this._updateImages(variant),this._updatePrice(variant),this._updateUnitPrice(variant),this._updateSKU(variant),this.currentVariant=variant,this.enableHistoryState&&this._updateHistoryState(variant))},_updateImages:function(variant){var variantImage=variant.featured_image||{},currentVariantImage=this.currentVariant.featured_image||{};!variant.featured_image||variantImage.src===currentVariantImage.src||this.$container.trigger({type:"variantImageChange",variant:variant})},_updatePrice:function(variant){variant.price===this.currentVariant.price&&variant.compare_at_price===this.currentVariant.compare_at_price||this.$container.trigger({type:"variantPriceChange",variant:variant})},_updateUnitPrice:function(variant){variant.unit_price!==this.currentVariant.unit_price&&this.$container.trigger({type:"variantUnitPriceChange",variant:variant})},_updateSKU:function(variant){variant.sku!==this.currentVariant.sku&&this.$container.trigger({type:"variantSKUChange",variant:variant})},_updateHistoryState:function(variant){if(!(!history.replaceState||!variant)){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant.id;window.history.replaceState({path:newurl},"",newurl)}},_updateMasterSelect:function(variant){$(this.originalSelectorId,this.$container).val(variant.id)},_compact:function(array){for(var index=-1,length=array==null?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}}),Variants}(),theme.rte={init:function(){theme.rte.wrapTable(),theme.rte.wrapVideo(),theme.rte.imageLinks()},wrapTable:function(){$(".rte table").wrap('<div class="table-wrapper"></div>')},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('<div class="video-wrapper"></div>')}),$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",closingClass:"modal--is-closing",bodyOpenClass:"modal-open",bodyOpenSolidClass:"modal-open--solid",bodyClosingClass:"modal-closing",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.isSolid=this.config.solid,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.prepareTransition().addClass(this.config.openClass),this.nodes.$parent.addClass(this.config.bodyOpenClass),this.isSolid&&this.nodes.$parent.addClass(this.config.bodyOpenSolidClass),this.modalIsOpen=!0,theme.a11y.trapFocus({$container:this.$modal,$elementToFocus:this.$focusOnOpen,namespace:"modal_focus"}),$("body").trigger("productModalOpen").trigger("modalOpen."+this.id),this.bindEvents())},Modal.prototype.close=function(){this.modalIsOpen&&($(document.activeElement).trigger("blur"),this.$modal.prepareTransition().removeClass(this.config.openClass).addClass(this.config.closingClass),this.nodes.$parent.removeClass(this.config.bodyOpenClass),this.nodes.$parent.addClass(this.config.bodyClosingClass),window.setTimeout(function(){this.nodes.$parent.removeClass(this.config.bodyClosingClass),this.$modal.removeClass(this.config.closingClass),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","false").focus()}.bind(this),550),this.isSolid&&this.nodes.$parent.removeClass(this.config.bodyOpenSolidClass),this.modalIsOpen=!1,theme.a11y.removeTrapFocus({$container:this.$modal,namespace:"modal_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.Drawers=function(){function Drawer(id,name,ignoreScrollLock){if(this.config={id:id,close:".js-drawer-close",open:".js-drawer-open-"+name,openClass:"js-drawer-open",closingClass:"js-drawer-closing",activeDrawer:"drawer--is-open",namespace:".drawer-"+name},this.$nodes={parent:$(document.documentElement).add("body"),page:$("#MainContent")},this.$drawer=$("#"+id),!this.$drawer.length)return!1;this.isOpen=!1,this.ignoreScrollLock=ignoreScrollLock,this.init()}return Drawer.prototype=$.extend({},Drawer.prototype,{init:function(){var $openBtn=$(this.config.open);$openBtn.attr("aria-expanded","false"),$openBtn.on("click",this.open.bind(this)),this.$drawer.find(this.config.close).on("click",this.close.bind(this)),$("body").on("productModalOpen",function(){this.close()}.bind(this))},open:function(evt,returnFocusEl){if(evt&&evt.preventDefault(),!this.isOpen){if(evt&&evt.stopPropagation)evt.stopPropagation(),this.$activeSource=$(evt.currentTarget).attr("aria-expanded","true");else if(returnFocusEl){var $el2=$(returnFocusEl);this.$activeSource=$el2.attr("aria-expanded","true")}this.$drawer.prepareTransition().addClass(this.config.activeDrawer),this.$nodes.parent.addClass(this.config.openClass),this.isOpen=!0,theme.a11y.trapFocus({$container:this.$drawer,namespace:"drawer_focus"}),$("body").trigger("drawerOpen").trigger("drawerOpen."+this.config.id),this.bindEvents()}},close:function(){this.isOpen&&($(document.activeElement).trigger("blur"),this.$drawer.prepareTransition().removeClass(this.config.activeDrawer),this.$nodes.parent.removeClass(this.config.openClass),this.$nodes.parent.addClass(this.config.closingClass),window.setTimeout(function(){this.$nodes.parent.removeClass(this.config.closingClass),this.$activeSource&&this.$activeSource.attr("aria-expanded")&&this.$activeSource.attr("aria-expanded","false").focus()}.bind(this),500),this.isOpen=!1,theme.a11y.removeTrapFocus({$container:this.$drawer,namespace:"drawer_focus"}),this.unbindEvents())},bindEvents:function(){this.ignoreScrollLock||theme.a11y.lockMobileScrolling(this.config.namespace,this.$nodes.page),this.$nodes.page.on("click"+this.config.namespace,function(evt){var $target=$(evt.target),doNotClose=this.elementInsideDrawer($target);if(!doNotClose)return this.close(),!1}.bind(this)),this.$nodes.parent.on("keyup"+this.config.namespace,function(evt){evt.keyCode===27&&this.close()}.bind(this))},unbindEvents:function(){this.ignoreScrollLock||theme.a11y.unlockMobileScrolling(this.config.namespace,this.$nodes.page),this.$nodes.parent.off(this.config.namespace),this.$nodes.page.off(this.config.namespace)},elementInsideDrawer:function($el2){return this.$drawer.find($el2).length}}),Drawer}(),theme.cart={getCart:function(){return $.getJSON(theme.routes.cart)},changeItem:function(key2,qty){return this._updateCart({type:"POST",url:theme.routes.cartChange,data:"quantity="+qty+"&id="+key2,dataType:"json"})},addItemFromForm:function(data){return this._updateCart({type:"POST",url:theme.routes.cartAdd,data:data,dataType:"json"})},_updateCart:function(params){return $.ajax(params).then(function(cart){return cart}.bind(this))},updateNote:function(note){var params={type:"POST",url:"/cart/update.js",data:"note="+theme.cart.attributeToString(note),dataType:"json",success:function(cart){},error:function(XMLHttpRequest,textStatus){}};$.ajax(params)},attributeToString:function(attribute){return typeof attribute!="string"&&(attribute+="",attribute==="undefined"&&(attribute="")),attribute.trim()}},$(function(){$("body").on("click",".cart__checkout",function(){$(this).addClass("btn--loading")}),$("body").on("change",'textarea[name="note"]',function(){var newNote=$(this).val();theme.cart.updateNote(newNote)}),$("body").on("click",".cart__checkout--ajax",function(evt){if(!$("#CartAgree").is(":checked"))return alert(theme.strings.cartTermsConfirmation),$(this).removeClass("btn--loading"),!1}),$("body").on("click",".cart__checkout--page",function(evt){if(!$("#CartPageAgree").is(":checked"))return alert(theme.strings.cartTermsConfirmation),$(this).removeClass("btn--loading"),!1})}),theme.QtySelector=function(){var classes={input:".js-qty__num",plus:".js-qty__adjust--plus",minus:".js-qty__adjust--minus"};function QtySelector($el2,options){this.$wrapper=$el2,this.$input=$el2.find(classes.input),this.$plus=$el2.find(classes.plus),this.$minus=$el2.find(classes.minus),this.minValue=this.$input.attr("min")||1;var defaults={namespace:null,key:this.$input.data("id")};this.options=$.extend(defaults,options),this.initEventListeners()}return QtySelector.prototype=$.extend({},QtySelector.prototype,{initEventListeners:function(){this.$plus.on("click",function(){var qty=this.validateQty(this.$input.val());this.addQty(qty)}.bind(this)),this.$minus.on("click",function(){var qty=this.validateQty(this.$input.val());this.subtractQty(qty)}.bind(this)),this.$input.on("change",function(){var qty=this.validateQty(this.$input.val());this.changeQty(qty)}.bind(this))},addQty:function(number){var qty=number+1;this.changeQty(qty)},subtractQty:function(number){var qty=number-1;qty<=this.minValue&&(qty=this.minValue),this.changeQty(qty)},changeQty:function(qty){this.$input.val(qty),$("body").trigger("qty"+this.options.namespace,[this.options.key,qty])},validateQty:function(number){return parseFloat(number)==parseInt(number)&&!isNaN(number)||(number=1),parseInt(number)}}),QtySelector}(),theme.CartDrawer=function(){var config={namespace:".ajaxcart"},selectors={drawer:"#CartDrawer",container:"#CartContainer",template:"#CartTemplate",cartBubble:".cart-link__bubble"};function CartDrawer(){this.status={loaded:!1,loading:!1},this.drawer=new theme.Drawers("CartDrawer","cart");var source=$(selectors.template).html();this.template=Handlebars.compile(source),theme.cart.getCart().then(this.buildCart.bind(this)),this.initEventListeners()}return CartDrawer.prototype=$.extend({},CartDrawer.prototype,{initEventListeners:function(){$("body").on("updateCart"+config.namespace,this.initQtySelectors.bind(this)),$("body").on("updateCart"+config.namespace,this.updateCartNotification.bind(this)),$("body").on("added.ajaxProduct",function(evt,returnFocusEl){theme.cart.getCart().then(function(cart){this.buildCart(cart,!0,returnFocusEl)}.bind(this))}.bind(this))},buildCart:function(cart,openDrawer,returnFocusEl){if(this.loading(!0),this.emptyCart(),cart.item_count===0)$(selectors.container).append('<div class="drawer__scrollable"><p class="appear-animation appear-delay-3">'+theme.strings.cartEmpty+"</p></div>");else{var items=[],item={},data={},animation_row=1;$.each(cart.items,function(index,product){var prodImg;product.image!==null?prodImg=product.image.replace(/(\.[^.]*)$/,"_180x$1"):prodImg="//cdn.shopify.com/s/assets/admin/no-image-medium-cc9732cb976dd349a0df1d39816fbcc7.gif",product.properties!==null&&$.each(product.properties,function(key2,value){(key2.charAt(0)==="_"||!value)&&delete product.properties[key2]});var amount=0;if(product.line_level_discount_allocations.length!==0)for(var discount in product.line_level_discount_allocations)amount=product.line_level_discount_allocations[discount].amount,product.line_level_discount_allocations[discount].formattedAmount=theme.Currency.formatMoney(amount,theme.settings.moneyFormat);animation_row+=2,item={key:product.key,url:product.url,img:prodImg,animationRow:animation_row,name:product.product_title,variation:product.variant_title,properties:product.properties,itemQty:product.quantity,price:theme.Currency.formatMoney(product.price,theme.settings.moneyFormat),unitPrice:theme.Currency.formatMoney(product.unit_price,theme.settings.moneyFormat),unitBase:theme.Currency.getBaseUnit(product),discountedPrice:theme.Currency.formatMoney(product.price-product.total_discount/product.quantity,theme.settings.moneyFormat),discounts:product.line_level_discount_allocations,discountsApplied:product.line_level_discount_allocations.length!==0,vendor:product.vendor},items.push(item)}),animation_row+=2;var cartAmount=0;if(cart.cart_level_discount_applications.length!==0)for(var cartDiscount in cart.cart_level_discount_applications)cartAmount=cart.cart_level_discount_applications[cartDiscount].total_allocated_amount,cart.cart_level_discount_applications[cartDiscount].formattedAmount=theme.Currency.formatMoney(cartAmount,theme.settings.moneyFormat);data={items:items,note:cart.note,lastAnimationRow:animation_row,cartDiscounts:cart.cart_level_discount_applications,cartDiscountsApplied:cart.cart_level_discount_applications.length!==0,totalPrice:theme.Currency.formatMoney(cart.total_price,theme.settings.moneyFormat)},$(selectors.container).append(this.template(data))}this.status.loaded=!0,this.loading(!1),$("body").trigger("updateCart"+config.namespace,cart),Shopify&&Shopify.StorefrontExpressButtons&&Shopify.StorefrontExpressButtons.initialize(),openDrawer===!0&&this.drawer.open(!1,returnFocusEl)},initQtySelectors:function(){$(selectors.container).find(".js-qty__wrapper").each(function(index,el){var selector=new theme.QtySelector($(el),{namespace:".cart-drawer"})}.bind(this)),$("body").on("qty.cart-drawer",this.updateItem.bind(this))},updateItem:function(evt,key2,qty){this.status.loading||(this.loading(!0),theme.cart.changeItem(key2,qty).then(function(cart){this.updateSuccess(cart)}.bind(this)).catch(function(XMLHttpRequest){this.updateError(XMLHttpRequest)}.bind(this)).always(function(){this.loading(!1)}.bind(this)))},loading:function(state){this.status.loading=state,state?$(selectors.container).addClass("is-loading"):$(selectors.container).removeClass("is-loading")},emptyCart:function(){$(selectors.container).empty()},updateSuccess:function(cart){this.buildCart(cart)},updateError:function(XMLHttpRequest){XMLHttpRequest.responseJSON&&XMLHttpRequest.responseJSON.description},updateCartNotification:function(evt,cart){cart.items.length>0?$(selectors.cartBubble).addClass("cart-link__bubble--visible"):$(selectors.cartBubble).removeClass("cart-link__bubble--visible")}}),CartDrawer}(),theme.AjaxProduct=function(){var status2={loading:!1};function ProductForm($form){this.$form=$form,this.$addToCart=this.$form.find(".add-to-cart"),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.$addToCart.addClass("btn--loading"),status2.loading=!0;var data=this.$form.serialize();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.$addToCart.removeClass("btn--loading")}.bind(this))}},success:function(product){this.$form.find(".errors").remove(),$("body").trigger("added.ajaxProduct",this.$addToCart)},error:function(XMLHttpRequest){this.$form.find(".errors").remove(),XMLHttpRequest.responseJSON&&XMLHttpRequest.responseJSON.description&&this.$form.prepend('<div class="errors text-center">'+XMLHttpRequest.responseJSON.description+"</div>")}}),ProductForm}(),theme.collapsibles=function(){var selectors={trigger:".collapsible-trigger",module:".collapsible-content",moduleInner:".collapsible-content__inner"},classes={hide:"hide",open:"is-open",autoHeight:"collapsible--auto-height"},namespace=".collapsible",isTransitioning=!1;function init(){$(selectors.trigger).each(function(){var $el2=$(this),state=$el2.hasClass(classes.open);$el2.attr("aria-expanded",state)}),$("body, .modal__inner").off(namespace).on("click"+namespace,selectors.trigger,function(){if(!isTransitioning){isTransitioning=!0;var $el2=$(this),isOpen=$el2.hasClass(classes.open),moduleId=$el2.attr("aria-controls"),$module=$("#"+moduleId),height=$module.find(selectors.moduleInner).outerHeight(),isAutoHeight=$el2.hasClass(classes.autoHeight);isOpen&&isAutoHeight&&setTimeout(function(){height=0,setTransitionHeight($module,height,isOpen,isAutoHeight)},0),isOpen&&!isAutoHeight&&(height=0),$el2.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},350)}else isTransitioning=!1}return{init:init}}(),theme.headerNav=function(){var $parent=$(document.documentElement).add("body"),$page=$("#MainContent"),selectors={wrapper:".header-wrapper",siteHeader:".site-header",searchBtn:".js-search-header",closeSearch:".js-search-header-close",searchContainer:".site-header__search-container",logoContainer:".site-header__logo",logo:".site-header__logo img",navigation:".site-navigation",megamenu:".megamenu",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"},classes={hasDropdownClass:"site-nav--has-dropdown",hasSubDropdownClass:"site-nav__deep-dropdown-trigger",dropdownActive:"is-focused",overlaidBodyClass:"overlaid-header",stickyBodyClass:"sticky-header"},config={namespace:".siteNav",wrapperOverlayed:!1,overlayedClass:"is-light",stickyEnabledClass:"header-wrapper--sticky",stickyEnabled:!1,stickyActive:!1,stickyInitialized:!1,forceStopSticky:!1,stickyClass:"site-header--stuck",openTransitionClass:"site-header--opening",lastScroll:0},$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.wrapperOverlayed=theme.settings.overlayHeader=$wrapper.hasClass(config.overlayedClass),config.stickyEnabled=$siteHeader.data("sticky"),config.stickyEnabled&&(stickyHeaderCheck(),$window.on("resize"+config.namespace,$.debounce(150,stickyHeaderCheck))),config.wrapperOverlayed&&$("body").addClass(classes.overlaidBodyClass),accessibleDropdowns(),searchDrawer()}function unload(){$(window).off(config.namespace),$(selectors.searchBtn).off(config.namespace),$(selectors.closeSearch).off(config.namespace),$parent.off(config.namespace),$(selectors.navLinks).off(config.namespace),$(selectors.navDropdownLinks).off(config.namespace)}function searchDrawer(){$(selectors.searchBtn).on("click"+config.namespace,function(evt){evt.preventDefault(),openSearchDrawer()}),$(selectors.closeSearch).on("click"+config.namespace,function(){closeSearchDrawer()})}function openSearchDrawer(){$(selectors.searchContainer).addClass("is-active"),$parent.addClass("js-drawer-open--search"),theme.a11y.trapFocus({$container:$(selectors.searchContainer),namespace:"header_search",$elementToFocus:$(selectors.searchContainer).find("input")}),theme.config.bpSmall&&config.stickyEnabled&&config.lastScroll<300&&window.scrollTo(0,0),theme.a11y.lockMobileScrolling(config.namespace),$page.on("click"+config.namespace,function(){return closeSearchDrawer(),!1}),$parent.on("keyup"+config.namespace,function(evt){evt.keyCode===27&&closeSearchDrawer()})}function closeSearchDrawer(){$(document.activeElement).trigger("blur"),$parent.removeClass("js-drawer-open--search").off(config.namespace),$(selectors.searchContainer).removeClass("is-active"),theme.a11y.removeTrapFocus({$container:$(selectors.searchContainer),namespace:"header_search"}),theme.a11y.unlockMobileScrolling(config.namespace),$page.off("click"+config.namespace),$parent.off("keyup"+config.namespace)}function accessibleDropdowns(){var hasActiveDropdown=!1,hasActiveSubDropdown=!1,closeOnClickActive=!1;theme.config.isTouch&&($(selectors.navLinksWithDropdown).on("touchend"+config.namespace,function(evt){var $el2=$(this),$parentItem=$el2.parent();$parentItem.hasClass(classes.dropdownActive)?window.location.replace($el2.attr("href")):(evt.preventDefault(),closeDropdowns(),openFirstLevelDropdown($el2))}),$(selectors.navDropdownLinks).on("touchend"+config.namespace,function(evt){var $el2=$(this),$parentItem=$el2.parent();$parentItem.hasClass(classes.hasSubDropdownClass)?$parentItem.hasClass(classes.dropdownActive)?window.location.replace($el2.attr("href")):(evt.preventDefault(),closeThirdLevelDropdown(),openSecondLevelDropdown($el2)):window.location.replace($el2.attr("href"))}),$("body").on("touchend"+config.namespace,function(){closeSecondLevelDropdown(),closeThirdLevelDropdown()}),$(selectors.megamenu).on("touchend"+config.namespace,function(evt){evt.stopImmediatePropagation()})),$(selectors.navLinks).on("focusin mouseover"+config.namespace,function(){hasActiveDropdown&&closeSecondLevelDropdown(),hasActiveSubDropdown&&closeThirdLevelDropdown(),openFirstLevelDropdown($(this))}),$(selectors.navLinks).on("mouseleave"+config.namespace,function(){closeSecondLevelDropdown(),closeThirdLevelDropdown()}),$(selectors.navDropdownLinks).on("focusin"+config.namespace,function(){hasActiveSubDropdown&&closeThirdLevelDropdown(),openSecondLevelDropdown($(this),!0)});function openFirstLevelDropdown($el2){var $parentItem=$el2.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($el2,skipCheck){var $parentItem=$el2.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 stickyHeaderCheck(){theme.config.stickyHeader=doesMegaMenuFit(),theme.config.stickyHeader?(config.forceStopSticky=!1,stickyHeaderSetup()):config.forceStopSticky=!0}function stickyHeaderSetup(){config.stickyInitialized||($parent.addClass(classes.stickyBodyClass),$siteHeader.wrap('<div class="site-header-sticky"></div>'),stickyHeaderHeight(),setTimeout(function(){stickyHeaderHeight()},200),$window.on("resize"+config.namespace,$.debounce(50,stickyHeaderHeight)),$window.on("scroll"+config.namespace,$.throttle(15,stickyHeaderScroll))),config.stickyInitialized=!0}function doesMegaMenuFit(){var largestMegaNav=0;return $(selectors.megamenu).each(function(){var h=$(this).outerHeight();h>largestMegaNav&&(largestMegaNav=h)}),!(window.innerHeight<largestMegaNav+120)}function stickyHeaderHeight(){var height=$siteHeader.outerHeight(!0),$stickyHeader=$(".site-header-sticky").css("height",height);$(".grid__item--sidebar").length&&$(".grid__item--sidebar").css("top",height+10)}function stickyHeaderScroll(){if(!config.forceStopSticky){var scroll=$window.scrollTop(),threshold=150;if(scroll>threshold){if(config.stickyActive)return;config.stickyActive=!0,$siteHeader.addClass(config.stickyClass),config.wrapperOverlayed&&$wrapper.removeClass(config.overlayedClass),setTimeout(function(){$siteHeader.addClass(config.openTransitionClass)},100)}else{if(!config.stickyActive)return;config.stickyActive=!1,$siteHeader.removeClass(config.openTransitionClass).removeClass(config.stickyClass),config.wrapperOverlayed&&$wrapper.addClass(config.overlayedClass)}config.lastScroll=scroll}}function disableOverlayHeader(){$(selectors.wrapper).removeClass(config.stickyEnabledClass).removeClass(config.overlayedClass),$("body").removeClass(classes.overlaidBodyClass),config.wrapperOverlayed=!1}return{init:init,disableOverlayHeader:disableOverlayHeader,unload:unload}}(),theme.Slideshow=function(){this.$slideshow=null;var classes={next:"is-next",init:"is-init",animateOut:"animate-out",wrapper:"slideshow-wrapper",slideshow:"slideshow",allSlides:"slick-slide",currentSlide:"slick-current",pauseButton:"slideshow__pause",isPaused:"is-paused"};function slideshow(el,args){this.$slideshow=$(el),this.$wrapper=this.$slideshow.closest("."+classes.wrapper),this.$pause=this.$wrapper.find("."+classes.pauseButton),this.settings={accessibility:!0,arrows:!!args.arrows,dots:!!args.dots,fade:!!args.fade,speed:args.speed?args.speed:500,draggable:!0,touchThreshold:5,pauseOnHover:!1,autoplay:!!args.autoplay,autoplaySpeed:this.$slideshow.data("speed")},this.$slideshow.off("beforeChange"),this.$slideshow.off("afterSlideChange"),this.$slideshow.on("init",this.init.bind(this)),this.$slideshow.on("beforeChange",this.beforeSlideChange.bind(this)),this.$slideshow.on("afterChange",this.afterSlideChange.bind(this)),this.$slideshow.slick(this.settings),this.$pause.on("click",this._togglePause.bind(this))}return slideshow.prototype=$.extend({},slideshow.prototype,{init:function(event,obj){this.$slideshowList=obj.$list,this.$slickDots=obj.$dots,this.$allSlides=obj.$slides,this.slideCount=obj.slideCount,this.$slideshow.addClass(classes.init),this._a11y(),this._clonedLazyloading()},beforeSlideChange:function(event,slick,currentSlide,nextSlide){var $slider=slick.$slider,$currentSlide=$slider.find("."+classes.currentSlide).addClass(classes.animateOut)},afterSlideChange:function(event,slick,currentSlide){var $slider=slick.$slider,$allSlides=$slider.find("."+classes.allSlides).removeClass(classes.animateOut)},destroy:function(){this.$slideshow.slick("unslick")},_play:function(){this.$slideshow.slick("slickPause"),$(classes.pauseButton).addClass("is-paused")},_pause:function(){this.$slideshow.slick("slickPlay"),$(classes.pauseButton).removeClass("is-paused")},_togglePause:function(){var slideshowSelector=this._getSlideshowId(this.$pause);this.$pause.hasClass(classes.isPaused)?(this.$pause.removeClass(classes.isPaused),$(slideshowSelector).slick("slickPlay")):(this.$pause.addClass(classes.isPaused),$(slideshowSelector).slick("slickPause"))},_getSlideshowId:function($el2){return"#Slideshow-"+$el2.data("id")},_activeSlide:function(){return this.$slideshow.find(".slick-active")},_currentSlide:function(){return this.$slideshow.find(".slick-current")},_nextSlide:function(index){return this.$slideshow.find('.slideshow__slide[data-slick-index="'+index+'"]')},_a11y:function(){var $list=this.$slideshowList,autoplay=this.settings.autoplay;$list&&($list.removeAttr("aria-live"),$(classes.wrapper).on("focusin",function(evt){$(classes.wrapper).has(evt.target).length&&($list.attr("aria-live","polite"),autoplay&&this._pause())}.bind(this)),$(classes.wrapper).on("focusout",function(evt){$(classes.wrapper).has(evt.target).length&&($list.removeAttr("aria-live"),autoplay&&this._play())}.bind(this)))},_clonedLazyloading:function(){var $slideshow=this.$slideshow;$slideshow.find(".slick-slide").each(function(index,el){var $slide=$(el);if($slide.hasClass("slick-cloned")){var slideId=$slide.data("id"),$slideImg=$slide.find(".hero__image").removeClass("lazyloading").addClass("lazyloaded");setTimeout(function(){var loadedImageStyle=$slideshow.find(".slideshow__slide--"+slideId+":not(.slick-cloned) .hero__image").attr("style");loadedImageStyle&&$slideImg.attr("style",loadedImageStyle)},this.settings.autoplaySpeed/1.5)}}.bind(this))}}),slideshow}(),theme.announcementBar=function(){var slideCount=0,compact=!1,defaults={accessibility:!0,arrows:!1,dots:!1,autoplay:!0,autoplaySpeed:5e3,touchThreshold:20,slidesToShow:1},$slider;function init(){if($slider=$("#AnnouncementSlider"),!!$slider.length){slideCount=$slider.data("block-count"),compact=$slider.data("compact-style");var desktopOptions=$.extend({},defaults,{slidesToShow:compact?1:slideCount,slidesToScroll:1}),mobileOptions=$.extend({},defaults,{slidesToShow:1});theme.config.bpSmall?initSlider($slider,mobileOptions):initSlider($slider,desktopOptions),$("body").on("matchSmall",function(){initSlider($slider,mobileOptions)}.bind(this)),$("body").on("matchLarge",function(){initSlider($slider,desktopOptions)}.bind(this))}}function initSlider($slider2,args){isInitialized($slider2)&&$slider2.slick("unslick"),$slider2.slick(args)}function isInitialized($slider2){return $slider2.length&&$slider2.hasClass("slick-initialized")}function onBlockSelect(id){var $slide=$("#AnnouncementSlide-"+id);$slider.length&&$slider.slick("slickPause"),$slide.length&&$slider.slick("slickGoTo",$slide.data("index"))}function onBlockDeselect(id){$slider.length&&isInitialized($slider)&&$slider.slick("slickPlay")}function unload(){isInitialized($slider)&&$slider.slick("unslick")}return{init:init,onBlockSelect:onBlockSelect,onBlockDeselect:onBlockDeselect,unload:unload}}(),theme.predictiveSearch=function(){var currentString="",isLoading=!1,searchTimeout,namespace=".predictive",selectors={form:"#HeaderSearchForm",input:'input[type="search"]',wrapper:".predictive-results",searchButton:"[data-predictive-search-button]",resultDiv:"#PredictiveResults",resultTemplate:"#PredictiveTemplate"},classes={isActive:"predicitive-active"},keys={up_arrow:38,down_arrow:40,tab:9};function init(){if(document.getElementById("shopify-features")){var supportedShopifyFeatures=JSON.parse(document.getElementById("shopify-features").innerHTML);if(!supportedShopifyFeatures.predictiveSearch)return}$(selectors.form).attr("autocomplete","off"),$(selectors.form).on("submit"+namespace,submitSearch),$(selectors.input,selectors.form).on("keyup"+namespace,handleKeyup),$(selectors.searchButton,selectors.wrapper).on("click"+namespace,triggerSearch);var source=$(selectors.resultTemplate).html();resultTemplate=Handlebars.compile(source)}function reset(){$(selectors.wrapper).addClass("hide"),clearTimeout(searchTimeout)}function triggerSearch(){$(selectors.form).trigger("submit")}function submitSearch(evt){var $form=$(this);evt.preventDefault?evt.preventDefault():evt.returnValue=!1;var data=$form.serializeArray().reduce(function(obj,item){return obj[item.name]=item.value,obj},{});data.q&&(data.q+="*");var query=$.param(data);return window.location.href="/search?"+query,!1}function handleKeyup(evt){if(evt.keyCode===keys.up_arrow){return}if(evt.keyCode===keys.down_arrow){return}evt.keyCode!==keys.tab&&search()}function search(){var keyword=$(selectors.input,selectors.form).val();if(keyword===""){reset();return}var q=_normalizeQuery(keyword);clearTimeout(searchTimeout),searchTimeout=setTimeout(function(){predictQuery(q)}.bind(this),500)}function predictQuery(q){isLoading||currentString!==q&&(currentString=q,isLoading=!0,jQuery.getJSON("/search/suggest.json",{q:q,resources:{type:theme.settings.predictiveSearchType,limit:4,options:{unavailable_products:"last",fields:"title,product_type,variants.title,vendor"}}}).done(function(response){isLoading=!1;var data={},resultCount=0;$(selectors.wrapper).removeClass("hide");for(var resultTypes=Object.entries(response.resources.results),i=resultTypes.length-1;i>=0;i--){var obj=resultTypes[i],type=obj[0],results=obj[1];switch(resultCount+=results.length,type){case"products":data[type]=buildProducts(results);break;case"collections":data[type]=buildCollections(results);break;default:data[type]=parseResultImages(results);break}}resultCount===0&&reset(),$(selectors.resultDiv).empty().append(resultTemplate(data))}))}function buildProducts(results){for(var products=[],i=results.length-1;i>=0;i--){var product=results[i],new_product={title:product.title,url:product.url,image:theme.Images.lazyloadImagePath(product.image),vendor:product.vendor,price:theme.Currency.formatMoney(product.price),compare_price_max:theme.Currency.formatMoney(product.compare_at_price_max),on_sale:parseInt(product.compare_at_price_max)>parseInt(product.price),custom_label:_checkCustomLabel(product.tags)};products.push(new_product)}return products}function buildCollections(results){for(var collections=[],i=results.length-1;i>=0;i--){var collection=results[i],new_collection={title:collection.title,url:collection.url};collections.push(new_collection)}return collections}function parseResultImages(results){for(var i=results.length-1;i>=0;i--)if(results[i].image){var image=theme.Images.lazyloadImagePath(results[i].image);results[i].image=image}return results}function _checkCustomLabel(tags){if(!tags.length)return!1;for(var i=tags.length-1;i>=0;i--)if(tags[i].indexOf("_label_")!==-1)return tags[i].replace("_label_","");return!1}function _normalizeQuery(string){return typeof string!="string"?null:string.trim().replace(/\ /g,"-").toLowerCase()}function navigationEvent(evt,direction){}return{init:init}}(),theme.initQuickShop=function(){var ids=[],$buttons=$(".quick-product__btn");$buttons.each(function(){var id=$(this).data("product-id"),modalId="QuickShopModal-"+id,name="quick-modal-"+id;if(ids.indexOf(id)>-1){$('.modal--quick-shop[data-product-id="'+id+'"]').each(function(i){i>0&&$(this).remove()});return}new theme.Modals(modalId,name),ids.push(id)})},theme.videoModal=function(){var youtubePlayer=null,videoOptions={width:1280,height:720,playerVars:{autohide:0,autoplay:1,branding:0,cc_load_policy:0,fs:0,iv_load_policy:3,modestbranding:1,playsinline:1,quality:"hd720",rel:0,showinfo:0,wmode:"opaque"},events:{onReady:onPlayerReady}},videoHolderId="VideoHolder",activeVideo=!1,selectors={videoHolder:"#"+videoHolderId,youtube:'a[href*="youtube.com/watch"], a[href*="youtu.be/"]',mp4Trigger:".product-video-trigger--mp4",mp4Player:".product-video-mp4-sound"};if(!$(selectors.youtube).length&&!$(selectors.mp4Trigger).length)return;var modal=new theme.Modals("VideoModal","video-modal",{closeOffContentClick:!0,solid:!0});$(selectors.youtube).on("click",triggerYouTubeModal),$(selectors.mp4Trigger).on("click",triggerMp4Modal),$("body").on("modalClose.VideoModal",function(){youtubePlayer&&activeVideo==="youtube"?setTimeout(function(){youtubePlayer.destroy()},500):emptyVideoHolder()});function triggerYouTubeModal(evt){emptyVideoHolder(),evt.preventDefault(),theme.LibraryLoader.load("youtubeSdk"),theme.config.youTubeReady?startYoutubeOnClick(evt):$("body").on("youTubeReady",function(){startYoutubeOnClick(evt)})}function triggerMp4Modal(evt){emptyVideoHolder();var $el2=$(evt.currentTarget),$mp4Player=$el2.next(selectors.mp4Player);$mp4Player.clone().removeClass("hide").appendTo(selectors.videoHolder),modal.open(evt),$(selectors.videoHolder).find("video")[0].play(),activeVideo="mp4"}function startYoutubeOnClick(evt){var $el2=$(evt.currentTarget),videoId=getYoutubeVideoId($el2.attr("href")),args=$.extend({},videoOptions,{videoId:videoId});args.playerVars.playsinline=theme.config.bpSmall?0:1,youtubePlayer=new YT.Player(videoHolderId,args),modal.open(evt),activeVideo="youtube"}function onPlayerReady(evt){evt.target.playVideo()}function getYoutubeVideoId(url){var regExp=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,match=url.match(regExp);return match&&match[7].length==11?match[7]:!1}function emptyVideoHolder(){$(selectors.videoHolder).empty()}},theme.RecentlyViewed=function(){var selectors={template:"#RecentlyViewedProduct",outputContainer:"#RecentlyViewed-"},init=!1;function RecentlyViewed(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id");this.namespace=".recently-viewed"+sectionId,$(selectors.template).length&&(this.checkVisibility(),$(window).on("scroll"+this.namespace,$.throttle(200,this.checkVisibility.bind(this))))}return RecentlyViewed.prototype=$.extend({},RecentlyViewed.prototype,{init:function(){if(!init&&(init=!0,!$.isEmptyObject(theme.recentlyViewed.recent))){this.outputContainer=$(selectors.outputContainer+this.sectionId),this.handle=this.$container.attr("data-product-handle");var promises=[];for(handle in theme.recentlyViewed.recent)handle!=="undefined"&&promises.push(this.getProductInfo(handle));Promise.all(promises).then(function(result){this.setupOutput(result),this.captureProductDetails(result)}.bind(this),function(error){console.warn("Theme | recently viewed products failed to load")})}},checkVisibility:function(){theme.isElementVisible(this.$container,600)&&(this.init(),$(window).off("scroll"+this.namespace))},getProductInfo:function(handle2){return new Promise(function(resolve,reject){theme.recentlyViewed.productInfo.hasOwnProperty(handle2)?resolve(theme.recentlyViewed.productInfo[handle2]):jQuery.getJSON("/products/"+handle2+".js",function(product){resolve(product)})})},setupOutput:function(products){var allProducts=[],data={},limit=this.$container.attr("data-recent-count"),i=0;for(key in products){var product=products[key];if(product.handle!==this.handle&&typeof product.handle!="undefined"){i++,product.url_formatted=theme.recentlyViewed.recent[product.handle]?theme.recentlyViewed.recent[product.handle].url:product.url,product.image_responsive_url=theme.recentlyViewed.recent[product.handle].featuredImage,product.image_aspect_ratio=theme.recentlyViewed.recent[product.handle].aspectRatio,product.on_sale=product.compare_at_price>product.price,product.sold_out=!product.available,product.price_formatted=theme.Currency.formatMoney(product.price,theme.settings.moneyFormat),product.compare_at_price_formatted=theme.Currency.formatMoney(product.compare_at_price,theme.settings.moneyFormat),product.price_min_formatted=theme.Currency.formatMoney(product.price_min,theme.settings.moneyFormat),product.money_saved=theme.Currency.formatMoney(product.compare_at_price-product.price,theme.settings.moneyFormat);var firstVariant=product.variants[0];if(firstVariant&&firstVariant.unit_price){var baseUnit="";firstVariant.unit_price_measurement&&(firstVariant.unit_price_measurement.reference_value!=1&&(baseUnit+=firstVariant.unit_price_measurement.reference_value+" "),baseUnit+=firstVariant.unit_price_measurement.reference_unit),product.unit_price=theme.Currency.formatMoney(firstVariant.unit_price),baseUnit!=""&&(product.unit_price+="/"+baseUnit)}allProducts.unshift(product)}}if(data={items:allProducts.slice(0,limit),grid_item_width:this.$container.attr("data-grid-item-class")},allProducts.length!==0){var source=$(selectors.template).html(),template=Handlebars.compile(source);this.outputContainer.append(template(data)),AOS&&AOS.refreshHard()}},captureProductDetails:function(products){for(var i=0;i<products.length;i++){var product=products[i];theme.recentlyViewed.productInfo[product.handle]=product}theme.config.hasSessionStorage&&sessionStorage.setItem("recent-products",JSON.stringify(theme.recentlyViewed.productInfo))},onUnload:function(){init=!1,$("window").off(this.namespace)}}),RecentlyViewed}(),theme.parallaxSections={},theme.Parallax=function(){var speed=7;function parallax(el,args){this.$container=$(el),this.namespace=args.namespace,this.$container.length&&(args.desktopOnly?this.desktopInit():this.init(this.$container,args))}return parallax.prototype=$.extend({},parallax.prototype,{init:function(desktopOnly){var $window=this.$window=$(window),elTop=this.$container.offset().top;$window.on("scroll"+this.namespace,function(evt){var scrolled=$window.scrollTop(),shiftDistance=(elTop-scrolled)/speed;this.$container.css({transform:"translate3d(0, "+shiftDistance+"px, 0)"})}.bind(this)),$window.on("resize"+this.namespace,$.debounce(350,function(){if($window.off(this.namespace),desktopOnly&&!theme.config.bpSmall){this.init(!0);return}this.init()}.bind(this)))},desktopInit:function(){theme.config.bpSmall||this.init(!0),$("body").on("matchSmall",function(){this.destroy()}.bind(this)),$("body").on("matchLarge",function(){this.init(!0)}.bind(this))},destroy:function(){this.$container.removeAttr("style"),this.$window.off(this.namespace)}}),parallax}(),theme.Disclosure=function(){var selectors={disclosureList:"[data-disclosure-list]",disclosureToggle:"[data-disclosure-toggle]",disclosureInput:"[data-disclosure-input]",disclosureOptions:"[data-disclosure-option]"},classes={listVisible:"disclosure-list--visible"};function Disclosure($disclosure){this.$container=$disclosure,this.cache={},this._cacheSelectors(),this._connectOptions(),this._connectToggle(),this._onFocusOut()}return Disclosure.prototype=$.extend({},Disclosure.prototype,{_cacheSelectors:function(){this.cache={$disclosureList:this.$container.find(selectors.disclosureList),$disclosureToggle:this.$container.find(selectors.disclosureToggle),$disclosureInput:this.$container.find(selectors.disclosureInput),$disclosureOptions:this.$container.find(selectors.disclosureOptions)}},_connectToggle:function(){this.cache.$disclosureToggle.on("click",function(evt){var ariaExpanded=$(evt.currentTarget).attr("aria-expanded")==="true";$(evt.currentTarget).attr("aria-expanded",!ariaExpanded),this.cache.$disclosureList.toggleClass(classes.listVisible)}.bind(this))},_connectOptions:function(){this.cache.$disclosureOptions.on("click",function(evt){evt.preventDefault(),this._submitForm($(evt.currentTarget).data("value"))}.bind(this))},_onFocusOut:function(){this.cache.$disclosureToggle.on("focusout",function(evt){var disclosureLostFocus=this.$container.has(evt.relatedTarget).length===0;disclosureLostFocus&&this._hideList()}.bind(this)),this.cache.$disclosureList.on("focusout",function(evt){var childInFocus=$(evt.currentTarget).has(evt.relatedTarget).length>0,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&&Shopify&&(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.collectionTemplate=function(){var isAnimating=!1,selectors={collectionGrid:".collection-grid__wrapper",sidebar:"#CollectionSidebar",activeTagList:".tag-list--active-tags",tags:".tag-list a",filters:".collection-filter"},settings={combineTags:$(selectors.sidebar).data("combine-tags")},classes={activeTag:"tag--active",removeTagParent:"tag--remove"};function init(){$(window).on("popstate",function(state){state&&getNewCollectionContent(location.href)}),theme.config.stickyHeader&&(setFilterStickyPosition(),$(window).on("resize",$.debounce(150,setFilterStickyPosition))),initTagClicks()}function initTagClicks(){$("body").on("click",selectors.tags,function(evt){var $el2=$(this);if(theme.FilterDrawer&&theme.FilterDrawer.close(),!$el2.hasClass("no-ajax")&&(evt.preventDefault(),!isAnimating)){isAnimating=!0;var $el2=$(evt.currentTarget),$parent=$el2.parent(),newUrl=$el2.attr("href");settings.combineTags?$parent.hasClass(classes.activeTag)?$parent.removeClass(classes.activeTag):($parent.addClass(classes.activeTag),$el2.parent("li").hasClass(classes.removeTagParent)?$(this).parent().remove():$(selectors.activeTagList).append('<li class="tag tag--remove"><a class="btn btn--small">'+$el2.text()+"</a></li>")):($(selectors.tags).parent().removeClass(classes.activeTag),$parent.addClass(classes.activeTag)),updateScroll(!0),history.pushState({},"",newUrl),$(selectors.collectionGrid).addClass("unload"),getNewCollectionContent(newUrl)}})}function updateScroll(animate){var scrollTo;if(theme.config.bpSmall?scrollTo=$("[data-scroll-to]").offset().top-60:scrollTo=$("#CollectionAjaxResult").offset().top+1,theme.config.stickyHeader){var heightOfStickyNav=$(".site-header").outerHeight(!0);scrollTo=scrollTo-heightOfStickyNav}animate?$("html, body").animate({scrollTop:scrollTo},300):$("html, body").scrollTop(scrollTo)}function setFilterStickyPosition(){var headerHeight=$(".site-header").outerHeight(!0);$(selectors.filters).css("top",headerHeight+10)}function getNewCollectionContent(url){url=url.indexOf("?")===-1?url+"?view=ajax":url+"&view=ajax",$("#CollectionAjaxResult").load(url+" #CollectionAjaxContent",function(){isAnimating=!1,theme.reinitSection("collection-template"),theme.collectionTemplate.reinit()}.bind(this))}function reinit(){settings.combineTags=$(selectors.sidebar).data("combine-tags"),updateScroll(!1),theme.reinitProductGridItem(),$("body").trigger("resize")}return{init:init,reinit:reinit}}(),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");Shopify&&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 $el2=$(this),formId=$el2.data("form-id"),confirmMessage=$el2.data("confirm-message");confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify&&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:"on-sale",disabled:"disabled",isModal:"is-modal",loading:"loading",loaded:"loaded",hidden:"hide",interactable:"video-interactable",visuallyHide:"visually-invisible"},selectors={productVideo:".product__video",videoParent:".product__video-wrapper",currentSlide:".slick-current",startingSlide:".starting-slide"},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){videoVisibilityCheck(playerId),$(window).on("scroll."+playerId,{id:playerId},$.throttle(150,videoVisibilityCheck))}function videoVisibilityCheck(id){var playerId;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($el2){$el2.closest(selectors.videoParent).addClass(classes.loading)}function setParentAsLoaded($el2){$el2.closest(selectors.videoParent).removeClass(classes.loading).addClass(classes.loaded)}function setVideoToBeInteractedWith($el2){$el2.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(".modal").length,this.$modal,this.settings={enableHistoryState:$container.data("enable-history-state")||!1,namespace:".product-"+sectionId,inventory:$container.data("inventory")||!1,incomingInventory:$container.data("incoming-inventory")||!1,modalInit:!1,slickMainInitialized:!1,slickThumbInitialized:!1,thumbArrows:!1,thumbVertical:!1,hasImages:!0,hasMultipleImages:!1,has3d:!1,imageSize:"620x",videoLooping:$container.data("video-looping")},this.inModal&&(this.settings.enableHistoryState=!1,this.settings.namespace=".product-"+sectionId+"-modal",this.$modal=$("#QuickShopModal-"+sectionId)),this.selectors={variantsJson:"VariantsJson-"+sectionId,currentVariantJson:"CurrentVariantJson-"+sectionId,video:"ProductVideo-"+sectionId,media:"[data-product-media-type-model]",closeMedia:".product-single__close-media",photoThumbs:".product__thumb-"+sectionId,thumbSlider:"#ProductThumbs-"+sectionId,mainSlider:"#ProductPhotos-"+sectionId,imageContainer:"[data-product-images]",productImageMain:".product-image-main--"+sectionId,dotsContainer:".product__photo-dots--"+sectionId,priceWrapper:".product__price-wrap-"+sectionId,price:"#ProductPrice-"+sectionId,comparePrice:"#ComparePrice-"+sectionId,savePrice:"#SavePrice-"+sectionId,priceA11y:"#PriceA11y-"+sectionId,comparePriceA11y:"#ComparePriceA11y-"+sectionId,unitWrapper:".product__unit-price-wrapper--"+sectionId,unitPrice:".product__unit-price--"+sectionId,unitPriceBaseUnit:".product__unit-base--"+sectionId,sku:"#Sku-"+sectionId,inventory:"#ProductInventory-"+sectionId,incomingInventory:"#ProductIncomingInventory-"+sectionId,addToCart:"#AddToCart-"+sectionId,addToCartText:"#AddToCartText-"+sectionId,originalSelectorId:"#ProductSelect-"+sectionId,singleOptionSelector:".variant__input-"+sectionId,variantColorSwatch:".variant__input--color-swatch-"+sectionId,modalFormHolder:"#ProductFormHolder-"+sectionId,formContainer:"#AddToCartForm-"+sectionId},this.$mainSlider=$(this.selectors.mainSlider),this.$thumbSlider=$(this.selectors.thumbSlider),this.$firstProductImage=this.$mainSlider.find("img").first(),this.$firstProductImage.length||(this.settings.hasImages=!1),this.init()}return Product.prototype=$.extend({},Product.prototype,{init:function(){this.inModal&&(this.$container.addClass(classes.isModal),$("body").off("modalOpen.QuickShopModal-"+this.sectionId).off("modalClose.QuickShopModal-"+this.sectionId),$("body").on("modalOpen.QuickShopModal-"+this.sectionId,this.openModalProduct.bind(this)),$("body").on("modalClose.QuickShopModal-"+this.sectionId,this.closeModalProduct.bind(this))),this.inModal||(this.stringOverrides(),this.formSetup(),this.productSetup(),this.checkIfVideos(),this.createImageCarousels(),this.customMediaListners(),this.addIdToRecentlyViewed())},formSetup:function(){theme.settings.dynamicVariantsEnable&&(this.$variantSelectors=$(this.selectors.formContainer).find(this.selectors.singleOptionSelector)),this.initQtySelector(),this.initAjaxProductForm(),this.initVariants()},productSetup:function(){this.setImageSizes(),this.initImageSwitch(),this.initImageZoom(),this.initModelViewerLibraries(),this.initShopifyXrLaunch()},addIdToRecentlyViewed:function(){var handle2=this.$container.attr("data-product-handle"),url=this.$container.attr("data-product-url"),aspectRatio=this.$container.attr("data-aspect-ratio"),featuredImage=this.$container.attr("data-img-url");theme.recentlyViewed.recent.hasOwnProperty(handle2)&&delete theme.recentlyViewed.recent[handle2],theme.recentlyViewed.recent[handle2]={url:url,aspectRatio:aspectRatio,featuredImage:featuredImage},theme.config.hasLocalStorage&&window.localStorage.setItem("theme-recent",JSON.stringify(theme.recentlyViewed.recent))},stringOverrides:function(){theme.productStrings=theme.productStrings||{},$.extend(theme.strings,theme.productStrings)},initVariants:function(){if(document.getElementById(this.selectors.variantsJson)){this.variantsObject=JSON.parse(document.getElementById(this.selectors.variantsJson).innerHTML);var options={$container:this.$container,enableHistoryState:this.settings.enableHistoryState,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,variants:this.variantsObject};$(this.selectors.variantColorSwatch).length&&$(this.selectors.variantColorSwatch).on("change",function(evt){var $el2=$(evt.currentTarget),color=$el2.data("color-name"),index=$el2.data("color-index");this.updateColorName(color,index)}.bind(this)),this.variants=new theme.Variants(options),this.$container.on("variantChange"+this.settings.namespace,this.updateCartButton.bind(this)).on("variantImageChange"+this.settings.namespace,this.updateVariantImage.bind(this)).on("variantPriceChange"+this.settings.namespace,this.updatePrice.bind(this)).on("variantUnitPriceChange"+this.settings.namespace,this.updateUnitPrice.bind(this)),$(this.selectors.sku).length&&this.$container.on("variantSKUChange"+this.settings.namespace,this.updateSku.bind(this)),(this.settings.inventory||this.settings.incomingInventory)&&this.$container.on("variantChange"+this.settings.namespace,this.updateInventory.bind(this)),theme.settings.dynamicVariantsEnable&&document.getElementById(this.selectors.currentVariantJson)&&(this.currentVariantObject=JSON.parse(document.getElementById(this.selectors.currentVariantJson).innerHTML),this.$variantSelectors.on("change"+this.settings.namespace,this.updateVariantAvailability.bind(this)),this.setCurrentVariantAvailability(this.currentVariantObject,!0))}},initQtySelector:function(){this.$container.find(".js-qty__wrapper").each(function(){new theme.QtySelector($(this),{namespace:".product"})})},initAjaxProductForm:function(){theme.settings.cartType==="drawer"&&new theme.AjaxProduct($(this.selectors.formContainer))},setCurrentVariantAvailability:function(variant){var valuesToEnable={option1:[],option2:[],option3:[]};this.disableVariantGroup($(this.selectors.formContainer).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 $el2=$(evt.currentTarget),newVal=$el2.val()?$el2.val():evt.currentTarget.value,optionIndex=$el2.data("index");var variants=this.variantsObject.filter(function(el){return el[optionIndex]===newVal});$(this.selectors.formContainer).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<variants.length;i++)this.enableVariantOption($group,variants[i][currentOptionIndex])}}.bind(this))},disableVariantGroup:function($group){theme.settings.dynamicVariantType==="dropdown"?$group.find("option").prop("disabled",!0):($group.find("input").prop("disabled",!0),$group.find("label").toggleClass("disabled",!0))},enableVariantOptionByValue:function(array,index){for(var $group=$(this.selectors.formContainer).find('.variant-input-wrap[data-index="'+index+'"]'),i=0;i<array.length;i++)this.enableVariantOption($group,array[i])},enableVariantOption:function($group,value){if(value=value.replace(/([ #;&,.+*~\':"!^$[\]()=>|\/@])/g,"\\$1"),theme.settings.dynamicVariantType==="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)}},updateColorName:function(color,index){$("#VariantColorLabel-"+this.sectionId+"-"+index).text(color)},updateCartButton:function(evt){var variant=evt.variant;if(variant)if(variant.available){$(this.selectors.addToCart).removeClass(classes.disabled).prop("disabled",!1);var defaultText=$(this.selectors.addToCartText).data("default-text");$(this.selectors.addToCartText).html(defaultText)}else $(this.selectors.addToCart).addClass(classes.disabled).prop("disabled",!0),$(this.selectors.addToCartText).html(theme.strings.soldOut);else $(this.selectors.addToCart).addClass(classes.disabled).prop("disabled",!0),$(this.selectors.addToCartText).html(theme.strings.unavailable)},updatePrice:function(evt){var variant=evt.variant;if(variant)if($(this.selectors.price).html(theme.Currency.formatMoney(variant.price,theme.settings.moneyFormat)).show(),variant.compare_at_price>variant.price){$(this.selectors.comparePrice).html(theme.Currency.formatMoney(variant.compare_at_price,theme.settings.moneyFormat)),$(this.selectors.priceWrapper).removeClass("hide"),$(this.selectors.price).addClass(classes.onSale),$(this.selectors.comparePriceA11y).attr("aria-hidden","false"),$(this.selectors.priceA11y).attr("aria-hidden","false");var savings=variant.compare_at_price-variant.price;theme.settings.saveType=="percent"?savings=Math.round(savings*100/variant.compare_at_price)+"%":savings=theme.Currency.formatMoney(savings,theme.settings.moneyFormat),$(this.selectors.savePrice).removeClass("hide").html(theme.strings.savePrice.replace("[saved_amount]",savings))}else $(this.selectors.priceWrapper).addClass("hide"),$(this.selectors.price).removeClass(classes.onSale),$(this.selectors.comparePriceA11y).attr("aria-hidden","true"),$(this.selectors.priceA11y).attr("aria-hidden","true"),$(this.selectors.savePrice).addClass("hide")},updateUnitPrice:function(evt){var variant=evt.variant;variant&&variant.unit_price?($(this.selectors.unitPrice).html(theme.Currency.formatMoney(variant.unit_price,theme.settings.moneyFormat)),$(this.selectors.unitPriceBaseUnit).text(theme.Currency.getBaseUnit(variant)),$(this.selectors.unitWrapper).removeClass("hide").removeClass(classes.visuallyHide)):$(this.selectors.unitWrapper).addClass(classes.visuallyHide)},updateSku:function(evt){var variant=evt.variant,newSku="";variant&&(variant.sku&&(newSku=variant.sku),$(this.selectors.sku).html(newSku))},updateInventory:function(evt){var variant=evt.variant;if(!variant||!variant.inventory_management||variant.inventory_policy==="continue"){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>theme.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?$(this.selectors.inventory).removeClass("hide").text(theme.strings.stockLabel.replace("[count]",qty)):$(this.selectors.inventory).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),$(this.selectors.incomingInventory).removeClass("hide").text(string)}else $(this.selectors.incomingInventory).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.settings.namespace,function(){this.loadYoutubeVideos($productVideos)}.bind(this)))),videoTypes.indexOf("mp4")>-1&&this.loadMp4Videos($productVideos),videoTypes},loadMp4Videos:function($videos){$videos.each(function(){var $el2=$(this);if($el2.data("video-type")=="mp4"){var id=$el2.attr("id"),videoId=$el2.data("video-id");videos[id]={type:"mp4",divId:id,style:$el2.data("video-style")}}})},loadYoutubeVideos:function($videos){$videos.each(function(){var $el2=$(this);if($el2.data("video-type")=="youtube"){var id=$el2.attr("id"),videoId=$el2.data("youtube-id");videos[id]={type:"youtube",id:id,videoId:videoId,style:$el2.data("video-style"),loop:$el2.data("video-loop"),attemptedToPlay:!1,events:{onReady:function(evt){onVideoPlayerReady(evt,id)},onStateChange:function(evt){onVideoStateChange(evt,id)}}}}});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]=new YT.Player(key2,args)}youtubeReady=!0},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")},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()}}},initImageZoom:function(){var $container=$(this.selectors.imageContainer,this.$container),imageZoom=new theme.Photoswipe($container[0],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"&&this.$mainSlider.slick("slickGoTo",imageIndex)},initImageSwitch:function(){$(this.selectors.photoThumbs).length&&$(this.selectors.photoThumbs).on("click",function(evt){evt.preventDefault()}).on("focus",function(evt){if(this.settings.slickThumbInitialized){var index=$(evt.currentTarget).data("index");index!==void 0&&this.$thumbSlider.slick("slickGoTo",index)}}.bind(this)).on("keydown",function(evt){evt.keyCode===13&&this.$container.find(selectors.currentSlide).focus()}.bind(this))},createImageCarousels:function(){if(!this.$thumbSlider.length||$(this.selectors.photoThumbs).length<2){var $video=$(this.selectors.productImageMain).find(selectors.productVideo);$video.length&&this.initVideo($video);return}this.settings.hasMultipleImages=!0,this.settings.has3d=this.$container.find(this.selectors.media).length;var $activeSlide=this.$mainSlider.find(".starting-slide"),startIndex=this._slideIndex($activeSlide);this.$mainSlider.off("init"),this.$mainSlider.off("beforeChange"),this.$mainSlider.on("init",this.mainSlideInit.bind(this)),this.$mainSlider.on("beforeChange",this.beforeSlideChange.bind(this)),this.$thumbSlider.on("init",this.thumbSlideInit.bind(this)),this.mainSliderArgs={infinite:!this.settings.has3d,arrows:!1,dots:!0,adaptiveHeight:!0,initialSlide:startIndex,appendDots:this.selectors.dotsContainer},this.thumbSliderArgs={accessibility:!1,initialSlide:startIndex};var sliderArgs=this.setSliderArgs();this.initSliders(sliderArgs),$("body").on("matchSmall matchLarge",function(){var sliderArgs2=this.setSliderArgs();this.initSliders(sliderArgs2)}.bind(this)),AOS&&AOS.refresh()},initSliders:function(args){this.destroyImageCarousels(),this.$mainSlider.slick(args.main),theme.config.bpSmall||this.$thumbSlider.slick(args.thumbs),this.settings.slickMainInitialized=!0},setSliderArgs:function(){var args={},thumbnailsVertical=this.settings.thumbVertical=this.$thumbSlider.data("position")==="beside",thumbArrows=this.settings.thumbArrows=this.$thumbSlider.data("arrows"),slidesToShow=thumbnailsVertical&&thumbArrows?1:thumbnailsVertical?3:5;return theme.config.bpSmall?(args.main=this.mainSliderArgs,args.thumbs=this.thumbSliderArgs):(args.main=$.extend({},this.mainSliderArgs,{asNavFor:this.selectors.thumbSlider,adaptiveHeight:!thumbnailsVertical,dots:!1,infinite:!1,fade:!0}),args.thumbs=$.extend({},this.thumbSliderArgs,{asNavFor:this.selectors.mainSlider,slidesToShow:1,slidesToScroll:1,arrows:thumbArrows,dots:!1,vertical:thumbnailsVertical,verticalSwiping:thumbnailsVertical,focusOnSelect:!0,infinite:!1,customHeightMatching:thumbArrows?!1:thumbnailsVertical,customSlideAdvancement:!0})),args},destroyImageCarousels:function(){this.$mainSlider&&this.settings.slickMainInitialized&&(this.$mainSlider.slick("unslick"),this.settings.slickMainInitialized=!1),this.$thumbSlider&&this.settings.slickThumbInitialized&&(this.$thumbSlider.slick("unslick"),this.settings.slickThumbInitialized=!1),this.settings.slickMainInitialized=!1,this.settings.slickThumbInitialized=!1},mainSlideInit:function(event,slick){var $slider=slick.$slider,$currentSlide=$slider.find(selectors.currentSlide),$video=$currentSlide.find(selectors.productVideo);$video.length&&this.initVideo($video)},thumbSlideInit:function(event,slick){this.settings.slickThumbInitialized=!0,this.settings.thumbArrows&&this.$thumbSlider.on("setPosition",this.thumbSlideArrowVisibility.bind(this))},thumbSlideArrowVisibility:function(event,slick){var $slider=slick.$slider,$arrows=$slider.find(".slick-arrow"),showArrows=!1;if(this.settings.thumbVertical){var $trackHeight=$slider.find(".slick-track").height();$trackHeight>=$slider.height()&&(showArrows=!0)}else{var $trackWidth=$slider.find(".slick-track").width();$trackWidth>=$slider.width()&&(showArrows=!0)}showArrows?$arrows.removeClass("hide"):$arrows.addClass("hide")},beforeSlideChange:function(event,slick,currentSlide,nextSlide){var $slider=slick.$slider,$currentSlide=$slider.find(selectors.currentSlide),$prevVideo=$currentSlide.find(".product__video"),$nextSlide=$slider.find('.slick-slide[data-slick-index="'+nextSlide+'"]'),$nextVideo=$nextSlide.find(".product__video");if(currentSlide!==nextSlide&&$prevVideo.length){var prevVideoType=this.getVideoType($prevVideo),prevVideoId=this.getVideoId($prevVideo);prevVideoId&&this.stopVideo(prevVideoId,prevVideoType)}if($nextVideo.length){var nextVideoType=this.getVideoType($nextVideo),nextVideoId=this.getVideoId($nextVideo);nextVideoId&&nextVideoType==="youtube"&&(youtubeReady?videos[nextVideoId]&&videos[nextVideoId].style==="muted"&&this.requestToPlayYoutubeVideo(nextVideoId,!0):$("body").on("youTubeReady"+this.settings.namespace,function(){videos[nextVideoId]&&videos[nextVideoId].style==="muted"&&this.requestToPlayYoutubeVideo(nextVideoId,!0)}.bind(this))),nextVideoId&&videos[nextVideoId]&&videos[nextVideoId].style==="muted"&&nextVideoType==="mp4"&&this.playMp4Video(nextVideoId),nextVideoId&&videos[nextVideoId]&&videos[nextVideoId].style!="muted"&&setParentAsLoaded($("#"+nextVideoId))}var $currentMedia=$currentSlide.find(this.selectors.media);$currentMedia.length&&$currentMedia.trigger("mediaHidden");var $nextMedia=$nextSlide.find(this.selectors.media);$nextMedia.length&&($nextMedia.trigger("mediaVisible"),$nextSlide.find(".shopify-model-viewer-ui__button").attr("tabindex",0),$nextSlide.find(".product-single__close-media").attr("tabindex",0))},resizeSlides:function(){this.settings.hasMultipleImages&&($(window).trigger("resize.slick"),setTimeout(function(){this.$mainSlider&&this.settings.slickMainInitialized&&this.$mainSlider.slick("setPosition"),this.$thumbSlider&&this.settings.slickThumbInitialized&&this.$thumbSlider.slick("setPosition")}.bind(this),500))},_slideIndex:function($el2){return $el2.data("index")},openModalProduct:function(){if(!this.settings.modalInit){var $formHolder=$(this.selectors.modalFormHolder),url=$formHolder.data("url"),template=$formHolder.data("template");template||(url=url+"?view=ajax"),$formHolder.load(url+" #AddToCartForm-"+this.sectionId,function(){$formHolder.addClass("is-active"),this.formSetup(),Shopify&&Shopify.PaymentButton&&Shopify.PaymentButton.init()}.bind(this)),this.productSetup(),this.loadModalContent(),this.createImageCarousels(),this.customMediaListners(),this.settings.modalInit=!0}this.resizeSlides(),this.addIdToRecentlyViewed()},closeModalProduct:function(){this.stopVideo(),$("body").off(this.settings.namespace),$(window).off(this.settings.namespace)},loadModalContent:function(){var videoTypes=this.checkIfVideos();videoTypes&&videoTypes.indexOf("mp4")>-1&&this.$modal.find('.product__video[data-video-type="mp4"]').find(".product__video-src").each(function(i,video){var $el2=$(video),src=$el2.attr("src"),type=$el2.attr("type"),newEl=document.createElement("source");newEl.src=src,newEl.type=type,$el2.after(newEl)}.bind(this))},initModelViewerLibraries:function(){var $modelViewerElements=$(this.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(){$("body").on("click",this.selectors.closeMedia,function(){this.$mainSlider.find(selectors.currentSlide).find(this.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(this.selectors.closeMedia).removeClass("hide"),this.toggleSliderSwiping(!1)},mediaUnloaded:function(evt){this.$container.find(this.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.settings.namespace),$("body").off(this.settings.namespace),this.destroyImageCarousels(),theme.ProductMedia.removeSectionModels(this.sectionId)}}),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),this.updateVariantInventory($section),$(data).find(this.selectors.sectionClass).find(this.selectors.productResults).length===0&&$section.addClass("hide")}.bind(this))}},updateVariantInventory:function($section){window.inventories=window.inventories||{},$section.find(".js-product-inventory-data").each(function(){var $el2=$(this),sectionId=$el2.data("section-id");window.inventories[sectionId]={},$(".js-variant-inventory-data",$el2).each(function(){var $child=$(this);window.inventories[sectionId][$child.data("id")]={quantity:$child.data("quantity"),incoming:$child.data("incoming"),next_incoming_date:$child.data("date")}})})}}),Recommendations}(),theme.CollectionHeader=function(){var selectors={hero:".collection-hero",parallaxContainer:".parallax-container"};function CollectionHeader(container){var $container=$(container);this.namespace=".collection-header";var $heroImageContainer=this.$heroContainer=$container.find(selectors.hero);if($heroImageContainer.length){if(this.checkIfNeedReload(),$container.data("parallax")){var $parallaxContainer=$container.find(selectors.parallaxContainer),args={namespace:this.namespace};theme.parallaxSections[this.namespace]=new theme.Parallax($parallaxContainer,args)}}else theme.headerNav.disableOverlayHeader()}return CollectionHeader.prototype=$.extend({},CollectionHeader.prototype,{checkIfNeedReload:function(){if(Shopify.designMode&&theme.settings.overlayHeader){var $header=$(".header-wrapper");!$header.hasClass("is-light")&&!$(".header-wrapper").hasClass("header-wrapper--sticky")&&location.reload()}},onUnload:function(){theme.parallaxSections[this.namespace]&&(theme.parallaxSections[this.namespace].destroy(),delete theme.parallaxSections[this.namespace])}}),CollectionHeader}(),theme.CollectionSidebar=function(){var drawerStyle=!1;function CollectionSidebar(container){this.$container=$(container),this.init()}return CollectionSidebar.prototype=$.extend({},CollectionSidebar.prototype,{init:function(){this.onUnload(),drawerStyle=this.$container.data("style")==="drawer",theme.FilterDrawer=new theme.Drawers("FilterDrawer","collection-filters",!0)},forceReload:function(){this.init()},onSelect:function(){if(theme.FilterDrawer){if(!drawerStyle){theme.FilterDrawer.close();return}(drawerStyle||theme.config.bpSmall)&&theme.FilterDrawer.open()}},onDeselect:function(){theme.FilterDrawer&&theme.FilterDrawer.close()},onUnload:function(){theme.FilterDrawer&&theme.FilterDrawer.close()}}),CollectionSidebar}(),theme.Collection=function(){var selectors={colorSwatchImage:".grid-product__color-image",colorSwatch:".color-swatch--with-image",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,this.init()}return Collection.prototype=$.extend({},Collection.prototype,{init:function(){this.$container=$(this.container);var sectionId=this.sectionId=this.$container.attr("data-section-id");this.namespace=".collection-"+sectionId,this.$sortSelect=$(selectors.sortSelect),this.$sortSelect.on("change",this.onSortChange.bind(this)),this.defaultSort=this.getDefaultSortValue(),this.initParams(),this.colorSwatchHovering(),theme.reinitSection("collection-sidebar")},initParams:function(){if(this.queryParams={},location.search.length)for(var aKeyValue,aCouples=location.search.substr(1).split("&"),i=0;i<aCouples.length;i++)aKeyValue=aCouples[i].split("="),aKeyValue.length>1&&(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)},colorSwatchHovering:function(){var $colorImage=$(selectors.colorSwatchImage);$colorImage.length&&$(selectors.colorSwatch).on({mouseenter:function(evt){$el=$(evt.currentTarget);var id=$el.data("variant-id"),image=$el.data("variant-image");$(".grid-product__color-image--"+id).css("background-image","url("+image+")").addClass("is-active")},mouseleave:function(evt){$el=$(evt.currentTarget);var id=$el.data("variant-id");$(".grid-product__color-image--"+id).removeClass("is-active")}})},forceReload:function(){this.onUnload(),this.init()},onUnload:function(){$(window).off(this.namespace),this.$container.off(this.namespace),$(selectors.colorSwatch).off(this.namespace)}}),Collection}(),theme.HeaderSection=function(){var selectors={drawer:"#NavDrawer",mobileSubNavToggle:".mobile-nav__toggle-btn",hasSublist:".mobile-nav__has-sublist",disclosureLocale:"[data-disclosure-locale]",disclosureCurrency:"[data-disclosure-currency]"},classes={navExpanded:"mobile-nav--expanded"};function Header(container){var $container=this.$container=$(container),sectionId=this.sectionId=$container.attr("data-section-id");theme.reinitSection("slideshow-section"),this.initDrawers(),theme.headerNav.init(),theme.announcementBar.init(),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)),Shopify.designMode&&setTimeout(function(){$("body").trigger("resize")},500)}return Header.prototype=$.extend({},Header.prototype,{cacheSelectors:function(){this.cache={$localeDisclosure:this.$container.find(selectors.disclosureLocale),$currencyDisclosure:this.$container.find(selectors.disclosureCurrency)}},initDrawers:function(){theme.NavDrawer=new theme.Drawers("NavDrawer","nav"),theme.settings.cartType==="drawer"&&new theme.CartDrawer,this.drawerMenuButtons()},drawerMenuButtons:function(){$(selectors.drawer).find(".js-drawer-close").on("click",function(evt){evt.preventDefault(),theme.NavDrawer.close()});var $mobileSubNavToggle=$(selectors.mobileSubNavToggle);$mobileSubNavToggle.attr("aria-expanded","false"),$mobileSubNavToggle.each(function(i,el){var $el2=$(el);$el2.attr("aria-controls",$el2.attr("data-aria-controls"))}),$mobileSubNavToggle.on("click",function(){var $el2=$(this),currentlyExpanded=$el2.attr("aria-expanded"),toggleState=!1;currentlyExpanded==="true"?$el2.attr("aria-expanded","false"):($el2.attr("aria-expanded","true"),toggleState=!0),$el2.closest(selectors.hasSublist).toggleClass(classes.navExpanded,toggleState)})},onBlockSelect:function(evt){theme.announcementBar.onBlockSelect(evt.detail.blockId)},onDeselect:function(){theme.announcementBar.onBlockDeselect()},onUnload:function(){theme.NavDrawer.close(),theme.headerNav.unload(),theme.announcementBar.unload(),this.cache.$localeDisclosure.length&&this.localeDisclosure.unload(),this.cache.$currencyDisclosure.length&&this.currencyDisclosure.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(){var selectors={parallaxContainer:".parallax-container"};function SlideshowSection(container){var $container=this.$container=$(container),$section=$container.parent(),sectionId=$container.attr("data-section-id"),slideshow=this.slideshow="#Slideshow-"+sectionId;this.namespace="."+sectionId;var $imageContainer=$(container).find(".hero");if($imageContainer.length&&theme.loadImageSection($imageContainer),this.init(),$container.data("parallax")){var args={namespace:this.namespace};theme.parallaxSections[this.namespace]=new theme.Parallax($container.find(selectors.parallaxContainer),args)}}return SlideshowSection.prototype=$.extend({},SlideshowSection.prototype,{init:function(){this.onUnload();var $slideshow=$(this.slideshow),args={autoplay:$slideshow.data("autoplay"),arrows:$slideshow.data("arrows"),dots:$slideshow.data("dots"),fade:!0,speed:500};theme.slideshows[this.slideshow]=new theme.Slideshow(this.slideshow,args)},forceReload:function(){this.init()},onUnload:function(){theme.parallaxSections[this.namespace]&&(theme.parallaxSections[this.namespace].destroy(),delete theme.parallaxSections[this.namespace]),theme.slideshows[this.slideshow]&&(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.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",promoContainer:".promo-grid__container"},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&&(setParentAsLoaded($mp4Div),startMp4Playback(mp4Video).then(function(){}).catch(function(error){$mp4Div.attr("controls",""),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"),videoVisibilityCheck(playerId),$(window).on("scroll."+playerId,{id:playerId},$.throttle(150,videoVisibilityCheck))}function videoVisibilityCheck(id){var playerId;typeof id=="string"?playerId=id:playerId=id.data?id.data.id:!1,playerId&&(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($el2){$el2.closest(selectors.videoParent).addClass(classes.loading)}function setParentAsLoaded($el2){$el2.closest(selectors.videoParent).removeClass(classes.loading).addClass(classes.loaded)}function setVideoToBeInteractedWith($el2){$el2.closest(selectors.videoParent).addClass(classes.interactable),$el2.closest(selectors.promoContainer).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].destroy(),$(window).off("scroll"+this.namespace),$("body").off("vimeoReady"+this.namespace)}}),videoSection}(),theme.BackgroundImage=function(){var selectors={parallaxContainer:".parallax-container"};function backgroundImage(container){var $container=$(container),sectionId=$container.attr("data-section-id");if(this.namespace="."+sectionId,!!$container.length&&$container.data("parallax")){var $parallaxContainer=$container.find(selectors.parallaxContainer),args={namespace:this.namespace,desktopOnly:!0};theme.parallaxSections[this.namespace]=new theme.Parallax($parallaxContainer,args)}}return backgroundImage.prototype=$.extend({},backgroundImage.prototype,{onUnload:function(evt){theme.parallaxSections[this.namespace].destroy(),delete theme.parallaxSections[this.namespace]}}),backgroundImage}(),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<defaults.slidesToShow&&(defaults.slidesToShow=slideCount,defaults.slidesToScroll=slideCount),$slider.on("init",this.a11y.bind(this)),theme.config.bpSmall?this.init($slider,mobileOptions):this.init($slider,defaults),$("body").on("matchSmall",function(){this.init($slider,mobileOptions)}.bind(this)),$("body").on("matchLarge",function(){this.init($slider,defaults)}.bind(this))}return Testimonials.prototype=$.extend({},Testimonials.prototype,{onUnload:function(){$(this.slider,this.wrapper).slick("unslick")},onBlockSelect:function(evt){var $slide=$(".testimonials-slide--"+evt.detail.blockId+":not(.slick-cloned)"),slideIndex=$slide.data("slick-index");$(this.slider,this.wrapper).slick("slickGoTo",slideIndex)},init:function(obj,args){this.sliderActive&&(obj.slick("unslick"),this.sliderActive=!1),obj.slick(args),this.sliderActive=!0,AOS&&AOS.refresh()},a11y:function(event,obj){var $list=obj.$list,$wrapper=$(this.wrapper,this.$container);$list.removeAttr("aria-live"),$wrapper.on("focusin",function(evt){$wrapper.has(evt.target).length&&$list.attr("aria-live","polite")}),$wrapper.on("focusout",function(evt){$wrapper.has(evt.target).length&&$list.removeAttr("aria-live")})}}),Testimonials}(),theme.NewsletterPopup=function(){function NewsletterPopup(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id");if(this.cookieName="newsletter-"+sectionId,!!$container.length&&window.location.pathname!=="/challenge"){if(this.data={secondsBeforeShow:$container.data("delay-seconds"),daysBeforeReappear:$container.data("delay-days"),cookie:Cookies.get(this.cookieName),testMode:$container.data("test-mode")},this.modal=new theme.Modals("NewsletterPopup-"+sectionId,"newsletter-popup-modal"),($container.find(".errors").length||$container.find(".note--success").length)&&this.modal.open(),$container.find(".note--success").length){this.closePopup(!0);return}$("body").on("modalClose."+$container.attr("id"),this.closePopup.bind(this)),(!this.data.cookie||this.data.testMode)&&this.initPopupDelay()}}return NewsletterPopup.prototype=$.extend({},NewsletterPopup.prototype,{initPopupDelay:function(){setTimeout(function(){this.modal.open()}.bind(this),this.data.secondsBeforeShow*1e3)},closePopup:function(success){if(this.data.testMode){Cookies.remove(this.cookieName,{path:"/"});return}var expiry=success?200:this.data.daysBeforeReappear;Cookies.set(this.cookieName,"opened",{path:"/",expires:expiry})},onLoad:function(){this.modal.open()},onSelect:function(){this.modal.open()},onDeselect:function(){this.modal.close()},onUnload:function(){}}),NewsletterPopup}(),theme.Maps=function(){var config={zoom:14},apiStatus=null,mapsToLoad=[],errors={addressNoResults:theme.strings.addressNoResults,addressQueryLimit:theme.strings.addressQueryLimit,addressError:theme.strings.addressError,authError:theme.strings.authError},selectors={section:'[data-section-type="map"]',map:"[data-map]",mapOverlay:"[data-map-overlay]"},classes={mapError:"map-section--load-error",errorMsg:"map-section__error errors text-center"};window.gm_authFailure=function(){Shopify.designMode&&($(selectors.section).addClass(classes.mapError),$(selectors.map).remove(),$(selectors.mapOverlay).after('<div class="'+classes.errorMsg+'">'+theme.strings.authError+"</div>"))};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('<div class="'+classes.errorMsg+'">'+errorMessage+"</div>")})},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:".js-photoswipe__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,this.$container.attr("data-zoom")!=="false"&&(this.$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)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={bpSmall:!1,hasSessionStorage:!0,hasLocalStorage:!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,isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),isIpad:/ipad/.test(window.navigator.userAgent.toLowerCase())||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1,stickyHeader:!1,recentlyViewed:[]},theme.config.isIpad&&(document.documentElement.className+=" js-ipad"),theme.recentlyViewed={recent:{},productInfo:{}},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.collapsibles.init(),theme.rte.init(),AOS.init({easing:"ease-out-quad",once:!0,offset:60,disableMutationObserver:!0}),$(document.documentElement).on("keyup.tab",function(evt){evt.keyCode===9&&($(document.documentElement).addClass("tab-outline"),$(document.documentElement).off("keyup.tab"))}),$(".footer__newsletter-input").on("keyup",function(){$(this).addClass("footer__newsletter-input--active")})},theme.initSecondary=function(){theme.initQuickShop(),theme.settings.predictiveSearch&&theme.predictiveSearch.init(),theme.collectionTemplate.init(),theme.customerTemplates.init(),theme.videoModal(),document.dispatchEvent(new CustomEvent("page:loaded"))},theme.setGlobals=function(){theme.config.hasSessionStorage=theme.isStorageSupported("session"),theme.config.hasLocalStorage=theme.isStorageSupported("local"),theme.config.hasLocalStorage&&(theme.recentlyViewed.localStorage=window.localStorage.getItem("theme-recent"),theme.recentlyViewed.localStorage&&(theme.recentlyViewed.recent=JSON.parse(theme.recentlyViewed.localStorage))),theme.recentlyViewed.productInfo=theme.config.hasSessionStorage&&sessionStorage["recent-products"]?JSON.parse(sessionStorage["recent-products"]):{},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 loading--delayed").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.isStorageSupported=function(type){if(window.self!==window.top)return!1;var testKey="test",storage;type==="session"&&(storage=window.sessionStorage),type==="local"&&(storage=window.localStorage);try{return storage.setItem(testKey,"1"),storage.removeItem(testKey),!0}catch(error){return!1}},theme.isElementVisible=function($el2,threshold){var rect=$el2[0].getBoundingClientRect(),windowHeight=window.innerHeight||document.documentElement.clientHeight;return threshold=threshold||0,rect.bottom>=0&&rect.right>=0&&rect.top<=windowHeight+threshold&&rect.left<=(window.innerWidth||document.documentElement.clientWidth)},theme.reinitSection=function(section){for(var i=0;i<sections.instances.length;i++){var instance=sections.instances[i];instance.type===section&&typeof instance.forceReload=="function"&&instance.forceReload()}},theme.reinitProductGridItem=function($scope){AOS&&AOS.refreshHard(),theme.initQuickShop(),window.SPR&&(SPR.initDomEls(),SPR.loadBadges()),sections.register("product-template",theme.Product,$scope),theme.collapsibles.init()},window.onpageshow=function(evt){evt.persisted&&$("body").removeClass("unloading")},$(document).ready(function(){theme.init(),window.sections=new theme.Sections,sections.register("header-section",theme.HeaderSection),sections.register("slideshow-section",theme.SlideshowSection),sections.register("video-section",theme.VideoSection),sections.register("background-image",theme.BackgroundImage),sections.register("recently-viewed",theme.RecentlyViewed),sections.register("product",theme.Product),sections.register("product-recommendations",theme.Recommendations),sections.register("product-template",theme.Product),sections.register("collection-header",theme.CollectionHeader),sections.register("collection-sidebar",theme.CollectionSidebar),sections.register("collection-template",theme.Collection),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("photoswipe",theme.Photoswipe),sections.register("footer-section",theme.FooterSection),theme.initSecondary()})}(theme.jQuery); //# sourceMappingURL=/cdn/shop/t/5/assets/theme.js.map?v=117654868488806554321722950837