WordPress/wp-includes/js/dist/edit-post.min.js
atimmer a603510b73 Build Tools: Upgrade @wordpress packages to the latest version.
This also includes the new @wordpress/format-library and @wordpress/notices packages.

package-lock.json has been completely regenerated in this commit.

Props pento.
Merges [43840] to trunk.
See #45145.

Built from https://develop.svn.wordpress.org/trunk@44177


git-svn-id: http://core.svn.wordpress.org/trunk@44007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 10:55:01 +00:00

12 lines
68 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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

this.wp=this.wp||{},this.wp.editPost=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=305)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,n){"use strict";function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function r(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}n.d(t,"a",function(){return r})},11:function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return o})},12:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var o=n(27),r=n(3);function i(e,t){return!t||"object"!==Object(o.a)(t)&&"function"!=typeof t?Object(r.a)(e):t}},13:function(e,t,n){"use strict";function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return o})},14:function(e,t,n){"use strict";function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}n.d(t,"a",function(){return r})},15:function(e,t,n){"use strict";function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return o})},16:function(e,t,n){var o;
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
!function(){"use strict";var n={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)&&o.length){var c=r.apply(null,o);c&&e.push(c)}else if("object"===i)for(var a in o)n.call(o,a)&&o[a]&&e.push(a)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(o=function(){return r}.apply(t,[]))||(e.exports=o)}()},17:function(e,t){!function(){e.exports=this.wp.keycodes}()},18:function(e,t,n){"use strict";function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}n.d(t,"a",function(){return o})},186:function(e,t){!function(){e.exports=this.wp.blockLibrary}()},19:function(e,t,n){"use strict";var o=n(31);function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return r})},2:function(e,t){!function(){e.exports=this.lodash}()},20:function(e,t,n){"use strict";function o(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n.d(t,"a",function(){return o})},23:function(e,t){!function(){e.exports=this.wp.hooks}()},24:function(e,t,n){"use strict";var o=n(35);var r=n(36);function i(e,t){return Object(o.a)(e)||function(e,t){var n=[],o=!0,r=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(o=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);o=!0);}catch(e){r=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(r)throw i}}return n}(e,t)||Object(r.a)()}n.d(t,"a",function(){return i})},27:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return(r="function"==typeof Symbol&&"symbol"===o(Symbol.iterator)?function(e){return o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":o(e)})(e)}n.d(t,"a",function(){return r})},29:function(e,t){!function(){e.exports=this.wp.url}()},3:function(e,t,n){"use strict";function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return o})},305:function(e,t,n){"use strict";n.r(t);var o={};n.r(o),n.d(o,"openGeneralSidebar",function(){return ne}),n.d(o,"closeGeneralSidebar",function(){return oe}),n.d(o,"openModal",function(){return re}),n.d(o,"closeModal",function(){return ie}),n.d(o,"openPublishSidebar",function(){return ce}),n.d(o,"closePublishSidebar",function(){return ae}),n.d(o,"togglePublishSidebar",function(){return le}),n.d(o,"toggleEditorPanelEnabled",function(){return se}),n.d(o,"toggleEditorPanelOpened",function(){return ue}),n.d(o,"toggleGeneralSidebarEditorPanel",function(){return de}),n.d(o,"toggleFeature",function(){return be}),n.d(o,"switchEditorMode",function(){return pe}),n.d(o,"togglePinnedPluginItem",function(){return Oe}),n.d(o,"setAvailableMetaBoxesPerLocation",function(){return me}),n.d(o,"requestMetaBoxUpdates",function(){return fe}),n.d(o,"metaBoxUpdatesSuccess",function(){return je});var r={};n.r(r),n.d(r,"getEditorMode",function(){return ge}),n.d(r,"isEditorSidebarOpened",function(){return Ee}),n.d(r,"isPluginSidebarOpened",function(){return ve}),n.d(r,"getActiveGeneralSidebarName",function(){return _e}),n.d(r,"getPreferences",function(){return ye}),n.d(r,"getPreference",function(){return Se}),n.d(r,"isPublishSidebarOpened",function(){return Pe}),n.d(r,"isEditorPanelEnabled",function(){return ke}),n.d(r,"isEditorSidebarPanelOpened",function(){return we}),n.d(r,"isEditorPanelOpened",function(){return Ce}),n.d(r,"isModalActive",function(){return xe}),n.d(r,"isFeatureActive",function(){return Me}),n.d(r,"isPluginItemPinned",function(){return Te}),n.d(r,"getActiveMetaBoxLocations",function(){return Ae}),n.d(r,"isMetaBoxLocationVisible",function(){return Be}),n.d(r,"isMetaBoxLocationActive",function(){return Ne}),n.d(r,"getMetaBoxesPerLocation",function(){return Ie}),n.d(r,"getAllMetaBoxes",function(){return De}),n.d(r,"hasMetaBoxes",function(){return Le}),n.d(r,"isSavingMetaBoxes",function(){return Ge});var i=n(0),c=(n(77),n(7)),a=n(53),l=n(38),s=n(186),u=n(5),d=n(23),b=n(11),p=n(10),O=n(12),m=n(13),f=n(14),j=n(3),h=n(2),g=n(1),E=function(){return wp.media.view.MediaFrame.Post.extend({createStates:function(){this.states.add([new wp.media.controller.Library({id:"gallery",title:wp.media.view.l10n.createGalleryTitle,priority:40,toolbar:"main-gallery",filterable:"uploaded",multiple:"add",editable:!1,library:wp.media.query(_.defaults({type:"image"},this.options.library))}),new wp.media.controller.GalleryEdit({library:this.options.selection,editing:this.options.editing,menu:"gallery",displaySettings:!1,multiple:!0}),new wp.media.controller.GalleryAdd])}})},v=function(e){return Object(h.pick)(e,["sizes","mime","type","subtype","id","url","alt","link","caption"])},y=function(e){return wp.media.query({order:"ASC",orderby:"post__in",post__in:e,per_page:100,query:!0,type:"image"})},S=function(e){function t(e){var n,o=e.allowedTypes,r=e.multiple,i=void 0!==r&&r,c=e.gallery,a=void 0!==c&&c,l=e.title,s=void 0===l?Object(g.__)("Select or Upload Media"):l,u=e.modalClass,d=e.value;if(Object(b.a)(this,t),(n=Object(O.a)(this,Object(m.a)(t).apply(this,arguments))).openModal=n.openModal.bind(Object(j.a)(Object(j.a)(n))),n.onOpen=n.onOpen.bind(Object(j.a)(Object(j.a)(n))),n.onSelect=n.onSelect.bind(Object(j.a)(Object(j.a)(n))),n.onUpdate=n.onUpdate.bind(Object(j.a)(Object(j.a)(n))),n.onClose=n.onClose.bind(Object(j.a)(Object(j.a)(n))),a){var p=d?"gallery-edit":"gallery",f=E(),h=y(d),v=new wp.media.model.Selection(h.models,{props:h.props.toJSON(),multiple:i});n.frame=new f({mimeType:o,state:p,multiple:i,selection:v,editing:!!d}),wp.media.frame=n.frame}else{var _={title:s,button:{text:Object(g.__)("Select")},multiple:i};o&&(_.library={type:o}),n.frame=wp.media(_)}return u&&n.frame.$el.addClass(u),n.frame.on("select",n.onSelect),n.frame.on("update",n.onUpdate),n.frame.on("open",n.onOpen),n.frame.on("close",n.onClose),n}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentWillUnmount",value:function(){this.frame.remove()}},{key:"onUpdate",value:function(e){var t=this.props,n=t.onSelect,o=t.multiple,r=void 0!==o&&o,i=this.frame.state(),c=e||i.get("selection");c&&c.models.length&&n(r?c.models.map(function(e){return v(e.toJSON())}):v(c.models[0].toJSON()))}},{key:"onSelect",value:function(){var e=this.props,t=e.onSelect,n=e.multiple,o=void 0!==n&&n,r=this.frame.state().get("selection").toJSON();t(o?r:r[0])}},{key:"onOpen",value:function(){if(this.props.value){if(!this.props.gallery){var e=this.frame.state().get("selection");Object(h.castArray)(this.props.value).map(function(t){e.add(wp.media.attachment(t))})}y(Object(h.castArray)(this.props.value)).more()}}},{key:"onClose",value:function(){var e=this.props.onClose;e&&e()}},{key:"openModal",value:function(){this.frame.open()}},{key:"render",value:function(){return this.props.render({open:this.openModal})}}]),t}(i.Component);Object(d.addFilter)("editor.MediaUpload","core/edit-post/components/media-upload/replace-media-upload",function(){return S});var P=n(18),k=n(20),w=n(9),C=n(4),x=n(6),M=Object(x.compose)(Object(u.withSelect)(function(e,t){var n=e("core/editor").getBlocks();if(Object(w.hasBlockSupport)(t.name,"multiple",!0))return{};var o=Object(h.find)(n,function(e){var n=e.name;return t.name===n});return{originalBlockClientId:o&&o.clientId!==t.clientId&&o.clientId}}),Object(u.withDispatch)(function(e,t){var n=t.originalBlockClientId;return{selectFirst:function(){return e("core/editor").selectBlock(n)}}})),T=Object(x.createHigherOrderComponent)(function(e){return M(function(t){var n=t.originalBlockClientId,o=t.selectFirst,r=Object(k.a)(t,["originalBlockClientId","selectFirst"]);if(!n)return Object(i.createElement)(e,r);var a=Object(w.getBlockType)(r.name),l=function(e){var t=Object(w.findTransform)(Object(w.getBlockTransforms)("to",e),function(e){var t=e.type,n=e.blocks;return"block"===t&&1===n.length});if(!t)return null;return Object(w.getBlockType)(t.blocks[0])}(r.name);return[Object(i.createElement)("div",{key:"invalid-preview",style:{minHeight:"60px"}},Object(i.createElement)(e,Object(P.a)({key:"block-edit"},r))),Object(i.createElement)(c.Warning,{key:"multiple-use-warning",actions:[Object(i.createElement)(C.Button,{key:"find-original",isLarge:!0,onClick:o},Object(g.__)("Find original")),Object(i.createElement)(C.Button,{key:"remove",isLarge:!0,onClick:function(){return r.onReplace([])}},Object(g.__)("Remove")),l&&Object(i.createElement)(C.Button,{key:"transform",isLarge:!0,onClick:function(){return r.onReplace(Object(w.createBlock)(l.name,r.attributes))}},Object(g.__)("Transform into:")," ",l.title)]},Object(i.createElement)("strong",null,a.title,": "),Object(g.__)("This block can only be used once."))]})},"withMultipleValidation");Object(d.addFilter)("editor.BlockEdit","core/edit-post/validate-multiple-use/with-multiple-validation",T);var A=n(61);var B=Object(x.compose)(Object(u.withSelect)(function(e){return{editedPostContent:e("core/editor").getEditedPostAttribute("content")}}),Object(x.withState)({hasCopied:!1}))(function(e){var t=e.editedPostContent,n=e.hasCopied,o=e.setState;return Object(i.createElement)(C.ClipboardButton,{text:t,className:"components-menu-item__button",onCopy:function(){return o({hasCopied:!0})},onFinishCopy:function(){return o({hasCopied:!1})}},n?Object(g.__)("Copied!"):Object(g.__)("Copy All Content"))}),N=n(17);var I=Object(u.withDispatch)(function(e){return{openModal:e("core/edit-post").openModal}})(function(e){var t=e.openModal,n=e.onSelect;return Object(i.createElement)(C.MenuItem,{onClick:function(){n(),t("edit-post/keyboard-shortcut-help")},shortcut:N.displayShortcut.access("h")},Object(g.__)("Keyboard Shortcuts"))}),D=Object(C.createSlotFill)("ToolsMoreMenuGroup"),L=D.Fill,G=D.Slot;L.Slot=function(e){var t=e.fillProps;return Object(i.createElement)(G,{fillProps:t},function(e){return!Object(h.isEmpty)(e)&&Object(i.createElement)(C.MenuGroup,{label:Object(g.__)("Tools")},e)})};var F=L;Object(A.registerPlugin)("edit-post",{render:function(){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(F,null,function(e){var t=e.onClose;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(C.MenuItem,{role:"menuitem",href:"edit.php?post_type=wp_block"},Object(g.__)("Manage All Reusable Blocks")),Object(i.createElement)(I,{onSelect:t}),Object(i.createElement)(B,null))}))}});var R=n(15),U=n(8),V={editorMode:"visual",isGeneralSidebarDismissed:!1,panels:{"post-status":{opened:!0}},features:{fixedToolbar:!1},pinnedPluginItems:{}},W="edit-post/document",H=Object(u.combineReducers)({isGeneralSidebarDismissed: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_GENERAL_SIDEBAR":case"CLOSE_GENERAL_SIDEBAR":return"CLOSE_GENERAL_SIDEBAR"===t.type}return e},panels:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V.panels,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"TOGGLE_PANEL_ENABLED":var n=t.panelName;return Object(U.a)({},e,Object(R.a)({},n,Object(U.a)({},e[n],{enabled:!Object(h.get)(e,[n,"enabled"],!0)})));case"TOGGLE_PANEL_OPENED":var o=t.panelName,r=!0===e[o]||Object(h.get)(e,[o,"opened"],!1);return Object(U.a)({},e,Object(R.a)({},o,Object(U.a)({},e[o],{opened:!r})))}return e},features:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V.features,t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_FEATURE"===t.type?Object(U.a)({},e,Object(R.a)({},t.feature,!e[t.feature])):e},editorMode:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V.editorMode,t=arguments.length>1?arguments[1]:void 0;return"SWITCH_MODE"===t.type?t.mode:e},pinnedPluginItems:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V.pinnedPluginItems,t=arguments.length>1?arguments[1]:void 0;return"TOGGLE_PINNED_PLUGIN_ITEM"===t.type?Object(U.a)({},e,Object(R.a)({},t.pluginName,!Object(h.get)(e,[t.pluginName],!0))):e}});var q=Object(u.combineReducers)({isSaving:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).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(u.combineReducers)({preferences:H,activeGeneralSidebar:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:W,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"OPEN_GENERAL_SIDEBAR":return t.name}return e},panel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"document",t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_ACTIVE_PANEL":return t.panel}return e},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},publishSidebarActive:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];switch((arguments.length>1?arguments[1]:void 0).type){case"OPEN_PUBLISH_SIDEBAR":return!0;case"CLOSE_PUBLISH_SIDEBAR":return!1;case"TOGGLE_PUBLISH_SIDEBAR":return!e}return e},metaBoxes:q}),K=n(19),Q=n(85),z=n.n(Q),J=n(24),Y=n(44),$=n(32),Z=n.n($),ee=n(37),te=n.n(ee);function ne(e){return{type:"OPEN_GENERAL_SIDEBAR",name:e}}function oe(){return{type:"CLOSE_GENERAL_SIDEBAR"}}function re(e){return{type:"OPEN_MODAL",name:e}}function ie(){return{type:"CLOSE_MODAL"}}function ce(){return{type:"OPEN_PUBLISH_SIDEBAR"}}function ae(){return{type:"CLOSE_PUBLISH_SIDEBAR"}}function le(){return{type:"TOGGLE_PUBLISH_SIDEBAR"}}function se(e){return{type:"TOGGLE_PANEL_ENABLED",panelName:e}}function ue(e){return{type:"TOGGLE_PANEL_OPENED",panelName:e}}function de(e){return te()("toggleGeneralSidebarEditorPanel",{alternative:"toggleEditorPanelOpened",plugin:"Gutenberg",version:"4.3.0"}),ue(e)}function be(e){return{type:"TOGGLE_FEATURE",feature:e}}function pe(e){return{type:"SWITCH_MODE",mode:e}}function Oe(e){return{type:"TOGGLE_PINNED_PLUGIN_ITEM",pluginName:e}}function me(e){return{type:"SET_META_BOXES_PER_LOCATIONS",metaBoxesPerLocation:e}}function fe(){return{type:"REQUEST_META_BOX_UPDATES"}}function je(){return{type:"META_BOX_UPDATES_SUCCESS"}}var he=n(33);function ge(e){return Se(e,"editorMode","visual")}function Ee(e){var t=_e(e);return Object(h.includes)(["edit-post/document","edit-post/block"],t)}function ve(e){return!!_e(e)&&!Ee(e)}function _e(e){return Se(e,"isGeneralSidebarDismissed",!1)?null:e.activeGeneralSidebar}function ye(e){return e.preferences}function Se(e,t,n){var o=ye(e)[t];return void 0===o?n:o}function Pe(e){return e.publishSidebarActive}function ke(e,t){var n=Se(e,"panels");return Object(h.get)(n,[t,"enabled"],!0)}function we(e,t){return te()("isEditorSidebarPanelOpened",{alternative:"isEditorPanelEnabled",plugin:"Gutenberg",version:"4.3"}),ke(e,t)}function Ce(e,t){var n=Se(e,"panels");return!0===n[t]||Object(h.get)(n,[t,"opened"],!1)}function xe(e,t){return e.activeModal===t}function Me(e,t){return!!e.preferences.features[t]}function Te(e,t){var n=Se(e,"pinnedPluginItems",{});return Object(h.get)(n,[t],!0)}var Ae=Object(he.a)(function(e){return Object.keys(e.metaBoxes.locations).filter(function(t){return Ne(e,t)})},function(e){return[e.metaBoxes.locations]});function Be(e,t){return Ne(e,t)&&Object(h.some)(Ie(e,t),function(t){var n=t.id;return ke(e,"meta-box-".concat(n))})}function Ne(e,t){var n=Ie(e,t);return!!n&&0!==n.length}function Ie(e,t){return e.metaBoxes.locations[t]}var De=Object(he.a)(function(e){return Object(h.flatten)(Object(h.values)(e.metaBoxes.locations))},function(e){return[e.metaBoxes.locations]});function Le(e){return Ae(e).length>0}function Ge(e){return e.metaBoxes.isSaving}var Fe=function(e,t){var n=e();return function(){var o=e();o!==n&&(n=o,t(o))}},Re={SET_META_BOXES_PER_LOCATIONS:function(e,t){setTimeout(function(){var e=Object(u.select)("core/editor").getCurrentPostType();window.postboxes.page!==e&&window.postboxes.add_postbox_toggles(e)});var n=Object(u.select)("core/editor").isSavingPost(),o=Object(u.select)("core/editor").isAutosavingPost();Object(u.subscribe)(function(){var e=Object(u.select)("core/editor").isSavingPost(),r=Object(u.select)("core/editor").isAutosavingPost(),i=Object(u.select)("core/edit-post").hasMetaBoxes()&&n&&!o&&!e&&!r;n=e,o=r,i&&t.dispatch({type:"REQUEST_META_BOX_UPDATES"})})},REQUEST_META_BOX_UPDATES:function(e,t){var n=t.getState(),o=Object(u.select)("core/editor").getCurrentPost(n),r=[!!o.comment_status&&["comment_status",o.comment_status],!!o.ping_status&&["ping_status",o.ping_status],!!o.sticky&&["sticky",o.sticky],["post_author",o.author]].filter(Boolean),i=[new window.FormData(document.querySelector(".metabox-base-form"))].concat(Object(K.a)(Ae(n).map(function(e){return new window.FormData(function(e){var t=document.querySelector(".edit-post-meta-boxes-area.is-".concat(e," .metabox-location-").concat(e));return t||document.querySelector("#metaboxes .metabox-location-"+e)}(e))}))),c=Object(h.reduce)(i,function(e,t){var n=!0,o=!1,r=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done);n=!0){var a=Object(J.a)(i.value,2),l=a[0],s=a[1];e.append(l,s)}}catch(e){o=!0,r=e}finally{try{n||null==c.return||c.return()}finally{if(o)throw r}}return e},new window.FormData);r.forEach(function(e){var t=Object(J.a)(e,2),n=t[0],o=t[1];return c.append(n,o)}),Z()({url:window._wpMetaBoxUrl,method:"POST",body:c,parse:!1}).then(function(){return t.dispatch({type:"META_BOX_UPDATES_SUCCESS"})})},SWITCH_MODE:function(e){"visual"!==e.mode&&Object(u.dispatch)("core/editor").clearSelectedBlock();var t="visual"===e.mode?Object(g.__)("Visual editor selected"):Object(g.__)("Code editor selected");Object(Y.speak)(t,"assertive")},INIT:function(e,t){Object(u.subscribe)(Fe(function(){return!!Object(u.select)("core/editor").getBlockSelectionStart()},function(e){Object(u.select)("core/edit-post").isEditorSidebarOpened()&&(e?t.dispatch(ne("edit-post/block")):t.dispatch(ne("edit-post/document")))}));var n,o=function(){return Object(u.select)("core/viewport").isViewportMatch("< medium")},r=(n=null,function(e){e?(n=_e(t.getState()))&&t.dispatch({type:"CLOSE_GENERAL_SIDEBAR"}):n&&!_e(t.getState())&&t.dispatch(ne(n))});r(o()),Object(u.subscribe)(Fe(o,r))}};var Ue=function(e){var t,n=[z()(Re)],o=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},r={getState:e.getState,dispatch:function(){return o.apply(void 0,arguments)}};return t=n.map(function(e){return e(r)}),o=h.flowRight.apply(void 0,Object(K.a)(t))(e.dispatch),e.dispatch=o,e},Ve=Object(u.registerStore)("core/edit-post",{reducer:X,actions:o,selectors:r,persist:["preferences"]});Ue(Ve),Ve.dispatch({type:"INIT"});var We=n(16),He=n.n(We),qe=n(29);var Xe=function(e){function t(){var e;return Object(b.a)(this,t),(e=Object(O.a)(this,Object(m.a)(t).apply(this,arguments))).state={historyId:null},e}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.postId,o=t.postStatus,r=t.postType,i=this.state.historyId;"trash"!==o?n===e.postId&&n===i||"auto-draft"===o||this.setBrowserURL(n):this.setTrashURL(n,r)}},{key:"setTrashURL",value:function(e,t){window.location.href=function(e,t){return Object(qe.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(qe.addQueryArgs)("post.php",{post:e,action:"edit"})}(e)),this.setState(function(){return{historyId:e}})}},{key:"render",value:function(){return null}}]),t}(i.Component),Ke=Object(u.withSelect)(function(e){var t=(0,e("core/editor").getCurrentPost)();return{postId:t.id,postStatus:t.status,postType:t.type}})(Xe),Qe={toggleEditorMode:{raw:N.rawShortcut.secondary("m"),display:N.displayShortcut.secondary("m")},toggleSidebar:{raw:N.rawShortcut.primaryShift(","),display:N.displayShortcut.primaryShift(","),ariaLabel:N.shortcutAriaLabel.primaryShift(",")}},ze=[{value:"visual",label:Object(g.__)("Visual Editor")},{value:"text",label:Object(g.__)("Code Editor")}];var Je=Object(x.compose)([Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode()}}),Object(u.withDispatch)(function(e,t){return{onSwitch:function(n){e("core/edit-post").switchEditorMode(n),t.onSelect(n)}}})])(function(e){var t=e.onSwitch,n=e.mode,o=ze.map(function(e){return e.value!==n?Object(U.a)({},e,{shortcut:Qe.toggleEditorMode.display}):e});return Object(i.createElement)(C.MenuGroup,{label:Object(g.__)("Editor")},Object(i.createElement)(C.MenuItemsChoice,{choices:o,value:n,onSelect:t}))}),Ye=Object(C.createSlotFill)("PluginsMoreMenuGroup"),$e=Ye.Fill,Ze=Ye.Slot;$e.Slot=function(e){var t=e.fillProps;return Object(i.createElement)(Ze,{fillProps:t},function(e){return!Object(h.isEmpty)(e)&&Object(i.createElement)(C.MenuGroup,{label:Object(g.__)("Plugins")},e)})};var et=$e;var tt=Object(u.withDispatch)(function(e){return{openModal:e("core/edit-post").openModal}})(function(e){var t=e.openModal,n=e.onSelect;return Object(i.createElement)(C.MenuItem,{onClick:function(){n(),t("edit-post/options")}},Object(g.__)("Options"))});var nt=Object(x.compose)([Object(u.withSelect)(function(e,t){var n=t.feature;return{isActive:e("core/edit-post").isFeatureActive(n)}}),Object(u.withDispatch)(function(e,t){return{onToggle:function(){e("core/edit-post").toggleFeature(t.feature),t.onToggle()}}})])(function(e){var t=e.onToggle,n=e.isActive,o=e.label,r=e.info;return Object(i.createElement)(C.MenuItem,{icon:n&&"yes",isSelected:n,onClick:t,role:"menuitemcheckbox",label:o,info:r},o)});var ot=Object(l.ifViewportMatches)("medium")(function(e){var t=e.onClose;return Object(i.createElement)(C.MenuGroup,{label:Object(g._x)("View","noun")},Object(i.createElement)(nt,{feature:"fixedToolbar",label:Object(g.__)("Unified Toolbar"),info:Object(g.__)("Access all block and document tools in a single place"),onToggle:t}),Object(i.createElement)(nt,{feature:"focusMode",label:Object(g.__)("Spotlight Mode"),info:Object(g.__)("Focus on one block at a time"),onToggle:t}),Object(i.createElement)(nt,{feature:"fullscreenMode",label:Object(g.__)("Fullscreen Mode"),info:Object(g.__)("Work without distraction"),onToggle:t}))}),rt=function(){return Object(i.createElement)(C.Dropdown,{className:"edit-post-more-menu",contentClassName:"edit-post-more-menu__content",position:"bottom left",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(C.IconButton,{icon:"ellipsis",label:Object(g._x)("More","button to expand options"),onClick:n,"aria-expanded":t})},renderContent:function(e){var t=e.onClose;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ot,{onClose:t}),Object(i.createElement)(Je,{onSelect:t}),Object(i.createElement)(et.Slot,{fillProps:{onClose:t}}),Object(i.createElement)(F.Slot,{fillProps:{onClose:t}}),Object(i.createElement)(C.MenuGroup,null,Object(i.createElement)(tt,{onSelect:t})))}})};var it=Object(u.withSelect)(function(e){var t=e("core/editor").getCurrentPostType,n=e("core/edit-post").isFeatureActive,o=e("core").getPostType;return{isActive:n("fullscreenMode"),postType:o(t())}})(function(e){var t=e.isActive,n=e.postType;return t&&n?Object(i.createElement)(C.Toolbar,{className:"edit-post-fullscreen-mode-close__toolbar"},Object(i.createElement)(C.IconButton,{icon:"exit",href:Object(qe.addQueryArgs)("edit.php",{post_type:n.slug}),label:Object(h.get)(n,["labels","view_items"],Object(g.__)("View Posts"))})):null});var ct=Object(x.compose)([Object(u.withSelect)(function(e){return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),mode:e("core/edit-post").getEditorMode()}}),Object(l.withViewportMatch)({isLargeViewport:"medium"})])(function(e){var t=e.hasFixedToolbar,n=e.isLargeViewport,o=e.mode,r=t?Object(g.__)("Document and block tools"):Object(g.__)("Document tools");return Object(i.createElement)(c.NavigableToolbar,{className:"edit-post-header-toolbar","aria-label":r},Object(i.createElement)(it,null),Object(i.createElement)("div",null,Object(i.createElement)(c.Inserter,{disabled:"visual"!==o,position:"bottom right"}),Object(i.createElement)(a.DotTip,{tipId:"core/editor.inserter"},Object(g.__)("Welcome to the wonderful world of blocks! Click the “+” (“Add block”) button to add a new block. There are blocks available for all kinds of content: you can insert text, headings, images, lists, and lots more!"))),Object(i.createElement)(c.EditorHistoryUndo,null),Object(i.createElement)(c.EditorHistoryRedo,null),Object(i.createElement)(c.TableOfContents,null),Object(i.createElement)(c.BlockNavigationDropdown,null),t&&n&&Object(i.createElement)("div",{className:"edit-post-header-toolbar__block-toolbar"},Object(i.createElement)(c.BlockToolbar,null)))}),at=Object(C.createSlotFill)("PinnedPlugins"),lt=at.Fill,st=at.Slot;lt.Slot=function(e){return Object(i.createElement)(st,e,function(e){return!Object(h.isEmpty)(e)&&Object(i.createElement)("div",{className:"edit-post-pinned-plugins"},e)})};var ut=lt;var dt=Object(x.compose)(Object(u.withSelect)(function(e){return{hasPublishAction:Object(h.get)(e("core/editor").getCurrentPost(),["_links","wp:action-publish"],!1),isBeingScheduled:e("core/editor").isEditedPostBeingScheduled(),isPending:e("core/editor").isCurrentPostPending(),isPublished:e("core/editor").isCurrentPostPublished(),isPublishSidebarEnabled:e("core/editor").isPublishSidebarEnabled(),isPublishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),isScheduled:e("core/editor").isCurrentPostScheduled()}}),Object(u.withDispatch)(function(e){return{togglePublishSidebar:e("core/edit-post").togglePublishSidebar}}),Object(l.withViewportMatch)({isLessThanMediumViewport:"< medium"}))(function(e){var t=e.forceIsDirty,n=e.forceIsSaving,o=e.hasPublishAction,r=e.isBeingScheduled,a=e.isLessThanMediumViewport,l=e.isPending,s=e.isPublished,u=e.isPublishSidebarEnabled,d=e.isPublishSidebarOpened,b=e.isScheduled,p=e.togglePublishSidebar,O=Object(i.createElement)(c.PostPublishButton,{forceIsDirty:t,forceIsSaving:n}),m=Object(i.createElement)(c.PostPublishPanelToggle,{isOpen:d,onToggle:p,forceIsSaving:n});return s||b&&r||l&&!o&&!a?O:a?m:u?m:O});var bt=Object(x.compose)(Object(u.withSelect)(function(e){return{hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),hasBlockSelection:!!e("core/editor").getBlockSelectionStart(),isEditorSidebarOpened:e("core/edit-post").isEditorSidebarOpened(),isPublishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),isSaving:e("core/edit-post").isSavingMetaBoxes()}}),Object(u.withDispatch)(function(e,t){var n=t.hasBlockSelection,o=e("core/edit-post"),r=o.openGeneralSidebar,i=o.closeGeneralSidebar,c=n?"edit-post/block":"edit-post/document";return{openGeneralSidebar:function(){return r(c)},closeGeneralSidebar:i,hasBlockSelection:void 0}}))(function(e){var t=e.closeGeneralSidebar,n=e.hasActiveMetaboxes,o=e.isEditorSidebarOpened,r=e.isPublishSidebarOpened,l=e.isSaving,s=e.openGeneralSidebar,u=o?t:s;return Object(i.createElement)("div",{role:"region","aria-label":Object(g.__)("Editor top bar"),className:"edit-post-header",tabIndex:"-1"},Object(i.createElement)(ct,null),!r&&Object(i.createElement)("div",{className:"edit-post-header__settings"},Object(i.createElement)(c.PostSavedState,{forceIsDirty:n,forceIsSaving:l}),Object(i.createElement)(c.PostPreviewButton,null),Object(i.createElement)(dt,{forceIsDirty:n,forceIsSaving:l}),Object(i.createElement)("div",null,Object(i.createElement)(C.IconButton,{icon:"admin-generic",label:Object(g.__)("Settings"),onClick:u,isToggled:o,"aria-expanded":o,shortcut:Qe.toggleSidebar}),Object(i.createElement)(a.DotTip,{tipId:"core/editor.settings"},Object(g.__)("Youll find more settings for your page and blocks in the sidebar. Click “Settings” to open it."))),Object(i.createElement)(ut.Slot,null),Object(i.createElement)(rt,null)))});var pt=Object(u.withDispatch)(function(e){return{onExit:function(){e("core/edit-post").switchEditorMode("visual")}}})(function(e){var t=e.onExit;return Object(i.createElement)("div",{className:"edit-post-text-editor"},Object(i.createElement)("div",{className:"edit-post-text-editor__toolbar"},Object(i.createElement)("h2",null,Object(g.__)("Editing Code")),Object(i.createElement)(C.IconButton,{onClick:t,icon:"no-alt",shortcut:N.displayShortcut.secondary("m")},Object(g.__)("Exit Code Editor"))),Object(i.createElement)("div",{className:"edit-post-text-editor__body"},Object(i.createElement)(c.PostTitle,null),Object(i.createElement)(c.PostTextEditor,null)))});var Ot=Object(x.compose)(Object(u.withSelect)(function(e){return{areAdvancedSettingsOpened:"edit-post/block"===e("core/edit-post").getActiveGeneralSidebarName()}}),Object(u.withDispatch)(function(e){return{openEditorSidebar:function(){return e("core/edit-post").openGeneralSidebar("edit-post/block")},closeSidebar:e("core/edit-post").closeGeneralSidebar}}),C.withSpokenMessages)(function(e){var t=e.areAdvancedSettingsOpened,n=e.closeSidebar,o=e.openEditorSidebar,r=e.onClick,c=void 0===r?h.noop:r,a=e.small,l=void 0!==a&&a,s=e.speak,u=t?Object(g.__)("Hide Block Settings"):Object(g.__)("Show Block Settings");return Object(i.createElement)(C.MenuItem,{className:"editor-block-settings-menu__control",onClick:Object(h.flow)(t?n:o,function(){s(t?Object(g.__)("Block settings closed"):Object(g.__)("Additional settings are now available in the Editor block settings sidebar"))},c),icon:"admin-generic",label:l?u:void 0,shortcut:Qe.toggleSidebar},!l&&u)}),mt=Object(C.createSlotFill)("PluginBlockSettingsMenuGroup"),ft=mt.Fill,jt=mt.Slot;ft.Slot=Object(u.withSelect)(function(e,t){var n=t.fillProps.clientIds;return{selectedBlocks:e("core/editor").getBlocksByClientId(n)}})(function(e){var t=e.fillProps,n=e.selectedBlocks;return n=Object(h.map)(n,function(e){return e.name}),Object(i.createElement)(jt,{fillProps:Object(U.a)({},t,{selectedBlocks:n})},function(e){return!Object(h.isEmpty)(e)&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"editor-block-settings-menu__separator"}),e)})});var ht=ft;var gt=function(){return Object(i.createElement)(c.BlockSelectionClearer,{className:"edit-post-visual-editor editor-styles-wrapper"},Object(i.createElement)(c.EditorGlobalKeyboardShortcuts,null),Object(i.createElement)(c.CopyHandler,null),Object(i.createElement)(c.MultiSelectScrollIntoView,null),Object(i.createElement)(c.WritingFlow,null,Object(i.createElement)(c.ObserveTyping,null,Object(i.createElement)(c.PostTitle,null),Object(i.createElement)(c.BlockList,null))),Object(i.createElement)(c._BlockSettingsMenuFirstItem,null,function(e){var t=e.onClose;return Object(i.createElement)(Ot,{onClick:t})}),Object(i.createElement)(c._BlockSettingsMenuPluginsExtension,null,function(e){var t=e.clientIds,n=e.onClose;return Object(i.createElement)(ht.Slot,{fillProps:{clientIds:t,onClose:n}})}))},Et=function(e){function t(){var e;return Object(b.a)(this,t),(e=Object(O.a)(this,Object(m.a)(t).apply(this,arguments))).toggleMode=e.toggleMode.bind(Object(j.a)(Object(j.a)(e))),e.toggleSidebar=e.toggleSidebar.bind(Object(j.a)(Object(j.a)(e))),e}return Object(f.a)(t,e),Object(p.a)(t,[{key:"toggleMode",value:function(){var e=this.props,t=e.mode;(0,e.switchMode)("visual"===t?"text":"visual")}},{key:"toggleSidebar",value:function(e){e.preventDefault();var t=this.props,n=t.isEditorSidebarOpen,o=t.closeSidebar,r=t.openSidebar;n?o():r()}},{key:"render",value:function(){var e;return Object(i.createElement)(C.KeyboardShortcuts,{bindGlobal:!0,shortcuts:(e={},Object(R.a)(e,Qe.toggleEditorMode.raw,this.toggleMode),Object(R.a)(e,Qe.toggleSidebar.raw,this.toggleSidebar),e)})}}]),t}(i.Component),vt=Object(x.compose)([Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode(),isEditorSidebarOpen:e("core/edit-post").isEditorSidebarOpened(),hasBlockSelection:!!e("core/editor").getBlockSelectionStart()}}),Object(u.withDispatch)(function(e,t){var n=t.hasBlockSelection;return{switchMode:function(t){e("core/edit-post").switchEditorMode(t)},openSidebar:function(){var t=n?"edit-post/block":"edit-post/document";e("core/edit-post").openGeneralSidebar(t)},closeSidebar:e("core/edit-post").closeGeneralSidebar}})])(Et),_t=N.displayShortcutList.primary,yt=N.displayShortcutList.primaryShift,St=N.displayShortcutList.primaryAlt,Pt=N.displayShortcutList.secondary,kt=N.displayShortcutList.access,wt=N.displayShortcutList.ctrl,Ct=N.displayShortcutList.ctrlShift,xt=N.displayShortcutList.shiftAlt,Mt=[{title:Object(g.__)("Global shortcuts"),shortcuts:[{keyCombination:kt("h"),description:Object(g.__)("Display this help.")},{keyCombination:_t("s"),description:Object(g.__)("Save your changes.")},{keyCombination:_t("z"),description:Object(g.__)("Undo your last changes.")},{keyCombination:yt("z"),description:Object(g.__)("Redo your last undo.")},{keyCombination:yt(","),description:Object(g.__)("Show or hide the settings sidebar."),ariaLabel:N.shortcutAriaLabel.primaryShift(",")},{keyCombination:kt("o"),description:Object(g.__)("Open the block navigation menu.")},{keyCombination:wt("`"),description:Object(g.__)("Navigate to the next part of the editor."),ariaLabel:N.shortcutAriaLabel.ctrl("`")},{keyCombination:Ct("`"),description:Object(g.__)("Navigate to the previous part of the editor."),ariaLabel:N.shortcutAriaLabel.ctrlShift("`")},{keyCombination:xt("n"),description:Object(g.__)("Navigate to the next part of the editor (alternative).")},{keyCombination:xt("p"),description:Object(g.__)("Navigate to the previous part of the editor (alternative).")},{keyCombination:Pt("m"),description:Object(g.__)("Switch between Visual Editor and Code Editor.")}]},{title:Object(g.__)("Selection shortcuts"),shortcuts:[{keyCombination:_t("a"),description:Object(g.__)("Select all text when typing. Press again to select all blocks.")},{keyCombination:"Esc",description:Object(g.__)("Clear selection."),ariaLabel:Object(g.__)("Escape")}]},{title:Object(g.__)("Block shortcuts"),shortcuts:[{keyCombination:yt("d"),description:Object(g.__)("Duplicate the selected block(s).")},{keyCombination:kt("z"),description:Object(g.__)("Remove the selected block(s).")},{keyCombination:St("t"),description:Object(g.__)("Insert a new block before the selected block(s).")},{keyCombination:St("y"),description:Object(g.__)("Insert a new block after the selected block(s).")},{keyCombination:"/",description:Object(g.__)("Change the block type after adding a new paragraph."),ariaLabel:Object(g.__)("Forward-slash")}]},{title:Object(g.__)("Text formatting"),shortcuts:[{keyCombination:_t("b"),description:Object(g.__)("Make the selected text bold.")},{keyCombination:_t("i"),description:Object(g.__)("Make the selected text italic.")},{keyCombination:_t("u"),description:Object(g.__)("Underline the selected text.")},{keyCombination:_t("k"),description:Object(g.__)("Convert the selected text into a link.")},{keyCombination:kt("s"),description:Object(g.__)("Remove a link.")},{keyCombination:kt("d"),description:Object(g.__)("Add a strikethrough to the selected text.")},{keyCombination:kt("x"),description:Object(g.__)("Display the selected text in a monospaced font.")}]}],Tt="edit-post/keyboard-shortcut-help",At=function(e){var t=e.shortcuts;return Object(i.createElement)("dl",{className:"edit-post-keyboard-shortcut-help__shortcut-list"},t.map(function(e,t){var n=e.keyCombination,o=e.description,r=e.ariaLabel;return Object(i.createElement)("div",{className:"edit-post-keyboard-shortcut-help__shortcut",key:t},Object(i.createElement)("dt",{className:"edit-post-keyboard-shortcut-help__shortcut-term"},Object(i.createElement)("kbd",{className:"edit-post-keyboard-shortcut-help__shortcut-key-combination","aria-label":r},function(e){return e.map(function(e,t){return"+"===e?Object(i.createElement)(i.Fragment,{key:t},e):Object(i.createElement)("kbd",{key:t,className:"edit-post-keyboard-shortcut-help__shortcut-key"},e)})}(Object(h.castArray)(n)))),Object(i.createElement)("dd",{className:"edit-post-keyboard-shortcut-help__shortcut-description"},o))}))},Bt=function(e){var t=e.title,n=e.shortcuts;return Object(i.createElement)("section",{className:"edit-post-keyboard-shortcut-help__section"},Object(i.createElement)("h2",{className:"edit-post-keyboard-shortcut-help__section-title"},t),Object(i.createElement)(At,{shortcuts:n}))};var Nt=Object(x.compose)([Object(u.withSelect)(function(e){return{isModalActive:e("core/edit-post").isModalActive(Tt)}}),Object(u.withDispatch)(function(e,t){var n=t.isModalActive,o=e("core/edit-post"),r=o.openModal,i=o.closeModal;return{toggleModal:function(){return n?i():r(Tt)}}})])(function(e){var t=e.isModalActive,n=e.toggleModal,o=Object(i.createElement)("span",{className:"edit-post-keyboard-shortcut-help__title"},Object(g.__)("Keyboard Shortcuts"));return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(C.KeyboardShortcuts,{bindGlobal:!0,shortcuts:Object(R.a)({},N.rawShortcut.access("h"),n)}),t&&Object(i.createElement)(C.Modal,{className:"edit-post-keyboard-shortcut-help",title:o,closeLabel:Object(g.__)("Close"),onRequestClose:n},Mt.map(function(e,t){return Object(i.createElement)(Bt,Object(P.a)({key:t},e))})))}),It=function(e){var t=e.title,n=e.children;return Object(i.createElement)("section",{className:"edit-post-options-modal__section"},Object(i.createElement)("h2",{className:"edit-post-options-modal__section-title"},t),n)};function Dt(e){var t=e.label,n=e.isChecked,o=e.onChange;return Object(i.createElement)(C.CheckboxControl,{className:"edit-post-options-modal__option",label:t,checked:n,onChange:o})}var Lt=function(e){function t(e){var n,o=e.isChecked;return Object(b.a)(this,t),(n=Object(O.a)(this,Object(m.a)(t).apply(this,arguments))).state={isChecked:o},n}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentWillUnmount",value:function(){this.state.isChecked!==this.props.isChecked&&this.props.onChange(this.state.isChecked)}},{key:"render",value:function(){var e=this;return Object(i.createElement)(Dt,{label:this.props.label,isChecked:this.state.isChecked,onChange:function(t){return e.setState({isChecked:t})}})}}]),t}(i.Component),Gt=Object(x.compose)(Object(u.withSelect)(function(e){return{isChecked:e("core/editor").isPublishSidebarEnabled()}}),Object(u.withDispatch)(function(e){var t=e("core/editor"),n=t.enablePublishSidebar,o=t.disablePublishSidebar;return{onChange:function(e){return e?n():o()}}}),Object(l.ifViewportMatches)("medium"))(Dt),Ft=Object(x.compose)(Object(u.withSelect)(function(e){return{isChecked:e("core/nux").areTipsEnabled()}}),Object(u.withDispatch)(function(e){var t=e("core/nux"),n=t.enableTips,o=t.disableTips;return{onChange:function(e){return e?n():o()}}}))(Lt),Rt=Object(x.compose)(Object(u.withSelect)(function(e,t){var n=t.panelName;return{isChecked:e("core/edit-post").isEditorPanelEnabled(n)}}),Object(u.withDispatch)(function(e,t){var n=t.panelName;return{onChange:function(){return e("core/edit-post").toggleEditorPanelEnabled(n)}}}))(Dt);var Ut=Object(x.compose)(Object(u.withSelect)(function(e){return{isModalActive:e("core/edit-post").isModalActive("edit-post/options"),metaBoxes:e("core/edit-post").getAllMetaBoxes()}}),Object(u.withDispatch)(function(e){return{closeModal:function(){return e("core/edit-post").closeModal()}}}))(function(e){var t=e.isModalActive,n=e.closeModal,o=e.metaBoxes,r=void 0===o?[]:o;return t?Object(i.createElement)(C.Modal,{className:"edit-post-options-modal",title:Object(i.createElement)("span",{className:"edit-post-options-modal__title"},Object(g.__)("Options")),closeLabel:Object(g.__)("Close"),onRequestClose:n},Object(i.createElement)(It,{title:Object(g.__)("General")},Object(i.createElement)(Gt,{label:Object(g.__)("Enable Pre-publish Checks")}),Object(i.createElement)(Ft,{label:Object(g.__)("Enable Tips")})),Object(i.createElement)(It,{title:Object(g.__)("Document Panels")},Object(i.createElement)(c.PostTaxonomies,{taxonomyWrapper:function(e,t){return Object(i.createElement)(Rt,{label:Object(h.get)(t,["labels","menu_name"]),panelName:"taxonomy-panel-".concat(t.slug)})}}),Object(i.createElement)(Rt,{label:Object(g.__)("Featured Image"),panelName:"featured-image"}),Object(i.createElement)(c.PostExcerptCheck,null,Object(i.createElement)(Rt,{label:Object(g.__)("Excerpt"),panelName:"post-excerpt"})),Object(i.createElement)(Rt,{label:Object(g.__)("Discussion"),panelName:"discussion-panel"}),Object(i.createElement)(c.PageAttributesCheck,null,Object(i.createElement)(Rt,{label:Object(g.__)("Page Attributes"),panelName:"page-attributes"}))),0!==r.length&&Object(i.createElement)(It,{title:Object(g.__)("Advanced Panels")},Object(h.map)(r,function(e){var t=e.title,n=e.id;return Object(i.createElement)(Rt,{key:n,label:t,panelName:"meta-box-".concat(n)})}))):null}),Vt=function(e){function t(){var e;return Object(b.a)(this,t),(e=Object(O.a)(this,Object(m.a)(t).apply(this,arguments))).bindContainerNode=e.bindContainerNode.bind(Object(j.a)(Object(j.a)(e))),e}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){this.form=document.querySelector(".metabox-location-"+this.props.location),this.form&&this.container.appendChild(this.form)}},{key:"componentWillUnmount",value:function(){this.form&&document.querySelector("#metaboxes").appendChild(this.form)}},{key:"bindContainerNode",value:function(e){this.container=e}},{key:"render",value:function(){var e=this.props,t=e.location,n=e.isSaving,o=He()("edit-post-meta-boxes-area","is-".concat(t),{"is-loading":n});return Object(i.createElement)("div",{className:o},n&&Object(i.createElement)(C.Spinner,null),Object(i.createElement)("div",{className:"edit-post-meta-boxes-area__container",ref:this.bindContainerNode}),Object(i.createElement)("div",{className:"edit-post-meta-boxes-area__clear"}))}}]),t}(i.Component),Wt=Object(u.withSelect)(function(e){return{isSaving:e("core/edit-post").isSavingMetaBoxes()}})(Vt),Ht=function(e){function t(){return Object(b.a)(this,t),Object(O.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){this.updateDOM()}},{key:"componentDidUpdate",value:function(e){this.props.isVisible!==e.isVisible&&this.updateDOM()}},{key:"updateDOM",value:function(){var e=this.props,t=e.id,n=e.isVisible,o=document.getElementById(t);o&&(o.style.display=n?"":"none")}},{key:"render",value:function(){return null}}]),t}(i.Component),qt=Object(u.withSelect)(function(e,t){var n=t.id;return{isVisible:e("core/edit-post").isEditorPanelEnabled("meta-box-".concat(n))}})(Ht);var Xt=Object(u.withSelect)(function(e,t){var n=t.location,o=e("core/edit-post"),r=o.isMetaBoxLocationVisible;return{metaBoxes:(0,o.getMetaBoxesPerLocation)(n),isVisible:r(n)}})(function(e){var t=e.location,n=e.isVisible,o=e.metaBoxes;return Object(i.createElement)(i.Fragment,null,Object(h.map)(o,function(e){var t=e.id;return Object(i.createElement)(qt,{key:t,id:t})}),n&&Object(i.createElement)(Wt,{location:t}))}),Kt=Object(C.createSlotFill)("Sidebar"),Qt=Kt.Fill,zt=Kt.Slot,Jt=Object(x.compose)(Object(u.withSelect)(function(e,t){var n=t.name;return{isActive:e("core/edit-post").getActiveGeneralSidebarName()===n}}),Object(x.ifCondition)(function(e){return e.isActive}),C.withFocusReturn)(function(e){var t=e.children,n=e.label;return Object(i.createElement)(Qt,null,Object(i.createElement)("div",{className:"edit-post-sidebar",role:"region","aria-label":n,tabIndex:"-1"},t))});Jt.Slot=zt;var Yt=Jt,$t=Object(x.compose)(Object(u.withSelect)(function(e){return{title:e("core/editor").getEditedPostAttribute("title")}}),Object(u.withDispatch)(function(e){return{closeSidebar:e("core/edit-post").closeGeneralSidebar}}))(function(e){var t=e.children,n=e.className,o=e.closeLabel,r=e.closeSidebar,c=e.title;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"components-panel__header edit-post-sidebar-header__small"},Object(i.createElement)("span",{className:"edit-post-sidebar-header__title"},c||Object(g.__)("(no title)")),Object(i.createElement)(C.IconButton,{onClick:r,icon:"no-alt",label:o})),Object(i.createElement)("div",{className:He()("components-panel__header edit-post-sidebar-header",n)},t,Object(i.createElement)(C.IconButton,{onClick:r,icon:"no-alt",label:o,shortcut:Qe.toggleSidebar})))}),Zt=Object(x.compose)(Object(u.withSelect)(function(e){return{count:e("core/editor").getSelectedBlockCount()}}),Object(u.withDispatch)(function(e){var t=e("core/edit-post").openGeneralSidebar,n=e("core/editor").clearSelectedBlock;return{openDocumentSettings:function(){t("edit-post/document"),n()},openBlockSettings:function(){t("edit-post/block")}}}))(function(e){var t=e.count,n=e.openDocumentSettings,o=e.openBlockSettings,r=e.sidebarName,c=0===t?1:t,a=1===c?Object(g.__)("Block"):Object(g.sprintf)(Object(g._n)("%d Block","%d Blocks",c),c),l="edit-post/document"===r?[Object(g.__)("Document settings (selected)"),"is-active"]:[Object(g.__)("Document settings"),""],s=Object(J.a)(l,2),u=s[0],d=s[1],b="edit-post/block"===r?[Object(g.__)("Block settings (selected)"),"is-active"]:[Object(g.__)("Block settings"),""],p=Object(J.a)(b,2),O=p[0],m=p[1];return Object(i.createElement)($t,{className:"edit-post-sidebar__panel-tabs",closeLabel:Object(g.__)("Close settings")},Object(i.createElement)("ul",null,Object(i.createElement)("li",null,Object(i.createElement)("button",{onClick:n,className:"edit-post-sidebar__panel-tab ".concat(d),"aria-label":u,"data-label":Object(g.__)("Document")},Object(g.__)("Document"))),Object(i.createElement)("li",null,Object(i.createElement)("button",{onClick:o,className:"edit-post-sidebar__panel-tab ".concat(m),"aria-label":O,"data-label":a},a))))});var en=function(){return Object(i.createElement)(c.PostVisibilityCheck,{render:function(e){var t=e.canEdit;return Object(i.createElement)(C.PanelRow,{className:"edit-post-post-visibility"},Object(i.createElement)("span",null,Object(g.__)("Visibility")),!t&&Object(i.createElement)("span",null,Object(i.createElement)(c.PostVisibilityLabel,null)),t&&Object(i.createElement)(C.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-visibility__dialog",renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(i.createElement)(C.Button,{type:"button","aria-expanded":t,className:"edit-post-post-visibility__toggle",onClick:n,isLink:!0},Object(i.createElement)(c.PostVisibilityLabel,null))},renderContent:function(){return Object(i.createElement)(c.PostVisibility,null)}}))}})};function tn(){return Object(i.createElement)(c.PostTrashCheck,null,Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostTrash,null)))}var nn=Object(x.withInstanceId)(function(e){var t=e.instanceId;return Object(i.createElement)(c.PostScheduleCheck,null,Object(i.createElement)(C.PanelRow,{className:"edit-post-post-schedule"},Object(i.createElement)("label",{htmlFor:"edit-post-post-schedule__toggle-".concat(t),id:"edit-post-post-schedule__heading-".concat(t)},Object(g.__)("Publish")),Object(i.createElement)(C.Dropdown,{position:"bottom left",contentClassName:"edit-post-post-schedule__dialog",renderToggle:function(e){var n=e.onToggle,o=e.isOpen;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("label",{className:"edit-post-post-schedule__label",htmlFor:"edit-post-post-schedule__toggle-".concat(t)},Object(i.createElement)(c.PostScheduleLabel,null)," ",Object(g.__)("Click to change")),Object(i.createElement)(C.Button,{id:"edit-post-post-schedule__toggle-".concat(t),type:"button",className:"edit-post-post-schedule__toggle",onClick:n,"aria-expanded":o,"aria-live":"polite",isLink:!0},Object(i.createElement)(c.PostScheduleLabel,null)))},renderContent:function(){return Object(i.createElement)(c.PostSchedule,null)}})))});var on=function(){return Object(i.createElement)(c.PostStickyCheck,null,Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostSticky,null)))};var rn=function(){return Object(i.createElement)(c.PostAuthorCheck,null,Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostAuthor,null)))};var cn=function(){return Object(i.createElement)(c.PostFormatCheck,null,Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostFormat,null)))};var an=function(){return Object(i.createElement)(c.PostPendingStatusCheck,null,Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostPendingStatus,null)))},ln=Object(C.createSlotFill)("PluginPostStatusInfo"),sn=ln.Fill,un=ln.Slot,dn=function(e){var t=e.children,n=e.className;return Object(i.createElement)(sn,null,Object(i.createElement)(C.PanelRow,{className:n},t))};dn.Slot=un;var bn=dn;var pn=Object(x.compose)([Object(u.withSelect)(function(e){return{isOpened:e("core/edit-post").isEditorPanelOpened("post-status")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleEditorPanelOpened("post-status")}}})])(function(e){var t=e.isOpened,n=e.onTogglePanel;return Object(i.createElement)(C.PanelBody,{className:"edit-post-post-status",title:Object(g.__)("Status & Visibility"),opened:t,onToggle:n},Object(i.createElement)(bn.Slot,null,function(e){return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(en,null),Object(i.createElement)(nn,null),Object(i.createElement)(cn,null),Object(i.createElement)(on,null),Object(i.createElement)(an,null),Object(i.createElement)(rn,null),e,Object(i.createElement)(tn,null))}))});var On=function(){return Object(i.createElement)(c.PostLastRevisionCheck,null,Object(i.createElement)(C.PanelBody,{className:"edit-post-last-revision__panel"},Object(i.createElement)(c.PostLastRevision,null)))};var mn=Object(x.compose)(Object(u.withSelect)(function(e,t){var n=Object(h.get)(t.taxonomy,["slug"]),o=n?"taxonomy-panel-".concat(n):"";return{panelName:o,isEnabled:!!n&&e("core/edit-post").isEditorPanelEnabled(o),isOpened:!!n&&e("core/edit-post").isEditorPanelOpened(o)}}),Object(u.withDispatch)(function(e,t){return{onTogglePanel:function(){e("core/edit-post").toggleEditorPanelOpened(t.panelName)}}}))(function(e){var t=e.isEnabled,n=e.taxonomy,o=e.isOpened,r=e.onTogglePanel,c=e.children;if(!t)return null;var a=Object(h.get)(n,["labels","menu_name"]);return a?Object(i.createElement)(C.PanelBody,{title:a,opened:o,onToggle:r},c):null});var fn=function(){return Object(i.createElement)(c.PostTaxonomiesCheck,null,Object(i.createElement)(c.PostTaxonomies,{taxonomyWrapper:function(e,t){return Object(i.createElement)(mn,{taxonomy:t},e)}}))};var jn=Object(u.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core").getPostType,o=e("core/edit-post"),r=o.isEditorPanelEnabled,i=o.isEditorPanelOpened;return{postType:n(t("type")),isEnabled:r("featured-image"),isOpened:i("featured-image")}}),hn=Object(u.withDispatch)(function(e){var t=e("core/edit-post").toggleEditorPanelOpened;return{onTogglePanel:Object(h.partial)(t,"featured-image")}}),gn=Object(x.compose)(jn,hn)(function(e){var t=e.isEnabled,n=e.isOpened,o=e.postType,r=e.onTogglePanel;return t?Object(i.createElement)(c.PostFeaturedImageCheck,null,Object(i.createElement)(C.PanelBody,{title:Object(h.get)(o,["labels","featured_image"],Object(g.__)("Featured Image")),opened:n,onToggle:r},Object(i.createElement)(c.PostFeaturedImage,null))):null});var En=Object(x.compose)([Object(u.withSelect)(function(e){return{isEnabled:e("core/edit-post").isEditorPanelEnabled("post-excerpt"),isOpened:e("core/edit-post").isEditorPanelOpened("post-excerpt")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleEditorPanelOpened("post-excerpt")}}})])(function(e){var t=e.isEnabled,n=e.isOpened,o=e.onTogglePanel;return t?Object(i.createElement)(c.PostExcerptCheck,null,Object(i.createElement)(C.PanelBody,{title:Object(g.__)("Excerpt"),opened:n,onToggle:o},Object(i.createElement)(c.PostExcerpt,null))):null});var vn=Object(x.compose)([Object(u.withSelect)(function(e){return{isEnabled:e("core/edit-post").isEditorPanelEnabled("discussion-panel"),isOpened:e("core/edit-post").isEditorPanelOpened("discussion-panel")}}),Object(u.withDispatch)(function(e){return{onTogglePanel:function(){return e("core/edit-post").toggleEditorPanelOpened("discussion-panel")}}})])(function(e){var t=e.isEnabled,n=e.isOpened,o=e.onTogglePanel;return t?Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:["comments","trackbacks"]},Object(i.createElement)(C.PanelBody,{title:Object(g.__)("Discussion"),opened:n,onToggle:o},Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:"comments"},Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostComments,null))),Object(i.createElement)(c.PostTypeSupportCheck,{supportKeys:"trackbacks"},Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PostPingbacks,null))))):null});var _n=Object(u.withSelect)(function(e){var t=e("core/editor").getEditedPostAttribute,n=e("core/edit-post"),o=n.isEditorPanelEnabled,r=n.isEditorPanelOpened,i=e("core").getPostType;return{isEnabled:o("page-attributes"),isOpened:r("page-attributes"),postType:i(t("type"))}}),yn=Object(u.withDispatch)(function(e){var t=e("core/edit-post").toggleEditorPanelOpened;return{onTogglePanel:Object(h.partial)(t,"page-attributes")}}),Sn=Object(x.compose)(_n,yn)(function(e){var t=e.isEnabled,n=e.isOpened,o=e.onTogglePanel,r=e.postType;return t&&r?Object(i.createElement)(c.PageAttributesCheck,null,Object(i.createElement)(C.PanelBody,{title:Object(h.get)(r,["labels","attributes"],Object(g.__)("Page Attributes")),opened:n,onToggle:o},Object(i.createElement)(c.PageTemplate,null),Object(i.createElement)(c.PageAttributesParent,null),Object(i.createElement)(C.PanelRow,null,Object(i.createElement)(c.PageAttributesOrder,null)))):null}),Pn=Object(x.compose)(Object(u.withSelect)(function(e){var t=e("core/edit-post"),n=t.getActiveGeneralSidebarName;return{isEditorSidebarOpened:(0,t.isEditorSidebarOpened)(),sidebarName:n()}}),Object(x.ifCondition)(function(e){return e.isEditorSidebarOpened}))(function(e){var t=e.sidebarName;return Object(i.createElement)(Yt,{name:t,label:Object(g.__)("Editor settings")},Object(i.createElement)(Zt,{sidebarName:t}),Object(i.createElement)(C.Panel,null,"edit-post/document"===t&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(pn,null),Object(i.createElement)(On,null),Object(i.createElement)(fn,null),Object(i.createElement)(gn,null),Object(i.createElement)(En,null),Object(i.createElement)(vn,null),Object(i.createElement)(Sn,null),Object(i.createElement)(Xt,{location:"side"})),"edit-post/block"===t&&Object(i.createElement)(C.PanelBody,{className:"edit-post-settings-sidebar__panel-block"},Object(i.createElement)(c.BlockInspector,null))))}),kn=Object(C.createSlotFill)("PluginPostPublishPanel"),wn=kn.Fill,Cn=kn.Slot,xn=function(e){var t=e.children,n=e.className,o=e.title,r=e.initialOpen,c=void 0!==r&&r;return Object(i.createElement)(wn,null,Object(i.createElement)(C.PanelBody,{className:n,initialOpen:c||!o,title:o},t))};xn.Slot=Cn;var Mn=xn,Tn=Object(C.createSlotFill)("PluginPrePublishPanel"),An=Tn.Fill,Bn=Tn.Slot,Nn=function(e){var t=e.children,n=e.className,o=e.title,r=e.initialOpen,c=void 0!==r&&r;return Object(i.createElement)(An,null,Object(i.createElement)(C.PanelBody,{className:n,initialOpen:c||!o,title:o},t))};Nn.Slot=Bn;var In=Nn,Dn=function(e){function t(){return Object(b.a)(this,t),Object(O.a)(this,Object(m.a)(t).apply(this,arguments))}return Object(f.a)(t,e),Object(p.a)(t,[{key:"componentDidMount",value:function(){this.sync()}},{key:"componentDidUpdate",value:function(e){this.props.isActive!==e.isActive&&this.sync()}},{key:"sync",value:function(){this.props.isActive?document.body.classList.add("is-fullscreen-mode"):document.body.classList.remove("is-fullscreen-mode")}},{key:"render",value:function(){return null}}]),t}(i.Component),Ln=Object(u.withSelect)(function(e){return{isActive:e("core/edit-post").isFeatureActive("fullscreenMode")}})(Dn);var Gn=Object(x.compose)(Object(u.withSelect)(function(e){return{mode:e("core/edit-post").getEditorMode(),editorSidebarOpened:e("core/edit-post").isEditorSidebarOpened(),pluginSidebarOpened:e("core/edit-post").isPluginSidebarOpened(),publishSidebarOpened:e("core/edit-post").isPublishSidebarOpened(),hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),hasActiveMetaboxes:e("core/edit-post").hasMetaBoxes(),isSaving:e("core/edit-post").isSavingMetaBoxes()}}),Object(u.withDispatch)(function(e){var t=e("core/edit-post");return{closePublishSidebar:t.closePublishSidebar,togglePublishSidebar:t.togglePublishSidebar}}),C.navigateRegions,Object(l.withViewportMatch)({isMobileViewport:"< small"}))(function(e){var t=e.mode,n=e.editorSidebarOpened,o=e.pluginSidebarOpened,r=e.publishSidebarOpened,a=e.hasFixedToolbar,l=e.closePublishSidebar,s=e.togglePublishSidebar,u=e.hasActiveMetaboxes,d=e.isSaving,b=e.isMobileViewport,p=n||o||r,O=He()("edit-post-layout",{"is-sidebar-opened":p,"has-fixed-toolbar":a}),m={role:"region","aria-label":Object(g.__)("Editor publish"),tabIndex:-1};return Object(i.createElement)("div",{className:O},Object(i.createElement)(Ln,null),Object(i.createElement)(Ke,null),Object(i.createElement)(c.UnsavedChangesWarning,null),Object(i.createElement)(c.AutosaveMonitor,null),Object(i.createElement)(bt,null),Object(i.createElement)("div",{className:"edit-post-layout__content",role:"region","aria-label":Object(g.__)("Editor content"),tabIndex:"-1"},Object(i.createElement)(c.EditorNotices,null),Object(i.createElement)(c.PreserveScrollInReorder,null),Object(i.createElement)(vt,null),Object(i.createElement)(Nt,null),Object(i.createElement)(Ut,null),"text"===t&&Object(i.createElement)(pt,null),"visual"===t&&Object(i.createElement)(gt,null),Object(i.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(i.createElement)(Xt,{location:"normal"})),Object(i.createElement)("div",{className:"edit-post-layout__metaboxes"},Object(i.createElement)(Xt,{location:"advanced"}))),r?Object(i.createElement)(c.PostPublishPanel,Object(P.a)({},m,{onClose:l,forceIsDirty:u,forceIsSaving:d,PrePublishExtension:In.Slot,PostPublishExtension:Mn.Slot})):Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",Object(P.a)({className:"edit-post-toggle-publish-panel"},m),Object(i.createElement)(C.Button,{isDefault:!0,type:"button",className:"edit-post-toggle-publish-panel__button",onClick:s,"aria-expanded":!1},Object(g.__)("Open publish panel"))),Object(i.createElement)(Pn,null),Object(i.createElement)(Yt.Slot,null),b&&p&&Object(i.createElement)(C.ScrollLock,null)),Object(i.createElement)(C.Popover.Slot,null),Object(i.createElement)(A.PluginArea,null))});var Fn=Object(u.withSelect)(function(e,t){var n=t.postId,o=t.postType;return{hasFixedToolbar:e("core/edit-post").isFeatureActive("fixedToolbar"),focusMode:e("core/edit-post").isFeatureActive("focusMode"),post:e("core").getEntityRecord("postType",o,n)}})(function(e){var t=e.settings,n=e.hasFixedToolbar,o=e.focusMode,r=e.post,a=e.overridePost,l=e.onError,s=Object(k.a)(e,["settings","hasFixedToolbar","focusMode","post","overridePost","onError"]);if(!r)return null;var u=Object(U.a)({},t,{hasFixedToolbar:n,focusMode:o});return Object(i.createElement)(i.StrictMode,null,Object(i.createElement)(c.EditorProvider,Object(P.a)({settings:u,post:Object(U.a)({},r,a)},s),Object(i.createElement)(c.ErrorBoundary,{onError:l},Object(i.createElement)(Gn,null)),Object(i.createElement)(c.PostLockedModal,null)))}),Rn=function(e,t){return!Array.isArray(t)||(n=e,o=t,0===Object(h.difference)(n,o).length);var n,o},Un=function(e){var t=e.allowedBlocks,n=e.icon,o=e.label,r=e.onClick,c=e.small,a=e.role;return Object(i.createElement)(ht,null,function(e){var l=e.selectedBlocks,s=e.onClose;return Rn(l,t)?Object(i.createElement)(C.IconButton,{className:"editor-block-settings-menu__control",onClick:Object(x.compose)(r,s),icon:n||"admin-plugins",label:c?o:void 0,role:a},!c&&o):null})};var Vn=Object(x.compose)(Object(A.withPluginContext)(function(e,t){return{icon:t.icon||e.icon,sidebarName:"".concat(e.name,"/").concat(t.name)}}),Object(u.withSelect)(function(e,t){var n=t.sidebarName,o=e("core/edit-post"),r=o.getActiveGeneralSidebarName,i=o.isPluginItemPinned;return{isActive:r()===n,isPinned:i(n)}}),Object(u.withDispatch)(function(e,t){var n=t.isActive,o=t.sidebarName,r=e("core/edit-post"),i=r.closeGeneralSidebar,c=r.openGeneralSidebar,a=r.togglePinnedPluginItem;return{togglePin:function(){a(o)},toggleSidebar:function(){n?i():c(o)}}}))(function(e){var t=e.children,n=e.icon,o=e.isActive,r=e.isPinnable,c=void 0===r||r,a=e.isPinned,l=e.sidebarName,s=e.title,u=e.togglePin,d=e.toggleSidebar;return Object(i.createElement)(i.Fragment,null,c&&Object(i.createElement)(ut,null,a&&Object(i.createElement)(C.IconButton,{icon:n,label:s,onClick:d,isToggled:o,"aria-expanded":o})),Object(i.createElement)(Yt,{name:l,label:Object(g.__)("Editor plugins")},Object(i.createElement)($t,{closeLabel:Object(g.__)("Close plugin")},Object(i.createElement)("strong",null,s),c&&Object(i.createElement)(C.IconButton,{icon:a?"star-filled":"star-empty",label:a?Object(g.__)("Unpin from toolbar"):Object(g.__)("Pin to toolbar"),onClick:u,isToggled:a,"aria-expanded":a})),Object(i.createElement)(C.Panel,null,t)))}),Wn=Object(x.compose)(Object(A.withPluginContext)(function(e,t){return{icon:t.icon||e.icon,sidebarName:"".concat(e.name,"/").concat(t.target)}}),Object(u.withSelect)(function(e,t){var n=t.sidebarName;return{isSelected:(0,e("core/edit-post").getActiveGeneralSidebarName)()===n}}),Object(u.withDispatch)(function(e,t){var n=t.isSelected,o=t.sidebarName,r=e("core/edit-post"),i=r.closeGeneralSidebar,c=r.openGeneralSidebar;return{onClick:n?i:function(){return c(o)}}}))(function(e){var t=e.children,n=e.icon,o=e.isSelected,r=e.onClick;return Object(i.createElement)(et,null,function(e){return Object(i.createElement)(C.MenuItem,{icon:o?"yes":n,isSelected:o,role:"menuitemcheckbox",onClick:Object(x.compose)(r,e.onClose)},t)})});function Hn(e,t,n,o,r){Object(i.unmountComponentAtNode)(n);var c=Hn.bind(null,e,t,n,o,r);Object(i.render)(Object(i.createElement)(Fn,{settings:o,onError:c,postId:t,postType:e,overridePost:r,recovery:!0}),n)}function qn(e,t,n,o,r){var c=document.getElementById(e),a=Hn.bind(null,t,n,c,o,r);Object(s.registerCoreBlocks)(),Object(u.dispatch)("core/nux").triggerGuide(["core/editor.inserter","core/editor.settings","core/editor.preview","core/editor.publish"]),Object(i.render)(Object(i.createElement)(Fn,{settings:o,onError:a,postId:n,postType:t,overridePost:r}),c)}n.d(t,"reinitializeEditor",function(){return Hn}),n.d(t,"initializeEditor",function(){return qn}),n.d(t,"PluginBlockSettingsMenuItem",function(){return Un}),n.d(t,"PluginPostPublishPanel",function(){return Mn}),n.d(t,"PluginPostStatusInfo",function(){return bn}),n.d(t,"PluginPrePublishPanel",function(){return In}),n.d(t,"PluginSidebar",function(){return Vn}),n.d(t,"PluginSidebarMoreMenuItem",function(){return Wn})},31:function(e,t,n){"use strict";function o(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}n.d(t,"a",function(){return o})},32:function(e,t){!function(){e.exports=this.wp.apiFetch}()},33:function(e,t,n){"use strict";var o,r;function i(e){return[e]}function c(){var e={clear:function(){e.head=null}};return e}function a(e,t,n){var o;if(e.length!==t.length)return!1;for(o=n;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}o={},r="undefined"!=typeof WeakMap,t.a=function(e,t){var n,l;function s(){n=r?new WeakMap:c()}function u(){var n,o,r,i,c,s=arguments.length;for(i=new Array(s),r=0;r<s;r++)i[r]=arguments[r];for(c=t.apply(null,i),(n=l(c)).isUniqueByDependants||(n.lastDependants&&!a(c,n.lastDependants,0)&&n.clear(),n.lastDependants=c),o=n.head;o;){if(a(o.args,i,1))return o!==n.head&&(o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=n.head,o.prev=null,n.head.prev=o,n.head=o),o.val;o=o.next}return o={val:e.apply(null,i)},i[0]=null,o.args=i,n.head&&(n.head.prev=o,o.next=n.head),n.head=o,o.val}return t||(t=i),l=r?function(e){var t,r,i,a,l,s=n,u=!0;for(t=0;t<e.length;t++){if(r=e[t],!(l=r)||"object"!=typeof l){u=!1;break}s.has(r)?s=s.get(r):(i=new WeakMap,s.set(r,i),s=i)}return s.has(o)||((a=c()).isUniqueByDependants=u,s.set(o,a)),s.get(o)}:function(){return n},u.getDependants=t,u.clear=s,s(),u}},35:function(e,t,n){"use strict";function o(e){if(Array.isArray(e))return e}n.d(t,"a",function(){return o})},36:function(e,t,n){"use strict";function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}n.d(t,"a",function(){return o})},37:function(e,t){!function(){e.exports=this.wp.deprecated}()},38:function(e,t){!function(){e.exports=this.wp.viewport}()},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t){!function(){e.exports=this.wp.a11y}()},5:function(e,t){!function(){e.exports=this.wp.data}()},53:function(e,t){!function(){e.exports=this.wp.nux}()},6:function(e,t){!function(){e.exports=this.wp.compose}()},61:function(e,t){!function(){e.exports=this.wp.plugins}()},7:function(e,t){!function(){e.exports=this.wp.editor}()},77:function(e,t){!function(){e.exports=this.wp.coreData}()},8:function(e,t,n){"use strict";n.d(t,"a",function(){return r});var o=n(15);function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){Object(o.a)(e,t,n[t])})}return e}},85:function(e,t,n){"use strict";e.exports=function(e){var t,n={};return function e(t,n){var o;if(Array.isArray(n))for(o=0;o<n.length;o++)e(t,n[o]);else for(o in n)t[o]=(t[o]||[]).concat(n[o])}(n,e),(t=function(e){return function(t){return function(o){var r,i,c=n[o.type],a=t(o);if(c)for(r=0;r<c.length;r++)(i=c[r](o,e))&&e.dispatch(i);return a}}}).effects=n,t}},9:function(e,t){!function(){e.exports=this.wp.blocks}()}});