jQuery(document).on("click",".woocore-mini-cart-item a.woocore-remove-product",(function(t){t.preventDefault();const e=jQuery(this).attr("data-product_id"),r=jQuery(this).attr("data-cart_id"),a=jQuery(this).parents(".woocore-mini-cart-item");a.block({message:null,overlayCSS:{cursor:"none"}}),jQuery.ajax({type:"POST",dataType:"json",url:window.wc_add_to_cart_params.ajax_url,data:{action:"product_remove_on",product_id:e,cart_item_key:r},success(t){if(!t||t.error)return;const e=t.fragments;t.items&&jQuery("div.woocore-cart-first-row span").replaceWith(t.items),e&&jQuery.each(e,((t,e)=>jQuery(t).replaceWith(e))),t.subtotal&&jQuery("div.woocore-mini-cart__total span.woocommerce-Price-amount").replaceWith(t.subtotal),document.querySelector(".woocore-cart-first-row > span").innerText.replace(/[^.\d]/g,"")<1&&(document.getElementById("slide-cart-wrap").style.transform="translateX(-400px)",document.getElementById("slide-cart-wrap").style.transition="transform 1s")}})})),jQuery(document).on("click",".single_add_to_cart_button",(function(t){t.preventDefault();const e=document.getElementById("slide-cart-wrap"),r=jQuery(this),a=r.closest("form.cart"),o=r.val(),n=a.find("input[name=quantity]").val()||1,c={action:"product_add_on",product_id:a.find("input[name=product_id]").val()||o,product_sku:"",quantity:n,variation_id:a.find("input[name=variation_id]").val()||0};return jQuery(document.body).trigger("adding_to_cart",[r,c]),""!==e.style.transform&&"translateX(-400px)"!==e.style.transform||(e.style.transform="translateX(0px)",e.style.transition="transform 1s"),jQuery.ajax({type:"post",url:window.wc_add_to_cart_params.ajax_url,data:c,beforeSend(t){r.removeClass("added").addClass("loading")},complete(t){r.addClass("added").removeClass("loading")},success(t){t.error&&t.product_url?window.location=t.product_url:(jQuery(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,r]),t.items&&jQuery(".woocore-cart-first-row span").replaceWith(t.items))}}),!1})),jQuery(document).on("click","#woocore-reedem-button",(function(t){t.preventDefault();const e=jQuery("#woocore-coupon").val();if(e.length<=3)return!1;const r={action:"coupon_oxynininja",coupone_code:e};return jQuery.ajax({type:"post",url:window.wc_add_to_cart_params.ajax_url,data:r,beforeSend(t){},complete(t){},success(t){}}),!1}));