WordPress/wp-includes/js/dist/editor.js.map

1 line
1.4 MiB
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.

{"version":3,"sources":["webpack://wp.[name]/webpack/bootstrap","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/inherits.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectSpread.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/slicedToArray.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://wp.[name]/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/alignment-toolbar/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/autocomplete/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/autocompleters/block.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/autocompleters/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/autocompleters/user.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/autosave-monitor/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-actions/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-alignment-toolbar/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-compare/block-view.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-compare/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-controls/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-draggable/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-drop-zone/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-edit/context.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-edit/edit.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-edit/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-format-controls/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-icon/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-inspector/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list-appender/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-contextual-toolbar.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-crash-boundary.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-crash-warning.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-html.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-invalid-warning.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block-mobile-toolbar.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/block.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/breadcrumb.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/hover-area.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/insertion-point.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-list/multi-controls.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-mover/drag-handle.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-mover/icons.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-mover/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-mover/mover-description.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-navigation/dropdown.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-navigation/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-preview/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-selection-clearer/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-convert-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-html-convert-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-mode-toggle.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-settings-menu-first-item.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-settings-menu-plugins-extension.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/block-unknown-convert-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/reusable-block-convert-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-settings-menu/reusable-block-delete-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-styles/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-switcher/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-switcher/multi-blocks-switcher.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-title/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-toolbar/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/block-types-list/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/color-palette/control.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/color-palette/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/color-palette/with-color-context.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/colors/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/colors/utils.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/colors/with-colors.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/contrast-checker/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/copy-handler/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/default-block-appender/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/document-outline/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/document-outline/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/document-outline/item.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/editor-global-keyboard-shortcuts/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/editor-history/redo.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/editor-history/undo.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/editor-notices/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/error-boundary/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/font-sizes/font-size-picker.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/font-sizes/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/font-sizes/utils.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/font-sizes/with-font-sizes.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/ignore-nested-events/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inner-blocks/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter-list-item/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter-with-shortcuts/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter/child-blocks.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter/inline-elements.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inserter/menu.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inspector-advanced-controls/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/inspector-controls/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/media-placeholder/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/media-upload/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/media-upload/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/multi-select-scroll-into-view/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/multi-selection-inspector/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/navigable-toolbar/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/observe-typing/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/page-attributes/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/page-attributes/order.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/page-attributes/parent.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/page-attributes/template.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/panel-color-settings/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/plain-text/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-author/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-author/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-comments/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-excerpt/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-excerpt/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-featured-image/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-featured-image/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-format/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-format/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-last-revision/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-last-revision/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-locked-modal/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-pending-status/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-pending-status/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-permalink/editor.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-permalink/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-pingbacks/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-preview-button/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-button/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-button/label.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-panel/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-panel/maybe-post-format-panel.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-panel/maybe-tags-panel.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-panel/postpublish.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-publish-panel/prepublish.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-saved-state/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-schedule/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-schedule/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-schedule/label.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-sticky/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-sticky/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-switch-to-draft-button/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-taxonomies/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-taxonomies/flat-term-selector.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-taxonomies/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-text-editor/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-title/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-trash/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-trash/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-type-support-check/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-visibility/check.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-visibility/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-visibility/label.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/post-visibility/utils.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/preserve-scroll-in-reorder/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/provider/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/aria.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/format-edit.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/format-toolbar/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/inserter-list-item.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/list-edit.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/patterns.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/remove-browser-shortcuts.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/shortcut.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/tinymce.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/rich-text/toolbar-button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/server-side-render/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/skip-to-selected-block/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/table-of-contents/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/table-of-contents/panel.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/template-validation-notice/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/theme-support-check/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/unsaved-changes-warning/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/url-input/button.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/url-input/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/url-popover/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/warning/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/word-count/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/components/writing-flow/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/parse.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/stringify/compiler.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/stringify/compress.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/stringify/identity.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/ast/stringify/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/transforms/url-rewrite.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/transforms/wrap.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/editor-styles/traverse.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/align.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/anchor.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/custom-class-name.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/default-autocompleters.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/generated-class-name.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/hooks/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/actions.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/array.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/defaults.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/effects.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/effects/posts.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/effects/reusable-blocks.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/effects/utils.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/middlewares.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/reducer.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/store/selectors.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/dom.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/media-upload/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/media-upload/media-upload.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/terms.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/url.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/with-change-detection/index.js","webpack://wp.[name]//Users/gziolo/PhpstormProjects/gutenberg/packages/editor/src/utils/with-history/index.js","webpack://wp.[name]/./node_modules/autosize/dist/autosize.js","webpack://wp.[name]/./node_modules/classnames/index.js","webpack://wp.[name]/./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack://wp.[name]/../../src/convert/xml.js","webpack://wp.[name]/./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack://wp.[name]/./node_modules/dom-scroll-into-view/lib/index.js","webpack://wp.[name]/./node_modules/dom-scroll-into-view/lib/util.js","webpack://wp.[name]/./node_modules/inherits/inherits_browser.js","webpack://wp.[name]/./node_modules/line-height/lib/line-height.js","webpack://wp.[name]/./node_modules/memize/index.js","webpack://wp.[name]/./node_modules/object-assign/index.js","webpack://wp.[name]/./node_modules/prop-types/checkPropTypes.js","webpack://wp.[name]/./node_modules/prop-types/factoryWithTypeCheckers.js","webpack://wp.[name]/./node_modules/prop-types/index.js","webpack://wp.[name]/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://wp.[name]/./node_modules/punycode/punycode.js","webpack://wp.[name]/./node_modules/querystring-es3/decode.js","webpack://wp.[name]/./node_modules/querystring-es3/encode.js","webpack://wp.[name]/./node_modules/querystring-es3/index.js","webpack://wp.[name]/./node_modules/react-autosize-textarea/lib/TextareaAutosize.js","webpack://wp.[name]/./node_modules/react-autosize-textarea/lib/index.js","webpack://wp.[name]/./node_modules/redux-multi/lib/index.js","webpack://wp.[name]/./node_modules/redux-optimist/index.js","webpack://wp.[name]/./node_modules/redux-optimist/lib/index.js","webpack://wp.[name]/./node_modules/refx/refx.js","webpack://wp.[name]/./node_modules/rememo/es/rememo.js","webpack://wp.[name]/./node_modules/tinycolor2/tinycolor.js","webpack://wp.[name]/./node_modules/traverse/index.js","webpack://wp.[name]/./node_modules/url/url.js","webpack://wp.[name]/./node_modules/url/util.js","webpack://wp.[name]/(webpack)/buildin/global.js","webpack://wp.[name]/(webpack)/buildin/module.js","webpack://wp.[name]/external {\"this\":[\"wp\",\"a11y\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"apiFetch\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"autop\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"blob\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"blocks\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"components\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"compose\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"coreData\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"data\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"date\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"deprecated\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"dom\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"element\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"hooks\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"htmlEntities\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"i18n\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"isShallowEqual\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"keycodes\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"notices\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"nux\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"richText\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"tokenList\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"url\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"viewport\"]}","webpack://wp.[name]/external {\"this\":[\"wp\",\"wordcount\"]}","webpack://wp.[name]/external \"jQuery\"","webpack://wp.[name]/external \"lodash\"","webpack://wp.[name]/external \"React\"","webpack://wp.[name]/external \"tinymce\""],"names":["DEFAULT_ALIGNMENT_CONTROLS","icon","title","__","align","AlignmentToolbar","isCollapsed","value","onChange","alignmentControls","applyOrUnset","undefined","activeAlignment","find","control","map","isActive","onClick","compose","withBlockEditContext","clientId","withViewportMatch","isLargeViewport","withSelect","select","getBlockRootClientId","getEditorSettings","hasFixedToolbar","completersFallback","withFilteredAutocompleters","Autocomplete","state","completers","saveParentRef","bind","onFocus","hasFocus","parentNode","contains","document","activeElement","hasStaleCompleters","updateCompletersState","lastFilteredCompletersProp","props","blockName","nextCompleters","hasFilter","applyFilters","clone","setState","autocompleteProps","Component","name","OriginalAutocomplete","defaultGetBlockInsertionParentClientId","getBlockInsertionPoint","rootClientId","defaultGetInserterItems","getInserterItems","defaultGetSelectedBlockName","getSelectedBlockClientId","getBlockName","selectedBlockClientId","createBlockCompleter","getBlockInsertionParentClientId","getSelectedBlockName","className","triggerPrefix","options","selectedBlockName","filter","inserterItem","getOptionKeywords","keywords","getOptionLabel","allowContext","before","after","test","getOptionCompletion","initialAttributes","action","createBlock","isOptionDisabled","isDisabled","search","payload","encodeURIComponent","apiFetch","path","isDebounced","user","slug","avatar_urls","AutosaveMonitor","prevProps","isDirty","editsReference","isAutosaveable","toggleTimer","isPendingSave","clearTimeout","pendingSave","autosaveInterval","setTimeout","autosave","isEditedPostDirty","isEditedPostAutosaveable","getReferenceByDistinctEdits","withDispatch","dispatch","BlockActions","onDuplicate","onRemove","onInsertBefore","onInsertAfter","isLocked","canDuplicate","children","getBlocksByClientId","getBlockIndex","getTemplateLock","blocks","clientIds","every","block","hasBlockSupport","firstSelectedIndex","first","castArray","lastSelectedIndex","last","extraProps","insertBlocks","multiSelect","removeBlocks","insertDefaultBlock","clonedBlocks","cloneBlock","length","BLOCK_ALIGNMENTS_CONTROLS","left","center","right","wide","full","DEFAULT_CONTROLS","WIDE_CONTROLS","BlockAlignmentToolbar","controls","wideControlsEnabled","enabledControls","indexOf","alignWide","BlockView","rawContent","renderedContent","actionText","BlockCompare","originalContent","newContent","difference","diffChars","item","pos","classes","classnames","added","removed","getSaveElement","attributes","newBlocks","getSaveContent","innerBlocks","join","onKeep","onConvert","convertor","convertButtonText","original","getOriginalContent","converted","getConvertedContent","getDifference","createSlotFill","Fill","Slot","BlockControlsFill","BlockControls","ifBlockEditSelected","BlockDraggable","blockElementId","index","onDragStart","onDragEnd","transferData","type","srcIndex","srcRootClientId","srcClientId","onDraggableStart","onDraggableEnd","parseDropEvent","event","result","dataTransfer","Object","assign","JSON","parse","getData","err","BlockDropZone","arguments","onFilesDrop","onHTMLDrop","onDrop","position","y","files","transformation","findTransform","getBlockTransforms","transform","isMatch","insertIndex","getInsertIndex","updateBlockAttributes","HTML","pasteHandler","mode","dstRootClientId","dstClientId","dstIndex","getClientIdsOfDescendants","isBlockDropType","dropType","isSameLevel","srcRoot","dstRoot","isSameBlock","src","dst","isSrcBlockAnAncestorOfDstBlock","some","id","positionIndex","moveBlockToPosition","isAppender","ownProps","withFilters","createContext","isSelected","focusedElement","setFocusedElement","noop","Consumer","Provider","mapContextToProps","createHigherOrderComponent","OriginalComponent","context","Edit","blockType","getBlockType","generatedClassName","getBlockDefaultClassName","edit","save","BlockEdit","prevState","BlockFormatControls","BlockIcon","showColors","get","renderedIcon","style","backgroundColor","background","color","foreground","BlockInspector","count","hasBlockStyles","isSelectedBlockUnregistered","getUnregisteredTypeHandlerName","description","fills","isEmpty","getSelectedBlockCount","getBlockStyles","blockStyles","BlockListAppender","blockClientIds","canInsertDefaultBlock","onToggle","disabled","isOpen","getBlockOrder","canInsertBlockType","getDefaultBlockName","BlockContextualToolbar","focusOnMount","BlockCrashBoundary","hasError","error","onError","warning","BlockHTML","onBlur","html","isValid","getBlockContent","isEqual","getBlockAttributes","content","isValidBlockContent","target","getBlock","updateBlock","BlockInvalidWarning","compare","onCompare","onCompareClose","convertToHTML","convertToBlocks","convertToClassic","hasHTMLBlock","hiddenActions","blockToBlocks","_x","blockToClassic","blockToHTML","rawHandler","replaceBlock","BlockMobileToolbar","ifViewportMatches","BlockListBlock","setBlockListRef","bindBlockNode","setAttributes","maybeHover","forceFocusedContextualToolbar","hideHoverEffects","mergeBlocks","insertBlocksAfter","preventDrag","onPointerDown","deleteOrInsertAfterWrapper","onBlockError","onTouchStart","selectOnOpen","onShiftSelection","hadTouchStart","dragging","isHovered","isForcingContextualToolbar","focusTabbable","isTypingWithinBlock","isFirstMultiSelected","wrapperNode","focus","node","blockRef","forceUpdate","ignoreInnerBlocks","initialPosition","textInputs","tabbable","isTextField","isInsideRootBlock","isReverse","placeCaretAtHorizontalEdge","placeCaretAtVerticalEdge","metaAttributes","reduce","key","meta","size","onMetaChange","isPartOfMultiSelection","isMultiSelecting","forward","previousBlockClientId","nextBlockClientId","onMerge","onInsertBlocks","order","onSelect","preventDefault","button","shiftKey","onSelectionStart","keyCode","ENTER","onInsertDefaultBlockAfter","BACKSPACE","DELETE","open","isSelectionEnabled","getBlockSelectionStart","onMultiSelect","hoverArea","isFocusMode","isFirst","isLast","isCaretWithinFormattedText","isEmptyDefaultBlock","isMovable","isPreviousBlockADefaultEmptyBlock","isParentOfSelectedBlock","isDraggable","blockLabel","sprintf","isUnregisteredBlock","showEmptyBlockSideInserter","showSideInserter","shouldAppearSelected","shouldAppearHovered","shouldRenderMovers","shouldShowBreadcrumb","shouldShowContextualToolbar","shouldShowMobileToolbar","shouldShowInsertionPoint","canShowInBetweenInserter","wrapperClassName","isReusableBlock","onReplace","wrapperProps","getEditWrapperProps","blockEdit","toggleSelection","display","applyWithSelect","isBlockSelected","getPreviousBlockClientId","getNextBlockClientId","isAncestorMultiSelected","isBlockMultiSelected","isFirstMultiSelectedBlock","isTyping","getBlockMode","getSelectedBlocksInitialCaretPosition","hasSelectedInnerBlock","focusMode","previousBlock","templateLock","isUnmodifiedDefaultBlock","applyWithDispatch","selectBlock","removeBlock","replaceBlocks","editPost","selectionEnabled","BlockBreadcrumb","isFocused","stopPropagation","HoverArea","onMouseLeave","onMouseMove","container","toggleListeners","shouldListnerToEvents","method","isRTL","getBoundingClientRect","width","clientX","BlockList","onSelectionEnd","setBlockRef","setLastClientY","onPointerMove","throttle","onScroll","clientY","lastClientY","nodes","window","addEventListener","removeEventListener","onStartMultiSelect","blockContentBoundaries","getBlockDOMNode","selectionAtStart","top","bottom","findLast","coordMapKeys","coordY","onSelectionChange","coordMap","boundaries","clientIdToCoordMap","mapValues","invert","sortBy","values","selectionStart","selectionEnd","isAtStart","cancel","onStopMultiSelect","blockIndex","getMultiSelectedBlocksStartClientId","getMultiSelectedBlocksEndClientId","startMultiSelect","stopMultiSelect","BlockInsertionPoint","isInserterFocused","onBlurInserter","onFocusInserter","showInsertionPoint","canShowInserter","isBlockInsertionPointVisible","insertionPoint","BlockListMultiControls","multiSelectedBlockClientIds","isSelecting","getMultiSelectedBlockClientIds","getBlockCount","firstIndex","lastIndex","IconDragHandle","isVisible","dragHandleClassNames","upArrow","downArrow","dragHandle","BlockMover","onMoveUp","onMoveDown","instanceId","isHidden","blocksCount","getBlockMoverDescription","firstClientId","moveBlocksDown","moveBlocksUp","partial","withInstanceId","selectedCount","dir","getMultiBlockMoverDescription","_n","MenuIcon","BlockNavigationDropdown","rawShortcut","access","displayShortcut","onClose","BlockNavigationList","showNestedBlocks","BlockNavigation","rootBlock","rootBlocks","hasHierarchy","getBlockHierarchyRootClientId","getBlocks","BlockPreview","BlockPreviewContent","BlockSelectionClearer","bindContainer","clearSelectionIfFocusTarget","ref","hasSelectedBlock","hasMultiSelection","clearSelectedBlock","hasSelection","omit","BlockConvertButton","shouldRender","small","label","BlockModeToggle","onToggleMode","toggleBlockMode","_BlockSettingsMenuFirstItem","_BlockSettingsMenuPluginsExtension","getFreeformContentHandlerName","serialize","BlockSettingsMenu","firstBlockClientId","toggleClassname","shortcuts","duplicate","insertBefore","insertAfter","ReusableBlockConvertButton","isStaticBlock","onConvertToStatic","onConvertToReusable","getReusableBlock","__experimentalGetReusableBlock","convertBlockToReusable","__experimentalConvertBlockToReusable","convertBlockToStatic","__experimentalConvertBlockToStatic","ReusableBlockDeleteButton","reusableBlock","onDelete","isTemporary","deleteReusableBlock","__experimentalDeleteReusableBlock","hasConfirmed","confirm","getActiveStyle","styles","TokenList","potentialStyleName","substring","activeStyle","replaceActiveStyle","newStyle","list","remove","add","BlockStyles","onChangeClassName","onSwitch","onHoverClassName","updateClassName","updatedClassName","styleClassName","SPACE","newClassName","BlockSwitcher","hoveredClassName","onTransform","inserterItems","itemsByName","mapKeys","possibleBlockTransformations","orderBy","getPossibleBlockTransformations","frecency","sourceBlockName","openOnArrowDown","DOWN","destinationBlockType","hasChildBlocksWithInserterSupport","firstBlock","switchToBlockType","MultiBlocksSwitcher","isMultiBlockSelection","selectedBlockClientIds","BlockTitle","BlockToolbar","isBlockValid","BlockTypesList","items","onHover","getBlockMenuDefaultClassName","colorIndicatorAriaLabel","ColorPaletteControl","colors","disableCustomColors","colorObject","getColorObjectByColorValue","colorName","ariaLabel","toLowerCase","labelElement","withColorContext","ifCondition","hasColorsToChoose","ColorPalette","settings","getColorObjectByAttributeValues","definedColor","customColor","colorObj","colorValue","getColorClassName","colorContextName","colorSlug","kebabCase","getMostReadableColor","tinycolor","mostReadable","toHexString","DEFAULT_COLORS","args","colorMap","arg","isString","WrappedComponent","setters","createSetters","colorUtils","settersAccumulator","colorContext","colorAttributeName","upperFirstColorAttributeName","upperFirst","customColorAttributeName","createSetColor","previousState","newState","previousColorObject","previousColor","class","ContrastChecker","fallbackBackgroundColor","fallbackTextColor","fontSize","isLargeText","textColor","tinyBackgroundColor","tinyTextColor","hasTransparency","getAlpha","isReadable","level","msg","getBrightness","CopyHandler","onCopy","onCut","documentHasSelection","serialized","clipboardData","setData","DefaultBlockAppender","onAppend","showPrompt","placeholder","decodeEntities","isLastBlockDefault","lastBlockClientId","isLastBlockValid","bodyPlaceholder","startTyping","DocumentOutlineCheck","headings","emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","computeOutlineHeadings","flatMap","isEmptyHeading","heading","DocumentOutline","isTitleSupported","prevHeadingLevel","onSelectHeading","focusTitle","titleNode","querySelector","hasTitle","countByLevel","countBy","hasMultipleH1","isIncorrectLevel","getEditedPostAttribute","getPostType","postType","TableOfContentsItem","raw","primaryShift","primaryAlt","EditorGlobalKeyboardShortcuts","selectAll","undoOrRedo","deleteSelectedBlocks","clearMultiSelection","rootBlocksClientIds","onRedo","onUndo","onSave","getSelection","removeAllRanges","primary","flow","redo","undo","savePost","EditorHistoryRedo","hasRedo","hasEditorRedo","EditorHistoryUndo","hasUndo","hasEditorUndo","EditorNotices","notices","getNotices","removeNotice","ErrorBoundary","reboot","getContent","getEditedPostContent","stack","disableCustomFontSizes","fontSizes","FontSizePicker","getFontSize","fontSizeAttribute","customFontSizeAttribute","fontSizeObject","getFontSizeClass","fontSizeSlug","fontSizeNames","fontSizeAttributeNames","fontSizeAttributeNamesAccumulator","fontSizeAttributeName","customFontSizeAttributeName","upperFirstFontSizeAttributeName","createSetFontSize","fontSizeValue","didAttributesChange","pickBy","newStateAccumulator","fontSizeAttributeValue","IgnoreNestedEvents","proxyEvent","eventMap","isHandled","nativeEvent","_blockHandled","propKey","childHandledEvents","forwardedRef","eventHandlers","keys","match","isHandledProp","proxiedPropName","forwardedIgnoreNestedEvents","displayName","forwardRef","InnerBlocks","templateInProcess","template","updateNestedSettings","parentLock","synchronizeBlocksWithTemplate","hasTemplateChanged","replaceInnerBlocks","nextBlocks","blockListSettings","allowedBlocks","newSettings","isShallowEqual","isSmallScreen","isSelectedBlockInRoot","pick","getBlockListSettings","updateBlockListSettings","templateInsertUpdatesSelection","Content","withBlockContentContext","BlockContent","InserterListItem","itemIconStyle","itemIconStackStyle","shadowColor","InserterWithShortcuts","onInsert","itemsWithoutDefaultBlock","slice","insertBlock","ChildBlocks","rootBlockIcon","rootBlockTitle","rootBlockName","rootBlockType","defaultRenderToggle","Inserter","renderToggle","renderContent","hasInserterItems","hasItems","InserterInlineElements","filterValue","MAX_SUGGESTED_ITEMS","stopKeyPropagation","searchItems","searchTerm","normalizedSearchTerm","normalizeTerm","matchSearch","string","categories","getCategories","itemCategory","category","term","deburr","replace","trim","InserterMenu","childItems","hoveredItem","suggestedItems","reusableItems","itemsPerCategory","openPanels","onChangeSearchInput","panels","inserterResults","createRef","fetchReusableBlocks","hideInsertionPoint","panel","isOpened","without","scrollIntoView","current","alignWithTop","debouncedSpeak","rootChildBlocks","filteredItems","includes","maxSuggestedItems","utility","getCategoryIndex","findIndex","itemList","groupBy","firstCategory","resultCount","accumulator","currentCategorySlug","resultsFoundMessage","LEFT","RIGHT","UP","isPanelOpen","isSearching","onKeyDown","onTogglePanel","bindPanel","categoryItems","getSelectedBlock","getChildBlockNames","selectedBlock","__experimentalFetchReusableBlocks","insertedBlock","withSpokenMessages","withSafeTimeout","InspectorAdvancedControls","InspectorControls","InsertFromURLPopover","onSubmit","MediaPlaceholder","isURLInputVisible","onChangeSrc","onSubmitSrc","onUpload","onFilesUpload","openURLInput","closeURLInput","allowedTypes","allowedType","startsWith","onSelectURL","multiple","setMedia","media","mediaUpload","filesList","onFileChange","accept","labels","hasUploadPermissions","instructions","isOneType","isAudio","isImage","isVideo","onlyAllowsImages","MediaUploadCheck","fallback","MediaUpload","MultiSelectScrollIntoView","extentClientId","extentNode","scrollContainer","getScrollContainer","onlyScrollIfNeeded","getLastMultiSelectedBlockClientId","MultiSelectionInspector","words","wordCount","getMultiSelectedBlocks","Node","NavigableToolbar","focusToolbar","focusSelection","switchOnKeyDown","cond","matchesProperty","ESCAPE","toolbar","tabbables","selection","focusNode","focusElement","nodeType","ELEMENT_NODE","parentElement","KEY_DOWN_ELIGIBLE_KEY_CODES","isKeyDownEligibleForStartTyping","ObserveTyping","stopTypingOnSelectionUncollapse","stopTypingOnMouseMove","startTypingInTextField","stopTypingOnNonTextField","stopTypingOnEscapeKey","over","lastMouseMove","toggleEventBindings","isBound","bindFn","lastClientX","onStopTyping","rangeCount","getRangeAt","collapsed","onStartTyping","closest","persist","stopTyping","PageAttributesCheck","availableTemplates","supportsPageAttributes","PageAttributesOrder","withState","orderInput","onUpdateOrder","setUpdatedOrder","newOrder","Number","isInteger","invoke","PageAttributesOrderWithChecks","menu_order","PageAttributesParent","parent","onUpdateParent","isHierarchical","parentPageLabel","pageItems","pagesTree","buildTermsTree","getEntityRecords","getCurrentPostId","postTypeSlug","postId","query","per_page","exclude","parent_exclude","orderby","PageTemplate","selectedTemplate","onUpdate","templateName","templateSlug","hasCustomColorsDisabledForSetting","colorSetting","hasColorsToChooseInSetting","colorSettings","renderColorIndicators","availableColors","PanelColorSettings","titleElement","PlainText","PostAuthorCheck","hasAssignAuthorAction","authors","post","getCurrentPost","getCurrentPostType","getAuthors","PostAuthor","setAuthorId","onUpdateAuthor","postAuthor","selectId","author","PostComments","commentStatus","onToggleComments","comment_status","PostExcerptCheck","PostExcerpt","excerpt","onUpdateExcerpt","PostFeaturedImageCheck","ALLOWED_MEDIA_TYPES","DEFAULT_FEATURE_IMAGE_LABEL","DEFAULT_SET_FEATURE_IMAGE_LABEL","DEFAULT_REMOVE_FEATURE_IMAGE_LABEL","PostFeaturedImage","currentPostId","featuredImageId","onUpdateImage","onRemoveImage","postLabel","mediaWidth","mediaHeight","mediaSourceUrl","mediaSize","has","media_details","sizes","height","source_url","featured_image","isLoading","set_featured_image","remove_featured_image","getMedia","image","featured_media","PostFormatCheck","disablePostFormats","editorSettings","POST_FORMATS","caption","PostFormat","onUpdatePostFormat","postFormat","supportedFormats","suggestedFormat","postFormatSelectorId","formats","format","suggestion","getSuggestedPostFormat","themeSupports","getThemeSupports","union","PostLastRevisionCheck","lastRevisionId","revisionsCount","getCurrentPostLastRevisionId","getCurrentPostRevisionsCount","LastRevision","getWPAdminURL","revision","gutenberg","PostLockedModal","sendPostLock","receivePostLock","releasePostLock","jQuery","on","off","data","activePostLock","lock","post_id","updatePostLock","received","lock_error","isTakeover","avatar","avatar_src","new_lock","postLockUtils","_wpnonce","unlockNonce","post_ID","active_post_lock","async","url","ajaxUrl","userDisplayName","userAvatar","unlockUrl","addQueryArgs","lockKey","nonce","allPostsUrl","post_type","allPostsLabel","isPostLocked","isPostLockTakeover","getPostLockUser","getActivePostLock","withGlobalEvents","beforeunload","PostPendingStatusCheck","hasPublishAction","isPublished","isCurrentPostPublished","PostPendingStatus","status","onUpdateStatus","togglePendingStatus","updatedStatus","PostPermalinkEditor","permalinkParts","editedPostName","postName","onSavePermalink","cleanForSlug","prefix","suffix","getPermalinkParts","PostPermalink","addVisibilityCheck","onVisibilityChange","isCopied","isEditingPermalink","isEditable","refreshPost","visibilityState","linkElement","isNew","postLink","postSlug","postTitle","postID","samplePermalink","safeDecodeURI","isEditedPostNew","isPermalinkEditable","link","PostPingbacks","pingStatus","onTogglePingback","ping_status","writeInterstitialMessage","targetDocument","markup","renderToString","write","close","PostPreviewButton","openPreviewWindow","previewLink","setPreviewWindowLink","previewWindow","closed","location","getWindowTarget","href","isDraft","isPreview","currentPostLink","isSaveable","forcePreviewLink","forceIsAutosaveable","getCurrentPostAttribute","isEditedPostSaveable","getEditedPostPreviewLink","isViewable","PostPublishButton","buttonNode","forceIsDirty","forceIsSaving","isBeingScheduled","isPostSavingLocked","isPublishable","isSaving","isToggle","onStatusChange","visibility","isButtonDisabled","isToggleDisabled","publishStatus","buttonProps","isBusy","isLarge","isPrimary","toggleProps","toggleChildren","buttonChildren","componentProps","componentChildren","isSavingPost","isEditedPostBeingScheduled","getEditedPostVisibility","isEditedPostPublishable","PublishButtonLabel","isPublishing","isAutosaving","isPublishingPost","isAutosavingPost","PostPublishPanel","isPostTypeViewable","isPublishSidebarEnabled","isScheduled","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension","additionalProps","propsForPanel","isPublishedOrScheduled","isPrePublish","isPostPublish","isCurrentPostScheduled","disablePublishSidebar","enablePublishSidebar","withFocusReturn","withConstrainedTabbing","PostFormatSuggestion","suggestedPostFormat","suggestionText","PostFormatPanel","panelBodyTitle","getSuggestion","currentPostFormat","TagsPanel","MaybeTagsPanel","hadTagsWhenOpeningThePanel","hasTags","tagsTaxonomy","getTaxonomy","tags","rest_base","areTagsFetched","isPostTypeSupported","types","PostPublishPanelPostpublish","showCopyConfirmation","onSelectInput","dismissCopyConfirmation","viewPostLabel","postPublishNonLinkHeader","PostPublishPanelPrepublish","prePublishTitle","prePublishBodyText","PostSavedState","forceSavedMessage","isPending","PostScheduleCheck","PostSchedule","date","onUpdateDate","__experimentalGetSettings","is12HourTime","time","split","reverse","PostScheduleLabel","isFloating","dateI18n","datetimeAbbreviated","isEditedPostDateFloating","PostStickyCheck","hasStickyAction","PostSticky","onUpdateSticky","postSticky","sticky","PostSwitchToDraftButton","alertMessage","PostTaxonomiesCheck","taxonomies","hasTaxonomies","taxonomy","getTaxonomies","DEFAULT_QUERY","_fields","MAX_TERMS_SUGGESTIONS","isSameTermName","termA","termB","FlatTermSelector","searchTerms","findOrCreateTerm","loading","availableTerms","selectedTerms","terms","initRequest","fetchTerms","include","then","xhr","statusText","searchRequest","updateSelectedTerms","params","request","concat","availableTerm","termId","termObject","push","termName","catch","errorCode","code","addRequest","searchResult","Promise","reject","termNames","uniqueTerms","uniqBy","newTermNames","termNamesToIds","names","onUpdateTerms","all","newTerms","newAvailableTerms","hasAssignAction","newTermLabel","singularName","termAddedLabel","termRemovedLabel","removeTermLabel","unescapeString","hasCreateAction","restBase","MIN_TERMS_COUNT_FOR_FILTER","HierarchicalTermSelector","findTerm","onChangeFormName","onChangeFormParent","onAddTerm","onToggleForm","setFilterValue","sortBySelected","availableTermsTree","adding","formName","formParent","showForm","filteredTermsTree","parseInt","hasTerm","newValue","newParent","existingTerm","findOrCreatePromise","termAddedMessage","speak","fetchRequest","termsTree","treeHasSelection","termTree","anyChildIsSelected","child","termOrChildIsSelected","termASelected","termBSelected","sort","getFilterMatcher","getResultCount","i","matchTermsForFilter","originalTerm","renderedTerms","renderTerms","labelWithFallback","labelProperty","fallbackIsCategory","fallbackIsNotCategory","newTermButtonLabel","parentSelectLabel","noParentOption","newTermSubmitLabel","inputId","filterInputId","filterLabel","groupLabel","showFilter","PostTaxonomies","taxonomyWrapper","identity","availableTaxonomies","visibleTaxonomies","show_ui","TaxonomyComponent","hierarchical","PostTextEditor","stopEditing","onPersist","resetBlocks","REGEXP_NEWLINES","PostTitle","onUnselect","redirectHistory","newTitle","onEnterPress","isCleanNewPost","decodedPlaceholder","titlePlaceholder","withFocusOutside","PostTrashCheck","PostTrash","trashPost","PostTypeSupportCheck","supportKeys","isSupported","supports","PostVisibilityCheck","render","canEdit","PostVisibility","setPublic","setPrivate","setPasswordProtected","updatePassword","hasPassword","password","onUpdateVisibility","visibilityHandlers","public","checked","private","visibilityOptions","info","PostVisibilityLabel","getVisibilityLabel","PreserveScrollInReorder","blockOrder","getOffset","snapshot","restorePreviousOffset","blockNode","offset","scrollTop","EditorProvider","recovery","updateEditorSettings","postLock","setupEditor","initialEdits","createWarningNotice","actions","editLink","css","baseURL","transforms","wrap","urlRewrite","updatedCSS","traverse","createElement","innerHTML","body","appendChild","providers","SlotFillProvider","DropZoneProvider","createEditorElement","isAriaPropName","pickAriaProps","isNil","diffAriaProps","nextProps","prevAriaKeys","nextAriaKeys","removedKeys","updatedKeys","FormatEdit","formatTypes","activeFormat","getActiveFormat","activeAttributes","getFormatTypes","FormatToolbar","RichText","multiline","multilineTag","multilineWrapperTags","onSplit","deprecated","plugin","alternative","unstableOnSplit","onSetup","onDeleteKeyDown","onPaste","onCreateUndoLevel","onInput","onCompositionEnd","getRecord","createRecord","applyRecord","valueToFormat","setRef","formatToValue","memize","savedContent","patterns","getPatterns","enterPatterns","usedDeprecatedChildrenSource","Array","isArray","lastHistoryValue","editableRef","editor","text","start","end","range","create","element","removeNode","getAttribute","unwrapNode","removeAttribute","attribute","filterString","TINYMCE_ZWSP","prepareEditableTree","record","apply","createLinePadding","doc","setAttribute","plainText","error1","error2","console","log","file","getAsFile","createBlobURL","tagName","shouldReplace","splitContent","pastedText","isURL","applyFormat","canUserUseUnfilteredHTML","recordToInsert","insert","paste","unstableOnFocus","isComposing","transformed","accumlator","withoutHistory","timeout","onEnterFormattedText","onExitFormattedText","forEach","eventHandler","onChangeEditableValue","empty","isEdge","isHorizontalEdge","getSelectionStart","getSelectionEnd","charAt","LINE_SEPARATOR","getTextContent","regExp","isEmptyLine","insertLineSeparator","toInsert","prevRecord","shouldReapply","isPlainObject","subName","propValue","toHTML","unstableToDom","formatType","__experimentalCreatePrepareEditableTree","removeFormat","removeEditorOnlyFormats","fromDOM","childNodes","toHTMLString","Tagname","inlineToolbar","formattingControls","keepPlaceholderOnFocus","autocompleters","onTagNameChange","MultilineTag","ariaProps","isPlaceholderVisible","isExpanded","listBoxId","activeId","valueToEditableHTML","defaultProps","RichTextContainer","createUndoLevel","enterFormattedText","exitFormattedText","Tag","isResult","RichTextInserterItem","getFormatType","normalizeIconObject","isListRootSelected","getNode","getBody","isActiveListType","rootTagName","listItem","nodeName","ListEdit","onSyncDOM","execCommand","prefixTransforms","characterBefore","trimmedTextBefore","BACKTICK","textBefore","indexBefore","lastIndexOf","startIndex","endIndex","HANDLED_SHORTCUTS","SHORTCUTS_ELEMENT","fromPairs","shortcut","RemoveBrowserShortcuts","RichTextShortcut","onUse","character","TEXT_NODE","needsInternetExplorerInputFix","editorNode","navigator","userAgent","applyInternetExplorerInputFix","mapTextInputEvent","textInputEvent","stopImmediatePropagation","inputEvent","createEvent","initEvent","dispatchEvent","mapDeletionKeyUpEvents","isDeletion","removeInternetExplorerInputFix","IS_PLACEHOLDER_VISIBLE_ATTR_NAME","TinyMCE","bindEditorNode","initialize","configureIsPlaceholderVisible","destroy","isPlaceholderVisibleString","String","theme","inline","browser_spellcheck","entity_encoding","convert_urls","verify_html","inline_boundaries_selector","plugins","forced_root_block","custom_undo_redo_levels","lists_indent_on_tab","tinymce","init","setup","setHTML","dom","number","isDelete","isEntirelySelected","nodeValue","edgeSibling","defaultValue","role","contentEditable","__html","RichTextToolbarButton","shortcutType","shortcutCharacter","fillName","urlQueryArgs","SkipToSelectedBlock","selectedBlockElement","getBlockFocusableWrapper","TableOfContents","hasBlocks","TableOfContentsPanel","headingCount","paragraphCount","numberOfBlocks","getGlobalBlockCount","TemplateValidationNotice","confirmSynchronization","synchronizeTemplate","resetTemplateValidity","isValidTemplate","setTemplateValidity","ThemeSupportCheck","supported","UnsavedChangesWarning","warnIfUnsavedChanges","returnValue","URLInputButton","toggle","submitLink","expanded","buttonLabel","stopEventPropagation","URLInput","autocompleteRef","inputRef","updateSuggestions","suggestionNodes","posts","showSuggestions","selectedSuggestion","scrollingIntoView","suggestionsRequest","inputValue","setSelectionRange","previousIndex","nextIndex","TAB","selectLink","autoFocus","bindSuggestionNode","handleOnClick","URLPopover","toggleSettingsVisibility","isSettingsExpanded","renderSettings","onClickOutside","showSettings","Warning","secondaryActions","Children","WordCount","isTabbableTextField","overEvery","isTabbableIndex","isNavigationCandidate","hasModifier","isVertical","WritingFlow","clearVerticalRect","focusLastTextField","verticalRect","focusableNodes","focusable","isTabCandidate","array","isBlockFocusStop","hasInnerBlocksContext","nextNode","selectionStartClientId","selectionBeforeEndClientId","selectionAfterEndClientId","nextSelectionEndClientId","selectedFirstClientId","selectedLastClientId","focusedBlockClientId","onSelectBlock","closestTabbable","getClosestTabbable","isInSameBlock","isUp","isDown","isLeft","isRight","isHorizontal","isNav","isShift","ctrlKey","altKey","metaKey","isNavEdge","isVerticalEdge","isKeyboardEvent","isContentEditable","defaultPrevented","computeCaretRect","isTabbableEdge","expandSelection","moveSelection","getFirstMultiSelectedBlockClientId","selectionEndClientId","commentre","lineno","column","updatePosition","str","lines","line","Position","whitespace","source","prototype","errorsList","Error","reason","filename","silent","stylesheet","rulesList","rules","parsingErrors","comments","atrule","rule","re","m","exec","c","comment","selector","matched","s","declaration","prop","val","ret","property","declarations","decls","decl","keyframe","vals","atkeyframes","vendor","frame","frames","keyframes","atsupports","athost","atmedia","atcustommedia","atpage","sel","selectors","atdocument","atfontface","atimport","_compileAtrule","atcharset","atnamespace","RegExp","addParent","obj","isNode","childParent","k","v","defineProperty","configurable","writable","enumerable","Compiler","opts","emit","visit","mapVisit","delim","buf","Base","call","inherits","compile","import","charset","namespace","page","host","indentation","indent","compiler","compress","Compressed","Identity","isRemotePath","filePath","isAbsolutePath","isValidURL","getResourcePath","pathname","resolve","processURL","URL","newUrl","quote","getURLs","reg","URLs","replaceURLs","rewrite","rootURL","updatedURLs","IS_ROOT_TAG","ignore","updateSelector","traverseCSS","callback","parsed","updated","updatedNode","update","stringify","warn","ALL_ALIGNMENTS","WIDE_ALIGNMENTS","getValidAlignments","blockAlign","hasWideBlockSupport","hasWideEnabled","validAlignments","addAttribute","withToolbarControls","getBlockSupport","updateAlignment","nextAlign","blockDefaultAlign","insideSelectWithDataAlign","withDataAlign","addAssignedAlign","isAlignValid","addFilter","ANCHOR_REGEX","anchor","withInspectorControl","hasAnchor","nextValue","addSaveProps","hasCustomClassName","getHTMLRootElementClasses","parseWithAttributeSchema","addParsedDifference","blockAttributes","attributesSansClassName","defaultClasses","actualClasses","customClasses","defaultAutocompleters","userAutocompleter","once","setDefaultCompleters","blockAutocompleter","addGeneratedClassName","uniq","edits","resetPost","resetAutosave","updatePost","setupEditorState","receiveBlocks","updates","Date","now","createOnMove","fromRootClientId","toRootClientId","updateSelection","secondBlockClientId","isAutosave","selectPrevious","__experimentalReceiveReusableBlocks","results","__experimentalSaveReusableBlock","__experimentalUpdateReusableBlockTitle","lockPostSaving","lockName","unlockPostSaving","insertAt","elements","moveTo","from","to","withoutMovedElements","splice","PREFERENCES_DEFAULTS","insertUsage","EDITOR_SETTINGS_DEFAULTS","imageSizes","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","richEditingEnabled","INITIAL_EDITS_DEFAULTS","validateBlocksToTemplate","store","getState","getTemplate","isBlocksValidToTemplate","doBlocksMatchTemplate","selectPreviousBlock","firstRemovedBlockClientId","present","past","blockClientIdToSelect","ensureDefaultBlock","REQUEST_POST_UPDATE","requestPostUpdate","REQUEST_POST_UPDATE_SUCCESS","requestPostUpdateSuccess","REQUEST_POST_UPDATE_FAILURE","requestPostUpdateFailure","TRASH_POST","TRASH_POST_FAILURE","trashPostFailure","REFRESH_POST","MERGE_BLOCKS","blockA","blockB","merge","blocksWithTheSameType","updatedAttributes","SETUP_EDITOR","isNewPost","setupAction","compact","RESET_BLOCKS","SYNCHRONIZE_TEMPLATE","updatedBlockList","FETCH_REUSABLE_BLOCKS","SAVE_REUSABLE_BLOCK","saveReusableBlocks","DELETE_REUSABLE_BLOCK","deleteReusableBlocks","RECEIVE_REUSABLE_BLOCKS","receiveReusableBlocks","CONVERT_BLOCK_TO_STATIC","CONVERT_BLOCK_TO_REUSABLE","REMOVE_BLOCKS","REPLACE_BLOCKS","MULTI_SELECT","blockCount","SAVE_POST_NOTICE_ID","TRASH_POST_NOTICE_ID","getPostEdits","toSend","resolveSelector","optimist","BEGIN","POST_UPDATE_TRANSACTION_ID","getAutosave","dataDispatch","newPost","reset","isRevision","previousPost","REVERT","COMMIT","willPublish","noticeMessage","shouldShowLink","item_reverted_to_draft","publish","item_published","item_published_privately","future","item_scheduled","item_updated","view_item","createSuccessNotice","messages","createErrorNotice","message","REUSABLE_BLOCK_NOTICE_ID","reusableBlockOrBlocks","receiveReusableBlocksAction","parsedBlocks","getPostRawValue","parsedBlock","updatedReusableBlock","updatedId","allBlocks","associatedBlocks","associatedBlockClientIds","transactionId","uniqueId","oldBlock","referencedBlock","innerBlock","saveReusableBlock","selectorName","hasFinished","hasFinishedResolution","getResult","unsubscribe","subscribe","MODULE_KEY","registerStore","reducer","applyMiddlewares","middlewares","refx","effects","multi","enhancedDispatch","chain","middlewareAPI","middleware","flowRight","EDIT_MERGE_PROPERTIES","Set","mapBlockOrder","getFlattenedBlocks","flattenedBlocks","shift","getNestedBlockClientIds","blocksOrder","getMutateSafeObject","working","hasSameKeys","a","b","isUpdatingSameBlockAttribute","previousAction","isUpdatingSamePostProperty","shouldOverwriteState","overSome","withInnerBlocksRemoveCascade","withBlockReset","visibleClientIds","byClientId","combineReducers","withHistory","resetTypes","ignoreTypes","getCanonicalValue","withChangeDetection","nextAttributes","subState","mappedBlocks","fromIndex","lastClientId","nextState","hasOwnProperty","currentPost","blockSelection","isEnabled","nextSelectedBlockClientId","blocksMode","preferences","omitBy","saving","requesting","successful","postSavingLock","reusableBlocks","isFetching","field","preview_link","preview","PERMALINK_POSTNAME_REGEX","INSERTER_UTILITY_HIGH","INSERTER_UTILITY_MEDIUM","INSERTER_UTILITY_LOW","INSERTER_UTILITY_NONE","MILLISECONDS_PER_HOUR","MILLISECONDS_PER_DAY","MILLISECONDS_PER_WEEK","ONE_MINUTE_IN_MS","EMPTY_ARRAY","hasChangedContent","inSomeHistory","createSelector","attributeName","getAutosaveAttribute","hasAutosave","isCurrentPostPending","isInTheFuture","getDate","isEditedPostEmpty","getBlocksForSerialization","checkedDate","modified","getBlockDependantsCacheBust","innerBlockClientId","getPostMeta","descendants","getClientIdsWithDescendants","topLevelIds","getBlockSelectionEnd","multiSelectedBlockCount","getAdjacentBlockClientId","startClientId","modifier","orderSet","isAncestorOf","possibleAncestorId","possibleDescendentId","idToCheck","ancestorClientId","isMultiSelected","deep","innerClientId","isBlockWithinSelection","didPostSaveRequestSucceed","didPostSaveRequestFail","isPreviewingPost","_thumbnail_id","isSingleUnmodifiedDefaultBlock","isSingleFreeformBlock","removep","canInsertBlockTypeUnmemoized","checkAllowList","defaultResult","isBoolean","isBlockAllowedInEditor","parentBlockListSettings","parentAllowedBlocks","hasParentAllowedBlock","blockAllowedParentBlocks","parentName","hasBlockAllowedParent","getInsertUsage","canIncludeBlockTypeInInserter","canIncludeReusableBlockInInserter","referencedBlockName","referencedBlockType","calculateUtility","isContextual","calculateFrecency","duration","buildBlockTypeInserterItem","buildReusableBlockInserterItem","blockTypeInserterItems","getBlockTypes","reusableBlockInserterItems","__experimentalGetReusableBlocks","hasBlockType","hasReusableBlock","isNaN","__experimentalIsSavingReusableBlock","__experimentalIsFetchingReusableBlock","getStateBeforeOptimisticTransaction","transaction","entry","beforeState","stateBeforeRequest","permalinkTemplate","getPermalink","predicate","getTokenSettings","tokens","classList","blockElement","innerBlocksContainer","wpAllowedMimeTypes","additionalData","getMimeTypesArray","wpMimeTypesObject","mime","extensionsString","extensions","extension","filesSet","setAndUpdateFiles","idx","revokeBlobURL","isAllowedType","fileType","allowedMimeTypesForUser","isAllowedMimeTypeForUser","triggerError","validFiles","mediaFile","createMediaFromFile","savedMedia","mediaObject","alt","alt_text","FormData","append","flatTerms","termsByParent","fillWithChildren","toLower","isReset","isChanging","isIgnored","DEFAULT_OPTIONS","initialState","lastAction","shouldCreateUndoLevel","dropRight","drop","nextPresent","nextPast","lastActionToSubmit","convertChangesToXML","changes","change","escapeHTML","n"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AClFA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAe;AACf;AACA,iDAAiD,gBAAgB;AACjE;AACA;;AAEA;AACA;AACA,C;;;;;;;;;;;;ACRA;AAAA;AAAe;AACf;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;ACNA;AAAA;AAAA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA,C;;;;;;;;;;;;AClCA;AAAA;AAAe;AACf;AACA;AACA;AACA,C;;;;;;;;;;;;ACJA;AAAA;AAAA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA,C;;;;;;;;;;;;ACdA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,GAAG;AACH;AACA;;AAEA;AACA,C;;;;;;;;;;;;ACbA;AAAA;AAAe;AACf;AACA,mBAAmB,sBAAsB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,C;;;;;;;;;;;;AChBA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;ACLA;AAAA;AAAA;AAA8C;AAC/B;AACf;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,kBAAkB,+DAAc;AAChC,C;;;;;;;;;;;;ACdA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAe;AACf;AACA;AACA;AACA;;AAEA;AACA,6CAA6C,+BAA+B;AAC5E;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA,C;;;;;;;;;;;;ACxBA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAe;AACf;AACA,C;;;;;;;;;;;;ACFA;AAAA;AAAA;AAA8C;AAC/B;AACf,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;A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;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;;AAEJ;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,CAAC,E;;;;;;;;;;;AC/RD;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,EAAE,UAAU,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,oGAAC;AACJ,EAAE,MAAM,EAEN;AACF,CAAC;;;;;;;;;;;;ACnDD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;;;;;;;;;;;;;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AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA,gC;;;;;;;;;;;;AChIa;;AAEb,iBAAiB,mBAAO,CAAC,+FAAwB,E;;;;;;;;;;;;ACFpC;;AAEb,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P,oGAAoG,mBAAmB,EAAE,mBAAmB,kGAAkG;;AAE9O;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,gBAAgB;AACjC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,kBAAkB;AAC/B;AACA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,CAAC,Y;;;;;;;;;;;ACtbD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA,oBAAoB,mBAAO,CAAC,oFAAgB;;AAE5C;AACA;AACA,WAAW,YAAY;AACvB,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,6BAA6B;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;AChGA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,MAAM,KAA+B,GAAG,EAMtC;;AAEF;AACA;;;;;;;;;;;;;ACpHA;AACA;AACA;AACA;AACA;;AAEa;AACb;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,QAAQ;AACzB;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,kCAAkC;AAClC;AACA;AACA;;AAEA;AACA,EAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,gBAAgB,sBAAsB;AACtC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,oBAAoB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA,IAAI,IAAqC;AACzC,6BAA6B,mBAAO,CAAC,yFAA4B;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,OAAO;AAClB,WAAW,UAAU;AACrB;AACA;AACA;AACA,MAAM,IAAqC;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4GAA4G;AAC5G;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;AC1FA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,aAAa,mBAAO,CAAC,4DAAe;;AAEpC,2BAA2B,mBAAO,CAAC,yFAA4B;AAC/D,qBAAqB,mBAAO,CAAC,qEAAkB;;AAE/C;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,6BAA6B;AAC7B,QAAQ;AACR;AACA;AACA;AACA;AACA,+BAA+B,KAAK;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,4BAA4B;AAC5B,OAAO;AACP;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,IAAqC;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,KAAqC;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,sBAAsB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,wFAAwF,SAAM;AACzI;AACA;;AAEA;AACA;AACA,qBAAqB,2BAA2B;AAChD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAM,KAAqC,4FAA4F,SAAM;AAC7I;AACA;;AAEA,mBAAmB,gCAAgC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAqB,gCAAgC;AACrD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;AC1iBA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAI,IAAqC;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,mBAAmB,mBAAO,CAAC,uFAA2B;AACtD,CAAC,MAAM,EAIN;;;;;;;;;;;;;AC3BD;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;;AAEA;;;;;;;;;;;;ACXA;AACA,CAAC;;AAED;AACA,mBAAmB,KAA0B;AAC7C;AACA,kBAAkB,KAAyB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,MAAM;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,MAAM;AAClB,YAAY,SAAS;AACrB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,SAAS;AACrB;AACA,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,MAAM;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA,KAAK;AACL,4BAA4B;AAC5B;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,mCAAmC;AAClE;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,wBAAwB;;AAExB,yCAAyC,qBAAqB;;AAE9D;AACA;AACA;AACA;AACA;AACA,kCAAkC,oBAAoB;;AAEtD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAA0B,iBAAiB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,cAAc,iBAAiB;AAC/B;;AAEA;AACA;AACA;;AAEA;AACA;AACA,8BAA8B,oBAAoB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA,cAAc,OAAO;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAE,IAEU;AACZ;AACA,EAAE,mCAAmB;AACrB;AACA,GAAG;AAAA,oGAAC;AACJ,EAAE,MAAM,EAaN;;AAEF,CAAC;;;;;;;;;;;;;;ACphBD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,iBAAiB,SAAS;AAC1B;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,OAAO;AACP;AACA;AACA,KAAK;;AAEL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,iBAAiB,eAAe;AAChC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACpFa;;AAEb,iCAAiC,mBAAO,CAAC,0DAAU;AACnD,qCAAqC,mBAAO,CAAC,0DAAU;;;;;;;;;;;;;ACH1C;AACb;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD;AACA,4CAA4C,OAAO;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA,YAAY,mBAAO,CAAC,oBAAO;AAC3B,gBAAgB,mBAAO,CAAC,sDAAY;AACpC,eAAe,mBAAO,CAAC,0DAAU;AACjC,qBAAqB,mBAAO,CAAC,kEAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,UAAU,+DAA+D,UAAU,uBAAuB,qCAAqC;AAC7K;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,iCAAiC,EAAE;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,WAAW,sBAAsB;AAC5F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;;;;;;;;;;;;;ACxHa;AACb;AACA,yBAAyB,mBAAO,CAAC,0FAAoB;AACrD;;;;;;;;;;;;;ACHa;;AAEb;AACA;AACA,CAAC;AACD;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,wB;;;;;;;;;;;ACvBA,iBAAiB,mBAAO,CAAC,kEAAgB;;;;;;;;;;;;;ACA5B;;AAEb,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P,8CAA8C,iBAAiB,qBAAqB,oCAAoC,6DAA6D,oBAAoB,EAAE,eAAe;;AAE1N;AACA;AACA;AACA,UAAU,6CAA6C,OAAO,WAAW;AACzE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iCAAiC,0CAA0C;AAC3E;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC,iBAAiB;AACpD;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,qBAAqB;AAC5C;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,YAAY;AACZ,GAAG;AACH;;AAEA;;AAEA;;AAEA,YAAY;AACZ;AACA,C;;;;;;;;;;;;AC9Ja;;AAEb;AACA;AACA;AACA,cAAc,oBAAoB;AAClC;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAa;AACb;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAiB,qBAAqB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;;;;;;AC/CA;AAAa;;AAEb;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,UAAU;AACV;AACA;;AAEA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA,YAAY,MAAM;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAY,OAAO;AACnB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,MAAM;AACjB,WAAW,MAAM;AACjB,WAAW,OAAO;AAClB;AACA,YAAY,QAAQ;AACpB;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qBAAqB,cAAc;AACnC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB;AACA;AACA;AACA,YAAY,SAAS;AACrB;AACe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,MAAM;AAClB;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA,cAAc,uBAAuB;AACrC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAY,OAAO;AACnB,YAAY,KAAK;AACjB;AACA,aAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA,cAAc,SAAS;AACvB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;;;;;;ACjRD;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,oBAAoB;;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAsB,8BAA8B;AACpD,sBAAsB,8BAA8B;AACpD,sBAAsB,8BAA8B;;AAEpD;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,mBAAmB,OAAO;AACzD,+BAA+B,mBAAmB,OAAO;AACzD,+BAA+B,mBAAmB,OAAO;AACzD;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,gBAAgB;AAChB,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;;AAEL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,kBAAkB;AAClB;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD,wCAAwC;AACxC,wCAAwC;AACxC;;AAEA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA;AACA,sDAAsD;AACtD,wCAAwC;AACxC,wCAAwC;AACxC;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA;AACA;AACA,eAAe,UAAU;AACzB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,6BAA6B,cAAc;AAC3C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,yCAAyC;AAC5D,mBAAmB,yCAAyC;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,wCAAwC;AAC3D,mBAAmB,yCAAyC;AAC5D,mBAAmB,yCAAyC;AAC5D;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uCAAuC;AAC1D,mBAAmB,wCAAwC;AAC3D;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,+DAA+D,WAAW;AAC1E;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4BAA4B,kBAAkB;AAC9C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,2DAA2D,wBAAwB;;AAEnF;AACA;AACA,2CAA2C,wBAAwB;AACnE;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,8EAA8E,4BAA4B,gBAAgB;AAC1H,8EAA8E,2BAA2B,gBAAgB;AACzH,qDAAqD,oDAAoD,gBAAgB;AACzH,qDAAqD,oDAAoD,gBAAgB;AACzH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,kBAAkB,uBAAuB;AACzC;AACA;AACA;AACA;AACA;AACA;;AAEA,oDAAoD,0BAA0B;AAC9E;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;;AAEA,KAAK,kBAAkB,YAAY,kBAAkB;AACrD;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4BAA4B,YAAY;;AAExC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE;AACjE,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE;AACjF,+BAA+B,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE;AACjF;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,wCAAwC,UAAU,OAAO,UAAU,OAAO,SAAS;AACnF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,2CAA2C;AAC3C;AACA,sBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY;AACZ;;AAEA;AACA,IAAI,KAA6B;AACjC;AACA;AACA;AACA,SAAS,IAA0C;AACnD,IAAI,mCAAO,aAAa,kBAAkB;AAAA,oGAAC;AAC3C;AACA;AACA,KAAK,EAEJ;;AAED,CAAC;;;;;;;;;;;;AC1qCD;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,eAAe;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,mBAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,4B;AACA,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA;;AAEA;AACA,uBAAuB,oBAAoB;AAC3C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA,mCAAmC,uBAAuB;AAC1D,kCAAkC,sBAAsB;AACxD,gCAAgC,oBAAoB;AACpD,iCAAiC,qBAAqB;AACtD,gCAAgC,gBAAgB;AAChD,iCAAiC;AACjC;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA,aAAa;AACb;AACA;;AAEA;;AAEA;AACA,KAAK;AACL;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,oBAAoB;AACpB,uBAAuB;AACvB,yBAAyB;AACzB,wBAAwB;AACxB,0BAA0B;AAC1B,yBAAyB;AACzB,yBAAyB;;AAEzB;AACA;AACA;;AAEA;AACA;AACA,wBAAwB,eAAe;AACvC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;;;;;;;;;;;;ACzTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,eAAe,mBAAO,CAAC,qDAAU;AACjC,WAAW,mBAAO,CAAC,0CAAQ;;AAE3B;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,gBAAgB,KAAK;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA,2CAA2C,KAAK;AAChD,0CAA0C,KAAK;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,kBAAkB,mBAAO,CAAC,4DAAa;;AAEvC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,mBAAmB,4BAA4B;AAC/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,OAAO;AAClD;AACA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,0CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAG;AACH;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,mBAAmB;AACrC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oBAAoB,mBAAmB;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,iBAAiB;AACtC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,8BAA8B,QAAQ;AACtC;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,MAAM;AAChB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA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AAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,0CAA0C,EAAE,I;;;;;;;;;;;ACAzD,aAAa,iCAAiC,EAAE,I;;;;;;;;;;;ACAhD,aAAa,iCAAiC,EAAE,I;;;;;;;;;;;ACAhD,aAAa,gCAAgC,EAAE,I;;;;;;;;;;;ACA/C,aAAa,kCAAkC,EAAE,I","file":"editor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./node_modules/@wordpress/editor/build-module/index.js\");\n","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","export default function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nexport default function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}","/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Toolbar } from '@wordpress/components';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { withBlockEditContext } from '../block-edit/context';\n\nconst DEFAULT_ALIGNMENT_CONTROLS = [\n\t{\n\t\ticon: 'editor-alignleft',\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: 'editor-aligncenter',\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: 'editor-alignright',\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nexport function AlignmentToolbar( { isCollapsed, value, onChange, alignmentControls = DEFAULT_ALIGNMENT_CONTROLS } ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = find( alignmentControls, ( control ) => control.align === value );\n\n\treturn (\n\t\t<Toolbar\n\t\t\tisCollapsed={ isCollapsed }\n\t\t\ticon={ activeAlignment ? activeAlignment.icon : 'editor-alignleft' }\n\t\t\tlabel={ __( 'Change Text Alignment' ) }\n\t\t\tcontrols={ alignmentControls.map( ( control ) => {\n\t\t\t\tconst { align } = control;\n\t\t\t\tconst isActive = ( value === align );\n\n\t\t\t\treturn {\n\t\t\t\t\t...control,\n\t\t\t\t\tisActive,\n\t\t\t\t\tonClick: applyOrUnset( align ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithBlockEditContext( ( { clientId } ) => {\n\t\treturn {\n\t\t\tclientId,\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n\twithSelect( ( select, { clientId, isLargeViewport, isCollapsed } ) => {\n\t\tconst { getBlockRootClientId, getEditorSettings } = select( 'core/editor' );\n\t\treturn {\n\t\t\tisCollapsed: isCollapsed || ! isLargeViewport || (\n\t\t\t\t! getEditorSettings().hasFixedToolbar &&\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t),\n\t\t};\n\t} ),\n)( AlignmentToolbar );\n","/**\n * External dependencies\n */\nimport { clone } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { applyFilters, hasFilter } from '@wordpress/hooks';\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { Autocomplete as OriginalAutocomplete } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { withBlockEditContext } from '../block-edit/context';\n\n/*\n * Use one array instance for fallback rather than inline array literals\n * because the latter may cause rerender due to failed prop equality checks.\n */\nconst completersFallback = [];\n\n/**\n * Wrap the default Autocomplete component with one that\n * supports a filter hook for customizing its list of autocompleters.\n *\n * Since there may be many Autocomplete instances at one time, this component\n * applies the filter on demand, when the component is first focused after\n * receiving a new list of completers.\n *\n * This function is exported for unit test.\n *\n * @param {Function} Autocomplete Original component.\n * @return {Function} Wrapped component\n */\nexport function withFilteredAutocompleters( Autocomplete ) {\n\treturn class FilteredAutocomplete extends Component {\n\t\tconstructor() {\n\t\t\tsuper();\n\n\t\t\tthis.state = { completers: completersFallback };\n\n\t\t\tthis.saveParentRef = this.saveParentRef.bind( this );\n\t\t\tthis.onFocus = this.onFocus.bind( this );\n\t\t}\n\n\t\tcomponentDidUpdate() {\n\t\t\tconst hasFocus = this.parentNode.contains( document.activeElement );\n\n\t\t\t/*\n\t\t\t * It's possible for props to be updated when the component has focus,\n\t\t\t * so here, we ensure new completers are immediately applied while we\n\t\t\t * have the focus.\n\t\t\t *\n\t\t\t * NOTE: This may trigger another render but only when the component has focus.\n\t\t\t */\n\t\t\tif ( hasFocus && this.hasStaleCompleters() ) {\n\t\t\t\tthis.updateCompletersState();\n\t\t\t}\n\t\t}\n\n\t\tonFocus() {\n\t\t\tif ( this.hasStaleCompleters() ) {\n\t\t\t\tthis.updateCompletersState();\n\t\t\t}\n\t\t}\n\n\t\thasStaleCompleters() {\n\t\t\treturn (\n\t\t\t\t! ( 'lastFilteredCompletersProp' in this.state ) ||\n\t\t\t\tthis.state.lastFilteredCompletersProp !== this.props.completers\n\t\t\t);\n\t\t}\n\n\t\tupdateCompletersState() {\n\t\t\tconst { blockName, completers } = this.props;\n\t\t\tlet nextCompleters = completers;\n\t\t\tconst lastFilteredCompletersProp = nextCompleters;\n\n\t\t\tif ( hasFilter( 'editor.Autocomplete.completers' ) ) {\n\t\t\t\tnextCompleters = applyFilters(\n\t\t\t\t\t'editor.Autocomplete.completers',\n\t\t\t\t\t// Provide copies so filters may directly modify them.\n\t\t\t\t\tnextCompleters && nextCompleters.map( clone ),\n\t\t\t\t\tblockName,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tthis.setState( {\n\t\t\t\tlastFilteredCompletersProp,\n\t\t\t\tcompleters: nextCompleters || completersFallback,\n\t\t\t} );\n\t\t}\n\n\t\tsaveParentRef( parentNode ) {\n\t\t\tthis.parentNode = parentNode;\n\t\t}\n\n\t\trender() {\n\t\t\tconst { completers } = this.state;\n\t\t\tconst autocompleteProps = {\n\t\t\t\t...this.props,\n\t\t\t\tcompleters,\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<div onFocus={ this.onFocus } ref={ this.saveParentRef }>\n\t\t\t\t\t<Autocomplete onFocus={ this.onFocus } { ...autocompleteProps } />\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t};\n}\n\nexport default compose( [\n\twithBlockEditContext( ( { name } ) => {\n\t\treturn {\n\t\t\tblockName: name,\n\t\t};\n\t} ),\n\twithFilteredAutocompleters,\n] )( OriginalAutocomplete );\n","/**\n * WordPress dependencies\n */\nimport { select } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\n/**\n * Returns the client ID of the parent where a newly inserted block would be\n * placed.\n *\n * @return {string} Client ID of the parent where a newly inserted block would\n * be placed.\n */\nfunction defaultGetBlockInsertionParentClientId() {\n\treturn select( 'core/editor' ).getBlockInsertionPoint().rootClientId;\n}\n\n/**\n * Returns the inserter items for the specified parent block.\n *\n * @param {string} rootClientId Client ID of the block for which to retrieve\n * inserter items.\n *\n * @return {Array<Editor.InserterItem>} The inserter items for the specified\n * parent.\n */\nfunction defaultGetInserterItems( rootClientId ) {\n\treturn select( 'core/editor' ).getInserterItems( rootClientId );\n}\n\n/**\n * Returns the name of the currently selected block.\n *\n * @return {string?} The name of the currently selected block or `null` if no\n * block is selected.\n */\nfunction defaultGetSelectedBlockName() {\n\tconst { getSelectedBlockClientId, getBlockName } = select( 'core/editor' );\n\tconst selectedBlockClientId = getSelectedBlockClientId();\n\treturn selectedBlockClientId ? getBlockName( selectedBlockClientId ) : null;\n}\n\n/**\n * Creates a blocks repeater for replacing the current block with a selected block type.\n *\n * @return {Completer} A blocks completer.\n */\nexport function createBlockCompleter( {\n\t// Allow store-based selectors to be overridden for unit test.\n\tgetBlockInsertionParentClientId = defaultGetBlockInsertionParentClientId,\n\tgetInserterItems = defaultGetInserterItems,\n\tgetSelectedBlockName = defaultGetSelectedBlockName,\n} = {} ) {\n\treturn {\n\t\tname: 'blocks',\n\t\tclassName: 'editor-autocompleters__block',\n\t\ttriggerPrefix: '/',\n\t\toptions() {\n\t\t\tconst selectedBlockName = getSelectedBlockName();\n\t\t\treturn getInserterItems( getBlockInsertionParentClientId() ).filter(\n\t\t\t\t// Avoid offering to replace the current block with a block of the same type.\n\t\t\t\t( inserterItem ) => selectedBlockName !== inserterItem.name\n\t\t\t);\n\t\t},\n\t\tgetOptionKeywords( inserterItem ) {\n\t\t\tconst { title, keywords = [] } = inserterItem;\n\t\t\treturn [ ...keywords, title ];\n\t\t},\n\t\tgetOptionLabel( inserterItem ) {\n\t\t\tconst { icon, title } = inserterItem;\n\t\t\treturn [\n\t\t\t\t<BlockIcon key=\"icon\" icon={ icon } showColors />,\n\t\t\t\ttitle,\n\t\t\t];\n\t\t},\n\t\tallowContext( before, after ) {\n\t\t\treturn ! ( /\\S/.test( before ) || /\\S/.test( after ) );\n\t\t},\n\t\tgetOptionCompletion( inserterItem ) {\n\t\t\tconst { name, initialAttributes } = inserterItem;\n\t\t\treturn {\n\t\t\t\taction: 'replace',\n\t\t\t\tvalue: createBlock( name, initialAttributes ),\n\t\t\t};\n\t\t},\n\t\tisOptionDisabled( inserterItem ) {\n\t\t\treturn inserterItem.isDisabled;\n\t\t},\n\t};\n}\n\n/**\n * Creates a blocks repeater for replacing the current block with a selected block type.\n *\n * @return {Completer} A blocks completer.\n */\nexport default createBlockCompleter();\n","export { default as blockAutocompleter } from './block';\nexport { default as userAutocompleter } from './user';\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n* A user mentions completer.\n*\n* @type {Completer}\n*/\nexport default {\n\tname: 'users',\n\tclassName: 'editor-autocompleters__user',\n\ttriggerPrefix: '@',\n\toptions( search ) {\n\t\tlet payload = '';\n\t\tif ( search ) {\n\t\t\tpayload = '?search=' + encodeURIComponent( search );\n\t\t}\n\t\treturn apiFetch( { path: '/wp/v2/users' + payload } );\n\t},\n\tisDebounced: true,\n\tgetOptionKeywords( user ) {\n\t\treturn [ user.slug, user.name ];\n\t},\n\tgetOptionLabel( user ) {\n\t\treturn [\n\t\t\t<img key=\"avatar\" className=\"editor-autocompleters__user-avatar\" alt=\"\" src={ user.avatar_urls[ 24 ] } />,\n\t\t\t<span key=\"name\" className=\"editor-autocompleters__user-name\">{ user.name }</span>,\n\t\t\t<span key=\"slug\" className=\"editor-autocompleters__user-slug\">{ user.slug }</span>,\n\t\t];\n\t},\n\tgetOptionCompletion( user ) {\n\t\treturn `@${ user.slug }`;\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\nexport class AutosaveMonitor extends Component {\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { isDirty, editsReference, isAutosaveable } = this.props;\n\n\t\tif (\n\t\t\tprevProps.isDirty !== isDirty ||\n\t\t\tprevProps.isAutosaveable !== isAutosaveable ||\n\t\t\tprevProps.editsReference !== editsReference\n\t\t) {\n\t\t\tthis.toggleTimer( isDirty && isAutosaveable );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.toggleTimer( false );\n\t}\n\n\ttoggleTimer( isPendingSave ) {\n\t\tclearTimeout( this.pendingSave );\n\t\tconst { autosaveInterval } = this.props;\n\t\tif ( isPendingSave ) {\n\t\t\tthis.pendingSave = setTimeout(\n\t\t\t\t() => this.props.autosave(),\n\t\t\t\tautosaveInterval * 1000\n\t\t\t);\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tgetEditorSettings,\n\t\t\tgetReferenceByDistinctEdits,\n\t\t} = select( 'core/editor' );\n\n\t\tconst { autosaveInterval } = getEditorSettings();\n\n\t\treturn {\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tautosaveInterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tautosave: dispatch( 'core/editor' ).autosave,\n\t} ) ),\n] )( AutosaveMonitor );\n","/**\n * External dependencies\n */\nimport { castArray, first, last, every } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { cloneBlock, hasBlockSupport } from '@wordpress/blocks';\n\nfunction BlockActions( {\n\tonDuplicate,\n\tonRemove,\n\tonInsertBefore,\n\tonInsertAfter,\n\tisLocked,\n\tcanDuplicate,\n\tchildren,\n} ) {\n\treturn children( {\n\t\tonDuplicate,\n\t\tonRemove,\n\t\tonInsertAfter,\n\t\tonInsertBefore,\n\t\tisLocked,\n\t\tcanDuplicate,\n\t} );\n}\n\nexport default compose( [\n\twithSelect( ( select, props ) => {\n\t\tconst {\n\t\t\tgetBlocksByClientId,\n\t\t\tgetBlockIndex,\n\t\t\tgetTemplateLock,\n\t\t\tgetBlockRootClientId,\n\t\t} = select( 'core/editor' );\n\n\t\tconst blocks = getBlocksByClientId( props.clientIds );\n\t\tconst canDuplicate = every( blocks, ( block ) => {\n\t\t\treturn !! block && hasBlockSupport( block.name, 'multiple', true );\n\t\t} );\n\t\tconst rootClientId = getBlockRootClientId( props.clientIds[ 0 ] );\n\n\t\treturn {\n\t\t\tfirstSelectedIndex: getBlockIndex( first( castArray( props.clientIds ) ), rootClientId ),\n\t\t\tlastSelectedIndex: getBlockIndex( last( castArray( props.clientIds ) ), rootClientId ),\n\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\tblocks,\n\t\t\tcanDuplicate,\n\t\t\trootClientId,\n\t\t\textraProps: props,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, props ) => {\n\t\tconst {\n\t\t\tclientIds,\n\t\t\trootClientId,\n\t\t\tblocks,\n\t\t\tfirstSelectedIndex,\n\t\t\tlastSelectedIndex,\n\t\t\tisLocked,\n\t\t\tcanDuplicate,\n\t\t} = props;\n\n\t\tconst {\n\t\t\tinsertBlocks,\n\t\t\tmultiSelect,\n\t\t\tremoveBlocks,\n\t\t\tinsertDefaultBlock,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonDuplicate() {\n\t\t\t\tif ( isLocked || ! canDuplicate ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\t\t\t\tinsertBlocks(\n\t\t\t\t\tclonedBlocks,\n\t\t\t\t\tlastSelectedIndex + 1,\n\t\t\t\t\trootClientId\n\t\t\t\t);\n\t\t\t\tif ( clonedBlocks.length > 1 ) {\n\t\t\t\t\tmultiSelect(\n\t\t\t\t\t\tfirst( clonedBlocks ).clientId,\n\t\t\t\t\t\tlast( clonedBlocks ).clientId\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonRemove() {\n\t\t\t\tif ( ! isLocked ) {\n\t\t\t\t\tremoveBlocks( clientIds );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonInsertBefore() {\n\t\t\t\tif ( ! isLocked ) {\n\t\t\t\t\tinsertDefaultBlock( {}, rootClientId, firstSelectedIndex );\n\t\t\t\t}\n\t\t\t},\n\t\t\tonInsertAfter() {\n\t\t\t\tif ( ! isLocked ) {\n\t\t\t\t\tinsertDefaultBlock( {}, rootClientId, lastSelectedIndex + 1 );\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n] )( BlockActions );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Toolbar } from '@wordpress/components';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { withBlockEditContext } from '../block-edit/context';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\tleft: {\n\t\ticon: 'align-left',\n\t\ttitle: __( 'Align left' ),\n\t},\n\tcenter: {\n\t\ticon: 'align-center',\n\t\ttitle: __( 'Align center' ),\n\t},\n\tright: {\n\t\ticon: 'align-right',\n\t\ttitle: __( 'Align right' ),\n\t},\n\twide: {\n\t\ticon: 'align-wide',\n\t\ttitle: __( 'Wide width' ),\n\t},\n\tfull: {\n\t\ticon: 'align-full-width',\n\t\ttitle: __( 'Full width' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'left', 'center', 'right', 'wide', 'full' ];\nconst WIDE_CONTROLS = [ 'wide', 'full' ];\n\nexport function BlockAlignmentToolbar( { isCollapsed, value, onChange, controls = DEFAULT_CONTROLS, wideControlsEnabled = false } ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst enabledControls = wideControlsEnabled ?\n\t\tcontrols :\n\t\tcontrols.filter( ( control ) => WIDE_CONTROLS.indexOf( control ) === -1 );\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\n\treturn (\n\t\t<Toolbar\n\t\t\tisCollapsed={ isCollapsed }\n\t\t\ticon={ activeAlignment ? activeAlignment.icon : 'align-left' }\n\t\t\tlabel={ __( 'Change Alignment' ) }\n\t\t\tcontrols={\n\t\t\t\tenabledControls.map( ( control ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\t\tisActive: value === control,\n\t\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t\t};\n\t\t\t\t} )\n\t\t\t}\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithBlockEditContext( ( { clientId } ) => {\n\t\treturn {\n\t\t\tclientId,\n\t\t};\n\t} ),\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n\twithSelect( ( select, { clientId, isLargeViewport, isCollapsed } ) => {\n\t\tconst { getBlockRootClientId, getEditorSettings } = select( 'core/editor' );\n\t\treturn {\n\t\t\twideControlsEnabled: select( 'core/editor' ).getEditorSettings().alignWide,\n\t\t\tisCollapsed: isCollapsed || ! isLargeViewport || (\n\t\t\t\t! getEditorSettings().hasFixedToolbar &&\n\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t),\n\t\t};\n\t} ),\n)( BlockAlignmentToolbar );\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\n\nconst BlockView = ( { title, rawContent, renderedContent, action, actionText, className } ) => {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<div className=\"editor-block-compare__content\">\n\t\t\t\t<h1 className=\"editor-block-compare__heading\">{ title }</h1>\n\n\t\t\t\t<div className=\"editor-block-compare__html\">\n\t\t\t\t\t{ rawContent }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"editor-block-compare__preview edit-post-visual-editor\">\n\t\t\t\t\t{ renderedContent }\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div className=\"editor-block-compare__action\">\n\t\t\t\t<Button isLarge tabIndex=\"0\" onClick={ action }>{ actionText }</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default BlockView;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { castArray } from 'lodash';\nimport { diffChars } from 'diff';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { getSaveContent, getSaveElement } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nclass BlockCompare extends Component {\n\tgetDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = classnames( {\n\t\t\t\t'editor-block-compare__added': item.added,\n\t\t\t\t'editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn <span key={ pos } className={ classes }>{ item.value }</span>;\n\t\t} );\n\t}\n\n\tgetOriginalContent( block ) {\n\t\treturn {\n\t\t\trawContent: block.originalContent,\n\t\t\trenderedContent: getSaveElement( block.name, block.attributes ),\n\t\t};\n\t}\n\n\tgetConvertedContent( block ) {\n\t\t// The convertor may return an array of items or a single item\n\t\tconst newBlocks = castArray( block );\n\n\t\t// Get converted block details\n\t\tconst newContent = newBlocks.map( ( item ) => getSaveContent( item.name, item.attributes, item.innerBlocks ) );\n\t\tconst renderedContent = newBlocks.map( ( item ) => getSaveElement( item.name, item.attributes, item.innerBlocks ) );\n\n\t\treturn {\n\t\t\trawContent: newContent.join( '' ),\n\t\t\trenderedContent,\n\t\t};\n\t}\n\n\trender() {\n\t\tconst { block, onKeep, onConvert, convertor, convertButtonText } = this.props;\n\t\tconst original = this.getOriginalContent( block );\n\t\tconst converted = this.getConvertedContent( convertor( block ) );\n\t\tconst difference = this.getDifference( original.rawContent, converted.rawContent );\n\n\t\treturn (\n\t\t\t<div className=\"editor-block-compare__wrapper\">\n\t\t\t\t<BlockView\n\t\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\t\tclassName=\"editor-block-compare__current\"\n\t\t\t\t\taction={ onKeep }\n\t\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\t\trawContent={ original.rawContent }\n\t\t\t\t\trenderedContent={ original.renderedContent }\n\t\t\t\t/>\n\n\t\t\t\t<BlockView\n\t\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\t\tclassName=\"editor-block-compare__converted\"\n\t\t\t\t\taction={ onConvert }\n\t\t\t\t\tactionText={ convertButtonText }\n\t\t\t\t\trawContent={ difference }\n\t\t\t\t\trenderedContent={ converted.renderedContent }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default BlockCompare;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill, Toolbar } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ifBlockEditSelected } from '../block-edit/context';\n\nconst { Fill, Slot } = createSlotFill( 'BlockControls' );\n\nconst BlockControlsFill = ( { controls, children } ) => (\n\t<Fill>\n\t\t<Toolbar controls={ controls } />\n\t\t{ children }\n\t</Fill>\n);\n\nconst BlockControls = ifBlockEditSelected( BlockControlsFill );\n\nBlockControls.Slot = Slot;\n\nexport default BlockControls;\n","/**\n * WordPress dependencies\n */\nimport { Draggable } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\nconst BlockDraggable = ( { children, clientId, rootClientId, blockElementId, index, onDragStart, onDragEnd } ) => {\n\tconst transferData = {\n\t\ttype: 'block',\n\t\tsrcIndex: index,\n\t\tsrcRootClientId: rootClientId,\n\t\tsrcClientId: clientId,\n\t};\n\n\treturn (\n\t\t<Draggable\n\t\t\telementId={ blockElementId }\n\t\t\ttransferData={ transferData }\n\t\t\tonDragStart={ onDragStart }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t>\n\t\t\t{\n\t\t\t\t( { onDraggableStart, onDraggableEnd } ) => {\n\t\t\t\t\treturn children( {\n\t\t\t\t\t\tonDraggableStart: onDraggableStart,\n\t\t\t\t\t\tonDraggableEnd: onDraggableEnd,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t</Draggable>\n\t);\n};\n\nexport default withSelect( ( select, { clientId } ) => {\n\tconst { getBlockIndex, getBlockRootClientId } = select( 'core/editor' );\n\treturn {\n\t\tindex: getBlockIndex( clientId ),\n\t\trootClientId: getBlockRootClientId( clientId ),\n\t};\n} )( BlockDraggable );\n","/**\n * External Dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDropZone,\n\twithFilters,\n} from '@wordpress/components';\nimport {\n\tpasteHandler,\n\tgetBlockTransforms,\n\tfindTransform,\n} from '@wordpress/blocks';\nimport { Component } from '@wordpress/element';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport MediaUploadCheck from '../media-upload/check';\n\nconst parseDropEvent = ( event ) => {\n\tlet result = {\n\t\tsrcRootClientId: null,\n\t\tsrcClientId: null,\n\t\tsrcIndex: null,\n\t\ttype: null,\n\t};\n\n\tif ( ! event.dataTransfer ) {\n\t\treturn result;\n\t}\n\n\ttry {\n\t\tresult = Object.assign( result, JSON.parse( event.dataTransfer.getData( 'text' ) ) );\n\t} catch ( err ) {\n\t\treturn result;\n\t}\n\n\treturn result;\n};\n\nclass BlockDropZone extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onFilesDrop = this.onFilesDrop.bind( this );\n\t\tthis.onHTMLDrop = this.onHTMLDrop.bind( this );\n\t\tthis.onDrop = this.onDrop.bind( this );\n\t}\n\n\tgetInsertIndex( position ) {\n\t\tconst { index } = this.props;\n\t\tif ( index !== undefined ) {\n\t\t\treturn position.y === 'top' ? index : index + 1;\n\t\t}\n\t}\n\n\tonFilesDrop( files, position ) {\n\t\tconst transformation = findTransform(\n\t\t\tgetBlockTransforms( 'from' ),\n\t\t\t( transform ) => transform.type === 'files' && transform.isMatch( files )\n\t\t);\n\n\t\tif ( transformation ) {\n\t\t\tconst insertIndex = this.getInsertIndex( position );\n\t\t\tconst blocks = transformation.transform( files, this.props.updateBlockAttributes );\n\t\t\tthis.props.insertBlocks( blocks, insertIndex );\n\t\t}\n\t}\n\n\tonHTMLDrop( HTML, position ) {\n\t\tconst blocks = pasteHandler( { HTML, mode: 'BLOCKS' } );\n\n\t\tif ( blocks.length ) {\n\t\t\tthis.props.insertBlocks( blocks, this.getInsertIndex( position ) );\n\t\t}\n\t}\n\n\tonDrop( event, position ) {\n\t\tconst { rootClientId: dstRootClientId, clientId: dstClientId, index: dstIndex, getClientIdsOfDescendants } = this.props;\n\t\tconst { srcRootClientId, srcClientId, srcIndex, type } = parseDropEvent( event );\n\n\t\tconst isBlockDropType = ( dropType ) => dropType === 'block';\n\t\tconst isSameLevel = ( srcRoot, dstRoot ) => {\n\t\t\t// Note that rootClientId of top-level blocks will be undefined OR a void string,\n\t\t\t// so we also need to account for that case separately.\n\t\t\treturn ( srcRoot === dstRoot ) || ( ! srcRoot === true && ! dstRoot === true );\n\t\t};\n\t\tconst isSameBlock = ( src, dst ) => src === dst;\n\t\tconst isSrcBlockAnAncestorOfDstBlock = ( src, dst ) => getClientIdsOfDescendants( [ src ] ).some( ( id ) => id === dst );\n\n\t\tif ( ! isBlockDropType( type ) ||\n\t\t\tisSameBlock( srcClientId, dstClientId ) ||\n\t\t\tisSrcBlockAnAncestorOfDstBlock( srcClientId, dstClientId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst positionIndex = this.getInsertIndex( position );\n\t\t// If the block is kept at the same level and moved downwards,\n\t\t// subtract to account for blocks shifting upward to occupy its old position.\n\t\tconst insertIndex = dstIndex && srcIndex < dstIndex && isSameLevel( srcRootClientId, dstRootClientId ) ? positionIndex - 1 : positionIndex;\n\t\tthis.props.moveBlockToPosition( srcClientId, srcRootClientId, insertIndex );\n\t}\n\n\trender() {\n\t\tconst { isLocked, index } = this.props;\n\t\tif ( isLocked ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst isAppender = index === undefined;\n\n\t\treturn (\n\t\t\t<MediaUploadCheck>\n\t\t\t\t<DropZone\n\t\t\t\t\tclassName={ classnames( 'editor-block-drop-zone', {\n\t\t\t\t\t\t'is-appender': isAppender,\n\t\t\t\t\t} ) }\n\t\t\t\t\tonFilesDrop={ this.onFilesDrop }\n\t\t\t\t\tonHTMLDrop={ this.onHTMLDrop }\n\t\t\t\t\tonDrop={ this.onDrop }\n\t\t\t\t/>\n\t\t\t</MediaUploadCheck>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst {\n\t\t\tinsertBlocks,\n\t\t\tupdateBlockAttributes,\n\t\t\tmoveBlockToPosition,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tinsertBlocks( blocks, index ) {\n\t\t\t\tconst { rootClientId } = ownProps;\n\n\t\t\t\tinsertBlocks( blocks, index, rootClientId );\n\t\t\t},\n\t\t\tupdateBlockAttributes( ...args ) {\n\t\t\t\tupdateBlockAttributes( ...args );\n\t\t\t},\n\t\t\tmoveBlockToPosition( srcClientId, srcRootClientId, dstIndex ) {\n\t\t\t\tconst { rootClientId: dstRootClientId } = ownProps;\n\t\t\t\tmoveBlockToPosition( srcClientId, srcRootClientId, dstRootClientId, dstIndex );\n\t\t\t},\n\t\t};\n\t} ),\n\twithSelect( ( select, { rootClientId } ) => {\n\t\tconst { getClientIdsOfDescendants, getTemplateLock } = select( 'core/editor' );\n\t\treturn {\n\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t\tgetClientIdsOfDescendants,\n\t\t};\n\t} ),\n\twithFilters( 'editor.BlockDropZone' )\n)( BlockDropZone );\n","/**\n * External dependencies\n */\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\nconst { Consumer, Provider } = createContext( {\n\tname: '',\n\tisSelected: false,\n\tfocusedElement: null,\n\tsetFocusedElement: noop,\n\tclientId: null,\n} );\n\nexport { Provider as BlockEditContextProvider };\n\n/**\n * A Higher Order Component used to inject BlockEdit context to the\n * wrapped component.\n *\n * @param {Function} mapContextToProps Function called on every context change,\n * expected to return object of props to\n * merge with the component's own props.\n *\n * @return {Component} Enhanced component with injected context as props.\n */\nexport const withBlockEditContext = ( mapContextToProps ) => createHigherOrderComponent( ( OriginalComponent ) => {\n\treturn ( props ) => (\n\t\t<Consumer>\n\t\t\t{ ( context ) => (\n\t\t\t\t<OriginalComponent\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t{ ...mapContextToProps( context, props ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Consumer>\n\t);\n}, 'withBlockEditContext' );\n\n/**\n * A Higher Order Component used to render conditionally the wrapped\n * component only when the BlockEdit has selected state set.\n *\n * @param {Component} OriginalComponent Component to wrap.\n *\n * @return {Component} Component which renders only when the BlockEdit is selected.\n */\nexport const ifBlockEditSelected = createHigherOrderComponent( ( OriginalComponent ) => {\n\treturn ( props ) => (\n\t\t<Consumer>\n\t\t\t{ ( { isSelected } ) => isSelected && (\n\t\t\t\t<OriginalComponent { ...props } />\n\t\t\t) }\n\t\t</Consumer>\n\t);\n}, 'ifBlockEditSelected' );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport { getBlockDefaultClassName, hasBlockSupport, getBlockType } from '@wordpress/blocks';\n\nexport const Edit = ( props ) => {\n\tconst { attributes = {}, name } = props;\n\tconst blockType = getBlockType( name );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// Generate a class name for the block's editable form\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true ) ?\n\t\tgetBlockDefaultClassName( name ) :\n\t\tnull;\n\tconst className = classnames( generatedClassName, attributes.className );\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\treturn <Component { ...props } className={ className } />;\n};\n\nexport default withFilters( 'editor.BlockEdit' )( Edit );\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport { BlockEditContextProvider } from './context';\n\nclass BlockEdit extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.setFocusedElement = this.setFocusedElement.bind( this );\n\n\t\tthis.state = {\n\t\t\tfocusedElement: null,\n\t\t\tsetFocusedElement: this.setFocusedElement,\n\t\t};\n\t}\n\n\tsetFocusedElement( focusedElement ) {\n\t\tthis.setState( ( prevState ) => {\n\t\t\tif ( prevState.focusedElement === focusedElement ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn { focusedElement };\n\t\t} );\n\t}\n\n\tstatic getDerivedStateFromProps( props ) {\n\t\tconst { clientId, name, isSelected } = props;\n\n\t\treturn {\n\t\t\tname,\n\t\t\tisSelected,\n\t\t\tclientId,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<BlockEditContextProvider value={ this.state }>\n\t\t\t\t<Edit { ...this.props } />\n\t\t\t</BlockEditContextProvider>\n\t\t);\n\t}\n}\n\nexport default BlockEdit;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ifBlockEditSelected } from '../block-edit/context';\n\nconst { Fill, Slot } = createSlotFill( 'BlockFormatControls' );\n\nconst BlockFormatControls = ifBlockEditSelected( Fill );\n\nBlockFormatControls.Slot = Slot;\n\nexport default BlockFormatControls;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Path, Icon, SVG } from '@wordpress/components';\n\nexport default function BlockIcon( { icon, showColors = false, className } ) {\n\tif ( get( icon, [ 'src' ] ) === 'block-default' ) {\n\t\ticon = {\n\t\t\tsrc: <SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><Path d=\"M19 7h-1V5h-4v2h-4V5H6v2H5c-1.1 0-2 .9-2 2v10h18V9c0-1.1-.9-2-2-2zm0 10H5V9h14v8z\" /></SVG>,\n\t\t};\n\t}\n\n\tconst renderedIcon = <Icon icon={ icon && icon.src ? icon.src : icon } />;\n\tconst style = showColors ? {\n\t\tbackgroundColor: icon && icon.background,\n\t\tcolor: icon && icon.foreground,\n\t} : {};\n\n\treturn (\n\t\t<span\n\t\t\tstyle={ style }\n\t\t\tclassName={ classnames(\n\t\t\t\t'editor-block-icon',\n\t\t\t\tclassName,\n\t\t\t\t{ 'has-colors': showColors }\n\t\t\t) }\n\t\t>\n\t\t\t{ renderedIcon }\n\t\t</span>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getBlockType, getUnregisteredTypeHandlerName } from '@wordpress/blocks';\nimport { PanelBody } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { Fragment } from '@wordpress/element';\n\n/**\n * Internal Dependencies\n */\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockIcon from '../block-icon';\nimport InspectorControls from '../inspector-controls';\nimport InspectorAdvancedControls from '../inspector-advanced-controls';\nimport BlockStyles from '../block-styles';\nimport MultiSelectionInspector from '../multi-selection-inspector';\n\nconst BlockInspector = ( { selectedBlockClientId, selectedBlockName, blockType, count, hasBlockStyles } ) => {\n\tif ( count > 1 ) {\n\t\treturn <MultiSelectionInspector />;\n\t}\n\n\tconst isSelectedBlockUnregistered = selectedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the selected block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tif ( ! blockType || ! selectedBlockClientId || isSelectedBlockUnregistered ) {\n\t\treturn <span className=\"editor-block-inspector__no-blocks\">{ __( 'No block selected.' ) }</span>;\n\t}\n\n\treturn (\n\t\t<Fragment>\n\t\t\t<div className=\"editor-block-inspector__card\">\n\t\t\t\t<BlockIcon icon={ blockType.icon } showColors />\n\t\t\t\t<div className=\"editor-block-inspector__card-content\">\n\t\t\t\t\t<div className=\"editor-block-inspector__card-title\">{ blockType.title }</div>\n\t\t\t\t\t<div className=\"editor-block-inspector__card-description\">{ blockType.description }</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ hasBlockStyles && (\n\t\t\t\t<div>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockStyles\n\t\t\t\t\t\t\tclientId={ selectedBlockClientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div><InspectorControls.Slot /></div>\n\t\t\t<div>\n\t\t\t\t<InspectorAdvancedControls.Slot>\n\t\t\t\t\t{ ( fills ) => ! isEmpty( fills ) && (\n\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\tclassName=\"editor-block-inspector__advanced\"\n\t\t\t\t\t\t\ttitle={ __( 'Advanced' ) }\n\t\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t) }\n\t\t\t\t</InspectorAdvancedControls.Slot>\n\t\t\t</div>\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</Fragment>\n\t);\n};\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst { getSelectedBlockClientId, getSelectedBlockCount, getBlockName } = select( 'core/editor' );\n\t\tconst { getBlockStyles } = select( 'core/blocks' );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectedBlockName = selectedBlockClientId && getBlockName( selectedBlockClientId );\n\t\tconst blockType = selectedBlockClientId && getBlockType( selectedBlockName );\n\t\tconst blockStyles = selectedBlockClientId && getBlockStyles( selectedBlockName );\n\t\treturn {\n\t\t\tcount: getSelectedBlockCount(),\n\t\t\thasBlockStyles: blockStyles && blockStyles.length > 0,\n\t\t\tselectedBlockName,\n\t\t\tselectedBlockClientId,\n\t\t\tblockType,\n\t\t};\n\t}\n)( BlockInspector );\n","/**\n * External dependencies\n */\nimport { last } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport { Button, Dashicon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport IgnoreNestedEvents from '../ignore-nested-events';\nimport DefaultBlockAppender from '../default-block-appender';\nimport Inserter from '../inserter';\n\nfunction BlockListAppender( {\n\tblockClientIds,\n\trootClientId,\n\tcanInsertDefaultBlock,\n\tisLocked,\n} ) {\n\tif ( isLocked ) {\n\t\treturn null;\n\t}\n\n\tif ( canInsertDefaultBlock ) {\n\t\treturn (\n\t\t\t<IgnoreNestedEvents childHandledEvents={ [ 'onFocus', 'onClick', 'onKeyDown' ] }>\n\t\t\t\t<DefaultBlockAppender\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tlastBlockClientId={ last( blockClientIds ) }\n\t\t\t\t/>\n\t\t\t</IgnoreNestedEvents>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"block-list-appender\">\n\t\t\t<Inserter\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\trenderToggle={ ( { onToggle, disabled, isOpen } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\taria-label={ __( 'Add block' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Dashicon icon=\"insert\" />\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default withSelect( ( select, { rootClientId } ) => {\n\tconst {\n\t\tgetBlockOrder,\n\t\tcanInsertBlockType,\n\t\tgetTemplateLock,\n\t} = select( 'core/editor' );\n\n\treturn {\n\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\tblockClientIds: getBlockOrder( rootClientId ),\n\t\tcanInsertDefaultBlock: canInsertBlockType( getDefaultBlockName(), rootClientId ),\n\t};\n} )( BlockListAppender );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport NavigableToolbar from '../navigable-toolbar';\nimport { BlockToolbar } from '../';\n\nfunction BlockContextualToolbar( { focusOnMount } ) {\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tclassName=\"editor-block-contextual-toolbar\"\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t>\n\t\t\t<BlockToolbar />\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default BlockContextualToolbar;\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\nclass BlockCrashBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\thasError: false,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tthis.props.onError( error );\n\n\t\tthis.setState( {\n\t\t\thasError: true,\n\t\t} );\n\t}\n\n\trender() {\n\t\tif ( this.state.hasError ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\nexport default BlockCrashBoundary;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning>\n\t\t{ __( 'This block has encountered an error and cannot be previewed.' ) }\n\t</Warning>\n);\n\nexport default () => warning;\n","\n/**\n * External Dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\nimport { isEqual } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { getBlockAttributes, getBlockContent, getBlockType, isValidBlockContent, getSaveContent } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\nexport class BlockHTML extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onBlur = this.onBlur.bind( this );\n\t\tthis.state = {\n\t\t\thtml: props.block.isValid ? getBlockContent( props.block ) : props.block.originalContent,\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! isEqual( this.props.block.attributes, prevProps.block.attributes ) ) {\n\t\t\tthis.setState( {\n\t\t\t\thtml: getBlockContent( this.props.block ),\n\t\t\t} );\n\t\t}\n\t}\n\n\tonBlur() {\n\t\tconst { html } = this.state;\n\t\tconst blockType = getBlockType( this.props.block.name );\n\t\tconst attributes = getBlockAttributes( blockType, html, this.props.block.attributes );\n\n\t\t// If html is empty we reset the block to the default HTML and mark it as valid to avoid triggering an error\n\t\tconst content = html ? html : getSaveContent( blockType, attributes );\n\t\tconst isValid = html ? isValidBlockContent( blockType, attributes, content ) : true;\n\n\t\tthis.props.onChange( this.props.clientId, attributes, content, isValid );\n\n\t\t// Ensure the state is updated if we reset so it displays the default content\n\t\tif ( ! html ) {\n\t\t\tthis.setState( { html: content } );\n\t\t}\n\t}\n\n\tonChange( event ) {\n\t\tthis.setState( { html: event.target.value } );\n\t}\n\n\trender() {\n\t\tconst { html } = this.state;\n\t\treturn (\n\t\t\t<TextareaAutosize\n\t\t\t\tclassName=\"editor-block-list__block-html-textarea\"\n\t\t\t\tvalue={ html }\n\t\t\t\tonBlur={ this.onBlur }\n\t\t\t\tonChange={ this.onChange }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => ( {\n\t\tblock: select( 'core/editor' ).getBlock( ownProps.clientId ),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonChange( clientId, attributes, originalContent, isValid ) {\n\t\t\tdispatch( 'core/editor' ).updateBlock( clientId, { attributes, originalContent, isValid } );\n\t\t},\n\t} ) ),\n] )( BlockHTML );\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, Modal } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport {\n\tgetBlockType,\n\tcreateBlock,\n\trawHandler,\n} from '@wordpress/blocks';\nimport { withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport BlockCompare from '../block-compare';\n\nexport class BlockInvalidWarning extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.state = { compare: false };\n\t\tthis.onCompare = this.onCompare.bind( this );\n\t\tthis.onCompareClose = this.onCompareClose.bind( this );\n\t}\n\n\tonCompare() {\n\t\tthis.setState( { compare: true } );\n\t}\n\n\tonCompareClose() {\n\t\tthis.setState( { compare: false } );\n\t}\n\n\trender() {\n\t\tconst { convertToHTML, convertToBlocks, convertToClassic, block } = this.props;\n\t\tconst hasHTMLBlock = !! getBlockType( 'core/html' );\n\t\tconst { compare } = this.state;\n\t\tconst hiddenActions = [\n\t\t\t{ title: __( 'Convert to Classic Block' ), onClick: convertToClassic },\n\t\t];\n\n\t\tif ( compare ) {\n\t\t\treturn (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t// translators: Dialog title to fix block content\n\t\t\t\t\t\t__( 'Resolve Block' )\n\t\t\t\t\t}\n\t\t\t\t\tonRequestClose={ this.onCompareClose }\n\t\t\t\t\tclassName=\"editor-block-compare\"\n\t\t\t\t>\n\t\t\t\t\t<BlockCompare\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tonKeep={ convertToHTML }\n\t\t\t\t\t\tonConvert={ convertToBlocks }\n\t\t\t\t\t\tconvertor={ blockToBlocks }\n\t\t\t\t\t\tconvertButtonText={ __( 'Convert to Blocks' ) }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Warning\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button key=\"convert\" onClick={ this.onCompare } isLarge isPrimary={ ! hasHTMLBlock }>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// translators: Button to fix block content\n\t\t\t\t\t\t\t_x( 'Resolve', 'imperative verb' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</Button>,\n\t\t\t\t\thasHTMLBlock && (\n\t\t\t\t\t\t<Button key=\"edit\" onClick={ convertToHTML } isLarge isPrimary>\n\t\t\t\t\t\t\t{ __( 'Convert to HTML' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t),\n\t\t\t\t] }\n\t\t\t\tsecondaryActions={ hiddenActions }\n\t\t\t>\n\t\t\t\t{ __( 'This block contains unexpected or invalid content.' ) }\n\t\t\t</Warning>\n\t\t);\n\t}\n}\n\nconst blockToClassic = ( block ) => createBlock( 'core/freeform', {\n\tcontent: block.originalContent,\n} );\nconst blockToHTML = ( block ) => createBlock( 'core/html', {\n\tcontent: block.originalContent,\n} );\nconst blockToBlocks = ( block ) => rawHandler( {\n\tHTML: block.originalContent,\n} );\n\nexport default withDispatch( ( dispatch, { block } ) => {\n\tconst { replaceBlock } = dispatch( 'core/editor' );\n\n\treturn {\n\t\tconvertToClassic() {\n\t\t\treplaceBlock( block.clientId, blockToClassic( block ) );\n\t\t},\n\t\tconvertToHTML() {\n\t\t\treplaceBlock( block.clientId, blockToHTML( block ) );\n\t\t},\n\t\tconvertToBlocks() {\n\t\t\treplaceBlock( block.clientId, blockToBlocks( block ) );\n\t\t},\n\t};\n} )( BlockInvalidWarning );\n","/**\n * WordPress dependencies\n */\nimport { ifViewportMatches } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport BlockMover from '../block-mover';\nimport VisualEditorInserter from '../inserter';\n\nfunction BlockMobileToolbar( { clientId } ) {\n\treturn (\n\t\t<div className=\"editor-block-list__block-mobile-toolbar\">\n\t\t\t<VisualEditorInserter />\n\t\t\t<BlockMover clientIds={ [ clientId ] } />\n\t\t</div>\n\t);\n}\n\nexport default ifViewportMatches( '< small' )( BlockMobileToolbar );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { get, reduce, size, first, last } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, Fragment } from '@wordpress/element';\nimport {\n\tfocus,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n\tplaceCaretAtVerticalEdge,\n} from '@wordpress/dom';\nimport { BACKSPACE, DELETE, ENTER } from '@wordpress/keycodes';\nimport {\n\tgetBlockType,\n\tgetSaveElement,\n\tisReusableBlock,\n\tisUnmodifiedDefaultBlock,\n\tgetUnregisteredTypeHandlerName,\n} from '@wordpress/blocks';\nimport { KeyboardShortcuts, withFilters } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockEdit from '../block-edit';\nimport BlockMover from '../block-mover';\nimport BlockDropZone from '../block-drop-zone';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockCrashWarning from './block-crash-warning';\nimport BlockCrashBoundary from './block-crash-boundary';\nimport BlockHtml from './block-html';\nimport BlockBreadcrumb from './breadcrumb';\nimport BlockContextualToolbar from './block-contextual-toolbar';\nimport BlockMultiControls from './multi-controls';\nimport BlockMobileToolbar from './block-mobile-toolbar';\nimport BlockInsertionPoint from './insertion-point';\nimport IgnoreNestedEvents from '../ignore-nested-events';\nimport InserterWithShortcuts from '../inserter-with-shortcuts';\nimport Inserter from '../inserter';\nimport HoverArea from './hover-area';\nimport { isInsideRootBlock } from '../../utils/dom';\n\nexport class BlockListBlock extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.setBlockListRef = this.setBlockListRef.bind( this );\n\t\tthis.bindBlockNode = this.bindBlockNode.bind( this );\n\t\tthis.setAttributes = this.setAttributes.bind( this );\n\t\tthis.maybeHover = this.maybeHover.bind( this );\n\t\tthis.forceFocusedContextualToolbar = this.forceFocusedContextualToolbar.bind( this );\n\t\tthis.hideHoverEffects = this.hideHoverEffects.bind( this );\n\t\tthis.mergeBlocks = this.mergeBlocks.bind( this );\n\t\tthis.insertBlocksAfter = this.insertBlocksAfter.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.preventDrag = this.preventDrag.bind( this );\n\t\tthis.onPointerDown = this.onPointerDown.bind( this );\n\t\tthis.deleteOrInsertAfterWrapper = this.deleteOrInsertAfterWrapper.bind( this );\n\t\tthis.onBlockError = this.onBlockError.bind( this );\n\t\tthis.onTouchStart = this.onTouchStart.bind( this );\n\t\tthis.onClick = this.onClick.bind( this );\n\t\tthis.onDragStart = this.onDragStart.bind( this );\n\t\tthis.onDragEnd = this.onDragEnd.bind( this );\n\t\tthis.selectOnOpen = this.selectOnOpen.bind( this );\n\t\tthis.onShiftSelection = this.onShiftSelection.bind( this );\n\t\tthis.hadTouchStart = false;\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t\tdragging: false,\n\t\t\tisHovered: false,\n\t\t};\n\t\tthis.isForcingContextualToolbar = false;\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.isSelected ) {\n\t\t\tthis.focusTabbable();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.isForcingContextualToolbar ) {\n\t\t\t// The forcing of contextual toolbar should only be true during one update,\n\t\t\t// after the first update normal conditions should apply.\n\t\t\tthis.isForcingContextualToolbar = false;\n\t\t}\n\t\tif ( this.props.isTypingWithinBlock || this.props.isSelected ) {\n\t\t\tthis.hideHoverEffects();\n\t\t}\n\n\t\tif ( this.props.isSelected && ! prevProps.isSelected ) {\n\t\t\tthis.focusTabbable( true );\n\t\t}\n\n\t\t// When triggering a multi-selection,\n\t\t// move the focus to the wrapper of the first selected block.\n\t\tif ( this.props.isFirstMultiSelected && ! prevProps.isFirstMultiSelected ) {\n\t\t\tthis.wrapperNode.focus();\n\t\t}\n\t}\n\n\tsetBlockListRef( node ) {\n\t\tthis.wrapperNode = node;\n\t\tthis.props.blockRef( node, this.props.clientId );\n\n\t\t// We need to rerender to trigger a rerendering of HoverArea\n\t\t// it depents on this.wrapperNode but we can't keep this.wrapperNode in state\n\t\t// Because we need it to be immediately availeble for `focusableTabbable` to work.\n\t\tthis.forceUpdate();\n\t}\n\n\tbindBlockNode( node ) {\n\t\tthis.node = node;\n\t}\n\n\t/**\n\t * When a block becomes selected, transition focus to an inner tabbable.\n\t *\n\t * @param {boolean} ignoreInnerBlocks Should not focus inner blocks.\n\t */\n\tfocusTabbable( ignoreInnerBlocks ) {\n\t\tconst { initialPosition } = this.props;\n\n\t\t// Focus is captured by the wrapper node, so while focus transition\n\t\t// should only consider tabbables within editable display, since it\n\t\t// may be the wrapper itself or a side control which triggered the\n\t\t// focus event, don't unnecessary transition to an inner tabbable.\n\t\tif ( this.wrapperNode.contains( document.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( this.node )\n\t\t\t.filter( isTextField )\n\t\t\t// Exclude inner blocks\n\t\t\t.filter( ( node ) => ! ignoreInnerBlocks || isInsideRootBlock( this.node, node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target = ( isReverse ? last : first )( textInputs );\n\n\t\tif ( ! target ) {\n\t\t\tthis.wrapperNode.focus();\n\t\t\treturn;\n\t\t}\n\n\t\ttarget.focus();\n\n\t\t// In reverse case, need to explicitly place caret position.\n\t\tif ( isReverse ) {\n\t\t\tplaceCaretAtHorizontalEdge( target, true );\n\t\t\tplaceCaretAtVerticalEdge( target, true );\n\t\t}\n\t}\n\n\tsetAttributes( attributes ) {\n\t\tconst { block, onChange } = this.props;\n\t\tconst type = getBlockType( block.name );\n\t\tonChange( block.clientId, attributes );\n\n\t\tconst metaAttributes = reduce( attributes, ( result, value, key ) => {\n\t\t\tif ( get( type, [ 'attributes', key, 'source' ] ) === 'meta' ) {\n\t\t\t\tresult[ type.attributes[ key ].meta ] = value;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, {} );\n\n\t\tif ( size( metaAttributes ) ) {\n\t\t\tthis.props.onMetaChange( metaAttributes );\n\t\t}\n\t}\n\n\tonTouchStart() {\n\t\t// Detect touchstart to disable hover on iOS\n\t\tthis.hadTouchStart = true;\n\t}\n\n\tonClick() {\n\t\t// Clear touchstart detection\n\t\t// Browser will try to emulate mouse events also see https://www.html5rocks.com/en/mobile/touchandmouse/\n\t\tthis.hadTouchStart = false;\n\t}\n\n\t/**\n\t * A mouseover event handler to apply hover effect when a pointer device is\n\t * placed within the bounds of the block. The mouseover event is preferred\n\t * over mouseenter because it may be the case that a previous mouseenter\n\t * event was blocked from being handled by a IgnoreNestedEvents component,\n\t * therefore transitioning out of a nested block to the bounds of the block\n\t * would otherwise not trigger a hover effect.\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/Events/mouseenter\n\t */\n\tmaybeHover() {\n\t\tconst { isPartOfMultiSelection, isSelected } = this.props;\n\t\tconst { isHovered } = this.state;\n\n\t\tif ( isHovered || isPartOfMultiSelection || isSelected ||\n\t\t\t\tthis.props.isMultiSelecting || this.hadTouchStart ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( { isHovered: true } );\n\t}\n\n\t/**\n\t * Sets the block state as unhovered if currently hovering. There are cases\n\t * where mouseleave may occur but the block is not hovered (multi-select),\n\t * so to avoid unnecesary renders, the state is only set if hovered.\n\t */\n\thideHoverEffects() {\n\t\tif ( this.state.isHovered ) {\n\t\t\tthis.setState( { isHovered: false } );\n\t\t}\n\t}\n\n\tmergeBlocks( forward = false ) {\n\t\tconst { block, previousBlockClientId, nextBlockClientId, onMerge } = this.props;\n\n\t\t// Do nothing when it's the first block.\n\t\tif (\n\t\t\t( ! forward && ! previousBlockClientId ) ||\n\t\t\t( forward && ! nextBlockClientId )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( forward ) {\n\t\t\tonMerge( block.clientId, nextBlockClientId );\n\t\t} else {\n\t\t\tonMerge( previousBlockClientId, block.clientId );\n\t\t}\n\t}\n\n\tinsertBlocksAfter( blocks ) {\n\t\tthis.props.onInsertBlocks( blocks, this.props.order + 1 );\n\t}\n\n\t/**\n\t * Marks the block as selected when focused and not already selected. This\n\t * specifically handles the case where block does not set focus on its own\n\t * (via `setFocus`), typically if there is no focusable input in the block.\n\t *\n\t * @return {void}\n\t */\n\tonFocus() {\n\t\tif ( ! this.props.isSelected && ! this.props.isPartOfMultiSelection ) {\n\t\t\tthis.props.onSelect();\n\t\t}\n\t}\n\n\t/**\n\t * Prevents default dragging behavior within a block to allow for multi-\n\t * selection to take effect unhampered.\n\t *\n\t * @param {DragEvent} event Drag event.\n\t *\n\t * @return {void}\n\t */\n\tpreventDrag( event ) {\n\t\tevent.preventDefault();\n\t}\n\n\t/**\n\t * Begins tracking cursor multi-selection when clicking down within block.\n\t *\n\t * @param {MouseEvent} event A mousedown event.\n\t *\n\t * @return {void}\n\t */\n\tonPointerDown( event ) {\n\t\t// Not the main button.\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n\t\tif ( event.button !== 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( event.shiftKey ) {\n\t\t\tif ( ! this.props.isSelected ) {\n\t\t\t\tthis.onShiftSelection();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} else {\n\t\t\tthis.props.onSelectionStart( this.props.clientId );\n\n\t\t\t// Allow user to escape out of a multi-selection to a singular\n\t\t\t// selection of a block via click. This is handled here since\n\t\t\t// onFocus excludes blocks involved in a multiselection, as\n\t\t\t// focus can be incurred by starting a multiselection (focus\n\t\t\t// moved to first block's multi-controls).\n\t\t\tif ( this.props.isPartOfMultiSelection ) {\n\t\t\t\tthis.props.onSelect();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Interprets keydown event intent to remove or insert after block if key\n\t * event occurs on wrapper node. This can occur when the block has no text\n\t * fields of its own, particularly after initial insertion, to allow for\n\t * easy deletion and continuous writing flow to add additional content.\n\t *\n\t * @param {KeyboardEvent} event Keydown event.\n\t */\n\tdeleteOrInsertAfterWrapper( event ) {\n\t\tconst { keyCode, target } = event;\n\n\t\tif (\n\t\t\t! this.props.isSelected ||\n\t\t\ttarget !== this.wrapperNode ||\n\t\t\tthis.props.isLocked\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( keyCode ) {\n\t\t\tcase ENTER:\n\t\t\t\t// Insert default block after current block if enter and event\n\t\t\t\t// not already handled by descendant.\n\t\t\t\tthis.props.onInsertDefaultBlockAfter();\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\n\t\t\tcase BACKSPACE:\n\t\t\tcase DELETE:\n\t\t\t\t// Remove block on backspace.\n\t\t\t\tconst { clientId, onRemove } = this.props;\n\t\t\t\tonRemove( clientId );\n\t\t\t\tevent.preventDefault();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tonBlockError( error ) {\n\t\tthis.setState( { error } );\n\t}\n\n\tonDragStart() {\n\t\tthis.setState( { dragging: true } );\n\t}\n\n\tonDragEnd() {\n\t\tthis.setState( { dragging: false } );\n\t}\n\n\tselectOnOpen( open ) {\n\t\tif ( open && ! this.props.isSelected ) {\n\t\t\tthis.props.onSelect();\n\t\t}\n\t}\n\n\tonShiftSelection() {\n\t\tif ( ! this.props.isSelectionEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { getBlockSelectionStart, onMultiSelect, onSelect } = this.props;\n\n\t\tif ( getBlockSelectionStart() ) {\n\t\t\tonMultiSelect( getBlockSelectionStart(), this.props.clientId );\n\t\t} else {\n\t\t\tonSelect( this.props.clientId );\n\t\t}\n\t}\n\n\tforceFocusedContextualToolbar() {\n\t\tthis.isForcingContextualToolbar = true;\n\t\t// trigger a re-render\n\t\tthis.setState( () => ( {} ) );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<HoverArea container={ this.wrapperNode }>\n\t\t\t\t{ ( { hoverArea } ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tblock,\n\t\t\t\t\t\torder,\n\t\t\t\t\t\tmode,\n\t\t\t\t\t\tisFocusMode,\n\t\t\t\t\t\thasFixedToolbar,\n\t\t\t\t\t\tisLocked,\n\t\t\t\t\t\tisFirst,\n\t\t\t\t\t\tisLast,\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\tisSelected,\n\t\t\t\t\t\tisPartOfMultiSelection,\n\t\t\t\t\t\tisFirstMultiSelected,\n\t\t\t\t\t\tisTypingWithinBlock,\n\t\t\t\t\t\tisCaretWithinFormattedText,\n\t\t\t\t\t\tisMultiSelecting,\n\t\t\t\t\t\tisEmptyDefaultBlock,\n\t\t\t\t\t\tisMovable,\n\t\t\t\t\t\tisPreviousBlockADefaultEmptyBlock,\n\t\t\t\t\t\tisParentOfSelectedBlock,\n\t\t\t\t\t\tisDraggable,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t} = this.props;\n\t\t\t\t\tconst isHovered = this.state.isHovered && ! isMultiSelecting;\n\t\t\t\t\tconst { name: blockName, isValid } = block;\n\t\t\t\t\tconst blockType = getBlockType( blockName );\n\t\t\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t\t\tconst blockLabel = sprintf( __( 'Block: %s' ), blockType.title );\n\t\t\t\t\t// The block as rendered in the editor is composed of general block UI\n\t\t\t\t\t// (mover, toolbar, wrapper) and the display of the block content.\n\n\t\t\t\t\tconst isUnregisteredBlock = block.name === getUnregisteredTypeHandlerName();\n\n\t\t\t\t\t// If the block is selected and we're typing the block should not appear.\n\t\t\t\t\t// Empty paragraph blocks should always show up as unselected.\n\t\t\t\t\tconst showEmptyBlockSideInserter = ( isSelected || isHovered ) && isEmptyDefaultBlock && isValid;\n\t\t\t\t\tconst showSideInserter = ( isSelected || isHovered ) && isEmptyDefaultBlock;\n\t\t\t\t\tconst shouldAppearSelected = ! isFocusMode && ! showSideInserter && isSelected && ! isTypingWithinBlock;\n\t\t\t\t\tconst shouldAppearHovered = ! isFocusMode && ! hasFixedToolbar && isHovered && ! isEmptyDefaultBlock;\n\t\t\t\t\t// We render block movers and block settings to keep them tabbale even if hidden\n\t\t\t\t\tconst shouldRenderMovers = ! isFocusMode && ( isSelected || hoverArea === 'left' ) && ! showEmptyBlockSideInserter && ! isMultiSelecting && ! isPartOfMultiSelection && ! isTypingWithinBlock;\n\t\t\t\t\tconst shouldShowBreadcrumb = ! isFocusMode && isHovered && ! isEmptyDefaultBlock;\n\t\t\t\t\tconst shouldShowContextualToolbar = ! hasFixedToolbar && ! showSideInserter && ( ( isSelected && ( ! isTypingWithinBlock || isCaretWithinFormattedText ) ) || isFirstMultiSelected );\n\t\t\t\t\tconst shouldShowMobileToolbar = shouldAppearSelected;\n\t\t\t\t\tconst { error, dragging } = this.state;\n\n\t\t\t\t\t// Insertion point can only be made visible if the block is at the\n\t\t\t\t\t// the extent of a multi-selection, or not in a multi-selection.\n\t\t\t\t\tconst shouldShowInsertionPoint = ( isPartOfMultiSelection && isFirstMultiSelected ) || ! isPartOfMultiSelection;\n\t\t\t\t\tconst canShowInBetweenInserter = ! isEmptyDefaultBlock && ! isPreviousBlockADefaultEmptyBlock;\n\n\t\t\t\t\t// The wp-block className is important for editor styles.\n\t\t\t\t\t// Generate the wrapper class names handling the different states of the block.\n\t\t\t\t\tconst wrapperClassName = classnames( 'wp-block editor-block-list__block', {\n\t\t\t\t\t\t'has-warning': ! isValid || !! error || isUnregisteredBlock,\n\t\t\t\t\t\t'is-selected': shouldAppearSelected,\n\t\t\t\t\t\t'is-multi-selected': isPartOfMultiSelection,\n\t\t\t\t\t\t'is-hovered': shouldAppearHovered,\n\t\t\t\t\t\t'is-reusable': isReusableBlock( blockType ),\n\t\t\t\t\t\t'is-dragging': dragging,\n\t\t\t\t\t\t'is-typing': isTypingWithinBlock,\n\t\t\t\t\t\t'is-focused': isFocusMode && ( isSelected || isParentOfSelectedBlock ),\n\t\t\t\t\t\t'is-focus-mode': isFocusMode,\n\t\t\t\t\t}, className );\n\n\t\t\t\t\tconst { onReplace } = this.props;\n\n\t\t\t\t\t// Determine whether the block has props to apply to the wrapper.\n\t\t\t\t\tlet wrapperProps = this.props.wrapperProps;\n\t\t\t\t\tif ( blockType.getEditWrapperProps ) {\n\t\t\t\t\t\twrapperProps = {\n\t\t\t\t\t\t\t...wrapperProps,\n\t\t\t\t\t\t\t...blockType.getEditWrapperProps( block.attributes ),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\tconst blockElementId = `block-${ clientId }`;\n\n\t\t\t\t\t// We wrap the BlockEdit component in a div that hides it when editing in\n\t\t\t\t\t// HTML mode. This allows us to render all of the ancillary pieces\n\t\t\t\t\t// (InspectorControls, etc.) which are inside `BlockEdit` but not\n\t\t\t\t\t// `BlockHTML`, even in HTML mode.\n\t\t\t\t\tlet blockEdit = (\n\t\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\t\tname={ blockName }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tattributes={ block.attributes }\n\t\t\t\t\t\t\tsetAttributes={ this.setAttributes }\n\t\t\t\t\t\t\tinsertBlocksAfter={ isLocked ? undefined : this.insertBlocksAfter }\n\t\t\t\t\t\t\tonReplace={ isLocked ? undefined : onReplace }\n\t\t\t\t\t\t\tmergeBlocks={ isLocked ? undefined : this.mergeBlocks }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tisSelectionEnabled={ this.props.isSelectionEnabled }\n\t\t\t\t\t\t\ttoggleSelection={ this.props.toggleSelection }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t\tif ( mode !== 'visual' ) {\n\t\t\t\t\t\tblockEdit = <div style={ { display: 'none' } }>{ blockEdit }</div>;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Disable reasons:\n\t\t\t\t\t//\n\t\t\t\t\t// jsx-a11y/mouse-events-have-key-events:\n\t\t\t\t\t// - onMouseOver is explicitly handling hover effects\n\t\t\t\t\t//\n\t\t\t\t\t// jsx-a11y/no-static-element-interactions:\n\t\t\t\t\t// - Each block can be selected by clicking on it\n\n\t\t\t\t\t/* eslint-disable jsx-a11y/mouse-events-have-key-events, jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<IgnoreNestedEvents\n\t\t\t\t\t\t\tid={ blockElementId }\n\t\t\t\t\t\t\tref={ this.setBlockListRef }\n\t\t\t\t\t\t\tonMouseOver={ this.maybeHover }\n\t\t\t\t\t\t\tonMouseOverHandled={ this.hideHoverEffects }\n\t\t\t\t\t\t\tonMouseLeave={ this.hideHoverEffects }\n\t\t\t\t\t\t\tclassName={ wrapperClassName }\n\t\t\t\t\t\t\tdata-type={ block.name }\n\t\t\t\t\t\t\tonTouchStart={ this.onTouchStart }\n\t\t\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\t\t\tonClick={ this.onClick }\n\t\t\t\t\t\t\tonKeyDown={ this.deleteOrInsertAfterWrapper }\n\t\t\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\t\t\taria-label={ blockLabel }\n\t\t\t\t\t\t\tchildHandledEvents={ [\n\t\t\t\t\t\t\t\t'onDragStart',\n\t\t\t\t\t\t\t\t'onMouseDown',\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t{ ...wrapperProps }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ shouldShowInsertionPoint && (\n\t\t\t\t\t\t\t\t<BlockInsertionPoint\n\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t\t\tcanShowInserter={ canShowInBetweenInserter }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<BlockDropZone\n\t\t\t\t\t\t\t\tindex={ order }\n\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ shouldRenderMovers && (\n\t\t\t\t\t\t\t\t<BlockMover\n\t\t\t\t\t\t\t\t\tclientIds={ clientId }\n\t\t\t\t\t\t\t\t\tblockElementId={ blockElementId }\n\t\t\t\t\t\t\t\t\tisFirst={ isFirst }\n\t\t\t\t\t\t\t\t\tisLast={ isLast }\n\t\t\t\t\t\t\t\t\tisHidden={ ! ( isHovered || isSelected ) || hoverArea !== 'left' }\n\t\t\t\t\t\t\t\t\tisDraggable={ ( isDraggable !== false ) && ( ! isPartOfMultiSelection && isMovable ) }\n\t\t\t\t\t\t\t\t\tonDragStart={ this.onDragStart }\n\t\t\t\t\t\t\t\t\tonDragEnd={ this.onDragEnd }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ isFirstMultiSelected && (\n\t\t\t\t\t\t\t\t<BlockMultiControls rootClientId={ rootClientId } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<div className=\"editor-block-list__block-edit\">\n\t\t\t\t\t\t\t\t{ shouldShowBreadcrumb && (\n\t\t\t\t\t\t\t\t\t<BlockBreadcrumb\n\t\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\t\tisHidden={ ! ( isHovered || isSelected ) || hoverArea !== 'left' }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ (\n\t\t\t\t\t\t\t\t\tshouldShowContextualToolbar ||\n\t\t\t\t\t\t\t\t\tthis.isForcingContextualToolbar\n\t\t\t\t\t\t\t\t) && (\n\t\t\t\t\t\t\t\t\t<BlockContextualToolbar\n\t\t\t\t\t\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\t\t\t\t\t\tfocusOnMount={ this.isForcingContextualToolbar }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ (\n\t\t\t\t\t\t\t\t\t! shouldShowContextualToolbar &&\n\t\t\t\t\t\t\t\t\tisSelected &&\n\t\t\t\t\t\t\t\t\t! hasFixedToolbar &&\n\t\t\t\t\t\t\t\t\t! isEmptyDefaultBlock\n\t\t\t\t\t\t\t\t) && (\n\t\t\t\t\t\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\t\t\t\t\t\tbindGlobal\n\t\t\t\t\t\t\t\t\t\teventName=\"keydown\"\n\t\t\t\t\t\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t\t\t\t\t\t'alt+f10': this.forceFocusedContextualToolbar,\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<IgnoreNestedEvents\n\t\t\t\t\t\t\t\t\tref={ this.bindBlockNode }\n\t\t\t\t\t\t\t\t\tonDragStart={ this.preventDrag }\n\t\t\t\t\t\t\t\t\tonMouseDown={ this.onPointerDown }\n\t\t\t\t\t\t\t\t\tdata-block={ clientId }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<BlockCrashBoundary onError={ this.onBlockError }>\n\t\t\t\t\t\t\t\t\t\t{ isValid && blockEdit }\n\t\t\t\t\t\t\t\t\t\t{ isValid && mode === 'html' && (\n\t\t\t\t\t\t\t\t\t\t\t<BlockHtml clientId={ clientId } />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ! isValid && [\n\t\t\t\t\t\t\t\t\t\t\t<BlockInvalidWarning\n\t\t\t\t\t\t\t\t\t\t\t\tkey=\"invalid-warning\"\n\t\t\t\t\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\t\t\t\t/>,\n\t\t\t\t\t\t\t\t\t\t\t<div key=\"invalid-preview\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ getSaveElement( blockType, block.attributes ) }\n\t\t\t\t\t\t\t\t\t\t\t</div>,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t</BlockCrashBoundary>\n\t\t\t\t\t\t\t\t\t{ shouldShowMobileToolbar && (\n\t\t\t\t\t\t\t\t\t\t<BlockMobileToolbar\n\t\t\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ !! error && <BlockCrashWarning /> }\n\t\t\t\t\t\t\t\t</IgnoreNestedEvents>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{ showEmptyBlockSideInserter && (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<div className=\"editor-block-list__side-inserter\">\n\t\t\t\t\t\t\t\t\t\t<InserterWithShortcuts\n\t\t\t\t\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t\t\t\t\tonToggle={ this.selectOnOpen }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div className=\"editor-block-list__empty-block-inserter\">\n\t\t\t\t\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\t\t\t\t\tposition=\"top right\"\n\t\t\t\t\t\t\t\t\t\t\tonToggle={ this.selectOnOpen }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</IgnoreNestedEvents>\n\t\t\t\t\t);\n\t\t\t\t\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/onclick-has-role, jsx-a11y/click-events-have-key-events */\n\t\t\t\t} }\n\t\t\t</HoverArea>\n\t\t);\n\t}\n}\n\nconst applyWithSelect = withSelect( ( select, { clientId, rootClientId, isLargeViewport } ) => {\n\tconst {\n\t\tisBlockSelected,\n\t\tgetPreviousBlockClientId,\n\t\tgetNextBlockClientId,\n\t\tgetBlock,\n\t\tisAncestorMultiSelected,\n\t\tisBlockMultiSelected,\n\t\tisFirstMultiSelectedBlock,\n\t\tisMultiSelecting,\n\t\tisTyping,\n\t\tisCaretWithinFormattedText,\n\t\tgetBlockIndex,\n\t\tgetBlockMode,\n\t\tisSelectionEnabled,\n\t\tgetSelectedBlocksInitialCaretPosition,\n\t\tgetEditorSettings,\n\t\thasSelectedInnerBlock,\n\t\tgetTemplateLock,\n\t\tgetBlockSelectionStart,\n\t} = select( 'core/editor' );\n\tconst isSelected = isBlockSelected( clientId );\n\tconst { hasFixedToolbar, focusMode } = getEditorSettings();\n\tconst block = getBlock( clientId );\n\tconst previousBlockClientId = getPreviousBlockClientId( clientId );\n\tconst previousBlock = getBlock( previousBlockClientId );\n\tconst templateLock = getTemplateLock( rootClientId );\n\tconst isParentOfSelectedBlock = hasSelectedInnerBlock( clientId, true );\n\n\treturn {\n\t\tnextBlockClientId: getNextBlockClientId( clientId ),\n\t\tisPartOfMultiSelection: isBlockMultiSelected( clientId ) || isAncestorMultiSelected( clientId ),\n\t\tisFirstMultiSelected: isFirstMultiSelectedBlock( clientId ),\n\t\tisMultiSelecting: isMultiSelecting(),\n\t\t// We only care about this prop when the block is selected\n\t\t// Thus to avoid unnecessary rerenders we avoid updating the prop if the block is not selected.\n\t\tisTypingWithinBlock: ( isSelected || isParentOfSelectedBlock ) && isTyping(),\n\t\tisCaretWithinFormattedText: isCaretWithinFormattedText(),\n\t\torder: getBlockIndex( clientId, rootClientId ),\n\t\tmode: getBlockMode( clientId ),\n\t\tisSelectionEnabled: isSelectionEnabled(),\n\t\tinitialPosition: getSelectedBlocksInitialCaretPosition(),\n\t\tisEmptyDefaultBlock: block && isUnmodifiedDefaultBlock( block ),\n\t\tisPreviousBlockADefaultEmptyBlock: previousBlock && isUnmodifiedDefaultBlock( previousBlock ),\n\t\tisMovable: 'all' !== templateLock,\n\t\tisLocked: !! templateLock,\n\t\tisFocusMode: focusMode && isLargeViewport,\n\t\thasFixedToolbar: hasFixedToolbar && isLargeViewport,\n\t\tpreviousBlockClientId,\n\t\tblock,\n\t\tisSelected,\n\t\tisParentOfSelectedBlock,\n\t\t// We only care about this value when the shift key is pressed.\n\t\t// We call it dynamically in the event handler to avoid unnecessary re-renders.\n\t\tgetBlockSelectionStart,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch, ownProps ) => {\n\tconst {\n\t\tupdateBlockAttributes,\n\t\tselectBlock,\n\t\tmultiSelect,\n\t\tinsertBlocks,\n\t\tinsertDefaultBlock,\n\t\tremoveBlock,\n\t\tmergeBlocks,\n\t\treplaceBlocks,\n\t\teditPost,\n\t\ttoggleSelection,\n\t} = dispatch( 'core/editor' );\n\n\treturn {\n\t\tonChange( clientId, attributes ) {\n\t\t\tupdateBlockAttributes( clientId, attributes );\n\t\t},\n\t\tonSelect( clientId = ownProps.clientId, initialPosition ) {\n\t\t\tselectBlock( clientId, initialPosition );\n\t\t},\n\t\tonMultiSelect: multiSelect,\n\t\tonInsertBlocks( blocks, index ) {\n\t\t\tconst { rootClientId } = ownProps;\n\t\t\tinsertBlocks( blocks, index, rootClientId );\n\t\t},\n\t\tonInsertDefaultBlockAfter() {\n\t\t\tconst { order, rootClientId } = ownProps;\n\t\t\tinsertDefaultBlock( {}, rootClientId, order + 1 );\n\t\t},\n\t\tonRemove( clientId ) {\n\t\t\tremoveBlock( clientId );\n\t\t},\n\t\tonMerge( ...args ) {\n\t\t\tmergeBlocks( ...args );\n\t\t},\n\t\tonReplace( blocks ) {\n\t\t\treplaceBlocks( [ ownProps.clientId ], blocks );\n\t\t},\n\t\tonMetaChange( meta ) {\n\t\t\teditPost( { meta } );\n\t\t},\n\t\ttoggleSelection( selectionEnabled ) {\n\t\t\ttoggleSelection( selectionEnabled );\n\t\t},\n\t};\n} );\n\nexport default compose(\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.BlockListBlock' ),\n)( BlockListBlock );\n","/**\n * WordPress dependencies\n */\nimport { Component, Fragment } from '@wordpress/element';\nimport { Toolbar } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\n\n/**\n * Block breadcrumb component, displaying the label of the block. If the block\n * descends from a root block, a button is displayed enabling the user to select\n * the root block.\n *\n * @param {string} props.clientId Client ID of block.\n * @param {string} props.rootClientId Client ID of block's root.\n * @param {Function} props.selectRootBlock Callback to select root block.\n */\nexport class BlockBreadcrumb extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisFocused: false,\n\t\t};\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onBlur = this.onBlur.bind( this );\n\t}\n\n\tonFocus( event ) {\n\t\tthis.setState( {\n\t\t\tisFocused: true,\n\t\t} );\n\n\t\t// This is used for improved interoperability\n\t\t// with the block's `onFocus` handler which selects the block, thus conflicting\n\t\t// with the intention to select the root block.\n\t\tevent.stopPropagation();\n\t}\n\n\tonBlur() {\n\t\tthis.setState( {\n\t\t\tisFocused: false,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { clientId, rootClientId } = this.props;\n\n\t\treturn (\n\t\t\t<div className={ 'editor-block-list__breadcrumb' }>\n\t\t\t\t<Toolbar>\n\t\t\t\t\t{ rootClientId && (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<BlockTitle clientId={ rootClientId } />\n\t\t\t\t\t\t\t<span className=\"editor-block-list__descendant-arrow\" />\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t) }\n\t\t\t\t\t<BlockTitle clientId={ clientId } />\n\t\t\t\t</Toolbar>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getBlockRootClientId } = select( 'core/editor' );\n\t\tconst { clientId } = ownProps;\n\n\t\treturn {\n\t\t\trootClientId: getBlockRootClientId( clientId ),\n\t\t};\n\t} ),\n] )( BlockBreadcrumb );\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\nclass HoverArea extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\thoverArea: null,\n\t\t};\n\t\tthis.onMouseLeave = this.onMouseLeave.bind( this );\n\t\tthis.onMouseMove = this.onMouseMove.bind( this );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( this.props.container ) {\n\t\t\tthis.toggleListeners( this.props.container, false );\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.container ) {\n\t\t\tthis.toggleListeners( this.props.container );\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.container === this.props.container ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( prevProps.container ) {\n\t\t\tthis.toggleListeners( prevProps.container, false );\n\t\t}\n\t\tif ( this.props.container ) {\n\t\t\tthis.toggleListeners( this.props.container, true );\n\t\t}\n\t}\n\n\ttoggleListeners( container, shouldListnerToEvents = true ) {\n\t\tconst method = shouldListnerToEvents ? 'addEventListener' : 'removeEventListener';\n\t\tcontainer[ method ]( 'mousemove', this.onMouseMove );\n\t\tcontainer[ method ]( 'mouseleave', this.onMouseLeave );\n\t}\n\n\tonMouseLeave() {\n\t\tif ( this.state.hoverArea ) {\n\t\t\tthis.setState( { hoverArea: null } );\n\t\t}\n\t}\n\n\tonMouseMove( event ) {\n\t\tconst { isRTL, container } = this.props;\n\t\tconst { width, left, right } = container.getBoundingClientRect();\n\n\t\tlet hoverArea = null;\n\t\tif ( ( event.clientX - left ) < width / 3 ) {\n\t\t\thoverArea = isRTL ? 'right' : 'left';\n\t\t} else if ( ( right - event.clientX ) < width / 3 ) {\n\t\t\thoverArea = isRTL ? 'left' : 'right';\n\t\t}\n\n\t\tif ( hoverArea !== this.state.hoverArea ) {\n\t\t\tthis.setState( { hoverArea } );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { hoverArea } = this.state;\n\t\tconst { children } = this.props;\n\n\t\treturn children( { hoverArea } );\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tisRTL: select( 'core/editor' ).getEditorSettings().isRTL,\n\t};\n} )( HoverArea );\n\n","/**\n * External dependencies\n */\nimport {\n\tfindLast,\n\tmap,\n\tinvert,\n\tmapValues,\n\tsortBy,\n\tthrottle,\n} from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockListBlock from './block';\nimport BlockListAppender from '../block-list-appender';\nimport { getBlockDOMNode } from '../../utils/dom';\n\nclass BlockList extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.onSelectionStart = this.onSelectionStart.bind( this );\n\t\tthis.onSelectionEnd = this.onSelectionEnd.bind( this );\n\t\tthis.setBlockRef = this.setBlockRef.bind( this );\n\t\tthis.setLastClientY = this.setLastClientY.bind( this );\n\t\tthis.onPointerMove = throttle( this.onPointerMove.bind( this ), 100 );\n\t\t// Browser does not fire `*move` event when the pointer position changes\n\t\t// relative to the document, so fire it with the last known position.\n\t\tthis.onScroll = () => this.onPointerMove( { clientY: this.lastClientY } );\n\n\t\tthis.lastClientY = 0;\n\t\tthis.nodes = {};\n\t}\n\n\tcomponentDidMount() {\n\t\twindow.addEventListener( 'mousemove', this.setLastClientY );\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener( 'mousemove', this.setLastClientY );\n\t}\n\n\tsetLastClientY( { clientY } ) {\n\t\tthis.lastClientY = clientY;\n\t}\n\n\tsetBlockRef( node, clientId ) {\n\t\tif ( node === null ) {\n\t\t\tdelete this.nodes[ clientId ];\n\t\t} else {\n\t\t\tthis.nodes = {\n\t\t\t\t...this.nodes,\n\t\t\t\t[ clientId ]: node,\n\t\t\t};\n\t\t}\n\t}\n\n\t/**\n\t * Handles a pointer move event to update the extent of the current cursor\n\t * multi-selection.\n\t *\n\t * @param {MouseEvent} event A mousemove event object.\n\t *\n\t * @return {void}\n\t */\n\tonPointerMove( { clientY } ) {\n\t\t// We don't start multi-selection until the mouse starts moving, so as\n\t\t// to avoid dispatching multi-selection actions on an in-place click.\n\t\tif ( ! this.props.isMultiSelecting ) {\n\t\t\tthis.props.onStartMultiSelect();\n\t\t}\n\n\t\tconst blockContentBoundaries = getBlockDOMNode( this.selectionAtStart ).getBoundingClientRect();\n\n\t\t// prevent multi-selection from triggering when the selected block is a float\n\t\t// and the cursor is still between the top and the bottom of the block.\n\t\tif ( clientY >= blockContentBoundaries.top && clientY <= blockContentBoundaries.bottom ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst y = clientY - blockContentBoundaries.top;\n\t\tconst key = findLast( this.coordMapKeys, ( coordY ) => coordY < y );\n\n\t\tthis.onSelectionChange( this.coordMap[ key ] );\n\t}\n\n\t/**\n\t * Binds event handlers to the document for tracking a pending multi-select\n\t * in response to a mousedown event occurring in a rendered block.\n\t *\n\t * @param {string} clientId Client ID of block where mousedown occurred.\n\t *\n\t * @return {void}\n\t */\n\tonSelectionStart( clientId ) {\n\t\tif ( ! this.props.isSelectionEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst boundaries = this.nodes[ clientId ].getBoundingClientRect();\n\n\t\t// Create a clientId to Y coördinate map.\n\t\tconst clientIdToCoordMap = mapValues( this.nodes, ( node ) =>\n\t\t\tnode.getBoundingClientRect().top - boundaries.top );\n\n\t\t// Cache a Y coördinate to clientId map for use in `onPointerMove`.\n\t\tthis.coordMap = invert( clientIdToCoordMap );\n\t\t// Cache an array of the Y coördinates for use in `onPointerMove`.\n\t\t// Sort the coördinates, as `this.nodes` will not necessarily reflect\n\t\t// the current block sequence.\n\t\tthis.coordMapKeys = sortBy( Object.values( clientIdToCoordMap ) );\n\t\tthis.selectionAtStart = clientId;\n\n\t\twindow.addEventListener( 'mousemove', this.onPointerMove );\n\t\t// Capture scroll on all elements.\n\t\twindow.addEventListener( 'scroll', this.onScroll, true );\n\t\twindow.addEventListener( 'mouseup', this.onSelectionEnd );\n\t}\n\n\t/**\n\t * Handles multi-selection changes in response to pointer move.\n\t *\n\t * @param {string} clientId Client ID of block under cursor in multi-select\n\t * drag.\n\t */\n\tonSelectionChange( clientId ) {\n\t\tconst { onMultiSelect, selectionStart, selectionEnd } = this.props;\n\t\tconst { selectionAtStart } = this;\n\t\tconst isAtStart = selectionAtStart === clientId;\n\n\t\tif ( ! selectionAtStart || ! this.props.isSelectionEnabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If multi-selecting and cursor extent returns to the start of\n\t\t// selection, cancel multi-select.\n\t\tif ( isAtStart && selectionStart ) {\n\t\t\tonMultiSelect( null, null );\n\t\t}\n\n\t\t// Expand multi-selection to block under cursor.\n\t\tif ( ! isAtStart && selectionEnd !== clientId ) {\n\t\t\tonMultiSelect( selectionAtStart, clientId );\n\t\t}\n\t}\n\n\t/**\n\t * Handles a mouseup event to end the current cursor multi-selection.\n\t *\n\t * @return {void}\n\t */\n\tonSelectionEnd() {\n\t\t// Cancel throttled calls.\n\t\tthis.onPointerMove.cancel();\n\n\t\tdelete this.coordMap;\n\t\tdelete this.coordMapKeys;\n\t\tdelete this.selectionAtStart;\n\n\t\twindow.removeEventListener( 'mousemove', this.onPointerMove );\n\t\twindow.removeEventListener( 'scroll', this.onScroll, true );\n\t\twindow.removeEventListener( 'mouseup', this.onSelectionEnd );\n\n\t\t// We may or may not be in a multi-selection when mouseup occurs (e.g.\n\t\t// an in-place mouse click), so only trigger stop if multi-selecting.\n\t\tif ( this.props.isMultiSelecting ) {\n\t\t\tthis.props.onStopMultiSelect();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tblockClientIds,\n\t\t\trootClientId,\n\t\t\tisDraggable,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<div className=\"editor-block-list__layout\">\n\t\t\t\t{ map( blockClientIds, ( clientId, blockIndex ) => (\n\t\t\t\t\t<BlockListBlock\n\t\t\t\t\t\tkey={ 'block-' + clientId }\n\t\t\t\t\t\tindex={ blockIndex }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\tblockRef={ this.setBlockRef }\n\t\t\t\t\t\tonSelectionStart={ this.onSelectionStart }\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tisFirst={ blockIndex === 0 }\n\t\t\t\t\t\tisLast={ blockIndex === blockClientIds.length - 1 }\n\t\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t\t<BlockListAppender rootClientId={ rootClientId } />\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tisSelectionEnabled,\n\t\t\tisMultiSelecting,\n\t\t\tgetMultiSelectedBlocksStartClientId,\n\t\t\tgetMultiSelectedBlocksEndClientId,\n\t\t} = select( 'core/editor' );\n\t\tconst { rootClientId } = ownProps;\n\n\t\treturn {\n\t\t\tblockClientIds: getBlockOrder( rootClientId ),\n\t\t\tselectionStart: getMultiSelectedBlocksStartClientId(),\n\t\t\tselectionEnd: getMultiSelectedBlocksEndClientId(),\n\t\t\tisSelectionEnabled: isSelectionEnabled(),\n\t\t\tisMultiSelecting: isMultiSelecting(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\tstartMultiSelect,\n\t\t\tstopMultiSelect,\n\t\t\tmultiSelect,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonStartMultiSelect: startMultiSelect,\n\t\t\tonStopMultiSelect: stopMultiSelect,\n\t\t\tonMultiSelect: multiSelect,\n\t\t};\n\t} ),\n] )( BlockList );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\n\nclass BlockInsertionPoint extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisInserterFocused: false,\n\t\t};\n\n\t\tthis.onBlurInserter = this.onBlurInserter.bind( this );\n\t\tthis.onFocusInserter = this.onFocusInserter.bind( this );\n\t}\n\n\tonFocusInserter( event ) {\n\t\t// Stop propagation of the focus event to avoid selecting the current\n\t\t// block while inserting a new block, as it is not relevant to sibling\n\t\t// insertion and conflicts with contextual toolbar placement.\n\t\tevent.stopPropagation();\n\n\t\tthis.setState( {\n\t\t\tisInserterFocused: true,\n\t\t} );\n\t}\n\n\tonBlurInserter() {\n\t\tthis.setState( {\n\t\t\tisInserterFocused: false,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { isInserterFocused } = this.state;\n\t\tconst {\n\t\t\tshowInsertionPoint,\n\t\t\tcanShowInserter,\n\t\t\trootClientId,\n\t\t\tinsertIndex,\n\t\t} = this.props;\n\n\t\treturn (\n\t\t\t<div className=\"editor-block-list__insertion-point\">\n\t\t\t\t{ showInsertionPoint && (\n\t\t\t\t\t<div className=\"editor-block-list__insertion-point-indicator\" />\n\t\t\t\t) }\n\t\t\t\t{ canShowInserter && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tonFocus={ this.onFocusInserter }\n\t\t\t\t\t\tonBlur={ this.onBlurInserter }\n\t\t\t\t\t\t// While ideally it would be enough to capture the\n\t\t\t\t\t\t// bubbling focus event from the Inserter, due to the\n\t\t\t\t\t\t// characteristics of click focusing of `button`s in\n\t\t\t\t\t\t// Firefox and Safari, it is not reliable.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\tclassnames( 'editor-block-list__insertion-point-inserter', {\n\t\t\t\t\t\t\t\t'is-visible': isInserterFocused,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\tindex={ insertIndex }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n}\nexport default withSelect( ( select, { clientId, rootClientId } ) => {\n\tconst {\n\t\tgetBlockIndex,\n\t\tgetBlockInsertionPoint,\n\t\tgetBlock,\n\t\tisBlockInsertionPointVisible,\n\t} = select( 'core/editor' );\n\tconst blockIndex = getBlockIndex( clientId, rootClientId );\n\tconst insertIndex = blockIndex;\n\tconst insertionPoint = getBlockInsertionPoint();\n\tconst block = getBlock( clientId );\n\tconst showInsertionPoint = (\n\t\tisBlockInsertionPointVisible() &&\n\t\tinsertionPoint.index === insertIndex &&\n\t\tinsertionPoint.rootClientId === rootClientId &&\n\t\t! isUnmodifiedDefaultBlock( block )\n\t);\n\n\treturn { showInsertionPoint, insertIndex };\n} )( BlockInsertionPoint );\n","/**\n * External dependencies\n */\nimport { first, last } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockMover from '../block-mover';\n\nfunction BlockListMultiControls( {\n\tmultiSelectedBlockClientIds,\n\tclientId,\n\tisSelecting,\n\tisFirst,\n\tisLast,\n} ) {\n\tif ( isSelecting ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockMover\n\t\t\tkey=\"mover\"\n\t\t\tclientId={ clientId }\n\t\t\tclientIds={ multiSelectedBlockClientIds }\n\t\t\tisFirst={ isFirst }\n\t\t\tisLast={ isLast }\n\t\t/>\n\t);\n}\n\nexport default withSelect( ( select, { clientId } ) => {\n\tconst {\n\t\tgetMultiSelectedBlockClientIds,\n\t\tisMultiSelecting,\n\t\tgetBlockIndex,\n\t\tgetBlockCount,\n\t} = select( 'core/editor' );\n\tconst clientIds = getMultiSelectedBlockClientIds();\n\tconst firstIndex = getBlockIndex( first( clientIds ), clientId );\n\tconst lastIndex = getBlockIndex( last( clientIds ), clientId );\n\n\treturn {\n\t\tmultiSelectedBlockClientIds: clientIds,\n\t\tisSelecting: isMultiSelecting(),\n\t\tisFirst: firstIndex === 0,\n\t\tisLast: lastIndex + 1 === getBlockCount(),\n\t};\n} )( BlockListMultiControls );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport BlockDraggable from '../block-draggable';\n\nexport const IconDragHandle = ( { isVisible, className, icon, onDragStart, onDragEnd, blockElementId, clientId } ) => {\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst dragHandleClassNames = classnames( 'editor-block-mover__control-drag-handle', className );\n\n\treturn (\n\t\t<BlockDraggable\n\t\t\tclientId={ clientId }\n\t\t\tblockElementId={ blockElementId }\n\t\t\tonDragStart={ onDragStart }\n\t\t\tonDragEnd={ onDragEnd }\n\t\t>\n\t\t\t{\n\t\t\t\t( { onDraggableStart, onDraggableEnd } ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ dragHandleClassNames }\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tonDragStart={ onDraggableStart }\n\t\t\t\t\t\tonDragEnd={ onDraggableEnd }\n\t\t\t\t\t\tdraggable\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t</BlockDraggable>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { Path, Polygon, SVG } from '@wordpress/components';\n\nexport const upArrow = (\n\t<SVG width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 18\">\n\t\t<Polygon points=\"9,4.5 3.3,10.1 4.8,11.5 9,7.3 13.2,11.5 14.7,10.1 \" />\n\t</SVG>\n);\n\nexport const downArrow = (\n\t<SVG width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 18\">\n\t\t<Polygon points=\"9,13.5 14.7,7.9 13.2,6.5 9,10.7 4.8,6.5 3.3,7.9 \" />\n\t</SVG>\n);\n\nexport const dragHandle = (\n\t<SVG width=\"18\" height=\"18\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 18 18\">\n\t\t<Path d=\"M13,8c0.6,0,1-0.4,1-1s-0.4-1-1-1s-1,0.4-1,1S12.4,8,13,8z M5,6C4.4,6,4,6.4,4,7s0.4,1,1,1s1-0.4,1-1S5.6,6,5,6z M5,10\n\t\t\tc-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S5.6,10,5,10z M13,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S13.6,10,13,10z M9,6\n\t\t\tC8.4,6,8,6.4,8,7s0.4,1,1,1s1-0.4,1-1S9.6,6,9,6z M9,10c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S9.6,10,9,10z\" />\n\t</SVG>\n);\n","/**\n * External dependencies\n */\nimport { first, partial, castArray } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withInstanceId, compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getBlockMoverDescription } from './mover-description';\nimport { upArrow, downArrow, dragHandle } from './icons';\nimport { IconDragHandle } from './drag-handle';\n\nexport class BlockMover extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisFocused: false,\n\t\t};\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onBlur = this.onBlur.bind( this );\n\t}\n\n\tonFocus() {\n\t\tthis.setState( {\n\t\t\tisFocused: true,\n\t\t} );\n\t}\n\n\tonBlur() {\n\t\tthis.setState( {\n\t\t\tisFocused: false,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { onMoveUp, onMoveDown, isFirst, isLast, isDraggable, onDragStart, onDragEnd, clientIds, blockElementId, blockType, firstIndex, isLocked, instanceId, isHidden } = this.props;\n\t\tconst { isFocused } = this.state;\n\t\tconst blocksCount = castArray( clientIds ).length;\n\t\tif ( isLocked || ( isFirst && isLast ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// We emulate a disabled state because forcefully applying the `disabled`\n\t\t// attribute on the button while it has focus causes the screen to change\n\t\t// to an unfocused state (body as active element) without firing blur on,\n\t\t// the rendering parent, leaving it unable to react to focus out.\n\t\treturn (\n\t\t\t<div className={ classnames( 'editor-block-mover', { 'is-visible': isFocused || ! isHidden } ) }>\n\t\t\t\t<IconButton\n\t\t\t\t\tclassName=\"editor-block-mover__control\"\n\t\t\t\t\tonClick={ isFirst ? null : onMoveUp }\n\t\t\t\t\ticon={ upArrow }\n\t\t\t\t\tlabel={ __( 'Move up' ) }\n\t\t\t\t\taria-describedby={ `editor-block-mover__up-description-${ instanceId }` }\n\t\t\t\t\taria-disabled={ isFirst }\n\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\tonBlur={ this.onBlur }\n\t\t\t\t/>\n\t\t\t\t<IconDragHandle\n\t\t\t\t\tclassName=\"editor-block-mover__control\"\n\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\tclientId={ clientIds }\n\t\t\t\t\tblockElementId={ blockElementId }\n\t\t\t\t\tisVisible={ isDraggable }\n\t\t\t\t\tonDragStart={ onDragStart }\n\t\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\t/>\n\t\t\t\t<IconButton\n\t\t\t\t\tclassName=\"editor-block-mover__control\"\n\t\t\t\t\tonClick={ isLast ? null : onMoveDown }\n\t\t\t\t\ticon={ downArrow }\n\t\t\t\t\tlabel={ __( 'Move down' ) }\n\t\t\t\t\taria-describedby={ `editor-block-mover__down-description-${ instanceId }` }\n\t\t\t\t\taria-disabled={ isLast }\n\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\tonBlur={ this.onBlur }\n\t\t\t\t/>\n\t\t\t\t<span id={ `editor-block-mover__up-description-${ instanceId }` } className=\"editor-block-mover__description\">\n\t\t\t\t\t{\n\t\t\t\t\t\tgetBlockMoverDescription(\n\t\t\t\t\t\t\tblocksCount,\n\t\t\t\t\t\t\tblockType && blockType.title,\n\t\t\t\t\t\t\tfirstIndex,\n\t\t\t\t\t\t\tisFirst,\n\t\t\t\t\t\t\tisLast,\n\t\t\t\t\t\t\t-1,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t<span id={ `editor-block-mover__down-description-${ instanceId }` } className=\"editor-block-mover__description\">\n\t\t\t\t\t{\n\t\t\t\t\t\tgetBlockMoverDescription(\n\t\t\t\t\t\t\tblocksCount,\n\t\t\t\t\t\t\tblockType && blockType.title,\n\t\t\t\t\t\t\tfirstIndex,\n\t\t\t\t\t\t\tisFirst,\n\t\t\t\t\t\t\tisLast,\n\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { clientIds } ) => {\n\t\tconst { getBlock, getBlockIndex, getTemplateLock, getBlockRootClientId } = select( 'core/editor' );\n\t\tconst firstClientId = first( castArray( clientIds ) );\n\t\tconst block = getBlock( firstClientId );\n\t\tconst rootClientId = getBlockRootClientId( first( castArray( clientIds ) ) );\n\n\t\treturn {\n\t\t\tfirstIndex: getBlockIndex( firstClientId, rootClientId ),\n\t\t\tblockType: block ? getBlockType( block.name ) : null,\n\t\t\tisLocked: getTemplateLock( rootClientId ) === 'all',\n\t\t\trootClientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { clientIds, rootClientId } ) => {\n\t\tconst { moveBlocksDown, moveBlocksUp } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonMoveDown: partial( moveBlocksDown, clientIds, rootClientId ),\n\t\t\tonMoveUp: partial( moveBlocksUp, clientIds, rootClientId ),\n\t\t};\n\t} ),\n\twithInstanceId,\n)( BlockMover );\n","/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {string} type Block type - in the case of a single block, should\n * define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n *\n * @return {string} Label for the block movement controls.\n */\nexport function getBlockMoverDescription( selectedCount, type, firstIndex, isFirst, isLast, dir ) {\n\tconst position = ( firstIndex + 1 );\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription( selectedCount, firstIndex, isFirst, isLast, dir );\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\treturn sprintf( __( 'Block %s is the only block, and cannot be moved' ), type );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\treturn sprintf(\n\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t__( 'Move %1$s block from position %2$d down to position %3$d' ),\n\t\t\ttype,\n\t\t\tposition,\n\t\t\t( position + 1 )\n\t\t);\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and is the last item\n\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\treturn sprintf( __( 'Block %s is at the end of the content and cant be moved down' ), type );\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\treturn sprintf(\n\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\ttype,\n\t\t\tposition,\n\t\t\t( position - 1 )\n\t\t);\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and is the first item\n\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\treturn sprintf( __( 'Block %s is at the beginning of the content and cant be moved up' ), type );\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number} selectedCount Number of blocks selected.\n * @param {number} firstIndex The index (position - 1) of the first block selected.\n * @param {boolean} isFirst This is the first block.\n * @param {boolean} isLast This is the last block.\n * @param {number} dir Direction of movement (> 0 is considered to be going\n * down, < 0 is up).\n *\n * @return {string} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription( selectedCount, firstIndex, isFirst, isLast, dir ) {\n\tconst position = ( firstIndex + 1 );\n\n\tif ( dir < 0 && isFirst ) {\n\t\treturn __( 'Blocks cannot be moved up as they are already at the top' );\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\treturn __( 'Blocks cannot be moved down as they are already at the bottom' );\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t_n(\n\t\t\t\t'Move %1$d block from position %2$d up by one place',\n\t\t\t\t'Move %1$d blocks from position %2$d up by one place',\n\t\t\t\tselectedCount\n\t\t\t),\n\t\t\tselectedCount,\n\t\t\tposition\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t_n(\n\t\t\t\t'Move %1$d block from position %2$d down by one place',\n\t\t\t\t'Move %1$d blocks from position %2$d down by one place',\n\t\t\t\tselectedCount\n\t\t\t),\n\t\t\tselectedCount,\n\t\t\tposition\n\t\t);\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { IconButton, Dropdown, SVG, Path, KeyboardShortcuts } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { rawShortcut, displayShortcut } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport BlockNavigation from './';\n\nconst MenuIcon = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"20\" height=\"20\">\n\t\t<Path d=\"M5 5H3v2h2V5zm3 8h11v-2H8v2zm9-8H6v2h11V5zM7 11H5v2h2v-2zm0 8h2v-2H7v2zm3-2v2h11v-2H10z\" />\n\t</SVG>\n);\n\nfunction BlockNavigationDropdown() {\n\treturn\t(\n\t\t<Dropdown\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\t\tbindGlobal\n\t\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t\t[ rawShortcut.access( 'o' ) ]: onToggle,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\ticon={ MenuIcon }\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tlabel={ __( 'Block Navigation' ) }\n\t\t\t\t\t\tclassName=\"editor-block-navigation\"\n\t\t\t\t\t\tshortcut={ displayShortcut.access( 'o' ) }\n\t\t\t\t\t/>\n\t\t\t\t</Fragment>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<BlockNavigation onSelect={ onClose } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default BlockNavigationDropdown;\n","/**\n * External dependencies\n */\nimport { map, noop } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { Button, NavigableMenu } from '@wordpress/components';\nimport { getBlockType } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction BlockNavigationList( {\n\tblocks,\n\tselectedBlockClientId,\n\tselectBlock,\n\tshowNestedBlocks,\n} ) {\n\treturn (\n\t\t/*\n\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t */\n\t\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t\t<ul className=\"editor-block-navigation__list\" role=\"list\">\n\t\t\t{ map( blocks, ( block ) => {\n\t\t\t\tconst blockType = getBlockType( block.name );\n\t\t\t\tconst isSelected = block.clientId === selectedBlockClientId;\n\n\t\t\t\treturn (\n\t\t\t\t\t<li key={ block.clientId }>\n\t\t\t\t\t\t<div className=\"editor-block-navigation__item\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName={ classnames( 'editor-block-navigation__item-button', {\n\t\t\t\t\t\t\t\t\t'is-selected': block.clientId === selectedBlockClientId,\n\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\tonClick={ () => selectBlock( block.clientId ) }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockIcon icon={ blockType.icon } showColors />\n\t\t\t\t\t\t\t\t{ blockType.title }\n\t\t\t\t\t\t\t\t{ isSelected && <span className=\"screen-reader-text\">{ __( '(selected block)' ) }</span> }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ showNestedBlocks && !! block.innerBlocks && !! block.innerBlocks.length && (\n\t\t\t\t\t\t\t<BlockNavigationList\n\t\t\t\t\t\t\t\tblocks={ block.innerBlocks }\n\t\t\t\t\t\t\t\tselectedBlockClientId={ selectedBlockClientId }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowNestedBlocks\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ul>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nfunction BlockNavigation( { rootBlock, rootBlocks, selectedBlockClientId, selectBlock } ) {\n\tconst hasHierarchy = (\n\t\trootBlock && (\n\t\t\trootBlock.clientId !== selectedBlockClientId ||\n\t\t\t( rootBlock.innerBlocks && rootBlock.innerBlocks.length !== 0 )\n\t\t)\n\t);\n\n\treturn (\n\t\t<NavigableMenu\n\t\t\trole=\"presentation\"\n\t\t\tclassName=\"editor-block-navigation__container\"\n\t\t>\n\t\t\t<p className=\"editor-block-navigation__label\">{ __( 'Block Navigation' ) }</p>\n\t\t\t{ hasHierarchy && (\n\t\t\t\t<BlockNavigationList\n\t\t\t\t\tblocks={ [ rootBlock ] }\n\t\t\t\t\tselectedBlockClientId={ selectedBlockClientId }\n\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\tshowNestedBlocks\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! hasHierarchy && (\n\t\t\t\t<BlockNavigationList\n\t\t\t\t\tblocks={ rootBlocks }\n\t\t\t\t\tselectedBlockClientId={ selectedBlockClientId }\n\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ( ! rootBlocks || rootBlocks.length === 0 ) && (\n\t\t\t\t// If there are no blocks in this document, don't render a list of blocks.\n\t\t\t\t// Instead: inform the user no blocks exist yet.\n\t\t\t\t<p className=\"editor-block-navigation__paragraph\">\n\t\t\t\t\t{ __( 'No blocks created yet.' ) }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</NavigableMenu>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetBlockHierarchyRootClientId,\n\t\t\tgetBlock,\n\t\t\tgetBlocks,\n\t\t} = select( 'core/editor' );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\trootBlocks: getBlocks(),\n\t\t\trootBlock: selectedBlockClientId ? getBlock( getBlockHierarchyRootClientId( selectedBlockClientId ) ) : null,\n\t\t\tselectedBlockClientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { onSelect = noop } ) => {\n\t\treturn {\n\t\t\tselectBlock( clientId ) {\n\t\t\t\tdispatch( 'core/editor' ).selectBlock( clientId );\n\t\t\t\tonSelect( clientId );\n\t\t\t},\n\t\t};\n\t} )\n)( BlockNavigation );\n","/**\n * External dependencies\n */\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createBlock } from '@wordpress/blocks';\nimport { Disabled } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockEdit from '../block-edit';\n\n/**\n * Block Preview Component: It renders a preview given a block name and attributes.\n *\n * @param {Object} props Component props.\n *\n * @return {WPElement} Rendered element.\n */\nfunction BlockPreview( props ) {\n\treturn (\n\t\t<div className=\"editor-block-preview\">\n\t\t\t<div className=\"editor-block-preview__title\">{ __( 'Preview' ) }</div>\n\t\t\t<BlockPreviewContent { ...props } />\n\t\t</div>\n\t);\n}\n\nexport function BlockPreviewContent( { name, attributes } ) {\n\tconst block = createBlock( name, attributes );\n\treturn (\n\t\t<Disabled className=\"editor-block-preview__content editor-styles-wrapper\" aria-hidden>\n\t\t\t<BlockEdit\n\t\t\t\tname={ name }\n\t\t\t\tfocus={ false }\n\t\t\t\tattributes={ block.attributes }\n\t\t\t\tsetAttributes={ noop }\n\t\t\t/>\n\t\t</Disabled>\n\t);\n}\n\nexport default BlockPreview;\n","/**\n * External dependencies\n */\nimport { omit } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nclass BlockSelectionClearer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\t\tthis.clearSelectionIfFocusTarget = this.clearSelectionIfFocusTarget.bind( this );\n\t}\n\n\tbindContainer( ref ) {\n\t\tthis.container = ref;\n\t}\n\n\t/**\n\t * Clears the selected block on focus if the container is the target of the\n\t * focus. This assumes no other descendents have received focus until event\n\t * has bubbled to the container.\n\t *\n\t * @param {FocusEvent} event Focus event.\n\t */\n\tclearSelectionIfFocusTarget( event ) {\n\t\tconst {\n\t\t\thasSelectedBlock,\n\t\t\thasMultiSelection,\n\t\t\tclearSelectedBlock,\n\t\t} = this.props;\n\n\t\tconst hasSelection = ( hasSelectedBlock || hasMultiSelection );\n\t\tif ( event.target === this.container && hasSelection ) {\n\t\t\tclearSelectedBlock();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonFocus={ this.clearSelectionIfFocusTarget }\n\t\t\t\tref={ this.bindContainer }\n\t\t\t\t{ ...omit( this.props, [\n\t\t\t\t\t'clearSelectedBlock',\n\t\t\t\t\t'hasSelectedBlock',\n\t\t\t\t\t'hasMultiSelection',\n\t\t\t\t] ) }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { hasSelectedBlock, hasMultiSelection } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\thasSelectedBlock: hasSelectedBlock(),\n\t\t\thasMultiSelection: hasMultiSelection(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { clearSelectedBlock } = dispatch( 'core/editor' );\n\t\treturn { clearSelectedBlock };\n\t} ),\n] )( BlockSelectionClearer );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\n\nexport default function BlockConvertButton( { shouldRender, onClick, small } ) {\n\tif ( ! shouldRender ) {\n\t\treturn null;\n\t}\n\n\tconst label = __( 'Convert to Blocks' );\n\treturn (\n\t\t<MenuItem\n\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\tonClick={ onClick }\n\t\t\ticon=\"screenoptions\"\n\t\t\tlabel={ small ? label : undefined }\n\t\t>\n\t\t\t{ ! small && label }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { rawHandler, getBlockContent } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockConvertButton from './block-convert-button';\n\nexport default compose(\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst block = select( 'core/editor' ).getBlock( clientId );\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tshouldRender: ( block && block.name === 'core/html' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { block } ) => ( {\n\t\tonClick: () => dispatch( 'core/editor' ).replaceBlocks(\n\t\t\tblock.clientId,\n\t\t\trawHandler( { HTML: getBlockContent( block ) } ),\n\t\t),\n\t} ) ),\n)( BlockConvertButton );\n","/**\n * External dependencies\n */\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nexport function BlockModeToggle( { blockType, mode, onToggleMode, small = false } ) {\n\tif ( ! hasBlockSupport( blockType, 'html', true ) ) {\n\t\treturn null;\n\t}\n\n\tconst label = mode === 'visual' ?\n\t\t__( 'Edit as HTML' ) :\n\t\t__( 'Edit visually' );\n\n\treturn (\n\t\t<MenuItem\n\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\tonClick={ onToggleMode }\n\t\t\ticon=\"html\"\n\t\t\tlabel={ small ? label : undefined }\n\t\t>\n\t\t\t{ ! small && label }\n\t\t</MenuItem>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlock, getBlockMode } = select( 'core/editor' );\n\t\tconst block = getBlock( clientId );\n\n\t\treturn {\n\t\t\tmode: getBlockMode( clientId ),\n\t\t\tblockType: block ? getBlockType( block.name ) : null,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { onToggle = noop, clientId } ) => ( {\n\t\tonToggleMode() {\n\t\t\tdispatch( 'core/editor' ).toggleBlockMode( clientId );\n\t\t\tonToggle();\n\t\t},\n\t} ) ),\n] )( BlockModeToggle );\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: _BlockSettingsMenuFirstItem, Slot } = createSlotFill( '_BlockSettingsMenuFirstItem' );\n\n_BlockSettingsMenuFirstItem.Slot = Slot;\n\nexport default _BlockSettingsMenuFirstItem;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: _BlockSettingsMenuPluginsExtension, Slot } = createSlotFill( '_BlockSettingsMenuPluginsExtension' );\n\n_BlockSettingsMenuPluginsExtension.Slot = Slot;\n\nexport default _BlockSettingsMenuPluginsExtension;\n","/**\n * WordPress dependencies\n */\nimport { getFreeformContentHandlerName, rawHandler, serialize } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockConvertButton from './block-convert-button';\n\nexport default compose(\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst block = select( 'core/editor' ).getBlock( clientId );\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tshouldRender: ( block && block.name === getFreeformContentHandlerName() ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { block } ) => ( {\n\t\tonClick: () => dispatch( 'core/editor' ).replaceBlocks(\n\t\t\tblock.clientId,\n\t\t\trawHandler( { HTML: serialize( block ) } )\n\t\t),\n\t} ) ),\n)( BlockConvertButton );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\nimport { Toolbar, Dropdown, NavigableMenu, MenuItem } from '@wordpress/components';\nimport { withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { shortcuts } from '../editor-global-keyboard-shortcuts';\nimport BlockActions from '../block-actions';\nimport BlockModeToggle from './block-mode-toggle';\nimport ReusableBlockConvertButton from './reusable-block-convert-button';\nimport ReusableBlockDeleteButton from './reusable-block-delete-button';\nimport BlockHTMLConvertButton from './block-html-convert-button';\nimport BlockUnknownConvertButton from './block-unknown-convert-button';\nimport _BlockSettingsMenuFirstItem from './block-settings-menu-first-item';\nimport _BlockSettingsMenuPluginsExtension from './block-settings-menu-plugins-extension';\n\nexport function BlockSettingsMenu( { clientIds, onSelect } ) {\n\tconst blockClientIds = castArray( clientIds );\n\tconst count = blockClientIds.length;\n\tconst firstBlockClientId = blockClientIds[ 0 ];\n\n\treturn (\n\t\t<BlockActions clientIds={ clientIds }>\n\t\t\t{ ( { onDuplicate, onRemove, onInsertAfter, onInsertBefore, canDuplicate, isLocked } ) => (\n\t\t\t\t<Dropdown\n\t\t\t\t\tcontentClassName=\"editor-block-settings-menu__popover\"\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\t\tconst toggleClassname = classnames( 'editor-block-settings-menu__toggle', {\n\t\t\t\t\t\t\t'is-opened': isOpen,\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tconst label = isOpen ? __( 'Hide options' ) : __( 'More options' );\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Toolbar controls={ [ {\n\t\t\t\t\t\t\t\ticon: 'ellipsis',\n\t\t\t\t\t\t\t\ttitle: label,\n\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\tif ( count === 1 ) {\n\t\t\t\t\t\t\t\t\t\tonSelect( firstBlockClientId );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tclassName: toggleClassname,\n\t\t\t\t\t\t\t\textraProps: { 'aria-expanded': isOpen },\n\t\t\t\t\t\t\t} ] } />\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<NavigableMenu className=\"editor-block-settings-menu__content\">\n\t\t\t\t\t\t\t<_BlockSettingsMenuFirstItem.Slot fillProps={ { onClose } } />\n\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t<BlockUnknownConvertButton\n\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t<BlockHTMLConvertButton\n\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! isLocked && canDuplicate && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\t\t\t\t\tonClick={ onDuplicate }\n\t\t\t\t\t\t\t\t\ticon=\"admin-page\"\n\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.duplicate.display }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! isLocked && (\n\t\t\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\t\t\t\t\t\tonClick={ onInsertBefore }\n\t\t\t\t\t\t\t\t\t\ticon=\"insert-before\"\n\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.insertBefore.display }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Insert Before' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\t\t\t\t\t\tonClick={ onInsertAfter }\n\t\t\t\t\t\t\t\t\t\ticon=\"insert-after\"\n\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.insertAfter.display }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Insert After' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t<BlockModeToggle\n\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\n\t\t\t\t\t\t\t\t\tonToggle={ onClose }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<ReusableBlockConvertButton\n\t\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t\tonToggle={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<_BlockSettingsMenuPluginsExtension.Slot fillProps={ { clientIds, onClose } } />\n\t\t\t\t\t\t\t<div className=\"editor-block-settings-menu__separator\" />\n\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t<ReusableBlockDeleteButton\n\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\n\t\t\t\t\t\t\t\t\tonToggle={ onClose }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! isLocked && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t\t\t\t\ticon=\"trash\"\n\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.removeBlock.display }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Remove Block' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockActions>\n\t);\n}\n\nexport default withDispatch( ( dispatch ) => {\n\tconst { selectBlock } = dispatch( 'core/editor' );\n\n\treturn {\n\t\tonSelect( clientId ) {\n\t\t\tselectBlock( clientId );\n\t\t},\n\t};\n} )( BlockSettingsMenu );\n","/**\n * External dependencies\n */\nimport { noop, every } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport, isReusableBlock } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nexport function ReusableBlockConvertButton( {\n\tisVisible,\n\tisStaticBlock,\n\tonConvertToStatic,\n\tonConvertToReusable,\n} ) {\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Fragment>\n\t\t\t{ isStaticBlock && (\n\t\t\t\t<MenuItem\n\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\ticon=\"controls-repeat\"\n\t\t\t\t\tonClick={ onConvertToReusable }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Add to Reusable Blocks' ) }\n\t\t\t\t</MenuItem>\n\t\t\t) }\n\t\t\t{ ! isStaticBlock && (\n\t\t\t\t<MenuItem\n\t\t\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\t\t\ticon=\"controls-repeat\"\n\t\t\t\t\tonClick={ onConvertToStatic }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Convert to Regular Block' ) }\n\t\t\t\t</MenuItem>\n\t\t\t) }\n\t\t</Fragment>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientIds } ) => {\n\t\tconst {\n\t\t\tgetBlocksByClientId,\n\t\t\tcanInsertBlockType,\n\t\t\t__experimentalGetReusableBlock: getReusableBlock,\n\t\t} = select( 'core/editor' );\n\n\t\tconst blocks = getBlocksByClientId( clientIds );\n\n\t\tconst isVisible = (\n\t\t\t// Hide 'Add to Reusable Blocks' when Reusable Blocks are disabled, i.e. when\n\t\t\t// core/block is not in the allowed_block_types filter.\n\t\t\tcanInsertBlockType( 'core/block' ) &&\n\n\t\t\tevery( blocks, ( block ) => (\n\t\t\t\t// Guard against the case where a regular block has *just* been converted to a\n\t\t\t\t// reusable block and doesn't yet exist in the editor store.\n\t\t\t\t!! block &&\n\t\t\t\t// Only show the option to covert to reusable blocks on valid blocks.\n\t\t\t\tblock.isValid &&\n\t\t\t\t// Make sure the block supports being converted into a reusable block (by default that is the case).\n\t\t\t\thasBlockSupport( block.name, 'reusable', true )\n\t\t\t) )\n\t\t);\n\n\t\treturn {\n\t\t\tisVisible,\n\t\t\tisStaticBlock: isVisible && (\n\t\t\t\tblocks.length !== 1 ||\n\t\t\t\t! isReusableBlock( blocks[ 0 ] ) ||\n\t\t\t\t! getReusableBlock( blocks[ 0 ].attributes.ref )\n\t\t\t),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { clientIds, onToggle = noop } ) => {\n\t\tconst {\n\t\t\t__experimentalConvertBlockToReusable: convertBlockToReusable,\n\t\t\t__experimentalConvertBlockToStatic: convertBlockToStatic,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonConvertToStatic() {\n\t\t\t\tif ( clientIds.length !== 1 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconvertBlockToStatic( clientIds[ 0 ] );\n\t\t\t\tonToggle();\n\t\t\t},\n\t\t\tonConvertToReusable() {\n\t\t\t\tconvertBlockToReusable( clientIds );\n\t\t\t\tonToggle();\n\t\t\t},\n\t\t};\n\t} ),\n] )( ReusableBlockConvertButton );\n","/**\n * External dependencies\n */\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { isReusableBlock } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\nexport function ReusableBlockDeleteButton( { reusableBlock, onDelete } ) {\n\tif ( ! reusableBlock ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\tclassName=\"editor-block-settings-menu__control\"\n\t\t\ticon=\"no\"\n\t\t\tdisabled={ reusableBlock.isTemporary }\n\t\t\tonClick={ () => onDelete( reusableBlock.id ) }\n\t\t>\n\t\t\t{ __( 'Remove from Reusable Blocks' ) }\n\t\t</MenuItem>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst {\n\t\t\tgetBlock,\n\t\t\t__experimentalGetReusableBlock: getReusableBlock,\n\t\t} = select( 'core/editor' );\n\t\tconst block = getBlock( clientId );\n\t\treturn {\n\t\t\treusableBlock: block && isReusableBlock( block ) ? getReusableBlock( block.attributes.ref ) : null,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { onToggle = noop } ) => {\n\t\tconst {\n\t\t\t__experimentalDeleteReusableBlock: deleteReusableBlock,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonDelete( id ) {\n\t\t\t\t// TODO: Make this a <Confirm /> component or similar\n\t\t\t\t// eslint-disable-next-line no-alert\n\t\t\t\tconst hasConfirmed = window.confirm( __(\n\t\t\t\t\t'Are you sure you want to delete this Reusable Block?\\n\\n' +\n\t\t\t\t\t'It will be permanently removed from all posts and pages that use it.'\n\t\t\t\t) );\n\n\t\t\t\tif ( hasConfirmed ) {\n\t\t\t\t\tdeleteReusableBlock( id );\n\t\t\t\t\tonToggle();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n] )( ReusableBlockDeleteButton );\n","/**\n * External dependencies\n */\nimport { find, noop } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport TokenList from '@wordpress/token-list';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { BlockPreviewContent } from '../block-preview';\n\n/**\n * Returns the active style from the given className.\n *\n * @param {Array} styles Block style variations.\n * @param {string} className Class name\n *\n * @return {Object?} The active style.\n */\nexport function getActiveStyle( styles, className ) {\n\tfor ( const style of new TokenList( className ).values() ) {\n\t\tif ( style.indexOf( 'is-style-' ) === -1 ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst potentialStyleName = style.substring( 9 );\n\t\tconst activeStyle = find( styles, { name: potentialStyleName } );\n\t\tif ( activeStyle ) {\n\t\t\treturn activeStyle;\n\t\t}\n\t}\n\n\treturn find( styles, 'isDefault' );\n}\n\n/**\n * Replaces the active style in the block's className.\n *\n * @param {string} className Class name.\n * @param {Object?} activeStyle The replaced style.\n * @param {Object} newStyle The replacing style.\n *\n * @return {string} The updated className.\n */\nexport function replaceActiveStyle( className, activeStyle, newStyle ) {\n\tconst list = new TokenList( className );\n\n\tif ( activeStyle ) {\n\t\tlist.remove( 'is-style-' + activeStyle.name );\n\t}\n\n\tlist.add( 'is-style-' + newStyle.name );\n\n\treturn list.value;\n}\n\nfunction BlockStyles( {\n\tstyles,\n\tclassName,\n\tonChangeClassName,\n\tname,\n\tattributes,\n\tonSwitch = noop,\n\tonHoverClassName = noop,\n} ) {\n\tif ( ! styles || styles.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tconst activeStyle = getActiveStyle( styles, className );\n\tfunction updateClassName( style ) {\n\t\tconst updatedClassName = replaceActiveStyle( className, activeStyle, style );\n\t\tonChangeClassName( updatedClassName );\n\t\tonSwitch();\n\t}\n\n\treturn (\n\t\t<div className=\"editor-block-styles\">\n\t\t\t{ styles.map( ( style ) => {\n\t\t\t\tconst styleClassName = replaceActiveStyle( className, activeStyle, style );\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ style.name }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'editor-block-styles__item', {\n\t\t\t\t\t\t\t\t'is-active': activeStyle === style,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => updateClassName( style ) }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tif ( ENTER === event.keyCode || SPACE === event.keyCode ) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tupdateClassName( style );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMouseEnter={ () => onHoverClassName( styleClassName ) }\n\t\t\t\t\t\tonMouseLeave={ () => onHoverClassName( null ) }\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\t\taria-label={ style.label || style.name }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"editor-block-styles__item-preview\">\n\t\t\t\t\t\t\t<BlockPreviewContent\n\t\t\t\t\t\t\t\tname={ name }\n\t\t\t\t\t\t\t\tattributes={ {\n\t\t\t\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t\t\t\tclassName: styleClassName,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"editor-block-styles__item-label\">\n\t\t\t\t\t\t\t{ style.label || style.name }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlock } = select( 'core/editor' );\n\t\tconst { getBlockStyles } = select( 'core/blocks' );\n\t\tconst block = getBlock( clientId );\n\n\t\treturn {\n\t\t\tname: block.name,\n\t\t\tattributes: block.attributes,\n\t\t\tclassName: block.attributes.className || '',\n\t\t\tstyles: getBlockStyles( block.name ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { clientId } ) => {\n\t\treturn {\n\t\t\tonChangeClassName( newClassName ) {\n\t\t\t\tdispatch( 'core/editor' ).updateBlockAttributes( clientId, {\n\t\t\t\t\tclassName: newClassName,\n\t\t\t\t} );\n\t\t\t},\n\t\t};\n\t} ),\n] )( BlockStyles );\n","/**\n * External dependencies\n */\nimport { castArray, filter, first, mapKeys, orderBy } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { Dropdown, IconButton, Toolbar, PanelBody, Path, SVG } from '@wordpress/components';\nimport { getBlockType, getPossibleBlockTransformations, switchToBlockType, hasChildBlocksWithInserterSupport } from '@wordpress/blocks';\nimport { Component, Fragment } from '@wordpress/element';\nimport { DOWN } from '@wordpress/keycodes';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport BlockStyles from '../block-styles';\nimport BlockPreview from '../block-preview';\nimport BlockTypesList from '../block-types-list';\n\nexport class BlockSwitcher extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\thoveredClassName: null,\n\t\t};\n\t\tthis.onHoverClassName = this.onHoverClassName.bind( this );\n\t}\n\n\tonHoverClassName( className ) {\n\t\tthis.setState( { hoveredClassName: className } );\n\t}\n\n\trender() {\n\t\tconst { blocks, onTransform, inserterItems, hasBlockStyles } = this.props;\n\t\tconst { hoveredClassName } = this.state;\n\n\t\tif ( ! blocks || ! blocks.length ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst itemsByName = mapKeys( inserterItems, ( { name } ) => name );\n\t\tconst possibleBlockTransformations = orderBy(\n\t\t\tfilter(\n\t\t\t\tgetPossibleBlockTransformations( blocks ),\n\t\t\t\t( block ) => !! itemsByName[ block.name ]\n\t\t\t),\n\t\t\t( block ) => itemsByName[ block.name ].frecency,\n\t\t\t'desc'\n\t\t);\n\n\t\tconst sourceBlockName = blocks[ 0 ].name;\n\t\tconst blockType = getBlockType( sourceBlockName );\n\n\t\tif ( ! hasBlockStyles && ! possibleBlockTransformations.length ) {\n\t\t\tif ( blocks.length > 1 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<Toolbar>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tdisabled\n\t\t\t\t\t\tclassName=\"editor-block-switcher__no-switcher-icon\"\n\t\t\t\t\t\tlabel={ __( 'Block icon' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockIcon icon={ blockType.icon } showColors />\n\t\t\t\t\t</IconButton>\n\t\t\t\t</Toolbar>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\tposition=\"bottom right\"\n\t\t\t\tclassName=\"editor-block-switcher\"\n\t\t\t\tcontentClassName=\"editor-block-switcher__popover\"\n\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tconst label = (\n\t\t\t\t\t\t1 === blocks.length ?\n\t\t\t\t\t\t\t__( 'Change block type' ) :\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Change type of %d block',\n\t\t\t\t\t\t\t\t\t'Change type of %d blocks',\n\t\t\t\t\t\t\t\t\tblocks.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tblocks.length\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Toolbar>\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tclassName=\"editor-block-switcher__toggle\"\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\t\ttooltip={ label }\n\t\t\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockIcon icon={ blockType.icon } showColors />\n\t\t\t\t\t\t\t\t<SVG className=\"editor-block-switcher__transform\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><Path d=\"M6.5 8.9c.6-.6 1.4-.9 2.2-.9h6.9l-1.3 1.3 1.4 1.4L19.4 7l-3.7-3.7-1.4 1.4L15.6 6H8.7c-1.4 0-2.6.5-3.6 1.5l-2.8 2.8 1.4 1.4 2.8-2.8zm13.8 2.4l-2.8 2.8c-.6.6-1.3.9-2.1.9h-7l1.3-1.3-1.4-1.4L4.6 16l3.7 3.7 1.4-1.4L8.4 17h6.9c1.3 0 2.6-.5 3.5-1.5l2.8-2.8-1.3-1.4z\" /></SVG>\n\t\t\t\t\t\t\t</IconButton>\n\t\t\t\t\t\t</Toolbar>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t{ hasBlockStyles &&\n\t\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\t\ttitle={ __( 'Block Styles' ) }\n\t\t\t\t\t\t\t\tinitialOpen\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockStyles\n\t\t\t\t\t\t\t\t\tclientId={ blocks[ 0 ].clientId }\n\t\t\t\t\t\t\t\t\tonSwitch={ onClose }\n\t\t\t\t\t\t\t\t\tonHoverClassName={ this.onHoverClassName }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ possibleBlockTransformations.length !== 0 &&\n\t\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\t\ttitle={ __( 'Transform To:' ) }\n\t\t\t\t\t\t\t\tinitialOpen\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\t\titems={ possibleBlockTransformations.map( ( destinationBlockType ) => ( {\n\t\t\t\t\t\t\t\t\t\tid: destinationBlockType.name,\n\t\t\t\t\t\t\t\t\t\ticon: destinationBlockType.icon,\n\t\t\t\t\t\t\t\t\t\ttitle: destinationBlockType.title,\n\t\t\t\t\t\t\t\t\t\thasChildBlocksWithInserterSupport: hasChildBlocksWithInserterSupport( destinationBlockType.name ),\n\t\t\t\t\t\t\t\t\t} ) ) }\n\t\t\t\t\t\t\t\t\tonSelect={ ( item ) => {\n\t\t\t\t\t\t\t\t\t\tonTransform( blocks, item.id );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t{ ( hoveredClassName !== null ) &&\n\t\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t\tname={ blocks[ 0 ].name }\n\t\t\t\t\t\t\t\tattributes={ { ...blocks[ 0 ].attributes, className: hoveredClassName } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t</Fragment>\n\t\t\t\t) }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { clientIds } ) => {\n\t\tconst { getBlocksByClientId, getBlockRootClientId, getInserterItems } = select( 'core/editor' );\n\t\tconst { getBlockStyles } = select( 'core/blocks' );\n\t\tconst rootClientId = getBlockRootClientId( first( castArray( clientIds ) ) );\n\t\tconst blocks = getBlocksByClientId( clientIds );\n\t\tconst firstBlock = blocks && blocks.length === 1 ? blocks[ 0 ] : null;\n\t\tconst styles = firstBlock && getBlockStyles( firstBlock.name );\n\t\treturn {\n\t\t\tblocks,\n\t\t\tinserterItems: getInserterItems( rootClientId ),\n\t\t\thasBlockStyles: styles && styles.length > 0,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tonTransform( blocks, name ) {\n\t\t\tdispatch( 'core/editor' ).replaceBlocks(\n\t\t\t\townProps.clientIds,\n\t\t\t\tswitchToBlockType( blocks, name )\n\t\t\t);\n\t\t},\n\t} ) ),\n)( BlockSwitcher );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockSwitcher from './';\n\nexport function MultiBlocksSwitcher( { isMultiBlockSelection, selectedBlockClientIds } ) {\n\tif ( ! isMultiBlockSelection ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<BlockSwitcher key=\"switcher\" clientIds={ selectedBlockClientIds } />\n\t);\n}\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst selectedBlockClientIds = select( 'core/editor' ).getMultiSelectedBlockClientIds();\n\t\treturn {\n\t\t\tisMultiBlockSelection: selectedBlockClientIds.length > 1,\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t}\n)( MultiBlocksSwitcher );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Renders the block's configured title as a string, or empty if the title\n * cannot be determined.\n *\n * @example\n *\n * ```jsx\n * <BlockTitle clientId=\"afd1cb17-2c08-4e7a-91be-007ba7ddc3a1\" />\n * ```\n *\n * @param {?string} props.name Block name.\n *\n * @return {?string} Block title.\n */\nexport function BlockTitle( { name } ) {\n\tif ( ! name ) {\n\t\treturn null;\n\t}\n\n\tconst blockType = getBlockType( name );\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\treturn blockType.title;\n}\n\nexport default withSelect( ( select, ownProps ) => {\n\tconst { getBlockName } = select( 'core/editor' );\n\tconst { clientId } = ownProps;\n\n\treturn {\n\t\tname: getBlockName( clientId ),\n\t};\n} )( BlockTitle );\n","/**\n * WordPress Dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { Fragment } from '@wordpress/element';\n\n/**\n * Internal Dependencies\n */\nimport BlockSwitcher from '../block-switcher';\nimport MultiBlocksSwitcher from '../block-switcher/multi-blocks-switcher';\nimport BlockControls from '../block-controls';\nimport BlockFormatControls from '../block-format-controls';\nimport BlockSettingsMenu from '../block-settings-menu';\n\nfunction BlockToolbar( { blockClientIds, isValid, mode } ) {\n\tif ( blockClientIds.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tif ( blockClientIds.length > 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-block-toolbar\">\n\t\t\t\t<MultiBlocksSwitcher />\n\t\t\t\t<BlockSettingsMenu clientIds={ blockClientIds } />\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-block-toolbar\">\n\t\t\t{ mode === 'visual' && isValid && (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<BlockSwitcher clientIds={ blockClientIds } />\n\t\t\t\t\t<BlockControls.Slot />\n\t\t\t\t\t<BlockFormatControls.Slot />\n\t\t\t\t</Fragment>\n\t\t\t) }\n\t\t\t<BlockSettingsMenu clientIds={ blockClientIds } />\n\t\t</div>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetBlockMode,\n\t\tgetMultiSelectedBlockClientIds,\n\t\tisBlockValid,\n\t} = select( 'core/editor' );\n\tconst selectedBlockClientId = getSelectedBlockClientId();\n\tconst blockClientIds = selectedBlockClientId ?\n\t\t[ selectedBlockClientId ] :\n\t\tgetMultiSelectedBlockClientIds();\n\n\treturn {\n\t\tblockClientIds,\n\t\tisValid: selectedBlockClientId ? isBlockValid( selectedBlockClientId ) : null,\n\t\tmode: selectedBlockClientId ? getBlockMode( selectedBlockClientId ) : null,\n\t};\n} )( BlockToolbar );\n","/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\n\nfunction BlockTypesList( { items, onSelect, onHover = () => {}, children } ) {\n\treturn (\n\t\t/*\n\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t */\n\t\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t\t<ul role=\"list\" className=\"editor-block-types-list\">\n\t\t\t{ items && items.map( ( item ) =>\n\t\t\t\t<InserterListItem\n\t\t\t\t\tkey={ item.id }\n\t\t\t\t\tclassName={ getBlockMenuDefaultClassName( item.id ) }\n\t\t\t\t\ticon={ item.icon }\n\t\t\t\t\thasChildBlocksWithInserterSupport={\n\t\t\t\t\t\titem.hasChildBlocksWithInserterSupport\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonSelect( item );\n\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t} }\n\t\t\t\t\tonFocus={ () => onHover( item ) }\n\t\t\t\t\tonMouseEnter={ () => onHover( item ) }\n\t\t\t\t\tonMouseLeave={ () => onHover( null ) }\n\t\t\t\t\tonBlur={ () => onHover( null ) }\n\t\t\t\t\tisDisabled={ item.isDisabled }\n\t\t\t\t\ttitle={ item.title }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ul>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default BlockTypesList;\n","/**\n * WordPress dependencies\n */\nimport { BaseControl, ColorIndicator } from '@wordpress/components';\nimport { ifCondition, compose } from '@wordpress/compose';\nimport { Fragment } from '@wordpress/element';\nimport { sprintf, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorPalette from './';\nimport withColorContext from './with-color-context';\nimport { getColorObjectByColorValue } from '../colors';\n\n// translators: first %s: The type of color (e.g. background color), second %s: the color name or value (e.g. red or #ff0000)\nconst colorIndicatorAriaLabel = __( '(current %s: %s)' );\n\nexport function ColorPaletteControl( {\n\tcolors,\n\tdisableCustomColors,\n\tlabel,\n\tonChange,\n\tvalue,\n} ) {\n\tconst colorObject = getColorObjectByColorValue( colors, value );\n\tconst colorName = colorObject && colorObject.name;\n\tconst ariaLabel = sprintf( colorIndicatorAriaLabel, label.toLowerCase(), colorName || value );\n\n\tconst labelElement = (\n\t\t<Fragment>\n\t\t\t{ label }\n\t\t\t{ value && (\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tcolorValue={ value }\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Fragment>\n\t);\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName=\"editor-color-palette-control\"\n\t\t\tlabel={ labelElement }>\n\t\t\t<ColorPalette\n\t\t\t\tclassName=\"editor-color-palette-control__color-palette\"\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChange }\n\t\t\t\t{ ... { colors, disableCustomColors } }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\nexport default compose( [\n\twithColorContext,\n\tifCondition( ( { hasColorsToChoose } ) => hasColorsToChoose ),\n] )( ColorPaletteControl );\n","/**\n * WordPress dependencies\n */\nimport { ColorPalette } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withColorContext from './with-color-context';\n\nexport default withColorContext( ColorPalette );\n","\n/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport default createHigherOrderComponent(\n\twithSelect(\n\t\t( select, ownProps ) => {\n\t\t\tconst settings = select( 'core/editor' ).getEditorSettings();\n\t\t\tconst colors = ownProps.colors === undefined ?\n\t\t\t\tsettings.colors : ownProps.colors;\n\n\t\t\tconst disableCustomColors = ownProps.disableCustomColors === undefined ?\n\t\t\t\tsettings.disableCustomColors : ownProps.disableCustomColors;\n\t\t\treturn {\n\t\t\t\tcolors,\n\t\t\t\tdisableCustomColors,\n\t\t\t\thasColorsToChoose: ! isEmpty( colors ) || ! disableCustomColors,\n\t\t\t};\n\t\t}\n\t),\n\t'withColorContext'\n);\n","export {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue,\n} from './utils';\nexport { default as withColors } from './with-colors';\n","/**\n * External dependencies\n */\nimport { find, kebabCase, map } from 'lodash';\nimport tinycolor from 'tinycolor2';\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor A string containing the customColor value.\n *\n * @return {?string} If definedColor is passed and the name is found in colors,\n * the color object exactly as set by the theme or editor defaults is returned.\n * Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = ( colors, definedColor, customColor ) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = find( colors, { slug: definedColor } );\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n* Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n*\n* @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n* @param {?string} colorValue A string containing the color value.\n*\n* @return {?string} Returns the color object included in the colors array whose color property equals colorValue.\n* Returns undefined if no color object matches this requirement.\n*/\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn find( colors, { color: colorValue } );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug Slug of the color.\n *\n * @return {string} String with the class corresponding to the color in the provided context.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n* Given an array of color objects and a color value returns the color value of the most readable color in the array.\n*\n* @param {Array} colors Array of color objects as set by the theme or by the editor defaults.\n* @param {?string} colorValue A string containing the color value.\n*\n* @return {string} String with the color value of the most readable color.\n*/\nexport function getMostReadableColor( colors, colorValue ) {\n\treturn tinycolor.mostReadable(\n\t\tcolorValue,\n\t\tmap( colors, 'color' )\n\t).toHexString();\n}\n","/**\n * External dependencies\n */\nimport { get, isString, kebabCase, reduce, upperFirst } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getColorClassName, getColorObjectByColorValue, getColorObjectByAttributeValues, getMostReadableColor } from './utils';\n\nconst DEFAULT_COLORS = [];\n\n/**\n * Higher-order component, which handles color logic for class generation\n * color value, retrieval and color attribute setting.\n *\n * @param {...(object|string)} args The arguments can be strings or objects. If the argument is an object,\n * it should contain the color attribute name as key and the color context as value.\n * If the argument is a string the value should be the color attribute name,\n * the color context is computed by applying a kebab case transform to the value.\n * Color context represents the context/place where the color is going to be used.\n * The class name of the color is generated using 'has' followed by the color name\n * and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n *\n * @return {Function} Higher-order component.\n */\nexport default ( ...args ) => {\n\tconst colorMap = reduce( args, ( colorObject, arg ) => {\n\t\treturn {\n\t\t\t...colorObject,\n\t\t\t...( isString( arg ) ? { [ arg ]: kebabCase( arg ) } : arg ),\n\t\t};\n\t}, {} );\n\n\treturn createHigherOrderComponent(\n\t\tcompose( [\n\t\t\twithSelect( ( select ) => {\n\t\t\t\tconst settings = select( 'core/editor' ).getEditorSettings();\n\t\t\t\treturn {\n\t\t\t\t\tcolors: get( settings, [ 'colors' ], DEFAULT_COLORS ),\n\t\t\t\t};\n\t\t\t} ),\n\t\t\t( WrappedComponent ) => {\n\t\t\t\treturn class extends Component {\n\t\t\t\t\tconstructor( props ) {\n\t\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\t\tgetMostReadableColor: this.getMostReadableColor.bind( this ),\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tthis.state = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetters() {\n\t\t\t\t\t\treturn reduce( colorMap, ( settersAccumulator, colorContext, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName = upperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[ `set${ upperFirstColorAttributeName }` ] =\n\t\t\t\t\t\t\t\tthis.createSetColor( colorAttributeName, customColorAttributeName );\n\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t}, {} );\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue( this.props.colors, colorValue );\n\t\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t\t[ colorAttributeName ]: colorObject && colorObject.slug ? colorObject.slug : undefined,\n\t\t\t\t\t\t\t\t[ customColorAttributeName ]: colorObject && colorObject.slug ? undefined : colorValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tstatic getDerivedStateFromProps( { attributes, colors }, previousState ) {\n\t\t\t\t\t\treturn reduce( colorMap, ( newState, colorContext, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[ `custom${ upperFirst( colorAttributeName ) }` ],\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tconst previousColorObject = previousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = get( previousColorObject, [ 'color' ] );\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t* The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t* At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t* bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\tif ( previousColor === colorObject.color && previousColorObject ) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = previousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName( colorContext, colorObject.slug ),\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn newState;\n\t\t\t\t\t\t}, {} );\n\t\t\t\t\t}\n\n\t\t\t\t\trender() {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t] ),\n\t\t'withColors'\n\t);\n};\n","/**\n * External dependencies\n */\nimport tinycolor from 'tinycolor2';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Notice } from '@wordpress/components';\n\nfunction ContrastChecker( {\n\tbackgroundColor,\n\tfallbackBackgroundColor,\n\tfallbackTextColor,\n\tfontSize, // font size value in pixels\n\tisLargeText,\n\ttextColor,\n} ) {\n\tif ( ! ( backgroundColor || fallbackBackgroundColor ) || ! ( textColor || fallbackTextColor ) ) {\n\t\treturn null;\n\t}\n\tconst tinyBackgroundColor = tinycolor( backgroundColor || fallbackBackgroundColor );\n\tconst tinyTextColor = tinycolor( textColor || fallbackTextColor );\n\tconst hasTransparency = tinyBackgroundColor.getAlpha() !== 1 || tinyTextColor.getAlpha() !== 1;\n\n\tif ( hasTransparency || tinycolor.isReadable(\n\t\ttinyBackgroundColor,\n\t\ttinyTextColor,\n\t\t{ level: 'AA', size: ( isLargeText || ( isLargeText !== false && fontSize >= 24 ) ? 'large' : 'small' ) }\n\t) ) {\n\t\treturn null;\n\t}\n\tconst msg = tinyBackgroundColor.getBrightness() < tinyTextColor.getBrightness() ?\n\t\t__( 'This color combination may be hard for people to read. Try using a darker background color and/or a brighter text color.' ) :\n\t\t__( 'This color combination may be hard for people to read. Try using a brighter background color and/or a darker text color.' );\n\treturn (\n\t\t<div className=\"editor-contrast-checker\">\n\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t{ msg }\n\t\t\t</Notice>\n\t\t</div>\n\t);\n}\n\nexport default ContrastChecker;\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { serialize } from '@wordpress/blocks';\nimport { documentHasSelection } from '@wordpress/dom';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nclass CopyHandler extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onCut = this.onCut.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener( 'copy', this.onCopy );\n\t\tdocument.addEventListener( 'cut', this.onCut );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener( 'copy', this.onCopy );\n\t\tdocument.removeEventListener( 'cut', this.onCut );\n\t}\n\n\tonCopy( event ) {\n\t\tconst { hasMultiSelection, selectedBlockClientIds, getBlocksByClientId } = this.props;\n\n\t\tif ( selectedBlockClientIds.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Let native copy behaviour take over in input fields.\n\t\tif ( ! hasMultiSelection && documentHasSelection() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst serialized = serialize( getBlocksByClientId( selectedBlockClientIds ) );\n\n\t\tevent.clipboardData.setData( 'text/plain', serialized );\n\t\tevent.clipboardData.setData( 'text/html', serialized );\n\n\t\tevent.preventDefault();\n\t}\n\n\tonCut( event ) {\n\t\tconst { hasMultiSelection, selectedBlockClientIds } = this.props;\n\n\t\tthis.onCopy( event );\n\n\t\tif ( hasMultiSelection ) {\n\t\t\tthis.props.onRemove( selectedBlockClientIds );\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetBlocksByClientId,\n\t\t\thasMultiSelection,\n\t\t} = select( 'core/editor' );\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectedBlockClientIds = selectedBlockClientId ? [ selectedBlockClientId ] : getMultiSelectedBlockClientIds();\n\n\t\treturn {\n\t\t\thasMultiSelection: hasMultiSelection(),\n\t\t\tselectedBlockClientIds,\n\n\t\t\t// We only care about this value when the copy is performed\n\t\t\t// We call it dynamically in the event handler to avoid unnecessary re-renders.\n\t\t\tgetBlocksByClientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonRemove: dispatch( 'core/editor' ).removeBlocks,\n\t} ) ),\n] )( CopyHandler );\n","/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { getDefaultBlockName } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockDropZone from '../block-drop-zone';\nimport InserterWithShortcuts from '../inserter-with-shortcuts';\nimport Inserter from '../inserter';\n\nexport function DefaultBlockAppender( {\n\tisLocked,\n\tisVisible,\n\tonAppend,\n\tshowPrompt,\n\tplaceholder,\n\trootClientId,\n} ) {\n\tif ( isLocked || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst value = decodeEntities( placeholder ) || __( 'Start writing or type / to choose a block' );\n\n\t// The appender \"button\" is in-fact a text field so as to support\n\t// transitions by WritingFlow occurring by arrow key press. WritingFlow\n\t// only supports tab transitions into text fields and to the block focus\n\t// boundary.\n\t//\n\t// See: https://github.com/WordPress/gutenberg/issues/4829#issuecomment-374213658\n\t//\n\t// If it were ever to be made to be a proper `button` element, it is\n\t// important to note that `onFocus` alone would not be sufficient to\n\t// capture click events, notably in Firefox.\n\t//\n\t// See: https://gist.github.com/cvrebert/68659d0333a578d75372\n\n\t// The wp-block className is important for editor styles.\n\n\treturn (\n\t\t<div data-root-client-id={ rootClientId || '' } className=\"wp-block editor-default-block-appender\">\n\t\t\t<BlockDropZone rootClientId={ rootClientId } />\n\t\t\t<TextareaAutosize\n\t\t\t\trole=\"button\"\n\t\t\t\taria-label={ __( 'Add block' ) }\n\t\t\t\tclassName=\"editor-default-block-appender__content\"\n\t\t\t\treadOnly\n\t\t\t\tonFocus={ onAppend }\n\t\t\t\tvalue={ showPrompt ? value : '' }\n\t\t\t/>\n\t\t\t<InserterWithShortcuts rootClientId={ rootClientId } />\n\t\t\t<Inserter position=\"top right\" />\n\t\t</div>\n\t);\n}\nexport default compose(\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getBlockCount, getBlockName, isBlockValid, getEditorSettings, getTemplateLock } = select( 'core/editor' );\n\n\t\tconst isEmpty = ! getBlockCount( ownProps.rootClientId );\n\t\tconst isLastBlockDefault = getBlockName( ownProps.lastBlockClientId ) === getDefaultBlockName();\n\t\tconst isLastBlockValid = isBlockValid( ownProps.lastBlockClientId );\n\t\tconst { bodyPlaceholder } = getEditorSettings();\n\n\t\treturn {\n\t\t\tisVisible: isEmpty || ! isLastBlockDefault || ! isLastBlockValid,\n\t\t\tshowPrompt: isEmpty,\n\t\t\tisLocked: !! getTemplateLock( ownProps.rootClientId ),\n\t\t\tplaceholder: bodyPlaceholder,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst {\n\t\t\tinsertDefaultBlock,\n\t\t\tstartTyping,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonAppend() {\n\t\t\t\tconst { rootClientId } = ownProps;\n\n\t\t\t\tinsertDefaultBlock( undefined, rootClientId );\n\t\t\t\tstartTyping();\n\t\t\t},\n\t\t};\n\t} ),\n)( DefaultBlockAppender );\n","/**\n * External dependencies\n */\nimport { filter } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\nfunction DocumentOutlineCheck( { blocks, children } ) {\n\tconst headings = filter( blocks, ( block ) => block.name === 'core/heading' );\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => ( {\n\tblocks: select( 'core/editor' ).getBlocks(),\n} ) )( DocumentOutlineCheck );\n","/**\n * External dependencies\n */\nimport { countBy, flatMap, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport RichText from './../rich-text';\n\n/**\n * Module constants\n */\nconst emptyHeadingContent = <em>{ __( '(Empty heading)' ) }</em>;\nconst incorrectLevelContent = [\n\t<br key=\"incorrect-break\" />,\n\t<em key=\"incorrect-message\">{ __( '(Incorrect heading level)' ) }</em>,\n];\nconst singleH1Headings = [\n\t<br key=\"incorrect-break-h1\" />,\n\t<em key=\"incorrect-message-h1\">{ __( '(Your theme may already use a H1 for the post title)' ) }</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">{ __( '(Multiple H1 headings are not recommended)' ) }</em>,\n];\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\n * path - An array of blocks that are ancestors of the heading starting from a top-level node.\n * Can be an empty array if the heading is a top-level node (is not nested inside another block).\n * level - An integer with the heading level.\n * isEmpty - Flag indicating if the heading has no content.\n *\n * @param {?Array} blocks An array of blocks.\n * @param {?Array} path An array of blocks that are ancestors of the blocks passed as blocks.\n *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [], path = [] ) => {\n\treturn flatMap( blocks, ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\n\t\t\t\tpath,\n\t\t\t\tlevel: block.attributes.level,\n\t\t\t\tisEmpty: isEmptyHeading( block ),\n\t\t\t};\n\t\t}\n\t\treturn computeOutlineHeadings( block.innerBlocks, [ ...path, block ] );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) => ! heading.attributes.content || heading.attributes.content.length === 0;\n\nexport const DocumentOutline = ( { blocks = [], title, onSelect, isTitleSupported } ) => {\n\tconst headings = computeOutlineHeadings( blocks );\n\n\tif ( headings.length < 1 ) {\n\t\treturn null;\n\t}\n\n\tlet prevHeadingLevel = 1;\n\n\t// Select the corresponding block in the main editor\n\t// when clicking on a heading item from the list.\n\tconst onSelectHeading = ( clientId ) => onSelect( clientId );\n\tconst focusTitle = () => {\n\t\t// Not great but it's the simplest way to focus the title right now.\n\t\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\t\tif ( titleNode ) {\n\t\t\ttitleNode.focus();\n\t\t}\n\t};\n\n\tconst hasTitle = isTitleSupported && title;\n\tconst countByLevel = countBy( headings, 'level' );\n\tconst hasMultipleH1 = countByLevel[ 1 ] > 1;\n\n\treturn (\n\t\t<div className=\"document-outline\">\n\t\t\t<ul>\n\t\t\t\t{ hasTitle && (\n\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\tlevel={ __( 'Title' ) }\n\t\t\t\t\t\tisValid\n\t\t\t\t\t\tonClick={ focusTitle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t) }\n\t\t\t\t{ headings.map( ( item, index ) => {\n\t\t\t\t\t// Headings remain the same, go up by one, or down by any amount.\n\t\t\t\t\t// Otherwise there are missing levels.\n\t\t\t\t\tconst isIncorrectLevel = item.level > prevHeadingLevel + 1;\n\n\t\t\t\t\tconst isValid = (\n\t\t\t\t\t\t! item.isEmpty &&\n\t\t\t\t\t\t! isIncorrectLevel &&\n\t\t\t\t\t\t!! item.level &&\n\t\t\t\t\t\t( item.level !== 1 || ( ! hasMultipleH1 && ! hasTitle ) )\n\t\t\t\t\t);\n\t\t\t\t\tprevHeadingLevel = item.level;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DocumentOutlineItem\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tlevel={ `H${ item.level }` }\n\t\t\t\t\t\t\tisValid={ isValid }\n\t\t\t\t\t\t\tonClick={ () => onSelectHeading( item.clientId ) }\n\t\t\t\t\t\t\tpath={ item.path }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ item.isEmpty ?\n\t\t\t\t\t\t\t\temptyHeadingContent :\n\t\t\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\t\t\ttagName=\"span\"\n\t\t\t\t\t\t\t\t\tvalue={ item.attributes.content }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 && hasMultipleH1 && multipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle && item.level === 1 && ! hasMultipleH1 && singleH1Headings }\n\t\t\t\t\t\t</DocumentOutlineItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ul>\n\t\t</div>\n\t);\n};\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getBlocks } = select( 'core/editor' );\n\t\tconst { getPostType } = select( 'core' );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\tblocks: getBlocks(),\n\t\t\tisTitleSupported: get( postType, [ 'supports', 'title' ], false ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { selectBlock } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonSelect: selectBlock,\n\t\t};\n\t} )\n)( DocumentOutline );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\tonClick,\n\tpath = [],\n} ) => (\n\t<li\n\t\tclassName={ classnames(\n\t\t\t'document-outline__item',\n\t\t\t`is-${ level.toLowerCase() }`,\n\t\t\t{\n\t\t\t\t'is-invalid': ! isValid,\n\t\t\t}\n\t\t) }\n\t>\n\t\t<button\n\t\t\tclassName=\"document-outline__button\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t<span className=\"document-outline__emdash\" aria-hidden=\"true\"></span>\n\t\t\t{\n\t\t\t\t// path is an array of nodes that are ancestors of the heading starting in the top level node.\n\t\t\t\t// This mapping renders each ancestor to make it easier for the user to know where the headings are nested.\n\t\t\t\tpath.map( ( { clientId }, index ) => (\n\t\t\t\t\t<strong key={ index } className=\"document-outline__level\">\n\t\t\t\t\t\t<BlockTitle clientId={ clientId } />\n\t\t\t\t\t</strong>\n\t\t\t\t) )\n\t\t\t}\n\t\t\t<strong className=\"document-outline__level\">\n\t\t\t\t{ level }\n\t\t\t</strong>\n\t\t\t<span className=\"document-outline__item-content\">\n\t\t\t\t{ children }\n\t\t\t</span>\n\t\t\t<span className=\"screen-reader-text\">{ __( '(Click to focus this heading)' ) }</span>\n\t\t</button>\n\t</li>\n);\n\nexport default TableOfContentsItem;\n","/**\n * External dependencies\n */\nimport { first, last, some, flow } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, Fragment } from '@wordpress/element';\nimport { KeyboardShortcuts } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { rawShortcut, displayShortcut } from '@wordpress/keycodes';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockActions from '../block-actions';\n\nconst preventDefault = ( event ) => {\n\tevent.preventDefault();\n\treturn event;\n};\n\nexport const shortcuts = {\n\tduplicate: {\n\t\traw: rawShortcut.primaryShift( 'd' ),\n\t\tdisplay: displayShortcut.primaryShift( 'd' ),\n\t},\n\tremoveBlock: {\n\t\traw: rawShortcut.access( 'z' ),\n\t\tdisplay: displayShortcut.access( 'z' ),\n\t},\n\tinsertBefore: {\n\t\traw: rawShortcut.primaryAlt( 't' ),\n\t\tdisplay: displayShortcut.primaryAlt( 't' ),\n\t},\n\tinsertAfter: {\n\t\traw: rawShortcut.primaryAlt( 'y' ),\n\t\tdisplay: displayShortcut.primaryAlt( 'y' ),\n\t},\n};\n\nclass EditorGlobalKeyboardShortcuts extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.selectAll = this.selectAll.bind( this );\n\t\tthis.undoOrRedo = this.undoOrRedo.bind( this );\n\t\tthis.save = this.save.bind( this );\n\t\tthis.deleteSelectedBlocks = this.deleteSelectedBlocks.bind( this );\n\t\tthis.clearMultiSelection = this.clearMultiSelection.bind( this );\n\t}\n\n\tselectAll( event ) {\n\t\tconst { rootBlocksClientIds, onMultiSelect } = this.props;\n\t\tevent.preventDefault();\n\t\tonMultiSelect( first( rootBlocksClientIds ), last( rootBlocksClientIds ) );\n\t}\n\n\tundoOrRedo( event ) {\n\t\tconst { onRedo, onUndo } = this.props;\n\n\t\tif ( event.shiftKey ) {\n\t\t\tonRedo();\n\t\t} else {\n\t\t\tonUndo();\n\t\t}\n\n\t\tevent.preventDefault();\n\t}\n\n\tsave( event ) {\n\t\tevent.preventDefault();\n\t\tthis.props.onSave();\n\t}\n\n\tdeleteSelectedBlocks( event ) {\n\t\tconst { selectedBlockClientIds, hasMultiSelection, onRemove, isLocked } = this.props;\n\t\tif ( hasMultiSelection ) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( ! isLocked ) {\n\t\t\t\tonRemove( selectedBlockClientIds );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Clears current multi-selection, if one exists.\n\t */\n\tclearMultiSelection() {\n\t\tconst { hasMultiSelection, clearSelectedBlock } = this.props;\n\t\tif ( hasMultiSelection ) {\n\t\t\tclearSelectedBlock();\n\t\t\twindow.getSelection().removeAllRanges();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { selectedBlockClientIds } = this.props;\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t[ rawShortcut.primary( 'a' ) ]: this.selectAll,\n\t\t\t\t\t\t[ rawShortcut.primary( 'z' ) ]: this.undoOrRedo,\n\t\t\t\t\t\t[ rawShortcut.primaryShift( 'z' ) ]: this.undoOrRedo,\n\t\t\t\t\t\tbackspace: this.deleteSelectedBlocks,\n\t\t\t\t\t\tdel: this.deleteSelectedBlocks,\n\t\t\t\t\t\tescape: this.clearMultiSelection,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\tbindGlobal\n\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t[ rawShortcut.primary( 's' ) ]: this.save,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ selectedBlockClientIds.length > 0 && (\n\t\t\t\t\t<BlockActions clientIds={ selectedBlockClientIds }>\n\t\t\t\t\t\t{ ( { onDuplicate, onRemove, onInsertAfter, onInsertBefore } ) => (\n\t\t\t\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\t\t\t\tbindGlobal\n\t\t\t\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t\t\t\t// Prevents bookmark all Tabs shortcut in Chrome when devtools are closed.\n\t\t\t\t\t\t\t\t\t// Prevents reposition Chrome devtools pane shortcut when devtools are open.\n\t\t\t\t\t\t\t\t\t[ shortcuts.duplicate.raw ]: flow( preventDefault, onDuplicate ),\n\n\t\t\t\t\t\t\t\t\t// Does not clash with any known browser/native shortcuts, but preventDefault\n\t\t\t\t\t\t\t\t\t// is used to prevent any obscure unknown shortcuts from triggering.\n\t\t\t\t\t\t\t\t\t[ shortcuts.removeBlock.raw ]: flow( preventDefault, onRemove ),\n\n\t\t\t\t\t\t\t\t\t// Prevent 'view recently closed tabs' in Opera using preventDefault.\n\t\t\t\t\t\t\t\t\t[ shortcuts.insertBefore.raw ]: flow( preventDefault, onInsertBefore ),\n\n\t\t\t\t\t\t\t\t\t// Does not clash with any known browser/native shortcuts, but preventDefault\n\t\t\t\t\t\t\t\t\t// is used to prevent any obscure unknown shortcuts from triggering.\n\t\t\t\t\t\t\t\t\t[ shortcuts.insertAfter.raw ]: flow( preventDefault, onInsertAfter ),\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</BlockActions>\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\thasMultiSelection,\n\t\t\tisEditedPostDirty,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetTemplateLock,\n\t\t\tgetSelectedBlockClientId,\n\t\t} = select( 'core/editor' );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectedBlockClientIds = selectedBlockClientId ? [ selectedBlockClientId ] : getMultiSelectedBlockClientIds();\n\n\t\treturn {\n\t\t\trootBlocksClientIds: getBlockOrder(),\n\t\t\thasMultiSelection: hasMultiSelection(),\n\t\t\tisLocked: some(\n\t\t\t\tselectedBlockClientIds,\n\t\t\t\t( clientId ) => !! getTemplateLock( getBlockRootClientId( clientId ) )\n\t\t\t),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tselectedBlockClientIds,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst {\n\t\t\tclearSelectedBlock,\n\t\t\tmultiSelect,\n\t\t\tredo,\n\t\t\tundo,\n\t\t\tremoveBlocks,\n\t\t\tsavePost,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonSave() {\n\t\t\t\t// TODO: This should be handled in the `savePost` effect in\n\t\t\t\t// considering `isSaveable`. See note on `isEditedPostSaveable`\n\t\t\t\t// selector about dirtiness and meta-boxes. When removing, also\n\t\t\t\t// remember to remove `isDirty` prop passing from `withSelect`.\n\t\t\t\t//\n\t\t\t\t// See: `isEditedPostSaveable`\n\t\t\t\tif ( ! ownProps.isDirty ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsavePost();\n\t\t\t},\n\t\t\tclearSelectedBlock,\n\t\t\tonMultiSelect: multiSelect,\n\t\t\tonRedo: redo,\n\t\t\tonUndo: undo,\n\t\t\tonRemove: removeBlocks,\n\t\t};\n\t} ),\n] )( EditorGlobalKeyboardShortcuts );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nfunction EditorHistoryRedo( { hasRedo, redo } ) {\n\treturn (\n\t\t<IconButton\n\t\t\ticon=\"redo\"\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ displayShortcut.primaryShift( 'z' ) }\n\t\t\t// If there are no redo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasRedo }\n\t\t\tonClick={ hasRedo ? redo : undefined }\n\t\t\tclassName=\"editor-history__redo\"\n\t\t/>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\thasRedo: select( 'core/editor' ).hasEditorRedo(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tredo: dispatch( 'core/editor' ).redo,\n\t} ) ),\n] )( EditorHistoryRedo );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nfunction EditorHistoryUndo( { hasUndo, undo } ) {\n\treturn (\n\t\t<IconButton\n\t\t\ticon=\"undo\"\n\t\t\tlabel={ __( 'Undo' ) }\n\t\t\tshortcut={ displayShortcut.primary( 'z' ) }\n\t\t\t// If there are no undo levels we don't want to actually disable this\n\t\t\t// button, because it will remove focus for keyboard users.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/3486\n\t\t\taria-disabled={ ! hasUndo }\n\t\t\tonClick={ hasUndo ? undo : undefined }\n\t\t\tclassName=\"editor-history__undo\"\n\t\t/>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\thasUndo: select( 'core/editor' ).hasEditorUndo(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tundo: dispatch( 'core/editor' ).undo,\n\t} ) ),\n] )( EditorHistoryUndo );\n","/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\nfunction EditorNotices( props ) {\n\treturn (\n\t\t<NoticeList { ...props }>\n\t\t\t<TemplateValidationNotice />\n\t\t</NoticeList>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tnotices: select( 'core/notices' ).getNotices(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonRemove: dispatch( 'core/notices' ).removeNotice,\n\t} ) ),\n] )( EditorNotices );\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, ClipboardButton } from '@wordpress/components';\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { Warning } from '../';\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.reboot = this.reboot.bind( this );\n\t\tthis.getContent = this.getContent.bind( this );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tthis.setState( { error } );\n\t}\n\n\treboot() {\n\t\tthis.props.onError();\n\t}\n\n\tgetContent() {\n\t\ttry {\n\t\t\t// While `select` in a component is generally discouraged, it is\n\t\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t\t// case of additional errors by performing a direct retrieval and\n\t\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t\t// application.\n\t\t\treturn select( 'core/editor' ).getEditedPostContent();\n\t\t} catch ( error ) {}\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<Warning\n\t\t\t\tclassName=\"editor-error-boundary\"\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button key=\"recovery\" onClick={ this.reboot } isLarge>\n\t\t\t\t\t\t{ __( 'Attempt Recovery' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t\t<ClipboardButton key=\"copy-post\" text={ this.getContent } isLarge>\n\t\t\t\t\t\t{ __( 'Copy Post Text' ) }\n\t\t\t\t\t</ClipboardButton>,\n\t\t\t\t\t<ClipboardButton key=\"copy-error\" text={ error.stack } isLarge>\n\t\t\t\t\t\t{ __( 'Copy Error' ) }\n\t\t\t\t\t</ClipboardButton>,\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t</Warning>\n\t\t);\n\t}\n}\n\nexport default ErrorBoundary;\n","/**\n * WordPress dependencies\n */\nimport { FontSizePicker } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst {\n\t\t\tdisableCustomFontSizes,\n\t\t\tfontSizes,\n\t\t} = select( 'core/editor' ).getEditorSettings();\n\n\t\treturn {\n\t\t\tdisableCustomFontSizes,\n\t\t\tfontSizes,\n\t\t};\n\t}\n)( FontSizePicker );\n","export { getFontSize, getFontSizeClass } from './utils';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as withFontSizes } from './with-font-sizes';\n","/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n * Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.\n * \tIf namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.\n *\n * @param {Array} fontSizes Array of font size objects containing at least the \"name\" and \"size\" values as properties.\n * @param {?string} fontSizeAttribute Content of the font size attribute (slug).\n * @param {?number} customFontSizeAttribute Contents of the custom font size attribute (value).\n *\n * @return {?string} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.\n * \t\t\t\t\t Otherwise, an object with just the size value based on customFontSize is returned.\n */\nexport const getFontSize = ( fontSizes, fontSizeAttribute, customFontSizeAttribute ) => {\n\tif ( fontSizeAttribute ) {\n\t\tconst fontSizeObject = find( fontSizes, { slug: fontSizeAttribute } );\n\t\tif ( fontSizeObject ) {\n\t\t\treturn fontSizeObject;\n\t\t}\n\t}\n\treturn {\n\t\tsize: customFontSizeAttribute,\n\t};\n};\n\n/**\n * Returns a class based on fontSizeName.\n *\n * @param {string} fontSizeSlug Slug of the fontSize.\n *\n * @return {string} String with the class corresponding to the fontSize passed.\n * The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.\n */\nexport function getFontSizeClass( fontSizeSlug ) {\n\tif ( ! fontSizeSlug ) {\n\t\treturn;\n\t}\n\n\treturn `has-${ kebabCase( fontSizeSlug ) }-font-size`;\n}\n","/**\n * External dependencies\n */\nimport { find, pickBy, reduce, some, upperFirst } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, compose } from '@wordpress/compose';\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { getFontSize, getFontSizeClass } from './utils';\n\n/**\n * Higher-order component, which handles font size logic for class generation,\n * font size value retrieval, and font size change handling.\n *\n * @param {...(object|string)} args The arguments should all be strings\n * Each string contains the font size attribute name e.g: 'fontSize'.\n *\n * @return {Function} Higher-order component.\n */\nexport default ( ...fontSizeNames ) => {\n\t/*\n\t* Computes an object whose key is the font size attribute name as passed in the array,\n\t* and the value is the custom font size attribute name.\n\t* Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.\n\t*/\n\tconst fontSizeAttributeNames = reduce( fontSizeNames, ( fontSizeAttributeNamesAccumulator, fontSizeAttributeName ) => {\n\t\tfontSizeAttributeNamesAccumulator[ fontSizeAttributeName ] = `custom${ upperFirst( fontSizeAttributeName ) }`;\n\t\treturn fontSizeAttributeNamesAccumulator;\n\t}, {} );\n\n\treturn createHigherOrderComponent(\n\t\tcompose( [\n\t\t\twithSelect( ( select ) => {\n\t\t\t\tconst { fontSizes } = select( 'core/editor' ).getEditorSettings();\n\t\t\t\treturn {\n\t\t\t\t\tfontSizes,\n\t\t\t\t};\n\t\t\t} ),\n\t\t\t( WrappedComponent ) => {\n\t\t\t\treturn class extends Component {\n\t\t\t\t\tconstructor( props ) {\n\t\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t\tthis.setters = this.createSetters();\n\n\t\t\t\t\t\tthis.state = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetters() {\n\t\t\t\t\t\treturn reduce( fontSizeAttributeNames, ( settersAccumulator, customFontSizeAttributeName, fontSizeAttributeName ) => {\n\t\t\t\t\t\t\tconst upperFirstFontSizeAttributeName = upperFirst( fontSizeAttributeName );\n\t\t\t\t\t\t\tsettersAccumulator[ `set${ upperFirstFontSizeAttributeName }` ] =\n\t\t\t\t\t\t\t\tthis.createSetFontSize( fontSizeAttributeName, customFontSizeAttributeName );\n\t\t\t\t\t\t\treturn settersAccumulator;\n\t\t\t\t\t\t}, {} );\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetFontSize( fontSizeAttributeName, customFontSizeAttributeName ) {\n\t\t\t\t\t\treturn ( fontSizeValue ) => {\n\t\t\t\t\t\t\tconst fontSizeObject = find( this.props.fontSizes, { size: fontSizeValue } );\n\t\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t\t[ fontSizeAttributeName ]: fontSizeObject && fontSizeObject.slug ? fontSizeObject.slug : undefined,\n\t\t\t\t\t\t\t\t[ customFontSizeAttributeName ]: fontSizeObject && fontSizeObject.slug ? undefined : fontSizeValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tstatic getDerivedStateFromProps( { attributes, fontSizes }, previousState ) {\n\t\t\t\t\t\tconst didAttributesChange = ( customFontSizeAttributeName, fontSizeAttributeName ) => {\n\t\t\t\t\t\t\tif ( previousState[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t// if new font size is name compare with the previous slug\n\t\t\t\t\t\t\t\tif ( attributes[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t\treturn attributes[ fontSizeAttributeName ] !== previousState[ fontSizeAttributeName ].slug;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// if font size is not named, update when the font size value changes.\n\t\t\t\t\t\t\t\treturn previousState[ fontSizeAttributeName ].size !== attributes[ customFontSizeAttributeName ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// in this case we need to build the font size object\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif ( ! some( fontSizeAttributeNames, didAttributesChange ) ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst newState = reduce(\n\t\t\t\t\t\t\tpickBy( fontSizeAttributeNames, didAttributesChange ),\n\t\t\t\t\t\t\t( newStateAccumulator, customFontSizeAttributeName, fontSizeAttributeName ) => {\n\t\t\t\t\t\t\t\tconst fontSizeAttributeValue = attributes[ fontSizeAttributeName ];\n\t\t\t\t\t\t\t\tconst fontSizeObject = getFontSize(\n\t\t\t\t\t\t\t\t\tfontSizes,\n\t\t\t\t\t\t\t\t\tfontSizeAttributeValue,\n\t\t\t\t\t\t\t\t\tattributes[ customFontSizeAttributeName ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnewStateAccumulator[ fontSizeAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...fontSizeObject,\n\t\t\t\t\t\t\t\t\tclass: getFontSizeClass( fontSizeAttributeValue ),\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\treturn newStateAccumulator;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...previousState,\n\t\t\t\t\t\t\t...newState,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\trender() {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\tfontSizes: undefined,\n\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t] ),\n\t\t'withFontSizes'\n\t);\n};\n","/**\n * External dependencies\n */\nimport { reduce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\n\n/**\n * Component which renders a div with passed props applied except the optional\n * `childHandledEvents` prop. Event prop handlers are replaced with a proxying\n * event handler to capture and prevent events from being handled by ancestor\n * `IgnoreNestedEvents` elements by testing the presence of a private property\n * assigned on the event object.\n *\n * Optionally accepts an `childHandledEvents` prop array, which can be used in\n * instances where an inner `IgnoreNestedEvents` element exists and the outer\n * element should stop propagation but not invoke a callback handler, since it\n * would be assumed these are invoked by the child element.\n *\n * @type {Component}\n */\nexport class IgnoreNestedEvents extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.proxyEvent = this.proxyEvent.bind( this );\n\n\t\t// The event map is responsible for tracking an event type to a React\n\t\t// component prop name, since it is easy to determine event type from\n\t\t// a React prop name, but not the other way around.\n\t\tthis.eventMap = {};\n\t}\n\n\t/**\n\t * General event handler which only calls to its original props callback if\n\t * it has not already been handled by a descendant IgnoreNestedEvents.\n\t *\n\t * @param {Event} event Event object.\n\t *\n\t * @return {void}\n\t */\n\tproxyEvent( event ) {\n\t\tconst isHandled = !! event.nativeEvent._blockHandled;\n\n\t\t// Assign into the native event, since React will reuse their synthetic\n\t\t// event objects and this property assignment could otherwise leak.\n\t\t//\n\t\t// See: https://reactjs.org/docs/events.html#event-pooling\n\t\tevent.nativeEvent._blockHandled = true;\n\n\t\t// Invoke original prop handler\n\t\tlet propKey = this.eventMap[ event.type ];\n\n\t\t// If already handled (i.e. assume nested block), only invoke a\n\t\t// corresponding \"Handled\"-suffixed prop callback.\n\t\tif ( isHandled ) {\n\t\t\tpropKey += 'Handled';\n\t\t}\n\n\t\tif ( this.props[ propKey ] ) {\n\t\t\tthis.props[ propKey ]( event );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { childHandledEvents = [], forwardedRef, ...props } = this.props;\n\n\t\tconst eventHandlers = reduce( [\n\t\t\t...childHandledEvents,\n\t\t\t...Object.keys( props ),\n\t\t], ( result, key ) => {\n\t\t\t// Try to match prop key as event handler\n\t\t\tconst match = key.match( /^on([A-Z][a-zA-Z]+?)(Handled)?$/ );\n\t\t\tif ( match ) {\n\t\t\t\tconst isHandledProp = !! match[ 2 ];\n\t\t\t\tif ( isHandledProp ) {\n\t\t\t\t\t// Avoid assigning through the invalid prop key. This\n\t\t\t\t\t// assumes mutation of shallow clone by above spread.\n\t\t\t\t\tdelete props[ key ];\n\t\t\t\t}\n\n\t\t\t\t// Re-map the prop to the local proxy handler to check whether\n\t\t\t\t// the event has already been handled.\n\t\t\t\tconst proxiedPropName = 'on' + match[ 1 ];\n\t\t\t\tresult[ proxiedPropName ] = this.proxyEvent;\n\n\t\t\t\t// Assign event -> propName into an instance variable, so as to\n\t\t\t\t// avoid re-renders which could be incurred either by setState\n\t\t\t\t// or in mapping values to a newly created function.\n\t\t\t\tthis.eventMap[ match[ 1 ].toLowerCase() ] = proxiedPropName;\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, {} );\n\n\t\treturn <div ref={ forwardedRef } { ...props } { ...eventHandlers } />;\n\t}\n}\n\nconst forwardedIgnoreNestedEvents = ( props, ref ) => {\n\treturn <IgnoreNestedEvents { ...props } forwardedRef={ ref } />;\n};\nforwardedIgnoreNestedEvents.displayName = 'IgnoreNestedEvents';\n\nexport default forwardRef( forwardedIgnoreNestedEvents );\n","// Block Creation Components\nexport { default as Autocomplete } from './autocomplete';\nexport * from './autocompleters';\nexport { default as AlignmentToolbar } from './alignment-toolbar';\nexport { default as BlockAlignmentToolbar } from './block-alignment-toolbar';\nexport { default as BlockControls } from './block-controls';\nexport { default as BlockEdit } from './block-edit';\nexport { default as BlockFormatControls } from './block-format-controls';\nexport { default as BlockNavigationDropdown } from './block-navigation/dropdown';\nexport { default as BlockIcon } from './block-icon';\nexport { default as ColorPalette } from './color-palette';\nexport { default as withColorContext } from './color-palette/with-color-context';\nexport * from './colors';\nexport { default as ContrastChecker } from './contrast-checker';\nexport * from './font-sizes';\nexport { default as InnerBlocks } from './inner-blocks';\nexport { default as InspectorAdvancedControls } from './inspector-advanced-controls';\nexport { default as InspectorControls } from './inspector-controls';\nexport { default as PanelColorSettings } from './panel-color-settings';\nexport { default as PlainText } from './plain-text';\nexport {\n\tdefault as RichText,\n\tRichTextShortcut,\n\tRichTextToolbarButton,\n\tRichTextInserterItem,\n} from './rich-text';\nexport { default as ServerSideRender } from './server-side-render';\nexport { default as MediaPlaceholder } from './media-placeholder';\nexport { default as MediaUpload } from './media-upload';\nexport { default as MediaUploadCheck } from './media-upload/check';\nexport { default as URLInput } from './url-input';\nexport { default as URLInputButton } from './url-input/button';\nexport { default as URLPopover } from './url-popover';\n\n// Post Related Components\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { default as EditorGlobalKeyboardShortcuts } from './editor-global-keyboard-shortcuts';\nexport { default as EditorHistoryRedo } from './editor-history/redo';\nexport { default as EditorHistoryUndo } from './editor-history/undo';\nexport { default as EditorNotices } from './editor-notices';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './page-attributes/template';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostComments } from './post-comments';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFormat } from './post-format';\nexport { default as PostFormatCheck } from './post-format/check';\nexport { default as PostLastRevision } from './post-last-revision';\nexport { default as PostLastRevisionCheck } from './post-last-revision/check';\nexport { default as PostLockedModal } from './post-locked-modal';\nexport { default as PostPendingStatus } from './post-pending-status';\nexport { default as PostPendingStatusCheck } from './post-pending-status/check';\nexport { default as PostPingbacks } from './post-pingbacks';\nexport { default as PostPreviewButton } from './post-preview-button';\nexport { default as PostPublishButton } from './post-publish-button';\nexport { default as PostPublishButtonLabel } from './post-publish-button/label';\nexport { default as PostPublishPanel } from './post-publish-panel';\nexport { default as PostSavedState } from './post-saved-state';\nexport { default as PostSchedule } from './post-schedule';\nexport { default as PostScheduleCheck } from './post-schedule/check';\nexport { default as PostScheduleLabel } from './post-schedule/label';\nexport { default as PostSticky } from './post-sticky';\nexport { default as PostStickyCheck } from './post-sticky/check';\nexport { default as PostSwitchToDraftButton } from './post-switch-to-draft-button';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTrash } from './post-trash';\nexport { default as PostTrashCheck } from './post-trash/check';\nexport { default as PostTypeSupportCheck } from './post-type-support-check';\nexport { default as PostVisibility } from './post-visibility';\nexport { default as PostVisibilityLabel } from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\n\n// Content Related Components\nexport { default as BlockInspector } from './block-inspector';\nexport { default as BlockList } from './block-list';\nexport { default as BlockMover } from './block-mover';\nexport { default as BlockSelectionClearer } from './block-selection-clearer';\nexport { default as BlockSettingsMenu } from './block-settings-menu';\nexport { default as _BlockSettingsMenuFirstItem } from './block-settings-menu/block-settings-menu-first-item';\nexport { default as _BlockSettingsMenuPluginsExtension } from './block-settings-menu/block-settings-menu-plugins-extension';\nexport { default as BlockTitle } from './block-title';\nexport { default as BlockToolbar } from './block-toolbar';\nexport { default as CopyHandler } from './copy-handler';\nexport { default as DefaultBlockAppender } from './default-block-appender';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as Inserter } from './inserter';\nexport { default as MultiBlocksSwitcher } from './block-switcher/multi-blocks-switcher';\nexport { default as MultiSelectScrollIntoView } from './multi-select-scroll-into-view';\nexport { default as NavigableToolbar } from './navigable-toolbar';\nexport { default as ObserveTyping } from './observe-typing';\nexport { default as PreserveScrollInReorder } from './preserve-scroll-in-reorder';\nexport { default as SkipToSelectedBlock } from './skip-to-selected-block';\nexport { default as Warning } from './warning';\nexport { default as WritingFlow } from './writing-flow';\n\n// State Related Components\nexport { default as EditorProvider } from './provider';\n","/**\n * External dependencies\n */\nimport { pick, isEqual, map } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { withViewportMatch } from '@wordpress/viewport';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { synchronizeBlocksWithTemplate, withBlockContentContext } from '@wordpress/blocks';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport { withBlockEditContext } from '../block-edit/context';\n\nclass InnerBlocks extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\ttemplateInProcess: !! this.props.template,\n\t\t};\n\t\tthis.updateNestedSettings();\n\t}\n\n\tgetTemplateLock() {\n\t\tconst {\n\t\t\ttemplateLock,\n\t\t\tparentLock,\n\t\t} = this.props;\n\t\treturn templateLock === undefined ? parentLock : templateLock;\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { innerBlocks } = this.props.block;\n\t\t// only synchronize innerBlocks with template if innerBlocks are empty or a locking all exists\n\t\tif ( innerBlocks.length === 0 || this.getTemplateLock() === 'all' ) {\n\t\t\tthis.synchronizeBlocksWithTemplate();\n\t\t}\n\t\tif ( this.state.templateInProcess ) {\n\t\t\tthis.setState( {\n\t\t\t\ttemplateInProcess: false,\n\t\t\t} );\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { template, block } = this.props;\n\t\tconst { innerBlocks } = block;\n\n\t\tthis.updateNestedSettings();\n\t\t// only synchronize innerBlocks with template if innerBlocks are empty or a locking all exists\n\t\tif ( innerBlocks.length === 0 || this.getTemplateLock() === 'all' ) {\n\t\t\tconst hasTemplateChanged = ! isEqual( template, prevProps.template );\n\t\t\tif ( hasTemplateChanged ) {\n\t\t\t\tthis.synchronizeBlocksWithTemplate();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Called on mount or when a mismatch exists between the templates and\n\t * inner blocks, synchronizes inner blocks with the template, replacing\n\t * current blocks.\n\t */\n\tsynchronizeBlocksWithTemplate() {\n\t\tconst { template, block, replaceInnerBlocks } = this.props;\n\t\tconst { innerBlocks } = block;\n\n\t\t// Synchronize with templates. If the next set differs, replace.\n\t\tconst nextBlocks = synchronizeBlocksWithTemplate( innerBlocks, template );\n\t\tif ( ! isEqual( nextBlocks, innerBlocks\t) ) {\n\t\t\treplaceInnerBlocks( nextBlocks );\n\t\t}\n\t}\n\n\tupdateNestedSettings() {\n\t\tconst {\n\t\t\tblockListSettings,\n\t\t\tallowedBlocks,\n\t\t\tupdateNestedSettings,\n\t\t} = this.props;\n\n\t\tconst newSettings = {\n\t\t\tallowedBlocks,\n\t\t\ttemplateLock: this.getTemplateLock(),\n\t\t};\n\n\t\tif ( ! isShallowEqual( blockListSettings, newSettings ) ) {\n\t\t\tupdateNestedSettings( newSettings );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tclientId,\n\t\t\tisSmallScreen,\n\t\t\tisSelectedBlockInRoot,\n\t\t} = this.props;\n\t\tconst { templateInProcess } = this.state;\n\n\t\tconst classes = classnames( 'editor-inner-blocks', {\n\t\t\t'has-overlay': isSmallScreen && ! isSelectedBlockInRoot,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div className={ classes }>\n\t\t\t\t{ ! templateInProcess && (\n\t\t\t\t\t<BlockList\n\t\t\t\t\t\trootClientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nInnerBlocks = compose( [\n\twithBlockEditContext( ( context ) => pick( context, [ 'clientId' ] ) ),\n\twithViewportMatch( { isSmallScreen: '< medium' } ),\n\twithSelect( ( select, ownProps ) => {\n\t\tconst {\n\t\t\tisBlockSelected,\n\t\t\thasSelectedInnerBlock,\n\t\t\tgetBlock,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetTemplateLock,\n\t\t} = select( 'core/editor' );\n\t\tconst { clientId } = ownProps;\n\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\treturn {\n\t\t\tisSelectedBlockInRoot: isBlockSelected( clientId ) || hasSelectedInnerBlock( clientId ),\n\t\t\tblock: getBlock( clientId ),\n\t\t\tblockListSettings: getBlockListSettings( clientId ),\n\t\t\tparentLock: getTemplateLock( rootClientId ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst {\n\t\t\treplaceBlocks,\n\t\t\tinsertBlocks,\n\t\t\tupdateBlockListSettings,\n\t\t} = dispatch( 'core/editor' );\n\t\tconst { block, clientId, templateInsertUpdatesSelection = true } = ownProps;\n\n\t\treturn {\n\t\t\treplaceInnerBlocks( blocks ) {\n\t\t\t\tconst clientIds = map( block.innerBlocks, 'clientId' );\n\t\t\t\tif ( clientIds.length ) {\n\t\t\t\t\treplaceBlocks( clientIds, blocks );\n\t\t\t\t} else {\n\t\t\t\t\tinsertBlocks( blocks, undefined, clientId, templateInsertUpdatesSelection );\n\t\t\t\t}\n\t\t\t},\n\t\t\tupdateNestedSettings( settings ) {\n\t\t\t\tdispatch( updateBlockListSettings( clientId, settings ) );\n\t\t\t},\n\t\t};\n\t} ),\n] )( InnerBlocks );\n\nInnerBlocks.Content = withBlockContentContext(\n\t( { BlockContent } ) => <BlockContent />\n);\n\nexport default InnerBlocks;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction InserterListItem( {\n\ticon,\n\thasChildBlocksWithInserterSupport,\n\tonClick,\n\tisDisabled,\n\ttitle,\n\tclassName,\n\t...props\n} ) {\n\tconst itemIconStyle = icon ? {\n\t\tbackgroundColor: icon.background,\n\t\tcolor: icon.foreground,\n\t} : {};\n\tconst itemIconStackStyle = icon && icon.shadowColor ? {\n\t\tbackgroundColor: icon.shadowColor,\n\t} : {};\n\n\treturn (\n\t\t<li className=\"editor-block-types-list__list-item\">\n\t\t\t<button\n\t\t\t\tclassName={\n\t\t\t\t\tclassnames(\n\t\t\t\t\t\t'editor-block-types-list__item',\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'editor-block-types-list__item-has-children':\n\t\t\t\t\t\t\t\thasChildBlocksWithInserterSupport,\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tonClick();\n\t\t\t\t} }\n\t\t\t\tdisabled={ isDisabled }\n\t\t\t\taria-label={ title } // Fix for IE11 and JAWS 2018.\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tclassName=\"editor-block-types-list__item-icon\"\n\t\t\t\t\tstyle={ itemIconStyle }\n\t\t\t\t>\n\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t\t{ hasChildBlocksWithInserterSupport &&\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"editor-block-types-list__item-icon-stack\"\n\t\t\t\t\t\t\tstyle={ itemIconStackStyle }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"editor-block-types-list__item-title\">\n\t\t\t\t\t{ title }\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t</li>\n\t);\n}\n\nexport default InserterListItem;\n","/**\n * External dependencies\n */\nimport { filter, isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { IconButton } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { withDispatch, withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction InserterWithShortcuts( { items, isLocked, onInsert } ) {\n\tif ( isLocked ) {\n\t\treturn null;\n\t}\n\n\tconst itemsWithoutDefaultBlock = filter( items, ( item ) => {\n\t\treturn ! item.isDisabled && (\n\t\t\titem.name !== getDefaultBlockName() ||\n\t\t\t! isEmpty( item.initialAttributes )\n\t\t);\n\t} ).slice( 0, 3 );\n\n\treturn (\n\t\t<div className=\"editor-inserter-with-shortcuts\">\n\t\t\t{ itemsWithoutDefaultBlock.map( ( item ) => (\n\t\t\t\t<IconButton\n\t\t\t\t\tkey={ item.id }\n\t\t\t\t\tclassName=\"editor-inserter-with-shortcuts__block\"\n\t\t\t\t\tonClick={ () => onInsert( item ) }\n\t\t\t\t\t// translators: %s: block title/name to be added\n\t\t\t\t\tlabel={ sprintf( __( 'Add %s' ), item.title ) }\n\t\t\t\t\ticon={ (\n\t\t\t\t\t\t<BlockIcon icon={ item.icon } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select, { rootClientId } ) => {\n\t\tconst { getInserterItems, getTemplateLock } = select( 'core/editor' );\n\t\treturn {\n\t\t\titems: getInserterItems( rootClientId ),\n\t\t\tisLocked: !! getTemplateLock( rootClientId ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst { clientId, rootClientId } = ownProps;\n\n\t\treturn {\n\t\t\tonInsert( { name, initialAttributes } ) {\n\t\t\t\tconst block = createBlock( name, initialAttributes );\n\t\t\t\tif ( clientId ) {\n\t\t\t\t\tdispatch( 'core/editor' ).replaceBlocks( clientId, block );\n\t\t\t\t} else {\n\t\t\t\t\tdispatch( 'core/editor' ).insertBlock( block, undefined, rootClientId );\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n)( InserterWithShortcuts );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { ifCondition, compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport BlockIcon from '../block-icon';\n\nfunction ChildBlocks( { rootBlockIcon, rootBlockTitle, items, ...props } ) {\n\treturn (\n\t\t<div className=\"editor-inserter__child-blocks\">\n\t\t\t{ ( rootBlockIcon || rootBlockTitle ) && (\n\t\t\t\t<div className=\"editor-inserter__parent-block-header\">\n\t\t\t\t\t<BlockIcon icon={ rootBlockIcon } showColors />\n\t\t\t\t\t{ rootBlockTitle && <h2>{ rootBlockTitle }</h2> }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<BlockTypesList items={ items } { ...props } />\n\t\t</div>\n\t);\n}\n\nexport default compose(\n\tifCondition( ( { items } ) => items && items.length > 0 ),\n\twithSelect( ( select, { rootClientId } ) => {\n\t\tconst {\n\t\t\tgetBlockType,\n\t\t} = select( 'core/blocks' );\n\t\tconst {\n\t\t\tgetBlockName,\n\t\t} = select( 'core/editor' );\n\t\tconst rootBlockName = getBlockName( rootClientId );\n\t\tconst rootBlockType = getBlockType( rootBlockName );\n\t\treturn {\n\t\t\trootBlockTitle: rootBlockType && rootBlockType.title,\n\t\t\trootBlockIcon: rootBlockType && rootBlockType.icon,\n\t\t};\n\t} ),\n)( ChildBlocks );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, IconButton } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport InserterMenu from './menu';\n\nconst defaultRenderToggle = ( { onToggle, disabled, isOpen } ) => (\n\t<IconButton\n\t\ticon=\"insert\"\n\t\tlabel={ __( 'Add block' ) }\n\t\tonClick={ onToggle }\n\t\tclassName=\"editor-inserter__toggle\"\n\t\taria-haspopup=\"true\"\n\t\taria-expanded={ isOpen }\n\t\tdisabled={ disabled }\n\t/>\n);\n\nclass Inserter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onToggle = this.onToggle.bind( this );\n\t\tthis.renderToggle = this.renderToggle.bind( this );\n\t\tthis.renderContent = this.renderContent.bind( this );\n\t}\n\n\tonToggle( isOpen ) {\n\t\tconst { onToggle } = this.props;\n\n\t\t// Surface toggle callback to parent component\n\t\tif ( onToggle ) {\n\t\t\tonToggle( isOpen );\n\t\t}\n\t}\n\n\t/**\n\t * Render callback to display Dropdown toggle element.\n\t *\n\t * @param {Function} options.onToggle Callback to invoke when toggle is\n\t * pressed.\n\t * @param {boolean} options.isOpen Whether dropdown is currently open.\n\t *\n\t * @return {WPElement} Dropdown toggle element.\n\t */\n\trenderToggle( { onToggle, isOpen } ) {\n\t\tconst {\n\t\t\tdisabled,\n\t\t\trenderToggle = defaultRenderToggle,\n\t\t} = this.props;\n\n\t\treturn renderToggle( { onToggle, isOpen, disabled } );\n\t}\n\n\t/**\n\t * Render callback to display Dropdown content element.\n\t *\n\t * @param {Function} options.onClose Callback to invoke when dropdown is\n\t * closed.\n\t *\n\t * @return {WPElement} Dropdown content element.\n\t */\n\trenderContent( { onClose } ) {\n\t\tconst { rootClientId, index } = this.props;\n\n\t\treturn (\n\t\t\t<InserterMenu\n\t\t\t\tonSelect={ onClose }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tindex={ index }\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { position, title } = this.props;\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"editor-inserter\"\n\t\t\t\tcontentClassName=\"editor-inserter__popover\"\n\t\t\t\tposition={ position }\n\t\t\t\tonToggle={ this.onToggle }\n\t\t\t\texpandOnMobile\n\t\t\t\theaderTitle={ title }\n\t\t\t\trenderToggle={ this.renderToggle }\n\t\t\t\trenderContent={ this.renderContent }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { rootClientId, index } ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetBlockInsertionPoint,\n\t\t\thasInserterItems,\n\t\t} = select( 'core/editor' );\n\n\t\tif ( rootClientId === undefined && index === undefined ) {\n\t\t\t// Unless explicitly provided, the default insertion point provided\n\t\t\t// by the store occurs immediately following the selected block.\n\t\t\t// Otherwise, the default behavior for an undefined index is to\n\t\t\t// append block to the end of the rootClientId context.\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\t( { rootClientId, index } = insertionPoint );\n\t\t}\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\thasItems: hasInserterItems( rootClientId ),\n\t\t\trootClientId,\n\t\t\tindex,\n\t\t};\n\t} ),\n\tifCondition( ( { hasItems } ) => hasItems ),\n] )( Inserter );\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody, Slot } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\n\nconst InserterInlineElements = ( { filterValue } ) => {\n\treturn (\n\t\t<Slot name=\"Inserter.InlineElements\" fillProps={ { filterValue } }>\n\t\t\t{ ( fills ) => ! isEmpty( fills ) && (\n\t\t\t\t<PanelBody\n\t\t\t\t\ttitle={ __( 'Inline Elements' ) }\n\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\tclassName=\"editor-inserter__inline-elements\"\n\t\t\t\t>\n\t\t\t\t\t<BlockTypesList>\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</BlockTypesList>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</Slot>\n\t);\n};\n\nexport default InserterInlineElements;\n","/**\n * External dependencies\n */\nimport {\n\tfilter,\n\tfind,\n\tfindIndex,\n\tflow,\n\tgroupBy,\n\tisEmpty,\n\tmap,\n\tsome,\n\tsortBy,\n\twithout,\n\tincludes,\n\tdeburr,\n} from 'lodash';\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, _x, sprintf } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSpokenMessages, PanelBody } from '@wordpress/components';\nimport {\n\tgetCategories,\n\tisReusableBlock,\n\tcreateBlock,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { withInstanceId, compose, withSafeTimeout } from '@wordpress/compose';\nimport { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\nimport BlockTypesList from '../block-types-list';\nimport ChildBlocks from './child-blocks';\nimport InserterInlineElements from './inline-elements';\n\nconst MAX_SUGGESTED_ITEMS = 9;\n\nconst stopKeyPropagation = ( event ) => event.stopPropagation();\n\n/**\n * Filters an item list given a search term.\n *\n * @param {Array} items Item list\n * @param {string} searchTerm Search term.\n *\n * @return {Array} Filtered item list.\n */\nexport const searchItems = ( items, searchTerm ) => {\n\tconst normalizedSearchTerm = normalizeTerm( searchTerm );\n\tconst matchSearch = ( string ) => normalizeTerm( string ).indexOf( normalizedSearchTerm ) !== -1;\n\tconst categories = getCategories();\n\n\treturn items.filter( ( item ) => {\n\t\tconst itemCategory = find( categories, { slug: item.category } );\n\t\treturn matchSearch( item.title ) || some( item.keywords, matchSearch ) || ( itemCategory && matchSearch( itemCategory.title ) );\n\t} );\n};\n\n/**\n * Converts the search term into a normalized term.\n *\n * @param {string} term The search term to normalize.\n *\n * @return {string} The normalized search term.\n */\nexport const normalizeTerm = ( term ) => {\n\t// Disregard diacritics.\n\t// Input: \"média\"\n\tterm = deburr( term );\n\n\t// Accommodate leading slash, matching autocomplete expectations.\n\t// Input: \"/media\"\n\tterm = term.replace( /^\\//, '' );\n\n\t// Lowercase.\n\t// Input: \"MEDIA\"\n\tterm = term.toLowerCase();\n\n\t// Strip leading and trailing whitespace.\n\t// Input: \" media \"\n\tterm = term.trim();\n\n\treturn term;\n};\n\nexport class InserterMenu extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tchildItems: [],\n\t\t\tfilterValue: '',\n\t\t\thoveredItem: null,\n\t\t\tsuggestedItems: [],\n\t\t\treusableItems: [],\n\t\t\titemsPerCategory: {},\n\t\t\topenPanels: [ 'suggested' ],\n\t\t};\n\t\tthis.onChangeSearchInput = this.onChangeSearchInput.bind( this );\n\t\tthis.onHover = this.onHover.bind( this );\n\t\tthis.panels = {};\n\t\tthis.inserterResults = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\t// This could be replaced by a resolver.\n\t\tthis.props.fetchReusableBlocks();\n\t\tthis.filter();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.items !== this.props.items ) {\n\t\t\tthis.filter( this.state.filterValue );\n\t\t}\n\t}\n\n\tonChangeSearchInput( event ) {\n\t\tthis.filter( event.target.value );\n\t}\n\n\tonHover( item ) {\n\t\tthis.setState( {\n\t\t\thoveredItem: item,\n\t\t} );\n\n\t\tconst { showInsertionPoint, hideInsertionPoint } = this.props;\n\t\tif ( item ) {\n\t\t\tconst { rootClientId, index } = this.props;\n\t\t\tshowInsertionPoint( rootClientId, index );\n\t\t} else {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\tbindPanel( name ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.panels[ name ] = ref;\n\t\t};\n\t}\n\n\tonTogglePanel( panel ) {\n\t\treturn () => {\n\t\t\tconst isOpened = this.state.openPanels.indexOf( panel ) !== -1;\n\t\t\tif ( isOpened ) {\n\t\t\t\tthis.setState( {\n\t\t\t\t\topenPanels: without( this.state.openPanels, panel ),\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tthis.setState( {\n\t\t\t\t\topenPanels: [\n\t\t\t\t\t\t...this.state.openPanels,\n\t\t\t\t\t\tpanel,\n\t\t\t\t\t],\n\t\t\t\t} );\n\n\t\t\t\tthis.props.setTimeout( () => {\n\t\t\t\t\t// We need a generic way to access the panel's container\n\t\t\t\t\t// eslint-disable-next-line react/no-find-dom-node\n\t\t\t\t\tscrollIntoView( this.panels[ panel ], this.inserterResults.current, {\n\t\t\t\t\t\talignWithTop: true,\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\t}\n\n\tfilter( filterValue = '' ) {\n\t\tconst { debouncedSpeak, items, rootChildBlocks } = this.props;\n\t\tconst filteredItems = searchItems( items, filterValue );\n\n\t\tconst childItems = filter( filteredItems, ( { name } ) => includes( rootChildBlocks, name ) );\n\n\t\tlet suggestedItems = [];\n\t\tif ( ! filterValue ) {\n\t\t\tconst maxSuggestedItems = this.props.maxSuggestedItems || MAX_SUGGESTED_ITEMS;\n\t\t\tsuggestedItems = filter( items, ( item ) => item.utility > 0 ).slice( 0, maxSuggestedItems );\n\t\t}\n\n\t\tconst reusableItems = filter( filteredItems, { category: 'reusable' } );\n\n\t\tconst getCategoryIndex = ( item ) => {\n\t\t\treturn findIndex( getCategories(), ( category ) => category.slug === item.category );\n\t\t};\n\t\tconst itemsPerCategory = flow(\n\t\t\t( itemList ) => filter( itemList, ( item ) => item.category !== 'reusable' ),\n\t\t\t( itemList ) => sortBy( itemList, getCategoryIndex ),\n\t\t\t( itemList ) => groupBy( itemList, 'category' )\n\t\t)( filteredItems );\n\n\t\tlet openPanels = this.state.openPanels;\n\t\tif ( filterValue !== this.state.filterValue ) {\n\t\t\tif ( ! filterValue ) {\n\t\t\t\topenPanels = [ 'suggested' ];\n\t\t\t} else if ( reusableItems.length ) {\n\t\t\t\topenPanels = [ 'reusable' ];\n\t\t\t} else if ( filteredItems.length ) {\n\t\t\t\tconst firstCategory = find( getCategories(), ( { slug } ) => itemsPerCategory[ slug ] && itemsPerCategory[ slug ].length );\n\t\t\t\topenPanels = [ firstCategory.slug ];\n\t\t\t}\n\t\t}\n\n\t\tthis.setState( {\n\t\t\thoveredItem: null,\n\t\t\tchildItems,\n\t\t\tfilterValue,\n\t\t\tsuggestedItems,\n\t\t\treusableItems,\n\t\t\titemsPerCategory,\n\t\t\topenPanels,\n\t\t} );\n\n\t\tconst resultCount = Object.keys( itemsPerCategory ).reduce( ( accumulator, currentCategorySlug ) => {\n\t\t\treturn accumulator + itemsPerCategory[ currentCategorySlug ].length;\n\t\t}, 0 );\n\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t_n( '%d result found.', '%d results found.', resultCount ),\n\t\t\tresultCount\n\t\t);\n\n\t\tdebouncedSpeak( resultsFoundMessage, 'assertive' );\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( includes( [ LEFT, DOWN, RIGHT, UP, BACKSPACE, ENTER ], event.keyCode ) ) {\n\t\t\t// Stop the key event from propagating up to ObserveTyping.startTypingInTextField.\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { instanceId, onSelect, rootClientId } = this.props;\n\t\tconst { childItems, filterValue, hoveredItem, suggestedItems, reusableItems, itemsPerCategory, openPanels } = this.state;\n\t\tconst isPanelOpen = ( panel ) => openPanels.indexOf( panel ) !== -1;\n\t\tconst isSearching = !! filterValue;\n\n\t\t// Disable reason (no-autofocus): The inserter menu is a modal display, not one which\n\t\t// is always visible, and one which already incurs this behavior of autoFocus via\n\t\t// Popover's focusOnMount.\n\t\t// Disable reason (no-static-element-interactions): Navigational key-presses within\n\t\t// the menu are prevented from triggering WritingFlow and ObserveTyping interactions.\n\t\t/* eslint-disable jsx-a11y/no-autofocus, jsx-a11y/no-static-element-interactions */\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName=\"editor-inserter__menu\"\n\t\t\t\tonKeyPress={ stopKeyPropagation }\n\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t>\n\t\t\t\t<label htmlFor={ `editor-inserter__search-${ instanceId }` } className=\"screen-reader-text\">\n\t\t\t\t\t{ __( 'Search for a block' ) }\n\t\t\t\t</label>\n\t\t\t\t<input\n\t\t\t\t\tid={ `editor-inserter__search-${ instanceId }` }\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tplaceholder={ __( 'Search for a block' ) }\n\t\t\t\t\tclassName=\"editor-inserter__search\"\n\t\t\t\t\tautoFocus\n\t\t\t\t\tonChange={ this.onChangeSearchInput }\n\t\t\t\t/>\n\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"editor-inserter__results\"\n\t\t\t\t\tref={ this.inserterResults }\n\t\t\t\t\ttabIndex=\"0\"\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-label={ __( 'Available block types' ) }\n\t\t\t\t>\n\n\t\t\t\t\t<ChildBlocks\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\titems={ childItems }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tonHover={ this.onHover }\n\t\t\t\t\t/>\n\n\t\t\t\t\t{ !! suggestedItems.length &&\n\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\ttitle={ _x( 'Most Used', 'blocks' ) }\n\t\t\t\t\t\t\topened={ isPanelOpen( 'suggested' ) }\n\t\t\t\t\t\t\tonToggle={ this.onTogglePanel( 'suggested' ) }\n\t\t\t\t\t\t\tref={ this.bindPanel( 'suggested' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTypesList items={ suggestedItems } onSelect={ onSelect } onHover={ this.onHover } />\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t}\n\n\t\t\t\t\t<InserterInlineElements filterValue={ filterValue } />\n\n\t\t\t\t\t{ map( getCategories(), ( category ) => {\n\t\t\t\t\t\tconst categoryItems = itemsPerCategory[ category.slug ];\n\t\t\t\t\t\tif ( ! categoryItems || ! categoryItems.length ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\t\t\ticon={ category.icon }\n\t\t\t\t\t\t\t\topened={ isSearching || isPanelOpen( category.slug ) }\n\t\t\t\t\t\t\t\tonToggle={ this.onTogglePanel( category.slug ) }\n\t\t\t\t\t\t\t\tref={ this.bindPanel( category.slug ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockTypesList items={ categoryItems } onSelect={ onSelect } onHover={ this.onHover } />\n\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\n\t\t\t\t\t{ !! reusableItems.length && (\n\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\tclassName=\"editor-inserter__reusable-blocks-panel\"\n\t\t\t\t\t\t\ttitle={ __( 'Reusable' ) }\n\t\t\t\t\t\t\topened={ isPanelOpen( 'reusable' ) }\n\t\t\t\t\t\t\tonToggle={ this.onTogglePanel( 'reusable' ) }\n\t\t\t\t\t\t\ticon=\"controls-repeat\"\n\t\t\t\t\t\t\tref={ this.bindPanel( 'reusable' ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTypesList items={ reusableItems } onSelect={ onSelect } onHover={ this.onHover } />\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\tclassName=\"editor-inserter__manage-reusable-blocks\"\n\t\t\t\t\t\t\t\thref=\"edit.php?post_type=wp_block\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Manage All Reusable Blocks' ) }\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isEmpty( suggestedItems ) && isEmpty( reusableItems ) && isEmpty( itemsPerCategory ) && (\n\t\t\t\t\t\t<p className=\"editor-inserter__no-results\">{ __( 'No blocks found.' ) }</p>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\n\t\t\t\t{ hoveredItem && isReusableBlock( hoveredItem ) &&\n\t\t\t\t\t<BlockPreview name={ hoveredItem.name } attributes={ hoveredItem.initialAttributes } />\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-autofocus, jsx-a11y/no-noninteractive-element-interactions */\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { rootClientId } ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetSelectedBlock,\n\t\t\tgetInserterItems,\n\t\t\tgetBlockName,\n\t\t} = select( 'core/editor' );\n\t\tconst {\n\t\t\tgetChildBlockNames,\n\t\t} = select( 'core/blocks' );\n\n\t\tconst rootBlockName = getBlockName( rootClientId );\n\n\t\treturn {\n\t\t\tselectedBlock: getSelectedBlock(),\n\t\t\trootChildBlocks: getChildBlockNames( rootBlockName ),\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t\titems: getInserterItems( rootClientId ),\n\t\t\trootClientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst {\n\t\t\t__experimentalFetchReusableBlocks: fetchReusableBlocks,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tfetchReusableBlocks,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tonSelect( item ) {\n\t\t\t\tconst {\n\t\t\t\t\treplaceBlocks,\n\t\t\t\t\tinsertBlock,\n\t\t\t\t} = dispatch( 'core/editor' );\n\t\t\t\tconst { selectedBlock, index, rootClientId } = ownProps;\n\t\t\t\tconst { name, initialAttributes } = item;\n\n\t\t\t\tconst insertedBlock = createBlock( name, initialAttributes );\n\t\t\t\tif ( selectedBlock && isUnmodifiedDefaultBlock( selectedBlock ) ) {\n\t\t\t\t\treplaceBlocks( selectedBlock.clientId, insertedBlock );\n\t\t\t\t} else {\n\t\t\t\t\tinsertBlock( insertedBlock, index, rootClientId );\n\t\t\t\t}\n\n\t\t\t\townProps.onSelect();\n\t\t\t},\n\t\t};\n\t} ),\n\twithSpokenMessages,\n\twithInstanceId,\n\twithSafeTimeout\n)( InserterMenu );\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ifBlockEditSelected } from '../block-edit/context';\n\nconst { Fill, Slot } = createSlotFill( 'InspectorAdvancedControls' );\n\nconst InspectorAdvancedControls = ifBlockEditSelected( Fill );\n\nInspectorAdvancedControls.Slot = Slot;\n\nexport default InspectorAdvancedControls;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { ifBlockEditSelected } from '../block-edit/context';\n\nconst { Fill, Slot } = createSlotFill( 'InspectorControls' );\n\nconst InspectorControls = ifBlockEditSelected( Fill );\n\nInspectorControls.Slot = Slot;\n\nexport default InspectorControls;\n","/**\n * External dependencies\n */\nimport { every, get, noop, startsWith } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tFormFileUpload,\n\tPlaceholder,\n\tDropZone,\n\tIconButton,\n\twithFilters,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\nimport URLPopover from '../url-popover';\nimport { mediaUpload } from '../../utils/';\n\nconst InsertFromURLPopover = ( { src, onChange, onSubmit, onClose } ) => (\n\t<URLPopover onClose={ onClose }>\n\t\t<form\n\t\t\tclassName=\"editor-media-placeholder__url-input-form\"\n\t\t\tonSubmit={ onSubmit }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName=\"editor-media-placeholder__url-input-field\"\n\t\t\t\ttype=\"url\"\n\t\t\t\taria-label={ __( 'URL' ) }\n\t\t\t\tplaceholder={ __( 'Paste or type URL' ) }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tvalue={ src }\n\t\t\t/>\n\t\t\t<IconButton\n\t\t\t\tclassName=\"editor-media-placeholder__url-input-submit-button\"\n\t\t\t\ticon=\"editor-break\"\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t</URLPopover>\n);\n\nexport class MediaPlaceholder extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tsrc: '',\n\t\t\tisURLInputVisible: false,\n\t\t};\n\t\tthis.onChangeSrc = this.onChangeSrc.bind( this );\n\t\tthis.onSubmitSrc = this.onSubmitSrc.bind( this );\n\t\tthis.onUpload = this.onUpload.bind( this );\n\t\tthis.onFilesUpload = this.onFilesUpload.bind( this );\n\t\tthis.openURLInput = this.openURLInput.bind( this );\n\t\tthis.closeURLInput = this.closeURLInput.bind( this );\n\t}\n\n\tonlyAllowsImages() {\n\t\tconst { allowedTypes } = this.props;\n\t\tif ( ! allowedTypes ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn every( allowedTypes, ( allowedType ) => {\n\t\t\treturn allowedType === 'image' || startsWith( allowedType, 'image/' );\n\t\t} );\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.setState( { src: get( this.props.value, [ 'src' ], '' ) } );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( get( prevProps.value, [ 'src' ], '' ) !== get( this.props.value, [ 'src' ], '' ) ) {\n\t\t\tthis.setState( { src: get( this.props.value, [ 'src' ], '' ) } );\n\t\t}\n\t}\n\n\tonChangeSrc( event ) {\n\t\tthis.setState( { src: event.target.value } );\n\t}\n\n\tonSubmitSrc( event ) {\n\t\tevent.preventDefault();\n\t\tif ( this.state.src && this.props.onSelectURL ) {\n\t\t\tthis.props.onSelectURL( this.state.src );\n\t\t\tthis.closeURLInput();\n\t\t}\n\t}\n\n\tonUpload( event ) {\n\t\tthis.onFilesUpload( event.target.files );\n\t}\n\n\tonFilesUpload( files ) {\n\t\tconst { onSelect, multiple, onError, allowedTypes } = this.props;\n\t\tconst setMedia = multiple ? onSelect : ( [ media ] ) => onSelect( media );\n\t\tmediaUpload( {\n\t\t\tallowedTypes,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: setMedia,\n\t\t\tonError,\n\t\t} );\n\t}\n\n\topenURLInput() {\n\t\tthis.setState( { isURLInputVisible: true } );\n\t}\n\n\tcloseURLInput() {\n\t\tthis.setState( { isURLInputVisible: false } );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccept,\n\t\t\ticon,\n\t\t\tclassName,\n\t\t\tlabels = {},\n\t\t\tonSelect,\n\t\t\tvalue = {},\n\t\t\tonSelectURL,\n\t\t\tonHTMLDrop = noop,\n\t\t\tmultiple = false,\n\t\t\tnotices,\n\t\t\tallowedTypes = [],\n\t\t\thasUploadPermissions,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tisURLInputVisible,\n\t\t\tsrc,\n\t\t} = this.state;\n\n\t\tlet instructions = labels.instructions || '';\n\t\tlet title = labels.title || '';\n\n\t\tif ( ! hasUploadPermissions && ! onSelectURL ) {\n\t\t\tinstructions = __( 'To edit this block, you need permission to upload media.' );\n\t\t}\n\n\t\tif ( ! instructions || ! title ) {\n\t\t\tconst isOneType = 1 === allowedTypes.length;\n\t\t\tconst isAudio = isOneType && 'audio' === allowedTypes[ 0 ];\n\t\t\tconst isImage = isOneType && 'image' === allowedTypes[ 0 ];\n\t\t\tconst isVideo = isOneType && 'video' === allowedTypes[ 0 ];\n\n\t\t\tif ( ! instructions ) {\n\t\t\t\tif ( hasUploadPermissions ) {\n\t\t\t\t\tinstructions = __( 'Drag a media file, upload a new one or select a file from your library.' );\n\n\t\t\t\t\tif ( isAudio ) {\n\t\t\t\t\t\tinstructions = __( 'Drag an audio, upload a new one or select a file from your library.' );\n\t\t\t\t\t} else if ( isImage ) {\n\t\t\t\t\t\tinstructions = __( 'Drag an image, upload a new one or select a file from your library.' );\n\t\t\t\t\t} else if ( isVideo ) {\n\t\t\t\t\t\tinstructions = __( 'Drag a video, upload a new one or select a file from your library.' );\n\t\t\t\t\t}\n\t\t\t\t} else if ( ! hasUploadPermissions && onSelectURL ) {\n\t\t\t\t\tinstructions = __( 'Given your current role, you can only link a media file, you cannot upload.' );\n\n\t\t\t\t\tif ( isAudio ) {\n\t\t\t\t\t\tinstructions = __( 'Given your current role, you can only link an audio, you cannot upload.' );\n\t\t\t\t\t} else if ( isImage ) {\n\t\t\t\t\t\tinstructions = __( 'Given your current role, you can only link an image, you cannot upload.' );\n\t\t\t\t\t} else if ( isVideo ) {\n\t\t\t\t\t\tinstructions = __( 'Given your current role, you can only link a video, you cannot upload.' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! title ) {\n\t\t\t\ttitle = __( 'Media' );\n\n\t\t\t\tif ( isAudio ) {\n\t\t\t\t\ttitle = __( 'Audio' );\n\t\t\t\t} else if ( isImage ) {\n\t\t\t\t\ttitle = __( 'Image' );\n\t\t\t\t} else if ( isVideo ) {\n\t\t\t\t\ttitle = __( 'Video' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\ticon={ icon }\n\t\t\t\tlabel={ title }\n\t\t\t\tinstructions={ instructions }\n\t\t\t\tclassName={ classnames( 'editor-media-placeholder', className ) }\n\t\t\t\tnotices={ notices }\n\t\t\t>\n\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t<DropZone\n\t\t\t\t\t\tonFilesDrop={ this.onFilesUpload }\n\t\t\t\t\t\tonHTMLDrop={ onHTMLDrop }\n\t\t\t\t\t/>\n\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\tisLarge\n\t\t\t\t\t\tclassName=\"editor-media-placeholder__button\"\n\t\t\t\t\t\tonChange={ this.onUpload }\n\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Upload' ) }\n\t\t\t\t\t</FormFileUpload>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\tgallery={ multiple && this.onlyAllowsImages() }\n\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\t\t\tvalue={ value.id }\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisLarge\n\t\t\t\t\t\t\t\tclassName=\"editor-media-placeholder__button\"\n\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Media Library' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t\t{ onSelectURL && (\n\t\t\t\t\t<div className=\"editor-media-placeholder__url-input-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-media-placeholder__button\"\n\t\t\t\t\t\t\tonClick={ this.openURLInput }\n\t\t\t\t\t\t\tisToggled={ isURLInputVisible }\n\t\t\t\t\t\t\tisLarge\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Insert from URL' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ isURLInputVisible && (\n\t\t\t\t\t\t\t<InsertFromURLPopover\n\t\t\t\t\t\t\t\tsrc={ src }\n\t\t\t\t\t\t\t\tonChange={ this.onChangeSrc }\n\t\t\t\t\t\t\t\tonSubmit={ this.onSubmitSrc }\n\t\t\t\t\t\t\t\tonClose={ this.closeURLInput }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</Placeholder>\n\t\t);\n\t}\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { hasUploadPermissions } = select( 'core' );\n\n\treturn {\n\t\thasUploadPermissions: hasUploadPermissions(),\n\t};\n} );\n\nexport default compose(\n\tapplyWithSelect,\n\twithFilters( 'editor.MediaPlaceholder' ),\n)( MediaPlaceholder );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\nexport function MediaUploadCheck( { hasUploadPermissions, fallback = null, children } ) {\n\treturn hasUploadPermissions ? children : fallback;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { hasUploadPermissions } = select( 'core' );\n\n\treturn {\n\t\thasUploadPermissions: hasUploadPermissions(),\n\t};\n} )( MediaUploadCheck );\n","/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\n\n/**\n * This is a placeholder for the media upload component necessary to make it possible to provide\n * an integration with the core blocks that handle media files. By default it renders nothing but\n * it provides a way to have it overridden with the `editor.MediaUpload` filter.\n *\n * @return {WPElement} Media upload element.\n */\nconst MediaUpload = () => null;\n\n// Todo: rename the filter\nexport default withFilters( 'editor.MediaUpload' )( MediaUpload );\n","/**\n * External dependencies\n */\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { getBlockDOMNode } from '../../utils/dom';\n\nclass MultiSelectScrollIntoView extends Component {\n\tcomponentDidUpdate() {\n\t\t// Relies on expectation that `componentDidUpdate` will only be called\n\t\t// if value of `extentClientId` changes.\n\t\tthis.scrollIntoView();\n\t}\n\n\t/**\n\t * Ensures that if a multi-selection exists, the extent of the selection is\n\t * visible within the nearest scrollable container.\n\t *\n\t * @return {void}\n\t */\n\tscrollIntoView() {\n\t\tconst { extentClientId } = this.props;\n\t\tif ( ! extentClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst extentNode = getBlockDOMNode( extentClientId );\n\t\tif ( ! extentNode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst scrollContainer = getScrollContainer( extentNode );\n\n\t\t// If there's no scroll container, it follows that there's no scrollbar\n\t\t// and thus there's no need to try to scroll into view.\n\t\tif ( ! scrollContainer ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscrollIntoView( extentNode, scrollContainer, {\n\t\t\tonlyScrollIfNeeded: true,\n\t\t} );\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getLastMultiSelectedBlockClientId } = select( 'core/editor' );\n\n\treturn {\n\t\textentClientId: getLastMultiSelectedBlockClientId(),\n\t};\n} )( MultiSelectScrollIntoView );\n","/**\n * WordPress dependencies\n */\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { serialize } from '@wordpress/blocks';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport {\n\tPath,\n\tSVG,\n} from '@wordpress/components';\n\n/**\n * Internal Dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction MultiSelectionInspector( { blocks } ) {\n\tconst words = wordCount( serialize( blocks ), 'words' );\n\n\treturn (\n\t\t<div className=\"editor-multi-selection-inspector__card\">\n\t\t\t<BlockIcon icon={\n\t\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><Path d=\"M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z\" /></SVG>\n\t\t\t} showColors />\n\t\t\t<div className=\"editor-multi-selection-inspector__card-content\">\n\t\t\t\t<div className=\"editor-multi-selection-inspector__card-title\">\n\t\t\t\t\t{\n\t\t\t\t\t\t/* translators: %d: number of blocks */\n\t\t\t\t\t\tsprintf( _n( '%d block', '%d blocks', blocks.length ), blocks.length )\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-multi-selection-inspector__card-description\">\n\t\t\t\t\t{\n\t\t\t\t\t\t/* translators: %d: number of words */\n\t\t\t\t\t\tsprintf( _n( '%d word', '%d words', words ), words )\n\t\t\t\t\t}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getMultiSelectedBlocks } = select( 'core/editor' );\n\treturn {\n\t\tblocks: getMultiSelectedBlocks(),\n\t};\n} )( MultiSelectionInspector );\n","/**\n * External dependencies\n */\nimport { cond, matchesProperty, omit } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { NavigableMenu, KeyboardShortcuts } from '@wordpress/components';\nimport { Component, createRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Browser dependencies\n */\n\nconst { Node, getSelection } = window;\n\nclass NavigableToolbar extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.focusToolbar = this.focusToolbar.bind( this );\n\t\tthis.focusSelection = this.focusSelection.bind( this );\n\n\t\tthis.switchOnKeyDown = cond( [\n\t\t\t[ matchesProperty( [ 'keyCode' ], ESCAPE ), this.focusSelection ],\n\t\t] );\n\t\tthis.toolbar = createRef();\n\t}\n\n\tfocusToolbar() {\n\t\tconst tabbables = focus.tabbable.find( this.toolbar.current );\n\t\tif ( tabbables.length ) {\n\t\t\ttabbables[ 0 ].focus();\n\t\t}\n\t}\n\n\t/**\n\t * Programmatically shifts focus to the element where the current selection\n\t * exists, if there is a selection.\n\t */\n\tfocusSelection() {\n\t\t// Ensure that a selection exists.\n\t\tconst selection = getSelection();\n\t\tif ( ! selection ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Focus node may be a text node, which cannot be focused directly.\n\t\t// Find its parent element instead.\n\t\tconst { focusNode } = selection;\n\t\tlet focusElement = focusNode;\n\t\tif ( focusElement.nodeType !== Node.ELEMENT_NODE ) {\n\t\t\tfocusElement = focusElement.parentElement;\n\t\t}\n\n\t\tif ( focusElement ) {\n\t\t\tfocusElement.focus();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.focusToolbar();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children, ...props } = this.props;\n\t\treturn (\n\t\t\t<NavigableMenu\n\t\t\t\torientation=\"horizontal\"\n\t\t\t\trole=\"toolbar\"\n\t\t\t\tref={ this.toolbar }\n\t\t\t\tonKeyDown={ this.switchOnKeyDown }\n\t\t\t\t{ ...omit( props, [\n\t\t\t\t\t'focusOnMount',\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\tbindGlobal\n\t\t\t\t\t// Use the same event that TinyMCE uses in the Classic block for its own `alt+f10` shortcut.\n\t\t\t\t\teventName=\"keydown\"\n\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t'alt+f10': this.focusToolbar,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</NavigableMenu>\n\t\t);\n\t}\n}\n\nexport default NavigableToolbar;\n","/**\n * External dependencies\n */\nimport { over, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport {\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n\tESCAPE,\n} from '@wordpress/keycodes';\nimport { withSafeTimeout, compose } from '@wordpress/compose';\n\n/**\n * Set of key codes upon which typing is to be initiated on a keydown event.\n *\n * @type {number[]}\n */\nconst KEY_DOWN_ELIGIBLE_KEY_CODES = [ UP, RIGHT, DOWN, LEFT, ENTER, BACKSPACE ];\n\n/**\n * Returns true if a given keydown event can be inferred as intent to start\n * typing, or false otherwise. A keydown is considered eligible if it is a\n * text navigation without shift active.\n *\n * @param {KeyboardEvent} event Keydown event to test.\n *\n * @return {boolean} Whether event is eligible to start typing.\n */\nfunction isKeyDownEligibleForStartTyping( event ) {\n\tconst { keyCode, shiftKey } = event;\n\treturn ! shiftKey && includes( KEY_DOWN_ELIGIBLE_KEY_CODES, keyCode );\n}\n\nclass ObserveTyping extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.stopTypingOnSelectionUncollapse = this.stopTypingOnSelectionUncollapse.bind( this );\n\t\tthis.stopTypingOnMouseMove = this.stopTypingOnMouseMove.bind( this );\n\t\tthis.startTypingInTextField = this.startTypingInTextField.bind( this );\n\t\tthis.stopTypingOnNonTextField = this.stopTypingOnNonTextField.bind( this );\n\t\tthis.stopTypingOnEscapeKey = this.stopTypingOnEscapeKey.bind( this );\n\n\t\tthis.onKeyDown = over( [\n\t\t\tthis.startTypingInTextField,\n\t\t\tthis.stopTypingOnEscapeKey,\n\t\t] );\n\n\t\tthis.lastMouseMove = null;\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.toggleEventBindings( this.props.isTyping );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.isTyping !== prevProps.isTyping ) {\n\t\t\tthis.toggleEventBindings( this.props.isTyping );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.toggleEventBindings( false );\n\t}\n\n\t/**\n\t * Bind or unbind events to the document when typing has started or stopped\n\t * respectively, or when component has become unmounted.\n\t *\n\t * @param {boolean} isBound Whether event bindings should be applied.\n\t */\n\ttoggleEventBindings( isBound ) {\n\t\tconst bindFn = isBound ? 'addEventListener' : 'removeEventListener';\n\t\tdocument[ bindFn ]( 'selectionchange', this.stopTypingOnSelectionUncollapse );\n\t\tdocument[ bindFn ]( 'mousemove', this.stopTypingOnMouseMove );\n\t}\n\n\t/**\n\t * On mouse move, unset typing flag if user has moved cursor.\n\t *\n\t * @param {MouseEvent} event Mousemove event.\n\t */\n\tstopTypingOnMouseMove( event ) {\n\t\tconst { clientX, clientY } = event;\n\n\t\t// We need to check that the mouse really moved because Safari triggers\n\t\t// mousemove events when shift or ctrl are pressed.\n\t\tif ( this.lastMouseMove ) {\n\t\t\tconst {\n\t\t\t\tclientX: lastClientX,\n\t\t\t\tclientY: lastClientY,\n\t\t\t} = this.lastMouseMove;\n\n\t\t\tif ( lastClientX !== clientX || lastClientY !== clientY ) {\n\t\t\t\tthis.props.onStopTyping();\n\t\t\t}\n\t\t}\n\n\t\tthis.lastMouseMove = { clientX, clientY };\n\t}\n\n\t/**\n\t * On selection change, unset typing flag if user has made an uncollapsed\n\t * (shift) selection.\n\t */\n\tstopTypingOnSelectionUncollapse() {\n\t\tconst selection = window.getSelection();\n\t\tconst isCollapsed = selection.rangeCount > 0 && selection.getRangeAt( 0 ).collapsed;\n\n\t\tif ( ! isCollapsed ) {\n\t\t\tthis.props.onStopTyping();\n\t\t}\n\t}\n\n\t/**\n\t * Unsets typing flag if user presses Escape while typing flag is active.\n\t *\n\t * @param {KeyboardEvent} event Keypress or keydown event to interpret.\n\t */\n\tstopTypingOnEscapeKey( event ) {\n\t\tif ( this.props.isTyping && event.keyCode === ESCAPE ) {\n\t\t\tthis.props.onStopTyping();\n\t\t}\n\t}\n\n\t/**\n\t * Handles a keypress or keydown event to infer intention to start typing.\n\t *\n\t * @param {KeyboardEvent} event Keypress or keydown event to interpret.\n\t */\n\tstartTypingInTextField( event ) {\n\t\tconst { isTyping, onStartTyping } = this.props;\n\t\tconst { type, target } = event;\n\n\t\t// Abort early if already typing, or key press is incurred outside a\n\t\t// text field (e.g. arrow-ing through toolbar buttons).\n\t\t// Ignore typing in a block toolbar\n\t\tif ( isTyping || ! isTextField( target ) || target.closest( '.editor-block-toolbar' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Special-case keydown because certain keys do not emit a keypress\n\t\t// event. Conversely avoid keydown as the canonical event since there\n\t\t// are many keydown which are explicitly not targeted for typing.\n\t\tif ( type === 'keydown' && ! isKeyDownEligibleForStartTyping( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tonStartTyping();\n\t}\n\n\t/**\n\t * Stops typing when focus transitions to a non-text field element.\n\t *\n\t * @param {FocusEvent} event Focus event.\n\t */\n\tstopTypingOnNonTextField( event ) {\n\t\tevent.persist();\n\n\t\t// Since focus to a non-text field via arrow key will trigger before\n\t\t// the keydown event, wait until after current stack before evaluating\n\t\t// whether typing is to be stopped. Otherwise, typing will re-start.\n\t\tthis.props.setTimeout( () => {\n\t\t\tconst { isTyping, onStopTyping } = this.props;\n\t\t\tconst { target } = event;\n\t\t\tif ( isTyping && ! isTextField( target ) ) {\n\t\t\t\tonStopTyping();\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { children } = this.props;\n\n\t\t// Disable reason: This component is responsible for capturing bubbled\n\t\t// keyboard events which are interpreted as typing intent.\n\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn (\n\t\t\t<div\n\t\t\t\tonFocus={ this.stopTypingOnNonTextField }\n\t\t\t\tonKeyPress={ this.startTypingInTextField }\n\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { isTyping } = select( 'core/editor' );\n\n\t\treturn {\n\t\t\tisTyping: isTyping(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { startTyping, stopTyping } = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonStartTyping: startTyping,\n\t\t\tonStopTyping: stopTyping,\n\t\t};\n\t} ),\n\twithSafeTimeout,\n] )( ObserveTyping );\n","/**\n * External dependencies\n */\nimport { get, isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\nexport function PageAttributesCheck( { availableTemplates, postType, children } ) {\n\tconst supportsPageAttributes = get( postType, [ 'supports', 'page-attributes' ], false );\n\n\t// Only render fields if post type supports page attributes or available templates exist.\n\tif ( ! supportsPageAttributes && isEmpty( availableTemplates ) ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getEditorSettings } = select( 'core/editor' );\n\tconst { getPostType } = select( 'core' );\n\tconst { availableTemplates } = getEditorSettings();\n\treturn {\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tavailableTemplates,\n\t};\n} )( PageAttributesCheck );\n","/**\n * External dependencies\n */\nimport { invoke } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { TextControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose, withState } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nexport const PageAttributesOrder = withState( {\n\torderInput: null,\n} )(\n\t( { onUpdateOrder, order = 0, orderInput, setState } ) => {\n\t\tconst setUpdatedOrder = ( value ) => {\n\t\t\tsetState( {\n\t\t\t\torderInput: value,\n\t\t\t} );\n\t\t\tconst newOrder = Number( value );\n\t\t\tif ( Number.isInteger( newOrder ) && invoke( value, [ 'trim' ] ) !== '' ) {\n\t\t\t\tonUpdateOrder( Number( value ) );\n\t\t\t}\n\t\t};\n\t\tconst value = orderInput === null ? order : orderInput;\n\t\treturn (\n\t\t\t<TextControl\n\t\t\t\tclassName=\"editor-page-attributes__order\"\n\t\t\t\ttype=\"number\"\n\t\t\t\tlabel={ __( 'Order' ) }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ setUpdatedOrder }\n\t\t\t\tsize={ 6 }\n\t\t\t\tonBlur={ () => {\n\t\t\t\t\tsetState( {\n\t\t\t\t\t\torderInput: null,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nfunction PageAttributesOrderWithChecks( props ) {\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"page-attributes\">\n\t\t\t<PageAttributesOrder { ...props } />\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\torder: select( 'core/editor' ).getEditedPostAttribute( 'menu_order' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdateOrder( order ) {\n\t\t\tdispatch( 'core/editor' ).editPost( {\n\t\t\t\tmenu_order: order,\n\t\t\t} );\n\t\t},\n\t} ) ),\n] )( PageAttributesOrderWithChecks );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { TreeSelect } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { buildTermsTree } from '../../utils/terms';\n\nexport function PageAttributesParent( { parent, postType, items, onUpdateParent } ) {\n\tconst isHierarchical = get( postType, [ 'hierarchical' ], false );\n\tconst parentPageLabel = get( postType, [ 'labels', 'parent_item_colon' ] );\n\tconst pageItems = items || [];\n\tif ( ! isHierarchical || ! parentPageLabel || ! pageItems.length ) {\n\t\treturn null;\n\t}\n\n\tconst pagesTree = buildTermsTree( pageItems.map( ( item ) => ( {\n\t\tid: item.id,\n\t\tparent: item.parent,\n\t\tname: item.title.raw ? item.title.raw : `#${ item.id } (${ __( 'no title' ) })`,\n\t} ) ) );\n\treturn (\n\t\t<TreeSelect\n\t\t\tlabel={ parentPageLabel }\n\t\t\tnoOptionLabel={ `(${ __( 'no parent' ) })` }\n\t\t\ttree={ pagesTree }\n\t\t\tselectedId={ parent }\n\t\t\tonChange={ onUpdateParent }\n\t\t/>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getPostType, getEntityRecords } = select( 'core' );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( 'core/editor' );\n\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\tconst postType = getPostType( postTypeSlug );\n\tconst postId = getCurrentPostId();\n\tconst isHierarchical = get( postType, [ 'hierarchical' ], false );\n\tconst query = {\n\t\tper_page: -1,\n\t\texclude: postId,\n\t\tparent_exclude: postId,\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t};\n\n\treturn {\n\t\tparent: getEditedPostAttribute( 'parent' ),\n\t\titems: isHierarchical ? getEntityRecords( 'postType', postTypeSlug, query ) : [],\n\t\tpostType,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) => {\n\tconst { editPost } = dispatch( 'core/editor' );\n\treturn {\n\t\tonUpdateParent( parent ) {\n\t\t\teditPost( { parent: parent || 0 } );\n\t\t},\n\t};\n} );\n\nexport default compose( [\n\tapplyWithSelect,\n\tapplyWithDispatch,\n] )( PageAttributesParent );\n","/**\n * External dependencies\n */\nimport { isEmpty, map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { SelectControl } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\nexport function PageTemplate( { availableTemplates, selectedTemplate, onUpdate } ) {\n\tif ( isEmpty( availableTemplates ) ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<SelectControl\n\t\t\tlabel={ __( 'Template:' ) }\n\t\t\tvalue={ selectedTemplate }\n\t\t\tonChange={ onUpdate }\n\t\t\tclassName=\"editor-page-attributes__template\"\n\t\t\toptions={\n\t\t\t\tmap( availableTemplates, ( templateName, templateSlug ) => ( {\n\t\t\t\t\tvalue: templateSlug,\n\t\t\t\t\tlabel: templateName,\n\t\t\t\t} ) )\n\t\t\t}\n\t\t/>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getEditorSettings } = select( 'core/editor' );\n\t\tconst { availableTemplates } = getEditorSettings();\n\t\treturn {\n\t\t\tselectedTemplate: getEditedPostAttribute( 'template' ),\n\t\t\tavailableTemplates,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdate( templateSlug ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { template: templateSlug || '' } );\n\t\t},\n\t} ) ),\n)( PageTemplate );\n","/**\n * External dependencies\n */\nimport { some } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { PanelBody, ColorIndicator } from '@wordpress/components';\nimport { ifCondition } from '@wordpress/compose';\nimport { sprintf, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorPaletteControl from '../color-palette/control';\nimport withColorContext from '../color-palette/with-color-context';\nimport { getColorObjectByColorValue } from '../colors';\n\nconst hasCustomColorsDisabledForSetting = ( disableCustomColors, colorSetting ) => {\n\tif ( colorSetting.disableCustomColors !== undefined ) {\n\t\treturn colorSetting.disableCustomColors;\n\t}\n\treturn disableCustomColors;\n};\n\nconst hasColorsToChooseInSetting = (\n\tcolors = [],\n\tdisableCustomColors,\n\tcolorSetting ) => {\n\tif ( ! hasCustomColorsDisabledForSetting( disableCustomColors, colorSetting ) ) {\n\t\treturn true;\n\t}\n\treturn ( colorSetting.colors || colors ).length > 0;\n};\n\nconst hasColorsToChoose = ( { colors, disableCustomColors, colorSettings } ) => {\n\treturn some( colorSettings, ( colorSetting ) => {\n\t\treturn hasColorsToChooseInSetting(\n\t\t\tcolors,\n\t\t\tdisableCustomColors,\n\t\t\tcolorSetting\n\t\t);\n\t} );\n};\n\n// translators: first %s: The type of color (e.g. background color), second %s: the color name or value (e.g. red or #ff0000)\nconst colorIndicatorAriaLabel = __( '(%s: %s)' );\n\nconst renderColorIndicators = ( colorSettings, colors ) => {\n\treturn colorSettings.map(\n\t\t( { value, label, colors: availableColors }, index ) => {\n\t\t\tif ( ! value ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\tavailableColors || colors,\n\t\t\t\tvalue\n\t\t\t);\n\t\t\tconst colorName = colorObject && colorObject.name;\n\t\t\tconst ariaLabel = sprintf(\n\t\t\t\tcolorIndicatorAriaLabel,\n\t\t\t\tlabel.toLowerCase(),\n\t\t\t\tcolorName || value\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<ColorIndicator\n\t\t\t\t\tkey={ index }\n\t\t\t\t\tcolorValue={ value }\n\t\t\t\t\taria-label={ ariaLabel }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t);\n};\n\n// colorSettings is passed as an array of props so that it can be used for\n// mapping both ColorIndicator and ColorPaletteControl components. Passing\n// an array of components/nodes here wouldn't be feasible.\nexport const PanelColorSettings = ifCondition( hasColorsToChoose )(\n\t( {\n\t\tchildren,\n\t\tcolors,\n\t\tcolorSettings,\n\t\tdisableCustomColors,\n\t\ttitle,\n\t\t...props\n\t} ) => {\n\t\tconst className = 'editor-panel-color-settings';\n\n\t\tconst titleElement = (\n\t\t\t<span className={ `${ className }__panel-title` }>\n\t\t\t\t{ title }\n\t\t\t\t{ renderColorIndicators( colorSettings, colors ) }\n\t\t\t</span>\n\t\t);\n\n\t\treturn (\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\ttitle={ titleElement }\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ colorSettings.map( ( settings, index ) => (\n\t\t\t\t\t<ColorPaletteControl\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\t\t\t...settings,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t);\n\t}\n);\n\nexport default withColorContext( PanelColorSettings );\n","/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\nimport classnames from 'classnames';\n\nfunction PlainText( { onChange, className, ...props } ) {\n\treturn (\n\t\t<TextareaAutosize\n\t\t\tclassName={ classnames( 'editor-plain-text', className ) }\n\t\t\tonChange={ ( event ) => onChange( event.target.value ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default PlainText;\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nexport function PostAuthorCheck( { hasAssignAuthorAction, authors, children } ) {\n\tif ( ! hasAssignAuthorAction || authors.length < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn <PostTypeSupportCheck supportKeys=\"author\">{ children }</PostTypeSupportCheck>;\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst post = select( 'core/editor' ).getCurrentPost();\n\t\treturn {\n\t\t\thasAssignAuthorAction: get( post, [ '_links', 'wp:action-assign-author' ], false ),\n\t\t\tpostType: select( 'core/editor' ).getCurrentPostType(),\n\t\t\tauthors: select( 'core' ).getAuthors(),\n\t\t};\n\t} ),\n\twithInstanceId,\n] )( PostAuthorCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\n\nexport class PostAuthor extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.setAuthorId = this.setAuthorId.bind( this );\n\t}\n\n\tsetAuthorId( event ) {\n\t\tconst { onUpdateAuthor } = this.props;\n\t\tconst { value } = event.target;\n\t\tonUpdateAuthor( Number( value ) );\n\t}\n\n\trender() {\n\t\tconst { postAuthor, instanceId, authors } = this.props;\n\t\tconst selectId = 'post-author-selector-' + instanceId;\n\n\t\t// Disable reason: A select with an onchange throws a warning\n\n\t\t/* eslint-disable jsx-a11y/no-onchange */\n\t\treturn (\n\t\t\t<PostAuthorCheck>\n\t\t\t\t<label htmlFor={ selectId }>{ __( 'Author' ) }</label>\n\t\t\t\t<select\n\t\t\t\t\tid={ selectId }\n\t\t\t\t\tvalue={ postAuthor }\n\t\t\t\t\tonChange={ this.setAuthorId }\n\t\t\t\t\tclassName=\"editor-post-author__select\"\n\t\t\t\t>\n\t\t\t\t\t{ authors.map( ( author ) => (\n\t\t\t\t\t\t<option key={ author.id } value={ author.id }>{ author.name }</option>\n\t\t\t\t\t) ) }\n\t\t\t\t</select>\n\t\t\t</PostAuthorCheck>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-onchange */\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostAuthor: select( 'core/editor' ).getEditedPostAttribute( 'author' ),\n\t\t\tauthors: select( 'core' ).getAuthors(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdateAuthor( author ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { author } );\n\t\t},\n\t} ) ),\n\twithInstanceId,\n] )( PostAuthor );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\nfunction PostComments( { commentStatus = 'open', ...props } ) {\n\tconst onToggleComments = () => props.editPost( { comment_status: commentStatus === 'open' ? 'closed' : 'open' } );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\tlabel={ __( 'Allow Comments' ) }\n\t\t\tchecked={ commentStatus === 'open' }\n\t\t\tonChange={ onToggleComments }\n\t\t/>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tcommentStatus: select( 'core/editor' ).getEditedPostAttribute( 'comment_status' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\teditPost: dispatch( 'core/editor' ).editPost,\n\t} ) ),\n] )( PostComments );\n","/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nfunction PostExcerptCheck( props ) {\n\treturn <PostTypeSupportCheck { ...props } supportKeys=\"excerpt\" />;\n}\n\nexport default PostExcerptCheck;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink, TextareaControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nfunction PostExcerpt( { excerpt, onUpdateExcerpt } ) {\n\treturn (\n\t\t<div className=\"editor-post-excerpt\">\n\t\t\t<TextareaControl\n\t\t\t\tlabel={ __( 'Write an excerpt (optional)' ) }\n\t\t\t\tclassName=\"editor-post-excerpt__textarea\"\n\t\t\t\tonChange={ ( value ) => onUpdateExcerpt( value ) }\n\t\t\t\tvalue={ excerpt }\n\t\t\t/>\n\t\t\t<ExternalLink href=\"https://codex.wordpress.org/Excerpt\">\n\t\t\t\t{ __( 'Learn more about manual excerpts' ) }\n\t\t\t</ExternalLink>\n\t\t</div>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\texcerpt: select( 'core/editor' ).getEditedPostAttribute( 'excerpt' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdateExcerpt( excerpt ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { excerpt } );\n\t\t},\n\t} ) ),\n] )( PostExcerpt );\n","/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\nfunction PostFeaturedImageCheck( props ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck { ...props } supportKeys=\"thumbnail\" />\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n","/**\n * External dependencies\n */\nimport { has, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport { Button, Spinner, ResponsiveWrapper, withFilters } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\n\nconst ALLOWED_MEDIA_TYPES = [ 'image' ];\n\n// Used when labels from post type were not yet loaded or when they are not present.\nconst DEFAULT_FEATURE_IMAGE_LABEL = __( 'Featured Image' );\nconst DEFAULT_SET_FEATURE_IMAGE_LABEL = __( 'Set featured image' );\nconst DEFAULT_REMOVE_FEATURE_IMAGE_LABEL = __( 'Remove image' );\n\nfunction PostFeaturedImage( { currentPostId, featuredImageId, onUpdateImage, onRemoveImage, media, postType } ) {\n\tconst postLabel = get( postType, [ 'labels' ], {} );\n\tconst instructions = <p>{ __( 'To edit the featured image, you need permission to upload media.' ) }</p>;\n\n\tlet mediaWidth, mediaHeight, mediaSourceUrl;\n\tif ( media ) {\n\t\tconst mediaSize = applyFilters( 'editor.PostFeaturedImage.imageSize', 'post-thumbnail', media.id, currentPostId );\n\t\tif ( has( media, [ 'media_details', 'sizes', mediaSize ] ) ) {\n\t\t\tmediaWidth = media.media_details.sizes[ mediaSize ].width;\n\t\t\tmediaHeight = media.media_details.sizes[ mediaSize ].height;\n\t\t\tmediaSourceUrl = media.media_details.sizes[ mediaSize ].source_url;\n\t\t} else {\n\t\t\tmediaWidth = media.media_details.width;\n\t\t\tmediaHeight = media.media_details.height;\n\t\t\tmediaSourceUrl = media.source_url;\n\t\t}\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ !! featuredImageId &&\n\t\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\ttitle={ postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL }\n\t\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t<Button className=\"editor-post-featured-image__preview\" onClick={ open } aria-label={ __( 'Edit or update the image' ) }>\n\t\t\t\t\t\t\t\t\t{ media &&\n\t\t\t\t\t\t\t\t\t\t<ResponsiveWrapper\n\t\t\t\t\t\t\t\t\t\t\tnaturalWidth={ mediaWidth }\n\t\t\t\t\t\t\t\t\t\t\tnaturalHeight={ mediaHeight }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<img src={ mediaSourceUrl } alt=\"\" />\n\t\t\t\t\t\t\t\t\t\t</ResponsiveWrapper>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t{ ! media && <Spinner /> }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t}\n\t\t\t\t{ !! featuredImageId && media && ! media.isLoading &&\n\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\ttitle={ postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL }\n\t\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t<Button onClick={ open } isDefault isLarge>\n\t\t\t\t\t\t\t\t\t{ __( 'Replace image' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t}\n\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\ttitle={ postLabel.featured_image || DEFAULT_FEATURE_IMAGE_LABEL }\n\t\t\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<Button className=\"editor-post-featured-image__toggle\" onClick={ open }>\n\t\t\t\t\t\t\t\t\t\t{ postLabel.set_featured_image || DEFAULT_SET_FEATURE_IMAGE_LABEL }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t{ !! featuredImageId &&\n\t\t\t\t\t<MediaUploadCheck>\n\t\t\t\t\t\t<Button onClick={ onRemoveImage } isLink isDestructive>\n\t\t\t\t\t\t\t{ postLabel.remove_featured_image || DEFAULT_REMOVE_FEATURE_IMAGE_LABEL }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</MediaUploadCheck>\n\t\t\t\t}\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getMedia, getPostType } = select( 'core' );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( 'core/editor' );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId ? getMedia( featuredImageId ) : null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) => {\n\tconst { editPost } = dispatch( 'core/editor' );\n\treturn {\n\t\tonUpdateImage( image ) {\n\t\t\teditPost( { featured_media: image.id } );\n\t\t},\n\t\tonRemoveImage() {\n\t\t\teditPost( { featured_media: 0 } );\n\t\t},\n\t};\n} );\n\nexport default compose(\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.PostFeaturedImage' ),\n)( PostFeaturedImage );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nfunction PostFormatCheck( { disablePostFormats, ...props } ) {\n\treturn ! disablePostFormats &&\n\t\t<PostTypeSupportCheck { ...props } supportKeys=\"post-formats\" />;\n}\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst editorSettings = select( 'core/editor' ).getEditorSettings();\n\t\treturn {\n\t\t\tdisablePostFormats: editorSettings.disablePostFormats,\n\t\t};\n\t}\n)( PostFormatCheck );\n\n","/**\n * External dependencies\n */\nimport { find, get, includes, union } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, SelectControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withInstanceId, compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\n\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'quote', caption: __( 'Quote' ) },\n\t{ id: 'standard', caption: __( 'Standard' ) },\n\t{ id: 'status', caption: __( 'Status' ) },\n\t{ id: 'video', caption: __( 'Video' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n];\n\nfunction PostFormat( { onUpdatePostFormat, postFormat = 'standard', supportedFormats, suggestedFormat, instanceId } ) {\n\tconst postFormatSelectorId = 'post-format-selector-' + instanceId;\n\tconst formats = POST_FORMATS.filter( ( format ) => includes( supportedFormats, format.id ) );\n\tconst suggestion = find( formats, ( format ) => format.id === suggestedFormat );\n\n\t// Disable reason: We need to change the value immiediately to show/hide the suggestion if needed\n\n\t/* eslint-disable jsx-a11y/no-onchange */\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<div className=\"editor-post-format__content\">\n\t\t\t\t\t<label htmlFor={ postFormatSelectorId }>{ __( 'Post Format' ) }</label>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ postFormat }\n\t\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t\t} ) ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<div className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t{ __( 'Suggestion:' ) }{ ' ' }\n\t\t\t\t\t\t<Button isLink onClick={ () => onUpdatePostFormat( suggestion.id ) }>\n\t\t\t\t\t\t\t{ suggestion.caption }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PostFormatCheck>\n\t);\n\t/* eslint-enable jsx-a11y/no-onchange */\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } = select( 'core/editor' );\n\t\tconst postFormat = getEditedPostAttribute( 'format' );\n\t\tconst themeSupports = select( 'core' ).getThemeSupports();\n\t\t// Ensure current format is always in the set.\n\t\t// The current format may not be a format supported by the theme.\n\t\tconst supportedFormats = union( [ postFormat ], get( themeSupports, [ 'formats' ], [] ) );\n\t\treturn {\n\t\t\tpostFormat,\n\t\t\tsupportedFormats,\n\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdatePostFormat( postFormat ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { format: postFormat } );\n\t\t},\n\t} ) ),\n\twithInstanceId,\n] )( PostFormat );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nexport function PostLastRevisionCheck( { lastRevisionId, revisionsCount, children } ) {\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn <PostTypeSupportCheck supportKeys=\"revisions\" >{ children }</PostTypeSupportCheck>;\n}\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } = select( 'core/editor' );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}\n)( PostLastRevisionCheck );\n","/**\n * WordPress dependencies\n */\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport { getWPAdminURL } from '../../utils/url';\n\nfunction LastRevision( { lastRevisionId, revisionsCount } ) {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<IconButton\n\t\t\t\thref={ getWPAdminURL( 'revision.php', { revision: lastRevisionId, gutenberg: true } ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon=\"backup\"\n\t\t\t>\n\t\t\t\t{\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t_n( '%d Revision', '%d Revisions', revisionsCount ),\n\t\t\t\t\t\trevisionsCount\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</IconButton>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostLastRevisionId,\n\t\t\tgetCurrentPostRevisionsCount,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}\n)( LastRevision );\n","/**\n * External dependencies\n */\nimport jQuery from 'jquery';\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Modal, Button } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { Component } from '@wordpress/element';\nimport { compose, withGlobalEvents } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getWPAdminURL } from '../../utils/url';\nimport PostPreviewButton from '../post-preview-button';\n\nclass PostLockedModal extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.sendPostLock = this.sendPostLock.bind( this );\n\t\tthis.receivePostLock = this.receivePostLock.bind( this );\n\t\tthis.releasePostLock = this.releasePostLock.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// Details on these events on the Heartbeat API docs\n\t\t// https://developer.wordpress.org/plugins/javascript/heartbeat-api/\n\t\tjQuery( document )\n\t\t\t.on( 'heartbeat-send.refresh-lock', this.sendPostLock )\n\t\t\t.on( 'heartbeat-tick.refresh-lock', this.receivePostLock );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tjQuery( document )\n\t\t\t.off( 'heartbeat-send.refresh-lock', this.sendPostLock )\n\t\t\t.off( 'heartbeat-tick.refresh-lock', this.receivePostLock );\n\t}\n\n\t/**\n\t * Keep the lock refreshed.\n\t *\n\t * When the user does not send a heartbeat in a heartbeat-tick\n\t * the user is no longer editing and another user can start editing.\n\t *\n\t * @param {Object} event Event.\n\t * @param {Object} data Data to send in the heartbeat request.\n\t */\n\tsendPostLock( event, data ) {\n\t\tconst { isLocked, activePostLock, postId } = this.props;\n\t\tif ( isLocked ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdata[ 'wp-refresh-post-lock' ] = {\n\t\t\tlock: activePostLock,\n\t\t\tpost_id: postId,\n\t\t};\n\t}\n\n\t/**\n\t * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.\n\t *\n\t * @param {Object} event Event.\n\t * @param {Object} data Data received in the heartbeat request\n\t */\n\treceivePostLock( event, data ) {\n\t\tif ( ! data[ 'wp-refresh-post-lock' ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { autosave, updatePostLock } = this.props;\n\t\tconst received = data[ 'wp-refresh-post-lock' ];\n\t\tif ( received.lock_error ) {\n\t\t\t// Auto save and display the takeover modal.\n\t\t\tautosave();\n\t\t\tupdatePostLock( {\n\t\t\t\tisLocked: true,\n\t\t\t\tisTakeover: true,\n\t\t\t\tuser: {\n\t\t\t\t\tavatar: received.lock_error.avatar_src,\n\t\t\t\t},\n\t\t\t} );\n\t\t} else if ( received.new_lock ) {\n\t\t\tupdatePostLock( {\n\t\t\t\tisLocked: false,\n\t\t\t\tactivePostLock: received.new_lock,\n\t\t\t} );\n\t\t}\n\t}\n\n\t/**\n\t * Unlock the post before the window is exited.\n\t */\n\treleasePostLock() {\n\t\tconst { isLocked, activePostLock, postLockUtils, postId } = this.props;\n\t\tif ( isLocked || ! activePostLock ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst data = {\n\t\t\taction: 'wp-remove-post-lock',\n\t\t\t_wpnonce: postLockUtils.unlockNonce,\n\t\t\tpost_ID: postId,\n\t\t\tactive_post_lock: activePostLock,\n\t\t};\n\n\t\tjQuery.post( {\n\t\t\tasync: false,\n\t\t\turl: postLockUtils.ajaxUrl,\n\t\t\tdata,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { user, postId, isLocked, isTakeover, postLockUtils, postType } = this.props;\n\t\tif ( ! isLocked ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst userDisplayName = user.name;\n\t\tconst userAvatar = user.avatar;\n\n\t\tconst unlockUrl = addQueryArgs( 'post.php', {\n\t\t\t'get-post-lock': '1',\n\t\t\tlockKey: true,\n\t\t\tpost: postId,\n\t\t\taction: 'edit',\n\t\t\t_wpnonce: postLockUtils.nonce,\n\t\t} );\n\t\tconst allPostsUrl = getWPAdminURL( 'edit.php', {\n\t\t\tpost_type: get( postType, [ 'slug' ] ),\n\t\t} );\n\t\tconst allPostsLabel = get( postType, [ 'labels', 'all_items' ] );\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\ttitle={ isTakeover ? __( 'Someone else has taken over this post.' ) : __( 'This post is already being edited.' ) }\n\t\t\t\tfocusOnMount={ true }\n\t\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\t\tshouldCloseOnEsc={ false }\n\t\t\t\tisDismissable={ false }\n\t\t\t\tclassName=\"editor-post-locked-modal\"\n\t\t\t>\n\t\t\t\t{ !! userAvatar && (\n\t\t\t\t\t<img\n\t\t\t\t\t\tsrc={ userAvatar }\n\t\t\t\t\t\talt={ __( 'Avatar' ) }\n\t\t\t\t\t\tclassName=\"editor-post-locked-modal__avatar\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ !! isTakeover && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ userDisplayName ?\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: user's display name */\n\t\t\t\t\t\t\t\t\t__( '%s now has editing control of this post. Dont worry, your changes up to this moment have been saved.' ),\n\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t) :\n\t\t\t\t\t\t\t\t__( 'Another user now has editing control of this post. Dont worry, your changes up to this moment have been saved.' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"editor-post-locked-modal__buttons\">\n\t\t\t\t\t\t\t<Button isPrimary isLarge href={ allPostsUrl }>\n\t\t\t\t\t\t\t\t{ allPostsLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t{ ! isTakeover && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ userDisplayName ?\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: user's display name */\n\t\t\t\t\t\t\t\t\t__( '%s is currently working on this post, which means you cannot make changes, unless you take over.' ),\n\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t) :\n\t\t\t\t\t\t\t\t__( 'Another user is currently working on this post, which means you cannot make changes, unless you take over.' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div className=\"editor-post-locked-modal__buttons\">\n\t\t\t\t\t\t\t<Button isDefault isLarge href={ allPostsUrl }>\n\t\t\t\t\t\t\t\t{ allPostsLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t<PostPreviewButton />\n\t\t\t\t\t\t\t<Button isPrimary isLarge href={ unlockUrl }>\n\t\t\t\t\t\t\t\t{ __( 'Take Over' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditorSettings,\n\t\t\tisPostLocked,\n\t\t\tisPostLockTakeover,\n\t\t\tgetPostLockUser,\n\t\t\tgetCurrentPostId,\n\t\t\tgetActivePostLock,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( 'core/editor' );\n\t\tconst { getPostType } = select( 'core' );\n\t\treturn {\n\t\t\tisLocked: isPostLocked(),\n\t\t\tisTakeover: isPostLockTakeover(),\n\t\t\tuser: getPostLockUser(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostLockUtils: getEditorSettings().postLockUtils,\n\t\t\tactivePostLock: getActivePostLock(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { autosave, updatePostLock } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tautosave,\n\t\t\tupdatePostLock,\n\t\t};\n\t} ),\n\twithGlobalEvents( {\n\t\tbeforeunload: 'releasePostLock',\n\t} )\n)( PostLockedModal );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostPendingStatusCheck( { hasPublishAction, isPublished, children } ) {\n\tif ( isPublished || ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { isCurrentPostPublished, getCurrentPostType, getCurrentPost } = select( 'core/editor' );\n\t\treturn {\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t} )\n)( PostPendingStatusCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostPendingStatusCheck from './check';\n\nexport function PostPendingStatus( { status, onUpdateStatus } ) {\n\tconst togglePendingStatus = () => {\n\t\tconst updatedStatus = status === 'pending' ? 'draft' : 'pending';\n\t\tonUpdateStatus( updatedStatus );\n\t};\n\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<CheckboxControl\n\t\t\t\tlabel={ __( 'Pending Review' ) }\n\t\t\t\tchecked={ status === 'pending' }\n\t\t\t\tonChange={ togglePendingStatus }\n\t\t\t/>\n\t\t</PostPendingStatusCheck>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select ) => ( {\n\t\tstatus: select( 'core/editor' ).getEditedPostAttribute( 'status' ),\n\t} ) ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdateStatus( status ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { status } );\n\t\t},\n\t} ) ),\n)( PostPendingStatus );\n","/**\n * WordPress dependencies\n */\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { cleanForSlug } from '../../utils/url';\n\nclass PostPermalinkEditor extends Component {\n\tconstructor( { permalinkParts, slug } ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\teditedPostName: slug || permalinkParts.postName,\n\t\t};\n\n\t\tthis.onSavePermalink = this.onSavePermalink.bind( this );\n\t}\n\n\tonSavePermalink( event ) {\n\t\tconst postName = cleanForSlug( this.state.editedPostName );\n\n\t\tevent.preventDefault();\n\n\t\tthis.props.onSave();\n\n\t\tif ( postName === this.props.postName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.editPost( {\n\t\t\tslug: postName,\n\t\t} );\n\n\t\tthis.setState( {\n\t\t\teditedPostName: postName,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { prefix, suffix } = this.props.permalinkParts;\n\t\tconst { editedPostName } = this.state;\n\n\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\t// Autofocus is allowed here, as this mini-UI is only loaded when the user clicks to open it.\n\t\treturn (\n\t\t\t<form\n\t\t\t\tclassName=\"editor-post-permalink-editor\"\n\t\t\t\tonSubmit={ this.onSavePermalink }\n\t\t\t>\n\t\t\t\t<span className=\"editor-post-permalink__editor-container\">\n\t\t\t\t\t<span className=\"editor-post-permalink-editor__prefix\">\n\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t</span>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclassName=\"editor-post-permalink-editor__edit\"\n\t\t\t\t\t\taria-label={ __( 'Edit post permalink' ) }\n\t\t\t\t\t\tvalue={ editedPostName }\n\t\t\t\t\t\tonChange={ ( event ) => this.setState( { editedPostName: event.target.value } ) }\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tautoFocus\n\t\t\t\t\t/>\n\t\t\t\t\t<span className=\"editor-post-permalink-editor__suffix\">\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</span>\n\t\t\t\t\t&lrm;\n\t\t\t\t</span>\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-post-permalink-editor__save\"\n\t\t\t\t\tisLarge\n\t\t\t\t\tonClick={ this.onSavePermalink }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t</Button>\n\t\t\t</form>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPermalinkParts } = select( 'core/editor' );\n\t\treturn {\n\t\t\tpermalinkParts: getPermalinkParts(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost } = dispatch( 'core/editor' );\n\t\treturn { editPost };\n\t} ),\n] )( PostPermalinkEditor );\n\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { ClipboardButton, Button, ExternalLink } from '@wordpress/components';\nimport { safeDecodeURI } from '@wordpress/url';\n\n/**\n * Internal Dependencies\n */\nimport PostPermalinkEditor from './editor.js';\nimport { getWPAdminURL, cleanForSlug } from '../../utils/url';\n\nclass PostPermalink extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.addVisibilityCheck = this.addVisibilityCheck.bind( this );\n\t\tthis.onVisibilityChange = this.onVisibilityChange.bind( this );\n\n\t\tthis.state = {\n\t\t\tisCopied: false,\n\t\t\tisEditingPermalink: false,\n\t\t};\n\t}\n\n\taddVisibilityCheck() {\n\t\twindow.addEventListener( 'visibilitychange', this.onVisibilityChange );\n\t}\n\n\tonVisibilityChange() {\n\t\tconst { isEditable, refreshPost } = this.props;\n\t\t// If the user just returned after having clicked the \"Change Permalinks\" button,\n\t\t// fetch a new copy of the post from the server, just in case they enabled permalinks.\n\t\tif ( ! isEditable && 'visible' === document.visibilityState ) {\n\t\t\trefreshPost();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\t// If we've just stopped editing the permalink, focus on the new permalink.\n\t\tif ( prevState.isEditingPermalink && ! this.state.isEditingPermalink ) {\n\t\t\tthis.linkElement.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener( 'visibilitychange', this.addVisibilityCheck );\n\t}\n\n\trender() {\n\t\tconst { isNew, postLink, permalinkParts, postSlug, postTitle, postID, isEditable, isPublished } = this.props;\n\n\t\tif ( isNew || ! postLink ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { isCopied, isEditingPermalink } = this.state;\n\t\tconst ariaLabel = isCopied ? __( 'Permalink copied' ) : __( 'Copy the permalink' );\n\n\t\tconst { prefix, suffix } = permalinkParts;\n\t\tconst slug = postSlug || cleanForSlug( postTitle ) || postID;\n\t\tconst samplePermalink = ( isEditable ) ? prefix + slug + suffix : prefix;\n\n\t\treturn (\n\t\t\t<div className=\"editor-post-permalink\">\n\t\t\t\t<ClipboardButton\n\t\t\t\t\tclassName={ classnames( 'editor-post-permalink__copy', { 'is-copied': isCopied } ) }\n\t\t\t\t\ttext={ samplePermalink }\n\t\t\t\t\tlabel={ ariaLabel }\n\t\t\t\t\tonCopy={ () => this.setState( { isCopied: true } ) }\n\t\t\t\t\taria-disabled={ isCopied }\n\t\t\t\t\ticon=\"admin-links\"\n\t\t\t\t/>\n\n\t\t\t\t<span className=\"editor-post-permalink__label\">{ __( 'Permalink:' ) }</span>\n\n\t\t\t\t{ ! isEditingPermalink &&\n\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\tclassName=\"editor-post-permalink__link\"\n\t\t\t\t\t\thref={ ! isPublished ? postLink : samplePermalink }\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\tref={ ( linkElement ) => this.linkElement = linkElement }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ safeDecodeURI( samplePermalink ) }\n\t\t\t\t\t\t&lrm;\n\t\t\t\t\t</ExternalLink>\n\t\t\t\t}\n\n\t\t\t\t{ isEditingPermalink &&\n\t\t\t\t\t<PostPermalinkEditor\n\t\t\t\t\t\tslug={ slug }\n\t\t\t\t\t\tonSave={ () => this.setState( { isEditingPermalink: false } ) }\n\t\t\t\t\t/>\n\t\t\t\t}\n\n\t\t\t\t{ isEditable && ! isEditingPermalink &&\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"editor-post-permalink__edit\"\n\t\t\t\t\t\tisLarge\n\t\t\t\t\t\tonClick={ () => this.setState( { isEditingPermalink: true } ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\n\t\t\t\t{ ! isEditable &&\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"editor-post-permalink__change\"\n\t\t\t\t\t\tisLarge\n\t\t\t\t\t\thref={ getWPAdminURL( 'options-permalink.php' ) }\n\t\t\t\t\t\tonClick={ this.addVisibilityCheck }\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Change Permalinks' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostNew,\n\t\t\tisPermalinkEditable,\n\t\t\tgetCurrentPost,\n\t\t\tgetPermalinkParts,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t} = select( 'core/editor' );\n\n\t\tconst { id, link } = getCurrentPost();\n\n\t\treturn {\n\t\t\tisNew: isEditedPostNew(),\n\t\t\tpostLink: link,\n\t\t\tpermalinkParts: getPermalinkParts(),\n\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\tisEditable: isPermalinkEditable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tpostTitle: getEditedPostAttribute( 'title' ),\n\t\t\tpostID: id,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { refreshPost } = dispatch( 'core/editor' );\n\t\treturn { refreshPost };\n\t} ),\n] )( PostPermalink );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nfunction PostPingbacks( { pingStatus = 'open', ...props } ) {\n\tconst onTogglePingback = () => props.editPost( { ping_status: pingStatus === 'open' ? 'closed' : 'open' } );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\tlabel={ __( 'Allow Pingbacks & Trackbacks' ) }\n\t\t\tchecked={ pingStatus === 'open' }\n\t\t\tonChange={ onTogglePingback }\n\t\t/>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tpingStatus: select( 'core/editor' ).getEditedPostAttribute( 'ping_status' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\teditPost: dispatch( 'core/editor' ).editPost,\n\t} ) ),\n] )( PostPingbacks );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, renderToString } from '@wordpress/element';\nimport { Button, Path, SVG } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { DotTip } from '@wordpress/nux';\nimport { ifCondition, compose } from '@wordpress/compose';\n\nfunction writeInterstitialMessage( targetDocument ) {\n\tlet markup = renderToString(\n\t\t<div className=\"editor-post-preview-button__interstitial-message\">\n\t\t\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 96 96\">\n\t\t\t\t<Path className=\"outer\" d=\"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36\" fill=\"none\" />\n\t\t\t\t<Path className=\"inner\" d=\"M69.5 46.4c0-3.9-1.4-6.7-2.6-8.8-1.6-2.6-3.1-4.9-3.1-7.5 0-2.9 2.2-5.7 5.4-5.7h.4C63.9 19.2 56.4 16 48 16c-11.2 0-21 5.7-26.7 14.4h2.1c3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3L40 67.5l7-20.9L42 33c-1.7-.1-3.3-.3-3.3-.3-1.7-.1-1.5-2.7.2-2.6 0 0 5.3.4 8.4.4 3.3 0 8.5-.4 8.5-.4 1.7-.1 1.9 2.4.2 2.6 0 0-1.7.2-3.7.3l11.5 34.3 3.3-10.4c1.6-4.5 2.4-7.8 2.4-10.5zM16.1 48c0 12.6 7.3 23.5 18 28.7L18.8 35c-1.7 4-2.7 8.4-2.7 13zm32.5 2.8L39 78.6c2.9.8 5.9 1.3 9 1.3 3.7 0 7.3-.6 10.6-1.8-.1-.1-.2-.3-.2-.4l-9.8-26.9zM76.2 36c0 3.2-.6 6.9-2.4 11.4L64 75.6c9.5-5.5 15.9-15.8 15.9-27.6 0-5.5-1.4-10.8-3.9-15.3.1 1 .2 2.1.2 3.3z\" fill=\"none\" />\n\t\t\t</SVG>\n\t\t\t<p>{ __( 'Generating preview…' ) }</p>\n\t\t</div>\n\t);\n\n\tmarkup += `\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-direction: column;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\twidth: 100vw;\n\t\t\t}\n\t\t\t@-webkit-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-moz-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@-o-keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t@keyframes paint {\n\t\t\t\t0% {\n\t\t\t\t\tstroke-dashoffset: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg {\n\t\t\t\twidth: 192px;\n\t\t\t\theight: 192px;\n\t\t\t\tstroke: #555d66;\n\t\t\t\tstroke-width: 0.75;\n\t\t\t}\n\t\t\t.editor-post-preview-button__interstitial-message svg .outer,\n\t\t\t.editor-post-preview-button__interstitial-message svg .inner {\n\t\t\t\tstroke-dasharray: 280;\n\t\t\t\tstroke-dashoffset: 280;\n\t\t\t\t-webkit-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-moz-animation: paint 1.5s ease infinite alternate;\n\t\t\t\t-o-animation: paint 1.5s ease infinite alternate;\n\t\t\t\tanimation: paint 1.5s ease infinite alternate;\n\t\t\t}\n\t\t\tp {\n\t\t\t\ttext-align: center;\n\t\t\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\t\t}\n\t\t</style>\n\t`;\n\n\ttargetDocument.write( markup );\n\ttargetDocument.close();\n}\n\nexport class PostPreviewButton extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.openPreviewWindow = this.openPreviewWindow.bind( this );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { previewLink } = this.props;\n\n\t\t// This relies on the window being responsible to unset itself when\n\t\t// navigation occurs or a new preview window is opened, to avoid\n\t\t// unintentional forceful redirects.\n\t\tif ( previewLink && ! prevProps.previewLink ) {\n\t\t\tthis.setPreviewWindowLink( previewLink );\n\t\t}\n\t}\n\n\t/**\n\t * Sets the preview window's location to the given URL, if a preview window\n\t * exists and is not closed.\n\t *\n\t * @param {string} url URL to assign as preview window location.\n\t */\n\tsetPreviewWindowLink( url ) {\n\t\tconst { previewWindow } = this;\n\n\t\tif ( previewWindow && ! previewWindow.closed ) {\n\t\t\tpreviewWindow.location = url;\n\t\t}\n\t}\n\n\tgetWindowTarget() {\n\t\tconst { postId } = this.props;\n\t\treturn `wp-preview-${ postId }`;\n\t}\n\n\topenPreviewWindow( event ) {\n\t\t// Our Preview button has its 'href' and 'target' set correctly for a11y\n\t\t// purposes. Unfortunately, though, we can't rely on the default 'click'\n\t\t// handler since sometimes it incorrectly opens a new tab instead of reusing\n\t\t// the existing one.\n\t\t// https://github.com/WordPress/gutenberg/pull/8330\n\t\tevent.preventDefault();\n\n\t\t// Open up a Preview tab if needed. This is where we'll show the preview.\n\t\tif ( ! this.previewWindow || this.previewWindow.closed ) {\n\t\t\tthis.previewWindow = window.open( '', this.getWindowTarget() );\n\t\t}\n\n\t\t// Focus the Preview tab. This might not do anything, depending on the browser's\n\t\t// and user's preferences.\n\t\t// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus\n\t\tthis.previewWindow.focus();\n\n\t\t// If we don't need to autosave the post before previewing, then we simply\n\t\t// load the Preview URL in the Preview tab.\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setPreviewWindowLink( event.target.href );\n\t\t\treturn;\n\t\t}\n\n\t\t// Request an autosave. This happens asynchronously and causes the component\n\t\t// to update when finished.\n\t\tif ( this.props.isDraft ) {\n\t\t\tthis.props.savePost( { isPreview: true } );\n\t\t} else {\n\t\t\tthis.props.autosave( { isPreview: true } );\n\t\t}\n\n\t\t// Display a 'Generating preview' message in the Preview tab while we wait for the\n\t\t// autosave to finish.\n\t\twriteInterstitialMessage( this.previewWindow.document );\n\t}\n\n\trender() {\n\t\tconst { previewLink, currentPostLink, isSaveable } = this.props;\n\n\t\t// Link to the `?preview=true` URL if we have it, since this lets us see\n\t\t// changes that were autosaved since the post was last published. Otherwise,\n\t\t// just link to the post's URL.\n\t\tconst href = previewLink || currentPostLink;\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tisLarge\n\t\t\t\tclassName=\"editor-post-preview\"\n\t\t\t\thref={ href }\n\t\t\t\ttarget={ this.getWindowTarget() }\n\t\t\t\tdisabled={ ! isSaveable }\n\t\t\t\tonClick={ this.openPreviewWindow }\n\t\t\t>\n\t\t\t\t{ _x( 'Preview', 'imperative verb' ) }\n\t\t\t\t<span className=\"screen-reader-text\">\n\t\t\t\t\t{\n\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t}\n\t\t\t\t</span>\n\t\t\t\t<DotTip tipId=\"core/editor.preview\">\n\t\t\t\t\t{ __( 'Click “Preview” to load a preview of this page, so you can make sure youre happy with your blocks.' ) }\n\t\t\t\t</DotTip>\n\t\t\t</Button>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { forcePreviewLink, forceIsAutosaveable } ) => {\n\t\tconst {\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostAttribute,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditedPostSaveable,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tgetEditedPostPreviewLink,\n\t\t} = select( 'core/editor' );\n\t\tconst {\n\t\t\tgetPostType,\n\t\t} = select( 'core' );\n\n\t\tconst previewLink = getEditedPostPreviewLink();\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tcurrentPostLink: getCurrentPostAttribute( 'link' ),\n\t\t\tpreviewLink: forcePreviewLink !== undefined ? forcePreviewLink : previewLink,\n\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\tisAutosaveable: forceIsAutosaveable || isEditedPostAutosaveable(),\n\t\t\tisViewable: get( postType, [ 'viewable' ], false ),\n\t\t\tisDraft: [ 'draft', 'auto-draft' ].indexOf( getEditedPostAttribute( 'status' ) ) !== -1,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tautosave: dispatch( 'core/editor' ).autosave,\n\t\tsavePost: dispatch( 'core/editor' ).savePost,\n\t} ) ),\n\tifCondition( ( { isViewable } ) => isViewable ),\n] )( PostPreviewButton );\n","/**\n * External dependencies\n */\nimport { noop, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { Component, createRef } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { DotTip } from '@wordpress/nux';\n\n/**\n * Internal dependencies\n */\nimport PublishButtonLabel from './label';\nexport class PostPublishButton extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.buttonNode = createRef();\n\t}\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.buttonNode.current.focus();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\tforceIsSaving,\n\t\t\thasPublishAction,\n\t\t\tisBeingScheduled,\n\t\t\tisOpen,\n\t\t\tisPostSavingLocked,\n\t\t\tisPublishable,\n\t\t\tisPublished,\n\t\t\tisSaveable,\n\t\t\tisSaving,\n\t\t\tisToggle,\n\t\t\tonSave,\n\t\t\tonStatusChange,\n\t\t\tonSubmit = noop,\n\t\t\tonToggle,\n\t\t\tvisibility,\n\t\t} = this.props;\n\t\tconst isButtonDisabled =\n\t\t\tisSaving ||\n\t\t\tforceIsSaving ||\n\t\t\t! isSaveable ||\n\t\t\tisPostSavingLocked ||\n\t\t\t( ! isPublishable && ! forceIsDirty );\n\n\t\tconst isToggleDisabled =\n\t\t\tisPublished ||\n\t\t\tisSaving ||\n\t\t\tforceIsSaving ||\n\t\t\t! isSaveable ||\n\t\t\t( ! isPublishable && ! forceIsDirty );\n\n\t\tlet publishStatus;\n\t\tif ( ! hasPublishAction ) {\n\t\t\tpublishStatus = 'pending';\n\t\t} else if ( isBeingScheduled ) {\n\t\t\tpublishStatus = 'future';\n\t\t} else if ( visibility === 'private' ) {\n\t\t\tpublishStatus = 'private';\n\t\t} else {\n\t\t\tpublishStatus = 'publish';\n\t\t}\n\n\t\tconst onClick = () => {\n\t\t\tonSubmit();\n\t\t\tonStatusChange( publishStatus );\n\t\t\tonSave();\n\t\t};\n\n\t\tconst buttonProps = {\n\t\t\t'aria-disabled': isButtonDisabled,\n\t\t\tclassName: 'editor-post-publish-button',\n\t\t\tisBusy: isSaving && isPublished,\n\t\t\tisLarge: true,\n\t\t\tisPrimary: true,\n\t\t\tonClick,\n\t\t};\n\n\t\tconst toggleProps = {\n\t\t\t'aria-disabled': isToggleDisabled,\n\t\t\t'aria-expanded': isOpen,\n\t\t\tclassName: 'editor-post-publish-panel__toggle',\n\t\t\tisBusy: isSaving && isPublished,\n\t\t\tisPrimary: true,\n\t\t\tonClick: onToggle,\n\t\t};\n\n\t\tconst toggleChildren = isBeingScheduled ? __( 'Schedule…' ) : __( 'Publish…' );\n\t\tconst buttonChildren = <PublishButtonLabel forceIsSaving={ forceIsSaving } />;\n\n\t\tconst componentProps = isToggle ? toggleProps : buttonProps;\n\t\tconst componentChildren = isToggle ? toggleChildren : buttonChildren;\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tref={ this.buttonNode }\n\t\t\t\t{ ...componentProps }\n\t\t\t>\n\t\t\t\t{ componentChildren }\n\t\t\t\t<DotTip tipId=\"core/editor.publish\">\n\t\t\t\t\t{ __( 'Finished writing? Thats great, lets get this published right now. Just click “Publish” and youre good to go.' ) }\n\t\t\t\t</DotTip>\n\t\t\t</Button>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisSavingPost,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tgetEditedPostVisibility,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostSaveable,\n\t\t\tisEditedPostPublishable,\n\t\t\tisPostSavingLocked,\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostType,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tvisibility: getEditedPostVisibility(),\n\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\tisPostSavingLocked: isPostSavingLocked(),\n\t\t\tisPublishable: isEditedPostPublishable(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, savePost } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonStatusChange: ( status ) => editPost( { status } ),\n\t\t\tonSave: savePost,\n\t\t};\n\t} ),\n] )( PostPublishButton );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PublishButtonLabel( {\n\tisPublished,\n\tisBeingScheduled,\n\tisSaving,\n\tisPublishing,\n\thasPublishAction,\n\tisAutosaving,\n} ) {\n\tif ( isPublishing ) {\n\t\treturn __( 'Publishing…' );\n\t} else if ( isPublished && isSaving && ! isAutosaving ) {\n\t\treturn __( 'Updating…' );\n\t} else if ( isBeingScheduled && isSaving && ! isAutosaving ) {\n\t\treturn __( 'Scheduling…' );\n\t}\n\n\tif ( ! hasPublishAction ) {\n\t\treturn __( 'Submit for Review' );\n\t} else if ( isPublished ) {\n\t\treturn __( 'Update' );\n\t} else if ( isBeingScheduled ) {\n\t\treturn __( 'Schedule' );\n\t}\n\n\treturn __( 'Publish' );\n}\n\nexport default compose( [\n\twithSelect( ( select, { forceIsSaving } ) => {\n\t\tconst {\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisSavingPost,\n\t\t\tisPublishingPost,\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostType,\n\t\t\tisAutosavingPost,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisSaving: forceIsSaving || isSavingPost(),\n\t\t\tisPublishing: isPublishingPost(),\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t};\n\t} ),\n] )( PublishButtonLabel );\n","/**\n * External dependencies\n */\nimport { get, omit } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport {\n\tIconButton,\n\tSpinner,\n\tCheckboxControl,\n\twithFocusReturn,\n\twithConstrainedTabbing,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal Dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\n\nexport class PostPublishPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSubmit = this.onSubmit.bind( this );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\t// Automatically collapse the publish sidebar when a post\n\t\t// is published and the user makes an edit.\n\t\tif ( prevProps.isPublished && ! this.props.isSaving && this.props.isDirty ) {\n\t\t\tthis.props.onClose();\n\t\t}\n\t}\n\n\tonSubmit() {\n\t\tconst { onClose, hasPublishAction, isPostTypeViewable } = this.props;\n\t\tif ( ! hasPublishAction || ! isPostTypeViewable ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\n\t\t\tforceIsSaving,\n\t\t\tisBeingScheduled,\n\t\t\tisPublished,\n\t\t\tisPublishSidebarEnabled,\n\t\t\tisScheduled,\n\t\t\tisSaving,\n\t\t\tonClose,\n\t\t\tonTogglePublishSidebar,\n\t\t\tPostPublishExtension,\n\t\t\tPrePublishExtension,\n\t\t\t...additionalProps\n\t\t} = this.props;\n\t\tconst propsForPanel = omit( additionalProps, [ 'hasPublishAction', 'isDirty', 'isPostTypeViewable' ] );\n\t\tconst isPublishedOrScheduled = isPublished || ( isScheduled && isBeingScheduled );\n\t\tconst isPrePublish = ! isPublishedOrScheduled && ! isSaving;\n\t\tconst isPostPublish = isPublishedOrScheduled && ! isSaving;\n\t\treturn (\n\t\t\t<div className=\"editor-post-publish-panel\" { ...propsForPanel }>\n\t\t\t\t<div className=\"editor-post-publish-panel__header\">\n\t\t\t\t\t{ isPostPublish ? (\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-published\">\n\t\t\t\t\t\t\t{ isScheduled ? __( 'Scheduled' ) : __( 'Published' ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t<PostPublishButton focusOnMount={ true } onSubmit={ this.onSubmit } forceIsDirty={ forceIsDirty } forceIsSaving={ forceIsSaving } />\n\t\t\t\t\t\t\t<span className=\"editor-post-publish-panel__spacer\"></span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\taria-expanded={ true }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\ticon=\"no-alt\"\n\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__content\">\n\t\t\t\t\t{ isPrePublish && (\n\t\t\t\t\t\t<PostPublishPanelPrepublish>\n\t\t\t\t\t\t\t{ PrePublishExtension && <PrePublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPrepublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isPostPublish && (\n\t\t\t\t\t\t<PostPublishPanelPostpublish focusOnMount={ true } >\n\t\t\t\t\t\t\t{ PostPublishExtension && <PostPublishExtension /> }\n\t\t\t\t\t\t</PostPublishPanelPostpublish>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isSaving && ( <Spinner /> ) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"editor-post-publish-panel__footer\">\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tlabel={ __( 'Always show pre-publish checks.' ) }\n\t\t\t\t\t\tchecked={ isPublishSidebarEnabled }\n\t\t\t\t\t\tonChange={ onTogglePublishSidebar }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPostType } = select( 'core' );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisSavingPost,\n\t\t} = select( 'core/editor' );\n\t\tconst { isPublishSidebarEnabled } = select( 'core/editor' );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tisPostTypeViewable: get( postType, [ 'viewable' ], false ),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled: isPublishSidebarEnabled(),\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {\n\t\tconst { disablePublishSidebar, enablePublishSidebar } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonTogglePublishSidebar: ( ) => {\n\t\t\t\tif ( isPublishSidebarEnabled ) {\n\t\t\t\t\tdisablePublishSidebar();\n\t\t\t\t} else {\n\t\t\t\t\tenablePublishSidebar();\n\t\t\t\t}\n\t\t\t},\n\t\t};\n\t} ),\n\twithFocusReturn,\n\twithConstrainedTabbing,\n] )( PostPublishPanel );\n","/**\n * External dependencies\n */\nimport { find, get, includes } from 'lodash';\n\n/**\n * WordPress dependencies.\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { ifCondition, compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { Button, PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies.\n */\nimport { POST_FORMATS } from '../post-format';\n\nconst PostFormatSuggestion = ( { suggestedPostFormat, suggestionText, onUpdatePostFormat } ) => (\n\t<Button isLink onClick={ () => onUpdatePostFormat( suggestedPostFormat ) }>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nconst PostFormatPanel = ( { suggestion, onUpdatePostFormat } ) => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t(\n\t\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t\t{ __( 'Use a post format' ) }\n\t\t\t</span>\n\t\t),\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle } >\n\t\t\t<p>\n\t\t\t\t{ __( 'Your theme uses post formats to highlight different kinds of content, like images or videos. Apply a post format to see this special styling.' ) }\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<PostFormatSuggestion\n\t\t\t\t\tonUpdatePostFormat={ onUpdatePostFormat }\n\t\t\t\t\tsuggestedPostFormat={ suggestion.id }\n\t\t\t\t\tsuggestionText={ sprintf(\n\t\t\t\t\t\t__( 'Apply the \"%1$s\" format.' ),\n\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</p>\n\t\t</PanelBody>\n\t);\n};\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) => includes( supportedFormats, format.id ) );\n\treturn find( formats, ( format ) => format.id === suggestedPostFormat );\n};\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } = select( 'core/editor' );\n\t\tconst supportedFormats = get( select( 'core' ).getThemeSupports(), [ 'formats' ], [] );\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion( supportedFormats, getSuggestedPostFormat() ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdatePostFormat( postFormat ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { format: postFormat } );\n\t\t},\n\t} ) ),\n\tifCondition( ( { suggestion, currentPostFormat } ) => suggestion && suggestion.id !== currentPostFormat ),\n)( PostFormatPanel );\n","/**\n * External dependencies\n */\nimport { some } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\n\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t(\n\t\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t\t{ __( 'Add tags' ) }\n\t\t\t</span>\n\t\t),\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __( 'Tags help users and search engines navigate your site and find your content. Add a few keywords to describe your post.' ) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug={ 'post_tag' } />\n\t\t</PanelBody>\n\t);\n};\n\nclass MaybeTagsPanel extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.state = {\n\t\t\thadTagsWhenOpeningThePanel: props.hasTags,\n\t\t};\n\t}\n\n\t/*\n\t * We only want to show the tag panel if the post didn't have\n\t * any tags when the user hit the Publish button.\n\t *\n\t * We can't use the prop.hasTags because it'll change to true\n\t * if the user adds a new tag within the pre-publish panel.\n\t * This would force a re-render and a new prop.hasTags check,\n\t * hiding this panel and keeping the user from adding\n\t * more than one tag.\n\t */\n\trender() {\n\t\tif ( ! this.state.hadTagsWhenOpeningThePanel ) {\n\t\t\treturn <TagsPanel />;\n\t\t}\n\n\t\treturn null;\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select ) => {\n\t\tconst postType = select( 'core/editor' ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( 'core' ).getTaxonomy( 'post_tag' );\n\t\tconst tags = tagsTaxonomy && select( 'core/editor' ).getEditedPostAttribute( tagsTaxonomy.rest_base );\n\t\treturn {\n\t\t\tareTagsFetched: tagsTaxonomy !== undefined,\n\t\t\tisPostTypeSupported: tagsTaxonomy && some( tagsTaxonomy.types, ( type ) => type === postType ),\n\t\t\thasTags: tags && tags.length,\n\t\t};\n\t} ),\n\tifCondition( ( { areTagsFetched, isPostTypeSupported } ) => isPostTypeSupported && areTagsFetched ),\n)( MaybeTagsPanel );\n","/**\n * External Dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { PanelBody, Button, ClipboardButton, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Component, Fragment, createRef } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\n\nclass PostPublishPanelPostpublish extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tshowCopyConfirmation: false,\n\t\t};\n\t\tthis.onCopy = this.onCopy.bind( this );\n\t\tthis.onSelectInput = this.onSelectInput.bind( this );\n\t\tthis.postLink = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.props.focusOnMount ) {\n\t\t\tthis.postLink.current.focus();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t}\n\n\tonCopy() {\n\t\tthis.setState( {\n\t\t\tshowCopyConfirmation: true,\n\t\t} );\n\n\t\tclearTimeout( this.dismissCopyConfirmation );\n\t\tthis.dismissCopyConfirmation = setTimeout( () => {\n\t\t\tthis.setState( {\n\t\t\t\tshowCopyConfirmation: false,\n\t\t\t} );\n\t\t}, 4000 );\n\t}\n\n\tonSelectInput( event ) {\n\t\tevent.target.select();\n\t}\n\n\trender() {\n\t\tconst { children, isScheduled, post, postType } = this.props;\n\t\tconst postLabel = get( postType, [ 'labels', 'singular_name' ] );\n\t\tconst viewPostLabel = get( postType, [ 'labels', 'view_item' ] );\n\n\t\tconst postPublishNonLinkHeader = isScheduled ?\n\t\t\t<Fragment>{ __( 'is now scheduled. It will go live on' ) } <PostScheduleLabel />.</Fragment> :\n\t\t\t__( 'is now live.' );\n\n\t\treturn (\n\t\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t\t<a ref={ this.postLink } href={ post.link }>{ post.title || __( '(no title)' ) }</a> { postPublishNonLinkHeader }\n\t\t\t\t</PanelBody>\n\t\t\t\t<PanelBody>\n\t\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t\t<strong>{ __( 'Whats next?' ) }</strong>\n\t\t\t\t\t</p>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tclassName=\"post-publish-panel__postpublish-post-address\"\n\t\t\t\t\t\treadOnly\n\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: post type singular name */\n\t\t\t\t\t\t\t__( '%s address' ), postLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ post.link }\n\t\t\t\t\t\tonFocus={ this.onSelectInput }\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t\t<Button isDefault href={ post.link }>\n\t\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<ClipboardButton isDefault text={ post.link } onCopy={ this.onCopy }>\n\t\t\t\t\t\t\t{ this.state.showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy Link' ) }\n\t\t\t\t\t\t</ClipboardButton>\n\t\t\t\t\t</div>\n\t\t\t\t</PanelBody>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getCurrentPost, isCurrentPostScheduled } = select( 'core/editor' );\n\tconst { getPostType } = select( 'core' );\n\n\treturn {\n\t\tpost: getCurrentPost(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tisScheduled: isCurrentPostScheduled(),\n\t};\n} )( PostPublishPanelPostpublish );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\nimport { PanelBody } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal Dependencies\n */\nimport PostVisibility from '../post-visibility';\nimport PostVisibilityLabel from '../post-visibility/label';\nimport PostSchedule from '../post-schedule';\nimport PostScheduleLabel from '../post-schedule/label';\nimport MaybeTagsPanel from './maybe-tags-panel';\nimport MaybePostFormatPanel from './maybe-post-format-panel';\n\nfunction PostPublishPanelPrepublish( {\n\thasPublishAction,\n\tisBeingScheduled,\n\tchildren,\n} ) {\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __( 'When youre ready, submit your work for review, and an Editor will be able to approve it for you.' );\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __( 'Your work will be published at the specified date and time.' );\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __( 'Double-check your settings before publishing.' );\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div><strong>{ prePublishTitle }</strong></div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<PanelBody initialOpen={ false } title={ [\n\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\"><PostVisibilityLabel /></span>,\n\t\t\t\t\t] }>\n\t\t\t\t\t\t<PostVisibility />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<PanelBody initialOpen={ false } title={ [\n\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\"><PostScheduleLabel /></span>,\n\t\t\t\t\t] }>\n\t\t\t\t\t\t<PostSchedule />\n\t\t\t\t\t</PanelBody>\n\t\t\t\t\t<MaybePostFormatPanel />\n\t\t\t\t\t<MaybeTagsPanel />\n\t\t\t\t\t{ children }\n\t\t\t\t</Fragment>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tisEditedPostBeingScheduled,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t};\n\t}\n)( PostPublishPanelPrepublish );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dashicon, Button, IconButton } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { withSafeTimeout, compose } from '@wordpress/compose';\nimport { withViewportMatch } from '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport PostSwitchToDraftButton from '../post-switch-to-draft-button';\n\n/**\n * Component showing whether the post is saved or not and displaying save links.\n *\n * @param {Object} Props Component Props.\n */\nexport class PostSavedState extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tforceSavedMessage: false,\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.isSaving && ! this.props.isSaving ) {\n\t\t\tthis.setState( { forceSavedMessage: true } );\n\t\t\tthis.props.setTimeout( () => {\n\t\t\t\tthis.setState( { forceSavedMessage: false } );\n\t\t\t}, 1000 );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tpost,\n\t\t\tisNew,\n\t\t\tisScheduled,\n\t\t\tisPublished,\n\t\t\tisDirty,\n\t\t\tisSaving,\n\t\t\tisSaveable,\n\t\t\tonSave,\n\t\t\tisAutosaving,\n\t\t\tisPending,\n\t\t\tisLargeViewport,\n\t\t} = this.props;\n\t\tconst { forceSavedMessage } = this.state;\n\t\tconst hasPublishAction = get( post, [ '_links', 'wp:action-publish' ], false );\n\t\tif ( isSaving ) {\n\t\t\t// TODO: Classes generation should be common across all return\n\t\t\t// paths of this function, including proper naming convention for\n\t\t\t// the \"Save Draft\" button.\n\t\t\tconst classes = classnames( 'editor-post-saved-state', 'is-saving', {\n\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span className={ classes }>\n\t\t\t\t\t<Dashicon icon=\"cloud\" />\n\t\t\t\t\t{ isAutosaving ? __( 'Autosaving' ) : __( 'Saving' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif ( isPublished || isScheduled ) {\n\t\t\treturn <PostSwitchToDraftButton />;\n\t\t}\n\n\t\tif ( ! isSaveable ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( forceSavedMessage || ( ! isNew && ! isDirty ) ) {\n\t\t\treturn (\n\t\t\t\t<span className=\"editor-post-saved-state is-saved\">\n\t\t\t\t\t<Dashicon icon=\"saved\" />\n\t\t\t\t\t{ __( 'Saved' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\t// Once the post has been submitted for review this button\n\t\t// is not needed for the contributor role.\n\t\tif ( ! hasPublishAction && isPending ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst label = isPending ? __( 'Save as Pending' ) : __( 'Save Draft' );\n\t\tif ( ! isLargeViewport ) {\n\t\t\treturn (\n\t\t\t\t<IconButton\n\t\t\t\t\tclassName=\"editor-post-save-draft\"\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tonClick={ onSave }\n\t\t\t\t\tshortcut={ displayShortcut.primary( 's' ) }\n\t\t\t\t\ticon=\"cloud-upload\"\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-post-save-draft\"\n\t\t\t\tonClick={ onSave }\n\t\t\t\tshortcut={ displayShortcut.primary( 's' ) }\n\t\t\t\tisTertiary\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Button>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { forceIsDirty, forceIsSaving } ) => {\n\t\tconst {\n\t\t\tisEditedPostNew,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisSavingPost,\n\t\t\tisEditedPostSaveable,\n\t\t\tgetCurrentPost,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tisNew: isEditedPostNew(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\tisSaving: forceIsSaving || isSavingPost(),\n\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tisPending: 'pending' === getEditedPostAttribute( 'status' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonSave: dispatch( 'core/editor' ).savePost,\n\t} ) ),\n\twithSafeTimeout,\n\twithViewportMatch( { isLargeViewport: 'medium' } ),\n] )( PostSavedState );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostScheduleCheck( { hasPublishAction, children } ) {\n\tif ( ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getCurrentPost, getCurrentPostType } = select( 'core/editor' );\n\t\treturn {\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t} ),\n] )( PostScheduleCheck );\n","/**\n * WordPress dependencies\n */\nimport { __experimentalGetSettings } from '@wordpress/date';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { DateTimePicker } from '@wordpress/components';\n\nexport function PostSchedule( { date, onUpdateDate } ) {\n\tconst settings = __experimentalGetSettings();\n\t// To know if the current timezone is a 12 hour time with look for \"a\" in the time format\n\t// We also make sure this a is not escaped by a \"/\"\n\tconst is12HourTime = /a(?!\\\\)/i.test(\n\t\tsettings.formats.time\n\t\t\t.toLowerCase() // Test only the lower case a\n\t\t\t.replace( /\\\\\\\\/g, '' ) // Replace \"//\" with empty strings\n\t\t\t.split( '' ).reverse().join( '' ) // Reverse the string and test for \"a\" not followed by a slash\n\t);\n\n\treturn (\n\t\t<DateTimePicker\n\t\t\tkey=\"date-time-picker\"\n\t\t\tcurrentDate={ date }\n\t\t\tonChange={ onUpdateDate }\n\t\t\tis12Hour={ is12HourTime }\n\t\t/>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tdate: select( 'core/editor' ).getEditedPostAttribute( 'date' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\treturn {\n\t\t\tonUpdateDate( date ) {\n\t\t\t\tdispatch( 'core/editor' ).editPost( { date } );\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostSchedule );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { dateI18n, __experimentalGetSettings } from '@wordpress/date';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostScheduleLabel( { date, isFloating } ) {\n\tconst settings = __experimentalGetSettings();\n\n\treturn date && ! isFloating ?\n\t\tdateI18n( settings.formats.datetimeAbbreviated, date ) :\n\t\t__( 'Immediately' );\n}\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tdate: select( 'core/editor' ).getEditedPostAttribute( 'date' ),\n\t\tisFloating: select( 'core/editor' ).isEditedPostDateFloating(),\n\t};\n} )( PostScheduleLabel );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostStickyCheck( { hasStickyAction, postType, children } ) {\n\tif (\n\t\tpostType !== 'post' ||\n\t\t! hasStickyAction\n\t) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst post = select( 'core/editor' ).getCurrentPost();\n\t\treturn {\n\t\t\thasStickyAction: get( post, [ '_links', 'wp:action-sticky' ], false ),\n\t\t\tpostType: select( 'core/editor' ).getCurrentPostType(),\n\t\t};\n\t} ),\n] )( PostStickyCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostStickyCheck from './check';\n\nexport function PostSticky( { onUpdateSticky, postSticky = false } ) {\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<CheckboxControl\n\t\t\t\tlabel={ __( 'Stick to the Front Page' ) }\n\t\t\t\tchecked={ postSticky }\n\t\t\t\tonChange={ () => onUpdateSticky( ! postSticky ) }\n\t\t\t/>\n\t\t</PostStickyCheck>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostSticky: select( 'core/editor' ).getEditedPostAttribute( 'sticky' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\treturn {\n\t\t\tonUpdateSticky( postSticky ) {\n\t\t\t\tdispatch( 'core/editor' ).editPost( { sticky: postSticky } );\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostSticky );\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nfunction PostSwitchToDraftButton( { isSaving, isPublished, isScheduled, onClick } ) {\n\tif ( ! isPublished && ! isScheduled ) {\n\t\treturn null;\n\t}\n\n\tconst onSwitch = () => {\n\t\tlet alertMessage;\n\t\tif ( isPublished ) {\n\t\t\talertMessage = __( 'Are you sure you want to unpublish this post?' );\n\t\t} else if ( isScheduled ) {\n\t\t\talertMessage = __( 'Are you sure you want to unschedule this post?' );\n\t\t}\n\t\t// eslint-disable-next-line no-alert\n\t\tif ( window.confirm( alertMessage ) ) {\n\t\t\tonClick();\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tclassName=\"editor-post-switch-to-draft\"\n\t\t\tonClick={ onSwitch }\n\t\t\tdisabled={ isSaving }\n\t\t\tisTertiary\n\t\t>\n\t\t\t{ __( 'Switch to Draft' ) }\n\t\t</Button>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { isSavingPost, isCurrentPostPublished, isCurrentPostScheduled } = select( 'core/editor' );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, savePost } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonClick: () => {\n\t\t\t\teditPost( { status: 'draft' } );\n\t\t\t\tsavePost();\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostSwitchToDraftButton );\n\n","/**\n * External Dependencies\n */\nimport { some, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostTaxonomiesCheck( { postType, taxonomies, children } ) {\n\tconst hasTaxonomies = some( taxonomies, ( taxonomy ) => includes( taxonomy.types, postType ) );\n\tif ( ! hasTaxonomies ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( 'core/editor' ).getCurrentPostType(),\n\t\t\ttaxonomies: select( 'core' ).getTaxonomies(),\n\t\t};\n\t} ),\n] )( PostTaxonomiesCheck );\n\n","/**\n * External dependencies\n */\nimport { isEmpty, get, unescape as unescapeString, find, throttle, uniqBy, invoke } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { FormTokenField, withFilters } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Module constants\n */\nconst DEFAULT_QUERY = {\n\tper_page: -1,\n\torderby: 'count',\n\torder: 'desc',\n\t_fields: 'id,name',\n};\nconst MAX_TERMS_SUGGESTIONS = 20;\nconst isSameTermName = ( termA, termB ) => termA.toLowerCase() === termB.toLowerCase();\n\nclass FlatTermSelector extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.searchTerms = throttle( this.searchTerms.bind( this ), 500 );\n\t\tthis.findOrCreateTerm = this.findOrCreateTerm.bind( this );\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t\tavailableTerms: [],\n\t\t\tselectedTerms: [],\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! isEmpty( this.props.terms ) ) {\n\t\t\tthis.setState( { loading: false } );\n\t\t\tthis.initRequest = this.fetchTerms( {\n\t\t\t\tinclude: this.props.terms.join( ',' ),\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\t\t\tthis.initRequest.then(\n\t\t\t\t() => {\n\t\t\t\t\tthis.setState( { loading: false } );\n\t\t\t\t},\n\t\t\t\t( xhr ) => {\n\t\t\t\t\tif ( xhr.statusText === 'abort' ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\tloading: false,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tinvoke( this.initRequest, [ 'abort' ] );\n\t\tinvoke( this.searchRequest, [ 'abort' ] );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( prevProps.terms !== this.props.terms ) {\n\t\t\tthis.updateSelectedTerms( this.props.terms );\n\t\t}\n\t}\n\n\tfetchTerms( params = {} ) {\n\t\tconst { taxonomy } = this.props;\n\t\tconst query = { ...DEFAULT_QUERY, ...params };\n\t\tconst request = apiFetch( {\n\t\t\tpath: addQueryArgs( `/wp/v2/${ taxonomy.rest_base }`, query ),\n\t\t} );\n\t\trequest.then( ( terms ) => {\n\t\t\tthis.setState( ( state ) => ( {\n\t\t\t\tavailableTerms: state.availableTerms.concat(\n\t\t\t\t\tterms.filter( ( term ) => ! find( state.availableTerms, ( availableTerm ) => availableTerm.id === term.id ) )\n\t\t\t\t),\n\t\t\t} ) );\n\t\t\tthis.updateSelectedTerms( this.props.terms );\n\t\t} );\n\n\t\treturn request;\n\t}\n\n\tupdateSelectedTerms( terms = [] ) {\n\t\tconst selectedTerms = terms.reduce( ( result, termId ) => {\n\t\t\tconst termObject = find( this.state.availableTerms, ( term ) => term.id === termId );\n\t\t\tif ( termObject ) {\n\t\t\t\tresult.push( termObject.name );\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}, [] );\n\t\tthis.setState( {\n\t\t\tselectedTerms,\n\t\t} );\n\t}\n\n\tfindOrCreateTerm( termName ) {\n\t\tconst { taxonomy } = this.props;\n\t\t// Tries to create a term or fetch it if it already exists.\n\t\treturn apiFetch( {\n\t\t\tpath: `/wp/v2/${ taxonomy.rest_base }`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: { name: termName },\n\t\t} ).catch( ( error ) => {\n\t\t\tconst errorCode = error.code;\n\t\t\tif ( errorCode === 'term_exists' ) {\n\t\t\t\t// If the terms exist, fetch it instead of creating a new one.\n\t\t\t\tthis.addRequest = apiFetch( {\n\t\t\t\t\tpath: addQueryArgs( `/wp/v2/${ taxonomy.rest_base }`, { ...DEFAULT_QUERY, search: termName } ),\n\t\t\t\t} );\n\t\t\t\treturn this.addRequest.then( ( searchResult ) => {\n\t\t\t\t\treturn find( searchResult, ( result ) => isSameTermName( result.name, termName ) );\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn Promise.reject( error );\n\t\t} );\n\t}\n\n\tonChange( termNames ) {\n\t\tconst uniqueTerms = uniqBy( termNames, ( term ) => term.toLowerCase() );\n\t\tthis.setState( { selectedTerms: uniqueTerms } );\n\t\tconst newTermNames = uniqueTerms.filter( ( termName ) =>\n\t\t\t! find( this.state.availableTerms, ( term ) => isSameTermName( term.name, termName ) )\n\t\t);\n\t\tconst termNamesToIds = ( names, availableTerms ) => {\n\t\t\treturn names\n\t\t\t\t.map( ( termName ) =>\n\t\t\t\t\tfind( availableTerms, ( term ) => isSameTermName( term.name, termName ) ).id\n\t\t\t\t);\n\t\t};\n\n\t\tif ( newTermNames.length === 0 ) {\n\t\t\treturn this.props.onUpdateTerms(\n\t\t\t\ttermNamesToIds( uniqueTerms, this.state.availableTerms ),\n\t\t\t\tthis.props.taxonomy.rest_base\n\t\t\t);\n\t\t}\n\t\tPromise\n\t\t\t.all( newTermNames.map( this.findOrCreateTerm ) )\n\t\t\t.then( ( newTerms ) => {\n\t\t\t\tconst newAvailableTerms = this.state.availableTerms.concat( newTerms );\n\t\t\t\tthis.setState( { availableTerms: newAvailableTerms } );\n\t\t\t\treturn this.props.onUpdateTerms(\n\t\t\t\t\ttermNamesToIds( uniqueTerms, newAvailableTerms ),\n\t\t\t\t\tthis.props.taxonomy.rest_base\n\t\t\t\t);\n\t\t\t} );\n\t}\n\n\tsearchTerms( search = '' ) {\n\t\tinvoke( this.searchRequest, [ 'abort' ] );\n\t\tthis.searchRequest = this.fetchTerms( { search } );\n\t}\n\n\trender() {\n\t\tconst { slug, taxonomy, hasAssignAction } = this.props;\n\n\t\tif ( ! hasAssignAction ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { loading, availableTerms, selectedTerms } = this.state;\n\t\tconst termNames = availableTerms.map( ( term ) => term.name );\n\t\tconst newTermLabel = get(\n\t\t\ttaxonomy,\n\t\t\t[ 'labels', 'add_new_item' ],\n\t\t\tslug === 'post_tag' ? __( 'Add New Tag' ) : __( 'Add New Term' )\n\t\t);\n\t\tconst singularName = get(\n\t\t\ttaxonomy,\n\t\t\t[ 'labels', 'singular_name' ],\n\t\t\tslug === 'post_tag' ? __( 'Tag' ) : __( 'Term' )\n\t\t);\n\t\tconst termAddedLabel = sprintf( _x( '%s added', 'term' ), singularName );\n\t\tconst termRemovedLabel = sprintf( _x( '%s removed', 'term' ), singularName );\n\t\tconst removeTermLabel = sprintf( _x( 'Remove %s', 'term' ), singularName );\n\n\t\treturn (\n\t\t\t<FormTokenField\n\t\t\t\tvalue={ selectedTerms }\n\t\t\t\tdisplayTransform={ unescapeString }\n\t\t\t\tsuggestions={ termNames }\n\t\t\t\tonChange={ this.onChange }\n\t\t\t\tonInputChange={ this.searchTerms }\n\t\t\t\tmaxSuggestions={ MAX_TERMS_SUGGESTIONS }\n\t\t\t\tdisabled={ loading }\n\t\t\t\tlabel={ newTermLabel }\n\t\t\t\tmessages={ {\n\t\t\t\t\tadded: termAddedLabel,\n\t\t\t\t\tremoved: termRemovedLabel,\n\t\t\t\t\tremove: removeTermLabel,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { slug } ) => {\n\t\tconst { getCurrentPost } = select( 'core/editor' );\n\t\tconst { getTaxonomy } = select( 'core' );\n\t\tconst taxonomy = getTaxonomy( slug );\n\t\treturn {\n\t\t\thasCreateAction: taxonomy ? get( getCurrentPost(), [ '_links', 'wp:action-create-' + taxonomy.rest_base ], false ) : false,\n\t\t\thasAssignAction: taxonomy ? get( getCurrentPost(), [ '_links', 'wp:action-assign-' + taxonomy.rest_base ], false ) : false,\n\t\t\tterms: taxonomy ? select( 'core/editor' ).getEditedPostAttribute( taxonomy.rest_base ) : [],\n\t\t\ttaxonomy,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\treturn {\n\t\t\tonUpdateTerms( terms, restBase ) {\n\t\t\t\tdispatch( 'core/editor' ).editPost( { [ restBase ]: terms } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithFilters( 'editor.PostTaxonomyType' ),\n)( FlatTermSelector );\n","/**\n * External dependencies\n */\nimport { get, unescape as unescapeString, without, find, some, invoke } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { TreeSelect, withSpokenMessages, withFilters, Button } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { buildTermsTree } from '../../utils/terms';\n\n/**\n * Module Constants\n */\nconst DEFAULT_QUERY = {\n\tper_page: -1,\n\torderby: 'name',\n\torder: 'asc',\n\t_fields: 'id,name,parent',\n};\n\nconst MIN_TERMS_COUNT_FOR_FILTER = 8;\n\nclass HierarchicalTermSelector extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.findTerm = this.findTerm.bind( this );\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onChangeFormName = this.onChangeFormName.bind( this );\n\t\tthis.onChangeFormParent = this.onChangeFormParent.bind( this );\n\t\tthis.onAddTerm = this.onAddTerm.bind( this );\n\t\tthis.onToggleForm = this.onToggleForm.bind( this );\n\t\tthis.setFilterValue = this.setFilterValue.bind( this );\n\t\tthis.sortBySelected = this.sortBySelected.bind( this );\n\t\tthis.state = {\n\t\t\tloading: true,\n\t\t\tavailableTermsTree: [],\n\t\t\tavailableTerms: [],\n\t\t\tadding: false,\n\t\t\tformName: '',\n\t\t\tformParent: '',\n\t\t\tshowForm: false,\n\t\t\tfilterValue: '',\n\t\t\tfilteredTermsTree: [],\n\t\t};\n\t}\n\n\tonChange( event ) {\n\t\tconst { onUpdateTerms, terms = [], taxonomy } = this.props;\n\t\tconst termId = parseInt( event.target.value, 10 );\n\t\tconst hasTerm = terms.indexOf( termId ) !== -1;\n\t\tconst newTerms = hasTerm ?\n\t\t\twithout( terms, termId ) :\n\t\t\t[ ...terms, termId ];\n\t\tonUpdateTerms( newTerms, taxonomy.rest_base );\n\t}\n\n\tonChangeFormName( event ) {\n\t\tconst newValue = event.target.value.trim() === '' ? '' : event.target.value;\n\t\tthis.setState( { formName: newValue } );\n\t}\n\n\tonChangeFormParent( newParent ) {\n\t\tthis.setState( { formParent: newParent } );\n\t}\n\n\tonToggleForm() {\n\t\tthis.setState( ( state ) => ( {\n\t\t\tshowForm: ! state.showForm,\n\t\t} ) );\n\t}\n\n\tfindTerm( terms, parent, name ) {\n\t\treturn find( terms, ( term ) => {\n\t\t\treturn ( ( ! term.parent && ! parent ) || parseInt( term.parent ) === parseInt( parent ) ) &&\n\t\t\t\tterm.name.toLowerCase() === name.toLowerCase();\n\t\t} );\n\t}\n\n\tonAddTerm( event ) {\n\t\tevent.preventDefault();\n\t\tconst { onUpdateTerms, taxonomy, terms, slug } = this.props;\n\t\tconst { formName, formParent, adding, availableTerms } = this.state;\n\t\tif ( formName === '' || adding ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// check if the term we are adding already exists\n\t\tconst existingTerm = this.findTerm( availableTerms, formParent, formName );\n\t\tif ( existingTerm ) {\n\t\t\t// if the term we are adding exists but is not selected select it\n\t\t\tif ( ! some( terms, ( term ) => term === existingTerm.id ) ) {\n\t\t\t\tonUpdateTerms( [ ...terms, existingTerm.id ], taxonomy.rest_base );\n\t\t\t}\n\t\t\tthis.setState( {\n\t\t\t\tformName: '',\n\t\t\t\tformParent: '',\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tadding: true,\n\t\t} );\n\t\tthis.addRequest = apiFetch( {\n\t\t\tpath: `/wp/v2/${ taxonomy.rest_base }`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tname: formName,\n\t\t\t\tparent: formParent ? formParent : undefined,\n\t\t\t},\n\t\t} );\n\t\t// Tries to create a term or fetch it if it already exists\n\t\tconst findOrCreatePromise = this.addRequest\n\t\t\t.catch( ( error ) => {\n\t\t\t\tconst errorCode = error.code;\n\t\t\t\tif ( errorCode === 'term_exists' ) {\n\t\t\t\t\t// search the new category created since last fetch\n\t\t\t\t\tthis.addRequest = apiFetch( {\n\t\t\t\t\t\tpath: addQueryArgs(\n\t\t\t\t\t\t\t`/wp/v2/${ taxonomy.rest_base }`,\n\t\t\t\t\t\t\t{ ...DEFAULT_QUERY, parent: formParent || 0, search: formName }\n\t\t\t\t\t\t),\n\t\t\t\t\t} );\n\t\t\t\t\treturn this.addRequest\n\t\t\t\t\t\t.then( ( searchResult ) => {\n\t\t\t\t\t\t\treturn this.findTerm( searchResult, formParent, formName );\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn Promise.reject( error );\n\t\t\t} );\n\t\tfindOrCreatePromise\n\t\t\t.then( ( term ) => {\n\t\t\t\tconst hasTerm = !! find( this.state.availableTerms, ( availableTerm ) => availableTerm.id === term.id );\n\t\t\t\tconst newAvailableTerms = hasTerm ? this.state.availableTerms : [ term, ...this.state.availableTerms ];\n\t\t\t\tconst termAddedMessage = sprintf(\n\t\t\t\t\t_x( '%s added', 'term' ),\n\t\t\t\t\tget(\n\t\t\t\t\t\tthis.props.taxonomy,\n\t\t\t\t\t\t[ 'labels', 'singular_name' ],\n\t\t\t\t\t\tslug === 'category' ? __( 'Category' ) : __( 'Term' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tthis.props.speak( termAddedMessage, 'assertive' );\n\t\t\t\tthis.addRequest = null;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tadding: false,\n\t\t\t\t\tformName: '',\n\t\t\t\t\tformParent: '',\n\t\t\t\t\tavailableTerms: newAvailableTerms,\n\t\t\t\t\tavailableTermsTree: this.sortBySelected( buildTermsTree( newAvailableTerms ) ),\n\t\t\t\t} );\n\t\t\t\tonUpdateTerms( [ ...terms, term.id ], taxonomy.rest_base );\n\t\t\t}, ( xhr ) => {\n\t\t\t\tif ( xhr.statusText === 'abort' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.addRequest = null;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tadding: false,\n\t\t\t\t} );\n\t\t\t} );\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.fetchTerms();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tinvoke( this.fetchRequest, [ 'abort' ] );\n\t\tinvoke( this.addRequest, [ 'abort' ] );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.taxonomy !== prevProps.taxonomy ) {\n\t\t\tthis.fetchTerms();\n\t\t}\n\t}\n\n\tfetchTerms() {\n\t\tconst { taxonomy } = this.props;\n\t\tif ( ! taxonomy ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.fetchRequest = apiFetch( {\n\t\t\tpath: addQueryArgs( `/wp/v2/${ taxonomy.rest_base }`, DEFAULT_QUERY ),\n\t\t} );\n\t\tthis.fetchRequest.then(\n\t\t\t( terms ) => { // resolve\n\t\t\t\tconst availableTermsTree = this.sortBySelected( buildTermsTree( terms ) );\n\n\t\t\t\tthis.fetchRequest = null;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t\tavailableTermsTree,\n\t\t\t\t\tavailableTerms: terms,\n\t\t\t\t} );\n\t\t\t},\n\t\t\t( xhr ) => { // reject\n\t\t\t\tif ( xhr.statusText === 'abort' ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.fetchRequest = null;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t} );\n\t\t\t}\n\t\t);\n\t}\n\n\tsortBySelected( termsTree ) {\n\t\tconst { terms } = this.props;\n\t\tconst treeHasSelection = ( termTree ) => {\n\t\t\tif ( terms.indexOf( termTree.id ) !== -1 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( undefined === termTree.children ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tconst anyChildIsSelected = termTree.children.map( treeHasSelection ).filter( ( child ) => child ).length > 0;\n\t\t\tif ( anyChildIsSelected ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\tconst termOrChildIsSelected = ( termA, termB ) => {\n\t\t\tconst termASelected = treeHasSelection( termA );\n\t\t\tconst termBSelected = treeHasSelection( termB );\n\n\t\t\tif ( termASelected === termBSelected ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif ( termASelected && ! termBSelected ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\n\t\t\tif ( ! termASelected && termBSelected ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\treturn 0;\n\t\t};\n\t\ttermsTree.sort( termOrChildIsSelected );\n\t\treturn termsTree;\n\t}\n\n\tsetFilterValue( event ) {\n\t\tconst { availableTermsTree } = this.state;\n\t\tconst filterValue = event.target.value;\n\t\tconst filteredTermsTree = availableTermsTree.map( this.getFilterMatcher( filterValue ) ).filter( ( term ) => term );\n\t\tconst getResultCount = ( terms ) => {\n\t\t\tlet count = 0;\n\t\t\tfor ( let i = 0; i < terms.length; i++ ) {\n\t\t\t\tcount++;\n\t\t\t\tif ( undefined !== terms[ i ].children ) {\n\t\t\t\t\tcount += getResultCount( terms[ i ].children );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t};\n\t\tthis.setState(\n\t\t\t{\n\t\t\t\tfilterValue,\n\t\t\t\tfilteredTermsTree,\n\t\t\t}\n\t\t);\n\n\t\tconst resultCount = getResultCount( filteredTermsTree );\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t_n( '%d result found.', '%d results found.', resultCount ),\n\t\t\tresultCount\n\t\t);\n\t\tthis.props.debouncedSpeak( resultsFoundMessage, 'assertive' );\n\t}\n\n\tgetFilterMatcher( filterValue ) {\n\t\tconst matchTermsForFilter = ( originalTerm ) => {\n\t\t\tif ( '' === filterValue ) {\n\t\t\t\treturn originalTerm;\n\t\t\t}\n\n\t\t\t// Shallow clone, because we'll be filtering the term's children and\n\t\t\t// don't want to modify the original term.\n\t\t\tconst term = { ...originalTerm };\n\n\t\t\t// Map and filter the children, recursive so we deal with grandchildren\n\t\t\t// and any deeper levels.\n\t\t\tif ( term.children.length > 0 ) {\n\t\t\t\tterm.children = term.children.map( matchTermsForFilter ).filter( ( child ) => child );\n\t\t\t}\n\n\t\t\t// If the term's name contains the filterValue, or it has children\n\t\t\t// (i.e. some child matched at some point in the tree) then return it.\n\t\t\tif ( -1 !== term.name.toLowerCase().indexOf( filterValue ) || term.children.length > 0 ) {\n\t\t\t\treturn term;\n\t\t\t}\n\n\t\t\t// Otherwise, return false. After mapping, the list of terms will need\n\t\t\t// to have false values filtered out.\n\t\t\treturn false;\n\t\t};\n\t\treturn matchTermsForFilter;\n\t}\n\n\trenderTerms( renderedTerms ) {\n\t\tconst { terms = [] } = this.props;\n\t\treturn renderedTerms.map( ( term ) => {\n\t\t\tconst id = `editor-post-taxonomies-hierarchical-term-${ term.id }`;\n\t\t\treturn (\n\t\t\t\t<div key={ term.id } className=\"editor-post-taxonomies__hierarchical-terms-choice\">\n\t\t\t\t\t<input\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-input\"\n\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\tchecked={ terms.indexOf( term.id ) !== -1 }\n\t\t\t\t\t\tvalue={ term.id }\n\t\t\t\t\t\tonChange={ this.onChange }\n\t\t\t\t\t/>\n\t\t\t\t\t<label htmlFor={ id }>{ unescapeString( term.name ) }</label>\n\t\t\t\t\t{ !! term.children.length && (\n\t\t\t\t\t\t<div className=\"editor-post-taxonomies__hierarchical-terms-subchoices\">\n\t\t\t\t\t\t\t{ this.renderTerms( term.children ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t);\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst { slug, taxonomy, instanceId, hasCreateAction, hasAssignAction } = this.props;\n\n\t\tif ( ! hasAssignAction ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { availableTermsTree, availableTerms, filteredTermsTree, formName, formParent, loading, showForm, filterValue } = this.state;\n\t\tconst labelWithFallback = ( labelProperty, fallbackIsCategory, fallbackIsNotCategory ) => get(\n\t\t\ttaxonomy,\n\t\t\t[ 'labels', labelProperty ],\n\t\t\tslug === 'category' ? fallbackIsCategory : fallbackIsNotCategory\n\t\t);\n\t\tconst newTermButtonLabel = labelWithFallback(\n\t\t\t'add_new_item',\n\t\t\t__( 'Add new category' ),\n\t\t\t__( 'Add new term' )\n\t\t);\n\t\tconst newTermLabel = labelWithFallback(\n\t\t\t'new_item_name',\n\t\t\t__( 'Add new category' ),\n\t\t\t__( 'Add new term' )\n\t\t);\n\t\tconst parentSelectLabel = labelWithFallback(\n\t\t\t'parent_item',\n\t\t\t__( 'Parent Category' ),\n\t\t\t__( 'Parent Term' )\n\t\t);\n\t\tconst noParentOption = `— ${ parentSelectLabel } —`;\n\t\tconst newTermSubmitLabel = newTermButtonLabel;\n\t\tconst inputId = `editor-post-taxonomies__hierarchical-terms-input-${ instanceId }`;\n\t\tconst filterInputId = `editor-post-taxonomies__hierarchical-terms-filter-${ instanceId }`;\n\t\tconst filterLabel = sprintf(\n\t\t\t_x( 'Search %s', 'term' ),\n\t\t\tget(\n\t\t\t\tthis.props.taxonomy,\n\t\t\t\t[ 'name' ],\n\t\t\t\tslug === 'category' ? __( 'Categories' ) : __( 'Terms' )\n\t\t\t)\n\t\t);\n\t\tconst groupLabel = sprintf(\n\t\t\t_x( 'Available %s', 'term' ),\n\t\t\tget(\n\t\t\t\tthis.props.taxonomy,\n\t\t\t\t[ 'name' ],\n\t\t\t\tslug === 'category' ? __( 'Categories' ) : __( 'Terms' )\n\t\t\t)\n\t\t);\n\t\tconst showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;\n\n\t\treturn [\n\t\t\tshowFilter && <label\n\t\t\t\tkey=\"filter-label\"\n\t\t\t\thtmlFor={ filterInputId }>\n\t\t\t\t{ filterLabel }\n\t\t\t</label>,\n\t\t\tshowFilter && <input\n\t\t\t\ttype=\"search\"\n\t\t\t\tid={ filterInputId }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tonChange={ this.setFilterValue }\n\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-filter\"\n\t\t\t\tkey=\"term-filter-input\"\n\t\t\t/>,\n\t\t\t<div\n\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-list\"\n\t\t\t\tkey=\"term-list\"\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\trole=\"group\"\n\t\t\t\taria-label={ groupLabel }\n\t\t\t>\n\t\t\t\t{ this.renderTerms( '' !== filterValue ? filteredTermsTree : availableTermsTree ) }\n\t\t\t</div>,\n\t\t\t! loading && hasCreateAction && (\n\t\t\t\t<Button\n\t\t\t\t\tkey=\"term-add-button\"\n\t\t\t\t\tonClick={ this.onToggleForm }\n\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-add\"\n\t\t\t\t\taria-expanded={ showForm }\n\t\t\t\t\tisLink\n\t\t\t\t>\n\t\t\t\t\t{ newTermButtonLabel }\n\t\t\t\t</Button>\n\t\t\t),\n\t\t\tshowForm && (\n\t\t\t\t<form onSubmit={ this.onAddTerm } key=\"hierarchical-terms-form\">\n\t\t\t\t\t<label\n\t\t\t\t\t\thtmlFor={ inputId }\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-label\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ newTermLabel }\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tid={ inputId }\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-input\"\n\t\t\t\t\t\tvalue={ formName }\n\t\t\t\t\t\tonChange={ this.onChangeFormName }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t{ !! availableTerms.length &&\n\t\t\t\t\t\t<TreeSelect\n\t\t\t\t\t\t\tlabel={ parentSelectLabel }\n\t\t\t\t\t\t\tnoOptionLabel={ noParentOption }\n\t\t\t\t\t\t\tonChange={ this.onChangeFormParent }\n\t\t\t\t\t\t\tselectedId={ formParent }\n\t\t\t\t\t\t\ttree={ availableTermsTree }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\t<Button\n\t\t\t\t\t\tisDefault\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-submit\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ newTermSubmitLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</form>\n\t\t\t),\n\t\t];\n\t\t/* eslint-enable jsx-a11y/no-onchange */\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { slug } ) => {\n\t\tconst { getCurrentPost } = select( 'core/editor' );\n\t\tconst { getTaxonomy } = select( 'core' );\n\t\tconst taxonomy = getTaxonomy( slug );\n\t\treturn {\n\t\t\thasCreateAction: taxonomy ? get( getCurrentPost(), [ '_links', 'wp:action-create-' + taxonomy.rest_base ], false ) : false,\n\t\t\thasAssignAction: taxonomy ? get( getCurrentPost(), [ '_links', 'wp:action-assign-' + taxonomy.rest_base ], false ) : false,\n\t\t\tterms: taxonomy ? select( 'core/editor' ).getEditedPostAttribute( taxonomy.rest_base ) : [],\n\t\t\ttaxonomy,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\tonUpdateTerms( terms, restBase ) {\n\t\t\tdispatch( 'core/editor' ).editPost( { [ restBase ]: terms } );\n\t\t},\n\t} ) ),\n\twithSpokenMessages,\n\twithInstanceId,\n\twithFilters( 'editor.PostTaxonomyType' ),\n] )( HierarchicalTermSelector );\n","/**\n * External Dependencies\n */\nimport { filter, identity, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from './hierarchical-term-selector';\nimport FlatTermSelector from './flat-term-selector';\n\nexport function PostTaxonomies( { postType, taxonomies, taxonomyWrapper = identity } ) {\n\tconst availableTaxonomies = filter( taxonomies, ( taxonomy ) => includes( taxonomy.types, postType ) );\n\tconst visibleTaxonomies = filter( availableTaxonomies, ( taxonomy ) => taxonomy.visibility.show_ui );\n\treturn visibleTaxonomies.map( ( taxonomy ) => {\n\t\tconst TaxonomyComponent = taxonomy.hierarchical ? HierarchicalTermSelector : FlatTermSelector;\n\t\treturn (\n\t\t\t<Fragment key={ `taxonomy-${ taxonomy.slug }` }>\n\t\t\t\t{\n\t\t\t\t\ttaxonomyWrapper(\n\t\t\t\t\t\t<TaxonomyComponent slug={ taxonomy.slug } />,\n\t\t\t\t\t\ttaxonomy\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Fragment>\n\t\t);\n\t} );\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( 'core/editor' ).getCurrentPostType(),\n\t\t\ttaxonomies: select( 'core' ).getTaxonomies( { per_page: -1 } ),\n\t\t};\n\t} ),\n] )( PostTaxonomies );\n\n","/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, Fragment } from '@wordpress/element';\nimport { parse } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { withInstanceId, compose } from '@wordpress/compose';\n\nexport class PostTextEditor extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.edit = this.edit.bind( this );\n\t\tthis.stopEditing = this.stopEditing.bind( this );\n\n\t\tthis.state = {};\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\tif ( state.isDirty ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn {\n\t\t\tvalue: props.value,\n\t\t\tisDirty: false,\n\t\t};\n\t}\n\n\t/**\n\t * Handles a textarea change event to notify the onChange prop callback and\n\t * reflect the new value in the component's own state. This marks the start\n\t * of the user's edits, if not already changed, preventing future props\n\t * changes to value from replacing the rendered value. This is expected to\n\t * be followed by a reset to dirty state via `stopEditing`.\n\t *\n\t * @see stopEditing\n\t *\n\t * @param {Event} event Change event.\n\t */\n\tedit( event ) {\n\t\tconst value = event.target.value;\n\t\tthis.props.onChange( value );\n\t\tthis.setState( { value, isDirty: true } );\n\t}\n\n\t/**\n\t * Function called when the user has completed their edits, responsible for\n\t * ensuring that changes, if made, are surfaced to the onPersist prop\n\t * callback and resetting dirty state.\n\t */\n\tstopEditing() {\n\t\tif ( this.state.isDirty ) {\n\t\t\tthis.props.onPersist( this.state.value );\n\t\t\tthis.setState( { isDirty: false } );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { value } = this.state;\n\t\tconst { instanceId } = this.props;\n\n\t\treturn (\n\t\t\t<Fragment>\n\t\t\t\t<label htmlFor={ `post-content-${ instanceId }` } className=\"screen-reader-text\">\n\t\t\t\t\t{ __( 'Type text or HTML' ) }\n\t\t\t\t</label>\n\t\t\t\t<Textarea\n\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\tdir=\"auto\"\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ this.edit }\n\t\t\t\t\tonBlur={ this.stopEditing }\n\t\t\t\t\tclassName=\"editor-post-text-editor\"\n\t\t\t\t\tid={ `post-content-${ instanceId }` }\n\t\t\t\t\tplaceholder={ __( 'Start writing with text or HTML' ) }\n\t\t\t\t/>\n\t\t\t</Fragment>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getEditedPostContent } = select( 'core/editor' );\n\t\treturn {\n\t\t\tvalue: getEditedPostContent(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, resetBlocks } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonChange( content ) {\n\t\t\t\teditPost( { content } );\n\t\t\t},\n\t\t\tonPersist( content ) {\n\t\t\t\tresetBlocks( parse( content ) );\n\t\t\t},\n\t\t};\n\t} ),\n\twithInstanceId,\n] )( PostTextEditor );\n","/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\nimport classnames from 'classnames';\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { ENTER } from '@wordpress/keycodes';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { KeyboardShortcuts, withFocusOutside } from '@wordpress/components';\nimport { withInstanceId, compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostPermalink from '../post-permalink';\nimport PostTypeSupportCheck from '../post-type-support-check';\n\n/**\n * Constants\n */\nconst REGEXP_NEWLINES = /[\\r\\n]+/g;\n\nclass PostTitle extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onSelect = this.onSelect.bind( this );\n\t\tthis.onUnselect = this.onUnselect.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.redirectHistory = this.redirectHistory.bind( this );\n\n\t\tthis.state = {\n\t\t\tisSelected: false,\n\t\t};\n\t}\n\n\thandleFocusOutside() {\n\t\tthis.onUnselect();\n\t}\n\n\tonSelect() {\n\t\tthis.setState( { isSelected: true } );\n\t\tthis.props.clearSelectedBlock();\n\t}\n\n\tonUnselect() {\n\t\tthis.setState( { isSelected: false } );\n\t}\n\n\tonChange( event ) {\n\t\tconst newTitle = event.target.value.replace( REGEXP_NEWLINES, ' ' );\n\t\tthis.props.onUpdate( newTitle );\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.props.onEnterPress();\n\t\t}\n\t}\n\n\t/**\n\t * Emulates behavior of an undo or redo on its corresponding key press\n\t * combination. This is a workaround to React's treatment of undo in a\n\t * controlled textarea where characters are updated one at a time.\n\t * Instead, leverage the store's undo handling of title changes.\n\t *\n\t * @see https://github.com/facebook/react/issues/8514\n\t *\n\t * @param {KeyboardEvent} event Key event.\n\t */\n\tredirectHistory( event ) {\n\t\tif ( event.shiftKey ) {\n\t\t\tthis.props.onRedo();\n\t\t} else {\n\t\t\tthis.props.onUndo();\n\t\t}\n\n\t\tevent.preventDefault();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasFixedToolbar,\n\t\t\tisCleanNewPost,\n\t\t\tisFocusMode,\n\t\t\tisPostTypeViewable,\n\t\t\tinstanceId,\n\t\t\tplaceholder,\n\t\t\ttitle,\n\t\t} = this.props;\n\t\tconst { isSelected } = this.state;\n\n\t\t// The wp-block className is important for editor styles.\n\t\tconst className = classnames( 'wp-block editor-post-title__block', {\n\t\t\t'is-selected': isSelected,\n\t\t\t'is-focus-mode': isFocusMode,\n\t\t\t'has-fixed-toolbar': hasFixedToolbar,\n\t\t} );\n\t\tconst decodedPlaceholder = decodeEntities( placeholder );\n\n\t\treturn (\n\t\t\t<PostTypeSupportCheck supportKeys=\"title\">\n\t\t\t\t<div className=\"editor-post-title\">\n\t\t\t\t\t<div className={ className }>\n\t\t\t\t\t\t<KeyboardShortcuts\n\t\t\t\t\t\t\tshortcuts={ {\n\t\t\t\t\t\t\t\t'mod+z': this.redirectHistory,\n\t\t\t\t\t\t\t\t'mod+shift+z': this.redirectHistory,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<label htmlFor={ `post-title-${ instanceId }` } className=\"screen-reader-text\">\n\t\t\t\t\t\t\t\t{ decodedPlaceholder || __( 'Add title' ) }\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\tid={ `post-title-${ instanceId }` }\n\t\t\t\t\t\t\t\tclassName=\"editor-post-title__input\"\n\t\t\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\t\t\tonChange={ this.onChange }\n\t\t\t\t\t\t\t\tplaceholder={ decodedPlaceholder || __( 'Add title' ) }\n\t\t\t\t\t\t\t\tonFocus={ this.onSelect }\n\t\t\t\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\t\t\t\tonKeyPress={ this.onUnselect }\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tOnly autofocus the title when the post is entirely empty.\n\t\t\t\t\t\t\t\t\tThis should only happen for a new post, which means we\n\t\t\t\t\t\t\t\t\tfocus the title on new post so the author can start typing\n\t\t\t\t\t\t\t\t\tright away, without needing to click anything.\n\t\t\t\t\t\t\t\t*/\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\t\t\t\t\t\t\tautoFocus={ isCleanNewPost }\n\t\t\t\t\t\t\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</KeyboardShortcuts>\n\t\t\t\t\t\t{ isSelected && isPostTypeViewable && <PostPermalink /> }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</PostTypeSupportCheck>\n\t\t);\n\t}\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getEditedPostAttribute, getEditorSettings, isCleanNewPost } = select( 'core/editor' );\n\tconst { getPostType } = select( 'core' );\n\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\tconst { titlePlaceholder, focusMode, hasFixedToolbar } = getEditorSettings();\n\n\treturn {\n\t\tisCleanNewPost: isCleanNewPost(),\n\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\tisPostTypeViewable: get( postType, [ 'viewable' ], false ),\n\t\tplaceholder: titlePlaceholder,\n\t\tisFocusMode: focusMode,\n\t\thasFixedToolbar,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch ) => {\n\tconst {\n\t\tinsertDefaultBlock,\n\t\teditPost,\n\t\tclearSelectedBlock,\n\t\tundo,\n\t\tredo,\n\t} = dispatch( 'core/editor' );\n\n\treturn {\n\t\tonEnterPress() {\n\t\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t\t},\n\t\tonUpdate( title ) {\n\t\t\teditPost( { title } );\n\t\t},\n\t\tonUndo: undo,\n\t\tonRedo: redo,\n\t\tclearSelectedBlock,\n\t};\n} );\n\nexport default compose(\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithInstanceId,\n\twithFocusOutside\n)( PostTitle );\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\nfunction PostTrashCheck( { isNew, postId, children } ) {\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { isEditedPostNew, getCurrentPostId } = select( 'core/editor' );\n\treturn {\n\t\tisNew: isEditedPostNew(),\n\t\tpostId: getCurrentPostId(),\n\t};\n} )( PostTrashCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nfunction PostTrash( { isNew, postId, postType, ...props } ) {\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\tconst onClick = () => props.trashPost( postId, postType );\n\n\treturn (\n\t\t<Button className=\"editor-post-trash button-link-delete\" onClick={ onClick } isDefault isLarge>\n\t\t\t{ __( 'Move to trash' ) }\n\t\t</Button>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostNew,\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tisNew: isEditedPostNew(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => ( {\n\t\ttrashPost: dispatch( 'core/editor' ).trashPost,\n\t} ) ),\n] )( PostTrash );\n","/**\n * External dependencies\n */\nimport { some, castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * A component which renders its own children only if the current editor post\n * type supports one of the given `supportKeys` prop.\n *\n * @param {?Object} props.postType Current post type.\n * @param {WPElement} props.children Children to be rendered if post\n * type supports.\n * @param {(string|string[])} props.supportKeys String or string array of keys\n * to test.\n *\n * @return {WPElement} Rendered element.\n */\nexport function PostTypeSupportCheck( { postType, children, supportKeys } ) {\n\tlet isSupported = true;\n\tif ( postType ) {\n\t\tisSupported = some(\n\t\t\tcastArray( supportKeys ),\n\t\t\t( key ) => !! postType.supports[ key ]\n\t\t);\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\tconst { getPostType } = select( 'core' );\n\treturn {\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t};\n} )( PostTypeSupportCheck );\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\nexport function PostVisibilityCheck( { hasPublishAction, render } ) {\n\tconst canEdit = hasPublishAction;\n\treturn render( { canEdit } );\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getCurrentPost, getCurrentPostType } = select( 'core/editor' );\n\t\treturn {\n\t\t\thasPublishAction: get( getCurrentPost(), [ '_links', 'wp:action-publish' ], false ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t} ),\n] )( PostVisibilityCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { withInstanceId, compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal Dependencies\n */\nimport { visibilityOptions } from './utils';\n\nexport class PostVisibility extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.setPublic = this.setPublic.bind( this );\n\t\tthis.setPrivate = this.setPrivate.bind( this );\n\t\tthis.setPasswordProtected = this.setPasswordProtected.bind( this );\n\t\tthis.updatePassword = this.updatePassword.bind( this );\n\n\t\tthis.state = {\n\t\t\thasPassword: !! props.password,\n\t\t};\n\t}\n\n\tsetPublic() {\n\t\tconst { visibility, onUpdateVisibility, status } = this.props;\n\n\t\tonUpdateVisibility( visibility === 'private' ? 'draft' : status );\n\t\tthis.setState( { hasPassword: false } );\n\t}\n\n\tsetPrivate() {\n\t\tif ( ! window.confirm( __( 'Would you like to privately publish this post now?' ) ) ) { // eslint-disable-line no-alert\n\t\t\treturn;\n\t\t}\n\n\t\tconst { onUpdateVisibility, onSave } = this.props;\n\n\t\tonUpdateVisibility( 'private' );\n\t\tthis.setState( { hasPassword: false } );\n\t\tonSave();\n\t}\n\n\tsetPasswordProtected() {\n\t\tconst { visibility, onUpdateVisibility, status, password } = this.props;\n\n\t\tonUpdateVisibility( visibility === 'private' ? 'draft' : status, password || '' );\n\t\tthis.setState( { hasPassword: true } );\n\t}\n\n\tupdatePassword( event ) {\n\t\tconst { status, onUpdateVisibility } = this.props;\n\t\tonUpdateVisibility( status, event.target.value );\n\t}\n\n\trender() {\n\t\tconst { visibility, password, instanceId } = this.props;\n\n\t\tconst visibilityHandlers = {\n\t\t\tpublic: {\n\t\t\t\tonSelect: this.setPublic,\n\t\t\t\tchecked: visibility === 'public' && ! this.state.hasPassword,\n\t\t\t},\n\t\t\tprivate: {\n\t\t\t\tonSelect: this.setPrivate,\n\t\t\t\tchecked: visibility === 'private',\n\t\t\t},\n\t\t\tpassword: {\n\t\t\t\tonSelect: this.setPasswordProtected,\n\t\t\t\tchecked: this.state.hasPassword,\n\t\t\t},\n\t\t};\n\n\t\treturn [\n\t\t\t<fieldset key=\"visibility-selector\" className=\"editor-post-visibility__dialog-fieldset\">\n\t\t\t\t<legend className=\"editor-post-visibility__dialog-legend\">\n\t\t\t\t\t{ __( 'Post Visibility' ) }\n\t\t\t\t</legend>\n\t\t\t\t{ visibilityOptions.map( ( { value, label, info } ) => (\n\t\t\t\t\t<div key={ value } className=\"editor-post-visibility__choice\">\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ `editor-post-visibility__setting-${ instanceId }` }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ visibilityHandlers[ value ].onSelect }\n\t\t\t\t\t\t\tchecked={ visibilityHandlers[ value ].checked }\n\t\t\t\t\t\t\tid={ `editor-post-${ value }-${ instanceId }` }\n\t\t\t\t\t\t\taria-describedby={ `editor-post-${ value }-${ instanceId }-description` }\n\t\t\t\t\t\t\tclassName=\"editor-post-visibility__dialog-radio\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\thtmlFor={ `editor-post-${ value }-${ instanceId }` }\n\t\t\t\t\t\t\tclassName=\"editor-post-visibility__dialog-label\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t{ <p id={ `editor-post-${ value }-${ instanceId }-description` } className=\"editor-post-visibility__dialog-info\">{ info }</p> }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</fieldset>,\n\t\t\tthis.state.hasPassword && (\n\t\t\t\t<div className=\"editor-post-visibility__dialog-password\" key=\"password-selector\">\n\t\t\t\t\t<label\n\t\t\t\t\t\thtmlFor={ `editor-post-visibility__dialog-password-input-${ instanceId }` }\n\t\t\t\t\t\tclassName=\"screen-reader-text\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create password' ) }\n\t\t\t\t\t</label>\n\t\t\t\t\t<input\n\t\t\t\t\t\tclassName=\"editor-post-visibility__dialog-password-input\"\n\t\t\t\t\t\tid={ `editor-post-visibility__dialog-password-input-${ instanceId }` }\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tonChange={ this.updatePassword }\n\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\tplaceholder={ __( 'Use a secure password' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t),\n\t\t];\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetEditedPostVisibility,\n\t\t} = select( 'core/editor' );\n\t\treturn {\n\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\tvisibility: getEditedPostVisibility(),\n\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { savePost, editPost } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonSave: savePost,\n\t\t\tonUpdateVisibility( status, password = null ) {\n\t\t\t\teditPost( { status, password } );\n\t\t\t},\n\t\t};\n\t} ),\n\twithInstanceId,\n] )( PostVisibility );\n","/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal Dependencies\n */\nimport { visibilityOptions } from './utils';\n\nfunction PostVisibilityLabel( { visibility } ) {\n\tconst getVisibilityLabel = () => find( visibilityOptions, { value: visibility } ).label;\n\n\treturn getVisibilityLabel( visibility );\n}\n\nexport default withSelect( ( select ) => ( {\n\tvisibility: select( 'core/editor' ).getEditedPostVisibility(),\n} ) )( PostVisibilityLabel );\n","/**\n * WordPress Dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const visibilityOptions = [\n\t{\n\t\tvalue: 'public',\n\t\tlabel: __( 'Public' ),\n\t\tinfo: __( 'Visible to everyone.' ),\n\t},\n\t{\n\t\tvalue: 'private',\n\t\tlabel: __( 'Private' ),\n\t\tinfo: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tvalue: 'password',\n\t\tlabel: __( 'Password Protected' ),\n\t\tinfo: __( 'Protected with a password you choose. Only those with the password can view this post.' ),\n\t},\n];\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { getBlockDOMNode } from '../../utils/dom';\n\n/**\n * Non-visual component which preserves offset of selected block within nearest\n * scrollable container while reordering.\n *\n * @example\n *\n * ```jsx\n * <PreserveScrollInReorder />\n * ```\n */\nclass PreserveScrollInReorder extends Component {\n\tgetSnapshotBeforeUpdate( prevProps ) {\n\t\tconst { blockOrder, selectionStart } = this.props;\n\t\tif ( blockOrder !== prevProps.blockOrder && selectionStart ) {\n\t\t\treturn this.getOffset( selectionStart );\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState, snapshot ) {\n\t\tif ( snapshot ) {\n\t\t\tthis.restorePreviousOffset( snapshot );\n\t\t}\n\t}\n\n\t/**\n\t * Given the block client ID of the start of the selection, saves the\n\t * block's top offset as an instance property before a reorder is to occur.\n\t *\n\t * @param {string} selectionStart Client ID of selected block.\n\t *\n\t * @return {number?} The scroll offset.\n\t */\n\tgetOffset( selectionStart ) {\n\t\tconst blockNode = getBlockDOMNode( selectionStart );\n\t\tif ( ! blockNode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn blockNode.getBoundingClientRect().top;\n\t}\n\n\t/**\n\t * After a block reordering, restores the previous viewport top offset.\n\t *\n\t * @param {number} offset The scroll offset.\n\t */\n\trestorePreviousOffset( offset ) {\n\t\tconst { selectionStart } = this.props;\n\t\tconst blockNode = getBlockDOMNode( selectionStart );\n\t\tif ( blockNode ) {\n\t\t\tconst scrollContainer = getScrollContainer( blockNode );\n\t\t\tif ( scrollContainer ) {\n\t\t\t\tscrollContainer.scrollTop = scrollContainer.scrollTop +\n\t\t\t\t\tblockNode.getBoundingClientRect().top - offset;\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tblockOrder: select( 'core/editor' ).getBlockOrder(),\n\t\tselectionStart: select( 'core/editor' ).getBlockSelectionStart(),\n\t};\n} )( PreserveScrollInReorder );\n","/**\n * External dependencies\n */\nimport { flow, map } from 'lodash';\n\n/**\n * WordPress Dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { createElement, Component } from '@wordpress/element';\nimport { DropZoneProvider, SlotFillProvider } from '@wordpress/components';\nimport { withDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { traverse, wrap, urlRewrite } from '../../editor-styles';\n\nclass EditorProvider extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\t// Assume that we don't need to initialize in the case of an error recovery.\n\t\tif ( props.recovery ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprops.updateEditorSettings( props.settings );\n\t\tprops.updatePostLock( props.settings.postLock );\n\t\tprops.setupEditor( props.post, props.initialEdits );\n\n\t\tif ( props.settings.autosave ) {\n\t\t\tprops.createWarningNotice(\n\t\t\t\t__( 'There is an autosave of this post that is more recent than the version below.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'autosave-exists',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'View the autosave' ),\n\t\t\t\t\t\t\turl: props.settings.autosave.editLink,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.settings.styles ) {\n\t\t\treturn;\n\t\t}\n\n\t\tmap( this.props.settings.styles, ( { css, baseURL } ) => {\n\t\t\tconst transforms = [\n\t\t\t\twrap( '.editor-styles-wrapper' ),\n\t\t\t];\n\t\t\tif ( baseURL ) {\n\t\t\t\ttransforms.push( urlRewrite( baseURL ) );\n\t\t\t}\n\t\t\tconst updatedCSS = traverse( css, compose( transforms ) );\n\t\t\tif ( updatedCSS ) {\n\t\t\t\tconst node = document.createElement( 'style' );\n\t\t\t\tnode.innerHTML = updatedCSS;\n\t\t\t\tdocument.body.appendChild( node );\n\t\t\t}\n\t\t} );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.settings !== prevProps.settings ) {\n\t\t\tthis.props.updateEditorSettings( this.props.settings );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t} = this.props;\n\n\t\tconst providers = [\n\t\t\t// Slot / Fill provider:\n\t\t\t//\n\t\t\t// - context.getSlot\n\t\t\t// - context.registerSlot\n\t\t\t// - context.unregisterSlot\n\t\t\t[\n\t\t\t\tSlotFillProvider,\n\t\t\t],\n\n\t\t\t// DropZone provider:\n\t\t\t[\n\t\t\t\tDropZoneProvider,\n\t\t\t],\n\t\t];\n\n\t\tconst createEditorElement = flow(\n\t\t\tproviders.map( ( [ Provider, props ] ) => (\n\t\t\t\t( arg ) => createElement( Provider, props, arg )\n\t\t\t) )\n\t\t);\n\n\t\treturn createEditorElement( children );\n\t}\n}\n\nexport default withDispatch( ( dispatch ) => {\n\tconst {\n\t\tsetupEditor,\n\t\tupdateEditorSettings,\n\t\tupdatePostLock,\n\t} = dispatch( 'core/editor' );\n\tconst { createWarningNotice } = dispatch( 'core/notices' );\n\n\treturn {\n\t\tsetupEditor,\n\t\tupdateEditorSettings,\n\t\tupdatePostLock,\n\t\tcreateWarningNotice,\n\t};\n} )( EditorProvider );\n","/**\n * External dependencies\n */\n\nimport {\n\tdifference,\n\tisEqual,\n\tisNil,\n\tkeys,\n\tpickBy,\n\tstartsWith,\n} from 'lodash';\n\nconst isAriaPropName = ( name ) =>\n\tstartsWith( name, 'aria-' );\n\nexport const pickAriaProps = ( props ) =>\n\tpickBy( props, ( value, key ) => isAriaPropName( key ) && ! isNil( value ) );\n\nexport const diffAriaProps = ( props, nextProps ) => {\n\tconst prevAriaKeys = keys( pickAriaProps( props ) );\n\tconst nextAriaKeys = keys( pickAriaProps( nextProps ) );\n\tconst removedKeys = difference( prevAriaKeys, nextAriaKeys );\n\tconst updatedKeys = nextAriaKeys.filter( ( key ) =>\n\t\t! isEqual( props[ key ], nextProps[ key ] ) );\n\treturn { removedKeys, updatedKeys };\n};\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { Fragment } from '@wordpress/element';\nimport { getActiveFormat } from '@wordpress/rich-text';\n\nconst FormatEdit = ( { formatTypes, onChange, value } ) => {\n\treturn (\n\t\t<Fragment>\n\t\t\t{ formatTypes.map( ( { name, edit: Edit } ) => {\n\t\t\t\tif ( ! Edit ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst activeFormat = getActiveFormat( value, name );\n\t\t\t\tconst isActive = activeFormat !== undefined;\n\t\t\t\tconst activeAttributes = isActive ? activeFormat.attributes || {} : {};\n\n\t\t\t\treturn (\n\t\t\t\t\t<Edit\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\t\tactiveAttributes={ activeAttributes }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Fragment>\n\t);\n};\n\nexport default withSelect(\n\t( select ) => {\n\t\tconst { getFormatTypes } = select( 'core/rich-text' );\n\n\t\treturn {\n\t\t\tformatTypes: getFormatTypes(),\n\t\t};\n\t}\n)( FormatEdit );\n","/**\n * WordPress dependencies\n */\n\nimport { Toolbar, Slot } from '@wordpress/components';\n\nconst FormatToolbar = ( { controls } ) => {\n\treturn (\n\t\t<div className=\"editor-format-toolbar\">\n\t\t\t<Toolbar>\n\t\t\t\t{ controls.map( ( format ) =>\n\t\t\t\t\t<Slot name={ `RichText.ToolbarControls.${ format }` } key={ format } />\n\t\t\t\t) }\n\t\t\t\t<Slot name=\"RichText.ToolbarControls\" />\n\t\t\t</Toolbar>\n\t\t</div>\n\t);\n};\n\nexport default FormatToolbar;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport {\n\tfind,\n\tisNil,\n\tisEqual,\n\tomit,\n\tpickBy,\n\tget,\n\tisPlainObject,\n} from 'lodash';\nimport memize from 'memize';\n\n/**\n * WordPress dependencies\n */\nimport { Component, Fragment, RawHTML } from '@wordpress/element';\nimport { isHorizontalEdge } from '@wordpress/dom';\nimport { createBlobURL } from '@wordpress/blob';\nimport { BACKSPACE, DELETE, ENTER } from '@wordpress/keycodes';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { pasteHandler, children, getBlockTransforms, findTransform } from '@wordpress/blocks';\nimport { withInstanceId, withSafeTimeout, compose } from '@wordpress/compose';\nimport { isURL } from '@wordpress/url';\nimport {\n\tisEmpty,\n\tcreate,\n\tapply,\n\tapplyFormat,\n\tsplit,\n\ttoHTMLString,\n\tgetTextContent,\n\tinsert,\n\tinsertLineSeparator,\n\tisEmptyLine,\n\tunstableToDom,\n\tgetSelectionStart,\n\tgetSelectionEnd,\n\tremove,\n\tremoveFormat,\n\tisCollapsed,\n\tLINE_SEPARATOR,\n\tcharAt,\n} from '@wordpress/rich-text';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { withFilters, IsolatedEventContainer } from '@wordpress/components';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Autocomplete from '../autocomplete';\nimport BlockFormatControls from '../block-format-controls';\nimport FormatEdit from './format-edit';\nimport FormatToolbar from './format-toolbar';\nimport TinyMCE, { TINYMCE_ZWSP } from './tinymce';\nimport { pickAriaProps } from './aria';\nimport { getPatterns } from './patterns';\nimport { withBlockEditContext } from '../block-edit/context';\nimport { ListEdit } from './list-edit';\nimport { RemoveBrowserShortcuts } from './remove-browser-shortcuts';\n\n/**\n * Browser dependencies\n */\n\nconst { getSelection } = window;\n\nexport class RichText extends Component {\n\tconstructor( { value, onReplace, multiline } ) {\n\t\tsuper( ...arguments );\n\n\t\tif ( multiline === true || multiline === 'p' || multiline === 'li' ) {\n\t\t\tthis.multilineTag = multiline === true ? 'p' : multiline;\n\t\t}\n\n\t\tif ( this.multilineTag === 'li' ) {\n\t\t\tthis.multilineWrapperTags = [ 'ul', 'ol' ];\n\t\t}\n\n\t\tif ( this.props.onSplit ) {\n\t\t\tthis.onSplit = this.props.onSplit;\n\n\t\t\tdeprecated( 'wp.editor.RichText onSplit prop', {\n\t\t\t\tplugin: 'Gutenberg',\n\t\t\t\talternative: 'wp.editor.RichText unstableOnSplit prop',\n\t\t\t} );\n\t\t} else if ( this.props.unstableOnSplit ) {\n\t\t\tthis.onSplit = this.props.unstableOnSplit;\n\t\t}\n\n\t\tthis.onSetup = this.onSetup.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onDeleteKeyDown = this.onDeleteKeyDown.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.onPaste = this.onPaste.bind( this );\n\t\tthis.onCreateUndoLevel = this.onCreateUndoLevel.bind( this );\n\t\tthis.setFocusedElement = this.setFocusedElement.bind( this );\n\t\tthis.onInput = this.onInput.bind( this );\n\t\tthis.onCompositionEnd = this.onCompositionEnd.bind( this );\n\t\tthis.onSelectionChange = this.onSelectionChange.bind( this );\n\t\tthis.getRecord = this.getRecord.bind( this );\n\t\tthis.createRecord = this.createRecord.bind( this );\n\t\tthis.applyRecord = this.applyRecord.bind( this );\n\t\tthis.isEmpty = this.isEmpty.bind( this );\n\t\tthis.valueToFormat = this.valueToFormat.bind( this );\n\t\tthis.setRef = this.setRef.bind( this );\n\t\tthis.isActive = this.isActive.bind( this );\n\n\t\tthis.formatToValue = memize( this.formatToValue.bind( this ), { size: 1 } );\n\n\t\tthis.savedContent = value;\n\t\tthis.patterns = getPatterns( {\n\t\t\tonReplace,\n\t\t\tonCreateUndoLevel: this.onCreateUndoLevel,\n\t\t\tvalueToFormat: this.valueToFormat,\n\t\t\tonChange: this.onChange,\n\t\t} );\n\t\tthis.enterPatterns = getBlockTransforms( 'from' )\n\t\t\t.filter( ( { type } ) => type === 'enter' );\n\n\t\tthis.state = {};\n\n\t\tthis.usedDeprecatedChildrenSource = Array.isArray( value );\n\t\tthis.lastHistoryValue = value;\n\t}\n\n\tcomponentDidMount() {\n\t\tdocument.addEventListener( 'selectionchange', this.onSelectionChange );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdocument.removeEventListener( 'selectionchange', this.onSelectionChange );\n\t}\n\n\tsetRef( node ) {\n\t\tthis.editableRef = node;\n\t}\n\n\tisActive() {\n\t\treturn this.editableRef === document.activeElement;\n\t}\n\n\t/**\n\t * Handles the onSetup event for the TinyMCE component.\n\t *\n\t * Will setup event handlers for the TinyMCE instance.\n\t * An `onSetup` function in the props will be called if it is present.\n\t *\n\t * @param {tinymce} editor The editor instance as passed by TinyMCE.\n\t */\n\tonSetup( editor ) {\n\t\tthis.editor = editor;\n\t}\n\n\tsetFocusedElement() {\n\t\tif ( this.props.setFocusedElement ) {\n\t\t\tthis.props.setFocusedElement( this.props.instanceId );\n\t\t}\n\t}\n\n\t/**\n\t * Get the current record (value and selection) from props and state.\n\t *\n\t * @return {Object} The current record (value and selection).\n\t */\n\tgetRecord() {\n\t\tconst { formats, text } = this.formatToValue( this.props.value );\n\t\tconst { start, end } = this.state;\n\n\t\treturn { formats, text, start, end };\n\t}\n\n\tcreateRecord() {\n\t\tconst range = getSelection().getRangeAt( 0 );\n\n\t\treturn create( {\n\t\t\telement: this.editableRef,\n\t\t\trange,\n\t\t\tmultilineTag: this.multilineTag,\n\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\tremoveNode: ( node ) => node.getAttribute( 'data-mce-bogus' ) === 'all',\n\t\t\tunwrapNode: ( node ) => !! node.getAttribute( 'data-mce-bogus' ),\n\t\t\tremoveAttribute: ( attribute ) => attribute.indexOf( 'data-mce-' ) === 0,\n\t\t\tfilterString: ( string ) => string.replace( TINYMCE_ZWSP, '' ),\n\t\t\tprepareEditableTree: this.props.prepareEditableTree,\n\t\t} );\n\t}\n\n\tapplyRecord( record ) {\n\t\tapply( {\n\t\t\tvalue: record,\n\t\t\tcurrent: this.editableRef,\n\t\t\tmultilineTag: this.multilineTag,\n\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\tcreateLinePadding( doc ) {\n\t\t\t\tconst element = doc.createElement( 'br' );\n\t\t\t\telement.setAttribute( 'data-mce-bogus', '1' );\n\t\t\t\treturn element;\n\t\t\t},\n\t\t\tprepareEditableTree: this.props.prepareEditableTree,\n\t\t} );\n\t}\n\n\tisEmpty() {\n\t\treturn isEmpty( this.formatToValue( this.props.value ) );\n\t}\n\n\t/**\n\t * Handles a paste event.\n\t *\n\t * Saves the pasted data as plain text in `pastedPlainText`.\n\t *\n\t * @param {PasteEvent} event The paste event.\n\t */\n\tonPaste( event ) {\n\t\tconst clipboardData = event.clipboardData;\n\t\tlet { items, files } = clipboardData;\n\n\t\t// In Edge these properties can be null instead of undefined, so a more\n\t\t// rigorous test is required over using default values.\n\t\titems = isNil( items ) ? [] : items;\n\t\tfiles = isNil( files ) ? [] : files;\n\n\t\tconst item = find( [ ...items, ...files ], ( { type } ) => /^image\\/(?:jpe?g|png|gif)$/.test( type ) );\n\t\tlet plainText = '';\n\t\tlet html = '';\n\n\t\t// IE11 only supports `Text` as an argument for `getData` and will\n\t\t// otherwise throw an invalid argument error, so we try the standard\n\t\t// arguments first, then fallback to `Text` if they fail.\n\t\ttry {\n\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t} catch ( error1 ) {\n\t\t\ttry {\n\t\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t\t} catch ( error2 ) {\n\t\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t\t// behaviour.\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\t// Allows us to ask for this information when we get a report.\n\t\twindow.console.log( 'Received HTML:\\n\\n', html );\n\t\twindow.console.log( 'Received plain text:\\n\\n', plainText );\n\n\t\t// Only process file if no HTML is present.\n\t\t// Note: a pasted file may have the URL as plain text.\n\t\tif ( item && ! html ) {\n\t\t\tconst file = item.getAsFile ? item.getAsFile() : item;\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: `<img src=\"${ createBlobURL( file ) }\">`,\n\t\t\t\tmode: 'BLOCKS',\n\t\t\t\ttagName: this.props.tagName,\n\t\t\t} );\n\t\t\tconst shouldReplace = this.props.onReplace && this.isEmpty();\n\n\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\twindow.console.log( 'Received item:\\n\\n', file );\n\n\t\t\tif ( shouldReplace ) {\n\t\t\t\tthis.props.onReplace( content );\n\t\t\t} else if ( this.onSplit ) {\n\t\t\t\tthis.splitContent( content );\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst record = this.getRecord();\n\n\t\t// There is a selection, check if a URL is pasted.\n\t\tif ( ! isCollapsed( record ) ) {\n\t\t\tconst pastedText = ( html || plainText ).replace( /<[^>]+>/g, '' ).trim();\n\n\t\t\t// A URL was pasted, turn the selection into a link\n\t\t\tif ( isURL( pastedText ) ) {\n\t\t\t\tthis.onChange( applyFormat( record, {\n\t\t\t\t\ttype: 'a',\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\thref: decodeEntities( pastedText ),\n\t\t\t\t\t},\n\t\t\t\t} ) );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\twindow.console.log( 'Created link:\\n\\n', pastedText );\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tconst shouldReplace = this.props.onReplace && this.isEmpty();\n\n\t\tlet mode = 'INLINE';\n\n\t\tif ( shouldReplace ) {\n\t\t\tmode = 'BLOCKS';\n\t\t} else if ( this.onSplit ) {\n\t\t\tmode = 'AUTO';\n\t\t}\n\n\t\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t\tmode,\n\t\t\ttagName: this.props.tagName,\n\t\t\tcanUserUseUnfilteredHTML: this.props.canUserUseUnfilteredHTML,\n\t\t} );\n\n\t\tif ( typeof content === 'string' ) {\n\t\t\tconst recordToInsert = create( { html: content } );\n\t\t\tthis.onChange( insert( record, recordToInsert ) );\n\t\t} else if ( this.onSplit ) {\n\t\t\tif ( ! content.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( shouldReplace ) {\n\t\t\t\tthis.props.onReplace( content );\n\t\t\t} else {\n\t\t\t\tthis.splitContent( content, { paste: true } );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Handles a focus event on the contenteditable field, calling the\n\t * `unstableOnFocus` prop callback if one is defined. The callback does not\n\t * receive any arguments.\n\t *\n\t * This is marked as a private API and the `unstableOnFocus` prop is not\n\t * documented, as the current requirements where it is used are subject to\n\t * future refactoring following `isSelected` handling.\n\t *\n\t * In contrast with `setFocusedElement`, this is only triggered in response\n\t * to focus within the contenteditable field, whereas `setFocusedElement`\n\t * is triggered on focus within any `RichText` descendent element.\n\t *\n\t * @see setFocusedElement\n\t *\n\t * @private\n\t */\n\tonFocus() {\n\t\tconst { unstableOnFocus } = this.props;\n\t\tif ( unstableOnFocus ) {\n\t\t\tunstableOnFocus();\n\t\t}\n\t}\n\n\t/**\n\t * Handle input on the next selection change event.\n\t *\n\t * @param {SyntheticEvent} event Synthetic input event.\n\t */\n\tonInput( event ) {\n\t\t// For Input Method Editor (IME), used in Chinese, Japanese, and Korean\n\t\t// (CJK), do not trigger a change if characters are being composed.\n\t\t// Browsers setting `isComposing` to `true` will usually emit a final\n\t\t// `input` event when the characters are composed.\n\t\tif ( event.nativeEvent.isComposing ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst record = this.createRecord();\n\t\tconst transformed = this.patterns.reduce( ( accumlator, transform ) => transform( accumlator ), record );\n\n\t\tthis.onChange( transformed, {\n\t\t\twithoutHistory: true,\n\t\t} );\n\n\t\t// Create an undo level when input stops for over a second.\n\t\tthis.props.clearTimeout( this.onInput.timeout );\n\t\tthis.onInput.timeout = this.props.setTimeout( this.onCreateUndoLevel, 1000 );\n\t}\n\n\tonCompositionEnd() {\n\t\t// Ensure the value is up-to-date for browsers that don't emit a final\n\t\t// input event after composition.\n\t\tthis.onChange( this.createRecord() );\n\t}\n\n\t/**\n\t * Handles the `selectionchange` event: sync the selection to local state.\n\t */\n\tonSelectionChange() {\n\t\t// Ensure it's the active element. This is a global event.\n\t\tif ( ! this.isActive() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { start, end, formats } = this.createRecord();\n\n\t\tif ( start !== this.state.start || end !== this.state.end ) {\n\t\t\tconst isCaretWithinFormattedText = this.props.isCaretWithinFormattedText;\n\t\t\tif ( ! isCaretWithinFormattedText && formats[ start ] ) {\n\t\t\t\tthis.props.onEnterFormattedText();\n\t\t\t} else if ( isCaretWithinFormattedText && ! formats[ start ] ) {\n\t\t\t\tthis.props.onExitFormattedText();\n\t\t\t}\n\n\t\t\tthis.setState( { start, end } );\n\t\t}\n\t}\n\n\t/**\n\t * Calls all registered onChangeEditableValue handlers.\n\t *\n\t * @param {Array} formats The formats of the latest rich-text value.\n\t * @param {string} text The text of the latest rich-text value.\n\t */\n\tonChangeEditableValue( { formats, text } ) {\n\t\tget( this.props, [ 'onChangeEditableValue' ], [] ).forEach( ( eventHandler ) => {\n\t\t\teventHandler( formats, text );\n\t\t} );\n\t}\n\n\t/**\n\t * Sync the value to global state. The node tree and selection will also be\n\t * updated if differences are found.\n\t *\n\t * @param {Object} record The record to sync and apply.\n\t * @param {Object} $2 Named options.\n\t * @param {boolean} $2.withoutHistory If true, no undo level will be\n\t * created.\n\t */\n\tonChange( record, { withoutHistory } = {} ) {\n\t\tthis.applyRecord( record );\n\n\t\tconst { start, end } = record;\n\n\t\tthis.onChangeEditableValue( record );\n\n\t\tthis.savedContent = this.valueToFormat( record );\n\t\tthis.props.onChange( this.savedContent );\n\t\tthis.setState( { start, end } );\n\n\t\tif ( ! withoutHistory ) {\n\t\t\tthis.onCreateUndoLevel();\n\t\t}\n\t}\n\n\tonCreateUndoLevel() {\n\t\t// If the content is the same, no level needs to be created.\n\t\tif ( this.lastHistoryValue === this.savedContent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.props.onCreateUndoLevel();\n\t\tthis.lastHistoryValue = this.savedContent;\n\t}\n\n\t/**\n\t * Handles a delete keyDown event to handle merge or removal for collapsed\n\t * selection where caret is at directional edge: forward for a delete key,\n\t * reverse for a backspace key.\n\t *\n\t * @link https://en.wikipedia.org/wiki/Caret_navigation\n\t *\n\t * @param {KeyboardEvent} event Keydown event.\n\t */\n\tonDeleteKeyDown( event ) {\n\t\tconst { onMerge, onRemove } = this.props;\n\t\tif ( ! onMerge && ! onRemove ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { keyCode } = event;\n\t\tconst isReverse = keyCode === BACKSPACE;\n\n\t\t// Only process delete if the key press occurs at uncollapsed edge.\n\t\tif ( ! isCollapsed( this.createRecord() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst empty = this.isEmpty();\n\n\t\t// It is important to consider emptiness because an empty container\n\t\t// will include a bogus TinyMCE BR node _after_ the caret, so in a\n\t\t// forward deletion the isHorizontalEdge function will incorrectly\n\t\t// interpret the presence of the bogus node as not being at the edge.\n\t\tconst isEdge = ( empty || isHorizontalEdge( this.editableRef, isReverse ) );\n\n\t\tif ( ! isEdge ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( onMerge ) {\n\t\t\tonMerge( ! isReverse );\n\t\t}\n\n\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t// causing destruction of two fields (merge, then removed merged).\n\t\tif ( onRemove && empty && isReverse ) {\n\t\t\tonRemove( ! isReverse );\n\t\t}\n\n\t\tevent.preventDefault();\n\t}\n\n\t/**\n\t * Handles a keydown event.\n\t *\n\t * @param {KeyboardEvent} event The keydown event.\n\t */\n\tonKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( keyCode === DELETE || keyCode === BACKSPACE ) {\n\t\t\tconst value = this.createRecord();\n\t\t\tconst start = getSelectionStart( value );\n\t\t\tconst end = getSelectionEnd( value );\n\n\t\t\t// Always handle full content deletion ourselves.\n\t\t\tif ( start === 0 && end !== 0 && end === value.text.length ) {\n\t\t\t\tthis.onChange( remove( value ) );\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this.multilineTag ) {\n\t\t\t\tlet newValue;\n\n\t\t\t\tif ( keyCode === BACKSPACE ) {\n\t\t\t\t\tif ( charAt( value, start - 1 ) === LINE_SEPARATOR ) {\n\t\t\t\t\t\tnewValue = remove(\n\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t// Only remove the line if the selection is\n\t\t\t\t\t\t\t// collapsed.\n\t\t\t\t\t\t\tisCollapsed( value ) ? start - 1 : start,\n\t\t\t\t\t\t\tend\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if ( charAt( value, end ) === LINE_SEPARATOR ) {\n\t\t\t\t\tnewValue = remove(\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tstart,\n\t\t\t\t\t\t// Only remove the line if the selection is collapsed.\n\t\t\t\t\t\tisCollapsed( value ) ? end + 1 : end,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ( newValue ) {\n\t\t\t\t\tthis.onChange( newValue );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.onDeleteKeyDown( event );\n\t\t} else if ( keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst record = this.createRecord();\n\n\t\t\tif ( this.props.onReplace ) {\n\t\t\t\tconst text = getTextContent( record );\n\t\t\t\tconst transformation = findTransform( this.enterPatterns, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tthis.props.onReplace( [\n\t\t\t\t\t\ttransformation.transform( { content: text } ),\n\t\t\t\t\t] );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( this.multilineTag ) {\n\t\t\t\tif ( this.onSplit && isEmptyLine( record ) ) {\n\t\t\t\t\tthis.onSplit( ...split( record ).map( this.valueToFormat ) );\n\t\t\t\t} else {\n\t\t\t\t\tthis.onChange( insertLineSeparator( record ) );\n\t\t\t\t}\n\t\t\t} else if ( event.shiftKey || ! this.onSplit ) {\n\t\t\t\tconst text = getTextContent( record );\n\t\t\t\tconst length = text.length;\n\t\t\t\tlet toInsert = '\\n';\n\n\t\t\t\t// If the caret is at the end of the text, and there is no\n\t\t\t\t// trailing line break or no text at all, we have to insert two\n\t\t\t\t// line breaks in order to create a new line visually and place\n\t\t\t\t// the caret there.\n\t\t\t\tif ( record.end === length && (\n\t\t\t\t\ttext.charAt( length - 1 ) !== '\\n' || length === 0\n\t\t\t\t) ) {\n\t\t\t\t\ttoInsert = '\\n\\n';\n\t\t\t\t}\n\n\t\t\t\tthis.onChange( insert( record, toInsert ) );\n\t\t\t} else {\n\t\t\t\tthis.splitContent();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Splits the content at the location of the selection.\n\t *\n\t * Replaces the content of the editor inside this element with the contents\n\t * before the selection. Sends the elements after the selection to the `onSplit`\n\t * handler.\n\t *\n\t * @param {Array} blocks The blocks to add after the split point.\n\t * @param {Object} context The context for splitting.\n\t */\n\tsplitContent( blocks = [], context = {} ) {\n\t\tconst record = this.createRecord();\n\n\t\tif ( ! this.onSplit ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet [ before, after ] = split( record );\n\n\t\t// In case split occurs at the trailing or leading edge of the field,\n\t\t// assume that the before/after values respectively reflect the current\n\t\t// value. This also provides an opportunity for the parent component to\n\t\t// determine whether the before/after value has changed using a trivial\n\t\t// strict equality operation.\n\t\tif ( isEmpty( after ) ) {\n\t\t\tbefore = record;\n\t\t} else if ( isEmpty( before ) ) {\n\t\t\tafter = record;\n\t\t}\n\n\t\t// If pasting and the split would result in no content other than the\n\t\t// pasted blocks, remove the before and after blocks.\n\t\tif ( context.paste ) {\n\t\t\tbefore = isEmpty( before ) ? null : before;\n\t\t\tafter = isEmpty( after ) ? null : after;\n\t\t}\n\n\t\tif ( before ) {\n\t\t\tbefore = this.valueToFormat( before );\n\t\t}\n\n\t\tif ( after ) {\n\t\t\tafter = this.valueToFormat( after );\n\t\t}\n\n\t\tthis.onSplit( before, after, ...blocks );\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { tagName, value, isSelected } = this.props;\n\n\t\tif (\n\t\t\ttagName === prevProps.tagName &&\n\t\t\tvalue !== prevProps.value &&\n\t\t\tvalue !== this.savedContent\n\t\t) {\n\t\t\t// Handle deprecated `children` and `node` sources.\n\t\t\t// The old way of passing a value with the `node` matcher required\n\t\t\t// the value to be mapped first, creating a new array each time, so\n\t\t\t// a shallow check wouldn't work. We need to check deep equality.\n\t\t\t// This is only executed for a deprecated API and will eventually be\n\t\t\t// removed.\n\t\t\tif ( Array.isArray( value ) && isEqual( value, this.savedContent ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst record = this.formatToValue( value );\n\n\t\t\tif ( isSelected ) {\n\t\t\t\tconst prevRecord = this.formatToValue( prevProps.value );\n\t\t\t\tconst length = getTextContent( prevRecord ).length;\n\t\t\t\trecord.start = length;\n\t\t\t\trecord.end = length;\n\t\t\t}\n\n\t\t\tthis.applyRecord( record );\n\t\t\tthis.savedContent = value;\n\t\t}\n\n\t\t// If blocks are merged, but the content remains the same, e.g. merging\n\t\t// an empty paragraph into another, then also set the selection to the\n\t\t// end.\n\t\tif ( isSelected && ! prevProps.isSelected && ! this.isActive() ) {\n\t\t\tconst record = this.formatToValue( value );\n\t\t\tconst prevRecord = this.formatToValue( prevProps.value );\n\t\t\tconst length = getTextContent( prevRecord ).length;\n\t\t\trecord.start = length;\n\t\t\trecord.end = length;\n\t\t\tthis.applyRecord( record );\n\t\t}\n\n\t\t// If any format props update, reapply value.\n\t\tconst shouldReapply = Object.keys( this.props ).some( ( name ) => {\n\t\t\tif ( name.indexOf( 'format_' ) !== 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Allow primitives and arrays:\n\t\t\tif ( ! isPlainObject( this.props[ name ] ) ) {\n\t\t\t\treturn this.props[ name ] !== prevProps[ name ];\n\t\t\t}\n\n\t\t\treturn Object.keys( this.props[ name ] ).some( ( subName ) => {\n\t\t\t\treturn this.props[ name ][ subName ] !== prevProps[ name ][ subName ];\n\t\t\t} );\n\t\t} );\n\n\t\tif ( shouldReapply ) {\n\t\t\tconst record = this.formatToValue( value );\n\n\t\t\t// Maintain the previous selection:\n\t\t\trecord.start = this.state.start;\n\t\t\trecord.end = this.state.end;\n\n\t\t\tthis.applyRecord( record );\n\t\t}\n\t}\n\n\t/**\n\t * Get props that are provided by formats to modify RichText.\n\t *\n\t * @return {Object} Props that start with 'format_'.\n\t */\n\tgetFormatProps() {\n\t\treturn pickBy( this.props, ( propValue, name ) => name.startsWith( 'format_' ) );\n\t}\n\n\t/**\n\t * Converts the outside data structure to our internal representation.\n\t *\n\t * @param {*} value The outside value, data type depends on props.\n\t * @return {Object} An internal rich-text value.\n\t */\n\tformatToValue( value ) {\n\t\t// Handle deprecated `children` and `node` sources.\n\t\tif ( Array.isArray( value ) ) {\n\t\t\treturn create( {\n\t\t\t\thtml: children.toHTML( value ),\n\t\t\t\tmultilineTag: this.multilineTag,\n\t\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.props.format === 'string' ) {\n\t\t\treturn create( {\n\t\t\t\thtml: value,\n\t\t\t\tmultilineTag: this.multilineTag,\n\t\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\t} );\n\t\t}\n\n\t\t// Guard for blocks passing `null` in onSplit callbacks. May be removed\n\t\t// if onSplit is revised to not pass a `null` value.\n\t\tif ( value === null ) {\n\t\t\treturn create();\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tvalueToEditableHTML( value ) {\n\t\treturn unstableToDom( {\n\t\t\tvalue,\n\t\t\tmultilineTag: this.multilineTag,\n\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\tcreateLinePadding( doc ) {\n\t\t\t\tconst element = doc.createElement( 'br' );\n\t\t\t\telement.setAttribute( 'data-mce-bogus', '1' );\n\t\t\t\treturn element;\n\t\t\t},\n\t\t\tprepareEditableTree: this.props.prepareEditableTree,\n\t\t} ).body.innerHTML;\n\t}\n\n\t/**\n\t * Removes editor only formats from the value.\n\t *\n\t * Editor only formats are applied using `prepareEditableTree`, so we need to\n\t * remove them before converting the internal state\n\t *\n\t * @param {Object} value The internal rich-text value.\n\t * @return {Object} A new rich-text value.\n\t */\n\tremoveEditorOnlyFormats( value ) {\n\t\tthis.props.formatTypes.forEach( ( formatType ) => {\n\t\t\t// Remove formats created by prepareEditableTree, because they are editor only.\n\t\t\tif ( formatType.__experimentalCreatePrepareEditableTree ) {\n\t\t\t\tvalue = removeFormat( value, formatType.name, 0, value.text.length );\n\t\t\t}\n\t\t} );\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Converts the internal value to the external data format.\n\t *\n\t * @param {Object} value The internal rich-text value.\n\t * @return {*} The external data format, data type depends on props.\n\t */\n\tvalueToFormat( value ) {\n\t\tvalue = this.removeEditorOnlyFormats( value );\n\n\t\t// Handle deprecated `children` and `node` sources.\n\t\tif ( this.usedDeprecatedChildrenSource ) {\n\t\t\treturn children.fromDOM( unstableToDom( {\n\t\t\t\tvalue,\n\t\t\t\tmultilineTag: this.multilineTag,\n\t\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\t} ).body.childNodes );\n\t\t}\n\n\t\tif ( this.props.format === 'string' ) {\n\t\t\treturn toHTMLString( {\n\t\t\t\tvalue,\n\t\t\t\tmultilineTag: this.multilineTag,\n\t\t\t\tmultilineWrapperTags: this.multilineWrapperTags,\n\t\t\t} );\n\t\t}\n\n\t\treturn value;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttagName: Tagname = 'div',\n\t\t\tstyle,\n\t\t\twrapperClassName,\n\t\t\tclassName,\n\t\t\tinlineToolbar = false,\n\t\t\tformattingControls,\n\t\t\tplaceholder,\n\t\t\tkeepPlaceholderOnFocus = false,\n\t\t\tisSelected,\n\t\t\tautocompleters,\n\t\t\tonTagNameChange,\n\t\t} = this.props;\n\n\t\tconst MultilineTag = this.multilineTag;\n\t\tconst ariaProps = pickAriaProps( this.props );\n\n\t\t// Generating a key that includes `tagName` ensures that if the tag\n\t\t// changes, we unmount and destroy the previous TinyMCE element, then\n\t\t// mount and initialize a new child element in its place.\n\t\tconst key = [ 'editor', Tagname ].join();\n\t\tconst isPlaceholderVisible = placeholder && ( ! isSelected || keepPlaceholderOnFocus ) && this.isEmpty();\n\t\tconst classes = classnames( wrapperClassName, 'editor-rich-text' );\n\t\tconst record = this.getRecord();\n\n\t\treturn (\n\t\t\t<div className={ classes }\n\t\t\t\tonFocus={ this.setFocusedElement }\n\t\t\t>\n\t\t\t\t{ isSelected && this.editor && this.multilineTag === 'li' && (\n\t\t\t\t\t<ListEdit\n\t\t\t\t\t\teditor={ this.editor }\n\t\t\t\t\t\tonTagNameChange={ onTagNameChange }\n\t\t\t\t\t\ttagName={ Tagname }\n\t\t\t\t\t\tonSyncDOM={ () => this.onChange( this.createRecord() ) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isSelected && ! inlineToolbar && (\n\t\t\t\t\t<BlockFormatControls>\n\t\t\t\t\t\t<FormatToolbar controls={ formattingControls } />\n\t\t\t\t\t</BlockFormatControls>\n\t\t\t\t) }\n\t\t\t\t{ isSelected && inlineToolbar && (\n\t\t\t\t\t<IsolatedEventContainer className=\"editor-rich-text__inline-toolbar\">\n\t\t\t\t\t\t<FormatToolbar controls={ formattingControls } />\n\t\t\t\t\t</IsolatedEventContainer>\n\t\t\t\t) }\n\t\t\t\t<Autocomplete\n\t\t\t\t\tonReplace={ this.props.onReplace }\n\t\t\t\t\tcompleters={ autocompleters }\n\t\t\t\t\trecord={ record }\n\t\t\t\t\tonChange={ this.onChange }\n\t\t\t\t>\n\t\t\t\t\t{ ( { isExpanded, listBoxId, activeId } ) => (\n\t\t\t\t\t\t<Fragment>\n\t\t\t\t\t\t\t<TinyMCE\n\t\t\t\t\t\t\t\ttagName={ Tagname }\n\t\t\t\t\t\t\t\tonSetup={ this.onSetup }\n\t\t\t\t\t\t\t\tstyle={ style }\n\t\t\t\t\t\t\t\tdefaultValue={ this.valueToEditableHTML( record ) }\n\t\t\t\t\t\t\t\tisPlaceholderVisible={ isPlaceholderVisible }\n\t\t\t\t\t\t\t\taria-label={ placeholder }\n\t\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t\taria-expanded={ isExpanded }\n\t\t\t\t\t\t\t\taria-owns={ listBoxId }\n\t\t\t\t\t\t\t\taria-activedescendant={ activeId }\n\t\t\t\t\t\t\t\t{ ...ariaProps }\n\t\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\t\tkey={ key }\n\t\t\t\t\t\t\t\tonPaste={ this.onPaste }\n\t\t\t\t\t\t\t\tonInput={ this.onInput }\n\t\t\t\t\t\t\t\tonCompositionEnd={ this.onCompositionEnd }\n\t\t\t\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\t\t\t\tonFocus={ this.onFocus }\n\t\t\t\t\t\t\t\tmultilineTag={ this.multilineTag }\n\t\t\t\t\t\t\t\tmultilineWrapperTags={ this.multilineWrapperTags }\n\t\t\t\t\t\t\t\tsetRef={ this.setRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ isPlaceholderVisible &&\n\t\t\t\t\t\t\t\t<Tagname\n\t\t\t\t\t\t\t\t\tclassName={ classnames( 'editor-rich-text__tinymce', className ) }\n\t\t\t\t\t\t\t\t\tstyle={ style }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ MultilineTag ? <MultilineTag>{ placeholder }</MultilineTag> : placeholder }\n\t\t\t\t\t\t\t\t</Tagname>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ isSelected && <FormatEdit value={ record } onChange={ this.onChange } /> }\n\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t) }\n\t\t\t\t</Autocomplete>\n\t\t\t\t{ isSelected && <RemoveBrowserShortcuts /> }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nRichText.defaultProps = {\n\tformattingControls: [ 'bold', 'italic', 'link', 'strikethrough' ],\n\tformat: 'string',\n\tvalue: '',\n};\n\nconst RichTextContainer = compose( [\n\twithInstanceId,\n\twithBlockEditContext( ( context, ownProps ) => {\n\t\t// When explicitly set as not selected, do nothing.\n\t\tif ( ownProps.isSelected === false ) {\n\t\t\treturn {\n\t\t\t\tclientId: context.clientId,\n\t\t\t};\n\t\t}\n\t\t// When explicitly set as selected, use the value stored in the context instead.\n\t\tif ( ownProps.isSelected === true ) {\n\t\t\treturn {\n\t\t\t\tisSelected: context.isSelected,\n\t\t\t\tclientId: context.clientId,\n\t\t\t};\n\t\t}\n\n\t\t// Ensures that only one RichText component can be focused.\n\t\treturn {\n\t\t\tisSelected: context.isSelected && context.focusedElement === ownProps.instanceId,\n\t\t\tsetFocusedElement: context.setFocusedElement,\n\t\t\tclientId: context.clientId,\n\t\t};\n\t} ),\n\twithSelect( ( select ) => {\n\t\tconst { canUserUseUnfilteredHTML, isCaretWithinFormattedText } = select( 'core/editor' );\n\t\tconst { getFormatTypes } = select( 'core/rich-text' );\n\n\t\treturn {\n\t\t\tcanUserUseUnfilteredHTML: canUserUseUnfilteredHTML(),\n\t\t\tisCaretWithinFormattedText: isCaretWithinFormattedText(),\n\t\t\tformatTypes: getFormatTypes(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\tcreateUndoLevel,\n\t\t\tredo,\n\t\t\tundo,\n\t\t\tenterFormattedText,\n\t\t\texitFormattedText,\n\t\t} = dispatch( 'core/editor' );\n\n\t\treturn {\n\t\t\tonCreateUndoLevel: createUndoLevel,\n\t\t\tonRedo: redo,\n\t\t\tonUndo: undo,\n\t\t\tonEnterFormattedText: enterFormattedText,\n\t\t\tonExitFormattedText: exitFormattedText,\n\t\t};\n\t} ),\n\twithSafeTimeout,\n\twithFilters( 'experimentalRichText' ),\n] )( RichText );\n\nRichTextContainer.Content = ( { value, tagName: Tag, multiline, ...props } ) => {\n\tlet html = value;\n\tlet MultilineTag;\n\n\tif ( multiline === true || multiline === 'p' || multiline === 'li' ) {\n\t\tMultilineTag = multiline === true ? 'p' : multiline;\n\t}\n\n\t// Handle deprecated `children` and `node` sources.\n\tif ( Array.isArray( value ) ) {\n\t\thtml = children.toHTML( value );\n\t}\n\n\tif ( ! html && MultilineTag ) {\n\t\thtml = `<${ MultilineTag }></${ MultilineTag }>`;\n\t}\n\n\tconst content = <RawHTML>{ html }</RawHTML>;\n\n\tif ( Tag ) {\n\t\treturn <Tag { ...omit( props, [ 'format' ] ) }>{ content }</Tag>;\n\t}\n\n\treturn content;\n};\n\nRichTextContainer.isEmpty = ( value = '' ) => {\n\t// Handle deprecated `children` and `node` sources.\n\tif ( Array.isArray( value ) ) {\n\t\treturn ! value || value.length === 0;\n\t}\n\n\treturn value.length === 0;\n};\n\nRichTextContainer.Content.defaultProps = {\n\tformat: 'string',\n\tvalue: '',\n};\n\nexport default RichTextContainer;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { RichTextInserterItem } from './inserter-list-item';\n","/**\n * WordPress dependencies\n */\nimport { normalizeIconObject } from '@wordpress/blocks';\nimport { Fill } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { normalizeTerm } from '../inserter/menu';\n\nfunction isResult( keywords, filterValue ) {\n\treturn keywords.some( ( string ) =>\n\t\tnormalizeTerm( string ).indexOf( normalizeTerm( filterValue ) ) !== -1\n\t);\n}\n\nexport const RichTextInserterItem = withSelect( ( select, { name } ) => ( {\n\tformatType: select( 'core/rich-text' ).getFormatType( name ),\n} ) )( ( props ) => {\n\treturn (\n\t\t<Fill name=\"Inserter.InlineElements\">\n\t\t\t{ ( { filterValue } ) => {\n\t\t\t\tconst { keywords = [], title } = props.formatType;\n\n\t\t\t\tkeywords.push( title, props.title );\n\n\t\t\t\tif ( filterValue && ! isResult( keywords, filterValue ) ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn <InserterListItem { ...props } icon={ normalizeIconObject( props.icon ) } />;\n\t\t\t} }\n\t\t</Fill>\n\t);\n} );\n","/**\n * WordPress dependencies\n */\n\nimport { Toolbar } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { RichTextShortcut } from './shortcut';\nimport BlockFormatControls from '../block-format-controls';\n\nfunction isListRootSelected( editor ) {\n\treturn (\n\t\t! editor.selection ||\n\t\teditor.selection.getNode().closest( 'ol,ul' ) === editor.getBody()\n\t);\n}\n\nfunction isActiveListType( editor, tagName, rootTagName ) {\n\tif ( document.activeElement !== editor.getBody() ) {\n\t\treturn tagName === rootTagName;\n\t}\n\n\tconst listItem = editor.selection.getNode();\n\tconst list = listItem.closest( 'ol,ul' );\n\n\tif ( ! list ) {\n\t\treturn;\n\t}\n\n\treturn list.nodeName.toLowerCase() === tagName;\n}\n\nexport const ListEdit = ( { editor, onTagNameChange, tagName, onSyncDOM } ) => (\n\t<Fragment>\n\t\t<RichTextShortcut\n\t\t\ttype=\"primary\"\n\t\t\tcharacter=\"[\"\n\t\t\tonUse={ () => {\n\t\t\t\teditor.execCommand( 'Outdent' );\n\t\t\t\tonSyncDOM();\n\t\t\t} }\n\t\t/>\n\t\t<RichTextShortcut\n\t\t\ttype=\"primary\"\n\t\t\tcharacter=\"]\"\n\t\t\tonUse={ () => {\n\t\t\t\teditor.execCommand( 'Indent' );\n\t\t\t\tonSyncDOM();\n\t\t\t} }\n\t\t/>\n\t\t<RichTextShortcut\n\t\t\ttype=\"primary\"\n\t\t\tcharacter=\"m\"\n\t\t\tonUse={ () => {\n\t\t\t\teditor.execCommand( 'Indent' );\n\t\t\t\tonSyncDOM();\n\t\t\t} }\n\t\t/>\n\t\t<RichTextShortcut\n\t\t\ttype=\"primaryShift\"\n\t\t\tcharacter=\"m\"\n\t\t\tonUse={ () => {\n\t\t\t\teditor.execCommand( 'Outdent' );\n\t\t\t\tonSyncDOM();\n\t\t\t} }\n\t\t/>\n\t\t<BlockFormatControls>\n\t\t\t<Toolbar\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'editor-ul',\n\t\t\t\t\t\ttitle: __( 'Convert to unordered list' ),\n\t\t\t\t\t\tisActive: isActiveListType( editor, 'ul', tagName ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tif ( isListRootSelected( editor ) ) {\n\t\t\t\t\t\t\t\tonTagNameChange( 'ul' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditor.execCommand( 'InsertUnorderedList' );\n\t\t\t\t\t\t\t\tonSyncDOM();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'editor-ol',\n\t\t\t\t\t\ttitle: __( 'Convert to ordered list' ),\n\t\t\t\t\t\tisActive: isActiveListType( editor, 'ol', tagName ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tif ( isListRootSelected( editor ) ) {\n\t\t\t\t\t\t\t\tonTagNameChange( 'ol' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\teditor.execCommand( 'InsertOrderedList' );\n\t\t\t\t\t\t\t\tonSyncDOM();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'editor-outdent',\n\t\t\t\t\t\ttitle: __( 'Outdent list item' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\teditor.execCommand( 'Outdent' );\n\t\t\t\t\t\t\tonSyncDOM();\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ticon: 'editor-indent',\n\t\t\t\t\t\ttitle: __( 'Indent list item' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\teditor.execCommand( 'Indent' );\n\t\t\t\t\t\t\tonSyncDOM();\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t</BlockFormatControls>\n\t</Fragment>\n);\n","/**\n * WordPress dependencies\n */\nimport { getBlockTransforms, findTransform } from '@wordpress/blocks';\nimport {\n\tremove,\n\tapplyFormat,\n\tgetTextContent,\n\tgetSelectionStart,\n\tslice,\n} from '@wordpress/rich-text';\n\nexport function getPatterns( { onReplace, valueToFormat, onCreateUndoLevel, onChange } ) {\n\tconst prefixTransforms = getBlockTransforms( 'from' )\n\t\t.filter( ( { type } ) => type === 'prefix' );\n\n\treturn [\n\t\t( record ) => {\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tconst start = getSelectionStart( record );\n\t\t\tconst text = getTextContent( record );\n\t\t\tconst characterBefore = text.slice( start - 1, start );\n\n\t\t\tif ( ! /\\s/.test( characterBefore ) ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\t\tconst transformation = findTransform( prefixTransforms, ( { prefix } ) => {\n\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t} );\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tconst content = valueToFormat( slice( record, start, text.length ) );\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tonCreateUndoLevel();\n\t\t\tonReplace( [ block ] );\n\n\t\t\treturn record;\n\t\t},\n\t\t( record ) => {\n\t\t\tconst BACKTICK = '`';\n\t\t\tconst start = getSelectionStart( record );\n\t\t\tconst text = getTextContent( record );\n\t\t\tconst characterBefore = text.slice( start - 1, start );\n\n\t\t\t// Quick check the text for the necessary character.\n\t\t\tif ( characterBefore !== BACKTICK ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tconst textBefore = text.slice( 0, start - 1 );\n\t\t\tconst indexBefore = textBefore.lastIndexOf( BACKTICK );\n\n\t\t\tif ( indexBefore === -1 ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tconst startIndex = indexBefore;\n\t\t\tconst endIndex = start - 2;\n\n\t\t\tif ( startIndex === endIndex ) {\n\t\t\t\treturn record;\n\t\t\t}\n\n\t\t\tonChange( record );\n\n\t\t\trecord = remove( record, startIndex, startIndex + 1 );\n\t\t\trecord = remove( record, endIndex, endIndex + 1 );\n\t\t\trecord = applyFormat( record, { type: 'code' }, startIndex, endIndex );\n\n\t\t\treturn record;\n\t\t},\n\t];\n}\n","/**\n * External dependencies\n */\nimport { fromPairs } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { rawShortcut } from '@wordpress/keycodes';\nimport { KeyboardShortcuts } from '@wordpress/components';\n\n/**\n * Set of keyboard shortcuts handled internally by RichText.\n *\n * @type {Array}\n */\nconst HANDLED_SHORTCUTS = [\n\trawShortcut.primary( 'z' ),\n\trawShortcut.primaryShift( 'z' ),\n\trawShortcut.primary( 'y' ),\n];\n\n/**\n * An instance of a KeyboardShortcuts element pre-bound for the handled\n * shortcuts. Since shortcuts never change, the element can be considered\n * static, and can be skipped in reconciliation.\n *\n * @type {WPElement}\n */\nconst SHORTCUTS_ELEMENT = (\n\t<KeyboardShortcuts\n\t\tbindGlobal\n\t\tshortcuts={ fromPairs( HANDLED_SHORTCUTS.map( ( shortcut ) => {\n\t\t\treturn [ shortcut, ( event ) => event.preventDefault() ];\n\t\t} ) ) }\n\t/>\n);\n\n/**\n * Component which registered keyboard event handlers to prevent default\n * behaviors for key combinations otherwise handled internally by RichText.\n *\n * @return {WPElement} WordPress element.\n */\nexport const RemoveBrowserShortcuts = () => SHORTCUTS_ELEMENT;\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { KeyboardShortcuts } from '@wordpress/components';\nimport { rawShortcut } from '@wordpress/keycodes';\n\nexport class RichTextShortcut extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onUse = this.onUse.bind( this );\n\t}\n\n\tonUse() {\n\t\tthis.props.onUse();\n\t\treturn false;\n\t}\n\n\trender() {\n\t\tconst { character, type } = this.props;\n\n\t\treturn (\n\t\t\t<KeyboardShortcuts\n\t\t\t\tbindGlobal\n\t\t\t\tshortcuts={ {\n\t\t\t\t\t[ rawShortcut[ type ]( character ) ]: this.onUse,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t}\n}\n","/**\n * External dependencies\n */\nimport tinymce from 'tinymce';\nimport { isEqual, noop } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Component, createElement } from '@wordpress/element';\nimport { BACKSPACE, DELETE, ENTER, LEFT, RIGHT } from '@wordpress/keycodes';\nimport { isEntirelySelected } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { diffAriaProps, pickAriaProps } from './aria';\n\n/**\n * Browser dependencies\n */\n\nconst { getSelection } = window;\nconst { TEXT_NODE } = window.Node;\n\n/**\n * Zero-width space character used by TinyMCE as a caret landing point for\n * inline boundary nodes.\n *\n * @see tinymce/src/core/main/ts/text/Zwsp.ts\n *\n * @type {string}\n */\nexport const TINYMCE_ZWSP = '\\uFEFF';\n\n/**\n * Determines whether we need a fix to provide `input` events for contenteditable.\n *\n * @param {Element} editorNode The root editor node.\n *\n * @return {boolean} A boolean indicating whether the fix is needed.\n */\nfunction needsInternetExplorerInputFix( editorNode ) {\n\treturn (\n\t\t// Rely on userAgent in the absence of a reasonable feature test for contenteditable `input` events.\n\t\t/Trident/.test( window.navigator.userAgent ) &&\n\t\t// IE11 dispatches input events for `<input>` and `<textarea>`.\n\t\t! /input/i.test( editorNode.tagName ) &&\n\t\t! /textarea/i.test( editorNode.tagName )\n\t);\n}\n\n/**\n * Applies a fix that provides `input` events for contenteditable in Internet Explorer.\n *\n * @param {Element} editorNode The root editor node.\n *\n * @return {Function} A function to remove the fix (for cleanup).\n */\nfunction applyInternetExplorerInputFix( editorNode ) {\n\t/**\n\t * Dispatches `input` events in response to `textinput` events.\n\t *\n\t * IE provides a `textinput` event that is similar to an `input` event,\n\t * and we use it to manually dispatch an `input` event.\n\t * `textinput` is dispatched for text entry but for not deletions.\n\t *\n\t * @param {Event} textInputEvent An Internet Explorer `textinput` event.\n\t */\n\tfunction mapTextInputEvent( textInputEvent ) {\n\t\ttextInputEvent.stopImmediatePropagation();\n\n\t\tconst inputEvent = document.createEvent( 'Event' );\n\t\tinputEvent.initEvent( 'input', true, false );\n\t\tinputEvent.data = textInputEvent.data;\n\t\ttextInputEvent.target.dispatchEvent( inputEvent );\n\t}\n\n\t/**\n\t * Dispatches `input` events in response to Delete and Backspace keyup.\n\t *\n\t * It would be better dispatch an `input` event after each deleting\n\t * `keydown` because the DOM is updated after each, but it is challenging\n\t * to determine the right time to dispatch `input` since propagation of\n\t * `keydown` can be stopped at any point.\n\t *\n\t * It's easier to listen for `keyup` in the capture phase and dispatch\n\t * `input` before `keyup` propagates further. It's not perfect, but should\n\t * be good enough.\n\t *\n\t * @param {KeyboardEvent} keyUp\n\t * @param {Node} keyUp.target The event target.\n\t * @param {number} keyUp.keyCode The key code.\n\t */\n\tfunction mapDeletionKeyUpEvents( { target, keyCode } ) {\n\t\tconst isDeletion = BACKSPACE === keyCode || DELETE === keyCode;\n\n\t\tif ( isDeletion && editorNode.contains( target ) ) {\n\t\t\tconst inputEvent = document.createEvent( 'Event' );\n\t\t\tinputEvent.initEvent( 'input', true, false );\n\t\t\tinputEvent.data = null;\n\t\t\ttarget.dispatchEvent( inputEvent );\n\t\t}\n\t}\n\n\teditorNode.addEventListener( 'textinput', mapTextInputEvent );\n\tdocument.addEventListener( 'keyup', mapDeletionKeyUpEvents, true );\n\treturn function removeInternetExplorerInputFix() {\n\t\teditorNode.removeEventListener( 'textinput', mapTextInputEvent );\n\t\tdocument.removeEventListener( 'keyup', mapDeletionKeyUpEvents, true );\n\t};\n}\n\nconst IS_PLACEHOLDER_VISIBLE_ATTR_NAME = 'data-is-placeholder-visible';\nexport default class TinyMCE extends Component {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.bindEditorNode = this.bindEditorNode.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t}\n\n\tonFocus() {\n\t\tif ( this.props.onFocus ) {\n\t\t\tthis.props.onFocus();\n\t\t}\n\n\t\tthis.initialize();\n\t}\n\n\t// We must prevent rerenders because RichText, the browser, and TinyMCE will\n\t// modify the DOM. React will rerender the DOM fine, but we're losing\n\t// selection and it would be more expensive to do so as it would just set\n\t// the inner HTML through `dangerouslySetInnerHTML`. Instead RichText does\n\t// it's own diffing and selection setting.\n\t//\n\t// Because we never update the component, we have to look through props and\n\t// update the attributes on the wrapper nodes here. `componentDidUpdate`\n\t// will never be called.\n\tshouldComponentUpdate( nextProps ) {\n\t\tthis.configureIsPlaceholderVisible( nextProps.isPlaceholderVisible );\n\n\t\tif ( ! isEqual( this.props.style, nextProps.style ) ) {\n\t\t\tthis.editorNode.setAttribute( 'style', '' );\n\t\t\tObject.assign( this.editorNode.style, nextProps.style );\n\t\t}\n\n\t\tif ( ! isEqual( this.props.className, nextProps.className ) ) {\n\t\t\tthis.editorNode.className = classnames( nextProps.className, 'editor-rich-text__tinymce' );\n\t\t}\n\n\t\tconst { removedKeys, updatedKeys } = diffAriaProps( this.props, nextProps );\n\t\tremovedKeys.forEach( ( key ) =>\n\t\t\tthis.editorNode.removeAttribute( key ) );\n\t\tupdatedKeys.forEach( ( key ) =>\n\t\t\tthis.editorNode.setAttribute( key, nextProps[ key ] ) );\n\n\t\treturn false;\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.editor ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.editor.destroy();\n\t\tdelete this.editor;\n\t}\n\n\tconfigureIsPlaceholderVisible( isPlaceholderVisible ) {\n\t\tconst isPlaceholderVisibleString = String( !! isPlaceholderVisible );\n\t\tif ( this.editorNode.getAttribute( IS_PLACEHOLDER_VISIBLE_ATTR_NAME ) !== isPlaceholderVisibleString ) {\n\t\t\tthis.editorNode.setAttribute( IS_PLACEHOLDER_VISIBLE_ATTR_NAME, isPlaceholderVisibleString );\n\t\t}\n\t}\n\n\tinitialize() {\n\t\tconst { multilineTag } = this.props;\n\t\tconst settings = {\n\t\t\ttheme: false,\n\t\t\tinline: true,\n\t\t\ttoolbar: false,\n\t\t\tbrowser_spellcheck: true,\n\t\t\tentity_encoding: 'raw',\n\t\t\tconvert_urls: false,\n\t\t\t// Disables TinyMCE's parsing to verify HTML. It makes\n\t\t\t// initialisation a bit faster. Since we're setting raw HTML\n\t\t\t// already with dangerouslySetInnerHTML, we don't need this to be\n\t\t\t// verified.\n\t\t\tverify_html: false,\n\t\t\tinline_boundaries_selector: 'a[href],code,b,i,strong,em,del,ins,sup,sub',\n\t\t\tplugins: [],\n\t\t\tforced_root_block: multilineTag || false,\n\t\t\t// Allow TinyMCE to keep one undo level for comparing changes.\n\t\t\t// Prevent it otherwise from accumulating any history.\n\t\t\tcustom_undo_redo_levels: 1,\n\t\t\tlists_indent_on_tab: false,\n\t\t};\n\n\t\tif ( multilineTag === 'li' ) {\n\t\t\tsettings.plugins.push( 'lists' );\n\t\t}\n\n\t\ttinymce.init( {\n\t\t\t...settings,\n\t\t\ttarget: this.editorNode,\n\t\t\tsetup: ( editor ) => {\n\t\t\t\tthis.editor = editor;\n\t\t\t\tthis.props.onSetup( editor );\n\n\t\t\t\t// TinyMCE resets the element content on initialization, even\n\t\t\t\t// when it's already identical to what exists currently. This\n\t\t\t\t// behavior clobbers a selection which exists at the time of\n\t\t\t\t// initialization, thus breaking writing flow navigation. The\n\t\t\t\t// hack here neutralizes setHTML during initialization.\n\t\t\t\tlet setHTML;\n\n\t\t\t\teditor.on( 'preinit', () => {\n\t\t\t\t\tsetHTML = editor.dom.setHTML;\n\t\t\t\t\teditor.dom.setHTML = () => {};\n\t\t\t\t} );\n\n\t\t\t\teditor.on( 'init', () => {\n\t\t\t\t\t// History is handled internally by RichText.\n\t\t\t\t\t//\n\t\t\t\t\t// See: https://github.com/tinymce/tinymce/blob/master/src/core/main/ts/api/UndoManager.ts\n\t\t\t\t\t[ 'z', 'y' ].forEach( ( character ) => {\n\t\t\t\t\t\teditor.shortcuts.remove( `meta+${ character }` );\n\t\t\t\t\t} );\n\t\t\t\t\teditor.shortcuts.remove( 'meta+shift+z' );\n\n\t\t\t\t\t// Reset TinyMCE's default formatting shortcuts, since\n\t\t\t\t\t// RichText supports only registered formats.\n\t\t\t\t\t//\n\t\t\t\t\t// See: https://github.com/tinymce/tinymce/blob/master/src/core/main/ts/keyboard/FormatShortcuts.ts\n\t\t\t\t\t[ 'b', 'i', 'u' ].forEach( ( character ) => {\n\t\t\t\t\t\teditor.shortcuts.remove( `meta+${ character }` );\n\t\t\t\t\t} );\n\t\t\t\t\t[ 1, 2, 3, 4, 5, 6, 7, 8, 9 ].forEach( ( number ) => {\n\t\t\t\t\t\teditor.shortcuts.remove( `access+${ number }` );\n\t\t\t\t\t} );\n\n\t\t\t\t\t// Restore the original `setHTML` once initialized.\n\t\t\t\t\teditor.dom.setHTML = setHTML;\n\t\t\t\t} );\n\n\t\t\t\teditor.on( 'keydown', this.onKeyDown, true );\n\t\t\t},\n\t\t} );\n\t}\n\n\tbindEditorNode( editorNode ) {\n\t\tthis.editorNode = editorNode;\n\n\t\tif ( this.props.setRef ) {\n\t\t\tthis.props.setRef( editorNode );\n\t\t}\n\n\t\t/**\n\t\t * A ref function can be used for cleanup because React calls it with\n\t\t * `null` when unmounting.\n\t\t */\n\t\tif ( this.removeInternetExplorerInputFix ) {\n\t\t\tthis.removeInternetExplorerInputFix();\n\t\t\tthis.removeInternetExplorerInputFix = null;\n\t\t}\n\n\t\tif ( editorNode && needsInternetExplorerInputFix( editorNode ) ) {\n\t\t\tthis.removeInternetExplorerInputFix = applyInternetExplorerInputFix( editorNode );\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst isDelete = keyCode === DELETE || keyCode === BACKSPACE;\n\n\t\t// Disables TinyMCE behaviour.\n\t\tif (\n\t\t\tkeyCode === ENTER ||\n\t\t\t( isDelete && isEntirelySelected( this.editorNode ) )\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\t// For some reason this is needed to also prevent the insertion of\n\t\t\t// line breaks.\n\t\t\treturn false;\n\t\t}\n\n\t\t// Handles a horizontal navigation key down event to handle the case\n\t\t// where TinyMCE attempts to preventDefault when on the outside edge of\n\t\t// an inline boundary when arrowing _away_ from the boundary, not within\n\t\t// it. Replaces the TinyMCE event `preventDefault` behavior with a noop,\n\t\t// such that those relying on `defaultPrevented` are not misinformed\n\t\t// about the arrow event.\n\t\t//\n\t\t// If TinyMCE#4476 is resolved, this handling may be removed.\n\t\t//\n\t\t// @see https://github.com/tinymce/tinymce/issues/4476\n\t\tif ( keyCode !== LEFT && keyCode !== RIGHT ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { focusNode } = getSelection();\n\t\tconst { nodeType, nodeValue } = focusNode;\n\n\t\tif ( nodeType !== TEXT_NODE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( nodeValue.length !== 1 || nodeValue[ 0 ] !== TINYMCE_ZWSP ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Consider to be moving away from inline boundary based on:\n\t\t//\n\t\t// 1. Within a text fragment consisting only of ZWSP.\n\t\t// 2. If in reverse, there is no previous sibling. If forward, there is\n\t\t// no next sibling (i.e. end of node).\n\t\tconst isReverse = event.keyCode === LEFT;\n\t\tconst edgeSibling = isReverse ? 'previousSibling' : 'nextSibling';\n\t\tif ( ! focusNode[ edgeSibling ] ) {\n\t\t\t// Note: This is not reassigning on the native event, rather the\n\t\t\t// \"fixed\" TinyMCE copy, which proxies its preventDefault to the\n\t\t\t// native event. By reassigning here, we're effectively preventing\n\t\t\t// the proxied call on the native event, but not otherwise mutating\n\t\t\t// the original event object.\n\t\t\tevent.preventDefault = noop;\n\t\t}\n\t}\n\n\trender() {\n\t\tconst ariaProps = pickAriaProps( this.props );\n\t\tconst {\n\t\t\ttagName = 'div',\n\t\t\tstyle,\n\t\t\tdefaultValue,\n\t\t\tclassName,\n\t\t\tisPlaceholderVisible,\n\t\t\tonPaste,\n\t\t\tonInput,\n\t\t\tonKeyDown,\n\t\t\tonCompositionEnd,\n\t\t} = this.props;\n\n\t\t/*\n\t\t * The role=textbox and aria-multiline=true must always be used together\n\t\t * as TinyMCE always behaves like a sort of textarea where text wraps in\n\t\t * multiple lines. Only the table block editable element is excluded.\n\t\t */\n\t\tif ( tagName !== 'table' ) {\n\t\t\tariaProps.role = 'textbox';\n\t\t\tariaProps[ 'aria-multiline' ] = true;\n\t\t}\n\n\t\t// If a default value is provided, render it into the DOM even before\n\t\t// TinyMCE finishes initializing. This avoids a short delay by allowing\n\t\t// us to show and focus the content before it's truly ready to edit.\n\t\treturn createElement( tagName, {\n\t\t\t...ariaProps,\n\t\t\tclassName: classnames( className, 'editor-rich-text__tinymce' ),\n\t\t\tcontentEditable: true,\n\t\t\t[ IS_PLACEHOLDER_VISIBLE_ATTR_NAME ]: isPlaceholderVisible,\n\t\t\tref: this.bindEditorNode,\n\t\t\tstyle,\n\t\t\tsuppressContentEditableWarning: true,\n\t\t\tdangerouslySetInnerHTML: { __html: defaultValue },\n\t\t\tonPaste,\n\t\t\tonInput,\n\t\t\tonFocus: this.onFocus,\n\t\t\tonKeyDown,\n\t\t\tonCompositionEnd,\n\t\t} );\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { Fill, ToolbarButton } from '@wordpress/components';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nexport function RichTextToolbarButton( { name, shortcutType, shortcutCharacter, ...props } ) {\n\tlet shortcut;\n\tlet fillName = 'RichText.ToolbarControls';\n\n\tif ( name ) {\n\t\tfillName += `.${ name }`;\n\t}\n\n\tif ( shortcutType && shortcutCharacter ) {\n\t\tshortcut = displayShortcut[ shortcutType ]( shortcutCharacter );\n\t}\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<ToolbarButton\n\t\t\t\t{ ...props }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t/>\n\t\t</Fill>\n\t);\n}\n","/**\n * WordPress dependencies.\n */\nimport { ServerSideRender } from '@wordpress/components';\nimport { select } from '@wordpress/data';\n\nexport default function( { urlQueryArgs = {}, ...props } ) {\n\tconst { getCurrentPostId } = select( 'core/editor' );\n\n\turlQueryArgs = {\n\t\tpost_id: getCurrentPostId(),\n\t\t...urlQueryArgs,\n\t};\n\n\treturn (\n\t\t<ServerSideRender urlQueryArgs={ urlQueryArgs } { ...props } />\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal Dependencies\n */\nimport { getBlockFocusableWrapper } from '../../utils/dom';\n\nconst SkipToSelectedBlock = ( { selectedBlockClientId } ) => {\n\tconst onClick = () => {\n\t\tconst selectedBlockElement = getBlockFocusableWrapper( selectedBlockClientId );\n\t\tselectedBlockElement.focus();\n\t};\n\n\treturn (\n\t\tselectedBlockClientId &&\n\t\t<Button isDefault type=\"button\" className=\"editor-skip-to-selected-block\" onClick={ onClick }>\n\t\t\t{ __( 'Skip to the selected block' ) }\n\t\t</Button>\n\t);\n};\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tselectedBlockClientId: select( 'core/editor' ).getBlockSelectionStart(),\n\t};\n} )( SkipToSelectedBlock );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, IconButton } from '@wordpress/components';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TableOfContentsPanel from './panel';\n\nfunction TableOfContents( { hasBlocks } ) {\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom\"\n\t\t\tclassName=\"table-of-contents\"\n\t\t\tcontentClassName=\"table-of-contents__popover\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<IconButton\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\ticon=\"info-outline\"\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tlabel={ __( 'Content structure' ) }\n\t\t\t\t\tdisabled={ ! hasBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => <TableOfContentsPanel /> }\n\t\t/>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\thasBlocks: !! select( 'core/editor' ).getBlockCount(),\n\t};\n} )( TableOfContents );\n","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport WordCount from '../word-count';\nimport DocumentOutline from '../document-outline';\n\nfunction TableOfContentsPanel( { headingCount, paragraphCount, numberOfBlocks } ) {\n\treturn (\n\t\t<Fragment>\n\t\t\t<div\n\t\t\t\tclassName=\"table-of-contents__counts\"\n\t\t\t\trole=\"note\"\n\t\t\t\taria-label={ __( 'Document Statistics' ) }\n\t\t\t\ttabIndex=\"0\"\n\t\t\t>\n\t\t\t\t<div className=\"table-of-contents__count\">\n\t\t\t\t\t{ __( 'Words' ) }\n\t\t\t\t\t<WordCount />\n\t\t\t\t</div>\n\t\t\t\t<div className=\"table-of-contents__count\">\n\t\t\t\t\t{ __( 'Headings' ) }\n\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t{ headingCount }\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"table-of-contents__count\">\n\t\t\t\t\t{ __( 'Paragraphs' ) }\n\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t{ paragraphCount }\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"table-of-contents__count\">\n\t\t\t\t\t{ __( 'Blocks' ) }\n\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t{ numberOfBlocks }\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ headingCount > 0 && (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<hr />\n\t\t\t\t\t<span className=\"table-of-contents__title\">\n\t\t\t\t\t\t{ __( 'Document Outline' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<DocumentOutline />\n\t\t\t\t</Fragment>\n\t\t\t) }\n\t\t</Fragment>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getGlobalBlockCount } = select( 'core/editor' );\n\treturn {\n\t\theadingCount: getGlobalBlockCount( 'core/heading' ),\n\t\tparagraphCount: getGlobalBlockCount( 'core/paragraph' ),\n\t\tnumberOfBlocks: getGlobalBlockCount(),\n\t};\n} )( TableOfContentsPanel );\n","/**\n * WordPress dependencies\n */\nimport { Notice, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\nfunction TemplateValidationNotice( { isValid, ...props } ) {\n\tif ( isValid ) {\n\t\treturn null;\n\t}\n\n\tconst confirmSynchronization = () => {\n\t\t// eslint-disable-next-line no-alert\n\t\tif ( window.confirm( __( 'Resetting the template may result in loss of content, do you want to continue?' ) ) ) {\n\t\t\tprops.synchronizeTemplate();\n\t\t}\n\t};\n\n\treturn (\n\t\t<Notice className=\"editor-template-validation-notice\" isDismissible={ false } status=\"warning\">\n\t\t\t<p>{ __( 'The content of your post doesnt match the template assigned to your post type.' ) }</p>\n\t\t\t<div>\n\t\t\t\t<Button isDefault onClick={ props.resetTemplateValidity }>{ __( 'Keep it as is' ) }</Button>\n\t\t\t\t<Button onClick={ confirmSynchronization } isPrimary>{ __( 'Reset the template' ) }</Button>\n\t\t\t</div>\n\t\t</Notice>\n\t);\n}\n\nexport default compose( [\n\twithSelect( ( select ) => ( {\n\t\tisValid: select( 'core/editor' ).isValidTemplate(),\n\t} ) ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { setTemplateValidity, synchronizeTemplate } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tresetTemplateValidity: () => setTemplateValidity( true ),\n\t\t\tsynchronizeTemplate,\n\t\t};\n\t} ),\n] )( TemplateValidationNotice );\n","/**\n * External dependencies\n */\nimport {\n\tcastArray,\n\tincludes,\n\tisArray,\n\tget,\n\tsome,\n} from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\n\nexport function ThemeSupportCheck( { themeSupports, children, postType, supportKeys } ) {\n\tconst isSupported = some(\n\t\tcastArray( supportKeys ), ( key ) => {\n\t\t\tconst supported = get( themeSupports, [ key ], false );\n\t\t\t// 'post-thumbnails' can be boolean or an array of post types.\n\t\t\t// In the latter case, we need to verify `postType` exists\n\t\t\t// within `supported`. If `postType` isn't passed, then the check\n\t\t\t// should fail.\n\t\t\tif ( 'post-thumbnails' === key && isArray( supported ) ) {\n\t\t\t\treturn includes( supported, postType );\n\t\t\t}\n\t\t\treturn supported;\n\t\t}\n\t);\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getThemeSupports } = select( 'core' );\n\tconst { getEditedPostAttribute } = select( 'core/editor' );\n\treturn {\n\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\tthemeSupports: getThemeSupports(),\n\t};\n} )( ThemeSupportCheck );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { withSelect } from '@wordpress/data';\n\nclass UnsavedChangesWarning extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.warnIfUnsavedChanges = this.warnIfUnsavedChanges.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\twindow.addEventListener( 'beforeunload', this.warnIfUnsavedChanges );\n\t}\n\n\tcomponentWillUnmount() {\n\t\twindow.removeEventListener( 'beforeunload', this.warnIfUnsavedChanges );\n\t}\n\n\t/**\n\t * Warns the user if there are unsaved changes before leaving the editor.\n\t *\n\t * @param {Event} event `beforeunload` event.\n\t *\n\t * @return {?string} Warning prompt message, if unsaved changes exist.\n\t */\n\twarnIfUnsavedChanges( event ) {\n\t\tconst { isDirty } = this.props;\n\n\t\tif ( isDirty ) {\n\t\t\tevent.returnValue = __( 'You have unsaved changes. If you proceed, they will be lost.' );\n\t\t\treturn event.returnValue;\n\t\t}\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\nexport default withSelect( ( select ) => ( {\n\tisDirty: select( 'core/editor' ).isEditedPostDirty(),\n} ) )( UnsavedChangesWarning );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { IconButton } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport URLInput from './';\n\nclass URLInputButton extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.toggle = this.toggle.bind( this );\n\t\tthis.submitLink = this.submitLink.bind( this );\n\t\tthis.state = {\n\t\t\texpanded: false,\n\t\t};\n\t}\n\n\ttoggle() {\n\t\tthis.setState( { expanded: ! this.state.expanded } );\n\t}\n\n\tsubmitLink( event ) {\n\t\tevent.preventDefault();\n\t\tthis.toggle();\n\t}\n\n\trender() {\n\t\tconst { url, onChange } = this.props;\n\t\tconst { expanded } = this.state;\n\t\tconst buttonLabel = url ? __( 'Edit Link' ) : __( 'Insert Link' );\n\n\t\treturn (\n\t\t\t<div className=\"editor-url-input__button\">\n\t\t\t\t<IconButton\n\t\t\t\t\ticon=\"admin-links\"\n\t\t\t\t\tlabel={ buttonLabel }\n\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\tclassName={ classnames( 'components-toolbar__control', {\n\t\t\t\t\t\t'is-active': url,\n\t\t\t\t\t} ) }\n\t\t\t\t/>\n\t\t\t\t{ expanded &&\n\t\t\t\t\t<form\n\t\t\t\t\t\tclassName=\"editor-url-input__button-modal\"\n\t\t\t\t\t\tonSubmit={ this.submitLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"editor-url-input__button-modal-line\">\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tclassName=\"editor-url-input__back\"\n\t\t\t\t\t\t\t\ticon=\"arrow-left-alt\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<URLInput value={ url || '' } onChange={ onChange } />\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\ticon=\"editor-break\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nexport default URLInputButton;\n","/**\n * External dependencies\n */\nimport { throttle } from 'lodash';\nimport classnames from 'classnames';\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport { Spinner, withSpokenMessages, Popover } from '@wordpress/components';\nimport { withInstanceId } from '@wordpress/compose';\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\n\n// Since URLInput is rendered in the context of other inputs, but should be\n// considered a separate modal node, prevent keyboard events from propagating\n// as being considered from the input.\nconst stopEventPropagation = ( event ) => event.stopPropagation();\n\nclass URLInput extends Component {\n\tconstructor( { autocompleteRef } ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.autocompleteRef = autocompleteRef || createRef();\n\t\tthis.inputRef = createRef();\n\t\tthis.updateSuggestions = throttle( this.updateSuggestions.bind( this ), 200 );\n\n\t\tthis.suggestionNodes = [];\n\n\t\tthis.state = {\n\t\t\tposts: [],\n\t\t\tshowSuggestions: false,\n\t\t\tselectedSuggestion: null,\n\t\t};\n\t}\n\n\tcomponentDidUpdate() {\n\t\tconst { showSuggestions, selectedSuggestion } = this.state;\n\t\t// only have to worry about scrolling selected suggestion into view\n\t\t// when already expanded\n\t\tif ( showSuggestions && selectedSuggestion !== null && ! this.scrollingIntoView ) {\n\t\t\tthis.scrollingIntoView = true;\n\t\t\tscrollIntoView( this.suggestionNodes[ selectedSuggestion ], this.autocompleteRef.current, {\n\t\t\t\tonlyScrollIfNeeded: true,\n\t\t\t} );\n\n\t\t\tsetTimeout( () => {\n\t\t\t\tthis.scrollingIntoView = false;\n\t\t\t}, 100 );\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tdelete this.suggestionsRequest;\n\t}\n\n\tbindSuggestionNode( index ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.suggestionNodes[ index ] = ref;\n\t\t};\n\t}\n\n\tupdateSuggestions( value ) {\n\t\t// Show the suggestions after typing at least 2 characters\n\t\t// and also for URLs\n\t\tif ( value.length < 2 || /^https?:/.test( value ) ) {\n\t\t\tthis.setState( {\n\t\t\t\tshowSuggestions: false,\n\t\t\t\tselectedSuggestion: null,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setState( {\n\t\t\tshowSuggestions: true,\n\t\t\tselectedSuggestion: null,\n\t\t\tloading: true,\n\t\t} );\n\n\t\tconst request = apiFetch( {\n\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\tsearch: value,\n\t\t\t\tper_page: 20,\n\t\t\t\ttype: 'post',\n\t\t\t} ),\n\t\t} );\n\n\t\trequest.then( ( posts ) => {\n\t\t\t// A fetch Promise doesn't have an abort option. It's mimicked by\n\t\t\t// comparing the request reference in on the instance, which is\n\t\t\t// reset or deleted on subsequent requests or unmounting.\n\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.setState( {\n\t\t\t\tposts,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\tif ( !! posts.length ) {\n\t\t\t\tthis.props.debouncedSpeak( sprintf( _n(\n\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\tposts.length\n\t\t\t\t), posts.length ), 'assertive' );\n\t\t\t} else {\n\t\t\t\tthis.props.debouncedSpeak( __( 'No results.' ), 'assertive' );\n\t\t\t}\n\t\t} ).catch( () => {\n\t\t\tif ( this.suggestionsRequest === request ) {\n\t\t\t\tthis.setState( {\n\t\t\t\t\tloading: false,\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\n\t\tthis.suggestionsRequest = request;\n\t}\n\n\tonChange( event ) {\n\t\tconst inputValue = event.target.value;\n\t\tthis.props.onChange( inputValue );\n\t\tthis.updateSuggestions( inputValue );\n\t}\n\n\tonKeyDown( event ) {\n\t\tconst { showSuggestions, selectedSuggestion, posts, loading } = this.state;\n\t\t// If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n\t\t// We shouldn't preventDefault to allow block arrow keys navigation\n\t\tif ( ! showSuggestions || ! posts.length || loading ) {\n\t\t\t// In the Windows version of Firefox the up and down arrows don't move the caret\n\t\t\t// within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n\t\t\t// a form of focus trapping that is disruptive to the user experience. This disruption\n\t\t\t// only happens if the caret is not in the first or last position in the text input.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t// When UP is pressed, if the caret is at the start of the text, move it to the 0\n\t\t\t\t// position.\n\t\t\t\tcase UP: {\n\t\t\t\t\tif ( 0 !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to position 0\n\t\t\t\t\t\tevent.target.setSelectionRange( 0, 0 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// When DOWN is pressed, if the caret is not at the end of the text, move it to the\n\t\t\t\t// last position.\n\t\t\t\tcase DOWN: {\n\t\t\t\t\tif ( this.props.value.length !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to the last position\n\t\t\t\t\t\tevent.target.setSelectionRange( this.props.value.length, this.props.value.length );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst post = this.state.posts[ this.state.selectedSuggestion ];\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase UP: {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst previousIndex = ! selectedSuggestion ? posts.length - 1 : selectedSuggestion - 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: previousIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DOWN: {\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst nextIndex = selectedSuggestion === null || ( selectedSuggestion === posts.length - 1 ) ? 0 : selectedSuggestion + 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: nextIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TAB: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( post );\n\t\t\t\t\t// Announce a link has been selected when tabbing away from the input field.\n\t\t\t\t\tthis.props.speak( __( 'Link selected' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ENTER: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis.selectLink( post );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tselectLink( post ) {\n\t\tthis.props.onChange( post.url, post );\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tshowSuggestions: false,\n\t\t} );\n\t}\n\n\thandleOnClick( post ) {\n\t\tthis.selectLink( post );\n\t\t// Move focus to the input field when a link suggestion is clicked.\n\t\tthis.inputRef.current.focus();\n\t}\n\n\trender() {\n\t\tconst { value = '', autoFocus = true, instanceId } = this.props;\n\t\tconst { showSuggestions, posts, selectedSuggestion, loading } = this.state;\n\t\t/* eslint-disable jsx-a11y/no-autofocus */\n\t\treturn (\n\t\t\t<div className=\"editor-url-input\">\n\t\t\t\t<input\n\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\taria-label={ __( 'URL' ) }\n\t\t\t\t\trequired\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ this.onChange }\n\t\t\t\t\tonInput={ stopEventPropagation }\n\t\t\t\t\tplaceholder={ __( 'Paste URL or type to search' ) }\n\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={ showSuggestions }\n\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\taria-owns={ `editor-url-input-suggestions-${ instanceId }` }\n\t\t\t\t\taria-activedescendant={ selectedSuggestion !== null ? `editor-url-input-suggestion-${ instanceId }-${ selectedSuggestion }` : undefined }\n\t\t\t\t\tref={ this.inputRef }\n\t\t\t\t/>\n\n\t\t\t\t{ ( loading ) && <Spinner /> }\n\n\t\t\t\t{ showSuggestions && !! posts.length &&\n\t\t\t\t\t<Popover position=\"bottom\" noArrow focusOnMount={ false }>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"editor-url-input__suggestions\"\n\t\t\t\t\t\t\tid={ `editor-url-input-suggestions-${ instanceId }` }\n\t\t\t\t\t\t\tref={ this.autocompleteRef }\n\t\t\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ posts.map( ( post, index ) => (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\tkey={ post.id }\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t\tid={ `editor-url-input-suggestion-${ instanceId }-${ index }` }\n\t\t\t\t\t\t\t\t\tref={ this.bindSuggestionNode( index ) }\n\t\t\t\t\t\t\t\t\tclassName={ classnames( 'editor-url-input__suggestion', {\n\t\t\t\t\t\t\t\t\t\t'is-selected': index === selectedSuggestion,\n\t\t\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t\t\t\tonClick={ () => this.handleOnClick( post ) }\n\t\t\t\t\t\t\t\t\taria-selected={ index === selectedSuggestion }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover>\n\t\t\t\t}\n\t\t\t</div>\n\t\t);\n\t\t/* eslint-enable jsx-a11y/no-autofocus */\n\t}\n}\n\nexport default withSpokenMessages( withInstanceId( URLInput ) );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport {\n\tPopover,\n\tIconButton,\n} from '@wordpress/components';\n\nclass URLPopover extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.toggleSettingsVisibility = this.toggleSettingsVisibility.bind( this );\n\n\t\tthis.state = {\n\t\t\tisSettingsExpanded: false,\n\t\t};\n\t}\n\n\ttoggleSettingsVisibility() {\n\t\tthis.setState( {\n\t\t\tisSettingsExpanded: ! this.state.isSettingsExpanded,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\trenderSettings,\n\t\t\tonClose,\n\t\t\tonClickOutside,\n\t\t\tposition = 'bottom center',\n\t\t\tfocusOnMount = 'firstElement',\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tisSettingsExpanded,\n\t\t} = this.state;\n\n\t\tconst showSettings = !! renderSettings && isSettingsExpanded;\n\n\t\treturn (\n\t\t\t<Popover\n\t\t\t\tclassName=\"editor-url-popover\"\n\t\t\t\tfocusOnMount={ focusOnMount }\n\t\t\t\tposition={ position }\n\t\t\t\tonClose={ onClose }\n\t\t\t\tonClickOutside={ onClickOutside }\n\t\t\t>\n\t\t\t\t<div className=\"editor-url-popover__row\">\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ !! renderSettings && (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\tclassName=\"editor-url-popover__settings-toggle\"\n\t\t\t\t\t\t\ticon=\"ellipsis\"\n\t\t\t\t\t\t\tlabel={ __( 'Link Settings' ) }\n\t\t\t\t\t\t\tonClick={ this.toggleSettingsVisibility }\n\t\t\t\t\t\t\taria-expanded={ isSettingsExpanded }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ showSettings && (\n\t\t\t\t\t<div className=\"editor-url-popover__row editor-url-popover__settings\">\n\t\t\t\t\t\t{ renderSettings() }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</Popover>\n\t\t);\n\t}\n}\n\nexport default URLPopover;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { Dropdown, IconButton, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nfunction Warning( { className, actions, children, secondaryActions } ) {\n\treturn (\n\t\t<div className={ classnames( className, 'editor-warning' ) }>\n\t\t\t<div className=\"editor-warning__contents\">\n\t\t\t\t<p className=\"editor-warning__message\">{ children }</p>\n\n\t\t\t\t{ Children.count( actions ) > 0 && (\n\t\t\t\t\t<div className=\"editor-warning__actions\">\n\t\t\t\t\t\t{ Children.map( actions, ( action, i ) => (\n\t\t\t\t\t\t\t<span key={ i } className=\"editor-warning__action\">\n\t\t\t\t\t\t\t\t{ action }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\n\t\t\t{ secondaryActions && (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-warning__secondary\"\n\t\t\t\t\tposition=\"bottom left\"\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\ticon=\"ellipsis\"\n\t\t\t\t\t\t\tlabel={ __( 'More options' ) }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t<MenuGroup label={ __( 'More options' ) }>\n\t\t\t\t\t\t\t{ secondaryActions.map( ( item, pos ) =>\n\t\t\t\t\t\t\t\t<MenuItem onClick={ item.onClick } key={ pos }>\n\t\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Warning;\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { count as wordCount } from '@wordpress/wordcount';\n\nfunction WordCount( { content } ) {\n\treturn (\n\t\t<span className=\"word-count\">{ wordCount( content, 'words' ) }</span>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tcontent: select( 'core/editor' ).getEditedPostAttribute( 'content' ),\n\t};\n} )( WordCount );\n","/**\n * External dependencies\n */\nimport { overEvery, find, findLast, reverse, first, last } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport {\n\tcomputeCaretRect,\n\tfocus,\n\tisHorizontalEdge,\n\tisTextField,\n\tisVerticalEdge,\n\tplaceCaretAtHorizontalEdge,\n\tplaceCaretAtVerticalEdge,\n\tisEntirelySelected,\n} from '@wordpress/dom';\nimport { UP, DOWN, LEFT, RIGHT, isKeyboardEvent } from '@wordpress/keycodes';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tisBlockFocusStop,\n\tisInSameBlock,\n\thasInnerBlocksContext,\n} from '../../utils/dom';\n\n/**\n * Browser constants\n */\n\nconst { getSelection } = window;\n\n/**\n * Given an element, returns true if the element is a tabbable text field, or\n * false otherwise.\n *\n * @param {Element} element Element to test.\n *\n * @return {boolean} Whether element is a tabbable text field.\n */\nconst isTabbableTextField = overEvery( [\n\tisTextField,\n\tfocus.tabbable.isTabbableIndex,\n] );\n\n/**\n * Returns true if the element should consider edge navigation upon a keyboard\n * event of the given directional key code, or false otherwise.\n *\n * @param {Element} element HTML element to test.\n * @param {number} keyCode KeyboardEvent keyCode to test.\n * @param {boolean} hasModifier Whether a modifier is pressed.\n *\n * @return {boolean} Whether element should consider edge navigation.\n */\nexport function isNavigationCandidate( element, keyCode, hasModifier ) {\n\tconst isVertical = ( keyCode === UP || keyCode === DOWN );\n\n\t// Currently, all elements support unmodified vertical navigation.\n\tif ( isVertical && ! hasModifier ) {\n\t\treturn true;\n\t}\n\n\t// Native inputs should not navigate horizontally.\n\tconst { tagName } = element;\n\treturn tagName !== 'INPUT' && tagName !== 'TEXTAREA';\n}\n\nclass WritingFlow extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\t\tthis.clearVerticalRect = this.clearVerticalRect.bind( this );\n\t\tthis.focusLastTextField = this.focusLastTextField.bind( this );\n\n\t\t/**\n\t\t * Here a rectangle is stored while moving the caret vertically so\n\t\t * vertical position of the start position can be restored.\n\t\t * This is to recreate browser behaviour across blocks.\n\t\t *\n\t\t * @type {?DOMRect}\n\t\t */\n\t\tthis.verticalRect = null;\n\t}\n\n\tbindContainer( ref ) {\n\t\tthis.container = ref;\n\t}\n\n\tclearVerticalRect() {\n\t\tthis.verticalRect = null;\n\t}\n\n\t/**\n\t * Returns the optimal tab target from the given focused element in the\n\t * desired direction. A preference is made toward text fields, falling back\n\t * to the block focus stop if no other candidates exist for the block.\n\t *\n\t * @param {Element} target Currently focused text field.\n\t * @param {boolean} isReverse True if considering as the first field.\n\t *\n\t * @return {?Element} Optimal tab target, if one exists.\n\t */\n\tgetClosestTabbable( target, isReverse ) {\n\t\t// Since the current focus target is not guaranteed to be a text field,\n\t\t// find all focusables. Tabbability is considered later.\n\t\tlet focusableNodes = focus.focusable.find( this.container );\n\n\t\tif ( isReverse ) {\n\t\t\tfocusableNodes = reverse( focusableNodes );\n\t\t}\n\n\t\t// Consider as candidates those focusables after the current target.\n\t\t// It's assumed this can only be reached if the target is focusable\n\t\t// (on its keydown event), so no need to verify it exists in the set.\n\t\tfocusableNodes = focusableNodes.slice( focusableNodes.indexOf( target ) + 1 );\n\n\t\tfunction isTabCandidate( node, i, array ) {\n\t\t\t// Not a candidate if the node is not tabbable.\n\t\t\tif ( ! focus.tabbable.isTabbableIndex( node ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Prefer text fields...\n\t\t\tif ( isTextField( node ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// ...but settle for block focus stop.\n\t\t\tif ( ! isBlockFocusStop( node ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// If element contains inner blocks, stop immediately at its focus\n\t\t\t// wrapper.\n\t\t\tif ( hasInnerBlocksContext( node ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// If navigating out of a block (in reverse), don't consider its\n\t\t\t// block focus stop.\n\t\t\tif ( node.contains( target ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// In case of block focus stop, check to see if there's a better\n\t\t\t// text field candidate within.\n\t\t\tfor ( let offset = 1, nextNode; ( nextNode = array[ i + offset ] ); offset++ ) {\n\t\t\t\t// Abort if no longer testing descendents of focus stop.\n\t\t\t\tif ( ! node.contains( nextNode ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Apply same tests by recursion. This is important to consider\n\t\t\t\t// nestable blocks where we don't want to settle for the inner\n\t\t\t\t// block focus stop.\n\t\t\t\tif ( isTabCandidate( nextNode, i + offset, array ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn find( focusableNodes, isTabCandidate );\n\t}\n\n\texpandSelection( isReverse ) {\n\t\tconst {\n\t\t\tselectedBlockClientId,\n\t\t\tselectionStartClientId,\n\t\t\tselectionBeforeEndClientId,\n\t\t\tselectionAfterEndClientId,\n\t\t} = this.props;\n\n\t\tconst nextSelectionEndClientId = isReverse ?\n\t\t\tselectionBeforeEndClientId :\n\t\t\tselectionAfterEndClientId;\n\n\t\tif ( nextSelectionEndClientId ) {\n\t\t\tthis.props.onMultiSelect(\n\t\t\t\tselectionStartClientId || selectedBlockClientId,\n\t\t\t\tnextSelectionEndClientId\n\t\t\t);\n\t\t}\n\t}\n\n\tmoveSelection( isReverse ) {\n\t\tconst { selectedFirstClientId, selectedLastClientId } = this.props;\n\n\t\tconst focusedBlockClientId = isReverse ? selectedFirstClientId : selectedLastClientId;\n\n\t\tif ( focusedBlockClientId ) {\n\t\t\tthis.props.onSelectBlock( focusedBlockClientId );\n\t\t}\n\t}\n\n\t/**\n\t * Returns true if the given target field is the last in its block which\n\t * can be considered for tab transition. For example, in a block with two\n\t * text fields, this would return true when reversing from the first of the\n\t * two fields, but false when reversing from the second.\n\t *\n\t * @param {Element} target Currently focused text field.\n\t * @param {boolean} isReverse True if considering as the first field.\n\t *\n\t * @return {boolean} Whether field is at edge for tab transition.\n\t */\n\tisTabbableEdge( target, isReverse ) {\n\t\tconst closestTabbable = this.getClosestTabbable( target, isReverse );\n\t\treturn ! closestTabbable || ! isInSameBlock( target, closestTabbable );\n\t}\n\n\tonKeyDown( event ) {\n\t\tconst { hasMultiSelection, onMultiSelect, blocks } = this.props;\n\n\t\tconst { keyCode, target } = event;\n\t\tconst isUp = keyCode === UP;\n\t\tconst isDown = keyCode === DOWN;\n\t\tconst isLeft = keyCode === LEFT;\n\t\tconst isRight = keyCode === RIGHT;\n\t\tconst isReverse = isUp || isLeft;\n\t\tconst isHorizontal = isLeft || isRight;\n\t\tconst isVertical = isUp || isDown;\n\t\tconst isNav = isHorizontal || isVertical;\n\t\tconst isShift = event.shiftKey;\n\t\tconst hasModifier = isShift || event.ctrlKey || event.altKey || event.metaKey;\n\t\tconst isNavEdge = isVertical ? isVerticalEdge : isHorizontalEdge;\n\n\t\t// This logic inside this condition needs to be checked before\n\t\t// the check for event.nativeEvent.defaultPrevented.\n\t\t// The logic handles meta+a keypress and this event is default prevented by TinyMCE.\n\t\tif ( ! isNav ) {\n\t\t\t// Set immediately before the meta+a combination can be pressed.\n\t\t\tif ( isKeyboardEvent.primary( event ) ) {\n\t\t\t\tthis.isEntirelySelected = isEntirelySelected( target );\n\t\t\t}\n\n\t\t\tif ( isKeyboardEvent.primary( event, 'a' ) ) {\n\t\t\t\t// When the target is contentEditable, selection will already\n\t\t\t\t// have been set by TinyMCE earlier in this call stack. We need\n\t\t\t\t// check the previous result, otherwise all blocks will be\n\t\t\t\t// selected right away.\n\t\t\t\tif ( target.isContentEditable ? this.isEntirelySelected : isEntirelySelected( target ) ) {\n\t\t\t\t\tonMultiSelect( first( blocks ), last( blocks ) );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\t// After pressing primary + A we can assume isEntirelySelected is true.\n\t\t\t\t// Calling right away isEntirelySelected after primary + A may still return false on some browsers.\n\t\t\t\tthis.isEntirelySelected = true;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// Abort if navigation has already been handled (e.g. TinyMCE inline\n\t\t// boundaries).\n\t\tif ( event.nativeEvent.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Abort if our current target is not a candidate for navigation (e.g.\n\t\t// preserve native input behaviors).\n\t\tif ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! isVertical ) {\n\t\t\tthis.verticalRect = null;\n\t\t} else if ( ! this.verticalRect ) {\n\t\t\tthis.verticalRect = computeCaretRect( target );\n\t\t}\n\n\t\tif ( isShift && ( hasMultiSelection || (\n\t\t\tthis.isTabbableEdge( target, isReverse ) &&\n\t\t\tisNavEdge( target, isReverse )\n\t\t) ) ) {\n\t\t\t// Shift key is down, and there is multi selection or we're at the end of the current block.\n\t\t\tthis.expandSelection( isReverse );\n\t\t\tevent.preventDefault();\n\t\t} else if ( hasMultiSelection ) {\n\t\t\t// Moving from block multi-selection to single block selection\n\t\t\tthis.moveSelection( isReverse );\n\t\t\tevent.preventDefault();\n\t\t} else if ( isVertical && isVerticalEdge( target, isReverse ) ) {\n\t\t\tconst closestTabbable = this.getClosestTabbable( target, isReverse );\n\n\t\t\tif ( closestTabbable ) {\n\t\t\t\tplaceCaretAtVerticalEdge( closestTabbable, isReverse, this.verticalRect );\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t} else if ( isHorizontal && getSelection().isCollapsed && isHorizontalEdge( target, isReverse ) ) {\n\t\t\tconst closestTabbable = this.getClosestTabbable( target, isReverse );\n\t\t\tplaceCaretAtHorizontalEdge( closestTabbable, isReverse );\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\t/**\n\t * Sets focus to the end of the last tabbable text field, if one exists.\n\t */\n\tfocusLastTextField() {\n\t\tconst focusableNodes = focus.focusable.find( this.container );\n\t\tconst target = findLast( focusableNodes, isTabbableTextField );\n\t\tif ( target ) {\n\t\t\tplaceCaretAtHorizontalEdge( target, true );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children } = this.props;\n\n\t\t// Disable reason: Wrapper itself is non-interactive, but must capture\n\t\t// bubbling events from children to determine focus transition intents.\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t\treturn (\n\t\t\t<div className=\"editor-writing-flow\">\n\t\t\t\t<div\n\t\t\t\t\tref={ this.bindContainer }\n\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\tonMouseDown={ this.clearVerticalRect }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</div>\n\t\t\t\t<div\n\t\t\t\t\taria-hidden\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonClick={ this.focusLastTextField }\n\t\t\t\t\tclassName=\"wp-block editor-writing-flow__click-redirect\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetMultiSelectedBlocksStartClientId,\n\t\t\tgetMultiSelectedBlocksEndClientId,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t\tgetFirstMultiSelectedBlockClientId,\n\t\t\tgetLastMultiSelectedBlockClientId,\n\t\t\thasMultiSelection,\n\t\t\tgetBlockOrder,\n\t\t} = select( 'core/editor' );\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectionStartClientId = getMultiSelectedBlocksStartClientId();\n\t\tconst selectionEndClientId = getMultiSelectedBlocksEndClientId();\n\n\t\treturn {\n\t\t\tselectedBlockClientId,\n\t\t\tselectionStartClientId,\n\t\t\tselectionBeforeEndClientId: getPreviousBlockClientId( selectionEndClientId || selectedBlockClientId ),\n\t\t\tselectionAfterEndClientId: getNextBlockClientId( selectionEndClientId || selectedBlockClientId ),\n\t\t\tselectedFirstClientId: getFirstMultiSelectedBlockClientId(),\n\t\t\tselectedLastClientId: getLastMultiSelectedBlockClientId(),\n\t\t\thasMultiSelection: hasMultiSelection(),\n\t\t\tblocks: getBlockOrder(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { multiSelect, selectBlock } = dispatch( 'core/editor' );\n\t\treturn {\n\t\t\tonMultiSelect: multiSelect,\n\t\t\tonSelectBlock: selectBlock,\n\t\t};\n\t} ),\n] )( WritingFlow );\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\nexport { default as parse } from './parse';\nexport { default as stringify } from './stringify';\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n// http://www.w3.org/TR/CSS21/grammar.htm\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nexport default function( css, options ) {\n\toptions = options || {};\n\n\t/**\n * Positional.\n */\n\n\tlet lineno = 1;\n\tlet column = 1;\n\n\t/**\n * Update lineno and column based on `str`.\n */\n\n\tfunction updatePosition( str ) {\n\t\tconst lines = str.match( /\\n/g );\n\t\tif ( lines ) {\n\t\t\tlineno += lines.length;\n\t\t}\n\t\tconst i = str.lastIndexOf( '\\n' );\n\t\t// eslint-disable-next-line no-bitwise\n\t\tcolumn = ~i ? str.length - i : column + str.length;\n\t}\n\n\t/**\n * Mark position and patch `node.position`.\n */\n\n\tfunction position() {\n\t\tconst start = { line: lineno, column: column };\n\t\treturn function( node ) {\n\t\t\tnode.position = new Position( start );\n\t\t\twhitespace();\n\t\t\treturn node;\n\t\t};\n\t}\n\n\t/**\n * Store position information for a node\n */\n\n\tfunction Position( start ) {\n\t\tthis.start = start;\n\t\tthis.end = { line: lineno, column: column };\n\t\tthis.source = options.source;\n\t}\n\n\t/**\n * Non-enumerable source string\n */\n\n\tPosition.prototype.content = css;\n\n\t/**\n * Error `msg`.\n */\n\n\tconst errorsList = [];\n\n\tfunction error( msg ) {\n\t\tconst err = new Error( options.source + ':' + lineno + ':' + column + ': ' + msg );\n\t\terr.reason = msg;\n\t\terr.filename = options.source;\n\t\terr.line = lineno;\n\t\terr.column = column;\n\t\terr.source = css;\n\n\t\tif ( options.silent ) {\n\t\t\terrorsList.push( err );\n\t\t} else {\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n * Parse stylesheet.\n */\n\n\tfunction stylesheet() {\n\t\tconst rulesList = rules();\n\n\t\treturn {\n\t\t\ttype: 'stylesheet',\n\t\t\tstylesheet: {\n\t\t\t\tsource: options.source,\n\t\t\t\trules: rulesList,\n\t\t\t\tparsingErrors: errorsList,\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n * Opening brace.\n */\n\n\tfunction open() {\n\t\treturn match( /^{\\s*/ );\n\t}\n\n\t/**\n * Closing brace.\n */\n\n\tfunction close() {\n\t\treturn match( /^}/ );\n\t}\n\n\t/**\n * Parse ruleset.\n */\n\n\tfunction rules() {\n\t\tlet node;\n\t\tconst accumulator = [];\n\t\twhitespace();\n\t\tcomments( accumulator );\n\t\twhile ( css.length && css.charAt( 0 ) !== '}' && ( node = atrule() || rule() ) ) {\n\t\t\tif ( node !== false ) {\n\t\t\t\taccumulator.push( node );\n\t\t\t\tcomments( accumulator );\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}\n\n\t/**\n * Match `re` and return captures.\n */\n\n\tfunction match( re ) {\n\t\tconst m = re.exec( css );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst str = m[ 0 ];\n\t\tupdatePosition( str );\n\t\tcss = css.slice( str.length );\n\t\treturn m;\n\t}\n\n\t/**\n * Parse whitespace.\n */\n\n\tfunction whitespace() {\n\t\tmatch( /^\\s*/ );\n\t}\n\n\t/**\n * Parse comments;\n */\n\n\tfunction comments( accumulator ) {\n\t\tlet c;\n\t\taccumulator = accumulator || [];\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( c = comment() ) {\n\t\t\tif ( c !== false ) {\n\t\t\t\taccumulator.push( c );\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}\n\n\t/**\n * Parse comment.\n */\n\n\tfunction comment() {\n\t\tconst pos = position();\n\t\tif ( '/' !== css.charAt( 0 ) || '*' !== css.charAt( 1 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet i = 2;\n\t\twhile ( '' !== css.charAt( i ) && ( '*' !== css.charAt( i ) || '/' !== css.charAt( i + 1 ) ) ) {\n\t\t\t++i;\n\t\t}\n\t\ti += 2;\n\n\t\tif ( '' === css.charAt( i - 1 ) ) {\n\t\t\treturn error( 'End of comment missing' );\n\t\t}\n\n\t\tconst str = css.slice( 2, i - 2 );\n\t\tcolumn += 2;\n\t\tupdatePosition( str );\n\t\tcss = css.slice( i );\n\t\tcolumn += 2;\n\n\t\treturn pos( {\n\t\t\ttype: 'comment',\n\t\t\tcomment: str,\n\t\t} );\n\t}\n\n\t/**\n * Parse selector.\n */\n\n\tfunction selector() {\n\t\tconst m = match( /^([^{]+)/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\t/* @fix Remove all comments from selectors\n * http://ostermiller.org/findcomment.html */\n\t\treturn trim( m[ 0 ] )\n\t\t\t.replace( /\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '' )\n\t\t\t.replace( /\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function( matched ) {\n\t\t\t\treturn matched.replace( /,/g, '\\u200C' );\n\t\t\t} )\n\t\t\t.split( /\\s*(?![^(]*\\)),\\s*/ )\n\t\t\t.map( function( s ) {\n\t\t\t\treturn s.replace( /\\u200C/g, ',' );\n\t\t\t} );\n\t}\n\n\t/**\n * Parse declaration.\n */\n\n\tfunction declaration() {\n\t\tconst pos = position();\n\n\t\t// prop\n\t\tlet prop = match( /^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/ );\n\t\tif ( ! prop ) {\n\t\t\treturn;\n\t\t}\n\t\tprop = trim( prop[ 0 ] );\n\n\t\t// :\n\t\tif ( ! match( /^:\\s*/ ) ) {\n\t\t\treturn error( \"property missing ':'\" );\n\t\t}\n\n\t\t// val\n\t\tconst val = match( /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/ );\n\n\t\tconst ret = pos( {\n\t\t\ttype: 'declaration',\n\t\t\tproperty: prop.replace( commentre, '' ),\n\t\t\tvalue: val ? trim( val[ 0 ] ).replace( commentre, '' ) : '',\n\t\t} );\n\n\t\t// ;\n\t\tmatch( /^[;\\s]*/ );\n\n\t\treturn ret;\n\t}\n\n\t/**\n * Parse declarations.\n */\n\n\tfunction declarations() {\n\t\tconst decls = [];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"missing '{'\" );\n\t\t}\n\t\tcomments( decls );\n\n\t\t// declarations\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( decl = declaration() ) {\n\t\t\tif ( decl !== false ) {\n\t\t\t\tdecls.push( decl );\n\t\t\t\tcomments( decls );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"missing '}'\" );\n\t\t}\n\t\treturn decls;\n\t}\n\n\t/**\n * Parse keyframe.\n */\n\n\tfunction keyframe() {\n\t\tlet m;\n\t\tconst vals = [];\n\t\tconst pos = position();\n\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( m = match( /^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/ ) ) {\n\t\t\tvals.push( m[ 1 ] );\n\t\t\tmatch( /^,\\s*/ );\n\t\t}\n\n\t\tif ( ! vals.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'keyframe',\n\t\t\tvalues: vals,\n\t\t\tdeclarations: declarations(),\n\t\t} );\n\t}\n\n\t/**\n * Parse keyframes.\n */\n\n\tfunction atkeyframes() {\n\t\tconst pos = position();\n\t\tlet m = match( /^@([-\\w]+)?keyframes\\s*/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst vendor = m[ 1 ];\n\n\t\t// identifier\n\t\tm = match( /^([-\\w]+)\\s*/ );\n\t\tif ( ! m ) {\n\t\t\treturn error( '@keyframes missing name' );\n\t\t}\n\t\tconst name = m[ 1 ];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@keyframes missing '{'\" );\n\t\t}\n\n\t\tlet frame;\n\t\tlet frames = comments();\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( frame = keyframe() ) {\n\t\t\tframes.push( frame );\n\t\t\tframes = frames.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@keyframes missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'keyframes',\n\t\t\tname: name,\n\t\t\tvendor: vendor,\n\t\t\tkeyframes: frames,\n\t\t} );\n\t}\n\n\t/**\n * Parse supports.\n */\n\n\tfunction atsupports() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@supports *([^{]+)/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst supports = trim( m[ 1 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@supports missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@supports missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'supports',\n\t\t\tsupports: supports,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n * Parse host.\n */\n\n\tfunction athost() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@host\\s*/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@host missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@host missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'host',\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n * Parse media.\n */\n\n\tfunction atmedia() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@media *([^{]+)/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst media = trim( m[ 1 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@media missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@media missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'media',\n\t\t\tmedia: media,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n * Parse custom-media.\n */\n\n\tfunction atcustommedia() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'custom-media',\n\t\t\tname: trim( m[ 1 ] ),\n\t\t\tmedia: trim( m[ 2 ] ),\n\t\t} );\n\t}\n\n\t/**\n * Parse paged media.\n */\n\n\tfunction atpage() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@page */ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sel = selector() || [];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@page missing '{'\" );\n\t\t}\n\t\tlet decls = comments();\n\n\t\t// declarations\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( decl = declaration() ) {\n\t\t\tdecls.push( decl );\n\t\t\tdecls = decls.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@page missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'page',\n\t\t\tselectors: sel,\n\t\t\tdeclarations: decls,\n\t\t} );\n\t}\n\n\t/**\n * Parse document.\n */\n\n\tfunction atdocument() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@([-\\w]+)?document *([^{]+)/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst vendor = trim( m[ 1 ] );\n\t\tconst doc = trim( m[ 2 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@document missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@document missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'document',\n\t\t\tdocument: doc,\n\t\t\tvendor: vendor,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n * Parse font-face.\n */\n\n\tfunction atfontface() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@font-face\\s*/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@font-face missing '{'\" );\n\t\t}\n\t\tlet decls = comments();\n\n\t\t// declarations\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( decl = declaration() ) {\n\t\t\tdecls.push( decl );\n\t\t\tdecls = decls.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@font-face missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'font-face',\n\t\t\tdeclarations: decls,\n\t\t} );\n\t}\n\n\t/**\n * Parse import\n */\n\n\tconst atimport = _compileAtrule( 'import' );\n\n\t/**\n * Parse charset\n */\n\n\tconst atcharset = _compileAtrule( 'charset' );\n\n\t/**\n * Parse namespace\n */\n\n\tconst atnamespace = _compileAtrule( 'namespace' );\n\n\t/**\n * Parse non-block at-rules\n */\n\n\tfunction _compileAtrule( name ) {\n\t\tconst re = new RegExp( '^@' + name + '\\\\s*([^;]+);' );\n\t\treturn function() {\n\t\t\tconst pos = position();\n\t\t\tconst m = match( re );\n\t\t\tif ( ! m ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst ret = { type: name };\n\t\t\tret[ name ] = m[ 1 ].trim();\n\t\t\treturn pos( ret );\n\t\t};\n\t}\n\n\t/**\n * Parse at rule.\n */\n\n\tfunction atrule() {\n\t\tif ( css[ 0 ] !== '@' ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn atkeyframes() ||\n atmedia() ||\n atcustommedia() ||\n atsupports() ||\n atimport() ||\n atcharset() ||\n atnamespace() ||\n atdocument() ||\n atpage() ||\n athost() ||\n atfontface();\n\t}\n\n\t/**\n * Parse rule.\n */\n\n\tfunction rule() {\n\t\tconst pos = position();\n\t\tconst sel = selector();\n\n\t\tif ( ! sel ) {\n\t\t\treturn error( 'selector missing' );\n\t\t}\n\t\tcomments();\n\n\t\treturn pos( {\n\t\t\ttype: 'rule',\n\t\t\tselectors: sel,\n\t\t\tdeclarations: declarations(),\n\t\t} );\n\t}\n\n\treturn addParent( stylesheet() );\n}\n\n/**\n * Trim `str`.\n */\n\nfunction trim( str ) {\n\treturn str ? str.replace( /^\\s+|\\s+$/g, '' ) : '';\n}\n\n/**\n * Adds non-enumerable parent node reference to each node.\n */\n\nfunction addParent( obj, parent ) {\n\tconst isNode = obj && typeof obj.type === 'string';\n\tconst childParent = isNode ? obj : parent;\n\n\tfor ( const k in obj ) {\n\t\tconst value = obj[ k ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\tvalue.forEach( function( v ) {\n\t\t\t\taddParent( v, childParent );\n\t\t\t} );\n\t\t} else if ( value && typeof value === 'object' ) {\n\t\t\taddParent( value, childParent );\n\t\t}\n\t}\n\n\tif ( isNode ) {\n\t\tObject.defineProperty( obj, 'parent', {\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: parent || null,\n\t\t} );\n\t}\n\n\treturn obj;\n}\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * Expose `Compiler`.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a compiler.\n *\n * @param {Type} name\n * @return {Type}\n * @api public\n */\n\nfunction Compiler( opts ) {\n\tthis.options = opts || {};\n}\n\n/**\n * Emit `str`\n */\n\nCompiler.prototype.emit = function( str ) {\n\treturn str;\n};\n\n/**\n * Visit `node`.\n */\n\nCompiler.prototype.visit = function( node ) {\n\treturn this[ node.type ]( node );\n};\n\n/**\n * Map visit over array of `nodes`, optionally using a `delim`\n */\n\nCompiler.prototype.mapVisit = function( nodes, delim ) {\n\tlet buf = '';\n\tdelim = delim || '';\n\n\tfor ( let i = 0, length = nodes.length; i < length; i++ ) {\n\t\tbuf += this.visit( nodes[ i ] );\n\t\tif ( delim && i < length - 1 ) {\n\t\t\tbuf += this.emit( delim );\n\t\t}\n\t}\n\n\treturn buf;\n};\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * External dependencies\n */\nimport inherits from 'inherits';\n\n/**\n * Internal dependencies\n */\nimport Base from './compiler';\n\n/**\n * Expose compiler.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a new `Compiler`.\n */\n\nfunction Compiler( options ) {\n\tBase.call( this, options );\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\ninherits( Compiler, Base );\n\n/**\n * Compile `node`.\n */\n\nCompiler.prototype.compile = function( node ) {\n\treturn node.stylesheet\n\t\t.rules.map( this.visit, this )\n\t\t.join( '' );\n};\n\n/**\n * Visit comment node.\n */\n\nCompiler.prototype.comment = function( node ) {\n\treturn this.emit( '', node.position );\n};\n\n/**\n * Visit import node.\n */\n\nCompiler.prototype.import = function( node ) {\n\treturn this.emit( '@import ' + node.import + ';', node.position );\n};\n\n/**\n * Visit media node.\n */\n\nCompiler.prototype.media = function( node ) {\n\treturn this.emit( '@media ' + node.media, node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.rules ) +\n this.emit( '}' );\n};\n\n/**\n * Visit document node.\n */\n\nCompiler.prototype.document = function( node ) {\n\tconst doc = '@' + ( node.vendor || '' ) + 'document ' + node.document;\n\n\treturn this.emit( doc, node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.rules ) +\n this.emit( '}' );\n};\n\n/**\n * Visit charset node.\n */\n\nCompiler.prototype.charset = function( node ) {\n\treturn this.emit( '@charset ' + node.charset + ';', node.position );\n};\n\n/**\n * Visit namespace node.\n */\n\nCompiler.prototype.namespace = function( node ) {\n\treturn this.emit( '@namespace ' + node.namespace + ';', node.position );\n};\n\n/**\n * Visit supports node.\n */\n\nCompiler.prototype.supports = function( node ) {\n\treturn this.emit( '@supports ' + node.supports, node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.rules ) +\n this.emit( '}' );\n};\n\n/**\n * Visit keyframes node.\n */\n\nCompiler.prototype.keyframes = function( node ) {\n\treturn this.emit( '@' +\n ( node.vendor || '' ) +\n 'keyframes ' +\n node.name, node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.keyframes ) +\n this.emit( '}' );\n};\n\n/**\n * Visit keyframe node.\n */\n\nCompiler.prototype.keyframe = function( node ) {\n\tconst decls = node.declarations;\n\n\treturn this.emit( node.values.join( ',' ), node.position ) +\n this.emit( '{' ) +\n this.mapVisit( decls ) +\n this.emit( '}' );\n};\n\n/**\n * Visit page node.\n */\n\nCompiler.prototype.page = function( node ) {\n\tconst sel = node.selectors.length ?\n\t\tnode.selectors.join( ', ' ) :\n\t\t'';\n\n\treturn this.emit( '@page ' + sel, node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.declarations ) +\n this.emit( '}' );\n};\n\n/**\n * Visit font-face node.\n */\n\nCompiler.prototype[ 'font-face' ] = function( node ) {\n\treturn this.emit( '@font-face', node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.declarations ) +\n this.emit( '}' );\n};\n\n/**\n * Visit host node.\n */\n\nCompiler.prototype.host = function( node ) {\n\treturn this.emit( '@host', node.position ) +\n this.emit( '{' ) +\n this.mapVisit( node.rules ) +\n this.emit( '}' );\n};\n\n/**\n * Visit custom-media node.\n */\n\nCompiler.prototype[ 'custom-media' ] = function( node ) {\n\treturn this.emit( '@custom-media ' + node.name + ' ' + node.media + ';', node.position );\n};\n\n/**\n * Visit rule node.\n */\n\nCompiler.prototype.rule = function( node ) {\n\tconst decls = node.declarations;\n\tif ( ! decls.length ) {\n\t\treturn '';\n\t}\n\n\treturn this.emit( node.selectors.join( ',' ), node.position ) +\n this.emit( '{' ) +\n this.mapVisit( decls ) +\n this.emit( '}' );\n};\n\n/**\n * Visit declaration node.\n */\n\nCompiler.prototype.declaration = function( node ) {\n\treturn this.emit( node.property + ':' + node.value, node.position ) + this.emit( ';' );\n};\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * External dependencies\n */\nimport inherits from 'inherits';\n\n/**\n * Internal dependencies\n */\nimport Base from './compiler';\n\n/**\n * Expose compiler.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a new `Compiler`.\n */\n\nfunction Compiler( options ) {\n\toptions = options || {};\n\tBase.call( this, options );\n\tthis.indentation = options.indent;\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\ninherits( Compiler, Base );\n\n/**\n * Compile `node`.\n */\n\nCompiler.prototype.compile = function( node ) {\n\treturn this.stylesheet( node );\n};\n\n/**\n * Visit stylesheet node.\n */\n\nCompiler.prototype.stylesheet = function( node ) {\n\treturn this.mapVisit( node.stylesheet.rules, '\\n\\n' );\n};\n\n/**\n * Visit comment node.\n */\n\nCompiler.prototype.comment = function( node ) {\n\treturn this.emit( this.indent() + '/*' + node.comment + '*/', node.position );\n};\n\n/**\n * Visit import node.\n */\n\nCompiler.prototype.import = function( node ) {\n\treturn this.emit( '@import ' + node.import + ';', node.position );\n};\n\n/**\n * Visit media node.\n */\n\nCompiler.prototype.media = function( node ) {\n\treturn (\n\t\tthis.emit( '@media ' + node.media, node.position ) +\n\t\tthis.emit(\n\t\t\t' {\\n' + this.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'\\n}'\n\t\t)\n\t);\n};\n\n/**\n * Visit document node.\n */\n\nCompiler.prototype.document = function( node ) {\n\tconst doc = '@' + ( node.vendor || '' ) + 'document ' + node.document;\n\n\treturn (\n\t\tthis.emit( doc, node.position ) +\n\t\tthis.emit(\n\t\t\t' ' +\n\t\t\t' {\\n' +\n\t\t\tthis.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'\\n}'\n\t\t)\n\t);\n};\n\n/**\n * Visit charset node.\n */\n\nCompiler.prototype.charset = function( node ) {\n\treturn this.emit( '@charset ' + node.charset + ';', node.position );\n};\n\n/**\n * Visit namespace node.\n */\n\nCompiler.prototype.namespace = function( node ) {\n\treturn this.emit( '@namespace ' + node.namespace + ';', node.position );\n};\n\n/**\n * Visit supports node.\n */\n\nCompiler.prototype.supports = function( node ) {\n\treturn (\n\t\tthis.emit( '@supports ' + node.supports, node.position ) +\n\t\tthis.emit(\n\t\t\t' {\\n' +\n\t\t\tthis.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'\\n}'\n\t\t)\n\t);\n};\n\n/**\n * Visit keyframes node.\n */\n\nCompiler.prototype.keyframes = function( node ) {\n\treturn (\n\t\tthis.emit( '@' + ( node.vendor || '' ) + 'keyframes ' + node.name, node.position ) +\n\t\tthis.emit(\n\t\t\t' {\\n' +\n\t\t\tthis.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( node.keyframes, '\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'}'\n\t\t)\n\t);\n};\n\n/**\n * Visit keyframe node.\n */\n\nCompiler.prototype.keyframe = function( node ) {\n\tconst decls = node.declarations;\n\n\treturn (\n\t\tthis.emit( this.indent() ) +\n\t\tthis.emit( node.values.join( ', ' ), node.position ) +\n\t\tthis.emit(\n\t\t\t' {\\n' +\n\t\t\tthis.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( decls, '\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'\\n' +\n\t\t\tthis.indent() + '}\\n'\n\t\t)\n\t);\n};\n\n/**\n * Visit page node.\n */\n\nCompiler.prototype.page = function( node ) {\n\tconst sel = node.selectors.length ?\n\t\tnode.selectors.join( ', ' ) + ' ' :\n\t\t'';\n\n\treturn this.emit( '@page ' + sel, node.position ) +\n this.emit( '{\\n' ) +\n this.emit( this.indent( 1 ) ) +\n this.mapVisit( node.declarations, '\\n' ) +\n this.emit( this.indent( -1 ) ) +\n this.emit( '\\n}' );\n};\n\n/**\n * Visit font-face node.\n */\n\nCompiler.prototype[ 'font-face' ] = function( node ) {\n\treturn this.emit( '@font-face ', node.position ) +\n this.emit( '{\\n' ) +\n this.emit( this.indent( 1 ) ) +\n this.mapVisit( node.declarations, '\\n' ) +\n this.emit( this.indent( -1 ) ) +\n this.emit( '\\n}' );\n};\n\n/**\n * Visit host node.\n */\n\nCompiler.prototype.host = function( node ) {\n\treturn (\n\t\tthis.emit( '@host', node.position ) +\n\t\tthis.emit(\n\t\t\t' {\\n' +\n\t\t\tthis.indent( 1 )\n\t\t) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit(\n\t\t\tthis.indent( -1 ) +\n\t\t\t'\\n}'\n\t\t)\n\t);\n};\n\n/**\n * Visit custom-media node.\n */\n\nCompiler.prototype[ 'custom-media' ] = function( node ) {\n\treturn this.emit( '@custom-media ' + node.name + ' ' + node.media + ';', node.position );\n};\n\n/**\n * Visit rule node.\n */\n\nCompiler.prototype.rule = function( node ) {\n\tconst indent = this.indent();\n\tconst decls = node.declarations;\n\tif ( ! decls.length ) {\n\t\treturn '';\n\t}\n\n\treturn this.emit( node.selectors.map( function( s ) {\n\t\treturn indent + s;\n\t} ).join( ',\\n' ), node.position ) +\n this.emit( ' {\\n' ) +\n this.emit( this.indent( 1 ) ) +\n this.mapVisit( decls, '\\n' ) +\n this.emit( this.indent( -1 ) ) +\n this.emit( '\\n' + this.indent() + '}' );\n};\n\n/**\n * Visit declaration node.\n */\n\nCompiler.prototype.declaration = function( node ) {\n\treturn this.emit( this.indent() ) +\n this.emit( node.property + ': ' + node.value, node.position ) +\n this.emit( ';' );\n};\n\n/**\n * Increase, decrease or return current indentation.\n */\n\nCompiler.prototype.indent = function( level ) {\n\tthis.level = this.level || 1;\n\n\tif ( null !== level ) {\n\t\tthis.level += level;\n\t\treturn '';\n\t}\n\n\treturn Array( this.level ).join( this.indentation || ' ' );\n};\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * Internal dependencies.\n */\nimport Compressed from './compress';\nimport Identity from './identity';\n\n/**\n * Stringfy the given AST `node`.\n *\n * Options:\n *\n * - `compress` space-optimized output\n * - `sourcemap` return an object with `.code` and `.map`\n *\n * @param {Object} node\n * @param {Object} [options]\n * @return {String}\n * @api public\n */\n\nexport default function( node, options ) {\n\toptions = options || {};\n\n\tconst compiler = options.compress ?\n\t\tnew Compressed( options ) :\n\t\tnew Identity( options );\n\n\tconst code = compiler.compile( node );\n\treturn code;\n}\n","export { default as traverse } from './traverse';\nexport { default as urlRewrite } from './transforms/url-rewrite';\nexport { default as wrap } from './transforms/wrap';\n","/**\n * External dependencies\n */\nimport { parse, resolve } from 'url';\n\n/**\n * Return `true` if the given path is http/https.\n *\n * @param {string} filePath path\n *\n * @return {boolean} is remote path.\n */\nfunction isRemotePath( filePath ) {\n\treturn /^(?:https?:)?\\/\\//.test( filePath );\n}\n\n/**\n * Return `true` if the given filePath is an absolute url.\n *\n * @param {string} filePath path\n *\n * @return {boolean} is absolute path.\n */\nfunction isAbsolutePath( filePath ) {\n\treturn /^\\/(?!\\/)/.test( filePath );\n}\n\n/**\n * Whether or not the url should be inluded.\n *\n * @param {Object} meta url meta info\n *\n * @return {boolean} is valid.\n */\nfunction isValidURL( meta ) {\n\t// ignore hashes or data uris\n\tif ( meta.value.indexOf( 'data:' ) === 0 || meta.value.indexOf( '#' ) === 0 ) {\n\t\treturn false;\n\t}\n\n\tif ( isAbsolutePath( meta.value ) ) {\n\t\treturn false;\n\t}\n\n\t// do not handle the http/https urls if `includeRemote` is false\n\tif ( isRemotePath( meta.value ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Get the absolute path of the url, relative to the basePath\n *\n * @param {string} str the url\n * @param {string} baseURL base URL\n * @param {string} absolutePath the absolute path\n *\n * @return {string} the full path to the file\n */\nfunction getResourcePath( str, baseURL ) {\n\tconst pathname = parse( str ).pathname;\n\tconst filePath = resolve( baseURL, pathname );\n\n\treturn filePath;\n}\n\n/**\n * Process the single `url()` pattern\n *\n * @param {string} baseURL the base URL for relative URLs\n * @return {Promise} the Promise\n */\nfunction processURL( baseURL ) {\n\treturn function( meta ) {\n\t\tconst URL = getResourcePath( meta.value, baseURL );\n\t\treturn {\n\t\t\t...meta,\n\t\t\tnewUrl:\n\t\t\t\t'url(' +\n\t\t\t\tmeta.before +\n\t\t\t\tmeta.quote +\n\t\t\t\tURL +\n\t\t\t\tmeta.quote +\n\t\t\t\tmeta.after +\n\t\t\t\t')',\n\t\t};\n\t};\n}\n\n/**\n * Get all `url()`s, and return the meta info\n *\n * @param {string} value decl.value\n *\n * @return {Array} the urls\n */\nfunction getURLs( value ) {\n\tconst reg = /url\\((\\s*)(['\"]?)(.+?)\\2(\\s*)\\)/g;\n\tlet match;\n\tconst URLs = [];\n\n\twhile ( ( match = reg.exec( value ) ) !== null ) {\n\t\tconst meta = {\n\t\t\tsource: match[ 0 ],\n\t\t\tbefore: match[ 1 ],\n\t\t\tquote: match[ 2 ],\n\t\t\tvalue: match[ 3 ],\n\t\t\tafter: match[ 4 ],\n\t\t};\n\t\tif ( isValidURL( meta ) ) {\n\t\t\tURLs.push( meta );\n\t\t}\n\t}\n\treturn URLs;\n}\n\n/**\n * Replace the raw value's `url()` segment to the new value\n *\n * @param {string} raw the raw value\n * @param {Array} URLs the URLs to replace\n *\n * @return {string} the new value\n */\nfunction replaceURLs( raw, URLs ) {\n\tURLs.forEach( ( item ) => {\n\t\traw = raw.replace( item.source, item.newUrl );\n\t} );\n\n\treturn raw;\n}\n\nconst rewrite = ( rootURL ) => ( node ) => {\n\tif ( node.type === 'declaration' ) {\n\t\tconst updatedURLs = getURLs( node.value ).map( processURL( rootURL ) );\n\t\treturn {\n\t\t\t...node,\n\t\t\tvalue: replaceURLs( node.value, updatedURLs ),\n\t\t};\n\t}\n\n\treturn node;\n};\n\nexport default rewrite;\n","/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * @const string IS_ROOT_TAG Regex to check if the selector is a root tag selector.\n */\nconst IS_ROOT_TAG = /^(body|html).*$/;\n\nconst wrap = ( namespace, ignore = [] ) => ( node ) => {\n\tconst updateSelector = ( selector ) => {\n\t\tif ( includes( ignore, selector.trim() ) ) {\n\t\t\treturn selector;\n\t\t}\n\n\t\t// Anything other than a root tag is always prefixed.\n\t\t{if ( ! selector.match( IS_ROOT_TAG ) ) {\n\t\t\treturn namespace + ' ' + selector;\n\t\t}}\n\n\t\t// HTML and Body elements cannot be contained within our container so lets extract their styles.\n\t\treturn selector.replace( /^(body|html)/, namespace );\n\t};\n\n\tif ( node.type === 'rule' ) {\n\t\treturn {\n\t\t\t...node,\n\t\t\tselectors: node.selectors.map( updateSelector ),\n\t\t};\n\t}\n\n\treturn node;\n};\n\nexport default wrap;\n","/**\n * External dependencies\n */\nimport { parse, stringify } from './ast';\nimport traverse from 'traverse';\n\nfunction traverseCSS( css, callback ) {\n\ttry {\n\t\tconst parsed = parse( css );\n\n\t\tconst updated = traverse.map( parsed, function( node ) {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t\tconst updatedNode = callback( node );\n\t\t\treturn this.update( updatedNode );\n\t\t} );\n\n\t\treturn stringify( updated );\n\t} catch ( err ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn( 'Error while traversing the CSS: ' + err );\n\n\t\treturn null;\n\t}\n}\n\nexport default traverseCSS;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { assign, get, has, includes, without } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport, getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { BlockControls, BlockAlignmentToolbar } from '../components';\n\n/**\n * An array which includes all possible valid alignments,\n * used to validate if an alignment is valid or not.\n *\n * @constant\n * @type {string[]}\n*/\nconst ALL_ALIGNMENTS = [ 'left', 'center', 'right', 'wide', 'full' ];\n\n/**\n * An array which includes all wide alignments.\n * In order for this alignments to be valid they need to be supported by the block,\n * and by the theme.\n *\n * @constant\n * @type {string[]}\n*/\nconst WIDE_ALIGNMENTS = [ 'wide', 'full' ];\n\n/**\n * Returns the valid alignments.\n * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockAlign Aligns supported by the block.\n * @param {?boolean} hasWideBlockSupport True if block supports wide alignments. And False otherwise.\n * @param {?boolean} hasWideEnabled True if theme supports wide alignments. And False otherwise.\n *\n * @return {string[]} Valid alignments.\n */\nexport function getValidAlignments( blockAlign, hasWideBlockSupport = true, hasWideEnabled = true ) {\n\tlet validAlignments;\n\tif ( Array.isArray( blockAlign ) ) {\n\t\tvalidAlignments = blockAlign;\n\t} else if ( blockAlign === true ) {\n\t\t// `true` includes all alignments...\n\t\tvalidAlignments = ALL_ALIGNMENTS;\n\t} else {\n\t\tvalidAlignments = [];\n\t}\n\n\tif (\n\t\t! hasWideEnabled ||\n\t\t( blockAlign === true && ! hasWideBlockSupport )\n\t) {\n\t\treturn without( validAlignments, ...WIDE_ALIGNMENTS );\n\t}\n\n\treturn validAlignments;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `align`.\n *\n * @param {Object} settings Original block settings\n * @return {Object} Filtered block settings\n */\nexport function addAttribute( settings ) {\n\t// allow blocks to specify their own attribute definition with default values if needed.\n\tif ( has( settings.attributes, [ 'align', 'type' ] ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'align' ) ) {\n\t\t// Use Lodash's assign to gracefully handle if attributes are undefined\n\t\tsettings.attributes = assign( settings.attributes, {\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include new toolbar controls for block\n * alignment, if block defines support.\n *\n * @param {Function} BlockEdit Original component\n * @return {Function} Wrapped component\n */\nexport const withToolbarControls = createHigherOrderComponent(\n\t( BlockEdit ) => (\n\t\t( props ) => {\n\t\t\tconst { name: blockName } = props;\n\t\t\t// Compute valid alignments without taking into account,\n\t\t\t// if the theme supports wide alignments or not.\n\t\t\t// BlockAlignmentToolbar takes into account the theme support.\n\t\t\tconst validAlignments = getValidAlignments(\n\t\t\t\tgetBlockSupport( blockName, 'align' ),\n\t\t\t\thasBlockSupport( blockName, 'alignWide', true ),\n\t\t\t);\n\n\t\t\tconst updateAlignment = ( nextAlign ) => {\n\t\t\t\tif ( ! nextAlign ) {\n\t\t\t\t\tconst blockType = getBlockType( props.name );\n\t\t\t\t\tconst blockDefaultAlign = get( blockType, [ 'attributes', 'align', 'default' ] );\n\t\t\t\t\tif ( blockDefaultAlign ) {\n\t\t\t\t\t\tnextAlign = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprops.setAttributes( { align: nextAlign } );\n\t\t\t};\n\n\t\t\treturn [\n\t\t\t\tvalidAlignments.length > 0 && props.isSelected && (\n\t\t\t\t\t<BlockControls key=\"align-controls\">\n\t\t\t\t\t\t<BlockAlignmentToolbar\n\t\t\t\t\t\t\tvalue={ props.attributes.align }\n\t\t\t\t\t\t\tonChange={ updateAlignment }\n\t\t\t\t\t\t\tcontrols={ validAlignments }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</BlockControls>\n\t\t\t\t),\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />,\n\t\t\t];\n\t\t}\n\t),\n\t'withToolbarControls'\n);\n\n// Exported just for testing purposes, not exported outside the module.\nexport const insideSelectWithDataAlign = ( BlockListBlock ) => (\n\t( props ) => {\n\t\tconst { block, hasWideEnabled } = props;\n\t\tconst { name: blockName } = block;\n\t\tconst { align } = block.attributes;\n\t\tconst validAlignments = getValidAlignments(\n\t\t\tgetBlockSupport( blockName, 'align' ),\n\t\t\thasBlockSupport( blockName, 'alignWide', true ),\n\t\t\thasWideEnabled\n\t\t);\n\n\t\tlet wrapperProps = props.wrapperProps;\n\t\tif ( includes( validAlignments, align ) ) {\n\t\t\twrapperProps = { ...wrapperProps, 'data-align': align };\n\t\t}\n\n\t\treturn <BlockListBlock { ...props } wrapperProps={ wrapperProps } />;\n\t}\n);\n\n/**\n * Override the default block element to add alignment wrapper props.\n *\n * @param {Function} BlockListBlock Original component\n * @return {Function} Wrapped component\n */\nexport const withDataAlign = createHigherOrderComponent(\n\tcompose( [\n\t\twithSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getEditorSettings } = select( 'core/editor' );\n\t\t\t\treturn {\n\t\t\t\t\thasWideEnabled: !! getEditorSettings().alignWide,\n\t\t\t\t};\n\t\t\t}\n\t\t),\n\t\tinsideSelectWithDataAlign,\n\t] )\n);\n\n/**\n * Override props assigned to save component to inject alignment class name if\n * block supports it.\n *\n * @param {Object} props Additional props applied to save element\n * @param {Object} blockType Block type\n * @param {Object} attributes Block attributes\n * @return {Object} Filtered props applied to save element\n */\nexport function addAssignedAlign( props, blockType, attributes ) {\n\tconst { align } = attributes;\n\tconst blockAlign = getBlockSupport( blockType, 'align' );\n\tconst hasWideBlockSupport = hasBlockSupport( blockType, 'alignWide', true );\n\tconst isAlignValid = includes(\n\t\t// Compute valid alignments without taking into account,\n\t\t// if the theme supports wide alignments or not.\n\t\t// This way changing themes does not impacts the block save.\n\t\tgetValidAlignments( blockAlign, hasWideBlockSupport ),\n\t\talign\n\t);\n\tif ( isAlignValid ) {\n\t\tprops.className = classnames( `align${ align }`, props.className );\n\t}\n\n\treturn props;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/align/addAttribute', addAttribute );\naddFilter( 'editor.BlockListBlock', 'core/editor/align/with-data-align', withDataAlign );\naddFilter( 'editor.BlockEdit', 'core/editor/align/with-toolbar-controls', withToolbarControls );\naddFilter( 'blocks.getSaveContent.extraProps', 'core/align/addAssignedAlign', addAssignedAlign );\n\n","/**\n * External dependencies\n */\nimport { assign } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { TextControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { InspectorAdvancedControls } from '../components';\n\n/**\n * Regular expression matching invalid anchor characters for replacement.\n *\n * @type {RegExp}\n */\nconst ANCHOR_REGEX = /[\\s#]/g;\n\n/**\n * Filters registered block settings, extending attributes with anchor using ID\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( hasBlockSupport( settings, 'anchor' ) ) {\n\t\t// Use Lodash's assign to gracefully handle if attributes are undefined\n\t\tsettings.attributes = assign( settings.attributes, {\n\t\t\tanchor: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tattribute: 'id',\n\t\t\t\tselector: '*',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning the anchor ID, if block supports anchor.\n *\n * @param {function|Component} BlockEdit Original component.\n *\n * @return {string} Wrapped component.\n */\nexport const withInspectorControl = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn ( props ) => {\n\t\tconst hasAnchor = hasBlockSupport( props.name, 'anchor' );\n\n\t\tif ( hasAnchor && props.isSelected ) {\n\t\t\treturn (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t\t<InspectorAdvancedControls>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __( 'HTML Anchor' ) }\n\t\t\t\t\t\t\thelp={ __( 'Anchors lets you link directly to a section on a page.' ) }\n\t\t\t\t\t\t\tvalue={ props.attributes.anchor || '' }\n\t\t\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\t\t\tnextValue = nextValue.replace( ANCHOR_REGEX, '-' );\n\t\t\t\t\t\t\t\tprops.setAttributes( {\n\t\t\t\t\t\t\t\t\tanchor: nextValue,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} } />\n\t\t\t\t\t</InspectorAdvancedControls>\n\t\t\t\t</Fragment>\n\t\t\t);\n\t\t}\n\n\t\treturn <BlockEdit { ...props } />;\n\t};\n}, 'withInspectorControl' );\n\n/**\n * Override props assigned to save component to inject anchor ID, if block\n * supports anchor. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockSupport( blockType, 'anchor' ) ) {\n\t\textraProps.id = attributes.anchor;\n\t}\n\n\treturn extraProps;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/anchor/attribute', addAttribute );\naddFilter( 'editor.BlockEdit', 'core/editor/anchor/with-inspector-control', withInspectorControl );\naddFilter( 'blocks.getSaveContent.extraProps', 'core/anchor/save-props', addSaveProps );\n","/**\n * External dependencies\n */\nimport { assign, difference, omit } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { TextControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\thasBlockSupport,\n\tparseWithAttributeSchema,\n\tgetSaveContent,\n} from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { InspectorAdvancedControls } from '../components';\n\n/**\n * Filters registered block settings, extending attributes with anchor using ID\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( hasBlockSupport( settings, 'customClassName', true ) ) {\n\t\t// Use Lodash's assign to gracefully handle if attributes are undefined\n\t\tsettings.attributes = assign( settings.attributes, {\n\t\t\tclassName: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning the custom class name, if block supports custom class name.\n *\n * @param {function|Component} BlockEdit Original component.\n *\n * @return {string} Wrapped component.\n */\nexport const withInspectorControl = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn ( props ) => {\n\t\tconst hasCustomClassName = hasBlockSupport( props.name, 'customClassName', true );\n\t\tif ( hasCustomClassName && props.isSelected ) {\n\t\t\treturn (\n\t\t\t\t<Fragment>\n\t\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t\t<InspectorAdvancedControls>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\tlabel={ __( 'Additional CSS Class' ) }\n\t\t\t\t\t\t\tvalue={ props.attributes.className || '' }\n\t\t\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\t\t\tprops.setAttributes( {\n\t\t\t\t\t\t\t\t\tclassName: nextValue,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InspectorAdvancedControls>\n\t\t\t\t</Fragment>\n\t\t\t);\n\t\t}\n\n\t\treturn <BlockEdit { ...props } />;\n\t};\n}, 'withInspectorControl' );\n\n/**\n * Override props assigned to save component to inject anchor ID, if block\n * supports anchor. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockSupport( blockType, 'customClassName', true ) && attributes.className ) {\n\t\textraProps.className = classnames( extraProps.className, attributes.className );\n\t}\n\n\treturn extraProps;\n}\n\n/**\n * Given an HTML string, returns an array of class names assigned to the root\n * element in the markup.\n *\n * @param {string} innerHTML Markup string from which to extract classes.\n *\n * @return {string[]} Array of class names assigned to the root element.\n */\nexport function getHTMLRootElementClasses( innerHTML ) {\n\tinnerHTML = `<div data-custom-class-name>${ innerHTML }</div>`;\n\n\tconst parsed = parseWithAttributeSchema( innerHTML, {\n\t\ttype: 'string',\n\t\tsource: 'attribute',\n\t\tselector: '[data-custom-class-name] > *',\n\t\tattribute: 'class',\n\t} );\n\n\treturn parsed ? parsed.trim().split( /\\s+/ ) : [];\n}\n\n/**\n * Given a parsed set of block attributes, if the block supports custom class\n * names and an unknown class (per the block's serialization behavior) is\n * found, the unknown classes are treated as custom classes. This prevents the\n * block from being considered as invalid.\n *\n * @param {Object} blockAttributes Original block attributes.\n * @param {Object} blockType Block type settings.\n * @param {string} innerHTML Original block markup.\n *\n * @return {Object} Filtered block attributes.\n */\nexport function addParsedDifference( blockAttributes, blockType, innerHTML ) {\n\tif ( hasBlockSupport( blockType, 'customClassName', true ) ) {\n\t\t// To determine difference, serialize block given the known set of\n\t\t// attributes, with the exception of `className`. This will determine\n\t\t// the default set of classes. From there, any difference in innerHTML\n\t\t// can be considered as custom classes.\n\t\tconst attributesSansClassName = omit( blockAttributes, [ 'className' ] );\n\t\tconst serialized = getSaveContent( blockType, attributesSansClassName );\n\t\tconst defaultClasses = getHTMLRootElementClasses( serialized );\n\t\tconst actualClasses = getHTMLRootElementClasses( innerHTML );\n\t\tconst customClasses = difference( actualClasses, defaultClasses );\n\n\t\tif ( customClasses.length ) {\n\t\t\tblockAttributes.className = customClasses.join( ' ' );\n\t\t} else if ( serialized ) {\n\t\t\tdelete blockAttributes.className;\n\t\t}\n\t}\n\n\treturn blockAttributes;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/custom-class-name/attribute', addAttribute );\naddFilter( 'editor.BlockEdit', 'core/editor/custom-class-name/with-inspector-control', withInspectorControl );\naddFilter( 'blocks.getSaveContent.extraProps', 'core/custom-class-name/save-props', addSaveProps );\naddFilter( 'blocks.getBlockAttributes', 'core/custom-class-name/addParsedDifference', addParsedDifference );\n","/**\n * External dependencies\n */\nimport { clone, once } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { getDefaultBlockName } from '@wordpress/blocks';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { blockAutocompleter, userAutocompleter } from '../components';\n\nconst defaultAutocompleters = [ userAutocompleter ];\n\nconst fetchReusableBlocks = once( () => dispatch( 'core/editor' ).__experimentalFetchReusableBlocks() );\n\nfunction setDefaultCompleters( completers, blockName ) {\n\tif ( ! completers ) {\n\t\t// Provide copies so filters may directly modify them.\n\t\tcompleters = defaultAutocompleters.map( clone );\n\t\t// Add blocks autocompleter for Paragraph block\n\t\tif ( blockName === getDefaultBlockName() ) {\n\t\t\tcompleters.push( clone( blockAutocompleter ) );\n\n\t\t\t/*\n\t\t\t * NOTE: This is a hack to help ensure reusable blocks are loaded\n\t\t\t * so they may be included in the block completer. It can be removed\n\t\t\t * once we have a way for completers to Promise options while\n\t\t\t * store-based data dependencies are being resolved.\n\t\t\t */\n\t\t\tfetchReusableBlocks();\n\t\t}\n\t}\n\treturn completers;\n}\n\naddFilter(\n\t'editor.Autocomplete.completers',\n\t'editor/autocompleters/set-default-completers',\n\tsetDefaultCompleters\n);\n","/**\n * External dependencies\n */\nimport { uniq } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Override props assigned to save component to inject generated className if\n * block supports it. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType Block type.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addGeneratedClassName( extraProps, blockType ) {\n\t// Adding the generated className\n\tif ( hasBlockSupport( blockType, 'className', true ) ) {\n\t\tif ( typeof extraProps.className === 'string' ) {\n\t\t\t// We have some extra classes and want to add the default classname\n\t\t\t// We use uniq to prevent duplicate classnames\n\n\t\t\textraProps.className = uniq( [\n\t\t\t\tgetBlockDefaultClassName( blockType.name ),\n\t\t\t\t...extraProps.className.split( ' ' ),\n\t\t\t] ).join( ' ' ).trim();\n\t\t} else {\n\t\t\t// There is no string in the className variable,\n\t\t\t// so we just dump the default name in there\n\t\t\textraProps.className = getBlockDefaultClassName( blockType.name );\n\t\t}\n\t}\n\treturn extraProps;\n}\n\naddFilter( 'blocks.getSaveContent.extraProps', 'core/generated-class-name/save-props', addGeneratedClassName );\n","/**\n * Internal dependencies\n */\nimport './align';\nimport './anchor';\nimport './custom-class-name';\nimport './default-autocompleters';\nimport './generated-class-name';\n","/**\n * WordPress dependencies\n */\nimport '@wordpress/blocks';\nimport '@wordpress/core-data';\nimport '@wordpress/notices';\nimport '@wordpress/nux';\nimport '@wordpress/rich-text';\nimport '@wordpress/viewport';\n\n/**\n * Internal dependencies\n */\nimport './store';\nimport './hooks';\n\nexport * from './components';\nexport * from './utils';\n","/**\n * External Dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { getDefaultBlockName, createBlock } from '@wordpress/blocks';\n\n/**\n * Returns an action object used in signalling that editor has initialized with\n * the specified post object and editor settings.\n *\n * @param {Object} post Post object.\n * @param {Object} edits Initial edited attributes object.\n *\n * @return {Object} Action object.\n */\nexport function setupEditor( post, edits ) {\n\treturn {\n\t\ttype: 'SETUP_EDITOR',\n\t\tpost,\n\t\tedits,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the latest version of the\n * post has been received, either by initialization or save.\n *\n * @param {Object} post Post object.\n *\n * @return {Object} Action object.\n */\nexport function resetPost( post ) {\n\treturn {\n\t\ttype: 'RESET_POST',\n\t\tpost,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the latest autosave of the\n * post has been received, by initialization or autosave.\n *\n * @param {Object} post Autosave post object.\n *\n * @return {Object} Action object.\n */\nexport function resetAutosave( post ) {\n\treturn {\n\t\ttype: 'RESET_AUTOSAVE',\n\t\tpost,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a patch of updates for the\n * latest version of the post have been received.\n *\n * @param {Object} edits Updated post fields.\n *\n * @return {Object} Action object.\n */\nexport function updatePost( edits ) {\n\treturn {\n\t\ttype: 'UPDATE_POST',\n\t\tedits,\n\t};\n}\n\n/**\n * Returns an action object used to setup the editor state when first opening an editor.\n *\n * @param {Object} post Post object.\n * @param {Array} blocks Array of blocks.\n *\n * @return {Object} Action object.\n */\nexport function setupEditorState( post, blocks ) {\n\treturn {\n\t\ttype: 'SETUP_EDITOR_STATE',\n\t\tpost,\n\t\tblocks,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that blocks state should be\n * reset to the specified array of blocks, taking precedence over any other\n * content reflected as an edit in state.\n *\n * @param {Array} blocks Array of blocks.\n *\n * @return {Object} Action object.\n */\nexport function resetBlocks( blocks ) {\n\treturn {\n\t\ttype: 'RESET_BLOCKS',\n\t\tblocks,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that blocks have been received.\n * Unlike resetBlocks, these should be appended to the existing known set, not\n * replacing.\n *\n * @param {Object[]} blocks Array of block objects.\n *\n * @return {Object} Action object.\n */\nexport function receiveBlocks( blocks ) {\n\treturn {\n\t\ttype: 'RECEIVE_BLOCKS',\n\t\tblocks,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block attributes with\n * the specified client ID has been updated.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} attributes Block attributes to be merged.\n *\n * @return {Object} Action object.\n */\nexport function updateBlockAttributes( clientId, attributes ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_ATTRIBUTES',\n\t\tclientId,\n\t\tattributes,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been updated.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} updates Block attributes to be merged.\n *\n * @return {Object} Action object.\n */\nexport function updateBlock( clientId, updates ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK',\n\t\tclientId,\n\t\tupdates,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been selected, optionally accepting a position\n * value reflecting its selection directionality. An initialPosition of -1\n * reflects a reverse selection.\n *\n * @param {string} clientId Block client ID.\n * @param {?number} initialPosition Optional initial position. Pass as -1 to\n * reflect reverse selection.\n *\n * @return {Object} Action object.\n */\nexport function selectBlock( clientId, initialPosition = null ) {\n\treturn {\n\t\ttype: 'SELECT_BLOCK',\n\t\tinitialPosition,\n\t\tclientId,\n\t};\n}\n\nexport function startMultiSelect() {\n\treturn {\n\t\ttype: 'START_MULTI_SELECT',\n\t};\n}\n\nexport function stopMultiSelect() {\n\treturn {\n\t\ttype: 'STOP_MULTI_SELECT',\n\t};\n}\n\nexport function multiSelect( start, end ) {\n\treturn {\n\t\ttype: 'MULTI_SELECT',\n\t\tstart,\n\t\tend,\n\t};\n}\n\nexport function clearSelectedBlock() {\n\treturn {\n\t\ttype: 'CLEAR_SELECTED_BLOCK',\n\t};\n}\n\n/**\n * Returns an action object that enables or disables block selection.\n *\n * @param {boolean} [isSelectionEnabled=true] Whether block selection should\n * be enabled.\n\n * @return {Object} Action object.\n */\nexport function toggleSelection( isSelectionEnabled = true ) {\n\treturn {\n\t\ttype: 'TOGGLE_SELECTION',\n\t\tisSelectionEnabled,\n\t};\n}\n\n/**\n * Returns an action object signalling that a blocks should be replaced with\n * one or more replacement blocks.\n *\n * @param {(string|string[])} clientIds Block client ID(s) to replace.\n * @param {(Object|Object[])} blocks Replacement block(s).\n *\n * @return {Object} Action object.\n */\nexport function replaceBlocks( clientIds, blocks ) {\n\treturn {\n\t\ttype: 'REPLACE_BLOCKS',\n\t\tclientIds: castArray( clientIds ),\n\t\tblocks: castArray( blocks ),\n\t\ttime: Date.now(),\n\t};\n}\n\n/**\n * Returns an action object signalling that a single block should be replaced\n * with one or more replacement blocks.\n *\n * @param {(string|string[])} clientId Block client ID to replace.\n * @param {(Object|Object[])} block Replacement block(s).\n *\n * @return {Object} Action object.\n */\nexport function replaceBlock( clientId, block ) {\n\treturn replaceBlocks( clientId, block );\n}\n\n/**\n * Higher-order action creator which, given the action type to dispatch creates\n * an action creator for managing block movement.\n *\n * @param {string} type Action type to dispatch.\n *\n * @return {Function} Action creator.\n */\nfunction createOnMove( type ) {\n\treturn ( clientIds, rootClientId ) => {\n\t\treturn {\n\t\t\tclientIds: castArray( clientIds ),\n\t\t\ttype,\n\t\t\trootClientId,\n\t\t};\n\t};\n}\n\nexport const moveBlocksDown = createOnMove( 'MOVE_BLOCKS_DOWN' );\nexport const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' );\n\n/**\n * Returns an action object signalling that an indexed block should be moved\n * to a new index.\n *\n * @param {?string} clientId The client ID of the block.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId Root client ID destination.\n * @param {number} index The index to move the block into.\n *\n * @return {Object} Action object.\n */\nexport function moveBlockToPosition( clientId, fromRootClientId, toRootClientId, index ) {\n\treturn {\n\t\ttype: 'MOVE_BLOCK_TO_POSITION',\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tclientId,\n\t\tindex,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a single block should be\n * inserted, optionally at a specific index respective a root block list.\n *\n * @param {Object} block Block object to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n *\n * @return {Object} Action object.\n */\nexport function insertBlock( block, index, rootClientId, updateSelection = true ) {\n\treturn insertBlocks( [ block ], index, rootClientId, updateSelection );\n}\n\n/**\n * Returns an action object used in signalling that an array of blocks should\n * be inserted, optionally at a specific index respective a root block list.\n *\n * @param {Object[]} blocks Block objects to insert.\n * @param {?number} index Index at which block should be inserted.\n * @param {?string} rootClientId Optional root cliente ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n *\n * @return {Object} Action object.\n */\nexport function insertBlocks( blocks, index, rootClientId, updateSelection = true ) {\n\treturn {\n\t\ttype: 'INSERT_BLOCKS',\n\t\tblocks: castArray( blocks ),\n\t\tindex,\n\t\trootClientId,\n\t\ttime: Date.now(),\n\t\tupdateSelection,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the insertion point should\n * be shown.\n *\n * @param {?string} rootClientId Optional root client ID of block list on\n * which to insert.\n * @param {?number} index Index at which block should be inserted.\n *\n * @return {Object} Action object.\n */\nexport function showInsertionPoint( rootClientId, index ) {\n\treturn {\n\t\ttype: 'SHOW_INSERTION_POINT',\n\t\trootClientId,\n\t\tindex,\n\t};\n}\n\n/**\n * Returns an action object hiding the insertion point.\n *\n * @return {Object} Action object.\n */\nexport function hideInsertionPoint() {\n\treturn {\n\t\ttype: 'HIDE_INSERTION_POINT',\n\t};\n}\n\n/**\n * Returns an action object resetting the template validity.\n *\n * @param {boolean} isValid template validity flag.\n *\n * @return {Object} Action object.\n */\nexport function setTemplateValidity( isValid ) {\n\treturn {\n\t\ttype: 'SET_TEMPLATE_VALIDITY',\n\t\tisValid,\n\t};\n}\n\n/**\n * Returns an action object synchronize the template with the list of blocks\n *\n * @return {Object} Action object.\n */\nexport function synchronizeTemplate() {\n\treturn {\n\t\ttype: 'SYNCHRONIZE_TEMPLATE',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that attributes of the post have\n * been edited.\n *\n * @param {Object} edits Post attributes to edit.\n *\n * @return {Object} Action object.\n */\nexport function editPost( edits ) {\n\treturn {\n\t\ttype: 'EDIT_POST',\n\t\tedits,\n\t};\n}\n\n/**\n * Returns an action object to save the post.\n *\n * @param {Object} options Options for the save.\n * @param {boolean} options.isAutosave Perform an autosave if true.\n *\n * @return {Object} Action object.\n */\nexport function savePost( options = {} ) {\n\treturn {\n\t\ttype: 'REQUEST_POST_UPDATE',\n\t\toptions,\n\t};\n}\n\nexport function refreshPost() {\n\treturn {\n\t\ttype: 'REFRESH_POST',\n\t};\n}\n\nexport function trashPost( postId, postType ) {\n\treturn {\n\t\ttype: 'TRASH_POST',\n\t\tpostId,\n\t\tpostType,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that two blocks should be merged\n *\n * @param {string} firstBlockClientId Client ID of the first block to merge.\n * @param {string} secondBlockClientId Client ID of the second block to merge.\n *\n * @return {Object} Action object.\n */\nexport function mergeBlocks( firstBlockClientId, secondBlockClientId ) {\n\treturn {\n\t\ttype: 'MERGE_BLOCKS',\n\t\tblocks: [ firstBlockClientId, secondBlockClientId ],\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the post should autosave.\n *\n * @param {Object?} options Extra flags to identify the autosave.\n *\n * @return {Object} Action object.\n */\nexport function autosave( options ) {\n\treturn savePost( { isAutosave: true, ...options } );\n}\n\n/**\n * Returns an action object used in signalling that undo history should\n * restore last popped state.\n *\n * @return {Object} Action object.\n */\nexport function redo() {\n\treturn { type: 'REDO' };\n}\n\n/**\n * Returns an action object used in signalling that undo history should pop.\n *\n * @return {Object} Action object.\n */\nexport function undo() {\n\treturn { type: 'UNDO' };\n}\n\n/**\n * Returns an action object used in signalling that undo history record should\n * be created.\n *\n * @return {Object} Action object.\n */\nexport function createUndoLevel() {\n\treturn { type: 'CREATE_UNDO_LEVEL' };\n}\n\n/**\n * Returns an action object used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * @param {string|string[]} clientIds Client IDs of blocks to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n *\n * @return {Object} Action object.\n */\nexport function removeBlocks( clientIds, selectPrevious = true ) {\n\treturn {\n\t\ttype: 'REMOVE_BLOCKS',\n\t\tclientIds: castArray( clientIds ),\n\t\tselectPrevious,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID is to be removed.\n *\n * @param {string} clientId Client ID of block to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n * selected when a block is removed.\n *\n * @return {Object} Action object.\n */\nexport function removeBlock( clientId, selectPrevious ) {\n\treturn removeBlocks( [ clientId ], selectPrevious );\n}\n\n/**\n * Returns an action object used to toggle the block editing mode between\n * visual and HTML modes.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Action object.\n */\nexport function toggleBlockMode( clientId ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_MODE',\n\t\tclientId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to type.\n *\n * @return {Object} Action object.\n */\nexport function startTyping() {\n\treturn {\n\t\ttype: 'START_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped typing.\n *\n * @return {Object} Action object.\n */\nexport function stopTyping() {\n\treturn {\n\t\ttype: 'STOP_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the caret has entered formatted text.\n *\n * @return {Object} Action object.\n */\nexport function enterFormattedText() {\n\treturn {\n\t\ttype: 'ENTER_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user caret has exited formatted text.\n *\n * @return {Object} Action object.\n */\nexport function exitFormattedText() {\n\treturn {\n\t\ttype: 'EXIT_FORMATTED_TEXT',\n\t};\n}\n\n/**\n * Returns an action object used to lock the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\n *\n * @return {Object} Action object.\n */\nexport function updatePostLock( lock ) {\n\treturn {\n\t\ttype: 'UPDATE_POST_LOCK',\n\t\tlock,\n\t};\n}\n\n/**\n * Returns an action object used to fetch a single reusable block or all\n * reusable blocks from the REST API into the store.\n *\n * @param {?string} id If given, only a single reusable block with this ID will\n * be fetched.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalFetchReusableBlocks( id ) {\n\treturn {\n\t\ttype: 'FETCH_REUSABLE_BLOCKS',\n\t\tid,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that reusable blocks have been\n * received. `results` is an array of objects containing:\n * - `reusableBlock` - Details about how the reusable block is persisted.\n * - `parsedBlock` - The original block.\n *\n * @param {Object[]} results Reusable blocks received.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalReceiveReusableBlocks( results ) {\n\treturn {\n\t\ttype: 'RECEIVE_REUSABLE_BLOCKS',\n\t\tresults,\n\t};\n}\n\n/**\n * Returns an action object used to save a reusable block that's in the store to\n * the REST API.\n *\n * @param {Object} id The ID of the reusable block to save.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalSaveReusableBlock( id ) {\n\treturn {\n\t\ttype: 'SAVE_REUSABLE_BLOCK',\n\t\tid,\n\t};\n}\n\n/**\n * Returns an action object used to delete a reusable block via the REST API.\n *\n * @param {number} id The ID of the reusable block to delete.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalDeleteReusableBlock( id ) {\n\treturn {\n\t\ttype: 'DELETE_REUSABLE_BLOCK',\n\t\tid,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a reusable block's title is\n * to be updated.\n *\n * @param {number} id The ID of the reusable block to update.\n * @param {string} title The new title.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalUpdateReusableBlockTitle( id, title ) {\n\treturn {\n\t\ttype: 'UPDATE_REUSABLE_BLOCK_TITLE',\n\t\tid,\n\t\ttitle,\n\t};\n}\n\n/**\n * Returns an action object used to convert a reusable block into a static block.\n *\n * @param {string} clientId The client ID of the block to attach.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalConvertBlockToStatic( clientId ) {\n\treturn {\n\t\ttype: 'CONVERT_BLOCK_TO_STATIC',\n\t\tclientId,\n\t};\n}\n\n/**\n * Returns an action object used to convert a static block into a reusable block.\n *\n * @param {string} clientIds The client IDs of the block to detach.\n *\n * @return {Object} Action object.\n */\nexport function __experimentalConvertBlockToReusable( clientIds ) {\n\treturn {\n\t\ttype: 'CONVERT_BLOCK_TO_REUSABLE',\n\t\tclientIds: castArray( clientIds ),\n\t};\n}\n/**\n * Returns an action object used in signalling that a new block of the default\n * type should be added to the block list.\n *\n * @param {?Object} attributes Optional attributes of the block to assign.\n * @param {?string} rootClientId Optional root client ID of block list on which\n * to append.\n * @param {?number} index Optional index where to insert the default block\n *\n * @return {Object} Action object\n */\nexport function insertDefaultBlock( attributes, rootClientId, index ) {\n\tconst block = createBlock( getDefaultBlockName(), attributes );\n\n\treturn insertBlock( block, index, rootClientId );\n}\n\n/**\n * Returns an action object that changes the nested settings of a given block.\n *\n * @param {string} clientId Client ID of the block whose nested setting are\n * being received.\n * @param {Object} settings Object with the new settings for the nested block.\n *\n * @return {Object} Action object\n */\nexport function updateBlockListSettings( clientId, settings ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_LIST_SETTINGS',\n\t\tclientId,\n\t\tsettings,\n\t};\n}\n\n/*\n * Returns an action object used in signalling that the editor settings have been updated.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateEditorSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_EDITOR_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has enabled the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function enablePublishSidebar() {\n\treturn {\n\t\ttype: 'ENABLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has disabled the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function disablePublishSidebar() {\n\treturn {\n\t\ttype: 'DISABLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used to signal that post saving is locked.\n *\n * @param {string} lockName The lock name.\n *\n * @return {Object} Action object\n */\nexport function lockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that post saving is unlocked.\n *\n * @param {string} lockName The lock name.\n *\n * @return {Object} Action object\n */\nexport function unlockPostSaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_SAVING',\n\t\tlockName,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Insert one or multiple elements into a given position of an array.\n *\n * @param {Array} array Source array.\n * @param {*} elements Elements to insert.\n * @param {number} index Insert Position.\n *\n * @return {Array} Result.\n */\nexport function insertAt( array, elements, index ) {\n\treturn [\n\t\t...array.slice( 0, index ),\n\t\t...castArray( elements ),\n\t\t...array.slice( index ),\n\t];\n}\n\n/**\n * Moves an element in an array.\n *\n * @param {Array} array Source array.\n * @param {number} from Source index.\n * @param {number} to Destination index.\n * @param {number} count Number of elements to move.\n *\n * @return {Array} Result.\n */\nexport function moveTo( array, from, to, count = 1 ) {\n\tconst withoutMovedElements = [ ...array ];\n\twithoutMovedElements.splice( from, count );\n\treturn insertAt(\n\t\twithoutMovedElements,\n\t\tarray.slice( from, from + count ),\n\t\tto,\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n\tisPublishSidebarEnabled: true,\n};\n\n/**\n * The default editor settings\n *\n * alignWide boolean Enable/Disable Wide/Full Alignments\n * colors Array Palette colors\n * fontSizes Array Available font sizes\n * imageSizes Array Available image sizes\n * maxWidth number Max width to constraint resizing\n * blockTypes boolean|Array Allowed block types\n * hasFixedToolbar boolean Whether or not the editor toolbar is fixed\n * focusMode boolean Whether the focus mode is enabled or not\n * richEditingEnabled boolean Whether rich editing is enabled or not\n */\nexport const EDITOR_SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{\tname: __( 'Vivid red' ),\n\t\t\tslug: 'vivid-red',\n\t\t\tcolor: '#cf2e2e',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray' ),\n\t\t\tslug: 'very-light-gray',\n\t\t\tcolor: '#eeeeee',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very dark gray' ),\n\t\t\tslug: 'very-dark-gray',\n\t\t\tcolor: '#313131',\n\t\t},\n\t],\n\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 48,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', label: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', label: __( 'Medium' ) },\n\t\t{ slug: 'large', label: __( 'Large' ) },\n\t\t{ slug: 'full', label: __( 'Full Size' ) },\n\t],\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Whether richs editing is enabled or not.\n\trichEditingEnabled: true,\n};\n\n/**\n * Default initial edits state.\n *\n * @type {Object}\n */\nexport const INITIAL_EDITS_DEFAULTS = {};\n","/**\n * External dependencies\n */\nimport { compact, last, has } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport {\n\tparse,\n\tgetBlockType,\n\tswitchToBlockType,\n\tdoBlocksMatchTemplate,\n\tsynchronizeBlocksWithTemplate,\n} from '@wordpress/blocks';\nimport { _n, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tsetupEditorState,\n\treplaceBlocks,\n\tselectBlock,\n\tresetBlocks,\n\tsetTemplateValidity,\n\tinsertDefaultBlock,\n} from './actions';\nimport {\n\tgetBlock,\n\tgetBlockRootClientId,\n\tgetBlocks,\n\tgetBlockCount,\n\tgetPreviousBlockClientId,\n\tgetSelectedBlockClientId,\n\tgetSelectedBlockCount,\n\tgetTemplate,\n\tgetTemplateLock,\n\tisValidTemplate,\n} from './selectors';\nimport {\n\tfetchReusableBlocks,\n\tsaveReusableBlocks,\n\tdeleteReusableBlocks,\n\tconvertBlockToReusable,\n\tconvertBlockToStatic,\n\treceiveReusableBlocks,\n} from './effects/reusable-blocks';\nimport {\n\trequestPostUpdate,\n\trequestPostUpdateSuccess,\n\trequestPostUpdateFailure,\n\ttrashPost,\n\ttrashPostFailure,\n\trefreshPost,\n} from './effects/posts';\n\n/**\n * Block validity is a function of blocks state (at the point of a\n * reset) and the template setting. As a compromise to its placement\n * across distinct parts of state, it is implemented here as a side-\n * effect of the block reset action.\n *\n * @param {Object} action RESET_BLOCKS action.\n * @param {Object} store Store instance.\n *\n * @return {?Object} New validity set action if validity has changed.\n */\nexport function validateBlocksToTemplate( action, store ) {\n\tconst state = store.getState();\n\tconst template = getTemplate( state );\n\tconst templateLock = getTemplateLock( state );\n\n\t// Unlocked templates are considered always valid because they act\n\t// as default values only.\n\tconst isBlocksValidToTemplate = (\n\t\t! template ||\n\t\ttemplateLock !== 'all' ||\n\t\tdoBlocksMatchTemplate( action.blocks, template )\n\t);\n\n\t// Update if validity has changed.\n\tif ( isBlocksValidToTemplate !== isValidTemplate( state ) ) {\n\t\treturn setTemplateValidity( isBlocksValidToTemplate );\n\t}\n}\n\n/**\n * Effect handler which will return a block select action to select the block\n * occurring before the selected block in the previous state, unless it is the\n * same block or the action includes a falsey `selectPrevious` option flag.\n *\n * @param {Object} action Action which had initiated the effect handler.\n * @param {Object} store Store instance.\n *\n * @return {?Object} Block select action to select previous, if applicable.\n */\nexport function selectPreviousBlock( action, store ) {\n\t// if the action says previous block should not be selected don't do anything.\n\tif ( ! action.selectPrevious ) {\n\t\treturn;\n\t}\n\n\tconst firstRemovedBlockClientId = action.clientIds[ 0 ];\n\tconst state = store.getState();\n\tconst selectedBlockClientId = getSelectedBlockClientId( state );\n\n\t// recreate the state before the block was removed.\n\tconst previousState = { ...state, editor: { present: last( state.editor.past ) } };\n\n\t// rootClientId of the removed block.\n\tconst rootClientId = getBlockRootClientId( previousState, firstRemovedBlockClientId );\n\n\t// Client ID of the block that was before the removed block or the\n\t// rootClientId if the removed block was first amongst its siblings.\n\tconst blockClientIdToSelect = getPreviousBlockClientId( previousState, firstRemovedBlockClientId ) || rootClientId;\n\n\t// Dispatch select block action if the currently selected block\n\t// is not already the block we want to be selected.\n\tif ( blockClientIdToSelect !== selectedBlockClientId ) {\n\t\treturn selectBlock( blockClientIdToSelect, -1 );\n\t}\n}\n\n/**\n * Effect handler which will return a default block insertion action if there\n * are no other blocks at the root of the editor. This is expected to be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n *\n * @param {Object} action Action which had initiated the effect handler.\n * @param {Object} store Store instance.\n *\n * @return {?Object} Default block insert action, if no other blocks exist.\n */\nexport function ensureDefaultBlock( action, store ) {\n\tif ( ! getBlockCount( store.getState() ) ) {\n\t\treturn insertDefaultBlock();\n\t}\n}\n\nexport default {\n\tREQUEST_POST_UPDATE: ( action, store ) => {\n\t\trequestPostUpdate( action, store );\n\t},\n\tREQUEST_POST_UPDATE_SUCCESS: requestPostUpdateSuccess,\n\tREQUEST_POST_UPDATE_FAILURE: requestPostUpdateFailure,\n\tTRASH_POST: ( action, store ) => {\n\t\ttrashPost( action, store );\n\t},\n\tTRASH_POST_FAILURE: trashPostFailure,\n\tREFRESH_POST: ( action, store ) => {\n\t\trefreshPost( action, store );\n\t},\n\tMERGE_BLOCKS( action, store ) {\n\t\tconst { dispatch } = store;\n\t\tconst state = store.getState();\n\t\tconst [ firstBlockClientId, secondBlockClientId ] = action.blocks;\n\t\tconst blockA = getBlock( state, firstBlockClientId );\n\t\tconst blockB = getBlock( state, secondBlockClientId );\n\t\tconst blockType = getBlockType( blockA.name );\n\n\t\t// Only focus the previous block if it's not mergeable\n\t\tif ( ! blockType.merge ) {\n\t\t\tdispatch( selectBlock( blockA.clientId ) );\n\t\t\treturn;\n\t\t}\n\n\t\t// We can only merge blocks with similar types\n\t\t// thus, we transform the block to merge first\n\t\tconst blocksWithTheSameType = blockA.name === blockB.name ?\n\t\t\t[ blockB ] :\n\t\t\tswitchToBlockType( blockB, blockA.name );\n\n\t\t// If the block types can not match, do nothing\n\t\tif ( ! blocksWithTheSameType || ! blocksWithTheSameType.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Calling the merge to update the attributes and remove the block to be merged\n\t\tconst updatedAttributes = blockType.merge(\n\t\t\tblockA.attributes,\n\t\t\tblocksWithTheSameType[ 0 ].attributes\n\t\t);\n\n\t\tdispatch( selectBlock( blockA.clientId, -1 ) );\n\t\tdispatch( replaceBlocks(\n\t\t\t[ blockA.clientId, blockB.clientId ],\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t...blockA,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockA.attributes,\n\t\t\t\t\t\t...updatedAttributes,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...blocksWithTheSameType.slice( 1 ),\n\t\t\t]\n\t\t) );\n\t},\n\tSETUP_EDITOR( action, store ) {\n\t\tconst { post, edits } = action;\n\t\tconst state = store.getState();\n\n\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t// included as part of editor setup action. Assume edited content as\n\t\t// canonical if provided, falling back to post.\n\t\tlet content;\n\t\tif ( has( edits, [ 'content' ] ) ) {\n\t\t\tcontent = edits.content;\n\t\t} else {\n\t\t\tcontent = post.content.raw;\n\t\t}\n\n\t\tlet blocks = parse( content );\n\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tconst template = getTemplate( state );\n\t\tif ( isNewPost && template ) {\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t}\n\n\t\tconst setupAction = setupEditorState( post, blocks );\n\n\t\treturn compact( [\n\t\t\tsetupAction,\n\n\t\t\t// TODO: This is temporary, necessary only so long as editor setup\n\t\t\t// is a separate action from block resetting.\n\t\t\t//\n\t\t\t// See: https://github.com/WordPress/gutenberg/pull/9403\n\t\t\tvalidateBlocksToTemplate( setupAction, store ),\n\t\t] );\n\t},\n\tRESET_BLOCKS: [\n\t\tvalidateBlocksToTemplate,\n\t],\n\tSYNCHRONIZE_TEMPLATE( action, { getState } ) {\n\t\tconst state = getState();\n\t\tconst blocks = getBlocks( state );\n\t\tconst template = getTemplate( state );\n\t\tconst updatedBlockList = synchronizeBlocksWithTemplate( blocks, template );\n\n\t\treturn resetBlocks( updatedBlockList );\n\t},\n\tFETCH_REUSABLE_BLOCKS: ( action, store ) => {\n\t\tfetchReusableBlocks( action, store );\n\t},\n\tSAVE_REUSABLE_BLOCK: ( action, store ) => {\n\t\tsaveReusableBlocks( action, store );\n\t},\n\tDELETE_REUSABLE_BLOCK: ( action, store ) => {\n\t\tdeleteReusableBlocks( action, store );\n\t},\n\tRECEIVE_REUSABLE_BLOCKS: receiveReusableBlocks,\n\tCONVERT_BLOCK_TO_STATIC: convertBlockToStatic,\n\tCONVERT_BLOCK_TO_REUSABLE: convertBlockToReusable,\n\tREMOVE_BLOCKS: [\n\t\tselectPreviousBlock,\n\t\tensureDefaultBlock,\n\t],\n\tREPLACE_BLOCKS: [\n\t\tensureDefaultBlock,\n\t],\n\tMULTI_SELECT: ( action, { getState } ) => {\n\t\tconst blockCount = getSelectedBlockCount( getState() );\n\n\t\t/* translators: %s: number of selected blocks */\n\t\tspeak( sprintf( _n( '%s block selected.', '%s blocks selected.', blockCount ), blockCount ), 'assertive' );\n\t},\n};\n","/**\n * External dependencies\n */\nimport { BEGIN, COMMIT, REVERT } from 'redux-optimist';\nimport { get, pick, includes } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { __ } from '@wordpress/i18n';\n// TODO: Ideally this would be the only dispatch in scope. This requires either\n// refactoring editor actions to yielded controls, or replacing direct dispatch\n// on the editor store with action creators (e.g. `REQUEST_POST_UPDATE_START`).\nimport { dispatch as dataDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tresetAutosave,\n\tresetPost,\n\tupdatePost,\n} from '../actions';\nimport {\n\tgetCurrentPost,\n\tgetPostEdits,\n\tgetEditedPostContent,\n\tgetAutosave,\n\tgetCurrentPostType,\n\tisEditedPostSaveable,\n\tisEditedPostNew,\n\tPOST_UPDATE_TRANSACTION_ID,\n} from '../selectors';\nimport { resolveSelector } from './utils';\n\n/**\n * Module Constants\n */\nexport const SAVE_POST_NOTICE_ID = 'SAVE_POST_NOTICE_ID';\nconst TRASH_POST_NOTICE_ID = 'TRASH_POST_NOTICE_ID';\n\n/**\n * Request Post Update Effect handler\n *\n * @param {Object} action the fetchReusableBlocks action object.\n * @param {Object} store Redux Store.\n */\nexport const requestPostUpdate = async ( action, store ) => {\n\tconst { dispatch, getState } = store;\n\tconst state = getState();\n\tconst post = getCurrentPost( state );\n\tconst isAutosave = !! action.options.isAutosave;\n\n\t// Prevent save if not saveable.\n\t// We don't check for dirtiness here as this can be overriden in the UI.\n\tif ( ! isEditedPostSaveable( state ) ) {\n\t\treturn;\n\t}\n\n\tlet edits = getPostEdits( state );\n\tif ( isAutosave ) {\n\t\tedits = pick( edits, [ 'title', 'content', 'excerpt' ] );\n\t}\n\n\t// New posts (with auto-draft status) must be explicitly assigned draft\n\t// status if there is not already a status assigned in edits (publish).\n\t// Otherwise, they are wrongly left as auto-draft. Status is not always\n\t// respected for autosaves, so it cannot simply be included in the pick\n\t// above. This behavior relies on an assumption that an auto-draft post\n\t// would never be saved by anyone other than the owner of the post, per\n\t// logic within autosaves REST controller to save status field only for\n\t// draft/auto-draft by current user.\n\t//\n\t// See: https://core.trac.wordpress.org/ticket/43316#comment:88\n\t// See: https://core.trac.wordpress.org/ticket/43316#comment:89\n\tif ( isEditedPostNew( state ) ) {\n\t\tedits = { status: 'draft', ...edits };\n\t}\n\n\tlet toSend = {\n\t\t...edits,\n\t\tcontent: getEditedPostContent( state ),\n\t\tid: post.id,\n\t};\n\n\tconst postType = await resolveSelector( 'core', 'getPostType', getCurrentPostType( state ) );\n\n\tdispatch( {\n\t\ttype: 'REQUEST_POST_UPDATE_START',\n\t\toptimist: { type: BEGIN, id: POST_UPDATE_TRANSACTION_ID },\n\t\toptions: action.options,\n\t} );\n\n\t// Optimistically apply updates under the assumption that the post\n\t// will be updated. See below logic in success resolution for revert\n\t// if the autosave is applied as a revision.\n\tdispatch( {\n\t\t...updatePost( toSend ),\n\t\toptimist: { id: POST_UPDATE_TRANSACTION_ID },\n\t} );\n\n\tlet request;\n\tif ( isAutosave ) {\n\t\t// Ensure autosaves contain all expected fields, using autosave or\n\t\t// post values as fallback if not otherwise included in edits.\n\t\ttoSend = {\n\t\t\t...pick( post, [ 'title', 'content', 'excerpt' ] ),\n\t\t\t...getAutosave( state ),\n\t\t\t...toSend,\n\t\t};\n\n\t\trequest = apiFetch( {\n\t\t\tpath: `/wp/v2/${ postType.rest_base }/${ post.id }/autosaves`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: toSend,\n\t\t} );\n\t} else {\n\t\tdataDispatch( 'core/notices' ).removeNotice( SAVE_POST_NOTICE_ID );\n\t\tdataDispatch( 'core/notices' ).removeNotice( 'autosave-exists' );\n\n\t\trequest = apiFetch( {\n\t\t\tpath: `/wp/v2/${ postType.rest_base }/${ post.id }`,\n\t\t\tmethod: 'PUT',\n\t\t\tdata: toSend,\n\t\t} );\n\t}\n\n\ttry {\n\t\tconst newPost = await request;\n\t\tconst reset = isAutosave ? resetAutosave : resetPost;\n\t\tdispatch( reset( newPost ) );\n\n\t\t// An autosave may be processed by the server as a regular save\n\t\t// when its update is requested by the author and the post was\n\t\t// draft or auto-draft.\n\t\tconst isRevision = newPost.id !== post.id;\n\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_POST_UPDATE_SUCCESS',\n\t\t\tpreviousPost: post,\n\t\t\tpost: newPost,\n\t\t\toptimist: {\n\t\t\t\t// Note: REVERT is not a failure case here. Rather, it\n\t\t\t\t// is simply reversing the assumption that the updates\n\t\t\t\t// were applied to the post proper, such that the post\n\t\t\t\t// treated as having unsaved changes.\n\t\t\t\ttype: isRevision ? REVERT : COMMIT,\n\t\t\t\tid: POST_UPDATE_TRANSACTION_ID,\n\t\t\t},\n\t\t\toptions: action.options,\n\t\t\tpostType,\n\t\t} );\n\t} catch ( error ) {\n\t\tdispatch( {\n\t\t\ttype: 'REQUEST_POST_UPDATE_FAILURE',\n\t\t\toptimist: { type: REVERT, id: POST_UPDATE_TRANSACTION_ID },\n\t\t\tpost,\n\t\t\tedits,\n\t\t\terror,\n\t\t\toptions: action.options,\n\t\t} );\n\t}\n};\n\n/**\n * Request Post Update Success Effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const requestPostUpdateSuccess = ( action ) => {\n\tconst { previousPost, post, postType } = action;\n\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( get( action.options, [ 'isAutosave' ] ) ) {\n\t\treturn;\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = includes( publishStatus, previousPost.status );\n\tconst willPublish = includes( publishStatus, post.status );\n\n\tlet noticeMessage;\n\tlet shouldShowLink = get( postType, [ 'viewable' ], false );\n\n\tif ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = null;\n\t} else if ( isPublished && ! willPublish ) {\n\t\t// If undoing publish status, show specific notice\n\t\tnoticeMessage = postType.labels.item_reverted_to_draft;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && willPublish ) {\n\t\t// If publishing or scheduling a post, show the corresponding\n\t\t// publish message\n\t\tnoticeMessage = {\n\t\t\tpublish: postType.labels.item_published,\n\t\t\tprivate: postType.labels.item_published_privately,\n\t\t\tfuture: postType.labels.item_scheduled,\n\t\t}[ post.status ];\n\t} else {\n\t\t// Generic fallback notice\n\t\tnoticeMessage = postType.labels.item_updated;\n\t}\n\n\tif ( noticeMessage ) {\n\t\tconst actions = [];\n\t\tif ( shouldShowLink ) {\n\t\t\tactions.push( {\n\t\t\t\tlabel: postType.labels.view_item,\n\t\t\t\turl: post.link,\n\t\t\t} );\n\t\t}\n\n\t\tdataDispatch( 'core/notices' ).createSuccessNotice(\n\t\t\tnoticeMessage,\n\t\t\t{\n\t\t\t\tid: SAVE_POST_NOTICE_ID,\n\t\t\t\tactions,\n\t\t\t}\n\t\t);\n\t}\n};\n\n/**\n * Request Post Update Failure Effect handler\n *\n * @param {Object} action action object.\n */\nexport const requestPostUpdateFailure = ( action ) => {\n\tconst { post, edits, error } = action;\n\n\tif ( error && 'rest_autosave_no_changes' === error.code ) {\n\t\t// Autosave requested a new autosave, but there were no changes. This shouldn't\n\t\t// result in an error notice for the user.\n\t\treturn;\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.indexOf( post.status ) !== -1;\n\t// If the post was being published, we show the corresponding publish error message\n\t// Unless we publish an \"updating failed\" message\n\tconst messages = {\n\t\tpublish: __( 'Publishing failed' ),\n\t\tprivate: __( 'Publishing failed' ),\n\t\tfuture: __( 'Scheduling failed' ),\n\t};\n\tconst noticeMessage = ! isPublished && publishStatus.indexOf( edits.status ) !== -1 ?\n\t\tmessages[ edits.status ] :\n\t\t__( 'Updating failed' );\n\n\tdataDispatch( 'core/notices' ).createErrorNotice( noticeMessage, {\n\t\tid: SAVE_POST_NOTICE_ID,\n\t} );\n};\n\n/**\n * Trash Post Effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const trashPost = async ( action, store ) => {\n\tconst { dispatch, getState } = store;\n\tconst { postId } = action;\n\tconst postTypeSlug = getCurrentPostType( getState() );\n\tconst postType = await resolveSelector( 'core', 'getPostType', postTypeSlug );\n\n\tdataDispatch( 'core/notices' ).removeNotice( TRASH_POST_NOTICE_ID );\n\ttry {\n\t\tawait apiFetch( { path: `/wp/v2/${ postType.rest_base }/${ postId }`, method: 'DELETE' } );\n\t\tconst post = getCurrentPost( getState() );\n\n\t\t// TODO: This should be an updatePost action (updating subsets of post properties),\n\t\t// But right now editPost is tied with change detection.\n\t\tdispatch( resetPost( { ...post, status: 'trash' } ) );\n\t} catch ( error ) {\n\t\tdispatch( {\n\t\t\t...action,\n\t\t\ttype: 'TRASH_POST_FAILURE',\n\t\t\terror,\n\t\t} );\n\t}\n};\n\n/**\n * Trash Post Failure Effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const trashPostFailure = ( action ) => {\n\tconst message = action.error.message && action.error.code !== 'unknown_error' ? action.error.message : __( 'Trashing failed' );\n\tdataDispatch( 'core/notices' ).createErrorNotice( message, {\n\t\tid: TRASH_POST_NOTICE_ID,\n\t} );\n};\n\n/**\n * Refresh Post Effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const refreshPost = async ( action, store ) => {\n\tconst { dispatch, getState } = store;\n\n\tconst state = getState();\n\tconst post = getCurrentPost( state );\n\tconst postTypeSlug = getCurrentPostType( getState() );\n\tconst postType = await resolveSelector( 'core', 'getPostType', postTypeSlug );\n\tconst newPost = await apiFetch( {\n\t\t// Timestamp arg allows caller to bypass browser caching, which is expected for this specific function.\n\t\tpath: `/wp/v2/${ postType.rest_base }/${ post.id }?context=edit&_timestamp=${ Date.now() }`,\n\t} );\n\tdispatch( resetPost( newPost ) );\n};\n","/**\n * External dependencies\n */\nimport { castArray, map, uniqueId } from 'lodash';\nimport { BEGIN, COMMIT, REVERT } from 'redux-optimist';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport {\n\tparse,\n\tserialize,\n\tcreateBlock,\n\tisReusableBlock,\n\tcloneBlock,\n} from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n// TODO: Ideally this would be the only dispatch in scope. This requires either\n// refactoring editor actions to yielded controls, or replacing direct dispatch\n// on the editor store with action creators (e.g. `REMOVE_REUSABLE_BLOCK`).\nimport { dispatch as dataDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\t__experimentalReceiveReusableBlocks as receiveReusableBlocksAction,\n\tremoveBlocks,\n\treplaceBlocks,\n\treceiveBlocks,\n\t__experimentalSaveReusableBlock as saveReusableBlock,\n} from '../actions';\nimport {\n\t__experimentalGetReusableBlock as getReusableBlock,\n\tgetBlock,\n\tgetBlocks,\n\tgetBlocksByClientId,\n} from '../selectors';\nimport { getPostRawValue } from '../reducer';\n\n/**\n * Module Constants\n */\nconst REUSABLE_BLOCK_NOTICE_ID = 'REUSABLE_BLOCK_NOTICE_ID';\n\n/**\n * Fetch Reusable Blocks Effect Handler.\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const fetchReusableBlocks = async ( action, store ) => {\n\tconst { id } = action;\n\tconst { dispatch } = store;\n\n\t// TODO: these are potentially undefined, this fix is in place\n\t// until there is a filter to not use reusable blocks if undefined\n\tconst postType = await apiFetch( { path: '/wp/v2/types/wp_block' } );\n\tif ( ! postType ) {\n\t\treturn;\n\t}\n\n\tlet result;\n\tif ( id ) {\n\t\tresult = apiFetch( { path: `/wp/v2/${ postType.rest_base }/${ id }` } );\n\t} else {\n\t\tresult = apiFetch( { path: `/wp/v2/${ postType.rest_base }?per_page=-1` } );\n\t}\n\n\ttry {\n\t\tconst reusableBlockOrBlocks = await result;\n\t\tdispatch( receiveReusableBlocksAction( map(\n\t\t\tcastArray( reusableBlockOrBlocks ),\n\t\t\t( post ) => {\n\t\t\t\tconst parsedBlocks = parse( post.content.raw );\n\t\t\t\treturn {\n\t\t\t\t\treusableBlock: {\n\t\t\t\t\t\tid: post.id,\n\t\t\t\t\t\ttitle: getPostRawValue( post.title ),\n\t\t\t\t\t},\n\t\t\t\t\tparsedBlock: parsedBlocks.length === 1 ?\n\t\t\t\t\t\tparsedBlocks[ 0 ] :\n\t\t\t\t\t\tcreateBlock( 'core/template', {}, parsedBlocks ),\n\t\t\t\t};\n\t\t\t}\n\t\t) ) );\n\n\t\tdispatch( {\n\t\t\ttype: 'FETCH_REUSABLE_BLOCKS_SUCCESS',\n\t\t\tid,\n\t\t} );\n\t} catch ( error ) {\n\t\tdispatch( {\n\t\t\ttype: 'FETCH_REUSABLE_BLOCKS_FAILURE',\n\t\t\tid,\n\t\t\terror,\n\t\t} );\n\t}\n};\n\n/**\n * Save Reusable Blocks Effect Handler.\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const saveReusableBlocks = async ( action, store ) => {\n\t// TODO: these are potentially undefined, this fix is in place\n\t// until there is a filter to not use reusable blocks if undefined\n\tconst postType = await apiFetch( { path: '/wp/v2/types/wp_block' } );\n\tif ( ! postType ) {\n\t\treturn;\n\t}\n\n\tconst { id } = action;\n\tconst { dispatch } = store;\n\tconst state = store.getState();\n\tconst { clientId, title, isTemporary } = getReusableBlock( state, id );\n\tconst reusableBlock = getBlock( state, clientId );\n\tconst content = serialize( reusableBlock.name === 'core/template' ? reusableBlock.innerBlocks : reusableBlock );\n\n\tconst data = isTemporary ? { title, content, status: 'publish' } : { id, title, content, status: 'publish' };\n\tconst path = isTemporary ? `/wp/v2/${ postType.rest_base }` : `/wp/v2/${ postType.rest_base }/${ id }`;\n\tconst method = isTemporary ? 'POST' : 'PUT';\n\n\ttry {\n\t\tconst updatedReusableBlock = await apiFetch( { path, data, method } );\n\t\tdispatch( {\n\t\t\ttype: 'SAVE_REUSABLE_BLOCK_SUCCESS',\n\t\t\tupdatedId: updatedReusableBlock.id,\n\t\t\tid,\n\t\t} );\n\t\tconst message = isTemporary ? __( 'Block created.' ) : __( 'Block updated.' );\n\t\tdataDispatch( 'core/notices' ).createSuccessNotice( message, {\n\t\t\tid: REUSABLE_BLOCK_NOTICE_ID,\n\t\t} );\n\t} catch ( error ) {\n\t\tdispatch( { type: 'SAVE_REUSABLE_BLOCK_FAILURE', id } );\n\t\tdataDispatch( 'core/notices' ).createErrorNotice( error.message, {\n\t\t\tid: REUSABLE_BLOCK_NOTICE_ID,\n\t\t} );\n\t}\n};\n\n/**\n * Delete Reusable Blocks Effect Handler.\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const deleteReusableBlocks = async ( action, store ) => {\n\t// TODO: these are potentially undefined, this fix is in place\n\t// until there is a filter to not use reusable blocks if undefined\n\tconst postType = await apiFetch( { path: '/wp/v2/types/wp_block' } );\n\tif ( ! postType ) {\n\t\treturn;\n\t}\n\n\tconst { id } = action;\n\tconst { getState, dispatch } = store;\n\n\t// Don't allow a reusable block with a temporary ID to be deleted\n\tconst reusableBlock = getReusableBlock( getState(), id );\n\tif ( ! reusableBlock || reusableBlock.isTemporary ) {\n\t\treturn;\n\t}\n\n\t// Remove any other blocks that reference this reusable block\n\tconst allBlocks = getBlocks( getState() );\n\tconst associatedBlocks = allBlocks.filter( ( block ) => isReusableBlock( block ) && block.attributes.ref === id );\n\tconst associatedBlockClientIds = associatedBlocks.map( ( block ) => block.clientId );\n\n\tconst transactionId = uniqueId();\n\n\tdispatch( {\n\t\ttype: 'REMOVE_REUSABLE_BLOCK',\n\t\tid,\n\t\toptimist: { type: BEGIN, id: transactionId },\n\t} );\n\n\t// Remove the parsed block.\n\tdispatch( removeBlocks( [\n\t\t...associatedBlockClientIds,\n\t\treusableBlock.clientId,\n\t] ) );\n\n\ttry {\n\t\tawait apiFetch( {\n\t\t\tpath: `/wp/v2/${ postType.rest_base }/${ id }`,\n\t\t\tmethod: 'DELETE',\n\t\t} );\n\t\tdispatch( {\n\t\t\ttype: 'DELETE_REUSABLE_BLOCK_SUCCESS',\n\t\t\tid,\n\t\t\toptimist: { type: COMMIT, id: transactionId },\n\t\t} );\n\t\tconst message = __( 'Block deleted.' );\n\t\tdataDispatch( 'core/notices' ).createSuccessNotice( message, {\n\t\t\tid: REUSABLE_BLOCK_NOTICE_ID,\n\t\t} );\n\t} catch ( error ) {\n\t\tdispatch( {\n\t\t\ttype: 'DELETE_REUSABLE_BLOCK_FAILURE',\n\t\t\tid,\n\t\t\toptimist: { type: REVERT, id: transactionId },\n\t\t} );\n\t\tdataDispatch( 'core/notices' ).createErrorNotice( error.message, {\n\t\t\tid: REUSABLE_BLOCK_NOTICE_ID,\n\t\t} );\n\t}\n};\n\n/**\n * Receive Reusable Blocks Effect Handler.\n *\n * @param {Object} action action object.\n * @return {Object} receive blocks action\n */\nexport const receiveReusableBlocks = ( action ) => {\n\treturn receiveBlocks( map( action.results, 'parsedBlock' ) );\n};\n\n/**\n * Convert a reusable block to a static block effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const convertBlockToStatic = ( action, store ) => {\n\tconst state = store.getState();\n\tconst oldBlock = getBlock( state, action.clientId );\n\tconst reusableBlock = getReusableBlock( state, oldBlock.attributes.ref );\n\tconst referencedBlock = getBlock( state, reusableBlock.clientId );\n\tlet newBlocks;\n\tif ( referencedBlock.name === 'core/template' ) {\n\t\tnewBlocks = referencedBlock.innerBlocks.map( ( innerBlock ) => cloneBlock( innerBlock ) );\n\t} else {\n\t\tnewBlocks = [ cloneBlock( referencedBlock ) ];\n\t}\n\tstore.dispatch( replaceBlocks( oldBlock.clientId, newBlocks ) );\n};\n\n/**\n * Convert a static block to a reusable block effect handler\n *\n * @param {Object} action action object.\n * @param {Object} store Redux Store.\n */\nexport const convertBlockToReusable = ( action, store ) => {\n\tconst { getState, dispatch } = store;\n\tlet parsedBlock;\n\tif ( action.clientIds.length === 1 ) {\n\t\tparsedBlock = getBlock( getState(), action.clientIds[ 0 ] );\n\t} else {\n\t\tparsedBlock = createBlock(\n\t\t\t'core/template',\n\t\t\t{},\n\t\t\tgetBlocksByClientId( getState(), action.clientIds )\n\t\t);\n\n\t\t// This shouldn't be necessary but at the moment\n\t\t// we expect the content of the shared blocks to live in the blocks state.\n\t\tdispatch( receiveBlocks( [ parsedBlock ] ) );\n\t}\n\n\tconst reusableBlock = {\n\t\tid: uniqueId( 'reusable' ),\n\t\tclientId: parsedBlock.clientId,\n\t\ttitle: __( 'Untitled Reusable Block' ),\n\t};\n\n\tdispatch( receiveReusableBlocksAction( [ {\n\t\treusableBlock,\n\t\tparsedBlock,\n\t} ] ) );\n\n\tdispatch( saveReusableBlock( reusableBlock.id ) );\n\n\tdispatch( replaceBlocks(\n\t\taction.clientIds,\n\t\tcreateBlock( 'core/block', {\n\t\t\tref: reusableBlock.id,\n\t\t} )\n\t) );\n\n\t// Re-add the original block to the store, since replaceBlock() will have removed it\n\tdispatch( receiveBlocks( [ parsedBlock ] ) );\n};\n","/**\n * WordPress dependencies\n */\nimport { select, subscribe } from '@wordpress/data';\n\n/**\n * Waits for the resolution of a selector before returning the selector's value.\n *\n * @param {string} namespace Store namespace.\n * @param {string} selectorName Selector name.\n * @param {Array} args Selector args.\n *\n * @return {Promise} Selector result.\n */\nexport function resolveSelector( namespace, selectorName, ...args ) {\n\treturn new Promise( ( resolve ) => {\n\t\tconst hasFinished = () => select( 'core/data' ).hasFinishedResolution( namespace, selectorName, args );\n\t\tconst getResult = () => select( namespace )[ selectorName ].apply( null, args );\n\n\t\t// We need to trigger the selector (to trigger the resolver)\n\t\tconst result = getResult();\n\t\tif ( hasFinished() ) {\n\t\t\treturn resolve( result );\n\t\t}\n\n\t\tconst unsubscribe = subscribe( () => {\n\t\t\tif ( hasFinished() ) {\n\t\t\t\tunsubscribe();\n\t\t\t\tresolve( getResult() );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","/**\n * WordPress Dependencies\n */\nimport { registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport applyMiddlewares from './middlewares';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\n\n/**\n * Module Constants\n */\nconst MODULE_KEY = 'core/editor';\n\nconst store = registerStore( MODULE_KEY, {\n\treducer,\n\tselectors,\n\tactions,\n\tpersist: [ 'preferences' ],\n} );\napplyMiddlewares( store );\n\nexport default store;\n","/**\n * External dependencies\n */\nimport refx from 'refx';\nimport multi from 'redux-multi';\nimport { flowRight } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport effects from './effects';\n\n/**\n * Applies the custom middlewares used specifically in the editor module.\n *\n * @param {Object} store Store Object.\n *\n * @return {Object} Update Store Object.\n */\nfunction applyMiddlewares( store ) {\n\tconst middlewares = [\n\t\trefx( effects ),\n\t\tmulti,\n\t];\n\n\tlet enhancedDispatch = () => {\n\t\tthrow new Error(\n\t\t\t'Dispatching while constructing your middleware is not allowed. ' +\n\t\t\t'Other middleware would not be applied to this dispatch.'\n\t\t);\n\t};\n\tlet chain = [];\n\n\tconst middlewareAPI = {\n\t\tgetState: store.getState,\n\t\tdispatch: ( ...args ) => enhancedDispatch( ...args ),\n\t};\n\tchain = middlewares.map( ( middleware ) => middleware( middlewareAPI ) );\n\tenhancedDispatch = flowRight( ...chain )( store.dispatch );\n\n\tstore.dispatch = enhancedDispatch;\n\treturn store;\n}\n\nexport default applyMiddlewares;\n","/**\n * External dependencies\n */\nimport optimist from 'redux-optimist';\nimport {\n\tflow,\n\treduce,\n\tfirst,\n\tlast,\n\tomit,\n\twithout,\n\tmapValues,\n\tomitBy,\n\tkeys,\n\tisEqual,\n\toverSome,\n\tget,\n} from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { isReusableBlock } from '@wordpress/blocks';\nimport { combineReducers } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport withHistory from '../utils/with-history';\nimport withChangeDetection from '../utils/with-change-detection';\nimport {\n\tPREFERENCES_DEFAULTS,\n\tEDITOR_SETTINGS_DEFAULTS,\n\tINITIAL_EDITS_DEFAULTS,\n} from './defaults';\nimport { insertAt, moveTo } from './array';\n\n/**\n * Set of post properties for which edits should assume a merging behavior,\n * assuming an object value.\n *\n * @type {Set}\n */\nconst EDIT_MERGE_PROPERTIES = new Set( [\n\t'meta',\n] );\n\n/**\n * Returns a post attribute value, flattening nested rendered content using its\n * raw value in place of its original object form.\n *\n * @param {*} value Original value.\n *\n * @return {*} Raw value.\n */\nexport function getPostRawValue( value ) {\n\tif ( value && 'object' === typeof value && 'raw' in value ) {\n\t\treturn value.raw;\n\t}\n\n\treturn value;\n}\n\n/**\n * Given an array of blocks, returns an object where each key is a nesting\n * context, the value of which is an array of block client IDs existing within\n * that nesting context.\n *\n * @param {Array} blocks Blocks to map.\n * @param {?string} rootClientId Assumed root client ID.\n *\n * @return {Object} Block order map object.\n */\nfunction mapBlockOrder( blocks, rootClientId = '' ) {\n\tconst result = { [ rootClientId ]: [] };\n\n\tblocks.forEach( ( block ) => {\n\t\tconst { clientId, innerBlocks } = block;\n\n\t\tresult[ rootClientId ].push( clientId );\n\n\t\tObject.assign( result, mapBlockOrder( innerBlocks, clientId ) );\n\t} );\n\n\treturn result;\n}\n\n/**\n * Given an array of blocks, returns an object containing all blocks, recursing\n * into inner blocks. Keys correspond to the block client ID, the value of\n * which is the block object.\n *\n * @param {Array} blocks Blocks to flatten.\n *\n * @return {Object} Flattened blocks object.\n */\nfunction getFlattenedBlocks( blocks ) {\n\tconst flattenedBlocks = {};\n\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\t// `innerBlocks` is redundant data which can fall out of sync, since\n\t\t// this is reflected in `blocks.order`, so exclude from appended block.\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\n\t\tstack.push( ...innerBlocks );\n\n\t\tflattenedBlocks[ block.clientId ] = block;\n\t}\n\n\treturn flattenedBlocks;\n}\n\n/**\n * Given a block order map object, returns *all* of the block client IDs that are\n * a descendant of the given root client ID.\n *\n * Calling this with `rootClientId` set to `''` results in a list of client IDs\n * that are in the post. That is, it excludes blocks like fetched reusable\n * blocks which are stored into state but not visible.\n *\n * @param {Object} blocksOrder Object that maps block client IDs to a list of\n * nested block client IDs.\n * @param {?string} rootClientId The root client ID to search. Defaults to ''.\n *\n * @return {Array} List of descendant client IDs.\n */\nfunction getNestedBlockClientIds( blocksOrder, rootClientId = '' ) {\n\treturn reduce( blocksOrder[ rootClientId ], ( result, clientId ) => [\n\t\t...result,\n\t\tclientId,\n\t\t...getNestedBlockClientIds( blocksOrder, clientId ),\n\t], [] );\n}\n\n/**\n * Returns an object against which it is safe to perform mutating operations,\n * given the original object and its current working copy.\n *\n * @param {Object} original Original object.\n * @param {Object} working Working object.\n *\n * @return {Object} Mutation-safe object.\n */\nfunction getMutateSafeObject( original, working ) {\n\tif ( original === working ) {\n\t\treturn { ...original };\n\t}\n\n\treturn working;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\treturn isEqual( keys( a ), keys( b ) );\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are updating the same block attribute, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same block attribute.\n */\nexport function isUpdatingSameBlockAttribute( action, previousAction ) {\n\treturn (\n\t\taction.type === 'UPDATE_BLOCK_ATTRIBUTES' &&\n\t\taction.clientId === previousAction.clientId &&\n\t\thasSameKeys( action.attributes, previousAction.attributes )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are editing the same post property, or\n * false otherwise.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same post property.\n */\nexport function isUpdatingSamePostProperty( action, previousAction ) {\n\treturn (\n\t\taction.type === 'EDIT_POST' &&\n\t\thasSameKeys( action.edits, previousAction.edits )\n\t);\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are modifying the same property such that\n * undo history should be batched.\n *\n * @param {Object} action Currently dispatching action.\n * @param {Object} previousAction Previously dispatched action.\n *\n * @return {boolean} Whether to overwrite present state.\n */\nexport function shouldOverwriteState( action, previousAction ) {\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn overSome( [\n\t\tisUpdatingSameBlockAttribute,\n\t\tisUpdatingSamePostProperty,\n\t] )( action, previousAction );\n}\n\n/**\n * Higher-order reducer targeting the combined editor reducer, augmenting\n * block client IDs in remove action to include cascade of inner blocks.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withInnerBlocksRemoveCascade = ( reducer ) => ( state, action ) => {\n\tif ( state && action.type === 'REMOVE_BLOCKS' ) {\n\t\tconst clientIds = [ ...action.clientIds ];\n\n\t\t// For each removed client ID, include its inner blocks to remove,\n\t\t// recursing into those so long as inner blocks exist.\n\t\tfor ( let i = 0; i < clientIds.length; i++ ) {\n\t\t\tclientIds.push( ...state.blocks.order[ clientIds[ i ] ] );\n\t\t}\n\n\t\taction = { ...action, clientIds };\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Higher-order reducer which targets the combined blocks reducer and handles\n * the `RESET_BLOCKS` action. When dispatched, this action will replace all\n * blocks that exist in the post, leaving blocks that exist only in state (e.g.\n * reusable blocks) alone.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withBlockReset = ( reducer ) => ( state, action ) => {\n\tif ( state && action.type === 'RESET_BLOCKS' ) {\n\t\tconst visibleClientIds = getNestedBlockClientIds( state.order );\n\t\treturn {\n\t\t\t...state,\n\t\t\tbyClientId: {\n\t\t\t\t...omit( state.byClientId, visibleClientIds ),\n\t\t\t\t...getFlattenedBlocks( action.blocks ),\n\t\t\t},\n\t\t\torder: {\n\t\t\t\t...omit( state.order, visibleClientIds ),\n\t\t\t\t...mapBlockOrder( action.blocks ),\n\t\t\t},\n\t\t};\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Undoable reducer returning the editor post state, including blocks parsed\n * from current HTML markup.\n *\n * Handles the following state keys:\n * - edits: an object describing changes to be made to the current post, in\n * the format accepted by the WP REST API\n * - blocks: post content blocks\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @returns {Object} Updated state.\n */\nexport const editor = flow( [\n\tcombineReducers,\n\n\twithInnerBlocksRemoveCascade,\n\n\t// Track undo history, starting at editor initialization.\n\twithHistory( {\n\t\tresetTypes: [ 'SETUP_EDITOR_STATE' ],\n\t\tignoreTypes: [ 'RECEIVE_BLOCKS', 'RESET_POST', 'UPDATE_POST' ],\n\t\tshouldOverwriteState,\n\t} ),\n] )( {\n\tedits( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'EDIT_POST':\n\t\t\t\treturn reduce( action.edits, ( result, value, key ) => {\n\t\t\t\t\t// Only assign into result if not already same value\n\t\t\t\t\tif ( value !== state[ key ] ) {\n\t\t\t\t\t\tresult = getMutateSafeObject( state, result );\n\n\t\t\t\t\t\tif ( EDIT_MERGE_PROPERTIES.has( key ) ) {\n\t\t\t\t\t\t\t// Merge properties should assign to current value.\n\t\t\t\t\t\t\tresult[ key ] = { ...result[ key ], ...value };\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Otherwise override.\n\t\t\t\t\t\t\tresult[ key ] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn result;\n\t\t\t\t}, state );\n\n\t\t\tcase 'RESET_BLOCKS':\n\t\t\t\tif ( 'content' in state ) {\n\t\t\t\t\treturn omit( state, 'content' );\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\n\t\t\tcase 'UPDATE_POST':\n\t\t\tcase 'RESET_POST':\n\t\t\t\tconst getCanonicalValue = action.type === 'UPDATE_POST' ?\n\t\t\t\t\t( key ) => action.edits[ key ] :\n\t\t\t\t\t( key ) => getPostRawValue( action.post[ key ] );\n\n\t\t\t\treturn reduce( state, ( result, value, key ) => {\n\t\t\t\t\tif ( ! isEqual( value, getCanonicalValue( key ) ) ) {\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}\n\n\t\t\t\t\tresult = getMutateSafeObject( state, result );\n\t\t\t\t\tdelete result[ key ];\n\t\t\t\t\treturn result;\n\t\t\t\t}, state );\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tblocks: flow( [\n\t\tcombineReducers,\n\n\t\twithBlockReset,\n\n\t\t// Track whether changes exist, resetting at each post save. Relies on\n\t\t// editor initialization firing post reset as an effect.\n\t\twithChangeDetection( {\n\t\t\tresetTypes: [ 'SETUP_EDITOR_STATE', 'REQUEST_POST_UPDATE_START' ],\n\t\t\tignoreTypes: [ 'RECEIVE_BLOCKS', 'RESET_POST', 'UPDATE_POST' ],\n\t\t} ),\n\t] )( {\n\t\tbyClientId( state = {}, action ) {\n\t\t\tswitch ( action.type ) {\n\t\t\t\tcase 'SETUP_EDITOR_STATE':\n\t\t\t\t\treturn getFlattenedBlocks( action.blocks );\n\n\t\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...getFlattenedBlocks( action.blocks ),\n\t\t\t\t\t};\n\n\t\t\t\tcase 'UPDATE_BLOCK_ATTRIBUTES':\n\t\t\t\t\t// Ignore updates if block isn't known\n\t\t\t\t\tif ( ! state[ action.clientId ] ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Consider as updates only changed values\n\t\t\t\t\tconst nextAttributes = reduce( action.attributes, ( result, value, key ) => {\n\t\t\t\t\t\tif ( value !== result[ key ] ) {\n\t\t\t\t\t\t\tresult = getMutateSafeObject( state[ action.clientId ].attributes, result );\n\t\t\t\t\t\t\tresult[ key ] = value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t}, state[ action.clientId ].attributes );\n\n\t\t\t\t\t// Skip update if nothing has been changed. The reference will\n\t\t\t\t\t// match the original block if `reduce` had no changed values.\n\t\t\t\t\tif ( nextAttributes === state[ action.clientId ].attributes ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise merge attributes into state\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ action.clientId ]: {\n\t\t\t\t\t\t\t...state[ action.clientId ],\n\t\t\t\t\t\t\tattributes: nextAttributes,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\tcase 'UPDATE_BLOCK':\n\t\t\t\t\t// Ignore updates if block isn't known\n\t\t\t\t\tif ( ! state[ action.clientId ] ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ action.clientId ]: {\n\t\t\t\t\t\t\t...state[ action.clientId ],\n\t\t\t\t\t\t\t...action.updates,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\n\t\t\t\tcase 'INSERT_BLOCKS':\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...getFlattenedBlocks( action.blocks ),\n\t\t\t\t\t};\n\n\t\t\t\tcase 'REPLACE_BLOCKS':\n\t\t\t\t\tif ( ! action.blocks ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...omit( state, action.clientIds ),\n\t\t\t\t\t\t...getFlattenedBlocks( action.blocks ),\n\t\t\t\t\t};\n\n\t\t\t\tcase 'REMOVE_BLOCKS':\n\t\t\t\t\treturn omit( state, action.clientIds );\n\n\t\t\t\tcase 'SAVE_REUSABLE_BLOCK_SUCCESS': {\n\t\t\t\t\tconst { id, updatedId } = action;\n\n\t\t\t\t\t// If a temporary reusable block is saved, we swap the temporary id with the final one\n\t\t\t\t\tif ( id === updatedId ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn mapValues( state, ( block ) => {\n\t\t\t\t\t\tif ( block.name === 'core/block' && block.attributes.ref === id ) {\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...block,\n\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t...block.attributes,\n\t\t\t\t\t\t\t\t\tref: updatedId,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn block;\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn state;\n\t\t},\n\n\t\torder( state = {}, action ) {\n\t\t\tswitch ( action.type ) {\n\t\t\t\tcase 'SETUP_EDITOR_STATE':\n\t\t\t\t\treturn mapBlockOrder( action.blocks );\n\n\t\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...omit( mapBlockOrder( action.blocks ), '' ),\n\t\t\t\t\t};\n\n\t\t\t\tcase 'INSERT_BLOCKS': {\n\t\t\t\t\tconst { rootClientId = '', blocks } = action;\n\t\t\t\t\tconst subState = state[ rootClientId ] || [];\n\t\t\t\t\tconst mappedBlocks = mapBlockOrder( blocks, rootClientId );\n\t\t\t\t\tconst { index = subState.length } = action;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t...mappedBlocks,\n\t\t\t\t\t\t[ rootClientId ]: insertAt( subState, mappedBlocks[ rootClientId ], index ),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tcase 'MOVE_BLOCK_TO_POSITION': {\n\t\t\t\t\tconst { fromRootClientId = '', toRootClientId = '', clientId } = action;\n\t\t\t\t\tconst { index = state[ toRootClientId ].length } = action;\n\n\t\t\t\t\t// Moving inside the same parent block\n\t\t\t\t\tif ( fromRootClientId === toRootClientId ) {\n\t\t\t\t\t\tconst subState = state[ toRootClientId ];\n\t\t\t\t\t\tconst fromIndex = subState.indexOf( clientId );\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\t[ toRootClientId ]: moveTo( state[ toRootClientId ], fromIndex, index ),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Moving from a parent block to another\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ fromRootClientId ]: without( state[ fromRootClientId ], clientId ),\n\t\t\t\t\t\t[ toRootClientId ]: insertAt( state[ toRootClientId ], clientId, index ),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tcase 'MOVE_BLOCKS_UP': {\n\t\t\t\t\tconst { clientIds, rootClientId = '' } = action;\n\t\t\t\t\tconst firstClientId = first( clientIds );\n\t\t\t\t\tconst subState = state[ rootClientId ];\n\n\t\t\t\t\tif ( ! subState.length || firstClientId === first( subState ) ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst firstIndex = subState.indexOf( firstClientId );\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ rootClientId ]: moveTo( subState, firstIndex, firstIndex - 1, clientIds.length ),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tcase 'MOVE_BLOCKS_DOWN': {\n\t\t\t\t\tconst { clientIds, rootClientId = '' } = action;\n\t\t\t\t\tconst firstClientId = first( clientIds );\n\t\t\t\t\tconst lastClientId = last( clientIds );\n\t\t\t\t\tconst subState = state[ rootClientId ];\n\n\t\t\t\t\tif ( ! subState.length || lastClientId === last( subState ) ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst firstIndex = subState.indexOf( firstClientId );\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ rootClientId ]: moveTo( subState, firstIndex, firstIndex + 1, clientIds.length ),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tcase 'REPLACE_BLOCKS': {\n\t\t\t\t\tconst { blocks, clientIds } = action;\n\t\t\t\t\tif ( ! blocks ) {\n\t\t\t\t\t\treturn state;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst mappedBlocks = mapBlockOrder( blocks );\n\n\t\t\t\t\treturn flow( [\n\t\t\t\t\t\t( nextState ) => omit( nextState, clientIds ),\n\t\t\t\t\t\t( nextState ) => ( {\n\t\t\t\t\t\t\t...nextState,\n\t\t\t\t\t\t\t...omit( mappedBlocks, '' ),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t\t( nextState ) => mapValues( nextState, ( subState ) => (\n\t\t\t\t\t\t\treduce( subState, ( result, clientId ) => {\n\t\t\t\t\t\t\t\tif ( clientId === clientIds[ 0 ] ) {\n\t\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\t\t\t\t...mappedBlocks[ '' ],\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( clientIds.indexOf( clientId ) === -1 ) {\n\t\t\t\t\t\t\t\t\tresult.push( clientId );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\t}, [] )\n\t\t\t\t\t\t) ),\n\t\t\t\t\t] )( state );\n\t\t\t\t}\n\n\t\t\t\tcase 'REMOVE_BLOCKS':\n\t\t\t\t\treturn flow( [\n\t\t\t\t\t\t// Remove inner block ordering for removed blocks\n\t\t\t\t\t\t( nextState ) => omit( nextState, action.clientIds ),\n\n\t\t\t\t\t\t// Remove deleted blocks from other blocks' orderings\n\t\t\t\t\t\t( nextState ) => mapValues( nextState, ( subState ) => (\n\t\t\t\t\t\t\twithout( subState, ...action.clientIds )\n\t\t\t\t\t\t) ),\n\t\t\t\t\t] )( state );\n\t\t\t}\n\n\t\t\treturn state;\n\t\t},\n\t} ),\n} );\n\n/**\n * Reducer returning the initial edits state. With matching shape to that of\n * `editor.edits`, the initial edits are those applied programmatically, are\n * not considered in prmopting the user for unsaved changes, and are included\n * in (and reset by) the next save payload.\n *\n * @param {Object} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Object} Next state.\n */\nexport function initialEdits( state = INITIAL_EDITS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SETUP_EDITOR':\n\t\t\tif ( ! action.edits ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn action.edits;\n\n\t\tcase 'SETUP_EDITOR_STATE':\n\t\t\tif ( 'content' in state ) {\n\t\t\t\treturn omit( state, 'content' );\n\t\t\t}\n\n\t\t\treturn state;\n\n\t\tcase 'UPDATE_POST':\n\t\t\treturn reduce( action.edits, ( result, value, key ) => {\n\t\t\t\tif ( ! result.hasOwnProperty( key ) ) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tresult = getMutateSafeObject( state, result );\n\t\t\t\tdelete result[ key ];\n\t\t\t\treturn result;\n\t\t\t}, state );\n\n\t\tcase 'RESET_POST':\n\t\t\treturn INITIAL_EDITS_DEFAULTS;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the last-known state of the current post, in the format\n * returned by the WP REST API.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function currentPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SETUP_EDITOR_STATE':\n\t\tcase 'RESET_POST':\n\t\tcase 'UPDATE_POST':\n\t\t\tlet post;\n\t\t\tif ( action.post ) {\n\t\t\t\tpost = action.post;\n\t\t\t} else if ( action.edits ) {\n\t\t\t\tpost = {\n\t\t\t\t\t...state,\n\t\t\t\t\t...action.edits,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn mapValues( post, getPostRawValue );\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning typing state.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function isTyping( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'START_TYPING':\n\t\t\treturn true;\n\n\t\tcase 'STOP_TYPING':\n\t\t\treturn false;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the caret is within formatted text.\n *\n * @param {boolean} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function isCaretWithinFormattedText( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'ENTER_FORMATTED_TEXT':\n\t\t\treturn true;\n\n\t\tcase 'EXIT_FORMATTED_TEXT':\n\t\t\treturn false;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the block selection's state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function blockSelection( state = {\n\tstart: null,\n\tend: null,\n\tisMultiSelecting: false,\n\tisEnabled: true,\n\tinitialPosition: null,\n}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CLEAR_SELECTED_BLOCK':\n\t\t\tif ( state.start === null && state.end === null && ! state.isMultiSelecting ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tstart: null,\n\t\t\t\tend: null,\n\t\t\t\tisMultiSelecting: false,\n\t\t\t\tinitialPosition: null,\n\t\t\t};\n\t\tcase 'START_MULTI_SELECT':\n\t\t\tif ( state.isMultiSelecting ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisMultiSelecting: true,\n\t\t\t\tinitialPosition: null,\n\t\t\t};\n\t\tcase 'STOP_MULTI_SELECT':\n\t\t\tif ( ! state.isMultiSelecting ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisMultiSelecting: false,\n\t\t\t\tinitialPosition: null,\n\t\t\t};\n\t\tcase 'MULTI_SELECT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tstart: action.start,\n\t\t\t\tend: action.end,\n\t\t\t\tinitialPosition: null,\n\t\t\t};\n\t\tcase 'SELECT_BLOCK':\n\t\t\tif ( action.clientId === state.start && action.clientId === state.end ) {\n\t\t\t\treturn state;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tstart: action.clientId,\n\t\t\t\tend: action.clientId,\n\t\t\t\tinitialPosition: action.initialPosition,\n\t\t\t};\n\t\tcase 'INSERT_BLOCKS': {\n\t\t\tif ( action.updateSelection ) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\tstart: action.blocks[ 0 ].clientId,\n\t\t\t\t\tend: action.blocks[ 0 ].clientId,\n\t\t\t\t\tinitialPosition: null,\n\t\t\t\t\tisMultiSelecting: false,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn state;\n\t\t}\n\t\tcase 'REMOVE_BLOCKS':\n\t\t\tif ( ! action.clientIds || ! action.clientIds.length || action.clientIds.indexOf( state.start ) === -1 ) {\n\t\t\t\treturn state;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tstart: null,\n\t\t\t\tend: null,\n\t\t\t\tinitialPosition: null,\n\t\t\t\tisMultiSelecting: false,\n\t\t\t};\n\t\tcase 'REPLACE_BLOCKS':\n\t\t\tif ( action.clientIds.indexOf( state.start ) === -1 ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\t// If there is replacement block(s), assign first's client ID as\n\t\t\t// the next selected block. If empty replacement, reset to null.\n\t\t\tconst nextSelectedBlockClientId = get( action.blocks, [ 0, 'clientId' ], null );\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tstart: nextSelectedBlockClientId,\n\t\t\t\tend: nextSelectedBlockClientId,\n\t\t\t\tinitialPosition: null,\n\t\t\t\tisMultiSelecting: false,\n\t\t\t};\n\t\tcase 'TOGGLE_SELECTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisEnabled: action.isSelectionEnabled,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport function blocksMode( state = {}, action ) {\n\tif ( action.type === 'TOGGLE_BLOCK_MODE' ) {\n\t\tconst { clientId } = action;\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ clientId ]: state[ clientId ] && state[ clientId ] === 'html' ? 'visual' : 'html',\n\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the block insertion point visibility, either null if there\n * is not an explicit insertion point assigned, or an object of its `index` and\n * `rootClientId`.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function insertionPoint( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SHOW_INSERTION_POINT':\n\t\t\tconst { rootClientId, index } = action;\n\t\t\treturn { rootClientId, index };\n\n\t\tcase 'HIDE_INSERTION_POINT':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = EDITOR_SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_EDITOR_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the user preferences.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function preferences( state = PREFERENCES_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'INSERT_BLOCKS':\n\t\tcase 'REPLACE_BLOCKS':\n\t\t\treturn action.blocks.reduce( ( prevState, block ) => {\n\t\t\t\tlet id = block.name;\n\t\t\t\tconst insert = { name: block.name };\n\t\t\t\tif ( isReusableBlock( block ) ) {\n\t\t\t\t\tinsert.ref = block.attributes.ref;\n\t\t\t\t\tid += '/' + block.attributes.ref;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...prevState,\n\t\t\t\t\tinsertUsage: {\n\t\t\t\t\t\t...prevState.insertUsage,\n\t\t\t\t\t\t[ id ]: {\n\t\t\t\t\t\t\ttime: action.time,\n\t\t\t\t\t\t\tcount: prevState.insertUsage[ id ] ? prevState.insertUsage[ id ].count + 1 : 1,\n\t\t\t\t\t\t\tinsert,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}, state );\n\n\t\tcase 'REMOVE_REUSABLE_BLOCK':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tinsertUsage: omitBy( state.insertUsage, ( { insert } ) => insert.ref === action.id ),\n\t\t\t};\n\n\t\tcase 'ENABLE_PUBLISH_SIDEBAR':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisPublishSidebarEnabled: true,\n\t\t\t};\n\n\t\tcase 'DISABLE_PUBLISH_SIDEBAR':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisPublishSidebarEnabled: false,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning current network request state (whether a request to\n * the WP REST API is in progress, successful, or failed).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function saving( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\t\treturn {\n\t\t\t\trequesting: true,\n\t\t\t\tsuccessful: false,\n\t\t\t\terror: null,\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\n\t\tcase 'REQUEST_POST_UPDATE_SUCCESS':\n\t\t\treturn {\n\t\t\t\trequesting: false,\n\t\t\t\tsuccessful: true,\n\t\t\t\terror: null,\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\n\t\tcase 'REQUEST_POST_UPDATE_FAILURE':\n\t\t\treturn {\n\t\t\t\trequesting: false,\n\t\t\t\tsuccessful: false,\n\t\t\t\terror: action.error,\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Post Lock State.\n *\n * @typedef {Object} PostLockState\n *\n * @property {boolean} isLocked Whether the post is locked.\n * @property {?boolean} isTakeover Whether the post editing has been taken over.\n * @property {?boolean} activePostLock Active post lock value.\n * @property {?Object} user User that took over the post.\n */\n\n/**\n * Reducer returning the post lock status.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postLock( state = { isLocked: false }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_POST_LOCK':\n\t\t\treturn action.lock;\n\t}\n\n\treturn state;\n}\n\n/**\n * Post saving lock.\n *\n * When post saving is locked, the post cannot be published or updated.\n *\n * @param {PostSavingLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postSavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_SAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_SAVING':\n\t\t\treturn omit( state, action.lockName );\n\t}\n\treturn state;\n}\n\nexport const reusableBlocks = combineReducers( {\n\tdata( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_REUSABLE_BLOCKS': {\n\t\t\t\treturn reduce( action.results, ( nextState, result ) => {\n\t\t\t\t\tconst { id, title } = result.reusableBlock;\n\t\t\t\t\tconst { clientId } = result.parsedBlock;\n\n\t\t\t\t\tconst value = { clientId, title };\n\n\t\t\t\t\tif ( ! isEqual( nextState[ id ], value ) ) {\n\t\t\t\t\t\tnextState = getMutateSafeObject( state, nextState );\n\t\t\t\t\t\tnextState[ id ] = value;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn nextState;\n\t\t\t\t}, state );\n\t\t\t}\n\n\t\t\tcase 'UPDATE_REUSABLE_BLOCK_TITLE': {\n\t\t\t\tconst { id, title } = action;\n\n\t\t\t\tif ( ! state[ id ] || state[ id ].title === title ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ id ]: {\n\t\t\t\t\t\t...state[ id ],\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'SAVE_REUSABLE_BLOCK_SUCCESS': {\n\t\t\t\tconst { id, updatedId } = action;\n\n\t\t\t\t// If a temporary reusable block is saved, we swap the temporary id with the final one\n\t\t\t\tif ( id === updatedId ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst value = state[ id ];\n\t\t\t\treturn {\n\t\t\t\t\t...omit( state, id ),\n\t\t\t\t\t[ updatedId ]: value,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'REMOVE_REUSABLE_BLOCK': {\n\t\t\t\tconst { id } = action;\n\t\t\t\treturn omit( state, id );\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tisFetching( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'FETCH_REUSABLE_BLOCKS': {\n\t\t\t\tconst { id } = action;\n\t\t\t\tif ( ! id ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ id ]: true,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'FETCH_REUSABLE_BLOCKS_SUCCESS':\n\t\t\tcase 'FETCH_REUSABLE_BLOCKS_FAILURE': {\n\t\t\t\tconst { id } = action;\n\t\t\t\treturn omit( state, id );\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tisSaving( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'SAVE_REUSABLE_BLOCK':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ action.id ]: true,\n\t\t\t\t};\n\n\t\t\tcase 'SAVE_REUSABLE_BLOCK_SUCCESS':\n\t\t\tcase 'SAVE_REUSABLE_BLOCK_FAILURE': {\n\t\t\t\tconst { id } = action;\n\t\t\t\treturn omit( state, id );\n\t\t\t}\n\t\t}\n\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning an object where each key is a block client ID, its value\n * representing the settings for its nested blocks.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const blockListSettings = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\t// Even if the replaced blocks have the same client ID, our logic\n\t\t// should correct the state.\n\t\tcase 'REPLACE_BLOCKS' :\n\t\tcase 'REMOVE_BLOCKS': {\n\t\t\treturn omit( state, action.clientIds );\n\t\t}\n\t\tcase 'UPDATE_BLOCK_LIST_SETTINGS': {\n\t\t\tconst { clientId } = action;\n\t\t\tif ( ! action.settings ) {\n\t\t\t\tif ( state.hasOwnProperty( clientId ) ) {\n\t\t\t\t\treturn omit( state, clientId );\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tif ( isEqual( state[ clientId ], action.settings ) ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ clientId ]: action.settings,\n\t\t\t};\n\t\t}\n\t}\n\treturn state;\n};\n\n/**\n * Reducer returning the most recent autosave.\n *\n * @param {Object} state The autosave object.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function autosave( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RESET_AUTOSAVE':\n\t\t\tconst { post } = action;\n\t\t\tconst [ title, excerpt, content ] = [\n\t\t\t\t'title',\n\t\t\t\t'excerpt',\n\t\t\t\t'content',\n\t\t\t].map( ( field ) => getPostRawValue( post[ field ] ) );\n\n\t\t\treturn {\n\t\t\t\ttitle,\n\t\t\t\texcerpt,\n\t\t\t\tcontent,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the poost preview link\n *\n * @param {string?} state The preview link\n * @param {Object} action Dispatched action.\n *\n * @return {string?} Updated state.\n */\nexport function previewLink( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_UPDATE_SUCCESS':\n\t\t\treturn action.post.preview_link || addQueryArgs( action.post.link, { preview: true } );\n\n\t\tcase 'REQUEST_POST_UPDATE_START':\n\t\t\t// Invalidate known preview link when autosave starts.\n\t\t\tif ( state && action.options.isPreview ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\treturn state;\n}\n\nexport default optimist( combineReducers( {\n\teditor,\n\tinitialEdits,\n\tcurrentPost,\n\tisTyping,\n\tisCaretWithinFormattedText,\n\tblockSelection,\n\tblocksMode,\n\tblockListSettings,\n\tinsertionPoint,\n\tpreferences,\n\tsaving,\n\tpostLock,\n\treusableBlocks,\n\ttemplate,\n\tautosave,\n\tpreviewLink,\n\tsettings,\n\tpostSavingLock,\n} ) );\n","/**\n * External dependencies\n */\nimport {\n\tcastArray,\n\tflatMap,\n\tfind,\n\tfirst,\n\tget,\n\thas,\n\tincludes,\n\tisArray,\n\tisBoolean,\n\tlast,\n\tmap,\n\torderBy,\n\treduce,\n\tsome,\n} from 'lodash';\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tserialize,\n\tgetBlockType,\n\tgetBlockTypes,\n\thasBlockSupport,\n\thasChildBlocksWithInserterSupport,\n\tgetFreeformContentHandlerName,\n\tisUnmodifiedDefaultBlock,\n} from '@wordpress/blocks';\nimport { isInTheFuture, getDate } from '@wordpress/date';\nimport { removep } from '@wordpress/autop';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Dependencies\n */\nimport { PREFERENCES_DEFAULTS } from './defaults';\n\n/***\n * Module constants\n */\nexport const POST_UPDATE_TRANSACTION_ID = 'post-update';\nconst PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;\nexport const INSERTER_UTILITY_HIGH = 3;\nexport const INSERTER_UTILITY_MEDIUM = 2;\nexport const INSERTER_UTILITY_LOW = 1;\nexport const INSERTER_UTILITY_NONE = 0;\nconst MILLISECONDS_PER_HOUR = 3600 * 1000;\nconst MILLISECONDS_PER_DAY = 24 * 3600 * 1000;\nconst MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;\nconst ONE_MINUTE_IN_MS = 60 * 1000;\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns true if any past editor history snapshots exist, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether undo history exists.\n */\nexport function hasEditorUndo( state ) {\n\treturn state.editor.past.length > 0;\n}\n\n/**\n * Returns true if any future editor history snapshots exist, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether redo history exists.\n */\nexport function hasEditorRedo( state ) {\n\treturn state.editor.future.length > 0;\n}\n\n/**\n * Returns true if the currently edited post is yet to be saved, or false if\n * the post has been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is new.\n */\nexport function isEditedPostNew( state ) {\n\treturn getCurrentPost( state ).status === 'auto-draft';\n}\n\n/**\n * Returns true if content includes unsaved changes, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether content includes unsaved changes.\n */\nexport function hasChangedContent( state ) {\n\treturn (\n\t\tstate.editor.present.blocks.isDirty ||\n\n\t\t// `edits` is intended to contain only values which are different from\n\t\t// the saved post, so the mere presence of a property is an indicator\n\t\t// that the value is different than what is known to be saved. While\n\t\t// content in Visual mode is represented by the blocks state, in Text\n\t\t// mode it is tracked by `edits.content`.\n\t\t'content' in state.editor.present.edits\n\t);\n}\n\n/**\n * Returns true if there are unsaved values for the current edit session, or\n * false if the editing state matches the saved or new post.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether unsaved values exist.\n */\nexport function isEditedPostDirty( state ) {\n\tif ( hasChangedContent( state ) ) {\n\t\treturn true;\n\t}\n\n\t// Edits should contain only fields which differ from the saved post (reset\n\t// at initial load and save complete). Thus, a non-empty edits state can be\n\t// inferred to contain unsaved values.\n\tif ( Object.keys( state.editor.present.edits ).length > 0 ) {\n\t\treturn true;\n\t}\n\n\t// Edits and change detectiona are reset at the start of a save, but a post\n\t// is still considered dirty until the point at which the save completes.\n\t// Because the save is performed optimistically, the prior states are held\n\t// until committed. These can be referenced to determine whether there's a\n\t// chance that state may be reverted into one considered dirty.\n\treturn inSomeHistory( state, isEditedPostDirty );\n}\n\n/**\n * Returns true if there are no unsaved values for the current edit session and\n * if the currently edited post is new (has never been saved before).\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether new post and unsaved values exist.\n */\nexport function isCleanNewPost( state ) {\n\treturn ! isEditedPostDirty( state ) && isEditedPostNew( state );\n}\n\n/**\n * Returns the post currently being edited in its last known saved state, not\n * including unsaved edits. Returns an object containing relevant default post\n * values if the post has not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Post object.\n */\nexport function getCurrentPost( state ) {\n\treturn state.currentPost;\n}\n\n/**\n * Returns the post type of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post type.\n */\nexport function getCurrentPostType( state ) {\n\treturn state.currentPost.type;\n}\n\n/**\n * Returns the ID of the post currently being edited, or null if the post has\n * not yet been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {?number} ID of current post.\n */\nexport function getCurrentPostId( state ) {\n\treturn getCurrentPost( state ).id || null;\n}\n\n/**\n * Returns the number of revisions of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of revisions.\n */\nexport function getCurrentPostRevisionsCount( state ) {\n\treturn get( getCurrentPost( state ), [ '_links', 'version-history', 0, 'count' ], 0 );\n}\n\n/**\n * Returns the last revision ID of the post currently being edited,\n * or null if the post has no revisions.\n *\n * @param {Object} state Global application state.\n *\n * @return {?number} ID of the last revision.\n */\nexport function getCurrentPostLastRevisionId( state ) {\n\treturn get( getCurrentPost( state ), [ '_links', 'predecessor-version', 0, 'id' ], null );\n}\n\n/**\n * Returns any post values which have been changed in the editor but not yet\n * been saved.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Object of key value pairs comprising unsaved edits.\n */\nexport const getPostEdits = createSelector(\n\t( state ) => {\n\t\treturn {\n\t\t\t...state.initialEdits,\n\t\t\t...state.editor.present.edits,\n\t\t};\n\t},\n\t( state ) => [\n\t\tstate.editor.present.edits,\n\t\tstate.initialEdits,\n\t]\n);\n\n/**\n * Returns a new reference when edited values have changed. This is useful in\n * inferring where an edit has been made between states by comparison of the\n * return values using strict equality.\n *\n * @example\n *\n * ```\n * const hasEditOccurred = (\n * getReferenceByDistinctEdits( beforeState ) !==\n * getReferenceByDistinctEdits( afterState )\n * );\n * ```\n *\n * @param {Object} state Editor state.\n *\n * @return {*} A value whose reference will change only when an edit occurs.\n */\nexport const getReferenceByDistinctEdits = createSelector(\n\t() => [],\n\t( state ) => [ state.editor ],\n);\n\n/**\n * Returns an attribute value of the saved post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nexport function getCurrentPostAttribute( state, attributeName ) {\n\tconst post = getCurrentPost( state );\n\tif ( post.hasOwnProperty( attributeName ) ) {\n\t\treturn post[ attributeName ];\n\t}\n}\n\n/**\n * Returns a single attribute of the post being edited, preferring the unsaved\n * edit if one exists, but falling back to the attribute for the last known\n * saved state of the post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nexport function getEditedPostAttribute( state, attributeName ) {\n\tconst edits = getPostEdits( state );\n\n\t// Special cases\n\tswitch ( attributeName ) {\n\t\tcase 'content':\n\t\t\treturn getEditedPostContent( state );\n\t}\n\n\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\treturn getCurrentPostAttribute( state, attributeName );\n\t}\n\n\treturn edits[ attributeName ];\n}\n\n/**\n * Returns an attribute value of the current autosave revision for a post, or\n * null if there is no autosave for the post.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Autosave attribute name.\n *\n * @return {*} Autosave attribute value.\n */\nexport function getAutosaveAttribute( state, attributeName ) {\n\tif ( ! hasAutosave( state ) ) {\n\t\treturn null;\n\t}\n\n\tconst autosave = getAutosave( state );\n\tif ( autosave.hasOwnProperty( attributeName ) ) {\n\t\treturn autosave[ attributeName ];\n\t}\n}\n\n/**\n * Returns the current visibility of the post being edited, preferring the\n * unsaved value if different than the saved post. The return value is one of\n * \"private\", \"password\", or \"public\".\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post visibility.\n */\nexport function getEditedPostVisibility( state ) {\n\tconst status = getEditedPostAttribute( state, 'status' );\n\tconst password = getEditedPostAttribute( state, 'password' );\n\n\tif ( status === 'private' ) {\n\t\treturn 'private';\n\t} else if ( password ) {\n\t\treturn 'password';\n\t}\n\treturn 'public';\n}\n\n/**\n * Returns true if post is pending review.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is pending review.\n */\nexport function isCurrentPostPending( state ) {\n\treturn getCurrentPost( state ).status === 'pending';\n}\n\n/**\n * Return true if the current post has already been published.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isCurrentPostPublished( state ) {\n\tconst post = getCurrentPost( state );\n\n\treturn [ 'publish', 'private' ].indexOf( post.status ) !== -1 ||\n\t\t( post.status === 'future' && ! isInTheFuture( new Date( Number( getDate( post.date ) ) - ONE_MINUTE_IN_MS ) ) );\n}\n\n/**\n * Returns true if post is already scheduled.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether current post is scheduled to be posted.\n */\nexport function isCurrentPostScheduled( state ) {\n\treturn getCurrentPost( state ).status === 'future' && ! isCurrentPostPublished( state );\n}\n\n/**\n * Return true if the post being edited can be published.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can been published.\n */\nexport function isEditedPostPublishable( state ) {\n\tconst post = getCurrentPost( state );\n\n\t// TODO: Post being publishable should be superset of condition of post\n\t// being saveable. Currently this restriction is imposed at UI.\n\t//\n\t// See: <PostPublishButton /> (`isButtonEnabled` assigned by `isSaveable`)\n\n\treturn isEditedPostDirty( state ) || [ 'publish', 'private', 'future' ].indexOf( post.status ) === -1;\n}\n\n/**\n * Returns true if the post can be saved, or false otherwise. A post must\n * contain a title, an excerpt, or non-empty content to be valid for save.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can be saved.\n */\nexport function isEditedPostSaveable( state ) {\n\tif ( isSavingPost( state ) ) {\n\t\treturn false;\n\t}\n\n\t// TODO: Post should not be saveable if not dirty. Cannot be added here at\n\t// this time since posts where meta boxes are present can be saved even if\n\t// the post is not dirty. Currently this restriction is imposed at UI, but\n\t// should be moved here.\n\t//\n\t// See: `isEditedPostPublishable` (includes `isEditedPostDirty` condition)\n\t// See: <PostSavedState /> (`forceIsDirty` prop)\n\t// See: <PostPublishButton /> (`forceIsDirty` prop)\n\t// See: https://github.com/WordPress/gutenberg/pull/4184\n\n\treturn (\n\t\t!! getEditedPostAttribute( state, 'title' ) ||\n\t\t!! getEditedPostAttribute( state, 'excerpt' ) ||\n\t\t! isEditedPostEmpty( state )\n\t);\n}\n\n/**\n * Returns true if the edited post has content. A post has content if it has at\n * least one saveable block or otherwise has a non-empty content property\n * assigned.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post has content.\n */\nexport function isEditedPostEmpty( state ) {\n\tconst blocks = getBlocksForSerialization( state );\n\n\t// While the condition of truthy content string is sufficient to determine\n\t// emptiness, testing saveable blocks length is a trivial operation. Since\n\t// this function can be called frequently, optimize for the fast case as a\n\t// condition of the mere existence of blocks. Note that the value of edited\n\t// content is used in place of blocks, thus allowed to fall through.\n\tif ( blocks.length && ! ( 'content' in getPostEdits( state ) ) ) {\n\t\t// Pierce the abstraction of the serializer in knowing that blocks are\n\t\t// joined with with newlines such that even if every individual block\n\t\t// produces an empty save result, the serialized content is non-empty.\n\t\tif ( blocks.length > 1 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Freeform and unregistered blocks omit comment delimiters in their\n\t\t// output. The freeform block specifically may produce an empty string\n\t\t// to save. In the case of a single freeform block, fall through to the\n\t\t// full serialize. Otherwise, the single block is assumed non-empty by\n\t\t// virtue of its comment delimiters.\n\t\tif ( blocks[ 0 ].name !== getFreeformContentHandlerName() ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn ! getEditedPostContent( state );\n}\n\n/**\n * Returns true if the post can be autosaved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post can be autosaved.\n */\nexport function isEditedPostAutosaveable( state ) {\n\t// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.\n\tif ( ! isEditedPostSaveable( state ) ) {\n\t\treturn false;\n\t}\n\n\t// If we don't already have an autosave, the post is autosaveable.\n\tif ( ! hasAutosave( state ) ) {\n\t\treturn true;\n\t}\n\n\t// To avoid an expensive content serialization, use the content dirtiness\n\t// flag in place of content field comparison against the known autosave.\n\t// This is not strictly accurate, and relies on a tolerance toward autosave\n\t// request failures for unnecessary saves.\n\tif ( hasChangedContent( state ) ) {\n\t\treturn true;\n\t}\n\n\t// If the title, excerpt or content has changed, the post is autosaveable.\n\tconst autosave = getAutosave( state );\n\treturn [ 'title', 'excerpt' ].some( ( field ) => (\n\t\tautosave[ field ] !== getEditedPostAttribute( state, field )\n\t) );\n}\n\n/**\n * Returns the current autosave, or null if one is not set (i.e. if the post\n * has yet to be autosaved, or has been saved or published since the last\n * autosave).\n *\n * @param {Object} state Editor state.\n *\n * @return {?Object} Current autosave, if exists.\n */\nexport function getAutosave( state ) {\n\treturn state.autosave;\n}\n\n/**\n * Returns the true if there is an existing autosave, otherwise false.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether there is an existing autosave.\n */\nexport function hasAutosave( state ) {\n\treturn !! getAutosave( state );\n}\n\n/**\n * Return true if the post being edited is being scheduled. Preferring the\n * unsaved status values.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isEditedPostBeingScheduled( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\t// Offset the date by one minute (network latency)\n\tconst checkedDate = new Date( Number( getDate( date ) ) - ONE_MINUTE_IN_MS );\n\n\treturn isInTheFuture( checkedDate );\n}\n\n/**\n * Returns whether the current post should be considered to have a \"floating\"\n * date (i.e. that it would publish \"Immediately\" rather than at a set time).\n *\n * Unlike in the PHP backend, the REST API returns a full date string for posts\n * where the 0000-00-00T00:00:00 placeholder is present in the database. To\n * infer that a post is set to publish \"Immediately\" we check whether the date\n * and modified date are the same.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the edited post has a floating date value.\n */\nexport function isEditedPostDateFloating( state ) {\n\tconst date = getEditedPostAttribute( state, 'date' );\n\tconst modified = getEditedPostAttribute( state, 'modified' );\n\tconst status = getEditedPostAttribute( state, 'status' );\n\tif ( status === 'draft' || status === 'auto-draft' ) {\n\t\treturn date === modified;\n\t}\n\treturn false;\n}\n\n/**\n * Returns a new reference when the inner blocks of a given block client ID\n * change. This is used exclusively as a memoized selector dependant, relying\n * on this selector's shared return value and recursively those of its inner\n * blocks defined as dependencies. This abuses mechanics of the selector\n * memoization to return from the original selector function only when\n * dependants change.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {*} A value whose reference will change only when inner blocks of\n * the given block client ID change.\n */\nexport const getBlockDependantsCacheBust = createSelector(\n\t() => [],\n\t( state, clientId ) => map(\n\t\tgetBlockOrder( state, clientId ),\n\t\t( innerBlockClientId ) => getBlock( state, innerBlockClientId ),\n\t),\n);\n\n/**\n * Returns a block's name given its client ID, or null if no block exists with\n * the client ID.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {string} Block name.\n */\nexport function getBlockName( state, clientId ) {\n\tconst block = state.editor.present.blocks.byClientId[ clientId ];\n\treturn block ? block.name : null;\n}\n\n/**\n * Returns whether a block is valid or not.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Is Valid.\n */\nexport function isBlockValid( state, clientId ) {\n\tconst block = state.editor.present.blocks.byClientId[ clientId ];\n\treturn !! block && block.isValid;\n}\n\n/**\n * Returns a block given its client ID. This is a parsed copy of the block,\n * containing its `blockName`, `clientId`, and current `attributes` state. This\n * is not the block's registration settings, which must be retrieved from the\n * blocks module registration store.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Parsed block object.\n */\nexport const getBlock = createSelector(\n\t( state, clientId ) => {\n\t\tconst block = state.editor.present.blocks.byClientId[ clientId ];\n\t\tif ( ! block ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet { attributes } = block;\n\n\t\t// Inject custom source attribute values.\n\t\t//\n\t\t// TODO: Create generic external sourcing pattern, not explicitly\n\t\t// targeting meta attributes.\n\t\tconst type = getBlockType( block.name );\n\t\tif ( type ) {\n\t\t\tattributes = reduce( type.attributes, ( result, value, key ) => {\n\t\t\t\tif ( value.source === 'meta' ) {\n\t\t\t\t\tif ( result === attributes ) {\n\t\t\t\t\t\tresult = { ...result };\n\t\t\t\t\t}\n\n\t\t\t\t\tresult[ key ] = getPostMeta( state, value.meta );\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}, attributes );\n\t\t}\n\n\t\treturn {\n\t\t\t...block,\n\t\t\tattributes,\n\t\t\tinnerBlocks: getBlocks( state, clientId ),\n\t\t};\n\t},\n\t( state, clientId ) => [\n\t\tstate.editor.present.blocks.byClientId[ clientId ],\n\t\tgetBlockDependantsCacheBust( state, clientId ),\n\t\tstate.editor.present.edits.meta,\n\t\tstate.initialEdits.meta,\n\t\tstate.currentPost.meta,\n\t]\n);\n\nfunction getPostMeta( state, key ) {\n\treturn has( state, [ 'editor', 'present', 'edits', 'meta', key ] ) ?\n\t\tget( state, [ 'editor', 'present', 'edits', 'meta', key ] ) :\n\t\tget( state, [ 'currentPost', 'meta', key ] );\n}\n\n/**\n * Returns all block objects for the current post being edited as an array in\n * the order they appear in the post.\n *\n * Note: It's important to memoize this selector to avoid return a new instance\n * on each call\n *\n * @param {Object} state Editor state.\n * @param {?String} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Post blocks.\n */\nexport const getBlocks = createSelector(\n\t( state, rootClientId ) => {\n\t\treturn map(\n\t\t\tgetBlockOrder( state, rootClientId ),\n\t\t\t( clientId ) => getBlock( state, clientId )\n\t\t);\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks,\n\t]\n);\n\n/**\n * Returns an array containing the clientIds of all descendants\n * of the blocks given.\n *\n * @param {Object} state Global application state.\n * @param {Array} clientIds Array of blocks to inspect.\n *\n * @return {Array} ids of descendants.\n */\nexport const getClientIdsOfDescendants = ( state, clientIds ) => flatMap( clientIds, ( clientId ) => {\n\tconst descendants = getBlockOrder( state, clientId );\n\treturn [ ...descendants, ...getClientIdsOfDescendants( state, descendants ) ];\n} );\n\n/**\n * Returns an array containing the clientIds of the top-level blocks\n * and their descendants of any depth (for nested blocks).\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} ids of top-level and descendant blocks.\n */\nexport const getClientIdsWithDescendants = createSelector(\n\t( state ) => {\n\t\tconst topLevelIds = getBlockOrder( state );\n\t\treturn [ ...topLevelIds, ...getClientIdsOfDescendants( state, topLevelIds ) ];\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t]\n);\n\n/**\n * Returns the total number of blocks, or the total number of blocks with a specific name in a post.\n * The number returned includes nested blocks.\n *\n * @param {Object} state Global application state.\n * @param {?String} blockName Optional block name, if specified only blocks of that type will be counted.\n *\n * @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.\n */\nexport const getGlobalBlockCount = createSelector(\n\t( state, blockName ) => {\n\t\tconst clientIds = getClientIdsWithDescendants( state );\n\t\tif ( ! blockName ) {\n\t\t\treturn clientIds.length;\n\t\t}\n\t\treturn reduce( clientIds, ( count, clientId ) => {\n\t\t\tconst block = state.editor.present.blocks.byClientId[ clientId ];\n\t\t\treturn block.name === blockName ? count + 1 : count;\n\t\t}, 0 );\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t\tstate.editor.present.blocks.byClientId,\n\t]\n);\n\n/**\n * Given an array of block client IDs, returns the corresponding array of block\n * objects.\n *\n * @param {Object} state Editor state.\n * @param {string[]} clientIds Client IDs for which blocks are to be returned.\n *\n * @return {WPBlock[]} Block objects.\n */\nexport const getBlocksByClientId = createSelector(\n\t( state, clientIds ) => map(\n\t\tcastArray( clientIds ),\n\t\t( clientId ) => getBlock( state, clientId )\n\t),\n\t( state ) => [\n\t\tstate.editor.present.edits.meta,\n\t\tstate.initialEdits.meta,\n\t\tstate.currentPost.meta,\n\t\tstate.editor.present.blocks,\n\t]\n);\n\n/**\n * Returns the number of blocks currently present in the post.\n *\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {number} Number of blocks in the post.\n */\nexport function getBlockCount( state, rootClientId ) {\n\treturn getBlockOrder( state, rootClientId ).length;\n}\n\n/**\n * Returns the current block selection start. This value may be null, and it\n * may represent either a singular block selection or multi-selection start.\n * A selection is singular if its start and end match.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Client ID of block selection start.\n */\nexport function getBlockSelectionStart( state ) {\n\treturn state.blockSelection.start;\n}\n\n/**\n * Returns the current block selection end. This value may be null, and it\n * may represent either a singular block selection or multi-selection end.\n * A selection is singular if its start and end match.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Client ID of block selection end.\n */\nexport function getBlockSelectionEnd( state ) {\n\treturn state.blockSelection.end;\n}\n\n/**\n * Returns the number of blocks currently selected in the post.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of blocks selected in the post.\n */\nexport function getSelectedBlockCount( state ) {\n\tconst multiSelectedBlockCount = getMultiSelectedBlockClientIds( state ).length;\n\n\tif ( multiSelectedBlockCount ) {\n\t\treturn multiSelectedBlockCount;\n\t}\n\n\treturn state.blockSelection.start ? 1 : 0;\n}\n\n/**\n * Returns true if there is a single selected block, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether a single block is selected.\n */\nexport function hasSelectedBlock( state ) {\n\tconst { start, end } = state.blockSelection;\n\treturn !! start && start === end;\n}\n\n/**\n * Returns the currently selected block client ID, or null if there is no\n * selected block.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Selected block client ID.\n */\nexport function getSelectedBlockClientId( state ) {\n\tconst { start, end } = state.blockSelection;\n\treturn start === end && start ? start : null;\n}\n\n/**\n * Returns the currently selected block, or null if there is no selected block.\n *\n * @param {Object} state Global application state.\n *\n * @return {?Object} Selected block.\n */\nexport function getSelectedBlock( state ) {\n\tconst clientId = getSelectedBlockClientId( state );\n\treturn clientId ? getBlock( state, clientId ) : null;\n}\n\n/**\n * Given a block client ID, returns the root block from which the block is\n * nested, an empty string for top-level blocks, or null if the block does not\n * exist.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block from which to find root client ID.\n *\n * @return {?string} Root client ID, if exists\n */\nexport const getBlockRootClientId = createSelector(\n\t( state, clientId ) => {\n\t\tconst { order } = state.editor.present.blocks;\n\n\t\tfor ( const rootClientId in order ) {\n\t\t\tif ( includes( order[ rootClientId ], clientId ) ) {\n\t\t\t\treturn rootClientId;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t]\n);\n\n/**\n * Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block from which to find root client ID.\n *\n * @return {string} Root client ID\n */\nexport const getBlockHierarchyRootClientId = createSelector(\n\t( state, clientId ) => {\n\t\tlet rootClientId = clientId;\n\t\tlet current = clientId;\n\t\twhile ( rootClientId ) {\n\t\t\tcurrent = rootClientId;\n\t\t\trootClientId = getBlockRootClientId( state, current );\n\t\t}\n\n\t\treturn current;\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t]\n);\n\n/**\n * Returns the client ID of the block adjacent one at the given reference\n * startClientId and modifier directionality. Defaults start startClientId to\n * the selected block, and direction as next block. Returns null if there is no\n * adjacent block.\n *\n * @param {Object} state Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n * search.\n * @param {?number} modifier Directionality multiplier (1 next, -1\n * previous).\n *\n * @return {?string} Return the client ID of the block, or null if none exists.\n */\nexport function getAdjacentBlockClientId( state, startClientId, modifier = 1 ) {\n\t// Default to selected block.\n\tif ( startClientId === undefined ) {\n\t\tstartClientId = getSelectedBlockClientId( state );\n\t}\n\n\t// Try multi-selection starting at extent based on modifier.\n\tif ( startClientId === undefined ) {\n\t\tif ( modifier < 0 ) {\n\t\t\tstartClientId = getFirstMultiSelectedBlockClientId( state );\n\t\t} else {\n\t\t\tstartClientId = getLastMultiSelectedBlockClientId( state );\n\t\t}\n\t}\n\n\t// Validate working start client ID.\n\tif ( ! startClientId ) {\n\t\treturn null;\n\t}\n\n\t// Retrieve start block root client ID, being careful to allow the falsey\n\t// empty string top-level root by explicitly testing against null.\n\tconst rootClientId = getBlockRootClientId( state, startClientId );\n\tif ( rootClientId === null ) {\n\t\treturn null;\n\t}\n\n\tconst { order } = state.editor.present.blocks;\n\tconst orderSet = order[ rootClientId ];\n\tconst index = orderSet.indexOf( startClientId );\n\tconst nextIndex = ( index + ( 1 * modifier ) );\n\n\t// Block was first in set and we're attempting to get previous.\n\tif ( nextIndex < 0 ) {\n\t\treturn null;\n\t}\n\n\t// Block was last in set and we're attempting to get next.\n\tif ( nextIndex === orderSet.length ) {\n\t\treturn null;\n\t}\n\n\t// Assume incremented index is within the set.\n\treturn orderSet[ nextIndex ];\n}\n\n/**\n * Returns the previous block's client ID from the given reference start ID.\n * Defaults start to the selected block. Returns null if there is no previous\n * block.\n *\n * @param {Object} state Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n * search.\n *\n * @return {?string} Adjacent block's client ID, or null if none exists.\n */\nexport function getPreviousBlockClientId( state, startClientId ) {\n\treturn getAdjacentBlockClientId( state, startClientId, -1 );\n}\n\n/**\n * Returns the next block's client ID from the given reference start ID.\n * Defaults start to the selected block. Returns null if there is no next\n * block.\n *\n * @param {Object} state Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n * search.\n *\n * @return {?string} Adjacent block's client ID, or null if none exists.\n */\nexport function getNextBlockClientId( state, startClientId ) {\n\treturn getAdjacentBlockClientId( state, startClientId, 1 );\n}\n\n/**\n * Returns the initial caret position for the selected block.\n * This position is to used to position the caret properly when the selected block changes.\n *\n * @param {Object} state Global application state.\n *\n * @return {?Object} Selected block.\n */\nexport function getSelectedBlocksInitialCaretPosition( state ) {\n\tconst { start, end } = state.blockSelection;\n\tif ( start !== end || ! start ) {\n\t\treturn null;\n\t}\n\n\treturn state.blockSelection.initialPosition;\n}\n\n/**\n * Returns the current multi-selection set of block client IDs, or an empty\n * array if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {Array} Multi-selected block client IDs.\n */\nexport const getMultiSelectedBlockClientIds = createSelector(\n\t( state ) => {\n\t\tconst { start, end } = state.blockSelection;\n\t\tif ( start === end ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Retrieve root client ID to aid in retrieving relevant nested block\n\t\t// order, being careful to allow the falsey empty string top-level root\n\t\t// by explicitly testing against null.\n\t\tconst rootClientId = getBlockRootClientId( state, start );\n\t\tif ( rootClientId === null ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst blockOrder = getBlockOrder( state, rootClientId );\n\t\tconst startIndex = blockOrder.indexOf( start );\n\t\tconst endIndex = blockOrder.indexOf( end );\n\n\t\tif ( startIndex > endIndex ) {\n\t\t\treturn blockOrder.slice( endIndex, startIndex + 1 );\n\t\t}\n\n\t\treturn blockOrder.slice( startIndex, endIndex + 1 );\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t\tstate.blockSelection.start,\n\t\tstate.blockSelection.end,\n\t],\n);\n\n/**\n * Returns the current multi-selection set of blocks, or an empty array if\n * there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {Array} Multi-selected block objects.\n */\nexport const getMultiSelectedBlocks = createSelector(\n\t( state ) => {\n\t\tconst multiSelectedBlockClientIds = getMultiSelectedBlockClientIds( state );\n\t\tif ( ! multiSelectedBlockClientIds.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\n\t\treturn multiSelectedBlockClientIds.map( ( clientId ) => getBlock( state, clientId ) );\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t\tstate.blockSelection.start,\n\t\tstate.blockSelection.end,\n\t\tstate.editor.present.blocks.byClientId,\n\t\tstate.editor.present.edits.meta,\n\t\tstate.initialEdits.meta,\n\t\tstate.currentPost.meta,\n\t]\n);\n\n/**\n * Returns the client ID of the first block in the multi-selection set, or null\n * if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} First block client ID in the multi-selection set.\n */\nexport function getFirstMultiSelectedBlockClientId( state ) {\n\treturn first( getMultiSelectedBlockClientIds( state ) ) || null;\n}\n\n/**\n * Returns the client ID of the last block in the multi-selection set, or null\n * if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Last block client ID in the multi-selection set.\n */\nexport function getLastMultiSelectedBlockClientId( state ) {\n\treturn last( getMultiSelectedBlockClientIds( state ) ) || null;\n}\n\n/**\n * Checks if possibleAncestorId is an ancestor of possibleDescendentId.\n *\n * @param {Object} state Editor state.\n * @param {string} possibleAncestorId Possible ancestor client ID.\n * @param {string} possibleDescendentId Possible descent client ID.\n *\n * @return {boolean} True if possibleAncestorId is an ancestor\n * of possibleDescendentId, and false otherwise.\n */\nconst isAncestorOf = createSelector(\n\t( state, possibleAncestorId, possibleDescendentId ) => {\n\t\tlet idToCheck = possibleDescendentId;\n\t\twhile ( possibleAncestorId !== idToCheck && idToCheck ) {\n\t\t\tidToCheck = getBlockRootClientId( state, idToCheck );\n\t\t}\n\t\treturn possibleAncestorId === idToCheck;\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks,\n\t],\n);\n\n/**\n * Returns true if a multi-selection exists, and the block corresponding to the\n * specified client ID is the first block of the multi-selection set, or false\n * otherwise.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is first in multi-selection.\n */\nexport function isFirstMultiSelectedBlock( state, clientId ) {\n\treturn getFirstMultiSelectedBlockClientId( state ) === clientId;\n}\n\n/**\n * Returns true if the client ID occurs within the block multi-selection, or\n * false otherwise.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is in multi-selection set.\n */\nexport function isBlockMultiSelected( state, clientId ) {\n\treturn getMultiSelectedBlockClientIds( state ).indexOf( clientId ) !== -1;\n}\n\n/**\n * Returns true if an ancestor of the block is multi-selected, or false\n * otherwise.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether an ancestor of the block is in multi-selection\n * set.\n */\nexport const isAncestorMultiSelected = createSelector(\n\t( state, clientId ) => {\n\t\tlet ancestorClientId = clientId;\n\t\tlet isMultiSelected = false;\n\t\twhile ( ancestorClientId && ! isMultiSelected ) {\n\t\t\tancestorClientId = getBlockRootClientId( state, ancestorClientId );\n\t\t\tisMultiSelected = isBlockMultiSelected( state, ancestorClientId );\n\t\t}\n\t\treturn isMultiSelected;\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks.order,\n\t\tstate.blockSelection.start,\n\t\tstate.blockSelection.end,\n\t],\n);\n/**\n * Returns the client ID of the block which begins the multi-selection set, or\n * null if there is no multi-selection.\n *\n * This is not necessarily the first client ID in the selection.\n *\n * @see getFirstMultiSelectedBlockClientId\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Client ID of block beginning multi-selection.\n */\nexport function getMultiSelectedBlocksStartClientId( state ) {\n\tconst { start, end } = state.blockSelection;\n\tif ( start === end ) {\n\t\treturn null;\n\t}\n\treturn start || null;\n}\n\n/**\n * Returns the client ID of the block which ends the multi-selection set, or\n * null if there is no multi-selection.\n *\n * This is not necessarily the last client ID in the selection.\n *\n * @see getLastMultiSelectedBlockClientId\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Client ID of block ending multi-selection.\n */\nexport function getMultiSelectedBlocksEndClientId( state ) {\n\tconst { start, end } = state.blockSelection;\n\tif ( start === end ) {\n\t\treturn null;\n\t}\n\treturn end || null;\n}\n\n/**\n * Returns an array containing all block client IDs in the editor in the order\n * they appear. Optionally accepts a root client ID of the block list for which\n * the order should be returned, defaulting to the top-level block order.\n *\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Array} Ordered client IDs of editor blocks.\n */\nexport function getBlockOrder( state, rootClientId ) {\n\treturn state.editor.present.blocks.order[ rootClientId || '' ] || EMPTY_ARRAY;\n}\n\n/**\n * Returns the index at which the block corresponding to the specified client\n * ID occurs within the block order, or `-1` if the block does not exist.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {number} Index at which block exists in order.\n */\nexport function getBlockIndex( state, clientId, rootClientId ) {\n\treturn getBlockOrder( state, rootClientId ).indexOf( clientId );\n}\n\n/**\n * Returns true if the block corresponding to the specified client ID is\n * currently selected and no multi-selection exists, or false otherwise.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is selected and multi-selection exists.\n */\nexport function isBlockSelected( state, clientId ) {\n\tconst { start, end } = state.blockSelection;\n\n\tif ( start !== end ) {\n\t\treturn false;\n\t}\n\n\treturn start === clientId;\n}\n\n/**\n * Returns true if one of the block's inner blocks is selected.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n * @param {boolean} deep Perform a deep check.\n *\n * @return {boolean} Whether the block as an inner block selected\n */\nexport function hasSelectedInnerBlock( state, clientId, deep = false ) {\n\treturn some(\n\t\tgetBlockOrder( state, clientId ),\n\t\t( innerClientId ) => (\n\t\t\tisBlockSelected( state, innerClientId ) ||\n\t\t\tisBlockMultiSelected( state, innerClientId ) ||\n\t\t\t( deep && hasSelectedInnerBlock( state, innerClientId, deep ) )\n\t\t)\n\t);\n}\n\n/**\n * Returns true if the block corresponding to the specified client ID is\n * currently selected but isn't the last of the selected blocks. Here \"last\"\n * refers to the block sequence in the document, _not_ the sequence of\n * multi-selection, which is why `state.blockSelection.end` isn't used.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is selected and not the last in the\n * selection.\n */\nexport function isBlockWithinSelection( state, clientId ) {\n\tif ( ! clientId ) {\n\t\treturn false;\n\t}\n\n\tconst clientIds = getMultiSelectedBlockClientIds( state );\n\tconst index = clientIds.indexOf( clientId );\n\treturn index > -1 && index < clientIds.length - 1;\n}\n\n/**\n * Returns true if a multi-selection has been made, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether multi-selection has been made.\n */\nexport function hasMultiSelection( state ) {\n\tconst { start, end } = state.blockSelection;\n\treturn start !== end;\n}\n\n/**\n * Whether in the process of multi-selecting or not. This flag is only true\n * while the multi-selection is being selected (by mouse move), and is false\n * once the multi-selection has been settled.\n *\n * @see hasMultiSelection\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if multi-selecting, false if not.\n */\nexport function isMultiSelecting( state ) {\n\treturn state.blockSelection.isMultiSelecting;\n}\n\n/**\n * Selector that returns if multi-selection is enabled or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.\n */\nexport function isSelectionEnabled( state ) {\n\treturn state.blockSelection.isEnabled;\n}\n\n/**\n * Returns the block's editing mode, defaulting to \"visual\" if not explicitly\n * assigned.\n *\n * @param {Object} state Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Block editing mode.\n */\nexport function getBlockMode( state, clientId ) {\n\treturn state.blocksMode[ clientId ] || 'visual';\n}\n\n/**\n * Returns true if the user is typing, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether user is typing.\n */\nexport function isTyping( state ) {\n\treturn state.isTyping;\n}\n\n/**\n * Returns true if the caret is within formatted text, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the caret is within formatted text.\n */\nexport function isCaretWithinFormattedText( state ) {\n\treturn state.isCaretWithinFormattedText;\n}\n\n/**\n * Returns the insertion point, the index at which the new inserted block would\n * be placed. Defaults to the last index.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} Insertion point object with `rootClientId`, `index`.\n */\nexport function getBlockInsertionPoint( state ) {\n\tlet rootClientId, index;\n\n\tconst { insertionPoint, blockSelection } = state;\n\tif ( insertionPoint !== null ) {\n\t\treturn insertionPoint;\n\t}\n\n\tconst { end } = blockSelection;\n\tif ( end ) {\n\t\trootClientId = getBlockRootClientId( state, end ) || undefined;\n\t\tindex = getBlockIndex( state, end, rootClientId ) + 1;\n\t} else {\n\t\tindex = getBlockOrder( state ).length;\n\t}\n\n\treturn { rootClientId, index };\n}\n\n/**\n * Returns true if we should show the block insertion point.\n *\n * @param {Object} state Global application state.\n *\n * @return {?boolean} Whether the insertion point is visible or not.\n */\nexport function isBlockInsertionPointVisible( state ) {\n\treturn state.insertionPoint !== null;\n}\n\n/**\n * Returns whether the blocks matches the template or not.\n *\n * @param {boolean} state\n * @return {?boolean} Whether the template is valid or not.\n */\nexport function isValidTemplate( state ) {\n\treturn state.template.isValid;\n}\n\n/**\n * Returns the defined block template\n *\n * @param {boolean} state\n * @return {?Array} Block Template\n */\nexport function getTemplate( state ) {\n\treturn state.settings.template;\n}\n\n/**\n * Returns the defined block template lock. Optionally accepts a root block\n * client ID as context, otherwise defaulting to the global context.\n *\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional block root client ID.\n *\n * @return {?string} Block Template Lock\n */\nexport function getTemplateLock( state, rootClientId ) {\n\tif ( ! rootClientId ) {\n\t\treturn state.settings.templateLock;\n\t}\n\n\tconst blockListSettings = getBlockListSettings( state, rootClientId );\n\tif ( ! blockListSettings ) {\n\t\treturn null;\n\t}\n\n\treturn blockListSettings.templateLock;\n}\n\n/**\n * Returns true if the post is currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being saved.\n */\nexport function isSavingPost( state ) {\n\treturn state.saving.requesting;\n}\n\n/**\n * Returns true if a previous post save was attempted successfully, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post was saved successfully.\n */\nexport function didPostSaveRequestSucceed( state ) {\n\treturn state.saving.successful;\n}\n\n/**\n * Returns true if a previous post save was attempted but failed, or false\n * otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post save failed.\n */\nexport function didPostSaveRequestFail( state ) {\n\treturn !! state.saving.error;\n}\n\n/**\n * Returns true if the post is autosaving, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is autosaving.\n */\nexport function isAutosavingPost( state ) {\n\treturn isSavingPost( state ) && !! state.saving.options.isAutosave;\n}\n\n/**\n * Returns true if the post is being previewed, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the post is being previewed.\n */\nexport function isPreviewingPost( state ) {\n\treturn isSavingPost( state ) && !! state.saving.options.isPreview;\n}\n\n/**\n * Returns the post preview link\n *\n * @param {Object} state Global application state.\n *\n * @return {string?} Preview Link.\n */\nexport function getEditedPostPreviewLink( state ) {\n\tconst featuredImageId = getEditedPostAttribute( state, 'featured_media' );\n\tconst previewLink = state.previewLink;\n\tif ( previewLink && featuredImageId ) {\n\t\treturn addQueryArgs( previewLink, { _thumbnail_id: featuredImageId } );\n\t}\n\n\treturn previewLink;\n}\n\n/**\n * Returns a suggested post format for the current post, inferred only if there\n * is a single block within the post and it is of a type known to match a\n * default post format. Returns null if the format cannot be determined.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Suggested post format.\n */\nexport function getSuggestedPostFormat( state ) {\n\tconst blocks = getBlockOrder( state );\n\n\tlet name;\n\t// If there is only one block in the content of the post grab its name\n\t// so we can derive a suitable post format from it.\n\tif ( blocks.length === 1 ) {\n\t\tname = getBlockName( state, blocks[ 0 ] );\n\t}\n\n\t// If there are two blocks in the content and the last one is a text blocks\n\t// grab the name of the first one to also suggest a post format from it.\n\tif ( blocks.length === 2 ) {\n\t\tif ( getBlockName( state, blocks[ 1 ] ) === 'core/paragraph' ) {\n\t\t\tname = getBlockName( state, blocks[ 0 ] );\n\t\t}\n\t}\n\n\t// We only convert to default post formats in core.\n\tswitch ( name ) {\n\t\tcase 'core/image':\n\t\t\treturn 'image';\n\t\tcase 'core/quote':\n\t\tcase 'core/pullquote':\n\t\t\treturn 'quote';\n\t\tcase 'core/gallery':\n\t\t\treturn 'gallery';\n\t\tcase 'core/video':\n\t\tcase 'core-embed/youtube':\n\t\tcase 'core-embed/vimeo':\n\t\t\treturn 'video';\n\t\tcase 'core/audio':\n\t\tcase 'core-embed/spotify':\n\t\tcase 'core-embed/soundcloud':\n\t\t\treturn 'audio';\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns a set of blocks which are to be used in consideration of the post's\n * generated save content.\n *\n * @param {Object} state Editor state.\n *\n * @return {WPBlock[]} Filtered set of blocks for save.\n */\nexport function getBlocksForSerialization( state ) {\n\tconst blocks = getBlocks( state );\n\n\t// A single unmodified default block is assumed to be equivalent to an\n\t// empty post.\n\tconst isSingleUnmodifiedDefaultBlock = (\n\t\tblocks.length === 1 &&\n\t\tisUnmodifiedDefaultBlock( blocks[ 0 ] )\n\t);\n\n\tif ( isSingleUnmodifiedDefaultBlock ) {\n\t\treturn [];\n\t}\n\n\treturn blocks;\n}\n\n/**\n * Returns the content of the post being edited, preferring raw string edit\n * before falling back to serialization of block state.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post content.\n */\nexport const getEditedPostContent = createSelector(\n\t( state ) => {\n\t\tconst edits = getPostEdits( state );\n\t\tif ( 'content' in edits ) {\n\t\t\treturn edits.content;\n\t\t}\n\n\t\tconst blocks = getBlocksForSerialization( state );\n\t\tconst content = serialize( blocks );\n\n\t\t// For compatibility purposes, treat a post consisting of a single\n\t\t// freeform block as legacy content and downgrade to a pre-block-editor\n\t\t// removep'd content format.\n\t\tconst isSingleFreeformBlock = (\n\t\t\tblocks.length === 1 &&\n\t\t\tblocks[ 0 ].name === getFreeformContentHandlerName()\n\t\t);\n\n\t\tif ( isSingleFreeformBlock ) {\n\t\t\treturn removep( content );\n\t\t}\n\n\t\treturn content;\n\t},\n\t( state ) => [\n\t\tstate.editor.present.blocks,\n\t\tstate.editor.present.edits.content,\n\t\tstate.initialEdits.content,\n\t],\n);\n\n/**\n * Determines if the given block type is allowed to be inserted into the block list.\n * This function is not exported and not memoized because using a memoized selector\n * inside another memoized selector is just a waste of time.\n *\n * @param {Object} state Editor state.\n * @param {string} blockName The name of the block type, e.g.' core/paragraph'.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be inserted.\n */\nconst canInsertBlockTypeUnmemoized = ( state, blockName, rootClientId = null ) => {\n\tconst checkAllowList = ( list, item, defaultResult = null ) => {\n\t\tif ( isBoolean( list ) ) {\n\t\t\treturn list;\n\t\t}\n\t\tif ( isArray( list ) ) {\n\t\t\treturn includes( list, item );\n\t\t}\n\t\treturn defaultResult;\n\t};\n\n\tconst blockType = getBlockType( blockName );\n\tif ( ! blockType ) {\n\t\treturn false;\n\t}\n\n\tconst { allowedBlockTypes } = getEditorSettings( state );\n\n\tconst isBlockAllowedInEditor = checkAllowList( allowedBlockTypes, blockName, true );\n\tif ( ! isBlockAllowedInEditor ) {\n\t\treturn false;\n\t}\n\n\tconst isLocked = !! getTemplateLock( state, rootClientId );\n\tif ( isLocked ) {\n\t\treturn false;\n\t}\n\n\tconst parentBlockListSettings = getBlockListSettings( state, rootClientId );\n\tconst parentAllowedBlocks = get( parentBlockListSettings, [ 'allowedBlocks' ] );\n\tconst hasParentAllowedBlock = checkAllowList( parentAllowedBlocks, blockName );\n\n\tconst blockAllowedParentBlocks = blockType.parent;\n\tconst parentName = getBlockName( state, rootClientId );\n\tconst hasBlockAllowedParent = checkAllowList( blockAllowedParentBlocks, parentName );\n\n\tif ( hasParentAllowedBlock !== null && hasBlockAllowedParent !== null ) {\n\t\treturn hasParentAllowedBlock || hasBlockAllowedParent;\n\t} else if ( hasParentAllowedBlock !== null ) {\n\t\treturn hasParentAllowedBlock;\n\t} else if ( hasBlockAllowedParent !== null ) {\n\t\treturn hasBlockAllowedParent;\n\t}\n\n\treturn true;\n};\n\n/**\n * Determines if the given block type is allowed to be inserted into the block list.\n *\n * @param {Object} state Editor state.\n * @param {string} blockName The name of the block type, e.g.' core/paragraph'.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be inserted.\n */\nexport const canInsertBlockType = createSelector(\n\tcanInsertBlockTypeUnmemoized,\n\t( state, blockName, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.editor.present.blocks.byClientId[ rootClientId ],\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t],\n);\n\n/**\n * Returns information about how recently and frequently a block has been inserted.\n *\n * @param {Object} state Global application state.\n * @param {string} id A string which identifies the insert, e.g. 'core/block/12'\n *\n * @return {?{ time: number, count: number }} An object containing `time` which is when the last\n * insert occured as a UNIX epoch, and `count` which is\n * the number of inserts that have occurred.\n */\nfunction getInsertUsage( state, id ) {\n\treturn state.preferences.insertUsage[ id ] || null;\n}\n\n/**\n * Returns whether we can show a block type in the inserter\n *\n * @param {Object} state Global State\n * @param {Object} blockType BlockType\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be shown in the inserter.\n */\nconst canIncludeBlockTypeInInserter = ( state, blockType, rootClientId ) => {\n\tif ( ! hasBlockSupport( blockType, 'inserter', true ) ) {\n\t\treturn false;\n\t}\n\n\treturn canInsertBlockTypeUnmemoized( state, blockType.name, rootClientId );\n};\n\n/**\n * Returns whether we can show a reusable block in the inserter\n *\n * @param {Object} state Global State\n * @param {Object} reusableBlock Reusable block object\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be shown in the inserter.\n */\nconst canIncludeReusableBlockInInserter = ( state, reusableBlock, rootClientId ) => {\n\tif ( ! canInsertBlockTypeUnmemoized( state, 'core/block', rootClientId ) ) {\n\t\treturn false;\n\t}\n\n\tconst referencedBlockName = getBlockName( state, reusableBlock.clientId );\n\tif ( ! referencedBlockName ) {\n\t\treturn false;\n\t}\n\n\tconst referencedBlockType = getBlockType( referencedBlockName );\n\tif ( ! referencedBlockType ) {\n\t\treturn false;\n\t}\n\n\tif ( ! canInsertBlockTypeUnmemoized( state, referencedBlockName, rootClientId ) ) {\n\t\treturn false;\n\t}\n\n\tif ( isAncestorOf( state, reusableBlock.clientId, rootClientId ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n};\n\n/**\n * Determines the items that appear in the inserter. Includes both static\n * items (e.g. a regular block type) and dynamic items (e.g. a reusable block).\n *\n * Each item object contains what's necessary to display a button in the\n * inserter and handle its selection.\n *\n * The 'utility' property indicates how useful we think an item will be to the\n * user. There are 4 levels of utility:\n *\n * 1. Blocks that are contextually useful (utility = 3)\n * 2. Blocks that have been previously inserted (utility = 2)\n * 3. Blocks that are in the common category (utility = 1)\n * 4. All other blocks (utility = 0)\n *\n * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)\n * that combines block usage frequenty and recency.\n *\n * Items are returned ordered descendingly by their 'utility' and 'frecency'.\n *\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Editor.InserterItem[]} Items that appear in inserter.\n *\n * @typedef {Object} Editor.InserterItem\n * @property {string} id Unique identifier for the item.\n * @property {string} name The type of block to create.\n * @property {Object} initialAttributes Attributes to pass to the newly created block.\n * @property {string} title Title of the item, as it appears in the inserter.\n * @property {string} icon Dashicon for the item, as it appears in the inserter.\n * @property {string} category Block category that the item is associated with.\n * @property {string[]} keywords Keywords that can be searched to find this item.\n * @property {boolean} isDisabled Whether or not the user should be prevented from inserting\n * this item.\n * @property {number} utility How useful we think this item is, between 0 and 3.\n * @property {number} frecency Hueristic that combines frequency and recency.\n */\nexport const getInserterItems = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tconst calculateUtility = ( category, count, isContextual ) => {\n\t\t\tif ( isContextual ) {\n\t\t\t\treturn INSERTER_UTILITY_HIGH;\n\t\t\t} else if ( count > 0 ) {\n\t\t\t\treturn INSERTER_UTILITY_MEDIUM;\n\t\t\t} else if ( category === 'common' ) {\n\t\t\t\treturn INSERTER_UTILITY_LOW;\n\t\t\t}\n\t\t\treturn INSERTER_UTILITY_NONE;\n\t\t};\n\n\t\tconst calculateFrecency = ( time, count ) => {\n\t\t\tif ( ! time ) {\n\t\t\t\treturn count;\n\t\t\t}\n\n\t\t\t// The selector is cached, which means Date.now() is the last time that the\n\t\t\t// relevant state changed. This suits our needs.\n\t\t\tconst duration = Date.now() - time;\n\n\t\t\tswitch ( true ) {\n\t\t\t\tcase duration < MILLISECONDS_PER_HOUR:\n\t\t\t\t\treturn count * 4;\n\t\t\t\tcase duration < MILLISECONDS_PER_DAY:\n\t\t\t\t\treturn count * 2;\n\t\t\t\tcase duration < MILLISECONDS_PER_WEEK:\n\t\t\t\t\treturn count / 2;\n\t\t\t\tdefault:\n\t\t\t\t\treturn count / 4;\n\t\t\t}\n\t\t};\n\n\t\tconst buildBlockTypeInserterItem = ( blockType ) => {\n\t\t\tconst id = blockType.name;\n\n\t\t\tlet isDisabled = false;\n\t\t\tif ( ! hasBlockSupport( blockType.name, 'multiple', true ) ) {\n\t\t\t\tisDisabled = some( getBlocksByClientId( state, getClientIdsWithDescendants( state ) ), { name: blockType.name } );\n\t\t\t}\n\n\t\t\tconst isContextual = isArray( blockType.parent );\n\t\t\tconst { time, count = 0 } = getInsertUsage( state, id ) || {};\n\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\tname: blockType.name,\n\t\t\t\tinitialAttributes: {},\n\t\t\t\ttitle: blockType.title,\n\t\t\t\ticon: blockType.icon,\n\t\t\t\tcategory: blockType.category,\n\t\t\t\tkeywords: blockType.keywords,\n\t\t\t\tisDisabled,\n\t\t\t\tutility: calculateUtility( blockType.category, count, isContextual ),\n\t\t\t\tfrecency: calculateFrecency( time, count ),\n\t\t\t\thasChildBlocksWithInserterSupport: hasChildBlocksWithInserterSupport( blockType.name ),\n\t\t\t};\n\t\t};\n\n\t\tconst buildReusableBlockInserterItem = ( reusableBlock ) => {\n\t\t\tconst id = `core/block/${ reusableBlock.id }`;\n\n\t\t\tconst referencedBlockName = getBlockName( state, reusableBlock.clientId );\n\t\t\tconst referencedBlockType = getBlockType( referencedBlockName );\n\n\t\t\tconst { time, count = 0 } = getInsertUsage( state, id ) || {};\n\t\t\tconst utility = calculateUtility( 'reusable', count, false );\n\t\t\tconst frecency = calculateFrecency( time, count );\n\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\tname: 'core/block',\n\t\t\t\tinitialAttributes: { ref: reusableBlock.id },\n\t\t\t\ttitle: reusableBlock.title,\n\t\t\t\ticon: referencedBlockType.icon,\n\t\t\t\tcategory: 'reusable',\n\t\t\t\tkeywords: [],\n\t\t\t\tisDisabled: false,\n\t\t\t\tutility,\n\t\t\t\tfrecency,\n\t\t\t};\n\t\t};\n\n\t\tconst blockTypeInserterItems = getBlockTypes()\n\t\t\t.filter( ( blockType ) => canIncludeBlockTypeInInserter( state, blockType, rootClientId ) )\n\t\t\t.map( buildBlockTypeInserterItem );\n\n\t\tconst reusableBlockInserterItems = __experimentalGetReusableBlocks( state )\n\t\t\t.filter( ( block ) => canIncludeReusableBlockInInserter( state, block, rootClientId ) )\n\t\t\t.map( buildReusableBlockInserterItem );\n\n\t\treturn orderBy(\n\t\t\t[ ...blockTypeInserterItems, ...reusableBlockInserterItems ],\n\t\t\t[ 'utility', 'frecency' ],\n\t\t\t[ 'desc', 'desc' ]\n\t\t);\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.editor.present.blocks,\n\t\tstate.preferences.insertUsage,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tstate.reusableBlocks.data,\n\t\tgetBlockTypes(),\n\t],\n);\n\n/**\n * Determines whether there are items to show in the inserter.\n * @param {Object} state Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Items that appear in inserter.\n */\nexport const hasInserterItems = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tconst hasBlockType = some(\n\t\t\tgetBlockTypes(),\n\t\t\t( blockType ) => canIncludeBlockTypeInInserter( state, blockType, rootClientId )\n\t\t);\n\t\tif ( hasBlockType ) {\n\t\t\treturn true;\n\t\t}\n\t\tconst hasReusableBlock = some(\n\t\t\t__experimentalGetReusableBlocks( state ),\n\t\t\t( block ) => canIncludeReusableBlockInInserter( state, block, rootClientId )\n\t\t);\n\n\t\treturn hasReusableBlock;\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.editor.present.blocks,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tstate.reusableBlocks.data,\n\t\tgetBlockTypes(),\n\t],\n);\n\n/**\n * Returns the reusable block with the given ID.\n *\n * @param {Object} state Global application state.\n * @param {number|string} ref The reusable block's ID.\n *\n * @return {Object} The reusable block, or null if none exists.\n */\nexport const __experimentalGetReusableBlock = createSelector(\n\t( state, ref ) => {\n\t\tconst block = state.reusableBlocks.data[ ref ];\n\t\tif ( ! block ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst isTemporary = isNaN( parseInt( ref ) );\n\n\t\treturn {\n\t\t\t...block,\n\t\t\tid: isTemporary ? ref : +ref,\n\t\t\tisTemporary,\n\t\t};\n\t},\n\t( state, ref ) => [\n\t\tstate.reusableBlocks.data[ ref ],\n\t],\n);\n\n/**\n * Returns whether or not the reusable block with the given ID is being saved.\n *\n * @param {Object} state Global application state.\n * @param {string} ref The reusable block's ID.\n *\n * @return {boolean} Whether or not the reusable block is being saved.\n */\nexport function __experimentalIsSavingReusableBlock( state, ref ) {\n\treturn state.reusableBlocks.isSaving[ ref ] || false;\n}\n\n/**\n * Returns true if the reusable block with the given ID is being fetched, or\n * false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} ref The reusable block's ID.\n *\n * @return {boolean} Whether the reusable block is being fetched.\n */\nexport function __experimentalIsFetchingReusableBlock( state, ref ) {\n\treturn !! state.reusableBlocks.isFetching[ ref ];\n}\n\n/**\n * Returns an array of all reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} An array of all reusable blocks.\n */\nexport function __experimentalGetReusableBlocks( state ) {\n\treturn map(\n\t\tstate.reusableBlocks.data,\n\t\t( value, ref ) => __experimentalGetReusableBlock( state, ref )\n\t);\n}\n\n/**\n * Returns state object prior to a specified optimist transaction ID, or `null`\n * if the transaction corresponding to the given ID cannot be found.\n *\n * @param {Object} state Current global application state.\n * @param {Object} transactionId Optimist transaction ID.\n *\n * @return {Object} Global application state prior to transaction.\n */\nexport function getStateBeforeOptimisticTransaction( state, transactionId ) {\n\tconst transaction = find( state.optimist, ( entry ) => (\n\t\tentry.beforeState &&\n\t\tget( entry.action, [ 'optimist', 'id' ] ) === transactionId\n\t) );\n\n\treturn transaction ? transaction.beforeState : null;\n}\n\n/**\n * Returns true if the post is being published, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether post is being published.\n */\nexport function isPublishingPost( state ) {\n\tif ( ! isSavingPost( state ) ) {\n\t\treturn false;\n\t}\n\n\t// Saving is optimistic, so assume that current post would be marked as\n\t// published if publishing\n\tif ( ! isCurrentPostPublished( state ) ) {\n\t\treturn false;\n\t}\n\n\t// Use post update transaction ID to retrieve the state prior to the\n\t// optimistic transaction\n\tconst stateBeforeRequest = getStateBeforeOptimisticTransaction(\n\t\tstate,\n\t\tPOST_UPDATE_TRANSACTION_ID\n\t);\n\n\t// Consider as publishing when current post prior to request was not\n\t// considered published\n\treturn !! stateBeforeRequest && ! isCurrentPostPublished( stateBeforeRequest );\n}\n\n/**\n * Returns whether the permalink is editable or not.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether or not the permalink is editable.\n */\nexport function isPermalinkEditable( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute( state, 'permalink_template' );\n\n\treturn PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n}\n\n/**\n * Returns the permalink for the post.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} The permalink.\n */\nexport function getPermalink( state ) {\n\tconst { prefix, postName, suffix } = getPermalinkParts( state );\n\n\tif ( isPermalinkEditable( state ) ) {\n\t\treturn prefix + postName + suffix;\n\t}\n\n\treturn prefix;\n}\n\n/**\n * Returns the permalink for a post, split into it's three parts: the prefix, the postName, and the suffix.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The prefix, postName, and suffix for the permalink.\n */\nexport function getPermalinkParts( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute( state, 'permalink_template' );\n\tconst postName = getEditedPostAttribute( state, 'slug' ) || getEditedPostAttribute( state, 'generated_slug' );\n\n\tconst [ prefix, suffix ] = permalinkTemplate.split( PERMALINK_POSTNAME_REGEX );\n\n\treturn {\n\t\tprefix,\n\t\tpostName,\n\t\tsuffix,\n\t};\n}\n\n/**\n * Returns true if an optimistic transaction is pending commit, for which the\n * before state satisfies the given predicate function.\n *\n * @param {Object} state Editor state.\n * @param {Function} predicate Function given state, returning true if match.\n *\n * @return {boolean} Whether predicate matches for some history.\n */\nexport function inSomeHistory( state, predicate ) {\n\tconst { optimist } = state;\n\n\t// In recursion, optimist state won't exist. Assume exhausted options.\n\tif ( ! optimist ) {\n\t\treturn false;\n\t}\n\n\treturn optimist.some( ( { beforeState } ) => (\n\t\tbeforeState && predicate( beforeState )\n\t) );\n}\n\n/**\n * Returns the Block List settings of a block, if any exist.\n *\n * @param {Object} state Editor state.\n * @param {?string} clientId Block client ID.\n *\n * @return {?Object} Block settings of the block if set.\n */\nexport function getBlockListSettings( state, clientId ) {\n\treturn state.blockListSettings[ clientId ];\n}\n\n/**\n * Returns the editor settings.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The editor settings object.\n */\nexport function getEditorSettings( state ) {\n\treturn state.settings;\n}\n\n/**\n * Returns the token settings.\n *\n * @param {Object} state Editor state.\n * @param {?string} name Token name.\n *\n * @return {Object} Token settings object, or the named token settings object if set.\n */\nexport function getTokenSettings( state, name ) {\n\tif ( ! name ) {\n\t\treturn state.tokens;\n\t}\n\n\treturn state.tokens[ name ];\n}\n\n/**\n * Returns whether the post is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostLocked( state ) {\n\treturn state.postLock.isLocked;\n}\n\n/**\n * Returns whether post saving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostSavingLocked( state ) {\n\treturn Object.keys( state.postSavingLock ).length > 0;\n}\n\n/**\n * Returns whether the edition of the post has been taken over.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is post lock takeover.\n */\nexport function isPostLockTakeover( state ) {\n\treturn state.postLock.isTakeover;\n}\n\n/**\n * Returns details about the post lock user.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} A user object.\n */\nexport function getPostLockUser( state ) {\n\treturn state.postLock.user;\n}\n\n/**\n * Returns the active post lock.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The lock object.\n */\nexport function getActivePostLock( state ) {\n\treturn state.postLock.activePostLock;\n}\n\n/**\n * Returns whether or not the user has the unfiltered_html capability.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the user can or can't post unfiltered HTML.\n */\nexport function canUserUseUnfilteredHTML( state ) {\n\treturn has( getCurrentPost( state ), [ '_links', 'wp:action-unfiltered-html' ] );\n}\n\n/**\n * Returns whether the pre-publish panel should be shown\n * or skipped when the user clicks the \"publish\" button.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the pre-publish panel should be shown or not.\n */\nexport function isPublishSidebarEnabled( state ) {\n\tif ( state.preferences.hasOwnProperty( 'isPublishSidebarEnabled' ) ) {\n\t\treturn state.preferences.isPublishSidebarEnabled;\n\t}\n\treturn PREFERENCES_DEFAULTS.isPublishSidebarEnabled;\n}\n","/**\n * Given a block client ID, returns the corresponding DOM node for the block,\n * if exists. As much as possible, this helper should be avoided, and used only\n * in cases where isolated behaviors need remote access to a block node.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Element} Block DOM node.\n */\nexport function getBlockDOMNode( clientId ) {\n\treturn document.querySelector( '[data-block=\"' + clientId + '\"]' );\n}\n\n/**\n * Given a block client ID, returns the corresponding DOM node for the block\n * focusable wrapper, if exists. As much as possible, this helper should be\n * avoided, and used only in cases where isolated behaviors need remote access\n * to a block node.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Element} Block DOM node.\n */\nexport function getBlockFocusableWrapper( clientId ) {\n\treturn getBlockDOMNode( clientId ).closest( '.editor-block-list__block' );\n}\n\n/**\n * Returns true if the given HTMLElement is a block focus stop. Blocks without\n * their own text fields rely on the focus stop to be keyboard navigable.\n *\n * @param {HTMLElement} element Element to test.\n *\n * @return {boolean} Whether element is a block focus stop.\n */\nexport function isBlockFocusStop( element ) {\n\treturn element.classList.contains( 'editor-block-list__block' );\n}\n\n/**\n * Returns true if two elements are contained within the same block.\n *\n * @param {HTMLElement} a First element.\n * @param {HTMLElement} b Second element.\n *\n * @return {boolean} Whether elements are in the same block.\n */\nexport function isInSameBlock( a, b ) {\n\treturn a.closest( '[data-block]' ) === b.closest( '[data-block]' );\n}\n\n/**\n * Returns true if an elements is considered part of the block and not its children.\n *\n * @param {HTMLElement} blockElement Block container element.\n * @param {HTMLElement} element Element.\n *\n * @return {boolean} Whether element is in the block Element but not its children.\n */\nexport function isInsideRootBlock( blockElement, element ) {\n\tconst innerBlocksContainer = blockElement.querySelector( '.editor-block-list__layout' );\n\treturn blockElement.contains( element ) && (\n\t\t! innerBlocksContainer || ! innerBlocksContainer.contains( element )\n\t);\n}\n\n/**\n * Returns true if the given HTMLElement contains inner blocks (an InnerBlocks\n * element).\n *\n * @param {HTMLElement} element Element to test.\n *\n * @return {boolean} Whether element contains inner blocks.\n */\nexport function hasInnerBlocksContext( element ) {\n\treturn !! element.querySelector( '.editor-block-list__layout' );\n}\n","/**\n * Internal dependencies\n */\nimport mediaUpload from './media-upload';\n\nexport { mediaUpload };\nexport { cleanForSlug } from './url.js';\n","/**\n * External dependencies\n */\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { select } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { mediaUpload } from './media-upload';\n\n/**\n * Upload a media file when the file upload button is activated.\n * Wrapper around mediaUpload() that injects the current post ID.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {string} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n */\nexport default function( {\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n} ) {\n\tconst {\n\t\tgetCurrentPostId,\n\t\tgetEditorSettings,\n\t} = select( 'core/editor' );\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tmaxUploadFileSize = maxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\n\tmediaUpload( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange,\n\t\tadditionalData: {\n\t\t\tpost: getCurrentPostId(),\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => onError( message ),\n\t\twpAllowedMimeTypes,\n\t} );\n}\n","/**\n * External Dependencies\n */\nimport {\n\tcompact,\n\tflatMap,\n\tforEach,\n\tget,\n\thas,\n\tincludes,\n\tmap,\n\tnoop,\n\tomit,\n\tsome,\n\tstartsWith,\n} from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { createBlobURL, revokeBlobURL } from '@wordpress/blob';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Browsers may use unexpected mime types, and they differ from browser to browser.\n * This function computes a flexible array of mime types from the mime type structured provided by the server.\n * Converts { jpg|jpeg|jpe: \"image/jpeg\" } into [ \"image/jpeg\", \"image/jpg\", \"image/jpeg\", \"image/jpe\" ]\n * The computation of this array instead of directly using the object,\n * solves the problem in chrome where mp3 files have audio/mp3 as mime type instead of audio/mpeg.\n * https://bugs.chromium.org/p/chromium/issues/detail?id=227004\n *\n * @param {?Object} wpMimeTypesObject Mime type object received from the server.\n * Extensions are keys separated by '|' and values are mime types associated with an extension.\n *\n * @return {?Array} An array of mime types or the parameter passed if it was \"falsy\".\n */\nexport function getMimeTypesArray( wpMimeTypesObject ) {\n\tif ( ! wpMimeTypesObject ) {\n\t\treturn wpMimeTypesObject;\n\t}\n\treturn flatMap( wpMimeTypesObject, ( mime, extensionsString ) => {\n\t\tconst [ type ] = mime.split( '/' );\n\t\tconst extensions = extensionsString.split( '|' );\n\t\treturn [ mime, ...map( extensions, ( extension ) => `${ type }/${ extension }` ) ];\n\t} );\n}\n\n/**\n *\tMedia Upload is used by audio, image, gallery, video, and file blocks to\n *\thandle uploading a media file when a file upload button is activated.\n *\n *\tTODO: future enhancement to add an upload indicator.\n *\n * @param {Object} $0 Parameters object passed to the function.\n * @param {?Array} $0.allowedTypes Array with the types of media that can be uploaded, if unset all types are allowed.\n * @param {?Object} $0.additionalData Additional data to include in the request.\n * @param {Array} $0.filesList List of files.\n * @param {?number} $0.maxUploadFileSize Maximum upload size in bytes allowed for the site.\n * @param {Function} $0.onError Function called when an error happens.\n * @param {Function} $0.onFileChange Function called each time a file or a temporary representation of the file is available.\n * @param {?Object} $0.wpAllowedMimeTypes List of allowed mime types and file extensions.\n */\nexport async function mediaUpload( {\n\tallowedTypes,\n\tadditionalData = {},\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\twpAllowedMimeTypes = null,\n} ) {\n\t// Cast filesList to array\n\tconst files = [ ...filesList ];\n\n\tconst filesSet = [];\n\tconst setAndUpdateFiles = ( idx, value ) => {\n\t\trevokeBlobURL( get( filesSet, [ idx, 'url' ] ) );\n\t\tfilesSet[ idx ] = value;\n\t\tonFileChange( compact( filesSet ) );\n\t};\n\n\t// Allowed type specified by consumer\n\tconst isAllowedType = ( fileType ) => {\n\t\tif ( ! allowedTypes ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn some(\n\t\t\tallowedTypes,\n\t\t\t( allowedType ) => {\n\t\t\t\t// If a complete mimetype is specified verify if it matches exactly the mime type of the file.\n\t\t\t\tif ( includes( allowedType, '/' ) ) {\n\t\t\t\t\treturn allowedType === fileType;\n\t\t\t\t}\n\t\t\t\t// Otherwise a general mime type is used and we should verify if the file mimetype starts with it.\n\t\t\t\treturn startsWith( fileType, `${ allowedType }/` );\n\t\t\t}\n\t\t);\n\t};\n\n\t// Allowed types for the current WP_User\n\tconst allowedMimeTypesForUser = getMimeTypesArray( wpAllowedMimeTypes );\n\tconst isAllowedMimeTypeForUser = ( fileType ) => {\n\t\treturn includes( allowedMimeTypesForUser, fileType );\n\t};\n\n\t// Build the error message including the filename\n\tconst triggerError = ( error ) => {\n\t\terror.message = [\n\t\t\t<strong key=\"filename\">{ error.file.name }</strong>,\n\t\t\t': ',\n\t\t\terror.message,\n\t\t];\n\n\t\tonError( error );\n\t};\n\n\tconst validFiles = [];\n\n\tfor ( const mediaFile of files ) {\n\t\t// verify if user is allowed to upload this mime type\n\t\tif ( allowedMimeTypesForUser && ! isAllowedMimeTypeForUser( mediaFile.type ) ) {\n\t\t\ttriggerError( {\n\t\t\t\tcode: 'MIME_TYPE_NOT_ALLOWED_FOR_USER',\n\t\t\t\tmessage: __( 'Sorry, this file type is not permitted for security reasons.' ),\n\t\t\t\tfile: mediaFile,\n\t\t\t} );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Check if the block supports this mime type\n\t\tif ( ! isAllowedType( mediaFile.type ) ) {\n\t\t\ttriggerError( {\n\t\t\t\tcode: 'MIME_TYPE_NOT_SUPPORTED',\n\t\t\t\tmessage: __( 'Sorry, this file type is not supported here.' ),\n\t\t\t\tfile: mediaFile,\n\t\t\t} );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// verify if file is greater than the maximum file upload size allowed for the site.\n\t\tif ( maxUploadFileSize && mediaFile.size > maxUploadFileSize ) {\n\t\t\ttriggerError( {\n\t\t\t\tcode: 'SIZE_ABOVE_LIMIT',\n\t\t\t\tmessage: __( 'This file exceeds the maximum upload size for this site.' ),\n\t\t\t\tfile: mediaFile,\n\t\t\t} );\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Don't allow empty files to be uploaded.\n\t\tif ( mediaFile.size <= 0 ) {\n\t\t\ttriggerError( {\n\t\t\t\tcode: 'EMPTY_FILE',\n\t\t\t\tmessage: __( 'This file is empty.' ),\n\t\t\t\tfile: mediaFile,\n\t\t\t} );\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalidFiles.push( mediaFile );\n\n\t\t// Set temporary URL to create placeholder media file, this is replaced\n\t\t// with final file from media gallery when upload is `done` below\n\t\tfilesSet.push( { url: createBlobURL( mediaFile ) } );\n\t\tonFileChange( filesSet );\n\t}\n\n\tfor ( let idx = 0; idx < validFiles.length; ++idx ) {\n\t\tconst mediaFile = validFiles[ idx ];\n\t\ttry {\n\t\t\tconst savedMedia = await createMediaFromFile( mediaFile, additionalData );\n\t\t\tconst mediaObject = {\n\t\t\t\t...omit( savedMedia, [ 'alt_text', 'source_url' ] ),\n\t\t\t\talt: savedMedia.alt_text,\n\t\t\t\tcaption: get( savedMedia, [ 'caption', 'raw' ], '' ),\n\t\t\t\ttitle: savedMedia.title.raw,\n\t\t\t\turl: savedMedia.source_url,\n\t\t\t};\n\t\t\tsetAndUpdateFiles( idx, mediaObject );\n\t\t} catch ( error ) {\n\t\t\t// Reset to empty on failure.\n\t\t\tsetAndUpdateFiles( idx, null );\n\t\t\tlet message;\n\t\t\tif ( has( error, [ 'message' ] ) ) {\n\t\t\t\tmessage = get( error, [ 'message' ] );\n\t\t\t} else {\n\t\t\t\tmessage = sprintf(\n\t\t\t\t\t// translators: %s: file name\n\t\t\t\t\t__( 'Error while uploading file %s to the media library.' ),\n\t\t\t\t\tmediaFile.name\n\t\t\t\t);\n\t\t\t}\n\t\t\tonError( {\n\t\t\t\tcode: 'GENERAL',\n\t\t\t\tmessage,\n\t\t\t\tfile: mediaFile,\n\t\t\t} );\n\t\t}\n\t}\n}\n\n/**\n * @param {File} file Media File to Save.\n * @param {?Object} additionalData Additional data to include in the request.\n *\n * @return {Promise} Media Object Promise.\n */\nfunction createMediaFromFile( file, additionalData ) {\n\t// Create upload payload\n\tconst data = new window.FormData();\n\tdata.append( 'file', file, file.name || file.type.replace( '/', '.' ) );\n\tdata.append( 'title', file.name ? file.name.replace( /\\.[^.]+$/, '' ) : file.type.replace( '/', '.' ) );\n\tforEach( additionalData, ( ( value, key ) => data.append( key, value ) ) );\n\treturn apiFetch( {\n\t\tpath: '/wp/v2/media',\n\t\tbody: data,\n\t\tmethod: 'POST',\n\t} );\n}\n","/**\n * External dependencies\n */\nimport { groupBy } from 'lodash';\n\n/**\n * Returns terms in a tree form.\n *\n * @param {Array} flatTerms Array of terms in flat format.\n *\n * @return {Array} Array of terms in tree format.\n */\nexport function buildTermsTree( flatTerms ) {\n\tconst termsByParent = groupBy( flatTerms, 'parent' );\n\tconst fillWithChildren = ( terms ) => {\n\t\treturn terms.map( ( term ) => {\n\t\t\tconst children = termsByParent[ term.id ];\n\t\t\treturn {\n\t\t\t\t...term,\n\t\t\t\tchildren: children && children.length ?\n\t\t\t\t\tfillWithChildren( children ) :\n\t\t\t\t\t[],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n","/**\n * External dependencies\n */\nimport { deburr, toLower, trim } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Returns the URL of a WPAdmin Page.\n *\n * TODO: This should be moved to a module less specific to the editor.\n *\n * @param {string} page Page to navigate to.\n * @param {Object} query Query Args.\n *\n * @return {string} WPAdmin URL.\n */\nexport function getWPAdminURL( page, query ) {\n\treturn addQueryArgs( page, query );\n}\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what santize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts whitespace, periods, forward slashes and underscores to hyphens.\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin\n * letters. Removes combining diacritical marks. Converts remaining string\n * to lowercase. It does not touch octets, HTML entities, or other encoded\n * characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\treturn toLower( deburr( trim( string.replace( /[\\s\\./_]+/g, '-' ), '-' ) ) );\n}\n","/**\n * External dependencies\n */\nimport { includes } from 'lodash';\n\n/**\n * Higher-order reducer creator for tracking changes to state over time. The\n * returned reducer will include a `isDirty` property on the object reflecting\n * whether the original reference of the reducer has changed.\n *\n * @param {?Object} options Optional options.\n * @param {?Array} options.ignoreTypes Action types upon which to skip check.\n * @param {?Array} options.resetTypes Action types upon which to reset dirty.\n *\n * @return {Function} Higher-order reducer.\n */\nconst withChangeDetection = ( options = {} ) => ( reducer ) => {\n\treturn ( state, action ) => {\n\t\tlet nextState = reducer( state, action );\n\n\t\t// Reset at:\n\t\t// - Initial state\n\t\t// - Reset types\n\t\tconst isReset = (\n\t\t\tstate === undefined ||\n\t\t\tincludes( options.resetTypes, action.type )\n\t\t);\n\n\t\tconst isChanging = state !== nextState;\n\n\t\t// If not intending to update dirty flag, return early and avoid clone.\n\t\tif ( ! isChanging && ! isReset ) {\n\t\t\treturn state;\n\t\t}\n\n\t\t// Avoid mutating state, unless it's already changing by original\n\t\t// reducer and not initial.\n\t\tif ( ! isChanging || state === undefined ) {\n\t\t\tnextState = { ...nextState };\n\t\t}\n\n\t\tconst isIgnored = includes( options.ignoreTypes, action.type );\n\n\t\tif ( isIgnored ) {\n\t\t\t// Preserve the original value if ignored.\n\t\t\tnextState.isDirty = state.isDirty;\n\t\t} else {\n\t\t\tnextState.isDirty = ! isReset && isChanging;\n\t\t}\n\n\t\treturn nextState;\n\t};\n};\n\nexport default withChangeDetection;\n","/**\n * External dependencies\n */\nimport { overSome, includes, first, last, drop, dropRight } from 'lodash';\n\n/**\n * Default options for withHistory reducer enhancer. Refer to withHistory\n * documentation for options explanation.\n *\n * @see withHistory\n *\n * @type {Object}\n */\nconst DEFAULT_OPTIONS = {\n\tresetTypes: [],\n\tignoreTypes: [],\n\tshouldOverwriteState: () => false,\n};\n\n/**\n * Higher-order reducer creator which transforms the result of the original\n * reducer into an object tracking its own history (past, present, future).\n *\n * @param {?Object} options Optional options.\n * @param {?Array} options.resetTypes Action types upon which to\n * clear past.\n * @param {?Array} options.ignoreTypes Action types upon which to\n * avoid history tracking.\n * @param {?Function} options.shouldOverwriteState Function receiving last and\n * current actions, returning\n * boolean indicating whether\n * present should be merged,\n * rather than add undo level.\n *\n * @return {Function} Higher-order reducer.\n */\nconst withHistory = ( options = {} ) => ( reducer ) => {\n\toptions = { ...DEFAULT_OPTIONS, ...options };\n\n\t// `ignoreTypes` is simply a convenience for `shouldOverwriteState`\n\toptions.shouldOverwriteState = overSome( [\n\t\toptions.shouldOverwriteState,\n\t\t( action ) => includes( options.ignoreTypes, action.type ),\n\t] );\n\n\tconst initialState = {\n\t\tpast: [],\n\t\tpresent: reducer( undefined, {} ),\n\t\tfuture: [],\n\t\tlastAction: null,\n\t\tshouldCreateUndoLevel: false,\n\t};\n\n\tconst {\n\t\tresetTypes = [],\n\t\tshouldOverwriteState = () => false,\n\t} = options;\n\n\treturn ( state = initialState, action ) => {\n\t\tconst { past, present, future, lastAction, shouldCreateUndoLevel } = state;\n\t\tconst previousAction = lastAction;\n\n\t\tswitch ( action.type ) {\n\t\t\tcase 'UNDO':\n\t\t\t\t// Can't undo if no past.\n\t\t\t\tif ( ! past.length ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tpast: dropRight( past ),\n\t\t\t\t\tpresent: last( past ),\n\t\t\t\t\tfuture: [ present, ...future ],\n\t\t\t\t\tlastAction: null,\n\t\t\t\t\tshouldCreateUndoLevel: false,\n\t\t\t\t};\n\t\t\tcase 'REDO':\n\t\t\t\t// Can't redo if no future.\n\t\t\t\tif ( ! future.length ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tpast: [ ...past, present ],\n\t\t\t\t\tpresent: first( future ),\n\t\t\t\t\tfuture: drop( future ),\n\t\t\t\t\tlastAction: null,\n\t\t\t\t\tshouldCreateUndoLevel: false,\n\t\t\t\t};\n\n\t\t\tcase 'CREATE_UNDO_LEVEL':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\tlastAction: null,\n\t\t\t\t\tshouldCreateUndoLevel: true,\n\t\t\t\t};\n\t\t}\n\n\t\tconst nextPresent = reducer( present, action );\n\n\t\tif ( includes( resetTypes, action.type ) ) {\n\t\t\treturn {\n\t\t\t\tpast: [],\n\t\t\t\tpresent: nextPresent,\n\t\t\t\tfuture: [],\n\t\t\t\tlastAction: null,\n\t\t\t\tshouldCreateUndoLevel: false,\n\t\t\t};\n\t\t}\n\n\t\tif ( present === nextPresent ) {\n\t\t\treturn state;\n\t\t}\n\n\t\tlet nextPast = past;\n\t\t// The `lastAction` property is used to compare actions in the\n\t\t// `shouldOverwriteState` option. If an action should be ignored, do not\n\t\t// submit that action as the last action, otherwise the ability to\n\t\t// compare subsequent actions will break.\n\t\tlet lastActionToSubmit = previousAction;\n\n\t\tif (\n\t\t\tshouldCreateUndoLevel ||\n\t\t\t! past.length ||\n\t\t\t! shouldOverwriteState( action, previousAction )\n\t\t) {\n\t\t\tnextPast = [ ...past, present ];\n\t\t\tlastActionToSubmit = action;\n\t\t}\n\n\t\treturn {\n\t\t\tpast: nextPast,\n\t\t\tpresent: nextPresent,\n\t\t\tfuture: [],\n\t\t\tshouldCreateUndoLevel: false,\n\t\t\tlastAction: lastActionToSubmit,\n\t\t};\n\t};\n};\n\nexport default withHistory;\n","/*!\n\tautosize 4.0.2\n\tlicense: MIT\n\thttp://www.jacklmoore.com/autosize\n*/\n(function (global, factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(['module', 'exports'], factory);\n\t} else if (typeof exports !== \"undefined\") {\n\t\tfactory(module, exports);\n\t} else {\n\t\tvar mod = {\n\t\t\texports: {}\n\t\t};\n\t\tfactory(mod, mod.exports);\n\t\tglobal.autosize = mod.exports;\n\t}\n})(this, function (module, exports) {\n\t'use strict';\n\n\tvar map = typeof Map === \"function\" ? new Map() : function () {\n\t\tvar keys = [];\n\t\tvar values = [];\n\n\t\treturn {\n\t\t\thas: function has(key) {\n\t\t\t\treturn keys.indexOf(key) > -1;\n\t\t\t},\n\t\t\tget: function get(key) {\n\t\t\t\treturn values[keys.indexOf(key)];\n\t\t\t},\n\t\t\tset: function set(key, value) {\n\t\t\t\tif (keys.indexOf(key) === -1) {\n\t\t\t\t\tkeys.push(key);\n\t\t\t\t\tvalues.push(value);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelete: function _delete(key) {\n\t\t\t\tvar index = keys.indexOf(key);\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tkeys.splice(index, 1);\n\t\t\t\t\tvalues.splice(index, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tvar createEvent = function createEvent(name) {\n\t\treturn new Event(name, { bubbles: true });\n\t};\n\ttry {\n\t\tnew Event('test');\n\t} catch (e) {\n\t\t// IE does not support `new Event()`\n\t\tcreateEvent = function createEvent(name) {\n\t\t\tvar evt = document.createEvent('Event');\n\t\t\tevt.initEvent(name, true, false);\n\t\t\treturn evt;\n\t\t};\n\t}\n\n\tfunction assign(ta) {\n\t\tif (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || map.has(ta)) return;\n\n\t\tvar heightOffset = null;\n\t\tvar clientWidth = null;\n\t\tvar cachedHeight = null;\n\n\t\tfunction init() {\n\t\t\tvar style = window.getComputedStyle(ta, null);\n\n\t\t\tif (style.resize === 'vertical') {\n\t\t\t\tta.style.resize = 'none';\n\t\t\t} else if (style.resize === 'both') {\n\t\t\t\tta.style.resize = 'horizontal';\n\t\t\t}\n\n\t\t\tif (style.boxSizing === 'content-box') {\n\t\t\t\theightOffset = -(parseFloat(style.paddingTop) + parseFloat(style.paddingBottom));\n\t\t\t} else {\n\t\t\t\theightOffset = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n\t\t\t}\n\t\t\t// Fix when a textarea is not on document body and heightOffset is Not a Number\n\t\t\tif (isNaN(heightOffset)) {\n\t\t\t\theightOffset = 0;\n\t\t\t}\n\n\t\t\tupdate();\n\t\t}\n\n\t\tfunction changeOverflow(value) {\n\t\t\t{\n\t\t\t\t// Chrome/Safari-specific fix:\n\t\t\t\t// When the textarea y-overflow is hidden, Chrome/Safari do not reflow the text to account for the space\n\t\t\t\t// made available by removing the scrollbar. The following forces the necessary text reflow.\n\t\t\t\tvar width = ta.style.width;\n\t\t\t\tta.style.width = '0px';\n\t\t\t\t// Force reflow:\n\t\t\t\t/* jshint ignore:start */\n\t\t\t\tta.offsetWidth;\n\t\t\t\t/* jshint ignore:end */\n\t\t\t\tta.style.width = width;\n\t\t\t}\n\n\t\t\tta.style.overflowY = value;\n\t\t}\n\n\t\tfunction getParentOverflows(el) {\n\t\t\tvar arr = [];\n\n\t\t\twhile (el && el.parentNode && el.parentNode instanceof Element) {\n\t\t\t\tif (el.parentNode.scrollTop) {\n\t\t\t\t\tarr.push({\n\t\t\t\t\t\tnode: el.parentNode,\n\t\t\t\t\t\tscrollTop: el.parentNode.scrollTop\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tel = el.parentNode;\n\t\t\t}\n\n\t\t\treturn arr;\n\t\t}\n\n\t\tfunction resize() {\n\t\t\tif (ta.scrollHeight === 0) {\n\t\t\t\t// If the scrollHeight is 0, then the element probably has display:none or is detached from the DOM.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar overflows = getParentOverflows(ta);\n\t\t\tvar docTop = document.documentElement && document.documentElement.scrollTop; // Needed for Mobile IE (ticket #240)\n\n\t\t\tta.style.height = '';\n\t\t\tta.style.height = ta.scrollHeight + heightOffset + 'px';\n\n\t\t\t// used to check if an update is actually necessary on window.resize\n\t\t\tclientWidth = ta.clientWidth;\n\n\t\t\t// prevents scroll-position jumping\n\t\t\toverflows.forEach(function (el) {\n\t\t\t\tel.node.scrollTop = el.scrollTop;\n\t\t\t});\n\n\t\t\tif (docTop) {\n\t\t\t\tdocument.documentElement.scrollTop = docTop;\n\t\t\t}\n\t\t}\n\n\t\tfunction update() {\n\t\t\tresize();\n\n\t\t\tvar styleHeight = Math.round(parseFloat(ta.style.height));\n\t\t\tvar computed = window.getComputedStyle(ta, null);\n\n\t\t\t// Using offsetHeight as a replacement for computed.height in IE, because IE does not account use of border-box\n\t\t\tvar actualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(computed.height)) : ta.offsetHeight;\n\n\t\t\t// The actual height not matching the style height (set via the resize method) indicates that \n\t\t\t// the max-height has been exceeded, in which case the overflow should be allowed.\n\t\t\tif (actualHeight < styleHeight) {\n\t\t\t\tif (computed.overflowY === 'hidden') {\n\t\t\t\t\tchangeOverflow('scroll');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Normally keep overflow set to hidden, to avoid flash of scrollbar as the textarea expands.\n\t\t\t\tif (computed.overflowY !== 'hidden') {\n\t\t\t\t\tchangeOverflow('hidden');\n\t\t\t\t\tresize();\n\t\t\t\t\tactualHeight = computed.boxSizing === 'content-box' ? Math.round(parseFloat(window.getComputedStyle(ta, null).height)) : ta.offsetHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (cachedHeight !== actualHeight) {\n\t\t\t\tcachedHeight = actualHeight;\n\t\t\t\tvar evt = createEvent('autosize:resized');\n\t\t\t\ttry {\n\t\t\t\t\tta.dispatchEvent(evt);\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// Firefox will throw an error on dispatchEvent for a detached element\n\t\t\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=889376\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tvar pageResize = function pageResize() {\n\t\t\tif (ta.clientWidth !== clientWidth) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t};\n\n\t\tvar destroy = function (style) {\n\t\t\twindow.removeEventListener('resize', pageResize, false);\n\t\t\tta.removeEventListener('input', update, false);\n\t\t\tta.removeEventListener('keyup', update, false);\n\t\t\tta.removeEventListener('autosize:destroy', destroy, false);\n\t\t\tta.removeEventListener('autosize:update', update, false);\n\n\t\t\tObject.keys(style).forEach(function (key) {\n\t\t\t\tta.style[key] = style[key];\n\t\t\t});\n\n\t\t\tmap.delete(ta);\n\t\t}.bind(ta, {\n\t\t\theight: ta.style.height,\n\t\t\tresize: ta.style.resize,\n\t\t\toverflowY: ta.style.overflowY,\n\t\t\toverflowX: ta.style.overflowX,\n\t\t\twordWrap: ta.style.wordWrap\n\t\t});\n\n\t\tta.addEventListener('autosize:destroy', destroy, false);\n\n\t\t// IE9 does not fire onpropertychange or oninput for deletions,\n\t\t// so binding to onkeyup to catch most of those events.\n\t\t// There is no way that I know of to detect something like 'cut' in IE9.\n\t\tif ('onpropertychange' in ta && 'oninput' in ta) {\n\t\t\tta.addEventListener('keyup', update, false);\n\t\t}\n\n\t\twindow.addEventListener('resize', pageResize, false);\n\t\tta.addEventListener('input', update, false);\n\t\tta.addEventListener('autosize:update', update, false);\n\t\tta.style.overflowX = 'hidden';\n\t\tta.style.wordWrap = 'break-word';\n\n\t\tmap.set(ta, {\n\t\t\tdestroy: destroy,\n\t\t\tupdate: update\n\t\t});\n\n\t\tinit();\n\t}\n\n\tfunction destroy(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.destroy();\n\t\t}\n\t}\n\n\tfunction update(ta) {\n\t\tvar methods = map.get(ta);\n\t\tif (methods) {\n\t\t\tmethods.update();\n\t\t}\n\t}\n\n\tvar autosize = null;\n\n\t// Do nothing in Node.js environment and IE8 (or lower)\n\tif (typeof window === 'undefined' || typeof window.getComputedStyle !== 'function') {\n\t\tautosize = function autosize(el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\treturn el;\n\t\t};\n\t} else {\n\t\tautosize = function autosize(el, options) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], function (x) {\n\t\t\t\t\treturn assign(x, options);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.destroy = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], destroy);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t\tautosize.update = function (el) {\n\t\t\tif (el) {\n\t\t\t\tArray.prototype.forEach.call(el.length ? el : [el], update);\n\t\t\t}\n\t\t\treturn el;\n\t\t};\n\t}\n\n\texports.default = autosize;\n\tmodule.exports = exports['default'];\n});","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// This code has been refactored for 140 bytes\n// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js\nvar computedStyle = function (el, prop, getComputedStyle) {\n getComputedStyle = window.getComputedStyle;\n\n // In one fell swoop\n return (\n // If we have getComputedStyle\n getComputedStyle ?\n // Query it\n // TODO: From CSS-Query notes, we might need (node, null) for FF\n getComputedStyle(el) :\n\n // Otherwise, we are in IE and use currentStyle\n el.currentStyle\n )[\n // Switch to camelCase for CSSOM\n // DEV: Grabbed from jQuery\n // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n prop.replace(/-(\\w)/gi, function (word, letter) {\n return letter.toUpperCase();\n })\n ];\n};\n\nmodule.exports = computedStyle;\n","export function convertChangesToXML(changes) {\n let ret = [];\n for (let i = 0; i < changes.length; i++) {\n let change = changes[i];\n if (change.added) {\n ret.push('<ins>');\n } else if (change.removed) {\n ret.push('<del>');\n }\n\n ret.push(escapeHTML(change.value));\n\n if (change.added) {\n ret.push('</ins>');\n } else if (change.removed) {\n ret.push('</del>');\n }\n }\n return ret.join('');\n}\n\nfunction escapeHTML(s) {\n let n = s;\n n = n.replace(/&/g, '&amp;');\n n = n.replace(/</g, '&lt;');\n n = n.replace(/>/g, '&gt;');\n n = n.replace(/\"/g, '&quot;');\n\n return n;\n}\n","'use strict';\n\nvar util = require('./util');\n\nfunction scrollIntoView(elem, container, config) {\n config = config || {};\n // document 归一化到 window\n if (container.nodeType === 9) {\n container = util.getWindow(container);\n }\n\n var allowHorizontalScroll = config.allowHorizontalScroll;\n var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n var alignWithTop = config.alignWithTop;\n var alignWithLeft = config.alignWithLeft;\n var offsetTop = config.offsetTop || 0;\n var offsetLeft = config.offsetLeft || 0;\n var offsetBottom = config.offsetBottom || 0;\n var offsetRight = config.offsetRight || 0;\n\n allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n var isWin = util.isWindow(container);\n var elemOffset = util.offset(elem);\n var eh = util.outerHeight(elem);\n var ew = util.outerWidth(elem);\n var containerOffset = undefined;\n var ch = undefined;\n var cw = undefined;\n var containerScroll = undefined;\n var diffTop = undefined;\n var diffBottom = undefined;\n var win = undefined;\n var winScroll = undefined;\n var ww = undefined;\n var wh = undefined;\n\n if (isWin) {\n win = container;\n wh = util.height(win);\n ww = util.width(win);\n winScroll = {\n left: util.scrollLeft(win),\n top: util.scrollTop(win)\n };\n // elem 相对 container 可视视窗的距离\n diffTop = {\n left: elemOffset.left - winScroll.left - offsetLeft,\n top: elemOffset.top - winScroll.top - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom\n };\n containerScroll = winScroll;\n } else {\n containerOffset = util.offset(container);\n ch = container.clientHeight;\n cw = container.clientWidth;\n containerScroll = {\n left: container.scrollLeft,\n top: container.scrollTop\n };\n // elem 相对 container 可视视窗的距离\n // 注意边框, offset 是边框到根节点\n diffTop = {\n left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,\n top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop\n };\n diffBottom = {\n left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,\n top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom\n };\n }\n\n if (diffTop.top < 0 || diffBottom.top > 0) {\n // 强制向上\n if (alignWithTop === true) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else if (alignWithTop === false) {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n } else {\n // 自动调整\n if (diffTop.top < 0) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n if (alignWithTop) {\n util.scrollTop(container, containerScroll.top + diffTop.top);\n } else {\n util.scrollTop(container, containerScroll.top + diffBottom.top);\n }\n }\n }\n\n if (allowHorizontalScroll) {\n if (diffTop.left < 0 || diffBottom.left > 0) {\n // 强制向上\n if (alignWithLeft === true) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else if (alignWithLeft === false) {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n } else {\n // 自动调整\n if (diffTop.left < 0) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n } else {\n if (!onlyScrollIfNeeded) {\n alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n if (alignWithLeft) {\n util.scrollLeft(container, containerScroll.left + diffTop.left);\n } else {\n util.scrollLeft(container, containerScroll.left + diffBottom.left);\n }\n }\n }\n }\n}\n\nmodule.exports = scrollIntoView;","'use strict';\n\nmodule.exports = require('./dom-scroll-into-view');","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n var box = undefined;\n var x = undefined;\n var y = undefined;\n var doc = elem.ownerDocument;\n var body = doc.body;\n var docElem = doc && doc.documentElement;\n // 根据 GBS 最新数据A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n box = elem.getBoundingClientRect();\n\n // 注jQuery 还考虑减去 docElem.clientLeft/clientTop\n // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n // 此外ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n x = box.left;\n y = box.top;\n\n // In IE, most of the time, 2 extra pixels are added to the top and left\n // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and\n // IE6 standards mode, this border can be overridden by setting the\n // document element's border to zero -- thus, we cannot rely on the\n // offset always being 2 pixels.\n\n // In quirks mode, the offset can be determined by querying the body's\n // clientLeft/clientTop, but in standards mode, it is found by querying\n // the document element's clientLeft/clientTop. Since we already called\n // getClientBoundingRect we have already forced a reflow, so it is not\n // too expensive just to query them all.\n\n // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n // 窗口边框标准是设 documentElement ,quirks 时设置 body\n // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n // 但是非 ie 不可能设置窗口边框body html 也不是窗口 ,ie 可以通过 html,body 设置\n // 标准 ie 下 docElem.clientTop 就是 border-top\n // ie7 html 即窗口边框改变不了。永远为 2\n // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n x -= docElem.clientLeft || body.clientLeft || 0;\n y -= docElem.clientTop || body.clientTop || 0;\n\n return {\n left: x,\n top: y\n };\n}\n\nfunction getScroll(w, top) {\n var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n var method = 'scroll' + (top ? 'Top' : 'Left');\n if (typeof ret !== 'number') {\n var d = w.document;\n // ie6,7,8 standard mode\n ret = d.documentElement[method];\n if (typeof ret !== 'number') {\n // quirks mode\n ret = d.body[method];\n }\n }\n return ret;\n}\n\nfunction getScrollLeft(w) {\n return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n var pos = getClientPosition(el);\n var doc = el.ownerDocument;\n var w = doc.defaultView || doc.parentWindow;\n pos.left += getScrollLeft(w);\n pos.top += getScrollTop(w);\n return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n var val = '';\n var d = elem.ownerDocument;\n var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n // https://github.com/kissyteam/kissy/issues/61\n if (computedStyle) {\n val = computedStyle.getPropertyValue(name) || computedStyle[name];\n }\n\n return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n // currentStyle maybe null\n // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n // 在 ie 下不对,需要直接用 offset 方式\n // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n // From the awesome hack by Dean Edwards\n // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n // If we're not dealing with a regular pixel number\n // but a number that has a weird ending, we need to convert it to pixels\n // exclude left right for relativity\n if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n // Remember the original values\n var style = elem.style;\n var left = style[LEFT];\n var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n // prevent flashing of content\n elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n // Put in the new values to get a computed value out\n style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n ret = style.pixelLeft + PX;\n\n // Revert the changed values\n style[LEFT] = left;\n\n elem[RUNTIME_STYLE][LEFT] = rsLeft;\n }\n return ret === '' ? 'auto' : ret;\n}\n\nvar getComputedStyleX = undefined;\nif (typeof window !== 'undefined') {\n getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n for (var i = 0; i < arr.length; i++) {\n fn(arr[i]);\n }\n}\n\nfunction isBorderBoxFn(elem) {\n return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n var old = {};\n var style = elem.style;\n var name = undefined;\n\n // Remember the old values, and insert the new ones\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n old[name] = style[name];\n style[name] = options[name];\n }\n }\n\n callback.call(elem);\n\n // Revert the old values\n for (name in options) {\n if (options.hasOwnProperty(name)) {\n style[name] = old[name];\n }\n }\n}\n\nfunction getPBMWidth(elem, props, which) {\n var value = 0;\n var prop = undefined;\n var j = undefined;\n var i = undefined;\n for (j = 0; j < props.length; j++) {\n prop = props[j];\n if (prop) {\n for (i = 0; i < which.length; i++) {\n var cssProp = undefined;\n if (prop === 'border') {\n cssProp = prop + which[i] + 'Width';\n } else {\n cssProp = prop + which[i];\n }\n value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n }\n }\n }\n return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n // must use == for ie8\n /* eslint eqeqeq:0 */\n return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n domUtils['doc' + name] = function (refWin) {\n var d = refWin.document;\n return Math.max(\n // firefox chrome documentElement.scrollHeight< body.scrollHeight\n // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n d.documentElement['scroll' + name],\n // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n d.body['scroll' + name], domUtils['viewport' + name](d));\n };\n\n domUtils['viewport' + name] = function (win) {\n // pc browser includes scrollbar in window.innerWidth\n var prop = 'client' + name;\n var doc = win.document;\n var body = doc.body;\n var documentElement = doc.documentElement;\n var documentElementProp = documentElement[prop];\n // 标准模式取 documentElement\n // backcompat 取 body\n return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra] 'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n if (isWindow(elem)) {\n return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n } else if (elem.nodeType === 9) {\n return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n }\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem, computedStyle);\n var cssBoxValue = 0;\n if (borderBoxValue == null || borderBoxValue <= 0) {\n borderBoxValue = undefined;\n // Fall back to computed then un computed css if necessary\n cssBoxValue = getComputedStyleX(elem, name);\n if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n cssBoxValue = elem.style[name] || 0;\n }\n // Normalize '', auto, and prepare for extra\n cssBoxValue = parseFloat(cssBoxValue) || 0;\n }\n if (extra === undefined) {\n extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n }\n var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n var val = borderBoxValue || cssBoxValue;\n if (extra === CONTENT_INDEX) {\n if (borderBoxValueOrIsBorderBox) {\n return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n }\n return cssBoxValue;\n }\n if (borderBoxValueOrIsBorderBox) {\n var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);\n return val + (extra === BORDER_INDEX ? 0 : padding);\n }\n return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n position: 'absolute',\n visibility: 'hidden',\n display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n var val = undefined;\n var args = arguments;\n // in case elem is window\n // elem.offsetWidth === undefined\n if (elem.offsetWidth !== 0) {\n val = getWH.apply(undefined, args);\n } else {\n swap(elem, cssShow, function () {\n val = getWH.apply(undefined, args);\n });\n }\n return val;\n}\n\nfunction css(el, name, v) {\n var value = v;\n if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n for (var i in name) {\n if (name.hasOwnProperty(i)) {\n css(el, i, name[i]);\n }\n }\n return undefined;\n }\n if (typeof value !== 'undefined') {\n if (typeof value === 'number') {\n value += 'px';\n }\n el.style[name] = value;\n return undefined;\n }\n return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], function (name) {\n var first = name.charAt(0).toUpperCase() + name.slice(1);\n domUtils['outer' + first] = function (el, includeMargin) {\n return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n };\n var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n domUtils[name] = function (elem, val) {\n if (val !== undefined) {\n if (elem) {\n var computedStyle = getComputedStyleX(elem);\n var isBorderBox = isBorderBoxFn(elem);\n if (isBorderBox) {\n val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n }\n return css(elem, name, val);\n }\n return undefined;\n }\n return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n // set position first, in-case top/left are set even on static elem\n if (css(elem, 'position') === 'static') {\n elem.style.position = 'relative';\n }\n\n var old = getOffset(elem);\n var ret = {};\n var current = undefined;\n var key = undefined;\n\n for (key in offset) {\n if (offset.hasOwnProperty(key)) {\n current = parseFloat(css(elem, key)) || 0;\n ret[key] = current + offset[key] - old[key];\n }\n }\n css(elem, ret);\n}\n\nmodule.exports = _extends({\n getWindow: function getWindow(node) {\n var doc = node.ownerDocument || node;\n return doc.defaultView || doc.parentWindow;\n },\n offset: function offset(el, value) {\n if (typeof value !== 'undefined') {\n setOffset(el, value);\n } else {\n return getOffset(el);\n }\n },\n\n isWindow: isWindow,\n each: each,\n css: css,\n clone: function clone(obj) {\n var ret = {};\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret[i] = obj[i];\n }\n }\n var overflow = obj.overflow;\n if (overflow) {\n for (var i in obj) {\n if (obj.hasOwnProperty(i)) {\n ret.overflow[i] = obj.overflow[i];\n }\n }\n }\n return ret;\n },\n scrollLeft: function scrollLeft(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollLeft(w);\n }\n window.scrollTo(v, getScrollTop(w));\n } else {\n if (v === undefined) {\n return w.scrollLeft;\n }\n w.scrollLeft = v;\n }\n },\n scrollTop: function scrollTop(w, v) {\n if (isWindow(w)) {\n if (v === undefined) {\n return getScrollTop(w);\n }\n window.scrollTo(getScrollLeft(w), v);\n } else {\n if (v === undefined) {\n return w.scrollTop;\n }\n w.scrollTop = v;\n }\n },\n\n viewportWidth: 0,\n viewportHeight: 0\n}, domUtils);","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","// Load in dependencies\nvar computedStyle = require('computed-style');\n\n/**\n * Calculate the `line-height` of a given node\n * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.\n * @returns {Number} `line-height` of the element in pixels\n */\nfunction lineHeight(node) {\n // Grab the line-height via style\n var lnHeightStr = computedStyle(node, 'line-height');\n var lnHeight = parseFloat(lnHeightStr, 10);\n\n // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')\n if (lnHeightStr === lnHeight + '') {\n // Save the old lineHeight style and update the em unit to the element\n var _lnHeightStyle = node.style.lineHeight;\n node.style.lineHeight = lnHeightStr + 'em';\n\n // Calculate the em based height\n lnHeightStr = computedStyle(node, 'line-height');\n lnHeight = parseFloat(lnHeightStr, 10);\n\n // Revert the lineHeight style\n if (_lnHeightStyle) {\n node.style.lineHeight = _lnHeightStyle;\n } else {\n delete node.style.lineHeight;\n }\n }\n\n // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)\n // DEV: `em` units are converted to `pt` in IE6\n // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length\n if (lnHeightStr.indexOf('pt') !== -1) {\n lnHeight *= 4;\n lnHeight /= 3;\n // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)\n } else if (lnHeightStr.indexOf('mm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 25.4;\n // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)\n } else if (lnHeightStr.indexOf('cm') !== -1) {\n lnHeight *= 96;\n lnHeight /= 2.54;\n // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)\n } else if (lnHeightStr.indexOf('in') !== -1) {\n lnHeight *= 96;\n // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)\n } else if (lnHeightStr.indexOf('pc') !== -1) {\n lnHeight *= 16;\n }\n\n // Continue our computation\n lnHeight = Math.round(lnHeight);\n\n // If the line-height is \"normal\", calculate by font-size\n if (lnHeightStr === 'normal') {\n // Create a temporary node\n var nodeName = node.nodeName;\n var _node = document.createElement(nodeName);\n _node.innerHTML = '&nbsp;';\n\n // If we have a text area, reset it to only 1 row\n // https://github.com/twolfson/line-height/issues/4\n if (nodeName.toUpperCase() === 'TEXTAREA') {\n _node.setAttribute('rows', '1');\n }\n\n // Set the font-size of the element\n var fontSizeStr = computedStyle(node, 'font-size');\n _node.style.fontSize = fontSizeStr;\n\n // Remove default padding/border which can affect offset height\n // https://github.com/twolfson/line-height/issues/4\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight\n _node.style.padding = '0px';\n _node.style.border = '0px';\n\n // Append it to the body\n var body = document.body;\n body.appendChild(_node);\n\n // Assume the line height of the element is the height\n var height = _node.offsetHeight;\n lnHeight = height;\n\n // Remove our child from the DOM\n body.removeChild(_node);\n }\n\n // Return the calculated height\n return lnHeight;\n}\n\n// Export lineHeight\nmodule.exports = lineHeight;\n","module.exports = function memize( fn, options ) {\n\tvar size = 0,\n\t\tmaxSize, head, tail;\n\n\tif ( options && options.maxSize ) {\n\t\tmaxSize = options.maxSize;\n\t}\n\n\tfunction memoized( /* ...args */ ) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs, i;\n\n\t\tsearchCache: while ( node ) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif ( node.args.length !== arguments.length ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( node.args[ i ] !== arguments[ i ] ) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== head ) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif ( node === tail ) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\tnode.prev.next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\thead.prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply( null, args )\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( head ) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif ( size === maxSize ) {\n\t\t\ttail = tail.prev;\n\t\t\ttail.next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\tif ( process.env.NODE_ENV === 'test' ) {\n\t\t// Cache is not exposed in the public API, but used in tests to ensure\n\t\t// expected list progression\n\t\tmemoized.getCache = function() {\n\t\t\treturn [ head, tail, size ];\n\t\t};\n\t}\n\n\treturn memoized;\n};\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n )\n\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/*! https://mths.be/punycode v1.4.1 by @mathias */\n;(function(root) {\n\n\t/** Detect free variables */\n\tvar freeExports = typeof exports == 'object' && exports &&\n\t\t!exports.nodeType && exports;\n\tvar freeModule = typeof module == 'object' && module &&\n\t\t!module.nodeType && module;\n\tvar freeGlobal = typeof global == 'object' && global;\n\tif (\n\t\tfreeGlobal.global === freeGlobal ||\n\t\tfreeGlobal.window === freeGlobal ||\n\t\tfreeGlobal.self === freeGlobal\n\t) {\n\t\troot = freeGlobal;\n\t}\n\n\t/**\n\t * The `punycode` object.\n\t * @name punycode\n\t * @type Object\n\t */\n\tvar punycode,\n\n\t/** Highest positive signed 32-bit float value */\n\tmaxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1\n\n\t/** Bootstring parameters */\n\tbase = 36,\n\ttMin = 1,\n\ttMax = 26,\n\tskew = 38,\n\tdamp = 700,\n\tinitialBias = 72,\n\tinitialN = 128, // 0x80\n\tdelimiter = '-', // '\\x2D'\n\n\t/** Regular expressions */\n\tregexPunycode = /^xn--/,\n\tregexNonASCII = /[^\\x20-\\x7E]/, // unprintable ASCII chars + non-ASCII chars\n\tregexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g, // RFC 3490 separators\n\n\t/** Error messages */\n\terrors = {\n\t\t'overflow': 'Overflow: input needs wider integers to process',\n\t\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t\t'invalid-input': 'Invalid input'\n\t},\n\n\t/** Convenience shortcuts */\n\tbaseMinusTMin = base - tMin,\n\tfloor = Math.floor,\n\tstringFromCharCode = String.fromCharCode,\n\n\t/** Temporary variable */\n\tkey;\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/**\n\t * A generic error utility function.\n\t * @private\n\t * @param {String} type The error type.\n\t * @returns {Error} Throws a `RangeError` with the applicable error message.\n\t */\n\tfunction error(type) {\n\t\tthrow new RangeError(errors[type]);\n\t}\n\n\t/**\n\t * A generic `Array#map` utility function.\n\t * @private\n\t * @param {Array} array The array to iterate over.\n\t * @param {Function} callback The function that gets called for every array\n\t * item.\n\t * @returns {Array} A new array of values returned by the callback function.\n\t */\n\tfunction map(array, fn) {\n\t\tvar length = array.length;\n\t\tvar result = [];\n\t\twhile (length--) {\n\t\t\tresult[length] = fn(array[length]);\n\t\t}\n\t\treturn result;\n\t}\n\n\t/**\n\t * A simple `Array#map`-like wrapper to work with domain name strings or email\n\t * addresses.\n\t * @private\n\t * @param {String} domain The domain name or email address.\n\t * @param {Function} callback The function that gets called for every\n\t * character.\n\t * @returns {Array} A new string of characters returned by the callback\n\t * function.\n\t */\n\tfunction mapDomain(string, fn) {\n\t\tvar parts = string.split('@');\n\t\tvar result = '';\n\t\tif (parts.length > 1) {\n\t\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t\t// the local part (i.e. everything up to `@`) intact.\n\t\t\tresult = parts[0] + '@';\n\t\t\tstring = parts[1];\n\t\t}\n\t\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\t\tstring = string.replace(regexSeparators, '\\x2E');\n\t\tvar labels = string.split('.');\n\t\tvar encoded = map(labels, fn).join('.');\n\t\treturn result + encoded;\n\t}\n\n\t/**\n\t * Creates an array containing the numeric code points of each Unicode\n\t * character in the string. While JavaScript uses UCS-2 internally,\n\t * this function will convert a pair of surrogate halves (each of which\n\t * UCS-2 exposes as separate characters) into a single code point,\n\t * matching UTF-16.\n\t * @see `punycode.ucs2.encode`\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode.ucs2\n\t * @name decode\n\t * @param {String} string The Unicode input string (UCS-2).\n\t * @returns {Array} The new array of code points.\n\t */\n\tfunction ucs2decode(string) {\n\t\tvar output = [],\n\t\t counter = 0,\n\t\t length = string.length,\n\t\t value,\n\t\t extra;\n\t\twhile (counter < length) {\n\t\t\tvalue = string.charCodeAt(counter++);\n\t\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t\t// high surrogate, and there is a next character\n\t\t\t\textra = string.charCodeAt(counter++);\n\t\t\t\tif ((extra & 0xFC00) == 0xDC00) { // low surrogate\n\t\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t\t} else {\n\t\t\t\t\t// unmatched surrogate; only append this code unit, in case the next\n\t\t\t\t\t// code unit is the high surrogate of a surrogate pair\n\t\t\t\t\toutput.push(value);\n\t\t\t\t\tcounter--;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\toutput.push(value);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\n\t/**\n\t * Creates a string based on an array of numeric code points.\n\t * @see `punycode.ucs2.decode`\n\t * @memberOf punycode.ucs2\n\t * @name encode\n\t * @param {Array} codePoints The array of numeric code points.\n\t * @returns {String} The new Unicode string (UCS-2).\n\t */\n\tfunction ucs2encode(array) {\n\t\treturn map(array, function(value) {\n\t\t\tvar output = '';\n\t\t\tif (value > 0xFFFF) {\n\t\t\t\tvalue -= 0x10000;\n\t\t\t\toutput += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);\n\t\t\t\tvalue = 0xDC00 | value & 0x3FF;\n\t\t\t}\n\t\t\toutput += stringFromCharCode(value);\n\t\t\treturn output;\n\t\t}).join('');\n\t}\n\n\t/**\n\t * Converts a basic code point into a digit/integer.\n\t * @see `digitToBasic()`\n\t * @private\n\t * @param {Number} codePoint The basic numeric code point value.\n\t * @returns {Number} The numeric value of a basic code point (for use in\n\t * representing integers) in the range `0` to `base - 1`, or `base` if\n\t * the code point does not represent a value.\n\t */\n\tfunction basicToDigit(codePoint) {\n\t\tif (codePoint - 48 < 10) {\n\t\t\treturn codePoint - 22;\n\t\t}\n\t\tif (codePoint - 65 < 26) {\n\t\t\treturn codePoint - 65;\n\t\t}\n\t\tif (codePoint - 97 < 26) {\n\t\t\treturn codePoint - 97;\n\t\t}\n\t\treturn base;\n\t}\n\n\t/**\n\t * Converts a digit/integer into a basic code point.\n\t * @see `basicToDigit()`\n\t * @private\n\t * @param {Number} digit The numeric value of a basic code point.\n\t * @returns {Number} The basic code point whose value (when used for\n\t * representing integers) is `digit`, which needs to be in the range\n\t * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n\t * used; else, the lowercase form is used. The behavior is undefined\n\t * if `flag` is non-zero and `digit` has no uppercase form.\n\t */\n\tfunction digitToBasic(digit, flag) {\n\t\t// 0..25 map to ASCII a..z or A..Z\n\t\t// 26..35 map to ASCII 0..9\n\t\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n\t}\n\n\t/**\n\t * Bias adaptation function as per section 3.4 of RFC 3492.\n\t * https://tools.ietf.org/html/rfc3492#section-3.4\n\t * @private\n\t */\n\tfunction adapt(delta, numPoints, firstTime) {\n\t\tvar k = 0;\n\t\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\t\tdelta += floor(delta / numPoints);\n\t\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\t\tdelta = floor(delta / baseMinusTMin);\n\t\t}\n\t\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n\t}\n\n\t/**\n\t * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n\t * symbols.\n\t * @memberOf punycode\n\t * @param {String} input The Punycode string of ASCII-only symbols.\n\t * @returns {String} The resulting string of Unicode symbols.\n\t */\n\tfunction decode(input) {\n\t\t// Don't use UCS-2\n\t\tvar output = [],\n\t\t inputLength = input.length,\n\t\t out,\n\t\t i = 0,\n\t\t n = initialN,\n\t\t bias = initialBias,\n\t\t basic,\n\t\t j,\n\t\t index,\n\t\t oldi,\n\t\t w,\n\t\t k,\n\t\t digit,\n\t\t t,\n\t\t /** Cached calculation results */\n\t\t baseMinusT;\n\n\t\t// Handle the basic code points: let `basic` be the number of input code\n\t\t// points before the last delimiter, or `0` if there is none, then copy\n\t\t// the first basic code points to the output.\n\n\t\tbasic = input.lastIndexOf(delimiter);\n\t\tif (basic < 0) {\n\t\t\tbasic = 0;\n\t\t}\n\n\t\tfor (j = 0; j < basic; ++j) {\n\t\t\t// if it's not a basic code point\n\t\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\t\terror('not-basic');\n\t\t\t}\n\t\t\toutput.push(input.charCodeAt(j));\n\t\t}\n\n\t\t// Main decoding loop: start just after the last delimiter if any basic code\n\t\t// points were copied; start at the beginning otherwise.\n\n\t\tfor (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t\t// `index` is the index of the next character to be consumed.\n\t\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t\t// which gets added to `i`. The overflow checking is easier\n\t\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t\t// value at the end to obtain `delta`.\n\t\t\tfor (oldi = i, w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\t\tif (index >= inputLength) {\n\t\t\t\t\terror('invalid-input');\n\t\t\t\t}\n\n\t\t\t\tdigit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\t\tif (digit >= base || digit > floor((maxInt - i) / w)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\ti += digit * w;\n\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\t\tif (digit < t) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tbaseMinusT = base - t;\n\t\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tw *= baseMinusT;\n\n\t\t\t}\n\n\t\t\tout = output.length + 1;\n\t\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t\t// incrementing `n` each time, so we'll fix that now:\n\t\t\tif (floor(i / out) > maxInt - n) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tn += floor(i / out);\n\t\t\ti %= out;\n\n\t\t\t// Insert `n` at position `i` of the output\n\t\t\toutput.splice(i++, 0, n);\n\n\t\t}\n\n\t\treturn ucs2encode(output);\n\t}\n\n\t/**\n\t * Converts a string of Unicode symbols (e.g. a domain name label) to a\n\t * Punycode string of ASCII-only symbols.\n\t * @memberOf punycode\n\t * @param {String} input The string of Unicode symbols.\n\t * @returns {String} The resulting Punycode string of ASCII-only symbols.\n\t */\n\tfunction encode(input) {\n\t\tvar n,\n\t\t delta,\n\t\t handledCPCount,\n\t\t basicLength,\n\t\t bias,\n\t\t j,\n\t\t m,\n\t\t q,\n\t\t k,\n\t\t t,\n\t\t currentValue,\n\t\t output = [],\n\t\t /** `inputLength` will hold the number of code points in `input`. */\n\t\t inputLength,\n\t\t /** Cached calculation results */\n\t\t handledCPCountPlusOne,\n\t\t baseMinusT,\n\t\t qMinusT;\n\n\t\t// Convert the input in UCS-2 to Unicode\n\t\tinput = ucs2decode(input);\n\n\t\t// Cache the length\n\t\tinputLength = input.length;\n\n\t\t// Initialize the state\n\t\tn = initialN;\n\t\tdelta = 0;\n\t\tbias = initialBias;\n\n\t\t// Handle the basic code points\n\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\tcurrentValue = input[j];\n\t\t\tif (currentValue < 0x80) {\n\t\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t\t}\n\t\t}\n\n\t\thandledCPCount = basicLength = output.length;\n\n\t\t// `handledCPCount` is the number of code points that have been handled;\n\t\t// `basicLength` is the number of basic code points.\n\n\t\t// Finish the basic string - if it is not empty - with a delimiter\n\t\tif (basicLength) {\n\t\t\toutput.push(delimiter);\n\t\t}\n\n\t\t// Main encoding loop:\n\t\twhile (handledCPCount < inputLength) {\n\n\t\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t\t// larger one:\n\t\t\tfor (m = maxInt, j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\t\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\t\tm = currentValue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t\t// but guard against overflow\n\t\t\thandledCPCountPlusOne = handledCPCount + 1;\n\t\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\t\tn = m;\n\n\t\t\tfor (j = 0; j < inputLength; ++j) {\n\t\t\t\tcurrentValue = input[j];\n\n\t\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\t\terror('overflow');\n\t\t\t\t}\n\n\t\t\t\tif (currentValue == n) {\n\t\t\t\t\t// Represent delta as a generalized variable-length integer\n\t\t\t\t\tfor (q = delta, k = base; /* no condition */; k += base) {\n\t\t\t\t\t\tt = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tqMinusT = q - t;\n\t\t\t\t\t\tbaseMinusT = base - t;\n\t\t\t\t\t\toutput.push(\n\t\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t\t}\n\n\t\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n\t\t\t\t\tdelta = 0;\n\t\t\t\t\t++handledCPCount;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++delta;\n\t\t\t++n;\n\n\t\t}\n\t\treturn output.join('');\n\t}\n\n\t/**\n\t * Converts a Punycode string representing a domain name or an email address\n\t * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n\t * it doesn't matter if you call it on a string that has already been\n\t * converted to Unicode.\n\t * @memberOf punycode\n\t * @param {String} input The Punycoded domain name or email address to\n\t * convert to Unicode.\n\t * @returns {String} The Unicode representation of the given Punycode\n\t * string.\n\t */\n\tfunction toUnicode(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexPunycode.test(string)\n\t\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/**\n\t * Converts a Unicode string representing a domain name or an email address to\n\t * Punycode. Only the non-ASCII parts of the domain name will be converted,\n\t * i.e. it doesn't matter if you call it with a domain that's already in\n\t * ASCII.\n\t * @memberOf punycode\n\t * @param {String} input The domain name or email address to convert, as a\n\t * Unicode string.\n\t * @returns {String} The Punycode representation of the given domain name or\n\t * email address.\n\t */\n\tfunction toASCII(input) {\n\t\treturn mapDomain(input, function(string) {\n\t\t\treturn regexNonASCII.test(string)\n\t\t\t\t? 'xn--' + encode(string)\n\t\t\t\t: string;\n\t\t});\n\t}\n\n\t/*--------------------------------------------------------------------------*/\n\n\t/** Define the public API */\n\tpunycode = {\n\t\t/**\n\t\t * A string representing the current Punycode.js version number.\n\t\t * @memberOf punycode\n\t\t * @type String\n\t\t */\n\t\t'version': '1.4.1',\n\t\t/**\n\t\t * An object of methods to convert from JavaScript's internal character\n\t\t * representation (UCS-2) to Unicode code points, and back.\n\t\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t\t * @memberOf punycode\n\t\t * @type Object\n\t\t */\n\t\t'ucs2': {\n\t\t\t'decode': ucs2decode,\n\t\t\t'encode': ucs2encode\n\t\t},\n\t\t'decode': decode,\n\t\t'encode': encode,\n\t\t'toASCII': toASCII,\n\t\t'toUnicode': toUnicode\n\t};\n\n\t/** Expose `punycode` */\n\t// Some AMD build optimizers, like r.js, check for specific condition patterns\n\t// like the following:\n\tif (\n\t\ttypeof define == 'function' &&\n\t\ttypeof define.amd == 'object' &&\n\t\tdefine.amd\n\t) {\n\t\tdefine('punycode', function() {\n\t\t\treturn punycode;\n\t\t});\n\t} else if (freeExports && freeModule) {\n\t\tif (module.exports == freeExports) {\n\t\t\t// in Node.js, io.js, or RingoJS v0.8.0+\n\t\t\tfreeModule.exports = punycode;\n\t\t} else {\n\t\t\t// in Narwhal or RingoJS v0.7.0-\n\t\t\tfor (key in punycode) {\n\t\t\t\tpunycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// in Rhino or a web browser\n\t\troot.punycode = punycode;\n\t}\n\n}(this));\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\n// If obj.hasOwnProperty has been overridden, then calling\n// obj.hasOwnProperty(prop) will break.\n// See: https://github.com/joyent/node/issues/1707\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nmodule.exports = function(qs, sep, eq, options) {\n sep = sep || '&';\n eq = eq || '=';\n var obj = {};\n\n if (typeof qs !== 'string' || qs.length === 0) {\n return obj;\n }\n\n var regexp = /\\+/g;\n qs = qs.split(sep);\n\n var maxKeys = 1000;\n if (options && typeof options.maxKeys === 'number') {\n maxKeys = options.maxKeys;\n }\n\n var len = qs.length;\n // maxKeys <= 0 means that we should not limit keys count\n if (maxKeys > 0 && len > maxKeys) {\n len = maxKeys;\n }\n\n for (var i = 0; i < len; ++i) {\n var x = qs[i].replace(regexp, '%20'),\n idx = x.indexOf(eq),\n kstr, vstr, k, v;\n\n if (idx >= 0) {\n kstr = x.substr(0, idx);\n vstr = x.substr(idx + 1);\n } else {\n kstr = x;\n vstr = '';\n }\n\n k = decodeURIComponent(kstr);\n v = decodeURIComponent(vstr);\n\n if (!hasOwnProperty(obj, k)) {\n obj[k] = v;\n } else if (isArray(obj[k])) {\n obj[k].push(v);\n } else {\n obj[k] = [obj[k], v];\n }\n }\n\n return obj;\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar stringifyPrimitive = function(v) {\n switch (typeof v) {\n case 'string':\n return v;\n\n case 'boolean':\n return v ? 'true' : 'false';\n\n case 'number':\n return isFinite(v) ? v : '';\n\n default:\n return '';\n }\n};\n\nmodule.exports = function(obj, sep, eq, name) {\n sep = sep || '&';\n eq = eq || '=';\n if (obj === null) {\n obj = undefined;\n }\n\n if (typeof obj === 'object') {\n return map(objectKeys(obj), function(k) {\n var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;\n if (isArray(obj[k])) {\n return map(obj[k], function(v) {\n return ks + encodeURIComponent(stringifyPrimitive(v));\n }).join(sep);\n } else {\n return ks + encodeURIComponent(stringifyPrimitive(obj[k]));\n }\n }).join(sep);\n\n }\n\n if (!name) return '';\n return encodeURIComponent(stringifyPrimitive(name)) + eq +\n encodeURIComponent(stringifyPrimitive(obj));\n};\n\nvar isArray = Array.isArray || function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nfunction map (xs, f) {\n if (xs.map) return xs.map(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n res.push(f(xs[i], i));\n }\n return res;\n}\n\nvar objectKeys = Object.keys || function (obj) {\n var res = [];\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) res.push(key);\n }\n return res;\n};\n","'use strict';\n\nexports.decode = exports.parse = require('./decode');\nexports.encode = exports.stringify = require('./encode');\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\n t[p[i]] = s[p[i]];\n return t;\n};\nexports.__esModule = true;\nvar React = require(\"react\");\nvar PropTypes = require(\"prop-types\");\nvar autosize = require(\"autosize\");\nvar _getLineHeight = require(\"line-height\");\nvar getLineHeight = _getLineHeight;\nvar UPDATE = 'autosize:update';\nvar DESTROY = 'autosize:destroy';\nvar RESIZED = 'autosize:resized';\n/**\n * A light replacement for built-in textarea component\n * which automaticaly adjusts its height to match the content\n */\nvar TextareaAutosize = /** @class */ (function (_super) {\n __extends(TextareaAutosize, _super);\n function TextareaAutosize() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n lineHeight: null\n };\n _this.dispatchEvent = function (EVENT_TYPE) {\n var event = document.createEvent('Event');\n event.initEvent(EVENT_TYPE, true, false);\n _this.textarea.dispatchEvent(event);\n };\n _this.updateLineHeight = function () {\n _this.setState({\n lineHeight: getLineHeight(_this.textarea)\n });\n };\n _this.onChange = function (e) {\n var onChange = _this.props.onChange;\n _this.currentValue = e.currentTarget.value;\n onChange && onChange(e);\n };\n _this.saveDOMNodeRef = function (ref) {\n var innerRef = _this.props.innerRef;\n if (innerRef) {\n innerRef(ref);\n }\n _this.textarea = ref;\n };\n _this.getLocals = function () {\n var _a = _this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, props = __rest(_b, [\"onResize\", \"maxRows\", \"onChange\", \"style\", \"innerRef\"]), lineHeight = _a.state.lineHeight, saveDOMNodeRef = _a.saveDOMNodeRef;\n var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;\n return __assign({}, props, { saveDOMNodeRef: saveDOMNodeRef, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, onChange: _this.onChange });\n };\n return _this;\n }\n TextareaAutosize.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, onResize = _a.onResize, maxRows = _a.maxRows;\n if (typeof maxRows === 'number') {\n this.updateLineHeight();\n }\n /*\n the defer is needed to:\n - force \"autosize\" to activate the scrollbar when this.props.maxRows is passed\n - support StyledComponents (see #71)\n */\n setTimeout(function () { return autosize(_this.textarea); });\n if (onResize) {\n this.textarea.addEventListener(RESIZED, onResize);\n }\n };\n TextareaAutosize.prototype.componentWillUnmount = function () {\n var onResize = this.props.onResize;\n if (onResize) {\n this.textarea.removeEventListener(RESIZED, onResize);\n }\n this.dispatchEvent(DESTROY);\n };\n TextareaAutosize.prototype.render = function () {\n var _a = this.getLocals(), children = _a.children, saveDOMNodeRef = _a.saveDOMNodeRef, locals = __rest(_a, [\"children\", \"saveDOMNodeRef\"]);\n return (React.createElement(\"textarea\", __assign({}, locals, { ref: saveDOMNodeRef }), children));\n };\n TextareaAutosize.prototype.componentDidUpdate = function (prevProps) {\n if (this.props.value !== this.currentValue || this.props.rows !== prevProps.rows) {\n this.dispatchEvent(UPDATE);\n }\n };\n TextareaAutosize.defaultProps = {\n rows: 1\n };\n TextareaAutosize.propTypes = {\n rows: PropTypes.number,\n maxRows: PropTypes.number,\n onResize: PropTypes.func,\n innerRef: PropTypes.func\n };\n return TextareaAutosize;\n}(React.Component));\nexports[\"default\"] = TextareaAutosize;\n","\"use strict\";\nexports.__esModule = true;\nvar TextareaAutosize_1 = require(\"./TextareaAutosize\");\nexports[\"default\"] = TextareaAutosize_1[\"default\"];\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n/**\n * Redux dispatch multiple actions\n */\n\nfunction multi(_ref) {\n var dispatch = _ref.dispatch;\n\n return function (next) {\n return function (action) {\n return Array.isArray(action) ? action.filter(Boolean).map(dispatch) : next(action);\n };\n };\n}\n\n/**\n * Exports\n */\n\nexports.default = multi;","module.exports = require('./lib/index.js');\n","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nvar BEGIN = 'BEGIN';\nvar COMMIT = 'COMMIT';\nvar REVERT = 'REVERT';\n// Array({transactionID: string or null, beforeState: {object}, action: {object}}\nvar INITIAL_OPTIMIST = [];\n\nmodule.exports = optimist;\nmodule.exports.BEGIN = BEGIN;\nmodule.exports.COMMIT = COMMIT;\nmodule.exports.REVERT = REVERT;\nfunction optimist(fn) {\n function beginReducer(state, action) {\n var _separateState = separateState(state);\n\n var optimist = _separateState.optimist;\n var innerState = _separateState.innerState;\n\n optimist = optimist.concat([{ beforeState: innerState, action: action }]);\n innerState = fn(innerState, action);\n validateState(innerState, action);\n return _extends({ optimist: optimist }, innerState);\n }\n function commitReducer(state, action) {\n var _separateState2 = separateState(state);\n\n var optimist = _separateState2.optimist;\n var innerState = _separateState2.innerState;\n\n var newOptimist = [],\n started = false,\n committed = false;\n optimist.forEach(function (entry) {\n if (started) {\n if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {\n committed = true;\n newOptimist.push({ action: entry.action });\n } else {\n newOptimist.push(entry);\n }\n } else if (entry.beforeState && !matchesTransaction(entry.action, action.optimist.id)) {\n started = true;\n newOptimist.push(entry);\n } else if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {\n committed = true;\n }\n });\n if (!committed) {\n console.error('Cannot commit transaction with id \"' + action.optimist.id + '\" because it does not exist');\n }\n optimist = newOptimist;\n return baseReducer(optimist, innerState, action);\n }\n function revertReducer(state, action) {\n var _separateState3 = separateState(state);\n\n var optimist = _separateState3.optimist;\n var innerState = _separateState3.innerState;\n\n var newOptimist = [],\n started = false,\n gotInitialState = false,\n currentState = innerState;\n optimist.forEach(function (entry) {\n if (entry.beforeState && matchesTransaction(entry.action, action.optimist.id)) {\n currentState = entry.beforeState;\n gotInitialState = true;\n }\n if (!matchesTransaction(entry.action, action.optimist.id)) {\n if (entry.beforeState) {\n started = true;\n }\n if (started) {\n if (gotInitialState && entry.beforeState) {\n newOptimist.push({\n beforeState: currentState,\n action: entry.action\n });\n } else {\n newOptimist.push(entry);\n }\n }\n if (gotInitialState) {\n currentState = fn(currentState, entry.action);\n validateState(innerState, action);\n }\n }\n });\n if (!gotInitialState) {\n console.error('Cannot revert transaction with id \"' + action.optimist.id + '\" because it does not exist');\n }\n optimist = newOptimist;\n return baseReducer(optimist, currentState, action);\n }\n function baseReducer(optimist, innerState, action) {\n if (optimist.length) {\n optimist = optimist.concat([{ action: action }]);\n }\n innerState = fn(innerState, action);\n validateState(innerState, action);\n return _extends({ optimist: optimist }, innerState);\n }\n return function (state, action) {\n if (action.optimist) {\n switch (action.optimist.type) {\n case BEGIN:\n return beginReducer(state, action);\n case COMMIT:\n return commitReducer(state, action);\n case REVERT:\n return revertReducer(state, action);\n }\n }\n\n var _separateState4 = separateState(state);\n\n var optimist = _separateState4.optimist;\n var innerState = _separateState4.innerState;\n\n if (state && !optimist.length) {\n var nextState = fn(innerState, action);\n if (nextState === innerState) {\n return state;\n }\n validateState(nextState, action);\n return _extends({ optimist: optimist }, nextState);\n }\n return baseReducer(optimist, innerState, action);\n };\n}\n\nfunction matchesTransaction(action, id) {\n return action.optimist && action.optimist.id === id;\n}\n\nfunction validateState(newState, action) {\n if (!newState || typeof newState !== 'object' || Array.isArray(newState)) {\n throw new TypeError('Error while handling \"' + action.type + '\": Optimist requires that state is always a plain object.');\n }\n}\n\nfunction separateState(state) {\n if (!state) {\n return { optimist: INITIAL_OPTIMIST, innerState: state };\n } else {\n var _state$optimist = state.optimist;\n\n var _optimist = _state$optimist === undefined ? INITIAL_OPTIMIST : _state$optimist;\n\n var innerState = _objectWithoutProperties(state, ['optimist']);\n\n return { optimist: _optimist, innerState: innerState };\n }\n}","'use strict';\n\nfunction flattenIntoMap( map, effects ) {\n\tvar i;\n\tif ( Array.isArray( effects ) ) {\n\t\tfor ( i = 0; i < effects.length; i++ ) {\n\t\t\tflattenIntoMap( map, effects[ i ] );\n\t\t}\n\t} else {\n\t\tfor ( i in effects ) {\n\t\t\tmap[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );\n\t\t}\n\t}\n}\n\nfunction refx( effects ) {\n\tvar map = {},\n\t\tmiddleware;\n\n\tflattenIntoMap( map, effects );\n\n\tmiddleware = function( store ) {\n\t\treturn function( next ) {\n\t\t\treturn function( action ) {\n\t\t\t\tvar handlers = map[ action.type ],\n\t\t\t\t\tresult = next( action ),\n\t\t\t\t\ti, handlerAction;\n\n\t\t\t\tif ( handlers ) {\n\t\t\t\t\tfor ( i = 0; i < handlers.length; i++ ) {\n\t\t\t\t\t\thandlerAction = handlers[ i ]( action, store );\n\t\t\t\t\t\tif ( handlerAction ) {\n\t\t\t\t\t\t\tstore.dispatch( handlerAction );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t};\n\t\t};\n\t};\n\n\tmiddleware.effects = map;\n\n\treturn middleware;\n}\n\nmodule.exports = refx;\n","'use strict';\n\nvar LEAF_KEY, hasWeakMap;\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {Object}\n */\nLEAF_KEY = {};\n\n/**\n * Whether environment supports WeakMap.\n *\n * @type {boolean}\n */\nhasWeakMap = typeof WeakMap !== 'undefined';\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @param {*} value Value to return.\n *\n * @return {Array} Value returned as entry in array.\n */\nfunction arrayOf( value ) {\n\treturn [ value ];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike( value ) {\n\treturn !! value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Object} Cache object.\n */\nfunction createCache() {\n\tvar cache = {\n\t\tclear: function() {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {Array} a First array.\n * @param {Array} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual( a, b, fromIndex ) {\n\tvar i;\n\n\tif ( a.length !== b.length ) {\n\t\treturn false;\n\t}\n\n\tfor ( i = fromIndex; i < a.length; i++ ) {\n\t\tif ( a[ i ] !== b[ i ] ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @param {Function} selector Selector function.\n * @param {Function} getDependants Dependant getter returning an immutable\n * reference or array of reference used in\n * cache bust consideration.\n *\n * @return {Function} Memoized selector.\n */\nexport default function( selector, getDependants ) {\n\tvar rootCache, getCache;\n\n\t// Use object source as dependant if getter not provided\n\tif ( ! getDependants ) {\n\t\tgetDependants = arrayOf;\n\t}\n\n\t/**\n\t * Returns the root cache. If WeakMap is supported, this is assigned to the\n\t * root WeakMap cache set, otherwise it is a shared instance of the default\n\t * cache object.\n\t *\n\t * @return {(WeakMap|Object)} Root cache object.\n\t */\n\tfunction getRootCache() {\n\t\treturn rootCache;\n\t}\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {Array} dependants Selector dependants.\n\t *\n\t * @return {Object} Cache object.\n\t */\n\tfunction getWeakMapCache( dependants ) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti, dependant, map, cache;\n\n\t\tfor ( i = 0; i < dependants.length; i++ ) {\n\t\t\tdependant = dependants[ i ];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif ( ! isObjectLike( dependant ) ) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif ( caches.has( dependant ) ) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get( dependant );\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set( dependant, map );\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif ( ! caches.has( LEAF_KEY ) ) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set( LEAF_KEY, cache );\n\t\t}\n\n\t\treturn caches.get( LEAF_KEY );\n\t}\n\n\t// Assign cache handler by availability of WeakMap\n\tgetCache = hasWeakMap ? getWeakMapCache : getRootCache;\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = hasWeakMap ? new WeakMap() : createCache();\n\t}\n\n\t// eslint-disable-next-line jsdoc/check-param-names\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {Object} source Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\tfunction callSelector( /* source, ...extraArgs */ ) {\n\t\tvar len = arguments.length,\n\t\t\tcache, node, i, args, dependants;\n\n\t\t// Create copy of arguments (avoid leaking deoptimization).\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tdependants = getDependants.apply( null, args );\n\t\tcache = getCache( dependants );\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type or lack\n\t\t// of WeakMap support), shallow compare against last dependants and, if\n\t\t// references have changed, destroy cache to recalculate result.\n\t\tif ( ! cache.isUniqueByDependants ) {\n\t\t\tif ( cache.lastDependants && ! isShallowEqual( dependants, cache.lastDependants, 0 ) ) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile ( node ) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif ( ! isShallowEqual( node.args, args, 1 ) ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== cache.head ) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\tnode.prev.next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\tcache.head.prev = node;\n\t\t\t\tcache.head = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\tnode = {\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply( null, args ),\n\t\t};\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[ 0 ] = null;\n\t\tnode.args = args;\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( cache.head ) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = getDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn callSelector;\n}\n","// TinyColor v1.4.1\n// https://github.com/bgrins/TinyColor\n// Brian Grinstead, MIT License\n\n(function(Math) {\n\nvar trimLeft = /^\\s+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n mathRound = Math.round,\n mathMin = Math.min,\n mathMax = Math.max,\n mathRandom = Math.random;\n\nfunction tinycolor (color, opts) {\n\n color = (color) ? color : '';\n opts = opts || { };\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n this._originalInput = color,\n this._r = rgb.r,\n this._g = rgb.g,\n this._b = rgb.b,\n this._a = rgb.a,\n this._roundA = mathRound(100*this._a) / 100,\n this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) { this._r = mathRound(this._r); }\n if (this._g < 1) { this._g = mathRound(this._g); }\n if (this._b < 1) { this._b = mathRound(this._b); }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n}\n\ntinycolor.prototype = {\n isDark: function() {\n return this.getBrightness() < 128;\n },\n isLight: function() {\n return !this.isDark();\n },\n isValid: function() {\n return this._ok;\n },\n getOriginalInput: function() {\n return this._originalInput;\n },\n getFormat: function() {\n return this._format;\n },\n getAlpha: function() {\n return this._a;\n },\n getBrightness: function() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r/255;\n GsRGB = rgb.g/255;\n BsRGB = rgb.b/255;\n\n if (RsRGB <= 0.03928) {R = RsRGB / 12.92;} else {R = Math.pow(((RsRGB + 0.055) / 1.055), 2.4);}\n if (GsRGB <= 0.03928) {G = GsRGB / 12.92;} else {G = Math.pow(((GsRGB + 0.055) / 1.055), 2.4);}\n if (BsRGB <= 0.03928) {B = BsRGB / 12.92;} else {B = Math.pow(((BsRGB + 0.055) / 1.055), 2.4);}\n return (0.2126 * R) + (0.7152 * G) + (0.0722 * B);\n },\n setAlpha: function(value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100*this._a) / 100;\n return this;\n },\n toHsv: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);\n return (this._a == 1) ?\n \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" :\n \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \"+ this._roundA + \")\";\n },\n toHsl: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);\n return (this._a == 1) ?\n \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" :\n \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \"+ this._roundA + \")\";\n },\n toHex: function(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function(allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function(allow4Char) {\n return '#' + this.toHex8(allow4Char);\n },\n toRgb: function() {\n return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };\n },\n toRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \")\" :\n \"rgba(\" + mathRound(this._r) + \", \" + mathRound(this._g) + \", \" + mathRound(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function() {\n return { r: mathRound(bound01(this._r, 255) * 100) + \"%\", g: mathRound(bound01(this._g, 255) * 100) + \"%\", b: mathRound(bound01(this._b, 255) * 100) + \"%\", a: this._a };\n },\n toPercentageRgbString: function() {\n return (this._a == 1) ?\n \"rgb(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%)\" :\n \"rgba(\" + mathRound(bound01(this._r, 255) * 100) + \"%, \" + mathRound(bound01(this._g, 255) * 100) + \"%, \" + mathRound(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function() {\n if (this._a === 0) {\n return \"transparent\";\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function(secondColor) {\n var hex8String = '#' + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = '#' + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n\n return \"progid:DXImageTransform.Microsoft.gradient(\"+gradientType+\"startColorstr=\"+hex8String+\",endColorstr=\"+secondHex8String+\")\";\n },\n toString: function(format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n clone: function() {\n return tinycolor(this.toString());\n },\n\n _applyModification: function(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function() {\n return this._applyModification(lighten, arguments);\n },\n brighten: function() {\n return this._applyModification(brighten, arguments);\n },\n darken: function() {\n return this._applyModification(darken, arguments);\n },\n desaturate: function() {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function() {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function() {\n return this._applyModification(greyscale, arguments);\n },\n spin: function() {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function() {\n return this._applyCombination(analogous, arguments);\n },\n complement: function() {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function() {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function() {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function() {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function() {\n return this._applyCombination(tetrad, arguments);\n }\n};\n\n// If input is an object, force 1 into \"1.0\" to handle ratios properly\n// String input requires \"1.0\" as input, so 1 will be treated as 1\ntinycolor.fromRatio = function(color, opts) {\n if (typeof color == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n }\n else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n};\n\n// Given a string or object, convert that input to RGB\n// Possible string inputs:\n//\n// \"red\"\n// \"#f00\" or \"f00\"\n// \"#ff0000\" or \"ff0000\"\n// \"#ff000000\" or \"ff000000\"\n// \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n// \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n// \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n// \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n// \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n// \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n// \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n//\nfunction inputToRGB(color) {\n\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n\n if (typeof color == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n }\n else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a\n };\n}\n\n\n// Conversion Functions\n// --------------------\n\n// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n// `rgbToRgb`\n// Handle bounds / percentage checking to conform to CSS color spec\n// <http://www.w3.org/TR/css3-color/>\n// *Assumes:* r, g, b in [0, 255] or [0, 1]\n// *Returns:* { r, g, b } in [0, 255]\nfunction rgbToRgb(r, g, b){\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n}\n\n// `rgbToHsl`\n// Converts an RGB color value to HSL.\n// *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n// *Returns:* { h, s, l } in [0,1]\nfunction rgbToHsl(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, l = (max + min) / 2;\n\n if(max == min) {\n h = s = 0; // achromatic\n }\n else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n}\n\n// `hslToRgb`\n// Converts an HSL color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\nfunction hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if(t < 0) t += 1;\n if(t > 1) t -= 1;\n if(t < 1/6) return p + (q - p) * 6 * t;\n if(t < 1/2) return q;\n if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;\n return p;\n }\n\n if(s === 0) {\n r = g = b = l; // achromatic\n }\n else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1/3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1/3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHsv`\n// Converts an RGB color value to HSV\n// *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n// *Returns:* { h, s, v } in [0,1]\nfunction rgbToHsv(r, g, b) {\n\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b), min = mathMin(r, g, b);\n var h, s, v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if(max == min) {\n h = 0; // achromatic\n }\n else {\n switch(max) {\n case r: h = (g - b) / d + (g < b ? 6 : 0); break;\n case g: h = (b - r) / d + 2; break;\n case b: h = (r - g) / d + 4; break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n}\n\n// `hsvToRgb`\n// Converts an HSV color value to RGB.\n// *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n// *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n}\n\n// `rgbToHex`\n// Converts an RGB color to hex\n// Assumes r, g, and b are contained in the set [0, 255]\n// Returns a 3 or 6 character hex\nfunction rgbToHex(r, g, b, allow3Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToHex`\n// Converts an RGBA color plus alpha transparency to hex\n// Assumes r, g, b are contained in the set [0, 255] and\n// a in [0, 1]. Returns a 4 or 8 character rgba hex\nfunction rgbaToHex(r, g, b, a, allow4Char) {\n\n var hex = [\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n pad2(convertDecimalToHex(a))\n ];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n\n return hex.join(\"\");\n}\n\n// `rgbaToArgbHex`\n// Converts an RGBA color to an ARGB Hex8 string\n// Rarely used, but required for \"toFilter()\"\nfunction rgbaToArgbHex(r, g, b, a) {\n\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16))\n ];\n\n return hex.join(\"\");\n}\n\n// `equals`\n// Can be called with any tinycolor input\ntinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) { return false; }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n};\n\ntinycolor.random = function() {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom()\n });\n};\n\n\n// Modification Functions\n// ----------------------\n// Thanks to less.js for some of the basics here\n// <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\nfunction desaturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction saturate(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n}\n\nfunction greyscale(color) {\n return tinycolor(color).desaturate(100);\n}\n\nfunction lighten (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\nfunction brighten(color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));\n return tinycolor(rgb);\n}\n\nfunction darken (color, amount) {\n amount = (amount === 0) ? 0 : (amount || 10);\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n}\n\n// Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n// Values outside of this range will be wrapped into this range.\nfunction spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n}\n\n// Combination Functions\n// ---------------------\n// Thanks to jQuery xColor for some of the ideas behind these\n// <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\nfunction complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n}\n\nfunction triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })\n ];\n}\n\nfunction splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})\n ];\n}\n\nfunction analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n}\n\nfunction monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h, s = hsv.s, v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v}));\n v = (v + modification) % 1;\n }\n\n return ret;\n}\n\n// Utility Functions\n// ---------------------\n\ntinycolor.mix = function(color1, color2, amount) {\n amount = (amount === 0) ? 0 : (amount || 50);\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n\n var rgba = {\n r: ((rgb2.r - rgb1.r) * p) + rgb1.r,\n g: ((rgb2.g - rgb1.g) * p) + rgb1.g,\n b: ((rgb2.b - rgb1.b) * p) + rgb1.b,\n a: ((rgb2.a - rgb1.a) * p) + rgb1.a\n };\n\n return tinycolor(rgba);\n};\n\n\n// Readability Functions\n// ---------------------\n// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n// `contrast`\n// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\ntinycolor.readability = function(color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n return (Math.max(c1.getLuminance(),c2.getLuminance())+0.05) / (Math.min(c1.getLuminance(),c2.getLuminance())+0.05);\n};\n\n// `isReadable`\n// Ensure that foreground and background color combinations meet WCAG2 guidelines.\n// The third argument is an optional Object.\n// the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n// the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n// If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n// *Example*\n// tinycolor.isReadable(\"#000\", \"#111\") => false\n// tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\ntinycolor.isReadable = function(color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n\n out = false;\n\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n\n};\n\n// `mostReadable`\n// Given a base color and a list of possible foreground or background\n// colors for that base, returns the most readable color.\n// Optionally returns Black or White if the most readable color is unreadable.\n// *Example*\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n// tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n// tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\ntinycolor.mostReadable = function(baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size ;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors ;\n level = args.level;\n size = args.size;\n\n for (var i= 0; i < colorList.length ; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n\n if (tinycolor.isReadable(baseColor, bestColor, {\"level\":level,\"size\":size}) || !includeFallbackColors) {\n return bestColor;\n }\n else {\n args.includeFallbackColors=false;\n return tinycolor.mostReadable(baseColor,[\"#fff\", \"#000\"],args);\n }\n};\n\n\n// Big List of Colors\n// ------------------\n// <http://www.w3.org/TR/css3-color/#svg-color>\nvar names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n};\n\n// Make it easy to access colors via `hexNames[hex]`\nvar hexNames = tinycolor.hexNames = flip(names);\n\n\n// Utilities\n// ---------\n\n// `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\nfunction flip(o) {\n var flipped = { };\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n}\n\n// Return a valid alpha value [0,1] with all invalid values being set to 1\nfunction boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n}\n\n// Take input from [0, n] and return it as [0, 1]\nfunction bound01(n, max) {\n if (isOnePointZero(n)) { n = \"100%\"; }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if ((Math.abs(n - max) < 0.000001)) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n}\n\n// Force a number between 0 and 1\nfunction clamp01(val) {\n return mathMin(1, mathMax(0, val));\n}\n\n// Parse a base-16 hex value into a base-10 integer\nfunction parseIntFromHex(val) {\n return parseInt(val, 16);\n}\n\n// Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n// <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\nfunction isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf('.') != -1 && parseFloat(n) === 1;\n}\n\n// Check to see if string passed in is a percentage\nfunction isPercentage(n) {\n return typeof n === \"string\" && n.indexOf('%') != -1;\n}\n\n// Force a hex value to have 2 characters\nfunction pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n}\n\n// Replace a decimal with it's percentage value\nfunction convertToPercentage(n) {\n if (n <= 1) {\n n = (n * 100) + \"%\";\n }\n\n return n;\n}\n\n// Converts a decimal to a hex value\nfunction convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n}\n// Converts a hex value to a decimal\nfunction convertHexToDecimal(h) {\n return (parseIntFromHex(h) / 255);\n}\n\nvar matchers = (function() {\n\n // <http://www.w3.org/TR/css3-values/#integers>\n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // <http://www.w3.org/TR/css3-values/#number-value>\n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n})();\n\n// `isValidCSSUnit`\n// Take in a single string / number and check to see if it looks like a CSS unit\n// (see `matchers` above for definition).\nfunction isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n}\n\n// `stringInputToObject`\n// Permissive string parsing. Take in a number of formats, and output an object\n// based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\nfunction stringInputToObject(color) {\n\n color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n }\n else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: \"name\" };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if ((match = matchers.hex4.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n a: convertHexToDecimal(match[4] + '' + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n\n return false;\n}\n\nfunction validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\"level\":\"AA\", \"size\":\"small\"};\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\"level\":level, \"size\":size};\n}\n\n// Node: Export function\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports = tinycolor;\n}\n// AMD/requirejs: Define the module\nelse if (typeof define === 'function' && define.amd) {\n define(function () {return tinycolor;});\n}\n// Browser: Expose to window\nelse {\n window.tinycolor = tinycolor;\n}\n\n})(Math);\n","var traverse = module.exports = function (obj) {\n return new Traverse(obj);\n};\n\nfunction Traverse (obj) {\n this.value = obj;\n}\n\nTraverse.prototype.get = function (ps) {\n var node = this.value;\n for (var i = 0; i < ps.length; i ++) {\n var key = ps[i];\n if (!node || !hasOwnProperty.call(node, key)) {\n node = undefined;\n break;\n }\n node = node[key];\n }\n return node;\n};\n\nTraverse.prototype.has = function (ps) {\n var node = this.value;\n for (var i = 0; i < ps.length; i ++) {\n var key = ps[i];\n if (!node || !hasOwnProperty.call(node, key)) {\n return false;\n }\n node = node[key];\n }\n return true;\n};\n\nTraverse.prototype.set = function (ps, value) {\n var node = this.value;\n for (var i = 0; i < ps.length - 1; i ++) {\n var key = ps[i];\n if (!hasOwnProperty.call(node, key)) node[key] = {};\n node = node[key];\n }\n node[ps[i]] = value;\n return value;\n};\n\nTraverse.prototype.map = function (cb) {\n return walk(this.value, cb, true);\n};\n\nTraverse.prototype.forEach = function (cb) {\n this.value = walk(this.value, cb, false);\n return this.value;\n};\n\nTraverse.prototype.reduce = function (cb, init) {\n var skip = arguments.length === 1;\n var acc = skip ? this.value : init;\n this.forEach(function (x) {\n if (!this.isRoot || !skip) {\n acc = cb.call(this, acc, x);\n }\n });\n return acc;\n};\n\nTraverse.prototype.paths = function () {\n var acc = [];\n this.forEach(function (x) {\n acc.push(this.path); \n });\n return acc;\n};\n\nTraverse.prototype.nodes = function () {\n var acc = [];\n this.forEach(function (x) {\n acc.push(this.node);\n });\n return acc;\n};\n\nTraverse.prototype.clone = function () {\n var parents = [], nodes = [];\n \n return (function clone (src) {\n for (var i = 0; i < parents.length; i++) {\n if (parents[i] === src) {\n return nodes[i];\n }\n }\n \n if (typeof src === 'object' && src !== null) {\n var dst = copy(src);\n \n parents.push(src);\n nodes.push(dst);\n \n forEach(objectKeys(src), function (key) {\n dst[key] = clone(src[key]);\n });\n \n parents.pop();\n nodes.pop();\n return dst;\n }\n else {\n return src;\n }\n })(this.value);\n};\n\nfunction walk (root, cb, immutable) {\n var path = [];\n var parents = [];\n var alive = true;\n \n return (function walker (node_) {\n var node = immutable ? copy(node_) : node_;\n var modifiers = {};\n \n var keepGoing = true;\n \n var state = {\n node : node,\n node_ : node_,\n path : [].concat(path),\n parent : parents[parents.length - 1],\n parents : parents,\n key : path.slice(-1)[0],\n isRoot : path.length === 0,\n level : path.length,\n circular : null,\n update : function (x, stopHere) {\n if (!state.isRoot) {\n state.parent.node[state.key] = x;\n }\n state.node = x;\n if (stopHere) keepGoing = false;\n },\n 'delete' : function (stopHere) {\n delete state.parent.node[state.key];\n if (stopHere) keepGoing = false;\n },\n remove : function (stopHere) {\n if (isArray(state.parent.node)) {\n state.parent.node.splice(state.key, 1);\n }\n else {\n delete state.parent.node[state.key];\n }\n if (stopHere) keepGoing = false;\n },\n keys : null,\n before : function (f) { modifiers.before = f },\n after : function (f) { modifiers.after = f },\n pre : function (f) { modifiers.pre = f },\n post : function (f) { modifiers.post = f },\n stop : function () { alive = false },\n block : function () { keepGoing = false }\n };\n \n if (!alive) return state;\n \n function updateState() {\n if (typeof state.node === 'object' && state.node !== null) {\n if (!state.keys || state.node_ !== state.node) {\n state.keys = objectKeys(state.node)\n }\n \n state.isLeaf = state.keys.length == 0;\n \n for (var i = 0; i < parents.length; i++) {\n if (parents[i].node_ === node_) {\n state.circular = parents[i];\n break;\n }\n }\n }\n else {\n state.isLeaf = true;\n state.keys = null;\n }\n \n state.notLeaf = !state.isLeaf;\n state.notRoot = !state.isRoot;\n }\n \n updateState();\n \n // use return values to update if defined\n var ret = cb.call(state, state.node);\n if (ret !== undefined && state.update) state.update(ret);\n \n if (modifiers.before) modifiers.before.call(state, state.node);\n \n if (!keepGoing) return state;\n \n if (typeof state.node == 'object'\n && state.node !== null && !state.circular) {\n parents.push(state);\n \n updateState();\n \n forEach(state.keys, function (key, i) {\n path.push(key);\n \n if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);\n \n var child = walker(state.node[key]);\n if (immutable && hasOwnProperty.call(state.node, key)) {\n state.node[key] = child.node;\n }\n \n child.isLast = i == state.keys.length - 1;\n child.isFirst = i == 0;\n \n if (modifiers.post) modifiers.post.call(state, child);\n \n path.pop();\n });\n parents.pop();\n }\n \n if (modifiers.after) modifiers.after.call(state, state.node);\n \n return state;\n })(root).node;\n}\n\nfunction copy (src) {\n if (typeof src === 'object' && src !== null) {\n var dst;\n \n if (isArray(src)) {\n dst = [];\n }\n else if (isDate(src)) {\n dst = new Date(src.getTime ? src.getTime() : src);\n }\n else if (isRegExp(src)) {\n dst = new RegExp(src);\n }\n else if (isError(src)) {\n dst = { message: src.message };\n }\n else if (isBoolean(src)) {\n dst = new Boolean(src);\n }\n else if (isNumber(src)) {\n dst = new Number(src);\n }\n else if (isString(src)) {\n dst = new String(src);\n }\n else if (Object.create && Object.getPrototypeOf) {\n dst = Object.create(Object.getPrototypeOf(src));\n }\n else if (src.constructor === Object) {\n dst = {};\n }\n else {\n var proto =\n (src.constructor && src.constructor.prototype)\n || src.__proto__\n || {}\n ;\n var T = function () {};\n T.prototype = proto;\n dst = new T;\n }\n \n forEach(objectKeys(src), function (key) {\n dst[key] = src[key];\n });\n return dst;\n }\n else return src;\n}\n\nvar objectKeys = Object.keys || function keys (obj) {\n var res = [];\n for (var key in obj) res.push(key)\n return res;\n};\n\nfunction toS (obj) { return Object.prototype.toString.call(obj) }\nfunction isDate (obj) { return toS(obj) === '[object Date]' }\nfunction isRegExp (obj) { return toS(obj) === '[object RegExp]' }\nfunction isError (obj) { return toS(obj) === '[object Error]' }\nfunction isBoolean (obj) { return toS(obj) === '[object Boolean]' }\nfunction isNumber (obj) { return toS(obj) === '[object Number]' }\nfunction isString (obj) { return toS(obj) === '[object String]' }\n\nvar isArray = Array.isArray || function isArray (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nvar forEach = function (xs, fn) {\n if (xs.forEach) return xs.forEach(fn)\n else for (var i = 0; i < xs.length; i++) {\n fn(xs[i], i, xs);\n }\n};\n\nforEach(objectKeys(Traverse.prototype), function (key) {\n traverse[key] = function (obj) {\n var args = [].slice.call(arguments, 1);\n var t = new Traverse(obj);\n return t[key].apply(t, args);\n };\n});\n\nvar hasOwnProperty = Object.hasOwnProperty || function (obj, key) {\n return key in obj;\n};\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar punycode = require('punycode');\nvar util = require('./util');\n\nexports.parse = urlParse;\nexports.resolve = urlResolve;\nexports.resolveObject = urlResolveObject;\nexports.format = urlFormat;\n\nexports.Url = Url;\n\nfunction Url() {\n this.protocol = null;\n this.slashes = null;\n this.auth = null;\n this.host = null;\n this.port = null;\n this.hostname = null;\n this.hash = null;\n this.search = null;\n this.query = null;\n this.pathname = null;\n this.path = null;\n this.href = null;\n}\n\n// Reference: RFC 3986, RFC 1808, RFC 2396\n\n// define these here so at least they only have to be\n// compiled once on the first module load.\nvar protocolPattern = /^([a-z0-9.+-]+:)/i,\n portPattern = /:[0-9]*$/,\n\n // Special case for a simple path URL\n simplePathPattern = /^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,\n\n // RFC 2396: characters reserved for delimiting URLs.\n // We actually just auto-escape these.\n delims = ['<', '>', '\"', '`', ' ', '\\r', '\\n', '\\t'],\n\n // RFC 2396: characters not allowed for various reasons.\n unwise = ['{', '}', '|', '\\\\', '^', '`'].concat(delims),\n\n // Allowed by RFCs, but cause of XSS attacks. Always escape these.\n autoEscape = ['\\''].concat(unwise),\n // Characters that are never ever allowed in a hostname.\n // Note that any invalid chars are also handled, but these\n // are the ones that are *expected* to be seen, so we fast-path\n // them.\n nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape),\n hostEndingChars = ['/', '?', '#'],\n hostnameMaxLen = 255,\n hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/,\n hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/,\n // protocols that can allow \"unsafe\" and \"unwise\" chars.\n unsafeProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that never have a hostname.\n hostlessProtocol = {\n 'javascript': true,\n 'javascript:': true\n },\n // protocols that always contain a // bit.\n slashedProtocol = {\n 'http': true,\n 'https': true,\n 'ftp': true,\n 'gopher': true,\n 'file': true,\n 'http:': true,\n 'https:': true,\n 'ftp:': true,\n 'gopher:': true,\n 'file:': true\n },\n querystring = require('querystring');\n\nfunction urlParse(url, parseQueryString, slashesDenoteHost) {\n if (url && util.isObject(url) && url instanceof Url) return url;\n\n var u = new Url;\n u.parse(url, parseQueryString, slashesDenoteHost);\n return u;\n}\n\nUrl.prototype.parse = function(url, parseQueryString, slashesDenoteHost) {\n if (!util.isString(url)) {\n throw new TypeError(\"Parameter 'url' must be a string, not \" + typeof url);\n }\n\n // Copy chrome, IE, opera backslash-handling behavior.\n // Back slashes before the query string get converted to forward slashes\n // See: https://code.google.com/p/chromium/issues/detail?id=25916\n var queryIndex = url.indexOf('?'),\n splitter =\n (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#',\n uSplit = url.split(splitter),\n slashRegex = /\\\\/g;\n uSplit[0] = uSplit[0].replace(slashRegex, '/');\n url = uSplit.join(splitter);\n\n var rest = url;\n\n // trim before proceeding.\n // This is to support parse stuff like \" http://foo.com \\n\"\n rest = rest.trim();\n\n if (!slashesDenoteHost && url.split('#').length === 1) {\n // Try fast path regexp\n var simplePath = simplePathPattern.exec(rest);\n if (simplePath) {\n this.path = rest;\n this.href = rest;\n this.pathname = simplePath[1];\n if (simplePath[2]) {\n this.search = simplePath[2];\n if (parseQueryString) {\n this.query = querystring.parse(this.search.substr(1));\n } else {\n this.query = this.search.substr(1);\n }\n } else if (parseQueryString) {\n this.search = '';\n this.query = {};\n }\n return this;\n }\n }\n\n var proto = protocolPattern.exec(rest);\n if (proto) {\n proto = proto[0];\n var lowerProto = proto.toLowerCase();\n this.protocol = lowerProto;\n rest = rest.substr(proto.length);\n }\n\n // figure out if it's got a host\n // user@server is *always* interpreted as a hostname, and url\n // resolution will treat //foo/bar as host=foo,path=bar because that's\n // how the browser resolves relative URLs.\n if (slashesDenoteHost || proto || rest.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)) {\n var slashes = rest.substr(0, 2) === '//';\n if (slashes && !(proto && hostlessProtocol[proto])) {\n rest = rest.substr(2);\n this.slashes = true;\n }\n }\n\n if (!hostlessProtocol[proto] &&\n (slashes || (proto && !slashedProtocol[proto]))) {\n\n // there's a hostname.\n // the first instance of /, ?, ;, or # ends the host.\n //\n // If there is an @ in the hostname, then non-host chars *are* allowed\n // to the left of the last @ sign, unless some host-ending character\n // comes *before* the @-sign.\n // URLs are obnoxious.\n //\n // ex:\n // http://a@b@c/ => user:a@b host:c\n // http://a@b?@c => user:a host:c path:/?@c\n\n // v0.12 TODO(isaacs): This is not quite how Chrome does things.\n // Review our test case against browsers more comprehensively.\n\n // find the first instance of any hostEndingChars\n var hostEnd = -1;\n for (var i = 0; i < hostEndingChars.length; i++) {\n var hec = rest.indexOf(hostEndingChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n\n // at this point, either we have an explicit point where the\n // auth portion cannot go past, or the last @ char is the decider.\n var auth, atSign;\n if (hostEnd === -1) {\n // atSign can be anywhere.\n atSign = rest.lastIndexOf('@');\n } else {\n // atSign must be in auth portion.\n // http://a@b/c@d => host:b auth:a path:/c@d\n atSign = rest.lastIndexOf('@', hostEnd);\n }\n\n // Now we have a portion which is definitely the auth.\n // Pull that off.\n if (atSign !== -1) {\n auth = rest.slice(0, atSign);\n rest = rest.slice(atSign + 1);\n this.auth = decodeURIComponent(auth);\n }\n\n // the host is the remaining to the left of the first non-host char\n hostEnd = -1;\n for (var i = 0; i < nonHostChars.length; i++) {\n var hec = rest.indexOf(nonHostChars[i]);\n if (hec !== -1 && (hostEnd === -1 || hec < hostEnd))\n hostEnd = hec;\n }\n // if we still have not hit it, then the entire thing is a host.\n if (hostEnd === -1)\n hostEnd = rest.length;\n\n this.host = rest.slice(0, hostEnd);\n rest = rest.slice(hostEnd);\n\n // pull out port.\n this.parseHost();\n\n // we've indicated that there is a hostname,\n // so even if it's empty, it has to be present.\n this.hostname = this.hostname || '';\n\n // if hostname begins with [ and ends with ]\n // assume that it's an IPv6 address.\n var ipv6Hostname = this.hostname[0] === '[' &&\n this.hostname[this.hostname.length - 1] === ']';\n\n // validate a little.\n if (!ipv6Hostname) {\n var hostparts = this.hostname.split(/\\./);\n for (var i = 0, l = hostparts.length; i < l; i++) {\n var part = hostparts[i];\n if (!part) continue;\n if (!part.match(hostnamePartPattern)) {\n var newpart = '';\n for (var j = 0, k = part.length; j < k; j++) {\n if (part.charCodeAt(j) > 127) {\n // we replace non-ASCII char with a temporary placeholder\n // we need this to make sure size of hostname is not\n // broken by replacing non-ASCII by nothing\n newpart += 'x';\n } else {\n newpart += part[j];\n }\n }\n // we test again with ASCII char only\n if (!newpart.match(hostnamePartPattern)) {\n var validParts = hostparts.slice(0, i);\n var notHost = hostparts.slice(i + 1);\n var bit = part.match(hostnamePartStart);\n if (bit) {\n validParts.push(bit[1]);\n notHost.unshift(bit[2]);\n }\n if (notHost.length) {\n rest = '/' + notHost.join('.') + rest;\n }\n this.hostname = validParts.join('.');\n break;\n }\n }\n }\n }\n\n if (this.hostname.length > hostnameMaxLen) {\n this.hostname = '';\n } else {\n // hostnames are always lower case.\n this.hostname = this.hostname.toLowerCase();\n }\n\n if (!ipv6Hostname) {\n // IDNA Support: Returns a punycoded representation of \"domain\".\n // It only converts parts of the domain name that\n // have non-ASCII characters, i.e. it doesn't matter if\n // you call it with a domain that already is ASCII-only.\n this.hostname = punycode.toASCII(this.hostname);\n }\n\n var p = this.port ? ':' + this.port : '';\n var h = this.hostname || '';\n this.host = h + p;\n this.href += this.host;\n\n // strip [ and ] from the hostname\n // the host field still retains them, though\n if (ipv6Hostname) {\n this.hostname = this.hostname.substr(1, this.hostname.length - 2);\n if (rest[0] !== '/') {\n rest = '/' + rest;\n }\n }\n }\n\n // now rest is set to the post-host stuff.\n // chop off any delim chars.\n if (!unsafeProtocol[lowerProto]) {\n\n // First, make 100% sure that any \"autoEscape\" chars get\n // escaped, even if encodeURIComponent doesn't think they\n // need to be.\n for (var i = 0, l = autoEscape.length; i < l; i++) {\n var ae = autoEscape[i];\n if (rest.indexOf(ae) === -1)\n continue;\n var esc = encodeURIComponent(ae);\n if (esc === ae) {\n esc = escape(ae);\n }\n rest = rest.split(ae).join(esc);\n }\n }\n\n\n // chop off from the tail first.\n var hash = rest.indexOf('#');\n if (hash !== -1) {\n // got a fragment string.\n this.hash = rest.substr(hash);\n rest = rest.slice(0, hash);\n }\n var qm = rest.indexOf('?');\n if (qm !== -1) {\n this.search = rest.substr(qm);\n this.query = rest.substr(qm + 1);\n if (parseQueryString) {\n this.query = querystring.parse(this.query);\n }\n rest = rest.slice(0, qm);\n } else if (parseQueryString) {\n // no query string, but parseQueryString still requested\n this.search = '';\n this.query = {};\n }\n if (rest) this.pathname = rest;\n if (slashedProtocol[lowerProto] &&\n this.hostname && !this.pathname) {\n this.pathname = '/';\n }\n\n //to support http.request\n if (this.pathname || this.search) {\n var p = this.pathname || '';\n var s = this.search || '';\n this.path = p + s;\n }\n\n // finally, reconstruct the href based on what has been validated.\n this.href = this.format();\n return this;\n};\n\n// format a parsed object into a url string\nfunction urlFormat(obj) {\n // ensure it's an object, and not a string url.\n // If it's an obj, this is a no-op.\n // this way, you can call url_format() on strings\n // to clean up potentially wonky urls.\n if (util.isString(obj)) obj = urlParse(obj);\n if (!(obj instanceof Url)) return Url.prototype.format.call(obj);\n return obj.format();\n}\n\nUrl.prototype.format = function() {\n var auth = this.auth || '';\n if (auth) {\n auth = encodeURIComponent(auth);\n auth = auth.replace(/%3A/i, ':');\n auth += '@';\n }\n\n var protocol = this.protocol || '',\n pathname = this.pathname || '',\n hash = this.hash || '',\n host = false,\n query = '';\n\n if (this.host) {\n host = auth + this.host;\n } else if (this.hostname) {\n host = auth + (this.hostname.indexOf(':') === -1 ?\n this.hostname :\n '[' + this.hostname + ']');\n if (this.port) {\n host += ':' + this.port;\n }\n }\n\n if (this.query &&\n util.isObject(this.query) &&\n Object.keys(this.query).length) {\n query = querystring.stringify(this.query);\n }\n\n var search = this.search || (query && ('?' + query)) || '';\n\n if (protocol && protocol.substr(-1) !== ':') protocol += ':';\n\n // only the slashedProtocols get the //. Not mailto:, xmpp:, etc.\n // unless they had them to begin with.\n if (this.slashes ||\n (!protocol || slashedProtocol[protocol]) && host !== false) {\n host = '//' + (host || '');\n if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname;\n } else if (!host) {\n host = '';\n }\n\n if (hash && hash.charAt(0) !== '#') hash = '#' + hash;\n if (search && search.charAt(0) !== '?') search = '?' + search;\n\n pathname = pathname.replace(/[?#]/g, function(match) {\n return encodeURIComponent(match);\n });\n search = search.replace('#', '%23');\n\n return protocol + host + pathname + search + hash;\n};\n\nfunction urlResolve(source, relative) {\n return urlParse(source, false, true).resolve(relative);\n}\n\nUrl.prototype.resolve = function(relative) {\n return this.resolveObject(urlParse(relative, false, true)).format();\n};\n\nfunction urlResolveObject(source, relative) {\n if (!source) return relative;\n return urlParse(source, false, true).resolveObject(relative);\n}\n\nUrl.prototype.resolveObject = function(relative) {\n if (util.isString(relative)) {\n var rel = new Url();\n rel.parse(relative, false, true);\n relative = rel;\n }\n\n var result = new Url();\n var tkeys = Object.keys(this);\n for (var tk = 0; tk < tkeys.length; tk++) {\n var tkey = tkeys[tk];\n result[tkey] = this[tkey];\n }\n\n // hash is always overridden, no matter what.\n // even href=\"\" will remove it.\n result.hash = relative.hash;\n\n // if the relative url is empty, then there's nothing left to do here.\n if (relative.href === '') {\n result.href = result.format();\n return result;\n }\n\n // hrefs like //foo/bar always cut to the protocol.\n if (relative.slashes && !relative.protocol) {\n // take everything except the protocol from relative\n var rkeys = Object.keys(relative);\n for (var rk = 0; rk < rkeys.length; rk++) {\n var rkey = rkeys[rk];\n if (rkey !== 'protocol')\n result[rkey] = relative[rkey];\n }\n\n //urlParse appends trailing / to urls like http://www.example.com\n if (slashedProtocol[result.protocol] &&\n result.hostname && !result.pathname) {\n result.path = result.pathname = '/';\n }\n\n result.href = result.format();\n return result;\n }\n\n if (relative.protocol && relative.protocol !== result.protocol) {\n // if it's a known url protocol, then changing\n // the protocol does weird things\n // first, if it's not file:, then we MUST have a host,\n // and if there was a path\n // to begin with, then we MUST have a path.\n // if it is file:, then the host is dropped,\n // because that's known to be hostless.\n // anything else is assumed to be absolute.\n if (!slashedProtocol[relative.protocol]) {\n var keys = Object.keys(relative);\n for (var v = 0; v < keys.length; v++) {\n var k = keys[v];\n result[k] = relative[k];\n }\n result.href = result.format();\n return result;\n }\n\n result.protocol = relative.protocol;\n if (!relative.host && !hostlessProtocol[relative.protocol]) {\n var relPath = (relative.pathname || '').split('/');\n while (relPath.length && !(relative.host = relPath.shift()));\n if (!relative.host) relative.host = '';\n if (!relative.hostname) relative.hostname = '';\n if (relPath[0] !== '') relPath.unshift('');\n if (relPath.length < 2) relPath.unshift('');\n result.pathname = relPath.join('/');\n } else {\n result.pathname = relative.pathname;\n }\n result.search = relative.search;\n result.query = relative.query;\n result.host = relative.host || '';\n result.auth = relative.auth;\n result.hostname = relative.hostname || relative.host;\n result.port = relative.port;\n // to support http.request\n if (result.pathname || result.search) {\n var p = result.pathname || '';\n var s = result.search || '';\n result.path = p + s;\n }\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n }\n\n var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'),\n isRelAbs = (\n relative.host ||\n relative.pathname && relative.pathname.charAt(0) === '/'\n ),\n mustEndAbs = (isRelAbs || isSourceAbs ||\n (result.host && relative.pathname)),\n removeAllDots = mustEndAbs,\n srcPath = result.pathname && result.pathname.split('/') || [],\n relPath = relative.pathname && relative.pathname.split('/') || [],\n psychotic = result.protocol && !slashedProtocol[result.protocol];\n\n // if the url is a non-slashed url, then relative\n // links like ../.. should be able\n // to crawl up to the hostname, as well. This is strange.\n // result.protocol has already been set by now.\n // Later on, put the first path part into the host field.\n if (psychotic) {\n result.hostname = '';\n result.port = null;\n if (result.host) {\n if (srcPath[0] === '') srcPath[0] = result.host;\n else srcPath.unshift(result.host);\n }\n result.host = '';\n if (relative.protocol) {\n relative.hostname = null;\n relative.port = null;\n if (relative.host) {\n if (relPath[0] === '') relPath[0] = relative.host;\n else relPath.unshift(relative.host);\n }\n relative.host = null;\n }\n mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === '');\n }\n\n if (isRelAbs) {\n // it's absolute.\n result.host = (relative.host || relative.host === '') ?\n relative.host : result.host;\n result.hostname = (relative.hostname || relative.hostname === '') ?\n relative.hostname : result.hostname;\n result.search = relative.search;\n result.query = relative.query;\n srcPath = relPath;\n // fall through to the dot-handling below.\n } else if (relPath.length) {\n // it's relative\n // throw away the existing file, and take the new path instead.\n if (!srcPath) srcPath = [];\n srcPath.pop();\n srcPath = srcPath.concat(relPath);\n result.search = relative.search;\n result.query = relative.query;\n } else if (!util.isNullOrUndefined(relative.search)) {\n // just pull out the search.\n // like href='?foo'.\n // Put this after the other two cases because it simplifies the booleans\n if (psychotic) {\n result.hostname = result.host = srcPath.shift();\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n result.search = relative.search;\n result.query = relative.query;\n //to support http.request\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.href = result.format();\n return result;\n }\n\n if (!srcPath.length) {\n // no path at all. easy.\n // we've already handled the other stuff above.\n result.pathname = null;\n //to support http.request\n if (result.search) {\n result.path = '/' + result.search;\n } else {\n result.path = null;\n }\n result.href = result.format();\n return result;\n }\n\n // if a url ENDs in . or .., then it must get a trailing slash.\n // however, if it ends in anything else non-slashy,\n // then it must NOT get a trailing slash.\n var last = srcPath.slice(-1)[0];\n var hasTrailingSlash = (\n (result.host || relative.host || srcPath.length > 1) &&\n (last === '.' || last === '..') || last === '');\n\n // strip single dots, resolve double dots to parent dir\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = srcPath.length; i >= 0; i--) {\n last = srcPath[i];\n if (last === '.') {\n srcPath.splice(i, 1);\n } else if (last === '..') {\n srcPath.splice(i, 1);\n up++;\n } else if (up) {\n srcPath.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (!mustEndAbs && !removeAllDots) {\n for (; up--; up) {\n srcPath.unshift('..');\n }\n }\n\n if (mustEndAbs && srcPath[0] !== '' &&\n (!srcPath[0] || srcPath[0].charAt(0) !== '/')) {\n srcPath.unshift('');\n }\n\n if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) {\n srcPath.push('');\n }\n\n var isAbsolute = srcPath[0] === '' ||\n (srcPath[0] && srcPath[0].charAt(0) === '/');\n\n // put the host back\n if (psychotic) {\n result.hostname = result.host = isAbsolute ? '' :\n srcPath.length ? srcPath.shift() : '';\n //occationaly the auth can get stuck only in host\n //this especially happens in cases like\n //url.resolveObject('mailto:local1@domain1', 'local2@domain2')\n var authInHost = result.host && result.host.indexOf('@') > 0 ?\n result.host.split('@') : false;\n if (authInHost) {\n result.auth = authInHost.shift();\n result.host = result.hostname = authInHost.shift();\n }\n }\n\n mustEndAbs = mustEndAbs || (result.host && srcPath.length);\n\n if (mustEndAbs && !isAbsolute) {\n srcPath.unshift('');\n }\n\n if (!srcPath.length) {\n result.pathname = null;\n result.path = null;\n } else {\n result.pathname = srcPath.join('/');\n }\n\n //to support request.http\n if (!util.isNull(result.pathname) || !util.isNull(result.search)) {\n result.path = (result.pathname ? result.pathname : '') +\n (result.search ? result.search : '');\n }\n result.auth = relative.auth || result.auth;\n result.slashes = result.slashes || relative.slashes;\n result.href = result.format();\n return result;\n};\n\nUrl.prototype.parseHost = function() {\n var host = this.host;\n var port = portPattern.exec(host);\n if (port) {\n port = port[0];\n if (port !== ':') {\n this.port = port.substr(1);\n }\n host = host.substr(0, host.length - port.length);\n }\n if (host) this.hostname = host;\n};\n","'use strict';\n\nmodule.exports = {\n isString: function(arg) {\n return typeof(arg) === 'string';\n },\n isObject: function(arg) {\n return typeof(arg) === 'object' && arg !== null;\n },\n isNull: function(arg) {\n return arg === null;\n },\n isNullOrUndefined: function(arg) {\n return arg == null;\n }\n};\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","(function() { module.exports = this[\"wp\"][\"a11y\"]; }());","(function() { module.exports = this[\"wp\"][\"apiFetch\"]; }());","(function() { module.exports = this[\"wp\"][\"autop\"]; }());","(function() { module.exports = this[\"wp\"][\"blob\"]; }());","(function() { module.exports = this[\"wp\"][\"blocks\"]; }());","(function() { module.exports = this[\"wp\"][\"components\"]; }());","(function() { module.exports = this[\"wp\"][\"compose\"]; }());","(function() { module.exports = this[\"wp\"][\"coreData\"]; }());","(function() { module.exports = this[\"wp\"][\"data\"]; }());","(function() { module.exports = this[\"wp\"][\"date\"]; }());","(function() { module.exports = this[\"wp\"][\"deprecated\"]; }());","(function() { module.exports = this[\"wp\"][\"dom\"]; }());","(function() { module.exports = this[\"wp\"][\"element\"]; }());","(function() { module.exports = this[\"wp\"][\"hooks\"]; }());","(function() { module.exports = this[\"wp\"][\"htmlEntities\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"isShallowEqual\"]; }());","(function() { module.exports = this[\"wp\"][\"keycodes\"]; }());","(function() { module.exports = this[\"wp\"][\"notices\"]; }());","(function() { module.exports = this[\"wp\"][\"nux\"]; }());","(function() { module.exports = this[\"wp\"][\"richText\"]; }());","(function() { module.exports = this[\"wp\"][\"tokenList\"]; }());","(function() { module.exports = this[\"wp\"][\"url\"]; }());","(function() { module.exports = this[\"wp\"][\"viewport\"]; }());","(function() { module.exports = this[\"wp\"][\"wordcount\"]; }());","(function() { module.exports = this[\"jQuery\"]; }());","(function() { module.exports = this[\"lodash\"]; }());","(function() { module.exports = this[\"React\"]; }());","(function() { module.exports = this[\"tinymce\"]; }());"],"sourceRoot":""}