;(function(){var d=Object.defineProperty;var u=(t,e,a)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var s=(t,e,a)=>(u(t,typeof e!="symbol"?e+"":e,a),a);class m{constructor(e){s(this,"selector");s(this,"SCROLL_DURATION");s(this,"accordionHeaders");s(this,"scrollToTop",e=>{const a=e.getBoundingClientRect().top+window.scrollY;window.scroll({top:a-50-e.offsetHeight,behavior:"smooth"})});this.selector=e,this.SCROLL_DURATION=300,this.init()}init(){this.accordionHeaders=Array.from(document.querySelectorAll(`[data-pf-type="${this.selector}.Header"]`)),this.accordionHeaders.length&&this.observeAccordionHeader()}observeAccordionHeader(){if("IntersectionObserver"in window){const e=new IntersectionObserver((a,n)=>{const r=a.length;for(let o=0;o{e.observe(a)})}else this.accordionHeaders.forEach(e=>{this.handleHeaderClick(e)})}handleHeaderClick(e){e.parentElement.addEventListener("click",a=>{a.preventDefault();const n=e.closest(`div[data-pf-type="${this.selector}"]`),{openMultiple:r,scrollToTop:o}=n.dataset||{},c=e.closest("details"),i=n.querySelector(":scope > details[open]");r==="false"&&i&&i!==c&&this.toggleAccordion(i,i.querySelector(`div[data-pf-type="${this.selector}.Header"]`),!0),o==="true"?this.toggleAccordion(c,e,c.hasAttribute("open"),this.scrollToTop):this.toggleAccordion(c,e,c.hasAttribute("open"))})}toggleAccordion(e,a,n,r){n?(e.classList.remove("open"),a.setAttribute("data-active","false"),setTimeout(()=>{e.open=!1,r&&r(a)},this.SCROLL_DURATION)):(e.open=!0,a.setAttribute("data-active","true"),setTimeout(()=>{e.classList.add("open")},10),r&&setTimeout(()=>{r(a)},this.SCROLL_DURATION))}}const h=()=>{new m("Accordion3")};function p(){try{h()}catch(t){console.error("PF elements helper error: ",t)}}(function(){console.log("Run PF theme app extension..."),p()})();function b(){fetch("/?section_id=cart-drawer").then(t=>t.text()).then(t=>{const a=new DOMParser().parseFromString(t,"text/html").getElementById("cart-drawer").innerHTML;$("#cart-drawer").html(a),$('[aria-controls="cart-drawer"]')[0].click(),$(".header__cart-count .count-bubble ").html(cart.item_count).css("opacity",1)}).catch(t=>console.error("Failed to update ccart Impact Theme",t))}function f(){fetch("/cart?view=mini-cart").then(t=>t.text()).then(t=>{const a=new DOMParser().parseFromString(t,"text/html").getElementById("HeaderMiniCart");$("#HeaderMiniCart").html(a.innerHTML),$(".head-slot-cart-link .head-slot-cart-link-quantity").length>0?$(".head-slot-cart-link .head-slot-cart-link-quantity").html(cart.item_count):$(".head-slot-cart-link").append(`${cart.item_count}`),$("a.head-slot-nav-link.head-slot-cart-link")[0].click()}).catch(t=>console.error("Failed to update ccart Athens Theme",t))}function w(t){wetheme.updateCartDrawer(t),wetheme.toggleRightDrawer("cart",!0,{cart:t})}function y(t){geckoShopify.onCartUpdate(1,1,t.id)}function T(){window.cart.getCart()}function C(){theme.ajaxCart.update()}function g(){CartJS.getCart()}function _(t){Shopify.updateQuickCart(t)}function k(){const t={cartCountSelector:".cartCountSelector",cartTotalSelector:".cartTotalSelector"};var e=function(n){$.ajax({type:"GET",url:n,complete:function(r){$("#cart-dropdown-span").html($("#cart-dropdown-span",r.responseText).html())}})};if($(".cartCountSelector").length){var a=$(t.cartCountSelector).html()||"0";$(t.cartCountSelector).html(a.replace(/[0-9]+/,cart.item_count)).removeClass("hidden"),$(".cartTotalSelector").html(Shopify.formatMoney(cart.total_price,theme.moneyFormat).replace(/((\,00)|(\.00))$/g,""))}e()}function v(t){wetheme.updateCartDrawer(t),wetheme.drawer.slideouts.right.open()}function S(t){var e=t.item_count;return $(".cart--external--total-items").text(e),$.ajax({url:theme.classes.FrameworkCart.prototype.getAjaxUrl(),type:"GET",dataType:"html"}).done(function(a){var n;n=$($.parseHTML(a)),$(".cart--root").attr("data-has-items",!0),$(".cart--root").find(".cart--form").replaceWith(n.find(".cart--form"))}),e>0?($(".cart--external--total-items").css("display","inline-block"),$(".cart--external--total-items").parent().show()):($(".cart--external--total-items").not(".header--mobile-cart-count").hide(),$(".cart--external--total-items").not(".header--mobile-cart-count").parent().hide())}function x(){var t=res.id;window.carts.forEach(function(e){e.onCartUpdated(t)})}function E(){document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:res,addToCartBtn:""}}))}function L(t){document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0})),document.getElementById("mini-cart").open=!0,document.querySelector("cart-count").innerText=t.item_count}function M(t,e){Cart.buildCart(t),Cart.popover.show(e)}function H(){updateDropdownCart(),document.querySelector(".cart-btn-container > a").click()}function A(){document.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:res.variant_id,quantity:1}}))}function I(t){try{document.dispatchEvent(new CustomEvent("product:added",{bubbles:!0,detail:{variant:t.variant_id,quantity:1}}))}catch(e){console.error("Failed to update cart Prestige Theme: ",e)}}function F(t){var e=t.variant_title!==null?"("+t.variant_title+")":"",a=$(".js-mini-cart").attr("data-cartmini");if(a!="true"){var n='

'+t.product_title+" x "+t.quantity+"

"+e+"
";theme.alert.new(theme.strings.addToCartSuccess,n,3e3,"notice")}theme.miniCart.updateElements(),theme.miniCart.generateCart()}function P(t,e){Shopify.onItemAdded(t),Shopify.onCartUpdate(e),jQuery("#modalAddToCart").modal("toggle"),document.querySelector(".popupimage").src=t.image}function q(t){window.refreshCart&&window.refreshCart(t),$("#header").is(":visible")?$("#header .cart-container").addClass("active_link"):$(".sticky_nav--stick").length?$(".sticky_nav .cart-container").addClass("active_link"):$(".top-bar .cart-container").addClass("active_link"),window.PXUTheme.media_queries.medium.matches&&($(this).parent().hasClass("active_link"),$("body").addClass("blocked-scroll"),document.getElementById("header").classList.contains("mobile_nav-fixed--false")&&window.scroll({top:0,left:0,behavior:"smooth"}))}function D(t){fetch("/?snippets_id=cart").then(e=>e.text()).then(e=>{const n=new DOMParser().parseFromString(e,"text/html").querySelector('[data-active="cart"]');if(n){const r=n.innerHTML;$('[data-active="cart"]').html(r),$(".header--cart-link").attr("data-has-items","true"),$(".cart--external--total-items").text(t.item_count),$(".cart--external--total-price").text($(".cart--total--price.money").text()),$("a.header--cart-toggle")[0].click()}}).catch(e=>console.log("Error: ",e))}function j(t,e){Shopify.onItemAdded(e),Shopify.onCartUpdate(t)}function O(t){const e=document.createElement("span");e.classList.add("item-count","inline-block","text-center"),document.querySelector(".cart").appendChild(e),e.innerHTML=t==null?void 0:t.item_count}function R(t){document.dispatchEvent(new CustomEvent("ajaxProduct:added",{detail:{product:t}}))}function N(){setTimeout(function(){document.querySelector("#cart-icon-bubble").click()},400)}function B(t){fetch("/?sections=mini-cart,cart-icon-bubble").then(e=>e.json()).then(e=>{const a=document.querySelector("mini-cart");t.sections=e,a.renderContents(t)})}function U(t){document.documentElement.dispatchEvent(new CustomEvent("cart:refresh",{bubbles:!0,detail:{cart:t,openMiniCart:window.themeVariables.settings.cartType==="drawer"&&this.closest(".drawer")===null}})),document.querySelectorAll('.header__icon-wrapper[aria-label="Cart"]')[0].click()}function Q(t){$(".header-cart-count").text(t.item_count),$(".header-cart-count").class("active")}function J(t){fetch("/?snippets_id=cart-notification").then(e=>e.text()).then(e=>{const a=new DOMParser().parseFromString(e,"text/html"),n=a.getElementById("cart-notification").innerHTML;if(a.querySelector("#cart-notification .totals__subtotal-value").innerHTML,$("#cart-notification").html(n),$("cart-drawer").removeClass("is-empty"),$("cart-drawer-items").removeClass("is-empty"),$("#cart-icon-bubble .cart-count-bubble").length===0){const r=document.createElement("div");r.className="cart-count-bubble",r.innerHTML=` ${t.item_count} items `,$("#cart-icon-bubble").append(r)}else $('.cart-count-bubble span[aria-hidden="true"]').each((r,o)=>$(o).text(t.item_count));$("#cart-icon-bubble")[0].click(),$("#cart-notification-Overlay").on("click",()=>{$("cart-drawer").removeClass("active"),$("body").removeClass("overflow-hidden")})})}function Y(t,e){const a=new CustomEvent("cartcount:update",{detail:e,res:t});window.dispatchEvent(a),$(".atc-banner--container").parent().css("display","block"),$(".atc-banner--container").css({display:"block",top:"188px",position:"fixed"}),$(".atc-banner--container").attr("data-animation-state","open"),$(".atc-banner--container [data-atc-banner-product-image]").html(`${t.title}`),$(".atc-banner--container [data-atc-banner-product-title]").html(t.title),$(".atc-banner--container [data-atc-banner-product-price-quantity]").html(`${t.quantity} \xD7 `),$(".atc-banner--container [data-atc-banner-cart-button] span").html(e.item_count),$(".atc-banner--container [data-atc-banner-product-discounts]").css("display","none"),$(".atc-banner--container [data-atc-banner-product-price-value]").html(Shopify.formatMoney(t.price)),$(".atc-banner--container [data-atc-banner-close]").click(function(){$(".atc-banner--container").attr("data-animation-state","close")}),window.scrollY>188?$(".atc-banner--container").css("top","70px"):$(".atc-banner--container").css("top","188px"),$(window).scroll(function(){window.scrollY>188?$(".atc-banner--container").css("top","70px"):$(".atc-banner--container").css("top","188px")})}function G(t){$.getJSON("/?sections=cart-notification-product,cart-notification-button,cart-drawer,cart-icon-bubble").then(e=>{t.sections=e;const a=document.querySelector("cart-drawer")||document.querySelector("cart-notification");a?(a.classList.remove("is-empty"),a.renderContents(t)):$("#cart-icon-bubble")[0].click()})}function V(t,e){$.getJSON("/?sections=cart-notification-product,cart-notification-button,cart-icon-bubble").then(a=>{const n=document.querySelector("cart-notification");t.sections=a;const r=document.querySelector(".cart-notification__count-value");r&&(r.innerHTML=e.item_count);const o=document.querySelector(".totals__subtotal-value");o&&(o.innerHTML=e.total_price/100+" "+e.currency),n.renderContents(t)})}function W(t){return new Promise((e,a)=>{try{$.post(theme.routes.cart_url+"/change.js",{quantity:t.quantity,id:t.variant_id}).done(n=>{theme.updateCartSummaries(n),e(n)}).fail(n=>{a(n)})}catch(n){a(n)}})}function z(){$.get("/cart?view=json",function(t){$(".cart-inner-content").html(t)}),$.getJSON("/cart.js",function(t){$(".cart-total .cart-qty").html(t.item_count)}),frontendData.enableCurrency&&(currenciesCallbackSpecial(".cart-wrapper .cart-inner span.money"),currenciesCallbackSpecial(".icon-cart-header span.money")),$(".cartloading").hide(),setTimeout(function(){$(".loader-container").hide(),$("#resultLoading").hide(),cartData.shopping_cart_action=="popup"&&(box.addClass("d-block"),setTimeout(function(){box.removeClass("d-block")},5e3)),cartData.shopping_cart_action=="widget"&&($(".header-container").hasClass("sticky-header")?$(".main-top-nav .mini-cart .cart-wrapper").fadeIn(200):$(".mini-cart .cart-wrapper").fadeIn(200),timeoutNumber=setTimeout(function(){$(".mini-cart .cart-wrapper").fadeOut(200)},3500))},500)}function K(){if(theme.settings.after_add_to_cart==="page")window.location=theme.routes.cart_url;else if(theme.settings.after_add_to_cart==="drawer")document.documentElement.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1,detail:{openDrawer:!0}}));else if(theme.settings.after_add_to_cart==="notification"){document.documentElement.dispatchEvent(new CustomEvent("theme:cartchanged",{bubbles:!0,cancelable:!1}));var t=document.getElementById("AddedNotification").content.firstElementChild.cloneNode(!0);t.dataset.productTitle=response.product_title;var e=document.querySelector(".pageheader--sticky");e||(e=document.querySelector("body")),e.appendChild(t)}}function X(t){document.querySelector("mini-cart").generateDom(t),$("a.header-cart-btn.header-action-cart.cart-toggle")[0].click()}const Z=async()=>{$("body").trigger("added.ajaxProduct")};let l=!1;const ee=async()=>{!l&&window.ajaxCart&&(window.ajaxCart.init({formSelector:"#AddToCartForm--product-template",cartContainer:"#CartContainer",addToCartSelector:"#AddToCart--product-template",enableQtySelectors:!0,moneyFormat:window.pfSetting.moneyFormat||"${{amount_with_comma_separator}}"}),l=!0),$("body").trigger("ajaxCart.afterCartLoad",window.__pagefly_helper_store__.cart),$(".cart-link.js-drawer-open-button-right").trigger("click")},te=async()=>{var e;const{lastATCResult:t}=__pagefly_helper_store__;!window.pfProduct&&window.theme.Product.toString().includes("$container")&&(window.pfProduct=new window.theme.Product),typeof((e=window.pfProduct)==null?void 0:e._setupCartPopup)=="function"&&window.pfProduct._setupCartPopup(t)},ae=async t=>{const{item_count:e}=t;$("#CartCount").text(e),$(".js-cart-trigger").addClass("js-cart-full")},ne=t=>{window.refreshCart&&window.refreshCart(t),setTimeout(function(){$.fancybox.close(),$(".cart-button").click()},500)},re=async()=>{window.ajaxCart.init({formSelector:".add-to-cart__form",cartContainer:"#CartContainer",addToCartSelector:".add-to-cart",enableQtySelectors:!0,moneyFormat:window.theme.strings.moneyFormat})},oe=()=>{$("body").trigger("added.ajaxProduct",'[data-pf-type*="ProductATC"]')},ce=t=>{const{item_count:e}=t;$(".cart-count-bubble > span").text(e)};try{setTimeout(function(){window.__pagefly_helper_store__&&window.__pagefly_helper_store__.subscribe(function(t){const e=window.__pagefly_theme_atc_check__||window.BOOMR.themeName;$.getJSON("/cart.json").then(a=>{switch(!0){case/Impact/i.test(e):b();break;case/Athens/i.test(e):f();break;case/Alto/i.test(e):T();break;case/Debutify/i.test(e):C();break;case/Avone/i.test(e):g();break;case/Gecko|Kalles/i.test(e):y(t);break;case/Rebranding/i.test(e):k();break;case/Flow/i.test(e):w(a);break;case/Showtime/i.test(e):_(a);break;case/Envy/i.test(e):v(a);break;case/Marker/i.test(e):S(a);break;case/Express/i.test(e):x();break;case/Impulse/i.test(e):E();break;case/Focal/i.test(e):L(a);break;case/Modular/i.test(e):M(a,t);break;case/Modular/i.test(e):H();break;case/Prestige/i.test(e):I(t);break;case/Warehouse/i.test(e):A();break;case/Lammer/i.test(e):F(t);break;case/Minimog/i.test(e):j(a,t);break;case/Furns - Furniture Shopify/i.test(e):P(t,a);break;case/Quark/i.test(e):U(a);break;case/Launch/i.test(e):Q(a);break;case/Stockholm/i.test(e):J(a);break;case/Dawn|Craft|Taste|Refresh|Sense/i.test(e):G(t);break;case/Providence/i.test(e):O(a);case/Motion/i.test(e):R(a);break;case/Ella/i.test(e):N();break;case/Be Yours/i.test(e):B(t);break;case/Handmade/i.test(e):V(t,a);break;case/RejuvAus/i.test(e):z();break;case/Symmetry/i.test(e):K();break;case/Empire/i.test(e):Y(t,a);break;case/Speedfly/i.test(e):X(a);break;case/Canopy/i.test(e):W(t);break;case/Turbo/i.test(e):q(a);break;case/Emerge/i.test(e):D(a);break;case/Impulse/i.test(e):Z();break;case/Brooklyn/i.test(e):ee();break;case/Debut/i.test(e):te();break;case/Venue/i.test(e):ae(a);break;case/Parallax/i.test(e):ne(a);break;case/Current Site|CurrentSite/i.test(e):re();break;case/Exclusive/i.test(e):oe();break;case/Origin|Spotlight|Crave|Publisher|Colorblock|Studio|Ride/i.test(e):ce(a);break}}).catch(a=>console.error(`Failed to update cart ${e}`,a))})},2500)}catch(t){console.warn("PF ATC Error",t)} })()