(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(t,o,i){return(o=function(t){var o=function(t){if("object"!=e(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var i=o.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(o)?o:o+""}(o))in t?Object.defineProperty(t,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[o]=i,t}const o=window.wp.element;var i=function(e,t){try{return(0,o.createInterpolateElement)(e,t)}catch(t){return console.error("Error in translation for:",e,t),e}};const r=window.wp.components,n=window.wp.i18n,s=window.wp.data;var a=function(e){var t=(0,s.select)("core/editor").getCurrentPostAttribute("status"),o=(0,s.select)("core/editor").getEditedPostAttribute("status");"dp-rewrite-republish"===t&&"publish"===o&&(0,s.dispatch)("core/editor").editPost({status:t}),window.location.assign(e)},u=function(){(0,s.dispatch)("core/editor").savePost();var e=!1,t=!1,o=!1;(0,s.subscribe)(function(){var i,r,n,u,l,c,p=(i=duplicatePostStrings.checkLink,r={wasSavingPost:e,wasSavingMetaboxes:t,wasAutoSavingPost:o},n=(0,s.select)("core/editor").isSavingPost(),u=(0,s.select)("core/editor").isAutosavingPost(),l=(0,s.select)("core/edit-post").hasMetaBoxes(),c=(0,s.select)("core/edit-post").isSavingMetaBoxes(),l&&!c&&r.wasSavingMetaboxes&&a(i),l||n||!r.wasSavingPost||r.wasAutoSavingPost||a(i),{isSavingPost:n,isSavingMetaBoxes:c,isAutosavingPost:u});e=p.isSavingPost,t=p.isSavingMetaBoxes,o=p.isAutosavingPost})},l={Publish:(0,n.__)("Republish","duplicate-post"),"Publish:":(0,n.__)("Republish:","duplicate-post"),"Publish on:":(0,n.__)("Republish on:","duplicate-post"),"Are you ready to publish?":(0,n.__)("Are you ready to republish your post?","duplicate-post"),"Double-check your settings before publishing.":i((0,n.__)("After republishing your changes will be merged into the original post and you'll be redirected there.<br /><br />Do you want to compare your changes with the original version before merging?<br /><br /><button>Save changes and compare</button>","duplicate-post"),{button:wp.element.createElement(r.Button,{isSecondary:!0,onClick:u}),br:wp.element.createElement("br",null)}),Schedule:(0,n.__)("Schedule republish","duplicate-post"),"Schedule…":(0,n.__)("Schedule republish…","duplicate-post"),"post action/button labelSchedule":(0,n.__)("Schedule republish","duplicate-post"),"Are you ready to schedule?":(0,n.__)("Are you ready to schedule the republishing of your post?","duplicate-post"),"Your work will be published at the specified date and time.":i((0,n.__)("You're about to replace the original with this rewritten post at the specified date and time.<br /><br />Do you want to compare your changes with the original version before merging?<br /><br /><button>Save changes and compare</button>","duplicate-post"),{button:wp.element.createElement(r.Button,{isSecondary:!0,onClick:u}),br:wp.element.createElement("br",null)}),"is now scheduled. It will go live on":(0,n.__)(", the rewritten post, is now scheduled to replace the original post. It will be published on","duplicate-post")};for(var c in l)(0,n.setLocaleData)(t({},c,[l[c],"duplicate-post"]))})();