var commentsBox,WPSetThumbnailHTML,WPSetThumbnailID,WPRemoveThumbnail,wptitlehint,makeSlugeditClickable,editPermalink;makeSlugeditClickable=editPermalink=function(){},window.wp=window.wp||{},function(s){var t=!1;commentsBox={st:0,get:function(t,e){var i,n=this.st;return e||(e=20),this.st+=e,this.total=t,s("#commentsdiv .spinner").addClass("is-active"),i={action:"get-comments",mode:"single",_ajax_nonce:s("#add_comment_nonce").val(),p:s("#post_ID").val(),start:n,number:e},s.post(ajaxurl,i,function(t){if(t=wpAjax.parseAjaxResponse(t),s("#commentsdiv .widefat").show(),s("#commentsdiv .spinner").removeClass("is-active"),"object"==typeof t&&t.responses[0])return s("#the-comment-list").append(t.responses[0].data),theList=theExtraList=null,s("a[className*=':']").unbind(),void(commentsBox.st>commentsBox.total?s("#show-comments").hide():s("#show-comments").show().children("a").html(postL10n.showcomm));1!=t?s("#the-comment-list").append('
'+wpAjax.broken+" |
"):s("#show-comments").html(postL10n.endcomm)}),!1},load:function(t){this.st=jQuery("#the-comment-list tr.comment:visible").length,this.get(t)}},WPSetThumbnailHTML=function(t){s(".inside","#postimagediv").html(t)},WPSetThumbnailID=function(t){var e=s('input[value="_thumbnail_id"]',"#list-table");0').attr("src",i.lock_error.avatar_src.replace(/&/g,"&")),n.find("div.post-locked-avatar").empty().append(a)),n.show().find(".currently-editing").text(i.lock_error.text),n.find(".wp-tab-first").focus()):i.new_lock&&s("#active_post_lock").val(i.new_lock))}).on("before-autosave.update-post-slug",function(){t=document.activeElement&&"title"===document.activeElement.id}).on("after-autosave.update-post-slug",function(){s("#edit-slug-box > *").length||t||s.post(ajaxurl,{action:"sample-permalink",post_id:s("#post_ID").val(),new_title:s("#title").val(),samplepermalinknonce:s("#samplepermalinknonce").val()},function(t){"-1"!=t&&s("#edit-slug-box").html(t)})})}(jQuery),function(a){var s,t;function n(){s=!1,window.clearTimeout(t),t=window.setTimeout(function(){s=!0},3e5)}a(document).on("heartbeat-send.wp-refresh-nonces",function(t,e){var i,n=a("#wp-auth-check-wrap");(s||n.length&&!n.hasClass("hidden"))&&(i=a("#post_ID").val())&&a("#_wpnonce").val()&&(e["wp-refresh-post-nonces"]={post_id:i})}).on("heartbeat-tick.wp-refresh-nonces",function(t,e){var i=e["wp-refresh-post-nonces"];i&&(n(),i.replace&&a.each(i.replace,function(t,e){a("#"+t).val(e)}),i.heartbeatNonce&&(window.heartbeatSettings.nonce=i.heartbeatNonce))}).ready(function(){n()})}(jQuery),jQuery(document).ready(function(h){var d,e,i,n,a,t,s="",l=h("#content"),c=h(document),f=h("#post_ID").val()||0,o=h("#submitpost"),p=!0,u=h("#post-visibility-select"),v=h("#timestampdiv"),r=h("#post-status-select"),m=!!window.navigator.platform&&-1!==window.navigator.platform.indexOf("Mac");(postboxes.add_postbox_toggles(pagenow),window.name="",h("#post-lock-dialog .notification-dialog").on("keydown",function(t){if(9==t.which){var e=h(t.target);e.hasClass("wp-tab-first")&&t.shiftKey?(h(this).find(".wp-tab-last").focus(),t.preventDefault()):e.hasClass("wp-tab-last")&&!t.shiftKey&&(h(this).find(".wp-tab-first").focus(),t.preventDefault())}}).filter(":visible").find(".wp-tab-first").focus(),wp.heartbeat&&h("#post-lock-dialog").length&&wp.heartbeat.interval(15),i=o.find(":submit, a.submitdelete, #post-preview").on("click.edit-post",function(t){var e=h(this);e.hasClass("disabled")?t.preventDefault():e.hasClass("submitdelete")||e.is("#post-preview")||h("form#post").off("submit.edit-post").on("submit.edit-post",function(t){if(!t.isDefaultPrevented()){if(wp.autosave&&wp.autosave.server.suspend(),"undefined"!=typeof commentReply){if(!commentReply.discardCommentChanges())return!1;commentReply.close()}p=!1,h(window).off("beforeunload.edit-post"),i.addClass("disabled"),"publish"===e.attr("id")?o.find("#major-publishing-actions .spinner").addClass("is-active"):o.find("#minor-publishing .spinner").addClass("is-active")}})}),h("#post-preview").on("click.post-preview",function(t){var e=h(this),i=h("form#post"),n=h("input#wp-preview"),a=e.attr("target")||"wp-preview",s=navigator.userAgent.toLowerCase();t.preventDefault(),e.hasClass("disabled")||(wp.autosave&&wp.autosave.server.tempBlockSave(),n.val("dopreview"),i.attr("target",a).submit().attr("target",""),-1!==s.indexOf("safari")&&-1===s.indexOf("chrome")&&i.attr("action",function(t,e){return e+"?t="+(new Date).getTime()}),n.val(""))}),h("#title").on("keydown.editor-focus",function(t){var e;if(9===t.keyCode&&!t.ctrlKey&&!t.altKey&&!t.shiftKey){if((e="undefined"!=typeof tinymce&&tinymce.get("content"))&&!e.isHidden())e.focus();else{if(!l.length)return;l.focus()}t.preventDefault()}}),h("#auto_draft").val()&&h("#title").blur(function(){var t;this.value&&!h("#edit-slug-box > *").length&&(h("form#post").one("submit",function(){t=!0}),window.setTimeout(function(){!t&&wp.autosave&&wp.autosave.server.triggerSave()},200))}),c.on("autosave-disable-buttons.edit-post",function(){i.addClass("disabled")}).on("autosave-enable-buttons.edit-post",function(){wp.heartbeat&&wp.heartbeat.hasConnectionError()||i.removeClass("disabled")}).on("before-autosave.edit-post",function(){h(".autosave-message").text(postL10n.savingText)}).on("after-autosave.edit-post",function(t,e){h(".autosave-message").text(e.message),h(document.body).hasClass("post-new-php")&&h(".submitbox .submitdelete").show()}),h(window).on("beforeunload.edit-post",function(){var t="undefined"!=typeof tinymce&&tinymce.get("content");if(t&&!t.isHidden()&&t.isDirty()||wp.autosave&&wp.autosave.server.postChanged())return postL10n.saveAlert}).on("unload.edit-post",function(t){if(p&&(!t.target||"#document"==t.target.nodeName)){var e=h("#post_ID").val(),i=h("#active_post_lock").val();if(e&&i){var n={action:"wp-remove-post-lock",_wpnonce:h("#_wpnonce").val(),post_ID:e,active_post_lock:i};if(window.FormData&&window.navigator.sendBeacon){var a=new window.FormData;if(h.each(n,function(t,e){a.append(t,e)}),window.navigator.sendBeacon(ajaxurl,a))return}h.post({async:!1,data:n,url:ajaxurl})}}}),h("#tagsdiv-post_tag").length?window.tagBox&&window.tagBox.init():h(".meta-box-sortables").children("div.postbox").each(function(){if(0===this.id.indexOf("tagsdiv-"))return window.tagBox&&window.tagBox.init(),!1}),h(".categorydiv").each(function(){var t,e,i,a,n;(i=h(this).attr("id").split("-")).shift(),a=i.join("-"),n=a+"_tab","category"==a&&(n="cats"),h("a","#"+a+"-tabs").click(function(t){t.preventDefault();var e=h(this).attr("href");h(this).parent().addClass("tabs").siblings("li").removeClass("tabs"),h("#"+a+"-tabs").siblings(".tabs-panel").hide(),h(e).show(),"#"+a+"-all"==e?deleteUserSetting(n):setUserSetting(n,"pop")}),getUserSetting(n)&&h('a[href="#'+a+'-pop"]',"#"+a+"-tabs").click(),h("#new"+a).one("focus",function(){h(this).val("").removeClass("form-input-tip")}),h("#new"+a).keypress(function(t){13===t.keyCode&&(t.preventDefault(),h("#"+a+"-add-submit").click())}),h("#"+a+"-add-submit").click(function(){h("#new"+a).focus()}),t=function(t){return!!h("#new"+a).val()&&(t.data+="&"+h(":checked","#"+a+"checklist").serialize(),h("#"+a+"-add-submit").prop("disabled",!0),t)},e=function(t,e){var i,n=h("#new"+a+"_parent");h("#"+a+"-add-submit").prop("disabled",!1),"undefined"!=e.parsed.responses[0]&&(i=e.parsed.responses[0].supplemental.newcat_parent)&&(n.before(i),n.remove())},h("#"+a+"checklist").wpList({alt:"",response:a+"-ajax-response",addBefore:t,addAfter:e}),h("#"+a+"-add-toggle").click(function(t){t.preventDefault(),h("#"+a+"-adder").toggleClass("wp-hidden-children"),h('a[href="#'+a+'-all"]',"#"+a+"-tabs").click(),h("#new"+a).focus()}),h("#"+a+"checklist, #"+a+"checklist-pop").on("click",'li.popular-category > label input[type="checkbox"]',function(){var t=h(this),e=t.is(":checked"),i=t.val();i&&t.parents("#taxonomy-"+a).length&&h("#in-"+a+"-"+i+", #in-popular-"+a+"-"+i).prop("checked",e)})}),h("#postcustom").length&&h("#the-list").wpList({addBefore:function(t){return t.data+="&post_id="+h("#post_ID").val(),t},addAfter:function(){h("table#list-table").show()}}),h("#submitdiv").length&&(d=h("#timestamp").html(),e=h("#post-visibility-display").html(),n=function(){"public"!=u.find("input:radio:checked").val()?(h("#sticky").prop("checked",!1),h("#sticky-span").hide()):h("#sticky-span").show(),"password"!=u.find("input:radio:checked").val()?h("#password-span").hide():h("#password-span").show()},a=function(){if(!v.length)return!0;var t,e,i,n,a=h("#post_status"),s=h('option[value="publish"]',a),o=h("#aa").val(),l=h("#mm").val(),c=h("#jj").val(),p=h("#hh").val(),r=h("#mn").val();return t=new Date(o,l-1,c,p,r),e=new Date(h("#hidden_aa").val(),h("#hidden_mm").val()-1,h("#hidden_jj").val(),h("#hidden_hh").val(),h("#hidden_mn").val()),i=new Date(h("#cur_aa").val(),h("#cur_mm").val()-1,h("#cur_jj").val(),h("#cur_hh").val(),h("#cur_mn").val()),t.getFullYear()!=o||1+t.getMonth()!=l||t.getDate()!=c||t.getMinutes()!=r?(v.find(".timestamp-wrap").addClass("form-invalid"),!1):(v.find(".timestamp-wrap").removeClass("form-invalid"),i"+postL10n.dateFormat.replace("%1$s",h('option[value="'+l+'"]',"#mm").attr("data-text")).replace("%2$s",parseInt(c,10)).replace("%3$s",o).replace("%4$s",("00"+p).slice(-2)).replace("%5$s",("00"+r).slice(-2))+" "),"private"==u.find("input:radio:checked").val()?(h("#publish").val(postL10n.update),0===s.length?a.append('"):s.html(postL10n.privatelyPublished),h('option[value="publish"]',a).prop("selected",!0),h("#misc-publishing-actions .edit-post-status").hide()):("future"==h("#original_post_status").val()||"draft"==h("#original_post_status").val()?s.length&&(s.remove(),a.val(h("#hidden_post_status").val())):s.html(postL10n.published),a.is(":hidden")&&h("#misc-publishing-actions .edit-post-status").show()),h("#post-status-display").html(h("option:selected",a).text()),"private"==h("option:selected",a).val()||"publish"==h("option:selected",a).val()?h("#save-post").hide():(h("#save-post").show(),"pending"==h("option:selected",a).val()?h("#save-post").show().val(postL10n.savePending):h("#save-post").show().val(postL10n.saveDraft)),!0)},h("#visibility .edit-visibility").click(function(t){t.preventDefault(),u.is(":hidden")&&(n(),u.slideDown("fast",function(){u.find('input[type="radio"]').first().focus()}),h(this).hide())}),u.find(".cancel-post-visibility").click(function(t){u.slideUp("fast"),h("#visibility-radio-"+h("#hidden-post-visibility").val()).prop("checked",!0),h("#post_password").val(h("#hidden-post-password").val()),h("#sticky").prop("checked",h("#hidden-post-sticky").prop("checked")),h("#post-visibility-display").html(e),h("#visibility .edit-visibility").show().focus(),a(),t.preventDefault()}),u.find(".save-post-visibility").click(function(t){u.slideUp("fast"),h("#visibility .edit-visibility").show().focus(),a(),"public"!=u.find("input:radio:checked").val()&&h("#sticky").prop("checked",!1),s=h("#sticky").prop("checked")?"Sticky":"",h("#post-visibility-display").html(postL10n[u.find("input:radio:checked").val()+s]),t.preventDefault()}),u.find("input:radio").change(function(){n()}),v.siblings("a.edit-timestamp").click(function(t){v.is(":hidden")&&(v.slideDown("fast",function(){h("input, select",v.find(".timestamp-wrap")).first().focus()}),h(this).hide()),t.preventDefault()}),v.find(".cancel-timestamp").click(function(t){v.slideUp("fast").siblings("a.edit-timestamp").show().focus(),h("#mm").val(h("#hidden_mm").val()),h("#jj").val(h("#hidden_jj").val()),h("#aa").val(h("#hidden_aa").val()),h("#hh").val(h("#hidden_hh").val()),h("#mn").val(h("#hidden_mn").val()),a(),t.preventDefault()}),v.find(".save-timestamp").click(function(t){a()&&(v.slideUp("fast"),v.siblings("a.edit-timestamp").show().focus()),t.preventDefault()}),h("#post").on("submit",function(t){a()||(t.preventDefault(),v.show(),wp.autosave&&wp.autosave.enableButtons(),h("#publishing-action .spinner").removeClass("is-active"))}),r.siblings("a.edit-post-status").click(function(t){r.is(":hidden")&&(r.slideDown("fast",function(){r.find("select").focus()}),h(this).hide()),t.preventDefault()}),r.find(".save-post-status").click(function(t){r.slideUp("fast").siblings("a.edit-post-status").show().focus(),a(),t.preventDefault()}),r.find(".cancel-post-status").click(function(t){r.slideUp("fast").siblings("a.edit-post-status").show().focus(),h("#post_status").val(h("#hidden_post_status").val()),a(),t.preventDefault()})),h("#titlediv").on("click",".edit-slug",function(){!function(){var t,e,n,i,a=0,s=h("#post_name"),o=s.val(),l=h("#sample-permalink"),c=l.html(),p=h("#sample-permalink a").html(),r=h("#edit-slug-buttons"),d=r.html(),u=h("#editable-post-name-full");for(u.find("img").replaceWith(function(){return this.alt}),u=u.html(),l.html(p),n=h("#editable-post-name"),i=n.html(),r.html(' "),r.children(".save").click(function(){var i=n.children("input").val();i!=h("#editable-post-name-full").text()?h.post(ajaxurl,{action:"sample-permalink",post_id:f,new_slug:i,new_title:h("#title").val(),samplepermalinknonce:h("#samplepermalinknonce").val()},function(t){var e=h("#edit-slug-box");e.html(t),e.hasClass("hidden")&&e.fadeIn("fast",function(){e.removeClass("hidden")}),r.html(d),l.html(c),s.val(i),h(".edit-slug").focus(),wp.a11y.speak(postL10n.permalinkSaved)}):r.children(".cancel").click()}),r.children(".cancel").click(function(){h("#view-post-btn").show(),n.html(i),r.html(d),l.html(c),s.val(o),h(".edit-slug").focus()}),t=0;tu.length/4?"":u,n.html('').children("input").keydown(function(t){var e=t.which;13===e&&(t.preventDefault(),r.children(".save").click()),27===e&&r.children(".cancel").click()}).keyup(function(){s.val(this.value)}).focus()}()}),(wptitlehint=function(t){var e=h("#"+(t=t||"title")),i=h("#"+t+"-prompt-text");""===e.val()&&i.removeClass("screen-reader-text"),i.click(function(){h(this).addClass("screen-reader-text"),e.focus()}),e.blur(function(){""===this.value&&i.removeClass("screen-reader-text")}).focus(function(){i.addClass("screen-reader-text")}).keydown(function(t){i.addClass("screen-reader-text"),h(this).unbind(t)})})(),function(){var i,e,n,t=h("#post-status-info"),a=h("#postdivrich");function s(t){a.hasClass("wp-editor-expand")||(n?i.theme.resizeTo(null,e+t.pageY):l.height(Math.max(50,e+t.pageY)),t.preventDefault())}function o(){var t,e;a.hasClass("wp-editor-expand")||(t=n?(i.focus(),((e=parseInt(h("#wp-content-editor-container .mce-toolbar-grp").height(),10))<10||200