/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editor=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="./node_modules/@wordpress/editor/build-module/index.js")}({"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js":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=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("./node_modules/@babel/runtime/helpers/esm/typeof.js"),o=n("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function i(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(o.a)(e):t}},"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");var o=n("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");function c(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,s=e[Symbol.iterator]();!(r=(c=s.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Object(o.a)(e,t)||Object(i.a)()}},"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");var o=n("./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(i.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},"./node_modules/@babel/runtime/helpers/esm/typeof.js":function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},"./node_modules/@wordpress/editor/build-module/index.js":function(e,t,n){"use strict";n.r(t),n.d(t,"storeConfig",(function(){return Cr})),n.d(t,"store",(function(){return xr})),n.d(t,"userAutocompleter",(function(){return w})),n.d(t,"AutosaveMonitor",(function(){return Ur})),n.d(t,"DocumentOutline",(function(){return $r})),n.d(t,"DocumentOutlineCheck",(function(){return Yr})),n.d(t,"VisualEditorGlobalKeyboardShortcuts",(function(){return eo})),n.d(t,"EditorGlobalKeyboardShortcuts",(function(){return to})),n.d(t,"TextEditorGlobalKeyboardShortcuts",(function(){return no})),n.d(t,"EditorKeyboardShortcutsRegister",(function(){return ro})),n.d(t,"EditorHistoryRedo",(function(){return ao})),n.d(t,"EditorHistoryUndo",(function(){return lo})),n.d(t,"EditorNotices",(function(){return bo})),n.d(t,"EntitiesSavedStates",(function(){return _o})),n.d(t,"ErrorBoundary",(function(){return So})),n.d(t,"LocalAutosaveMonitor",(function(){return Co})),n.d(t,"PageAttributesCheck",(function(){return xo})),n.d(t,"PageAttributesOrder",(function(){return Io})),n.d(t,"PageAttributesParent",(function(){return Uo})),n.d(t,"PageTemplate",(function(){return Fo})),n.d(t,"PostAuthor",(function(){return Ho})),n.d(t,"PostAuthorCheck",(function(){return Wo})),n.d(t,"PostComments",(function(){return Go})),n.d(t,"PostExcerpt",(function(){return qo})),n.d(t,"PostExcerptCheck",(function(){return Ko})),n.d(t,"PostFeaturedImage",(function(){return ni})),n.d(t,"PostFeaturedImageCheck",(function(){return $o})),n.d(t,"PostFormat",(function(){return ii})),n.d(t,"PostFormatCheck",(function(){return ri})),n.d(t,"PostLastRevision",(function(){return ai})),n.d(t,"PostLastRevisionCheck",(function(){return si})),n.d(t,"PostLockedModal",(function(){return pi})),n.d(t,"PostPendingStatus",(function(){return fi})),n.d(t,"PostPendingStatusCheck",(function(){return bi})),n.d(t,"PostPingbacks",(function(){return mi})),n.d(t,"PostPreviewButton",(function(){return di})),n.d(t,"PostPublishButton",(function(){return gi})),n.d(t,"PostPublishButtonLabel",(function(){return hi})),n.d(t,"PostPublishPanel",(function(){return Xi})),n.d(t,"PostSavedState",(function(){return rc})),n.d(t,"PostSchedule",(function(){return ki})),n.d(t,"PostScheduleCheck",(function(){return oc})),n.d(t,"PostScheduleLabel",(function(){return Ei})),n.d(t,"PostSlug",(function(){return ac})),n.d(t,"PostSlugCheck",(function(){return ic})),n.d(t,"PostSticky",(function(){return lc})),n.d(t,"PostStickyCheck",(function(){return uc})),n.d(t,"PostSwitchToDraftButton",(function(){return nc})),n.d(t,"PostTaxonomies",(function(){return vc})),n.d(t,"PostTaxonomiesCheck",(function(){return Oc})),n.d(t,"PostTextEditor",(function(){return yc})),n.d(t,"PostTitle",(function(){return wc})),n.d(t,"PostTrash",(function(){return Pc})),n.d(t,"PostTrashCheck",(function(){return Sc})),n.d(t,"PostTypeSupportCheck",(function(){return Ao})),n.d(t,"PostVisibility",(function(){return Pi})),n.d(t,"PostVisibilityLabel",(function(){return Si})),n.d(t,"PostVisibilityCheck",(function(){return kc})),n.d(t,"TableOfContents",(function(){return Bc})),n.d(t,"UnsavedChangesWarning",(function(){return Ic})),n.d(t,"WordCount",(function(){return Cc})),n.d(t,"EditorProvider",(function(){return Gc})),n.d(t,"ServerSideRender",(function(){return Kc.a})),n.d(t,"RichText",(function(){return Yc})),n.d(t,"Autocomplete",(function(){return Xc})),n.d(t,"AlignmentToolbar",(function(){return Jc})),n.d(t,"BlockAlignmentToolbar",(function(){return Zc})),n.d(t,"BlockControls",(function(){return es})),n.d(t,"BlockEdit",(function(){return ts})),n.d(t,"BlockEditorKeyboardShortcuts",(function(){return ns})),n.d(t,"BlockFormatControls",(function(){return rs})),n.d(t,"BlockIcon",(function(){return os})),n.d(t,"BlockInspector",(function(){return is})),n.d(t,"BlockList",(function(){return cs})),n.d(t,"BlockMover",(function(){return ss})),n.d(t,"BlockNavigationDropdown",(function(){return as})),n.d(t,"BlockSelectionClearer",(function(){return us})),n.d(t,"BlockSettingsMenu",(function(){return ls})),n.d(t,"BlockTitle",(function(){return ds})),n.d(t,"BlockToolbar",(function(){return ps})),n.d(t,"ColorPalette",(function(){return bs})),n.d(t,"ContrastChecker",(function(){return fs})),n.d(t,"CopyHandler",(function(){return ms})),n.d(t,"DefaultBlockAppender",(function(){return hs})),n.d(t,"FontSizePicker",(function(){return vs})),n.d(t,"Inserter",(function(){return Os})),n.d(t,"InnerBlocks",(function(){return gs})),n.d(t,"InspectorAdvancedControls",(function(){return js})),n.d(t,"InspectorControls",(function(){return ys})),n.d(t,"PanelColorSettings",(function(){return _s})),n.d(t,"PlainText",(function(){return ws})),n.d(t,"RichTextShortcut",(function(){return Ps})),n.d(t,"RichTextToolbarButton",(function(){return Ss})),n.d(t,"__unstableRichTextInputEvent",(function(){return ks})),n.d(t,"MediaPlaceholder",(function(){return Es})),n.d(t,"MediaUpload",(function(){return Ts})),n.d(t,"MediaUploadCheck",(function(){return Cs})),n.d(t,"MultiSelectScrollIntoView",(function(){return xs})),n.d(t,"NavigableToolbar",(function(){return As})),n.d(t,"ObserveTyping",(function(){return Bs})),n.d(t,"PreserveScrollInReorder",(function(){return Is})),n.d(t,"SkipToSelectedBlock",(function(){return Rs})),n.d(t,"URLInput",(function(){return Ds})),n.d(t,"URLInputButton",(function(){return Ns})),n.d(t,"URLPopover",(function(){return Ls})),n.d(t,"Warning",(function(){return Us})),n.d(t,"WritingFlow",(function(){return Fs})),n.d(t,"createCustomColorsHOC",(function(){return Ms})),n.d(t,"getColorClassName",(function(){return zs})),n.d(t,"getColorObjectByAttributeValues",(function(){return Vs})),n.d(t,"getColorObjectByColorValue",(function(){return Hs})),n.d(t,"getFontSize",(function(){return Ws})),n.d(t,"getFontSizeClass",(function(){return Gs})),n.d(t,"withColorContext",(function(){return qs})),n.d(t,"withColors",(function(){return Ks})),n.d(t,"withFontSizes",(function(){return Qs})),n.d(t,"mediaUpload",(function(){return Mc})),n.d(t,"cleanForSlug",(function(){return W})),n.d(t,"transformStyles",(function(){return i.transformStyles}));var r={};n.r(r),n.d(r,"hasEditorUndo",(function(){return $})),n.d(r,"hasEditorRedo",(function(){return Y})),n.d(r,"isEditedPostNew",(function(){return X})),n.d(r,"hasChangedContent",(function(){return J})),n.d(r,"isEditedPostDirty",(function(){return Z})),n.d(r,"hasNonPostEntityChanges",(function(){return ee})),n.d(r,"isCleanNewPost",(function(){return te})),n.d(r,"getCurrentPost",(function(){return ne})),n.d(r,"getCurrentPostType",(function(){return re})),n.d(r,"getCurrentPostId",(function(){return oe})),n.d(r,"getCurrentPostRevisionsCount",(function(){return ie})),n.d(r,"getCurrentPostLastRevisionId",(function(){return ce})),n.d(r,"getPostEdits",(function(){return se})),n.d(r,"getReferenceByDistinctEdits",(function(){return ae})),n.d(r,"getCurrentPostAttribute",(function(){return ue})),n.d(r,"getEditedPostAttribute",(function(){return le})),n.d(r,"getAutosaveAttribute",(function(){return de})),n.d(r,"getEditedPostVisibility",(function(){return pe})),n.d(r,"isCurrentPostPending",(function(){return be})),n.d(r,"isCurrentPostPublished",(function(){return fe})),n.d(r,"isCurrentPostScheduled",(function(){return me})),n.d(r,"isEditedPostPublishable",(function(){return he})),n.d(r,"isEditedPostSaveable",(function(){return ve})),n.d(r,"isEditedPostEmpty",(function(){return Oe})),n.d(r,"isEditedPostAutosaveable",(function(){return ge})),n.d(r,"getAutosave",(function(){return je})),n.d(r,"hasAutosave",(function(){return ye})),n.d(r,"isEditedPostBeingScheduled",(function(){return _e})),n.d(r,"isEditedPostDateFloating",(function(){return we})),n.d(r,"isSavingPost",(function(){return Pe})),n.d(r,"didPostSaveRequestSucceed",(function(){return Se})),n.d(r,"didPostSaveRequestFail",(function(){return ke})),n.d(r,"isAutosavingPost",(function(){return Ee})),n.d(r,"isPreviewingPost",(function(){return Te})),n.d(r,"getEditedPostPreviewLink",(function(){return Ce})),n.d(r,"getSuggestedPostFormat",(function(){return xe})),n.d(r,"getBlocksForSerialization",(function(){return Ae})),n.d(r,"getEditedPostContent",(function(){return Be})),n.d(r,"isPublishingPost",(function(){return Ie})),n.d(r,"isPermalinkEditable",(function(){return Re})),n.d(r,"getPermalink",(function(){return De})),n.d(r,"getEditedPostSlug",(function(){return Ne})),n.d(r,"getPermalinkParts",(function(){return Le})),n.d(r,"isPostLocked",(function(){return Ue})),n.d(r,"isPostSavingLocked",(function(){return Fe})),n.d(r,"isPostAutosavingLocked",(function(){return Me})),n.d(r,"isPostLockTakeover",(function(){return ze})),n.d(r,"getPostLockUser",(function(){return Ve})),n.d(r,"getActivePostLock",(function(){return He})),n.d(r,"canUserUseUnfilteredHTML",(function(){return We})),n.d(r,"isPublishSidebarEnabled",(function(){return Ge})),n.d(r,"getEditorBlocks",(function(){return qe})),n.d(r,"getEditorSelectionStart",(function(){return Ke})),n.d(r,"getEditorSelectionEnd",(function(){return Qe})),n.d(r,"__unstableIsEditorReady",(function(){return $e})),n.d(r,"getEditorSettings",(function(){return Ye})),n.d(r,"getStateBeforeOptimisticTransaction",(function(){return Xe})),n.d(r,"inSomeHistory",(function(){return Je})),n.d(r,"getBlockName",(function(){return et})),n.d(r,"isBlockValid",(function(){return tt})),n.d(r,"getBlockAttributes",(function(){return nt})),n.d(r,"getBlock",(function(){return rt})),n.d(r,"getBlocks",(function(){return ot})),n.d(r,"__unstableGetBlockWithoutInnerBlocks",(function(){return it})),n.d(r,"getClientIdsOfDescendants",(function(){return ct})),n.d(r,"getClientIdsWithDescendants",(function(){return st})),n.d(r,"getGlobalBlockCount",(function(){return at})),n.d(r,"getBlocksByClientId",(function(){return ut})),n.d(r,"getBlockCount",(function(){return lt})),n.d(r,"getBlockSelectionStart",(function(){return dt})),n.d(r,"getBlockSelectionEnd",(function(){return pt})),n.d(r,"getSelectedBlockCount",(function(){return bt})),n.d(r,"hasSelectedBlock",(function(){return ft})),n.d(r,"getSelectedBlockClientId",(function(){return mt})),n.d(r,"getSelectedBlock",(function(){return ht})),n.d(r,"getBlockRootClientId",(function(){return vt})),n.d(r,"getBlockHierarchyRootClientId",(function(){return Ot})),n.d(r,"getAdjacentBlockClientId",(function(){return gt})),n.d(r,"getPreviousBlockClientId",(function(){return jt})),n.d(r,"getNextBlockClientId",(function(){return yt})),n.d(r,"getSelectedBlocksInitialCaretPosition",(function(){return _t})),n.d(r,"getMultiSelectedBlockClientIds",(function(){return wt})),n.d(r,"getMultiSelectedBlocks",(function(){return Pt})),n.d(r,"getFirstMultiSelectedBlockClientId",(function(){return St})),n.d(r,"getLastMultiSelectedBlockClientId",(function(){return kt})),n.d(r,"isFirstMultiSelectedBlock",(function(){return Et})),n.d(r,"isBlockMultiSelected",(function(){return Tt})),n.d(r,"isAncestorMultiSelected",(function(){return Ct})),n.d(r,"getMultiSelectedBlocksStartClientId",(function(){return xt})),n.d(r,"getMultiSelectedBlocksEndClientId",(function(){return At})),n.d(r,"getBlockOrder",(function(){return Bt})),n.d(r,"getBlockIndex",(function(){return It})),n.d(r,"isBlockSelected",(function(){return Rt})),n.d(r,"hasSelectedInnerBlock",(function(){return Dt})),n.d(r,"isBlockWithinSelection",(function(){return Nt})),n.d(r,"hasMultiSelection",(function(){return Lt})),n.d(r,"isMultiSelecting",(function(){return Ut})),n.d(r,"isSelectionEnabled",(function(){return Ft})),n.d(r,"getBlockMode",(function(){return Mt})),n.d(r,"isTyping",(function(){return zt})),n.d(r,"isCaretWithinFormattedText",(function(){return Vt})),n.d(r,"getBlockInsertionPoint",(function(){return Ht})),n.d(r,"isBlockInsertionPointVisible",(function(){return Wt})),n.d(r,"isValidTemplate",(function(){return Gt})),n.d(r,"getTemplate",(function(){return qt})),n.d(r,"getTemplateLock",(function(){return Kt})),n.d(r,"canInsertBlockType",(function(){return Qt})),n.d(r,"getInserterItems",(function(){return $t})),n.d(r,"hasInserterItems",(function(){return Yt})),n.d(r,"getBlockListSettings",(function(){return Xt})),n.d(r,"__experimentalGetDefaultTemplateTypes",(function(){return Jt})),n.d(r,"__experimentalGetDefaultTemplateType",(function(){return Zt})),n.d(r,"__experimentalGetTemplateInfo",(function(){return en}));var o={};n.r(o),n.d(o,"setupEditor",(function(){return yn})),n.d(o,"__experimentalTearDownEditor",(function(){return _n})),n.d(o,"resetPost",(function(){return wn})),n.d(o,"resetAutosave",(function(){return Pn})),n.d(o,"__experimentalRequestPostUpdateStart",(function(){return Sn})),n.d(o,"__experimentalRequestPostUpdateFinish",(function(){return kn})),n.d(o,"updatePost",(function(){return En})),n.d(o,"setupEditorState",(function(){return Tn})),n.d(o,"editPost",(function(){return Cn})),n.d(o,"savePost",(function(){return xn})),n.d(o,"refreshPost",(function(){return An})),n.d(o,"trashPost",(function(){return Bn})),n.d(o,"autosave",(function(){return In})),n.d(o,"redo",(function(){return Rn})),n.d(o,"undo",(function(){return Dn})),n.d(o,"createUndoLevel",(function(){return Nn})),n.d(o,"updatePostLock",(function(){return Ln})),n.d(o,"enablePublishSidebar",(function(){return Un})),n.d(o,"disablePublishSidebar",(function(){return Fn})),n.d(o,"lockPostSaving",(function(){return Mn})),n.d(o,"unlockPostSaving",(function(){return zn})),n.d(o,"lockPostAutosaving",(function(){return Vn})),n.d(o,"unlockPostAutosaving",(function(){return Hn})),n.d(o,"resetEditorBlocks",(function(){return Wn})),n.d(o,"updateEditorSettings",(function(){return Gn})),n.d(o,"resetBlocks",(function(){return Kn})),n.d(o,"receiveBlocks",(function(){return Qn})),n.d(o,"updateBlock",(function(){return $n})),n.d(o,"updateBlockAttributes",(function(){return Yn})),n.d(o,"selectBlock",(function(){return Xn})),n.d(o,"startMultiSelect",(function(){return Jn})),n.d(o,"stopMultiSelect",(function(){return Zn})),n.d(o,"multiSelect",(function(){return er})),n.d(o,"clearSelectedBlock",(function(){return tr})),n.d(o,"toggleSelection",(function(){return nr})),n.d(o,"replaceBlocks",(function(){return rr})),n.d(o,"replaceBlock",(function(){return or})),n.d(o,"moveBlocksDown",(function(){return ir})),n.d(o,"moveBlocksUp",(function(){return cr})),n.d(o,"moveBlockToPosition",(function(){return sr})),n.d(o,"insertBlock",(function(){return ar})),n.d(o,"insertBlocks",(function(){return ur})),n.d(o,"showInsertionPoint",(function(){return lr})),n.d(o,"hideInsertionPoint",(function(){return dr})),n.d(o,"setTemplateValidity",(function(){return pr})),n.d(o,"synchronizeTemplate",(function(){return br})),n.d(o,"mergeBlocks",(function(){return fr})),n.d(o,"removeBlocks",(function(){return mr})),n.d(o,"removeBlock",(function(){return hr})),n.d(o,"toggleBlockMode",(function(){return vr})),n.d(o,"startTyping",(function(){return Or})),n.d(o,"stopTyping",(function(){return gr})),n.d(o,"enterFormattedText",(function(){return jr})),n.d(o,"exitFormattedText",(function(){return yr})),n.d(o,"insertDefaultBlock",(function(){return _r})),n.d(o,"updateBlockListSettings",(function(){return wr}));var i=n("@wordpress/block-editor"),c=n("@wordpress/core-data"),s=n("@wordpress/rich-text"),a=n("./node_modules/@babel/runtime/helpers/esm/extends.js"),u=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),l=n("./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"),d=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),p=n("@wordpress/element"),b=n("lodash"),f=n("@wordpress/blocks"),m=n("@wordpress/data"),h=n("@wordpress/compose"),v=n("@wordpress/hooks");function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return e.push(Object(b.clone)(w)),e}));var P=n("@wordpress/data-controls"),S=n("./node_modules/@babel/runtime/helpers/esm/typeof.js");function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.id}return e},postType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SETUP_EDITOR_STATE":case"RESET_POST":return t.post.type}return e},preferences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:T,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"ENABLE_PUBLISH_SIDEBAR":return A(A({},e),{},{isPublishSidebarEnabled:!0});case"DISABLE_PUBLISH_SIDEBAR":return A(A({},e),{},{isPublishSidebarEnabled:!1})}return e},saving:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_POST_UPDATE_START":case"REQUEST_POST_UPDATE_FINISH":return{pending:"REQUEST_POST_UPDATE_START"===t.type,options:t.options||{}}}return e},postLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{isLocked:!1},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_POST_LOCK":return t.lock}return e},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 A(A({},e),{},{isValid:t.isValid})}return e},postSavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_SAVING":return A(A({},e),{},Object(u.a)({},t.lockName,!0));case"UNLOCK_POST_SAVING":return Object(b.omit)(e,t.lockName)}return e},isReady: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":return!0;case"TEAR_DOWN_EDITOR":return!1}return e},editorSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"UPDATE_EDITOR_SETTINGS":return A(A({},e),t.settings)}return e},postAutosavingLock:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"LOCK_POST_AUTOSAVING":return A(A({},e),{},Object(u.a)({},t.lockName,!0));case"UNLOCK_POST_AUTOSAVING":return Object(b.omit)(e,t.lockName)}return e}}),R=n("./node_modules/rememo/es/rememo.js"),D=n("@wordpress/date"),N=n("@wordpress/url"),L=n("@wordpress/deprecated"),U=n.n(L),F=new Set(["meta"]),M="core/editor",z=/%(?:postname|pagename)%/,V=["title","excerpt","content"];function H(e,t){return Object(N.addQueryArgs)(e,t)}function W(e){return e?Object(b.trim)(Object(b.deburr)(e).replace(/[\s\./]+/g,"-").replace(/[^\w-]+/g,"").toLowerCase(),"-"):""}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t1)return!1;var n=t[0].name;if(n!==Object(f.getDefaultBlockName)()&&n!==Object(f.getFreeformContentHandlerName)())return!1}return!Be(e)}var ge=Object(m.createRegistrySelector)((function(e){return function(t){if(!ve(t))return!1;if(Me(t))return!1;var n=re(t),r=oe(t),o=e("core").hasFetchedAutosaves(n,r),i=Object(b.get)(e("core").getCurrentUser(),["id"]),c=e("core").getAutosave(n,r,i);return!!o&&(!c||(!!J(t)||["title","excerpt"].some((function(e){return B(c[e])!==le(t,e)}))))}})),je=Object(m.createRegistrySelector)((function(e){return function(t){U()("`wp.data.select( 'core/editor' ).getAutosave()`",{alternative:"`wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=re(t),r=oe(t),o=Object(b.get)(e("core").getCurrentUser(),["id"]),i=e("core").getAutosave(n,r,o);return Object(b.mapValues)(Object(b.pick)(i,V),B)}})),ye=Object(m.createRegistrySelector)((function(e){return function(t){U()("`wp.data.select( 'core/editor' ).hasAutosave()`",{alternative:"`!! wp.data.select( 'core' ).getAutosave( postType, postId, userId )`",plugin:"Gutenberg"});var n=re(t),r=oe(t),o=Object(b.get)(e("core").getCurrentUser(),["id"]);return!!e("core").getAutosave(n,r,o)}}));function _e(e){var t=le(e,"date"),n=new Date(Number(Object(D.getDate)(t))-6e4);return Object(D.isInTheFuture)(n)}function we(e){var t=le(e,"date"),n=le(e,"modified"),r=ne(e).status;return("draft"===r||"auto-draft"===r||"pending"===r)&&(t===n||null===t)}var Pe=Object(m.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return e("core").isSavingEntityRecord("postType",n,r)}})),Se=Object(m.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return!e("core").getLastEntitySaveError("postType",n,r)}})),ke=Object(m.createRegistrySelector)((function(e){return function(t){var n=re(t),r=oe(t);return!!e("core").getLastEntitySaveError("postType",n,r)}}));function Ee(e){return!!Pe(e)&&!!Object(b.get)(e.saving,["options","isAutosave"])}function Te(e){return!!Pe(e)&&!!e.saving.options.isPreview}function Ce(e){if(!e.saving.pending&&!Pe(e)){var t=de(e,"preview_link");t||(t=le(e,"link"))&&(t=Object(N.addQueryArgs)(t,{preview:!0}));var n=le(e,"featured_media");return t&&n?Object(N.addQueryArgs)(t,{_thumbnail_id:n}):t}}function xe(e){var t,n=qe(e);if(n.length>2)return null;if(1===n.length&&"core/embed"===(t=n[0].name)){var r,o=null===(r=n[0].attributes)||void 0===r?void 0:r.providerNameSlug;["youtube","vimeo"].includes(o)?t="core/video":["spotify","soundcloud"].includes(o)&&(t="core/audio")}switch(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":return"video";case"core/audio":return"audio";default:return null}}function Ae(e){U()("`core/editor` getBlocksForSerialization selector",{plugin:"Gutenberg",alternative:"getEditorBlocks",hint:"Blocks serialization pre-processing occurs at save time"});var t=e.editor.present.blocks.value;return 1===t.length&&Object(f.isUnmodifiedDefaultBlock)(t[0])?[]:t}var Be=Object(m.createRegistrySelector)((function(e){return function(t){var n=oe(t),r=re(t),o=e("core").getEditedEntityRecord("postType",r,n);if(o){if("function"==typeof o.content)return o.content(o);if(o.blocks)return Object(f.__unstableSerializeAndClean)(o.blocks);if(o.content)return o.content}return""}}));function Ie(e){return Pe(e)&&!fe(e)&&"publish"===le(e,"status")}function Re(e){var t=le(e,"permalink_template");return z.test(t)}function De(e){var t=Le(e);if(!t)return null;var n=t.prefix,r=t.postName,o=t.suffix;return Re(e)?n+r+o:n}function Ne(e){return le(e,"slug")||W(le(e,"title"))||oe(e)}function Le(e){var t=le(e,"permalink_template");if(!t)return null;var n=le(e,"slug")||le(e,"generated_slug"),r=t.split(z),o=Object(l.a)(r,2);return{prefix:o[0],postName:n,suffix:o[1]}}function Ue(e){return e.postLock.isLocked}function Fe(e){return Object.keys(e.postSavingLock).length>0}function Me(e){return Object.keys(e.postAutosavingLock).length>0}function ze(e){return e.postLock.isTakeover}function Ve(e){return e.postLock.user}function He(e){return e.postLock.activePostLock}function We(e){return Object(b.has)(ne(e),["_links","wp:action-unfiltered-html"])}function Ge(e){return e.preferences.hasOwnProperty("isPublishSidebarEnabled")?e.preferences.isPublishSidebarEnabled:T.isPublishSidebarEnabled}function qe(e){return le(e,"blocks")||Q}function Ke(e){return le(e,"selectionStart")}function Qe(e){return le(e,"selectionEnd")}function $e(e){return e.isReady}function Ye(e){return e.editorSettings}function Xe(){return U()("select('core/editor').getStateBeforeOptimisticTransaction",{hint:"No state history is kept on this store anymore"}),null}function Je(){return U()("select('core/editor').inSomeHistory",{hint:"No state history is kept on this store anymore"}),!1}function Ze(e){return Object(m.createRegistrySelector)((function(t){return function(n){var r;U()("`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]*>/.test(r.message)&&(s=[s,r.message].join(" ")),[s,{id:"SAVE_POST_NOTICE_ID"}]}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_START",options:e}}function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"REQUEST_POST_UPDATE_FINISH",options:e}}function En(){return U()("wp.data.dispatch( 'core/editor' ).updatePost",{alternative:"User the core entitires store instead"}),{type:"DO_NOTHING"}}function Tn(e){return{type:"SETUP_EDITOR_STATE",post:e}}function Cn(e,t){var n,r,o;return rn.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,m.controls.select(M,"getCurrentPost");case 2:return n=i.sent,r=n.id,o=n.type,i.next=7,m.controls.dispatch("core","editEntityRecord","postType",o,r,e,t);case 7:case"end":return i.stop()}}),bn)}function xn(){var e,t,n,r,o,i,c,s=arguments;return rn.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return e=s.length>0&&void 0!==s[0]?s[0]:{},a.next=3,m.controls.select(M,"isEditedPostSaveable");case 3:if(a.sent){a.next=5;break}return a.abrupt("return");case 5:return a.next=7,m.controls.select(M,"getEditedPostContent");case 7:if(a.t0=a.sent,t={content:a.t0},e.isAutosave){a.next=12;break}return a.next=12,m.controls.dispatch(M,"editPost",t,{undoIgnore:!0});case 12:return a.next=14,Sn(e);case 14:return a.next=16,m.controls.select(M,"getCurrentPost");case 16:return n=a.sent,a.t1=ln,a.t2=ln,a.t3={id:n.id},a.next=22,m.controls.select("core","getEntityRecordNonTransientEdits","postType",n.type,n.id);case 22:return a.t4=a.sent,a.t5=(0,a.t2)(a.t3,a.t4),a.t6=t,t=(0,a.t1)(a.t5,a.t6),a.next=28,m.controls.dispatch("core","saveEntityRecord","postType",n.type,t,e);case 28:return a.next=30,kn(e);case 30:return a.next=32,m.controls.select("core","getLastEntitySaveError","postType",n.type,n.id);case 32:if(!(r=a.sent)){a.next=40;break}if(!(o=an({post:n,edits:t,error:r})).length){a.next=38;break}return a.next=38,m.controls.dispatch.apply(m.controls,[on.store,"createErrorNotice"].concat(Object(tn.a)(o)));case 38:a.next=58;break;case 40:return a.next=42,m.controls.select(M,"getCurrentPost");case 42:return i=a.sent,a.t7=sn,a.t8=n,a.t9=i,a.next=48,m.controls.resolveSelect("core","getPostType",i.type);case 48:if(a.t10=a.sent,a.t11=e,a.t12={previousPost:a.t8,post:a.t9,postType:a.t10,options:a.t11},!(c=(0,a.t7)(a.t12)).length){a.next=55;break}return a.next=55,m.controls.dispatch.apply(m.controls,[on.store,"createSuccessNotice"].concat(Object(tn.a)(c)));case 55:if(e.isAutosave){a.next=58;break}return a.next=58,m.controls.dispatch("core/block-editor","__unstableMarkLastChangeAsPersistent");case 58:case"end":return a.stop()}}),fn)}function An(){var e,t,n,r;return rn.a.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,m.controls.select(M,"getCurrentPost");case 2:return e=o.sent,o.next=5,m.controls.select(M,"getCurrentPostType");case 5:return t=o.sent,o.next=8,m.controls.resolveSelect("core","getPostType",t);case 8:return n=o.sent,o.next=11,Object(P.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,m.controls.dispatch(M,"resetPost",r);case 14:case"end":return o.stop()}}),mn)}function Bn(){var e,t,n;return rn.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,m.controls.select(M,"getCurrentPostType");case 2:return e=r.sent,r.next=5,m.controls.resolveSelect("core","getPostType",e);case 5:return t=r.sent,r.next=8,m.controls.dispatch(on.store,"removeNotice","TRASH_POST_NOTICE_ID");case 8:return r.prev=8,r.next=11,m.controls.select(M,"getCurrentPost");case 11:return n=r.sent,r.next=14,Object(P.apiFetch)({path:"/wp/v2/".concat(t.rest_base,"/").concat(n.id),method:"DELETE"});case 14:return r.next=16,m.controls.dispatch(M,"savePost");case 16:r.next=22;break;case 18:return r.prev=18,r.t0=r.catch(8),r.next=22,m.controls.dispatch.apply(m.controls,[on.store,"createErrorNotice"].concat(Object(tn.a)([(o={error:r.t0}).error.message&&"unknown_error"!==o.error.code?o.error.message:Object(cn.__)("Trashing failed"),{id:"TRASH_POST_NOTICE_ID"}])));case 22:case"end":return r.stop()}var o}),hn,null,[[8,18]])}function In(){var e,t,n,r,o,i,c,s,a,u=arguments;return rn.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(e=u.length>0&&void 0!==u[0]?u[0]:{},t=e.local,n=void 0!==t&&t,r=Object(d.a)(e,["local"]),!n){l.next=21;break}return l.next=4,m.controls.select(M,"getCurrentPost");case 4:return o=l.sent,l.next=7,m.controls.select(M,"isEditedPostNew");case 7:return i=l.sent,l.next=10,m.controls.select(M,"getEditedPostAttribute","title");case 10:return c=l.sent,l.next=13,m.controls.select(M,"getEditedPostAttribute","content");case 13:return s=l.sent,l.next=16,m.controls.select(M,"getEditedPostAttribute","excerpt");case 16:return a=l.sent,l.next=19,{type:"LOCAL_AUTOSAVE_SET",postId:o.id,isPostNew:i,title:c,content:s,excerpt:a};case 19:l.next=23;break;case 21:return l.next=23,m.controls.dispatch(M,"savePost",ln({isAutosave:!0},r));case 23:case"end":return l.stop()}}),vn)}function Rn(){return rn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.dispatch("core","redo");case 2:case"end":return e.stop()}}),On)}function Dn(){return rn.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m.controls.dispatch("core","undo");case 2:case"end":return e.stop()}}),gn)}function Nn(){return{type:"CREATE_UNDO_LEVEL"}}function Ln(e){return{type:"UPDATE_POST_LOCK",lock:e}}function Un(){return{type:"ENABLE_PUBLISH_SIDEBAR"}}function Fn(){return{type:"DISABLE_PUBLISH_SIDEBAR"}}function Mn(e){return{type:"LOCK_POST_SAVING",lockName:e}}function zn(e){return{type:"UNLOCK_POST_SAVING",lockName:e}}function Vn(e){return{type:"LOCK_POST_AUTOSAVING",lockName:e}}function Hn(e){return{type:"UNLOCK_POST_AUTOSAVING",lockName:e}}function Wn(e){var t,n,r,o,i,c,s,a,u=arguments;return rn.a.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(t=u.length>1&&void 0!==u[1]?u[1]:{},n=t.__unstableShouldCreateUndoLevel,r=t.selectionStart,o=t.selectionEnd,i={blocks:e,selectionStart:r,selectionEnd:o},!1===n){l.next=19;break}return l.next=6,m.controls.select(M,"getCurrentPost");case 6:return c=l.sent,s=c.id,a=c.type,l.next=11,m.controls.select("core","getEditedEntityRecord","postType",a,s);case 11:if(l.t0=l.sent.blocks,l.t1=i.blocks,!(l.t0===l.t1)){l.next=18;break}return l.next=17,m.controls.dispatch("core","__unstableCreateUndoLevel","postType",a,s);case 17:return l.abrupt("return",l.sent);case 18:i.content=function(e){var t=e.blocks,n=void 0===t?[]:t;return Object(f.__unstableSerializeAndClean)(n)};case 19:return l.delegateYield(Cn(i),"t2",20);case 20:case"end":return l.stop()}}),jn)}function Gn(e){return{type:"UPDATE_EDITOR_SETTINGS",settings:e}}var qn=function(e){return rn.a.mark((function t(){var n,r,o,i=arguments;return rn.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(U()("`wp.data.dispatch( 'core/editor' )."+e+"`",{alternative:"`wp.data.dispatch( 'core/block-editor' )."+e+"`"}),n=i.length,r=new Array(n),o=0;o0&&void 0!==arguments[0]?arguments[0]:1e3*this.props.interval;this.timerId=setTimeout((function(){e.autosaveTimerHandler()}),t)}},{key:"autosaveTimerHandler",value:function(){this.props.isAutosaveable?(this.needsAutosave&&(this.needsAutosave=!1,this.props.autosave()),this.setAutosaveTimer()):this.setAutosaveTimer(1e3)}},{key:"render",value:function(){return null}}]),n}(p.Component),Ur=Object(h.compose)([Object(m.withSelect)((function(e,t){var n=e("core").getReferenceByDistinctEdits,r=e("core/editor"),o=r.isEditedPostDirty,i=r.isEditedPostAutosaveable,c=r.isAutosavingPost,s=r.getEditorSettings,a=t.interval,u=void 0===a?s().autosaveInterval:a;return{editsReference:n(),isDirty:o(),isAutosaveable:i(),isAutosaving:c(),interval:u}})),Object(m.withDispatch)((function(e,t){return{autosave:function(){var n=t.autosave,r=void 0===n?e("core/editor").autosave:n;r()}}}))])(Lr),Fr=n("./node_modules/classnames/index.js"),Mr=n.n(Fr),zr=function(e){var t=e.children,n=e.isValid,r=e.level,o=e.href,i=e.onSelect;return Object(p.createElement)("li",{className:Mr()("document-outline__item","is-".concat(r.toLowerCase()),{"is-invalid":!n})},Object(p.createElement)("a",{href:o,className:"document-outline__button",onClick:i},Object(p.createElement)("span",{className:"document-outline__emdash","aria-hidden":"true"}),Object(p.createElement)("strong",{className:"document-outline__level"},r),Object(p.createElement)("span",{className:"document-outline__item-content"},t)))};function Vr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hr(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:[];return Object(b.flatMap)(t,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"core/heading"===t.name?Hr(Hr({},t),{},{level:t.attributes.level,isEmpty:Qr(t)}):e(t.innerBlocks)}))}(n);if(a.length<1)return null;var u=1,l=document.querySelector(".editor-post-title__input"),d=i&&r&&l,f=Object(b.countBy)(a,"level")[1]>1;return Object(p.createElement)("div",{className:"document-outline"},Object(p.createElement)("ul",null,d&&Object(p.createElement)(zr,{level:Object(cn.__)("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&&(f||d));return u=e.level,Object(p.createElement)(zr,{key:t,level:"H".concat(e.level),isValid:r,isDisabled:c,href:"#block-".concat(e.clientId),onSelect:o},e.isEmpty?Wr:Object(s.getTextContent)(Object(s.create)({html:e.attributes.content})),n&&Gr,1===e.level&&f&&Kr,d&&1===e.level&&!f&&qr)}))))}));var Yr=Object(m.withSelect)((function(e){return{blocks:e("core/block-editor").getBlocks()}}))((function(e){var t=e.blocks,n=e.children;return Object(b.filter)(t,(function(e){return"core/heading"===e.name})).length<1?null:n})),Xr=n("@wordpress/keyboard-shortcuts");var Jr=function(e){var t=e.resetBlocksOnSave,n=Object(m.useDispatch)("core/editor"),r=n.resetEditorBlocks,o=n.savePost,i=Object(m.useSelect)((function(e){var t=e("core/editor");return{isEditedPostDirty:t.isEditedPostDirty,getPostEdits:t.getPostEdits}}),[]),c=i.isEditedPostDirty,s=i.getPostEdits;return Object(Xr.useShortcut)("core/editor/save",(function(e){if(e.preventDefault(),c()){if(t){var n=s();if(n.content&&"string"==typeof n.content){var i=Object(f.parse)(n.content);r(i)}}o()}}),{bindGlobal:!0}),null};function Zr(){var e=Object(m.useDispatch)("core/editor"),t=e.redo,n=e.undo;return Object(Xr.useShortcut)("core/editor/undo",(function(e){n(),e.preventDefault()}),{bindGlobal:!0}),Object(Xr.useShortcut)("core/editor/redo",(function(e){t(),e.preventDefault()}),{bindGlobal:!0}),Object(p.createElement)(p.Fragment,null,Object(p.createElement)(i.BlockEditorKeyboardShortcuts,null),Object(p.createElement)(Jr,null))}var eo=Zr;function to(){return U()("EditorGlobalKeyboardShortcuts",{alternative:"VisualEditorGlobalKeyboardShortcuts",plugin:"Gutenberg"}),Object(p.createElement)(Zr,null)}function no(){return Object(p.createElement)(Jr,{resetBlocksOnSave:!0})}var ro=function(){var e=Object(m.useDispatch)(Xr.store).registerShortcut;return Object(p.useEffect)((function(){e({name:"core/editor/save",category:"global",description:Object(cn.__)("Save your changes."),keyCombination:{modifier:"primary",character:"s"}}),e({name:"core/editor/undo",category:"global",description:Object(cn.__)("Undo your last changes."),keyCombination:{modifier:"primary",character:"z"}}),e({name:"core/editor/redo",category:"global",description:Object(cn.__)("Redo your last undo."),keyCombination:{modifier:"primaryShift",character:"z"}})}),[e]),Object(p.createElement)(i.BlockEditorKeyboardShortcuts.Register,null)},oo=n("@wordpress/components"),io=n("@wordpress/keycodes"),co=n("@wordpress/primitives"),so=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z"}));var ao=Object(p.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e("core/editor").hasEditorRedo()}),[]),r=Object(m.useDispatch)("core/editor").redo;return Object(p.createElement)(oo.Button,Object(a.a)({},e,{ref:t,icon:so,label:Object(cn.__)("Redo"),shortcut:io.displayShortcut.primaryShift("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__redo"}))})),uo=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z"}));var lo=Object(p.forwardRef)((function(e,t){var n=Object(m.useSelect)((function(e){return e("core/editor").hasEditorUndo()}),[]),r=Object(m.useDispatch)("core/editor").undo;return Object(p.createElement)(oo.Button,Object(a.a)({},e,{ref:t,icon:uo,label:Object(cn.__)("Undo"),shortcut:io.displayShortcut.primary("z"),"aria-disabled":!n,onClick:n?r:void 0,className:"editor-history__undo"}))}));var po=Object(h.compose)([Object(m.withSelect)((function(e){return{isValid:e("core/block-editor").isValidTemplate()}})),Object(m.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(d.a)(e,["isValid"]);return t?null:Object(p.createElement)(oo.Notice,{className:"editor-template-validation-notice",isDismissible:!1,status:"warning",actions:[{label:Object(cn.__)("Keep it as is"),onClick:n.resetTemplateValidity},{label:Object(cn.__)("Reset the template"),onClick:function(){window.confirm(Object(cn.__)("Resetting the template may result in loss of content, do you want to continue?"))&&n.synchronizeTemplate()},isPrimary:!0}]},Object(cn.__)("The content of your post doesn’t match the template assigned to your post type."))}));var bo=Object(h.compose)([Object(m.withSelect)((function(e){return{notices:e(on.store).getNotices()}})),Object(m.withDispatch)((function(e){return{onRemove:e(on.store).removeNotice}}))])((function(e){var t=e.notices,n=e.onRemove,r=Object(b.filter)(t,{isDismissible:!0,type:"default"}),o=Object(b.filter)(t,{isDismissible:!1,type:"default"}),i=Object(b.filter)(t,{type:"snackbar"});return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.NoticeList,{notices:o,className:"components-editor-notices__pinned"}),Object(p.createElement)(oo.NoticeList,{notices:r,className:"components-editor-notices__dismissible",onRemove:n},Object(p.createElement)(po,null)),Object(p.createElement)(oo.SnackbarList,{notices:i,className:"components-editor-notices__snackbar",onRemove:n}))})),fo=n("./node_modules/@wordpress/icons/build-module/library/close.js"),mo=n("./node_modules/@wordpress/icons/build-module/library/layout.js"),ho=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z"}));function vo(e){var t=e.record,n=e.checked,r=e.onChange,o=e.closePanel,i=t.name,c=t.kind,s=t.title,a=t.key,u=Object(m.useSelect)((function(e){var t,n=e("core").getEditedEntityRecord(c,i,a).blocks,r=void 0===n?[]:n,o=e("core/block-editor").getBlockParents(null===(t=r[0])||void 0===t?void 0:t.clientId);return o[o.length-1]}),[]),l=Object(m.useSelect)((function(e){if("postType"!==c||"wp_template"!==i)return s;var t=e("core").getEditedEntityRecord(c,i,a);return e("core/editor").__experimentalGetTemplateInfo(t).title}),[i,c,s,a]),d=Object(m.useSelect)((function(e){return e("core/block-editor").getSelectedBlockClientId()===u}),[u]),b=d?Object(cn.__)("Selected"):Object(cn.__)("Select"),f=Object(m.useDispatch)("core/block-editor").selectBlock,h=Object(p.useCallback)((function(){return f(u)}),[u]),v=Object(p.useCallback)((function(){f(u),o()}),[u]);return Object(p.createElement)(oo.PanelRow,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(p.createElement)("strong",null,l||Object(cn.__)("Untitled")),checked:n,onChange:r}),u?Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.Button,{onClick:h,className:"entities-saved-states__find-entity",disabled:d},b),Object(p.createElement)(oo.Button,{onClick:v,className:"entities-saved-states__find-entity-small",disabled:d},b)):null)}var Oo={site:mo.a,page:ho};function go(e){var t=e.list,n=e.unselectedEntities,r=e.setUnselectedEntities,o=e.closePanel,i=t[0],c=Object(m.useSelect)((function(e){return e("core").getEntity(i.kind,i.name)}),[i.kind,i.name]),s=i.name,a=Oo[s];return Object(p.createElement)(oo.PanelBody,{title:c.label,initialOpen:!0,icon:a},t.map((function(e){return Object(p.createElement)(vo,{key:e.key||"site",record:e,checked:!Object(b.some)(n,(function(t){return t.kind===e.kind&&t.name===e.name&&t.key===e.key})),onChange:function(t){return r(e,t)},closePanel:o})})))}var jo={wp_template_part:function(e){return Object(cn._n)("template part","template parts",e)},wp_template:function(e){return Object(cn._n)("template","templates",e)},post:function(e){return Object(cn._n)("post","posts",e)},page:function(e){return Object(cn._n)("page","pages",e)},site:function(e){return Object(cn._n)("site","sites",e)}},yo={0:Object(cn.__)("There are no changes."),1:Object(cn.__)("The following changes have been made to your %s."),2:Object(cn.__)("The following changes have been made to your %1$s and %2$s."),3:Object(cn.__)("The following changes have been made to your %1$s, %2$s, and %3$s."),4:Object(cn.__)("The following changes have been made to your %1$s, %2$s, %3$s, and %4$s."),5:Object(cn.__)("The following changes have been made to your %1$s, %2$s, %3$s, %4$s, and %5$s.")};var _o=Object(oo.withFocusReturn)((function(e){var t=e.isOpen,n=e.close,r=Object(m.useSelect)((function(e){return{dirtyEntityRecords:e("core").__experimentalGetDirtyEntityRecords()}}),[]).dirtyEntityRecords,o=Object(m.useDispatch)("core").saveEditedEntityRecord,i=Object.values(Object(b.groupBy)(r,"name")),c=[];i.forEach((function(e){jo[e[0].name]&&c.push(jo[e[0].name](e.length))}));var s=yo[c.length]||Object(cn.__)("The following changes have been made to multiple entities."),a=cn.sprintf.apply(void 0,[s].concat(c)),u=Object(p.useState)([]),d=Object(l.a)(u,2),f=d[0],h=d[1],v=function(e,t){var n=e.kind,r=e.name,o=e.key;h(t?f.filter((function(e){return e.kind!==n||e.name!==r||e.key!==o})):[].concat(Object(tn.a)(f),[{kind:n,name:r,key:o}]))},O=Object(p.useCallback)((function(){return n()}),[n]);return t?Object(p.createElement)("div",{className:"entities-saved-states__panel"},Object(p.createElement)("div",{className:"entities-saved-states__panel-header"},Object(p.createElement)(oo.Button,{isPrimary:!0,disabled:r.length-f.length==0,onClick:function(){var e=r.filter((function(e){var t=e.kind,n=e.name,r=e.key;return!Object(b.some)(f,(function(e){return e.kind===t&&e.name===n&&e.key===r}))}));n(e),e.forEach((function(e){var t=e.kind,n=e.name,r=e.key;o(t,n,r)}))},className:"editor-entities-saved-states__save-button"},Object(cn.__)("Save")),Object(p.createElement)(oo.Button,{onClick:O,icon:fo.a,label:Object(cn.__)("Close panel")})),Object(p.createElement)("div",{className:"entities-saved-states__text-prompt"},Object(p.createElement)("strong",null,Object(cn.__)("Are you ready to save?")),Object(p.createElement)("p",null,a)),i.map((function(e){return Object(p.createElement)(go,{key:e[0].name,list:e,closePanel:O,unselectedEntities:f,setUnselectedEntities:v})}))):null})),wo=n("./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");function Po(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var So=function(e){Object(Ir.a)(n,e);var t=Po(n);function n(){var e;return Object(Ar.a)(this,n),(e=t.apply(this,arguments)).reboot=e.reboot.bind(Object(wo.a)(e)),e.getContent=e.getContent.bind(Object(wo.a)(e)),e.state={error:null},e}return Object(Br.a)(n,[{key:"componentDidCatch",value:function(e){this.setState({error:e})}},{key:"reboot",value:function(){this.props.onError()}},{key:"getContent",value:function(){try{return Object(m.select)("core/editor").getEditedPostContent()}catch(e){}}},{key:"render",value:function(){var e=this.state.error;return e?Object(p.createElement)(i.Warning,{className:"editor-error-boundary",actions:[Object(p.createElement)(oo.Button,{key:"recovery",onClick:this.reboot,isSecondary:!0},Object(cn.__)("Attempt Recovery")),Object(p.createElement)(oo.ClipboardButton,{key:"copy-post",text:this.getContent,isSecondary:!0},Object(cn.__)("Copy Post Text")),Object(p.createElement)(oo.ClipboardButton,{key:"copy-error",text:e.stack,isSecondary:!0},Object(cn.__)("Copy Error"))]},Object(cn.__)("The editor has encountered an unexpected error.")):this.props.children}}]),n}(p.Component),ko=window.requestIdleCallback?window.requestIdleCallback:window.requestAnimationFrame,Eo=Object(b.once)((function(){try{return window.sessionStorage.setItem("__wpEditorTestSessionStorage",""),window.sessionStorage.removeItem("__wpEditorTestSessionStorage"),!0}catch(e){return!1}}));function To(){var e=Object(m.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),getEditedPostAttribute:e("core/editor").getEditedPostAttribute,hasRemoteAutosave:!!e("core/editor").getEditorSettings().autosave}}),[]),t=e.postId,n=e.isEditedPostNew,r=e.getEditedPostAttribute,o=e.hasRemoteAutosave,i=Object(m.useDispatch)(on.store),c=i.createWarningNotice,s=i.removeNotice,a=Object(m.useDispatch)("core/editor"),u=a.editPost,l=a.resetEditorBlocks;Object(p.useEffect)((function(){var e=function(e,t){return window.sessionStorage.getItem(Pr(e,t))}(t,n);if(e){try{e=JSON.parse(e)}catch(e){return}var i=e,a={title:i.post_title,content:i.content,excerpt:i.excerpt};if(Object.keys(a).some((function(e){return a[e]!==r(e)}))){if(!o){var d=Object(b.uniqueId)("wpEditorAutosaveRestore");c(Object(cn.__)("The backup of this post in your browser is different from the version below."),{id:d,actions:[{label:Object(cn.__)("Restore the backup"),onClick:function(){u(Object(b.omit)(a,["content"])),l(Object(f.parse)(a.content)),s(d)}}]})}}else Sr(t,n)}}),[n,t])}var Co=Object(h.ifCondition)(Eo)((function(){var e=Object(m.useDispatch)("core/editor").autosave,t=Object(p.useCallback)((function(){ko((function(){return e({local:!0})}))}),[]);To(),function(){var e=Object(m.useSelect)((function(e){return{postId:e("core/editor").getCurrentPostId(),isEditedPostNew:e("core/editor").isEditedPostNew(),isDirty:e("core/editor").isEditedPostDirty(),isAutosaving:e("core/editor").isAutosavingPost(),didError:e("core/editor").didPostSaveRequestFail()}}),[]),t=e.postId,n=e.isEditedPostNew,r=e.isDirty,o=e.isAutosaving,i=e.didError,c=Object(p.useRef)(r),s=Object(p.useRef)(o);Object(p.useEffect)((function(){!i&&(s.current&&!o||c.current&&!r)&&Sr(t,n),c.current=r,s.current=o}),[r,o,i]);var a=Object(h.usePrevious)(n),u=Object(h.usePrevious)(t);Object(p.useEffect)((function(){u===t&&a&&!n&&Sr(t,!0)}),[n,t])}();var n=Object(m.useSelect)((function(e){return{localAutosaveInterval:e("core/editor").getEditorSettings().__experimentalLocalAutosaveInterval}}),[]).localAutosaveInterval;return Object(p.createElement)(Ur,{interval:n,autosave:t})}));var xo=Object(m.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(b.get)(n,["supports","page-attributes"],!1)&&Object(b.isEmpty)(t)?null:r}));var Ao=Object(m.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(b.some)(Object(b.castArray)(r),(function(e){return!!t.supports[e]}))),o?n:null})),Bo=Object(h.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(p.createElement)(oo.TextControl,{className:"editor-page-attributes__order",type:"number",label:Object(cn.__)("Order"),value:c,onChange:function(e){i({orderInput:e});var n=Number(e);Number.isInteger(n)&&""!==Object(b.invoke)(e,["trim"])&&t(Number(e))},size:6,onBlur:function(){i({orderInput:null})}})}));var Io=Object(h.compose)([Object(m.withSelect)((function(e){return{order:e("core/editor").getEditedPostAttribute("menu_order")}})),Object(m.withDispatch)((function(e){return{onUpdateOrder:function(t){e("core/editor").editPost({menu_order:t})}}}))])((function(e){return Object(p.createElement)(Ao,{supportKeys:"page-attributes"},Object(p.createElement)(Bo,e))}));function Ro(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:0;return Object(b.flatMap)(t,(function(t){return[{value:t.id,label:Object(b.repeat)("— ",n)+Object(b.unescape)(t.name)}].concat(Object(tn.a)(e(t.children||[],n+1)))}))}(e),n=Object(b.find)(t,(function(e){return e.value===a}));return s&&!n&&t.unshift({value:a,label:Lo(s)}),t}),[v]);return f&&h?Object(p.createElement)(oo.ComboboxControl,{className:"editor-page-attributes__parent",label:h,value:a,options:O,onFilterValueChange:Object(b.debounce)((function(e){o(e)}),300),onChange:function(t){e({parent:t})}}):null};var Fo=Object(h.compose)(Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=(0,t.getEditorSettings)().availableTemplates;return{selectedTemplate:n("template"),availableTemplates:r}})),Object(m.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(b.isEmpty)(t)?null:Object(p.createElement)(oo.SelectControl,{label:Object(cn.__)("Template:"),value:n,onChange:r,className:"editor-page-attributes__template",options:Object(b.map)(t,(function(e,t){return{value:t,label:e}}))})}));var Mo=function(){var e=Object(p.useState)(),t=Object(l.a)(e,2),n=t[0],r=t[1],o=Object(m.useSelect)((function(e){var t=e("core"),r=t.__unstableGetAuthor,o=t.getAuthors,i=t.isResolving,c=e("core/editor").getEditedPostAttribute,s=r(c("author")),a=n&&""!==n?{search:n}:{};return{authorId:c("author"),postAuthor:s,authors:o(a),isLoading:i("core","getAuthors",[a])}}),[n]),i=o.authorId,c=o.isLoading,s=o.authors,a=o.postAuthor,u=Object(m.useDispatch)("core/editor").editPost,d=Object(p.useMemo)((function(){var e=(null!=s?s:[]).map((function(e){return{value:e.id,label:e.name}}));return e.findIndex((function(e){var t=e.value;return(null==a?void 0:a.id)===t}))<0&&a?[{value:a.id,label:a.name}].concat(Object(tn.a)(e)):e}),[s,a]);return Object(p.useEffect)((function(){a&&r(a.name)}),[a]),a?Object(p.createElement)(oo.ComboboxControl,{label:Object(cn.__)("Author"),options:d,value:i,onFilterValueChange:Object(b.debounce)((function(e){r(e)}),300),onChange:function(e){e&&u({author:e})},isLoading:c,allowReset:!1}):null},zo=n("@wordpress/html-entities");var Vo=function(){var e=Object(m.useDispatch)("core/editor").editPost,t=Object(m.useSelect)((function(e){var t=e("core").getAuthors();return{postAuthor:e("core/editor").getEditedPostAttribute("author"),authors:t.map((function(e){return{label:Object(zo.decodeEntities)(e.name),value:e.id}}))}}),[]),n=t.postAuthor,r=t.authors;return Object(p.createElement)(oo.SelectControl,{className:"post-author-selector",label:Object(cn.__)("Author"),options:r,onChange:function(t){var n=Number(t);e({author:n})},value:n})};var Ho=function(){return Object(m.useSelect)((function(e){var t=e(c.store).getAuthors();return(null==t?void 0:t.length)>=25}),[])?Object(p.createElement)(Mo,null):Object(p.createElement)(Vo,null)};var Wo=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasAssignAuthorAction:Object(b.get)(t,["_links","wp:action-assign-author"],!1),postType:e("core/editor").getCurrentPostType(),authors:e("core").getAuthors()}})),h.withInstanceId])((function(e){var t=e.hasAssignAuthorAction,n=e.authors,r=e.children;return!t||!n||1>=n.length?null:Object(p.createElement)(Ao,{supportKeys:"author"},r)}));var Go=Object(h.compose)([Object(m.withSelect)((function(e){return{commentStatus:e("core/editor").getEditedPostAttribute("comment_status")}})),Object(m.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.commentStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["commentStatus"]);return Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Allow comments"),checked:"open"===n,onChange:function(){return r.editPost({comment_status:"open"===n?"closed":"open"})}})}));var qo=Object(h.compose)([Object(m.withSelect)((function(e){return{excerpt:e("core/editor").getEditedPostAttribute("excerpt")}})),Object(m.withDispatch)((function(e){return{onUpdateExcerpt:function(t){e("core/editor").editPost({excerpt:t})}}}))])((function(e){var t=e.excerpt,n=e.onUpdateExcerpt;return Object(p.createElement)("div",{className:"editor-post-excerpt"},Object(p.createElement)(oo.TextareaControl,{label:Object(cn.__)("Write an excerpt (optional)"),className:"editor-post-excerpt__textarea",onChange:function(e){return n(e)},value:t}),Object(p.createElement)(oo.ExternalLink,{href:Object(cn.__)("https://wordpress.org/support/article/excerpt/")},Object(cn.__)("Learn more about manual excerpts")))}));var Ko=function(e){return Object(p.createElement)(Ao,Object(a.a)({},e,{supportKeys:"excerpt"}))};var Qo=Object(m.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(b.some)(Object(b.castArray)(o),(function(e){var n=Object(b.get)(t,[e],!1);return"post-thumbnails"===e&&Object(b.isArray)(n)?Object(b.includes)(n,r):n}))?n:null}));var $o=function(e){return Object(p.createElement)(Qo,{supportKeys:"post-thumbnails"},Object(p.createElement)(Ao,Object(a.a)({},e,{supportKeys:"thumbnail"})))},Yo=["image"],Xo=Object(cn.__)("Featured image"),Jo=Object(cn.__)("Set featured image"),Zo=Object(cn.__)("Remove image");var ei=Object(m.withSelect)((function(e){var t=e("core"),n=t.getMedia,r=t.getPostType,o=e("core/editor"),i=o.getCurrentPostId,c=o.getEditedPostAttribute,s=c("featured_media");return{media:s?n(s):null,currentPostId:i(),postType:r(c("type")),featuredImageId:s}})),ti=Object(m.withDispatch)((function(e,t,n){var r=t.noticeOperations,o=n.select,i=e("core/editor").editPost;return{onUpdateImage:function(e){i({featured_media:e.id})},onDropImage:function(e){o("core/block-editor").getSettings().mediaUpload({allowedTypes:["image"],filesList:e,onFileChange:function(e){var t=Object(l.a)(e,1)[0];i({featured_media:t.id})},onError:function(e){r.removeAllNotices(),r.createErrorNotice(e)}})},onRemoveImage:function(){i({featured_media:0})}}})),ni=Object(h.compose)(oo.withNotices,ei,ti,Object(oo.withFilters)("editor.PostFeaturedImage"))((function(e){var t,n,r,o,c,s=e.currentPostId,a=e.featuredImageId,u=e.onUpdateImage,l=e.onDropImage,d=e.onRemoveImage,f=e.media,m=e.postType,h=e.noticeUI,O=Object(b.get)(m,["labels"],{}),g=Object(p.createElement)("p",null,Object(cn.__)("To edit the featured image, you need permission to upload media."));if(f){var j=Object(v.applyFilters)("editor.PostFeaturedImage.imageSize","post-thumbnail",f.id,s);if(Object(b.has)(f,["media_details","sizes",j]))r=f.media_details.sizes[j].width,o=f.media_details.sizes[j].height,c=f.media_details.sizes[j].source_url;else{var y=Object(v.applyFilters)("editor.PostFeaturedImage.imageSize","thumbnail",f.id,s);Object(b.has)(f,["media_details","sizes",y])?(r=f.media_details.sizes[y].width,o=f.media_details.sizes[y].height,c=f.media_details.sizes[y].source_url):(r=f.media_details.width,o=f.media_details.height,c=f.source_url)}}return Object(p.createElement)($o,null,h,Object(p.createElement)("div",{className:"editor-post-featured-image"},f&&Object(p.createElement)("div",{id:"editor-post-featured-image-".concat(a,"-describedby"),className:"hidden"},f.alt_text&&Object(cn.sprintf)(Object(cn.__)("Current image: %s"),f.alt_text),!f.alt_text&&Object(cn.sprintf)(Object(cn.__)("The current image has no alternative text. The file name is: %s"),(null===(t=f.media_details.sizes)||void 0===t||null===(n=t.full)||void 0===n?void 0:n.file)||f.slug)),Object(p.createElement)(i.MediaUploadCheck,{fallback:g},Object(p.createElement)(i.MediaUpload,{title:O.featured_image||Xo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:Yo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(p.createElement)("div",{className:"editor-post-featured-image__container"},Object(p.createElement)(oo.Button,{className:a?"editor-post-featured-image__preview":"editor-post-featured-image__toggle",onClick:t,"aria-label":a?Object(cn.__)("Edit or update the image"):null,"aria-describedby":a?"editor-post-featured-image-".concat(a,"-describedby"):null},!!a&&f&&Object(p.createElement)(oo.ResponsiveWrapper,{naturalWidth:r,naturalHeight:o,isInline:!0},Object(p.createElement)("img",{src:c,alt:""})),!!a&&!f&&Object(p.createElement)(oo.Spinner,null),!a&&(O.set_featured_image||Jo)),Object(p.createElement)(oo.DropZone,{onFilesDrop:l}))},value:a})),!!a&&f&&!f.isLoading&&Object(p.createElement)(i.MediaUploadCheck,null,Object(p.createElement)(i.MediaUpload,{title:O.featured_image||Xo,onSelect:u,unstableFeaturedImageFlow:!0,allowedTypes:Yo,modalClass:"editor-post-featured-image__media-modal",render:function(e){var t=e.open;return Object(p.createElement)(oo.Button,{onClick:t,isSecondary:!0},Object(cn.__)("Replace Image"))}})),!!a&&Object(p.createElement)(i.MediaUploadCheck,null,Object(p.createElement)(oo.Button,{onClick:d,isLink:!0,isDestructive:!0},O.remove_featured_image||Zo))))}));var ri=Object(m.withSelect)((function(e){return{disablePostFormats:e("core/editor").getEditorSettings().disablePostFormats}}))((function(e){var t=e.disablePostFormats,n=Object(d.a)(e,["disablePostFormats"]);return!t&&Object(p.createElement)(Ao,Object(a.a)({},n,{supportKeys:"post-formats"}))})),oi=[{id:"aside",caption:Object(cn.__)("Aside")},{id:"audio",caption:Object(cn.__)("Audio")},{id:"chat",caption:Object(cn.__)("Chat")},{id:"gallery",caption:Object(cn.__)("Gallery")},{id:"image",caption:Object(cn.__)("Image")},{id:"link",caption:Object(cn.__)("Link")},{id:"quote",caption:Object(cn.__)("Quote")},{id:"standard",caption:Object(cn.__)("Standard")},{id:"status",caption:Object(cn.__)("Status")},{id:"video",caption:Object(cn.__)("Video")}].sort((function(e,t){var n=e.caption.toUpperCase(),r=t.caption.toUpperCase();return nr?1:0}));function ii(){var e=Object(h.useInstanceId)(ii),t="post-format-selector-".concat(e),n=Object(m.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=n("format"),i=e("core").getThemeSupports();return{postFormat:null!=o?o:"standard",suggestedFormat:r(),supportedFormats:Object(b.union)([o],Object(b.get)(i,["formats"],[]))}}),[]),r=n.postFormat,o=n.suggestedFormat,i=n.supportedFormats,c=oi.filter((function(e){return Object(b.includes)(i,e.id)})),s=Object(b.find)(c,(function(e){return e.id===o})),a=Object(m.useDispatch)("core/editor").editPost,u=function(e){return a({format:e})};return Object(p.createElement)(ri,null,Object(p.createElement)("div",{className:"editor-post-format"},Object(p.createElement)("div",{className:"editor-post-format__content"},Object(p.createElement)("label",{htmlFor:t},Object(cn.__)("Post Format")),Object(p.createElement)(oo.SelectControl,{value:r,onChange:function(e){return u(e)},id:t,options:c.map((function(e){return{label:e.caption,value:e.id}}))})),s&&s.id!==r&&Object(p.createElement)("div",{className:"editor-post-format__suggestion"},Object(cn.__)("Suggestion:")," ",Object(p.createElement)(oo.Button,{isLink:!0,onClick:function(){return u(s.id)}},s.caption))))}var ci=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z"}));var si=Object(m.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(p.createElement)(Ao,{supportKeys:"revisions"},r)}));var ai=Object(m.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(p.createElement)(si,null,Object(p.createElement)(oo.Button,{href:H("revision.php",{revision:t,gutenberg:!0}),className:"editor-post-last-revision__title",icon:ci},Object(cn.sprintf)(Object(cn._n)("%d Revision","%d Revisions",n),n)))}));function ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var li=function(e){Object(Ir.a)(n,e);var t=ui(n);function n(){var e;return Object(Ar.a)(this,n),(e=t.apply(this,arguments)).buttonRef=Object(p.createRef)(),e.openPreviewWindow=e.openPreviewWindow.bind(Object(wo.a)(e)),e}return Object(Br.a)(n,[{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,this.buttonRef.current&&this.buttonRef.current.focus())}},{key:"getWindowTarget",value:function(){var e=this.props.postId;return"wp-preview-".concat(e)}},{key:"openPreviewWindow",value:function(e){var t,n;(e.preventDefault(),this.previewWindow&&!this.previewWindow.closed||(this.previewWindow=window.open("",this.getWindowTarget())),this.previewWindow.focus(),this.props.isAutosaveable)?(this.props.isDraft?this.props.savePost({isPreview:!0}):this.props.autosave({isPreview:!0}),t=this.previewWindow.document,n=Object(p.renderToString)(Object(p.createElement)("div",{className:"editor-post-preview-button__interstitial-message"},Object(p.createElement)(oo.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 96 96"},Object(p.createElement)(oo.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(p.createElement)(oo.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(p.createElement)("p",null,Object(cn.__)("Generating preview…")))),n+='\n\t\t\n\t',n=Object(v.applyFilters)("editor.PostPreview.interstitialMarkup",n),t.write(n),t.title=Object(cn.__)("Generating preview…"),t.close()):this.setPreviewWindowLink(e.target.href)}},{key:"render",value:function(){var e=this.props,t=e.previewLink,n=e.currentPostLink,r=e.isSaveable,o=e.role,i=t||n,c=Mr()({"editor-post-preview":!this.props.className},this.props.className);return Object(p.createElement)(oo.Button,{isTertiary:!this.props.className,className:c,href:i,target:this.getWindowTarget(),disabled:!r,onClick:this.openPreviewWindow,ref:this.buttonRef,role:o},this.props.textContent?this.props.textContent:Object(p.createElement)(p.Fragment,null,Object(cn._x)("Preview","imperative verb"),Object(p.createElement)(oo.VisuallyHidden,{as:"span"},Object(cn.__)("(opens in a new tab)"))))}}]),n}(p.Component),di=Object(h.compose)([Object(m.withSelect)((function(e,t){var n=t.forcePreviewLink,r=t.forceIsAutosaveable,o=e("core/editor"),i=o.getCurrentPostId,c=o.getCurrentPostAttribute,s=o.getEditedPostAttribute,a=o.isEditedPostSaveable,u=o.isEditedPostAutosaveable,l=o.getEditedPostPreviewLink,d=e("core").getPostType,p=l(),f=d(s("type"));return{postId:i(),currentPostLink:c("link"),previewLink:void 0!==n?n:p,isSaveable:a(),isAutosaveable:r||u(),isViewable:Object(b.get)(f,["viewable"],!1),isDraft:-1!==["draft","auto-draft"].indexOf(s("status"))}})),Object(m.withDispatch)((function(e){return{autosave:e("core/editor").autosave,savePost:e("core/editor").savePost}})),Object(h.ifCondition)((function(e){return e.isViewable}))])(li);function pi(){var e="core/editor/post-locked-modal-"+Object(h.useInstanceId)(pi),t=Object(m.useDispatch)("core/editor"),n=t.autosave,r=t.updatePostLock,o=Object(m.useSelect)((function(e){var t=e("core/editor"),n=t.isPostLocked,r=t.isPostLockTakeover,o=t.getPostLockUser,i=t.getCurrentPostId,c=t.getActivePostLock,s=t.getEditedPostAttribute,a=t.getEditorSettings,u=e("core").getPostType;return{isLocked:n(),isTakeover:r(),user:o(),postId:i(),postLockUtils:a().postLockUtils,activePostLock:c(),postType:u(s("type"))}})),i=o.isLocked,c=o.isTakeover,s=o.user,a=o.postId,u=o.postLockUtils,l=o.activePostLock,d=o.postType;if(Object(p.useEffect)((function(){function t(){if(!i&&l){var e=new window.FormData;if(e.append("action","wp-remove-post-lock"),e.append("_wpnonce",u.unlockNonce),e.append("post_ID",a),e.append("active_post_lock",l),window.navigator.sendBeacon)window.navigator.sendBeacon(u.ajaxUrl,e);else{var t=new window.XMLHttpRequest;t.open("POST",u.ajaxUrl,!1),t.send(e)}}}return Object(v.addAction)("heartbeat.send",e,(function(e){i||(e["wp-refresh-post-lock"]={lock:l,post_id:a})})),Object(v.addAction)("heartbeat.tick",e,(function(e){if(e["wp-refresh-post-lock"]){var t=e["wp-refresh-post-lock"];t.lock_error?(n(),r({isLocked:!0,isTakeover:!0,user:{avatar:t.lock_error.avatar_src}})):t.new_lock&&r({isLocked:!1,activePostLock:t.new_lock})}})),window.addEventListener("beforeunload",t),function(){Object(v.removeAction)("heartbeat.send",e),Object(v.removeAction)("heartbeat.tick",e),window.removeEventListener("beforeunload",t)}}),[]),!i)return null;var f=s.name,O=s.avatar,g=Object(N.addQueryArgs)("post.php",{"get-post-lock":"1",lockKey:!0,post:a,action:"edit",_wpnonce:u.nonce}),j=H("edit.php",{post_type:Object(b.get)(d,["slug"])}),y=Object(cn.__)("Exit the Editor");return Object(p.createElement)(oo.Modal,{title:c?Object(cn.__)("Someone else has taken over this post."):Object(cn.__)("This post is already being edited."),focusOnMount:!0,shouldCloseOnClickOutside:!1,shouldCloseOnEsc:!1,isDismissible:!1,className:"editor-post-locked-modal"},!!O&&Object(p.createElement)("img",{src:O,alt:Object(cn.__)("Avatar"),className:"editor-post-locked-modal__avatar"}),!!c&&Object(p.createElement)("div",null,Object(p.createElement)("div",null,f?Object(cn.sprintf)(Object(cn.__)("%s now has editing control of this post. Don’t worry, your changes up to this moment have been saved."),f):Object(cn.__)("Another user now has editing control of this post. Don’t worry, your changes up to this moment have been saved.")),Object(p.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(p.createElement)(oo.Button,{isPrimary:!0,href:j},y))),!c&&Object(p.createElement)("div",null,Object(p.createElement)("div",null,f?Object(cn.sprintf)(Object(cn.__)("%s is currently working on this post, which means you cannot make changes, unless you take over."),f):Object(cn.__)("Another user is currently working on this post, which means you cannot make changes, unless you take over.")),Object(p.createElement)("div",{className:"editor-post-locked-modal__buttons"},Object(p.createElement)(oo.Button,{isSecondary:!0,href:j},y),Object(p.createElement)(di,null),Object(p.createElement)(oo.Button,{isPrimary:!0,href:g},Object(cn.__)("Take Over")))))}var bi=Object(h.compose)(Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.isCurrentPostPublished,r=t.getCurrentPostType,o=t.getCurrentPost;return{hasPublishAction:Object(b.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 fi=Object(h.compose)(Object(m.withSelect)((function(e){return{status:e("core/editor").getEditedPostAttribute("status")}})),Object(m.withDispatch)((function(e){return{onUpdateStatus:function(t){e("core/editor").editPost({status:t})}}})))((function(e){var t=e.status,n=e.onUpdateStatus;return Object(p.createElement)(bi,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Pending review"),checked:"pending"===t,onChange:function(){n("pending"===t?"draft":"pending")}}))}));var mi=Object(h.compose)([Object(m.withSelect)((function(e){return{pingStatus:e("core/editor").getEditedPostAttribute("ping_status")}})),Object(m.withDispatch)((function(e){return{editPost:e("core/editor").editPost}}))])((function(e){var t=e.pingStatus,n=void 0===t?"open":t,r=Object(d.a)(e,["pingStatus"]);return Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Allow pingbacks & trackbacks"),checked:"open"===n,onChange:function(){return r.editPost({ping_status:"open"===n?"closed":"open"})}})}));var hi=Object(h.compose)([Object(m.withSelect)((function(e,t){var n=t.forceIsSaving,r=e("core/editor"),o=r.isCurrentPostPublished,i=r.isEditedPostBeingScheduled,c=r.isSavingPost,s=r.isPublishingPost,a=r.getCurrentPost,u=r.getCurrentPostType,l=r.isAutosavingPost;return{isPublished:o(),isBeingScheduled:i(),isSaving:n||c(),isPublishing:s(),hasPublishAction:Object(b.get)(a(),["_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,s=e.hasNonPostEntityChanges;return o?Object(cn.__)("Publishing…"):t&&r&&!c?Object(cn.__)("Updating…"):n&&r&&!c?Object(cn.__)("Scheduling…"):i?t?s?Object(cn.__)("Update…"):Object(cn.__)("Update"):n?s?Object(cn.__)("Schedule…"):Object(cn.__)("Schedule"):Object(cn.__)("Publish"):s?Object(cn.__)("Submit for Review…"):Object(cn.__)("Submit for Review")}));function vi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Oi=function(e){Object(Ir.a)(n,e);var t=vi(n);function n(e){var r;return Object(Ar.a)(this,n),(r=t.call(this,e)).buttonNode=Object(p.createRef)(),r.createOnClick=r.createOnClick.bind(Object(wo.a)(r)),r.closeEntitiesSavedStates=r.closeEntitiesSavedStates.bind(Object(wo.a)(r)),r.state={entitiesSavedStatesCallback:!1},r}return Object(Br.a)(n,[{key:"componentDidMount",value:function(){this.props.focusOnMount&&this.buttonNode.current.focus()}},{key:"createOnClick",value:function(e){var t=this;return function(){for(var n=arguments.length,r=new Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:"";r({status:e,password:t})}}})),h.withInstanceId])(wi);var Si=Object(m.withSelect)((function(e){return{visibility:e("core/editor").getEditedPostVisibility()}}))((function(e){var t=e.visibility;return Object(b.find)(yi,{value:t}).label}));var ki=Object(h.compose)([Object(m.withSelect)((function(e){return{date:e("core/editor").getEditedPostAttribute("date")}})),Object(m.withDispatch)((function(e){return{onUpdateDate:function(t){e("core/editor").editPost({date:t})}}}))])((function(e){var t=e.date,n=e.onUpdateDate,r=Object(p.useRef)(),o=Object(D.__experimentalGetSettings)(),i=/a(?!\\)/i.test(o.formats.time.toLowerCase().replace(/\\\\/g,"").split("").reverse().join(""));return Object(p.createElement)(oo.DateTimePicker,{ref:r,currentDate:t,onChange:function(e){n(e),r.current.ownerDocument.activeElement.blur()},is12Hour:i})}));var Ei=Object(m.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(D.__experimentalGetSettings)();return t&&!n?Object(D.format)("".concat(r.formats.date," ").concat(r.formats.time),t):Object(cn.__)("Immediately")}));function Ti(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}function Ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=this.props.taxonomy,r=xi(xi({},Ai),t),o=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(n.rest_base),r)});return o.then(Di).then((function(t){e.setState((function(e){return{availableTerms:e.availableTerms.concat(t.filter((function(t){return!Object(b.find)(e.availableTerms,(function(e){return e.id===t.id}))})))}})),e.updateSelectedTerms(e.props.terms)})),o}},{key:"updateSelectedTerms",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=t.reduce((function(t,n){var r=Object(b.find)(e.state.availableTerms,(function(e){return e.id===n}));return r&&t.push(r.name),t}),[]);this.setState({selectedTerms:n})}},{key:"findOrCreateTerm",value:function(e){var t=this,n=this.props.taxonomy,r=Object(b.escape)(e);return _()({path:"/wp/v2/".concat(n.rest_base),method:"POST",data:{name:r}}).catch((function(o){return"term_exists"===o.code?(t.addRequest=_()({path:Object(N.addQueryArgs)("/wp/v2/".concat(n.rest_base),xi(xi({},Ai),{},{search:r}))}).then(Di),t.addRequest.then((function(t){return Object(b.find)(t,(function(t){return Ii(t.name,e)}))}))):Promise.reject(o)})).then(Ri)}},{key:"onChange",value:function(e){var t=this,n=Object(b.uniqBy)(e,(function(e){return e.toLowerCase()}));this.setState({selectedTerms:n});var r=n.filter((function(e){return!Object(b.find)(t.state.availableTerms,(function(t){return Ii(t.name,e)}))})),o=function(e,t){return e.map((function(e){return Object(b.find)(t,(function(t){return Ii(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(b.invoke)(this.searchRequest,["abort"]),e.length>=3&&(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,s=i.map((function(e){return e.name})),a=Object(b.get)(n,["labels","add_new_item"],"post_tag"===t?Object(cn.__)("Add new tag"):Object(cn.__)("Add new Term")),u=Object(b.get)(n,["labels","singular_name"],"post_tag"===t?Object(cn.__)("Tag"):Object(cn.__)("Term")),l=Object(cn.sprintf)(Object(cn._x)("%s added","term"),u),d=Object(cn.sprintf)(Object(cn._x)("%s removed","term"),u),f=Object(cn.sprintf)(Object(cn._x)("Remove %s","term"),u);return Object(p.createElement)(oo.FormTokenField,{value:c,suggestions:s,onChange:this.onChange,onInputChange:this.searchTerms,maxSuggestions:20,disabled:o,label:a,messages:{added:l,removed:d,remove:f}})}}]),n}(p.Component),Li=Object(h.compose)(Object(m.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(b.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(b.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(m.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(u.a)({},n,t))}}})),Object(oo.withFilters)("editor.PostTaxonomyType"))(Ni);function Ui(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Fi=function(){var e=[Object(cn.__)("Suggestion:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(cn.__)("Add tags"))];return Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:e},Object(p.createElement)("p",null,Object(cn.__)("Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.")),Object(p.createElement)(Li,{slug:"post_tag"}))},Mi=function(e){Object(Ir.a)(n,e);var t=Ui(n);function n(e){var r;return Object(Ar.a)(this,n),(r=t.call(this,e)).state={hadTagsWhenOpeningThePanel:e.hasTags},r}return Object(Br.a)(n,[{key:"render",value:function(){return this.state.hadTagsWhenOpeningThePanel?null:Object(p.createElement)(Fi,null)}}]),n}(p.Component),zi=Object(h.compose)(Object(m.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(b.some)(n.types,(function(e){return e===t})),hasTags:r&&r.length}})),Object(h.ifCondition)((function(e){var t=e.areTagsFetched;return e.isPostTypeSupported&&t})))(Mi),Vi=function(e,t){var n=oi.filter((function(t){return Object(b.includes)(e,t.id)}));return Object(b.find)(n,(function(e){return e.id===t}))},Hi=function(e){var t=e.suggestedPostFormat,n=e.suggestionText,r=e.onUpdatePostFormat;return Object(p.createElement)(oo.Button,{isLink:!0,onClick:function(){return r(t)}},n)};function Wi(){var e=Object(m.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.getSuggestedPostFormat,o=Object(b.get)(e("core").getThemeSupports(),["formats"],[]);return{currentPostFormat:n("format"),suggestion:Vi(o,r())}}),[]),t=e.currentPostFormat,n=e.suggestion,r=Object(m.useDispatch)("core/editor").editPost,o=[Object(cn.__)("Suggestion:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(cn.__)("Use a post format"))];return n&&n.id!==t?Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:o},Object(p.createElement)("p",null,Object(cn.__)("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(p.createElement)("p",null,Object(p.createElement)(Hi,{onUpdatePostFormat:function(e){return r({format:e})},suggestedPostFormat:n.id,suggestionText:Object(cn.sprintf)(Object(cn.__)('Apply the "%1$s" format.'),n.caption)}))):null}var Gi=Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.isEditedPostBeingScheduled;return{hasPublishAction:Object(b.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(cn.__)("Are you ready to schedule?"),n=Object(cn.__)("Your work will be published at the specified date and time.")):(t=Object(cn.__)("Are you ready to publish?"),n=Object(cn.__)("Double-check your settings before publishing.")):(t=Object(cn.__)("Are you ready to submit for review?"),n=Object(cn.__)("When you’re ready, submit your work for review, and an Editor will be able to approve it for you.")),Object(p.createElement)("div",{className:"editor-post-publish-panel__prepublish"},Object(p.createElement)("div",null,Object(p.createElement)("strong",null,t)),Object(p.createElement)("p",null,n),r&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:[Object(cn.__)("Visibility:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(p.createElement)(Si,null))]},Object(p.createElement)(Pi,null)),Object(p.createElement)(oo.PanelBody,{initialOpen:!1,title:[Object(cn.__)("Publish:"),Object(p.createElement)("span",{className:"editor-post-publish-panel__link",key:"label"},Object(p.createElement)(Ei,null))]},Object(p.createElement)(ki,null))),Object(p.createElement)(Wi,null),Object(p.createElement)(zi,null),i)}));function qi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Ki=function(e){Object(Ir.a)(n,e);var t=qi(n);function n(){var e;return Object(Ar.a)(this,n),(e=t.apply(this,arguments)).state={showCopyConfirmation:!1},e.onCopy=e.onCopy.bind(Object(wo.a)(e)),e.onSelectInput=e.onSelectInput.bind(Object(wo.a)(e)),e.postLink=Object(p.createRef)(),e}return Object(Br.a)(n,[{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(b.get)(o,["labels","singular_name"]),c=Object(b.get)(o,["labels","view_item"]),s="future"===r.status?function(e){var t=e.slug;return e.permalink_template.includes("%postname%")?e.permalink_template.replace("%postname%",t):e.permalink_template}(r):r.link,a=n?Object(p.createElement)(p.Fragment,null,Object(cn.__)("is now scheduled. It will go live on")," ",Object(p.createElement)(Ei,null),"."):Object(cn.__)("is now live.");return Object(p.createElement)("div",{className:"post-publish-panel__postpublish"},Object(p.createElement)(oo.PanelBody,{className:"post-publish-panel__postpublish-header"},Object(p.createElement)("a",{ref:this.postLink,href:s},Object(zo.decodeEntities)(r.title)||Object(cn.__)("(no title)"))," ",a),Object(p.createElement)(oo.PanelBody,null,Object(p.createElement)("p",{className:"post-publish-panel__postpublish-subheader"},Object(p.createElement)("strong",null,Object(cn.__)("What’s next?"))),Object(p.createElement)(oo.TextControl,{className:"post-publish-panel__postpublish-post-address",readOnly:!0,label:Object(cn.sprintf)(Object(cn.__)("%s address"),i),value:Object(N.safeDecodeURIComponent)(s),onFocus:this.onSelectInput}),Object(p.createElement)("div",{className:"post-publish-panel__postpublish-buttons"},!n&&Object(p.createElement)(oo.Button,{isSecondary:!0,href:s},c),Object(p.createElement)(oo.ClipboardButton,{isSecondary:!0,text:s,onCopy:this.onCopy},this.state.showCopyConfirmation?Object(cn.__)("Copied!"):Object(cn.__)("Copy Link")))),t)}}]),n}(p.Component),Qi=Object(m.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()}}))(Ki);function $i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var Yi=function(e){Object(Ir.a)(n,e);var t=$i(n);function n(){var e;return Object(Ar.a)(this,n),(e=t.apply(this,arguments)).onSubmit=e.onSubmit.bind(Object(wo.a)(e)),e}return Object(Br.a)(n,[{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,s=e.isSaving,u=e.onClose,l=e.onTogglePublishSidebar,f=e.PostPublishExtension,m=e.PrePublishExtension,h=Object(d.a)(e,["forceIsDirty","forceIsSaving","isBeingScheduled","isPublished","isPublishSidebarEnabled","isScheduled","isSaving","onClose","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension"]),v=Object(b.omit)(h,["hasPublishAction","isDirty","isPostTypeViewable"]),O=o||c&&r,g=!O&&!s,j=O&&!s;return Object(p.createElement)("div",Object(a.a)({className:"editor-post-publish-panel"},v),Object(p.createElement)("div",{className:"editor-post-publish-panel__header"},j?Object(p.createElement)(oo.Button,{onClick:u,icon:ji.a,label:Object(cn.__)("Close panel")}):Object(p.createElement)(p.Fragment,null,Object(p.createElement)("div",{className:"editor-post-publish-panel__header-publish-button"},Object(p.createElement)(gi,{focusOnMount:!0,onSubmit:this.onSubmit,forceIsDirty:t,forceIsSaving:n})),Object(p.createElement)("div",{className:"editor-post-publish-panel__header-cancel-button"},Object(p.createElement)(oo.Button,{onClick:u,isSecondary:!0},Object(cn.__)("Cancel"))))),Object(p.createElement)("div",{className:"editor-post-publish-panel__content"},g&&Object(p.createElement)(Gi,null,m&&Object(p.createElement)(m,null)),j&&Object(p.createElement)(Qi,{focusOnMount:!0},f&&Object(p.createElement)(f,null)),s&&Object(p.createElement)(oo.Spinner,null)),Object(p.createElement)("div",{className:"editor-post-publish-panel__footer"},Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Always show pre-publish checks."),checked:i,onChange:l})))}}]),n}(p.Component),Xi=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core").getPostType,n=e("core/editor"),r=n.getCurrentPost,o=n.getEditedPostAttribute,i=n.isCurrentPostPublished,c=n.isCurrentPostScheduled,s=n.isEditedPostBeingScheduled,a=n.isEditedPostDirty,u=n.isSavingPost,l=e("core/editor").isPublishSidebarEnabled,d=t(o("type"));return{hasPublishAction:Object(b.get)(r(),["_links","wp:action-publish"],!1),isPostTypeViewable:Object(b.get)(d,["viewable"],!1),isBeingScheduled:s(),isDirty:a(),isPublished:i(),isPublishSidebarEnabled:l(),isSaving:u(),isScheduled:c()}})),Object(m.withDispatch)((function(e,t){var n=t.isPublishSidebarEnabled,r=e("core/editor"),o=r.disablePublishSidebar,i=r.enablePublishSidebar;return{onTogglePublishSidebar:function(){n?o():i()}}})),oo.withFocusReturn,oo.withConstrainedTabbing])(Yi),Ji=n("./node_modules/@wordpress/icons/build-module/icon/index.js"),Zi=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(p.createElement)(co.Path,{d:"M14.9 9c1.8.2 3.1 1.7 3.1 3.5 0 1.9-1.6 3.5-3.5 3.5h-10C2.6 16 1 14.4 1 12.5 1 10.7 2.3 9.3 4.1 9 4 8.9 4 8.7 4 8.5 4 7.1 5.1 6 6.5 6c.3 0 .7.1.9.2C8.1 4.9 9.4 4 11 4c2.2 0 4 1.8 4 4 0 .4-.1.7-.1 1z"})),ec=n("./node_modules/@wordpress/icons/build-module/library/check.js"),tc=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(p.createElement)(co.Path,{d:"M14.8 9c.1-.3.2-.6.2-1 0-2.2-1.8-4-4-4-1.5 0-2.9.9-3.5 2.2-.3-.1-.7-.2-1-.2C5.1 6 4 7.1 4 8.5c0 .2 0 .4.1.5-1.8.3-3.1 1.7-3.1 3.5C1 14.4 2.6 16 4.5 16H8v-3H5l4.5-4.5L14 13h-3v3h3.5c1.9 0 3.5-1.6 3.5-3.5 0-1.8-1.4-3.3-3.2-3.5z"}));var nc=Object(h.compose)([Object(m.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(m.withDispatch)((function(e){var t=e("core/editor"),n=t.editPost,r=t.savePost;return{onClick:function(){n({status:"draft"}),r()}}}))])((function(e){var t=e.isSaving,n=e.isPublished,r=e.isScheduled,o=e.onClick,i=Object(h.useViewportMatch)("small","<");return n||r?Object(p.createElement)(oo.Button,{className:"editor-post-switch-to-draft",onClick:function(){var e;n?e=Object(cn.__)("Are you sure you want to unpublish this post?"):r&&(e=Object(cn.__)("Are you sure you want to unschedule this post?")),window.confirm(e)&&o()},disabled:t,isTertiary:!0},i?Object(cn.__)("Draft"):Object(cn.__)("Switch to draft")):null}));function rc(e){var t=e.forceIsDirty,n=e.forceIsSaving,r=e.showIconLabels,o=void 0!==r&&r,i=Object(p.useState)(!1),c=Object(l.a)(i,2),s=c[0],a=c[1],u=Object(h.useViewportMatch)("small"),d=Object(m.useSelect)((function(e){var r,o,i,c=e("core/editor"),s=c.isEditedPostNew,a=c.isCurrentPostPublished,u=c.isCurrentPostScheduled,l=c.isEditedPostDirty,d=c.isSavingPost,p=c.isEditedPostSaveable,b=c.getCurrentPost,f=c.isAutosavingPost,m=c.getEditedPostAttribute;return{isAutosaving:f(),isDirty:t||l(),isNew:s(),isPending:"pending"===m("status"),isPublished:a(),isSaving:n||d(),isSaveable:p(),isScheduled:u(),hasPublishAction:null!==(r=null===(o=b())||void 0===o||null===(i=o._links)||void 0===i?void 0:i["wp:action-publish"])&&void 0!==r&&r}}),[t,n]),b=d.isAutosaving,f=d.isDirty,v=d.isNew,O=d.isPending,g=d.isPublished,j=d.isSaveable,y=d.isSaving,_=d.isScheduled,w=d.hasPublishAction,P=Object(m.useDispatch)("core/editor").savePost,S=Object(h.usePrevious)(y);if(Object(p.useEffect)((function(){var e;return S&&!y&&(a(!0),e=setTimeout((function(){a(!1)}),1e3)),function(){return clearTimeout(e)}}),[y]),y){var k=Mr()("editor-post-saved-state","is-saving",Object(oo.__unstableGetAnimateClassName)({type:"loading"}),{"is-autosaving":b});return Object(p.createElement)("span",{className:k},Object(p.createElement)(Ji.a,{icon:Zi}),b?Object(cn.__)("Autosaving"):Object(cn.__)("Saving"))}if(g||_)return Object(p.createElement)(nc,null);if(!j)return null;if(s||!v&&!f)return Object(p.createElement)("span",{className:"editor-post-saved-state is-saved"},Object(p.createElement)(Ji.a,{icon:ec.a}),Object(cn.__)("Saved"));if(!w&&O)return null;var E=O?Object(cn.__)("Save as pending"):Object(cn.__)("Save draft"),T=Object(cn.__)("Save");return u?Object(p.createElement)(oo.Button,{className:"editor-post-save-draft",onClick:function(){return P()},shortcut:io.displayShortcut.primary("s"),isTertiary:!0},E):Object(p.createElement)(oo.Button,{className:"editor-post-save-draft",label:E,onClick:function(){return P()},shortcut:io.displayShortcut.primary("s"),icon:tc},o&&T)}var oc=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(b.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction,n=e.children;return t?n:null}));function ic(e){var t=e.children;return Object(p.createElement)(Ao,{supportKeys:"slug"},t)}function cc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(Dr.a)(e);if(t){var o=Object(Dr.a)(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Object(Rr.a)(this,n)}}var sc=function(e){Object(Ir.a)(n,e);var t=cc(n);function n(e){var r,o=e.postSlug,i=e.postTitle,c=e.postID;return Object(Ar.a)(this,n),(r=t.apply(this,arguments)).state={editedSlug:Object(N.safeDecodeURIComponent)(o)||W(i)||c},r.setSlug=r.setSlug.bind(Object(wo.a)(r)),r}return Object(Br.a)(n,[{key:"setSlug",value:function(e){var t=this.props,n=t.postSlug,r=t.onUpdateSlug,o=W(e.target.value);o!==n&&r(o)}},{key:"render",value:function(){var e=this,t=this.props.instanceId,n=this.state.editedSlug,r="editor-post-slug-"+t;return Object(p.createElement)(ic,null,Object(p.createElement)("label",{htmlFor:r},Object(cn.__)("Slug")),Object(p.createElement)("input",{type:"text",id:r,value:n,onChange:function(t){return e.setState({editedSlug:t.target.value})},onBlur:this.setSlug,className:"editor-post-slug__input"}))}}]),n}(p.Component),ac=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getEditedPostAttribute,o=n().id;return{postSlug:r("slug"),postTitle:r("title"),postID:o}})),Object(m.withDispatch)((function(e){var t=e("core/editor").editPost;return{onUpdateSlug:function(e){t({slug:e})}}})),h.withInstanceId])(sc);var uc=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core/editor").getCurrentPost();return{hasStickyAction:Object(b.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 lc=Object(h.compose)([Object(m.withSelect)((function(e){return{postSticky:e("core/editor").getEditedPostAttribute("sticky")}})),Object(m.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(p.createElement)(uc,null,Object(p.createElement)(oo.CheckboxControl,{label:Object(cn.__)("Stick to the top of the blog"),checked:r,onChange:function(){return t(!r)}}))}));function dc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pc(e){for(var t=1;t0)};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;r0&&(r.children=r.children.map(t).filter((function(e){return e}))),(-1!==r.name.toLowerCase().indexOf(e.toLowerCase())||r.children.length>0)&&r}}},{key:"renderTerms",value:function(e){var t=this,n=this.props.terms,r=void 0===n?[]:n;return e.map((function(e){return Object(p.createElement)("div",{key:e.id,className:"editor-post-taxonomies__hierarchical-terms-choice"},Object(p.createElement)(oo.CheckboxControl,{checked:-1!==r.indexOf(e.id),onChange:function(){var n=parseInt(e.id,10);t.onChange(n)},label:Object(b.unescape)(e.name)}),!!e.children.length&&Object(p.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,s=i.availableTerms,a=i.filteredTermsTree,u=i.formName,l=i.formParent,d=i.loading,f=i.showForm,m=i.filterValue,h=function(e,r,o){return Object(b.get)(n,["labels",e],"category"===t?r:o)},v=h("add_new_item",Object(cn.__)("Add new category"),Object(cn.__)("Add new term")),O=h("new_item_name",Object(cn.__)("Add new category"),Object(cn.__)("Add new term")),g=h("parent_item",Object(cn.__)("Parent Category"),Object(cn.__)("Parent Term")),j="— ".concat(g," —"),y=v,_="editor-post-taxonomies__hierarchical-terms-input-".concat(r),w="editor-post-taxonomies__hierarchical-terms-filter-".concat(r),P=Object(b.get)(this.props.taxonomy,["labels","search_items"],Object(cn.__)("Search Terms")),S=Object(b.get)(this.props.taxonomy,["name"],Object(cn.__)("Terms")),k=s.length>=8;return[k&&Object(p.createElement)("label",{key:"filter-label",htmlFor:w},P),k&&Object(p.createElement)("input",{type:"search",id:w,value:m,onChange:this.setFilterValue,className:"editor-post-taxonomies__hierarchical-terms-filter",key:"term-filter-input"}),Object(p.createElement)("div",{className:"editor-post-taxonomies__hierarchical-terms-list",key:"term-list",tabIndex:"0",role:"group","aria-label":S},this.renderTerms(""!==m?a:c)),!d&&o&&Object(p.createElement)(oo.Button,{key:"term-add-button",onClick:this.onToggleForm,className:"editor-post-taxonomies__hierarchical-terms-add","aria-expanded":f,isLink:!0},v),f&&Object(p.createElement)("form",{onSubmit:this.onAddTerm,key:"hierarchical-terms-form"},Object(p.createElement)("label",{htmlFor:_,className:"editor-post-taxonomies__hierarchical-terms-label"},O),Object(p.createElement)("input",{type:"text",id:_,className:"editor-post-taxonomies__hierarchical-terms-input",value:u,onChange:this.onChangeFormName,required:!0}),!!s.length&&Object(p.createElement)(oo.TreeSelect,{label:g,noOptionLabel:j,onChange:this.onChangeFormParent,selectedId:l,tree:c}),Object(p.createElement)(oo.Button,{isSecondary:!0,type:"submit",className:"editor-post-taxonomies__hierarchical-terms-submit"},y))]}}]),n}(p.Component),hc=Object(h.compose)([Object(m.withSelect)((function(e,t){var n=t.slug,r=e("core/editor").getCurrentPost,o=(0,e("core").getTaxonomy)(n);return{hasCreateAction:!!o&&Object(b.get)(r(),["_links","wp:action-create-"+o.rest_base],!1),hasAssignAction:!!o&&Object(b.get)(r(),["_links","wp:action-assign-"+o.rest_base],!1),terms:o?e("core/editor").getEditedPostAttribute(o.rest_base):[],taxonomy:o}})),Object(m.withDispatch)((function(e){return{onUpdateTerms:function(t,n){e("core/editor").editPost(Object(u.a)({},n,t))}}})),oo.withSpokenMessages,h.withInstanceId,Object(oo.withFilters)("editor.PostTaxonomyType")])(mc);var vc=Object(h.compose)([Object(m.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?b.identity:r,i=Object(b.filter)(n,(function(e){return Object(b.includes)(e.types,t)}));return Object(b.filter)(i,(function(e){return e.visibility.show_ui})).map((function(e){var t=e.hierarchical?hc:Li;return Object(p.createElement)(p.Fragment,{key:"taxonomy-".concat(e.slug)},o(Object(p.createElement)(t,{slug:e.slug}),e))}))}));var Oc=Object(h.compose)([Object(m.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(b.some)(n,(function(e){return Object(b.includes)(e.types,t)}))?r:null})),gc=n("./node_modules/react-autosize-textarea/lib/index.js"),jc=n.n(gc);function yc(){var e=Object(m.useSelect)((function(e){return e("core/editor").getEditedPostContent()}),[]),t=Object(m.useDispatch)("core/editor"),n=t.editPost,r=t.resetEditorBlocks,o=Object(p.useState)(e),i=Object(l.a)(o,2),c=i[0],s=i[1],a=Object(p.useState)(!1),u=Object(l.a)(a,2),d=u[0],b=u[1],v=Object(h.useInstanceId)(yc);d||c===e||s(e);return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(oo.VisuallyHidden,{as:"label",htmlFor:"post-content-".concat(v)},Object(cn.__)("Type text or HTML")),Object(p.createElement)(jc.a,{autoComplete:"off",dir:"auto",value:c,onChange:function(e){var t=e.target.value;n({content:t}),s(t),b(!0)},onBlur:function(){if(d){var e=Object(f.parse)(c);r(e),b(!1)}},className:"editor-post-text-editor",id:"post-content-".concat(v),placeholder:Object(cn.__)("Start writing with text or HTML")}))}var _c=/[\r\n]+/g;function wc(){var e=Object(h.useInstanceId)(wc),t=Object(p.useRef)(),n=Object(p.useState)(!1),r=Object(l.a)(n,2),o=r[0],i=r[1],c=Object(m.useDispatch)("core/editor").editPost,s=Object(m.useDispatch)("core/block-editor"),a=s.insertDefaultBlock,u=s.clearSelectedBlock,d=s.insertBlocks,b=Object(m.useSelect)((function(e){var t=e("core/editor"),n=t.getEditedPostAttribute,r=t.isCleanNewPost,o=(0,e("core/block-editor").getSettings)(),i=o.titlePlaceholder,c=o.focusMode,s=o.hasFixedToolbar;return{isCleanNewPost:r(),title:n("title"),placeholder:i,isFocusMode:c,hasFixedToolbar:s}})),v=b.isCleanNewPost,O=b.title,g=b.placeholder,j=b.isFocusMode,y=b.hasFixedToolbar;function _(e){d(e,0)}function w(e){c({title:e})}function P(){i(!1)}Object(p.useEffect)((function(){var e=t.current.ownerDocument,n=e.activeElement,r=e.body;!v||n&&r!==n||t.current.focus()}),[v]);var S=Mr()("wp-block editor-post-title editor-post-title__block",{"is-selected":o,"is-focus-mode":j,"has-fixed-toolbar":y}),k=Object(zo.decodeEntities)(g);return Object(p.createElement)(Ao,{supportKeys:"title"},Object(p.createElement)("div",{className:S},Object(p.createElement)(oo.VisuallyHidden,{as:"label",htmlFor:"post-title-".concat(e)},k||Object(cn.__)("Add title")),Object(p.createElement)(jc.a,{ref:t,id:"post-title-".concat(e),className:"editor-post-title__input",value:O,onChange:function(e){w(e.target.value.replace(_c," "))},placeholder:k||Object(cn.__)("Add title"),onFocus:function(){i(!0),u()},onBlur:P,onKeyDown:function(e){e.keyCode===io.ENTER&&(e.preventDefault(),a(void 0,void 0,0))},onKeyPress:P,onPaste:function(e){var t=e.clipboardData,n="",r="";try{n=t.getData("text/plain"),r=t.getData("text/html")}catch(e){try{r=t.getData("Text")}catch(e){return}}window.console.log("Received HTML:\n\n",r),window.console.log("Received plain text:\n\n",n);var o=Object(f.pasteHandler)({HTML:r,plainText:n});if("string"!=typeof o&&o.length){e.preventDefault();var i=Object(l.a)(o,1)[0];O||"core/heading"!==i.name&&"core/paragraph"!==i.name?_(o):(w(i.attributes.content),_(o.slice(1)))}}})))}var Pc=Object(h.compose)([Object(m.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(m.withDispatch)((function(e){return{trashPost:e("core/editor").trashPost}}))])((function(e){var t=e.isNew,n=e.postId,r=e.postType,o=Object(d.a)(e,["isNew","postId","postType"]);return t||!n?null:Object(p.createElement)(oo.Button,{className:"editor-post-trash",isDestructive:!0,isTertiary:!0,onClick:function(){return o.trashPost(n,r)}},Object(cn.__)("Move to trash"))}));var Sc=Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.isEditedPostNew,r=t.getCurrentPostId,o=t.getCurrentPostType,i=e("core"),c=i.getPostType,s=i.canUser,a=r(),u=c(o()),l=(null==u?void 0:u.rest_base)||"";return{isNew:n(),postId:a,canUserDelete:!(!a||!l)&&s("delete",l,a)}}))((function(e){var t=e.isNew,n=e.postId,r=e.canUserDelete,o=e.children;return!t&&n&&r?o:null}));var kc=Object(h.compose)([Object(m.withSelect)((function(e){var t=e("core/editor"),n=t.getCurrentPost,r=t.getCurrentPostType;return{hasPublishAction:Object(b.get)(n(),["_links","wp:action-publish"],!1),postType:r()}}))])((function(e){var t=e.hasPublishAction;return(0,e.render)({canEdit:t})})),Ec=Object(p.createElement)(co.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(p.createElement)(co.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})),Tc=n("@wordpress/wordcount");function Cc(){var e=Object(m.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")})),t=Object(cn._x)("words","Word count type. Do not translate!");return Object(p.createElement)("span",{className:"word-count"},Object(Tc.count)(e,t))}function xc(){var e=Object(m.useSelect)((function(e){return e("core/editor").getEditedPostAttribute("content")}));return Object(Tc.count)(e,"characters_including_spaces")}var Ac=function(e){var t=e.hasOutlineItemsDisabled,n=e.onRequestClose,r=Object(m.useSelect)((function(e){var t=e("core/block-editor").getGlobalBlockCount;return{headingCount:t("core/heading"),paragraphCount:t("core/paragraph"),numberOfBlocks:t()}}),[]),o=r.headingCount,i=r.paragraphCount,c=r.numberOfBlocks;return Object(p.createElement)(p.Fragment,null,Object(p.createElement)("div",{className:"table-of-contents__wrapper",role:"note","aria-label":Object(cn.__)("Document Statistics"),tabIndex:"0"},Object(p.createElement)("ul",{role:"list",className:"table-of-contents__counts"},Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Characters"),Object(p.createElement)("span",{className:"table-of-contents__number"},Object(p.createElement)(xc,null))),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Words"),Object(p.createElement)(Cc,null)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Headings"),Object(p.createElement)("span",{className:"table-of-contents__number"},o)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Paragraphs"),Object(p.createElement)("span",{className:"table-of-contents__number"},i)),Object(p.createElement)("li",{className:"table-of-contents__count"},Object(cn.__)("Blocks"),Object(p.createElement)("span",{className:"table-of-contents__number"},c)))),o>0&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)("hr",null),Object(p.createElement)("h2",{className:"table-of-contents__title"},Object(cn.__)("Document Outline")),Object(p.createElement)($r,{onSelect:n,hasOutlineItemsDisabled:t})))};var Bc=Object(p.forwardRef)((function(e,t){var n=e.hasOutlineItemsDisabled,r=e.repositionDropdown,o=Object(d.a)(e,["hasOutlineItemsDisabled","repositionDropdown"]),i=Object(m.useSelect)((function(e){return!!e("core/block-editor").getBlockCount()}),[]);return Object(p.createElement)(oo.Dropdown,{position:r?"middle right right":"bottom",className:"table-of-contents",contentClassName:"table-of-contents__popover",renderToggle:function(e){var n=e.isOpen,r=e.onToggle;return Object(p.createElement)(oo.Button,Object(a.a)({},o,{ref:t,onClick:i?r:void 0,icon:Ec,"aria-expanded":n,"aria-haspopup":"true",label:Object(cn.__)("Details"),tooltipPosition:"bottom","aria-disabled":!i}))},renderContent:function(e){var t=e.onClose;return Object(p.createElement)(Ac,{onRequestClose:t,hasOutlineItemsDisabled:n})}})}));function Ic(){var e=Object(m.useSelect)((function(e){return function(){return(0,e("core").__experimentalGetDirtyEntityRecords)().length>0}}),[]),t=function(t){if(e())return t.returnValue=Object(cn.__)("You have unsaved changes. If you proceed, they will be lost."),t.returnValue};return Object(p.useEffect)((function(){return window.addEventListener("beforeunload",t),function(){window.removeEventListener("beforeunload",t)}}),[]),null}var Rc=n("@wordpress/reusable-blocks"),Dc=Object(h.createHigherOrderComponent)((function(e){return Object(m.withRegistry)((function(t){var n=t.useSubRegistry,r=void 0===n||n,o=t.registry,c=Object(d.a)(t,["useSubRegistry","registry"]);if(!r)return Object(p.createElement)(e,c);var s=Object(p.useState)(null),a=Object(l.a)(s,2),u=a[0],b=a[1];return Object(p.useEffect)((function(){var e=Object(m.createRegistry)({"core/block-editor":i.storeConfig},o);e.registerStore("core/editor",Cr),b(e)}),[o]),u?Object(p.createElement)(m.RegistryProvider,{value:u},Object(p.createElement)(e,c)):null}))}),"withRegistryProvider"),Nc=n("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js"),Lc=n("@wordpress/media-utils");function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fc(e){for(var t=1;t1&&void 0!==f[1]?f[1]:{},r=n.isInitialSuggestions,o=n.type,i=n.subtype,c=n.page,s=n.perPage,a=f.length>2&&void 0!==f[2]?f[2]:{},u=a.disablePostFormats,l=void 0!==u&&u,d=s||r?3:20,p=[],o&&"post"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"post",subtype:i})}).catch((function(){return[]}))),o&&"term"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"term",subtype:i})}).catch((function(){return[]}))),l||o&&"post-format"!==o||p.push(_()({path:Object(N.addQueryArgs)("/wp/v2/search",{search:t,page:c,per_page:d,type:"post-format",subtype:i})}).catch((function(){return[]}))),e.abrupt("return",Promise.all(p).then((function(e){return Object(b.map)(Object(b.flatten)(e).filter((function(e){return!!e.id})).slice(0,d),(function(e){return{id:e.id,url:e.url,title:Object(zo.decodeEntities)(e.title)||Object(cn.__)("(no title)"),type:e.subtype||e.type}}))})));case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();var Wc=function(e,t){var n=Object(m.useSelect)((function(e){var t=e(xr),n=t.canUserUseUnfilteredHTML,r=t.isPostTitleSelected,o=e(c.store).canUser;return{canUseUnfilteredHTML:n(),reusableBlocks:e(c.store).getEntityRecords("postType","wp_block",{per_page:p.Platform.select({web:-1,native:100})}),hasUploadPermissions:Object(b.defaultTo)(o("create","media"),!0),isTitleSelected:r&&r()}}),[]),r=n.reusableBlocks,o=n.hasUploadPermissions,i=n.canUseUnfilteredHTML,s=n.isTitleSelected,a=Object(m.useDispatch)(xr).undo;return Object(p.useMemo)((function(){return Vc(Vc({},Object(b.pick)(e,["__experimentalBlockDirectory","__experimentalBlockPatternCategories","__experimentalBlockPatterns","__experimentalFeatures","__experimentalGlobalStylesBaseStyles","__experimentalGlobalStylesUserEntityId","__experimentalPreferredStyleVariations","__experimentalSetIsInserterOpened","alignWide","allowedBlockTypes","availableLegacyWidgets","bodyPlaceholder","codeEditingEnabled","colors","disableCustomColors","disableCustomFontSizes","disableCustomGradients","enableCustomLineHeight","enableCustomSpacing","enableCustomUnits","focusMode","fontSizes","gradients","hasFixedToolbar","hasReducedUI","imageDimensions","imageEditing","imageSizes","isRTL","keepCaretInsideBlock","maxWidth","onUpdateDefaultBlockStyles","styles","template","templateLock","titlePlaceholder"])),{},{mediaUpload:o?Mc:void 0,__experimentalReusableBlocks:r,__experimentalFetchLinkSuggestions:Object(b.partialRight)(Hc,e),__experimentalCanUserUseUnfilteredHTML:i,__experimentalUndo:a,__experimentalShouldInsertAtTheTop:s,outlineMode:t})}),[e,o,r,i,a,s,t])};var Gc=Dc((function(e){var t=e.__unstableTemplate,n=e.post,r=e.settings,o=e.recovery,s=e.initialEdits,a=e.children,u=Object(p.useMemo)((function(){return"wp_template"===n.type?{}:{postId:n.id,postType:n.type}}),[n.id,n.type]),d=Object(m.useSelect)((function(e){var t=e(xr),n=t.getEditorSelectionStart,r=t.getEditorSelectionEnd;return{isReady:(0,t.__unstableIsEditorReady)(),selectionStart:n(),selectionEnd:r()}}),[]),b=d.selectionEnd,f=d.selectionStart,h=d.isReady,v=null!=t?t:n,O=v.id,g=v.type,j=Object(c.useEntityBlockEditor)("postType",g,{id:O}),y=Object(l.a)(j,3),_=y[0],w=y[1],P=y[2],S=Wc(r,!!t),k=Object(m.useDispatch)(xr),E=k.updatePostLock,T=k.setupEditor,C=k.updateEditorSettings,x=k.__experimentalTearDownEditor,A=Object(m.useDispatch)(on.store).createWarningNotice;return Object(p.useLayoutEffect)((function(){if(!o)return E(r.postLock),T(n,s,r.template),r.autosave&&A(Object(cn.__)("There is an autosave of this post that is more recent than the version below."),{id:"autosave-exists",actions:[{label:Object(cn.__)("View the autosave"),url:r.autosave.editLink}]}),function(){x()}}),[]),Object(p.useEffect)((function(){C(r)}),[r]),h?Object(p.createElement)(c.EntityProvider,{kind:"root",type:"site"},Object(p.createElement)(c.EntityProvider,{kind:"postType",type:n.type,id:n.id},Object(p.createElement)(i.BlockContextProvider,{value:u},Object(p.createElement)(i.BlockEditorProvider,{value:_,onChange:P,onInput:w,selectionStart:f,selectionEnd:b,settings:S,useSubRegistry:!1},a,Object(p.createElement)(Rc.ReusableBlocksMenuItems,null))))):null})),qc=n("@wordpress/server-side-render"),Kc=n.n(qc);function Qc(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Object(p.forwardRef)((function(n,r){return U()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),Object(p.createElement)(t,Object(a.a)({ref:r},n))}));return n.forEach((function(n){r[n]=Qc(e+"."+n,t[n])})),r}function $c(e,t){return function(){return U()("wp.editor."+e,{alternative:"wp.blockEditor."+e}),t.apply(void 0,arguments)}}var Yc=Qc("RichText",i.RichText,["Content"]);Yc.isEmpty=$c("RichText.isEmpty",i.RichText.isEmpty);var Xc=Qc("Autocomplete",i.Autocomplete),Jc=Qc("AlignmentToolbar",i.AlignmentToolbar),Zc=Qc("BlockAlignmentToolbar",i.BlockAlignmentToolbar),es=Qc("BlockControls",i.BlockControls,["Slot"]),ts=Qc("BlockEdit",i.BlockEdit),ns=Qc("BlockEditorKeyboardShortcuts",i.BlockEditorKeyboardShortcuts),rs=Qc("BlockFormatControls",i.BlockFormatControls,["Slot"]),os=Qc("BlockIcon",i.BlockIcon),is=Qc("BlockInspector",i.BlockInspector),cs=Qc("BlockList",i.BlockList),ss=Qc("BlockMover",i.BlockMover),as=Qc("BlockNavigationDropdown",i.BlockNavigationDropdown),us=Qc("BlockSelectionClearer",i.BlockSelectionClearer),ls=Qc("BlockSettingsMenu",i.BlockSettingsMenu),ds=Qc("BlockTitle",i.BlockTitle),ps=Qc("BlockToolbar",i.BlockToolbar),bs=Qc("ColorPalette",i.ColorPalette),fs=Qc("ContrastChecker",i.ContrastChecker),ms=Qc("CopyHandler",i.CopyHandler),hs=Qc("DefaultBlockAppender",i.DefaultBlockAppender),vs=Qc("FontSizePicker",i.FontSizePicker),Os=Qc("Inserter",i.Inserter),gs=Qc("InnerBlocks",i.InnerBlocks,["ButtonBlockAppender","DefaultBlockAppender","Content"]),js=Qc("InspectorAdvancedControls",i.InspectorAdvancedControls,["Slot"]),ys=Qc("InspectorControls",i.InspectorControls,["Slot"]),_s=Qc("PanelColorSettings",i.PanelColorSettings),ws=Qc("PlainText",i.PlainText),Ps=Qc("RichTextShortcut",i.RichTextShortcut),Ss=Qc("RichTextToolbarButton",i.RichTextToolbarButton),ks=Qc("__unstableRichTextInputEvent",i.__unstableRichTextInputEvent),Es=Qc("MediaPlaceholder",i.MediaPlaceholder),Ts=Qc("MediaUpload",i.MediaUpload),Cs=Qc("MediaUploadCheck",i.MediaUploadCheck),xs=Qc("MultiSelectScrollIntoView",i.MultiSelectScrollIntoView),As=Qc("NavigableToolbar",i.NavigableToolbar),Bs=Qc("ObserveTyping",i.ObserveTyping),Is=Qc("PreserveScrollInReorder",i.PreserveScrollInReorder),Rs=Qc("SkipToSelectedBlock",i.SkipToSelectedBlock),Ds=Qc("URLInput",i.URLInput),Ns=Qc("URLInputButton",i.URLInputButton),Ls=Qc("URLPopover",i.URLPopover),Us=Qc("Warning",i.Warning),Fs=Qc("WritingFlow",i.WritingFlow),Ms=$c("createCustomColorsHOC",i.createCustomColorsHOC),zs=$c("getColorClassName",i.getColorClassName),Vs=$c("getColorObjectByAttributeValues",i.getColorObjectByAttributeValues),Hs=$c("getColorObjectByColorValue",i.getColorObjectByColorValue),Ws=$c("getFontSize",i.getFontSize),Gs=$c("getFontSizeClass",i.getFontSizeClass),qs=$c("withColorContext",i.withColorContext),Ks=$c("withColors",i.withColors),Qs=$c("withFontSizes",i.withFontSizes)},"./node_modules/@wordpress/icons/build-module/icon/index.js":function(e,t,n){"use strict";var r=n("./node_modules/@babel/runtime/helpers/esm/defineProperty.js"),o=n("./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"),i=n("@wordpress/element");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.icon,n=e.size,s=void 0===n?24:n,a=Object(o.a)(e,["icon","size"]);return Object(i.cloneElement)(t,function(e){for(var t=1;t-1},get:function(e){return r[n.indexOf(e)]},set:function(e,t){-1===n.indexOf(e)&&(n.push(e),r.push(t))},delete:function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),r.splice(t,1))}}),i=function(e){return new Event(e,{bubbles:!0})};try{new Event("test")}catch(e){i=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}function c(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!o.has(e)){var t,n=null,r=null,c=null,s=function(){e.clientWidth!==r&&d()},a=function(t){window.removeEventListener("resize",s,!1),e.removeEventListener("input",d,!1),e.removeEventListener("keyup",d,!1),e.removeEventListener("autosize:destroy",a,!1),e.removeEventListener("autosize:update",d,!1),Object.keys(t).forEach((function(n){e.style[n]=t[n]})),o.delete(e)}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",a,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",d,!1),window.addEventListener("resize",s,!1),e.addEventListener("input",d,!1),e.addEventListener("autosize:update",d,!1),e.style.overflowX="hidden",e.style.wordWrap="break-word",o.set(e,{destroy:a,update:d}),"vertical"===(t=window.getComputedStyle(e,null)).resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),n="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(n)&&(n=0),d()}function u(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t}function l(){if(0!==e.scrollHeight){var t=function(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}(e),o=document.documentElement&&document.documentElement.scrollTop;e.style.height="",e.style.height=e.scrollHeight+n+"px",r=e.clientWidth,t.forEach((function(e){e.node.scrollTop=e.scrollTop})),o&&(document.documentElement.scrollTop=o)}}function d(){l();var t=Math.round(parseFloat(e.style.height)),n=window.getComputedStyle(e,null),r="content-box"===n.boxSizing?Math.round(parseFloat(n.height)):e.offsetHeight;if(r