/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.editPost=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=437)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,"a",(function(){return n}))},100:function(e,t){var r,n,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function A(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,u=[],l=!1,m=-1;function s(){l&&c&&(l=!1,c.length?u=c.concat(u):m=-1,u.length&&q())}function q(){if(!l){var e=A(s);l=!0;for(var t=u.length;t;){for(c=u,u=[];++m1)for(var r=1;r=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}},144:function(e,t){!function(){e.exports=this.wp.mediaUtils}()},15:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(38);var i=r(28),o=r(39);function a(e,t){return Object(n.a)(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,A=e[Symbol.iterator]();!(n=(a=A.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==A.return||A.return()}finally{if(i)throw o}}return r}}(e,t)||Object(i.a)(e,t)||Object(o.a)()}},155:function(e,t,r){"use strict";(function(e){var n=r(0),i=r(3),o=r(9),a=r(63),A=r(4),c=(r(115),r(468)),u=Object(i.createSlotFill)("PluginDocumentSettingPanel"),l=u.Fill,m=u.Slot,s=Object(o.compose)(Object(a.withPluginContext)((function(t,r){return void 0===r.name&&void 0!==e&&e.env,{icon:r.icon||t.icon,panelName:"".concat(t.name,"/").concat(r.name)}})),Object(A.withSelect)((function(e,t){var r=t.panelName;return{opened:e("core/edit-post").isEditorPanelOpened(r),isEnabled:e("core/edit-post").isEditorPanelEnabled(r)}})),Object(A.withDispatch)((function(e,t){var r=t.panelName;return{onToggle:function(){return e("core/edit-post").toggleEditorPanelOpened(r)}}})))((function(e){var t=e.isEnabled,r=e.panelName,o=e.opened,a=e.onToggle,A=e.className,u=e.title,m=e.icon,s=e.children;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(c.a,{label:u,panelName:r}),Object(n.createElement)(l,null,t&&Object(n.createElement)(i.PanelBody,{className:A,title:u,icon:m,opened:o,onToggle:a},s)))}));s.Slot=m,t.a=s}).call(this,r(100))},16:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(26);var i=r(35),o=r(28);function a(e){return function(e){if(Array.isArray(e))return Object(n.a)(e)}(e)||Object(i.a)(e)||Object(o.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.")}()}},171:function(e,t,r){"use strict";var n=r(0),i=r(6),o=Object(n.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(i.Path,{d:"M9 18.6L3.5 13l1-1L9 16.4l9.5-9.9 1 1z"}));t.a=o},18:function(e,t,r){"use strict";function n(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}r.d(t,"a",(function(){return n}))},437:function(e,t,r){"use strict";r.r(t),r.d(t,"reinitializeEditor",(function(){return oi})),r.d(t,"initializeEditor",(function(){return ai})),r.d(t,"PluginBlockSettingsMenuItem",(function(){return ri})),r.d(t,"PluginDocumentSettingPanel",(function(){return En.a})),r.d(t,"PluginMoreMenuItem",(function(){return ni})),r.d(t,"PluginPostPublishPanel",(function(){return Dn})),r.d(t,"PluginPostStatusInfo",(function(){return nn})),r.d(t,"PluginPrePublishPanel",(function(){return Hn})),r.d(t,"PluginSidebar",(function(){return fn})),r.d(t,"PluginSidebarMoreMenuItem",(function(){return ii})),r.d(t,"__experimentalFullscreenModeClose",(function(){return Er}));var n={};r.r(n),r.d(n,"openGeneralSidebar",(function(){return te})),r.d(n,"closeGeneralSidebar",(function(){return re})),r.d(n,"openModal",(function(){return ne})),r.d(n,"closeModal",(function(){return ie})),r.d(n,"openPublishSidebar",(function(){return oe})),r.d(n,"closePublishSidebar",(function(){return ae})),r.d(n,"togglePublishSidebar",(function(){return Ae})),r.d(n,"toggleEditorPanelEnabled",(function(){return ce})),r.d(n,"toggleEditorPanelOpened",(function(){return ue})),r.d(n,"removeEditorPanel",(function(){return le})),r.d(n,"toggleFeature",(function(){return me})),r.d(n,"switchEditorMode",(function(){return se})),r.d(n,"togglePinnedPluginItem",(function(){return qe})),r.d(n,"hideBlockTypes",(function(){return pe})),r.d(n,"updatePreferredStyleVariations",(function(){return Ie})),r.d(n,"__experimentalUpdateLocalAutosaveInterval",(function(){return de})),r.d(n,"showBlockTypes",(function(){return Oe})),r.d(n,"setAvailableMetaBoxesPerLocation",(function(){return be})),r.d(n,"requestMetaBoxUpdates",(function(){return ge})),r.d(n,"metaBoxUpdatesSuccess",(function(){return ve})),r.d(n,"__experimentalSetPreviewDeviceType",(function(){return he}));var i={};r.r(i),r.d(i,"getEditorMode",(function(){return Ce})),r.d(i,"isEditorSidebarOpened",(function(){return ye})),r.d(i,"isPluginSidebarOpened",(function(){return Ke})),r.d(i,"getActiveGeneralSidebarName",(function(){return Ee})),r.d(i,"getPreferences",(function(){return fe})),r.d(i,"getPreference",(function(){return Se})),r.d(i,"isPublishSidebarOpened",(function(){return Me})),r.d(i,"isEditorPanelRemoved",(function(){return Ze})),r.d(i,"isEditorPanelEnabled",(function(){return ze})),r.d(i,"isEditorPanelOpened",(function(){return we})),r.d(i,"isModalActive",(function(){return Be})),r.d(i,"isFeatureActive",(function(){return Ge})),r.d(i,"isPluginItemPinned",(function(){return Ye})),r.d(i,"getActiveMetaBoxLocations",(function(){return ke})),r.d(i,"isMetaBoxLocationVisible",(function(){return Qe})),r.d(i,"isMetaBoxLocationActive",(function(){return We})),r.d(i,"getMetaBoxesPerLocation",(function(){return Le})),r.d(i,"getAllMetaBoxes",(function(){return De})),r.d(i,"hasMetaBoxes",(function(){return Ne})),r.d(i,"isSavingMetaBoxes",(function(){return Je})),r.d(i,"__experimentalGetPreviewDeviceType",(function(){return Pe}));var o={};r.r(o),r.d(o,"enableComplementaryArea",(function(){return qt})),r.d(o,"disableComplementaryArea",(function(){return pt})),r.d(o,"pinItem",(function(){return dt})),r.d(o,"unpinItem",(function(){return Ot}));var a={};r.r(a),r.d(a,"getActiveComplementaryArea",(function(){return bt})),r.d(a,"isItemPinned",(function(){return gt}));var A=r(0),c=(r(89),r(7)),u=r(32),l=r(47),m=r(72),s=(r(184),r(271)),q=r(31),p=r(144);Object(q.addFilter)("editor.MediaUpload","core/edit-post/replace-media-upload",(function(){return p.MediaUpload}));var I=r(8),d=r(14),O=r(2),b=r(12),g=r(3),v=r(4),h=r(1),j=r(9),C=Object(j.compose)(Object(v.withSelect)((function(e,t){if(Object(b.hasBlockSupport)(t.name,"multiple",!0))return{};var r=e("core/block-editor").getBlocks(),n=Object(O.find)(r,(function(e){var r=e.name;return t.name===r}));return{originalBlockClientId:n&&n.clientId!==t.clientId&&n.clientId}})),Object(v.withDispatch)((function(e,t){var r=t.originalBlockClientId;return{selectFirst:function(){return e("core/block-editor").selectBlock(r)}}}))),y=Object(j.createHigherOrderComponent)((function(e){return C((function(t){var r=t.originalBlockClientId,n=t.selectFirst,i=Object(d.a)(t,["originalBlockClientId","selectFirst"]);if(!r)return Object(A.createElement)(e,i);var o=Object(b.getBlockType)(i.name),a=function(e){var t=Object(b.findTransform)(Object(b.getBlockTransforms)("to",e),(function(e){var t=e.type,r=e.blocks;return"block"===t&&1===r.length}));if(!t)return null;return Object(b.getBlockType)(t.blocks[0])}(i.name);return[Object(A.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(A.createElement)(e,Object(I.a)({key:"block-edit"},i))),Object(A.createElement)(c.Warning,{key:"multiple-use-warning",actions:[Object(A.createElement)(g.Button,{key:"find-original",isSecondary:!0,onClick:n},Object(h.__)("Find original")),Object(A.createElement)(g.Button,{key:"remove",isSecondary:!0,onClick:function(){return i.onReplace([])}},Object(h.__)("Remove")),a&&Object(A.createElement)(g.Button,{key:"transform",isSecondary:!0,onClick:function(){return i.onReplace(Object(b.createBlock)(a.name,i.attributes))}},Object(h.__)("Transform into:")," ",a.title)]},Object(A.createElement)("strong",null,o.title,": "),Object(h.__)("This block can only be used once."))]}))}),"withMultipleValidation");Object(q.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",y);var K=r(63),E=r(30);var f=Object(j.compose)(Object(v.withSelect)((function(e){return{editedPostContent:e("core/editor").getEditedPostAttribute("content")}})),Object(v.withDispatch)((function(e){return{createNotice:e("core/notices").createNotice}})),Object(j.ifCondition)((function(e){return e.editedPostContent.length>0})))((function(e){var t=e.createNotice,r=e.editedPostContent,n=Object(A.useRef)(),i=Object(j.useCopyOnClick)(n,r);return Object(A.useEffect)((function(){i&&t("info",Object(h.__)("All content copied."),{isDismissible:!0,type:"snackbar"})}),[i]),Object(A.createElement)(g.MenuItem,{ref:n},i?Object(h.__)("Copied!"):Object(h.__)("Copy all content"))}));var S=Object(v.withDispatch)((function(e){return{openModal:e("core/edit-post").openModal}}))((function(e){var t=e.openModal;return Object(A.createElement)(g.MenuItem,{onClick:function(){t("edit-post/manage-blocks")}},Object(h.__)("Block Manager"))})),M=r(22);var Z=Object(v.withDispatch)((function(e){return{openModal:e("core/edit-post").openModal}}))((function(e){var t=e.openModal;return Object(A.createElement)(g.MenuItem,{onClick:function(){t("edit-post/keyboard-shortcut-help")},shortcut:M.displayShortcut.access("h")},Object(h.__)("Keyboard shortcuts"))})),z=Object(g.createSlotFill)("ToolsMoreMenuGroup"),w=z.Fill,B=z.Slot;w.Slot=function(e){var t=e.fillProps;return Object(A.createElement)(B,{fillProps:t},(function(e){return!Object(O.isEmpty)(e)&&Object(A.createElement)(g.MenuGroup,{label:Object(h.__)("Tools")},e)}))};var G=w;function Y(){var e=Object(v.useDispatch)("core/edit-post").toggleFeature;return Object(A.createElement)(g.MenuItem,{onClick:function(){return e("welcomeGuide")}},Object(h.__)("Welcome Guide"))}Object(K.registerPlugin)("edit-post",{render:function(){return Object(A.createElement)(A.Fragment,null,Object(A.createElement)(G,null,(function(e){var t=e.onClose;return Object(A.createElement)(A.Fragment,null,Object(A.createElement)(S,{onSelect:t}),Object(A.createElement)(g.MenuItem,{role:"menuitem",href:Object(E.addQueryArgs)("edit.php",{post_type:"wp_block"})},Object(h.__)("Manage all reusable blocks")),Object(A.createElement)(Z,{onSelect:t}),Object(A.createElement)(Y,null),Object(A.createElement)(f,null),Object(A.createElement)(g.MenuItem,{role:"menuitem",href:Object(h.__)("https://wordpress.org/support/article/wordpress-editor/"),target:"_blank",rel:"noopener noreferrer"},Object(h.__)("Help")))})))}});var k=r(5),Q=r(36),W=r(16);function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:N,r=arguments.length>1?arguments[1]:void 0;return e(t,r)}})])({panels:function(e,t){switch(t.type){case"TOGGLE_PANEL_ENABLED":var r=t.panelName;return D({},e,Object(k.a)({},r,D({},e[r],{enabled:!Object(O.get)(e,[r,"enabled"],!0)})));case"TOGGLE_PANEL_OPENED":var n=t.panelName,i=!0===e[n]||Object(O.get)(e,[n,"opened"],!1);return D({},e,Object(k.a)({},n,D({},e[n],{opened:!i})))}return e},features:function(e,t){return"TOGGLE_FEATURE"===t.type?D({},e,Object(k.a)({},t.feature,!e[t.feature])):e},editorMode:function(e,t){return"SWITCH_MODE"===t.type?t.mode:e},hiddenBlockTypes:function(e,t){switch(t.type){case"SHOW_BLOCK_TYPES":return O.without.apply(void 0,[e].concat(Object(W.a)(t.blockNames)));case"HIDE_BLOCK_TYPES":return Object(O.union)(e,t.blockNames)}return e},preferredStyleVariations:function(e,t){switch(t.type){case"UPDATE_PREFERRED_STYLE_VARIATIONS":return t.blockName?t.blockStyle?D({},e,Object(k.a)({},t.blockName,t.blockStyle)):Object(O.omit)(e,[t.blockName]):e}return e},localAutosaveInterval:function(e,t){switch(t.type){case"UPDATE_LOCAL_AUTOSAVE_INTERVAL":return t.interval}return e}});var P=Object(v.combineReducers)({isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REQUEST_META_BOX_UPDATES":return!0;case"META_BOX_UPDATES_SUCCESS":return!1;default:return e}},locations:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_META_BOXES_PER_LOCATIONS":return t.metaBoxesPerLocation}return e}}),x=Object(v.combineReducers)({activeModal: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"OPEN_MODAL":return t.name;case"CLOSE_MODAL":return null}return e},metaBoxes:P,preferences:J,publishSidebarActive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},removedPanels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"REMOVE_PANEL":if(!Object(O.includes)(e,t.panelName))return[].concat(Object(W.a)(e),[t.panelName])}return e},deviceType:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Desktop",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_PREVIEW_DEVICE_TYPE":return t.deviceType}return e}}),H=r(103),R=r.n(H),T=r(15),F=r(49),U=r(45),X=r.n(U),V=r(23),_=r.n(V),$=_.a.mark(te),ee=_.a.mark(re);function te(e){return _.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(Q.dispatch)("core/interface","enableComplementaryArea","core/edit-post",e);case 2:case"end":return t.stop()}}),$)}function re(){return _.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(Q.dispatch)("core/interface","disableComplementaryArea","core/edit-post");case 2:case"end":return e.stop()}}),ee)}function ne(e){return{type:"OPEN_MODAL",name:e}}function ie(){return{type:"CLOSE_MODAL"}}function oe(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function ae(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function Ae(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}function ce(e){return{type:"TOGGLE_PANEL_ENABLED",panelName:e}}function ue(e){return{type:"TOGGLE_PANEL_OPENED",panelName:e}}function le(e){return{type:"REMOVE_PANEL",panelName:e}}function me(e){return{type:"TOGGLE_FEATURE",feature:e}}function se(e){return{type:"SWITCH_MODE",mode:e}}function qe(e){return{type:"TOGGLE_PINNED_PLUGIN_ITEM",pluginName:e}}function pe(e){return{type:"HIDE_BLOCK_TYPES",blockNames:Object(O.castArray)(e)}}function Ie(e,t){return{type:"UPDATE_PREFERRED_STYLE_VARIATIONS",blockName:e,blockStyle:t}}function de(e){return{type:"UPDATE_LOCAL_AUTOSAVE_INTERVAL",interval:e}}function Oe(e){return{type:"SHOW_BLOCK_TYPES",blockNames:Object(O.castArray)(e)}}function be(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}function ge(){return{type:"REQUEST_META_BOX_UPDATES"}}function ve(){return{type:"META_BOX_UPDATES_SUCCESS"}}function he(e){return{type:"SET_PREVIEW_DEVICE_TYPE",deviceType:e}}var je=r(41);function Ce(e){return Se(e,"editorMode","visual")}var ye=Object(v.createRegistrySelector)((function(e){return function(){var t=e("core/interface").getActiveComplementaryArea("core/edit-post");return Object(O.includes)(["edit-post/document","edit-post/block"],t)}})),Ke=Object(v.createRegistrySelector)((function(e){return function(){var t=e("core/interface").getActiveComplementaryArea("core/edit-post");return!!t&&!Object(O.includes)(["edit-post/document","edit-post/block"],t)}})),Ee=Object(v.createRegistrySelector)((function(e){return function(){return e("core/interface").getActiveComplementaryArea("core/edit-post")}}));function fe(e){return e.preferences}function Se(e,t,r){var n=fe(e)[t];return void 0===n?r:n}function Me(e){return e.publishSidebarActive}function Ze(e,t){return Object(O.includes)(e.removedPanels,t)}function ze(e,t){var r=Se(e,"panels");return!Ze(e,t)&&Object(O.get)(r,[t,"enabled"],!0)}function we(e,t){var r=Se(e,"panels");return!0===Object(O.get)(r,[t])||!0===Object(O.get)(r,[t,"opened"])}function Be(e,t){return e.activeModal===t}function Ge(e,t){return Object(O.get)(e.preferences.features,[t],!1)}var Ye=Object(v.createRegistrySelector)((function(e){return function(t){return e("core/interface").isItemPinned("core/edit-post",t)}})),ke=Object(je.a)((function(e){return Object.keys(e.metaBoxes.locations).filter((function(t){return We(e,t)}))}),(function(e){return[e.metaBoxes.locations]}));function Qe(e,t){return We(e,t)&&Object(O.some)(Le(e,t),(function(t){var r=t.id;return ze(e,"meta-box-".concat(r))}))}function We(e,t){var r=Le(e,t);return!!r&&0!==r.length}function Le(e,t){return e.metaBoxes.locations[t]}var De=Object(je.a)((function(e){return Object(O.flatten)(Object(O.values)(e.metaBoxes.locations))}),(function(e){return[e.metaBoxes.locations]}));function Ne(e){return ke(e).length>0}function Je(e){return e.metaBoxes.isSaving}function Pe(e){return e.deviceType}var xe;function He(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return Re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Re(e,t)}(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,o=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,o=t.item;return"SET_SINGLE_ENABLE_ITEM"===r&&n&&i?ut({},e,Object(k.a)({},n,ut({},e[n],Object(k.a)({},i,o||null)))):e},multipleEnableItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.itemType,i=t.scope,o=t.item,a=t.isEnable;if("SET_MULTIPLE_ENABLE_ITEM"!==r||!n||!i||!o||Object(O.get)(e,[n,i,o])===a)return e;var A=e[n]||{},c=A[i]||{};return ut({},e,Object(k.a)({},n,ut({},A,Object(k.a)({},i,ut({},c,Object(k.a)({},o,a||!1))))))}}),mt=Object(v.combineReducers)({enableItems:lt});function st(e,t,r){return{type:"SET_SINGLE_ENABLE_ITEM",itemType:e,scope:t,item:r}}function qt(e,t){return st("complementaryArea",e,t)}function pt(e){return st("complementaryArea",e,void 0)}function It(e,t,r,n){return{type:"SET_MULTIPLE_ENABLE_ITEM",itemType:e,scope:t,item:r,isEnable:n}}function dt(e,t){return It("pinnedItems",e,t,!0)}function Ot(e,t){return It("pinnedItems",e,t,!1)}function bt(e,t){return function(e,t,r){return Object(O.get)(e.enableItems.singleEnableItems,[t,r])}(e,"complementaryArea",t)}function gt(e,t,r){return!1!==function(e,t,r,n){return Object(O.get)(e.enableItems.multipleEnableItems,[t,r,n])}(e,"pinnedItems",t,r)}Object(v.registerStore)("core/interface",{reducer:mt,actions:o,selectors:a,persist:["enableItems"]});var vt=r(281),ht=r(282),jt=r(417),Ct=Object(K.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,identifier:t.identifier||"".concat(e.name,"/").concat(t.name)}}));var yt=Ct((function(e){var t=e.as,r=void 0===t?g.Button:t,n=e.scope,i=e.identifier,o=e.icon,a=e.selectedIcon,c=Object(d.a)(e,["as","scope","identifier","icon","selectedIcon"]),u=r,l=Object(v.useSelect)((function(e){return e("core/interface").getActiveComplementaryArea(n)===i}),[i]),m=Object(v.useDispatch)("core/interface"),s=m.enableComplementaryArea,q=m.disableComplementaryArea;return Object(A.createElement)(u,Object(I.a)({icon:a&&l?a:o,onClick:function(){l?q(n):s(n,i)}},Object(O.omit)(c,["name"])))})),Kt=function(e){var t=e.smallScreenTitle,r=e.children,n=e.className,i=e.toggleButtonProps,o=Object(A.createElement)(yt,Object(I.a)({icon:jt.a},i));return Object(A.createElement)(A.Fragment,null,Object(A.createElement)("div",{className:"components-panel__header interface-complementary-area-header__small"},t&&Object(A.createElement)("span",{className:"interface-complementary-area-header__small-title"},t),o),Object(A.createElement)("div",{className:At()("components-panel__header","interface-complementary-area-header",n),tabIndex:-1},r,o))};function Et(e){var t=e.scope,r=Object(d.a)(e,["scope"]);return Object(A.createElement)(g.Fill,Object(I.a)({name:"PinnedItems/".concat(t)},r))}Et.Slot=function(e){var t=e.scope,r=e.className,n=Object(d.a)(e,["scope","className"]);return Object(A.createElement)(g.Slot,Object(I.a)({name:"PinnedItems/".concat(t)},n),(function(e){return!Object(O.isEmpty)(e)&&Object(A.createElement)("div",{className:At()(r,"interface-pinned-items")},e)}))};var ft=Et;function St(e){var t=e.scope,r=e.children,n=e.className;return Object(A.createElement)(g.Fill,{name:"ComplementaryArea/".concat(t)},Object(A.createElement)(g.Animate,{type:"slide-in",options:{origin:"left"}},(function(){return Object(A.createElement)("div",{className:n},r)})))}var Mt=Ct((function(e){var t=e.children,r=e.className,n=e.closeLabel,i=void 0===n?Object(h.__)("Close plugin"):n,o=e.identifier,a=e.header,c=e.headerClassName,u=e.icon,l=e.isPinnable,m=void 0===l||l,s=e.panelClassName,q=e.scope,p=e.smallScreenTitle,I=e.title,d=e.toggleShortcut,O=e.isActiveByDefault,b=Object(v.useSelect)((function(e){var t=e("core/interface"),r=t.getActiveComplementaryArea,n=t.isItemPinned,i=r(q);return{isActive:i===o,isPinned:n(q,o),activeArea:i,isSmall:e("core/viewport").isViewportMatch("< medium")}}),[o,q]),j=b.isActive,C=b.isPinned,y=b.activeArea,K=b.isSmall;!function(e,t,r,n,i){var o=Object(A.useRef)(!1),a=Object(A.useRef)(!1),c=Object(v.useDispatch)("core/interface"),u=c.enableComplementaryArea,l=c.disableComplementaryArea;Object(A.useEffect)((function(){n&&i&&!o.current?(l(e),a.current=!0):a.current&&!i&&o.current?(a.current=!1,u(e,t)):a.current&&r&&r!==t&&(a.current=!1),i!==o.current&&(o.current=i)}),[n,i,e,t,r])}(q,o,y,j,K);var E=Object(v.useDispatch)("core/interface"),f=E.enableComplementaryArea,S=E.disableComplementaryArea,M=E.pinItem,Z=E.unpinItem;return Object(A.useEffect)((function(){O&&void 0===y&&!K&&f(q,o)}),[y,O,q,o,K]),Object(A.createElement)(A.Fragment,null,C&&m&&Object(A.createElement)(ft,{scope:q},Object(A.createElement)(yt,{scope:q,identifier:o,isPressed:j,"aria-expanded":j,label:I,icon:u})),j&&Object(A.createElement)(St,{className:At()("interface-complementary-area",r),scope:q},Object(A.createElement)(Kt,{className:c,closeLabel:i,onClose:function(){return S(q)},smallScreenTitle:p,toggleButtonProps:{label:i,shortcut:d,scope:q,identifier:o}},a||Object(A.createElement)(A.Fragment,null,Object(A.createElement)("strong",null,I),m&&Object(A.createElement)(g.Button,{className:"interface-complementary-area__pin-unpin-item",icon:C?vt.a:ht.a,label:C?Object(h.__)("Unpin from toolbar"):Object(h.__)("Pin to toolbar"),onClick:function(){return(C?Z:M)(q,o)},isPressed:C,"aria-expanded":C}))),Object(A.createElement)(g.Panel,{className:s},t)))}));Mt.Slot=function(e){var t=e.scope,r=Object(d.a)(e,["scope"]);return Object(A.createElement)(g.Slot,Object(I.a)({name:"ComplementaryArea/".concat(t)},r))};var Zt=Mt,zt=r(171);function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bt(e){for(var t=1;t0?"mixed":"false",Object(A.createElement)("div",{role:"group","aria-labelledby":s,className:"edit-post-manage-blocks-modal__category"},Object(A.createElement)(g.CheckboxControl,{checked:q,onChange:a,className:"edit-post-manage-blocks-modal__category-title","aria-checked":l,label:Object(A.createElement)("span",{id:s},r)}),Object(A.createElement)(Ar,{blockTypes:u,value:m,onItemChange:o}))}));var lr=Object(j.compose)([Object(j.withState)({search:""}),Object(v.withSelect)((function(e){var t=e("core/blocks"),r=t.getBlockTypes,n=t.getCategories,i=t.hasBlockSupport,o=t.isMatchingSearchTerm,a=(0,e("core/edit-post").getPreference)("hiddenBlockTypes"),A=Object(O.isArray)(a)&&a.length;return{blockTypes:r(),categories:n(),hasBlockSupport:i,isMatchingSearchTerm:o,numberOfHiddenBlocks:A}}))])((function(e){var t=e.search,r=e.setState,n=e.blockTypes,i=e.categories,o=e.hasBlockSupport,a=e.isMatchingSearchTerm,c=e.numberOfHiddenBlocks;return n=n.filter((function(e){return o(e,"inserter",!0)&&(!t||a(e,t))&&(!e.parent||Object(O.includes)(e.parent,"core/post-content"))})),Object(A.createElement)("div",{className:"edit-post-manage-blocks-modal__content"},Object(A.createElement)(g.TextControl,{type:"search",label:Object(h.__)("Search for a block"),value:t,onChange:function(e){return r({search:e})},className:"edit-post-manage-blocks-modal__search"}),!!c&&Object(A.createElement)("div",{className:"edit-post-manage-blocks-modal__disabled-blocks-count"},Object(h.sprintf)(Object(h._n)("%d block is disabled.","%d blocks are disabled.",c),c)),Object(A.createElement)("div",{tabIndex:"0",role:"region","aria-label":Object(h.__)("Available block types"),className:"edit-post-manage-blocks-modal__results"},0===n.length&&Object(A.createElement)("p",{className:"edit-post-manage-blocks-modal__no-results"},Object(h.__)("No blocks found.")),i.map((function(e){return Object(A.createElement)(ur,{key:e.slug,title:e.title,blockTypes:Object(O.filter)(n,{category:e.slug})})})),Object(A.createElement)(ur,{title:Object(h.__)("Uncategorized"),blockTypes:Object(O.filter)(n,(function(e){return!e.category}))})))}));var mr=Object(j.compose)([Object(v.withSelect)((function(e){return{isActive:(0,e("core/edit-post").isModalActive)("edit-post/manage-blocks")}})),Object(v.withDispatch)((function(e){return{closeModal:e("core/edit-post").closeModal}}))])((function(e){var t=e.isActive,r=e.closeModal;return t?Object(A.createElement)(g.Modal,{className:"edit-post-manage-blocks-modal",title:Object(h.__)("Block Manager"),closeLabel:Object(h.__)("Close"),onRequestClose:r},Object(A.createElement)(lr,null)):null})),sr=function(e){var t=e.title,r=e.children;return Object(A.createElement)("section",{className:"edit-post-options-modal__section"},Object(A.createElement)("h2",{className:"edit-post-options-modal__section-title"},t),r)},qr=r(128),pr=Object(j.compose)(Object(v.withSelect)((function(e){return{isChecked:e("core/editor").isPublishSidebarEnabled()}})),Object(v.withDispatch)((function(e){var t=e("core/editor"),r=t.enablePublishSidebar,n=t.disablePublishSidebar;return{onChange:function(e){return e?r():n()}}})),Object(m.ifViewportMatches)("medium"))(qr.a),Ir=r(468),dr=r(469);function Or(e){var t=e.willEnable,r=Object(A.useState)(!1),n=Object(T.a)(r,2),i=n[0],o=n[1];return Object(A.createElement)(A.Fragment,null,Object(A.createElement)("p",{className:"edit-post-options-modal__custom-fields-confirmation-message"},Object(h.__)("A page reload is required for this change. Make sure your content is saved before reloading.")),Object(A.createElement)(g.Button,{className:"edit-post-options-modal__custom-fields-confirmation-button",isSecondary:!0,isBusy:i,disabled:i,onClick:function(){o(!0),document.getElementById("toggle-custom-fields-form").submit()}},t?Object(h.__)("Enable & Reload"):Object(h.__)("Disable & Reload")))}var br=Object(v.withSelect)((function(e){return{areCustomFieldsEnabled:!!e("core/editor").getEditorSettings().enableCustomFields}}))((function(e){var t=e.label,r=e.areCustomFieldsEnabled,n=Object(A.useState)(r),i=Object(T.a)(n,2),o=i[0],a=i[1];return Object(A.createElement)(qr.a,{label:t,isChecked:o,onChange:a},o!==r&&Object(A.createElement)(Or,{willEnable:o}))}));var gr=Object(v.withSelect)((function(e){var t=e("core/editor").getEditorSettings,r=e("core/edit-post").getAllMetaBoxes;return{areCustomFieldsRegistered:void 0!==t().enableCustomFields,metaBoxes:r()}}))((function(e){var t=e.areCustomFieldsRegistered,r=e.metaBoxes,n=Object(d.a)(e,["areCustomFieldsRegistered","metaBoxes"]),i=Object(O.filter)(r,(function(e){return"postcustom"!==e.id}));return t||0!==i.length?Object(A.createElement)(sr,n,t&&Object(A.createElement)(br,{label:Object(h.__)("Custom fields")}),Object(O.map)(i,(function(e){var t=e.id,r=e.title;return Object(A.createElement)(dr.a,{key:t,label:r,panelName:"meta-box-".concat(t)})}))):null}));var vr=Object(j.compose)(Object(v.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute,r=(0,e("core").getPostType)(t("type"));return{isModalActive:e("core/edit-post").isModalActive("edit-post/options"),isViewable:Object(O.get)(r,["viewable"],!1)}})),Object(v.withDispatch)((function(e){return{closeModal:function(){return e("core/edit-post").closeModal()}}})))((function(e){var t=e.isModalActive,r=e.isViewable,n=e.closeModal;return t?Object(A.createElement)(g.Modal,{className:"edit-post-options-modal",title:Object(h.__)("Options"),closeLabel:Object(h.__)("Close"),onRequestClose:n},Object(A.createElement)(sr,{title:Object(h.__)("General")},Object(A.createElement)(pr,{label:Object(h.__)("Pre-publish checks")})),Object(A.createElement)(sr,{title:Object(h.__)("Document panels")},Object(A.createElement)(Ir.a.Slot,null),r&&Object(A.createElement)(dr.a,{label:Object(h.__)("Permalink"),panelName:"post-link"}),Object(A.createElement)(u.PostTaxonomies,{taxonomyWrapper:function(e,t){return Object(A.createElement)(dr.a,{label:Object(O.get)(t,["labels","menu_name"]),panelName:"taxonomy-panel-".concat(t.slug)})}}),Object(A.createElement)(u.PostFeaturedImageCheck,null,Object(A.createElement)(dr.a,{label:Object(h.__)("Featured image"),panelName:"featured-image"})),Object(A.createElement)(u.PostExcerptCheck,null,Object(A.createElement)(dr.a,{label:Object(h.__)("Excerpt"),panelName:"post-excerpt"})),Object(A.createElement)(u.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(A.createElement)(dr.a,{label:Object(h.__)("Discussion"),panelName:"discussion-panel"})),Object(A.createElement)(u.PageAttributesCheck,null,Object(A.createElement)(dr.a,{label:Object(h.__)("Page attributes"),panelName:"page-attributes"}))),Object(A.createElement)(gr,{title:Object(h.__)("Advanced panels")})):null}));function hr(){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}}var jr=function(e){Object(rt.a)(n,e);var t,r=(t=n,function(){var e,r=Object(tt.a)(t);if(hr()){var n=Object(tt.a)(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return Object(et.a)(this,e)});function n(){var e;return Object(_e.a)(this,n),(e=r.apply(this,arguments)).state={historyId:null},e}return Object($e.a)(n,[{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.postId,n=t.postStatus,i=t.postType,o=t.isSavingPost,a=this.state.historyId;"trash"!==n||o?r===e.postId&&r===a||"auto-draft"===n||this.setBrowserURL(r):this.setTrashURL(r,i)}},{key:"setTrashURL",value:function(e,t){window.location.href=function(e,t){return Object(E.addQueryArgs)("edit.php",{trashed:1,post_type:t,ids:e})}(e,t)}},{key:"setBrowserURL",value:function(e){window.history.replaceState({id:e},"Post "+e,function(e){return Object(E.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState((function(){return{historyId:e}}))}},{key:"render",value:function(){return null}}]),n}(A.Component),Cr=Object(v.withSelect)((function(e){var t=e("core/editor"),r=t.getCurrentPost,n=t.isSavingPost,i=r();return{postId:i.id,postStatus:i.status,postType:i.type,isSavingPost:n()}}))(jr),yr=r(6),Kr=Object(A.createElement)(yr.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"-2 -2 24 24"},Object(A.createElement)(yr.Path,{d:"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"}));var Er=function(){var e=Object(v.useSelect)((function(e){var t=e("core/editor").getCurrentPostType,r=e("core/edit-post").isFeatureActive,n=e("core").getPostType;return{isActive:r("fullscreenMode"),postType:n(t())}}),[]),t=e.isActive,r=e.postType;return t&&r?Object(A.createElement)(g.Button,{className:"edit-post-fullscreen-mode-close",icon:Kr,iconSize:36,href:Object(E.addQueryArgs)("edit.php",{post_type:r.slug}),label:Object(O.get)(r,["labels","view_items"],Object(h.__)("Back"))}):null},fr=r(286);var Sr=function(e){var t=e.onToggleInserter,r=e.isInserterOpen,n=Object(v.useSelect)((function(e){var t=e("core/block-editor"),r=t.hasInserterItems,n=t.getBlockRootClientId,i=t.getBlockSelectionEnd;return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),isInserterEnabled:"visual"===e("core/edit-post").getEditorMode()&&e("core/editor").getEditorSettings().richEditingEnabled&&r(n(i())),isTextModeEnabled:"text"===e("core/edit-post").getEditorMode(),previewDeviceType:e("core/edit-post").__experimentalGetPreviewDeviceType()}}),[]),i=n.hasFixedToolbar,o=n.isInserterEnabled,a=n.isTextModeEnabled,l=n.previewDeviceType,m=Object(j.useViewportMatch)("medium"),s=!m||"Desktop"!==l||i,q=s?Object(h.__)("Document and block tools"):Object(h.__)("Document tools");return Object(A.createElement)(c.NavigableToolbar,{className:"edit-post-header-toolbar","aria-label":q},Object(A.createElement)(g.__experimentalToolbarItem,{as:g.Button,className:"edit-post-header-toolbar__inserter-toggle",isPrimary:!0,isPressed:r,onClick:t,disabled:!o,icon:fr.a,label:Object(h._x)("Add block","Generic label for block inserter button")}),m&&Object(A.createElement)(g.__experimentalToolbarItem,{as:c.ToolSelector}),Object(A.createElement)(g.__experimentalToolbarItem,{as:u.EditorHistoryUndo}),Object(A.createElement)(g.__experimentalToolbarItem,{as:u.EditorHistoryRedo}),Object(A.createElement)(g.__experimentalToolbarItem,{as:u.TableOfContents,hasOutlineItemsDisabled:a}),Object(A.createElement)(g.__experimentalToolbarItem,{as:c.BlockNavigationDropdown,isDisabled:a}),s&&Object(A.createElement)("div",{className:"edit-post-header-toolbar__block-toolbar"},Object(A.createElement)(c.BlockToolbar,{hideDragHandle:!0})))},Mr=r(294);function Zr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var zr=[{value:"visual",label:Object(h.__)("Visual editor")},{value:"text",label:Object(h.__)("Code editor")}];var wr=function(){var e=Object(v.useSelect)((function(e){return{shortcut:e("core/keyboard-shortcuts").getShortcutRepresentation("core/edit-post/toggle-mode"),isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled,isCodeEditingEnabled:e("core/editor").getEditorSettings().codeEditingEnabled,mode:e("core/edit-post").getEditorMode()}}),[]),t=e.shortcut,r=e.isRichEditingEnabled,n=e.isCodeEditingEnabled,i=e.mode,o=Object(v.useDispatch)("core/edit-post").switchEditorMode;if(!r||!n)return null;var a=zr.map((function(e){return e.value!==i?function(e){for(var t=1;t icon."),{InserterIconImage:Object(A.createElement)(Gn,{className:"edit-post-welcome-guide__inserter-icon"})})))},{image:Object(A.createElement)(Bn,null),content:Object(A.createElement)(A.Fragment,null,Object(A.createElement)("h1",{className:"edit-post-welcome-guide__heading"},Object(h.__)("Learn how to use the block editor")),Object(A.createElement)("p",{className:"edit-post-welcome-guide__text"},Object(h.__)("New to the block editor? Want to learn more about using it? "),Object(A.createElement)(g.ExternalLink,{href:Object(h.__)("https://wordpress.org/support/article/wordpress-editor/")},Object(h.__)("Here's a detailed guide."))))}]}):null}var kn=Object(g.createSlotFill)("PluginPostPublishPanel"),Qn=kn.Fill,Wn=kn.Slot,Ln=Object(j.compose)(Object(K.withPluginContext)((function(e,t){return{icon:t.icon||e.icon}})))((function(e){var t=e.children,r=e.className,n=e.title,i=e.initialOpen,o=void 0!==i&&i,a=e.icon;return Object(A.createElement)(Qn,null,Object(A.createElement)(g.PanelBody,{className:r,initialOpen:o||!n,title:n,icon:a},t))}));Ln.Slot=Wn;var Dn=Ln,Nn=Object(g.createSlotFill)("PluginPrePublishPanel"),Jn=Nn.Fill,Pn=Nn.Slot,xn=Object(j.compose)(Object(K.withPluginContext)((function(e,t){return{icon:t.icon||e.icon}})))((function(e){var t=e.children,r=e.className,n=e.title,i=e.initialOpen,o=void 0!==i&&i,a=e.icon;return Object(A.createElement)(Jn,null,Object(A.createElement)(g.PanelBody,{className:r,initialOpen:o||!n,title:n,icon:a},t))}));xn.Slot=Pn;var Hn=xn;function Rn(e){var t,r=e.setEntitiesSavedStatesCallback,n=e.closeEntitiesSavedStates,i=e.isEntitiesSavedStatesOpen,o=Object(v.useDispatch)("core/edit-post"),a=o.closePublishSidebar,c=o.togglePublishSidebar,l=Object(v.useSelect)((function(e){return{publishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),isSavingMetaBoxes:e("core/edit-post").isSavingMetaBoxes(),hasNonPostEntityChanges:e("core/editor").hasNonPostEntityChanges()}}),[]),m=l.publishSidebarOpened,s=l.hasActiveMetaboxes,q=l.isSavingMetaBoxes,p=l.hasNonPostEntityChanges,I=Object(A.useCallback)((function(){return r(!0)}),[]);return t=m?Object(A.createElement)(u.PostPublishPanel,{onClose:a,forceIsDirty:s,forceIsSaving:q,PrePublishExtension:Hn.Slot,PostPublishExtension:Dn.Slot}):p?Object(A.createElement)("div",{className:"edit-post-layout__toggle-entities-saved-states-panel"},Object(A.createElement)(g.Button,{isSecondary:!0,className:"edit-post-layout__toggle-entities-saved-states-panel-button",onClick:I,"aria-expanded":!1},Object(h.__)("Open save panel"))):Object(A.createElement)("div",{className:"edit-post-layout__toggle-publish-panel"},Object(A.createElement)(g.Button,{isSecondary:!0,className:"edit-post-layout__toggle-publish-panel-button",onClick:c,"aria-expanded":!1},Object(h.__)("Open publish panel"))),Object(A.createElement)(A.Fragment,null,Object(A.createElement)(u.EntitiesSavedStates,{isOpen:i,close:n}),!i&&t)}var Tn={leftSidebar:Object(h.__)("Block Library")};var Fn=function(){var e=Object(A.useState)(!1),t=Object(T.a)(e,2),r=t[0],n=t[1],i=Object(j.useViewportMatch)("medium","<"),o=Object(j.useViewportMatch)("huge",">="),a=Object(v.useDispatch)("core/edit-post"),l=a.openGeneralSidebar,m=a.closeGeneralSidebar,s=Object(v.useSelect)((function(e){return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),sidebarIsOpened:!(!e("core/interface").getActiveComplementaryArea("core/edit-post")&&!e("core/edit-post").isPublishSidebarOpened()),isFullscreenActive:e("core/edit-post").isFeatureActive("fullscreenMode"),mode:e("core/edit-post").getEditorMode(),isRichEditingEnabled:e("core/editor").getEditorSettings().richEditingEnabled,hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),previousShortcut:e("core/keyboard-shortcuts").getAllShortcutRawKeyCombinations("core/edit-post/previous-region"),nextShortcut:e("core/keyboard-shortcuts").getAllShortcutRawKeyCombinations("core/edit-post/next-region")}}),[]),q=s.mode,p=s.isFullscreenActive,I=s.isRichEditingEnabled,d=s.sidebarIsOpened,O=s.hasActiveMetaboxes,b=s.hasFixedToolbar,C=s.previousShortcut,y=s.nextShortcut,E=s.hasBlockSelected,f=At()("edit-post-layout","is-mode-"+q,{"is-sidebar-opened":d,"has-fixed-toolbar":b,"has-metaboxes":O});Object(A.useEffect)((function(){d&&!o&&n(!1)}),[d,o]),Object(A.useEffect)((function(){r&&!o&&m()}),[r,o]);var S=Object(A.useState)(!1),M=Object(T.a)(S,2),Z=M[0],z=M[1],w=Object(A.useCallback)((function(e){"function"==typeof Z&&Z(e),z(!1)}),[Z]);return Object(A.createElement)(A.Fragment,null,Object(A.createElement)(Wt,{isActive:p}),Object(A.createElement)(Cr,null),Object(A.createElement)(u.UnsavedChangesWarning,null),Object(A.createElement)(u.AutosaveMonitor,null),Object(A.createElement)(u.LocalAutosaveMonitor,null),Object(A.createElement)(Vt,null),Object(A.createElement)(u.EditorKeyboardShortcutsRegister,null),Object(A.createElement)(Mn,null),Object(A.createElement)(g.FocusReturnProvider,null,Object(A.createElement)(Dt,{className:f,labels:Tn,header:Object(A.createElement)(Jr,{isInserterOpen:r,onToggleInserter:function(){return n(!r)},setEntitiesSavedStatesCallback:z}),leftSidebar:"visual"===q&&r&&Object(A.createElement)("div",{className:"edit-post-layout__inserter-panel"},Object(A.createElement)("div",{className:"edit-post-layout__inserter-panel-header"},Object(A.createElement)(g.Button,{icon:Tt.a,onClick:function(){return n(!1)}})),Object(A.createElement)("div",{className:"edit-post-layout__inserter-panel-content"},Object(A.createElement)(c.__experimentalLibrary,{showInserterHelpPanel:!0,onSelect:function(){i&&n(!1)}}))),sidebar:(!i||d)&&Object(A.createElement)(A.Fragment,null,!i&&!d&&Object(A.createElement)("div",{className:"edit-post-layout__toogle-sidebar-panel"},Object(A.createElement)(g.Button,{isSecondary:!0,className:"edit-post-layout__toogle-sidebar-panel-button",onClick:function(){return l(E?"edit-post/block":"edit-post/document")},"aria-expanded":!1},E?Object(h.__)("Open block settings"):Object(h.__)("Open document settings"))),Object(A.createElement)(Zt.Slot,{scope:"core/edit-post"})),content:Object(A.createElement)(A.Fragment,null,Object(A.createElement)(u.EditorNotices,null),("text"===q||!I)&&Object(A.createElement)(Ft,null),I&&"visual"===q&&Object(A.createElement)(Xt,null),Object(A.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(A.createElement)(Kn,{location:"normal"}),Object(A.createElement)(Kn,{location:"advanced"})),i&&d&&Object(A.createElement)(g.ScrollLock,null)),footer:!i&&I&&"visual"===q&&Object(A.createElement)("div",{className:"edit-post-layout__footer"},Object(A.createElement)(c.BlockBreadcrumb,null)),actions:Object(A.createElement)(Rn,{closeEntitiesSavedStates:w,isEntitiesSavedStatesOpen:Z,setEntitiesSavedStatesCallback:z}),shortcuts:{previous:C,next:y}}),Object(A.createElement)(mr,null),Object(A.createElement)(vr,null),Object(A.createElement)(ar,null),Object(A.createElement)(Yn,null),Object(A.createElement)(g.Popover.Slot,null),Object(A.createElement)(K.PluginArea,null)))};function Un(e){var t=e.postId;return function(e){var t=Object(v.useSelect)((function(e){return{hasBlockSelection:!!e("core/block-editor").getBlockSelectionStart(),isEditorSidebarOpened:e("core/edit-post").isEditorSidebarOpened()}}),[e]),r=t.hasBlockSelection,n=t.isEditorSidebarOpened,i=Object(v.useDispatch)("core/edit-post").openGeneralSidebar;Object(A.useEffect)((function(){n&&i(r?"edit-post/block":"edit-post/document")}),[r,n])}(t),function(e){var t=Object(v.useSelect)((function(e){return{newPermalink:e("core/editor").getCurrentPost().link}}),[e]).newPermalink,r=Object(A.useRef)();Object(A.useEffect)((function(){r.current=document.querySelector("#wp-admin-bar-preview a")||document.querySelector("#wp-admin-bar-view a")}),[e]),Object(A.useEffect)((function(){t&&r.current&&r.current.setAttribute("href",t)}),[t])}(t),null}function Xn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vn(){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}}var _n=function(e){Object(rt.a)(n,e);var t,r=(t=n,function(){var e,r=Object(tt.a)(t);if(Vn()){var n=Object(tt.a)(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return Object(et.a)(this,e)});function n(){var e;return Object(_e.a)(this,n),(e=r.apply(this,arguments)).getEditorSettings=it()(e.getEditorSettings,{maxSize:1}),e}return Object($e.a)(n,[{key:"getEditorSettings",value:function(e,t,r,n,i,o,a,A){if(e=function(e){for(var t=1;t0){var c=!0===e.allowedBlockTypes?Object(O.map)(i,"name"):e.allowedBlockTypes||[];e.allowedBlockTypes=O.without.apply(void 0,[c].concat(Object(W.a)(n)))}return e}},{key:"render",value:function(){var e=this.props,t=e.settings,r=e.hasFixedToolbar,n=e.focusMode,i=e.post,o=e.postId,a=e.initialEdits,c=e.onError,l=e.hiddenBlockTypes,m=e.blockTypes,s=e.preferredStyleVariations,q=e.__experimentalLocalAutosaveInterval,p=e.updatePreferredStyleVariations,O=Object(d.a)(e,["settings","hasFixedToolbar","focusMode","post","postId","initialEdits","onError","hiddenBlockTypes","blockTypes","preferredStyleVariations","__experimentalLocalAutosaveInterval","updatePreferredStyleVariations"]);if(!i)return null;var b=this.getEditorSettings(t,r,n,l,m,s,q,p);return Object(A.createElement)(A.StrictMode,null,Object(A.createElement)(cr.Provider,{value:t},Object(A.createElement)(g.SlotFillProvider,null,Object(A.createElement)(g.DropZoneProvider,null,Object(A.createElement)(u.EditorProvider,Object(I.a)({settings:b,post:i,initialEdits:a,useSubRegistry:!1},O),Object(A.createElement)(u.ErrorBoundary,{onError:c},Object(A.createElement)(Un,{postId:o}),Object(A.createElement)(Fn,null),Object(A.createElement)(g.KeyboardShortcuts,{shortcuts:ot})),Object(A.createElement)(u.PostLockedModal,null))))))}}]),n}(A.Component),$n=Object(j.compose)([Object(v.withSelect)((function(e,t){var r=t.postId,n=t.postType,i=e("core/edit-post"),o=i.isFeatureActive,a=i.getPreference,A=i.__experimentalGetPreviewDeviceType,c=e("core").getEntityRecord,u=e("core/blocks").getBlockTypes;return{hasFixedToolbar:o("fixedToolbar")||"Desktop"!==A(),focusMode:o("focusMode"),post:c("postType",n,r),preferredStyleVariations:a("preferredStyleVariations"),hiddenBlockTypes:a("hiddenBlockTypes"),blockTypes:u(),__experimentalLocalAutosaveInterval:a("localAutosaveInterval")}})),Object(v.withDispatch)((function(e){return{updatePreferredStyleVariations:e("core/edit-post").updatePreferredStyleVariations}}))])(_n),ei=r(418),ti=function(e,t){return!Array.isArray(t)||(r=e,n=t,0===Object(O.difference)(r,n).length);var r,n},ri=function(e){var t=e.allowedBlocks,r=e.icon,n=e.label,i=e.onClick,o=e.small,a=e.role;return Object(A.createElement)(c.BlockSettingsMenuControls,null,(function(e){var c=e.selectedBlocks,u=e.onClose;return ti(c,t)?Object(A.createElement)(g.MenuItem,{onClick:Object(j.compose)(i,u),icon:r||ei.a,label:o?n:void 0,role:a},!o&&n):null}))},ni=Object(j.compose)(Object(K.withPluginContext)((function(e,t){return{icon:t.icon||e.icon,name:"core/edit-post/plugin-more-menu"}})))(Yt);function ii(e){return Object(A.createElement)(kt,Object(I.a)({scope:"core/edit-post"},e))}function oi(e,t,r,n,i){Object(A.unmountComponentAtNode)(r);var o=oi.bind(null,e,t,r,n,i);Object(A.render)(Object(A.createElement)($n,{settings:n,onError:o,postId:t,postType:e,initialEdits:i,recovery:!0}),r)}function ai(e,t,r,n,i){var o=document.getElementById(e),a=oi.bind(null,t,r,o,n,i);Object(s.registerCoreBlocks)(),"Standards"!==("CSS1Compat"===document.compatMode?"Standards":"Quirks")&&console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening . Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins."),-1!==window.navigator.userAgent.indexOf("iPhone")&&window.addEventListener("scroll",(function(e){var t=document.getElementsByClassName("interface-interface-skeleton__body")[0];e.target===document&&(window.scrollY>100&&(t.scrollTop=t.scrollTop+window.scrollY),document.getElementsByClassName("is-mode-visual")[0]&&window.scrollTo(0,0))})),Object(A.render)(Object(A.createElement)($n,{settings:n,onError:a,postId:r,postType:t,initialEdits:i}),o)}},45:function(e,t){!function(){e.exports=this.wp.apiFetch}()},468:function(e,t,r){"use strict";var n=r(0),i=r(3),o=r(469),a=Object(i.createSlotFill)("EnablePluginDocumentSettingPanelOption"),A=a.Fill,c=a.Slot,u=function(e){var t=e.label,r=e.panelName;return Object(n.createElement)(A,null,Object(n.createElement)(o.a,{label:t,panelName:r}))};u.Slot=c,t.a=u},469:function(e,t,r){"use strict";var n=r(9),i=r(4),o=r(128);t.a=Object(n.compose)(Object(i.withSelect)((function(e,t){var r=t.panelName,n=e("core/edit-post"),i=n.isEditorPanelEnabled;return{isRemoved:(0,n.isEditorPanelRemoved)(r),isChecked:i(r)}})),Object(n.ifCondition)((function(e){return!e.isRemoved})),Object(i.withDispatch)((function(e,t){var r=t.panelName;return{onChange:function(){return e("core/edit-post").toggleEditorPanelEnabled(r)}}})))(o.a)},47:function(e,t){!function(){e.exports=this.wp.keyboardShortcuts}()},49:function(e,t){!function(){e.exports=this.wp.a11y}()},5:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},50:function(e,t,r){e.exports=function(e,t){var r,n,i=0;function o(){var o,a,A=r,c=arguments.length;e:for(;A;){if(A.args.length===arguments.length){for(a=0;a