!function(t){function i(){t("body").trigger("update_checkout")}"1"==awdr_params.refresh_order_review&&(t(document).on("change",'input[name="payment_method"],input[name="billing_city"],input[name="billing_postcode"]',function(){i()}),t(document).on("blur",'input[name="billing_email"], select#billing_state',function(){i()})),t(document).ready(function(t){function i(){if("show_dynamically"==awdr_params.enable_update_price_with_qty){function i(i,e,a){let o="";return i.find(e).length?(o=i.find(e).first(),!0===a&&(i.find(e+" .price").length||o.html("
"),o=i.find(e+" .price").first())):(o=t(e).first(),!0===a&&(t(e+" .price").length||o.html("
"),o=t(e+" .price").first())),o}t(document).on("change",'[name="quantity"]',function(){var e=t(this);setTimeout(function(){var a=e.val(),o=0,r="",c=e.closest("form");if(c.find('button[name="add-to-cart"]').length){o=c.find('button[name="add-to-cart"]').first().val();var n="div.product p.price";void 0!=awdr_params.custom_target_simple_product&&""!=awdr_params.custom_target_simple_product&&(n=awdr_params.custom_target_simple_product),r=i(c,n,!1)}else if(c.find('input[name="variation_id"]').length){o=c.find('input[name="variation_id"]').val();var n="div.product .woocommerce-variation-price";void 0!=awdr_params.custom_target_variable_product&&""!=awdr_params.custom_target_variable_product&&(n=awdr_params.custom_target_variable_product),r=i(c,n,!0)}else if(c.find('input[name="add-to-cart"]').length){o=c.find('input[name="add-to-cart"]').first().val();var n="div.product p.price";void 0!=awdr_params.custom_target_simple_product&&""!=awdr_params.custom_target_simple_product&&(n=awdr_params.custom_target_simple_product),r=i(c,n,!1)}if(!o||0==o){if(void 0!=awdr_params.custom_simple_product_id_selector&&""!=awdr_params.custom_simple_product_id_selector){o=t(awdr_params.custom_simple_product_id_selector).val();let l="div.product p.price";void 0!=awdr_params.custom_target_simple_product&&""!=awdr_params.custom_target_simple_product&&(l=awdr_params.custom_target_simple_product),r=i(c,l,!1)}if(void 0!=awdr_params.custom_variable_product_id_selector&&""!=awdr_params.custom_variable_product_id_selector){o=t(awdr_params.custom_variable_product_id_selector).val();let d="div.product .woocommerce-variation-price";void 0!=awdr_params.custom_target_variable_product&&""!=awdr_params.custom_target_variable_product&&(d=awdr_params.custom_target_variable_product),r=i(c,d,!0)}}if(o&&r&&0!=o){var u={action:"wdr_ajax",method:"get_price_html",product_id:o,qty:a,awdr_nonce:awdr_params.nonce};t.ajax({url:awdr_params.ajaxurl,data:u,type:"POST",success:function(t){t.price_html?r.html(t.price_html):void 0!=t.original_price_html&&r.html(t.original_price_html)},error:function(t){r.html("")}})}},0)})}}if(awdr_params.js_init_trigger&&t(document).on(awdr_params.js_init_trigger,function(){i()}),i(),"1"==awdr_params.awdr_dynamic_bulk_table_status&&"on"==awdr_params.awdr_dynamic_bulk_table_off){function e(i){setTimeout(function(){if(""!=i&&"0"!=i){var e={action:"wdr_ajax",method:"get_variable_product_bulk_table",product_id:i,awdr_nonce:awdr_params.nonce};let a="div.awdr-bulk-customizable-table";void 0!=awdr_params.awdr_opacity_to_bulk_table&&""!=awdr_params.awdr_opacity_to_bulk_table&&(a=awdr_params.awdr_opacity_to_bulk_table),t.ajax({url:awdr_params.ajaxurl,data:e,type:"POST",beforeSend:function(){t(a).css("opacity","0.5")},complete:function(){t(a).css("opacity","1")},success:function(i){i.bulk_table&&t(".awdr-bulk-customizable-table").html(i.bulk_table)},error:function(i){t(".awdr-bulk-customizable-table").html("")}})}},100)}t(".single_variation_wrap").on("hide_variation",function(i){e(t(this).closest("form").find('input[name="product_id"]').val())}),t(".single_variation_wrap").on("show_variation",function(t,i,a){let o=i.variation_id;(void 0==i.is_bundled||!0!=i.is_bundled)&&e(o)})}})}(jQuery);