File: /home/bookcc/public_html/wp-content/plugins/wp-mail-catcher/assets/global.min.js
jQuery(function(c){function a(){if(c("body").hasClass("toplevel_page_wp-mail-catcher")){for(var a=c(".wp-mail-catcher-page [data-text-format]").attr("data-text-format"),t=[c('.wp-mail-catcher-page input[name="posts_per_page"]').val()*(c('.wp-mail-catcher-page input[name="paged"]').val()-1)+1,c('.wp-mail-catcher-page input[name="posts_per_page"]').val()*c('.wp-mail-catcher-page input[name="paged"]').val()],e=0;e<t.length;e++)a=a.replace("%s",t[e]);c(".wp-mail-catcher-page [data-text-format]").html(a)}}0!==c(".wp-mail-catcher-page").length&&(c(".wp-mail-catcher-page #add_attachments").on("click",function(a){var e;a.preventDefault(),e&&e.open(),(e=wp.media({title:"Select Attachments",multiple:!0})).on("close",function(){var a=e.state().get("selection");c(".attachment-item:not(.-original)").remove(),a.each(function(a){var t;void 0!==a.attributes.url&&""!=a.attributes.url&&((t=c(".attachment-item.-original").clone()).appendTo(".attachment-clones").removeClass("-original").find(".attachment-input").val(a.attributes.id),"image"==a.attributes.type?t.css("background-image",'url("'+a.attributes.url+'")'):t.css("background-image",'url("'+mail_catcher_logs.plugin_url+'/assets/file-icon.png")'))})}),e.on("open",function(){var t=e.state().get("selection");c(".attachment-input").each(function(){var a=wp.media.attachment(c(this).val());a.fetch(),t.add(a?[a]:[])})}),e.open()}),c(document).on("click",".wp-mail-catcher-page .attachment-item .remove",function(){return c(this).closest(".attachment-item").remove(),!1}),c(document).on("click",".wp-mail-catcher-page .attachments-container .attachment-item",function(){return c("#add_attachments").trigger("click"),!1}),c(".wp-mail-catcher-page .modal-body .nav-tab").on("click",function(){var a=c(this).closest(".modal").attr("id"),t=c(this).index();return c("#"+a+" .nav-tab.nav-tab-active").removeClass("nav-tab-active"),c("#"+a+" .content-container .content.-active").removeClass("-active"),c("#"+a+" .nav-tab").eq(t).addClass("nav-tab-active"),c("#"+a+" .content-container .content").eq(t).addClass("-active"),!1}),c(".wp-mail-catcher-page [data-target]").on("click",function(){c(".wp-mail-catcher-page .modal.-active").removeClass("-active");var a=c(c(this).data("target"));a.addClass("-active");var t=a.find("iframe[data-src]");return t.attr("src",t.attr("data-src")),t.removeAttr("data-src"),!1}),c(".wp-mail-catcher-page .dismiss-modal").on("click",function(){c(".wp-mail-catcher-page .modal.-active").removeClass("-active")}),c(".wp-mail-catcher-page .field-block .add-field").on("click",function(){var a=c(this).closest(".field-block"),t=c(this).closest(".cloneable");return a.clone(!0).appendTo(t).find(".remove-field.-disabled").removeClass("-disabled"),!1}),c(".wp-mail-catcher-page .field-block .remove-field").on("click",function(){return c(this).hasClass("-disabled")||c(this).closest(".field-block").remove(),!1}),c(".wp-mail-catcher-page input[data-update-format]").on("change",a),a())});