Viewing File: /home/ubuntu/fx-wordpress-backend/wp-content/themes/astra/assets/js/minified/mobile-cart.min.js

!function(){var c=document.getElementById("astra-mobile-cart-drawer"),e=document.getElementById("masthead");if(e){var t,a="",o=e.querySelector("#ast-mobile-header"),n="";void 0!==c&&""!==c&&null!==c&&(a=c.querySelector(".widget_shopping_cart.woocommerce"),n=c.querySelector(".widget_edd_cart_widget")),cartFlyoutOpen=function(e){e.preventDefault();var t=e.currentTarget.cart_type;"woocommerce"===t&&document.body.classList.contains("woocommerce-cart")||(c.classList.remove("active"),c.classList.remove("woocommerce-active"),c.classList.remove("edd-active"),void 0!==c&&""!==c&&null!==c&&(c.classList.add("active"),document.documentElement.classList.add("ast-mobile-cart-active"),void 0!==n&&""!==n&&null!==n&&(n.style.display="block","woocommerce"===t&&(n.style.display="none",c.classList.add("woocommerce-active"))),void 0!==a&&""!==a&&null!==a&&(a.style.display="block","edd"===t&&(a.style.display="none",c.classList.add("edd-active")))))},cartFlyoutClose=function(e){e.preventDefault(),void 0!==c&&""!==c&&null!==c&&(c.classList.remove("active"),document.documentElement.classList.remove("ast-mobile-cart-active"))},window.addEventListener("resize",function(){var e=document.querySelector(".astra-cart-drawer-close");void 0!==e&&""!==e&&null!==e&&e.click()}),window.addEventListener("load",function(){d()}),document.addEventListener("astLayoutWidthChanged",function(){d()}),document.addEventListener("astPartialContentRendered",function(){d()}),window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){d(),document.dispatchEvent(new CustomEvent("astLayoutWidthChanged",{detail:{response:""}}))},50)})}function d(){if(document.addEventListener("keyup",function(e){27===e.keyCode&&(e.preventDefault(),c.classList.remove("active"),document.documentElement.classList.remove("ast-mobile-cart-active"),updateTrigger())}),document.addEventListener("click",function(e){e.target===document.querySelector(".ast-mobile-cart-active .astra-mobile-cart-overlay")&&(c.classList.remove("active"),document.documentElement.classList.remove("ast-mobile-cart-active"))}),void 0!==o&&""!==o&&null!==o){var e=document.querySelector(".ast-mobile-header-wrap .ast-header-woo-cart"),t=document.querySelector(".ast-mobile-header-wrap .ast-header-edd-cart"),a=document.querySelector(".astra-cart-drawer-close");void 0!==e&&""!==e&&null!==e&&(e.addEventListener("click",cartFlyoutOpen,!1),e.cart_type="woocommerce"),void 0!==t&&""!==t&&null!==t&&(t.addEventListener("click",cartFlyoutOpen,!1),t.cart_type="edd"),void 0!==a&&""!==a&&null!==a&&a.addEventListener("click",cartFlyoutClose,!1)}}}();
Back to Directory File Manager