WordPress/wp-includes/js/dist/editor.min.js
jorgefilipecosta 48299521c6 Block Editor: Update WordPress Packages.
The following package versions were changed:
@wordpress/a11y: 2.5.1 -> 2.6.0
@wordpress/annotations: 1.9.0 -> 1.10.0
@wordpress/api-fetch: 3.8.0 -> 3.9.0
@wordpress/blob: 2.5.1 -> 2.6.0
@wordpress/block-directory: 1.2.0 -> 1.3.0
@wordpress/block-editor: 3.4.0 -> 3.5.0
@wordpress/block-library: 2.11.0 -> 2.12.0
@wordpress/blocks: 6.9.0 -> 6.10.0
@wordpress/components: 8.5.0 -> 9.0.0
@wordpress/compose: 3.9.0 -> 3.10.0
@wordpress/core-data: 2.9.0 -> 2.10.0
@wordpress/data: 4.11.0 -> 4.12.0
@wordpress/data-controls: 1.5.0 -> 1.6.0
@wordpress/dom: 2.6.0 -> 2.7.0
@wordpress/dom-ready: 2.5.1 -> 2.6.0
@wordpress/e2e-test-utils: 4.0.0 -> 4.1.0
@wordpress/edit-post: 3.10.0 -> 3.11.0
@wordpress/editor: 9.9.0 -> 9.10.0
@wordpress/format-library: 1.11.0 -> 1.12.0
@wordpress/i18n: 3.7.0 -> 3.8.0
@wordpress/is-shallow-equal: 1.6.1 -> 1.7.0
@wordpress/keycodes: 2.7.0 -> 2.8.0
@wordpress/list-reusable-blocks: 1.10.0 -> 1.11.0
@wordpress/media-utils: 1.4.0 -> 1.5.0
@wordpress/notices: 1.10.0 -> 1.11.0
@wordpress/nux: 3.9.0 -> 3.10.0
@wordpress/plugins: 2.9.0 -> 2.10.0
@wordpress/priority-queue: 1.3.1 -> 1.4.0
@wordpress/rich-text: 3.9.0 -> 3.10.0
@wordpress/scripts: 6.1.1 -> 6.2.0
@wordpress/server-side-render: 1.5.0 -> 1.6.0
@wordpress/viewport: 2.10.0 -> 2.11.0
The following package was added:
@wordpress/keyboard-shortcuts

Props gziolo.
Fixes #49204.
Built from https://develop.svn.wordpress.org/trunk@47106


git-svn-id: http://core.svn.wordpress.org/trunk@46906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-22 22:06:21 +00:00

12 lines
170 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! This file is auto-generated */
this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=364)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){var r;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},11:function(e,t){!function(){e.exports=this.wp.blocks}()},114:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},c=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&(n[r[o]]=e[r[o]])}return n};t.__esModule=!0;var a=n(21),s=n(28),u=n(115),l=n(116),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={lineHeight:null},t.dispatchEvent=function(e){var n=document.createEvent("Event");n.initEvent(e,!0,!1),t.textarea.dispatchEvent(n)},t.updateLineHeight=function(){t.setState({lineHeight:l(t.textarea)})},t.onChange=function(e){var n=t.props.onChange;t.currentValue=e.currentTarget.value,n&&n(e)},t.saveDOMNodeRef=function(e){var n=t.props.innerRef;n&&n(e),t.textarea=e},t.getLocals=function(){var e=t,n=e.props,r=(n.onResize,n.maxRows),o=(n.onChange,n.style),a=(n.innerRef,c(n,["onResize","maxRows","onChange","style","innerRef"])),s=e.state.lineHeight,u=e.saveDOMNodeRef,l=r&&s?s*r:null;return i({},a,{saveDOMNodeRef:u,style:l?i({},o,{maxHeight:l}):o,onChange:t.onChange})},t}return o(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.onResize;"number"==typeof t.maxRows&&this.updateLineHeight(),setTimeout((function(){return u(e.textarea)})),n&&this.textarea.addEventListener("autosize:resized",n)},t.prototype.componentWillUnmount=function(){var e=this.props.onResize;e&&this.textarea.removeEventListener("autosize:resized",e),this.dispatchEvent("autosize:destroy")},t.prototype.render=function(){var e=this.getLocals(),t=e.children,n=e.saveDOMNodeRef,r=c(e,["children","saveDOMNodeRef"]);return a.createElement("textarea",i({},r,{ref:n}),t)},t.prototype.componentDidUpdate=function(e){this.props.value===this.currentValue&&this.props.rows===e.rows||this.dispatchEvent("autosize:update")},t.defaultProps={rows:1},t.propTypes={rows:s.number,maxRows:s.number,onResize:s.func,innerRef:s.func},t}(a.Component);t.default=d},115:function(e,t,n){var r,o,i;
/*!
autosize 4.0.2
license: MIT
http://www.jacklmoore.com/autosize
*/o=[e,t],void 0===(i="function"==typeof(r=function(e,t){"use strict";var n,r,o="function"==typeof Map?new Map:(n=[],r=[],{has:function(e){return n.indexOf(e)>-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,c=null,a=function(){e.clientWidth!==r&&d()},s=function(t){window.removeEventListener("resize",a,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",s,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",s,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",a,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:s,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function l(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){l();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r<t?"hidden"===n.overflowY&&(u("scroll"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight):"hidden"!==n.overflowY&&(u("hidden"),l(),r="content-box"===n.boxSizing?Math.round(parseFloat(window.getComputedStyle(e,null).height)):e.offsetHeight),c!==r){c=r;var o=i("autosize:resized");try{e.dispatchEvent(o)}catch(e){}}}}function a(e){var t=o.get(e);t&&t.destroy()}function s(e){var t=o.get(e);t&&t.update()}var u=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?((u=function(e){return e}).destroy=function(e){return e},u.update=function(e){return e}):((u=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],(function(e){return c(e)})),e}).destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],a),e},u.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],s),e}),t.default=u,e.exports=t.default})?r.apply(t,o):r)||(e.exports=i)},116:function(e,t,n){var r=n(117);e.exports=function(e){var t=r(e,"line-height"),n=parseFloat(t,10);if(t===n+""){var o=e.style.lineHeight;e.style.lineHeight=t+"em",t=r(e,"line-height"),n=parseFloat(t,10),o?e.style.lineHeight=o:delete e.style.lineHeight}if(-1!==t.indexOf("pt")?(n*=4,n/=3):-1!==t.indexOf("mm")?(n*=96,n/=25.4):-1!==t.indexOf("cm")?(n*=96,n/=2.54):-1!==t.indexOf("in")?n*=96:-1!==t.indexOf("pc")&&(n*=16),n=Math.round(n),"normal"===t){var i=e.nodeName,c=document.createElement(i);c.innerHTML="&nbsp;","TEXTAREA"===i.toUpperCase()&&c.setAttribute("rows","1");var a=r(e,"font-size");c.style.fontSize=a,c.style.padding="0px",c.style.border="0px";var s=document.body;s.appendChild(c),n=c.offsetHeight,s.removeChild(c)}return n}},117:function(e,t){e.exports=function(e,t,n){return((n=window.getComputedStyle)?n(e):e.currentStyle)[t.replace(/-(\w)/gi,(function(e,t){return t.toUpperCase()}))]}},12:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},13:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",(function(){return o}))},14:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},143:function(e,t){!function(){e.exports=this.wp.notices}()},15:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(32),o=n(7);function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},16:function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return r}))},17:function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}n.d(t,"a",(function(){return o}))},18:function(e,t,n){"use strict";var r=n(31);function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(r.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",(function(){return o}))},19:function(e,t){!function(){e.exports=this.wp.keycodes}()},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(40);function o(e,t){if(null==e)return{};var n,o,i=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},21:function(e,t){!function(){e.exports=this.React}()},22:function(e,t,n){"use strict";var r=n(35);var o=n(36);function i(e,t){return Object(r.a)(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)()}n.d(t,"a",(function(){return i}))},23:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},24:function(e,t){!function(){e.exports=this.wp.richText}()},25:function(e,t){!function(){e.exports=this.wp.url}()},28:function(e,t,n){e.exports=n(89)()},29:function(e,t){!function(){e.exports=this.wp.hooks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t,n){"use strict";function r(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},32:function(e,t,n){"use strict";function r(e){return(r="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)}n.d(t,"a",(function(){return r}))},33:function(e,t){!function(){e.exports=this.wp.deprecated}()},34:function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var r;if(e.length!==t.length)return!1;for(r=n;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r={},o="undefined"!=typeof WeakMap,t.a=function(e,t){var n,s;function u(){n=o?new WeakMap:c()}function l(){var n,r,o,i,c,u=arguments.length;for(i=new Array(u),o=0;o<u;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=s(c)).isUniqueByDependants||(n.lastDependants&&!a(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(a(r.args,i,1))return r!==n.head&&(r.prev.next=r.next,r.next&&(r.next.prev=r.prev),r.next=n.head,r.prev=null,n.head.prev=r,n.head=r),r.val;r=r.next}return r={val:e.apply(null,i)},i[0]=null,r.args=i,n.head&&(n.head.prev=r,r.next=n.head),n.head=r,r.val}return t||(t=i),s=o?function(e){var t,o,i,a,s,u=n,l=!0;for(t=0;t<e.length;t++){if(o=e[t],!(s=o)||"object"!=typeof s){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((a=c()).isUniqueByDependants=l,u.set(r,a)),u.get(r)}:function(){return n},l.getDependants=t,l.clear=u,u(),l}},346:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};var o="BEGIN",i="COMMIT",c="REVERT",a=[];function s(e,t){return e.optimist&&e.optimist.id===t}function u(e,t){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError('Error while handling "'+t.type+'": Optimist requires that state is always a plain object.')}function l(e){if(e){var t=e.optimist;return{optimist:void 0===t?a:t,innerState:function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["optimist"])}}return{optimist:a,innerState:e}}e.exports=function(e){function t(t,n,o){return t.length&&(t=t.concat([{action:o}])),u(n=e(n,o),o),r({optimist:t},n)}return function(n,a){if(a.optimist)switch(a.optimist.type){case o:return function(t,n){var o=l(t),i=o.optimist,c=o.innerState;return i=i.concat([{beforeState:c,action:n}]),u(c=e(c,n),n),r({optimist:i},c)}(n,a);case i:return function(e,n){var r=l(e),o=r.optimist,i=r.innerState,c=[],a=!1,u=!1;return o.forEach((function(e){a?e.beforeState&&s(e.action,n.optimist.id)?(u=!0,c.push({action:e.action})):c.push(e):e.beforeState&&!s(e.action,n.optimist.id)?(a=!0,c.push(e)):e.beforeState&&s(e.action,n.optimist.id)&&(u=!0)})),u||console.error('Cannot commit transaction with id "'+n.optimist.id+'" because it does not exist'),t(o=c,i,n)}(n,a);case c:return function(n,r){var o=l(n),i=o.optimist,c=o.innerState,a=[],d=!1,p=!1,b=c;return i.forEach((function(t){t.beforeState&&s(t.action,r.optimist.id)&&(b=t.beforeState,p=!0),s(t.action,r.optimist.id)||(t.beforeState&&(d=!0),d&&(p&&t.beforeState?a.push({beforeState:b,action:t.action}):a.push(t)),p&&(b=e(b,t.action),u(c,r)))})),p||console.error('Cannot revert transaction with id "'+r.optimist.id+'" because it does not exist'),t(i=a,b,r)}(n,a)}var d=l(n),p=d.optimist,b=d.innerState;if(n&&!p.length){var f=e(b,a);return f===b?n:(u(f,a),r({optimist:p},f))}return t(p,b,a)}},e.exports.BEGIN=o,e.exports.COMMIT=i,e.exports.REVERT=c},35:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},36:function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",(function(){return r}))},364:function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"setupEditor",(function(){return ce})),n.d(r,"__experimentalTearDownEditor",(function(){return ae})),n.d(r,"resetPost",(function(){return se})),n.d(r,"resetAutosave",(function(){return ue})),n.d(r,"__experimentalRequestPostUpdateStart",(function(){return le})),n.d(r,"__experimentalRequestPostUpdateFinish",(function(){return de})),n.d(r,"updatePost",(function(){return pe})),n.d(r,"setupEditorState",(function(){return be})),n.d(r,"editPost",(function(){return fe})),n.d(r,"__experimentalOptimisticUpdatePost",(function(){return he})),n.d(r,"savePost",(function(){return me})),n.d(r,"refreshPost",(function(){return ve})),n.d(r,"trashPost",(function(){return Oe})),n.d(r,"autosave",(function(){return ge})),n.d(r,"__experimentalLocalAutosave",(function(){return je})),n.d(r,"redo",(function(){return ye})),n.d(r,"undo",(function(){return _e})),n.d(r,"createUndoLevel",(function(){return ke})),n.d(r,"updatePostLock",(function(){return Se})),n.d(r,"__experimentalFetchReusableBlocks",(function(){return Ee})),n.d(r,"__experimentalReceiveReusableBlocks",(function(){return Pe})),n.d(r,"__experimentalSaveReusableBlock",(function(){return we})),n.d(r,"__experimentalDeleteReusableBlock",(function(){return Ce})),n.d(r,"__experimentalUpdateReusableBlock",(function(){return Te})),n.d(r,"__experimentalConvertBlockToStatic",(function(){return Be})),n.d(r,"__experimentalConvertBlockToReusable",(function(){return xe})),n.d(r,"enablePublishSidebar",(function(){return Ie})),n.d(r,"disablePublishSidebar",(function(){return Ae})),n.d(r,"lockPostSaving",(function(){return Re})),n.d(r,"unlockPostSaving",(function(){return Le})),n.d(r,"lockPostAutosaving",(function(){return Ne})),n.d(r,"unlockPostAutosaving",(function(){return De})),n.d(r,"resetEditorBlocks",(function(){return Ue})),n.d(r,"updateEditorSettings",(function(){return Fe})),n.d(r,"resetBlocks",(function(){return Ve})),n.d(r,"receiveBlocks",(function(){return ze})),n.d(r,"updateBlock",(function(){return We})),n.d(r,"updateBlockAttributes",(function(){return He})),n.d(r,"selectBlock",(function(){return Ke})),n.d(r,"startMultiSelect",(function(){return Ge})),n.d(r,"stopMultiSelect",(function(){return qe})),n.d(r,"multiSelect",(function(){return Qe})),n.d(r,"clearSelectedBlock",(function(){return Ye})),n.d(r,"toggleSelection",(function(){return Xe})),n.d(r,"replaceBlocks",(function(){return Ze})),n.d(r,"replaceBlock",(function(){return Je})),n.d(r,"moveBlocksDown",(function(){return $e})),n.d(r,"moveBlocksUp",(function(){return et})),n.d(r,"moveBlockToPosition",(function(){return tt})),n.d(r,"insertBlock",(function(){return nt})),n.d(r,"insertBlocks",(function(){return rt})),n.d(r,"showInsertionPoint",(function(){return ot})),n.d(r,"hideInsertionPoint",(function(){return it})),n.d(r,"setTemplateValidity",(function(){return ct})),n.d(r,"synchronizeTemplate",(function(){return at})),n.d(r,"mergeBlocks",(function(){return st})),n.d(r,"removeBlocks",(function(){return ut})),n.d(r,"removeBlock",(function(){return lt})),n.d(r,"toggleBlockMode",(function(){return dt})),n.d(r,"startTyping",(function(){return pt})),n.d(r,"stopTyping",(function(){return bt})),n.d(r,"enterFormattedText",(function(){return ft})),n.d(r,"exitFormattedText",(function(){return ht})),n.d(r,"insertDefaultBlock",(function(){return mt})),n.d(r,"updateBlockListSettings",(function(){return vt}));var o={};n.r(o),n.d(o,"hasEditorUndo",(function(){return St})),n.d(o,"hasEditorRedo",(function(){return Et})),n.d(o,"isEditedPostNew",(function(){return Pt})),n.d(o,"hasChangedContent",(function(){return wt})),n.d(o,"isEditedPostDirty",(function(){return Ct})),n.d(o,"hasNonPostEntityChanges",(function(){return Tt})),n.d(o,"isCleanNewPost",(function(){return Bt})),n.d(o,"getCurrentPost",(function(){return xt})),n.d(o,"getCurrentPostType",(function(){return It})),n.d(o,"getCurrentPostId",(function(){return At})),n.d(o,"getCurrentPostRevisionsCount",(function(){return Rt})),n.d(o,"getCurrentPostLastRevisionId",(function(){return Lt})),n.d(o,"getPostEdits",(function(){return Nt})),n.d(o,"getReferenceByDistinctEdits",(function(){return Dt})),n.d(o,"getCurrentPostAttribute",(function(){return Ut})),n.d(o,"getEditedPostAttribute",(function(){return Mt})),n.d(o,"getAutosaveAttribute",(function(){return Vt})),n.d(o,"getEditedPostVisibility",(function(){return zt})),n.d(o,"isCurrentPostPending",(function(){return Wt})),n.d(o,"isCurrentPostPublished",(function(){return Ht})),n.d(o,"isCurrentPostScheduled",(function(){return Kt})),n.d(o,"isEditedPostPublishable",(function(){return Gt})),n.d(o,"isEditedPostSaveable",(function(){return qt})),n.d(o,"isEditedPostEmpty",(function(){return Qt})),n.d(o,"isEditedPostAutosaveable",(function(){return Yt})),n.d(o,"getAutosave",(function(){return Xt})),n.d(o,"hasAutosave",(function(){return Zt})),n.d(o,"isEditedPostBeingScheduled",(function(){return Jt})),n.d(o,"isEditedPostDateFloating",(function(){return $t})),n.d(o,"isSavingPost",(function(){return en})),n.d(o,"didPostSaveRequestSucceed",(function(){return tn})),n.d(o,"didPostSaveRequestFail",(function(){return nn})),n.d(o,"isAutosavingPost",(function(){return rn})),n.d(o,"isPreviewingPost",(function(){return on})),n.d(o,"getEditedPostPreviewLink",(function(){return cn})),n.d(o,"getSuggestedPostFormat",(function(){return an})),n.d(o,"getBlocksForSerialization",(function(){return sn})),n.d(o,"getEditedPostContent",(function(){return un})),n.d(o,"__experimentalGetReusableBlock",(function(){return ln})),n.d(o,"__experimentalIsSavingReusableBlock",(function(){return dn})),n.d(o,"__experimentalIsFetchingReusableBlock",(function(){return pn})),n.d(o,"__experimentalGetReusableBlocks",(function(){return bn})),n.d(o,"getStateBeforeOptimisticTransaction",(function(){return fn})),n.d(o,"isPublishingPost",(function(){return hn})),n.d(o,"isPermalinkEditable",(function(){return mn})),n.d(o,"getPermalink",(function(){return vn})),n.d(o,"getPermalinkParts",(function(){return On})),n.d(o,"inSomeHistory",(function(){return gn})),n.d(o,"isPostLocked",(function(){return jn})),n.d(o,"isPostSavingLocked",(function(){return yn})),n.d(o,"isPostAutosavingLocked",(function(){return _n})),n.d(o,"isPostLockTakeover",(function(){return kn})),n.d(o,"getPostLockUser",(function(){return Sn})),n.d(o,"getActivePostLock",(function(){return En})),n.d(o,"canUserUseUnfilteredHTML",(function(){return Pn})),n.d(o,"isPublishSidebarEnabled",(function(){return wn})),n.d(o,"getEditorBlocks",(function(){return Cn})),n.d(o,"getEditorSelectionStart",(function(){return Tn})),n.d(o,"getEditorSelectionEnd",(function(){return Bn})),n.d(o,"__unstableIsEditorReady",(function(){return xn})),n.d(o,"getEditorSettings",(function(){return In})),n.d(o,"getBlockName",(function(){return Rn})),n.d(o,"isBlockValid",(function(){return Ln})),n.d(o,"getBlockAttributes",(function(){return Nn})),n.d(o,"getBlock",(function(){return Dn})),n.d(o,"getBlocks",(function(){return Un})),n.d(o,"__unstableGetBlockWithoutInnerBlocks",(function(){return Fn})),n.d(o,"getClientIdsOfDescendants",(function(){return Mn})),n.d(o,"getClientIdsWithDescendants",(function(){return Vn})),n.d(o,"getGlobalBlockCount",(function(){return zn})),n.d(o,"getBlocksByClientId",(function(){return Wn})),n.d(o,"getBlockCount",(function(){return Hn})),n.d(o,"getBlockSelectionStart",(function(){return Kn})),n.d(o,"getBlockSelectionEnd",(function(){return Gn})),n.d(o,"getSelectedBlockCount",(function(){return qn})),n.d(o,"hasSelectedBlock",(function(){return Qn})),n.d(o,"getSelectedBlockClientId",(function(){return Yn})),n.d(o,"getSelectedBlock",(function(){return Xn})),n.d(o,"getBlockRootClientId",(function(){return Zn})),n.d(o,"getBlockHierarchyRootClientId",(function(){return Jn})),n.d(o,"getAdjacentBlockClientId",(function(){return $n})),n.d(o,"getPreviousBlockClientId",(function(){return er})),n.d(o,"getNextBlockClientId",(function(){return tr})),n.d(o,"getSelectedBlocksInitialCaretPosition",(function(){return nr})),n.d(o,"getMultiSelectedBlockClientIds",(function(){return rr})),n.d(o,"getMultiSelectedBlocks",(function(){return or})),n.d(o,"getFirstMultiSelectedBlockClientId",(function(){return ir})),n.d(o,"getLastMultiSelectedBlockClientId",(function(){return cr})),n.d(o,"isFirstMultiSelectedBlock",(function(){return ar})),n.d(o,"isBlockMultiSelected",(function(){return sr})),n.d(o,"isAncestorMultiSelected",(function(){return ur})),n.d(o,"getMultiSelectedBlocksStartClientId",(function(){return lr})),n.d(o,"getMultiSelectedBlocksEndClientId",(function(){return dr})),n.d(o,"getBlockOrder",(function(){return pr})),n.d(o,"getBlockIndex",(function(){return br})),n.d(o,"isBlockSelected",(function(){return fr})),n.d(o,"hasSelectedInnerBlock",(function(){return hr})),n.d(o,"isBlockWithinSelection",(function(){return mr})),n.d(o,"hasMultiSelection",(function(){return vr})),n.d(o,"isMultiSelecting",(function(){return Or})),n.d(o,"isSelectionEnabled",(function(){return gr})),n.d(o,"getBlockMode",(function(){return jr})),n.d(o,"isTyping",(function(){return yr})),n.d(o,"isCaretWithinFormattedText",(function(){return _r})),n.d(o,"getBlockInsertionPoint",(function(){return kr})),n.d(o,"isBlockInsertionPointVisible",(function(){return Sr})),n.d(o,"isValidTemplate",(function(){return Er})),n.d(o,"getTemplate",(function(){return Pr})),n.d(o,"getTemplateLock",(function(){return wr})),n.d(o,"canInsertBlockType",(function(){return Cr})),n.d(o,"getInserterItems",(function(){return Tr})),n.d(o,"hasInserterItems",(function(){return Br})),n.d(o,"getBlockListSettings",(function(){return xr}));var i=n(5),c=n(11),a=n(64),s=n(43),u=(n(143),n(24)),l=n(51),d=n(6),p=n(4),b=n(39),f=n(9),h=n(32),m=n(86),v=n.n(m),O=n(2),g={insertUsage:{},isPublishSidebarEnabled:!0},j=Object(d.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1});function y(e){return e&&"object"===Object(h.a)(e)&&"raw"in e?e.raw:e}var _=Object(p.combineReducers)({data:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_REUSABLE_BLOCKS":return Object(d.a)({},e,Object(O.keyBy)(t.results,"id"));case"UPDATE_REUSABLE_BLOCK":var n=t.id,r=t.changes;return Object(d.a)({},e,Object(f.a)({},n,Object(d.a)({},e[n],r)));case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(d.a)({},Object(O.omit)(e,o),Object(f.a)({},i,Object(d.a)({},c,{id:i})));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(O.omit)(e,a)}return e},isFetching:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"FETCH_REUSABLE_BLOCKS":var n=t.id;return n?Object(d.a)({},e,Object(f.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(O.omit)(e,r)}return e},isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SAVE_REUSABLE_BLOCK":return Object(d.a)({},e,Object(f.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(O.omit)(e,n)}return e}});var k=v()(Object(p.combineReducers)({postId:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":return t.post.id}return e},postType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":return t.post.type}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g;switch((arguments.length>1?arguments[1]:void 0).type){case"ENABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(d.a)({},e,{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},reusableBlocks:_,template:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isValid:!0},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_TEMPLATE_VALIDITY":return Object(d.a)({},e,{isValid:t.isValid})}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return Object(d.a)({},e,Object(f.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(O.omit)(e,t.lockName)}return e},isReady:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"SETUP_EDITOR_STATE":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(d.a)({},e,t.settings)}return e},postAutosavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_AUTOSAVING":return Object(d.a)({},e,Object(f.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(O.omit)(e,t.lockName)}return e}})),S=n(72),E=n.n(S),P=n(23),w=n.n(P),C=n(44),T=n(38),B=n.n(T),x=n(1),I=n(18),A=n(33),R=n.n(A),L=new Set(["meta"]),N="core/editor",D="post-update",U="SAVE_POST_NOTICE_ID",F="TRASH_POST_NOTICE_ID",M=/%(?:postname|pagename)%/,V=6e4,z=["title","excerpt","content"];function W(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(O.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(O.includes)(i,t.status),a=Object(O.includes)(i,n.status),s=Object(O.get)(r,["viewable"],!1);if(c||a?c&&!a?(o=r.labels.item_reverted_to_draft,s=!1):o=!c&&a?{publish:r.labels.item_published,private:r.labels.item_published_privately,future:r.labels.item_scheduled}[n.status]:r.labels.item_updated:o=null,o){var u=[];return s&&u.push({label:r.labels.view_item,url:n.link}),[o,{id:U,type:"snackbar",actions:u}]}return[]}function H(e){var t=e.post,n=e.edits,r=e.error;if(r&&"rest_autosave_no_changes"===r.code)return[];var o=["publish","private","future"],i=-1!==o.indexOf(t.status),c={publish:Object(x.__)("Publishing failed."),private:Object(x.__)("Publishing failed."),future:Object(x.__)("Scheduling failed.")},a=i||-1===o.indexOf(n.status)?Object(x.__)("Updating failed."):c[n.status];return r.message&&!/<\/?[^>]*>/.test(r.message)&&(a=[a,r.message].join(" ")),[a,{id:U}]}var K=n(42),G=n.n(K),q=n(70),Q=G()((function(e){1===e.length&&Object(c.isUnmodifiedDefaultBlock)(e[0])&&(e=[]);var t=Object(c.serialize)(e);return 1===e.length&&e[0].name===Object(c.getFreeformContentHandlerName)()&&(t=Object(q.removep)(t)),t}),{maxSize:1}),Y=w.a.mark(ce),X=w.a.mark(ue),Z=w.a.mark(fe),J=w.a.mark(me),$=w.a.mark(ve),ee=w.a.mark(Oe),te=w.a.mark(ge),ne=w.a.mark(je),re=w.a.mark(ye),oe=w.a.mark(_e),ie=w.a.mark(Ue);function ce(e,t,n){var r,o;return w.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return r=Object(O.has)(t,["content"])?t.content:e.content.raw,o=Object(c.parse)(r),"auto-draft"===e.status&&n&&(o=Object(c.synchronizeBlocksWithTemplate)(o,n)),i.next=6,se(e);case 6:return i.next=8,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 8:return i.next=10,Ue(o,{__unstableShouldCreateUndoLevel:!1});case 10:return i.next=12,be(e);case 12:if(!t||!Object.keys(t).some((function(n){return t[n]!==(Object(O.has)(e,[n,"raw"])?e[n].raw:e[n])}))){i.next=15;break}return i.next=15,fe(t);case 15:case"end":return i.stop()}}),Y)}function ae(){return{type:"TEAR_DOWN_EDITOR"}}function se(e){return{type:"RESET_POST",post:e}}function ue(e){var t;return w.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return R()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,Object(b.select)(N,"getCurrentPostId");case 3:return t=n.sent,n.next=6,Object(b.dispatch)("core","receiveAutosaves",t,e);case 6:return n.abrupt("return",{type:"__INERT__"});case 7:case"end":return n.stop()}}),X)}function le(){return{type:"REQUEST_POST_UPDATE_START",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function de(){return{type:"REQUEST_POST_UPDATE_FINISH",options:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function pe(e){return{type:"UPDATE_POST",edits:e}}function be(e){return{type:"SETUP_EDITOR_STATE",post:e}}function fe(e,t){var n,r,o;return w.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,Object(b.select)(N,"getCurrentPost");case 2:return n=i.sent,r=n.id,o=n.type,i.next=7,Object(b.dispatch)("core","editEntityRecord","postType",o,r,e,t);case 7:case"end":return i.stop()}}),Z)}function he(e){return Object(d.a)({},pe(e),{optimist:{id:D}})}function me(){var e,t,n,r,o,i,c,a=arguments;return w.a.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},s.next=3,Object(b.select)(N,"isEditedPostSaveable");case 3:if(s.sent){s.next=5;break}return s.abrupt("return");case 5:return s.next=7,Object(b.select)(N,"getEditedPostContent");case 7:if(s.t0=s.sent,t={content:s.t0},e.isAutosave){s.next=12;break}return s.next=12,Object(b.dispatch)(N,"editPost",t,{undoIgnore:!0});case 12:return s.next=14,le(e);case 14:return s.next=16,Object(b.select)(N,"getCurrentPost");case 16:return n=s.sent,s.t1=d.a,s.t2={id:n.id},s.next=21,Object(b.select)("core","getEntityRecordNonTransientEdits","postType",n.type,n.id);case 21:return s.t3=s.sent,s.t4=t,t=(0,s.t1)(s.t2,s.t3,s.t4),s.next=26,Object(b.dispatch)("core","saveEntityRecord","postType",n.type,t,e);case 26:return s.next=28,de(e);case 28:return s.next=30,Object(b.select)("core","getLastEntitySaveError","postType",n.type,n.id);case 30:if(!(r=s.sent)){s.next=38;break}if(!(o=H({post:n,edits:t,error:r})).length){s.next=36;break}return s.next=36,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(I.a)(o)));case 36:s.next=56;break;case 38:return s.next=40,Object(b.select)(N,"getCurrentPost");case 40:return i=s.sent,s.t5=W,s.t6=n,s.t7=i,s.next=46,Object(b.select)("core","getPostType",i.type);case 46:if(s.t8=s.sent,s.t9=e,s.t10={previousPost:s.t6,post:s.t7,postType:s.t8,options:s.t9},!(c=(0,s.t5)(s.t10)).length){s.next=53;break}return s.next=53,b.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(I.a)(c)));case 53:if(e.isAutosave){s.next=56;break}return s.next=56,Object(b.dispatch)("core/block-editor","__unstableMarkLastChangeAsPersistent");case 56:case"end":return s.stop()}}),J)}function ve(){var e,t,n,r;return w.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(b.select)(N,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(b.select)(N,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Object(b.select)("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(b.apiFetch)({path:"/wp/v2/".concat(n.rest_base,"/").concat(e.id)+"?context=edit&_timestamp=".concat(Date.now())});case 11:return r=o.sent,o.next=14,Object(b.dispatch)(N,"resetPost",r);case 14:case"end":return o.stop()}}),$)}function Oe(){var e,t,n;return w.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(b.select)(N,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Object(b.select)("core","getPostType",e);case 5:return t=r.sent,r.next=8,Object(b.dispatch)("core/notices","removeNotice",F);case 8:return r.prev=8,r.next=11,Object(b.select)(N,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(b.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,Object(b.dispatch)(N,"savePost");case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,b.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(I.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(x.__)("Trashing failed"),{id:F}])));case 22:case"end":return r.stop()}var o}),ee,null,[[8,18]])}function ge(e){return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(b.dispatch)(N,"savePost",Object(d.a)({isAutosave:!0},e));case 2:case"end":return t.stop()}}),te)}function je(){var e,t,n,r;return w.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(b.select)(N,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(b.select)(N,"getEditedPostAttribute","title");case 5:return t=o.sent,o.next=8,Object(b.select)(N,"getEditedPostAttribute","content");case 8:return n=o.sent,o.next=11,Object(b.select)(N,"getEditedPostAttribute","excerpt");case 11:return r=o.sent,o.next=14,{type:"LOCAL_AUTOSAVE_SET",postId:e.id,title:t,content:n,excerpt:r};case 14:case"end":return o.stop()}}),ne)}function ye(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","redo");case 2:case"end":return e.stop()}}),re)}function _e(){return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(b.dispatch)("core","undo");case 2:case"end":return e.stop()}}),oe)}function ke(){return{type:"CREATE_UNDO_LEVEL"}}function Se(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Ee(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Pe(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function we(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Ce(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function Te(e,t){return{type:"UPDATE_REUSABLE_BLOCK",id:e,changes:t}}function Be(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function xe(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(O.castArray)(e)}}function Ie(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Ae(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Re(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Le(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Ne(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function De(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function Ue(e){var t,n,r,o,i,c,a,s,u=arguments;return w.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.__unstableShouldCreateUndoLevel,r=t.selectionStart,o=t.selectionEnd,i={blocks:e,selectionStart:r,selectionEnd:o},!1===n){l.next=19;break}return l.next=6,Object(b.select)(N,"getCurrentPost");case 6:return c=l.sent,a=c.id,s=c.type,l.next=11,Object(b.select)("core","getEditedEntityRecord","postType",s,a);case 11:if(l.t0=l.sent.blocks,l.t1=i.blocks,!(l.t0===l.t1)){l.next=18;break}return l.next=17,Object(b.dispatch)("core","__unstableCreateUndoLevel","postType",s,a);case 17:return l.abrupt("return",l.sent);case 18:i.content=function(e){var t=e.blocks;return Q(void 0===t?[]:t)};case 19:return l.delegateYield(fe(i),"t2",20);case 20:case"end":return l.stop()}}),ie)}function Fe(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Me=function(e){return w.a.mark((function t(){var n,r,o,i=arguments;return w.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(R()("`wp.data.dispatch( 'core/editor' )."+e+"`",{alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),n=i.length,r=new Array(n),o=0;o<n;o++)r[o]=i[o];return t.next=4,b.dispatch.apply(void 0,["core/block-editor",e].concat(r));case 4:case"end":return t.stop()}}),t)}))},Ve=Me("resetBlocks"),ze=Me("receiveBlocks"),We=Me("updateBlock"),He=Me("updateBlockAttributes"),Ke=Me("selectBlock"),Ge=Me("startMultiSelect"),qe=Me("stopMultiSelect"),Qe=Me("multiSelect"),Ye=Me("clearSelectedBlock"),Xe=Me("toggleSelection"),Ze=Me("replaceBlocks"),Je=Me("replaceBlock"),$e=Me("moveBlocksDown"),et=Me("moveBlocksUp"),tt=Me("moveBlockToPosition"),nt=Me("insertBlock"),rt=Me("insertBlocks"),ot=Me("showInsertionPoint"),it=Me("hideInsertionPoint"),ct=Me("setTemplateValidity"),at=Me("synchronizeTemplate"),st=Me("mergeBlocks"),ut=Me("removeBlocks"),lt=Me("removeBlock"),dt=Me("toggleBlockMode"),pt=Me("startTyping"),bt=Me("stopTyping"),ft=Me("enterFormattedText"),ht=Me("exitFormattedText"),mt=Me("insertDefaultBlock"),vt=Me("updateBlockListSettings"),Ot=n(22),gt=n(34),jt=n(55),yt=n(25),_t={},kt=[],St=Object(p.createRegistrySelector)((function(e){return function(){return e("core").hasUndo()}})),Et=Object(p.createRegistrySelector)((function(e){return function(){return e("core").hasRedo()}}));function Pt(e){return"auto-draft"===xt(e).status}function wt(e){var t=Nt(e);return"blocks"in t||"content"in t}var Ct=Object(p.createRegistrySelector)((function(e){return function(t){var n=It(t),r=At(t);return!!e("core").hasEditsForEntityRecord("postType",n,r)}})),Tt=Object(p.createRegistrySelector)((function(e){return function(t){if(!In(t).__experimentalEnableFullSiteEditing)return!1;var n=e("core").getEntityRecordChangesByRecord(),r=Object.keys(n);if(r.length>1||1===r.length&&!n.postType)return!0;if(!n.postType)return!1;var o=xt(t),i=o.type,c=o.id,a=Object.keys(n.postType);if(a.length>1||1===a.length&&!n.postType[i])return!0;var s=Object.keys(n.postType[i]);return s.length>1||1===s.length&&!n.postType[i][c]}}));function Bt(e){return!Ct(e)&&Pt(e)}var xt=Object(p.createRegistrySelector)((function(e){return function(t){var n=At(t),r=It(t),o=e("core").getRawEntityRecord("postType",r,n);return o||_t}}));function It(e){return e.postType}function At(e){return e.postId}function Rt(e){return Object(O.get)(xt(e),["_links","version-history",0,"count"],0)}function Lt(e){return Object(O.get)(xt(e),["_links","predecessor-version",0,"id"],null)}var Nt=Object(p.createRegistrySelector)((function(e){return function(t){var n=It(t),r=At(t);return e("core").getEntityRecordEdits("postType",n,r)||_t}})),Dt=Object(p.createRegistrySelector)((function(e){return function(){return R()("`wp.data.select( 'core/editor' ).getReferenceByDistinctEdits`",{alternative:"`wp.data.select( 'core' ).getReferenceByDistinctEdits`"}),e("core").getReferenceByDistinctEdits()}}));function Ut(e,t){switch(t){case"type":return It(e);case"id":return At(e);default:var n=xt(e);if(!n.hasOwnProperty(t))break;return y(n[t])}}var Ft=function(e,t){var n=Nt(e);return n.hasOwnProperty(t)?Object(d.a)({},Ut(e,t),n[t]):Ut(e,t)};function Mt(e,t){switch(t){case"content":return un(e)}var n=Nt(e);return n.hasOwnProperty(t)?L.has(t)?Ft(e,t):n[t]:Ut(e,t)}var Vt=Object(p.createRegistrySelector)((function(e){return function(t,n){if(Object(O.includes)(z,n)||"preview_link"===n){var r=It(t),o=At(t),i=Object(O.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(r,o,i);return c?y(c[n]):void 0}}}));function zt(e){return"private"===Mt(e,"status")?"private":Mt(e,"password")?"password":"public"}function Wt(e){return"pending"===xt(e).status}function Ht(e,t){var n=t||xt(e);return-1!==["publish","private"].indexOf(n.status)||"future"===n.status&&!Object(jt.isInTheFuture)(new Date(Number(Object(jt.getDate)(n.date))-V))}function Kt(e){return"future"===xt(e).status&&!Ht(e)}function Gt(e){var t=xt(e);return Ct(e)||-1===["publish","private","future"].indexOf(t.status)}function qt(e){return!en(e)&&(!!Mt(e,"title")||!!Mt(e,"excerpt")||!Qt(e))}function Qt(e){var t=Cn(e);if(t.length){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!un(e)}var Yt=Object(p.createRegistrySelector)((function(e){return function(t){if(!qt(t))return!1;if(_n(t))return!1;var n=It(t),r=At(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(O.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!wt(t)||["title","excerpt"].some((function(e){return y(c[e])!==Mt(t,e)}))))}})),Xt=Object(p.createRegistrySelector)((function(e){return function(t){R()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=It(t),r=At(t),o=Object(O.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(O.mapValues)(Object(O.pick)(i,z),y)}})),Zt=Object(p.createRegistrySelector)((function(e){return function(t){R()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=It(t),r=At(t),o=Object(O.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function Jt(e){var t=Mt(e,"date"),n=new Date(Number(Object(jt.getDate)(t))-V);return Object(jt.isInTheFuture)(n)}function $t(e){var t=Mt(e,"date"),n=Mt(e,"modified"),r=Mt(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&t===n}var en=Object(p.createRegistrySelector)((function(e){return function(t){var n=It(t),r=At(t);return e("core").isSavingEntityRecord("postType",n,r)}})),tn=Object(p.createRegistrySelector)((function(e){return function(t){var n=It(t),r=At(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),nn=Object(p.createRegistrySelector)((function(e){return function(t){var n=It(t),r=At(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function rn(e){return!!en(e)&&!!Object(O.get)(e.saving,["options","isAutosave"])}function on(e){return!!en(e)&&!!e.saving.options.isPreview}function cn(e){if(!e.saving.pending&&!en(e)){var t=Vt(e,"preview_link");t||(t=Mt(e,"link"))&&(t=Object(yt.addQueryArgs)(t,{preview:!0}));var n=Mt(e,"featured_media");return t&&n?Object(yt.addQueryArgs)(t,{_thumbnail_id:n}):t}}function an(e){var t,n=Cn(e);switch(1===n.length&&(t=n[0].name),2===n.length&&"core/paragraph"===n[1].name&&(t=n[0].name),t){case"core/image":return"image";case"core/quote":case"core/pullquote":return"quote";case"core/gallery":return"gallery";case"core/video":case"core-embed/youtube":case"core-embed/vimeo":return"video";case"core/audio":case"core-embed/spotify":case"core-embed/soundcloud":return"audio"}return null}function sn(e){R()("`core/editor` getBlocksForSerialization selector",{plugin:"Gutenberg",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});var t=e.editor.present.blocks.value;return 1===t.length&&Object(c.isUnmodifiedDefaultBlock)(t[0])?[]:t}var un=Object(p.createRegistrySelector)((function(e){return function(t){var n=At(t),r=It(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return Q(o.blocks);if(o.content)return o.content}return""}})),ln=Object(gt.a)((function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(d.a)({},n,{id:r?t:+t,isTemporary:r})}),(function(e,t){return[e.reusableBlocks.data[t]]}));function dn(e,t){return e.reusableBlocks.isSaving[t]||!1}function pn(e,t){return!!e.reusableBlocks.isFetching[t]}var bn=Object(gt.a)((function(e){return Object(O.map)(e.reusableBlocks.data,(function(t,n){return ln(e,n)}))}),(function(e){return[e.reusableBlocks.data]}));function fn(e,t){var n=Object(O.find)(e.optimist,(function(e){return e.beforeState&&Object(O.get)(e.action,["optimist","id"])===t}));return n?n.beforeState:null}function hn(e){if(!en(e))return!1;if(!Ht(e))return!1;var t=fn(e,D);return!!t&&!Ht(null,t.currentPost)}function mn(e){var t=Mt(e,"permalink_template");return M.test(t)}function vn(e){var t=On(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return mn(e)?n+r+o:n}function On(e){var t=Mt(e,"permalink_template");if(!t)return null;var n=Mt(e,"slug")||Mt(e,"generated_slug"),r=t.split(M),o=Object(Ot.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function gn(e,t){var n=e.optimist;return!!n&&n.some((function(e){var n=e.beforeState;return n&&t(n)}))}function jn(e){return e.postLock.isLocked}function yn(e){return Object.keys(e.postSavingLock).length>0}function _n(e){return Object.keys(e.postAutosavingLock).length>0}function kn(e){return e.postLock.isTakeover}function Sn(e){return e.postLock.user}function En(e){return e.postLock.activePostLock}function Pn(e){return Object(O.has)(xt(e),["_links","wp:action-unfiltered-html"])}function wn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function Cn(e){return Mt(e,"blocks")||kt}function Tn(e){return Mt(e,"selectionStart")}function Bn(e){return Mt(e,"selectionEnd")}function xn(e){return e.isReady}function In(e){return e.editorSettings}function An(e){return Object(p.createRegistrySelector)((function(t){return function(n){var r;R()("`wp.data.select( 'core/editor' )."+e+"`",{alternative:"`wp.data.select( 'core/block-editor' )."+e+"`"});for(var o=arguments.length,i=new Array(o>1?o-1:0),c=1;c<o;c++)i[c-1]=arguments[c];return(r=t("core/block-editor"))[e].apply(r,i)}}))}var Rn=An("getBlockName"),Ln=An("isBlockValid"),Nn=An("getBlockAttributes"),Dn=An("getBlock"),Un=An("getBlocks"),Fn=An("__unstableGetBlockWithoutInnerBlocks"),Mn=An("getClientIdsOfDescendants"),Vn=An("getClientIdsWithDescendants"),zn=An("getGlobalBlockCount"),Wn=An("getBlocksByClientId"),Hn=An("getBlockCount"),Kn=An("getBlockSelectionStart"),Gn=An("getBlockSelectionEnd"),qn=An("getSelectedBlockCount"),Qn=An("hasSelectedBlock"),Yn=An("getSelectedBlockClientId"),Xn=An("getSelectedBlock"),Zn=An("getBlockRootClientId"),Jn=An("getBlockHierarchyRootClientId"),$n=An("getAdjacentBlockClientId"),er=An("getPreviousBlockClientId"),tr=An("getNextBlockClientId"),nr=An("getSelectedBlocksInitialCaretPosition"),rr=An("getMultiSelectedBlockClientIds"),or=An("getMultiSelectedBlocks"),ir=An("getFirstMultiSelectedBlockClientId"),cr=An("getLastMultiSelectedBlockClientId"),ar=An("isFirstMultiSelectedBlock"),sr=An("isBlockMultiSelected"),ur=An("isAncestorMultiSelected"),lr=An("getMultiSelectedBlocksStartClientId"),dr=An("getMultiSelectedBlocksEndClientId"),pr=An("getBlockOrder"),br=An("getBlockIndex"),fr=An("isBlockSelected"),hr=An("hasSelectedInnerBlock"),mr=An("isBlockWithinSelection"),vr=An("hasMultiSelection"),Or=An("isMultiSelecting"),gr=An("isSelectionEnabled"),jr=An("getBlockMode"),yr=An("isTyping"),_r=An("isCaretWithinFormattedText"),kr=An("getBlockInsertionPoint"),Sr=An("isBlockInsertionPointVisible"),Er=An("isValidTemplate"),Pr=An("getTemplate"),wr=An("getTemplateLock"),Cr=An("canInsertBlockType"),Tr=An("getInserterItems"),Br=An("hasInserterItems"),xr=An("getBlockListSettings"),Ir=function(){var e=Object(C.a)(w.a.mark((function e(t,n){var r,o,i,c,a;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,B()({path:"/wp/v2/types/wp_block"});case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:if(e.prev=7,!r){e.next=15;break}return e.next=11,B()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)});case 11:e.t0=e.sent,c=[e.t0],e.next=18;break;case 15:return e.next=17,B()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")});case 17:c=e.sent;case 18:(a=Object(O.compact)(Object(O.map)(c,(function(e){return"publish"!==e.status||e.content.protected?null:Object(d.a)({},e,{content:e.content.raw,title:e.title.raw})})))).length&&o(Pe(a)),o({type:"FETCH_REUSABLE_BLOCKS_SUCCESS",id:r}),e.next=26;break;case 23:e.prev=23,e.t1=e.catch(7),o({type:"FETCH_REUSABLE_BLOCKS_FAILURE",id:r,error:e.t1});case 26:case"end":return e.stop()}}),e,null,[[7,23]])})));return function(t,n){return e.apply(this,arguments)}}(),Ar=function(){var e=Object(C.a)(w.a.mark((function e(t,n){var r,o,i,c,a,s,u,l,d,b,f,h,m;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:return o=t.id,i=n.dispatch,c=n.getState(),a=ln(c,o),s=a.title,u=a.content,l=a.isTemporary,d=l?{title:s,content:u,status:"publish"}:{id:o,title:s,content:u,status:"publish"},b=l?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),f=l?"POST":"PUT",e.prev=12,e.next=15,B()({path:b,data:d,method:f});case 15:h=e.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:h.id,id:o}),m=l?Object(x.__)("Block created."):Object(x.__)("Block updated."),Object(p.dispatch)("core/notices").createSuccessNotice(m,{id:"REUSABLE_BLOCK_NOTICE_ID",type:"snackbar"}),Object(p.dispatch)("core/block-editor").__unstableSaveReusableBlock(o,h.id),e.next=26;break;case 22:e.prev=22,e.t0=e.catch(12),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(p.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 26:case"end":return e.stop()}}),e,null,[[12,22]])})));return function(t,n){return e.apply(this,arguments)}}(),Rr=function(){var e=Object(C.a)(w.a.mark((function e(t,n){var r,o,i,a,s,u,l,d,b,f;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B()({path:"/wp/v2/types/wp_block"});case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(o=t.id,i=n.getState,a=n.dispatch,(s=ln(i(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Object(p.select)("core/block-editor").getBlocks(),l=u.filter((function(e){return Object(c.isReusableBlock)(e)&&e.attributes.ref===o})),d=l.map((function(e){return e.clientId})),b=Object(O.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:m.BEGIN,id:b}}),d.length&&Object(p.dispatch)("core/block-editor").removeBlocks(d),e.prev=16,e.next=19,B()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:m.COMMIT,id:b}}),f=Object(x.__)("Block deleted."),Object(p.dispatch)("core/notices").createSuccessNotice(f,{id:"REUSABLE_BLOCK_NOTICE_ID",type:"snackbar"}),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(16),a({type:"DELETE_REUSABLE_BLOCK_FAILURE",id:o,optimist:{type:m.REVERT,id:b}}),Object(p.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}}),e,null,[[16,24]])})));return function(t,n){return e.apply(this,arguments)}}(),Lr={FETCH_REUSABLE_BLOCKS:function(e,t){Ir(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){Ar(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){Rr(e,t)},CONVERT_BLOCK_TO_STATIC:function(e,t){var n=t.getState(),r=Object(p.select)("core/block-editor").getBlock(e.clientId),o=ln(n,r.attributes.ref),i=Object(c.parse)(o.content);Object(p.dispatch)("core/block-editor").replaceBlocks(r.clientId,i)},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n=t.dispatch,r={id:Object(O.uniqueId)("reusable"),title:Object(x.__)("Untitled Reusable Block"),content:Object(c.serialize)(Object(p.select)("core/block-editor").getBlocksByClientId(e.clientIds))};n(Pe([r])),n(we(r.id)),Object(p.dispatch)("core/block-editor").replaceBlocks(e.clientIds,Object(c.createBlock)("core/block",{ref:r.id}))}};var Nr=function(e){var t=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},n={getState:e.getState,dispatch:function(){return t.apply(void 0,arguments)}};return t=E()(Lr)(n)(e.dispatch),e.dispatch=t,e};function Dr(e){return"wp-autosave-block-editor-post-".concat(e)}function Ur(e){window.sessionStorage.removeItem(Dr(e))}var Fr={AWAIT_NEXT_STATE_CHANGE:Object(p.createRegistryControl)((function(e){return function(){return new Promise((function(t){var n=e.subscribe((function(){n(),t()}))}))}})),GET_REGISTRY:Object(p.createRegistryControl)((function(e){return function(){return e}})),LOCAL_AUTOSAVE_SET:function(e){!function(e,t,n,r){window.sessionStorage.setItem(Dr(e),JSON.stringify({post_title:t,content:n,excerpt:r}))}(e.postId,e.title,e.content,e.excerpt)}},Mr={reducer:k,selectors:o,actions:r,controls:Object(d.a)({},b.controls,Fr)},Vr=Object(p.registerStore)(N,Object(d.a)({},Mr,{persist:["preferences"]}));Nr(Vr);var zr=n(12),Wr=n(20),Hr=n(0),Kr=n(8),Gr=n(29),qr=function(e){return Object(Kr.createHigherOrderComponent)((function(t){return function(n){var r=n.attributes,o=n.setAttributes,i=Object(Wr.a)(n,["attributes","setAttributes"]),c=Object(p.useSelect)((function(e){return e("core/editor").getCurrentPostType()}),[]),s=Object(a.useEntityProp)("postType",c,"meta"),u=Object(Ot.a)(s,2),l=u[0],b=u[1],f=Object(Hr.useMemo)((function(){return Object(d.a)({},r,Object(O.mapValues)(e,(function(e){return l[e]})))}),[r,l]);return Object(Hr.createElement)(t,Object(zr.a)({attributes:f,setAttributes:function(t){var n=Object(O.mapKeys)(Object(O.pickBy)(t,(function(t,n){return e[n]})),(function(t,n){return e[n]}));Object(O.isEmpty)(n)||b(n),o(t)}},i))}}),"withMetaAttributeSource")};function Qr(){return Object(p.select)("core/block-editor").getBlockInsertionPoint().rootClientId}function Yr(e){return Object(p.select)("core/block-editor").getInserterItems(e)}function Xr(){var e=Object(p.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlockName,r=t();return r?n(r):null}Object(Gr.addFilter)("blocks.registerBlockType","core/editor/custom-sources-backwards-compatibility/shim-attribute-source",(function(e){var t=Object(O.mapValues)(Object(O.pickBy)(e.attributes,{source:"meta"}),"meta");return Object(O.isEmpty)(t)||(e.edit=qr(t)(e.edit)),e}));var Zr=Object(O.once)((function(){Object(p.dispatch)("core/editor").__experimentalFetchReusableBlocks()}));var Jr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Qr:t,r=e.getInserterItems,o=void 0===r?Yr:r,a=e.getSelectedBlockName,s=void 0===a?Xr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){Zr();var e=s();return o(n()).filter((function(t){return e!==t.name}))},getOptionKeywords:function(e){var t=e.title,n=e.keywords,r=void 0===n?[]:n;return[e.category].concat(Object(I.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(Hr.createElement)(i.BlockIcon,{key:"icon",icon:t,showColors:!0}),n]},allowContext:function(e,t){return!(/\S/.test(e)||/\S/.test(t))},getOptionCompletion:function(e){var t=e.name,n=e.initialAttributes;return{action:"replace",value:Object(c.createBlock)(t,n)}},isOptionDisabled:function(e){return e.isDisabled}}}(),$r={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),B()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(Hr.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(Hr.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(Hr.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},eo=n(14),to=n(13),no=n(15),ro=n(16),oo=n(17),io=function(e){function t(){return Object(eo.a)(this,t),Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDirty,r=t.editsReference,o=t.isAutosaveable,i=t.isAutosaving;r!==e.editsReference&&(this.didAutosaveForEditsReference=!1),!i&&e.isAutosaving&&(this.didAutosaveForEditsReference=!0),e.isDirty===n&&e.isAutosaveable===o&&e.editsReference===r||this.toggleTimer(n&&o&&!this.didAutosaveForEditsReference)}},{key:"componentWillUnmount",value:function(){this.toggleTimer(!1)}},{key:"toggleTimer",value:function(e){var t=this,n=this.props,r=n.interval,o=n.shouldThrottle,i=void 0!==o&&o;!i&&this.pendingSave&&(clearTimeout(this.pendingSave),delete this.pendingSave),!e||i&&this.pendingSave||(this.pendingSave=setTimeout((function(){t.props.autosave(),delete t.pendingSave}),1e3*r))}},{key:"render",value:function(){return null}}]),t}(Hr.Component),co=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=e("core").getReferenceByDistinctEdits,r=e("core/editor"),o=r.isEditedPostDirty,i=r.isEditedPostAutosaveable,c=r.isAutosavingPost,a=r.getEditorSettings,s=t.interval,u=void 0===s?a().autosaveInterval:s;return{isDirty:o(),isAutosaveable:i(),editsReference:n(),isAutosaving:c(),interval:u}})),Object(p.withDispatch)((function(e,t){return{autosave:function(){var n=t.autosave,r=void 0===n?e("core/editor").autosave:n;r()}}}))])(io),ao=n(10),so=n.n(ao),uo=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.path,c=void 0===o?[]:o,a=e.href,s=e.onSelect;return Object(Hr.createElement)("li",{className:so()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(Hr.createElement)("a",{href:a,className:"document-outline__button",onClick:s},Object(Hr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map((function(e,t){var n=e.clientId;return Object(Hr.createElement)("strong",{key:t,className:"document-outline__level"},Object(Hr.createElement)(i.BlockTitle,{clientId:n}))})),Object(Hr.createElement)("strong",{className:"document-outline__level"},r),Object(Hr.createElement)("span",{className:"document-outline__item-content"},t)))},lo=Object(Hr.createElement)("em",null,Object(x.__)("(Empty heading)")),po=[Object(Hr.createElement)("br",{key:"incorrect-break"}),Object(Hr.createElement)("em",{key:"incorrect-message"},Object(x.__)("(Incorrect heading level)"))],bo=[Object(Hr.createElement)("br",{key:"incorrect-break-h1"}),Object(Hr.createElement)("em",{key:"incorrect-message-h1"},Object(x.__)("(Your theme may already use a H1 for the post title)"))],fo=[Object(Hr.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(Hr.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(x.__)("(Multiple H1 headings are not recommended)"))],ho=function(e){return!e.attributes.content||0===e.attributes.content.length},mo=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/block-editor").getBlocks,n=e("core/editor").getEditedPostAttribute,r=(0,e("core").getPostType)(n("type"));return{title:n("title"),blocks:t(),isTitleSupported:Object(O.get)(r,["supports","title"],!1)}})))((function(e){var t=e.blocks,n=void 0===t?[]:t,r=e.title,o=e.onSelect,i=e.isTitleSupported,c=e.hasOutlineItemsDisabled,a=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Object(O.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(d.a)({},t,{path:n,level:t.attributes.level,isEmpty:ho(t)}):e(t.innerBlocks,[].concat(Object(I.a)(n),[t]))}))}(n);if(a.length<1)return null;var s=1,l=document.querySelector(".editor-post-title__input"),p=i&&r&&l,b=Object(O.countBy)(a,"level")[1]>1;return Object(Hr.createElement)("div",{className:"document-outline"},Object(Hr.createElement)("ul",null,p&&Object(Hr.createElement)(uo,{level:Object(x.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:c},r),a.map((function(e,t){var n=e.level>s+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(b||p));return s=e.level,Object(Hr.createElement)(uo,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?lo:Object(u.getTextContent)(Object(u.create)({html:e.attributes.content})),n&&po,1===e.level&&b&&fo,p&&1===e.level&&!b&&bo)}))))}));var vo=Object(p.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(O.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n}));var Oo=function(){var e=Object(p.useDispatch)("core/editor").savePost,t=Object(p.useSelect)((function(e){return e("core/editor").isEditedPostDirty}),[]);return Object(s.useShortcut)("core/editor/save",(function(n){n.preventDefault(),t()&&e()}),{bindGlobal:!0}),null};function go(){var e=Object(p.useDispatch)("core/editor"),t=e.redo,n=e.undo,r=e.savePost,o=Object(p.useSelect)((function(e){return e("core/editor").isEditedPostDirty}),[]);return Object(s.useShortcut)("core/editor/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(s.useShortcut)("core/editor/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),Object(s.useShortcut)("core/editor/save",(function(e){e.preventDefault(),o()&&r()}),{bindGlobal:!0}),Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(Hr.createElement)(Oo,null))}var jo=go;function yo(){return R()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(Hr.createElement)(go,null)}function _o(){return Object(Hr.createElement)(Oo,null)}var ko=function(){var e=Object(p.useDispatch)("core/keyboard-shortcuts").registerShortcut;return Object(Hr.useEffect)((function(){e({name:"core/editor/save",category:"global",description:Object(x.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(x.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(x.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),Object(Hr.createElement)(i.BlockEditorKeyboardShortcuts.Register,null)},So=n(3),Eo=n(19);var Po=Object(Kr.compose)([Object(p.withSelect)((function(e){return{hasRedo:e("core/editor").hasEditorRedo()}})),Object(p.withDispatch)((function(e){return{redo:e("core/editor").redo}}))])((function(e){var t=e.hasRedo,n=e.redo;return Object(Hr.createElement)(So.Button,{icon:"redo",label:Object(x.__)("Redo"),shortcut:Eo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})}));var wo=Object(Kr.compose)([Object(p.withSelect)((function(e){return{hasUndo:e("core/editor").hasEditorUndo()}})),Object(p.withDispatch)((function(e){return{undo:e("core/editor").undo}}))])((function(e){var t=e.hasUndo,n=e.undo;return Object(Hr.createElement)(So.Button,{icon:"undo",label:Object(x.__)("Undo"),shortcut:Eo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})}));var Co=Object(Kr.compose)([Object(p.withSelect)((function(e){return{isValid:e("core/block-editor").isValidTemplate()}})),Object(p.withDispatch)((function(e){var t=e("core/block-editor"),n=t.setTemplateValidity;return{resetTemplateValidity:function(){return n(!0)},synchronizeTemplate:t.synchronizeTemplate}}))])((function(e){var t=e.isValid,n=Object(Wr.a)(e,["isValid"]);return t?null:Object(Hr.createElement)(So.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(Hr.createElement)("p",null,Object(x.__)("The content of your post doesnt match the template assigned to your post type.")),Object(Hr.createElement)("div",null,Object(Hr.createElement)(So.Button,{isSecondary:!0,onClick:n.resetTemplateValidity},Object(x.__)("Keep it as is")),Object(Hr.createElement)(So.Button,{onClick:function(){window.confirm(Object(x.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(x.__)("Reset the template"))))}));var To=Object(Kr.compose)([Object(p.withSelect)((function(e){return{notices:e("core/notices").getNotices()}})),Object(p.withDispatch)((function(e){return{onRemove:e("core/notices").removeNotice}}))])((function(e){var t=e.notices,n=e.onRemove,r=Object(O.filter)(t,{isDismissible:!0,type:"default"}),o=Object(O.filter)(t,{isDismissible:!1,type:"default"}),i=Object(O.filter)(t,{type:"snackbar"});return Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(So.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(Hr.createElement)(So.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(Hr.createElement)(Co,null)),Object(Hr.createElement)(So.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),Bo=n(57),xo=n.n(Bo),Io=function(e){var t=e.id,n=e.name,r=e.changes.rawRecord,o=e.checked,i=e.setCheckedById;return Object(Hr.createElement)(So.CheckboxControl,{label:"".concat(Object(O.startCase)(n),': "').concat(r.title||r.name||Object(x.__)("Untitled"),'"'),checked:o,onChange:function(e){return i(t,e)}})};function Ao(e){var t=e.isOpen,n=e.onRequestClose,r=e.ignoredForSave,o=void 0===r?new xo.a:r,i=Object(p.useSelect)((function(e){return e("core").getEntityRecordChangesByRecord()})),c=Object(p.useDispatch)("core").saveEditedEntityRecord,a=Object(Hr.useState)((function(){return new xo.a})),s=Object(Ot.a)(a,2),u=s[0],l=s[1],d=function(e,t){return l((function(n){var r=new xo.a(n);return t?r.set(e,!0):r.delete(e),r}))};return t&&Object(Hr.createElement)(So.Modal,{title:Object(x.__)("What do you want to save?"),onRequestClose:function(){return n()},contentLabel:Object(x.__)("Select items to save.")},Object.keys(i).map((function(e){return Object.keys(i[e]).map((function(t){return Object.keys(i[e][t]).map((function(n){var r=[e,t,n];return Object(Hr.createElement)(Io,{key:r.join(" | "),id:r,name:t,changes:i[e][t][n],checked:u.get(r),setCheckedById:d})}))}))})),Object(Hr.createElement)(So.Button,{isPrimary:!0,disabled:0===u.size,onClick:function(){u.forEach((function(e,t){o.has(t)||c.apply(void 0,Object(I.a)(t.filter((function(e,n){return n!==t.length-1||"undefined"!==e}))))})),n(u)},className:"editor-entities-saved-states__save-button"},Object(x.__)("Save")))}var Ro=n(7),Lo=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(Ro.a)(e)),e.getContent=e.getContent.bind(Object(Ro.a)(e)),e.state={error:null},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(p.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(Hr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(Hr.createElement)(So.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(x.__)("Attempt Recovery")),Object(Hr.createElement)(So.ClipboardButton,{key:"copy-post",text:this.getContent,isSecondary:!0},Object(x.__)("Copy Post Text")),Object(Hr.createElement)(So.ClipboardButton,{key:"copy-error",text:e.stack,isSecondary:!0},Object(x.__)("Copy Error"))]},Object(x.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(Hr.Component),No=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Do=Object(O.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function Uo(){var e=Object(p.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}}),[]),t=e.postId,n=e.getEditedPostAttribute,r=e.hasRemoteAutosave,o=Object(p.useDispatch)("core/notices"),i=o.createWarningNotice,a=o.removeNotice,s=Object(p.useDispatch)("core/editor"),u=s.editPost,l=s.resetEditorBlocks;Object(Hr.useEffect)((function(){var e=function(e){return window.sessionStorage.getItem(Dr(e))}(t);if(e){try{e=JSON.parse(e)}catch(e){return}var o=e,s={title:o.post_title,content:o.content,excerpt:o.excerpt};if(Object.keys(s).some((function(e){return s[e]!==n(e)}))){if(!r){var d=Object(O.uniqueId)("wpEditorAutosaveRestore");i(Object(x.__)("The backup of this post in your browser is different from the version below."),{id:d,actions:[{label:Object(x.__)("Restore the backup"),onClick:function(){u(Object(O.omit)(s,["content"])),l(Object(c.parse)(s.content)),a(d)}}]})}}else Ur(t)}}),[t])}var Fo=Object(Kr.ifCondition)(Do)((function(){var e,t,n,r,o,i,c,a=Object(p.useDispatch)("core/editor").__experimentalLocalAutosave,s=Object(Hr.useCallback)((function(){No(a)}),[]);Uo(),e=Object(p.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}}),[]),t=e.postId,n=e.isDirty,r=e.isAutosaving,o=e.didError,i=Object(Hr.useRef)(n),c=Object(Hr.useRef)(r),Object(Hr.useEffect)((function(){!o&&(c.current&&!r||i.current&&!n)&&Ur(t),i.current=n,c.current=r}),[n,r,o]);var u=Object(p.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}}),[]).localAutosaveInterval;return Object(Hr.createElement)(co,{interval:u,autosave:s,shouldThrottle:!0})}));var Mo=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditorSettings,o=e("core").getPostType,i=r().availableTemplates;return{postType:o(n("type")),availableTemplates:i}}))((function(e){var t=e.availableTemplates,n=e.postType,r=e.children;return!Object(O.get)(n,["supports","page-attributes"],!1)&&Object(O.isEmpty)(t)?null:r}));var Vo=Object(p.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute;return{postType:(0,e("core").getPostType)(t("type"))}}))((function(e){var t=e.postType,n=e.children,r=e.supportKeys,o=!0;return t&&(o=Object(O.some)(Object(O.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),zo=Object(Kr.withState)({orderInput:null})((function(e){var t=e.onUpdateOrder,n=e.order,r=void 0===n?0:n,o=e.orderInput,i=e.setState,c=null===o?r:o;return Object(Hr.createElement)(So.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(x.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(O.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var Wo=Object(Kr.compose)([Object(p.withSelect)((function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}})),Object(p.withDispatch)((function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}))])((function(e){return Object(Hr.createElement)(Vo,{supportKeys:"page-attributes"},Object(Hr.createElement)(zo,e))}));function Ho(e){var t=e.map((function(e){return Object(d.a)({children:[],parent:null},e)})),n=Object(O.groupBy)(t,"parent");if(n.null&&n.null.length)return t;return function e(t){return t.map((function(t){var r=n[t.id];return Object(d.a)({},t,{children:r&&r.length?e(r):[]})}))}(n[0]||[])}var Ko=Object(p.withSelect)((function(e){var t=e("core"),n=t.getPostType,r=t.getEntityRecords,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("type"),s=n(a),u=i(),l=Object(O.get)(s,["hierarchical"],!1),d={per_page:-1,exclude:u,parent_exclude:u,orderby:"menu_order",order:"asc"};return{parent:c("parent"),items:l?r("postType",a,d):[],postType:s}})),Go=Object(p.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}})),qo=Object(Kr.compose)([Ko,Go])((function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(O.get)(n,["hierarchical"],!1),c=Object(O.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=Ho(a.map((function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(x.__)("no title"),")")}})));return Object(Hr.createElement)(So.TreeSelect,{className:"editor-page-attributes__parent",label:c,noOptionLabel:"(".concat(Object(x.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})}));var Qo=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}})),Object(p.withDispatch)((function(e){return{onUpdate:function(t){e("core/editor").editPost({template:t||""})}}})))((function(e){var t=e.availableTemplates,n=e.selectedTemplate,r=e.onUpdate;return Object(O.isEmpty)(t)?null:Object(Hr.createElement)(So.SelectControl,{label:Object(x.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(O.map)(t,(function(e,t){return{value:t,label:e}}))})})),Yo=n(54);var Xo=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(O.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}})),Kr.withInstanceId])((function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||n.length<2?null:Object(Hr.createElement)(Vo,{supportKeys:"author"},r)})),Zo=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(Ro.a)(e)),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"setAuthorId",value:function(e){var t=this.props.onUpdateAuthor,n=e.target.value;t(Number(n))}},{key:"render",value:function(){var e=this.props,t=e.postAuthor,n=e.instanceId,r=e.authors,o="post-author-selector-"+n;return Object(Hr.createElement)(Xo,null,Object(Hr.createElement)("label",{htmlFor:o},Object(x.__)("Author")),Object(Hr.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map((function(e){return Object(Hr.createElement)("option",{key:e.id,value:e.id},Object(Yo.decodeEntities)(e.name))}))))}}]),t}(Hr.Component),Jo=Object(Kr.compose)([Object(p.withSelect)((function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}})),Object(p.withDispatch)((function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}})),Kr.withInstanceId])(Zo);var $o=Object(Kr.compose)([Object(p.withSelect)((function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}})),Object(p.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(Wr.a)(e,["commentStatus"]);return Object(Hr.createElement)(So.CheckboxControl,{label:Object(x.__)("Allow comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})}));var ei=Object(Kr.compose)([Object(p.withSelect)((function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}})),Object(p.withDispatch)((function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}}))])((function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(Hr.createElement)("div",{className:"editor-post-excerpt"},Object(Hr.createElement)(So.TextareaControl,{label:Object(x.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(Hr.createElement)(So.ExternalLink,{href:Object(x.__)("https://wordpress.org/support/article/excerpt/")},Object(x.__)("Learn more about manual excerpts")))}));var ti=function(e){return Object(Hr.createElement)(Vo,Object(zr.a)({},e,{supportKeys:"excerpt"}))};var ni=Object(p.withSelect)((function(e){var t=e("core").getThemeSupports;return{postType:(0,e("core/editor").getEditedPostAttribute)("type"),themeSupports:t()}}))((function(e){var t=e.themeSupports,n=e.children,r=e.postType,o=e.supportKeys;return Object(O.some)(Object(O.castArray)(o),(function(e){var n=Object(O.get)(t,[e],!1);return"post-thumbnails"===e&&Object(O.isArray)(n)?Object(O.includes)(n,r):n}))?n:null}));var ri=function(e){return Object(Hr.createElement)(ni,{supportKeys:"post-thumbnails"},Object(Hr.createElement)(Vo,Object(zr.a)({},e,{supportKeys:"thumbnail"})))},oi=["image"],ii=Object(x.__)("Featured image"),ci=Object(x.__)("Set featured image"),ai=Object(x.__)("Remove image");var si=Object(p.withSelect)((function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,a=c("featured_media");return{media:a?n(a):null,currentPostId:i(),postType:r(c("type")),featuredImageId:a}})),ui=Object(p.withDispatch)((function(e,t,n){var r=t.noticeOperations,o=n.select,i=e("core/editor").editPost;return{onUpdateImage:function(e){i({featured_media:e.id})},onDropImage:function(e){o("core/block-editor").getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange:function(e){var t=Object(Ot.a)(e,1)[0];i({featured_media:t.id})},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)}})},onRemoveImage:function(){i({featured_media:0})}}})),li=Object(Kr.compose)(So.withNotices,si,ui,Object(So.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n,r,o=e.currentPostId,c=e.featuredImageId,a=e.onUpdateImage,s=e.onDropImage,u=e.onRemoveImage,l=e.media,d=e.postType,p=e.noticeUI,b=Object(O.get)(d,["labels"],{}),f=Object(Hr.createElement)("p",null,Object(x.__)("To edit the featured image, you need permission to upload media."));if(l){var h=Object(Gr.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",l.id,o);if(Object(O.has)(l,["media_details","sizes",h]))t=l.media_details.sizes[h].width,n=l.media_details.sizes[h].height,r=l.media_details.sizes[h].source_url;else{var m=Object(Gr.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",l.id,o);Object(O.has)(l,["media_details","sizes",m])?(t=l.media_details.sizes[m].width,n=l.media_details.sizes[m].height,r=l.media_details.sizes[m].source_url):(t=l.media_details.width,n=l.media_details.height,r=l.source_url)}}return Object(Hr.createElement)(ri,null,p,Object(Hr.createElement)("div",{className:"editor-post-featured-image"},Object(Hr.createElement)(i.MediaUploadCheck,{fallback:f},Object(Hr.createElement)(i.MediaUpload,{title:b.featured_image||ii,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:oi,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(Hr.createElement)("div",{className:"editor-post-featured-image__container"},Object(Hr.createElement)(So.Button,{className:c?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":c?Object(x.__)("Edit or update the image"):null},!!c&&l&&Object(Hr.createElement)(So.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n,isInline:!0},Object(Hr.createElement)("img",{src:r,alt:""})),!!c&&!l&&Object(Hr.createElement)(So.Spinner,null),!c&&(b.set_featured_image||ci)),Object(Hr.createElement)(So.DropZone,{onFilesDrop:s}))},value:c})),!!c&&l&&!l.isLoading&&Object(Hr.createElement)(i.MediaUploadCheck,null,Object(Hr.createElement)(i.MediaUpload,{title:b.featured_image||ii,onSelect:a,unstableFeaturedImageFlow:!0,allowedTypes:oi,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(Hr.createElement)(So.Button,{onClick:t,isSecondary:!0},Object(x.__)("Replace Image"))}})),!!c&&Object(Hr.createElement)(i.MediaUploadCheck,null,Object(Hr.createElement)(So.Button,{onClick:u,isLink:!0,isDestructive:!0},b.remove_featured_image||ai))))}));var di=Object(p.withSelect)((function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}}))((function(e){var t=e.disablePostFormats,n=Object(Wr.a)(e,["disablePostFormats"]);return!t&&Object(Hr.createElement)(Vo,Object(zr.a)({},n,{supportKeys:"post-formats"}))})),pi=[{id:"aside",caption:Object(x.__)("Aside")},{id:"gallery",caption:Object(x.__)("Gallery")},{id:"link",caption:Object(x.__)("Link")},{id:"image",caption:Object(x.__)("Image")},{id:"quote",caption:Object(x.__)("Quote")},{id:"standard",caption:Object(x.__)("Standard")},{id:"status",caption:Object(x.__)("Status")},{id:"video",caption:Object(x.__)("Video")},{id:"audio",caption:Object(x.__)("Audio")},{id:"chat",caption:Object(x.__)("Chat")}];var bi=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:o,supportedFormats:Object(O.union)([o],Object(O.get)(i,["formats"],[])),suggestedFormat:r()}})),Object(p.withDispatch)((function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}})),Kr.withInstanceId])((function(e){var t=e.onUpdatePostFormat,n=e.postFormat,r=void 0===n?"standard":n,o=e.supportedFormats,i=e.suggestedFormat,c="post-format-selector-"+e.instanceId,a=pi.filter((function(e){return Object(O.includes)(o,e.id)})),s=Object(O.find)(a,(function(e){return e.id===i}));return Object(Hr.createElement)(di,null,Object(Hr.createElement)("div",{className:"editor-post-format"},Object(Hr.createElement)("div",{className:"editor-post-format__content"},Object(Hr.createElement)("label",{htmlFor:c},Object(x.__)("Post Format")),Object(Hr.createElement)(So.SelectControl,{value:r,onChange:function(e){return t(e)},id:c,options:a.map((function(e){return{label:e.caption,value:e.id}}))})),s&&s.id!==r&&Object(Hr.createElement)("div",{className:"editor-post-format__suggestion"},Object(x.__)("Suggestion:")," ",Object(Hr.createElement)(So.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))}));var fi=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}}))((function(e){var t=e.lastRevisionId,n=e.revisionsCount,r=e.children;return!t||n<2?null:Object(Hr.createElement)(Vo,{supportKeys:"revisions"},r)}));function hi(e,t){return Object(yt.addQueryArgs)(e,t)}function mi(e){return e?Object(O.toLower)(Object(O.deburr)(Object(O.trim)(e.replace(/[\s\./_]+/g,"-"),"-"))):""}var vi=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPostLastRevisionId,r=t.getCurrentPostRevisionsCount;return{lastRevisionId:n(),revisionsCount:r()}}))((function(e){var t=e.lastRevisionId,n=e.revisionsCount;return Object(Hr.createElement)(fi,null,Object(Hr.createElement)(So.Button,{href:hi("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(x.sprintf)(Object(x._n)("%d Revision","%d Revisions",n),n)))}));var Oi=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(Ro.a)(e)),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props.previewLink;t&&!e.previewLink&&this.setPreviewWindowLink(t)}},{key:"setPreviewWindowLink",value:function(e){var t=this.previewWindow;t&&!t.closed&&(t.location=e)}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){var t,n;(e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),t=this.previewWindow.document,n=Object(Hr.renderToString)(Object(Hr.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(Hr.createElement)(So.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(Hr.createElement)(So.Path,{className:"outer",d:"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36",fill:"none"}),Object(Hr.createElement)(So.Path,{className:"inner",d:"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z",fill:"none"})),Object(Hr.createElement)("p",null,Object(x.__)("Generating preview…")))),n+='\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;\n\t\t\t}\n\t\t</style>\n\t',n=Object(Gr.applyFilters)("editor.PostPreview.interstitialMarkup",n),t.write(n),t.title=Object(x.__)("Generating preview…"),t.close()):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=t||n;return Object(Hr.createElement)(So.Button,{isSecondary:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(x._x)("Preview","imperative verb"),Object(Hr.createElement)("span",{className:"screen-reader-text"},Object(x.__)("(opens in a new tab)")))}}]),t}(Hr.Component),gi=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,c=o.getCurrentPostAttribute,a=o.getEditedPostAttribute,s=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=e("core").getPostType,p=l(),b=d(a("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:s(),isAutosaveable:r||u(),isViewable:Object(O.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}})),Object(p.withDispatch)((function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}})),Object(Kr.ifCondition)((function(e){return e.isViewable}))])(Oi),ji=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(Ro.a)(e)),e.receivePostLock=e.receivePostLock.bind(Object(Ro.a)(e)),e.releasePostLock=e.releasePostLock.bind(Object(Ro.a)(e)),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(Gr.addAction)("heartbeat.send",e,this.sendPostLock),Object(Gr.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(Gr.removeAction)("heartbeat.send",e),Object(Gr.removeAction)("heartbeat.tick",e)}},{key:"getHookName",value:function(){return"core/editor/post-locked-modal-"+this.props.instanceId}},{key:"sendPostLock",value:function(e){var t=this.props,n=t.isLocked,r=t.activePostLock,o=t.postId;n||(e["wp-refresh-post-lock"]={lock:r,post_id:o})}},{key:"receivePostLock",value:function(e){if(e["wp-refresh-post-lock"]){var t=this.props,n=t.autosave,r=t.updatePostLock,o=e["wp-refresh-post-lock"];o.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:o.lock_error.avatar_src}})):o.new_lock&&r({isLocked:!1,activePostLock:o.new_lock})}}},{key:"releasePostLock",value:function(){var e=this.props,t=e.isLocked,n=e.activePostLock,r=e.postLockUtils,o=e.postId;if(!t&&n){var i=new window.FormData;if(i.append("action","wp-remove-post-lock"),i.append("_wpnonce",r.unlockNonce),i.append("post_ID",o),i.append("active_post_lock",n),window.navigator.sendBeacon)window.navigator.sendBeacon(r.ajaxUrl,i);else{var c=new window.XMLHttpRequest;c.open("POST",r.ajaxUrl,!1),c.send(i)}}}},{key:"render",value:function(){var e=this.props,t=e.user,n=e.postId,r=e.isLocked,o=e.isTakeover,i=e.postLockUtils,c=e.postType;if(!r)return null;var a=t.name,s=t.avatar,u=Object(yt.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=hi("edit.php",{post_type:Object(O.get)(c,["slug"])}),d=Object(x.__)("Exit the Editor");return Object(Hr.createElement)(So.Modal,{title:o?Object(x.__)("Someone else has taken over this post."):Object(x.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!s&&Object(Hr.createElement)("img",{src:s,alt:Object(x.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(Hr.createElement)("div",null,Object(Hr.createElement)("div",null,a?Object(x.sprintf)(Object(x.__)("%s now has editing control of this post. Dont worry, your changes up to this moment have been saved."),a):Object(x.__)("Another user now has editing control of this post. Dont worry, your changes up to this moment have been saved.")),Object(Hr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Hr.createElement)(So.Button,{isPrimary:!0,href:l},d))),!o&&Object(Hr.createElement)("div",null,Object(Hr.createElement)("div",null,a?Object(x.sprintf)(Object(x.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(x.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(Hr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(Hr.createElement)(So.Button,{isSecondary:!0,href:l},d),Object(Hr.createElement)(gi,null),Object(Hr.createElement)(So.Button,{isPrimary:!0,href:u},Object(x.__)("Take Over")))))}}]),t}(Hr.Component),yi=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isPostLocked,r=t.isPostLockTakeover,o=t.getPostLockUser,i=t.getCurrentPostId,c=t.getActivePostLock,a=t.getEditedPostAttribute,s=t.getEditorSettings,u=e("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:s().postLockUtils,activePostLock:c(),postType:u(a("type"))}})),Object(p.withDispatch)((function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}})),Kr.withInstanceId,Object(Kr.withGlobalEvents)({beforeunload:"releasePostLock"}))(ji);var _i=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(O.get)(o(),["_links","wp:action-publish"],!1),isPublished:n(),postType:r()}})))((function(e){var t=e.hasPublishAction,n=e.isPublished,r=e.children;return n||!t?null:r}));var ki=Object(Kr.compose)(Object(p.withSelect)((function(e){return{status:e("core/editor").getEditedPostAttribute("status")}})),Object(p.withDispatch)((function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}})))((function(e){var t=e.status,n=e.onUpdateStatus;return Object(Hr.createElement)(_i,null,Object(Hr.createElement)(So.CheckboxControl,{label:Object(x.__)("Pending review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))}));var Si=Object(Kr.compose)([Object(p.withSelect)((function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}})),Object(p.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(Wr.a)(e,["pingStatus"]);return Object(Hr.createElement)(So.CheckboxControl,{label:Object(x.__)("Allow pingbacks & trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}));var Ei=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,a=r.isPublishingPost,s=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:a(),hasPublishAction:Object(O.get)(s(),["_links","wp:action-publish"],!1),postType:u(),isAutosaving:l()}}))])((function(e){var t=e.isPublished,n=e.isBeingScheduled,r=e.isSaving,o=e.isPublishing,i=e.hasPublishAction,c=e.isAutosaving,a=e.hasNonPostEntityChanges;return o?Object(x.__)("Publishing…"):t&&r&&!c?Object(x.__)("Updating…"):n&&r&&!c?Object(x.__)("Scheduling…"):i?t?a?Object(x.__)("Update…"):Object(x.__)("Update"):n?a?Object(x.__)("Schedule…"):Object(x.__)("Schedule"):a?Object(x.__)("Publish…"):Object(x.__)("Publish"):a?Object(x.__)("Submit for Review…"):Object(x.__)("Submit for Review")})),Pi=function(e){function t(e){var n;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).call(this,e))).buttonNode=Object(Hr.createRef)(),n.createOnClick=n.createOnClick.bind(Object(Ro.a)(n)),n.closeEntitiesSavedStates=n.closeEntitiesSavedStates.bind(Object(Ro.a)(n)),n.state={entitiesSavedStatesCallback:!1},n.createIgnoredForSave=G()((function(e,t){return new xo.a([[["postType",e,String(t)],!0]])}),{maxSize:1}),n}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"createOnClick",value:function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=t.props.hasNonPostEntityChanges;return i?(t.setState({entitiesSavedStatesCallback:function(){return e.apply(void 0,r)}}),O.noop):e.apply(void 0,r)}}},{key:"closeEntitiesSavedStates",value:function(e){var t=this.props,n=t.postType,r=t.postId,o=this.state.entitiesSavedStatesCallback;this.setState({entitiesSavedStatesCallback:!1},(function(){e&&e.has(["postType",n,String(r)])&&o()}))}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,c=t.isOpen,a=t.isPostSavingLocked,s=t.isPublishable,u=t.isPublished,l=t.isSaveable,d=t.isSaving,p=t.isToggle,b=t.onSave,f=t.onStatusChange,h=t.onSubmit,m=void 0===h?O.noop:h,v=t.onToggle,g=t.visibility,j=t.hasNonPostEntityChanges,y=t.postType,_=t.postId,k=this.state.entitiesSavedStatesCallback,S=d||r||!l||a||!s&&!n,E=u||d||r||!l||!s&&!n;e=o?"private"===g?"private":i?"future":"publish":"pending";var P={"aria-disabled":S&&!j,className:"editor-post-publish-button",isBusy:d&&u,isPrimary:!0,onClick:this.createOnClick((function(){S||(m(),f(e),b())}))},w={"aria-disabled":E&&!j,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:d&&u,isPrimary:!0,onClick:this.createOnClick((function(){E||v()}))},C=i?Object(x.__)("Schedule…"):Object(x.__)("Publish…"),T=Object(Hr.createElement)(Ei,{forceIsSaving:r,hasNonPostEntityChanges:j}),B=p?w:P,I=p?C:T;return Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(Ao,{isOpen:Boolean(k),onRequestClose:this.closeEntitiesSavedStates,ignoredForSave:this.createIgnoredForSave(y,_)}),Object(Hr.createElement)(So.Button,Object(zr.a)({ref:this.buttonNode},B,{className:so()(B.className,"editor-post-publish-button__button",{"has-changes-dot":j})}),I))}}]),t}(Hr.Component),wi=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isEditedPostBeingScheduled,o=t.getEditedPostVisibility,i=t.isCurrentPostPublished,c=t.isEditedPostSaveable,a=t.isEditedPostPublishable,s=t.isPostSavingLocked,u=t.getCurrentPost,l=t.getCurrentPostType,d=t.getCurrentPostId,p=t.hasNonPostEntityChanges;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(O.get)(u(),["_links","wp:action-publish"],!1),postType:l(),postId:d(),hasNonPostEntityChanges:p()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e},{undoIgnore:!0})},onSave:t.savePost}}))])(Pi),Ci=[{value:"public",label:Object(x.__)("Public"),info:Object(x.__)("Visible to everyone.")},{value:"private",label:Object(x.__)("Private"),info:Object(x.__)("Only visible to site admins and editors.")},{value:"password",label:Object(x.__)("Password Protected"),info:Object(x.__)("Protected with a password you choose. Only those with the password can view this post.")}],Ti=function(e){function t(e){var n;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(Ro.a)(n)),n.setPrivate=n.setPrivate.bind(Object(Ro.a)(n)),n.setPasswordProtected=n.setPasswordProtected.bind(Object(Ro.a)(n)),n.updatePassword=n.updatePassword.bind(Object(Ro.a)(n)),n.state={hasPassword:!!e.password},n}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"setPublic",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r),this.setState({hasPassword:!1})}},{key:"setPrivate",value:function(){if(window.confirm(Object(x.__)("Would you like to privately publish this post now?"))){var e=this.props,t=e.onUpdateVisibility,n=e.onSave;t("private"),this.setState({hasPassword:!1}),n()}}},{key:"setPasswordProtected",value:function(){var e=this.props,t=e.visibility,n=e.onUpdateVisibility,r=e.status;n("private"===t?"draft":r,e.password||""),this.setState({hasPassword:!0})}},{key:"updatePassword",value:function(e){var t=this.props,n=t.status;(0,t.onUpdateVisibility)(n,e.target.value)}},{key:"render",value:function(){var e=this.props,t=e.visibility,n=e.password,r=e.instanceId,o={public:{onSelect:this.setPublic,checked:"public"===t&&!this.state.hasPassword},private:{onSelect:this.setPrivate,checked:"private"===t},password:{onSelect:this.setPasswordProtected,checked:this.state.hasPassword}};return[Object(Hr.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(Hr.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(x.__)("Post Visibility")),Ci.map((function(e){var t=e.value,n=e.label,i=e.info;return Object(Hr.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(Hr.createElement)("input",{type:"radio",name:"editor-post-visibility__setting-".concat(r),value:t,onChange:o[t].onSelect,checked:o[t].checked,id:"editor-post-".concat(t,"-").concat(r),"aria-describedby":"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-radio"}),Object(Hr.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(Hr.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))}))),this.state.hasPassword&&Object(Hr.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(Hr.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(x.__)("Create password")),Object(Hr.createElement)("input",{className:"editor-post-visibility__dialog-password-input",id:"editor-post-visibility__dialog-password-input-".concat(r),type:"text",onChange:this.updatePassword,value:n,placeholder:Object(x.__)("Use a secure password")}))]}}]),t}(Hr.Component),Bi=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.savePost,r=t.editPost;return{onSave:n,onUpdateVisibility:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";r({status:e,password:t})}}})),Kr.withInstanceId])(Ti);var xi=Object(p.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(O.find)(Ci,{value:t}).label}));var Ii=Object(Kr.compose)([Object(p.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})),Object(p.withDispatch)((function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}}))])((function(e){var t=e.date,n=e.onUpdateDate,r=Object(jt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(Hr.createElement)(So.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})}));var Ai=Object(p.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date"),isFloating:e("core/editor").isEditedPostDateFloating()}}))((function(e){var t=e.date,n=e.isFloating,r=Object(jt.__experimentalGetSettings)();return t&&!n?Object(jt.dateI18n)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(x.__)("Immediately")})),Ri={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},Li=function(e,t){return e.toLowerCase()===t.toLowerCase()},Ni=function(e){return Object(d.a)({},e,{name:Object(O.unescape)(e.name)})},Di=function(e){return Object(O.map)(e,Ni)},Ui=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Ro.a)(e)),e.searchTerms=Object(O.throttle)(e.searchTerms.bind(Object(Ro.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(Ro.a)(e)),e.state={loading:!Object(O.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(O.isEmpty)(this.props.terms)||(this.initRequest=this.fetchTerms({include:this.props.terms.join(","),per_page:-1}),this.initRequest.then((function(){e.setState({loading:!1})}),(function(t){"abort"!==t.statusText&&e.setState({loading:!1})})))}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.initRequest,["abort"]),Object(O.invoke)(this.searchRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){e.terms!==this.props.terms&&this.updateSelectedTerms(this.props.terms)}},{key:"fetchTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=Object(d.a)({},Ri,t),o=B()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(Di).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(O.find)(e.availableTerms,(function(e){return e.id===t.id}))})))}})),e.updateSelectedTerms(e.props.terms)})),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t,n){var r=Object(O.find)(e.state.availableTerms,(function(e){return e.id===n}));return r&&t.push(r.name),t}),[]);this.setState({selectedTerms:n})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(O.escape)(e);return B()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=B()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(d.a)({},Ri,{search:r}))}).then(Di),t.addRequest.then((function(t){return Object(O.find)(t,(function(t){return Li(t.name,e)}))}))):Promise.reject(o)})).then(Ni)}},{key:"onChange",value:function(e){var t=this,n=Object(O.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(O.find)(t.state.availableTerms,(function(t){return Li(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(O.find)(t,(function(t){return Li(t.name,e)})).id}))};if(0===r.length)return this.props.onUpdateTerms(o(n,this.state.availableTerms),this.props.taxonomy.rest_base);Promise.all(r.map(this.findOrCreateTerm)).then((function(e){var r=t.state.availableTerms.concat(e);return t.setState({availableTerms:r}),t.props.onUpdateTerms(o(n,r),t.props.taxonomy.rest_base)}))}},{key:"searchTerms",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";Object(O.invoke)(this.searchRequest,["abort"]),this.searchRequest=this.fetchTerms({search:e})}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy;if(!e.hasAssignAction)return null;var r=this.state,o=r.loading,i=r.availableTerms,c=r.selectedTerms,a=i.map((function(e){return e.name})),s=Object(O.get)(n,["labels","add_new_item"],"post_tag"===t?Object(x.__)("Add new tag"):Object(x.__)("Add new Term")),u=Object(O.get)(n,["labels","singular_name"],"post_tag"===t?Object(x.__)("Tag"):Object(x.__)("Term")),l=Object(x.sprintf)(Object(x._x)("%s added","term"),u),d=Object(x.sprintf)(Object(x._x)("%s removed","term"),u),p=Object(x.sprintf)(Object(x._x)("Remove %s","term"),u);return Object(Hr.createElement)(So.FormTokenField,{value:c,suggestions:a,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:s,messages:{added:l,removed:d,remove:p}})}}]),t}(Hr.Component),Fi=Object(Kr.compose)(Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}})),Object(So.withFilters)("editor.PostTaxonomyType"))(Ui),Mi=function(){var e=[Object(x.__)("Suggestion:"),Object(Hr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(x.__)("Add tags"))];return Object(Hr.createElement)(So.PanelBody,{initialOpen:!1,title:e},Object(Hr.createElement)("p",null,Object(x.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(Hr.createElement)(Fi,{slug:"post_tag"}))},Vi=function(e){function t(e){var n;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(Hr.createElement)(Mi,null)}}]),t}(Hr.Component),zi=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPostType(),n=e("core").getTaxonomy("post_tag"),r=n&&e("core/editor").getEditedPostAttribute(n.rest_base);return{areTagsFetched:void 0!==n,isPostTypeSupported:n&&Object(O.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(Kr.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(Vi),Wi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(Hr.createElement)(So.Button,{isLink:!0,onClick:function(){return r(t)}},n)},Hi=function(e,t){var n=pi.filter((function(t){return Object(O.includes)(e,t.id)}));return Object(O.find)(n,(function(e){return e.id===t}))},Ki=Object(Kr.compose)(Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(O.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Hi(o,r())}})),Object(p.withDispatch)((function(e){return{onUpdatePostFormat:function(t){e("core/editor").editPost({format:t})}}})),Object(Kr.ifCondition)((function(e){var t=e.suggestion,n=e.currentPostFormat;return t&&t.id!==n})))((function(e){var t=e.suggestion,n=e.onUpdatePostFormat,r=[Object(x.__)("Suggestion:"),Object(Hr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(x.__)("Use a post format"))];return Object(Hr.createElement)(So.PanelBody,{initialOpen:!1,title:r},Object(Hr.createElement)("p",null,Object(x.__)("Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.")),Object(Hr.createElement)("p",null,Object(Hr.createElement)(Wi,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(x.sprintf)(Object(x.__)('Apply the "%1$s" format.'),t.caption)})))}));var Gi=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),isBeingScheduled:r()}}))((function(e){var t,n,r=e.hasPublishAction,o=e.isBeingScheduled,i=e.children;return r?o?(t=Object(x.__)("Are you ready to schedule?"),n=Object(x.__)("Your work will be published at the specified date and time.")):(t=Object(x.__)("Are you ready to publish?"),n=Object(x.__)("Double-check your settings before publishing.")):(t=Object(x.__)("Are you ready to submit for review?"),n=Object(x.__)("When youre ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(Hr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(Hr.createElement)("div",null,Object(Hr.createElement)("strong",null,t)),Object(Hr.createElement)("p",null,n),r&&Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(So.PanelBody,{initialOpen:!1,title:[Object(x.__)("Visibility:"),Object(Hr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Hr.createElement)(xi,null))]},Object(Hr.createElement)(Bi,null)),Object(Hr.createElement)(So.PanelBody,{initialOpen:!1,title:[Object(x.__)("Publish:"),Object(Hr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(Hr.createElement)(Ai,null))]},Object(Hr.createElement)(Ii,null))),Object(Hr.createElement)(Ki,null),Object(Hr.createElement)(zi,null),i)})),qi=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(Ro.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(Ro.a)(e)),e.postLink=Object(Hr.createRef)(),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.postLink.current.focus()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.dismissCopyConfirmation)}},{key:"onCopy",value:function(){var e=this;this.setState({showCopyConfirmation:!0}),clearTimeout(this.dismissCopyConfirmation),this.dismissCopyConfirmation=setTimeout((function(){e.setState({showCopyConfirmation:!1})}),4e3)}},{key:"onSelectInput",value:function(e){e.target.select()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.isScheduled,r=e.post,o=e.postType,i=Object(O.get)(o,["labels","singular_name"]),c=Object(O.get)(o,["labels","view_item"]),a=n?Object(Hr.createElement)(Hr.Fragment,null,Object(x.__)("is now scheduled. It will go live on")," ",Object(Hr.createElement)(Ai,null),"."):Object(x.__)("is now live.");return Object(Hr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(Hr.createElement)(So.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(Hr.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(x.__)("(no title)"))," ",a),Object(Hr.createElement)(So.PanelBody,null,Object(Hr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(Hr.createElement)("strong",null,Object(x.__)("Whats next?"))),Object(Hr.createElement)(So.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(x.sprintf)(Object(x.__)("%s address"),i),value:Object(yt.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(Hr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(Hr.createElement)(So.Button,{isSecondary:!0,href:r.link},c),Object(Hr.createElement)(So.ClipboardButton,{isSecondary:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(x.__)("Copied!"):Object(x.__)("Copy Link")))),t)}}]),t}(Hr.Component),Qi=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getCurrentPost,o=t.isCurrentPostScheduled,i=e("core").getPostType;return{post:r(),postType:i(n("type")),isScheduled:o()}}))(qi),Yi=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(Ro.a)(e)),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidUpdate",value:function(e){e.isPublished&&!this.props.isSaving&&this.props.isDirty&&this.props.onClose()}},{key:"onSubmit",value:function(){var e=this.props,t=e.onClose,n=e.hasPublishAction,r=e.isPostTypeViewable;n&&r||t()}},{key:"render",value:function(){var e=this.props,t=e.forceIsDirty,n=e.forceIsSaving,r=e.isBeingScheduled,o=e.isPublished,i=e.isPublishSidebarEnabled,c=e.isScheduled,a=e.isSaving,s=e.onClose,u=e.onTogglePublishSidebar,l=e.PostPublishExtension,d=e.PrePublishExtension,p=Object(Wr.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(O.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(Hr.createElement)("div",Object(zr.a)({className:"editor-post-publish-panel"},b),Object(Hr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(Hr.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(x.__)("Scheduled"):Object(x.__)("Published")):Object(Hr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(Hr.createElement)(wi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(Hr.createElement)(So.Button,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(x.__)("Close panel")})),Object(Hr.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(Hr.createElement)(Gi,null,d&&Object(Hr.createElement)(d,null)),m&&Object(Hr.createElement)(Qi,{focusOnMount:!0},l&&Object(Hr.createElement)(l,null)),a&&Object(Hr.createElement)(So.Spinner,null)),Object(Hr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(Hr.createElement)(So.CheckboxControl,{label:Object(x.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),t}(Hr.Component),Xi=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,a=n.isEditedPostBeingScheduled,s=n.isEditedPostDirty,u=n.isSavingPost,l=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(O.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(O.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(p.withDispatch)((function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})),So.withFocusReturn,So.withConstrainedTabbing])(Yi);var Zi=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isSavingPost,r=t.isCurrentPostPublished,o=t.isCurrentPostScheduled;return{isSaving:n(),isPublished:r(),isScheduled:o()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}}))])((function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick,i=Object(Kr.useViewportMatch)("small","<");return n||r?Object(Hr.createElement)(So.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(x.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(x.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(x.__)("Draft"):Object(x.__)("Switch to draft")):null})),Ji=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this;e.isSaving&&!this.props.isSaving&&(this.setState({forceSavedMessage:!0}),this.props.setTimeout((function(){t.setState({forceSavedMessage:!1})}),1e3))}},{key:"render",value:function(){var e=this.props,t=e.post,n=e.isNew,r=e.isScheduled,o=e.isPublished,i=e.isDirty,c=e.isSaving,a=e.isSaveable,s=e.onSave,u=e.isAutosaving,l=e.isPending,d=e.isLargeViewport,p=this.state.forceSavedMessage;if(c){var b=so()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(Hr.createElement)(So.Animate,{type:"loading"},(function(e){var t=e.className;return Object(Hr.createElement)("span",{className:so()(b,t)},Object(Hr.createElement)(So.Dashicon,{icon:"cloud"}),u?Object(x.__)("Autosaving"):Object(x.__)("Saving"))}))}if(o||r)return Object(Hr.createElement)(Zi,null);if(!a)return null;if(p||!n&&!i)return Object(Hr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(Hr.createElement)(So.Dashicon,{icon:"saved"}),Object(x.__)("Saved"));if(!Object(O.get)(t,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(x.__)("Save as Pending"):Object(x.__)("Save Draft");return d?Object(Hr.createElement)(So.Button,{className:"editor-post-save-draft",onClick:function(){return s()},shortcut:Eo.displayShortcut.primary("s"),isTertiary:!0},f):Object(Hr.createElement)(So.Button,{className:"editor-post-save-draft",label:f,onClick:function(){return s()},shortcut:Eo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(Hr.Component),$i=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.forceIsDirty,r=t.forceIsSaving,o=e("core/editor"),i=o.isEditedPostNew,c=o.isCurrentPostPublished,a=o.isCurrentPostScheduled,s=o.isEditedPostDirty,u=o.isSavingPost,l=o.isEditedPostSaveable,d=o.getCurrentPost,p=o.isAutosavingPost,b=o.getEditedPostAttribute;return{post:d(),isNew:i(),isPublished:c(),isScheduled:a(),isDirty:n||s(),isSaving:r||u(),isSaveable:l(),isAutosaving:p(),isPending:"pending"===b("status")}})),Object(p.withDispatch)((function(e){return{onSave:e("core/editor").savePost}})),Kr.withSafeTimeout,Object(l.withViewportMatch)({isLargeViewport:"small"})])(Ji);var ec=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function tc(e){var t=e.children;return Object(Hr.createElement)(Vo,{supportKeys:"slug"},t)}var nc=function(e){function t(e){var n,r=e.postSlug,o=e.postTitle,i=e.postID;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).state={editedSlug:Object(yt.safeDecodeURIComponent)(r)||mi(o)||i},n.setSlug=n.setSlug.bind(Object(Ro.a)(n)),n}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=mi(e.target.value);o!==n&&r(o)}},{key:"render",value:function(){var e=this,t=this.props.instanceId,n=this.state.editedSlug,r="editor-post-slug-"+t;return Object(Hr.createElement)(tc,null,Object(Hr.createElement)("label",{htmlFor:r},Object(x.__)("Slug")),Object(Hr.createElement)("input",{type:"text",id:r,value:n,onChange:function(t){return e.setState({editedSlug:t.target.value})},onBlur:this.setSlug,className:"editor-post-slug__input"}))}}]),t}(Hr.Component),rc=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getEditedPostAttribute,o=n().id;return{postSlug:r("slug"),postTitle:r("title"),postID:o}})),Object(p.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateSlug:function(e){t({slug:e})}}})),Kr.withInstanceId])(nc);var oc=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(O.get)(t,["_links","wp:action-sticky"],!1),postType:e("core/editor").getCurrentPostType()}}))])((function(e){var t=e.hasStickyAction,n=e.postType,r=e.children;return"post"===n&&t?r:null}));var ic=Object(Kr.compose)([Object(p.withSelect)((function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}})),Object(p.withDispatch)((function(e){return{onUpdateSticky:function(t){e("core/editor").editPost({sticky:t})}}}))])((function(e){var t=e.onUpdateSticky,n=e.postSticky,r=void 0!==n&&n;return Object(Hr.createElement)(oc,null,Object(Hr.createElement)(So.CheckboxControl,{label:Object(x.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))})),cc={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},ac=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(Ro.a)(e)),e.onChange=e.onChange.bind(Object(Ro.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(Ro.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(Ro.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(Ro.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(Ro.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(Ro.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(Ro.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"onChange",value:function(e){var t=this.props,n=t.onUpdateTerms,r=t.terms,o=void 0===r?[]:r,i=t.taxonomy;n(-1!==o.indexOf(e)?Object(O.without)(o,e):[].concat(Object(I.a)(o),[e]),i.rest_base)}},{key:"onChangeFormName",value:function(e){var t=""===e.target.value.trim()?"":e.target.value;this.setState({formName:t})}},{key:"onChangeFormParent",value:function(e){this.setState({formParent:e})}},{key:"onToggleForm",value:function(){this.setState((function(e){return{showForm:!e.showForm}}))}},{key:"findTerm",value:function(e,t,n){return Object(O.find)(e,(function(e){return(!e.parent&&!t||parseInt(e.parent)===parseInt(t))&&e.name.toLowerCase()===n.toLowerCase()}))}},{key:"onAddTerm",value:function(e){var t=this;e.preventDefault();var n=this.props,r=n.onUpdateTerms,o=n.taxonomy,i=n.terms,c=n.slug,a=this.state,s=a.formName,u=a.formParent,l=a.adding,p=a.availableTerms;if(""!==s&&!l){var b=this.findTerm(p,u,s);if(b)return Object(O.some)(i,(function(e){return e===b.id}))||r([].concat(Object(I.a)(i),[b.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=B()({path:"/wp/v2/".concat(o.rest_base),method:"POST",data:{name:s,parent:u||void 0}}),this.addRequest.catch((function(e){return"term_exists"===e.code?(t.addRequest=B()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(d.a)({},cc,{parent:u||0,search:s}))}),t.addRequest.then((function(e){return t.findTerm(e,u,s)}))):Promise.reject(e)})).then((function(e){var n=!!Object(O.find)(t.state.availableTerms,(function(t){return t.id===e.id}))?t.state.availableTerms:[e].concat(Object(I.a)(t.state.availableTerms)),a=Object(x.sprintf)(Object(x._x)("%s added","term"),Object(O.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(x.__)("Category"):Object(x.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(Ho(n))}),r([].concat(Object(I.a)(i),[e.id]),o.rest_base)}),(function(e){"abort"!==e.statusText&&(t.addRequest=null,t.setState({adding:!1}))}))}}},{key:"componentDidMount",value:function(){this.fetchTerms()}},{key:"componentWillUnmount",value:function(){Object(O.invoke)(this.fetchRequest,["abort"]),Object(O.invoke)(this.addRequest,["abort"])}},{key:"componentDidUpdate",value:function(e){this.props.taxonomy!==e.taxonomy&&this.fetchTerms()}},{key:"fetchTerms",value:function(){var e=this,t=this.props.taxonomy;t&&(this.fetchRequest=B()({path:Object(yt.addQueryArgs)("/wp/v2/".concat(t.rest_base),cc)}),this.fetchRequest.then((function(t){var n=e.sortBySelected(Ho(t));e.fetchRequest=null,e.setState({loading:!1,availableTermsTree:n,availableTerms:t})}),(function(t){"abort"!==t.statusText&&(e.fetchRequest=null,e.setState({loading:!1}))})))}},{key:"sortBySelected",value:function(e){var t=this.props.terms,n=function e(n){return-1!==t.indexOf(n.id)||void 0!==n.children&&!!(n.children.map(e).filter((function(e){return e})).length>0)};return e.sort((function(e,t){var r=n(e),o=n(t);return r===o?0:r&&!o?-1:!r&&o?1:0})),e}},{key:"setFilterValue",value:function(e){var t=this.state.availableTermsTree,n=e.target.value,r=t.map(this.getFilterMatcher(n)).filter((function(e){return e}));this.setState({filterValue:n,filteredTermsTree:r});var o=function e(t){for(var n=0,r=0;r<t.length;r++)n++,void 0!==t[r].children&&(n+=e(t[r].children));return n}(r),i=Object(x.sprintf)(Object(x._n)("%d result found.","%d results found.",o),o);this.props.debouncedSpeak(i,"assertive")}},{key:"getFilterMatcher",value:function(e){return function t(n){if(""===e)return n;var r=Object(d.a)({},n);return r.children.length>0&&(r.children=r.children.map(t).filter((function(e){return e}))),(-1!==r.name.toLowerCase().indexOf(e.toLowerCase())||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map((function(e){return Object(Hr.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(Hr.createElement)(So.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(O.unescape)(e.name)}),!!e.children.length&&Object(Hr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-subchoices"},t.renderTerms(e.children)))}))}},{key:"render",value:function(){var e=this.props,t=e.slug,n=e.taxonomy,r=e.instanceId,o=e.hasCreateAction;if(!e.hasAssignAction)return null;var i=this.state,c=i.availableTermsTree,a=i.availableTerms,s=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,p=i.showForm,b=i.filterValue,f=function(e,r,o){return Object(O.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(x.__)("Add new category"),Object(x.__)("Add new term")),m=f("new_item_name",Object(x.__)("Add new category"),Object(x.__)("Add new term")),v=f("parent_item",Object(x.__)("Parent Category"),Object(x.__)("Parent Term")),g="— ".concat(v," —"),j=h,y="editor-post-taxonomies__hierarchical-terms-input-".concat(r),_="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(O.get)(this.props.taxonomy,["labels","search_items"],Object(x.__)("Search Terms")),S=Object(O.get)(this.props.taxonomy,["name"],Object(x.__)("Terms")),E=a.length>=8;return[E&&Object(Hr.createElement)("label",{key:"filter-label",htmlFor:_},k),E&&Object(Hr.createElement)("input",{type:"search",id:_,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(Hr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==b?s:c)),!d&&o&&Object(Hr.createElement)(So.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(Hr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(Hr.createElement)("label",{htmlFor:y,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(Hr.createElement)("input",{type:"text",id:y,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(Hr.createElement)(So.TreeSelect,{label:v,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(Hr.createElement)(So.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(Hr.Component),sc=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(O.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(O.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(p.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(f.a)({},n,t))}}})),So.withSpokenMessages,Kr.withInstanceId,Object(So.withFilters)("editor.PostTaxonomyType")])(ac);var uc=Object(Kr.compose)([Object(p.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.taxonomyWrapper,o=void 0===r?O.identity:r,i=Object(O.filter)(n,(function(e){return Object(O.includes)(e.types,t)}));return Object(O.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?sc:Fi;return Object(Hr.createElement)(Hr.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(Hr.createElement)(t,{slug:e.slug}),e))}))}));var lc=Object(Kr.compose)([Object(p.withSelect)((function(e){return{postType:e("core/editor").getCurrentPostType(),taxonomies:e("core").getTaxonomies({per_page:-1})}}))])((function(e){var t=e.postType,n=e.taxonomies,r=e.children;return Object(O.some)(n,(function(e){return Object(O.includes)(e.types,t)}))?r:null})),dc=n(62),pc=n.n(dc),bc=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(Ro.a)(e)),e.stopEditing=e.stopEditing.bind(Object(Ro.a)(e)),e.state={},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"edit",value:function(e){var t=e.target.value;this.props.onChange(t),this.setState({value:t,isDirty:!0})}},{key:"stopEditing",value:function(){this.state.isDirty&&(this.props.onPersist(this.state.value),this.setState({isDirty:!1}))}},{key:"render",value:function(){var e=this.state.value,t=this.props.instanceId;return Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(x.__)("Type text or HTML")),Object(Hr.createElement)(pc.a,{autoComplete:"off",dir:"auto",value:e,onChange:this.edit,onBlur:this.stopEditing,className:"editor-post-text-editor",id:"post-content-".concat(t),placeholder:Object(x.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(Hr.Component),fc=Object(Kr.compose)([Object(p.withSelect)((function(e){return{value:(0,e("core/editor").getEditedPostContent)()}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.resetEditorBlocks;return{onChange:function(e){n({content:e})},onPersist:function(e){var t=Object(c.parse)(e);r(t)}}})),Kr.withInstanceId])(bc),hc=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(Ro.a)(n)),n}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"onSavePermalink",value:function(e){var t=mi(this.state.editedPostName);e.preventDefault(),this.props.onSave(),t!==this.props.postName&&(this.props.editPost({slug:t}),this.setState({editedPostName:t}))}},{key:"render",value:function(){var e=this,t=this.props.permalinkParts,n=t.prefix,r=t.suffix,o=this.state.editedPostName;return Object(Hr.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(Hr.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(Hr.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(Hr.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(x.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(Hr.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),""),Object(Hr.createElement)(So.Button,{className:"editor-post-permalink-editor__save",isSecondary:!0,onClick:this.onSavePermalink},Object(x.__)("Save")))}}]),t}(Hr.Component),mc=Object(Kr.compose)([Object(p.withSelect)((function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}})),Object(p.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])(hc),vc=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(Ro.a)(e)),e.onVisibilityChange=e.onVisibilityChange.bind(Object(Ro.a)(e)),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"addVisibilityCheck",value:function(){window.addEventListener("visibilitychange",this.onVisibilityChange)}},{key:"onVisibilityChange",value:function(){var e=this.props,t=e.isEditable,n=e.refreshPost;t||"visible"!==document.visibilityState||n()}},{key:"componentDidUpdate",value:function(e,t){t.isEditingPermalink&&!this.state.isEditingPermalink&&this.linkElement.focus()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("visibilitychange",this.addVisibilityCheck)}},{key:"render",value:function(){var e=this,t=this.props,n=t.isEditable,r=t.isNew,o=t.isPublished,i=t.isViewable,c=t.permalinkParts,a=t.postLink,s=t.postSlug,u=t.postID,l=t.postTitle;if(r||!i||!c||!a)return null;var d=this.state,p=d.isCopied,b=d.isEditingPermalink,f=p?Object(x.__)("Permalink copied"):Object(x.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=Object(yt.safeDecodeURIComponent)(s)||mi(l)||u,O=n?h+v+m:h;return Object(Hr.createElement)("div",{className:"editor-post-permalink"},Object(Hr.createElement)(So.ClipboardButton,{className:so()("editor-post-permalink__copy",{"is-copied":p}),text:O,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(Hr.createElement)("span",{className:"editor-post-permalink__label"},Object(x.__)("Permalink:")),!b&&Object(Hr.createElement)(So.ExternalLink,{className:"editor-post-permalink__link",href:o?O:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(yt.safeDecodeURI)(O),""),b&&Object(Hr.createElement)(mc,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(Hr.createElement)(So.Button,{className:"editor-post-permalink__edit",isSecondary:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(x.__)("Edit")))}}]),t}(Hr.Component),Oc=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.isPermalinkEditable,o=t.getCurrentPost,i=t.getPermalinkParts,c=t.getEditedPostAttribute,a=t.isCurrentPostPublished,s=e("core").getPostType,u=o(),l=u.id,d=u.link,p=s(c("type"));return{isNew:n(),postLink:d,permalinkParts:i(),postSlug:c("slug"),isEditable:r(),isPublished:a(),postTitle:c("title"),postID:l,isViewable:Object(O.get)(p,["viewable"],!1)}})),Object(p.withDispatch)((function(e){return{refreshPost:e("core/editor").refreshPost}}))])(vc),gc=/[\r\n]+/g,jc=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(Ro.a)(e)),e.onSelect=e.onSelect.bind(Object(Ro.a)(e)),e.onUnselect=e.onUnselect.bind(Object(Ro.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(Ro.a)(e)),e.state={isSelected:!1},e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"handleFocusOutside",value:function(){this.onUnselect()}},{key:"onSelect",value:function(){this.setState({isSelected:!0}),this.props.clearSelectedBlock()}},{key:"onUnselect",value:function(){this.setState({isSelected:!1})}},{key:"onChange",value:function(e){var t=e.target.value.replace(gc," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===Eo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"render",value:function(){var e=this.props,t=e.hasFixedToolbar,n=e.isCleanNewPost,r=e.isFocusMode,o=e.isPostTypeViewable,i=e.instanceId,c=e.placeholder,a=e.title,s=this.state.isSelected,u=so()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),l=Object(Yo.decodeEntities)(c);return Object(Hr.createElement)(Vo,{supportKeys:"title"},Object(Hr.createElement)("div",{className:"editor-post-title"},Object(Hr.createElement)("div",{className:u},Object(Hr.createElement)("div",null,Object(Hr.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(x.__)("Add title")),Object(Hr.createElement)(pc.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:Object(Yo.decodeEntities)(a),onChange:this.onChange,placeholder:l||Object(x.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:document.body===document.activeElement&&n})),s&&o&&Object(Hr.createElement)(Oc,null))))}}]),t}(Hr.Component),yc=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=e("core/block-editor").getSettings,i=(0,e("core").getPostType)(n("type")),c=o(),a=c.titlePlaceholder,s=c.focusMode,u=c.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),isPostTypeViewable:Object(O.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:u}})),_c=Object(p.withDispatch)((function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=e("core/editor").editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){o({title:Object(O.escape)(e)})},clearSelectedBlock:r}})),kc=Object(Kr.compose)(yc,_c,Kr.withInstanceId,So.withFocusOutside)(jc);var Sc=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType;return{isNew:n(),postId:r(),postType:o()}})),Object(p.withDispatch)((function(e){return{trashPost:e("core/editor").trashPost}}))])((function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(Wr.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(Hr.createElement)(So.Button,{className:"editor-post-trash is-link",onClick:function(){return o.trashPost(n,r)}},Object(x.__)("Move to Trash"))}));var Ec=Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId;return{isNew:n(),postId:r()}}))((function(e){var t=e.isNew,n=e.postId,r=e.children;return t||!n?null:r}));var Pc=Object(Kr.compose)([Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(O.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),wc=n(97);var Cc=Object(p.withSelect)((function(e){return{content:e("core/editor").getEditedPostAttribute("content")}}))((function(e){var t=e.content,n=Object(x._x)("words","Word count type. Do not translate!");return Object(Hr.createElement)("span",{className:"word-count"},Object(wc.count)(t,n))}));var Tc=Object(p.withSelect)((function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}))((function(e){var t=e.headingCount,n=e.paragraphCount,r=e.numberOfBlocks,o=e.hasOutlineItemsDisabled,i=e.onRequestClose;return(Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(x.__)("Document Statistics"),tabIndex:"0"},Object(Hr.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(Hr.createElement)("li",{className:"table-of-contents__count"},Object(x.__)("Words"),Object(Hr.createElement)(Cc,null)),Object(Hr.createElement)("li",{className:"table-of-contents__count"},Object(x.__)("Headings"),Object(Hr.createElement)("span",{className:"table-of-contents__number"},t)),Object(Hr.createElement)("li",{className:"table-of-contents__count"},Object(x.__)("Paragraphs"),Object(Hr.createElement)("span",{className:"table-of-contents__number"},n)),Object(Hr.createElement)("li",{className:"table-of-contents__count"},Object(x.__)("Blocks"),Object(Hr.createElement)("span",{className:"table-of-contents__number"},r)))),t>0&&Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)("hr",null),Object(Hr.createElement)("h2",{className:"table-of-contents__title"},Object(x.__)("Document Outline")),Object(Hr.createElement)(mo,{onSelect:i,hasOutlineItemsDisabled:o}))))}));var Bc=Object(p.withSelect)((function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}}))((function(e){var t=e.hasBlocks,n=e.hasOutlineItemsDisabled;return Object(Hr.createElement)(So.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(Hr.createElement)(So.Button,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(x.__)("Content structure"),tooltipPosition:"bottom","aria-disabled":!t})},renderContent:function(e){var t=e.onClose;return Object(Hr.createElement)(Tc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})})),xc=function(e){function t(){var e;return Object(eo.a)(this,t),(e=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(Ro.a)(e)),e}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"componentDidMount",value:function(){window.addEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.warnIfUnsavedChanges)}},{key:"warnIfUnsavedChanges",value:function(e){if((0,this.props.isEditedPostDirty)())return e.returnValue=Object(x.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(Hr.Component),Ic=Object(p.withSelect)((function(e){return{isEditedPostDirty:e("core/editor").isEditedPostDirty}}))(xc),Ac=Object(Kr.createHigherOrderComponent)((function(e){return Object(p.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(Wr.a)(t,["useSubRegistry","registry"]);if(!r)return Object(Hr.createElement)(e,c);var a=Object(Hr.useState)(null),s=Object(Ot.a)(a,2),u=s[0],l=s[1];return Object(Hr.useEffect)((function(){var e=Object(p.createRegistry)({"core/block-editor":i.storeConfig},o),t=e.registerStore("core/editor",Mr);Nr(t),l(e)}),[o]),u?Object(Hr.createElement)(p.RegistryProvider,{value:u},Object(Hr.createElement)(e,c)):null}))}),"withRegistryProvider"),Rc=n(99),Lc=function(e){var t=e.additionalData,n=void 0===t?{}:t,r=e.allowedTypes,o=e.filesList,i=e.maxUploadFileSize,c=e.onError,a=void 0===c?O.noop:c,s=e.onFileChange,u=Object(p.select)("core/editor"),l=u.getCurrentPostId,b=u.getEditorSettings,f=b().allowedMimeTypes;i=i||b().maxUploadFileSize,Object(Rc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Object(d.a)({post:l()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:f})};var Nc=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,i=r.canInsertBlockType,a=e("core/editor").__experimentalGetReusableBlock,s=e("core").canUser,u=o(n),l=1===u.length&&u[0]&&Object(c.isReusableBlock)(u[0])&&!!a(u[0].attributes.ref);return{isReusable:l,isVisible:l||i("core/block")&&Object(O.every)(u,(function(e){return!!e&&e.isValid&&Object(c.hasBlockSupport)(e.name,"reusable",!0)}))&&!!s("create","blocks")}})),Object(p.withDispatch)((function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?O.noop:r,i=e("core/editor"),c=i.__experimentalConvertBlockToReusable,a=i.__experimentalConvertBlockToStatic;return{onConvertToStatic:function(){1===n.length&&(a(n[0]),o())},onConvertToReusable:function(){c(n),o()}}}))])((function(e){var t=e.isVisible,n=e.isReusable,r=e.onConvertToStatic,o=e.onConvertToReusable;return t?Object(Hr.createElement)(Hr.Fragment,null,!n&&Object(Hr.createElement)(So.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(x.__)("Add to Reusable blocks")),n&&Object(Hr.createElement)(So.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(x.__)("Convert to Regular Block"))):null}));var Dc=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.clientId,r=e("core/block-editor").getBlock,o=e("core").canUser,i=e("core/editor").__experimentalGetReusableBlock,a=r(n),s=a&&Object(c.isReusableBlock)(a)?i(a.attributes.ref):null;return{isVisible:!!s&&!!o("delete","blocks",s.id),isDisabled:s&&s.isTemporary}})),Object(p.withDispatch)((function(e,t,n){var r=t.clientId,o=t.onToggle,i=void 0===o?O.noop:o,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,s=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(x.__)("Are you sure you want to delete this Reusable Block?\n\nIt will be permanently removed from all posts and pages that use it."))){var e=s(r);a(e.attributes.ref),i()}}}}))])((function(e){var t=e.isVisible,n=e.isDisabled,r=e.onDelete;return t?Object(Hr.createElement)(So.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return r()}},Object(x.__)("Remove from Reusable blocks")):null}));var Uc=Object(p.withSelect)((function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}}))((function(e){var t=e.clientIds;return Object(Hr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,(function(e){var n=e.onClose;return Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(Nc,{clientIds:t,onToggle:n}),1===t.length&&Object(Hr.createElement)(Dc,{clientId:t[0],onToggle:n}))}))})),Fc=Object(Hr.createElement)(So.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(Hr.createElement)(So.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8 5a1 1 0 0 0-1 1v3H6a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1v-3h1a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H8zm3 6H7v2h4v-2zM9 9V7h4v2H9z"}),Object(Hr.createElement)(So.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1 3a2 2 0 0 0 1 1.732v10.536A2 2 0 1 0 4.732 18h10.536A2 2 0 1 0 18 15.268V4.732A2 2 0 1 0 15.268 2H4.732A2 2 0 0 0 1 3zm14.268 1H4.732A2.01 2.01 0 0 1 4 4.732v10.536c.304.175.557.428.732.732h10.536a2.01 2.01 0 0 1 .732-.732V4.732A2.01 2.01 0 0 1 15.268 4z"})),Mc=Object(Hr.createElement)(So.Icon,{icon:Fc}),Vc=Object(Hr.createElement)(So.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(Hr.createElement)(So.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M9 2H15C16.1 2 17 2.9 17 4V7C17 8.1 16.1 9 15 9H9C7.9 9 7 8.1 7 7V4C7 2.9 7.9 2 9 2ZM9 7H15V4H9V7Z"}),Object(Hr.createElement)(So.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M5 11H11C12.1 11 13 11.9 13 13V16C13 17.1 12.1 18 11 18H5C3.9 18 3 17.1 3 16V13C3 11.9 3.9 11 5 11ZM5 16H11V13H5V16Z"})),zc=Object(Hr.createElement)(So.Icon,{icon:Vc});var Wc=Object(Kr.compose)([Object(p.withSelect)((function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlockRootClientId,i=r.getBlocksByClientId,c=r.canInsertBlockType,a=(0,e("core/blocks").getGroupingBlockName)(),s=c(a,n&&n.length>0?o(n[0]):void 0),u=i(n),l=1===u.length&&u[0]&&u[0].name===a;return{isGroupable:s&&u.length&&!l,isUngroupable:l&&!!u[0].innerBlocks.length,blocksSelection:u,groupingBlockName:a}})),Object(p.withDispatch)((function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?O.noop:r,i=t.blocksSelection,a=void 0===i?[]:i,s=t.groupingBlockName,u=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){if(a.length){var e=Object(c.switchToBlockType)(a,s);e&&u(n,e),o()}},onConvertFromGroup:function(){if(a.length){var e=a[0].innerBlocks;e.length&&(u(n,e),o())}}}}))])((function(e){var t=e.onConvertToGroup,n=e.onConvertFromGroup,r=e.isGroupable,o=void 0!==r&&r,i=e.isUngroupable,c=void 0!==i&&i;return Object(Hr.createElement)(Hr.Fragment,null,o&&Object(Hr.createElement)(So.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:Mc,onClick:t},Object(x._x)("Group","verb")),c&&Object(Hr.createElement)(So.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:zc,onClick:n},Object(x._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))}));var Hc=Object(p.withSelect)((function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}}))((function(e){var t=e.clientIds;return Object(Hr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,(function(e){var n=e.onClose;return Object(Hr.createElement)(Hr.Fragment,null,Object(Hr.createElement)(Wc,{clientIds:t,onToggle:n}))}))})),Kc=function(){var e=Object(C.a)(w.a.mark((function e(t){var n;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B()({path:Object(yt.addQueryArgs)("/wp/v2/search",{search:t,per_page:20,type:"post"})});case 2:return n=e.sent,e.abrupt("return",Object(O.map)(n,(function(e){return{id:e.id,url:e.url,title:Object(Yo.decodeEntities)(e.title)||Object(x.__)("(no title)"),type:e.subtype||e.type}})));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Gc=function(e){function t(e){var n;return Object(eo.a)(this,t),(n=Object(no.a)(this,Object(ro.a)(t).apply(this,arguments))).getBlockEditorSettings=G()(n.getBlockEditorSettings,{maxSize:1}),e.recovery?Object(no.a)(n):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(x.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(x.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(oo.a)(t,e),Object(to.a)(t,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o){return Object(d.a)({},Object(O.pick)(e,["alignWide","allowedBlockTypes","__experimentalPreferredStyleVariations","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","template","templateLock","titlePlaceholder","onUpdateDefaultBlockStyles","__experimentalEnableLegacyWidgetBlock","__experimentalBlockDirectory","__experimentalEnableFullSiteEditing","__experimentalEnableFullSiteEditingDemo","__experimentalEnablePageTemplates","showInserterHelpPanel","gradients"]),{mediaUpload:r?Lc:void 0,__experimentalReusableBlocks:t,__experimentalFetchReusableBlocks:n,__experimentalFetchLinkSuggestions:Kc,__experimentalCanUserUseUnfilteredHTML:o})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var e=Object(i.transformStyles)(this.props.settings.styles,".editor-styles-wrapper");Object(O.map)(e,(function(e){if(e){var t=document.createElement("style");t.innerHTML=e,document.body.appendChild(t)}}))}}},{key:"componentDidUpdate",value:function(e){this.props.settings!==e.settings&&this.props.updateEditorSettings(this.props.settings)}},{key:"componentWillUnmount",value:function(){this.props.tearDownEditor()}},{key:"render",value:function(){var e=this.props,t=e.canUserUseUnfilteredHTML,n=e.children,r=e.post,o=e.blocks,c=e.resetEditorBlocks,s=e.selectionStart,u=e.selectionEnd,l=e.isReady,d=e.settings,p=e.reusableBlocks,b=e.resetEditorBlocksWithoutUndoLevel,f=e.hasUploadPermissions,h=e.__experimentalFetchReusableBlocks;if(!l)return null;var m=this.getBlockEditorSettings(d,p,h,f,t);return Object(Hr.createElement)(a.EntityProvider,{kind:"root",type:"site"},Object(Hr.createElement)(a.EntityProvider,{kind:"postType",type:r.type,id:r.id},Object(Hr.createElement)(i.BlockEditorProvider,{value:o,onInput:b,onChange:c,selectionStart:s,selectionEnd:u,settings:m,useSubRegistry:!1},n,Object(Hr.createElement)(Uc,null),Object(Hr.createElement)(Hc,null))))}}]),t}(Hr.Component),qc=Object(Kr.compose)([Ac,Object(p.withSelect)((function(e){var t=e("core/editor"),n=t.canUserUseUnfilteredHTML,r=t.__unstableIsEditorReady,o=t.getEditorBlocks,i=t.getEditorSelectionStart,c=t.getEditorSelectionEnd,a=t.__experimentalGetReusableBlocks,s=e("core").canUser;return{canUserUseUnfilteredHTML:n(),isReady:r(),blocks:o(),selectionStart:i(),selectionEnd:c(),reusableBlocks:a(),hasUploadPermissions:Object(O.defaultTo)(s("create","media"),!0)}})),Object(p.withDispatch)((function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.updateEditorSettings,c=t.__experimentalFetchReusableBlocks,a=t.__experimentalTearDownEditor;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:i,resetEditorBlocksWithoutUndoLevel:function(e,t){o(e,Object(d.a)({},t,{__unstableShouldCreateUndoLevel:!1}))},tearDownEditor:a,__experimentalFetchReusableBlocks:c}}))])(Gc),Qc=n(60),Yc=n.n(Qc);function Xc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(Hr.forwardRef)((function(n,r){return R()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(Hr.createElement)(t,Object(zr.a)({ref:r},n))}));return n.forEach((function(n){r[n]=Xc(e+"."+n,t[n])})),r}function Zc(e,t){return function(){return R()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Jc=Xc("RichText",i.RichText,["Content"]);Jc.isEmpty=Zc("RichText.isEmpty",i.RichText.isEmpty);var $c=Xc("Autocomplete",i.Autocomplete),ea=Xc("AlignmentToolbar",i.AlignmentToolbar),ta=Xc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),na=Xc("BlockControls",i.BlockControls,["Slot"]),ra=Xc("BlockEdit",i.BlockEdit),oa=Xc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),ia=Xc("BlockFormatControls",i.BlockFormatControls,["Slot"]),ca=Xc("BlockIcon",i.BlockIcon),aa=Xc("BlockInspector",i.BlockInspector),sa=Xc("BlockList",i.BlockList),ua=Xc("BlockMover",i.BlockMover),la=Xc("BlockNavigationDropdown",i.BlockNavigationDropdown),da=Xc("BlockSelectionClearer",i.BlockSelectionClearer),pa=Xc("BlockSettingsMenu",i.BlockSettingsMenu),ba=Xc("BlockTitle",i.BlockTitle),fa=Xc("BlockToolbar",i.BlockToolbar),ha=Xc("ColorPalette",i.ColorPalette),ma=Xc("ContrastChecker",i.ContrastChecker),va=Xc("CopyHandler",i.CopyHandler),Oa=Xc("DefaultBlockAppender",i.DefaultBlockAppender),ga=Xc("FontSizePicker",i.FontSizePicker),ja=Xc("Inserter",i.Inserter),ya=Xc("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),_a=Xc("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),ka=Xc("InspectorControls",i.InspectorControls,["Slot"]),Sa=Xc("PanelColorSettings",i.PanelColorSettings),Ea=Xc("PlainText",i.PlainText),Pa=Xc("RichTextShortcut",i.RichTextShortcut),wa=Xc("RichTextToolbarButton",i.RichTextToolbarButton),Ca=Xc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),Ta=Xc("MediaPlaceholder",i.MediaPlaceholder),Ba=Xc("MediaUpload",i.MediaUpload),xa=Xc("MediaUploadCheck",i.MediaUploadCheck),Ia=Xc("MultiBlocksSwitcher",i.MultiBlocksSwitcher),Aa=Xc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),Ra=Xc("NavigableToolbar",i.NavigableToolbar),La=Xc("ObserveTyping",i.ObserveTyping),Na=Xc("PreserveScrollInReorder",i.PreserveScrollInReorder),Da=Xc("SkipToSelectedBlock",i.SkipToSelectedBlock),Ua=Xc("URLInput",i.URLInput),Fa=Xc("URLInputButton",i.URLInputButton),Ma=Xc("URLPopover",i.URLPopover),Va=Xc("Warning",i.Warning),za=Xc("WritingFlow",i.WritingFlow),Wa=Zc("createCustomColorsHOC",i.createCustomColorsHOC),Ha=Zc("getColorClassName",i.getColorClassName),Ka=Zc("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Ga=Zc("getColorObjectByColorValue",i.getColorObjectByColorValue),qa=Zc("getFontSize",i.getFontSize),Qa=Zc("getFontSizeClass",i.getFontSizeClass),Ya=Zc("withColorContext",i.withColorContext),Xa=Zc("withColors",i.withColors),Za=Zc("withFontSizes",i.withFontSizes);Object(Gr.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return e.push(Object(O.clone)($r)),t===Object(c.getDefaultBlockName)()&&e.push(Object(O.clone)(Jr)),e})),n.d(t,"AutosaveMonitor",(function(){return co})),n.d(t,"DocumentOutline",(function(){return mo})),n.d(t,"DocumentOutlineCheck",(function(){return vo})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return jo})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return yo})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return _o})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return ko})),n.d(t,"EditorHistoryRedo",(function(){return Po})),n.d(t,"EditorHistoryUndo",(function(){return wo})),n.d(t,"EditorNotices",(function(){return To})),n.d(t,"EntitiesSavedStates",(function(){return Ao})),n.d(t,"ErrorBoundary",(function(){return Lo})),n.d(t,"LocalAutosaveMonitor",(function(){return Fo})),n.d(t,"PageAttributesCheck",(function(){return Mo})),n.d(t,"PageAttributesOrder",(function(){return Wo})),n.d(t,"PageAttributesParent",(function(){return qo})),n.d(t,"PageTemplate",(function(){return Qo})),n.d(t,"PostAuthor",(function(){return Jo})),n.d(t,"PostAuthorCheck",(function(){return Xo})),n.d(t,"PostComments",(function(){return $o})),n.d(t,"PostExcerpt",(function(){return ei})),n.d(t,"PostExcerptCheck",(function(){return ti})),n.d(t,"PostFeaturedImage",(function(){return li})),n.d(t,"PostFeaturedImageCheck",(function(){return ri})),n.d(t,"PostFormat",(function(){return bi})),n.d(t,"PostFormatCheck",(function(){return di})),n.d(t,"PostLastRevision",(function(){return vi})),n.d(t,"PostLastRevisionCheck",(function(){return fi})),n.d(t,"PostLockedModal",(function(){return yi})),n.d(t,"PostPendingStatus",(function(){return ki})),n.d(t,"PostPendingStatusCheck",(function(){return _i})),n.d(t,"PostPingbacks",(function(){return Si})),n.d(t,"PostPreviewButton",(function(){return gi})),n.d(t,"PostPublishButton",(function(){return wi})),n.d(t,"PostPublishButtonLabel",(function(){return Ei})),n.d(t,"PostPublishPanel",(function(){return Xi})),n.d(t,"PostSavedState",(function(){return $i})),n.d(t,"PostSchedule",(function(){return Ii})),n.d(t,"PostScheduleCheck",(function(){return ec})),n.d(t,"PostScheduleLabel",(function(){return Ai})),n.d(t,"PostSlug",(function(){return rc})),n.d(t,"PostSlugCheck",(function(){return tc})),n.d(t,"PostSticky",(function(){return ic})),n.d(t,"PostStickyCheck",(function(){return oc})),n.d(t,"PostSwitchToDraftButton",(function(){return Zi})),n.d(t,"PostTaxonomies",(function(){return uc})),n.d(t,"PostTaxonomiesCheck",(function(){return lc})),n.d(t,"PostTextEditor",(function(){return fc})),n.d(t,"PostTitle",(function(){return kc})),n.d(t,"PostTrash",(function(){return Sc})),n.d(t,"PostTrashCheck",(function(){return Ec})),n.d(t,"PostTypeSupportCheck",(function(){return Vo})),n.d(t,"PostVisibility",(function(){return Bi})),n.d(t,"PostVisibilityLabel",(function(){return xi})),n.d(t,"PostVisibilityCheck",(function(){return Pc})),n.d(t,"TableOfContents",(function(){return Bc})),n.d(t,"UnsavedChangesWarning",(function(){return Ic})),n.d(t,"WordCount",(function(){return Cc})),n.d(t,"EditorProvider",(function(){return qc})),n.d(t,"blockAutocompleter",(function(){return Jr})),n.d(t,"userAutocompleter",(function(){return $r})),n.d(t,"ServerSideRender",(function(){return Yc.a})),n.d(t,"RichText",(function(){return Jc})),n.d(t,"Autocomplete",(function(){return $c})),n.d(t,"AlignmentToolbar",(function(){return ea})),n.d(t,"BlockAlignmentToolbar",(function(){return ta})),n.d(t,"BlockControls",(function(){return na})),n.d(t,"BlockEdit",(function(){return ra})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return oa})),n.d(t,"BlockFormatControls",(function(){return ia})),n.d(t,"BlockIcon",(function(){return ca})),n.d(t,"BlockInspector",(function(){return aa})),n.d(t,"BlockList",(function(){return sa})),n.d(t,"BlockMover",(function(){return ua})),n.d(t,"BlockNavigationDropdown",(function(){return la})),n.d(t,"BlockSelectionClearer",(function(){return da})),n.d(t,"BlockSettingsMenu",(function(){return pa})),n.d(t,"BlockTitle",(function(){return ba})),n.d(t,"BlockToolbar",(function(){return fa})),n.d(t,"ColorPalette",(function(){return ha})),n.d(t,"ContrastChecker",(function(){return ma})),n.d(t,"CopyHandler",(function(){return va})),n.d(t,"DefaultBlockAppender",(function(){return Oa})),n.d(t,"FontSizePicker",(function(){return ga})),n.d(t,"Inserter",(function(){return ja})),n.d(t,"InnerBlocks",(function(){return ya})),n.d(t,"InspectorAdvancedControls",(function(){return _a})),n.d(t,"InspectorControls",(function(){return ka})),n.d(t,"PanelColorSettings",(function(){return Sa})),n.d(t,"PlainText",(function(){return Ea})),n.d(t,"RichTextShortcut",(function(){return Pa})),n.d(t,"RichTextToolbarButton",(function(){return wa})),n.d(t,"__unstableRichTextInputEvent",(function(){return Ca})),n.d(t,"MediaPlaceholder",(function(){return Ta})),n.d(t,"MediaUpload",(function(){return Ba})),n.d(t,"MediaUploadCheck",(function(){return xa})),n.d(t,"MultiBlocksSwitcher",(function(){return Ia})),n.d(t,"MultiSelectScrollIntoView",(function(){return Aa})),n.d(t,"NavigableToolbar",(function(){return Ra})),n.d(t,"ObserveTyping",(function(){return La})),n.d(t,"PreserveScrollInReorder",(function(){return Na})),n.d(t,"SkipToSelectedBlock",(function(){return Da})),n.d(t,"URLInput",(function(){return Ua})),n.d(t,"URLInputButton",(function(){return Fa})),n.d(t,"URLPopover",(function(){return Ma})),n.d(t,"Warning",(function(){return Va})),n.d(t,"WritingFlow",(function(){return za})),n.d(t,"createCustomColorsHOC",(function(){return Wa})),n.d(t,"getColorClassName",(function(){return Ha})),n.d(t,"getColorObjectByAttributeValues",(function(){return Ka})),n.d(t,"getColorObjectByColorValue",(function(){return Ga})),n.d(t,"getFontSize",(function(){return qa})),n.d(t,"getFontSizeClass",(function(){return Qa})),n.d(t,"withColorContext",(function(){return Ya})),n.d(t,"withColors",(function(){return Xa})),n.d(t,"withFontSizes",(function(){return Za})),n.d(t,"mediaUpload",(function(){return Lc})),n.d(t,"cleanForSlug",(function(){return mi})),n.d(t,"storeConfig",(function(){return Mr})),n.d(t,"transformStyles",(function(){return i.transformStyles}))},38:function(e,t){!function(){e.exports=this.wp.apiFetch}()},39:function(e,t){!function(){e.exports=this.wp.dataControls}()},4:function(e,t){!function(){e.exports=this.wp.data}()},40:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},42:function(e,t,n){e.exports=function(e,t){var n,r,o,i=0;function c(){var t,c,a=r,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(c=0;c<s;c++)if(a.args[c]!==arguments[c]){a=a.next;continue e}return a!==r&&(a===o&&(o=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(t=new Array(s),c=0;c<s;c++)t[c]=arguments[c];return a={args:t,val:e.apply(null,t)},r?(r.prev=a,a.next=r):o=a,i===n?(o=o.prev).next=null:i++,r=a,a.val}return t&&t.maxSize&&(n=t.maxSize),c.clear=function(){r=null,o=null,i=0},c}},43:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},44:function(e,t,n){"use strict";function r(e,t,n,r,o,i,c){try{var a=e[i](c),s=a.value}catch(e){return void n(e)}a.done?t(s):Promise.resolve(s).then(r,o)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(o,i){var c=e.apply(t,n);function a(e){r(c,o,i,a,s,"next",e)}function s(e){r(c,o,i,a,s,"throw",e)}a(void 0)}))}}n.d(t,"a",(function(){return o}))},5:function(e,t){!function(){e.exports=this.wp.blockEditor}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},54:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},55:function(e,t){!function(){e.exports=this.wp.date}()},57:function(e,t,n){"use strict";function r(e){return(r="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)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){var n=e._map,r=e._arrayTreeMap,o=e._objectTreeMap;if(n.has(t))return n.get(t);for(var i=Object.keys(t).sort(),c=Array.isArray(t)?r:o,a=0;a<i.length;a++){var s=i[a];if(void 0===(c=c.get(s)))return;var u=t[s];if(void 0===(c=c.get(u)))return}var l=c.get("_ekm_value");return l?(n.delete(l[0]),l[0]=t,c.set("_ekm_value",l),n.set(t,l),l):void 0}var c=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.clear(),t instanceof e){var n=[];t.forEach((function(e,t){n.push([t,e])})),t=n}if(null!=t)for(var r=0;r<t.length;r++)this.set(t[r][0],t[r][1])}var t,n,c;return t=e,(n=[{key:"set",value:function(t,n){if(null===t||"object"!==r(t))return this._map.set(t,n),this;for(var o=Object.keys(t).sort(),i=[t,n],c=Array.isArray(t)?this._arrayTreeMap:this._objectTreeMap,a=0;a<o.length;a++){var s=o[a];c.has(s)||c.set(s,new e),c=c.get(s);var u=t[s];c.has(u)||c.set(u,new e),c=c.get(u)}var l=c.get("_ekm_value");return l&&this._map.delete(l[0]),c.set("_ekm_value",i),this._map.set(t,i),this}},{key:"get",value:function(e){if(null===e||"object"!==r(e))return this._map.get(e);var t=i(this,e);return t?t[1]:void 0}},{key:"has",value:function(e){return null===e||"object"!==r(e)?this._map.has(e):void 0!==i(this,e)}},{key:"delete",value:function(e){return!!this.has(e)&&(this.set(e,void 0),!0)}},{key:"forEach",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this;this._map.forEach((function(o,i){null!==i&&"object"===r(i)&&(o=o[1]),e.call(n,o,i,t)}))}},{key:"clear",value:function(){this._map=new Map,this._arrayTreeMap=new Map,this._objectTreeMap=new Map}},{key:"size",get:function(){return this._map.size}}])&&o(t.prototype,n),c&&o(t,c),e}();e.exports=c},6:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(9);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},60:function(e,t){!function(){e.exports=this.wp.serverSideRender}()},62:function(e,t,n){"use strict";t.__esModule=!0;var r=n(114);t.default=r.default},64:function(e,t){!function(){e.exports=this.wp.coreData}()},7:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},70:function(e,t){!function(){e.exports=this.wp.autop}()},72:function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var r;if(Array.isArray(n))for(r=0;r<n.length;r++)e(t,n[r]);else for(r in n)t[r]=(t[r]||[]).concat(n[r])}(n,e),(t=function(e){return function(t){return function(r){var o,i,c=n[r.type],a=t(r);if(c)for(o=0;o<c.length;o++)(i=c[o](r,e))&&e.dispatch(i);return a}}}).effects=n,t}},8:function(e,t){!function(){e.exports=this.wp.compose}()},86:function(e,t,n){e.exports=n(346)},89:function(e,t,n){"use strict";var r=n(90);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},9:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},90:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},97:function(e,t){!function(){e.exports=this.wp.wordcount}()},99:function(e,t){!function(){e.exports=this.wp.mediaUtils}()}});