Gutenberg - Version 5.9.1

Version Description

Download this release

Release Info

Developer gziolo
Plugin Icon 128x128 Gutenberg
Version 5.9.1
Comparing to
See all releases

Code changes from version 5.9.0 to 5.9.1

Files changed (4) hide show
  1. build/editor/index.js +1 -1
  2. changelog.txt +6 -0
  3. gutenberg.php +3 -3
  4. readme.txt +9 -1
build/editor/index.js CHANGED
@@ -14,4 +14,4 @@ this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])re
14
  Licensed under the MIT License (MIT), see
15
  http://jedwatson.github.io/classnames
16
  */
17
- !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))e.push(o.apply(null,r));else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},17: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})},18:function(e,t,n){"use strict";var r=n(30);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){!function(){e.exports=this.wp.richText}()},21:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(38);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}},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},225:function(e,t,n){"use strict";n.r(t);var r={};n.d(r,"setupEditor",function(){return ie}),n.d(r,"resetPost",function(){return ce}),n.d(r,"resetAutosave",function(){return ae}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return se}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return ue}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return le}),n.d(r,"updatePost",function(){return de}),n.d(r,"setupEditorState",function(){return pe}),n.d(r,"editPost",function(){return be}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return fe}),n.d(r,"savePost",function(){return he}),n.d(r,"refreshPost",function(){return me}),n.d(r,"trashPost",function(){return ve}),n.d(r,"autosave",function(){return Oe}),n.d(r,"redo",function(){return ge}),n.d(r,"undo",function(){return je}),n.d(r,"createUndoLevel",function(){return _e}),n.d(r,"updatePostLock",function(){return ye}),n.d(r,"__experimentalFetchReusableBlocks",function(){return ke}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Ee}),n.d(r,"__experimentalSaveReusableBlock",function(){return Se}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Pe}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return we}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Ce}),n.d(r,"__experimentalConvertBlockToReusable",function(){return Te}),n.d(r,"enablePublishSidebar",function(){return Be}),n.d(r,"disablePublishSidebar",function(){return xe}),n.d(r,"lockPostSaving",function(){return Ie}),n.d(r,"unlockPostSaving",function(){return Ae}),n.d(r,"resetEditorBlocks",function(){return Re}),n.d(r,"updateEditorSettings",function(){return Le}),n.d(r,"resetBlocks",function(){return De}),n.d(r,"receiveBlocks",function(){return Ne}),n.d(r,"updateBlock",function(){return Fe}),n.d(r,"updateBlockAttributes",function(){return Me}),n.d(r,"selectBlock",function(){return Ve}),n.d(r,"startMultiSelect",function(){return ze}),n.d(r,"stopMultiSelect",function(){return Ke}),n.d(r,"multiSelect",function(){return He}),n.d(r,"clearSelectedBlock",function(){return We}),n.d(r,"toggleSelection",function(){return qe}),n.d(r,"replaceBlocks",function(){return Ge}),n.d(r,"replaceBlock",function(){return Qe}),n.d(r,"moveBlocksDown",function(){return Ye}),n.d(r,"moveBlocksUp",function(){return Xe}),n.d(r,"moveBlockToPosition",function(){return Ze}),n.d(r,"insertBlock",function(){return Je}),n.d(r,"insertBlocks",function(){return $e}),n.d(r,"showInsertionPoint",function(){return et}),n.d(r,"hideInsertionPoint",function(){return tt}),n.d(r,"setTemplateValidity",function(){return nt}),n.d(r,"synchronizeTemplate",function(){return rt}),n.d(r,"mergeBlocks",function(){return ot}),n.d(r,"removeBlocks",function(){return it}),n.d(r,"removeBlock",function(){return ct}),n.d(r,"toggleBlockMode",function(){return at}),n.d(r,"startTyping",function(){return st}),n.d(r,"stopTyping",function(){return ut}),n.d(r,"enterFormattedText",function(){return lt}),n.d(r,"exitFormattedText",function(){return dt}),n.d(r,"insertDefaultBlock",function(){return pt}),n.d(r,"updateBlockListSettings",function(){return bt});var o={};n.d(o,"hasEditorUndo",function(){return gt}),n.d(o,"hasEditorRedo",function(){return jt}),n.d(o,"isEditedPostNew",function(){return _t}),n.d(o,"hasChangedContent",function(){return yt}),n.d(o,"isEditedPostDirty",function(){return kt}),n.d(o,"isCleanNewPost",function(){return Et}),n.d(o,"getCurrentPost",function(){return St}),n.d(o,"getCurrentPostType",function(){return Pt}),n.d(o,"getCurrentPostId",function(){return wt}),n.d(o,"getCurrentPostRevisionsCount",function(){return Ct}),n.d(o,"getCurrentPostLastRevisionId",function(){return Tt}),n.d(o,"getPostEdits",function(){return Bt}),n.d(o,"getReferenceByDistinctEdits",function(){return xt}),n.d(o,"getCurrentPostAttribute",function(){return It}),n.d(o,"getEditedPostAttribute",function(){return Rt}),n.d(o,"getAutosaveAttribute",function(){return Lt}),n.d(o,"getEditedPostVisibility",function(){return Ut}),n.d(o,"isCurrentPostPending",function(){return Dt}),n.d(o,"isCurrentPostPublished",function(){return Nt}),n.d(o,"isCurrentPostScheduled",function(){return Ft}),n.d(o,"isEditedPostPublishable",function(){return Mt}),n.d(o,"isEditedPostSaveable",function(){return Vt}),n.d(o,"isEditedPostEmpty",function(){return zt}),n.d(o,"isEditedPostAutosaveable",function(){return Kt}),n.d(o,"getAutosave",function(){return Ht}),n.d(o,"hasAutosave",function(){return Wt}),n.d(o,"isEditedPostBeingScheduled",function(){return qt}),n.d(o,"isEditedPostDateFloating",function(){return Gt}),n.d(o,"isSavingPost",function(){return Qt}),n.d(o,"didPostSaveRequestSucceed",function(){return Yt}),n.d(o,"didPostSaveRequestFail",function(){return Xt}),n.d(o,"isAutosavingPost",function(){return Zt}),n.d(o,"isPreviewingPost",function(){return Jt}),n.d(o,"getEditedPostPreviewLink",function(){return $t}),n.d(o,"getSuggestedPostFormat",function(){return en}),n.d(o,"getBlocksForSerialization",function(){return tn}),n.d(o,"getEditedPostContent",function(){return nn}),n.d(o,"__experimentalGetReusableBlock",function(){return rn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return on}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return cn}),n.d(o,"__experimentalGetReusableBlocks",function(){return an}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return sn}),n.d(o,"isPublishingPost",function(){return un}),n.d(o,"isPermalinkEditable",function(){return ln}),n.d(o,"getPermalink",function(){return dn}),n.d(o,"getPermalinkParts",function(){return pn}),n.d(o,"inSomeHistory",function(){return bn}),n.d(o,"isPostLocked",function(){return fn}),n.d(o,"isPostSavingLocked",function(){return hn}),n.d(o,"isPostLockTakeover",function(){return mn}),n.d(o,"getPostLockUser",function(){return vn}),n.d(o,"getActivePostLock",function(){return On}),n.d(o,"canUserUseUnfilteredHTML",function(){return gn}),n.d(o,"isPublishSidebarEnabled",function(){return jn}),n.d(o,"getEditorBlocks",function(){return _n}),n.d(o,"__unstableIsEditorReady",function(){return yn}),n.d(o,"getEditorSettings",function(){return kn}),n.d(o,"getBlockDependantsCacheBust",function(){return Sn}),n.d(o,"getBlockName",function(){return Pn}),n.d(o,"isBlockValid",function(){return wn}),n.d(o,"getBlockAttributes",function(){return Cn}),n.d(o,"getBlock",function(){return Tn}),n.d(o,"getBlocks",function(){return Bn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return xn}),n.d(o,"getClientIdsOfDescendants",function(){return In}),n.d(o,"getClientIdsWithDescendants",function(){return An}),n.d(o,"getGlobalBlockCount",function(){return Rn}),n.d(o,"getBlocksByClientId",function(){return Ln}),n.d(o,"getBlockCount",function(){return Un}),n.d(o,"getBlockSelectionStart",function(){return Dn}),n.d(o,"getBlockSelectionEnd",function(){return Nn}),n.d(o,"getSelectedBlockCount",function(){return Fn}),n.d(o,"hasSelectedBlock",function(){return Mn}),n.d(o,"getSelectedBlockClientId",function(){return Vn}),n.d(o,"getSelectedBlock",function(){return zn}),n.d(o,"getBlockRootClientId",function(){return Kn}),n.d(o,"getBlockHierarchyRootClientId",function(){return Hn}),n.d(o,"getAdjacentBlockClientId",function(){return Wn}),n.d(o,"getPreviousBlockClientId",function(){return qn}),n.d(o,"getNextBlockClientId",function(){return Gn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Yn}),n.d(o,"getMultiSelectedBlocks",function(){return Xn}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Zn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Jn}),n.d(o,"isFirstMultiSelectedBlock",function(){return $n}),n.d(o,"isBlockMultiSelected",function(){return er}),n.d(o,"isAncestorMultiSelected",function(){return tr}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return nr}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return rr}),n.d(o,"getBlockOrder",function(){return or}),n.d(o,"getBlockIndex",function(){return ir}),n.d(o,"isBlockSelected",function(){return cr}),n.d(o,"hasSelectedInnerBlock",function(){return ar}),n.d(o,"isBlockWithinSelection",function(){return sr}),n.d(o,"hasMultiSelection",function(){return ur}),n.d(o,"isMultiSelecting",function(){return lr}),n.d(o,"isSelectionEnabled",function(){return dr}),n.d(o,"getBlockMode",function(){return pr}),n.d(o,"isTyping",function(){return br}),n.d(o,"isCaretWithinFormattedText",function(){return fr}),n.d(o,"getBlockInsertionPoint",function(){return hr}),n.d(o,"isBlockInsertionPointVisible",function(){return mr}),n.d(o,"isValidTemplate",function(){return vr}),n.d(o,"getTemplate",function(){return Or}),n.d(o,"getTemplateLock",function(){return gr}),n.d(o,"canInsertBlockType",function(){return jr}),n.d(o,"getInserterItems",function(){return _r}),n.d(o,"hasInserterItems",function(){return yr}),n.d(o,"getBlockListSettings",function(){return kr});var i=n(7),c=n(9),a=(n(72),n(109),n(56)),s=n(20),u=n(41),l=n(4),d=n(35),p=n(15),b=n(8),f=n(32),h=n(58),m=n.n(h),v=n(2),O=n(28),g={insertUsage:{},isPublishSidebarEnabled:!0},j={},_=Object(b.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1}),y=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,C=6e4,T=["title","excerpt","content"],B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(v.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(b.a)({},o));var a=Object(v.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},x=n(18),I={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(b.a)({},I,e)).shouldOverwriteState=Object(v.overSome)([e.shouldOverwriteState,function(t){return Object(v.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,c=r.shouldOverwriteState,a=void 0===c?function(){return!1}:c;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,c=e.present,s=e.future,u=e.lastAction,l=e.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[c].concat(Object(x.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:[].concat(Object(x.a)(o),[c]),present:Object(v.first)(s),future:Object(v.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(b.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var p=t(c,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===p)return e;var f=o,h=d;return!l&&o.length&&a(r,d)||(f=[].concat(Object(x.a)(o),[c]),h=r),{past:f,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:h}}}};function R(e){return e&&"object"===Object(f.a)(e)&&"raw"in e?e.raw:e}function L(e,t){return e===t?Object(b.a)({},e):t}function U(e,t){return"EDIT_POST"===e.type&&function(e,t){return Object(v.isEqual)(Object(v.keys)(e),Object(v.keys)(t))}(e.edits,t.edits)}var D=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(e,t){return"RESET_EDITOR_BLOCKS"===e.type?!e.shouldCreateUndoLevel:!(!t||e.type!==t.type)&&U(e,t)}})])({blocks:B({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_EDITOR_BLOCKS":return t.blocks===e.value?e:{value:t.blocks}}return e}),edits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":return Object(v.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t=L(e,t),y.has(r)?t[r]=Object(b.a)({},t[r],n):t[r]=n),t},e);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return R(t.post[e])};return Object(v.reduce)(e,function(t,r,o){return Object(v.isEqual)(r,n(o))?(delete(t=L(e,t))[o],t):t},e);case"RESET_EDITOR_BLOCKS":return"content"in e?Object(v.omit)(e,"content"):e}return e}});var N=Object(l.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(v.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,c={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(t[o],c)||((t=L(e,t))[o]=c),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(b.a)({},e,Object(p.a)({},n,Object(b.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(b.a)({},Object(v.omit)(e,o),Object(p.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(v.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(b.a)({},e,Object(p.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.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(b.a)({},e,Object(p.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var F=m()(Object(l.combineReducers)({editor:D,initialEdits: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"SETUP_EDITOR":if(!t.edits)break;return t.edits;case"SETUP_EDITOR_STATE":return"content"in e?Object(v.omit)(e,"content"):e;case"UPDATE_POST":return Object(v.reduce)(t.edits,function(t,n,r){return t.hasOwnProperty(r)?(delete(t=L(e,t))[r],t):t},e);case"RESET_POST":return j}return e},currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(b.a)({},e,t.edits)}return Object(v.mapValues)(n,R)}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(b.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(b.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":return{requesting:!0,successful:!1,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error,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:N,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(b.a)({},e,{isValid:t.isValid})}return e},previewLink: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"REQUEST_POST_UPDATE_SUCCESS":return t.post.preview_link?t.post.preview_link:t.post.link?Object(O.addQueryArgs)(t.post.link,{preview:!0}):e;case"REQUEST_POST_UPDATE_START":if(e&&t.options.isPreview)return null}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(b.a)({},e,Object(p.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.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}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(b.a)({},e,t.settings)}return e}})),M=n(69),V=n.n(M),z=n(22),K=n.n(z),H=n(42),W=n(34),q=n.n(W),G=n(1),Q=n(43),Y=n.n(Q);function X(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(v.includes)(i,t.status),a=Object(v.includes)(i,n.status),s=Object(v.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:S,type:"snackbar",actions:u}]}return[]}function Z(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(G.__)("Publishing failed"),private:Object(G.__)("Publishing failed"),future:Object(G.__)("Scheduling failed")};return[i||-1===o.indexOf(n.status)?Object(G.__)("Updating failed"):c[n.status],{id:S}]}function J(e){return[e.error.message&&"unknown_error"!==e.error.code?e.error.message:Object(G.__)("Trashing failed"),{id:P}]}var $=K.a.mark(ie),ee=K.a.mark(ae),te=K.a.mark(he),ne=K.a.mark(me),re=K.a.mark(ve),oe=K.a.mark(Oe);function ie(e,t,n){var r,o;return K.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 2:return r=Object(v.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=8,Re(o);case 8:return i.next=10,pe(e);case 10:case"end":return i.stop()}},$)}function ce(e){return{type:"RESET_POST",post:e}}function ae(e){var t;return K.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return Y()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,Object(d.select)(k,"getCurrentPostId");case 3:return t=n.sent,n.next=6,Object(d.dispatch)("core","receiveAutosaves",t,e);case 6:return n.abrupt("return",{type:"__INERT__"});case 7:case"end":return n.stop()}},ee)}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:h.BEGIN,id:E},options:e}}function ue(e){var t=e.previousPost,n=e.post,r=e.isRevision,o=e.options,i=e.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:t,post:n,optimist:{type:r?h.REVERT:h.COMMIT,id:E},options:o,postType:i}}function le(e){var t=e.post,n=e.edits,r=e.error,o=e.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:h.REVERT,id:E},post:t,edits:n,error:r,options:o}}function de(e){return{type:"UPDATE_POST",edits:e}}function pe(e){return{type:"SETUP_EDITOR_STATE",post:e}}function be(e){return{type:"EDIT_POST",edits:e}}function fe(e){return Object(b.a)({},de(e),{optimist:{id:E}})}function he(){var e,t,n,r,o,i,c,a,s,u,l,p,f,h,m,O,g,j=arguments;return K.a.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return e=j.length>0&&void 0!==j[0]?j[0]:{},_.next=3,Object(d.select)(k,"isEditedPostSaveable");case 3:if(_.sent){_.next=6;break}return _.abrupt("return");case 6:return _.next=8,Object(d.select)(k,"getPostEdits");case 8:return t=_.sent,(n=!!e.isAutosave)&&(t=Object(v.pick)(t,T)),_.next=13,Object(d.select)(k,"isEditedPostNew");case 13:return _.sent&&(t=Object(b.a)({status:"draft"},t)),_.next=17,Object(d.select)(k,"getCurrentPost");case 17:return r=_.sent,_.next=20,Object(d.select)(k,"getEditedPostContent");case 20:return o=_.sent,i=Object(b.a)({},t,{content:o,id:r.id}),_.next=24,Object(d.select)(k,"getCurrentPostType");case 24:return c=_.sent,_.next=27,Object(d.select)("core","getPostType",c);case 27:return a=_.sent,_.next=30,Object(d.dispatch)(k,"__experimentalRequestPostUpdateStart",e);case 30:return _.next=32,Object(d.dispatch)(k,"__experimentalOptimisticUpdatePost",i);case 32:if(s="/wp/v2/".concat(a.rest_base,"/").concat(r.id),u="PUT",!n){_.next=48;break}return _.next=37,Object(d.select)("core","getCurrentUser");case 37:return l=_.sent,p=l?l.id:void 0,_.next=41,Object(d.select)("core","getAutosave",r.type,r.id,p);case 41:f=_.sent,h=Object(v.mapValues)(Object(v.pick)(f,T),R),i=Object(b.a)({},Object(v.pick)(r,T),h,i),s+="/autosaves",u="POST",_.next=52;break;case 48:return _.next=50,Object(d.dispatch)("core/notices","removeNotice",S);case 50:return _.next=52,Object(d.dispatch)("core/notices","removeNotice","autosave-exists");case 52:return _.prev=52,_.next=55,Object(d.apiFetch)({path:s,method:u,data:i});case 55:if(m=_.sent,!n){_.next=61;break}return _.next=59,Object(d.dispatch)("core","receiveAutosaves",r.id,m);case 59:_.next=63;break;case 61:return _.next=63,Object(d.dispatch)(k,"resetPost",m);case 63:return _.next=65,Object(d.dispatch)(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:m,options:e,postType:a,isRevision:m.id!==r.id});case 65:if(!((O=X({previousPost:r,post:m,postType:a,options:e})).length>0)){_.next=69;break}return _.next=69,d.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(O)));case 69:_.next=79;break;case 71:return _.prev=71,_.t0=_.catch(52),_.next=75,Object(d.dispatch)(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:t,error:_.t0,options:e});case 75:if(!((g=Z({post:r,edits:t,error:_.t0})).length>0)){_.next=79;break}return _.next=79,d.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(g)));case 79:case"end":return _.stop()}},te,null,[[52,71]])}function me(){var e,t,n,r;return K.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(d.select)(k,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(d.select)(k,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Object(d.select)("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(d.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(d.dispatch)(k,"resetPost",r);case 14:case"end":return o.stop()}},ne)}function ve(){var e,t,n;return K.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(d.select)(k,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Object(d.select)("core","getPostType",e);case 5:return t=r.sent,r.next=8,Object(d.dispatch)("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Object(d.select)(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(d.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,Object(d.dispatch)(k,"resetPost",Object(b.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,d.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(J({error:r.t0}))));case 22:case"end":return r.stop()}},re,null,[[8,18]])}function Oe(e){return K.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(d.dispatch)(k,"savePost",Object(b.a)({isAutosave:!0},e));case 2:case"end":return t.stop()}},oe)}function ge(){return{type:"REDO"}}function je(){return{type:"UNDO"}}function _e(){return{type:"CREATE_UNDO_LEVEL"}}function ye(e){return{type:"UPDATE_POST_LOCK",lock:e}}function ke(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Ee(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Se(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Pe(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function we(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Ce(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function Te(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function Be(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function xe(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ie(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Ae(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Re(e){return{type:"RESET_EDITOR_BLOCKS",blocks:e,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Le(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Ue=function(e){return K.a.mark(function t(){var n,r,o,i=arguments;return K.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(Y()("`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,d.dispatch.apply(void 0,["core/block-editor",e].concat(r));case 4:case"end":return t.stop()}},t)})},De=Ue("resetBlocks"),Ne=Ue("receiveBlocks"),Fe=Ue("updateBlock"),Me=Ue("updateBlockAttributes"),Ve=Ue("selectBlock"),ze=Ue("startMultiSelect"),Ke=Ue("stopMultiSelect"),He=Ue("multiSelect"),We=Ue("clearSelectedBlock"),qe=Ue("toggleSelection"),Ge=Ue("replaceBlocks"),Qe=Ue("replaceBlock"),Ye=Ue("moveBlocksDown"),Xe=Ue("moveBlocksUp"),Ze=Ue("moveBlockToPosition"),Je=Ue("insertBlock"),$e=Ue("insertBlocks"),et=Ue("showInsertionPoint"),tt=Ue("hideInsertionPoint"),nt=Ue("setTemplateValidity"),rt=Ue("synchronizeTemplate"),ot=Ue("mergeBlocks"),it=Ue("removeBlocks"),ct=Ue("removeBlock"),at=Ue("toggleBlockMode"),st=Ue("startTyping"),ut=Ue("stopTyping"),lt=Ue("enterFormattedText"),dt=Ue("exitFormattedText"),pt=Ue("insertDefaultBlock"),bt=Ue("updateBlockListSettings"),ft=n(24),ht=n(31),mt=n(51),vt=n(64),Ot={};function gt(e){return e.editor.past.length>0}function jt(e){return e.editor.future.length>0}function _t(e){return"auto-draft"===St(e).status}function yt(e){return e.editor.present.blocks.isDirty||"content"in e.editor.present.edits}function kt(e){return!!yt(e)||(Object.keys(e.editor.present.edits).length>0||bn(e,kt))}function Et(e){return!kt(e)&&_t(e)}function St(e){return e.currentPost}function Pt(e){return e.currentPost.type}function wt(e){return St(e).id||null}function Ct(e){return Object(v.get)(St(e),["_links","version-history",0,"count"],0)}function Tt(e){return Object(v.get)(St(e),["_links","predecessor-version",0,"id"],null)}var Bt=Object(ht.a)(function(e){return Object(b.a)({},e.initialEdits,e.editor.present.edits)},function(e){return[e.editor.present.edits,e.initialEdits]}),xt=Object(ht.a)(function(){return[]},function(e){return[e.editor]});function It(e,t){var n=St(e);if(n.hasOwnProperty(t))return n[t]}var At=Object(ht.a)(function(e,t){var n=Bt(e);return n.hasOwnProperty(t)?Object(b.a)({},It(e,t),n[t]):It(e,t)},function(e,t){return[Object(v.get)(e.editor.present.edits,[t],Ot),Object(v.get)(e.currentPost,[t],Ot)]});function Rt(e,t){switch(t){case"content":return nn(e)}var n=Bt(e);return n.hasOwnProperty(t)?y.has(t)?At(e,t):n[t]:It(e,t)}var Lt=Object(l.createRegistrySelector)(function(e){return function(t,n){if(Y()("`wp.data.select( 'core/editor' ).getAutosaveAttribute( attributeName )`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"}),Object(v.includes)(T,n)){var r=Pt(t),o=wt(t),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(r,o,i);return c?R(c[n]):void 0}}});function Ut(e){return"private"===Rt(e,"status")?"private":Rt(e,"password")?"password":"public"}function Dt(e){return"pending"===St(e).status}function Nt(e){var t=St(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&!Object(mt.isInTheFuture)(new Date(Number(Object(mt.getDate)(t.date))-C))}function Ft(e){return"future"===St(e).status&&!Nt(e)}function Mt(e){var t=St(e);return kt(e)||-1===["publish","private","future"].indexOf(t.status)}function Vt(e){return!Qt(e)&&(!!Rt(e,"title")||!!Rt(e,"excerpt")||!zt(e))}function zt(e){var t=e.editor.present.blocks.value;if(t.length&&!("content"in Bt(e))){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!nn(e)}var Kt=Object(l.createRegistrySelector)(function(e){return function(t){if(!Vt(t))return!1;var n=Pt(t),r=wt(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!yt(t)||["title","excerpt"].some(function(e){return R(c[e])!==Rt(t,e)})))}}),Ht=Object(l.createRegistrySelector)(function(e){return function(t){Y()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Pt(t),r=wt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(v.mapValues)(Object(v.pick)(i,T),R)}}),Wt=Object(l.createRegistrySelector)(function(e){return function(t){Y()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Pt(t),r=wt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}});function qt(e){var t=Rt(e,"date"),n=new Date(Number(Object(mt.getDate)(t))-C);return Object(mt.isInTheFuture)(n)}function Gt(e){var t=Rt(e,"date"),n=Rt(e,"modified"),r=Rt(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&t===n}function Qt(e){return e.saving.requesting}function Yt(e){return e.saving.successful}function Xt(e){return!!e.saving.error}function Zt(e){return Qt(e)&&!!e.saving.options.isAutosave}function Jt(e){return Qt(e)&&!!e.saving.options.isPreview}function $t(e){var t=Rt(e,"featured_media"),n=e.previewLink;return n&&t?Object(O.addQueryArgs)(n,{_thumbnail_id:t}):n}function en(e){var t,n=e.editor.present.blocks.value;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 tn(e){var t=e.editor.present.blocks.value;return 1===t.length&&Object(c.isUnmodifiedDefaultBlock)(t[0])?[]:t}var nn=Object(ht.a)(function(e){var t=Bt(e);if("content"in t)return t.content;var n=tn(e),r=Object(c.serialize)(n);return 1===n.length&&n[0].name===Object(c.getFreeformContentHandlerName)()?Object(vt.removep)(r):r},function(e){return[e.editor.present.blocks.value,e.editor.present.edits.content,e.initialEdits.content]}),rn=Object(ht.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(b.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function on(e,t){return e.reusableBlocks.isSaving[t]||!1}function cn(e,t){return!!e.reusableBlocks.isFetching[t]}var an=Object(ht.a)(function(e){return Object(v.map)(e.reusableBlocks.data,function(t,n){return rn(e,n)})},function(e){return[e.reusableBlocks.data]});function sn(e,t){var n=Object(v.find)(e.optimist,function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function un(e){if(!Qt(e))return!1;if(!Nt(e))return!1;var t=sn(e,E);return!!t&&!Nt(t)}function ln(e){var t=Rt(e,"permalink_template");return w.test(t)}function dn(e){var t=pn(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return ln(e)?n+r+o:n}function pn(e){var t=Rt(e,"permalink_template");if(!t)return null;var n=Rt(e,"slug")||Rt(e,"generated_slug"),r=t.split(w),o=Object(ft.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function bn(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function fn(e){return e.postLock.isLocked}function hn(e){return Object.keys(e.postSavingLock).length>0}function mn(e){return e.postLock.isTakeover}function vn(e){return e.postLock.user}function On(e){return e.postLock.activePostLock}function gn(e){return Object(v.has)(St(e),["_links","wp:action-unfiltered-html"])}function jn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function _n(e){return e.editor.present.blocks.value}function yn(e){return e.isReady}function kn(e){return e.editorSettings}function En(e){return Object(l.createRegistrySelector)(function(t){return function(n){var r;Y()("`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 Sn=En("getBlockDependantsCacheBust"),Pn=En("getBlockName"),wn=En("isBlockValid"),Cn=En("getBlockAttributes"),Tn=En("getBlock"),Bn=En("getBlocks"),xn=En("__unstableGetBlockWithoutInnerBlocks"),In=En("getClientIdsOfDescendants"),An=En("getClientIdsWithDescendants"),Rn=En("getGlobalBlockCount"),Ln=En("getBlocksByClientId"),Un=En("getBlockCount"),Dn=En("getBlockSelectionStart"),Nn=En("getBlockSelectionEnd"),Fn=En("getSelectedBlockCount"),Mn=En("hasSelectedBlock"),Vn=En("getSelectedBlockClientId"),zn=En("getSelectedBlock"),Kn=En("getBlockRootClientId"),Hn=En("getBlockHierarchyRootClientId"),Wn=En("getAdjacentBlockClientId"),qn=En("getPreviousBlockClientId"),Gn=En("getNextBlockClientId"),Qn=En("getSelectedBlocksInitialCaretPosition"),Yn=En("getMultiSelectedBlockClientIds"),Xn=En("getMultiSelectedBlocks"),Zn=En("getFirstMultiSelectedBlockClientId"),Jn=En("getLastMultiSelectedBlockClientId"),$n=En("isFirstMultiSelectedBlock"),er=En("isBlockMultiSelected"),tr=En("isAncestorMultiSelected"),nr=En("getMultiSelectedBlocksStartClientId"),rr=En("getMultiSelectedBlocksEndClientId"),or=En("getBlockOrder"),ir=En("getBlockIndex"),cr=En("isBlockSelected"),ar=En("hasSelectedInnerBlock"),sr=En("isBlockWithinSelection"),ur=En("hasMultiSelection"),lr=En("isMultiSelecting"),dr=En("isSelectionEnabled"),pr=En("getBlockMode"),br=En("isTyping"),fr=En("isCaretWithinFormattedText"),hr=En("getBlockInsertionPoint"),mr=En("isBlockInsertionPointVisible"),vr=En("isValidTemplate"),Or=En("getTemplate"),gr=En("getTemplateLock"),jr=En("canInsertBlockType"),_r=En("getInserterItems"),yr=En("hasInserterItems"),kr=En("getBlockListSettings"),Er=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,q()({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,q()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)});case 11:e.t0=e.sent,a=[e.t0],e.next=18;break;case 15:return e.next=17,q()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")});case 17:a=e.sent;case 18:(s=Object(v.compact)(Object(v.map)(a,function(e){if("publish"!==e.status||e.content.protected)return null;var t=Object(c.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:R(e.title)},parsedBlock:1===t.length?t[0]:Object(c.createBlock)("core/template",{},t)}}))).length&&o(Ee(s)),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)}}(),Sr=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s,u,d,p,b,f,h,m,v,O,g;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({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,a=n.getState(),s=rn(a,o),u=s.clientId,d=s.title,p=s.isTemporary,b=Object(l.select)("core/block-editor").getBlock(u),f=Object(c.serialize)("core/template"===b.name?b.innerBlocks:b),h=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,q()({path:m,data:h,method:v});case 17:O=e.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(G.__)("Block created."):Object(G.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID",type:"snackbar"}),Object(l.dispatch)("core/block-editor").__unstableSaveReusableBlock(o,O.id),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(14),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,null,[[14,24]])}));return function(t,n){return e.apply(this,arguments)}}(),Pr=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s,u,d,p,b,f;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({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=rn(i(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Object(l.select)("core/block-editor").getBlocks(),d=u.filter(function(e){return Object(c.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),b=Object(v.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:h.BEGIN,id:b}}),Object(l.dispatch)("core/block-editor").removeBlocks([].concat(Object(x.a)(p),[s.clientId])),e.prev=16,e.next=19,q()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:h.COMMIT,id:b}}),f=Object(G.__)("Block deleted."),Object(l.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:h.REVERT,id:b}}),Object(l.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)}}(),wr={FETCH_REUSABLE_BLOCKS:function(e,t){Er(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){Sr(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){Pr(e,t)},RECEIVE_REUSABLE_BLOCKS:function(e){Object(l.dispatch)("core/block-editor").receiveBlocks(Object(v.map)(e.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(e,t){var n,r=t.getState(),o=Object(l.select)("core/block-editor").getBlock(e.clientId),i=rn(r,o.attributes.ref),a=Object(l.select)("core/block-editor").getBlock(i.clientId);n="core/template"===a.name?a.innerBlocks.map(function(e){return Object(c.cloneBlock)(e)}):[Object(c.cloneBlock)(a)],Object(l.dispatch)("core/block-editor").replaceBlocks(o.clientId,n)},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n,r=t.dispatch;1===e.clientIds.length?n=Object(l.select)("core/block-editor").getBlock(e.clientIds[0]):(n=Object(c.createBlock)("core/template",{},Object(l.select)("core/block-editor").getBlocksByClientId(e.clientIds)),Object(l.dispatch)("core/block-editor").receiveBlocks([n]));var o={id:Object(v.uniqueId)("reusable"),clientId:n.clientId,title:Object(G.__)("Untitled Reusable Block")};r(Ee([{reusableBlock:o,parsedBlock:n}])),r(Se(o.id)),Object(l.dispatch)("core/block-editor").replaceBlocks(e.clientIds,Object(c.createBlock)("core/block",{ref:o.id})),Object(l.dispatch)("core/block-editor").receiveBlocks([n])}};var Cr=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=V()(wr)(n)(e.dispatch),e.dispatch=t,e},Tr=Object(l.registerStore)(k,{reducer:F,selectors:o,actions:r,controls:d.controls,persist:["preferences"]});Cr(Tr);var Br=n(26),xr=n(0);function Ir(){return Object(l.select)("core/block-editor").getBlockInsertionPoint().rootClientId}function Ar(e){return Object(l.select)("core/block-editor").getInserterItems(e)}function Rr(){var e=Object(l.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlockName,r=t();return r?n(r):null}var Lr=Object(v.once)(function(){Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});var Ur=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Ir:t,r=e.getInserterItems,o=void 0===r?Ar:r,a=e.getSelectedBlockName,s=void 0===a?Rr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){Lr();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(x.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(xr.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}}}(),Dr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),q()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(xr.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(xr.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(xr.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},Nr=n(11),Fr=n(10),Mr=n(12),Vr=n(14),zr=n(13),Kr=n(6),Hr=function(e){function t(){return Object(Nr.a)(this,t),Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(zr.a)(t,e),Object(Fr.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;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;e&&(this.pendingSave=setTimeout(function(){return t.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),t}(xr.Component),Wr=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostDirty,r=t.isEditedPostAutosaveable,o=t.getReferenceByDistinctEdits,i=t.isAutosavingPost,c=e("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:c}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave}})])(Hr),qr=n(16),Gr=n.n(qr),Qr=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(xr.createElement)("li",{className:Gr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(xr.createElement)("a",{href:a,className:"document-outline__button",onClick:s},Object(xr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map(function(e,t){var n=e.clientId;return Object(xr.createElement)("strong",{key:t,className:"document-outline__level"},Object(xr.createElement)(i.BlockTitle,{clientId:n}))}),Object(xr.createElement)("strong",{className:"document-outline__level"},r),Object(xr.createElement)("span",{className:"document-outline__item-content"},t)))},Yr=Object(xr.createElement)("em",null,Object(G.__)("(Empty heading)")),Xr=[Object(xr.createElement)("br",{key:"incorrect-break"}),Object(xr.createElement)("em",{key:"incorrect-message"},Object(G.__)("(Incorrect heading level)"))],Zr=[Object(xr.createElement)("br",{key:"incorrect-break-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-h1"},Object(G.__)("(Your theme may already use a H1 for the post title)"))],Jr=[Object(xr.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(G.__)("(Multiple H1 headings are not recommended)"))],$r=function(e){return!e.attributes.content||0===e.attributes.content.length},eo=Object(Kr.compose)(Object(l.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(v.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(v.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(b.a)({},t,{path:n,level:t.attributes.level,isEmpty:$r(t)}):e(t.innerBlocks,[].concat(Object(x.a)(n),[t]))})}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(xr.createElement)("div",{className:"document-outline"},Object(xr.createElement)("ul",null,d&&Object(xr.createElement)(Qr,{level:Object(G.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:c},r),a.map(function(e,t){var n=e.level>u+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(p||d));return u=e.level,Object(xr.createElement)(Qr,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?Yr:Object(s.getTextContent)(Object(s.create)({html:e.attributes.content})),n&&Xr,1===e.level&&p&&Jr,d&&1===e.level&&!p&&Zr)})))});var to=Object(l.withSelect)(function(e){return{blocks:e("core/block-editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n}),no=n(5),ro=n(3),oo=n(19);var io=Object(Kr.compose)([Object(l.withSelect)(function(e){return{isDirty:(0,e("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(e,t,n){var r=n.select,o=e("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(e){var t=e.onSave;return Object(xr.createElement)(ro.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},oo.rawShortcut.primary("s"),function(e){e.preventDefault(),t()})})}),co=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).undoOrRedo=e.undoOrRedo.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"render",value:function(){var e;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(xr.createElement)(ro.KeyboardShortcuts,{shortcuts:(e={},Object(p.a)(e,oo.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(e,oo.rawShortcut.primaryShift("z"),this.undoOrRedo),e)}),Object(xr.createElement)(io,null))}}]),t}(xr.Component),ao=Object(l.withDispatch)(function(e){var t=e("core/editor");return{onRedo:t.redo,onUndo:t.undo}})(co),so=ao;function uo(){return Y()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(xr.createElement)(ao,null)}function lo(){return Object(xr.createElement)(io,null)}var po=Object(Kr.compose)([Object(l.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(e){return{redo:e("core/editor").redo}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(xr.createElement)(ro.IconButton,{icon:"redo",label:Object(G.__)("Redo"),shortcut:oo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})});var bo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(e){return{undo:e("core/editor").undo}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(xr.createElement)(ro.IconButton,{icon:"undo",label:Object(G.__)("Undo"),shortcut:oo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})}),fo=n(21);var ho=Object(Kr.compose)([Object(l.withSelect)(function(e){return{isValid:e("core/block-editor").isValidTemplate()}}),Object(l.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(fo.a)(e,["isValid"]);return t?null:Object(xr.createElement)(ro.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(xr.createElement)("p",null,Object(G.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(xr.createElement)("div",null,Object(xr.createElement)(ro.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(G.__)("Keep it as is")),Object(xr.createElement)(ro.Button,{onClick:function(){window.confirm(Object(G.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(G.__)("Reset the template"))))});var mo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(l.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){var t=e.notices,n=e.onRemove,r=Object(v.filter)(t,{isDismissible:!0,type:"default"}),o=Object(v.filter)(t,{isDismissible:!1,type:"default"}),i=Object(v.filter)(t,{type:"snackbar"});return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(ro.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(xr.createElement)(ro.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(xr.createElement)(ho,null)),Object(xr.createElement)(ro.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))}),vo=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(no.a)(e)),e.getContent=e.getContent.bind(Object(no.a)(e)),e.state={error:null},e}return Object(zr.a)(t,e),Object(Fr.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(l.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(xr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(xr.createElement)(ro.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(G.__)("Attempt Recovery")),Object(xr.createElement)(ro.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(G.__)("Copy Post Text")),Object(xr.createElement)(ro.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(G.__)("Copy Error"))]},Object(G.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(xr.Component);var Oo=Object(l.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(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r});var go=Object(l.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(v.some)(Object(v.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),jo=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(xr.createElement)(ro.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(G.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var _o=Object(Kr.compose)([Object(l.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(xr.createElement)(go,{supportKeys:"page-attributes"},Object(xr.createElement)(jo,e))});function yo(e){var t=e.map(function(e){return Object(b.a)({children:[],parent:null},e)}),n=Object(v.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(b.a)({},t,{children:r&&r.length?e(r):[]})})}(n[0]||[])}var ko=Object(l.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(v.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}}),Eo=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),So=Object(Kr.compose)([ko,Eo])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),c=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=yo(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(G.__)("no title"),")")}}));return Object(xr.createElement)(ro.TreeSelect,{className:"editor-page-attributes__parent",label:c,noOptionLabel:"(".concat(Object(G.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var Po=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.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(v.isEmpty)(t)?null:Object(xr.createElement)(ro.SelectControl,{label:Object(G.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,function(e,t){return{value:t,label:e}})})}),wo=n(54);var Co=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.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(xr.createElement)(go,{supportKeys:"author"},r)}),To=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(xr.createElement)(Co,null,Object(xr.createElement)("label",{htmlFor:o},Object(G.__)("Author")),Object(xr.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(xr.createElement)("option",{key:e.id,value:e.id},Object(wo.decodeEntities)(e.name))})))}}]),t}(xr.Component),Bo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(l.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Kr.withInstanceId])(To);var xo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(fo.a)(e,["commentStatus"]);return Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Io=Object(Kr.compose)([Object(l.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(xr.createElement)("div",{className:"editor-post-excerpt"},Object(xr.createElement)(ro.TextareaControl,{label:Object(G.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(xr.createElement)(ro.ExternalLink,{href:Object(G.__)("https://codex.wordpress.org/Excerpt")},Object(G.__)("Learn more about manual excerpts")))}),Ao=n(17);var Ro=function(e){return Object(xr.createElement)(go,Object(Ao.a)({},e,{supportKeys:"excerpt"}))};var Lo=Object(l.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(v.some)(Object(v.castArray)(o),function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var Uo=function(e){return Object(xr.createElement)(Lo,{supportKeys:"post-thumbnails"},Object(xr.createElement)(go,Object(Ao.a)({},e,{supportKeys:"thumbnail"})))},Do=["image"],No=Object(G.__)("Featured Image"),Fo=Object(G.__)("Set Featured Image"),Mo=Object(G.__)("Remove Image");var Vo=Object(l.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}}),zo=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Ko=Object(Kr.compose)(Vo,zo,Object(ro.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,c=e.featuredImageId,a=e.onUpdateImage,s=e.onRemoveImage,u=e.media,l=e.postType,d=Object(v.get)(l,["labels"],{}),p=Object(xr.createElement)("p",null,Object(G.__)("To edit the featured image, you need permission to upload media."));if(u){var b=Object(Br.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",b])?(t=u.media_details.sizes[b].width,n=u.media_details.sizes[b].height,r=u.media_details.sizes[b].source_url):(t=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(xr.createElement)(Uo,null,Object(xr.createElement)("div",{className:"editor-post-featured-image"},Object(xr.createElement)(i.MediaUploadCheck,{fallback:p},Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||No,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(xr.createElement)(ro.Button,{className:c?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":c?Object(G.__)("Edit or update the image"):null},!!c&&u&&Object(xr.createElement)(ro.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(xr.createElement)("img",{src:r,alt:""})),!!c&&!u&&Object(xr.createElement)(ro.Spinner,null),!c&&(d.set_featured_image||Fo))},value:c})),!!c&&u&&!u.isLoading&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||No,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(xr.createElement)(ro.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(G.__)("Replace Image"))}})),!!c&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(ro.Button,{onClick:s,isLink:!0,isDestructive:!0},d.remove_featured_image||Mo))))});var Ho=Object(l.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(fo.a)(e,["disablePostFormats"]);return!t&&Object(xr.createElement)(go,Object(Ao.a)({},n,{supportKeys:"post-formats"}))}),Wo=[{id:"aside",caption:Object(G.__)("Aside")},{id:"gallery",caption:Object(G.__)("Gallery")},{id:"link",caption:Object(G.__)("Link")},{id:"image",caption:Object(G.__)("Image")},{id:"quote",caption:Object(G.__)("Quote")},{id:"standard",caption:Object(G.__)("Standard")},{id:"status",caption:Object(G.__)("Status")},{id:"video",caption:Object(G.__)("Video")},{id:"audio",caption:Object(G.__)("Audio")},{id:"chat",caption:Object(G.__)("Chat")}];var qo=Object(Kr.compose)([Object(l.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(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.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=Wo.filter(function(e){return Object(v.includes)(o,e.id)}),s=Object(v.find)(a,function(e){return e.id===i});return Object(xr.createElement)(Ho,null,Object(xr.createElement)("div",{className:"editor-post-format"},Object(xr.createElement)("div",{className:"editor-post-format__content"},Object(xr.createElement)("label",{htmlFor:c},Object(G.__)("Post Format")),Object(xr.createElement)(ro.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(xr.createElement)("div",{className:"editor-post-format__suggestion"},Object(G.__)("Suggestion:")," ",Object(xr.createElement)(ro.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var Go=Object(l.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(xr.createElement)(go,{supportKeys:"revisions"},r)});function Qo(e,t){return Object(O.addQueryArgs)(e,t)}function Yo(e){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(e.replace(/[\s\./_]+/g,"-"),"-")))}var Xo=Object(l.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(xr.createElement)(Go,null,Object(xr.createElement)(ro.IconButton,{href:Qo("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(G.sprintf)(Object(G._n)("%d Revision","%d Revisions",n),n)))});var Zo=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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){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}),function(e){var t=Object(xr.renderToString)(Object(xr.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(xr.createElement)(ro.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(xr.createElement)(ro.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(xr.createElement)(ro.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(xr.createElement)("p",null,Object(G.__)("Generating preview…"))));t+='\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',t=Object(Br.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=Object(G.__)("Generating preview…"),e.close()}(this.previewWindow.document)):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(xr.createElement)(ro.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(G._x)("Preview","imperative verb"),Object(xr.createElement)("span",{className:"screen-reader-text"},Object(G.__)("(opens in a new tab)")),Object(xr.createElement)(a.DotTip,{tipId:"core/editor.preview"},Object(G.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(xr.Component),Jo=Object(Kr.compose)([Object(l.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(v.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}}),Object(Kr.ifCondition)(function(e){return e.isViewable})])(Zo),$o=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(no.a)(e)),e.receivePostLock=e.receivePostLock.bind(Object(no.a)(e)),e.releasePostLock=e.releasePostLock.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(Br.addAction)("heartbeat.send",e,this.sendPostLock),Object(Br.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(Br.removeAction)("heartbeat.send",e),Object(Br.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(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Qo("edit.php",{post_type:Object(v.get)(c,["slug"])}),d=Object(G.__)("Exit the Editor");return Object(xr.createElement)(ro.Modal,{title:o?Object(G.__)("Someone else has taken over this post."):Object(G.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!s&&Object(xr.createElement)("img",{src:s,alt:Object(G.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(G.sprintf)(Object(G.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(G.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(ro.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(G.sprintf)(Object(G.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(G.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(ro.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(xr.createElement)(Jo,null),Object(xr.createElement)(ro.Button,{isPrimary:!0,isLarge:!0,href:u},Object(G.__)("Take Over")))))}}]),t}(xr.Component),ei=Object(Kr.compose)(Object(l.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(l.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Kr.withInstanceId,Object(Kr.withGlobalEvents)({beforeunload:"releasePostLock"}))($o);var ti=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.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 ni=Object(Kr.compose)(Object(l.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(xr.createElement)(ti,null,Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var ri=Object(Kr.compose)([Object(l.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(fo.a)(e,["pingStatus"]);return Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var oi=Object(Kr.compose)([Object(l.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(v.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;return o?Object(G.__)("Publishing…"):t&&r&&!c?Object(G.__)("Updating…"):n&&r&&!c?Object(G.__)("Scheduling…"):i?t?Object(G.__)("Update"):n?Object(G.__)("Schedule"):Object(G.__)("Publish"):Object(G.__)("Submit for Review")}),ii=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).call(this,e))).buttonNode=Object(xr.createRef)(),n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,c=t.isOpen,s=t.isPostSavingLocked,u=t.isPublishable,l=t.isPublished,d=t.isSaveable,p=t.isSaving,b=t.isToggle,f=t.onSave,h=t.onStatusChange,m=t.onSubmit,O=void 0===m?v.noop:m,g=t.onToggle,j=t.visibility,_=p||r||!d||s||!u&&!n,y=l||p||r||!d||!u&&!n;e=o?i?"future":"private"===j?"private":"publish":"pending";var k={"aria-disabled":_,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){_||(O(),h(e),f())}},E={"aria-disabled":y,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){y||g()}},S=i?Object(G.__)("Schedule…"):Object(G.__)("Publish…"),P=Object(xr.createElement)(oi,{forceIsSaving:r}),w=b?E:k,C=b?S:P;return Object(xr.createElement)(ro.Button,Object(Ao.a)({ref:this.buttonNode},w),C,Object(xr.createElement)(a.DotTip,{tipId:"core/editor.publish"},Object(G.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),t}(xr.Component),ci=Object(Kr.compose)([Object(l.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;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(ii),ai=[{value:"public",label:Object(G.__)("Public"),info:Object(G.__)("Visible to everyone.")},{value:"private",label:Object(G.__)("Private"),info:Object(G.__)("Only visible to site admins and editors.")},{value:"password",label:Object(G.__)("Password Protected"),info:Object(G.__)("Protected with a password you choose. Only those with the password can view this post.")}],si=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(no.a)(n)),n.setPrivate=n.setPrivate.bind(Object(no.a)(n)),n.setPasswordProtected=n.setPasswordProtected.bind(Object(no.a)(n)),n.updatePassword=n.updatePassword.bind(Object(no.a)(n)),n.state={hasPassword:!!e.password},n}return Object(zr.a)(t,e),Object(Fr.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(G.__)("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,o=e.password;n("private"===t?"draft":r,o||""),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(xr.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(xr.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(G.__)("Post Visibility")),ai.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(xr.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(xr.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(xr.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(xr.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(xr.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(xr.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(G.__)("Create password")),Object(xr.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(G.__)("Use a secure password")}))]}}]),t}(xr.Component),ui=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.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]:null;r({status:e,password:t})}}}),Kr.withInstanceId])(si);var li=Object(l.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(v.find)(ai,{value:t}).label});var di=Object(Kr.compose)([Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(mt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(xr.createElement)(ro.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})});var pi=Object(l.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(mt.__experimentalGetSettings)();return t&&!n?Object(mt.dateI18n)(r.formats.datetimeAbbreviated,t):Object(G.__)("Immediately")}),bi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},fi=function(e,t){return e.toLowerCase()===t.toLowerCase()},hi=function(e){return Object(b.a)({},e,{name:Object(v.unescape)(e.name)})},mi=function(e){return Object(v.map)(e,hi)},vi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(no.a)(e)),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(no.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(no.a)(e)),e.state={loading:!Object(v.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.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(v.invoke)(this.initRequest,["abort"]),Object(v.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(b.a)({},bi,t),o=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(mi).then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(v.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]:[]).reduce(function(t,n){var r=Object(v.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(v.escape)(e);return q()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(t.addRequest=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(b.a)({},bi,{search:r}))}).then(mi),t.addRequest.then(function(t){return Object(v.find)(t,function(t){return fi(t.name,e)})})):Promise.reject(o)}).then(hi)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(v.find)(t.state.availableTerms,function(t){return fi(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(v.find)(t,function(t){return fi(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(v.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(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(G.__)("Add New Tag"):Object(G.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(G.__)("Tag"):Object(G.__)("Term")),l=Object(G.sprintf)(Object(G._x)("%s added","term"),u),d=Object(G.sprintf)(Object(G._x)("%s removed","term"),u),p=Object(G.sprintf)(Object(G._x)("Remove %s","term"),u);return Object(xr.createElement)(ro.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}(xr.Component),Oi=Object(Kr.compose)(Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),Object(ro.withFilters)("editor.PostTaxonomyType"))(vi),gi=function(){var e=[Object(G.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(G.__)("Add tags"))];return Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:e},Object(xr.createElement)("p",null,Object(G.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(xr.createElement)(Oi,{slug:"post_tag"}))},ji=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(xr.createElement)(gi,null)}}]),t}(xr.Component),_i=Object(Kr.compose)(Object(l.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(v.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}))(ji),yi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(xr.createElement)(ro.Button,{isLink:!0,onClick:function(){return r(t)}},n)},ki=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:function(e,t){var n=Wo.filter(function(t){return Object(v.includes)(e,t.id)});return Object(v.find)(n,function(e){return e.id===t})}(o,r())}}),Object(l.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(G.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(G.__)("Use a post format"))];return Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:r},Object(xr.createElement)("p",null,Object(G.__)("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(xr.createElement)("p",null,Object(xr.createElement)(yi,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(G.sprintf)(Object(G.__)('Apply the "%1$s" format.'),t.caption)})))});var Ei=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.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(G.__)("Are you ready to schedule?"),n=Object(G.__)("Your work will be published at the specified date and time.")):(t=Object(G.__)("Are you ready to publish?"),n=Object(G.__)("Double-check your settings before publishing.")):(t=Object(G.__)("Are you ready to submit for review?"),n=Object(G.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(xr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(xr.createElement)("div",null,Object(xr.createElement)("strong",null,t)),Object(xr.createElement)("p",null,n),r&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:[Object(G.__)("Visibility:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(li,null))]},Object(xr.createElement)(ui,null)),Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:[Object(G.__)("Publish:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(pi,null))]},Object(xr.createElement)(di,null)),Object(xr.createElement)(ki,null),Object(xr.createElement)(_i,null),i))}),Si=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(no.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(no.a)(e)),e.postLink=Object(xr.createRef)(),e}return Object(zr.a)(t,e),Object(Fr.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(v.get)(o,["labels","singular_name"]),c=Object(v.get)(o,["labels","view_item"]),a=n?Object(xr.createElement)(xr.Fragment,null,Object(G.__)("is now scheduled. It will go live on")," ",Object(xr.createElement)(pi,null),"."):Object(G.__)("is now live.");return Object(xr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(xr.createElement)(ro.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(xr.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(G.__)("(no title)"))," ",a),Object(xr.createElement)(ro.PanelBody,null,Object(xr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(xr.createElement)("strong",null,Object(G.__)("What’s next?"))),Object(xr.createElement)(ro.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(G.sprintf)(Object(G.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(xr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(xr.createElement)(ro.Button,{isDefault:!0,href:r.link},c),Object(xr.createElement)(ro.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(G.__)("Copied!"):Object(G.__)("Copy Link")))),t)}}]),t}(xr.Component),Pi=Object(l.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()}})(Si),wi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(fo.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(xr.createElement)("div",Object(Ao.a)({className:"editor-post-publish-panel"},b),Object(xr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(G.__)("Scheduled"):Object(G.__)("Published")):Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(xr.createElement)(ci,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(xr.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(xr.createElement)(ro.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(G.__)("Close panel")})),Object(xr.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(xr.createElement)(Ei,null,d&&Object(xr.createElement)(d,null)),m&&Object(xr.createElement)(Pi,{focusOnMount:!0},l&&Object(xr.createElement)(l,null)),a&&Object(xr.createElement)(ro.Spinner,null)),Object(xr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),t}(xr.Component),Ci=Object(Kr.compose)([Object(l.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(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}}),Object(l.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),ro.withFocusReturn,ro.withConstrainedTabbing])(wi);var Ti=Object(Kr.compose)([Object(l.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(l.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;return n||r?Object(xr.createElement)(ro.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(G.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(G.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(G.__)("Switch to Draft")):null}),Bi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(zr.a)(t,e),Object(Fr.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=Gr()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(xr.createElement)("span",{className:b},Object(xr.createElement)(ro.Dashicon,{icon:"cloud"}),u?Object(G.__)("Autosaving"):Object(G.__)("Saving"))}if(o||r)return Object(xr.createElement)(Ti,null);if(!a)return null;if(p||!n&&!i)return Object(xr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(xr.createElement)(ro.Dashicon,{icon:"saved"}),Object(G.__)("Saved"));if(!Object(v.get)(t,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(G.__)("Save as Pending"):Object(G.__)("Save Draft");return d?Object(xr.createElement)(ro.Button,{className:"editor-post-save-draft",onClick:s,shortcut:oo.displayShortcut.primary("s"),isTertiary:!0},f):Object(xr.createElement)(ro.IconButton,{className:"editor-post-save-draft",label:f,onClick:s,shortcut:oo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(xr.Component),xi=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Kr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Bi);var Ii=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var Ai=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.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 Ri=Object(Kr.compose)([Object(l.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(l.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(xr.createElement)(Ai,null,Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}),Li={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ui=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(no.a)(e)),e.onChange=e.onChange.bind(Object(no.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(no.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(no.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(no.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(no.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(no.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(no.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(zr.a)(t,e),Object(Fr.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,c=parseInt(e.target.value,10);n(-1!==o.indexOf(c)?Object(v.without)(o,c):[].concat(Object(x.a)(o),[c]),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(v.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,d=a.availableTerms;if(""!==s&&!l){var p=this.findTerm(d,u,s);if(p)return Object(v.some)(i,function(e){return e===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=q()({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=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(b.a)({},Li,{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(v.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(x.a)(t.state.availableTerms)),a=Object(G.sprintf)(Object(G._x)("%s added","term"),Object(v.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(G.__)("Category"):Object(G.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(yo(n))}),r([].concat(Object(x.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(v.invoke)(this.fetchRequest,["abort"]),Object(v.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=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(t.rest_base),Li)}),this.fetchRequest.then(function(t){var n=e.sortBySelected(yo(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(G.sprintf)(Object(G._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(b.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){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(xr.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(xr.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(xr.createElement)("label",{htmlFor:n},Object(v.unescape)(e.name)),!!e.children.length&&Object(xr.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(v.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(G.__)("Add new category"),Object(G.__)("Add new term")),m=f("new_item_name",Object(G.__)("Add new category"),Object(G.__)("Add new term")),O=f("parent_item",Object(G.__)("Parent Category"),Object(G.__)("Parent Term")),g="— ".concat(O," —"),j=h,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),y="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(G.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(G.__)("Terms")),S=a.length>=8;return[S&&Object(xr.createElement)("label",{key:"filter-label",htmlFor:y},k),S&&Object(xr.createElement)("input",{type:"search",id:y,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(xr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==b?s:c)),!d&&o&&Object(xr.createElement)(ro.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(xr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(xr.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(xr.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(xr.createElement)(ro.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(xr.createElement)(ro.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(xr.Component),Di=Object(Kr.compose)([Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),ro.withSpokenMessages,Kr.withInstanceId,Object(ro.withFilters)("editor.PostTaxonomyType")])(Ui);var Ni=Object(Kr.compose)([Object(l.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?v.identity:r,i=Object(v.filter)(n,function(e){return Object(v.includes)(e.types,t)});return Object(v.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?Di:Oi;return Object(xr.createElement)(xr.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(xr.createElement)(t,{slug:e.slug}),e))})});var Fi=Object(Kr.compose)([Object(l.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(v.some)(n,function(e){return Object(v.includes)(e.types,t)})?r:null}),Mi=n(57),Vi=n.n(Mi),zi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(no.a)(e)),e.stopEditing=e.stopEditing.bind(Object(no.a)(e)),e.state={},e}return Object(zr.a)(t,e),Object(Fr.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(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(G.__)("Type text or HTML")),Object(xr.createElement)(Vi.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(G.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(xr.Component),Ki=Object(Kr.compose)([Object(l.withSelect)(function(e){return{value:(0,e("core/editor").getEditedPostContent)()}}),Object(l.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])(zi),Hi=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(no.a)(n)),n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"onSavePermalink",value:function(e){var t=Yo(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(xr.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(xr.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(xr.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(xr.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(G.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(xr.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(xr.createElement)(ro.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(G.__)("Save")))}}]),t}(xr.Component),Wi=Object(Kr.compose)([Object(l.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(Hi),qi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(no.a)(e)),e.onVisibilityChange=e.onVisibilityChange.bind(Object(no.a)(e)),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(zr.a)(t,e),Object(Fr.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(G.__)("Permalink copied"):Object(G.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=Object(O.safeDecodeURIComponent)(s)||Yo(l)||u,g=n?h+v+m:h;return Object(xr.createElement)("div",{className:"editor-post-permalink"},Object(xr.createElement)(ro.ClipboardButton,{className:Gr()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(xr.createElement)("span",{className:"editor-post-permalink__label"},Object(G.__)("Permalink:")),!b&&Object(xr.createElement)(ro.ExternalLink,{className:"editor-post-permalink__link",href:o?g:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(O.safeDecodeURI)(g),"‎"),b&&Object(xr.createElement)(Wi,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(xr.createElement)(ro.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(G.__)("Edit")),!n&&Object(xr.createElement)(ro.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Qo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(G.__)("Change Permalinks")))}}]),t}(xr.Component),Gi=Object(Kr.compose)([Object(l.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(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(qi),Qi=/[\r\n]+/g,Yi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(no.a)(e)),e.onSelect=e.onSelect.bind(Object(no.a)(e)),e.onUnselect=e.onUnselect.bind(Object(no.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(no.a)(e)),e.redirectHistory=e.redirectHistory.bind(Object(no.a)(e)),e.state={isSelected:!1},e}return Object(zr.a)(t,e),Object(Fr.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(Qi," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===oo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{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=Gr()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),l=Object(wo.decodeEntities)(c);return Object(xr.createElement)(go,{supportKeys:"title"},Object(xr.createElement)("div",{className:"editor-post-title"},Object(xr.createElement)("div",{className:u},Object(xr.createElement)(ro.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(xr.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(G.__)("Add title")),Object(xr.createElement)(Vi.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:l||Object(G.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(xr.createElement)(Gi,null))))}}]),t}(xr.Component),Xi=Object(l.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(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:u}}),Zi=Object(l.withDispatch)(function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=e("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){i({title:e})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),Ji=Object(Kr.compose)(Xi,Zi,Kr.withInstanceId,ro.withFocusOutside)(Yi);var $i=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(fo.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(xr.createElement)(ro.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(G.__)("Move to Trash"))});var ec=Object(l.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 tc=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),nc=n(96);var rc=Object(l.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content,n=Object(G._x)("words","Word count type. Do not translate!");return Object(xr.createElement)("span",{className:"word-count"},Object(nc.count)(t,n))});var oc=Object(l.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(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(G.__)("Document Statistics"),tabIndex:"0"},Object(xr.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Words"),Object(xr.createElement)(rc,null)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Headings"),Object(xr.createElement)("span",{className:"table-of-contents__number"},t)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Paragraphs"),Object(xr.createElement)("span",{className:"table-of-contents__number"},n)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Blocks"),Object(xr.createElement)("span",{className:"table-of-contents__number"},r)))),t>0&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("hr",null),Object(xr.createElement)("h2",{className:"table-of-contents__title"},Object(G.__)("Document Outline")),Object(xr.createElement)(eo,{onSelect:i,hasOutlineItemsDisabled:o})))});var ic=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.hasOutlineItemsDisabled;return Object(xr.createElement)(ro.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(xr.createElement)(ro.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(G.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(e){var t=e.onClose;return Object(xr.createElement)(oc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}),cc=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(this.props.isDirty)return e.returnValue=Object(G.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(xr.Component),ac=Object(l.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(cc),sc=n(45),uc=n.n(sc),lc=n(60),dc=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?v.noop:c,s=e.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,f=p().allowedMimeTypes;i=i||p().maxUploadFileSize,Object(lc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Object(b.a)({post:d()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:f})};var pc=Object(Kr.compose)([Object(l.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(v.every)(u,function(e){return!!e&&e.isValid&&Object(c.hasBlockSupport)(e.name,"reusable",!0)})&&!!s("create","blocks")}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.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(xr.createElement)(xr.Fragment,null,!n&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(G.__)("Add to Reusable Blocks")),n&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(G.__)("Convert to Regular Block"))):null});var bc=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e,t,n){var r=t.clientId,o=t.onToggle,i=void 0===o?v.noop:o,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,s=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(G.__)("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(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return r()}},Object(G.__)("Remove from Reusable Blocks")):null});var fc=Object(l.withSelect)(function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}})(function(e){var t=e.clientIds;return Object(xr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,function(e){var n=e.onClose;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(pc,{clientIds:t,onToggle:n}),1===t.length&&Object(xr.createElement)(bc,{clientId:t[0],onToggle:n}))})}),hc=Object(xr.createElement)(ro.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Icon,{icon:hc}),vc=Object(xr.createElement)(ro.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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"})),Oc=Object(xr.createElement)(ro.Icon,{icon:vc});var gc=Object(Kr.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,i=(0,r.canInsertBlockType)("core/group"),c=o(n),a=1===c.length&&c[0]&&"core/group"===c[0].name;return{isGroupable:i&&c.length&&!a,isUngroupable:a,blocksSelection:c}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.noop:r,i=t.blocksSelection,a=void 0===i?[]:i,s=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){if(a.length){var e=Object(c.switchToBlockType)(a,"core/group");e&&s(n,e),o()}},onConvertFromGroup:function(){if(a.length){var e=a[0].innerBlocks;e.length&&(s(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(xr.createElement)(xr.Fragment,null,o&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:mc,onClick:t},Object(G._x)("Group","verb")),c&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:Oc,onClick:n},Object(G._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))});var jc=Object(l.withSelect)(function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}})(function(e){var t=e.clientIds;return Object(xr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,function(e){var n=e.onClose;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(gc,{clientIds:t,onToggle:n}))})}),_c=function(){var e=Object(H.a)(K.a.mark(function e(t){var n;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({path:Object(O.addQueryArgs)("/wp/v2/search",{search:t,per_page:20,type:"post"})});case 2:return n=e.sent,e.abrupt("return",Object(v.map)(n,function(e){return{id:e.id,url:e.url,title:Object(wo.decodeEntities)(e.title)||Object(G.__)("(no title)")}}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),yc=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).getBlockEditorSettings=uc()(n.getBlockEditorSettings,{maxSize:1}),e.recovery?Object(Mr.a)(n):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(G.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(G.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o){return Object(b.a)({},Object(v.pick)(e,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","template","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:t,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:o?dc:void 0,__experimentalFetchLinkSuggestions:_c})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var e=Object(i.__experimentalTransformStyles)(this.props.settings.styles,".editor-styles-wrapper");Object(v.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:"render",value:function(){var e=this.props,t=e.children,n=e.blocks,r=e.resetEditorBlocks,o=e.isReady,c=e.settings,a=e.meta,s=e.onMetaChange,u=e.reusableBlocks,l=e.resetEditorBlocksWithoutUndoLevel,d=e.hasUploadPermissions;if(!o)return null;var p=this.getBlockEditorSettings(c,a,s,u,d);return Object(xr.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:p,useSubRegistry:!1},t,Object(xr.createElement)(fc,null),Object(xr.createElement)(jc,null))}}]),t}(xr.Component),kc=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.__unstableIsEditorReady,r=t.getEditorBlocks,o=t.getEditedPostAttribute,i=t.__experimentalGetReusableBlocks,c=e("core").canUser;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i(),hasUploadPermissions:Object(v.defaultTo)(c("create","media"),!0)}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.editPost,c=t.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:c,resetEditorBlocksWithoutUndoLevel:function(e){o(e,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(e){i({meta:e})}}})])(yc),Ec=n(63),Sc=n.n(Ec);function Pc(e,t){return Object(xr.forwardRef)(function(n,r){return Y()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(xr.createElement)(t,Object(Ao.a)({ref:r},n))})}function wc(e,t){return function(){return Y()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Cc=Pc("Autocomplete",i.Autocomplete),Tc=Pc("AlignmentToolbar",i.AlignmentToolbar),Bc=Pc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),xc=Pc("BlockControls",i.BlockControls),Ic=Pc("BlockEdit",i.BlockEdit),Ac=Pc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),Rc=Pc("BlockFormatControls",i.BlockFormatControls),Lc=Pc("BlockIcon",i.BlockIcon),Uc=Pc("BlockInspector",i.BlockInspector),Dc=Pc("BlockList",i.BlockList),Nc=Pc("BlockMover",i.BlockMover),Fc=Pc("BlockNavigationDropdown",i.BlockNavigationDropdown),Mc=Pc("BlockSelectionClearer",i.BlockSelectionClearer),Vc=Pc("BlockSettingsMenu",i.BlockSettingsMenu),zc=Pc("BlockTitle",i.BlockTitle),Kc=Pc("BlockToolbar",i.BlockToolbar),Hc=Pc("ColorPalette",i.ColorPalette),Wc=Pc("ContrastChecker",i.ContrastChecker),qc=Pc("CopyHandler",i.CopyHandler),Gc=Pc("DefaultBlockAppender",i.DefaultBlockAppender),Qc=Pc("FontSizePicker",i.FontSizePicker),Yc=Pc("Inserter",i.Inserter),Xc=Pc("InnerBlocks",i.InnerBlocks),Zc=Pc("InspectorAdvancedControls",i.InspectorAdvancedControls),Jc=Pc("InspectorControls",i.InspectorControls),$c=Pc("PanelColorSettings",i.PanelColorSettings),ea=Pc("PlainText",i.PlainText),ta=Pc("RichText",i.RichText),na=Pc("RichTextShortcut",i.RichTextShortcut),ra=Pc("RichTextToolbarButton",i.RichTextToolbarButton),oa=Pc("RichTextInserterItem",i.RichTextInserterItem),ia=Pc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),ca=Pc("MediaPlaceholder",i.MediaPlaceholder),aa=Pc("MediaUpload",i.MediaUpload),sa=Pc("MediaUploadCheck",i.MediaUploadCheck),ua=Pc("MultiBlocksSwitcher",i.MultiBlocksSwitcher),la=Pc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),da=Pc("NavigableToolbar",i.NavigableToolbar),pa=Pc("ObserveTyping",i.ObserveTyping),ba=Pc("PreserveScrollInReorder",i.PreserveScrollInReorder),fa=Pc("SkipToSelectedBlock",i.SkipToSelectedBlock),ha=Pc("URLInput",i.URLInput),ma=Pc("URLInputButton",i.URLInputButton),va=Pc("URLPopover",i.URLPopover),Oa=Pc("Warning",i.Warning),ga=Pc("WritingFlow",i.WritingFlow),ja=wc("createCustomColorsHOC",i.createCustomColorsHOC),_a=wc("getColorClassName",i.getColorClassName),ya=wc("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),ka=wc("getColorObjectByColorValue",i.getColorObjectByColorValue),Ea=wc("getFontSize",i.getFontSize),Sa=wc("getFontSizeClass",i.getFontSizeClass),Pa=wc("withColorContext",i.withColorContext),wa=wc("withColors",i.withColors),Ca=wc("withFontSizes",i.withFontSizes),Ta=[Dr];Object(Br.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=Ta.map(v.clone),t===Object(c.getDefaultBlockName)()&&e.push(Object(v.clone)(Ur))),e}),n.d(t,"AutosaveMonitor",function(){return Wr}),n.d(t,"DocumentOutline",function(){return eo}),n.d(t,"DocumentOutlineCheck",function(){return to}),n.d(t,"VisualEditorGlobalKeyboardShortcuts",function(){return so}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return uo}),n.d(t,"TextEditorGlobalKeyboardShortcuts",function(){return lo}),n.d(t,"EditorHistoryRedo",function(){return po}),n.d(t,"EditorHistoryUndo",function(){return bo}),n.d(t,"EditorNotices",function(){return mo}),n.d(t,"ErrorBoundary",function(){return vo}),n.d(t,"PageAttributesCheck",function(){return Oo}),n.d(t,"PageAttributesOrder",function(){return _o}),n.d(t,"PageAttributesParent",function(){return So}),n.d(t,"PageTemplate",function(){return Po}),n.d(t,"PostAuthor",function(){return Bo}),n.d(t,"PostAuthorCheck",function(){return Co}),n.d(t,"PostComments",function(){return xo}),n.d(t,"PostExcerpt",function(){return Io}),n.d(t,"PostExcerptCheck",function(){return Ro}),n.d(t,"PostFeaturedImage",function(){return Ko}),n.d(t,"PostFeaturedImageCheck",function(){return Uo}),n.d(t,"PostFormat",function(){return qo}),n.d(t,"PostFormatCheck",function(){return Ho}),n.d(t,"PostLastRevision",function(){return Xo}),n.d(t,"PostLastRevisionCheck",function(){return Go}),n.d(t,"PostLockedModal",function(){return ei}),n.d(t,"PostPendingStatus",function(){return ni}),n.d(t,"PostPendingStatusCheck",function(){return ti}),n.d(t,"PostPingbacks",function(){return ri}),n.d(t,"PostPreviewButton",function(){return Jo}),n.d(t,"PostPublishButton",function(){return ci}),n.d(t,"PostPublishButtonLabel",function(){return oi}),n.d(t,"PostPublishPanel",function(){return Ci}),n.d(t,"PostSavedState",function(){return xi}),n.d(t,"PostSchedule",function(){return di}),n.d(t,"PostScheduleCheck",function(){return Ii}),n.d(t,"PostScheduleLabel",function(){return pi}),n.d(t,"PostSticky",function(){return Ri}),n.d(t,"PostStickyCheck",function(){return Ai}),n.d(t,"PostSwitchToDraftButton",function(){return Ti}),n.d(t,"PostTaxonomies",function(){return Ni}),n.d(t,"PostTaxonomiesCheck",function(){return Fi}),n.d(t,"PostTextEditor",function(){return Ki}),n.d(t,"PostTitle",function(){return Ji}),n.d(t,"PostTrash",function(){return $i}),n.d(t,"PostTrashCheck",function(){return ec}),n.d(t,"PostTypeSupportCheck",function(){return go}),n.d(t,"PostVisibility",function(){return ui}),n.d(t,"PostVisibilityLabel",function(){return li}),n.d(t,"PostVisibilityCheck",function(){return tc}),n.d(t,"TableOfContents",function(){return ic}),n.d(t,"UnsavedChangesWarning",function(){return ac}),n.d(t,"WordCount",function(){return rc}),n.d(t,"EditorProvider",function(){return kc}),n.d(t,"blockAutocompleter",function(){return Ur}),n.d(t,"userAutocompleter",function(){return Dr}),n.d(t,"ServerSideRender",function(){return Sc.a}),n.d(t,"Autocomplete",function(){return Cc}),n.d(t,"AlignmentToolbar",function(){return Tc}),n.d(t,"BlockAlignmentToolbar",function(){return Bc}),n.d(t,"BlockControls",function(){return xc}),n.d(t,"BlockEdit",function(){return Ic}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return Ac}),n.d(t,"BlockFormatControls",function(){return Rc}),n.d(t,"BlockIcon",function(){return Lc}),n.d(t,"BlockInspector",function(){return Uc}),n.d(t,"BlockList",function(){return Dc}),n.d(t,"BlockMover",function(){return Nc}),n.d(t,"BlockNavigationDropdown",function(){return Fc}),n.d(t,"BlockSelectionClearer",function(){return Mc}),n.d(t,"BlockSettingsMenu",function(){return Vc}),n.d(t,"BlockTitle",function(){return zc}),n.d(t,"BlockToolbar",function(){return Kc}),n.d(t,"ColorPalette",function(){return Hc}),n.d(t,"ContrastChecker",function(){return Wc}),n.d(t,"CopyHandler",function(){return qc}),n.d(t,"DefaultBlockAppender",function(){return Gc}),n.d(t,"FontSizePicker",function(){return Qc}),n.d(t,"Inserter",function(){return Yc}),n.d(t,"InnerBlocks",function(){return Xc}),n.d(t,"InspectorAdvancedControls",function(){return Zc}),n.d(t,"InspectorControls",function(){return Jc}),n.d(t,"PanelColorSettings",function(){return $c}),n.d(t,"PlainText",function(){return ea}),n.d(t,"RichText",function(){return ta}),n.d(t,"RichTextShortcut",function(){return na}),n.d(t,"RichTextToolbarButton",function(){return ra}),n.d(t,"RichTextInserterItem",function(){return oa}),n.d(t,"__unstableRichTextInputEvent",function(){return ia}),n.d(t,"MediaPlaceholder",function(){return ca}),n.d(t,"MediaUpload",function(){return aa}),n.d(t,"MediaUploadCheck",function(){return sa}),n.d(t,"MultiBlocksSwitcher",function(){return ua}),n.d(t,"MultiSelectScrollIntoView",function(){return la}),n.d(t,"NavigableToolbar",function(){return da}),n.d(t,"ObserveTyping",function(){return pa}),n.d(t,"PreserveScrollInReorder",function(){return ba}),n.d(t,"SkipToSelectedBlock",function(){return fa}),n.d(t,"URLInput",function(){return ha}),n.d(t,"URLInputButton",function(){return ma}),n.d(t,"URLPopover",function(){return va}),n.d(t,"Warning",function(){return Oa}),n.d(t,"WritingFlow",function(){return ga}),n.d(t,"createCustomColorsHOC",function(){return ja}),n.d(t,"getColorClassName",function(){return _a}),n.d(t,"getColorObjectByAttributeValues",function(){return ya}),n.d(t,"getColorObjectByColorValue",function(){return ka}),n.d(t,"getFontSize",function(){return Ea}),n.d(t,"getFontSizeClass",function(){return Sa}),n.d(t,"withColorContext",function(){return Pa}),n.d(t,"withColors",function(){return wa}),n.d(t,"withFontSizes",function(){return Ca}),n.d(t,"mediaUpload",function(){return dc}),n.d(t,"cleanForSlug",function(){return Yo}),n.d(t,"transformStyles",function(){return i.__experimentalTransformStyles})},23:function(e,t){!function(){e.exports=this.React}()},24:function(e,t,n){"use strict";var r=n(37);var o=n(36);function i(e,t){return Object(r.a)(e)||function(e,t){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})},244: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;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');return 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;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');return 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},26:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t){!function(){e.exports=this.wp.url}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30: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})},31:function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(e){return!!e&&"object"==typeof e}function a(){var e={clear:function(){e.head=null}};return e}function s(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,u;function l(){n=o?new WeakMap:a()}function d(){var n,r,o,i,c,a=arguments.length;for(i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=u(c)).isUniqueByDependants||(n.lastDependants&&!s(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(s(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),u=o?function(e){var t,o,i,s,u=n,l=!0;for(t=0;t<e.length;t++){if(!c(o=e[t])){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((s=a()).isUniqueByDependants=l,u.set(r,s)),u.get(r)}:function(){return n},d.getDependants=t,d.clear=l,l(),d}},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)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},33:function(e,t,n){e.exports=n(90)()},34:function(e,t){!function(){e.exports=this.wp.apiFetch}()},35:function(e,t){!function(){e.exports=this.wp.dataControls}()},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})},37:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},38: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})},4:function(e,t){!function(){e.exports=this.wp.data}()},41:function(e,t){!function(){e.exports=this.wp.viewport}()},42: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})},43:function(e,t){!function(){e.exports=this.wp.deprecated}()},45: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}},5: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})},51:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},56:function(e,t){!function(){e.exports=this.wp.nux}()},57:function(e,t,n){"use strict";t.__esModule=!0;var r=n(130);t.default=r.default},58:function(e,t,n){e.exports=n(244)},6:function(e,t){!function(){e.exports=this.wp.compose}()},60:function(e,t){!function(){e.exports=this.wp.mediaUtils}()},63:function(e,t){!function(){e.exports=this.wp.serverSideRender}()},64:function(e,t){!function(){e.exports=this.wp.autop}()},69:function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};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])}(t,e),function(e){return function(n){return function(r){var o,i,c=t[r.type],a=n(r);if(c)for(o=0;o<c.length;o++)(i=c[o](r,e))&&e.dispatch(i);return a}}}}}()},7:function(e,t){!function(){e.exports=this.wp.blockEditor}()},72:function(e,t){!function(){e.exports=this.wp.coreData}()},8:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(15);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?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}},89:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9:function(e,t){!function(){e.exports=this.wp.blocks}()},90:function(e,t,n){"use strict";var r=n(89);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}},96:function(e,t){!function(){e.exports=this.wp.wordcount}()}});
14
  Licensed under the MIT License (MIT), see
15
  http://jedwatson.github.io/classnames
16
  */
17
+ !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))e.push(o.apply(null,r));else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}void 0!==e&&e.exports?e.exports=o:void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},17: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})},18:function(e,t,n){"use strict";var r=n(30);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){!function(){e.exports=this.wp.richText}()},21:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(38);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}},22:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},225:function(e,t,n){"use strict";n.r(t);var r={};n.d(r,"setupEditor",function(){return ie}),n.d(r,"resetPost",function(){return ce}),n.d(r,"resetAutosave",function(){return ae}),n.d(r,"__experimentalRequestPostUpdateStart",function(){return se}),n.d(r,"__experimentalRequestPostUpdateSuccess",function(){return ue}),n.d(r,"__experimentalRequestPostUpdateFailure",function(){return le}),n.d(r,"updatePost",function(){return de}),n.d(r,"setupEditorState",function(){return pe}),n.d(r,"editPost",function(){return be}),n.d(r,"__experimentalOptimisticUpdatePost",function(){return fe}),n.d(r,"savePost",function(){return he}),n.d(r,"refreshPost",function(){return me}),n.d(r,"trashPost",function(){return ve}),n.d(r,"autosave",function(){return Oe}),n.d(r,"redo",function(){return ge}),n.d(r,"undo",function(){return je}),n.d(r,"createUndoLevel",function(){return _e}),n.d(r,"updatePostLock",function(){return ye}),n.d(r,"__experimentalFetchReusableBlocks",function(){return ke}),n.d(r,"__experimentalReceiveReusableBlocks",function(){return Ee}),n.d(r,"__experimentalSaveReusableBlock",function(){return Se}),n.d(r,"__experimentalDeleteReusableBlock",function(){return Pe}),n.d(r,"__experimentalUpdateReusableBlockTitle",function(){return we}),n.d(r,"__experimentalConvertBlockToStatic",function(){return Ce}),n.d(r,"__experimentalConvertBlockToReusable",function(){return Te}),n.d(r,"enablePublishSidebar",function(){return Be}),n.d(r,"disablePublishSidebar",function(){return xe}),n.d(r,"lockPostSaving",function(){return Ie}),n.d(r,"unlockPostSaving",function(){return Ae}),n.d(r,"resetEditorBlocks",function(){return Re}),n.d(r,"updateEditorSettings",function(){return Le}),n.d(r,"resetBlocks",function(){return De}),n.d(r,"receiveBlocks",function(){return Ne}),n.d(r,"updateBlock",function(){return Fe}),n.d(r,"updateBlockAttributes",function(){return Me}),n.d(r,"selectBlock",function(){return Ve}),n.d(r,"startMultiSelect",function(){return ze}),n.d(r,"stopMultiSelect",function(){return Ke}),n.d(r,"multiSelect",function(){return He}),n.d(r,"clearSelectedBlock",function(){return We}),n.d(r,"toggleSelection",function(){return qe}),n.d(r,"replaceBlocks",function(){return Ge}),n.d(r,"replaceBlock",function(){return Qe}),n.d(r,"moveBlocksDown",function(){return Ye}),n.d(r,"moveBlocksUp",function(){return Xe}),n.d(r,"moveBlockToPosition",function(){return Ze}),n.d(r,"insertBlock",function(){return Je}),n.d(r,"insertBlocks",function(){return $e}),n.d(r,"showInsertionPoint",function(){return et}),n.d(r,"hideInsertionPoint",function(){return tt}),n.d(r,"setTemplateValidity",function(){return nt}),n.d(r,"synchronizeTemplate",function(){return rt}),n.d(r,"mergeBlocks",function(){return ot}),n.d(r,"removeBlocks",function(){return it}),n.d(r,"removeBlock",function(){return ct}),n.d(r,"toggleBlockMode",function(){return at}),n.d(r,"startTyping",function(){return st}),n.d(r,"stopTyping",function(){return ut}),n.d(r,"enterFormattedText",function(){return lt}),n.d(r,"exitFormattedText",function(){return dt}),n.d(r,"insertDefaultBlock",function(){return pt}),n.d(r,"updateBlockListSettings",function(){return bt});var o={};n.d(o,"hasEditorUndo",function(){return gt}),n.d(o,"hasEditorRedo",function(){return jt}),n.d(o,"isEditedPostNew",function(){return _t}),n.d(o,"hasChangedContent",function(){return yt}),n.d(o,"isEditedPostDirty",function(){return kt}),n.d(o,"isCleanNewPost",function(){return Et}),n.d(o,"getCurrentPost",function(){return St}),n.d(o,"getCurrentPostType",function(){return Pt}),n.d(o,"getCurrentPostId",function(){return wt}),n.d(o,"getCurrentPostRevisionsCount",function(){return Ct}),n.d(o,"getCurrentPostLastRevisionId",function(){return Tt}),n.d(o,"getPostEdits",function(){return Bt}),n.d(o,"getReferenceByDistinctEdits",function(){return xt}),n.d(o,"getCurrentPostAttribute",function(){return It}),n.d(o,"getEditedPostAttribute",function(){return Rt}),n.d(o,"getAutosaveAttribute",function(){return Lt}),n.d(o,"getEditedPostVisibility",function(){return Ut}),n.d(o,"isCurrentPostPending",function(){return Dt}),n.d(o,"isCurrentPostPublished",function(){return Nt}),n.d(o,"isCurrentPostScheduled",function(){return Ft}),n.d(o,"isEditedPostPublishable",function(){return Mt}),n.d(o,"isEditedPostSaveable",function(){return Vt}),n.d(o,"isEditedPostEmpty",function(){return zt}),n.d(o,"isEditedPostAutosaveable",function(){return Kt}),n.d(o,"getAutosave",function(){return Ht}),n.d(o,"hasAutosave",function(){return Wt}),n.d(o,"isEditedPostBeingScheduled",function(){return qt}),n.d(o,"isEditedPostDateFloating",function(){return Gt}),n.d(o,"isSavingPost",function(){return Qt}),n.d(o,"didPostSaveRequestSucceed",function(){return Yt}),n.d(o,"didPostSaveRequestFail",function(){return Xt}),n.d(o,"isAutosavingPost",function(){return Zt}),n.d(o,"isPreviewingPost",function(){return Jt}),n.d(o,"getEditedPostPreviewLink",function(){return $t}),n.d(o,"getSuggestedPostFormat",function(){return en}),n.d(o,"getBlocksForSerialization",function(){return tn}),n.d(o,"getEditedPostContent",function(){return nn}),n.d(o,"__experimentalGetReusableBlock",function(){return rn}),n.d(o,"__experimentalIsSavingReusableBlock",function(){return on}),n.d(o,"__experimentalIsFetchingReusableBlock",function(){return cn}),n.d(o,"__experimentalGetReusableBlocks",function(){return an}),n.d(o,"getStateBeforeOptimisticTransaction",function(){return sn}),n.d(o,"isPublishingPost",function(){return un}),n.d(o,"isPermalinkEditable",function(){return ln}),n.d(o,"getPermalink",function(){return dn}),n.d(o,"getPermalinkParts",function(){return pn}),n.d(o,"inSomeHistory",function(){return bn}),n.d(o,"isPostLocked",function(){return fn}),n.d(o,"isPostSavingLocked",function(){return hn}),n.d(o,"isPostLockTakeover",function(){return mn}),n.d(o,"getPostLockUser",function(){return vn}),n.d(o,"getActivePostLock",function(){return On}),n.d(o,"canUserUseUnfilteredHTML",function(){return gn}),n.d(o,"isPublishSidebarEnabled",function(){return jn}),n.d(o,"getEditorBlocks",function(){return _n}),n.d(o,"__unstableIsEditorReady",function(){return yn}),n.d(o,"getEditorSettings",function(){return kn}),n.d(o,"getBlockDependantsCacheBust",function(){return Sn}),n.d(o,"getBlockName",function(){return Pn}),n.d(o,"isBlockValid",function(){return wn}),n.d(o,"getBlockAttributes",function(){return Cn}),n.d(o,"getBlock",function(){return Tn}),n.d(o,"getBlocks",function(){return Bn}),n.d(o,"__unstableGetBlockWithoutInnerBlocks",function(){return xn}),n.d(o,"getClientIdsOfDescendants",function(){return In}),n.d(o,"getClientIdsWithDescendants",function(){return An}),n.d(o,"getGlobalBlockCount",function(){return Rn}),n.d(o,"getBlocksByClientId",function(){return Ln}),n.d(o,"getBlockCount",function(){return Un}),n.d(o,"getBlockSelectionStart",function(){return Dn}),n.d(o,"getBlockSelectionEnd",function(){return Nn}),n.d(o,"getSelectedBlockCount",function(){return Fn}),n.d(o,"hasSelectedBlock",function(){return Mn}),n.d(o,"getSelectedBlockClientId",function(){return Vn}),n.d(o,"getSelectedBlock",function(){return zn}),n.d(o,"getBlockRootClientId",function(){return Kn}),n.d(o,"getBlockHierarchyRootClientId",function(){return Hn}),n.d(o,"getAdjacentBlockClientId",function(){return Wn}),n.d(o,"getPreviousBlockClientId",function(){return qn}),n.d(o,"getNextBlockClientId",function(){return Gn}),n.d(o,"getSelectedBlocksInitialCaretPosition",function(){return Qn}),n.d(o,"getMultiSelectedBlockClientIds",function(){return Yn}),n.d(o,"getMultiSelectedBlocks",function(){return Xn}),n.d(o,"getFirstMultiSelectedBlockClientId",function(){return Zn}),n.d(o,"getLastMultiSelectedBlockClientId",function(){return Jn}),n.d(o,"isFirstMultiSelectedBlock",function(){return $n}),n.d(o,"isBlockMultiSelected",function(){return er}),n.d(o,"isAncestorMultiSelected",function(){return tr}),n.d(o,"getMultiSelectedBlocksStartClientId",function(){return nr}),n.d(o,"getMultiSelectedBlocksEndClientId",function(){return rr}),n.d(o,"getBlockOrder",function(){return or}),n.d(o,"getBlockIndex",function(){return ir}),n.d(o,"isBlockSelected",function(){return cr}),n.d(o,"hasSelectedInnerBlock",function(){return ar}),n.d(o,"isBlockWithinSelection",function(){return sr}),n.d(o,"hasMultiSelection",function(){return ur}),n.d(o,"isMultiSelecting",function(){return lr}),n.d(o,"isSelectionEnabled",function(){return dr}),n.d(o,"getBlockMode",function(){return pr}),n.d(o,"isTyping",function(){return br}),n.d(o,"isCaretWithinFormattedText",function(){return fr}),n.d(o,"getBlockInsertionPoint",function(){return hr}),n.d(o,"isBlockInsertionPointVisible",function(){return mr}),n.d(o,"isValidTemplate",function(){return vr}),n.d(o,"getTemplate",function(){return Or}),n.d(o,"getTemplateLock",function(){return gr}),n.d(o,"canInsertBlockType",function(){return jr}),n.d(o,"getInserterItems",function(){return _r}),n.d(o,"hasInserterItems",function(){return yr}),n.d(o,"getBlockListSettings",function(){return kr});var i=n(7),c=n(9),a=(n(72),n(109),n(56)),s=n(20),u=n(41),l=n(4),d=n(35),p=n(15),b=n(8),f=n(32),h=n(58),m=n.n(h),v=n(2),O=n(28),g={insertUsage:{},isPublishSidebarEnabled:!0},j={},_=Object(b.a)({},i.SETTINGS_DEFAULTS,{richEditingEnabled:!0,codeEditingEnabled:!0,enableCustomFields:!1}),y=new Set(["meta"]),k="core/editor",E="post-update",S="SAVE_POST_NOTICE_ID",P="TRASH_POST_NOTICE_ID",w=/%(?:postname|pagename)%/,C=6e4,T=["title","excerpt","content"],B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n,r){var o=t(n,r),i=void 0===n||Object(v.includes)(e.resetTypes,r.type),c=n!==o;if(!c&&!i)return n;c&&void 0!==n||(o=Object(b.a)({},o));var a=Object(v.includes)(e.ignoreTypes,r.type);return o.isDirty=a?n.isDirty:!i&&c,o}}},x=n(18),I={resetTypes:[],ignoreTypes:[],shouldOverwriteState:function(){return!1}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){(e=Object(b.a)({},I,e)).shouldOverwriteState=Object(v.overSome)([e.shouldOverwriteState,function(t){return Object(v.includes)(e.ignoreTypes,t.type)}]);var n={past:[],present:t(void 0,{}),future:[],lastAction:null,shouldCreateUndoLevel:!1},r=e,o=r.resetTypes,i=void 0===o?[]:o,c=r.shouldOverwriteState,a=void 0===c?function(){return!1}:c;return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n,r=arguments.length>1?arguments[1]:void 0,o=e.past,c=e.present,s=e.future,u=e.lastAction,l=e.shouldCreateUndoLevel,d=u;switch(r.type){case"UNDO":return o.length?{past:Object(v.dropRight)(o),present:Object(v.last)(o),future:[c].concat(Object(x.a)(s)),lastAction:null,shouldCreateUndoLevel:!1}:e;case"REDO":return s.length?{past:[].concat(Object(x.a)(o),[c]),present:Object(v.first)(s),future:Object(v.drop)(s),lastAction:null,shouldCreateUndoLevel:!1}:e;case"CREATE_UNDO_LEVEL":return Object(b.a)({},e,{lastAction:null,shouldCreateUndoLevel:!0})}var p=t(c,r);if(Object(v.includes)(i,r.type))return{past:[],present:p,future:[],lastAction:null,shouldCreateUndoLevel:!1};if(c===p)return e;var f=o,h=d;return!l&&o.length&&a(r,d)||(f=[].concat(Object(x.a)(o),[c]),h=r),{past:f,present:p,future:[],shouldCreateUndoLevel:!1,lastAction:h}}}};function R(e){return e&&"object"===Object(f.a)(e)&&"raw"in e?e.raw:e}function L(e,t){return e===t?Object(b.a)({},e):t}function U(e,t){return"EDIT_POST"===e.type&&function(e,t){return Object(v.isEqual)(Object(v.keys)(e),Object(v.keys)(t))}(e.edits,t.edits)}var D=Object(v.flow)([l.combineReducers,A({resetTypes:["SETUP_EDITOR_STATE"],ignoreTypes:["RESET_POST","UPDATE_POST"],shouldOverwriteState:function(e,t){return"RESET_EDITOR_BLOCKS"===e.type?!e.shouldCreateUndoLevel:!(!t||e.type!==t.type)&&U(e,t)}})])({blocks:B({resetTypes:["SETUP_EDITOR_STATE","REQUEST_POST_UPDATE_START"]})(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{value:[]},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESET_EDITOR_BLOCKS":return t.blocks===e.value?e:{value:t.blocks}}return e}),edits:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"EDIT_POST":return Object(v.reduce)(t.edits,function(t,n,r){return n!==e[r]&&(t=L(e,t),y.has(r)?t[r]=Object(b.a)({},t[r],n):t[r]=n),t},e);case"UPDATE_POST":case"RESET_POST":var n="UPDATE_POST"===t.type?function(e){return t.edits[e]}:function(e){return R(t.post[e])};return Object(v.reduce)(e,function(t,r,o){return Object(v.isEqual)(r,n(o))?(delete(t=L(e,t))[o],t):t},e);case"RESET_EDITOR_BLOCKS":return"content"in e?Object(v.omit)(e,"content"):e}return e}});var N=Object(l.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(v.reduce)(t.results,function(t,n){var r=n.reusableBlock,o=r.id,i=r.title,c={clientId:n.parsedBlock.clientId,title:i};return Object(v.isEqual)(t[o],c)||((t=L(e,t))[o]=c),t},e);case"UPDATE_REUSABLE_BLOCK_TITLE":var n=t.id,r=t.title;return e[n]&&e[n].title!==r?Object(b.a)({},e,Object(p.a)({},n,Object(b.a)({},e[n],{title:r}))):e;case"SAVE_REUSABLE_BLOCK_SUCCESS":var o=t.id,i=t.updatedId;if(o===i)return e;var c=e[o];return Object(b.a)({},Object(v.omit)(e,o),Object(p.a)({},i,c));case"REMOVE_REUSABLE_BLOCK":var a=t.id;return Object(v.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(b.a)({},e,Object(p.a)({},n,!0)):e;case"FETCH_REUSABLE_BLOCKS_SUCCESS":case"FETCH_REUSABLE_BLOCKS_FAILURE":var r=t.id;return Object(v.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(b.a)({},e,Object(p.a)({},t.id,!0));case"SAVE_REUSABLE_BLOCK_SUCCESS":case"SAVE_REUSABLE_BLOCK_FAILURE":var n=t.id;return Object(v.omit)(e,n)}return e}});var F=m()(Object(l.combineReducers)({editor:D,initialEdits: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"SETUP_EDITOR":if(!t.edits)break;return t.edits;case"SETUP_EDITOR_STATE":return"content"in e?Object(v.omit)(e,"content"):e;case"UPDATE_POST":return Object(v.reduce)(t.edits,function(t,n,r){return t.hasOwnProperty(r)?(delete(t=L(e,t))[r],t):t},e);case"RESET_POST":return j}return e},currentPost:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":case"UPDATE_POST":var n;if(t.post)n=t.post;else{if(!t.edits)return e;n=Object(b.a)({},e,t.edits)}return Object(v.mapValues)(n,R)}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(b.a)({},e,{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return Object(b.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":return{requesting:!0,successful:!1,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_SUCCESS":return{requesting:!1,successful:!0,error:null,options:t.options||{}};case"REQUEST_POST_UPDATE_FAILURE":return{requesting:!1,successful:!1,error:t.error,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:N,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(b.a)({},e,{isValid:t.isValid})}return e},previewLink: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"REQUEST_POST_UPDATE_SUCCESS":return t.post.preview_link?t.post.preview_link:t.post.link?Object(O.addQueryArgs)(t.post.link,{preview:!0}):e;case"REQUEST_POST_UPDATE_START":if(e&&t.options.isPreview)return null}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(b.a)({},e,Object(p.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(v.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}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return Object(b.a)({},e,t.settings)}return e}})),M=n(69),V=n.n(M),z=n(22),K=n.n(z),H=n(42),W=n(34),q=n.n(W),G=n(1),Q=n(43),Y=n.n(Q);function X(e){var t=e.previousPost,n=e.post,r=e.postType;if(Object(v.get)(e.options,["isAutosave"]))return[];var o,i=["publish","private","future"],c=Object(v.includes)(i,t.status),a=Object(v.includes)(i,n.status),s=Object(v.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:S,type:"snackbar",actions:u}]}return[]}function Z(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(G.__)("Publishing failed"),private:Object(G.__)("Publishing failed"),future:Object(G.__)("Scheduling failed")};return[i||-1===o.indexOf(n.status)?Object(G.__)("Updating failed"):c[n.status],{id:S}]}function J(e){return[e.error.message&&"unknown_error"!==e.error.code?e.error.message:Object(G.__)("Trashing failed"),{id:P}]}var $=K.a.mark(ie),ee=K.a.mark(ae),te=K.a.mark(he),ne=K.a.mark(me),re=K.a.mark(ve),oe=K.a.mark(Oe);function ie(e,t,n){var r,o;return K.a.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,{type:"SETUP_EDITOR",post:e,edits:t,template:n};case 2:return r=Object(v.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=8,Re(o);case 8:return i.next=10,pe(e);case 10:case"end":return i.stop()}},$)}function ce(e){return{type:"RESET_POST",post:e}}function ae(e){var t;return K.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return Y()("resetAutosave action (`core/editor` store)",{alternative:"receiveAutosaves action (`core` store)",plugin:"Gutenberg"}),n.next=3,Object(d.select)(k,"getCurrentPostId");case 3:return t=n.sent,n.next=6,Object(d.dispatch)("core","receiveAutosaves",t,e);case 6:return n.abrupt("return",{type:"__INERT__"});case 7:case"end":return n.stop()}},ee)}function se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",optimist:{type:h.BEGIN,id:E},options:e}}function ue(e){var t=e.previousPost,n=e.post,r=e.isRevision,o=e.options,i=e.postType;return{type:"REQUEST_POST_UPDATE_SUCCESS",previousPost:t,post:n,optimist:{type:r?h.REVERT:h.COMMIT,id:E},options:o,postType:i}}function le(e){var t=e.post,n=e.edits,r=e.error,o=e.options;return{type:"REQUEST_POST_UPDATE_FAILURE",optimist:{type:h.REVERT,id:E},post:t,edits:n,error:r,options:o}}function de(e){return{type:"UPDATE_POST",edits:e}}function pe(e){return{type:"SETUP_EDITOR_STATE",post:e}}function be(e){return{type:"EDIT_POST",edits:e}}function fe(e){return Object(b.a)({},de(e),{optimist:{id:E}})}function he(){var e,t,n,r,o,i,c,a,s,u,l,p,f,h,m,O,g,j=arguments;return K.a.wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return e=j.length>0&&void 0!==j[0]?j[0]:{},_.next=3,Object(d.select)(k,"isEditedPostSaveable");case 3:if(_.sent){_.next=6;break}return _.abrupt("return");case 6:return _.next=8,Object(d.select)(k,"getPostEdits");case 8:return t=_.sent,(n=!!e.isAutosave)&&(t=Object(v.pick)(t,T)),_.next=13,Object(d.select)(k,"isEditedPostNew");case 13:return _.sent&&(t=Object(b.a)({status:"draft"},t)),_.next=17,Object(d.select)(k,"getCurrentPost");case 17:return r=_.sent,_.next=20,Object(d.select)(k,"getEditedPostContent");case 20:return o=_.sent,i=Object(b.a)({},t,{content:o,id:r.id}),_.next=24,Object(d.select)(k,"getCurrentPostType");case 24:return c=_.sent,_.next=27,Object(d.select)("core","getPostType",c);case 27:return a=_.sent,_.next=30,Object(d.dispatch)(k,"__experimentalRequestPostUpdateStart",e);case 30:return _.next=32,Object(d.dispatch)(k,"__experimentalOptimisticUpdatePost",i);case 32:if(s="/wp/v2/".concat(a.rest_base,"/").concat(r.id),u="PUT",!n){_.next=48;break}return _.next=37,Object(d.select)("core","getCurrentUser");case 37:return l=_.sent,p=l?l.id:void 0,_.next=41,Object(d.select)("core","getAutosave",r.type,r.id,p);case 41:f=_.sent,h=Object(v.mapValues)(Object(v.pick)(f,T),R),i=Object(b.a)({},Object(v.pick)(r,T),h,i),s+="/autosaves",u="POST",_.next=52;break;case 48:return _.next=50,Object(d.dispatch)("core/notices","removeNotice",S);case 50:return _.next=52,Object(d.dispatch)("core/notices","removeNotice","autosave-exists");case 52:return _.prev=52,_.next=55,Object(d.apiFetch)({path:s,method:u,data:i});case 55:if(m=_.sent,!n){_.next=61;break}return _.next=59,Object(d.dispatch)("core","receiveAutosaves",r.id,m);case 59:_.next=63;break;case 61:return _.next=63,Object(d.dispatch)(k,"resetPost",m);case 63:return _.next=65,Object(d.dispatch)(k,"__experimentalRequestPostUpdateSuccess",{previousPost:r,post:m,options:e,postType:a,isRevision:m.id!==r.id});case 65:if(!((O=X({previousPost:r,post:m,postType:a,options:e})).length>0)){_.next=69;break}return _.next=69,d.dispatch.apply(void 0,["core/notices","createSuccessNotice"].concat(Object(x.a)(O)));case 69:_.next=79;break;case 71:return _.prev=71,_.t0=_.catch(52),_.next=75,Object(d.dispatch)(k,"__experimentalRequestPostUpdateFailure",{post:r,edits:t,error:_.t0,options:e});case 75:if(!((g=Z({post:r,edits:t,error:_.t0})).length>0)){_.next=79;break}return _.next=79,d.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(g)));case 79:case"end":return _.stop()}},te,null,[[52,71]])}function me(){var e,t,n,r;return K.a.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Object(d.select)(k,"getCurrentPost");case 2:return e=o.sent,o.next=5,Object(d.select)(k,"getCurrentPostType");case 5:return t=o.sent,o.next=8,Object(d.select)("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(d.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(d.dispatch)(k,"resetPost",r);case 14:case"end":return o.stop()}},ne)}function ve(){var e,t,n;return K.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,Object(d.select)(k,"getCurrentPostType");case 2:return e=r.sent,r.next=5,Object(d.select)("core","getPostType",e);case 5:return t=r.sent,r.next=8,Object(d.dispatch)("core/notices","removeNotice",P);case 8:return r.prev=8,r.next=11,Object(d.select)(k,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(d.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,Object(d.dispatch)(k,"resetPost",Object(b.a)({},n,{status:"trash"}));case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,d.dispatch.apply(void 0,["core/notices","createErrorNotice"].concat(Object(x.a)(J({error:r.t0}))));case 22:case"end":return r.stop()}},re,null,[[8,18]])}function Oe(e){return K.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(d.dispatch)(k,"savePost",Object(b.a)({isAutosave:!0},e));case 2:case"end":return t.stop()}},oe)}function ge(){return{type:"REDO"}}function je(){return{type:"UNDO"}}function _e(){return{type:"CREATE_UNDO_LEVEL"}}function ye(e){return{type:"UPDATE_POST_LOCK",lock:e}}function ke(e){return{type:"FETCH_REUSABLE_BLOCKS",id:e}}function Ee(e){return{type:"RECEIVE_REUSABLE_BLOCKS",results:e}}function Se(e){return{type:"SAVE_REUSABLE_BLOCK",id:e}}function Pe(e){return{type:"DELETE_REUSABLE_BLOCK",id:e}}function we(e,t){return{type:"UPDATE_REUSABLE_BLOCK_TITLE",id:e,title:t}}function Ce(e){return{type:"CONVERT_BLOCK_TO_STATIC",clientId:e}}function Te(e){return{type:"CONVERT_BLOCK_TO_REUSABLE",clientIds:Object(v.castArray)(e)}}function Be(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function xe(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Ie(e){return{type:"LOCK_POST_SAVING",lockName:e}}function Ae(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Re(e){return{type:"RESET_EDITOR_BLOCKS",blocks:e,shouldCreateUndoLevel:!1!==(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).__unstableShouldCreateUndoLevel}}function Le(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var Ue=function(e){return K.a.mark(function t(){var n,r,o,i=arguments;return K.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:for(Y()("`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,d.dispatch.apply(void 0,["core/block-editor",e].concat(r));case 4:case"end":return t.stop()}},t)})},De=Ue("resetBlocks"),Ne=Ue("receiveBlocks"),Fe=Ue("updateBlock"),Me=Ue("updateBlockAttributes"),Ve=Ue("selectBlock"),ze=Ue("startMultiSelect"),Ke=Ue("stopMultiSelect"),He=Ue("multiSelect"),We=Ue("clearSelectedBlock"),qe=Ue("toggleSelection"),Ge=Ue("replaceBlocks"),Qe=Ue("replaceBlock"),Ye=Ue("moveBlocksDown"),Xe=Ue("moveBlocksUp"),Ze=Ue("moveBlockToPosition"),Je=Ue("insertBlock"),$e=Ue("insertBlocks"),et=Ue("showInsertionPoint"),tt=Ue("hideInsertionPoint"),nt=Ue("setTemplateValidity"),rt=Ue("synchronizeTemplate"),ot=Ue("mergeBlocks"),it=Ue("removeBlocks"),ct=Ue("removeBlock"),at=Ue("toggleBlockMode"),st=Ue("startTyping"),ut=Ue("stopTyping"),lt=Ue("enterFormattedText"),dt=Ue("exitFormattedText"),pt=Ue("insertDefaultBlock"),bt=Ue("updateBlockListSettings"),ft=n(24),ht=n(31),mt=n(51),vt=n(64),Ot={};function gt(e){return e.editor.past.length>0}function jt(e){return e.editor.future.length>0}function _t(e){return"auto-draft"===St(e).status}function yt(e){return e.editor.present.blocks.isDirty||"content"in e.editor.present.edits}function kt(e){return!!yt(e)||(Object.keys(e.editor.present.edits).length>0||bn(e,kt))}function Et(e){return!kt(e)&&_t(e)}function St(e){return e.currentPost}function Pt(e){return e.currentPost.type}function wt(e){return St(e).id||null}function Ct(e){return Object(v.get)(St(e),["_links","version-history",0,"count"],0)}function Tt(e){return Object(v.get)(St(e),["_links","predecessor-version",0,"id"],null)}var Bt=Object(ht.a)(function(e){return Object(b.a)({},e.initialEdits,e.editor.present.edits)},function(e){return[e.editor.present.edits,e.initialEdits]}),xt=Object(ht.a)(function(){return[]},function(e){return[e.editor]});function It(e,t){var n=St(e);if(n.hasOwnProperty(t))return n[t]}var At=Object(ht.a)(function(e,t){var n=Bt(e);return n.hasOwnProperty(t)?Object(b.a)({},It(e,t),n[t]):It(e,t)},function(e,t){return[Object(v.get)(e.editor.present.edits,[t],Ot),Object(v.get)(e.currentPost,[t],Ot)]});function Rt(e,t){switch(t){case"content":return nn(e)}var n=Bt(e);return n.hasOwnProperty(t)?y.has(t)?At(e,t):n[t]:It(e,t)}var Lt=Object(l.createRegistrySelector)(function(e){return function(t,n){if(Y()("`wp.data.select( 'core/editor' ).getAutosaveAttribute( attributeName )`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"}),Object(v.includes)(T,n)){var r=Pt(t),o=wt(t),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(r,o,i);return c?R(c[n]):void 0}}});function Ut(e){return"private"===Rt(e,"status")?"private":Rt(e,"password")?"password":"public"}function Dt(e){return"pending"===St(e).status}function Nt(e){var t=St(e);return-1!==["publish","private"].indexOf(t.status)||"future"===t.status&&!Object(mt.isInTheFuture)(new Date(Number(Object(mt.getDate)(t.date))-C))}function Ft(e){return"future"===St(e).status&&!Nt(e)}function Mt(e){var t=St(e);return kt(e)||-1===["publish","private","future"].indexOf(t.status)}function Vt(e){return!Qt(e)&&(!!Rt(e,"title")||!!Rt(e,"excerpt")||!zt(e))}function zt(e){var t=e.editor.present.blocks.value;if(t.length&&!("content"in Bt(e))){if(t.length>1)return!1;var n=t[0].name;if(n!==Object(c.getDefaultBlockName)()&&n!==Object(c.getFreeformContentHandlerName)())return!1}return!nn(e)}var Kt=Object(l.createRegistrySelector)(function(e){return function(t){if(!Vt(t))return!1;var n=Pt(t),r=wt(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(v.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!yt(t)||["title","excerpt"].some(function(e){return R(c[e])!==Rt(t,e)})))}}),Ht=Object(l.createRegistrySelector)(function(e){return function(t){Y()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Pt(t),r=wt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(v.mapValues)(Object(v.pick)(i,T),R)}}),Wt=Object(l.createRegistrySelector)(function(e){return function(t){Y()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=Pt(t),r=wt(t),o=Object(v.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}});function qt(e){var t=Rt(e,"date"),n=new Date(Number(Object(mt.getDate)(t))-C);return Object(mt.isInTheFuture)(n)}function Gt(e){var t=Rt(e,"date"),n=Rt(e,"modified"),r=Rt(e,"status");return("draft"===r||"auto-draft"===r||"pending"===r)&&t===n}function Qt(e){return e.saving.requesting}function Yt(e){return e.saving.successful}function Xt(e){return!!e.saving.error}function Zt(e){return Qt(e)&&!!e.saving.options.isAutosave}function Jt(e){return Qt(e)&&!!e.saving.options.isPreview}function $t(e){var t=Rt(e,"featured_media"),n=e.previewLink;return n&&t?Object(O.addQueryArgs)(n,{_thumbnail_id:t}):n}function en(e){var t,n=e.editor.present.blocks.value;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 tn(e){var t=e.editor.present.blocks.value;return 1===t.length&&Object(c.isUnmodifiedDefaultBlock)(t[0])?[]:t}var nn=Object(ht.a)(function(e){var t=Bt(e);if("content"in t)return t.content;var n=tn(e),r=Object(c.serialize)(n);return 1===n.length&&n[0].name===Object(c.getFreeformContentHandlerName)()?Object(vt.removep)(r):r},function(e){return[e.editor.present.blocks.value,e.editor.present.edits.content,e.initialEdits.content]}),rn=Object(ht.a)(function(e,t){var n=e.reusableBlocks.data[t];if(!n)return null;var r=isNaN(parseInt(t));return Object(b.a)({},n,{id:r?t:+t,isTemporary:r})},function(e,t){return[e.reusableBlocks.data[t]]});function on(e,t){return e.reusableBlocks.isSaving[t]||!1}function cn(e,t){return!!e.reusableBlocks.isFetching[t]}var an=Object(ht.a)(function(e){return Object(v.map)(e.reusableBlocks.data,function(t,n){return rn(e,n)})},function(e){return[e.reusableBlocks.data]});function sn(e,t){var n=Object(v.find)(e.optimist,function(e){return e.beforeState&&Object(v.get)(e.action,["optimist","id"])===t});return n?n.beforeState:null}function un(e){if(!Qt(e))return!1;if(!Nt(e))return!1;var t=sn(e,E);return!!t&&!Nt(t)}function ln(e){var t=Rt(e,"permalink_template");return w.test(t)}function dn(e){var t=pn(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return ln(e)?n+r+o:n}function pn(e){var t=Rt(e,"permalink_template");if(!t)return null;var n=Rt(e,"slug")||Rt(e,"generated_slug"),r=t.split(w),o=Object(ft.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function bn(e,t){var n=e.optimist;return!!n&&n.some(function(e){var n=e.beforeState;return n&&t(n)})}function fn(e){return e.postLock.isLocked}function hn(e){return Object.keys(e.postSavingLock).length>0}function mn(e){return e.postLock.isTakeover}function vn(e){return e.postLock.user}function On(e){return e.postLock.activePostLock}function gn(e){return Object(v.has)(St(e),["_links","wp:action-unfiltered-html"])}function jn(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:g.isPublishSidebarEnabled}function _n(e){return e.editor.present.blocks.value}function yn(e){return e.isReady}function kn(e){return e.editorSettings}function En(e){return Object(l.createRegistrySelector)(function(t){return function(n){var r;Y()("`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 Sn=En("getBlockDependantsCacheBust"),Pn=En("getBlockName"),wn=En("isBlockValid"),Cn=En("getBlockAttributes"),Tn=En("getBlock"),Bn=En("getBlocks"),xn=En("__unstableGetBlockWithoutInnerBlocks"),In=En("getClientIdsOfDescendants"),An=En("getClientIdsWithDescendants"),Rn=En("getGlobalBlockCount"),Ln=En("getBlocksByClientId"),Un=En("getBlockCount"),Dn=En("getBlockSelectionStart"),Nn=En("getBlockSelectionEnd"),Fn=En("getSelectedBlockCount"),Mn=En("hasSelectedBlock"),Vn=En("getSelectedBlockClientId"),zn=En("getSelectedBlock"),Kn=En("getBlockRootClientId"),Hn=En("getBlockHierarchyRootClientId"),Wn=En("getAdjacentBlockClientId"),qn=En("getPreviousBlockClientId"),Gn=En("getNextBlockClientId"),Qn=En("getSelectedBlocksInitialCaretPosition"),Yn=En("getMultiSelectedBlockClientIds"),Xn=En("getMultiSelectedBlocks"),Zn=En("getFirstMultiSelectedBlockClientId"),Jn=En("getLastMultiSelectedBlockClientId"),$n=En("isFirstMultiSelectedBlock"),er=En("isBlockMultiSelected"),tr=En("isAncestorMultiSelected"),nr=En("getMultiSelectedBlocksStartClientId"),rr=En("getMultiSelectedBlocksEndClientId"),or=En("getBlockOrder"),ir=En("getBlockIndex"),cr=En("isBlockSelected"),ar=En("hasSelectedInnerBlock"),sr=En("isBlockWithinSelection"),ur=En("hasMultiSelection"),lr=En("isMultiSelecting"),dr=En("isSelectionEnabled"),pr=En("getBlockMode"),br=En("isTyping"),fr=En("isCaretWithinFormattedText"),hr=En("getBlockInsertionPoint"),mr=En("isBlockInsertionPointVisible"),vr=En("isValidTemplate"),Or=En("getTemplate"),gr=En("getTemplateLock"),jr=En("canInsertBlockType"),_r=En("getInserterItems"),yr=En("hasInserterItems"),kr=En("getBlockListSettings"),Er=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.id,o=n.dispatch,e.next=4,q()({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,q()({path:"/wp/v2/".concat(i.rest_base,"/").concat(r)});case 11:e.t0=e.sent,a=[e.t0],e.next=18;break;case 15:return e.next=17,q()({path:"/wp/v2/".concat(i.rest_base,"?per_page=-1")});case 17:a=e.sent;case 18:(s=Object(v.compact)(Object(v.map)(a,function(e){if("publish"!==e.status||e.content.protected)return null;var t=Object(c.parse)(e.content.raw);return{reusableBlock:{id:e.id,title:R(e.title)},parsedBlock:1===t.length?t[0]:Object(c.createBlock)("core/template",{},t)}}))).length&&o(Ee(s)),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)}}(),Sr=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s,u,d,p,b,f,h,m,v,O,g;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({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,a=n.getState(),s=rn(a,o),u=s.clientId,d=s.title,p=s.isTemporary,b=Object(l.select)("core/block-editor").getBlock(u),f=Object(c.serialize)("core/template"===b.name?b.innerBlocks:b),h=p?{title:d,content:f,status:"publish"}:{id:o,title:d,content:f,status:"publish"},m=p?"/wp/v2/".concat(r.rest_base):"/wp/v2/".concat(r.rest_base,"/").concat(o),v=p?"POST":"PUT",e.prev=14,e.next=17,q()({path:m,data:h,method:v});case 17:O=e.sent,i({type:"SAVE_REUSABLE_BLOCK_SUCCESS",updatedId:O.id,id:o}),g=p?Object(G.__)("Block created."):Object(G.__)("Block updated."),Object(l.dispatch)("core/notices").createSuccessNotice(g,{id:"REUSABLE_BLOCK_NOTICE_ID",type:"snackbar"}),Object(l.dispatch)("core/block-editor").__unstableSaveReusableBlock(o,O.id),e.next=28;break;case 24:e.prev=24,e.t0=e.catch(14),i({type:"SAVE_REUSABLE_BLOCK_FAILURE",id:o}),Object(l.dispatch)("core/notices").createErrorNotice(e.t0.message,{id:"REUSABLE_BLOCK_NOTICE_ID"});case 28:case"end":return e.stop()}},e,null,[[14,24]])}));return function(t,n){return e.apply(this,arguments)}}(),Pr=function(){var e=Object(H.a)(K.a.mark(function e(t,n){var r,o,i,a,s,u,d,p,b,f;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({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=rn(i(),o))&&!s.isTemporary){e.next=10;break}return e.abrupt("return");case 10:return u=Object(l.select)("core/block-editor").getBlocks(),d=u.filter(function(e){return Object(c.isReusableBlock)(e)&&e.attributes.ref===o}),p=d.map(function(e){return e.clientId}),b=Object(v.uniqueId)(),a({type:"REMOVE_REUSABLE_BLOCK",id:o,optimist:{type:h.BEGIN,id:b}}),Object(l.dispatch)("core/block-editor").removeBlocks([].concat(Object(x.a)(p),[s.clientId])),e.prev=16,e.next=19,q()({path:"/wp/v2/".concat(r.rest_base,"/").concat(o),method:"DELETE"});case 19:a({type:"DELETE_REUSABLE_BLOCK_SUCCESS",id:o,optimist:{type:h.COMMIT,id:b}}),f=Object(G.__)("Block deleted."),Object(l.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:h.REVERT,id:b}}),Object(l.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)}}(),wr={FETCH_REUSABLE_BLOCKS:function(e,t){Er(e,t)},SAVE_REUSABLE_BLOCK:function(e,t){Sr(e,t)},DELETE_REUSABLE_BLOCK:function(e,t){Pr(e,t)},RECEIVE_REUSABLE_BLOCKS:function(e){Object(l.dispatch)("core/block-editor").receiveBlocks(Object(v.map)(e.results,"parsedBlock"))},CONVERT_BLOCK_TO_STATIC:function(e,t){var n,r=t.getState(),o=Object(l.select)("core/block-editor").getBlock(e.clientId),i=rn(r,o.attributes.ref),a=Object(l.select)("core/block-editor").getBlock(i.clientId);n="core/template"===a.name?a.innerBlocks.map(function(e){return Object(c.cloneBlock)(e)}):[Object(c.cloneBlock)(a)],Object(l.dispatch)("core/block-editor").replaceBlocks(o.clientId,n)},CONVERT_BLOCK_TO_REUSABLE:function(e,t){var n,r=t.dispatch;1===e.clientIds.length?n=Object(l.select)("core/block-editor").getBlock(e.clientIds[0]):(n=Object(c.createBlock)("core/template",{},Object(l.select)("core/block-editor").getBlocksByClientId(e.clientIds)),Object(l.dispatch)("core/block-editor").receiveBlocks([n]));var o={id:Object(v.uniqueId)("reusable"),clientId:n.clientId,title:Object(G.__)("Untitled Reusable Block")};r(Ee([{reusableBlock:o,parsedBlock:n}])),r(Se(o.id)),Object(l.dispatch)("core/block-editor").replaceBlocks(e.clientIds,Object(c.createBlock)("core/block",{ref:o.id})),Object(l.dispatch)("core/block-editor").receiveBlocks([n])}};var Cr=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=V()(wr)(n)(e.dispatch),e.dispatch=t,e},Tr=Object(l.registerStore)(k,{reducer:F,selectors:o,actions:r,controls:d.controls,persist:["preferences"]});Cr(Tr);var Br=n(26),xr=n(0);function Ir(){return Object(l.select)("core/block-editor").getBlockInsertionPoint().rootClientId}function Ar(e){return Object(l.select)("core/block-editor").getInserterItems(e)}function Rr(){var e=Object(l.select)("core/block-editor"),t=e.getSelectedBlockClientId,n=e.getBlockName,r=t();return r?n(r):null}var Lr=Object(v.once)(function(){Object(l.dispatch)("core/editor").__experimentalFetchReusableBlocks()});var Ur=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.getBlockInsertionParentClientId,n=void 0===t?Ir:t,r=e.getInserterItems,o=void 0===r?Ar:r,a=e.getSelectedBlockName,s=void 0===a?Rr:a;return{name:"blocks",className:"editor-autocompleters__block",triggerPrefix:"/",options:function(){Lr();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(x.a)(r),[t])},getOptionLabel:function(e){var t=e.icon,n=e.title;return[Object(xr.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}}}(),Dr={name:"users",className:"editor-autocompleters__user",triggerPrefix:"@",options:function(e){var t="";return e&&(t="?search="+encodeURIComponent(e)),q()({path:"/wp/v2/users"+t})},isDebounced:!0,getOptionKeywords:function(e){return[e.slug,e.name]},getOptionLabel:function(e){return[Object(xr.createElement)("img",{key:"avatar",className:"editor-autocompleters__user-avatar",alt:"",src:e.avatar_urls[24]}),Object(xr.createElement)("span",{key:"name",className:"editor-autocompleters__user-name"},e.name),Object(xr.createElement)("span",{key:"slug",className:"editor-autocompleters__user-slug"},e.slug)]},getOptionCompletion:function(e){return"@".concat(e.slug)}},Nr=n(11),Fr=n(10),Mr=n(12),Vr=n(14),zr=n(13),Kr=n(6),Hr=function(e){function t(){return Object(Nr.a)(this,t),Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))}return Object(zr.a)(t,e),Object(Fr.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;clearTimeout(this.pendingSave);var n=this.props.autosaveInterval;e&&(this.pendingSave=setTimeout(function(){return t.props.autosave()},1e3*n))}},{key:"render",value:function(){return null}}]),t}(xr.Component),Wr=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isEditedPostDirty,r=t.isEditedPostAutosaveable,o=t.getReferenceByDistinctEdits,i=t.isAutosavingPost,c=e("core/editor").getEditorSettings().autosaveInterval;return{isDirty:n(),isAutosaveable:r(),editsReference:o(),isAutosaving:i(),autosaveInterval:c}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave}})])(Hr),qr=n(16),Gr=n.n(qr),Qr=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(xr.createElement)("li",{className:Gr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(xr.createElement)("a",{href:a,className:"document-outline__button",onClick:s},Object(xr.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),c.map(function(e,t){var n=e.clientId;return Object(xr.createElement)("strong",{key:t,className:"document-outline__level"},Object(xr.createElement)(i.BlockTitle,{clientId:n}))}),Object(xr.createElement)("strong",{className:"document-outline__level"},r),Object(xr.createElement)("span",{className:"document-outline__item-content"},t)))},Yr=Object(xr.createElement)("em",null,Object(G.__)("(Empty heading)")),Xr=[Object(xr.createElement)("br",{key:"incorrect-break"}),Object(xr.createElement)("em",{key:"incorrect-message"},Object(G.__)("(Incorrect heading level)"))],Zr=[Object(xr.createElement)("br",{key:"incorrect-break-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-h1"},Object(G.__)("(Your theme may already use a H1 for the post title)"))],Jr=[Object(xr.createElement)("br",{key:"incorrect-break-multiple-h1"}),Object(xr.createElement)("em",{key:"incorrect-message-multiple-h1"},Object(G.__)("(Multiple H1 headings are not recommended)"))],$r=function(e){return!e.attributes.content||0===e.attributes.content.length},eo=Object(Kr.compose)(Object(l.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(v.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(v.flatMap)(t,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Object(b.a)({},t,{path:n,level:t.attributes.level,isEmpty:$r(t)}):e(t.innerBlocks,[].concat(Object(x.a)(n),[t]))})}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,p=Object(v.countBy)(a,"level")[1]>1;return Object(xr.createElement)("div",{className:"document-outline"},Object(xr.createElement)("ul",null,d&&Object(xr.createElement)(Qr,{level:Object(G.__)("Title"),isValid:!0,onSelect:o,href:"#".concat(l.id),isDisabled:c},r),a.map(function(e,t){var n=e.level>u+1,r=!(e.isEmpty||n||!e.level||1===e.level&&(p||d));return u=e.level,Object(xr.createElement)(Qr,{key:t,level:"H".concat(e.level),isValid:r,path:e.path,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?Yr:Object(s.getTextContent)(Object(s.create)({html:e.attributes.content})),n&&Xr,1===e.level&&p&&Jr,d&&1===e.level&&!p&&Zr)})))});var to=Object(l.withSelect)(function(e){return{blocks:e("core/block-editor").getBlocks()}})(function(e){var t=e.blocks,n=e.children;return Object(v.filter)(t,function(e){return"core/heading"===e.name}).length<1?null:n}),no=n(5),ro=n(3),oo=n(19);var io=Object(Kr.compose)([Object(l.withSelect)(function(e){return{isDirty:(0,e("core/editor").isEditedPostDirty)()}}),Object(l.withDispatch)(function(e,t,n){var r=n.select,o=e("core/editor").savePost;return{onSave:function(){(0,r("core/editor").isEditedPostDirty)()&&o()}}})])(function(e){var t=e.onSave;return Object(xr.createElement)(ro.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(p.a)({},oo.rawShortcut.primary("s"),function(e){e.preventDefault(),t()})})}),co=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).undoOrRedo=e.undoOrRedo.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"undoOrRedo",value:function(e){var t=this.props,n=t.onRedo,r=t.onUndo;e.shiftKey?n():r(),e.preventDefault()}},{key:"render",value:function(){var e;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(xr.createElement)(ro.KeyboardShortcuts,{shortcuts:(e={},Object(p.a)(e,oo.rawShortcut.primary("z"),this.undoOrRedo),Object(p.a)(e,oo.rawShortcut.primaryShift("z"),this.undoOrRedo),e)}),Object(xr.createElement)(io,null))}}]),t}(xr.Component),ao=Object(l.withDispatch)(function(e){var t=e("core/editor");return{onRedo:t.redo,onUndo:t.undo}})(co),so=ao;function uo(){return Y()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(xr.createElement)(ao,null)}function lo(){return Object(xr.createElement)(io,null)}var po=Object(Kr.compose)([Object(l.withSelect)(function(e){return{hasRedo:e("core/editor").hasEditorRedo()}}),Object(l.withDispatch)(function(e){return{redo:e("core/editor").redo}})])(function(e){var t=e.hasRedo,n=e.redo;return Object(xr.createElement)(ro.IconButton,{icon:"redo",label:Object(G.__)("Redo"),shortcut:oo.displayShortcut.primaryShift("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__redo"})});var bo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{hasUndo:e("core/editor").hasEditorUndo()}}),Object(l.withDispatch)(function(e){return{undo:e("core/editor").undo}})])(function(e){var t=e.hasUndo,n=e.undo;return Object(xr.createElement)(ro.IconButton,{icon:"undo",label:Object(G.__)("Undo"),shortcut:oo.displayShortcut.primary("z"),"aria-disabled":!t,onClick:t?n:void 0,className:"editor-history__undo"})}),fo=n(21);var ho=Object(Kr.compose)([Object(l.withSelect)(function(e){return{isValid:e("core/block-editor").isValidTemplate()}}),Object(l.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(fo.a)(e,["isValid"]);return t?null:Object(xr.createElement)(ro.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning"},Object(xr.createElement)("p",null,Object(G.__)("The content of your post doesn’t match the template assigned to your post type.")),Object(xr.createElement)("div",null,Object(xr.createElement)(ro.Button,{isDefault:!0,onClick:n.resetTemplateValidity},Object(G.__)("Keep it as is")),Object(xr.createElement)(ro.Button,{onClick:function(){window.confirm(Object(G.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0},Object(G.__)("Reset the template"))))});var mo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{notices:e("core/notices").getNotices()}}),Object(l.withDispatch)(function(e){return{onRemove:e("core/notices").removeNotice}})])(function(e){var t=e.notices,n=e.onRemove,r=Object(v.filter)(t,{isDismissible:!0,type:"default"}),o=Object(v.filter)(t,{isDismissible:!1,type:"default"}),i=Object(v.filter)(t,{type:"snackbar"});return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(ro.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(xr.createElement)(ro.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(xr.createElement)(ho,null)),Object(xr.createElement)(ro.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))}),vo=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).reboot=e.reboot.bind(Object(no.a)(e)),e.getContent=e.getContent.bind(Object(no.a)(e)),e.state={error:null},e}return Object(zr.a)(t,e),Object(Fr.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(l.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(xr.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(xr.createElement)(ro.Button,{key:"recovery",onClick:this.reboot,isLarge:!0},Object(G.__)("Attempt Recovery")),Object(xr.createElement)(ro.ClipboardButton,{key:"copy-post",text:this.getContent,isLarge:!0},Object(G.__)("Copy Post Text")),Object(xr.createElement)(ro.ClipboardButton,{key:"copy-error",text:e.stack,isLarge:!0},Object(G.__)("Copy Error"))]},Object(G.__)("The editor has encountered an unexpected error.")):this.props.children}}]),t}(xr.Component);var Oo=Object(l.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(v.get)(n,["supports","page-attributes"],!1)&&Object(v.isEmpty)(t)?null:r});var go=Object(l.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(v.some)(Object(v.castArray)(r),function(e){return!!t.supports[e]})),o?n:null}),jo=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(xr.createElement)(ro.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(G.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(v.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})});var _o=Object(Kr.compose)([Object(l.withSelect)(function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}}),Object(l.withDispatch)(function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}})])(function(e){return Object(xr.createElement)(go,{supportKeys:"page-attributes"},Object(xr.createElement)(jo,e))});function yo(e){var t=e.map(function(e){return Object(b.a)({children:[],parent:null},e)}),n=Object(v.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(b.a)({},t,{children:r&&r.length?e(r):[]})})}(n[0]||[])}var ko=Object(l.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(v.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}}),Eo=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateParent:function(e){t({parent:e||0})}}}),So=Object(Kr.compose)([ko,Eo])(function(e){var t=e.parent,n=e.postType,r=e.items,o=e.onUpdateParent,i=Object(v.get)(n,["hierarchical"],!1),c=Object(v.get)(n,["labels","parent_item_colon"]),a=r||[];if(!i||!c||!a.length)return null;var s=yo(a.map(function(e){return{id:e.id,parent:e.parent,name:e.title.raw?e.title.raw:"#".concat(e.id," (").concat(Object(G.__)("no title"),")")}}));return Object(xr.createElement)(ro.TreeSelect,{className:"editor-page-attributes__parent",label:c,noOptionLabel:"(".concat(Object(G.__)("no parent"),")"),tree:s,selectedId:t,onChange:o})});var Po=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}}),Object(l.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(v.isEmpty)(t)?null:Object(xr.createElement)(ro.SelectControl,{label:Object(G.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(v.map)(t,function(e,t){return{value:t,label:e}})})}),wo=n(54);var Co=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(v.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(xr.createElement)(go,{supportKeys:"author"},r)}),To=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setAuthorId=e.setAuthorId.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(xr.createElement)(Co,null,Object(xr.createElement)("label",{htmlFor:o},Object(G.__)("Author")),Object(xr.createElement)("select",{id:o,value:t,onChange:this.setAuthorId,className:"editor-post-author__select"},r.map(function(e){return Object(xr.createElement)("option",{key:e.id,value:e.id},Object(wo.decodeEntities)(e.name))})))}}]),t}(xr.Component),Bo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:e("core").getAuthors()}}),Object(l.withDispatch)(function(e){return{onUpdateAuthor:function(t){e("core/editor").editPost({author:t})}}}),Kr.withInstanceId])(To);var xo=Object(Kr.compose)([Object(l.withSelect)(function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(fo.a)(e,["commentStatus"]);return Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Allow Comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})});var Io=Object(Kr.compose)([Object(l.withSelect)(function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}}),Object(l.withDispatch)(function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}})])(function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(xr.createElement)("div",{className:"editor-post-excerpt"},Object(xr.createElement)(ro.TextareaControl,{label:Object(G.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(xr.createElement)(ro.ExternalLink,{href:Object(G.__)("https://codex.wordpress.org/Excerpt")},Object(G.__)("Learn more about manual excerpts")))}),Ao=n(17);var Ro=function(e){return Object(xr.createElement)(go,Object(Ao.a)({},e,{supportKeys:"excerpt"}))};var Lo=Object(l.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(v.some)(Object(v.castArray)(o),function(e){var n=Object(v.get)(t,[e],!1);return"post-thumbnails"===e&&Object(v.isArray)(n)?Object(v.includes)(n,r):n})?n:null});var Uo=function(e){return Object(xr.createElement)(Lo,{supportKeys:"post-thumbnails"},Object(xr.createElement)(go,Object(Ao.a)({},e,{supportKeys:"thumbnail"})))},Do=["image"],No=Object(G.__)("Featured Image"),Fo=Object(G.__)("Set Featured Image"),Mo=Object(G.__)("Remove Image");var Vo=Object(l.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}}),zo=Object(l.withDispatch)(function(e){var t=e("core/editor").editPost;return{onUpdateImage:function(e){t({featured_media:e.id})},onRemoveImage:function(){t({featured_media:0})}}}),Ko=Object(Kr.compose)(Vo,zo,Object(ro.withFilters)("editor.PostFeaturedImage"))(function(e){var t,n,r,o=e.currentPostId,c=e.featuredImageId,a=e.onUpdateImage,s=e.onRemoveImage,u=e.media,l=e.postType,d=Object(v.get)(l,["labels"],{}),p=Object(xr.createElement)("p",null,Object(G.__)("To edit the featured image, you need permission to upload media."));if(u){var b=Object(Br.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",u.id,o);Object(v.has)(u,["media_details","sizes",b])?(t=u.media_details.sizes[b].width,n=u.media_details.sizes[b].height,r=u.media_details.sizes[b].source_url):(t=u.media_details.width,n=u.media_details.height,r=u.source_url)}return Object(xr.createElement)(Uo,null,Object(xr.createElement)("div",{className:"editor-post-featured-image"},Object(xr.createElement)(i.MediaUploadCheck,{fallback:p},Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||No,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var o=e.open;return Object(xr.createElement)(ro.Button,{className:c?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:o,"aria-label":c?Object(G.__)("Edit or update the image"):null},!!c&&u&&Object(xr.createElement)(ro.ResponsiveWrapper,{naturalWidth:t,naturalHeight:n},Object(xr.createElement)("img",{src:r,alt:""})),!!c&&!u&&Object(xr.createElement)(ro.Spinner,null),!c&&(d.set_featured_image||Fo))},value:c})),!!c&&u&&!u.isLoading&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(i.MediaUpload,{title:d.featured_image||No,onSelect:a,allowedTypes:Do,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(xr.createElement)(ro.Button,{onClick:t,isDefault:!0,isLarge:!0},Object(G.__)("Replace Image"))}})),!!c&&Object(xr.createElement)(i.MediaUploadCheck,null,Object(xr.createElement)(ro.Button,{onClick:s,isLink:!0,isDestructive:!0},d.remove_featured_image||Mo))))});var Ho=Object(l.withSelect)(function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}})(function(e){var t=e.disablePostFormats,n=Object(fo.a)(e,["disablePostFormats"]);return!t&&Object(xr.createElement)(go,Object(Ao.a)({},n,{supportKeys:"post-formats"}))}),Wo=[{id:"aside",caption:Object(G.__)("Aside")},{id:"gallery",caption:Object(G.__)("Gallery")},{id:"link",caption:Object(G.__)("Link")},{id:"image",caption:Object(G.__)("Image")},{id:"quote",caption:Object(G.__)("Quote")},{id:"standard",caption:Object(G.__)("Standard")},{id:"status",caption:Object(G.__)("Status")},{id:"video",caption:Object(G.__)("Video")},{id:"audio",caption:Object(G.__)("Audio")},{id:"chat",caption:Object(G.__)("Chat")}];var qo=Object(Kr.compose)([Object(l.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(v.union)([o],Object(v.get)(i,["formats"],[])),suggestedFormat:r()}}),Object(l.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=Wo.filter(function(e){return Object(v.includes)(o,e.id)}),s=Object(v.find)(a,function(e){return e.id===i});return Object(xr.createElement)(Ho,null,Object(xr.createElement)("div",{className:"editor-post-format"},Object(xr.createElement)("div",{className:"editor-post-format__content"},Object(xr.createElement)("label",{htmlFor:c},Object(G.__)("Post Format")),Object(xr.createElement)(ro.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(xr.createElement)("div",{className:"editor-post-format__suggestion"},Object(G.__)("Suggestion:")," ",Object(xr.createElement)(ro.Button,{isLink:!0,onClick:function(){return t(s.id)}},s.caption))))});var Go=Object(l.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(xr.createElement)(go,{supportKeys:"revisions"},r)});function Qo(e,t){return Object(O.addQueryArgs)(e,t)}function Yo(e){return Object(v.toLower)(Object(v.deburr)(Object(v.trim)(e.replace(/[\s\./_]+/g,"-"),"-")))}var Xo=Object(l.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(xr.createElement)(Go,null,Object(xr.createElement)(ro.IconButton,{href:Qo("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:"backup"},Object(G.sprintf)(Object(G._n)("%d Revision","%d Revisions",n),n)))});var Zo=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).openPreviewWindow=e.openPreviewWindow.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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){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}),function(e){var t=Object(xr.renderToString)(Object(xr.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(xr.createElement)(ro.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(xr.createElement)(ro.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(xr.createElement)(ro.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(xr.createElement)("p",null,Object(G.__)("Generating preview…"))));t+='\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',t=Object(Br.applyFilters)("editor.PostPreview.interstitialMarkup",t),e.write(t),e.title=Object(G.__)("Generating preview…"),e.close()}(this.previewWindow.document)):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(xr.createElement)(ro.Button,{isLarge:!0,className:"editor-post-preview",href:o,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow},Object(G._x)("Preview","imperative verb"),Object(xr.createElement)("span",{className:"screen-reader-text"},Object(G.__)("(opens in a new tab)")),Object(xr.createElement)(a.DotTip,{tipId:"core/editor.preview"},Object(G.__)("Click “Preview” to load a preview of this page, so you can make sure you’re happy with your blocks.")))}}]),t}(xr.Component),Jo=Object(Kr.compose)([Object(l.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(v.get)(b,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(a("status"))}}),Object(l.withDispatch)(function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}}),Object(Kr.ifCondition)(function(e){return e.isViewable})])(Zo),$o=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).sendPostLock=e.sendPostLock.bind(Object(no.a)(e)),e.receivePostLock=e.receivePostLock.bind(Object(no.a)(e)),e.releasePostLock=e.releasePostLock.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){var e=this.getHookName();Object(Br.addAction)("heartbeat.send",e,this.sendPostLock),Object(Br.addAction)("heartbeat.tick",e,this.receivePostLock)}},{key:"componentWillUnmount",value:function(){var e=this.getHookName();Object(Br.removeAction)("heartbeat.send",e),Object(Br.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(O.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:n,action:"edit",_wpnonce:i.nonce}),l=Qo("edit.php",{post_type:Object(v.get)(c,["slug"])}),d=Object(G.__)("Exit the Editor");return Object(xr.createElement)(ro.Modal,{title:o?Object(G.__)("Someone else has taken over this post."):Object(G.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissable:!1,className:"editor-post-locked-modal"},!!s&&Object(xr.createElement)("img",{src:s,alt:Object(G.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(G.sprintf)(Object(G.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),a):Object(G.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(ro.Button,{isPrimary:!0,isLarge:!0,href:l},d))),!o&&Object(xr.createElement)("div",null,Object(xr.createElement)("div",null,a?Object(G.sprintf)(Object(G.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),a):Object(G.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(xr.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(xr.createElement)(ro.Button,{isDefault:!0,isLarge:!0,href:l},d),Object(xr.createElement)(Jo,null),Object(xr.createElement)(ro.Button,{isPrimary:!0,isLarge:!0,href:u},Object(G.__)("Take Over")))))}}]),t}(xr.Component),ei=Object(Kr.compose)(Object(l.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(l.withDispatch)(function(e){var t=e("core/editor");return{autosave:t.autosave,updatePostLock:t.updatePostLock}}),Kr.withInstanceId,Object(Kr.withGlobalEvents)({beforeunload:"releasePostLock"}))($o);var ti=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(v.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 ni=Object(Kr.compose)(Object(l.withSelect)(function(e){return{status:e("core/editor").getEditedPostAttribute("status")}}),Object(l.withDispatch)(function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}}))(function(e){var t=e.status,n=e.onUpdateStatus;return Object(xr.createElement)(ti,null,Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Pending Review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))});var ri=Object(Kr.compose)([Object(l.withSelect)(function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(fo.a)(e,["pingStatus"]);return Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Allow Pingbacks & Trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})});var oi=Object(Kr.compose)([Object(l.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(v.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;return o?Object(G.__)("Publishing…"):t&&r&&!c?Object(G.__)("Updating…"):n&&r&&!c?Object(G.__)("Scheduling…"):i?t?Object(G.__)("Update"):n?Object(G.__)("Schedule"):Object(G.__)("Publish"):Object(G.__)("Submit for Review")}),ii=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).call(this,e))).buttonNode=Object(xr.createRef)(),n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"render",value:function(){var e,t=this.props,n=t.forceIsDirty,r=t.forceIsSaving,o=t.hasPublishAction,i=t.isBeingScheduled,c=t.isOpen,s=t.isPostSavingLocked,u=t.isPublishable,l=t.isPublished,d=t.isSaveable,p=t.isSaving,b=t.isToggle,f=t.onSave,h=t.onStatusChange,m=t.onSubmit,O=void 0===m?v.noop:m,g=t.onToggle,j=t.visibility,_=p||r||!d||s||!u&&!n,y=l||p||r||!d||!u&&!n;e=o?i?"future":"private"===j?"private":"publish":"pending";var k={"aria-disabled":_,className:"editor-post-publish-button",isBusy:p&&l,isLarge:!0,isPrimary:!0,onClick:function(){_||(O(),h(e),f())}},E={"aria-disabled":y,"aria-expanded":c,className:"editor-post-publish-panel__toggle",isBusy:p&&l,isPrimary:!0,onClick:function(){y||g()}},S=i?Object(G.__)("Schedule…"):Object(G.__)("Publish…"),P=Object(xr.createElement)(oi,{forceIsSaving:r}),w=b?E:k,C=b?S:P;return Object(xr.createElement)(ro.Button,Object(Ao.a)({ref:this.buttonNode},w),C,Object(xr.createElement)(a.DotTip,{tipId:"core/editor.publish"},Object(G.__)("Finished writing? That’s great, let’s get this published right now. Just click “Publish” and you’re good to go.")))}}]),t}(xr.Component),ci=Object(Kr.compose)([Object(l.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;return{isSaving:n(),isBeingScheduled:r(),visibility:o(),isSaveable:c(),isPostSavingLocked:s(),isPublishable:a(),isPublished:i(),hasPublishAction:Object(v.get)(u(),["_links","wp:action-publish"],!1),postType:l()}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.editPost;return{onStatusChange:function(e){return n({status:e})},onSave:t.savePost}})])(ii),ai=[{value:"public",label:Object(G.__)("Public"),info:Object(G.__)("Visible to everyone.")},{value:"private",label:Object(G.__)("Private"),info:Object(G.__)("Only visible to site admins and editors.")},{value:"password",label:Object(G.__)("Password Protected"),info:Object(G.__)("Protected with a password you choose. Only those with the password can view this post.")}],si=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).setPublic=n.setPublic.bind(Object(no.a)(n)),n.setPrivate=n.setPrivate.bind(Object(no.a)(n)),n.setPasswordProtected=n.setPasswordProtected.bind(Object(no.a)(n)),n.updatePassword=n.updatePassword.bind(Object(no.a)(n)),n.state={hasPassword:!!e.password},n}return Object(zr.a)(t,e),Object(Fr.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(G.__)("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,o=e.password;n("private"===t?"draft":r,o||""),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(xr.createElement)("fieldset",{key:"visibility-selector",className:"editor-post-visibility__dialog-fieldset"},Object(xr.createElement)("legend",{className:"editor-post-visibility__dialog-legend"},Object(G.__)("Post Visibility")),ai.map(function(e){var t=e.value,n=e.label,i=e.info;return Object(xr.createElement)("div",{key:t,className:"editor-post-visibility__choice"},Object(xr.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(xr.createElement)("label",{htmlFor:"editor-post-".concat(t,"-").concat(r),className:"editor-post-visibility__dialog-label"},n),Object(xr.createElement)("p",{id:"editor-post-".concat(t,"-").concat(r,"-description"),className:"editor-post-visibility__dialog-info"},i))})),this.state.hasPassword&&Object(xr.createElement)("div",{className:"editor-post-visibility__dialog-password",key:"password-selector"},Object(xr.createElement)("label",{htmlFor:"editor-post-visibility__dialog-password-input-".concat(r),className:"screen-reader-text"},Object(G.__)("Create password")),Object(xr.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(G.__)("Use a secure password")}))]}}]),t}(xr.Component),ui=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getEditedPostVisibility;return{status:n("status"),visibility:r(),password:n("password")}}),Object(l.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]:null;r({status:e,password:t})}}}),Kr.withInstanceId])(si);var li=Object(l.withSelect)(function(e){return{visibility:e("core/editor").getEditedPostVisibility()}})(function(e){var t=e.visibility;return Object(v.find)(ai,{value:t}).label});var di=Object(Kr.compose)([Object(l.withSelect)(function(e){return{date:e("core/editor").getEditedPostAttribute("date")}}),Object(l.withDispatch)(function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}})])(function(e){var t=e.date,n=e.onUpdateDate,r=Object(mt.__experimentalGetSettings)(),o=/a(?!\\)/i.test(r.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(xr.createElement)(ro.DateTimePicker,{key:"date-time-picker",currentDate:t,onChange:n,is12Hour:o})});var pi=Object(l.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(mt.__experimentalGetSettings)();return t&&!n?Object(mt.dateI18n)(r.formats.datetimeAbbreviated,t):Object(G.__)("Immediately")}),bi={per_page:-1,orderby:"count",order:"desc",_fields:"id,name"},fi=function(e,t){return e.toLowerCase()===t.toLowerCase()},hi=function(e){return Object(b.a)({},e,{name:Object(v.unescape)(e.name)})},mi=function(e){return Object(v.map)(e,hi)},vi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(no.a)(e)),e.searchTerms=Object(v.throttle)(e.searchTerms.bind(Object(no.a)(e)),500),e.findOrCreateTerm=e.findOrCreateTerm.bind(Object(no.a)(e)),e.state={loading:!Object(v.isEmpty)(e.props.terms),availableTerms:[],selectedTerms:[]},e}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"componentDidMount",value:function(){var e=this;Object(v.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(v.invoke)(this.initRequest,["abort"]),Object(v.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(b.a)({},bi,t),o=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(mi).then(function(t){e.setState(function(e){return{availableTerms:e.availableTerms.concat(t.filter(function(t){return!Object(v.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]:[]).reduce(function(t,n){var r=Object(v.find)(e.state.availableTerms,function(e){return e.id===n});return r&&t.push(r.name),t},[]);this.setState({selectedTerms:t})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(v.escape)(e);return q()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch(function(o){return"term_exists"===o.code?(t.addRequest=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(n.rest_base),Object(b.a)({},bi,{search:r}))}).then(mi),t.addRequest.then(function(t){return Object(v.find)(t,function(t){return fi(t.name,e)})})):Promise.reject(o)}).then(hi)}},{key:"onChange",value:function(e){var t=this,n=Object(v.uniqBy)(e,function(e){return e.toLowerCase()});this.setState({selectedTerms:n});var r=n.filter(function(e){return!Object(v.find)(t.state.availableTerms,function(t){return fi(t.name,e)})}),o=function(e,t){return e.map(function(e){return Object(v.find)(t,function(t){return fi(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(v.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(v.get)(n,["labels","add_new_item"],"post_tag"===t?Object(G.__)("Add New Tag"):Object(G.__)("Add New Term")),u=Object(v.get)(n,["labels","singular_name"],"post_tag"===t?Object(G.__)("Tag"):Object(G.__)("Term")),l=Object(G.sprintf)(Object(G._x)("%s added","term"),u),d=Object(G.sprintf)(Object(G._x)("%s removed","term"),u),p=Object(G.sprintf)(Object(G._x)("Remove %s","term"),u);return Object(xr.createElement)(ro.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}(xr.Component),Oi=Object(Kr.compose)(Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),Object(ro.withFilters)("editor.PostTaxonomyType"))(vi),gi=function(){var e=[Object(G.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(G.__)("Add tags"))];return Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:e},Object(xr.createElement)("p",null,Object(G.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(xr.createElement)(Oi,{slug:"post_tag"}))},ji=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).call(this,e))).state={hadTagsWhenOpeningThePanel:e.hasTags},n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(xr.createElement)(gi,null)}}]),t}(xr.Component),_i=Object(Kr.compose)(Object(l.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(v.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}))(ji),yi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(xr.createElement)(ro.Button,{isLink:!0,onClick:function(){return r(t)}},n)},ki=Object(Kr.compose)(Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(v.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:function(e,t){var n=Wo.filter(function(t){return Object(v.includes)(e,t.id)});return Object(v.find)(n,function(e){return e.id===t})}(o,r())}}),Object(l.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(G.__)("Suggestion:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(G.__)("Use a post format"))];return Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:r},Object(xr.createElement)("p",null,Object(G.__)("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(xr.createElement)("p",null,Object(xr.createElement)(yi,{onUpdatePostFormat:n,suggestedPostFormat:t.id,suggestionText:Object(G.sprintf)(Object(G.__)('Apply the "%1$s" format.'),t.caption)})))});var Ei=Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(v.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(G.__)("Are you ready to schedule?"),n=Object(G.__)("Your work will be published at the specified date and time.")):(t=Object(G.__)("Are you ready to publish?"),n=Object(G.__)("Double-check your settings before publishing.")):(t=Object(G.__)("Are you ready to submit for review?"),n=Object(G.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(xr.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(xr.createElement)("div",null,Object(xr.createElement)("strong",null,t)),Object(xr.createElement)("p",null,n),r&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:[Object(G.__)("Visibility:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(li,null))]},Object(xr.createElement)(ui,null)),Object(xr.createElement)(ro.PanelBody,{initialOpen:!1,title:[Object(G.__)("Publish:"),Object(xr.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(xr.createElement)(pi,null))]},Object(xr.createElement)(di,null)),Object(xr.createElement)(ki,null),Object(xr.createElement)(_i,null),i))}),Si=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(no.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(no.a)(e)),e.postLink=Object(xr.createRef)(),e}return Object(zr.a)(t,e),Object(Fr.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(v.get)(o,["labels","singular_name"]),c=Object(v.get)(o,["labels","view_item"]),a=n?Object(xr.createElement)(xr.Fragment,null,Object(G.__)("is now scheduled. It will go live on")," ",Object(xr.createElement)(pi,null),"."):Object(G.__)("is now live.");return Object(xr.createElement)("div",{className:"post-publish-panel__postpublish"},Object(xr.createElement)(ro.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(xr.createElement)("a",{ref:this.postLink,href:r.link},r.title||Object(G.__)("(no title)"))," ",a),Object(xr.createElement)(ro.PanelBody,null,Object(xr.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(xr.createElement)("strong",null,Object(G.__)("What’s next?"))),Object(xr.createElement)(ro.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(G.sprintf)(Object(G.__)("%s address"),i),value:Object(O.safeDecodeURIComponent)(r.link),onFocus:this.onSelectInput}),Object(xr.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(xr.createElement)(ro.Button,{isDefault:!0,href:r.link},c),Object(xr.createElement)(ro.ClipboardButton,{isDefault:!0,text:r.link,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(G.__)("Copied!"):Object(G.__)("Copy Link")))),t)}}]),t}(xr.Component),Pi=Object(l.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()}})(Si),wi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onSubmit=e.onSubmit.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(fo.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),b=Object(v.omit)(p,["hasPublishAction","isDirty","isPostTypeViewable"]),f=o||c&&r,h=!f&&!a,m=f&&!a;return Object(xr.createElement)("div",Object(Ao.a)({className:"editor-post-publish-panel"},b),Object(xr.createElement)("div",{className:"editor-post-publish-panel__header"},m?Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-published"},c?Object(G.__)("Scheduled"):Object(G.__)("Published")):Object(xr.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(xr.createElement)(ci,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n}),Object(xr.createElement)("span",{className:"editor-post-publish-panel__spacer"})),Object(xr.createElement)(ro.IconButton,{"aria-expanded":!0,onClick:s,icon:"no-alt",label:Object(G.__)("Close panel")})),Object(xr.createElement)("div",{className:"editor-post-publish-panel__content"},h&&Object(xr.createElement)(Ei,null,d&&Object(xr.createElement)(d,null)),m&&Object(xr.createElement)(Pi,{focusOnMount:!0},l&&Object(xr.createElement)(l,null)),a&&Object(xr.createElement)(ro.Spinner,null)),Object(xr.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Always show pre-publish checks."),checked:i,onChange:u})))}}]),t}(xr.Component),Ci=Object(Kr.compose)([Object(l.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(v.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(v.get)(d,["viewable"],!1),isBeingScheduled:a(),isDirty:s(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}}),Object(l.withDispatch)(function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}}),ro.withFocusReturn,ro.withConstrainedTabbing])(wi);var Ti=Object(Kr.compose)([Object(l.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(l.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;return n||r?Object(xr.createElement)(ro.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(G.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(G.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},Object(G.__)("Switch to Draft")):null}),Bi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={forceSavedMessage:!1},e}return Object(zr.a)(t,e),Object(Fr.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=Gr()("editor-post-saved-state","is-saving",{"is-autosaving":u});return Object(xr.createElement)("span",{className:b},Object(xr.createElement)(ro.Dashicon,{icon:"cloud"}),u?Object(G.__)("Autosaving"):Object(G.__)("Saving"))}if(o||r)return Object(xr.createElement)(Ti,null);if(!a)return null;if(p||!n&&!i)return Object(xr.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(xr.createElement)(ro.Dashicon,{icon:"saved"}),Object(G.__)("Saved"));if(!Object(v.get)(t,["_links","wp:action-publish"],!1)&&l)return null;var f=l?Object(G.__)("Save as Pending"):Object(G.__)("Save Draft");return d?Object(xr.createElement)(ro.Button,{className:"editor-post-save-draft",onClick:s,shortcut:oo.displayShortcut.primary("s"),isTertiary:!0},f):Object(xr.createElement)(ro.IconButton,{className:"editor-post-save-draft",label:f,onClick:s,shortcut:oo.displayShortcut.primary("s"),icon:"cloud-upload"})}}]),t}(xr.Component),xi=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e){return{onSave:e("core/editor").savePost}}),Kr.withSafeTimeout,Object(u.withViewportMatch)({isLargeViewport:"medium"})])(Bi);var Ii=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction,n=e.children;return t?n:null});var Ai=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(v.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 Ri=Object(Kr.compose)([Object(l.withSelect)(function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}}),Object(l.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(xr.createElement)(Ai,null,Object(xr.createElement)(ro.CheckboxControl,{label:Object(G.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}),Li={per_page:-1,orderby:"name",order:"asc",_fields:"id,name,parent"},Ui=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).findTerm=e.findTerm.bind(Object(no.a)(e)),e.onChange=e.onChange.bind(Object(no.a)(e)),e.onChangeFormName=e.onChangeFormName.bind(Object(no.a)(e)),e.onChangeFormParent=e.onChangeFormParent.bind(Object(no.a)(e)),e.onAddTerm=e.onAddTerm.bind(Object(no.a)(e)),e.onToggleForm=e.onToggleForm.bind(Object(no.a)(e)),e.setFilterValue=e.setFilterValue.bind(Object(no.a)(e)),e.sortBySelected=e.sortBySelected.bind(Object(no.a)(e)),e.state={loading:!0,availableTermsTree:[],availableTerms:[],adding:!1,formName:"",formParent:"",showForm:!1,filterValue:"",filteredTermsTree:[]},e}return Object(zr.a)(t,e),Object(Fr.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,c=parseInt(e.target.value,10);n(-1!==o.indexOf(c)?Object(v.without)(o,c):[].concat(Object(x.a)(o),[c]),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(v.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,d=a.availableTerms;if(""!==s&&!l){var p=this.findTerm(d,u,s);if(p)return Object(v.some)(i,function(e){return e===p.id})||r([].concat(Object(x.a)(i),[p.id]),o.rest_base),void this.setState({formName:"",formParent:""});this.setState({adding:!0}),this.addRequest=q()({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=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(o.rest_base),Object(b.a)({},Li,{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(v.find)(t.state.availableTerms,function(t){return t.id===e.id})?t.state.availableTerms:[e].concat(Object(x.a)(t.state.availableTerms)),a=Object(G.sprintf)(Object(G._x)("%s added","term"),Object(v.get)(t.props.taxonomy,["labels","singular_name"],"category"===c?Object(G.__)("Category"):Object(G.__)("Term")));t.props.speak(a,"assertive"),t.addRequest=null,t.setState({adding:!1,formName:"",formParent:"",availableTerms:n,availableTermsTree:t.sortBySelected(yo(n))}),r([].concat(Object(x.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(v.invoke)(this.fetchRequest,["abort"]),Object(v.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=q()({path:Object(O.addQueryArgs)("/wp/v2/".concat(t.rest_base),Li)}),this.fetchRequest.then(function(t){var n=e.sortBySelected(yo(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(G.sprintf)(Object(G._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(b.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){var n="editor-post-taxonomies-hierarchical-term-".concat(e.id);return Object(xr.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(xr.createElement)("input",{id:n,className:"editor-post-taxonomies__hierarchical-terms-input",type:"checkbox",checked:-1!==r.indexOf(e.id),value:e.id,onChange:t.onChange}),Object(xr.createElement)("label",{htmlFor:n},Object(v.unescape)(e.name)),!!e.children.length&&Object(xr.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(v.get)(n,["labels",e],"category"===t?r:o)},h=f("add_new_item",Object(G.__)("Add new category"),Object(G.__)("Add new term")),m=f("new_item_name",Object(G.__)("Add new category"),Object(G.__)("Add new term")),O=f("parent_item",Object(G.__)("Parent Category"),Object(G.__)("Parent Term")),g="— ".concat(O," —"),j=h,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),y="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),k=Object(v.get)(this.props.taxonomy,["labels","search_items"],Object(G.__)("Search Terms")),E=Object(v.get)(this.props.taxonomy,["name"],Object(G.__)("Terms")),S=a.length>=8;return[S&&Object(xr.createElement)("label",{key:"filter-label",htmlFor:y},k),S&&Object(xr.createElement)("input",{type:"search",id:y,value:b,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(xr.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":E},this.renderTerms(""!==b?s:c)),!d&&o&&Object(xr.createElement)(ro.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":p,isLink:!0},h),p&&Object(xr.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(xr.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},m),Object(xr.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!a.length&&Object(xr.createElement)(ro.TreeSelect,{label:O,noOptionLabel:g,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(xr.createElement)(ro.Button,{isDefault:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},j))]}}]),t}(xr.Component),Di=Object(Kr.compose)([Object(l.withSelect)(function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(v.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(v.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}}),Object(l.withDispatch)(function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(p.a)({},n,t))}}}),ro.withSpokenMessages,Kr.withInstanceId,Object(ro.withFilters)("editor.PostTaxonomyType")])(Ui);var Ni=Object(Kr.compose)([Object(l.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?v.identity:r,i=Object(v.filter)(n,function(e){return Object(v.includes)(e.types,t)});return Object(v.filter)(i,function(e){return e.visibility.show_ui}).map(function(e){var t=e.hierarchical?Di:Oi;return Object(xr.createElement)(xr.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(xr.createElement)(t,{slug:e.slug}),e))})});var Fi=Object(Kr.compose)([Object(l.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(v.some)(n,function(e){return Object(v.includes)(e.types,t)})?r:null}),Mi=n(57),Vi=n.n(Mi),zi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).edit=e.edit.bind(Object(no.a)(e)),e.stopEditing=e.stopEditing.bind(Object(no.a)(e)),e.state={},e}return Object(zr.a)(t,e),Object(Fr.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(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("label",{htmlFor:"post-content-".concat(t),className:"screen-reader-text"},Object(G.__)("Type text or HTML")),Object(xr.createElement)(Vi.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(G.__)("Start writing with text or HTML")}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.isDirty?null:{value:e.value,isDirty:!1}}}]),t}(xr.Component),Ki=Object(Kr.compose)([Object(l.withSelect)(function(e){return{value:(0,e("core/editor").getEditedPostContent)()}}),Object(l.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])(zi),Hi=function(e){function t(e){var n,r=e.permalinkParts,o=e.slug;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).state={editedPostName:o||r.postName},n.onSavePermalink=n.onSavePermalink.bind(Object(no.a)(n)),n}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"onSavePermalink",value:function(e){var t=Yo(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(xr.createElement)("form",{className:"editor-post-permalink-editor",onSubmit:this.onSavePermalink},Object(xr.createElement)("span",{className:"editor-post-permalink__editor-container"},Object(xr.createElement)("span",{className:"editor-post-permalink-editor__prefix"},n),Object(xr.createElement)("input",{className:"editor-post-permalink-editor__edit","aria-label":Object(G.__)("Edit post permalink"),value:o,onChange:function(t){return e.setState({editedPostName:t.target.value})},type:"text",autoFocus:!0}),Object(xr.createElement)("span",{className:"editor-post-permalink-editor__suffix"},r),"‎"),Object(xr.createElement)(ro.Button,{className:"editor-post-permalink-editor__save",isLarge:!0,onClick:this.onSavePermalink},Object(G.__)("Save")))}}]),t}(xr.Component),Wi=Object(Kr.compose)([Object(l.withSelect)(function(e){return{permalinkParts:(0,e("core/editor").getPermalinkParts)()}}),Object(l.withDispatch)(function(e){return{editPost:e("core/editor").editPost}})])(Hi),qi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).addVisibilityCheck=e.addVisibilityCheck.bind(Object(no.a)(e)),e.onVisibilityChange=e.onVisibilityChange.bind(Object(no.a)(e)),e.state={isCopied:!1,isEditingPermalink:!1},e}return Object(zr.a)(t,e),Object(Fr.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(G.__)("Permalink copied"):Object(G.__)("Copy the permalink"),h=c.prefix,m=c.suffix,v=Object(O.safeDecodeURIComponent)(s)||Yo(l)||u,g=n?h+v+m:h;return Object(xr.createElement)("div",{className:"editor-post-permalink"},Object(xr.createElement)(ro.ClipboardButton,{className:Gr()("editor-post-permalink__copy",{"is-copied":p}),text:g,label:f,onCopy:function(){return e.setState({isCopied:!0})},"aria-disabled":p,icon:"admin-links"}),Object(xr.createElement)("span",{className:"editor-post-permalink__label"},Object(G.__)("Permalink:")),!b&&Object(xr.createElement)(ro.ExternalLink,{className:"editor-post-permalink__link",href:o?g:a,target:"_blank",ref:function(t){return e.linkElement=t}},Object(O.safeDecodeURI)(g),"‎"),b&&Object(xr.createElement)(Wi,{slug:v,onSave:function(){return e.setState({isEditingPermalink:!1})}}),n&&!b&&Object(xr.createElement)(ro.Button,{className:"editor-post-permalink__edit",isLarge:!0,onClick:function(){return e.setState({isEditingPermalink:!0})}},Object(G.__)("Edit")),!n&&Object(xr.createElement)(ro.Button,{className:"editor-post-permalink__change",isLarge:!0,href:Qo("options-permalink.php"),onClick:this.addVisibilityCheck,target:"_blank"},Object(G.__)("Change Permalinks")))}}]),t}(xr.Component),Gi=Object(Kr.compose)([Object(l.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(v.get)(p,["viewable"],!1)}}),Object(l.withDispatch)(function(e){return{refreshPost:e("core/editor").refreshPost}})])(qi),Qi=/[\r\n]+/g,Yi=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).onChange=e.onChange.bind(Object(no.a)(e)),e.onSelect=e.onSelect.bind(Object(no.a)(e)),e.onUnselect=e.onUnselect.bind(Object(no.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(no.a)(e)),e.redirectHistory=e.redirectHistory.bind(Object(no.a)(e)),e.state={isSelected:!1},e}return Object(zr.a)(t,e),Object(Fr.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(Qi," ");this.props.onUpdate(t)}},{key:"onKeyDown",value:function(e){e.keyCode===oo.ENTER&&(e.preventDefault(),this.props.onEnterPress())}},{key:"redirectHistory",value:function(e){e.shiftKey?this.props.onRedo():this.props.onUndo(),e.preventDefault()}},{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=Gr()("wp-block editor-post-title__block",{"is-selected":s,"is-focus-mode":r,"has-fixed-toolbar":t}),l=Object(wo.decodeEntities)(c);return Object(xr.createElement)(go,{supportKeys:"title"},Object(xr.createElement)("div",{className:"editor-post-title"},Object(xr.createElement)("div",{className:u},Object(xr.createElement)(ro.KeyboardShortcuts,{shortcuts:{"mod+z":this.redirectHistory,"mod+shift+z":this.redirectHistory}},Object(xr.createElement)("label",{htmlFor:"post-title-".concat(i),className:"screen-reader-text"},l||Object(G.__)("Add title")),Object(xr.createElement)(Vi.a,{id:"post-title-".concat(i),className:"editor-post-title__input",value:a,onChange:this.onChange,placeholder:l||Object(G.__)("Add title"),onFocus:this.onSelect,onKeyDown:this.onKeyDown,onKeyPress:this.onUnselect,autoFocus:n})),s&&o&&Object(xr.createElement)(Gi,null))))}}]),t}(xr.Component),Xi=Object(l.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(v.get)(i,["viewable"],!1),placeholder:a,isFocusMode:s,hasFixedToolbar:u}}),Zi=Object(l.withDispatch)(function(e){var t=e("core/block-editor"),n=t.insertDefaultBlock,r=t.clearSelectedBlock,o=e("core/editor"),i=o.editPost;return{onEnterPress:function(){n(void 0,void 0,0)},onUpdate:function(e){i({title:e})},onUndo:o.undo,onRedo:o.redo,clearSelectedBlock:r}}),Ji=Object(Kr.compose)(Xi,Zi,Kr.withInstanceId,ro.withFocusOutside)(Yi);var $i=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e){return{trashPost:e("core/editor").trashPost}})])(function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(fo.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(xr.createElement)(ro.Button,{className:"editor-post-trash button-link-delete",onClick:function(){return o.trashPost(n,r)},isDefault:!0,isLarge:!0},Object(G.__)("Move to Trash"))});var ec=Object(l.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 tc=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(v.get)(n(),["_links","wp:action-publish"],!1),postType:r()}})])(function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})}),nc=n(96);var rc=Object(l.withSelect)(function(e){return{content:e("core/editor").getEditedPostAttribute("content")}})(function(e){var t=e.content,n=Object(G._x)("words","Word count type. Do not translate!");return Object(xr.createElement)("span",{className:"word-count"},Object(nc.count)(t,n))});var oc=Object(l.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(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(G.__)("Document Statistics"),tabIndex:"0"},Object(xr.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Words"),Object(xr.createElement)(rc,null)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Headings"),Object(xr.createElement)("span",{className:"table-of-contents__number"},t)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Paragraphs"),Object(xr.createElement)("span",{className:"table-of-contents__number"},n)),Object(xr.createElement)("li",{className:"table-of-contents__count"},Object(G.__)("Blocks"),Object(xr.createElement)("span",{className:"table-of-contents__number"},r)))),t>0&&Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)("hr",null),Object(xr.createElement)("h2",{className:"table-of-contents__title"},Object(G.__)("Document Outline")),Object(xr.createElement)(eo,{onSelect:i,hasOutlineItemsDisabled:o})))});var ic=Object(l.withSelect)(function(e){return{hasBlocks:!!e("core/block-editor").getBlockCount()}})(function(e){var t=e.hasBlocks,n=e.hasOutlineItemsDisabled;return Object(xr.createElement)(ro.Dropdown,{position:"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(xr.createElement)(ro.IconButton,{onClick:t?r:void 0,icon:"info-outline","aria-expanded":n,label:Object(G.__)("Content structure"),labelPosition:"bottom","aria-disabled":!t})},renderContent:function(e){var t=e.onClose;return Object(xr.createElement)(oc,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}),cc=function(e){function t(){var e;return Object(Nr.a)(this,t),(e=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).warnIfUnsavedChanges=e.warnIfUnsavedChanges.bind(Object(no.a)(e)),e}return Object(zr.a)(t,e),Object(Fr.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(this.props.isDirty)return e.returnValue=Object(G.__)("You have unsaved changes. If you proceed, they will be lost."),e.returnValue}},{key:"render",value:function(){return null}}]),t}(xr.Component),ac=Object(l.withSelect)(function(e){return{isDirty:e("core/editor").isEditedPostDirty()}})(cc),sc=n(45),uc=n.n(sc),lc=n(60),dc=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?v.noop:c,s=e.onFileChange,u=Object(l.select)("core/editor"),d=u.getCurrentPostId,p=u.getEditorSettings,f=p().allowedMimeTypes;i=i||p().maxUploadFileSize,Object(lc.uploadMedia)({allowedTypes:r,filesList:o,onFileChange:s,additionalData:Object(b.a)({post:d()},n),maxUploadFileSize:i,onError:function(e){var t=e.message;return a(t)},wpAllowedMimeTypes:f})};var pc=Object(Kr.compose)([Object(l.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(v.every)(u,function(e){return!!e&&e.isValid&&Object(c.hasBlockSupport)(e.name,"reusable",!0)})&&!!s("create","blocks")}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.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(xr.createElement)(xr.Fragment,null,!n&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:o},Object(G.__)("Add to Reusable Blocks")),n&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"controls-repeat",onClick:r},Object(G.__)("Convert to Regular Block"))):null});var bc=Object(Kr.compose)([Object(l.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(l.withDispatch)(function(e,t,n){var r=t.clientId,o=t.onToggle,i=void 0===o?v.noop:o,c=n.select,a=e("core/editor").__experimentalDeleteReusableBlock,s=c("core/block-editor").getBlock;return{onDelete:function(){if(window.confirm(Object(G.__)("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(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:"no",disabled:n,onClick:function(){return r()}},Object(G.__)("Remove from Reusable Blocks")):null});var fc=Object(l.withSelect)(function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}})(function(e){var t=e.clientIds;return Object(xr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,function(e){var n=e.onClose;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(pc,{clientIds:t,onToggle:n}),1===t.length&&Object(xr.createElement)(bc,{clientId:t[0],onToggle:n}))})}),hc=Object(xr.createElement)(ro.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Icon,{icon:hc}),vc=Object(xr.createElement)(ro.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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(xr.createElement)(ro.Path,{"fill-rule":"evenodd","clip-rule":"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"})),Oc=Object(xr.createElement)(ro.Icon,{icon:vc});var gc=Object(Kr.compose)([Object(l.withSelect)(function(e,t){var n=t.clientIds,r=e("core/block-editor"),o=r.getBlocksByClientId,i=(0,r.canInsertBlockType)("core/group"),c=o(n),a=1===c.length&&c[0]&&"core/group"===c[0].name;return{isGroupable:i&&c.length&&!a,isUngroupable:a,blocksSelection:c}}),Object(l.withDispatch)(function(e,t){var n=t.clientIds,r=t.onToggle,o=void 0===r?v.noop:r,i=t.blocksSelection,a=void 0===i?[]:i,s=e("core/block-editor").replaceBlocks;return{onConvertToGroup:function(){if(a.length){var e=Object(c.switchToBlockType)(a,"core/group");e&&s(n,e),o()}},onConvertFromGroup:function(){if(a.length){var e=a[0].innerBlocks;e.length&&(s(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(xr.createElement)(xr.Fragment,null,o&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:mc,onClick:t},Object(G._x)("Group","verb")),c&&Object(xr.createElement)(ro.MenuItem,{className:"editor-block-settings-menu__control block-editor-block-settings-menu__control",icon:Oc,onClick:n},Object(G._x)("Ungroup","Ungrouping blocks from within a Group block back into individual blocks within the Editor ")))});var jc=Object(l.withSelect)(function(e){return{clientIds:(0,e("core/block-editor").getSelectedBlockClientIds)()}})(function(e){var t=e.clientIds;return Object(xr.createElement)(i.__experimentalBlockSettingsMenuPluginsExtension,null,function(e){var n=e.onClose;return Object(xr.createElement)(xr.Fragment,null,Object(xr.createElement)(gc,{clientIds:t,onToggle:n}))})}),_c=function(){var e=Object(H.a)(K.a.mark(function e(t){var n;return K.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q()({path:Object(O.addQueryArgs)("/wp/v2/search",{search:t,per_page:20,type:"post"})});case 2:return n=e.sent,e.abrupt("return",Object(v.map)(n,function(e){return{id:e.id,url:e.url,title:Object(wo.decodeEntities)(e.title)||Object(G.__)("(no title)")}}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),yc=function(e){function t(e){var n;return Object(Nr.a)(this,t),(n=Object(Mr.a)(this,Object(Vr.a)(t).apply(this,arguments))).getBlockEditorSettings=uc()(n.getBlockEditorSettings,{maxSize:1}),e.recovery?Object(Mr.a)(n):(e.updatePostLock(e.settings.postLock),e.setupEditor(e.post,e.initialEdits,e.settings.template),e.settings.autosave&&e.createWarningNotice(Object(G.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(G.__)("View the autosave"),url:e.settings.autosave.editLink}]}),n)}return Object(zr.a)(t,e),Object(Fr.a)(t,[{key:"getBlockEditorSettings",value:function(e,t,n,r,o){return Object(b.a)({},Object(v.pick)(e,["alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","focusMode","fontSizes","hasFixedToolbar","hasPermissionsToManageWidgets","imageSizes","isRTL","maxWidth","styles","template","templateLock","titlePlaceholder"]),{__experimentalMetaSource:{value:t,onChange:n},__experimentalReusableBlocks:r,__experimentalMediaUpload:o?dc:void 0,__experimentalFetchLinkSuggestions:_c})}},{key:"componentDidMount",value:function(){if(this.props.updateEditorSettings(this.props.settings),this.props.settings.styles){var e=Object(i.__experimentalTransformStyles)(this.props.settings.styles,".editor-styles-wrapper");Object(v.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:"render",value:function(){var e=this.props,t=e.children,n=e.blocks,r=e.resetEditorBlocks,o=e.isReady,c=e.settings,a=e.meta,s=e.onMetaChange,u=e.reusableBlocks,l=e.resetEditorBlocksWithoutUndoLevel,d=e.hasUploadPermissions;if(!o)return null;var p=this.getBlockEditorSettings(c,a,s,u,d);return Object(xr.createElement)(i.BlockEditorProvider,{value:n,onInput:l,onChange:r,settings:p,useSubRegistry:!1},t,Object(xr.createElement)(fc,null),Object(xr.createElement)(jc,null))}}]),t}(xr.Component),kc=Object(Kr.compose)([Object(l.withSelect)(function(e){var t=e("core/editor"),n=t.__unstableIsEditorReady,r=t.getEditorBlocks,o=t.getEditedPostAttribute,i=t.__experimentalGetReusableBlocks,c=e("core").canUser;return{isReady:n(),blocks:r(),meta:o("meta"),reusableBlocks:i(),hasUploadPermissions:Object(v.defaultTo)(c("create","media"),!0)}}),Object(l.withDispatch)(function(e){var t=e("core/editor"),n=t.setupEditor,r=t.updatePostLock,o=t.resetEditorBlocks,i=t.editPost,c=t.updateEditorSettings;return{setupEditor:n,updatePostLock:r,createWarningNotice:e("core/notices").createWarningNotice,resetEditorBlocks:o,updateEditorSettings:c,resetEditorBlocksWithoutUndoLevel:function(e){o(e,{__unstableShouldCreateUndoLevel:!1})},onMetaChange:function(e){i({meta:e})}}})])(yc),Ec=n(63),Sc=n.n(Ec);function Pc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(xr.forwardRef)(function(n,r){return Y()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(xr.createElement)(t,Object(Ao.a)({ref:r},n))});return n.forEach(function(n){r[n]=Pc(e+"."+n,t[n])}),r}function wc(e,t){return function(){return Y()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Cc=Pc("RichText",i.RichText,["Content"]);Cc.isEmpty=wc("RichText.isEmpty",i.RichText.isEmpty);var Tc=Pc("Autocomplete",i.Autocomplete),Bc=Pc("AlignmentToolbar",i.AlignmentToolbar),xc=Pc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),Ic=Pc("BlockControls",i.BlockControls,["Slot"]),Ac=Pc("BlockEdit",i.BlockEdit),Rc=Pc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),Lc=Pc("BlockFormatControls",i.BlockFormatControls,["Slot"]),Uc=Pc("BlockIcon",i.BlockIcon),Dc=Pc("BlockInspector",i.BlockInspector),Nc=Pc("BlockList",i.BlockList),Fc=Pc("BlockMover",i.BlockMover),Mc=Pc("BlockNavigationDropdown",i.BlockNavigationDropdown),Vc=Pc("BlockSelectionClearer",i.BlockSelectionClearer),zc=Pc("BlockSettingsMenu",i.BlockSettingsMenu),Kc=Pc("BlockTitle",i.BlockTitle),Hc=Pc("BlockToolbar",i.BlockToolbar),Wc=Pc("ColorPalette",i.ColorPalette),qc=Pc("ContrastChecker",i.ContrastChecker),Gc=Pc("CopyHandler",i.CopyHandler),Qc=Pc("DefaultBlockAppender",i.DefaultBlockAppender),Yc=Pc("FontSizePicker",i.FontSizePicker),Xc=Pc("Inserter",i.Inserter),Zc=Pc("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),Jc=Pc("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),$c=Pc("InspectorControls",i.InspectorControls,["Slot"]),ea=Pc("PanelColorSettings",i.PanelColorSettings),ta=Pc("PlainText",i.PlainText),na=Pc("RichTextShortcut",i.RichTextShortcut),ra=Pc("RichTextToolbarButton",i.RichTextToolbarButton),oa=Pc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),ia=Pc("MediaPlaceholder",i.MediaPlaceholder),ca=Pc("MediaUpload",i.MediaUpload),aa=Pc("MediaUploadCheck",i.MediaUploadCheck),sa=Pc("MultiBlocksSwitcher",i.MultiBlocksSwitcher),ua=Pc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),la=Pc("NavigableToolbar",i.NavigableToolbar),da=Pc("ObserveTyping",i.ObserveTyping),pa=Pc("PreserveScrollInReorder",i.PreserveScrollInReorder),ba=Pc("SkipToSelectedBlock",i.SkipToSelectedBlock),fa=Pc("URLInput",i.URLInput),ha=Pc("URLInputButton",i.URLInputButton),ma=Pc("URLPopover",i.URLPopover),va=Pc("Warning",i.Warning),Oa=Pc("WritingFlow",i.WritingFlow),ga=wc("createCustomColorsHOC",i.createCustomColorsHOC),ja=wc("getColorClassName",i.getColorClassName),_a=wc("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),ya=wc("getColorObjectByColorValue",i.getColorObjectByColorValue),ka=wc("getFontSize",i.getFontSize),Ea=wc("getFontSizeClass",i.getFontSizeClass),Sa=wc("withColorContext",i.withColorContext),Pa=wc("withColors",i.withColors),wa=wc("withFontSizes",i.withFontSizes),Ca=[Dr];Object(Br.addFilter)("editor.Autocomplete.completers","editor/autocompleters/set-default-completers",function(e,t){return e||(e=Ca.map(v.clone),t===Object(c.getDefaultBlockName)()&&e.push(Object(v.clone)(Ur))),e}),n.d(t,"AutosaveMonitor",function(){return Wr}),n.d(t,"DocumentOutline",function(){return eo}),n.d(t,"DocumentOutlineCheck",function(){return to}),n.d(t,"VisualEditorGlobalKeyboardShortcuts",function(){return so}),n.d(t,"EditorGlobalKeyboardShortcuts",function(){return uo}),n.d(t,"TextEditorGlobalKeyboardShortcuts",function(){return lo}),n.d(t,"EditorHistoryRedo",function(){return po}),n.d(t,"EditorHistoryUndo",function(){return bo}),n.d(t,"EditorNotices",function(){return mo}),n.d(t,"ErrorBoundary",function(){return vo}),n.d(t,"PageAttributesCheck",function(){return Oo}),n.d(t,"PageAttributesOrder",function(){return _o}),n.d(t,"PageAttributesParent",function(){return So}),n.d(t,"PageTemplate",function(){return Po}),n.d(t,"PostAuthor",function(){return Bo}),n.d(t,"PostAuthorCheck",function(){return Co}),n.d(t,"PostComments",function(){return xo}),n.d(t,"PostExcerpt",function(){return Io}),n.d(t,"PostExcerptCheck",function(){return Ro}),n.d(t,"PostFeaturedImage",function(){return Ko}),n.d(t,"PostFeaturedImageCheck",function(){return Uo}),n.d(t,"PostFormat",function(){return qo}),n.d(t,"PostFormatCheck",function(){return Ho}),n.d(t,"PostLastRevision",function(){return Xo}),n.d(t,"PostLastRevisionCheck",function(){return Go}),n.d(t,"PostLockedModal",function(){return ei}),n.d(t,"PostPendingStatus",function(){return ni}),n.d(t,"PostPendingStatusCheck",function(){return ti}),n.d(t,"PostPingbacks",function(){return ri}),n.d(t,"PostPreviewButton",function(){return Jo}),n.d(t,"PostPublishButton",function(){return ci}),n.d(t,"PostPublishButtonLabel",function(){return oi}),n.d(t,"PostPublishPanel",function(){return Ci}),n.d(t,"PostSavedState",function(){return xi}),n.d(t,"PostSchedule",function(){return di}),n.d(t,"PostScheduleCheck",function(){return Ii}),n.d(t,"PostScheduleLabel",function(){return pi}),n.d(t,"PostSticky",function(){return Ri}),n.d(t,"PostStickyCheck",function(){return Ai}),n.d(t,"PostSwitchToDraftButton",function(){return Ti}),n.d(t,"PostTaxonomies",function(){return Ni}),n.d(t,"PostTaxonomiesCheck",function(){return Fi}),n.d(t,"PostTextEditor",function(){return Ki}),n.d(t,"PostTitle",function(){return Ji}),n.d(t,"PostTrash",function(){return $i}),n.d(t,"PostTrashCheck",function(){return ec}),n.d(t,"PostTypeSupportCheck",function(){return go}),n.d(t,"PostVisibility",function(){return ui}),n.d(t,"PostVisibilityLabel",function(){return li}),n.d(t,"PostVisibilityCheck",function(){return tc}),n.d(t,"TableOfContents",function(){return ic}),n.d(t,"UnsavedChangesWarning",function(){return ac}),n.d(t,"WordCount",function(){return rc}),n.d(t,"EditorProvider",function(){return kc}),n.d(t,"blockAutocompleter",function(){return Ur}),n.d(t,"userAutocompleter",function(){return Dr}),n.d(t,"ServerSideRender",function(){return Sc.a}),n.d(t,"RichText",function(){return Cc}),n.d(t,"Autocomplete",function(){return Tc}),n.d(t,"AlignmentToolbar",function(){return Bc}),n.d(t,"BlockAlignmentToolbar",function(){return xc}),n.d(t,"BlockControls",function(){return Ic}),n.d(t,"BlockEdit",function(){return Ac}),n.d(t,"BlockEditorKeyboardShortcuts",function(){return Rc}),n.d(t,"BlockFormatControls",function(){return Lc}),n.d(t,"BlockIcon",function(){return Uc}),n.d(t,"BlockInspector",function(){return Dc}),n.d(t,"BlockList",function(){return Nc}),n.d(t,"BlockMover",function(){return Fc}),n.d(t,"BlockNavigationDropdown",function(){return Mc}),n.d(t,"BlockSelectionClearer",function(){return Vc}),n.d(t,"BlockSettingsMenu",function(){return zc}),n.d(t,"BlockTitle",function(){return Kc}),n.d(t,"BlockToolbar",function(){return Hc}),n.d(t,"ColorPalette",function(){return Wc}),n.d(t,"ContrastChecker",function(){return qc}),n.d(t,"CopyHandler",function(){return Gc}),n.d(t,"DefaultBlockAppender",function(){return Qc}),n.d(t,"FontSizePicker",function(){return Yc}),n.d(t,"Inserter",function(){return Xc}),n.d(t,"InnerBlocks",function(){return Zc}),n.d(t,"InspectorAdvancedControls",function(){return Jc}),n.d(t,"InspectorControls",function(){return $c}),n.d(t,"PanelColorSettings",function(){return ea}),n.d(t,"PlainText",function(){return ta}),n.d(t,"RichTextShortcut",function(){return na}),n.d(t,"RichTextToolbarButton",function(){return ra}),n.d(t,"__unstableRichTextInputEvent",function(){return oa}),n.d(t,"MediaPlaceholder",function(){return ia}),n.d(t,"MediaUpload",function(){return ca}),n.d(t,"MediaUploadCheck",function(){return aa}),n.d(t,"MultiBlocksSwitcher",function(){return sa}),n.d(t,"MultiSelectScrollIntoView",function(){return ua}),n.d(t,"NavigableToolbar",function(){return la}),n.d(t,"ObserveTyping",function(){return da}),n.d(t,"PreserveScrollInReorder",function(){return pa}),n.d(t,"SkipToSelectedBlock",function(){return ba}),n.d(t,"URLInput",function(){return fa}),n.d(t,"URLInputButton",function(){return ha}),n.d(t,"URLPopover",function(){return ma}),n.d(t,"Warning",function(){return va}),n.d(t,"WritingFlow",function(){return Oa}),n.d(t,"createCustomColorsHOC",function(){return ga}),n.d(t,"getColorClassName",function(){return ja}),n.d(t,"getColorObjectByAttributeValues",function(){return _a}),n.d(t,"getColorObjectByColorValue",function(){return ya}),n.d(t,"getFontSize",function(){return ka}),n.d(t,"getFontSizeClass",function(){return Ea}),n.d(t,"withColorContext",function(){return Sa}),n.d(t,"withColors",function(){return Pa}),n.d(t,"withFontSizes",function(){return wa}),n.d(t,"mediaUpload",function(){return dc}),n.d(t,"cleanForSlug",function(){return Yo}),n.d(t,"transformStyles",function(){return i.__experimentalTransformStyles})},23:function(e,t){!function(){e.exports=this.React}()},24:function(e,t,n){"use strict";var r=n(37);var o=n(36);function i(e,t){return Object(r.a)(e)||function(e,t){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})},244: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;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');return 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;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');return 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},26:function(e,t){!function(){e.exports=this.wp.hooks}()},28:function(e,t){!function(){e.exports=this.wp.url}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30: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})},31:function(e,t,n){"use strict";var r,o;function i(e){return[e]}function c(e){return!!e&&"object"==typeof e}function a(){var e={clear:function(){e.head=null}};return e}function s(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,u;function l(){n=o?new WeakMap:a()}function d(){var n,r,o,i,c,a=arguments.length;for(i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];for(c=t.apply(null,i),(n=u(c)).isUniqueByDependants||(n.lastDependants&&!s(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),r=n.head;r;){if(s(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),u=o?function(e){var t,o,i,s,u=n,l=!0;for(t=0;t<e.length;t++){if(!c(o=e[t])){l=!1;break}u.has(o)?u=u.get(o):(i=new WeakMap,u.set(o,i),u=i)}return u.has(r)||((s=a()).isUniqueByDependants=l,u.set(r,s)),u.get(r)}:function(){return n},d.getDependants=t,d.clear=l,l(),d}},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)}function o(e){return(o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)})(e)}n.d(t,"a",function(){return o})},33:function(e,t,n){e.exports=n(90)()},34:function(e,t){!function(){e.exports=this.wp.apiFetch}()},35:function(e,t){!function(){e.exports=this.wp.dataControls}()},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})},37:function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return r})},38: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})},4:function(e,t){!function(){e.exports=this.wp.data}()},41:function(e,t){!function(){e.exports=this.wp.viewport}()},42: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})},43:function(e,t){!function(){e.exports=this.wp.deprecated}()},45: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}},5: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})},51:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},56:function(e,t){!function(){e.exports=this.wp.nux}()},57:function(e,t,n){"use strict";t.__esModule=!0;var r=n(130);t.default=r.default},58:function(e,t,n){e.exports=n(244)},6:function(e,t){!function(){e.exports=this.wp.compose}()},60:function(e,t){!function(){e.exports=this.wp.mediaUtils}()},63:function(e,t){!function(){e.exports=this.wp.serverSideRender}()},64:function(e,t){!function(){e.exports=this.wp.autop}()},69:function(e,t,n){e.exports=function(){"use strict";return function(e){var t={};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])}(t,e),function(e){return function(n){return function(r){var o,i,c=t[r.type],a=n(r);if(c)for(o=0;o<c.length;o++)(i=c[o](r,e))&&e.dispatch(i);return a}}}}}()},7:function(e,t){!function(){e.exports=this.wp.blockEditor}()},72:function(e,t){!function(){e.exports=this.wp.coreData}()},8:function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(15);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?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}},89:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9:function(e,t){!function(){e.exports=this.wp.blocks}()},90:function(e,t,n){"use strict";var r=n(89);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}},96:function(e,t){!function(){e.exports=this.wp.wordcount}()}});
changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == Changelog ==
2
 
 
 
 
 
 
 
3
  = 5.9.0 =
4
 
5
  ### Features
1
  == Changelog ==
2
 
3
+ = 5.9.1 =
4
+
5
+ ### Bug Fixes
6
+
7
+ * Fix the issue where [statics for deprecated components were not hoisted](https://github.com/WordPress/gutenberg/pull/16152)
8
+
9
  = 5.9.0 =
10
 
11
  ### Features
gutenberg.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Gutenberg
4
  * Plugin URI: https://github.com/WordPress/gutenberg
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
- * Version: 5.9.0
7
  * Author: Gutenberg Team
8
  * Text Domain: gutenberg
9
  *
@@ -11,8 +11,8 @@
11
  */
12
 
13
  ### BEGIN AUTO-GENERATED DEFINES
14
- define( 'GUTENBERG_VERSION', '5.9.0' );
15
- define( 'GUTENBERG_GIT_COMMIT', '0c75cbaa48966ef98283b0683d5e6c778e84cacd' );
16
  ### END AUTO-GENERATED DEFINES
17
 
18
  gutenberg_pre_init();
3
  * Plugin Name: Gutenberg
4
  * Plugin URI: https://github.com/WordPress/gutenberg
5
  * Description: Printing since 1440. This is the development plugin for the new block editor in core.
6
+ * Version: 5.9.1
7
  * Author: Gutenberg Team
8
  * Text Domain: gutenberg
9
  *
11
  */
12
 
13
  ### BEGIN AUTO-GENERATED DEFINES
14
+ define( 'GUTENBERG_VERSION', '5.9.1' );
15
+ define( 'GUTENBERG_GIT_COMMIT', 'd6bf345860c10dbc62d7c311cf516a836af707f8' );
16
  ### END AUTO-GENERATED DEFINES
17
 
18
  gutenberg_pre_init();
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: matveb, joen, karmatosed
3
  Requires at least: 5.1.0
4
  Tested up to: 5.2
5
- Stable tag: 5.8.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
@@ -79,6 +79,14 @@ See also <a href="https://github.com/WordPress/gutenberg/blob/master/CONTRIBUTIN
79
 
80
  == Changelog ==
81
 
 
 
 
 
 
 
 
 
82
  ### Features
83
 
84
  * Allow [grouping/ungrouping blocks](https://github.com/WordPress/gutenberg/pull/14908) using the Group block.
2
  Contributors: matveb, joen, karmatosed
3
  Requires at least: 5.1.0
4
  Tested up to: 5.2
5
+ Stable tag: 5.9.0
6
  License: GPLv2 or later
7
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
8
 
79
 
80
  == Changelog ==
81
 
82
+ For 5.9.1:
83
+
84
+ ### Bug Fixes
85
+
86
+ * Fix the issue where [statics for deprecated components were not hoisted](https://github.com/WordPress/gutenberg/pull/16152)
87
+
88
+ For 5.9.0:
89
+
90
  ### Features
91
 
92
  * Allow [grouping/ungrouping blocks](https://github.com/WordPress/gutenberg/pull/14908) using the Group block.