jQuery(document).ready(o=>{let e=o('form[id="edittag"]'),c=o("#wc_facebook_google_product_category_id"),t=c.val();e.on("submit",function(a){e.data("allow-submit")||c.val()===t||(a.preventDefault(),o("#wc-backbone-modal-dialog .modal-close").trigger("click"),new o.WCBackboneModal.View({target:"facebook-for-woocommerce-modal",string:{message:facebook_for_woocommerce_product_categories.default_google_product_category_modal_message,buttons:facebook_for_woocommerce_product_categories.default_google_product_category_modal_buttons}}),o(document.body).off("wc_backbone_modal_response.facebook_for_commerce").on("wc_backbone_modal_response.facebook_for_commerce",function(){e.data("allow-submit",!0).find(":submit").trigger("click")}))}),o("#submit").on("click",function(e){"Add new category"===o(this).val()&&void 0!==window.wc_facebook_google_product_category_fields&&(o("#"+window.wc_facebook_google_product_category_fields.input_id).val(""),o("#wc-facebook-google-product-category-fields").empty(),o(".wc-facebook-enhanced-catalog-attribute-row").remove(),window.wc_facebook_google_product_category_fields.addInitialSelects(""),o(".wc-facebook-google-product-category-field").last().attr("style","margin-bottom: 24px"))})});