jQuery(document).ready(function($){if(ppCollabEdit.blockMainPage){var DetectPageParentDiv=function(){if($('div.editor-page-attributes__parent').length){$('div.editor-page-attributes__parent select option[value=""]').html(ppCollabEdit.selectCaption)}};var DetectPageParentDivInterval=setInterval(DetectPageParentDiv,500)}if(typeof window.ppEditorConfig!=='undefined'&&window.ppEditorConfig.defaultPrivacy){var defaultPrivacy=window.ppEditorConfig.defaultPrivacy;var visibility;switch(defaultPrivacy){case'private':visibility='private';break;default:visibility='draft';break}if(visibility){var applyDefaultPrivacy=function(){if(typeof wp==='undefined'||!wp.data||!wp.data.select||!wp.data.dispatch){setTimeout(applyDefaultPrivacy,200);return}var currentPost=wp.data.select('core/editor').getCurrentPost();if(!currentPost||!currentPost.type){setTimeout(applyDefaultPrivacy,200);return}try{wp.data.dispatch('core/editor').editPost({status:visibility});if(wp.data.dispatch('core/editor').savePost){wp.data.dispatch('core/editor').savePost()}}catch(e){console.log('Error applying default privacy:',e);setTimeout(applyDefaultPrivacy,500)}};applyDefaultPrivacy()}}});