(function(i){"use strict";let e=inlineEditPost.edit;inlineEditPost.edit=function(t){e.apply(this,arguments);let d=0;if("object"==typeof t&&(d=parseInt(this.getId(t))),d>0){let e=i("#edit-"+d),t=i("#post-"+d),n=i(".column-lastmodified .pcmdate-hidden-disabled",t).text(),l=i(".column-lastmodified .pcmdate-hidden-post-modified",t).text(),a=i(".column-lastmodified .pcmdate-hidden-status",t).text(),m=i(".column-lastmodified .pcmdate-hidden-date-format",t).text().replace(/\d/g,""),s=m.substr(0,3),o=i(".column-lastmodified .pcmdate-hidden-date-format",t).text().replace(/[^0-9]/gi,""),u=o.substr(0,2),p=o.substr(2,4),c=o.substr(6,2),f=o.substr(8,2),r=o.substr(10,2),h=!!i(".column-lastmodified .pcmdate-lock",t).size();i(':input[name="mmm"]',e).find("[data-text='"+s+"']").attr("selected","selected"),i(':input[name="jjm"]',e).val(u),i(':input[name="aam"]',e).val(p),i(':input[name="hhm"]',e).val(c),i(':input[name="mnm"]',e).val(f),i(':input[name="ssm"]',e).val(r),i(':input[name="disableupdate"]',e).prop("checked",h),i(':input[name="pcmdate_disable"]',e).val(n),i(':input[name="pcmdate_modified"]',e).val(l);let b=["future","auto-draft"];b.includes(a)&&i("#inline-edit-col-modified-date",e).remove(),i(".time-modified",e).on("change",function(){i("#pcmdate-change-modified",e).val("yes")}),i("#pcmdate_disable",e).on("change",function(){i(this).is(":checked")&&i("#pcmdate-disable-hidden",e).val("yes"),i(this).is(":checked")||i("#pcmdate-disable-hidden",e).val("no")}).trigger("change")}},i("#inline-edit-col-modified-date").insertAfter(".inline-edit-col-left:first-child .inline-edit-col .inline-edit-date"),i("body").on("click","#bulk_edit",function(e){let t=i(this);if(t.hasClass("prevented"))return;e.preventDefault(),t.addClass("prevented"),t.after('<span class="spinner is-active"></span>');let d=i("#bulk-edit"),n=new Array;d.find("#bulk-titles .ntdelbutton").each(function(){n.push(i(this).attr("id").replace("_",""))});let l=d.find('select[name="mmm"]').val(),a=d.find('input[name="jjm"]').val(),m=d.find('input[name="aam"]').val(),s=d.find('input[name="hhm"]').val(),o=d.find('input[name="mnm"]').val(),u=d.find('select[name="disable_update"]').val(),p={action:"pcmdate_process_bulk_edit",post_ids:n,modified_month:l,modified_day:a,modified_year:m,modified_hour:s,modified_minute:o,modified_disable:u,security:pcmdate_edit_L10n.security};i.post(pcmdate_edit_L10n.ajaxurl,p,function(e){i("body").find("#bulk_edit").trigger("click")})})})(jQuery);