/* @license Expanse by Archetype Themes (https://archetypethemes.co) Access unminified JS in assets/theme.js Use this event listener to run your own JS outside of this file. Documentation - https://archetypethemes.co/blogs/expanse/javascript-events-for-developers document.addEventListener('page:loaded', function() { // Page has loaded and theme assets are ready }); */console&&console.log&&console.log("Expanse theme ("+theme.settings.themeVersion+") by ARCH\u039ETYPE | Learn more at https://archetypethemes.co"),function(){"use strict";window.Shopify&&window.Shopify.theme&&navigator&&navigator.sendBeacon&&window.Shopify.designMode&&navigator.sendBeacon("https://api.archetypethemes.co/api/beacon",new URLSearchParams({shop:window.Shopify.shop,themeName:window.theme&&window.theme.settings&&"".concat(window.theme.settings.themeName," v").concat(window.theme.settings.themeVersion),role:window.Shopify.theme.role,route:window.location.pathname,themeId:window.Shopify.theme.id,themeStoreId:window.Shopify.theme.theme_store_id||0,isThemeEditor:!!window.Shopify.designMode})),theme.customerTemplates=function(){checkUrlHash(),initEventListeners(),resetPasswordSuccess(),customerAddressForm();function checkUrlHash(){var hash=window.location.hash;hash==="#recover"&&toggleRecoverPasswordForm()}function toggleRecoverPasswordForm(){var passwordForm=document.getElementById("RecoverPasswordForm").classList.toggle("hide"),loginForm=document.getElementById("CustomerLoginForm").classList.toggle("hide")}function initEventListeners(){var recoverForm=document.getElementById("RecoverPassword");recoverForm&&recoverForm.addEventListener("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()});var hideRecoverPassword=document.getElementById("HideRecoverPasswordLink");hideRecoverPassword&&hideRecoverPassword.addEventListener("click",function(evt){evt.preventDefault(),toggleRecoverPasswordForm()})}function resetPasswordSuccess(){var formState=document.querySelector(".reset-password-success");formState&&document.getElementById("ResetSuccess").classList.remove("hide")}function customerAddressForm(){var newAddressForm=document.getElementById("AddressNewForm"),addressForms=document.querySelectorAll(".js-address-form");!newAddressForm||!addressForms.length||(setTimeout(function(){document.querySelectorAll(".js-address-country").forEach(function(el){var countryId=el.dataset.countryId,provinceId=el.dataset.provinceId,provinceContainerId=el.dataset.provinceContainerId;new Shopify.CountryProvinceSelector(countryId,provinceId,{hideElement:provinceContainerId})})},1e3),document.querySelectorAll(".address-new-toggle").forEach(function(el){el.addEventListener("click",function(){newAddressForm.classList.toggle("hide")})}),document.querySelectorAll(".address-edit-toggle").forEach(function(el){el.addEventListener("click",function(evt){var formId=evt.currentTarget.dataset.formId;document.getElementById("EditAddress_"+formId).classList.toggle("hide")})}),document.querySelectorAll(".address-delete").forEach(function(el){el.addEventListener("click",function(evt){var formId=evt.currentTarget.dataset.formId,confirmMessage=evt.currentTarget.dataset.confirmMessage;confirm(confirmMessage||"Are you sure you wish to delete this address?")&&Shopify&&Shopify.postLink("/account/addresses/"+formId,{parameters:{_method:"delete"}})})}))}};function DOMready(callback){document.readyState!="loading"?callback():document.addEventListener("DOMContentLoaded",callback)}DOMready(function(){theme.settings.isCustomerTemplate&&theme.customerTemplates(),document.dispatchEvent(new CustomEvent("page:loaded"))})}(); //# sourceMappingURL=/cdn/shop/t/4/assets/theme.js.map?v=77167323714411244521706888279