var setCommentsList,theList,theExtraList,commentReply,toggleWithKeyboard=!1;!function(h){var f,g,v,y;setCommentsList=function(){var t,c,s,p=0,m=h('input[name="_total"]',"#comments-form"),l=h('input[name="_per_page"]',"#comments-form"),d=h('input[name="_page"]',"#comments-form"),e=function(t,e){var n=h("#"+e.element),a=h("#replyrow"),o=h("#comment_ID",a).val(),a=h("#replybtn",a);n.is(".unapproved")?(e.data.id==o&&a.text(adminCommentsL10n.replyApprove),n.find("div.comment_status").html("0")):(e.data.id==o&&a.text(adminCommentsL10n.reply),n.find("div.comment_status").html("1")),s=h("#"+e.element).is("."+e.dimClass)?1:-1,v(s)},n=function(t,e){var n,a,o,s,r=!1,i=h(t.target).attr("data-wp-lists");return t.data._total=m.val()||0,t.data._per_page=l.val()||0,t.data._page=d.val()||0,t.data._url=document.location.href,t.data.comment_status=h('input[name="comment_status"]',"#comments-form").val(),-1!=i.indexOf(":trash=1")?r="trash":-1!=i.indexOf(":spam=1")&&(r="spam"),r&&(n=i.replace(/.*?comment-([0-9]+).*/,"$1"),a=h("#comment-"+n),o=h("#"+r+"-undo-holder").html(),a.find(".check-column :checkbox").prop("checked",!1),a.siblings("#replyrow").length&&commentReply.cid==n&&commentReply.close(),o=a.is("tr")?(i=a.children(":visible").length,s=h(".author strong",a).text(),h('
")):(s=h(".comment-author",a).text(),h('")),a.before(o),h("strong","#undo-"+n).text(s),(s=h(".undo a","#undo-"+n)).attr("href","comment.php?action=un"+r+"comment&c="+n+"&_wpnonce="+t.data._ajax_nonce),s.attr("data-wp-lists","delete:the-comment-list:comment-"+n+"::un"+r+"=1"),s.attr("class","vim-z vim-destructive"),h(".avatar",a).clone().prependTo("#undo-"+n+" ."+r+"-undo-inside"),s.click(function(){return e.wpList.del(this),h("#undo-"+n).css({backgroundColor:"#ceb"}).fadeOut(350,function(){h(this).remove(),h("#comment-"+n).css("backgroundColor","").fadeIn(300,function(){h(this).show()})}),!1})),t},u=function(t,e,n){en||(t?(theExtraList.empty(),e.number=Math.min(8,a)):(e.number=1,e.offset=Math.min(8,a)-1),e.no_placeholder=!0,e.paged++,!0===e.comment_type&&(e.comment_type=""),e=h.extend(e,{action:"fetch-list",list_args:list_args,_ajax_fetch_list_nonce:h("#_ajax_fetch_list_nonce").val()}),h.ajax({url:ajaxurl,global:!1,dataType:"json",data:e,success:function(t){theExtraList.get(0).wpList.add(t.rows)}}))},theExtraList=h("#the-extra-comment-list").wpList({alt:"",delColor:"none",addColor:"none"}),theList=h("#the-comment-list").wpList({alt:"",delBefore:n,dimAfter:e,delAfter:t,addColor:"none"}).bind("wpListDelEnd",function(t,e){var n=h(e.target).attr("data-wp-lists"),e=e.element.replace(/[^0-9]+/g,"");-1==n.indexOf(":trash=1")&&-1==n.indexOf(":spam=1")||h("#undo-"+e).fadeIn(300,function(){h(this).show()})})},commentReply={cid:"",act:"",init:function(){var t=h("#replyrow");h("a.cancel",t).click(function(){return commentReply.revert()}),h("a.save",t).click(function(){return commentReply.send()}),h("input#author, input#author-email, input#author-url",t).keypress(function(t){if(13==t.which)return commentReply.send(),t.preventDefault(),!1}),h("#the-comment-list .column-comment > p").dblclick(function(){commentReply.toggle(h(this).parent())}),h("#doaction, #doaction2, #post-query-submit").click(function(){0