function a(){import.meta.url,import("_").catch(()=>1);async function*o(){}}jQuery(document).ready(function(o){var n={applyNotificationCouponCart:function(){var t;var e=o(this),c=(t=e.val())==null?void 0:t.toString().trim();n.block(o(".woocommerce-cart-form")),o.post(wc_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),{coupon_code:c,security:wc_cart_params.apply_coupon_nonce},function(r){o(".woocommerce-error, .woocommerce-message, .woocommerce-info").remove(),o(document.body).trigger("applied_coupon",[c]),n.showNotice(r)}).always(function(){n.unblock(o(".woocommerce-cart-form")),o(document).trigger("wc_update_cart",!0)})},applyNotificationCouponCheckout:function(){var r;var e=o(this),c=(r=e.val())==null?void 0:r.toString().trim(),t=o("form.woocommerce-checkout");n.block(t),o.post(wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),{coupon_code:c,security:wc_checkout_params.apply_coupon_nonce},function(i){o(".woocommerce-error, .woocommerce-message").remove(),n.unblock(t),i&&(t.before(i),o(document.body).trigger("applied_coupon_in_checkout",[c]),o(document.body).trigger("update_checkout",{update_shipping_method:!1}))})},showNotice:function(e,c=null){c!==null&&(c=o(".woocommerce-notices-wrapper:first")||o(".cart-empty").closest(".woocommerce")||o(".woocommerce-cart-form")),c==null||c.prepend(e)},block:function(e){e.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},unblock:function(e){e.removeClass("processing").unblock()},init:function(){o("body.woocommerce-cart").on("click","button.acfw_apply_notification",this.applyNotificationCouponCart),o("body.woocommerce-checkout").on("click","button.acfw_apply_notification",this.applyNotificationCouponCheckout)}};n.init()});export{a as __vite_legacy_guard};