function wpzinc_modal_open(i,e){jQuery(".js-notices").text(""),jQuery(".wpzinc-modal h2.title div.spinner").css("display","inline-block").css("visibility","visible"),jQuery(".wpzinc-modal h2.title div.tick").css("display","none").css("visibility","hidden"),wpzinc_modal_update_title(i),wpzinc_modal_update_message(e),jQuery(".wpzinc-modal div.notices").text(""),jQuery(".wpzinc-modal button.close").hide(),void 0!==e&&e.length||jQuery(".wpzinc-modal").addClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal-overlay, .wpzinc-modal").show()}function wpzinc_modal_close(){jQuery(".wpzinc-modal-overlay, .wpzinc-modal").fadeOut("fast",(function(){jQuery(".wpzinc-modal h2.title div.spinner").css("display","none").css("visibility","hidden"),jQuery(".wpzinc-modal h2.title div.tick").css("display","none").css("visibility","hidden"),wpzinc_modal_update_title(""),wpzinc_modal_update_message(""),jQuery(".wpzinc-modal div.notices").text(""),jQuery(".wpzinc-modal button.close").hide(),jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal-overlay, .wpzinc-modal").hide()}))}function wpzinc_modal_update_title(i){jQuery(".wpzinc-modal h2.title span.text").text(i)}function wpzinc_modal_update_message(i){jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal p.message").text(i)}function wpzinc_modal_show_success_message(i){jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal h2.title div.spinner").css("display","none").css("visibility","hidden"),jQuery(".wpzinc-modal h2.title div.tick").css("display","inline-block").css("visibility","visible"),jQuery(".wpzinc-modal p.message").text(""),jQuery(".wpzinc-modal div.notices").html('<div class="updated notice"><p>'+i+"</p></div>"),jQuery(".wpzinc-modal button.close").show()}function wpzinc_modal_show_error_message(i){jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal h2.title div.spinner").css("display","none").css("visibility","hidden"),jQuery(".wpzinc-modal h2.title div.tick").css("display","none").css("visibility","hidden"),jQuery(".wpzinc-modal p.message").text(""),jQuery(".wpzinc-modal div.notices").html('<div class="error notice"><p>'+i+"</p></div>"),jQuery(".wpzinc-modal button.close").show()}function wpzinc_modal_show_success_message_and_exit(i){return jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".js-notices").length||(jQuery("hr.wp-header-end").length>0?jQuery("hr.wp-header-end").after('<div class="js-notices"></div>'):jQuery(".wrap > h1:first").length>0&&jQuery(".wrap > h1:first").after('<div class="js-notices"></div>')),jQuery(".js-notices").html('<div class="updated notice is-dismissible wpzinc-is-dismissible"><p>'+i+'</p><button type="button" class="notice-dismiss"></button></div>'),jQuery("html,body").animate({scrollTop:jQuery(".js-notices").offset().top-44}),wpzinc_modal_close(),!1}function wpzinc_modal_show_error_message_and_exit(i){return jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),jQuery(".js-notices").html('<div class="notice notice-error is-dismissible wpzinc-is-dismissible"><p>'+i+"</p></div>"),jQuery("html,body").animate({scrollTop:jQuery(".js-notices").offset().top-44}),wpzinc_modal_close(),!1}function wpzinc_modal_show_success_and_exit(i,e){return wpzinc_modal_update_title(i),void 0!==e&&e.length?(jQuery(".wpzinc-modal").removeClass("wpzinc-modal-mini"),wpzinc_modal_update_message(e)):jQuery(".wpzinc-modal").addClass("wpzinc-modal-mini"),jQuery(".wpzinc-modal h2.title div.spinner").css("display","none").css("visibility","hidden"),jQuery(".wpzinc-modal h2.title div.tick").css("display","inline-block").css("visibility","visible"),setTimeout((function(){wpzinc_modal_close()}),750),!1}jQuery(document).ready((function($){$("body").on("click",".wpzinc-modal button.close",(function(i){wpzinc_modal_close()})),$("body").on("click",".wpzinc-is-dismissible button.notice-dismiss",(function(i){i.preventDefault(),$(this).closest(".js-notices").remove()}))}));