File manager - Edit - /home/matthif/www/wp-content/plugins/gutenberg/build/editor/index.min.js.map
Back
{"version":3,"file":"./build/editor/index.min.js","mappings":"gCAAA,QAOgC,EAUvB,SAAUA,EAAQC,GAC1B,aAEA,IACKC,EACAC,EAFDC,EAAqB,mBAARC,IAAqB,IAAIA,KACrCH,EAAO,GACPC,EAAS,GAEN,CACNG,IAAK,SAAaC,GACjB,OAAOL,EAAKM,QAAQD,IAAQ,CAC7B,EACAE,IAAK,SAAaF,GACjB,OAAOJ,EAAOD,EAAKM,QAAQD,GAC5B,EACAG,IAAK,SAAaH,EAAKI,IACK,IAAvBT,EAAKM,QAAQD,KAChBL,EAAKU,KAAKL,GACVJ,EAAOS,KAAKD,GAEd,EACAE,OAAQ,SAAiBN,GACxB,IAAIO,EAAQZ,EAAKM,QAAQD,GACrBO,GAAS,IACZZ,EAAKa,OAAOD,EAAO,GACnBX,EAAOY,OAAOD,EAAO,GAEvB,IAIEE,EAAc,SAAqBC,GACtC,OAAO,IAAIC,MAAMD,EAAM,CAAEE,SAAS,GACnC,EACA,IACC,IAAID,MAAM,OACX,CAAE,MAAOE,GAERJ,EAAc,SAAqBC,GAClC,IAAII,EAAMC,SAASN,YAAY,SAE/B,OADAK,EAAIE,UAAUN,GAAM,GAAM,GACnBI,CACR,CACD,CAEA,SAASG,EAAOC,GACf,GAAKA,GAAOA,EAAGC,UAA4B,aAAhBD,EAAGC,WAA2BtB,EAAIE,IAAImB,GAAjE,CAEA,IAAIE,EAAe,KACfC,EAAc,KACdC,EAAe,KAwHfC,EAAa,WACZL,EAAGG,cAAgBA,GACtBG,GAEF,EAEIC,EAAU,SAAUC,GACvBC,OAAOC,oBAAoB,SAAUL,GAAY,GACjDL,EAAGU,oBAAoB,QAASJ,GAAQ,GACxCN,EAAGU,oBAAoB,QAASJ,GAAQ,GACxCN,EAAGU,oBAAoB,mBAAoBH,GAAS,GACpDP,EAAGU,oBAAoB,kBAAmBJ,GAAQ,GAElDK,OAAOlC,KAAK+B,GA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AAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK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AAA,aAAa4lB,IAEpC,OAAO2B,GAONxrC,EAAAA,EAAAA,KAAC+tG,GAAgB,CAACjqF,WAAaA,EAAY3qB,UAC1C6G,EAAAA,EAAAA,KAACmuG,GAAwB,CAACC,cAAgBA,MAPpC,IAUT,EIVC3I,eAAc,GACdoL,cHnBD,UAAwB,SACvB3zG,IAIA,MAAM,uBAAEskD,GAA2B5gD,GAAQqjB,EAAAA,EAAAA,aAAa0e,MACxD5L,EAAAA,EAAAA,YAAW,KACVyqB,EAAwBtkD,EAAU,GAChC,CAAEskD,EAAwBtkD,IAE7B,MAAM,cAAE4zG,IAAkBlqF,EAAAA,EAAAA,YACvBvkB,IACD,MAAM,gBAAEyjD,GAAoBllD,EAAQyB,EAAQsgC,KAC5C,MAAO,CACNmuE,cAAehrD,EAAiB,WAAY5oD,GAC5C,GAEF,CAAEA,KAGK6zG,QAAS31C,EAAS1Q,YAAasmD,IACtCC,EAAAA,EAAAA,kBAA4B,OAAQ,OAAQ,CAAEnqF,UAAW,IAsB1D,MAAO,CACNmmB,UAAW+jE,EACXv0G,QAtBc6jB,EAAAA,EAAAA,UACd,IACCwwF,EAAc3lH,KACXub,GACiB,WAAbA,EAAMrK,GACH,IACHqK,EACHmV,SAAUu/C,GAASjwE,KAAK,EAAIkR,KAAIrQ,WAAM,CACrCN,MAAO2Q,EACPkX,MAAOvnB,OAKH0a,KAGV,CAAE00D,EAAS01C,IAOb,EG3BC1b,mBAAkB,GAClBC,kBAAiB,GACjBiO,gBAAe,GACf4N,iCG3BM,YACNC,EAAAA,EAAAA,6BAA6BC,KAC7BD,EAAAA,EAAAA,6BAA6BE,GAC9B,EHyBCtwG,gBAAe,EAEf8oC,qBACGqmE,I","sources":["webpack://wp/./node_modules/autosize/dist/autosize.js","webpack://wp/./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack://wp/./node_modules/deepmerge/dist/cjs.js","webpack://wp/./node_modules/fast-deep-equal/index.js","webpack://wp/./node_modules/line-height/lib/line-height.js","webpack://wp/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://wp/./node_modules/prop-types/index.js","webpack://wp/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://wp/./node_modules/react-autosize-textarea/lib/TextareaAutosize.js","webpack://wp/./node_modules/react-autosize-textarea/lib/index.js","webpack://wp/./node_modules/remove-accents/index.js","webpack://wp/external window \"React\"","webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/compat get default export","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"blockEditor\"]","../../packages/editor/src/store/defaults.js","../../packages/editor/src/dataviews/store/reducer.ts","../../packages/editor/src/store/reducer.js","webpack://wp/external window [\"wp\",\"blocks\"]","webpack://wp/external window [\"wp\",\"date\"]","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/external window [\"wp\",\"preferences\"]","../../packages/editor/src/store/constants.ts","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/external window \"ReactJSXRuntime\"","../../packages/icons/src/library/header.js","../../packages/icons/src/library/footer.js","../../packages/icons/src/library/sidebar.js","../../packages/icons/src/library/symbol-filled.js","../../packages/editor/src/utils/get-template-part-icon.js","webpack://wp/external window [\"wp\",\"privateApis\"]","../../packages/editor/src/lock-unlock.js","../../packages/icons/src/library/layout.js","../../packages/editor/src/utils/get-template-info.js","../../packages/editor/src/store/selectors.js","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/external window [\"wp\",\"apiFetch\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/external window [\"wp\",\"i18n\"]","../../packages/editor/src/store/local-autosave.js","../../packages/editor/src/store/actions.js","../../packages/editor/src/store/utils/notice-builder.js","webpack://wp/external window [\"wp\",\"htmlEntities\"]","../../packages/editor/src/store/utils/is-template-revertable.js","../../packages/icons/src/library/external.js","../../packages/fields/src/actions/view-post.tsx","../../packages/fields/src/actions/view-post-revisions.tsx","../../packages/dataviews/src/components/dataform-context/index.tsx","../../packages/dataviews/src/field-types/integer.tsx","../../packages/dataviews/src/field-types/text.tsx","../../packages/dataviews/src/field-types/datetime.tsx","webpack://wp/external window [\"wp\",\"components\"]","../../packages/dataviews/src/dataform-controls/index.tsx","../../packages/dataviews/src/dataform-controls/datetime.tsx","../../packages/dataviews/src/dataform-controls/integer.tsx","../../packages/dataviews/src/dataform-controls/radio.tsx","../../packages/dataviews/src/dataform-controls/select.tsx","../../packages/dataviews/src/dataform-controls/text.tsx","../../packages/dataviews/src/normalize-fields.ts","../../packages/dataviews/src/field-types/index.tsx","../../packages/dataviews/src/dataforms-layouts/is-combined-field.ts","../../packages/dataviews/src/dataforms-layouts/regular/index.tsx","../../packages/icons/src/library/close-small.js","../../packages/dataviews/src/dataforms-layouts/panel/index.tsx","../../packages/dataviews/src/dataforms-layouts/index.tsx","../../packages/dataviews/src/dataforms-layouts/data-form-layout.tsx","../../packages/dataviews/src/normalize-form-fields.ts","../../packages/dataviews/src/components/dataform/index.tsx","../../packages/fields/src/actions/utils.ts","webpack://wp/./node_modules/clsx/dist/clsx.mjs","../../packages/fields/src/fields/title/view.tsx","../../packages/fields/src/fields/title/index.ts","../../packages/fields/src/actions/duplicate-post.tsx","../../packages/icons/src/library/check.js","webpack://wp/./node_modules/tslib/tslib.es6.mjs","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/param-case/src/index.ts","webpack://wp/./node_modules/dot-case/src/index.ts","../../packages/fields/src/components/create-template-part-modal/utils.js","../../packages/fields/src/components/create-template-part-modal/index.tsx","../../packages/fields/src/actions/duplicate-template-part.tsx","webpack://wp/external window [\"wp\",\"patterns\"]","../../packages/fields/src/lock-unlock.ts","../../packages/fields/src/actions/duplicate-pattern.tsx","../../packages/fields/src/actions/rename-post.tsx","../../packages/dataviews/src/validation.ts","../../packages/fields/src/fields/order/index.ts","../../packages/fields/src/actions/reorder-page.tsx","webpack://wp/./node_modules/client-zip/index.js","webpack://wp/external window [\"wp\",\"blob\"]","../../packages/icons/src/library/download.js","../../packages/fields/src/actions/export-pattern.tsx","../../packages/icons/src/library/backup.js","../../packages/fields/src/actions/restore-post.tsx","../../packages/fields/src/actions/reset-post.tsx","../../packages/icons/src/library/trash.js","../../packages/fields/src/mutation/index.ts","../../packages/fields/src/actions/delete-post.tsx","../../packages/fields/src/actions/trash-post.tsx","../../packages/fields/src/actions/permanently-delete-post.tsx","webpack://wp/external window [\"wp\",\"mediaUtils\"]","../../packages/icons/src/library/line-solid.js","../../packages/fields/src/fields/featured-image/index.ts","../../packages/fields/src/fields/featured-image/featured-image-edit.tsx","../../packages/fields/src/fields/featured-image/featured-image-view.tsx","../../packages/icons/src/library/comment-author-avatar.js","../../packages/fields/src/fields/author/index.tsx","../../packages/fields/src/fields/author/author-view.tsx","../../packages/icons/src/library/drafts.js","../../packages/icons/src/library/scheduled.js","../../packages/icons/src/library/pending.js","../../packages/icons/src/library/not-allowed.js","../../packages/icons/src/library/published.js","../../packages/fields/src/fields/status/status-elements.tsx","../../packages/fields/src/fields/status/index.tsx","../../packages/fields/src/fields/status/status-view.tsx","../../packages/fields/src/fields/date/date-view.tsx","../../packages/fields/src/fields/date/index.tsx","../../packages/icons/src/library/copy-small.js","../../packages/fields/src/fields/slug/utils.ts","../../packages/fields/src/fields/slug/slug-edit.tsx","../../packages/fields/src/fields/slug/index.ts","../../packages/fields/src/fields/slug/slug-view.tsx","../../packages/fields/src/fields/parent/utils.ts","../../packages/fields/src/fields/parent/parent-edit.tsx","../../packages/fields/src/fields/parent/index.ts","../../packages/fields/src/fields/parent/parent-view.tsx","../../packages/fields/src/fields/comment-status/index.tsx","../../packages/fields/src/fields/template/index.ts","../../packages/fields/src/fields/template/template-edit.tsx","../../packages/fields/src/fields/password/index.tsx","../../packages/fields/src/fields/password/edit.tsx","../../packages/fields/src/fields/page-title/view.tsx","../../packages/fields/src/fields/page-title/index.ts","../../packages/fields/src/fields/template-title/index.ts","../../packages/icons/src/icon/index.js","../../packages/icons/src/library/lock-small.js","../../packages/fields/src/fields/pattern-title/view.tsx","../../packages/fields/src/fields/pattern-title/index.ts","../../packages/editor/src/components/provider/with-registry-provider.js","../../packages/editor/src/components/media-categories/index.js","webpack://wp/./node_modules/uuid/dist/esm-browser/native.js","webpack://wp/./node_modules/uuid/dist/esm-browser/rng.js","webpack://wp/./node_modules/uuid/dist/esm-browser/stringify.js","webpack://wp/./node_modules/uuid/dist/esm-browser/v4.js","../../packages/editor/src/utils/media-upload/index.js","../../packages/editor/src/utils/media-sideload/index.js","webpack://wp/./node_modules/is-plain-object/dist/is-plain-object.mjs","../../packages/editor/src/components/global-styles-provider/index.js","../../packages/editor/src/components/provider/use-block-editor-settings.js","../../packages/editor/src/components/provider/use-post-content-blocks.js","../../packages/editor/src/components/provider/disable-non-page-content-blocks.js","../../packages/editor/src/components/provider/navigation-block-editing-mode.js","../../packages/editor/src/components/provider/use-hide-blocks-from-inserter.js","../../packages/icons/src/library/keyboard.js","../../packages/icons/src/library/list-view.js","../../packages/icons/src/library/code.js","../../packages/icons/src/library/drawer-left.js","../../packages/icons/src/library/drawer-right.js","../../packages/icons/src/library/block-default.js","../../packages/icons/src/library/format-list-bullets.js","../../packages/icons/src/library/edit.js","../../packages/icons/src/library/pencil.js","../../packages/icons/src/library/symbol.js","../../packages/icons/src/library/page.js","../../packages/icons/src/library/rotate-right.js","../../packages/icons/src/library/rotate-left.js","webpack://wp/external window [\"wp\",\"commands\"]","../../packages/icons/src/library/star-filled.js","../../packages/icons/src/library/star-empty.js","webpack://wp/external window [\"wp\",\"viewport\"]","webpack://wp/external window [\"wp\",\"plugins\"]","../../packages/interface/src/store/deprecated.js","../../packages/interface/src/store/actions.js","../../packages/interface/src/store/selectors.js","../../packages/interface/src/store/reducer.js","../../packages/interface/src/store/index.js","../../packages/interface/src/store/constants.js","../../packages/interface/src/components/complementary-area-toggle/index.js","../../packages/interface/src/components/complementary-area-header/index.js","../../packages/interface/src/components/action-item/index.js","../../packages/interface/src/components/complementary-area-more-menu-item/index.js","../../packages/interface/src/components/pinned-items/index.js","../../packages/interface/src/components/complementary-area/index.js","../../packages/interface/src/components/fullscreen-mode/index.js","../../packages/interface/src/components/navigable-region/index.js","../../packages/interface/src/components/interface-skeleton/index.js","../../packages/editor/src/components/pattern-rename-modal/index.js","../../packages/editor/src/components/pattern-duplicate-modal/index.js","../../packages/editor/src/components/block-removal-warnings/index.js","../../packages/editor/src/components/start-page-options/index.js","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","../../packages/editor/src/components/keyboard-shortcut-help-modal/config.js","webpack://wp/external window [\"wp\",\"keycodes\"]","../../packages/editor/src/components/keyboard-shortcut-help-modal/shortcut.js","../../packages/editor/src/components/keyboard-shortcut-help-modal/dynamic-shortcut.js","../../packages/editor/src/components/keyboard-shortcut-help-modal/index.js","../../packages/editor/src/components/block-settings-menu/content-only-settings-menu.js","../../packages/editor/src/components/start-template-options/index.js","../../packages/editor/src/components/global-keyboard-shortcuts/index.js","../../packages/editor/src/components/template-part-menu-items/convert-to-regular.js","../../packages/editor/src/components/template-part-menu-items/convert-to-template-part.js","../../packages/editor/src/components/template-part-menu-items/index.js","../../packages/editor/src/components/provider/index.js","../../packages/editor/src/components/commands/index.js","../../packages/editor/src/dataviews/fields/content-preview/content-preview-view.tsx","../../packages/editor/src/dataviews/fields/content-preview/index.tsx","../../packages/editor/src/dataviews/store/private-actions.ts","../../packages/editor/src/store/private-actions.js","../../packages/icons/src/library/navigation.js","../../packages/icons/src/library/verse.js","../../packages/editor/src/dataviews/store/private-selectors.ts","../../packages/editor/src/store/private-selectors.js","../../packages/editor/src/store/index.js","../../packages/editor/src/components/autocompleters/user.js","../../packages/editor/src/hooks/custom-sources-backwards-compatibility.js","../../packages/editor/src/hooks/default-autocompleters.js","../../packages/editor/src/hooks/media-upload.js","../../packages/editor/src/hooks/pattern-overrides.js","../../packages/editor/src/components/autosave-monitor/index.js","../../packages/icons/src/library/chevron-right-small.js","../../packages/icons/src/library/chevron-left-small.js","webpack://wp/external window [\"wp\",\"dom\"]","../../packages/editor/src/utils/pageTypeBadge.js","../../packages/editor/src/components/document-bar/index.js","webpack://wp/external window [\"wp\",\"richText\"]","../../packages/editor/src/components/document-outline/item.js","../../packages/editor/src/components/document-outline/index.js","../../packages/editor/src/components/document-outline/check.js","../../packages/editor/src/components/global-keyboard-shortcuts/register-shortcuts.js","../../packages/icons/src/library/redo.js","../../packages/icons/src/library/undo.js","../../packages/editor/src/components/editor-history/redo.js","../../packages/editor/src/components/editor-history/undo.js","../../packages/editor/src/components/template-validation-notice/index.js","../../packages/editor/src/components/editor-notices/index.js","../../packages/editor/src/components/editor-snackbars/index.js","../../packages/editor/src/components/entities-saved-states/entity-record-item.js","../../packages/editor/src/components/entities-saved-states/entity-type-list.js","../../packages/editor/src/components/entities-saved-states/hooks/use-is-dirty.js","../../packages/editor/src/components/entities-saved-states/index.js","../../packages/editor/src/components/error-boundary/index.js","../../packages/editor/src/components/local-autosave-monitor/index.js","../../packages/editor/src/components/page-attributes/check.js","../../packages/editor/src/components/post-type-support-check/index.js","../../packages/editor/src/components/page-attributes/order.js","../../packages/editor/src/components/post-panel-row/index.js","../../packages/editor/src/utils/terms.js","../../packages/editor/src/components/page-attributes/parent.js","../../packages/editor/src/components/page-attributes/panel.js","../../packages/icons/src/library/add-template.js","../../packages/editor/src/components/post-template/create-new-template-modal.js","../../packages/editor/src/components/post-template/hooks.js","../../packages/editor/src/components/post-template/classic-theme.js","../../packages/editor/src/components/preferences-modal/enable-panel.js","webpack://wp/external window [\"wp\",\"warning\"]","../../packages/editor/src/components/preferences-modal/enable-plugin-document-setting-panel.js","../../packages/editor/src/components/plugin-document-setting-panel/index.js","../../packages/editor/src/components/block-settings-menu/plugin-block-settings-menu-item.js","../../packages/editor/src/components/plugin-more-menu-item/index.js","../../packages/editor/src/components/plugin-post-publish-panel/index.js","../../packages/editor/src/components/plugin-post-status-info/index.js","../../packages/editor/src/components/plugin-pre-publish-panel/index.js","../../packages/editor/src/components/plugin-preview-menu-item/index.js","../../packages/editor/src/components/plugin-sidebar/index.js","../../packages/editor/src/components/plugin-sidebar-more-menu-item/index.js","../../packages/editor/src/components/post-template/swap-template-button.js","../../packages/editor/src/components/post-template/reset-default-template.js","../../packages/editor/src/components/post-template/create-new-template.js","../../packages/editor/src/components/post-template/block-theme.js","../../packages/editor/src/components/post-template/panel.js","../../packages/editor/src/components/post-author/constants.js","../../packages/editor/src/components/post-author/hook.js","../../packages/editor/src/components/post-author/combobox.js","../../packages/editor/src/components/post-author/select.js","../../packages/editor/src/components/post-author/index.js","../../packages/editor/src/components/post-author/check.js","../../packages/editor/src/components/post-author/panel.js","../../packages/editor/src/components/post-comments/index.js","../../packages/editor/src/components/post-pingbacks/index.js","../../packages/editor/src/components/post-discussion/panel.js","../../packages/editor/src/components/post-excerpt/index.js","../../packages/editor/src/components/post-excerpt/check.js","../../packages/editor/src/components/post-excerpt/plugin.js","../../packages/editor/src/components/post-excerpt/panel.js","../../packages/editor/src/components/theme-support-check/index.js","../../packages/editor/src/components/post-featured-image/check.js","../../packages/editor/src/components/post-featured-image/index.js","../../packages/editor/src/components/post-featured-image/panel.js","../../packages/editor/src/components/post-format/check.js","../../packages/editor/src/components/post-format/index.js","../../packages/editor/src/components/post-last-revision/check.js","../../packages/editor/src/components/post-last-revision/index.js","../../packages/editor/src/components/post-last-revision/panel.js","../../packages/editor/src/components/post-locked-modal/index.js","../../packages/editor/src/components/post-pending-status/check.js","../../packages/editor/src/components/post-pending-status/index.js","../../packages/editor/src/components/post-preview-button/index.js","../../packages/editor/src/components/post-publish-button/label.js","../../packages/editor/src/components/post-publish-button/index.js","../../packages/icons/src/library/wordpress.js","../../packages/editor/src/components/post-visibility/utils.js","../../packages/editor/src/components/post-visibility/index.js","../../packages/editor/src/components/post-visibility/label.js","webpack://wp/./node_modules/date-fns/toDate.mjs","webpack://wp/./node_modules/date-fns/startOfMonth.mjs","webpack://wp/./node_modules/date-fns/endOfMonth.mjs","webpack://wp/./node_modules/date-fns/constants.mjs","webpack://wp/./node_modules/date-fns/parseISO.mjs","../../packages/editor/src/components/post-schedule/index.js","../../packages/editor/src/components/post-schedule/label.js","../../packages/editor/src/components/post-taxonomies/most-used-terms.js","../../packages/editor/src/components/post-taxonomies/flat-term-selector.js","../../packages/editor/src/components/post-publish-panel/maybe-tags-panel.js","../../packages/editor/src/components/post-publish-panel/maybe-post-format-panel.js","../../packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js","../../packages/editor/src/components/post-publish-panel/maybe-category-panel.js","../../packages/editor/src/components/post-publish-panel/maybe-upload-media.js","../../packages/editor/src/components/post-publish-panel/media-util.js","../../packages/editor/src/components/post-publish-panel/prepublish.js","../../packages/editor/src/components/post-publish-panel/postpublish.js","../../packages/editor/src/components/post-publish-panel/index.js","../../packages/icons/src/library/cloud-upload.js","../../packages/icons/src/library/cloud.js","../../packages/editor/src/components/post-sticky/check.js","../../packages/editor/src/components/post-sticky/index.js","../../packages/editor/src/components/post-status/index.js","../../packages/editor/src/components/post-saved-state/index.js","../../packages/editor/src/components/post-schedule/check.js","../../packages/editor/src/components/post-schedule/panel.js","../../packages/editor/src/components/post-switch-to-draft-button/index.js","../../packages/editor/src/components/post-sync-status/index.js","../../packages/editor/src/components/post-taxonomies/index.js","../../packages/editor/src/components/post-taxonomies/check.js","../../packages/editor/src/components/post-taxonomies/panel.js","../../packages/editor/src/components/post-text-editor/index.js","../../packages/editor/src/components/post-title/constants.js","../../packages/editor/src/components/post-title/use-post-title-focus.js","../../packages/editor/src/components/post-title/use-post-title.js","../../packages/editor/src/components/post-title/index.js","../../packages/editor/src/components/post-title/post-title-raw.js","../../packages/editor/src/components/post-trash/check.js","../../packages/editor/src/components/post-trash/index.js","../../packages/editor/src/components/post-url/index.js","../../packages/editor/src/components/post-url/check.js","../../packages/editor/src/components/post-url/label.js","../../packages/editor/src/components/post-url/panel.js","../../packages/editor/src/components/post-visibility/check.js","../../packages/icons/src/library/info.js","webpack://wp/external window [\"wp\",\"wordcount\"]","../../packages/editor/src/components/word-count/index.js","../../packages/editor/src/components/time-to-read/index.js","../../packages/editor/src/components/character-count/index.js","../../packages/editor/src/components/table-of-contents/panel.js","../../packages/editor/src/components/table-of-contents/index.js","../../packages/editor/src/components/unsaved-changes-warning/index.js","webpack://wp/external window [\"wp\",\"serverSideRender\"]","../../packages/editor/src/components/deprecated.js","../../packages/editor/src/components/index.js","../../packages/editor/src/utils/url.js","../../packages/editor/src/components/editor-interface/content-slot-fill.js","../../packages/editor/src/components/header/back-button.js","../../packages/icons/src/library/comment.js","../../packages/editor/src/components/collab-sidebar/constants.js","../../packages/icons/src/library/more-vertical.js","../../packages/editor/src/components/collab-sidebar/comment-author-info.js","../../packages/editor/src/components/collab-sidebar/comment-form.js","../../packages/editor/src/components/collab-sidebar/utils.js","../../packages/editor/src/components/collab-sidebar/comments.js","../../packages/editor/src/components/collab-sidebar/add-comment.js","../../packages/editor/src/components/collab-sidebar/comment-button.js","../../packages/editor/src/components/collab-sidebar/comment-button-toolbar.js","../../packages/editor/src/components/collab-sidebar/index.js","../../packages/icons/src/library/next.js","../../packages/icons/src/library/previous.js","../../packages/editor/src/components/collapsible-block-toolbar/index.js","../../packages/icons/src/library/plus.js","../../packages/editor/src/components/document-tools/index.js","../../packages/editor/src/components/more-menu/copy-content-menu-item.js","../../packages/editor/src/components/mode-switcher/index.js","../../packages/editor/src/components/more-menu/tools-more-menu-group.js","../../packages/editor/src/components/more-menu/view-more-menu-group.js","../../packages/editor/src/components/more-menu/index.js","../../packages/editor/src/components/post-publish-button/post-publish-button-or-toggle.js","../../packages/editor/src/components/post-view-link/index.js","../../packages/icons/src/library/desktop.js","../../packages/icons/src/library/mobile.js","../../packages/icons/src/library/tablet.js","../../packages/editor/src/components/preview-dropdown/index.js","../../packages/icons/src/library/square.js","../../packages/editor/src/components/zoom-out-toggle/index.js","../../packages/editor/src/components/header/index.js","../../packages/editor/src/components/inserter-sidebar/index.js","../../packages/editor/src/components/list-view-sidebar/list-view-outline.js","../../packages/editor/src/components/list-view-sidebar/index.js","../../packages/editor/src/components/save-publish-panels/index.js","../../packages/editor/src/components/text-editor/index.js","../../packages/editor/src/components/visual-editor/edit-template-blocks-notification.js","../../packages/editor/src/components/resizable-editor/resize-handle.js","../../packages/editor/src/components/resizable-editor/index.js","../../packages/editor/src/components/visual-editor/use-select-nearest-editable-block.js","../../packages/editor/src/components/visual-editor/use-zoom-out-mode-exit.js","../../packages/editor/src/components/visual-editor/index.js","../../packages/editor/src/components/editor-interface/index.js","../../packages/editor/src/components/pattern-overrides-panel/index.js","../../packages/editor/src/utils/get-item-title.js","../../packages/editor/src/components/post-actions/set-as-homepage.js","../../packages/editor/src/components/post-actions/set-as-posts-page.js","../../packages/editor/src/components/post-actions/actions.js","../../packages/editor/src/components/post-actions/index.js","../../packages/editor/src/components/post-card-panel/index.js","../../packages/editor/src/components/post-content-information/index.js","../../packages/editor/src/components/post-format/panel.js","../../packages/editor/src/components/post-last-edited-panel/index.js","../../packages/editor/src/components/post-panel-section/index.js","../../packages/editor/src/components/blog-title/index.js","../../packages/editor/src/components/posts-per-page/index.js","../../packages/editor/src/components/site-discussion/index.js","../../packages/editor/src/components/sidebar/post-summary.js","../../packages/editor/src/components/post-transform-panel/hooks.js","../../packages/editor/src/components/post-transform-panel/index.js","../../packages/editor/src/components/sidebar/constants.js","../../packages/editor/src/components/sidebar/header.js","../../packages/editor/src/components/template-content-panel/index.js","../../packages/editor/src/components/template-part-content-panel/index.js","../../packages/editor/src/components/provider/use-auto-switch-editor-sidebars.js","../../packages/editor/src/components/sidebar/index.js","../../packages/editor/src/components/preferences-modal/enable-publish-sidebar.js","../../packages/editor/src/components/preferences-modal/block-visibility.js","../../packages/editor/src/components/preferences-modal/index.js","../../packages/editor/src/components/post-fields/index.ts","../../packages/editor/src/bindings/pattern-overrides.js","../../packages/editor/src/bindings/post-meta.js","../../packages/editor/src/private-apis.js","../../packages/editor/src/dataviews/api.js","../../packages/editor/src/components/editor/index.js","../../packages/editor/src/bindings/api.js"],"sourcesContent":["/*!\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});","// 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","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\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 = ' ';\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","/**\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 = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\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 };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\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 ReactIs = require('react-is');\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')(ReactIs.isElement, 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","\"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 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 TextareaAutosizeClass = /** @class */ (function (_super) {\n __extends(TextareaAutosizeClass, _super);\n function TextareaAutosizeClass() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n lineHeight: null\n };\n _this.textarea = null;\n _this.onResize = function (e) {\n if (_this.props.onResize) {\n _this.props.onResize(e);\n }\n };\n _this.updateLineHeight = function () {\n if (_this.textarea) {\n _this.setState({\n lineHeight: getLineHeight(_this.textarea)\n });\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 return _this;\n }\n TextareaAutosizeClass.prototype.componentDidMount = function () {\n var _this = this;\n var _a = this.props, maxRows = _a.maxRows, async = _a.async;\n if (typeof maxRows === \"number\") {\n this.updateLineHeight();\n }\n if (typeof maxRows === \"number\" || async) {\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 _this.textarea && autosize(_this.textarea); });\n }\n else {\n this.textarea && autosize(this.textarea);\n }\n if (this.textarea) {\n this.textarea.addEventListener(RESIZED, this.onResize);\n }\n };\n TextareaAutosizeClass.prototype.componentWillUnmount = function () {\n if (this.textarea) {\n this.textarea.removeEventListener(RESIZED, this.onResize);\n autosize.destroy(this.textarea);\n }\n };\n TextareaAutosizeClass.prototype.render = function () {\n var _this = this;\n var _a = this, _b = _a.props, onResize = _b.onResize, maxRows = _b.maxRows, onChange = _b.onChange, style = _b.style, innerRef = _b.innerRef, children = _b.children, props = __rest(_b, [\"onResize\", \"maxRows\", \"onChange\", \"style\", \"innerRef\", \"children\"]), lineHeight = _a.state.lineHeight;\n var maxHeight = maxRows && lineHeight ? lineHeight * maxRows : null;\n return (React.createElement(\"textarea\", __assign({}, props, { onChange: this.onChange, style: maxHeight ? __assign({}, style, { maxHeight: maxHeight }) : style, ref: function (element) {\n _this.textarea = element;\n if (typeof _this.props.innerRef === 'function') {\n _this.props.innerRef(element);\n }\n else if (_this.props.innerRef) {\n _this.props.innerRef.current = element;\n }\n } }), children));\n };\n TextareaAutosizeClass.prototype.componentDidUpdate = function () {\n this.textarea && autosize.update(this.textarea);\n };\n TextareaAutosizeClass.defaultProps = {\n rows: 1,\n async: false\n };\n TextareaAutosizeClass.propTypes = {\n rows: PropTypes.number,\n maxRows: PropTypes.number,\n onResize: PropTypes.func,\n innerRef: PropTypes.any,\n async: PropTypes.bool\n };\n return TextareaAutosizeClass;\n}(React.Component));\nexports.TextareaAutosize = React.forwardRef(function (props, ref) {\n return React.createElement(TextareaAutosizeClass, __assign({}, props, { innerRef: ref }));\n});\n","\"use strict\";\nexports.__esModule = true;\nvar TextareaAutosize_1 = require(\"./TextareaAutosize\");\nexports[\"default\"] = TextareaAutosize_1.TextareaAutosize;\n","var characterMap = {\n\t\"À\": \"A\",\n\t\"Á\": \"A\",\n\t\"Â\": \"A\",\n\t\"Ã\": \"A\",\n\t\"Ä\": \"A\",\n\t\"Å\": \"A\",\n\t\"Ấ\": \"A\",\n\t\"Ắ\": \"A\",\n\t\"Ẳ\": \"A\",\n\t\"Ẵ\": \"A\",\n\t\"Ặ\": \"A\",\n\t\"Æ\": \"AE\",\n\t\"Ầ\": \"A\",\n\t\"Ằ\": \"A\",\n\t\"Ȃ\": \"A\",\n\t\"Ả\": \"A\",\n\t\"Ạ\": \"A\",\n\t\"Ẩ\": \"A\",\n\t\"Ẫ\": \"A\",\n\t\"Ậ\": \"A\",\n\t\"Ç\": \"C\",\n\t\"Ḉ\": \"C\",\n\t\"È\": \"E\",\n\t\"É\": \"E\",\n\t\"Ê\": \"E\",\n\t\"Ë\": \"E\",\n\t\"Ế\": \"E\",\n\t\"Ḗ\": \"E\",\n\t\"Ề\": \"E\",\n\t\"Ḕ\": \"E\",\n\t\"Ḝ\": \"E\",\n\t\"Ȇ\": \"E\",\n\t\"Ẻ\": \"E\",\n\t\"Ẽ\": \"E\",\n\t\"Ẹ\": \"E\",\n\t\"Ể\": \"E\",\n\t\"Ễ\": \"E\",\n\t\"Ệ\": \"E\",\n\t\"Ì\": \"I\",\n\t\"Í\": \"I\",\n\t\"Î\": \"I\",\n\t\"Ï\": \"I\",\n\t\"Ḯ\": \"I\",\n\t\"Ȋ\": \"I\",\n\t\"Ỉ\": \"I\",\n\t\"Ị\": \"I\",\n\t\"Ð\": \"D\",\n\t\"Ñ\": \"N\",\n\t\"Ò\": \"O\",\n\t\"Ó\": \"O\",\n\t\"Ô\": \"O\",\n\t\"Õ\": \"O\",\n\t\"Ö\": \"O\",\n\t\"Ø\": \"O\",\n\t\"Ố\": \"O\",\n\t\"Ṍ\": \"O\",\n\t\"Ṓ\": \"O\",\n\t\"Ȏ\": \"O\",\n\t\"Ỏ\": \"O\",\n\t\"Ọ\": \"O\",\n\t\"Ổ\": \"O\",\n\t\"Ỗ\": \"O\",\n\t\"Ộ\": \"O\",\n\t\"Ờ\": \"O\",\n\t\"Ở\": \"O\",\n\t\"Ỡ\": \"O\",\n\t\"Ớ\": \"O\",\n\t\"Ợ\": \"O\",\n\t\"Ù\": \"U\",\n\t\"Ú\": \"U\",\n\t\"Û\": \"U\",\n\t\"Ü\": \"U\",\n\t\"Ủ\": \"U\",\n\t\"Ụ\": \"U\",\n\t\"Ử\": \"U\",\n\t\"Ữ\": \"U\",\n\t\"Ự\": \"U\",\n\t\"Ý\": \"Y\",\n\t\"à\": \"a\",\n\t\"á\": \"a\",\n\t\"â\": \"a\",\n\t\"ã\": \"a\",\n\t\"ä\": \"a\",\n\t\"å\": \"a\",\n\t\"ấ\": \"a\",\n\t\"ắ\": \"a\",\n\t\"ẳ\": \"a\",\n\t\"ẵ\": \"a\",\n\t\"ặ\": \"a\",\n\t\"æ\": \"ae\",\n\t\"ầ\": \"a\",\n\t\"ằ\": \"a\",\n\t\"ȃ\": \"a\",\n\t\"ả\": \"a\",\n\t\"ạ\": \"a\",\n\t\"ẩ\": \"a\",\n\t\"ẫ\": \"a\",\n\t\"ậ\": \"a\",\n\t\"ç\": \"c\",\n\t\"ḉ\": \"c\",\n\t\"è\": \"e\",\n\t\"é\": \"e\",\n\t\"ê\": \"e\",\n\t\"ë\": \"e\",\n\t\"ế\": \"e\",\n\t\"ḗ\": \"e\",\n\t\"ề\": \"e\",\n\t\"ḕ\": \"e\",\n\t\"ḝ\": \"e\",\n\t\"ȇ\": \"e\",\n\t\"ẻ\": \"e\",\n\t\"ẽ\": \"e\",\n\t\"ẹ\": \"e\",\n\t\"ể\": \"e\",\n\t\"ễ\": \"e\",\n\t\"ệ\": \"e\",\n\t\"ì\": \"i\",\n\t\"í\": \"i\",\n\t\"î\": \"i\",\n\t\"ï\": \"i\",\n\t\"ḯ\": \"i\",\n\t\"ȋ\": \"i\",\n\t\"ỉ\": \"i\",\n\t\"ị\": \"i\",\n\t\"ð\": \"d\",\n\t\"ñ\": \"n\",\n\t\"ò\": \"o\",\n\t\"ó\": \"o\",\n\t\"ô\": \"o\",\n\t\"õ\": \"o\",\n\t\"ö\": \"o\",\n\t\"ø\": \"o\",\n\t\"ố\": \"o\",\n\t\"ṍ\": \"o\",\n\t\"ṓ\": \"o\",\n\t\"ȏ\": \"o\",\n\t\"ỏ\": \"o\",\n\t\"ọ\": \"o\",\n\t\"ổ\": \"o\",\n\t\"ỗ\": \"o\",\n\t\"ộ\": \"o\",\n\t\"ờ\": \"o\",\n\t\"ở\": \"o\",\n\t\"ỡ\": \"o\",\n\t\"ớ\": \"o\",\n\t\"ợ\": \"o\",\n\t\"ù\": \"u\",\n\t\"ú\": \"u\",\n\t\"û\": \"u\",\n\t\"ü\": \"u\",\n\t\"ủ\": \"u\",\n\t\"ụ\": \"u\",\n\t\"ử\": \"u\",\n\t\"ữ\": \"u\",\n\t\"ự\": \"u\",\n\t\"ý\": \"y\",\n\t\"ÿ\": \"y\",\n\t\"Ā\": \"A\",\n\t\"ā\": \"a\",\n\t\"Ă\": \"A\",\n\t\"ă\": \"a\",\n\t\"Ą\": \"A\",\n\t\"ą\": \"a\",\n\t\"Ć\": \"C\",\n\t\"ć\": \"c\",\n\t\"Ĉ\": \"C\",\n\t\"ĉ\": \"c\",\n\t\"Ċ\": \"C\",\n\t\"ċ\": \"c\",\n\t\"Č\": \"C\",\n\t\"č\": \"c\",\n\t\"C̆\": \"C\",\n\t\"c̆\": \"c\",\n\t\"Ď\": \"D\",\n\t\"ď\": \"d\",\n\t\"Đ\": \"D\",\n\t\"đ\": \"d\",\n\t\"Ē\": \"E\",\n\t\"ē\": \"e\",\n\t\"Ĕ\": \"E\",\n\t\"ĕ\": \"e\",\n\t\"Ė\": \"E\",\n\t\"ė\": \"e\",\n\t\"Ę\": \"E\",\n\t\"ę\": \"e\",\n\t\"Ě\": \"E\",\n\t\"ě\": \"e\",\n\t\"Ĝ\": \"G\",\n\t\"Ǵ\": \"G\",\n\t\"ĝ\": \"g\",\n\t\"ǵ\": \"g\",\n\t\"Ğ\": \"G\",\n\t\"ğ\": \"g\",\n\t\"Ġ\": \"G\",\n\t\"ġ\": \"g\",\n\t\"Ģ\": \"G\",\n\t\"ģ\": \"g\",\n\t\"Ĥ\": \"H\",\n\t\"ĥ\": \"h\",\n\t\"Ħ\": \"H\",\n\t\"ħ\": \"h\",\n\t\"Ḫ\": \"H\",\n\t\"ḫ\": \"h\",\n\t\"Ĩ\": \"I\",\n\t\"ĩ\": \"i\",\n\t\"Ī\": \"I\",\n\t\"ī\": \"i\",\n\t\"Ĭ\": \"I\",\n\t\"ĭ\": \"i\",\n\t\"Į\": \"I\",\n\t\"į\": \"i\",\n\t\"İ\": \"I\",\n\t\"ı\": \"i\",\n\t\"IJ\": \"IJ\",\n\t\"ij\": \"ij\",\n\t\"Ĵ\": \"J\",\n\t\"ĵ\": \"j\",\n\t\"Ķ\": \"K\",\n\t\"ķ\": \"k\",\n\t\"Ḱ\": \"K\",\n\t\"ḱ\": \"k\",\n\t\"K̆\": \"K\",\n\t\"k̆\": \"k\",\n\t\"Ĺ\": \"L\",\n\t\"ĺ\": \"l\",\n\t\"Ļ\": \"L\",\n\t\"ļ\": \"l\",\n\t\"Ľ\": \"L\",\n\t\"ľ\": \"l\",\n\t\"Ŀ\": \"L\",\n\t\"ŀ\": \"l\",\n\t\"Ł\": \"l\",\n\t\"ł\": \"l\",\n\t\"Ḿ\": \"M\",\n\t\"ḿ\": \"m\",\n\t\"M̆\": \"M\",\n\t\"m̆\": \"m\",\n\t\"Ń\": \"N\",\n\t\"ń\": \"n\",\n\t\"Ņ\": \"N\",\n\t\"ņ\": \"n\",\n\t\"Ň\": \"N\",\n\t\"ň\": \"n\",\n\t\"ʼn\": \"n\",\n\t\"N̆\": \"N\",\n\t\"n̆\": \"n\",\n\t\"Ō\": \"O\",\n\t\"ō\": \"o\",\n\t\"Ŏ\": \"O\",\n\t\"ŏ\": \"o\",\n\t\"Ő\": \"O\",\n\t\"ő\": \"o\",\n\t\"Œ\": \"OE\",\n\t\"œ\": \"oe\",\n\t\"P̆\": \"P\",\n\t\"p̆\": \"p\",\n\t\"Ŕ\": \"R\",\n\t\"ŕ\": \"r\",\n\t\"Ŗ\": \"R\",\n\t\"ŗ\": \"r\",\n\t\"Ř\": \"R\",\n\t\"ř\": \"r\",\n\t\"R̆\": \"R\",\n\t\"r̆\": \"r\",\n\t\"Ȓ\": \"R\",\n\t\"ȓ\": \"r\",\n\t\"Ś\": \"S\",\n\t\"ś\": \"s\",\n\t\"Ŝ\": \"S\",\n\t\"ŝ\": \"s\",\n\t\"Ş\": \"S\",\n\t\"Ș\": \"S\",\n\t\"ș\": \"s\",\n\t\"ş\": \"s\",\n\t\"Š\": \"S\",\n\t\"š\": \"s\",\n\t\"Ţ\": \"T\",\n\t\"ţ\": \"t\",\n\t\"ț\": \"t\",\n\t\"Ț\": \"T\",\n\t\"Ť\": \"T\",\n\t\"ť\": \"t\",\n\t\"Ŧ\": \"T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\n\t\"ȟ\": \"h\",\n\t\"J̌\": \"J\",\n\t\"ǰ\": \"j\",\n\t\"Ǩ\": \"K\",\n\t\"ǩ\": \"k\",\n\t\"M̌\": \"M\",\n\t\"m̌\": \"m\",\n\t\"P̌\": \"P\",\n\t\"p̌\": \"p\",\n\t\"Q̌\": \"Q\",\n\t\"q̌\": \"q\",\n\t\"Ř̩\": \"R\",\n\t\"ř̩\": \"r\",\n\t\"Ṧ\": \"S\",\n\t\"ṧ\": \"s\",\n\t\"V̌\": \"V\",\n\t\"v̌\": \"v\",\n\t\"W̌\": \"W\",\n\t\"w̌\": \"w\",\n\t\"X̌\": \"X\",\n\t\"x̌\": \"x\",\n\t\"Y̌\": \"Y\",\n\t\"y̌\": \"y\",\n\t\"A̧\": \"A\",\n\t\"a̧\": \"a\",\n\t\"B̧\": \"B\",\n\t\"b̧\": \"b\",\n\t\"Ḑ\": \"D\",\n\t\"ḑ\": \"d\",\n\t\"Ȩ\": \"E\",\n\t\"ȩ\": \"e\",\n\t\"Ɛ̧\": \"E\",\n\t\"ɛ̧\": \"e\",\n\t\"Ḩ\": \"H\",\n\t\"ḩ\": \"h\",\n\t\"I̧\": \"I\",\n\t\"i̧\": \"i\",\n\t\"Ɨ̧\": \"I\",\n\t\"ɨ̧\": \"i\",\n\t\"M̧\": \"M\",\n\t\"m̧\": \"m\",\n\t\"O̧\": \"O\",\n\t\"o̧\": \"o\",\n\t\"Q̧\": \"Q\",\n\t\"q̧\": \"q\",\n\t\"U̧\": \"U\",\n\t\"u̧\": \"u\",\n\t\"X̧\": \"X\",\n\t\"x̧\": \"x\",\n\t\"Z̧\": \"Z\",\n\t\"z̧\": \"z\",\n\t\"й\":\"и\",\n\t\"Й\":\"И\",\n\t\"ё\":\"е\",\n\t\"Ё\":\"Е\",\n};\n\nvar chars = Object.keys(characterMap).join('|');\nvar allAccents = new RegExp(chars, 'g');\nvar firstAccent = new RegExp(chars, '');\n\nfunction matcher(match) {\n\treturn characterMap[match];\n}\n\nvar removeAccents = function(string) {\n\treturn string.replace(allAccents, matcher);\n};\n\nvar hasAccents = function(string) {\n\treturn !!string.match(firstAccent);\n};\n\nmodule.exports = removeAccents;\nmodule.exports.has = hasAccents;\nmodule.exports.remove = removeAccents;\n","module.exports = window[\"React\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","/**\n * WordPress dependencies\n */\nimport { SETTINGS_DEFAULTS } from '@wordpress/block-editor';\n\n/**\n * The default post editor settings.\n *\n * @property {boolean|Array} allowedBlockTypes Allowed block types\n * @property {boolean} richEditingEnabled Whether rich editing is enabled or not\n * @property {boolean} codeEditingEnabled Whether code editing is enabled or not\n * @property {boolean} fontLibraryEnabled Whether the font library is enabled or not.\n * @property {boolean} enableCustomFields Whether the WordPress custom fields are enabled or not.\n * true = the user has opted to show the Custom Fields panel at the bottom of the editor.\n * false = the user has opted to hide the Custom Fields panel at the bottom of the editor.\n * undefined = the current environment does not support Custom Fields, so the option toggle in Preferences -> Panels to enable the Custom Fields panel is not displayed.\n * @property {number} autosaveInterval How often in seconds the post will be auto-saved via the REST API.\n * @property {number} localAutosaveInterval How often in seconds the post will be backed up to sessionStorage.\n * @property {Array?} availableTemplates The available post templates\n * @property {boolean} disablePostFormats Whether or not the post formats are disabled\n * @property {Array?} allowedMimeTypes List of allowed mime types and file extensions\n * @property {number} maxUploadFileSize Maximum upload file size\n * @property {boolean} supportsLayout Whether the editor supports layouts.\n */\nexport const EDITOR_SETTINGS_DEFAULTS = {\n\t...SETTINGS_DEFAULTS,\n\n\trichEditingEnabled: true,\n\tcodeEditingEnabled: true,\n\tfontLibraryEnabled: true,\n\tenableCustomFields: undefined,\n\tdefaultRenderingMode: 'post-only',\n};\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\nimport type { Action, Field } from '@wordpress/dataviews';\n\ntype ReduxAction =\n\t| ReturnType< typeof import('./private-actions').registerEntityAction >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityAction >\n\t| ReturnType< typeof import('./private-actions').registerEntityField >\n\t| ReturnType< typeof import('./private-actions').unregisterEntityField >\n\t| ReturnType< typeof import('./private-actions').setIsReady >;\n\nexport type ActionState = Record< string, Record< string, Action< any >[] > >;\nexport type FieldsState = Record< string, Record< string, Field< any >[] > >;\nexport type ReadyState = Record< string, Record< string, boolean > >;\nexport type State = {\n\tactions: ActionState;\n\tfields: FieldsState;\n\tisReady: ReadyState;\n};\n\nfunction isReady( state: ReadyState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_READY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: true,\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nfunction actions( state: ActionState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_ACTION':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _action ) => _action.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_ACTION': {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _action ) => _action.id !== action.actionId ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\nfunction fields( state: FieldsState = {}, action: ReduxAction ) {\n\tswitch ( action.type ) {\n\t\tcase 'REGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: [\n\t\t\t\t\t\t...(\n\t\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t\t).filter(\n\t\t\t\t\t\t\t( _field ) => _field.id !== action.config.id\n\t\t\t\t\t\t),\n\t\t\t\t\t\taction.config,\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t};\n\t\tcase 'UNREGISTER_ENTITY_FIELD':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ action.kind ]: {\n\t\t\t\t\t...state[ action.kind ],\n\t\t\t\t\t[ action.name ]: (\n\t\t\t\t\t\tstate[ action.kind ]?.[ action.name ] ?? []\n\t\t\t\t\t).filter( ( _field ) => _field.id !== action.fieldId ),\n\t\t\t\t},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tactions,\n\tfields,\n\tisReady,\n} );\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { EDITOR_SETTINGS_DEFAULTS } from './defaults';\nimport dataviewsReducer from '../dataviews/store/reducer';\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 * 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\tconst keysA = Object.keys( a ).sort();\n\tconst keysB = Object.keys( b ).sort();\n\treturn (\n\t\tkeysA.length === keysB.length &&\n\t\tkeysA.every( ( key, index ) => keysB[ index ] === key )\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 ( action.type === 'RESET_EDITOR_BLOCKS' ) {\n\t\treturn ! action.shouldCreateUndoLevel;\n\t}\n\n\tif ( ! previousAction || action.type !== previousAction.type ) {\n\t\treturn false;\n\t}\n\n\treturn isUpdatingSamePostProperty( action, previousAction );\n}\n\nexport function postId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postId;\n\t}\n\n\treturn state;\n}\n\nexport function templateId( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CURRENT_TEMPLATE_ID':\n\t\t\treturn action.id;\n\t}\n\n\treturn state;\n}\n\nexport function postType( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn action.postType;\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 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\tcase 'REQUEST_POST_UPDATE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_UPDATE_START',\n\t\t\t\toptions: action.options || {},\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning deleting post request state.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deleting( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REQUEST_POST_DELETE_START':\n\t\tcase 'REQUEST_POST_DELETE_FINISH':\n\t\t\treturn {\n\t\t\t\tpending: action.type === 'REQUEST_POST_DELETE_START',\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 {PostLockState} 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\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Post autosaving lock.\n *\n * When post autosaving is locked, the post will not autosave.\n *\n * @param {PostLockState} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {PostLockState} Updated state.\n */\nexport function postAutosavingLock( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'LOCK_POST_AUTOSAVING':\n\t\t\treturn { ...state, [ action.lockName ]: true };\n\n\t\tcase 'UNLOCK_POST_AUTOSAVING': {\n\t\t\tconst { [ action.lockName ]: removedLockName, ...restState } =\n\t\t\t\tstate;\n\t\t\treturn restState;\n\t\t}\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the post editor setting.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editorSettings( 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\nexport function renderingMode( state = 'post-only', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_RENDERING_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editing canvas device type.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function deviceType( state = 'Desktop', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEVICE_TYPE':\n\t\t\treturn action.deviceType;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer storing the list of all programmatically removed panels.\n *\n * @param {Array} state Current state.\n * @param {Object} action Action object.\n *\n * @return {Array} Updated state.\n */\nexport function removedPanels( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'REMOVE_PANEL':\n\t\t\tif ( ! state.includes( action.panelName ) ) {\n\t\t\t\treturn [ ...state, action.panelName ];\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the block inserter panel open or closed.\n *\n * Note: this reducer interacts with the list view panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function blockInserterPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen ? false : state;\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer to set the list view panel open or closed.\n *\n * Note: this reducer interacts with the inserter panel reducer\n * to make sure that only one of the two panels is open at the same time.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function listViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_INSERTER_OPENED':\n\t\t\treturn action.value ? false : state;\n\t\tcase 'SET_IS_LIST_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t}\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the list view toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the list view toggle button.\n */\nexport function listViewToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\n/**\n * This reducer does nothing aside initializing a ref to the inserter sidebar toggle.\n * We will have a unique ref per \"editor\" instance.\n *\n * @param {Object} state\n * @return {Object} Reference to the inserter sidebar toggle button.\n */\nexport function inserterSidebarToggleRef( state = { current: null } ) {\n\treturn state;\n}\n\nexport function publishSidebarActive( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_PUBLISH_SIDEBAR':\n\t\t\treturn true;\n\t\tcase 'CLOSE_PUBLISH_SIDEBAR':\n\t\t\treturn false;\n\t\tcase 'TOGGLE_PUBLISH_SIDEBAR':\n\t\t\treturn ! state;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tpostId,\n\tpostType,\n\ttemplateId,\n\tsaving,\n\tdeleting,\n\tpostLock,\n\ttemplate,\n\tpostSavingLock,\n\teditorSettings,\n\tpostAutosavingLock,\n\trenderingMode,\n\tdeviceType,\n\tremovedPanels,\n\tblockInserterPanel,\n\tinserterSidebarToggleRef,\n\tlistViewPanel,\n\tlistViewToggleRef,\n\tpublishSidebarActive,\n\tdataviews: dataviewsReducer,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"preferences\"];","/**\n * Set of post properties for which edits should assume a merging behavior,\n * assuming an object value.\n *\n * @type {Set}\n */\nexport const EDIT_MERGE_PROPERTIES = new Set( [ 'meta' ] );\n\n/**\n * Constant for the store module (or reducer) key.\n */\nexport const STORE_NAME = 'core/editor';\n\nexport const PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;\nexport const ONE_MINUTE_IN_MS = 60 * 1000;\nexport const AUTOSAVE_PROPERTIES = [ 'title', 'excerpt', 'content' ];\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const PATTERN_POST_TYPE = 'wp_block';\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_POST_TYPES = [ 'wp_template', 'wp_template_part' ];\nexport const GLOBAL_POST_TYPES = [\n\t...TEMPLATE_POST_TYPES,\n\t'wp_block',\n\t'wp_navigation',\n];\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst header = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.5 10.5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n\nexport default header;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst footer = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M18 5.5h-8v8h8.5V6a.5.5 0 00-.5-.5zm-9.5 8h-3V6a.5.5 0 01.5-.5h2.5v8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default footer;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst sidebar = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n\nexport default sidebar;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbolFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n\nexport default symbolFilled;\n","/**\n * WordPress dependencies\n */\nimport {\n\theader as headerIcon,\n\tfooter as footerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\n/**\n * Helper function to retrieve the corresponding icon by name.\n *\n * @param {string} iconName The name of the icon.\n *\n * @return {Object} The corresponding icon.\n */\nexport function getTemplatePartIcon( iconName ) {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"privateApis\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/editor'\n\t);\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst layout = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n\nexport default layout;\n","/**\n * WordPress dependencies\n */\nimport { layout } from '@wordpress/icons';\n/**\n * Internal dependencies\n */\nimport { getTemplatePartIcon } from './get-template-part-icon';\nconst EMPTY_OBJECT = {};\n\n/**\n * Helper function to retrieve the corresponding template info for a given template.\n * @param {Object} params\n * @param {Array} params.templateTypes\n * @param {Array} [params.templateAreas]\n * @param {Object} params.template\n */\nexport const getTemplateInfo = ( params ) => {\n\tif ( ! params ) {\n\t\treturn EMPTY_OBJECT;\n\t}\n\n\tconst { templateTypes, templateAreas, template } = params;\n\n\tconst { description, slug, title, area } = template;\n\n\tconst { title: defaultTitle, description: defaultDescription } =\n\t\tObject.values( templateTypes ).find( ( type ) => type.slug === slug ) ??\n\t\tEMPTY_OBJECT;\n\n\tconst templateTitle = typeof title === 'string' ? title : title?.rendered;\n\tconst templateDescription =\n\t\ttypeof description === 'string' ? description : description?.raw;\n\n\tconst templateAreasWithIcon = templateAreas?.map( ( item ) => ( {\n\t\t...item,\n\t\ticon: getTemplatePartIcon( item.icon ),\n\t} ) );\n\n\tconst templateIcon =\n\t\ttemplateAreasWithIcon?.find( ( item ) => area === item.area )?.icon ||\n\t\tlayout;\n\n\treturn {\n\t\ttitle:\n\t\t\ttemplateTitle && templateTitle !== slug\n\t\t\t\t? templateTitle\n\t\t\t\t: defaultTitle || slug,\n\t\tdescription: templateDescription || defaultDescription,\n\t\ticon: templateIcon,\n\t};\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\tgetFreeformContentHandlerName,\n\tgetDefaultBlockName,\n\t__unstableSerializeAndClean,\n\tparse,\n} from '@wordpress/blocks';\nimport { isInTheFuture, getDate } from '@wordpress/date';\nimport { addQueryArgs, cleanForSlug } from '@wordpress/url';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tEDIT_MERGE_PROPERTIES,\n\tPERMALINK_POSTNAME_REGEX,\n\tONE_MINUTE_IN_MS,\n\tAUTOSAVE_PROPERTIES,\n} from './constants';\nimport { getPostRawValue } from './reducer';\nimport { getTemplatePartIcon } from '../utils/get-template-part-icon';\nimport { unlock } from '../lock-unlock';\nimport { getTemplateInfo } from '../utils/get-template-info';\n\n/**\n * Shared reference to an empty object for cases where it is important to avoid\n * returning a new object 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 */\nconst EMPTY_OBJECT = {};\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 const hasEditorUndo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasUndo();\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 const hasEditorRedo = createRegistrySelector( ( select ) => () => {\n\treturn select( coreStore ).hasRedo();\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\tconst edits = getPostEdits( state );\n\treturn 'content' in edits;\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 const isEditedPostDirty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// Edits should contain only fields which differ from the saved post (reset\n\t\t// at initial load and save complete). Thus, a non-empty edits state can be\n\t\t// inferred to contain unsaved values.\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn select( coreStore ).hasEditsForEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\n);\n\n/**\n * Returns true if there are unsaved edits for entities other than\n * the editor's post, and false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether there are edits or not.\n */\nexport const hasNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst dirtyEntityRecords =\n\t\t\tselect( coreStore ).__experimentalGetDirtyEntityRecords();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn dirtyEntityRecords.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\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 const getCurrentPost = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\n\t\tconst post = select( coreStore ).getRawEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( post ) {\n\t\t\treturn post;\n\t\t}\n\n\t\t// This exists for compatibility with the previous selector behavior\n\t\t// which would guarantee an object return based on the editor reducer's\n\t\t// default empty object state.\n\t\treturn EMPTY_OBJECT;\n\t}\n);\n\n/**\n * Returns the post type of the post currently being edited.\n *\n * @param {Object} state Global application state.\n *\n * @example\n *\n *```js\n * const currentPostType = wp.data.select( 'core/editor' ).getCurrentPostType();\n *```\n * @return {string} Post type.\n */\nexport function getCurrentPostType( state ) {\n\treturn state.postType;\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 state.postId;\n}\n\n/**\n * Returns the template ID currently being rendered/edited\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Template ID.\n */\nexport function getCurrentTemplateId( state ) {\n\treturn state.templateId;\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 (\n\t\tgetCurrentPost( state )._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0\n\t);\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 (\n\t\tgetCurrentPost( state )._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ??\n\t\tnull\n\t);\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 = createRegistrySelector( ( select ) => ( state ) => {\n\tconst postType = getCurrentPostType( state );\n\tconst postId = getCurrentPostId( state );\n\treturn (\n\t\tselect( coreStore ).getEntityRecordEdits(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t) || EMPTY_OBJECT\n\t);\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\tswitch ( attributeName ) {\n\t\tcase 'type':\n\t\t\treturn getCurrentPostType( state );\n\n\t\tcase 'id':\n\t\t\treturn getCurrentPostId( state );\n\n\t\tdefault:\n\t\t\tconst post = getCurrentPost( state );\n\t\t\tif ( ! post.hasOwnProperty( attributeName ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn getPostRawValue( 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 merging with the attribute value for the last known\n * saved state of the post (this is needed for some nested attributes like meta).\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Post attribute name.\n *\n * @return {*} Post attribute value.\n */\nconst getNestedEditedPostProperty = createSelector(\n\t( state, attributeName ) => {\n\t\tconst edits = getPostEdits( state );\n\t\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\t\treturn getCurrentPostAttribute( state, attributeName );\n\t\t}\n\n\t\treturn {\n\t\t\t...getCurrentPostAttribute( state, attributeName ),\n\t\t\t...edits[ attributeName ],\n\t\t};\n\t},\n\t( state, attributeName ) => [\n\t\tgetCurrentPostAttribute( state, attributeName ),\n\t\tgetPostEdits( state )[ 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 * @example\n *\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst getMedia = select( 'core' ).getMedia( getFeaturedMediaId );\n *\n * \t\treturn (\n * \t\t\tgetMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''\n * \t\t);\n * }, [] );\n *```\n *\n * @return {*} Post attribute value.\n */\nexport function getEditedPostAttribute( state, attributeName ) {\n\t// Special cases.\n\tswitch ( attributeName ) {\n\t\tcase 'content':\n\t\t\treturn getEditedPostContent( state );\n\t}\n\n\t// Fall back to saved post value if not edited.\n\tconst edits = getPostEdits( state );\n\tif ( ! edits.hasOwnProperty( attributeName ) ) {\n\t\treturn getCurrentPostAttribute( state, attributeName );\n\t}\n\n\t// Merge properties are objects which contain only the patch edit in state,\n\t// and thus must be merged with the current post attribute.\n\tif ( EDIT_MERGE_PROPERTIES.has( attributeName ) ) {\n\t\treturn getNestedEditedPostProperty( 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 * @deprecated since 5.6. Callers should use the `getAutosave( postType, postId, userId )` selector\n * \t\t\t from the '@wordpress/core-data' package and access properties on the returned\n * \t\t\t autosave object using getPostRawValue.\n *\n * @param {Object} state Global application state.\n * @param {string} attributeName Autosave attribute name.\n *\n * @return {*} Autosave attribute value.\n */\nexport const getAutosaveAttribute = createRegistrySelector(\n\t( select ) => ( state, attributeName ) => {\n\t\tif (\n\t\t\t! AUTOSAVE_PROPERTIES.includes( attributeName ) &&\n\t\t\tattributeName !== 'preview_link'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( postType === 'wp_template' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\tif ( autosave ) {\n\t\t\treturn getPostRawValue( autosave[ attributeName ] );\n\t\t}\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\tif ( status === 'private' ) {\n\t\treturn 'private';\n\t}\n\n\tconst password = getEditedPostAttribute( state, 'password' );\n\tif ( password ) {\n\t\treturn 'password';\n\t}\n\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 * @param {Object} [currentPost] Explicit current post for bypassing registry selector.\n *\n * @return {boolean} Whether the post has been published.\n */\nexport function isCurrentPostPublished( state, currentPost ) {\n\tconst post = currentPost || getCurrentPost( state );\n\n\treturn (\n\t\t[ 'publish', 'private' ].indexOf( post.status ) !== -1 ||\n\t\t( post.status === 'future' &&\n\t\t\t! isInTheFuture(\n\t\t\t\tnew Date( Number( getDate( post.date ) ) - ONE_MINUTE_IN_MS )\n\t\t\t) )\n\t);\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 (\n\t\tgetCurrentPost( state ).status === 'future' &&\n\t\t! isCurrentPostPublished( state )\n\t);\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 (\n\t\tisEditedPostDirty( state ) ||\n\t\t[ 'publish', 'private', 'future' ].indexOf( post.status ) === -1\n\t);\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\tPlatform.OS === 'native'\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 const isEditedPostEmpty = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// While the condition of truthy content string is sufficient to determine\n\t\t// emptiness, testing saveable blocks length is a trivial operation. Since\n\t\t// this function can be called frequently, optimize for the fast case as a\n\t\t// condition of the mere existence of blocks. Note that the value of edited\n\t\t// content takes precedent over block content, and must fall through to the\n\t\t// default logic.\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( typeof record.content !== 'function' ) {\n\t\t\treturn ! record.content;\n\t\t}\n\n\t\tconst blocks = getEditedPostAttribute( state, 'blocks' );\n\n\t\tif ( blocks.length === 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Pierce the abstraction of the serializer in knowing that blocks are\n\t\t// joined 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// There are two conditions under which the optimization cannot be\n\t\t// assumed, and a fallthrough to getEditedPostContent must occur:\n\t\t//\n\t\t// 1. getBlocksForSerialization has special treatment in omitting a\n\t\t// single unmodified default block.\n\t\t// 2. Comment delimiters are omitted for a freeform or unregistered\n\t\t// block in its serialization. The freeform block specifically may\n\t\t// produce an empty string in its saved output.\n\t\t//\n\t\t// For all other content, the single block is assumed to make a post\n\t\t// non-empty, if only by virtue of its own comment delimiters.\n\t\tconst blockName = blocks[ 0 ].name;\n\t\tif (\n\t\t\tblockName !== getDefaultBlockName() &&\n\t\t\tblockName !== getFreeformContentHandlerName()\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! getEditedPostContent( state );\n\t}\n);\n\n/**\n * Returns true if the post can be autosaved, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {Object} autosave A raw autosave object from the REST API.\n *\n * @return {boolean} Whether the post can be autosaved.\n */\nexport const isEditedPostAutosaveable = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\t// A post must contain a title, an excerpt, or non-empty content to be valid for autosaving.\n\t\tif ( ! isEditedPostSaveable( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// A post is not autosavable when there is a post autosave lock.\n\t\tif ( isPostAutosavingLocked( state ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postType = getCurrentPostType( state );\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( postType === 'wp_template' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst hasFetchedAutosave = select( coreStore ).hasFetchedAutosaves(\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tconst currentUserId = select( coreStore ).getCurrentUser()?.id;\n\n\t\t// Disable reason - this line causes the side-effect of fetching the autosave\n\t\t// via a resolver, moving below the return would result in the autosave never\n\t\t// being fetched.\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst autosave = select( coreStore ).getAutosave(\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\tcurrentUserId\n\t\t);\n\n\t\t// If any existing autosaves have not yet been fetched, this function is\n\t\t// unable to determine if the post is autosaveable, so return false.\n\t\tif ( ! hasFetchedAutosave ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If we don't already have an autosave, the post is autosaveable.\n\t\tif ( ! autosave ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// To avoid an expensive content serialization, use the content dirtiness\n\t\t// flag in place of content field comparison against the known autosave.\n\t\t// This is not strictly accurate, and relies on a tolerance toward autosave\n\t\t// request failures for unnecessary saves.\n\t\tif ( hasChangedContent( state ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If title, excerpt, or meta have changed, the post is autosaveable.\n\t\treturn [ 'title', 'excerpt', 'meta' ].some(\n\t\t\t( field ) =>\n\t\t\t\tgetPostRawValue( autosave[ field ] ) !==\n\t\t\t\tgetEditedPostAttribute( state, field )\n\t\t);\n\t}\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(\n\t\tNumber( getDate( date ) ) - ONE_MINUTE_IN_MS\n\t);\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\n\t// This should be the status of the persisted post\n\t// It shouldn't use the \"edited\" status otherwise it breaks the\n\t// inferred post data floating status\n\t// See https://github.com/WordPress/gutenberg/issues/28083.\n\tconst status = getCurrentPost( state ).status;\n\tif (\n\t\tstatus === 'draft' ||\n\t\tstatus === 'auto-draft' ||\n\t\tstatus === 'pending'\n\t) {\n\t\treturn date === modified || date === null;\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the post is currently being deleted, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether post is being deleted.\n */\nexport function isDeletingPost( state ) {\n\treturn !! state.deleting.pending;\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.pending;\n}\n\n/**\n * Returns true if non-post entities are currently being saved, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether non-post entities are being saved.\n */\nexport const isSavingNonPostEntityChanges = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst entitiesBeingSaved =\n\t\t\tselect( coreStore ).__experimentalGetEntitiesBeingSaved();\n\t\tconst { type, id } = getCurrentPost( state );\n\t\treturn entitiesBeingSaved.some(\n\t\t\t( entityRecord ) =>\n\t\t\t\tentityRecord.kind !== 'postType' ||\n\t\t\t\tentityRecord.name !== type ||\n\t\t\t\tentityRecord.key !== id\n\t\t);\n\t}\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 const didPostSaveRequestSucceed = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn ! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\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 const didPostSaveRequestFail = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst postId = getCurrentPostId( state );\n\t\treturn !! select( coreStore ).getLastEntitySaveError(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t}\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 ) && Boolean( 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 ) && Boolean( 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 | undefined} Preview Link.\n */\nexport function getEditedPostPreviewLink( state ) {\n\tif ( state.saving.pending || isSavingPost( state ) ) {\n\t\treturn;\n\t}\n\n\tlet previewLink = getAutosaveAttribute( state, 'preview_link' );\n\t// Fix for issue: https://github.com/WordPress/gutenberg/issues/33616\n\t// If the post is draft, ignore the preview link from the autosave record,\n\t// because the preview could be a stale autosave if the post was switched from\n\t// published to draft.\n\t// See: https://github.com/WordPress/gutenberg/pull/37952.\n\tif ( ! previewLink || 'draft' === getCurrentPost( state ).status ) {\n\t\tpreviewLink = getEditedPostAttribute( state, 'link' );\n\t\tif ( previewLink ) {\n\t\t\tpreviewLink = addQueryArgs( previewLink, { preview: true } );\n\t\t}\n\t}\n\tconst featuredImageId = getEditedPostAttribute( state, 'featured_media' );\n\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 * @return {?string} Suggested post format.\n */\nexport const getSuggestedPostFormat = createRegistrySelector(\n\t( select ) => () => {\n\t\tconst blocks = select( blockEditorStore ).getBlocks();\n\n\t\tif ( blocks.length > 2 ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet name;\n\t\t// If there is only one block in the content of the post grab its name\n\t\t// so we can derive a suitable post format from it.\n\t\tif ( blocks.length === 1 ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t\t// Check for core/embed `video` and `audio` eligible suggestions.\n\t\t\tif ( name === 'core/embed' ) {\n\t\t\t\tconst provider = blocks[ 0 ].attributes?.providerNameSlug;\n\t\t\t\tif ( [ 'youtube', 'vimeo' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/video';\n\t\t\t\t} else if ( [ 'spotify', 'soundcloud' ].includes( provider ) ) {\n\t\t\t\t\tname = 'core/audio';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If there are two blocks in the content and the last one is a text blocks\n\t\t// grab the name of the first one to also suggest a post format from it.\n\t\tif ( blocks.length === 2 && blocks[ 1 ].name === 'core/paragraph' ) {\n\t\t\tname = blocks[ 0 ].name;\n\t\t}\n\n\t\t// We only convert to default post formats in core.\n\t\tswitch ( name ) {\n\t\t\tcase 'core/image':\n\t\t\t\treturn 'image';\n\t\t\tcase 'core/quote':\n\t\t\tcase 'core/pullquote':\n\t\t\t\treturn 'quote';\n\t\t\tcase 'core/gallery':\n\t\t\t\treturn 'gallery';\n\t\t\tcase 'core/video':\n\t\t\t\treturn 'video';\n\t\t\tcase 'core/audio':\n\t\t\t\treturn 'audio';\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}\n);\n\n/**\n * Returns the content of the post being edited.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Post content.\n */\nexport const getEditedPostContent = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst postId = getCurrentPostId( state );\n\t\tconst postType = getCurrentPostType( state );\n\t\tconst record = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\tif ( record ) {\n\t\t\tif ( typeof record.content === 'function' ) {\n\t\t\t\treturn record.content( record );\n\t\t\t} else if ( record.blocks ) {\n\t\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t\t} else if ( record.content ) {\n\t\t\t\treturn record.content;\n\t\t\t}\n\t\t}\n\t\treturn '';\n\t}\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\treturn (\n\t\tisSavingPost( state ) &&\n\t\t! isCurrentPostPublished( state ) &&\n\t\tgetEditedPostAttribute( state, 'status' ) === 'publish'\n\t);\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(\n\t\tstate,\n\t\t'permalink_template'\n\t);\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, or null if the post is not viewable.\n */\nexport function getPermalink( state ) {\n\tconst permalinkParts = getPermalinkParts( state );\n\tif ( ! permalinkParts ) {\n\t\treturn null;\n\t}\n\n\tconst { prefix, postName, suffix } = permalinkParts;\n\n\tif ( isPermalinkEditable( state ) ) {\n\t\treturn prefix + postName + suffix;\n\t}\n\n\treturn prefix;\n}\n\n/**\n * Returns the slug for the post being edited, preferring a manually edited\n * value if one exists, then a sanitized version of the current post title, and\n * finally the post ID.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} The current slug to be displayed in the editor\n */\nexport function getEditedPostSlug( state ) {\n\treturn (\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tcleanForSlug( getEditedPostAttribute( state, 'title' ) ) ||\n\t\tgetCurrentPostId( state )\n\t);\n}\n\n/**\n * Returns the permalink for a post, split into its three parts: the prefix,\n * the postName, and the suffix.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} An object containing the prefix, postName, and suffix for\n * the permalink, or null if the post is not viewable.\n */\nexport function getPermalinkParts( state ) {\n\tconst permalinkTemplate = getEditedPostAttribute(\n\t\tstate,\n\t\t'permalink_template'\n\t);\n\tif ( ! permalinkTemplate ) {\n\t\treturn null;\n\t}\n\n\tconst postName =\n\t\tgetEditedPostAttribute( state, 'slug' ) ||\n\t\tgetEditedPostAttribute( state, 'generated_slug' );\n\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\n\treturn {\n\t\tprefix,\n\t\tpostName,\n\t\tsuffix,\n\t};\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 post autosaving is locked.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Is locked.\n */\nexport function isPostAutosavingLocked( state ) {\n\treturn Object.keys( state.postAutosavingLock ).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 Boolean(\n\t\tgetCurrentPost( state )._links?.hasOwnProperty(\n\t\t\t'wp:action-unfiltered-html'\n\t\t)\n\t);\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 * @return {boolean} Whether the pre-publish panel should be shown or not.\n */\nexport const isPublishSidebarEnabled = createRegistrySelector(\n\t( select ) => () =>\n\t\t!! select( preferencesStore ).get( 'core', 'isPublishSidebarEnabled' )\n);\n\n/**\n * Return the current block list.\n *\n * @param {Object} state\n * @return {Array} Block list.\n */\nexport const getEditorBlocks = createSelector(\n\t( state ) => {\n\t\treturn (\n\t\t\tgetEditedPostAttribute( state, 'blocks' ) ||\n\t\t\tparse( getEditedPostContent( state ) )\n\t\t);\n\t},\n\t( state ) => [\n\t\tgetEditedPostAttribute( state, 'blocks' ),\n\t\tgetEditedPostContent( state ),\n\t]\n);\n\n/**\n * Returns true if the given panel was programmatically removed, or false otherwise.\n * All panels are not removed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is removed.\n */\nexport function isEditorPanelRemoved( state, panelName ) {\n\treturn state.removedPanels.includes( panelName );\n}\n\n/**\n * Returns true if the given panel is enabled, or false otherwise. Panels are\n * enabled by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is enabled.\n */\nexport const isEditorPanelEnabled = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst inactivePanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'inactivePanels'\n\t\t);\n\t\treturn (\n\t\t\t! isEditorPanelRemoved( state, panelName ) &&\n\t\t\t! inactivePanels?.includes( panelName )\n\t\t);\n\t}\n);\n\n/**\n * Returns true if the given panel is open, or false otherwise. Panels are\n * closed by default.\n *\n * @param {Object} state Global application state.\n * @param {string} panelName A string that identifies the panel.\n *\n * @return {boolean} Whether or not the panel is open.\n */\nexport const isEditorPanelOpened = createRegistrySelector(\n\t( select ) => ( state, panelName ) => {\n\t\t// For backward compatibility, we check edit-post\n\t\t// even though now this is in \"editor\" package.\n\t\tconst openPanels = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'openPanels'\n\t\t);\n\t\treturn !! openPanels?.includes( panelName );\n\t}\n);\n\n/**\n * A block selection object.\n *\n * @typedef {Object} WPBlockSelection\n *\n * @property {string} clientId A block client ID.\n * @property {string} attributeKey A block attribute key.\n * @property {number} offset An attribute value offset, based on the rich\n * text value. See `wp.richText.create`.\n */\n\n/**\n * Returns the current selection start.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection start.\n *\n * @deprecated since Gutenberg 10.0.0.\n */\nexport function getEditorSelectionStart( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionStart;\n}\n\n/**\n * Returns the current selection end.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n *\n * @deprecated since Gutenberg 10.0.0.\n */\nexport function getEditorSelectionEnd( state ) {\n\tdeprecated( \"select('core/editor').getEditorSelectionStart\", {\n\t\tsince: '5.8',\n\t\talternative: \"select('core/editor').getEditorSelection\",\n\t} );\n\treturn getEditedPostAttribute( state, 'selection' )?.selectionEnd;\n}\n\n/**\n * Returns the current selection.\n *\n * @param {Object} state\n * @return {WPBlockSelection} The selection end.\n */\nexport function getEditorSelection( state ) {\n\treturn getEditedPostAttribute( state, 'selection' );\n}\n\n/**\n * Is the editor ready\n *\n * @param {Object} state\n * @return {boolean} is Ready.\n */\nexport function __unstableIsEditorReady( state ) {\n\treturn !! state.postId;\n}\n\n/**\n * Returns the post 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.editorSettings;\n}\n\n/**\n * Returns the post editor's rendering mode.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} Rendering mode.\n */\nexport function getRenderingMode( state ) {\n\treturn state.renderingMode;\n}\n\n/**\n * Returns the current editing canvas device type.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const getDeviceType = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst isZoomOut = unlock( select( blockEditorStore ) ).isZoomOut();\n\t\tif ( isZoomOut ) {\n\t\t\treturn 'Desktop';\n\t\t}\n\t\treturn state.deviceType;\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport function isListViewOpened( state ) {\n\treturn state.listViewPanel;\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport function isInserterOpened( state ) {\n\treturn !! state.blockInserterPanel;\n}\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector(\n\t( select ) => () =>\n\t\tselect( preferencesStore ).get( 'core', 'editorMode' ) ?? 'visual'\n);\n\n/*\n * Backward compatibility\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 * @deprecated since Gutenberg 9.7.0.\n */\nexport function getStateBeforeOptimisticTransaction() {\n\tdeprecated( \"select('core/editor').getStateBeforeOptimisticTransaction\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\n\treturn null;\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 * @deprecated since Gutenberg 9.7.0.\n */\nexport function inSomeHistory() {\n\tdeprecated( \"select('core/editor').inSomeHistory\", {\n\t\tsince: '5.7',\n\t\thint: 'No state history is kept on this store anymore',\n\t} );\n\treturn false;\n}\n\nfunction getBlockEditorSelector( name ) {\n\treturn createRegistrySelector( ( select ) => ( state, ...args ) => {\n\t\tdeprecated( \"`wp.data.select( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative: \"`wp.data.select( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn select( blockEditorStore )[ name ]( ...args );\n\t} );\n}\n\n/**\n * @see getBlockName in core/block-editor store.\n */\nexport const getBlockName = getBlockEditorSelector( 'getBlockName' );\n\n/**\n * @see isBlockValid in core/block-editor store.\n */\nexport const isBlockValid = getBlockEditorSelector( 'isBlockValid' );\n\n/**\n * @see getBlockAttributes in core/block-editor store.\n */\nexport const getBlockAttributes =\n\tgetBlockEditorSelector( 'getBlockAttributes' );\n\n/**\n * @see getBlock in core/block-editor store.\n */\nexport const getBlock = getBlockEditorSelector( 'getBlock' );\n\n/**\n * @see getBlocks in core/block-editor store.\n */\nexport const getBlocks = getBlockEditorSelector( 'getBlocks' );\n\n/**\n * @see getClientIdsOfDescendants in core/block-editor store.\n */\nexport const getClientIdsOfDescendants = getBlockEditorSelector(\n\t'getClientIdsOfDescendants'\n);\n\n/**\n * @see getClientIdsWithDescendants in core/block-editor store.\n */\nexport const getClientIdsWithDescendants = getBlockEditorSelector(\n\t'getClientIdsWithDescendants'\n);\n\n/**\n * @see getGlobalBlockCount in core/block-editor store.\n */\nexport const getGlobalBlockCount = getBlockEditorSelector(\n\t'getGlobalBlockCount'\n);\n\n/**\n * @see getBlocksByClientId in core/block-editor store.\n */\nexport const getBlocksByClientId = getBlockEditorSelector(\n\t'getBlocksByClientId'\n);\n\n/**\n * @see getBlockCount in core/block-editor store.\n */\nexport const getBlockCount = getBlockEditorSelector( 'getBlockCount' );\n\n/**\n * @see getBlockSelectionStart in core/block-editor store.\n */\nexport const getBlockSelectionStart = getBlockEditorSelector(\n\t'getBlockSelectionStart'\n);\n\n/**\n * @see getBlockSelectionEnd in core/block-editor store.\n */\nexport const getBlockSelectionEnd = getBlockEditorSelector(\n\t'getBlockSelectionEnd'\n);\n\n/**\n * @see getSelectedBlockCount in core/block-editor store.\n */\nexport const getSelectedBlockCount = getBlockEditorSelector(\n\t'getSelectedBlockCount'\n);\n\n/**\n * @see hasSelectedBlock in core/block-editor store.\n */\nexport const hasSelectedBlock = getBlockEditorSelector( 'hasSelectedBlock' );\n\n/**\n * @see getSelectedBlockClientId in core/block-editor store.\n */\nexport const getSelectedBlockClientId = getBlockEditorSelector(\n\t'getSelectedBlockClientId'\n);\n\n/**\n * @see getSelectedBlock in core/block-editor store.\n */\nexport const getSelectedBlock = getBlockEditorSelector( 'getSelectedBlock' );\n\n/**\n * @see getBlockRootClientId in core/block-editor store.\n */\nexport const getBlockRootClientId = getBlockEditorSelector(\n\t'getBlockRootClientId'\n);\n\n/**\n * @see getBlockHierarchyRootClientId in core/block-editor store.\n */\nexport const getBlockHierarchyRootClientId = getBlockEditorSelector(\n\t'getBlockHierarchyRootClientId'\n);\n\n/**\n * @see getAdjacentBlockClientId in core/block-editor store.\n */\nexport const getAdjacentBlockClientId = getBlockEditorSelector(\n\t'getAdjacentBlockClientId'\n);\n\n/**\n * @see getPreviousBlockClientId in core/block-editor store.\n */\nexport const getPreviousBlockClientId = getBlockEditorSelector(\n\t'getPreviousBlockClientId'\n);\n\n/**\n * @see getNextBlockClientId in core/block-editor store.\n */\nexport const getNextBlockClientId = getBlockEditorSelector(\n\t'getNextBlockClientId'\n);\n\n/**\n * @see getSelectedBlocksInitialCaretPosition in core/block-editor store.\n */\nexport const getSelectedBlocksInitialCaretPosition = getBlockEditorSelector(\n\t'getSelectedBlocksInitialCaretPosition'\n);\n\n/**\n * @see getMultiSelectedBlockClientIds in core/block-editor store.\n */\nexport const getMultiSelectedBlockClientIds = getBlockEditorSelector(\n\t'getMultiSelectedBlockClientIds'\n);\n\n/**\n * @see getMultiSelectedBlocks in core/block-editor store.\n */\nexport const getMultiSelectedBlocks = getBlockEditorSelector(\n\t'getMultiSelectedBlocks'\n);\n\n/**\n * @see getFirstMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getFirstMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getFirstMultiSelectedBlockClientId'\n);\n\n/**\n * @see getLastMultiSelectedBlockClientId in core/block-editor store.\n */\nexport const getLastMultiSelectedBlockClientId = getBlockEditorSelector(\n\t'getLastMultiSelectedBlockClientId'\n);\n\n/**\n * @see isFirstMultiSelectedBlock in core/block-editor store.\n */\nexport const isFirstMultiSelectedBlock = getBlockEditorSelector(\n\t'isFirstMultiSelectedBlock'\n);\n\n/**\n * @see isBlockMultiSelected in core/block-editor store.\n */\nexport const isBlockMultiSelected = getBlockEditorSelector(\n\t'isBlockMultiSelected'\n);\n\n/**\n * @see isAncestorMultiSelected in core/block-editor store.\n */\nexport const isAncestorMultiSelected = getBlockEditorSelector(\n\t'isAncestorMultiSelected'\n);\n\n/**\n * @see getMultiSelectedBlocksStartClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksStartClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksStartClientId'\n);\n\n/**\n * @see getMultiSelectedBlocksEndClientId in core/block-editor store.\n */\nexport const getMultiSelectedBlocksEndClientId = getBlockEditorSelector(\n\t'getMultiSelectedBlocksEndClientId'\n);\n\n/**\n * @see getBlockOrder in core/block-editor store.\n */\nexport const getBlockOrder = getBlockEditorSelector( 'getBlockOrder' );\n\n/**\n * @see getBlockIndex in core/block-editor store.\n */\nexport const getBlockIndex = getBlockEditorSelector( 'getBlockIndex' );\n\n/**\n * @see isBlockSelected in core/block-editor store.\n */\nexport const isBlockSelected = getBlockEditorSelector( 'isBlockSelected' );\n\n/**\n * @see hasSelectedInnerBlock in core/block-editor store.\n */\nexport const hasSelectedInnerBlock = getBlockEditorSelector(\n\t'hasSelectedInnerBlock'\n);\n\n/**\n * @see isBlockWithinSelection in core/block-editor store.\n */\nexport const isBlockWithinSelection = getBlockEditorSelector(\n\t'isBlockWithinSelection'\n);\n\n/**\n * @see hasMultiSelection in core/block-editor store.\n */\nexport const hasMultiSelection = getBlockEditorSelector( 'hasMultiSelection' );\n\n/**\n * @see isMultiSelecting in core/block-editor store.\n */\nexport const isMultiSelecting = getBlockEditorSelector( 'isMultiSelecting' );\n\n/**\n * @see isSelectionEnabled in core/block-editor store.\n */\nexport const isSelectionEnabled =\n\tgetBlockEditorSelector( 'isSelectionEnabled' );\n\n/**\n * @see getBlockMode in core/block-editor store.\n */\nexport const getBlockMode = getBlockEditorSelector( 'getBlockMode' );\n\n/**\n * @see isTyping in core/block-editor store.\n */\nexport const isTyping = getBlockEditorSelector( 'isTyping' );\n\n/**\n * @see isCaretWithinFormattedText in core/block-editor store.\n */\nexport const isCaretWithinFormattedText = getBlockEditorSelector(\n\t'isCaretWithinFormattedText'\n);\n\n/**\n * @see getBlockInsertionPoint in core/block-editor store.\n */\nexport const getBlockInsertionPoint = getBlockEditorSelector(\n\t'getBlockInsertionPoint'\n);\n\n/**\n * @see isBlockInsertionPointVisible in core/block-editor store.\n */\nexport const isBlockInsertionPointVisible = getBlockEditorSelector(\n\t'isBlockInsertionPointVisible'\n);\n\n/**\n * @see isValidTemplate in core/block-editor store.\n */\nexport const isValidTemplate = getBlockEditorSelector( 'isValidTemplate' );\n\n/**\n * @see getTemplate in core/block-editor store.\n */\nexport const getTemplate = getBlockEditorSelector( 'getTemplate' );\n\n/**\n * @see getTemplateLock in core/block-editor store.\n */\nexport const getTemplateLock = getBlockEditorSelector( 'getTemplateLock' );\n\n/**\n * @see canInsertBlockType in core/block-editor store.\n */\nexport const canInsertBlockType =\n\tgetBlockEditorSelector( 'canInsertBlockType' );\n\n/**\n * @see getInserterItems in core/block-editor store.\n */\nexport const getInserterItems = getBlockEditorSelector( 'getInserterItems' );\n\n/**\n * @see hasInserterItems in core/block-editor store.\n */\nexport const hasInserterItems = getBlockEditorSelector( 'hasInserterItems' );\n\n/**\n * @see getBlockListSettings in core/block-editor store.\n */\nexport const getBlockListSettings = getBlockEditorSelector(\n\t'getBlockListSettings'\n);\n\nexport const __experimentalGetDefaultTemplateTypes = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateTypes\",\n\t\t\t{\n\t\t\t\tsince: '6.8',\n\t\t\t\talternative:\n\t\t\t\t\t\"select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_types\",\n\t\t\t}\n\t\t);\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.default_template_types;\n\t}\n);\n\n/**\n * Returns the default template part areas.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The template part areas.\n */\nexport const __experimentalGetDefaultTemplatePartAreas = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( () => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplatePartAreas\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t\talternative:\n\t\t\t\t\t\t\"select('core/core-data').getEntityRecord( 'root', '__unstableBase' )?.default_template_part_areas\",\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst areas =\n\t\t\t\tselect( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\treturn areas.map( ( item ) => {\n\t\t\t\treturn { ...item, icon: getTemplatePartIcon( item.icon ) };\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a default template type searched by slug.\n *\n * @param {Object} state Global application state.\n * @param {string} slug The template type slug.\n *\n * @return {Object} The template type.\n */\nexport const __experimentalGetDefaultTemplateType = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, slug ) => {\n\t\t\tdeprecated(\n\t\t\t\t\"select('core/editor').__experimentalGetDefaultTemplateType\",\n\t\t\t\t{\n\t\t\t\t\tsince: '6.8',\n\t\t\t\t}\n\t\t\t);\n\t\t\tconst templateTypes = select( coreStore ).getEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase'\n\t\t\t)?.default_template_types;\n\n\t\t\tif ( ! templateTypes ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\tObject.values( templateTypes ).find(\n\t\t\t\t\t( type ) => type.slug === slug\n\t\t\t\t) ?? EMPTY_OBJECT\n\t\t\t);\n\t\t} )\n);\n\n/**\n * Given a template entity, return information about it which is ready to be\n * rendered, such as the title, description, and icon.\n *\n * @param {Object} state Global application state.\n * @param {Object} template The template for which we need information.\n * @return {Object} Information about the template, including title, description, and icon.\n */\nexport const __experimentalGetTemplateInfo = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector( ( state, template ) => {\n\t\t\tdeprecated( \"select('core/editor').__experimentalGetTemplateInfo\", {\n\t\t\t\tsince: '6.8',\n\t\t\t} );\n\n\t\t\tif ( ! template ) {\n\t\t\t\treturn EMPTY_OBJECT;\n\t\t\t}\n\n\t\t\tconst templateTypes =\n\t\t\t\tselect( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t\t\t?.default_template_types || [];\n\n\t\t\tconst templateAreas =\n\t\t\t\tselect( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t\t\t?.default_template_part_areas || [];\n\n\t\t\treturn getTemplateInfo( {\n\t\t\t\ttemplate,\n\t\t\t\ttemplateAreas,\n\t\t\t\ttemplateTypes,\n\t\t\t} );\n\t\t} )\n);\n\n/**\n * Returns a post type label depending on the current post.\n *\n * @param {Object} state Global application state.\n *\n * @return {string|undefined} The post type label if available, otherwise undefined.\n */\nexport const getPostTypeLabel = createRegistrySelector(\n\t( select ) => ( state ) => {\n\t\tconst currentPostType = getCurrentPostType( state );\n\t\tconst postType = select( coreStore ).getPostType( currentPostType );\n\t\t// Disable reason: Post type labels object is shaped like this.\n\t\t// eslint-disable-next-line camelcase\n\t\treturn postType?.labels?.singular_name;\n\t}\n);\n\n/**\n * Returns true if the publish sidebar is opened.\n *\n * @param {Object} state Global application state\n *\n * @return {boolean} Whether the publish sidebar is open.\n */\nexport function isPublishSidebarOpened( state ) {\n\treturn state.publishSidebarActive;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * Function returning a sessionStorage key to set or retrieve a given post's\n * automatic session backup.\n *\n * Keys are crucially prefixed with 'wp-autosave-' so that wp-login.php's\n * `loggedout` handler can clear sessionStorage of any user-private content.\n *\n * @see https://github.com/WordPress/wordpress-develop/blob/6dad32d2aed47e6c0cf2aee8410645f6d7aba6bd/src/wp-login.php#L103\n *\n * @param {string} postId Post ID.\n * @param {boolean} isPostNew Whether post new.\n *\n * @return {string} sessionStorage key\n */\nfunction postKey( postId, isPostNew ) {\n\treturn `wp-autosave-block-editor-post-${\n\t\tisPostNew ? 'auto-draft' : postId\n\t}`;\n}\n\nexport function localAutosaveGet( postId, isPostNew ) {\n\treturn window.sessionStorage.getItem( postKey( postId, isPostNew ) );\n}\n\nexport function localAutosaveSet( postId, isPostNew, title, content, excerpt ) {\n\twindow.sessionStorage.setItem(\n\t\tpostKey( postId, isPostNew ),\n\t\tJSON.stringify( {\n\t\t\tpost_title: title,\n\t\t\tcontent,\n\t\t\texcerpt,\n\t\t} )\n\t);\n}\n\nexport function localAutosaveClear( postId, isPostNew ) {\n\twindow.sessionStorage.removeItem( postKey( postId, isPostNew ) );\n}\n","/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport apiFetch from '@wordpress/api-fetch';\nimport deprecated from '@wordpress/deprecated';\nimport {\n\tparse,\n\tsynchronizeBlocksWithTemplate,\n\t__unstableSerializeAndClean,\n} from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tapplyFilters,\n\tapplyFiltersAsync,\n\tdoActionAsync,\n} from '@wordpress/hooks';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { localAutosaveSet } from './local-autosave';\nimport {\n\tgetNotificationArgumentsForSaveSuccess,\n\tgetNotificationArgumentsForSaveFail,\n\tgetNotificationArgumentsForTrashFail,\n} from './utils/notice-builder';\nimport { unlock } from '../lock-unlock';\n/**\n * Returns an action generator 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 * @param {Array} [template] Block Template.\n */\nexport const setupEditor =\n\t( post, edits, template ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.setEditedPost( post.type, post.id );\n\t\t// Apply a template for new posts only, if exists.\n\t\tconst isNewPost = post.status === 'auto-draft';\n\t\tif ( isNewPost && template ) {\n\t\t\t// In order to ensure maximum of a single parse during setup, edits are\n\t\t\t// included as part of editor setup action. Assume edited content as\n\t\t\t// canonical if provided, falling back to post.\n\t\t\tlet content;\n\t\t\tif ( 'content' in edits ) {\n\t\t\t\tcontent = edits.content;\n\t\t\t} else {\n\t\t\t\tcontent = post.content.raw;\n\t\t\t}\n\t\t\tlet blocks = parse( content );\n\t\t\tblocks = synchronizeBlocksWithTemplate( blocks, template );\n\t\t\tdispatch.resetEditorBlocks( blocks, {\n\t\t\t\t__unstableShouldCreateUndoLevel: false,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tedits &&\n\t\t\tObject.values( edits ).some(\n\t\t\t\t( [ key, edit ] ) =>\n\t\t\t\t\tedit !== ( post[ key ]?.raw ?? post[ key ] )\n\t\t\t)\n\t\t) {\n\t\t\tdispatch.editPost( edits );\n\t\t}\n\t};\n\n/**\n * Returns an action object signalling that the editor is being destroyed and\n * that any necessary state or side-effect cleanup should occur.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function __experimentalTearDownEditor() {\n\tdeprecated(\n\t\t\"wp.data.dispatch( 'core/editor' ).__experimentalTearDownEditor\",\n\t\t{\n\t\t\tsince: '6.5',\n\t\t}\n\t);\n\treturn { type: 'DO_NOTHING' };\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 * @deprecated Since WordPress 6.0.\n */\nexport function resetPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).resetPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Initialize the editor with the setupEditorState action',\n\t} );\n\treturn { type: 'DO_NOTHING' };\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 * @return {Object} Action object.\n * @deprecated since Gutenberg 9.7.0.\n */\nexport function updatePost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).updatePost\", {\n\t\tsince: '5.7',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Setup the editor state.\n *\n * @deprecated\n *\n * @param {Object} post Post object.\n */\nexport function setupEditorState( post ) {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).setupEditorState\", {\n\t\tsince: '6.5',\n\t\talternative: \"wp.data.dispatch( 'core/editor' ).setEditedPost\",\n\t} );\n\treturn setEditedPost( post.type, post.id );\n}\n\n/**\n * Returns an action that sets the current post Type and post ID.\n *\n * @param {string} postType Post Type.\n * @param {string} postId Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPost( postType, postId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tpostId,\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 * @param {Object} [options] Options for the edit.\n *\n * @example\n * ```js\n * // Update the post title\n * wp.data.dispatch( 'core/editor' ).editPost( { title: `${ newTitle }` } );\n * ```\n *\n * @example\n *```js\n * \t// Get specific media size based on the featured media ID\n * \t// Note: change sizes?.large for any registered size\n * \tconst getFeaturedMediaUrl = useSelect( ( select ) => {\n * \t\tconst getFeaturedMediaId =\n * \t\t\tselect( 'core/editor' ).getEditedPostAttribute( 'featured_media' );\n * \t\tconst getMedia = select( 'core' ).getMedia( getFeaturedMediaId );\n *\n * \t\treturn (\n * \t\t\tgetMedia?.media_details?.sizes?.large?.source_url || getMedia?.source_url || ''\n * \t\t);\n * }, [] );\n * ```\n *\n * @return {Object} Action object\n */\nexport const editPost =\n\t( edits, options ) =>\n\t( { select, registry } ) => {\n\t\tconst { id, type } = select.getCurrentPost();\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord( 'postType', type, id, edits, options );\n\t};\n\n/**\n * Action for saving the current post in the editor.\n *\n * @param {Object} [options]\n */\nexport const savePost =\n\t( options = {} ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tif ( ! select.isEditedPostSaveable() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = select.getEditedPostContent();\n\n\t\tif ( ! options.isAutosave ) {\n\t\t\tdispatch.editPost( { content }, { undoIgnore: true } );\n\t\t}\n\n\t\tconst previousRecord = select.getCurrentPost();\n\t\tlet edits = {\n\t\t\tid: previousRecord.id,\n\t\t\t...registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityRecordNonTransientEdits(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t),\n\t\t\tcontent,\n\t\t};\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_START', options } );\n\n\t\tlet error = false;\n\t\ttry {\n\t\t\tedits = await applyFiltersAsync(\n\t\t\t\t'editor.preSavePost',\n\t\t\t\tedits,\n\t\t\t\toptions\n\t\t\t);\n\t\t} catch ( err ) {\n\t\t\terror = err;\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.saveEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\t\tedits,\n\t\t\t\t\t\toptions\n\t\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror =\n\t\t\t\t\terr.message && err.code !== 'unknown_error'\n\t\t\t\t\t\t? err.message\n\t\t\t\t\t\t: __( 'An error occurred while updating.' );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\terror = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getLastEntitySaveError(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpreviousRecord.type,\n\t\t\t\t\tpreviousRecord.id\n\t\t\t\t);\n\t\t}\n\n\t\t// Run the hook with legacy unstable name for backward compatibility\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait applyFilters(\n\t\t\t\t\t'editor.__unstableSavePost',\n\t\t\t\t\tPromise.resolve(),\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! error ) {\n\t\t\ttry {\n\t\t\t\tawait doActionAsync(\n\t\t\t\t\t'editor.savePost',\n\t\t\t\t\t{ id: previousRecord.id },\n\t\t\t\t\toptions\n\t\t\t\t);\n\t\t\t} catch ( err ) {\n\t\t\t\terror = err;\n\t\t\t}\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_UPDATE_FINISH', options } );\n\n\t\tif ( error ) {\n\t\t\tconst args = getNotificationArgumentsForSaveFail( {\n\t\t\t\tpost: previousRecord,\n\t\t\t\tedits,\n\t\t\t\terror,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry.dispatch( noticesStore ).createErrorNotice( ...args );\n\t\t\t}\n\t\t} else {\n\t\t\tconst updatedRecord = select.getCurrentPost();\n\t\t\tconst args = getNotificationArgumentsForSaveSuccess( {\n\t\t\t\tpreviousPost: previousRecord,\n\t\t\t\tpost: updatedRecord,\n\t\t\t\tpostType: await registry\n\t\t\t\t\t.resolveSelect( coreStore )\n\t\t\t\t\t.getPostType( updatedRecord.type ),\n\t\t\t\toptions,\n\t\t\t} );\n\t\t\tif ( args.length ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( ...args );\n\t\t\t}\n\t\t\t// Make sure that any edits after saving create an undo level and are\n\t\t\t// considered for change detection.\n\t\t\tif ( ! options.isAutosave ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t}\n\t};\n\n/**\n * Action for refreshing the current post.\n *\n * @deprecated Since WordPress 6.0.\n */\nexport function refreshPost() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).refreshPost\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action for trashing the current post in the editor.\n */\nexport const trashPost =\n\t() =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst postTypeSlug = select.getCurrentPostType();\n\t\tconst postType = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postTypeSlug );\n\t\tconst { rest_base: restBase, rest_namespace: restNamespace = 'wp/v2' } =\n\t\t\tpostType;\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_START' } );\n\t\ttry {\n\t\t\tconst post = select.getCurrentPost();\n\t\t\tawait apiFetch( {\n\t\t\t\tpath: `/${ restNamespace }/${ restBase }/${ post.id }`,\n\t\t\t\tmethod: 'DELETE',\n\t\t\t} );\n\n\t\t\tawait dispatch.savePost();\n\t\t} catch ( error ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice(\n\t\t\t\t\t...getNotificationArgumentsForTrashFail( { error } )\n\t\t\t\t);\n\t\t}\n\t\tdispatch( { type: 'REQUEST_POST_DELETE_FINISH' } );\n\t};\n\n/**\n * Action that autosaves the current post. This\n * includes server-side autosaving (default) and client-side (a.k.a. local)\n * autosaving (e.g. on the Web, the post might be committed to Session\n * Storage).\n *\n * @param {Object} [options] Extra flags to identify the autosave.\n * @param {boolean} [options.local] Whether to perform a local autosave.\n */\nexport const autosave =\n\t( { local = false, ...options } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tconst post = select.getCurrentPost();\n\n\t\t// Currently template autosaving is not supported.\n\t\tif ( post.type === 'wp_template' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( local ) {\n\t\t\tconst isPostNew = select.isEditedPostNew();\n\t\t\tconst title = select.getEditedPostAttribute( 'title' );\n\t\t\tconst content = select.getEditedPostAttribute( 'content' );\n\t\t\tconst excerpt = select.getEditedPostAttribute( 'excerpt' );\n\t\t\tlocalAutosaveSet( post.id, isPostNew, title, content, excerpt );\n\t\t} else {\n\t\t\tawait dispatch.savePost( { isAutosave: true, ...options } );\n\t\t}\n\t};\n\nexport const __unstableSaveForPreview =\n\t( { forceIsAutosaveable } = {} ) =>\n\tasync ( { select, dispatch } ) => {\n\t\tif (\n\t\t\t( forceIsAutosaveable || select.isEditedPostAutosaveable() ) &&\n\t\t\t! select.isPostLocked()\n\t\t) {\n\t\t\tconst isDraft = [ 'draft', 'auto-draft' ].includes(\n\t\t\t\tselect.getEditedPostAttribute( 'status' )\n\t\t\t);\n\t\t\tif ( isDraft ) {\n\t\t\t\tawait dispatch.savePost( { isPreview: true } );\n\t\t\t} else {\n\t\t\t\tawait dispatch.autosave( { isPreview: true } );\n\t\t\t}\n\t\t}\n\n\t\treturn select.getEditedPostPreviewLink();\n\t};\n\n/**\n * Action that restores last popped state in undo history.\n */\nexport const redo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).redo();\n\t};\n\n/**\n * Action that pops a record from undo history and undoes the edit.\n */\nexport const undo =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( coreStore ).undo();\n\t};\n\n/**\n * Action that creates an undo history record.\n *\n * @deprecated Since WordPress 6.0\n */\nexport function createUndoLevel() {\n\tdeprecated( \"wp.data.dispatch( 'core/editor' ).createUndoLevel\", {\n\t\tsince: '6.0',\n\t\tversion: '6.3',\n\t\talternative: 'Use the core entities store instead',\n\t} );\n\treturn { type: 'DO_NOTHING' };\n}\n\n/**\n * Action that locks the editor.\n *\n * @param {Object} lock Details about the post lock status, user, and nonce.\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 * Enable the publish sidebar.\n */\nexport const enablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', true );\n\t};\n\n/**\n * Disables the publish sidebar.\n */\nexport const disablePublishSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'isPublishSidebarEnabled', false );\n\t};\n\n/**\n * Action that locks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * const { subscribe } = wp.data;\n *\n * const initialPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n *\n * // Only allow publishing posts that are set to a future date.\n * if ( 'publish' !== initialPostStatus ) {\n *\n * \t// Track locking.\n * \tlet locked = false;\n *\n * \t// Watch for the publish event.\n * \tlet unssubscribe = subscribe( () => {\n * \t\tconst currentPostStatus = wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' );\n * \t\tif ( 'publish' !== currentPostStatus ) {\n *\n * \t\t\t// Compare the post date to the current date, lock the post if the date isn't in the future.\n * \t\t\tconst postDate = new Date( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'date' ) );\n * \t\t\tconst currentDate = new Date();\n * \t\t\tif ( postDate.getTime() <= currentDate.getTime() ) {\n * \t\t\t\tif ( ! locked ) {\n * \t\t\t\t\tlocked = true;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).lockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t} else {\n * \t\t\t\tif ( locked ) {\n * \t\t\t\t\tlocked = false;\n * \t\t\t\t\twp.data.dispatch( 'core/editor' ).unlockPostSaving( 'futurelock' );\n * \t\t\t\t}\n * \t\t\t}\n * \t\t}\n * \t} );\n * }\n * ```\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 * Action that unlocks post saving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostSaving( 'mylock' );\n * ```\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/**\n * Action that locks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Lock post autosaving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).lockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function lockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'LOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Action that unlocks post autosaving.\n *\n * @param {string} lockName The lock name.\n *\n * @example\n * ```\n * // Unlock post saving with the lock key `mylock`:\n * wp.data.dispatch( 'core/editor' ).unlockPostAutosaving( 'mylock' );\n * ```\n *\n * @return {Object} Action object\n */\nexport function unlockPostAutosaving( lockName ) {\n\treturn {\n\t\ttype: 'UNLOCK_POST_AUTOSAVING',\n\t\tlockName,\n\t};\n}\n\n/**\n * Returns an action object used to signal that the blocks have been updated.\n *\n * @param {Array} blocks Block Array.\n * @param {Object} [options] Optional options.\n */\nexport const resetEditorBlocks =\n\t( blocks, options = {} ) =>\n\t( { select, dispatch, registry } ) => {\n\t\tconst { __unstableShouldCreateUndoLevel, selection } = options;\n\t\tconst edits = { blocks, selection };\n\n\t\tif ( __unstableShouldCreateUndoLevel !== false ) {\n\t\t\tconst { id, type } = select.getCurrentPost();\n\t\t\tconst noChange =\n\t\t\t\tregistry\n\t\t\t\t\t.select( coreStore )\n\t\t\t\t\t.getEditedEntityRecord( 'postType', type, id ).blocks ===\n\t\t\t\tedits.blocks;\n\t\t\tif ( noChange ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__unstableCreateUndoLevel( 'postType', type, id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// We create a new function here on every persistent edit\n\t\t\t// to make sure the edit makes the post dirty and creates\n\t\t\t// a new undo level.\n\t\t\tedits.content = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\t\t}\n\n\t\tdispatch.editPost( edits );\n\t};\n\n/*\n * Returns an action object used in signalling that the post 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 used to set the rendering mode of the post editor. We support multiple rendering modes:\n *\n * - `post-only`: This mode extracts the post blocks from the template and renders only those. The idea is to allow the user to edit the post/page in isolation without the wrapping template.\n * - `template-locked`: This mode renders both the template and the post blocks but the template blocks are locked and can't be edited. The post blocks are editable.\n *\n * @param {string} mode Mode (one of 'post-only' or 'template-locked').\n */\nexport const setRenderingMode =\n\t( mode ) =>\n\t( { dispatch, registry, select } ) => {\n\t\tif ( select.__unstableIsEditorReady() ) {\n\t\t\t// We clear the block selection but we also need to clear the selection from the core store.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\tdispatch.editPost( { selection: undefined }, { undoIgnore: true } );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_RENDERING_MODE',\n\t\t\tmode,\n\t\t} );\n\t};\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport function setDeviceType( deviceType ) {\n\treturn {\n\t\ttype: 'SET_DEVICE_TYPE',\n\t\tdeviceType,\n\t};\n}\n\n/**\n * Returns an action object used to enable or disable a panel in the editor.\n *\n * @param {string} panelName A string that identifies the panel to enable or disable.\n *\n * @return {Object} Action object.\n */\nexport const toggleEditorPanelEnabled =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst inactivePanels =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'inactivePanels' ) ?? [];\n\n\t\tconst isPanelInactive = !! inactivePanels?.includes( panelName );\n\n\t\t// If the panel is inactive, remove it to enable it, else add it to\n\t\t// make it inactive.\n\t\tlet updatedInactivePanels;\n\t\tif ( isPanelInactive ) {\n\t\t\tupdatedInactivePanels = inactivePanels.filter(\n\t\t\t\t( invactivePanelName ) => invactivePanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedInactivePanels = [ ...inactivePanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'inactivePanels', updatedInactivePanels );\n\t};\n\n/**\n * Opens a closed panel and closes an open panel.\n *\n * @param {string} panelName A string that identifies the panel to open or close.\n */\nexport const toggleEditorPanelOpened =\n\t( panelName ) =>\n\t( { registry } ) => {\n\t\tconst openPanels =\n\t\t\tregistry.select( preferencesStore ).get( 'core', 'openPanels' ) ??\n\t\t\t[];\n\n\t\tconst isPanelOpen = !! openPanels?.includes( panelName );\n\n\t\t// If the panel is open, remove it to close it, else add it to\n\t\t// make it open.\n\t\tlet updatedOpenPanels;\n\t\tif ( isPanelOpen ) {\n\t\t\tupdatedOpenPanels = openPanels.filter(\n\t\t\t\t( openPanelName ) => openPanelName !== panelName\n\t\t\t);\n\t\t} else {\n\t\t\tupdatedOpenPanels = [ ...openPanels, panelName ];\n\t\t}\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'openPanels', updatedOpenPanels );\n\t};\n\n/**\n * Returns an action object used to remove a panel from the editor.\n *\n * @param {string} panelName A string that identifies the panel to remove.\n *\n * @return {Object} Action object.\n */\nexport function removeEditorPanel( panelName ) {\n\treturn {\n\t\ttype: 'REMOVE_PANEL',\n\t\tpanelName,\n\t};\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @param {boolean|Object} value Whether the inserter should be\n * opened (true) or closed (false).\n * To specify an insertion point,\n * use an object.\n * @param {string} value.rootClientId The root client ID to insert at.\n * @param {number} value.insertionIndex The index to insert at.\n * @param {string} value.filterValue A query to filter the inserter results.\n * @param {Function} value.onSelect A callback when an item is selected.\n * @param {string} value.tab The tab to open in the inserter.\n * @param {string} value.category The category to initialize in the inserter.\n *\n * @return {Object} Action object.\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { dispatch, registry } ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\tvalue.hasOwnProperty( 'rootClientId' ) &&\n\t\t\tvalue.hasOwnProperty( 'insertionIndex' )\n\t\t) {\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).setInsertionPoint( {\n\t\t\t\trootClientId: value.rootClientId,\n\t\t\t\tindex: value.insertionIndex,\n\t\t\t} );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_IS_INSERTER_OPENED',\n\t\t\tvalue,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n * @return {Object} Action object.\n */\nexport function setIsListViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_LIST_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @param {Object} [options={}] Optional configuration object\n * @param {boolean} [options.createNotice=true] Whether to create a notice\n */\nexport const toggleDistractionFree =\n\t( { createNotice = true } = {} ) =>\n\t( { dispatch, registry } ) => {\n\t\tconst isDistractionFree = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'distractionFree' );\n\t\tif ( isDistractionFree ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'fixedToolbar', false );\n\t\t}\n\t\tif ( ! isDistractionFree ) {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t.set( 'core', 'fixedToolbar', true );\n\t\t\t\tdispatch.setIsInserterOpened( false );\n\t\t\t\tdispatch.setIsListViewOpened( false );\n\t\t\t\tunlock(\n\t\t\t\t\tregistry.dispatch( blockEditorStore )\n\t\t\t\t).resetZoomLevel();\n\t\t\t} );\n\t\t}\n\t\tregistry.batch( () => {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( 'core', 'distractionFree', ! isDistractionFree );\n\n\t\t\tif ( createNotice ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createInfoNotice(\n\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t? __( 'Distraction free mode deactivated.' )\n\t\t\t\t\t\t\t: __( 'Distraction free mode activated.' ),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tid: 'core/editor/distraction-free-mode/notice',\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\t\t\t\tisDistractionFree\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'distractionFree'\n\t\t\t\t\t\t\t\t\t\t\t\t);\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],\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t};\n\n/**\n * Action that toggles the Spotlight Mode view option.\n */\nexport const toggleSpotlightMode =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'focusMode' );\n\n\t\tconst isFocusMode = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'focusMode' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisFocusMode\n\t\t\t\t\t? __( 'Spotlight mode activated.' )\n\t\t\t\t\t: __( 'Spotlight mode deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-spotlight-mode/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'focusMode' );\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};\n\n/**\n * Action that toggles the Top Toolbar view option.\n */\nexport const toggleTopToolbar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).toggle( 'core', 'fixedToolbar' );\n\n\t\tconst isTopToolbar = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( 'core', 'fixedToolbar' );\n\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createInfoNotice(\n\t\t\t\tisTopToolbar\n\t\t\t\t\t? __( 'Top toolbar activated.' )\n\t\t\t\t\t: __( 'Top toolbar deactivated.' ),\n\t\t\t\t{\n\t\t\t\t\tid: 'core/editor/toggle-top-toolbar/notice',\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\n\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\tregistry\n\t\t\t\t\t\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t\t\t\t\t\t.toggle( 'core', 'fixedToolbar' );\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};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { dispatch, registry } ) => {\n\t\tregistry.dispatch( preferencesStore ).set( 'core', 'editorMode', mode );\n\n\t\tif ( mode !== 'visual' ) {\n\t\t\t// Unselect blocks when we switch to a non visual mode.\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t// Exit zoom out state when switching to a non visual mode.\n\t\t\tunlock( registry.dispatch( blockEditorStore ) ).resetZoomLevel();\n\t\t}\n\n\t\tif ( mode === 'visual' ) {\n\t\t\tspeak( __( 'Visual editor selected' ), 'assertive' );\n\t\t} else if ( mode === 'text' ) {\n\t\t\tconst isDistractionFree = registry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'distractionFree' );\n\t\t\tif ( isDistractionFree ) {\n\t\t\t\tdispatch.toggleDistractionFree();\n\t\t\t}\n\t\t\tspeak( __( 'Code editor selected' ), 'assertive' );\n\t\t}\n\t};\n\n/**\n * Returns an action object used in signalling that the user opened the publish\n * sidebar.\n *\n * @return {Object} Action object\n */\nexport function openPublishSidebar() {\n\treturn {\n\t\ttype: 'OPEN_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user closed the\n * publish sidebar.\n *\n * @return {Object} Action object.\n */\nexport function closePublishSidebar() {\n\treturn {\n\t\ttype: 'CLOSE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user toggles the publish sidebar.\n *\n * @return {Object} Action object\n */\nexport function togglePublishSidebar() {\n\treturn {\n\t\ttype: 'TOGGLE_PUBLISH_SIDEBAR',\n\t};\n}\n\n/**\n * Backward compatibility\n */\n\nconst getBlockEditorAction =\n\t( name ) =>\n\t( ...args ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"`wp.data.dispatch( 'core/editor' ).\" + name + '`', {\n\t\t\tsince: '5.3',\n\t\t\talternative:\n\t\t\t\t\"`wp.data.dispatch( 'core/block-editor' ).\" + name + '`',\n\t\t\tversion: '6.2',\n\t\t} );\n\t\tregistry.dispatch( blockEditorStore )[ name ]( ...args );\n\t};\n\n/**\n * @see resetBlocks in core/block-editor store.\n */\nexport const resetBlocks = getBlockEditorAction( 'resetBlocks' );\n\n/**\n * @see receiveBlocks in core/block-editor store.\n */\nexport const receiveBlocks = getBlockEditorAction( 'receiveBlocks' );\n\n/**\n * @see updateBlock in core/block-editor store.\n */\nexport const updateBlock = getBlockEditorAction( 'updateBlock' );\n\n/**\n * @see updateBlockAttributes in core/block-editor store.\n */\nexport const updateBlockAttributes = getBlockEditorAction(\n\t'updateBlockAttributes'\n);\n\n/**\n * @see selectBlock in core/block-editor store.\n */\nexport const selectBlock = getBlockEditorAction( 'selectBlock' );\n\n/**\n * @see startMultiSelect in core/block-editor store.\n */\nexport const startMultiSelect = getBlockEditorAction( 'startMultiSelect' );\n\n/**\n * @see stopMultiSelect in core/block-editor store.\n */\nexport const stopMultiSelect = getBlockEditorAction( 'stopMultiSelect' );\n\n/**\n * @see multiSelect in core/block-editor store.\n */\nexport const multiSelect = getBlockEditorAction( 'multiSelect' );\n\n/**\n * @see clearSelectedBlock in core/block-editor store.\n */\nexport const clearSelectedBlock = getBlockEditorAction( 'clearSelectedBlock' );\n\n/**\n * @see toggleSelection in core/block-editor store.\n */\nexport const toggleSelection = getBlockEditorAction( 'toggleSelection' );\n\n/**\n * @see replaceBlocks in core/block-editor store.\n */\nexport const replaceBlocks = getBlockEditorAction( 'replaceBlocks' );\n\n/**\n * @see replaceBlock in core/block-editor store.\n */\nexport const replaceBlock = getBlockEditorAction( 'replaceBlock' );\n\n/**\n * @see moveBlocksDown in core/block-editor store.\n */\nexport const moveBlocksDown = getBlockEditorAction( 'moveBlocksDown' );\n\n/**\n * @see moveBlocksUp in core/block-editor store.\n */\nexport const moveBlocksUp = getBlockEditorAction( 'moveBlocksUp' );\n\n/**\n * @see moveBlockToPosition in core/block-editor store.\n */\nexport const moveBlockToPosition = getBlockEditorAction(\n\t'moveBlockToPosition'\n);\n\n/**\n * @see insertBlock in core/block-editor store.\n */\nexport const insertBlock = getBlockEditorAction( 'insertBlock' );\n\n/**\n * @see insertBlocks in core/block-editor store.\n */\nexport const insertBlocks = getBlockEditorAction( 'insertBlocks' );\n\n/**\n * @see showInsertionPoint in core/block-editor store.\n */\nexport const showInsertionPoint = getBlockEditorAction( 'showInsertionPoint' );\n\n/**\n * @see hideInsertionPoint in core/block-editor store.\n */\nexport const hideInsertionPoint = getBlockEditorAction( 'hideInsertionPoint' );\n\n/**\n * @see setTemplateValidity in core/block-editor store.\n */\nexport const setTemplateValidity = getBlockEditorAction(\n\t'setTemplateValidity'\n);\n\n/**\n * @see synchronizeTemplate in core/block-editor store.\n */\nexport const synchronizeTemplate = getBlockEditorAction(\n\t'synchronizeTemplate'\n);\n\n/**\n * @see mergeBlocks in core/block-editor store.\n */\nexport const mergeBlocks = getBlockEditorAction( 'mergeBlocks' );\n\n/**\n * @see removeBlocks in core/block-editor store.\n */\nexport const removeBlocks = getBlockEditorAction( 'removeBlocks' );\n\n/**\n * @see removeBlock in core/block-editor store.\n */\nexport const removeBlock = getBlockEditorAction( 'removeBlock' );\n\n/**\n * @see toggleBlockMode in core/block-editor store.\n */\nexport const toggleBlockMode = getBlockEditorAction( 'toggleBlockMode' );\n\n/**\n * @see startTyping in core/block-editor store.\n */\nexport const startTyping = getBlockEditorAction( 'startTyping' );\n\n/**\n * @see stopTyping in core/block-editor store.\n */\nexport const stopTyping = getBlockEditorAction( 'stopTyping' );\n\n/**\n * @see enterFormattedText in core/block-editor store.\n */\nexport const enterFormattedText = getBlockEditorAction( 'enterFormattedText' );\n\n/**\n * @see exitFormattedText in core/block-editor store.\n */\nexport const exitFormattedText = getBlockEditorAction( 'exitFormattedText' );\n\n/**\n * @see insertDefaultBlock in core/block-editor store.\n */\nexport const insertDefaultBlock = getBlockEditorAction( 'insertDefaultBlock' );\n\n/**\n * @see updateBlockListSettings in core/block-editor store.\n */\nexport const updateBlockListSettings = getBlockEditorAction(\n\t'updateBlockListSettings'\n);\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Builds the arguments for a success notification dispatch.\n *\n * @param {Object} data Incoming data to build the arguments from.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveSuccess( data ) {\n\tconst { previousPost, post, postType } = data;\n\t// Autosaves are neither shown a notice nor redirected.\n\tif ( data.options?.isAutosave ) {\n\t\treturn [];\n\t}\n\n\tconst publishStatus = [ 'publish', 'private', 'future' ];\n\tconst isPublished = publishStatus.includes( previousPost.status );\n\tconst willPublish = publishStatus.includes( post.status );\n\tconst willTrash =\n\t\tpost.status === 'trash' && previousPost.status !== 'trash';\n\n\tlet noticeMessage;\n\tlet shouldShowLink = postType?.viewable ?? false;\n\tlet isDraft;\n\n\t// Always should a notice, which will be spoken for accessibility.\n\tif ( willTrash ) {\n\t\tnoticeMessage = postType.labels.item_trashed;\n\t\tshouldShowLink = false;\n\t} else if ( ! isPublished && ! willPublish ) {\n\t\t// If saving a non-published post, don't show notice.\n\t\tnoticeMessage = __( 'Draft saved.' );\n\t\tisDraft = true;\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\tconst actions = [];\n\tif ( shouldShowLink ) {\n\t\tactions.push( {\n\t\t\tlabel: isDraft ? __( 'View Preview' ) : postType.labels.view_item,\n\t\t\turl: post.link,\n\t\t} );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t\ttype: 'snackbar',\n\t\t\tactions,\n\t\t},\n\t];\n}\n\n/**\n * Builds the fail notification arguments for dispatch.\n *\n * @param {Object} data Incoming data to build the arguments with.\n *\n * @return {Array} Arguments for dispatch. An empty array signals no\n * notification should be sent.\n */\nexport function getNotificationArgumentsForSaveFail( data ) {\n\tconst { post, edits, error } = data;\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\tlet noticeMessage =\n\t\t! isPublished && publishStatus.indexOf( edits.status ) !== -1\n\t\t\t? messages[ edits.status ]\n\t\t\t: __( 'Updating failed.' );\n\n\t// Check if message string contains HTML. Notice text is currently only\n\t// supported as plaintext, and stripping the tags may muddle the meaning.\n\tif ( error.message && ! /<\\/?[^>]*>/.test( error.message ) ) {\n\t\tnoticeMessage = [ noticeMessage, error.message ].join( ' ' );\n\t}\n\treturn [\n\t\tnoticeMessage,\n\t\t{\n\t\t\tid: 'editor-save',\n\t\t},\n\t];\n}\n\n/**\n * Builds the trash fail notification arguments for dispatch.\n *\n * @param {Object} data\n *\n * @return {Array} Arguments for dispatch.\n */\nexport function getNotificationArgumentsForTrashFail( data ) {\n\treturn [\n\t\tdata.error.message && data.error.code !== 'unknown_error'\n\t\t\t? data.error.message\n\t\t\t: __( 'Trashing failed' ),\n\t\t{\n\t\t\tid: 'editor-trash-fail',\n\t\t},\n\t];\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../constants';\n\n// Copy of the function from packages/edit-site/src/utils/is-template-revertable.js\n\n/**\n * Check if a template or template part is revertable to its original theme-provided file.\n *\n * @param {Object} templateOrTemplatePart The entity to check.\n * @return {boolean} Whether the entity is revertable.\n */\nexport default function isTemplateRevertable( templateOrTemplatePart ) {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === TEMPLATE_ORIGINS.custom &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst external = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z\" />\n\t</SVG>\n);\n\nexport default external;\n","/**\n * WordPress dependencies\n */\nimport { external } from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../types';\n\nconst viewPost: Action< BasePost > = {\n\tid: 'view-post',\n\tlabel: _x( 'View', 'verb' ),\n\tisPrimary: true,\n\ticon: external,\n\tisEligible( post ) {\n\t\treturn post.status !== 'trash';\n\t},\n\tcallback( posts, { onActionPerformed } ) {\n\t\tconst post = posts[ 0 ];\n\t\twindow.open( post?.link, '_blank' );\n\t\tif ( onActionPerformed ) {\n\t\t\tonActionPerformed( posts );\n\t\t}\n\t},\n};\n\n/**\n * View post action for BasePost.\n */\nexport default viewPost;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs } from '@wordpress/url';\nimport { __, sprintf } from '@wordpress/i18n';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Post } from '../types';\n\nconst viewPostRevisions: Action< Post > = {\n\tid: 'view-post-revisions',\n\tcontext: 'list',\n\tlabel( items ) {\n\t\tconst revisionsCount =\n\t\t\titems[ 0 ]._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\treturn sprintf(\n\t\t\t/* translators: %s: number of revisions. */\n\t\t\t__( 'View revisions (%s)' ),\n\t\t\trevisionsCount\n\t\t);\n\t},\n\tisEligible( post ) {\n\t\tif ( post.status === 'trash' ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst lastRevisionId =\n\t\t\tpost?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\t\tconst revisionsCount =\n\t\t\tpost?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\treturn !! lastRevisionId && revisionsCount > 1;\n\t},\n\tcallback( posts, { onActionPerformed } ) {\n\t\tconst post = posts[ 0 ];\n\t\tconst href = addQueryArgs( 'revision.php', {\n\t\t\trevision: post?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id,\n\t\t} );\n\t\tdocument.location.href = href;\n\t\tif ( onActionPerformed ) {\n\t\t\tonActionPerformed( posts );\n\t\t}\n\t},\n};\n\n/**\n * View post revisions action for Post.\n */\nexport default viewPostRevisions;\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { NormalizedField } from '../../types';\n\ntype DataFormContextType< Item > = {\n\tfields: NormalizedField< Item >[];\n};\n\nconst DataFormContext = createContext< DataFormContextType< any > >( {\n\tfields: [],\n} );\n\nexport function DataFormProvider< Item >( {\n\tfields,\n\tchildren,\n}: React.PropsWithChildren< { fields: NormalizedField< Item >[] } > ) {\n\treturn (\n\t\t<DataFormContext.Provider value={ { fields } }>\n\t\t\t{ children }\n\t\t</DataFormContext.Provider>\n\t);\n}\n\nexport default DataFormContext;\n","/**\n * Internal dependencies\n */\nimport type { SortDirection, ValidationContext } from '../types';\n\nfunction sort( a: any, b: any, direction: SortDirection ) {\n\treturn direction === 'asc' ? a - b : b - a;\n}\n\nfunction isValid( value: any, context?: ValidationContext ) {\n\t// TODO: this implicitly means the value is required.\n\tif ( value === '' ) {\n\t\treturn false;\n\t}\n\n\tif ( ! Number.isInteger( Number( value ) ) ) {\n\t\treturn false;\n\t}\n\n\tif ( context?.elements ) {\n\t\tconst validValues = context?.elements.map( ( f ) => f.value );\n\t\tif ( ! validValues.includes( Number( value ) ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport default {\n\tsort,\n\tisValid,\n\tEdit: 'integer',\n};\n","/**\n * Internal dependencies\n */\nimport type { SortDirection, ValidationContext } from '../types';\n\nfunction sort( valueA: any, valueB: any, direction: SortDirection ) {\n\treturn direction === 'asc'\n\t\t? valueA.localeCompare( valueB )\n\t\t: valueB.localeCompare( valueA );\n}\n\nfunction isValid( value: any, context?: ValidationContext ) {\n\tif ( context?.elements ) {\n\t\tconst validValues = context?.elements?.map( ( f ) => f.value );\n\t\tif ( ! validValues.includes( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport default {\n\tsort,\n\tisValid,\n\tEdit: 'text',\n};\n","/**\n * Internal dependencies\n */\nimport type { SortDirection, ValidationContext } from '../types';\n\nfunction sort( a: any, b: any, direction: SortDirection ) {\n\tconst timeA = new Date( a ).getTime();\n\tconst timeB = new Date( b ).getTime();\n\n\treturn direction === 'asc' ? timeA - timeB : timeB - timeA;\n}\n\nfunction isValid( value: any, context?: ValidationContext ) {\n\tif ( context?.elements ) {\n\t\tconst validValues = context?.elements.map( ( f ) => f.value );\n\t\tif ( ! validValues.includes( value ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nexport default {\n\tsort,\n\tisValid,\n\tEdit: 'datetime',\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","/**\n * External dependencies\n */\nimport type { ComponentType } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tDataFormControlProps,\n\tField,\n\tFieldTypeDefinition,\n} from '../types';\nimport datetime from './datetime';\nimport integer from './integer';\nimport radio from './radio';\nimport select from './select';\nimport text from './text';\n\ninterface FormControls {\n\t[ key: string ]: ComponentType< DataFormControlProps< any > >;\n}\n\nconst FORM_CONTROLS: FormControls = {\n\tdatetime,\n\tinteger,\n\tradio,\n\tselect,\n\ttext,\n};\n\nexport function getControl< Item >(\n\tfield: Field< Item >,\n\tfieldTypeDefinition: FieldTypeDefinition< Item >\n) {\n\tif ( typeof field.Edit === 'function' ) {\n\t\treturn field.Edit;\n\t}\n\n\tif ( typeof field.Edit === 'string' ) {\n\t\treturn getControlByType( field.Edit );\n\t}\n\n\tif ( field.elements ) {\n\t\treturn getControlByType( 'select' );\n\t}\n\n\tif ( typeof fieldTypeDefinition.Edit === 'string' ) {\n\t\treturn getControlByType( fieldTypeDefinition.Edit );\n\t}\n\n\treturn fieldTypeDefinition.Edit;\n}\n\nexport function getControlByType( type: string ) {\n\tif ( Object.keys( FORM_CONTROLS ).includes( type ) ) {\n\t\treturn FORM_CONTROLS[ type ];\n\t}\n\n\tthrow 'Control ' + type + ' not found';\n}\n","/**\n * WordPress dependencies\n */\nimport { BaseControl, TimePicker, VisuallyHidden } from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormControlProps } from '../types';\n\nexport default function DateTime< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label } = field;\n\tconst value = field.getValue( { item: data } );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string | null ) => onChange( { [ id ]: newValue } ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<fieldset className=\"dataviews-controls__datetime\">\n\t\t\t{ ! hideLabelFromVision && (\n\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\t\t\t{ hideLabelFromVision && (\n\t\t\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t\t\t) }\n\t\t\t<TimePicker\n\t\t\t\tcurrentTime={ value }\n\t\t\t\tonChange={ onChangeControl }\n\t\t\t\thideLabelFromVision\n\t\t\t/>\n\t\t</fieldset>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalNumberControl as NumberControl } from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormControlProps } from '../types';\n\nexport default function Integer< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label, description } = field;\n\tconst value = field.getValue( { item: data } ) ?? '';\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string | undefined ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: Number( newValue ),\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<NumberControl\n\t\t\tlabel={ label }\n\t\t\thelp={ description }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChangeControl }\n\t\t\t__next40pxDefaultSize\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { RadioControl } from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormControlProps } from '../types';\n\nexport default function Radio< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label } = field;\n\tconst value = field.getValue( { item: data } );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\tif ( field.elements ) {\n\t\treturn (\n\t\t\t<RadioControl\n\t\t\t\tlabel={ label }\n\t\t\t\tonChange={ onChangeControl }\n\t\t\t\toptions={ field.elements }\n\t\t\t\tselected={ value }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormControlProps } from '../types';\n\nexport default function Select< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label } = field;\n\tconst value = field.getValue( { item: data } ) ?? '';\n\tconst onChangeControl = useCallback(\n\t\t( newValue: any ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\tconst elements = [\n\t\t/*\n\t\t * Value can be undefined when:\n\t\t *\n\t\t * - the field is not required\n\t\t * - in bulk editing\n\t\t *\n\t\t */\n\t\t{ label: __( 'Select item' ), value: '' },\n\t\t...( field?.elements ?? [] ),\n\t];\n\n\treturn (\n\t\t<SelectControl\n\t\t\tlabel={ label }\n\t\t\tvalue={ value }\n\t\t\toptions={ elements }\n\t\t\tonChange={ onChangeControl }\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { TextControl } from '@wordpress/components';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormControlProps } from '../types';\n\nexport default function Text< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label, placeholder } = field;\n\tconst value = field.getValue( { item: data } );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<TextControl\n\t\t\tlabel={ label }\n\t\t\tplaceholder={ placeholder }\n\t\t\tvalue={ value ?? '' }\n\t\t\tonChange={ onChangeControl }\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport getFieldTypeDefinition from './field-types';\nimport type { Field, NormalizedField } from './types';\nimport { getControl } from './dataform-controls';\n\nconst getValueFromId =\n\t( id: string ) =>\n\t( { item }: { item: any } ) => {\n\t\tconst path = id.split( '.' );\n\t\tlet value = item;\n\t\tfor ( const segment of path ) {\n\t\t\tif ( value.hasOwnProperty( segment ) ) {\n\t\t\t\tvalue = value[ segment ];\n\t\t\t} else {\n\t\t\t\tvalue = undefined;\n\t\t\t}\n\t\t}\n\n\t\treturn value;\n\t};\n\n/**\n * Apply default values and normalize the fields config.\n *\n * @param fields Fields config.\n * @return Normalized fields config.\n */\nexport function normalizeFields< Item >(\n\tfields: Field< Item >[]\n): NormalizedField< Item >[] {\n\treturn fields.map( ( field ) => {\n\t\tconst fieldTypeDefinition = getFieldTypeDefinition( field.type );\n\n\t\tconst getValue = field.getValue || getValueFromId( field.id );\n\n\t\tconst sort =\n\t\t\tfield.sort ??\n\t\t\tfunction sort( a, b, direction ) {\n\t\t\t\treturn fieldTypeDefinition.sort(\n\t\t\t\t\tgetValue( { item: a } ),\n\t\t\t\t\tgetValue( { item: b } ),\n\t\t\t\t\tdirection\n\t\t\t\t);\n\t\t\t};\n\n\t\tconst isValid =\n\t\t\tfield.isValid ??\n\t\t\tfunction isValid( item, context ) {\n\t\t\t\treturn fieldTypeDefinition.isValid(\n\t\t\t\t\tgetValue( { item } ),\n\t\t\t\t\tcontext\n\t\t\t\t);\n\t\t\t};\n\n\t\tconst Edit = getControl( field, fieldTypeDefinition );\n\n\t\tconst renderFromElements = ( { item }: { item: Item } ) => {\n\t\t\tconst value = getValue( { item } );\n\t\t\treturn (\n\t\t\t\tfield?.elements?.find( ( element ) => element.value === value )\n\t\t\t\t\t?.label || getValue( { item } )\n\t\t\t);\n\t\t};\n\n\t\tconst render =\n\t\t\tfield.render || ( field.elements ? renderFromElements : getValue );\n\n\t\treturn {\n\t\t\t...field,\n\t\t\tlabel: field.label || field.id,\n\t\t\theader: field.header || field.label || field.id,\n\t\t\tgetValue,\n\t\t\trender,\n\t\t\tsort,\n\t\t\tisValid,\n\t\t\tEdit,\n\t\t\tenableHiding: field.enableHiding ?? true,\n\t\t\tenableSorting: field.enableSorting ?? true,\n\t\t};\n\t} );\n}\n","/**\n * Internal dependencies\n */\nimport type { FieldType, SortDirection, ValidationContext } from '../types';\nimport { default as integer } from './integer';\nimport { default as text } from './text';\nimport { default as datetime } from './datetime';\n\n/**\n *\n * @param {FieldType} type The field type definition to get.\n *\n * @return A field type definition.\n */\nexport default function getFieldTypeDefinition( type?: FieldType ) {\n\tif ( 'integer' === type ) {\n\t\treturn integer;\n\t}\n\n\tif ( 'text' === type ) {\n\t\treturn text;\n\t}\n\n\tif ( 'datetime' === type ) {\n\t\treturn datetime;\n\t}\n\n\treturn {\n\t\tsort: ( a: any, b: any, direction: SortDirection ) => {\n\t\t\tif ( typeof a === 'number' && typeof b === 'number' ) {\n\t\t\t\treturn direction === 'asc' ? a - b : b - a;\n\t\t\t}\n\n\t\t\treturn direction === 'asc'\n\t\t\t\t? a.localeCompare( b )\n\t\t\t\t: b.localeCompare( a );\n\t\t},\n\t\tisValid: ( value: any, context?: ValidationContext ) => {\n\t\t\tif ( context?.elements ) {\n\t\t\t\tconst validValues = context?.elements?.map( ( f ) => f.value );\n\t\t\t\tif ( ! validValues.includes( value ) ) {\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\t\tEdit: () => null,\n\t};\n}\n","/**\n * Internal dependencies\n */\nimport type { FormField, CombinedFormField } from '../types';\n\nexport function isCombinedField(\n\tfield: FormField\n): field is CombinedFormField {\n\treturn ( field as CombinedFormField ).children !== undefined;\n}\n","/**\n * WordPress dependencies\n */\nimport { useContext, useMemo } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FieldLayoutProps } from '../../types';\nimport DataFormContext from '../../components/dataform-context';\nimport { DataFormLayout } from '../data-form-layout';\nimport { isCombinedField } from '../is-combined-field';\n\nfunction Header( { title }: { title: string } ) {\n\treturn (\n\t\t<VStack className=\"dataforms-layouts-regular__header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading level={ 2 } size={ 13 }>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t</HStack>\n\t\t</VStack>\n\t);\n}\n\nexport default function FormRegularField< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n\thideLabelFromVision,\n}: FieldLayoutProps< Item > ) {\n\tconst { fields } = useContext( DataFormContext );\n\n\tconst form = useMemo( () => {\n\t\tif ( isCombinedField( field ) ) {\n\t\t\treturn {\n\t\t\t\tfields: field.children.map( ( child ) => {\n\t\t\t\t\tif ( typeof child === 'string' ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: child,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} ),\n\t\t\t\ttype: 'regular' as const,\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\ttype: 'regular' as const,\n\t\t\tfields: [],\n\t\t};\n\t}, [ field ] );\n\n\tif ( isCombinedField( field ) ) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ ! hideLabelFromVision && field.label && (\n\t\t\t\t\t<Header title={ field.label } />\n\t\t\t\t) }\n\t\t\t\t<DataFormLayout\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tform={ form as Form }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n\n\tconst labelPosition = field.labelPosition ?? 'top';\n\tconst fieldDefinition = fields.find(\n\t\t( fieldDef ) => fieldDef.id === field.id\n\t);\n\n\tif ( ! fieldDefinition ) {\n\t\treturn null;\n\t}\n\tif ( labelPosition === 'side' ) {\n\t\treturn (\n\t\t\t<HStack className=\"dataforms-layouts-regular__field\">\n\t\t\t\t<div className=\"dataforms-layouts-regular__field-label\">\n\t\t\t\t\t{ fieldDefinition.label }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"dataforms-layouts-regular__field-control\">\n\t\t\t\t\t<fieldDefinition.Edit\n\t\t\t\t\t\tkey={ fieldDefinition.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ fieldDefinition }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</HStack>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"dataforms-layouts-regular__field\">\n\t\t\t<fieldDefinition.Edit\n\t\t\t\tdata={ data }\n\t\t\t\tfield={ fieldDefinition }\n\t\t\t\tonChange={ onChange }\n\t\t\t\thideLabelFromVision={\n\t\t\t\t\tlabelPosition === 'none' ? true : hideLabelFromVision\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst closeSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z\" />\n\t</SVG>\n);\n\nexport default closeSmall;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalSpacer as Spacer,\n\tDropdown,\n\tButton,\n} from '@wordpress/components';\nimport { sprintf, __, _x } from '@wordpress/i18n';\nimport { useState, useMemo, useContext } from '@wordpress/element';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tForm,\n\tFormField,\n\tFieldLayoutProps,\n\tNormalizedField,\n\tSimpleFormField,\n} from '../../types';\nimport DataFormContext from '../../components/dataform-context';\nimport { DataFormLayout } from '../data-form-layout';\nimport { isCombinedField } from '../is-combined-field';\n\nfunction DropdownHeader( {\n\ttitle,\n\tonClose,\n}: {\n\ttitle?: string;\n\tonClose: () => void;\n} ) {\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"dataforms-layouts-panel__dropdown-header\"\n\t\t\tspacing={ 4 }\n\t\t>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t{ title && (\n\t\t\t\t\t<Heading level={ 2 } size={ 13 }>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Heading>\n\t\t\t\t) }\n\t\t\t\t<Spacer />\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</VStack>\n\t);\n}\n\nfunction PanelDropdown< Item >( {\n\tfieldDefinition,\n\tpopoverAnchor,\n\tlabelPosition = 'side',\n\tdata,\n\tonChange,\n\tfield,\n}: {\n\tfieldDefinition: NormalizedField< Item >;\n\tpopoverAnchor: HTMLElement | null;\n\tlabelPosition: 'side' | 'top' | 'none';\n\tdata: Item;\n\tonChange: ( value: any ) => void;\n\tfield: FormField;\n} ) {\n\tconst fieldLabel = isCombinedField( field )\n\t\t? field.label\n\t\t: fieldDefinition?.label;\n\tconst form = useMemo( () => {\n\t\tif ( isCombinedField( field ) ) {\n\t\t\treturn {\n\t\t\t\ttype: 'regular' as const,\n\t\t\t\tfields: field.children.map( ( child ) => {\n\t\t\t\t\tif ( typeof child === 'string' ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: child,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} ),\n\t\t\t};\n\t\t}\n\t\t// If not explicit children return the field id itself.\n\t\treturn {\n\t\t\ttype: 'regular' as const,\n\t\t\tfields: [ { id: field.id } ],\n\t\t};\n\t}, [ field ] );\n\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"dataforms-layouts-panel__field-dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tfocusOnMount\n\t\t\ttoggleProps={ {\n\t\t\t\tsize: 'compact',\n\t\t\t\tvariant: 'tertiary',\n\t\t\t\ttooltipPosition: 'middle left',\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"dataforms-layouts-panel__field-control\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tvariant={\n\t\t\t\t\t\t[ 'none', 'top' ].includes( labelPosition )\n\t\t\t\t\t\t\t? 'link'\n\t\t\t\t\t\t\t: 'tertiary'\n\t\t\t\t\t}\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s: Field name.\n\t\t\t\t\t\t_x( 'Edit %s', 'field' ),\n\t\t\t\t\t\tfieldLabel\n\t\t\t\t\t) }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t>\n\t\t\t\t\t<fieldDefinition.render item={ data } />\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<DropdownHeader title={ fieldLabel } onClose={ onClose } />\n\t\t\t\t\t<DataFormLayout\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tform={ form as Form }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( FieldLayout, nestedField ) => (\n\t\t\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\t\t\tkey={ nestedField.id }\n\t\t\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\t\t\tfield={ nestedField }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t\thideLabelFromVision={\n\t\t\t\t\t\t\t\t\t( form?.fields ?? [] ).length < 2\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</DataFormLayout>\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default function FormPanelField< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n}: FieldLayoutProps< Item > ) {\n\tconst { fields } = useContext( DataFormContext );\n\tconst fieldDefinition = fields.find( ( fieldDef ) => {\n\t\t// Default to the first child if it is a combined field.\n\t\tif ( isCombinedField( field ) ) {\n\t\t\tconst children = field.children.filter(\n\t\t\t\t( child ): child is string | SimpleFormField =>\n\t\t\t\t\ttypeof child === 'string' || ! isCombinedField( child )\n\t\t\t);\n\t\t\tconst firstChildFieldId =\n\t\t\t\ttypeof children[ 0 ] === 'string'\n\t\t\t\t\t? children[ 0 ]\n\t\t\t\t\t: children[ 0 ].id;\n\t\t\treturn fieldDef.id === firstChildFieldId;\n\t\t}\n\t\treturn fieldDef.id === field.id;\n\t} );\n\tconst labelPosition = field.labelPosition ?? 'side';\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState< HTMLElement | null >(\n\t\tnull\n\t);\n\n\tif ( ! fieldDefinition ) {\n\t\treturn null;\n\t}\n\n\tconst fieldLabel = isCombinedField( field )\n\t\t? field.label\n\t\t: fieldDefinition?.label;\n\n\tif ( labelPosition === 'top' ) {\n\t\treturn (\n\t\t\t<VStack className=\"dataforms-layouts-panel__field\" spacing={ 0 }>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"dataforms-layouts-panel__field-label\"\n\t\t\t\t\tstyle={ { paddingBottom: 0 } }\n\t\t\t\t>\n\t\t\t\t\t{ fieldLabel }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"dataforms-layouts-panel__field-control\">\n\t\t\t\t\t<PanelDropdown\n\t\t\t\t\t\tfield={ field }\n\t\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\t\tfieldDefinition={ fieldDefinition }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t);\n\t}\n\n\tif ( labelPosition === 'none' ) {\n\t\treturn (\n\t\t\t<div className=\"dataforms-layouts-panel__field\">\n\t\t\t\t<PanelDropdown\n\t\t\t\t\tfield={ field }\n\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\tfieldDefinition={ fieldDefinition }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Defaults to label position side.\n\treturn (\n\t\t<HStack\n\t\t\tref={ setPopoverAnchor }\n\t\t\tclassName=\"dataforms-layouts-panel__field\"\n\t\t>\n\t\t\t<div className=\"dataforms-layouts-panel__field-label\">\n\t\t\t\t{ fieldLabel }\n\t\t\t</div>\n\t\t\t<div className=\"dataforms-layouts-panel__field-control\">\n\t\t\t\t<PanelDropdown\n\t\t\t\t\tfield={ field }\n\t\t\t\t\tpopoverAnchor={ popoverAnchor }\n\t\t\t\t\tfieldDefinition={ fieldDefinition }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</HStack>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport FormRegularField from './regular';\nimport FormPanelField from './panel';\n\nconst FORM_FIELD_LAYOUTS = [\n\t{\n\t\ttype: 'regular',\n\t\tcomponent: FormRegularField,\n\t},\n\t{\n\t\ttype: 'panel',\n\t\tcomponent: FormPanelField,\n\t},\n];\n\nexport function getFormFieldLayout( type: string ) {\n\treturn FORM_FIELD_LAYOUTS.find( ( layout ) => layout.type === type );\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, FormField, SimpleFormField } from '../types';\nimport { getFormFieldLayout } from './index';\nimport DataFormContext from '../components/dataform-context';\nimport { isCombinedField } from './is-combined-field';\nimport normalizeFormFields from '../normalize-form-fields';\n\nexport function DataFormLayout< Item >( {\n\tdata,\n\tform,\n\tonChange,\n\tchildren,\n}: {\n\tdata: Item;\n\tform: Form;\n\tonChange: ( value: any ) => void;\n\tchildren?: (\n\t\tFieldLayout: ( props: {\n\t\t\tdata: Item;\n\t\t\tfield: FormField;\n\t\t\tonChange: ( value: any ) => void;\n\t\t\thideLabelFromVision?: boolean;\n\t\t} ) => React.JSX.Element | null,\n\t\tfield: FormField\n\t) => React.JSX.Element;\n} ) {\n\tconst { fields: fieldDefinitions } = useContext( DataFormContext );\n\n\tfunction getFieldDefinition( field: SimpleFormField | string ) {\n\t\tconst fieldId = typeof field === 'string' ? field : field.id;\n\n\t\treturn fieldDefinitions.find(\n\t\t\t( fieldDefinition ) => fieldDefinition.id === fieldId\n\t\t);\n\t}\n\n\tconst normalizedFormFields = useMemo(\n\t\t() => normalizeFormFields( form ),\n\t\t[ form ]\n\t);\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t{ normalizedFormFields.map( ( formField ) => {\n\t\t\t\tconst FieldLayout = getFormFieldLayout( formField.layout )\n\t\t\t\t\t?.component;\n\n\t\t\t\tif ( ! FieldLayout ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tconst fieldDefinition = ! isCombinedField( formField )\n\t\t\t\t\t? getFieldDefinition( formField )\n\t\t\t\t\t: undefined;\n\n\t\t\t\tif (\n\t\t\t\t\tfieldDefinition &&\n\t\t\t\t\tfieldDefinition.isVisible &&\n\t\t\t\t\t! fieldDefinition.isVisible( data )\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tif ( children ) {\n\t\t\t\t\treturn children( FieldLayout, formField );\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<FieldLayout\n\t\t\t\t\t\tkey={ formField.id }\n\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\tfield={ formField }\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</VStack>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport type { Form } from './types';\n\ninterface NormalizedFormField {\n\tid: string;\n\tlayout: 'regular' | 'panel';\n\tlabelPosition: 'side' | 'top' | 'none';\n}\n\nexport default function normalizeFormFields(\n\tform: Form\n): NormalizedFormField[] {\n\tlet layout: 'regular' | 'panel' = 'regular';\n\tif ( [ 'regular', 'panel' ].includes( form.type ?? '' ) ) {\n\t\tlayout = form.type as 'regular' | 'panel';\n\t}\n\n\tconst labelPosition =\n\t\tform.labelPosition ?? ( layout === 'regular' ? 'top' : 'side' );\n\n\treturn ( form.fields ?? [] ).map( ( field ) => {\n\t\tif ( typeof field === 'string' ) {\n\t\t\treturn {\n\t\t\t\tid: field,\n\t\t\t\tlayout,\n\t\t\t\tlabelPosition,\n\t\t\t};\n\t\t}\n\n\t\tconst fieldLayout = field.layout ?? layout;\n\t\tconst fieldLabelPosition =\n\t\t\tfield.labelPosition ??\n\t\t\t( fieldLayout === 'regular' ? 'top' : 'side' );\n\t\treturn {\n\t\t\t...field,\n\t\t\tlayout: fieldLayout,\n\t\t\tlabelPosition: fieldLabelPosition,\n\t\t};\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { DataFormProps } from '../../types';\nimport { DataFormProvider } from '../dataform-context';\nimport { normalizeFields } from '../../normalize-fields';\nimport { DataFormLayout } from '../../dataforms-layouts/data-form-layout';\n\nexport default function DataForm< Item >( {\n\tdata,\n\tform,\n\tfields,\n\tonChange,\n}: DataFormProps< Item > ) {\n\tconst normalizedFields = useMemo(\n\t\t() => normalizeFields( fields ),\n\t\t[ fields ]\n\t);\n\n\tif ( ! form.fields ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DataFormProvider fields={ normalizedFields }>\n\t\t\t<DataFormLayout data={ data } form={ form } onChange={ onChange } />\n\t\t</DataFormProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport type { Post, TemplatePart, Template } from '../types';\n\nexport function isTemplate( post: Post ): post is Template {\n\treturn post.type === 'wp_template';\n}\n\nexport function isTemplatePart( post: Post ): post is TemplatePart {\n\treturn post.type === 'wp_template_part';\n}\n\nexport function isTemplateOrTemplatePart(\n\tp: Post\n): p is Template | TemplatePart {\n\treturn p.type === 'wp_template' || p.type === 'wp_template_part';\n}\n\nexport function getItemTitle( item: {\n\ttitle: string | { rendered: string } | { raw: string };\n} ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( item.title && 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( item.title && 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n\n/**\n * Check if a template is removable.\n *\n * @param template The template entity to check.\n * @return Whether the template is removable.\n */\nexport function isTemplateRemovable( template: Template | TemplatePart ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t// In patterns list page we map the templates parts to a different object\n\t// than the one returned from the endpoint. This is why we need to check for\n\t// two props whether is custom or has a theme file.\n\treturn (\n\t\t[ template.source, template.source ].includes( 'custom' ) &&\n\t\t! Boolean( template.type === 'wp_template' && template?.plugin ) &&\n\t\t! template.has_theme_file\n\t);\n}\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\n\nexport function BaseTitleView( {\n\titem,\n\tclassName,\n\tchildren,\n}: {\n\titem: CommonPost;\n\tclassName?: string;\n\tchildren?: ReactNode;\n} ) {\n\tconst renderedTitle = getItemTitle( item );\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ clsx( 'fields-field__title', className ) }\n\t\t\talignment=\"center\"\n\t\t\tjustify=\"flex-start\"\n\t\t>\n\t\t\t<span>{ renderedTitle || __( '(no title)' ) }</span>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n\nexport default function TitleView( { item }: { item: CommonPost } ) {\n\treturn <BaseTitleView item={ item } />;\n}\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from './view';\n\nconst titleField: Field< CommonPost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the any entity with a `title` property.\n * For patterns, pages or templates you should use the respective field\n * because there are some differences in the rendering, labels, etc.\n */\nexport default titleField;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport { DataForm } from '@wordpress/dataviews';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { titleField } from '../fields';\nimport type { BasePost, CoreDataError } from '../types';\nimport { getItemTitle } from './utils';\n\nconst fields = [ titleField ];\nconst formDuplicateAction = {\n\tfields: [ 'title' ],\n};\n\nconst duplicatePost: Action< BasePost > = {\n\tid: 'duplicate-post',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible( { status } ) {\n\t\treturn status !== 'trash';\n\t},\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ item, setItem ] = useState< BasePost >( {\n\t\t\t...items[ 0 ],\n\t\t\ttitle: sprintf(\n\t\t\t\t/* translators: %s: Existing post title */\n\t\t\t\t_x( '%s (Copy)', 'post' ),\n\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t),\n\t\t} );\n\n\t\tconst [ isCreatingPage, setIsCreatingPage ] = useState( false );\n\t\tconst { saveEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\n\t\tasync function createPage( event: React.FormEvent ) {\n\t\t\tevent.preventDefault();\n\n\t\t\tif ( isCreatingPage ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newItemObject = {\n\t\t\t\tstatus: 'draft',\n\t\t\t\ttitle: item.title,\n\t\t\t\tslug: item.title || __( 'No title' ),\n\t\t\t\tcomment_status: item.comment_status,\n\t\t\t\tcontent:\n\t\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t\t? item.content\n\t\t\t\t\t\t: item.content.raw,\n\t\t\t\texcerpt:\n\t\t\t\t\ttypeof item.excerpt === 'string'\n\t\t\t\t\t\t? item.excerpt\n\t\t\t\t\t\t: item.excerpt?.raw,\n\t\t\t\tmeta: item.meta,\n\t\t\t\tparent: item.parent,\n\t\t\t\tpassword: item.password,\n\t\t\t\ttemplate: item.template,\n\t\t\t\tformat: item.format,\n\t\t\t\tfeatured_media: item.featured_media,\n\t\t\t\tmenu_order: item.menu_order,\n\t\t\t\tping_status: item.ping_status,\n\t\t\t};\n\t\t\tconst assignablePropertiesPrefix = 'wp:action-assign-';\n\t\t\t// Get all the properties that the current user is able to assign normally author, categories, tags,\n\t\t\t// and custom taxonomies.\n\t\t\tconst assignableProperties = Object.keys( item?._links || {} )\n\t\t\t\t.filter( ( property ) =>\n\t\t\t\t\tproperty.startsWith( assignablePropertiesPrefix )\n\t\t\t\t)\n\t\t\t\t.map( ( property ) =>\n\t\t\t\t\tproperty.slice( assignablePropertiesPrefix.length )\n\t\t\t\t);\n\t\t\tassignableProperties.forEach( ( property ) => {\n\t\t\t\tif ( item.hasOwnProperty( property ) ) {\n\t\t\t\t\t// @ts-ignore\n\t\t\t\t\tnewItemObject[ property ] = item[ property ];\n\t\t\t\t}\n\t\t\t} );\n\t\t\tsetIsCreatingPage( true );\n\t\t\ttry {\n\t\t\t\tconst newItem = await saveEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\titem.type,\n\t\t\t\t\tnewItemObject,\n\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t);\n\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Title of the created post, e.g: \"Hello world\".\n\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\tdecodeEntities( newItem.title?.rendered || item.title )\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\tif ( onActionPerformed ) {\n\t\t\t\t\tonActionPerformed( [ newItem ] );\n\t\t\t\t}\n\t\t\t} catch ( error ) {\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: __( 'An error occurred while duplicating the page.' );\n\n\t\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t} finally {\n\t\t\t\tsetIsCreatingPage( false );\n\t\t\t\tcloseModal?.();\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<form onSubmit={ createPage }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<DataForm\n\t\t\t\t\t\tdata={ item }\n\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\tform={ formDuplicateAction }\n\t\t\t\t\t\tonChange={ ( changes ) =>\n\t\t\t\t\t\t\tsetItem( ( prev ) => ( {\n\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\t...changes,\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<HStack spacing={ 2 } justify=\"end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isCreatingPage }\n\t\t\t\t\t\t\taria-disabled={ isCreatingPage }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ _x( 'Duplicate', 'action label' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t);\n\t},\n};\n\n/**\n * Duplicate action for BasePost.\n */\nexport default duplicatePost;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst check = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z\" />\n\t</SVG>\n);\n\nexport default check;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(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)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(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++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { dotCase, Options } from \"dot-case\";\n\nexport { Options };\n\nexport function paramCase(input: string, options: Options = {}) {\n return dotCase(input, {\n delimiter: \"-\",\n ...options,\n });\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function dotCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \".\",\n ...options,\n });\n}\n","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\n\nexport const useExistingTemplateParts = () => {\n\treturn (\n\t\tuseSelect(\n\t\t\t( select ) =>\n\t\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t{\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t}\n\t\t\t\t),\n\t\t\t[]\n\t\t) ?? []\n\t);\n};\n\n/**\n * Return a unique template part title based on\n * the given title and existing template parts.\n *\n * @param {string} title The original template part title.\n * @param {Object} templateParts The array of template part entities.\n * @return {string} A unique template part title.\n */\nexport const getUniqueTemplatePartTitle = ( title, templateParts ) => {\n\tconst lowercaseTitle = title.toLowerCase();\n\tconst existingTitles = templateParts.map( ( templatePart ) =>\n\t\ttemplatePart.title.rendered.toLowerCase()\n\t);\n\n\tif ( ! existingTitles.includes( lowercaseTitle ) ) {\n\t\treturn title;\n\t}\n\n\tlet suffix = 2;\n\twhile ( existingTitles.includes( `${ lowercaseTitle } ${ suffix }` ) ) {\n\t\tsuffix++;\n\t}\n\n\treturn `${ title } ${ suffix }`;\n};\n\n/**\n * Get a valid slug for a template part.\n * Currently template parts only allow latin chars.\n * The fallback slug will receive suffix by default.\n *\n * @param {string} title The template part title.\n * @return {string} A valid template part slug.\n */\nexport const getCleanTemplatePartSlug = ( title ) => {\n\treturn kebabCase( title ).replace( /[^\\w-]+/g, '' ) || 'wp-custom-part';\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\tIcon,\n\tBaseControl,\n\tTextControl,\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport type { TemplatePartArea } from '@wordpress/core-data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tcheck,\n\tfooter as footerIcon,\n\theader as headerIcon,\n\tsidebar as sidebarIcon,\n\tsymbolFilled as symbolFilledIcon,\n} from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n// @ts-expect-error serialize is not typed\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetCleanTemplatePartSlug,\n\tgetUniqueTemplatePartTitle,\n\tuseExistingTemplateParts,\n} from './utils';\n\nfunction getAreaRadioId( value: string, instanceId: number ) {\n\treturn `fields-create-template-part-modal__area-option-${ value }-${ instanceId }`;\n}\nfunction getAreaRadioDescriptionId( value: string, instanceId: number ) {\n\treturn `fields-create-template-part-modal__area-option-description-${ value }-${ instanceId }`;\n}\n\ntype CreateTemplatePartModalContentsProps = {\n\tdefaultArea?: string;\n\tblocks: any[];\n\tconfirmLabel?: string;\n\tcloseModal: () => void;\n\tonCreate: ( templatePart: any ) => void;\n\tonError?: () => void;\n\tdefaultTitle?: string;\n};\n\n/**\n * A React component that renders a modal for creating a template part. The modal displays a title and the contents for creating the template part.\n * This component should not live in this package, it should be moved to a dedicated package responsible for managing template.\n * @param {Object} props The component props.\n * @param props.modalTitle\n */\nexport default function CreateTemplatePartModal( {\n\tmodalTitle,\n\t...restProps\n}: {\n\tmodalTitle: string;\n} & CreateTemplatePartModalContentsProps ) {\n\tconst defaultModalTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getPostType( 'wp_template_part' )?.labels\n\t\t\t\t?.add_new_item,\n\t\t[]\n\t);\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle || defaultModalTitle }\n\t\t\tonRequestClose={ restProps.closeModal }\n\t\t\toverlayClassName=\"fields-create-template-part-modal\"\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<CreateTemplatePartModalContents { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\nconst getTemplatePartIcon = ( iconName: string ) => {\n\tif ( 'header' === iconName ) {\n\t\treturn headerIcon;\n\t} else if ( 'footer' === iconName ) {\n\t\treturn footerIcon;\n\t} else if ( 'sidebar' === iconName ) {\n\t\treturn sidebarIcon;\n\t}\n\treturn symbolFilledIcon;\n};\n\n/**\n * A React component that renders the content of a model for creating a template part.\n * This component should not live in this package; it should be moved to a dedicated package responsible for managing template.\n *\n * @param {Object} props - The component props.\n * @param {string} [props.defaultArea=uncategorized] - The default area for the template part.\n * @param {Array} [props.blocks=[]] - The blocks to be included in the template part.\n * @param {string} [props.confirmLabel='Add'] - The label for the confirm button.\n * @param {Function} props.closeModal - Function to close the modal.\n * @param {Function} props.onCreate - Function to call when the template part is successfully created.\n * @param {Function} [props.onError] - Function to call when there is an error creating the template part.\n * @param {string} [props.defaultTitle=''] - The default title for the template part.\n */\nexport function CreateTemplatePartModalContents( {\n\tdefaultArea = 'uncategorized',\n\tblocks = [],\n\tconfirmLabel = __( 'Add' ),\n\tcloseModal,\n\tonCreate,\n\tonError,\n\tdefaultTitle = '',\n}: CreateTemplatePartModalContentsProps ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst existingTemplateParts = useExistingTemplateParts();\n\n\tconst [ title, setTitle ] = useState( defaultTitle );\n\tconst [ area, setArea ] = useState( defaultArea );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst instanceId = useInstanceId( CreateTemplatePartModal );\n\n\tconst defaultTemplatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord< {\n\t\t\t\tdefault_template_part_areas: Array< TemplatePartArea >;\n\t\t\t} >( 'root', '__unstableBase' )?.default_template_part_areas,\n\t\t[]\n\t);\n\n\tasync function createTemplatePart() {\n\t\tif ( ! title || isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tsetIsSubmitting( true );\n\t\t\tconst uniqueTitle = getUniqueTemplatePartTitle(\n\t\t\t\ttitle,\n\t\t\t\texistingTemplateParts\n\t\t\t);\n\t\t\tconst cleanSlug = getCleanTemplatePartSlug( uniqueTitle );\n\n\t\t\tconst templatePart = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_template_part',\n\t\t\t\t{\n\t\t\t\t\tslug: cleanSlug,\n\t\t\t\t\ttitle: uniqueTitle,\n\t\t\t\t\tcontent: serialize( blocks ),\n\t\t\t\t\tarea,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t\tawait onCreate( templatePart );\n\n\t\t\t// TODO: Add a success notice?\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror instanceof Error &&\n\t\t\t\t'code' in error &&\n\t\t\t\terror.message &&\n\t\t\t\terror.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while creating the template part.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\n\t\t\tonError?.();\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait createTemplatePart();\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"4\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\trequired\n\t\t\t\t/>\n\t\t\t\t<fieldset>\n\t\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t\t{ __( 'Area' ) }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t<div className=\"fields-create-template-part-modal__area-radio-group\">\n\t\t\t\t\t\t{ ( defaultTemplatePartAreas ?? [] ).map( ( item ) => {\n\t\t\t\t\t\t\tconst icon = getTemplatePartIcon( item.icon );\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ item.area }\n\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-wrapper\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\tid={ getAreaRadioId(\n\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tname={ `fields-create-template-part-modal__area-${ instanceId }` }\n\t\t\t\t\t\t\t\t\t\tvalue={ item.area }\n\t\t\t\t\t\t\t\t\t\tchecked={ area === item.area }\n\t\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\t\tsetArea( item.area );\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\taria-describedby={ getAreaRadioDescriptionId(\n\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\tinstanceId\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<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-icon\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\thtmlFor={ getAreaRadioId(\n\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\tinstanceId\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-label\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-checkmark\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<p\n\t\t\t\t\t\t\t\t\t\tclassName=\"fields-create-template-part-modal__area-radio-description\"\n\t\t\t\t\t\t\t\t\t\tid={ getAreaRadioDescriptionId(\n\t\t\t\t\t\t\t\t\t\t\titem.area,\n\t\t\t\t\t\t\t\t\t\t\tinstanceId\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\t{ item.description }\n\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t</div>\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</fieldset>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSubmitting }\n\t\t\t\t\t\tisBusy={ isSubmitting }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useMemo } from '@wordpress/element';\n// @ts-ignore\nimport { parse } from '@wordpress/blocks';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Post, TemplatePart } from '../types';\nimport { CreateTemplatePartModalContents } from '../components/create-template-part-modal';\nimport { getItemTitle } from './utils';\n\n/**\n * This action is used to duplicate a template part.\n */\nconst duplicateTemplatePart: Action< TemplatePart > = {\n\tid: 'duplicate-template-part',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible: ( item ) => item.type === 'wp_template_part',\n\tmodalHeader: _x( 'Duplicate template part', 'action label' ),\n\tRenderModal: ( { items, closeModal } ) => {\n\t\tconst [ item ] = items;\n\t\tconst blocks = useMemo( () => {\n\t\t\treturn (\n\t\t\t\titem.blocks ??\n\t\t\t\tparse(\n\t\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t\t? item.content\n\t\t\t\t\t\t: item.content.raw,\n\t\t\t\t\t{\n\t\t\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t}, [ item.content, item.blocks ] );\n\t\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\t\tfunction onTemplatePartSuccess( templatePart: Post ) {\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: The new template part's title e.g. 'Call to action (copy)'.\n\t\t\t\t\t_x( '\"%s\" duplicated.', 'template part' ),\n\t\t\t\t\tgetItemTitle( templatePart )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'edit-site-patterns-success' }\n\t\t\t);\n\t\t\tcloseModal?.();\n\t\t}\n\t\treturn (\n\t\t\t<CreateTemplatePartModalContents\n\t\t\t\tblocks={ blocks }\n\t\t\t\tdefaultArea={ item.area }\n\t\t\t\tdefaultTitle={ sprintf(\n\t\t\t\t\t/* translators: %s: Existing template part title */\n\t\t\t\t\t_x( '%s (Copy)', 'template part' ),\n\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t) }\n\t\t\t\tonCreate={ onTemplatePartSuccess }\n\t\t\t\tonError={ closeModal }\n\t\t\t\tconfirmLabel={ _x( 'Duplicate', 'action label' ) }\n\t\t\t\tcloseModal={ closeModal ?? ( () => {} ) }\n\t\t\t/>\n\t\t);\n\t},\n};\n/**\n * Duplicate action for TemplatePart.\n */\nexport default duplicateTemplatePart;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"patterns\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/fields'\n\t);\n","/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport type { Pattern } from '../types';\n\n// Patterns.\nconst { CreatePatternModalContents, useDuplicatePatternProps } =\n\tunlock( patternsPrivateApis );\n\nconst duplicatePattern: Action< Pattern > = {\n\tid: 'duplicate-pattern',\n\tlabel: _x( 'Duplicate', 'action label' ),\n\tisEligible: ( item ) => item.type !== 'wp_template_part',\n\tmodalHeader: _x( 'Duplicate pattern', 'action label' ),\n\tRenderModal: ( { items, closeModal } ) => {\n\t\tconst [ item ] = items;\n\t\tconst duplicatedProps = useDuplicatePatternProps( {\n\t\t\tpattern: item,\n\t\t\tonSuccess: () => closeModal?.(),\n\t\t} );\n\t\treturn (\n\t\t\t<CreatePatternModalContents\n\t\t\t\tonClose={ closeModal }\n\t\t\t\tconfirmLabel={ _x( 'Duplicate', 'action label' ) }\n\t\t\t\t{ ...duplicatedProps }\n\t\t\t/>\n\t\t);\n\t},\n};\n\n/**\n * Duplicate action for Pattern.\n */\nexport default duplicatePattern;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport {\n\tButton,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../lock-unlock';\nimport {\n\tgetItemTitle,\n\tisTemplateRemovable,\n\tisTemplate,\n\tisTemplatePart,\n} from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\n// Patterns.\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\nconst renamePost: Action< PostWithPermissions > = {\n\tid: 'rename-post',\n\tlabel: __( 'Rename' ),\n\tisEligible( post ) {\n\t\tif ( post.status === 'trash' ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Templates, template parts and patterns have special checks for renaming.\n\t\tif (\n\t\t\t! [\n\t\t\t\t'wp_template',\n\t\t\t\t'wp_template_part',\n\t\t\t\t...Object.values( PATTERN_TYPES ),\n\t\t\t].includes( post.type )\n\t\t) {\n\t\t\treturn post.permissions?.update;\n\t\t}\n\n\t\t// In the case of templates, we can only rename custom templates.\n\t\tif ( isTemplate( post ) ) {\n\t\t\treturn (\n\t\t\t\tisTemplateRemovable( post ) &&\n\t\t\t\tpost.is_custom &&\n\t\t\t\tpost.permissions?.update\n\t\t\t);\n\t\t}\n\n\t\tif ( isTemplatePart( post ) ) {\n\t\t\treturn (\n\t\t\t\tpost.source === 'custom' &&\n\t\t\t\t! post?.has_theme_file &&\n\t\t\t\tpost.permissions?.update\n\t\t\t);\n\t\t}\n\n\t\treturn post.type === PATTERN_TYPES.user && post.permissions?.update;\n\t},\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ item ] = items;\n\t\tconst [ title, setTitle ] = useState( () => getItemTitle( item ) );\n\t\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\t\tuseDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\n\t\tasync function onRename( event: React.FormEvent ) {\n\t\t\tevent.preventDefault();\n\t\t\ttry {\n\t\t\t\tawait editEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\t\ttitle,\n\t\t\t\t} );\n\t\t\t\t// Update state before saving rerenders the list.\n\t\t\t\tsetTitle( '' );\n\t\t\t\tcloseModal?.();\n\t\t\t\t// Persist edited entity.\n\t\t\t\tawait saveEditedEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t\tcreateSuccessNotice( __( 'Name updated' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\tonActionPerformed?.( items );\n\t\t\t} catch ( error ) {\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: __( 'An error occurred while updating the name' );\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<form onSubmit={ onRename }>\n\t\t\t\t<VStack spacing=\"5\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t);\n\t},\n};\n\n/**\n * Rename action for PostWithPermissions.\n */\nexport default renamePost;\n","/**\n * Internal dependencies\n */\nimport { normalizeFields } from './normalize-fields';\nimport type { Field, Form } from './types';\n\n/**\n * Whether or not the given item's value is valid according to the fields and form config.\n *\n * @param item The item to validate.\n * @param fields Fields config.\n * @param form Form config.\n *\n * @return A boolean indicating if the item is valid (true) or not (false).\n */\nexport function isItemValid< Item >(\n\titem: Item,\n\tfields: Field< Item >[],\n\tform: Form\n): boolean {\n\tconst _fields = normalizeFields(\n\t\tfields.filter( ( { id } ) => !! form.fields?.includes( id ) )\n\t);\n\treturn _fields.every( ( field ) => {\n\t\treturn field.isValid( item, { elements: field.elements } );\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst orderField: Field< BasePost > = {\n\tid: 'menu_order',\n\ttype: 'integer',\n\tlabel: __( 'Order' ),\n\tdescription: __( 'Determines the order of pages.' ),\n};\n\n/**\n * Order field for BasePost.\n */\nexport default orderField;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport { DataForm, isItemValid } from '@wordpress/dataviews';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action, RenderModalProps } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, BasePost } from '../types';\nimport { orderField } from '../fields';\n\nconst fields = [ orderField ];\nconst formOrderAction = {\n\tfields: [ 'menu_order' ],\n};\n\nfunction ReorderModal( {\n\titems,\n\tcloseModal,\n\tonActionPerformed,\n}: RenderModalProps< BasePost > ) {\n\tconst [ item, setItem ] = useState( items[ 0 ] );\n\tconst orderInput = item.menu_order;\n\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\tuseDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onOrder( event: React.FormEvent ) {\n\t\tevent.preventDefault();\n\n\t\tif ( ! isItemValid( item, fields, formOrderAction ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait editEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\tmenu_order: orderInput,\n\t\t\t} );\n\t\t\tcloseModal?.();\n\t\t\t// Persist edited entity.\n\t\t\tawait saveEditedEntityRecord( 'postType', item.type, item.id, {\n\t\t\t\tthrowOnError: true,\n\t\t\t} );\n\t\t\tcreateSuccessNotice( __( 'Order updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\tonActionPerformed?.( items );\n\t\t} catch ( error ) {\n\t\t\tconst typedError = error as CoreDataError;\n\t\t\tconst errorMessage =\n\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t? typedError.message\n\t\t\t\t\t: __( 'An error occurred while updating the order' );\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t}\n\tconst isSaveDisabled = ! isItemValid( item, fields, formOrderAction );\n\treturn (\n\t\t<form onSubmit={ onOrder }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<div>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Determines the order of pages. Pages with the same order value are sorted alphabetically. Negative order values are supported.'\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<DataForm\n\t\t\t\t\tdata={ item }\n\t\t\t\t\tfields={ fields }\n\t\t\t\t\tform={ formOrderAction }\n\t\t\t\t\tonChange={ ( changes ) =>\n\t\t\t\t\t\tsetItem( {\n\t\t\t\t\t\t\t...item,\n\t\t\t\t\t\t\t...changes,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tdisabled={ isSaveDisabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nconst reorderPage: Action< BasePost > = {\n\tid: 'order-pages',\n\tlabel: __( 'Order' ),\n\tisEligible( { status } ) {\n\t\treturn status !== 'trash';\n\t},\n\tRenderModal: ReorderModal,\n};\n\n/**\n * Reorder action for BasePost.\n */\nexport default reorderPage;\n","\"stream\"in Blob.prototype||Object.defineProperty(Blob.prototype,\"stream\",{value(){return new Response(this).body}}),\"setBigUint64\"in DataView.prototype||Object.defineProperty(DataView.prototype,\"setBigUint64\",{value(e,n,t){const i=Number(0xffffffffn&n),r=Number(n>>32n);this.setUint32(e+(t?0:4),i,t),this.setUint32(e+(t?4:0),r,t)}});var e=e=>new DataView(new ArrayBuffer(e)),n=e=>new Uint8Array(e.buffer||e),t=e=>(new TextEncoder).encode(String(e)),i=e=>Math.min(4294967295,Number(e)),r=e=>Math.min(65535,Number(e));function f(e,i){if(void 0===i||i instanceof Date||(i=new Date(i)),e instanceof File)return{isFile:1,t:i||new Date(e.lastModified),i:e.stream()};if(e instanceof Response)return{isFile:1,t:i||new Date(e.headers.get(\"Last-Modified\")||Date.now()),i:e.body};if(void 0===i)i=new Date;else if(isNaN(i))throw new Error(\"Invalid modification date.\");if(void 0===e)return{isFile:0,t:i};if(\"string\"==typeof e)return{isFile:1,t:i,i:t(e)};if(e instanceof Blob)return{isFile:1,t:i,i:e.stream()};if(e instanceof Uint8Array||e instanceof ReadableStream)return{isFile:1,t:i,i:e};if(e instanceof ArrayBuffer||ArrayBuffer.isView(e))return{isFile:1,t:i,i:n(e)};if(Symbol.asyncIterator in e)return{isFile:1,t:i,i:o(e[Symbol.asyncIterator]())};throw new TypeError(\"Unsupported input format.\")}function o(e,n=e){return new ReadableStream({async pull(n){let t=0;for(;n.desiredSize>t;){const i=await e.next();if(!i.value){n.close();break}{const e=a(i.value);n.enqueue(e),t+=e.byteLength}}},cancel(e){n.throw?.(e)}})}function a(e){return\"string\"==typeof e?t(e):e instanceof Uint8Array?e:n(e)}function s(e,i,r){let[f,o]=function(e){return e?e instanceof Uint8Array?[e,1]:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?[n(e),1]:[t(e),0]:[void 0,0]}(i);if(e instanceof File)return{o:d(f||t(e.name)),u:BigInt(e.size),l:o};if(e instanceof Response){const n=e.headers.get(\"content-disposition\"),i=n&&n.match(/;\\s*filename\\*?=[\"']?(.*?)[\"']?$/i),a=i&&i[1]||e.url&&new URL(e.url).pathname.split(\"/\").findLast(Boolean),s=a&&decodeURIComponent(a),u=r||+e.headers.get(\"content-length\");return{o:d(f||t(s)),u:BigInt(u),l:o}}return f=d(f,void 0!==e||void 0!==r),\"string\"==typeof e?{o:f,u:BigInt(t(e).length),l:o}:e instanceof Blob?{o:f,u:BigInt(e.size),l:o}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{o:f,u:BigInt(e.byteLength),l:o}:{o:f,u:u(e,r),l:o}}function u(e,n){return n>-1?BigInt(n):e?void 0:0n}function d(e,n=1){if(!e||e.every((c=>47===c)))throw new Error(\"The file must have a name.\");if(n)for(;47===e[e.length-1];)e=e.subarray(0,-1);else 47!==e[e.length-1]&&(e=new Uint8Array([...e,47]));return e}var l=new Uint32Array(256);for(let e=0;e<256;++e){let n=e;for(let e=0;e<8;++e)n=n>>>1^(1&n&&3988292384);l[e]=n}function y(e,n=0){n^=-1;for(var t=0,i=e.length;t<i;t++)n=n>>>8^l[255&n^e[t]];return(-1^n)>>>0}function w(e,n,t=0){const i=e.getSeconds()>>1|e.getMinutes()<<5|e.getHours()<<11,r=e.getDate()|e.getMonth()+1<<5|e.getFullYear()-1980<<9;n.setUint16(t,i,1),n.setUint16(t+2,r,1)}function B({o:e,l:n},t){return 8*(!n||(t??function(e){try{b.decode(e)}catch{return 0}return 1}(e)))}var b=new TextDecoder(\"utf8\",{fatal:1});function p(t,i=0){const r=e(30);return r.setUint32(0,1347093252),r.setUint32(4,754976768|i),w(t.t,r,10),r.setUint16(26,t.o.length,1),n(r)}async function*g(e){let{i:n}=e;if(\"then\"in n&&(n=await n),n instanceof Uint8Array)yield n,e.m=y(n,0),e.u=BigInt(n.length);else{e.u=0n;const t=n.getReader();for(;;){const{value:n,done:i}=await t.read();if(i)break;e.m=y(n,e.m),e.u+=BigInt(n.length),yield n}}}function I(t,r){const f=e(16+(r?8:0));return f.setUint32(0,1347094280),f.setUint32(4,t.isFile?t.m:0,1),r?(f.setBigUint64(8,t.u,1),f.setBigUint64(16,t.u,1)):(f.setUint32(8,i(t.u),1),f.setUint32(12,i(t.u),1)),n(f)}function v(t,r,f=0,o=0){const a=e(46);return a.setUint32(0,1347092738),a.setUint32(4,755182848),a.setUint16(8,2048|f),w(t.t,a,12),a.setUint32(16,t.isFile?t.m:0,1),a.setUint32(20,i(t.u),1),a.setUint32(24,i(t.u),1),a.setUint16(28,t.o.length,1),a.setUint16(30,o,1),a.setUint16(40,t.isFile?33204:16893,1),a.setUint32(42,i(r),1),n(a)}function h(t,i,r){const f=e(r);return f.setUint16(0,1,1),f.setUint16(2,r-4,1),16&r&&(f.setBigUint64(4,t.u,1),f.setBigUint64(12,t.u,1)),f.setBigUint64(r-8,i,1),n(f)}function D(e){return e instanceof File||e instanceof Response?[[e],[e]]:[[e.input,e.name,e.size],[e.input,e.lastModified]]}var S=e=>function(e){let n=BigInt(22),t=0n,i=0;for(const r of e){if(!r.o)throw new Error(\"Every file must have a non-empty name.\");if(void 0===r.u)throw new Error(`Missing size for file \"${(new TextDecoder).decode(r.o)}\".`);const e=r.u>=0xffffffffn,f=t>=0xffffffffn;t+=BigInt(46+r.o.length+(e&&8))+r.u,n+=BigInt(r.o.length+46+(12*f|28*e)),i||(i=e)}return(i||t>=0xffffffffn)&&(n+=BigInt(76)),n+t}(function*(e){for(const n of e)yield s(...D(n)[0])}(e));function A(e,n={}){const t={\"Content-Type\":\"application/zip\",\"Content-Disposition\":\"attachment\"};return(\"bigint\"==typeof n.length||Number.isInteger(n.length))&&n.length>0&&(t[\"Content-Length\"]=String(n.length)),n.metadata&&(t[\"Content-Length\"]=String(S(n.metadata))),new Response(N(e,n),{headers:t})}function N(t,a={}){const u=function(e){const n=e[Symbol.iterator in e?Symbol.iterator:Symbol.asyncIterator]();return{async next(){const e=await n.next();if(e.done)return e;const[t,i]=D(e.value);return{done:0,value:Object.assign(f(...i),s(...t))}},throw:n.throw?.bind(n),[Symbol.asyncIterator](){return this}}}(t);return o(async function*(t,f){const o=[];let a=0n,s=0n,u=0;for await(const e of t){const n=B(e,f.buffersAreUTF8);yield p(e,n),yield new Uint8Array(e.o),e.isFile&&(yield*g(e));const t=e.u>=0xffffffffn,i=12*(a>=0xffffffffn)|28*t;yield I(e,t),o.push(v(e,a,n,i)),o.push(e.o),i&&o.push(h(e,a,i)),t&&(a+=8n),s++,a+=BigInt(46+e.o.length)+e.u,u||(u=t)}let d=0n;for(const e of o)yield e,d+=BigInt(e.length);if(u||a>=0xffffffffn){const t=e(76);t.setUint32(0,1347094022),t.setBigUint64(4,BigInt(44),1),t.setUint32(12,755182848),t.setBigUint64(24,s,1),t.setBigUint64(32,s,1),t.setBigUint64(40,d,1),t.setBigUint64(48,a,1),t.setUint32(56,1347094023),t.setBigUint64(64,a+d,1),t.setUint32(72,1,1),yield n(t)}const l=e(22);l.setUint32(0,1347093766),l.setUint16(8,r(s),1),l.setUint16(10,r(s),1),l.setUint32(12,i(d),1),l.setUint32(16,i(a),1),yield n(l)}(u,a),u)}export{A as downloadZip,N as makeZip,S as predictLength};","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blob\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst download = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z\" />\n\t</SVG>\n);\n\nexport default download;\n","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\nimport { downloadZip } from 'client-zip';\n\n/**\n * WordPress dependencies\n */\nimport { downloadBlob } from '@wordpress/blob';\nimport { __ } from '@wordpress/i18n';\nimport { download } from '@wordpress/icons';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../types';\nimport { getItemTitle } from './utils';\n\nfunction getJsonFromItem( item: Pattern ) {\n\treturn JSON.stringify(\n\t\t{\n\t\t\t__file: item.type,\n\t\t\ttitle: getItemTitle( item ),\n\t\t\tcontent:\n\t\t\t\ttypeof item.content === 'string'\n\t\t\t\t\t? item.content\n\t\t\t\t\t: item.content?.raw,\n\t\t\tsyncStatus: item.wp_pattern_sync_status,\n\t\t},\n\t\tnull,\n\t\t2\n\t);\n}\n\nconst exportPattern: Action< Pattern > = {\n\tid: 'export-pattern',\n\tlabel: __( 'Export as JSON' ),\n\ticon: download,\n\tsupportsBulk: true,\n\tisEligible: ( item ) => item.type === 'wp_block',\n\tcallback: async ( items ) => {\n\t\tif ( items.length === 1 ) {\n\t\t\treturn downloadBlob(\n\t\t\t\t`${ kebabCase(\n\t\t\t\t\tgetItemTitle( items[ 0 ] ) || items[ 0 ].slug\n\t\t\t\t) }.json`,\n\t\t\t\tgetJsonFromItem( items[ 0 ] ),\n\t\t\t\t'application/json'\n\t\t\t);\n\t\t}\n\t\tconst nameCount: Record< string, number > = {};\n\t\tconst filesToZip = items.map( ( item ) => {\n\t\t\tconst name = kebabCase( getItemTitle( item ) || item.slug );\n\t\t\tnameCount[ name ] = ( nameCount[ name ] || 0 ) + 1;\n\t\t\treturn {\n\t\t\t\tname: `${\n\t\t\t\t\tname +\n\t\t\t\t\t( nameCount[ name ] > 1\n\t\t\t\t\t\t? '-' + ( nameCount[ name ] - 1 )\n\t\t\t\t\t\t: '' )\n\t\t\t\t}.json`,\n\t\t\t\tlastModified: new Date(),\n\t\t\t\tinput: getJsonFromItem( item ),\n\t\t\t};\n\t\t} );\n\t\treturn downloadBlob(\n\t\t\t__( 'patterns-export' ) + '.zip',\n\t\t\tawait downloadZip( filesToZip ).blob(),\n\t\t\t'application/zip'\n\t\t);\n\t},\n};\n\n/**\n * Export action as JSON for Pattern.\n */\nexport default exportPattern;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst backup = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z\" />\n\t</SVG>\n);\n\nexport default backup;\n","/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst restorePost: Action< PostWithPermissions > = {\n\tid: 'restore',\n\tlabel: __( 'Restore' ),\n\tisPrimary: true,\n\ticon: backup,\n\tsupportsBulk: true,\n\tisEligible( item ) {\n\t\treturn (\n\t\t\t! isTemplateOrTemplatePart( item ) &&\n\t\t\titem.type !== 'wp_block' &&\n\t\t\titem.status === 'trash' &&\n\t\t\titem.permissions?.update\n\t\t);\n\t},\n\tasync callback( posts, { registry, onActionPerformed } ) {\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tregistry.dispatch( noticesStore );\n\t\tconst { editEntityRecord, saveEditedEntityRecord } =\n\t\t\tregistry.dispatch( coreStore );\n\t\tawait Promise.allSettled(\n\t\t\tposts.map( ( post ) => {\n\t\t\t\treturn editEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\t\tstatus: 'draft',\n\t\t\t\t} );\n\t\t\t} )\n\t\t);\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\tposts.map( ( post ) => {\n\t\t\t\treturn saveEditedEntityRecord( 'postType', post.type, post.id, {\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t} );\n\t\t\t} )\n\t\t);\n\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\t\t\tif ( posts.length === 1 ) {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: The number of posts. */\n\t\t\t\t\t__( '\"%s\" has been restored.' ),\n\t\t\t\t\tgetItemTitle( posts[ 0 ] )\n\t\t\t\t);\n\t\t\t} else if ( posts[ 0 ].type === 'page' ) {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: The number of posts. */\n\t\t\t\t\t__( '%d pages have been restored.' ),\n\t\t\t\t\tposts.length\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t/* translators: The number of posts. */\n\t\t\t\t\t__( '%d posts have been restored.' ),\n\t\t\t\t\tposts.length\n\t\t\t\t);\n\t\t\t}\n\t\t\tcreateSuccessNotice( successMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tid: 'restore-post-action',\n\t\t\t} );\n\t\t\tif ( onActionPerformed ) {\n\t\t\t\tonActionPerformed( posts );\n\t\t\t}\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to move a single post to the trash.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t};\n\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\terrorMessage = typedError.reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while restoring the post.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// If we were trying to move multiple posts to the trash\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t};\n\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( typedError.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while restoring the posts.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t__( 'An error occurred while restoring the posts: %s' ),\n\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Some errors occurred while restoring the posts: %s'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t}\n\t},\n};\n\n/**\n * Restore action for PostWithPermissions.\n */\nexport default restorePost;\n","/**\n * WordPress dependencies\n */\nimport { backup } from '@wordpress/icons';\nimport { dispatch, select, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\n// @ts-ignore\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, Template, TemplatePart } from '../types';\n\nconst isTemplateRevertable = (\n\ttemplateOrTemplatePart: Template | TemplatePart\n) => {\n\tif ( ! templateOrTemplatePart ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplateOrTemplatePart.source === 'custom' &&\n\t\t( Boolean( templateOrTemplatePart?.plugin ) ||\n\t\t\ttemplateOrTemplatePart?.has_theme_file )\n\t);\n};\n\n/**\n * Copied - pasted from https://github.com/WordPress/gutenberg/blob/bf1462ad37d4637ebbf63270b9c244b23c69e2a8/packages/editor/src/store/private-actions.js#L233-L365\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nconst revertTemplate = async (\n\ttemplate: TemplatePart | Template,\n\t{ allowUndo = true } = {}\n) => {\n\tconst noticeId = 'edit-site-template-reverted';\n\tdispatch( noticesStore ).removeNotice( noticeId );\n\tif ( ! isTemplateRevertable( template ) ) {\n\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t__( 'This template is not revertable.' ),\n\t\t\t{\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t\treturn;\n\t}\n\n\ttry {\n\t\tconst templateEntityConfig = select( coreStore ).getEntityConfig(\n\t\t\t'postType',\n\t\t\ttemplate.type\n\t\t);\n\n\t\tif ( ! templateEntityConfig ) {\n\t\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t\t__(\n\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar' }\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t{ context: 'edit', source: template.origin }\n\t\t);\n\n\t\tconst fileTemplate = ( await apiFetch( {\n\t\t\tpath: fileTemplatePath,\n\t\t} ) ) as any;\n\t\tif ( ! fileTemplate ) {\n\t\t\tdispatch( noticesStore ).createErrorNotice(\n\t\t\t\t__(\n\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar' }\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tconst serializeBlocks = ( { blocks: blocksForSerialization = [] } ) =>\n\t\t\t__unstableSerializeAndClean( blocksForSerialization );\n\n\t\tconst edited = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\ttemplate.id\n\t\t) as any;\n\n\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t// the revert in the header toolbar correctly.\n\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\ttemplate.id,\n\t\t\t{\n\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t},\n\t\t\t{\n\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t}\n\t\t);\n\n\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\n\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\ttemplate.type,\n\t\t\tfileTemplate.id,\n\t\t\t{\n\t\t\t\tcontent: serializeBlocks,\n\t\t\t\tblocks,\n\t\t\t\tsource: 'theme',\n\t\t\t}\n\t\t);\n\n\t\tif ( allowUndo ) {\n\t\t\tconst undoRevert = () => {\n\t\t\t\tdispatch( coreStore ).editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\tedited.id,\n\t\t\t\t\t{\n\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tdispatch( noticesStore ).createSuccessNotice(\n\t\t\t\t__( 'Template reset.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: noticeId,\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick: undoRevert,\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} catch ( error: any ) {\n\t\tconst errorMessage =\n\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t? error.message\n\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\n\t\tdispatch( noticesStore ).createErrorNotice( errorMessage, {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n};\n\nconst resetPostAction: Action< Template | TemplatePart > = {\n\tid: 'reset-post',\n\tlabel: __( 'Reset' ),\n\tisEligible: ( item ) => {\n\t\treturn (\n\t\t\tisTemplateOrTemplatePart( item ) &&\n\t\t\titem?.source === 'custom' &&\n\t\t\t( Boolean( item.type === 'wp_template' && item?.plugin ) ||\n\t\t\t\titem?.has_theme_file )\n\t\t);\n\t},\n\ticon: backup,\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\t\tconst { saveEditedEntityRecord } = useDispatch( coreStore );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst onConfirm = async () => {\n\t\t\ttry {\n\t\t\t\tfor ( const template of items ) {\n\t\t\t\t\tawait revertTemplate( template, {\n\t\t\t\t\t\tallowUndo: false,\n\t\t\t\t\t} );\n\t\t\t\t\tawait saveEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\ttemplate.id\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\titems.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: The number of items. */\n\t\t\t\t\t\t\t\t__( '%s items reset.' ),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ),\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: 'revert-template-action',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} catch ( error ) {\n\t\t\t\tlet fallbackErrorMessage;\n\t\t\t\tif ( items[ 0 ].type === 'wp_template' ) {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the templates.'\n\t\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\tfallbackErrorMessage =\n\t\t\t\t\t\titems.length === 1\n\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template part.'\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the template parts.'\n\t\t\t\t\t\t\t );\n\t\t\t\t}\n\n\t\t\t\tconst typedError = error as CoreDataError;\n\t\t\t\tconst errorMessage =\n\t\t\t\t\ttypedError.message && typedError.code !== 'unknown_error'\n\t\t\t\t\t\t? typedError.message\n\t\t\t\t\t\t: fallbackErrorMessage;\n\n\t\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t\t}\n\t\t};\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ __( 'Reset to default and clear all customizations?' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tawait onConfirm();\n\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Reset action for Template and TemplatePart.\n */\nexport default resetPostAction;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst trash = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default trash;\n","/**\n * WordPress dependencies\n */\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport type { CoreDataError, Post } from '../types';\n\nfunction getErrorMessagesFromPromises< T >(\n\tallSettledResults: PromiseSettledResult< T >[]\n) {\n\tconst errorMessages = new Set< string >();\n\t// If there was at lease one failure.\n\tif ( allSettledResults.length === 1 ) {\n\t\tconst typedError = allSettledResults[ 0 ] as {\n\t\t\treason?: CoreDataError;\n\t\t};\n\t\tif ( typedError.reason?.message ) {\n\t\t\terrorMessages.add( typedError.reason.message );\n\t\t}\n\t} else {\n\t\tconst failedPromises = allSettledResults.filter(\n\t\t\t( { status } ) => status === 'rejected'\n\t\t);\n\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\tconst typedError = failedPromise as {\n\t\t\t\treason?: CoreDataError;\n\t\t\t};\n\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\terrorMessages.add( typedError.reason.message );\n\t\t\t}\n\t\t}\n\t}\n\treturn errorMessages;\n}\n\nexport type NoticeSettings< T extends Post > = {\n\tsuccess: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( posts: T ) => string;\n\t\t\tgetBatchMessage: ( posts: T[] ) => string;\n\t\t};\n\t};\n\terror: {\n\t\tid?: string;\n\t\ttype?: string;\n\t\tmessages: {\n\t\t\tgetMessage: ( errors: Set< string > ) => string;\n\t\t\tgetBatchMessage: ( errors: Set< string > ) => string;\n\t\t};\n\t};\n};\n\nexport const deletePostWithNotices = async < T extends Post >(\n\tposts: T[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { deleteEntityRecord } = dispatch( coreStore );\n\tconst allSettledResults = await Promise.allSettled(\n\t\tposts.map( ( post ) => {\n\t\t\treturn deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.type,\n\t\t\t\tpost.id,\n\t\t\t\t{ force: true },\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage( posts[ 0 ] );\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage( posts );\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.( posts );\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n\nexport const editPostWithNotices = async < T extends Post >(\n\tpostsWithUpdates: {\n\t\toriginalPost: T;\n\t\tchanges: Partial< T >;\n\t}[],\n\tnotice: NoticeSettings< T >,\n\tcallbacks: {\n\t\tonActionPerformed?: ( posts: T[] ) => void;\n\t\tonActionError?: () => void;\n\t}\n) => {\n\tconst { createSuccessNotice, createErrorNotice } = dispatch( noticesStore );\n\tconst { editEntityRecord, saveEditedEntityRecord } = dispatch( coreStore );\n\tawait Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\t...post.changes,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\tconst allSettledResults = await Promise.allSettled(\n\t\tpostsWithUpdates.map( ( post ) => {\n\t\t\treturn saveEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpost.originalPost.type,\n\t\t\t\tpost.originalPost.id,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t} )\n\t);\n\t// If all the promises were fulfilled with success.\n\tif ( allSettledResults.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\tlet successMessage;\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\tsuccessMessage = notice.success.messages.getMessage(\n\t\t\t\tpostsWithUpdates[ 0 ].originalPost\n\t\t\t);\n\t\t} else {\n\t\t\tsuccessMessage = notice.success.messages.getBatchMessage(\n\t\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t\t);\n\t\t}\n\t\tcreateSuccessNotice( successMessage, {\n\t\t\ttype: notice.success.type ?? 'snackbar',\n\t\t\tid: notice.success.id,\n\t\t} );\n\t\tcallbacks.onActionPerformed?.(\n\t\t\tpostsWithUpdates.map( ( post ) => post.originalPost )\n\t\t);\n\t} else {\n\t\tconst errorMessages = getErrorMessagesFromPromises( allSettledResults );\n\t\tlet errorMessage = '';\n\t\tif ( allSettledResults.length === 1 ) {\n\t\t\terrorMessage = notice.error.messages.getMessage( errorMessages );\n\t\t} else {\n\t\t\terrorMessage =\n\t\t\t\tnotice.error.messages.getBatchMessage( errorMessages );\n\t\t}\n\n\t\tcreateErrorNotice( errorMessage, {\n\t\t\ttype: notice.error.type ?? 'snackbar',\n\t\t\tid: notice.error.id,\n\t\t} );\n\t\tcallbacks.onActionError?.();\n\t}\n};\n","/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport type { Action } from '@wordpress/dataviews';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetItemTitle,\n\tisTemplateOrTemplatePart,\n\tisTemplateRemovable,\n} from './utils';\nimport type { Pattern, Template, TemplatePart } from '../types';\nimport type { NoticeSettings } from '../mutation';\nimport { deletePostWithNotices } from '../mutation';\nimport { unlock } from '../lock-unlock';\n\nconst { PATTERN_TYPES } = unlock( patternsPrivateApis );\n\n// This action is used for templates, patterns and template parts.\n// Every other post type uses the similar `trashPostAction` which\n// moves the post to trash.\nconst deletePostAction: Action< Template | TemplatePart | Pattern > = {\n\tid: 'delete-post',\n\tlabel: __( 'Delete' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( post ) {\n\t\tif ( isTemplateOrTemplatePart( post ) ) {\n\t\t\treturn isTemplateRemovable( post );\n\t\t}\n\t\t// We can only remove user patterns.\n\t\treturn post.type === PATTERN_TYPES.user;\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst isResetting = items.every(\n\t\t\t( item ) => isTemplateOrTemplatePart( item ) && item?.has_theme_file\n\t\t);\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Delete %d item?',\n\t\t\t\t\t\t\t\t\t'Delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The template or template part's title\n\t\t\t\t\t\t\t\t_x( 'Delete \"%s\"?', 'template part' ),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst notice: NoticeSettings<\n\t\t\t\t\t\t\t\tTemplate | TemplatePart | Pattern\n\t\t\t\t\t\t\t> = {\n\t\t\t\t\t\t\t\tsuccess: {\n\t\t\t\t\t\t\t\t\tmessages: {\n\t\t\t\t\t\t\t\t\t\tgetMessage: ( item ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\"%s\" deleted.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'template part'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdecodeEntities(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgetItemTitle( item )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tgetBatchMessage: () => {\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t\t\t\t\t\t\t\t: __( 'Items deleted.' );\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\terror: {\n\t\t\t\t\t\t\t\t\tmessages: {\n\t\t\t\t\t\t\t\t\t\tgetMessage: ( error ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( error.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn [ ...error ][ 0 ];\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the item.'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the item.'\n\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tgetBatchMessage: ( errors ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( errors.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tif ( errors.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\treturn isResetting\n\t\t\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ].join(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t','\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ ...errors ].join(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t','\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t );\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};\n\n\t\t\t\t\t\t\tawait deletePostWithNotices( items, notice, {\n\t\t\t\t\t\t\t\tonActionPerformed,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Delete action for Templates, Patterns and Template Parts.\n */\nexport default deletePostAction;\n","/**\n * WordPress dependencies\n */\nimport { trash } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _n, sprintf, _x } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport type { Action } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst trashPost: Action< PostWithPermissions > = {\n\tid: 'move-to-trash',\n\tlabel: __( 'Move to trash' ),\n\tisPrimary: true,\n\ticon: trash,\n\tisEligible( item ) {\n\t\tif ( isTemplateOrTemplatePart( item ) || item.type === 'wp_block' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (\n\t\t\t!! item.status &&\n\t\t\t! [ 'auto-draft', 'trash' ].includes( item.status ) &&\n\t\t\titem.permissions?.delete\n\t\t);\n\t},\n\tsupportsBulk: true,\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length === 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The item's title.\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move \"%s\" to the trash?'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: The number of items (2 or more).\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move %d item to the trash ?',\n\t\t\t\t\t\t\t\t\t'Are you sure you want to move %d items to the trash ?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst promiseResult = await Promise.allSettled(\n\t\t\t\t\t\t\t\titems.map( ( item ) =>\n\t\t\t\t\t\t\t\t\tdeleteEntityRecord(\n\t\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t\titem.type,\n\t\t\t\t\t\t\t\t\t\titem.id.toString(),\n\t\t\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\t\t\t{ throwOnError: true }\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);\n\t\t\t\t\t\t\t// If all the promises were fulfilled with success.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpromiseResult.every(\n\t\t\t\t\t\t\t\t\t( { status } ) => status === 'fulfilled'\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\tlet successMessage;\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: The item's title. */\n\t\t\t\t\t\t\t\t\t\t__( '\"%s\" moved to the trash.' ),\n\t\t\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: The number of items. */\n\t\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t\t'%s item moved to the trash.',\n\t\t\t\t\t\t\t\t\t\t\t'%s items moved to the trash.',\n\t\t\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\titems.length\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\tcreateSuccessNotice( successMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tid: 'move-to-trash-action',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If there was at least one failure.\n\t\t\t\t\t\t\t\tlet errorMessage;\n\t\t\t\t\t\t\t\t// If we were trying to delete a single item.\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage =\n\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the item to the trash.'\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// If we were trying to delete multiple items.\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconst errorMessages = new Set();\n\t\t\t\t\t\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\t\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\t\terrorMessages.add(\n\t\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message\n\t\t\t\t\t\t\t\t\t\t\t);\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\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the items to the trash.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while moving the item to the trash: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while moving the items to the trash: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\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\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( onActionPerformed ) {\n\t\t\t\t\t\t\t\tonActionPerformed( items );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Trash', 'verb' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Trash action for PostWithPermissions.\n */\nexport default trashPost;\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport type { Action } from '@wordpress/dataviews';\nimport { trash } from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle, isTemplateOrTemplatePart } from './utils';\nimport type { CoreDataError, PostWithPermissions } from '../types';\n\nconst permanentlyDeletePost: Action< PostWithPermissions > = {\n\tid: 'permanently-delete',\n\tlabel: __( 'Permanently delete' ),\n\tsupportsBulk: true,\n\ticon: trash,\n\tisEligible( item ) {\n\t\tif ( isTemplateOrTemplatePart( item ) || item.type === 'wp_block' ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst { status, permissions } = item;\n\t\treturn status === 'trash' && permissions?.delete;\n\t},\n\thideModalHeader: true,\n\tRenderModal: ( { items, closeModal, onActionPerformed } ) => {\n\t\tconst [ isBusy, setIsBusy ] = useState( false );\n\t\tconst { createSuccessNotice, createErrorNotice } =\n\t\t\tuseDispatch( noticesStore );\n\t\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\n\t\treturn (\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>\n\t\t\t\t\t{ items.length > 1\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %d: number of items to delete.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete %d item?',\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete %d items?',\n\t\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\titems.length\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The post's title\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Are you sure you want to permanently delete \"%s\"?'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tdecodeEntities( getItemTitle( items[ 0 ] ) )\n\t\t\t\t\t\t ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ closeModal }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\tsetIsBusy( true );\n\t\t\t\t\t\t\tconst promiseResult = await Promise.allSettled(\n\t\t\t\t\t\t\t\titems.map( ( post ) =>\n\t\t\t\t\t\t\t\t\tdeleteEntityRecord(\n\t\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t\tpost.type,\n\t\t\t\t\t\t\t\t\t\tpost.id,\n\t\t\t\t\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t\t\t\t\t{ throwOnError: true }\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);\n\n\t\t\t\t\t\t\t// If all the promises were fulfilled with success.\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpromiseResult.every(\n\t\t\t\t\t\t\t\t\t( { status } ) => status === 'fulfilled'\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\tlet successMessage;\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tsuccessMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t/* translators: The posts's title. */\n\t\t\t\t\t\t\t\t\t\t__( '\"%s\" permanently deleted.' ),\n\t\t\t\t\t\t\t\t\t\tgetItemTitle( items[ 0 ] )\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsuccessMessage = __(\n\t\t\t\t\t\t\t\t\t\t'The items were permanently deleted.'\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\tcreateSuccessNotice( successMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tid: 'permanently-delete-post-action',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tonActionPerformed?.( items );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// If there was at lease one failure.\n\t\t\t\t\t\t\t\tlet errorMessage;\n\t\t\t\t\t\t\t\t// If we were trying to permanently delete a single post.\n\t\t\t\t\t\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\t\t\t\t\t\tconst typedError = promiseResult[ 0 ] as {\n\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage =\n\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the item.'\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// If we were trying to permanently delete multiple posts\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tconst errorMessages = new Set();\n\t\t\t\t\t\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\t\t\t\t\t\tconst typedError = failedPromise as {\n\t\t\t\t\t\t\t\t\t\t\treason?: CoreDataError;\n\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\tif ( typedError.reason?.message ) {\n\t\t\t\t\t\t\t\t\t\t\terrorMessages.add(\n\t\t\t\t\t\t\t\t\t\t\t\ttypedError.reason.message\n\t\t\t\t\t\t\t\t\t\t\t);\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\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the items.'\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'An error occurred while permanently deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\terrorMessage = sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'Some errors occurred while permanently deleting the items: %s'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\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\tcreateErrorNotice( errorMessage, {\n\t\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetIsBusy( false );\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Delete permanently' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t);\n\t},\n};\n\n/**\n * Delete action for PostWithPermissions.\n */\nexport default permanentlyDeletePost;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"mediaUtils\"];","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineSolid = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 11.25h14v1.5H5z\" />\n\t</SVG>\n);\n\nexport default lineSolid;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { FeaturedImageEdit } from './featured-image-edit';\nimport { FeaturedImageView } from './featured-image-view';\n\nconst featuredImageField: Field< BasePost > = {\n\tid: 'featured_media',\n\ttype: 'media',\n\tlabel: __( 'Featured Image' ),\n\tEdit: FeaturedImageEdit,\n\trender: FeaturedImageView,\n\tenableSorting: false,\n};\n\n/**\n * Featured Image field for BasePost.\n */\nexport default featuredImageField;\n","/**\n * WordPress dependencies\n */\nimport { Button, __experimentalGrid as Grid } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useCallback, useRef } from '@wordpress/element';\n// @ts-ignore\nimport { MediaUpload } from '@wordpress/media-utils';\nimport { lineSolid } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nexport const FeaturedImageEdit = ( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\n\tconst value = field.getValue( { item: data } );\n\n\tconst media = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn getEntityRecord( 'root', 'media', value );\n\t\t},\n\t\t[ value ]\n\t);\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: number ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\tconst url = media?.source_url;\n\tconst title = media?.title?.rendered;\n\tconst ref = useRef( null );\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__featured-image\">\n\t\t\t<div className=\"fields-controls__featured-image-container\">\n\t\t\t\t<MediaUpload\n\t\t\t\t\tonSelect={ ( selectedMedia: { id: number } ) => {\n\t\t\t\t\t\tonChangeControl( selectedMedia.id );\n\t\t\t\t\t} }\n\t\t\t\t\tallowedTypes={ [ 'image' ] }\n\t\t\t\t\trender={ ( { open }: { open: () => void } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topen();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tonKeyDown={ open }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Grid\n\t\t\t\t\t\t\t\t\trowGap={ 0 }\n\t\t\t\t\t\t\t\t\tcolumnGap={ 8 }\n\t\t\t\t\t\t\t\t\ttemplateColumns=\"24px 1fr 24px\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ url && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-controls__featured-image-image\"\n\t\t\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\t\t\twidth={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\theight={ 24 }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ url }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"fields-controls__featured-image-title\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t\t</span>\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{ ! url && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-controls__featured-image-placeholder\"\n\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\twidth: '24px',\n\t\t\t\t\t\t\t\t\t\t\t\t\theight: '24px',\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"fields-controls__featured-image-title\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'Choose an image…' ) }\n\t\t\t\t\t\t\t\t\t\t\t</span>\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{ url && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"fields-controls__featured-image-remove-button\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ lineSolid }\n\t\t\t\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChangeControl( 0 );\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t/>\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</Grid>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataViewRenderFieldProps } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nexport const FeaturedImageView = ( {\n\titem,\n}: DataViewRenderFieldProps< BasePost > ) => {\n\tconst mediaId = item.featured_media;\n\n\tconst media = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn mediaId ? getEntityRecord( 'root', 'media', mediaId ) : null;\n\t\t},\n\t\t[ mediaId ]\n\t);\n\tconst url = media?.source_url;\n\n\tif ( url ) {\n\t\treturn (\n\t\t\t<img\n\t\t\t\tclassName=\"fields-controls__featured-image-image\"\n\t\t\t\tsrc={ url }\n\t\t\t\talt=\"\"\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn <span className=\"fields-controls__featured-image-placeholder\" />;\n};\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst commentAuthorAvatar = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default commentAuthorAvatar;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePostWithEmbeddedAuthor } from '../../types';\nimport AuthorView from './author-view';\n\nconst authorField: Field< BasePostWithEmbeddedAuthor > = {\n\tlabel: __( 'Author' ),\n\tid: 'author',\n\ttype: 'integer',\n\telements: [],\n\trender: AuthorView,\n\tsort: ( a, b, direction ) => {\n\t\tconst nameA = a._embedded?.author?.[ 0 ]?.name || '';\n\t\tconst nameB = b._embedded?.author?.[ 0 ]?.name || '';\n\n\t\treturn direction === 'asc'\n\t\t\t? nameA.localeCompare( nameB )\n\t\t\t: nameB.localeCompare( nameA );\n\t},\n};\n\n/**\n * Author field for BasePost.\n */\nexport default authorField;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { commentAuthorAvatar as authorIcon } from '@wordpress/icons';\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { User } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport type { BasePostWithEmbeddedAuthor } from '../../types';\n\nfunction AuthorView( { item }: { item: BasePostWithEmbeddedAuthor } ) {\n\tconst { text, imageUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\tlet user: User | undefined;\n\t\t\tif ( !! item.author ) {\n\t\t\t\tuser = getEntityRecord( 'root', 'user', item.author );\n\t\t\t}\n\t\t\treturn {\n\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\ttext: user?.name,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ !! imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt={ __( 'Author avatar' ) }\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ authorIcon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nexport default AuthorView;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drafts = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drafts;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst scheduled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default scheduled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pending = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default pending;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst notAllowed = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default notAllowed;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst published = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default published;\n","/**\n * WordPress dependencies\n */\nimport {\n\ttrash,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\n// See https://github.com/WordPress/gutenberg/issues/55886\n// We do not support custom statutes at the moment.\nconst STATUSES = [\n\t{\n\t\tvalue: 'draft',\n\t\tlabel: __( 'Draft' ),\n\t\ticon: drafts,\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tvalue: 'future',\n\t\tlabel: __( 'Scheduled' ),\n\t\ticon: scheduled,\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tvalue: 'pending',\n\t\tlabel: __( 'Pending Review' ),\n\t\ticon: pending,\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tvalue: 'private',\n\t\tlabel: __( 'Private' ),\n\t\ticon: notAllowed,\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tvalue: 'publish',\n\t\tlabel: __( 'Published' ),\n\t\ticon: published,\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n\t{ value: 'trash', label: __( 'Trash' ), icon: trash },\n];\n\nexport default STATUSES;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport StatusView from './status-view';\nimport STATUSES from './status-elements';\n\nconst OPERATOR_IS_ANY = 'isAny';\n\nconst statusField: Field< BasePost > = {\n\tlabel: __( 'Status' ),\n\tid: 'status',\n\ttype: 'text',\n\telements: STATUSES,\n\trender: StatusView,\n\tEdit: 'radio',\n\tenableSorting: false,\n\tfilterBy: {\n\t\toperators: [ OPERATOR_IS_ANY ],\n\t},\n};\n\n/**\n * Status field for BasePost.\n */\nexport default statusField;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport STATUSES from './status-elements';\n\nfunction StatusView( { item }: { item: BasePost } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"edit-site-post-list__status-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>{ label }</span>\n\t\t</HStack>\n\t);\n}\n\nexport default StatusView;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { dateI18n, getDate, getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst getFormattedDate = ( dateToDisplay: string | null ) =>\n\tdateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( dateToDisplay )\n\t);\n\nconst DateView = ( { item }: { item: BasePost } ) => {\n\tconst isDraftOrPrivate = [ 'draft', 'private' ].includes(\n\t\titem.status ?? ''\n\t);\n\tif ( isDraftOrPrivate ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\tconst isScheduled = item.status === 'future';\n\tif ( isScheduled ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t__( '<span>Scheduled: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\tconst isPublished = item.status === 'publish';\n\tif ( isPublished ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation time */\n\t\t\t\t__( '<span>Published: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( item.date ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\t// Pending posts show the modified date if it's newer.\n\tconst dateToDisplay =\n\t\tgetDate( item.modified ?? null ) > getDate( item.date ?? null )\n\t\t\t? item.modified\n\t\t\t: item.date;\n\n\tconst isPending = item.status === 'pending';\n\tif ( isPending ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: page creation or modification date. */\n\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\tgetFormattedDate( dateToDisplay ?? null )\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: <span />,\n\t\t\t\ttime: <time />,\n\t\t\t}\n\t\t);\n\t}\n\n\t// Unknow status.\n\treturn <time>{ getFormattedDate( item.date ?? null ) }</time>;\n};\n\nexport default DateView;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport DateView from './date-view';\n\nconst dateField: Field< BasePost > = {\n\tid: 'date',\n\ttype: 'datetime',\n\tlabel: __( 'Date' ),\n\trender: DateView,\n};\n\n/**\n * Date field for BasePost.\n */\nexport default dateField;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst copySmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M5.625 5.5h9.75c.069 0 .125.056.125.125v9.75a.125.125 0 0 1-.125.125h-9.75a.125.125 0 0 1-.125-.125v-9.75c0-.069.056-.125.125-.125ZM4 5.625C4 4.728 4.728 4 5.625 4h9.75C16.273 4 17 4.728 17 5.625v9.75c0 .898-.727 1.625-1.625 1.625h-9.75A1.625 1.625 0 0 1 4 15.375v-9.75Zm14.5 11.656v-9H20v9C20 18.8 18.77 20 17.251 20H6.25v-1.5h11.001c.69 0 1.249-.528 1.249-1.219Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default copySmall;\n","/**\n * WordPress dependencies\n */\nimport { cleanForSlug } from '@wordpress/url';\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\n\nexport const getSlug = ( item: BasePost ): string => {\n\tif ( typeof item !== 'object' ) {\n\t\treturn '';\n\t}\n\n\treturn (\n\t\titem.slug || cleanForSlug( getItemTitle( item ) ) || item.id.toString()\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tExternalLink,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { copySmall } from '@wordpress/icons';\nimport { useCopyToClipboard, useInstanceId } from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { safeDecodeURIComponent } from '@wordpress/url';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getSlug } from './utils';\n\nconst SlugEdit = ( {\n\tfield,\n\tonChange,\n\tdata,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\n\tconst slug = field.getValue( { item: data } ) || getSlug( data );\n\tconst permalinkTemplate = data.permalink_template || '';\n\tconst PERMALINK_POSTNAME_REGEX = /%(?:postname|pagename)%/;\n\tconst [ prefix, suffix ] = permalinkTemplate.split(\n\t\tPERMALINK_POSTNAME_REGEX\n\t);\n\tconst permalinkPrefix = prefix;\n\tconst permalinkSuffix = suffix;\n\tconst isEditable = PERMALINK_POSTNAME_REGEX.test( permalinkTemplate );\n\tconst originalSlugRef = useRef( slug );\n\tconst slugToDisplay = slug || originalSlugRef.current;\n\tconst permalink = isEditable\n\t\t? `${ permalinkPrefix }${ slugToDisplay }${ permalinkSuffix }`\n\t\t: safeDecodeURIComponent( data.link || '' );\n\n\tuseEffect( () => {\n\t\tif ( slug && originalSlugRef.current === undefined ) {\n\t\t\toriginalSlugRef.current = slug;\n\t\t}\n\t}, [ slug ] );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue?: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\tconst { createNotice } = useDispatch( noticesStore );\n\n\tconst copyButtonRef = useCopyToClipboard( permalink, () => {\n\t\tcreateNotice( 'info', __( 'Copied Permalink to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\n\tconst postUrlSlugDescriptionId =\n\t\t'editor-post-url__slug-description-' + useInstanceId( SlugEdit );\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__slug\">\n\t\t\t{ isEditable && (\n\t\t\t\t<VStack>\n\t\t\t\t\t<VStack spacing=\"0px\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Customize the last part of the Permalink.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ExternalLink href=\"https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink\">\n\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</VStack>\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\tlabel={ __( 'Copy' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlabel={ __( 'Link' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ slug }\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\tclassName=\"fields-controls__slug-input\"\n\t\t\t\t\t\tonChange={ ( newValue?: string ) => {\n\t\t\t\t\t\t\tonChangeControl( newValue );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\t\tif ( slug === '' ) {\n\t\t\t\t\t\t\t\tonChangeControl( originalSlugRef.current );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\taria-describedby={ postUrlSlugDescriptionId }\n\t\t\t\t\t/>\n\t\t\t\t\t<div className=\"fields-controls__slug-help\">\n\t\t\t\t\t\t<span className=\"fields-controls__slug-help-visual-label\">\n\t\t\t\t\t\t\t{ __( 'Permalink:' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"fields-controls__slug-help-link\"\n\t\t\t\t\t\t\thref={ permalink }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-prefix\">\n\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-slug\">\n\t\t\t\t\t\t\t\t{ slugToDisplay }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span className=\"fields-controls__slug-help-suffix\">\n\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</div>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t\t{ ! isEditable && (\n\t\t\t\t<ExternalLink\n\t\t\t\t\tclassName=\"fields-controls__slug-help\"\n\t\t\t\t\thref={ permalink }\n\t\t\t\t>\n\t\t\t\t\t{ permalink }\n\t\t\t\t</ExternalLink>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n};\n\nexport default SlugEdit;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport SlugEdit from './slug-edit';\nimport SlugView from './slug-view';\n\nconst slugField: Field< BasePost > = {\n\tid: 'slug',\n\ttype: 'text',\n\tlabel: __( 'Slug' ),\n\tEdit: SlugEdit,\n\trender: SlugView,\n};\n\n/**\n * Slug field for BasePost.\n */\nexport default slugField;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getSlug } from './utils';\n\nconst SlugView = ( { item }: { item: BasePost } ) => {\n\tconst slug = getSlug( item );\n\tconst originalSlugRef = useRef( slug );\n\n\tuseEffect( () => {\n\t\tif ( slug && originalSlugRef.current === undefined ) {\n\t\t\toriginalSlugRef.current = slug;\n\t\t}\n\t}, [ slug ] );\n\n\tconst slugToDisplay = slug || originalSlugRef.current;\n\n\treturn `${ slugToDisplay }`;\n};\n\nexport default SlugView;\n","/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nexport function getTitleWithFallbackName( post: BasePost ) {\n\treturn typeof post.title === 'object' &&\n\t\t'rendered' in post.title &&\n\t\tpost.title.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post?.id } (${ __( 'no title' ) })`;\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { ComboboxControl, ExternalLink } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcreateInterpolateElement,\n\tuseCallback,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\n// @ts-ignore\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { debounce } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getTitleWithFallbackName } from './utils';\n\ntype TreeBase = {\n\tid: number;\n\tname: string;\n\t[ key: string ]: any;\n};\n\ntype TreeWithParent = TreeBase & {\n\tparent: number;\n};\n\ntype TreeWithoutParent = TreeBase & {\n\tparent: null;\n};\n\ntype Tree = TreeWithParent | TreeWithoutParent;\n\nfunction buildTermsTree( flatTerms: Tree[] ) {\n\tconst flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === null || parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren as TreeWithParent[];\n\t}\n\n\tconst termsByParent = (\n\t\tflatTermsWithParentAndChildren as TreeWithParent[]\n\t ).reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{} as Record< string, Array< TreeWithParent > >\n\t);\n\n\tconst fillWithChildren = (\n\t\tterms: Array< TreeWithParent >\n\t): Array< TreeWithParent > => {\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:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const getItemPriority = ( name: string, searchValue: string ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\nexport function PageAttributesParent( {\n\tdata,\n\tonChangeControl,\n}: {\n\tdata: BasePost;\n\tonChangeControl: ( newValue: number ) => void;\n} ) {\n\tconst [ fieldValue, setFieldValue ] = useState< null | string >( null );\n\n\tconst pageId = data.parent;\n\tconst postId = data.id;\n\tconst postTypeSlug = data.type;\n\n\tconst { parentPostTitle, pageItems, isHierarchical } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEntityRecords, getPostType } =\n\t\t\t\tselect( coreStore );\n\n\t\t\tconst postTypeInfo = getPostType( postTypeSlug );\n\n\t\t\tconst postIsHierarchical =\n\t\t\t\tpostTypeInfo?.hierarchical && postTypeInfo.viewable;\n\n\t\t\tconst parentPost = pageId\n\t\t\t\t? getEntityRecord< BasePost >(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\t\tpageId\n\t\t\t\t )\n\t\t\t\t: null;\n\n\t\t\tconst query = {\n\t\t\t\tper_page: 100,\n\t\t\t\texclude: postId,\n\t\t\t\tparent_exclude: postId,\n\t\t\t\torderby: 'menu_order',\n\t\t\t\torder: 'asc',\n\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t...( fieldValue !== null && {\n\t\t\t\t\tsearch: fieldValue,\n\t\t\t\t} ),\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\tparentPostTitle: parentPost\n\t\t\t\t\t? getTitleWithFallbackName( parentPost )\n\t\t\t\t\t: '',\n\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t? getEntityRecords< BasePost >(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tpostTypeSlug,\n\t\t\t\t\t\t\tquery\n\t\t\t\t\t )\n\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ fieldValue, pageId, postId, postTypeSlug ]\n\t);\n\n\t/**\n\t * This logic has been copied from https://github.com/WordPress/gutenberg/blob/0249771b519d5646171fb9fae422006c8ab773f2/packages/editor/src/components/page-attributes/parent.js#L106.\n\t */\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = (\n\t\t\ttree: Array< Tree >,\n\t\t\tlevel = 0\n\t\t): Array< {\n\t\t\tvalue: number;\n\t\t\tlabel: string;\n\t\t\trawName: string;\n\t\t} > => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority(\n\t\t\t\t\ta.rawName,\n\t\t\t\t\tfieldValue ?? ''\n\t\t\t\t);\n\t\t\t\tconst priorityB = getItemPriority(\n\t\t\t\t\tb.rawName,\n\t\t\t\t\tfieldValue ?? ''\n\t\t\t\t);\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id as number,\n\t\t\tparent: item.parent ?? null,\n\t\t\tname: getTitleWithFallbackName( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find( ( item ) => item.value === pageId );\n\t\tif ( pageId && parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: pageId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t\trawName: '',\n\t\t\t} );\n\t\t}\n\t\treturn opts.map( ( option ) => ( {\n\t\t\t...option,\n\t\t\tvalue: option.value.toString(),\n\t\t} ) );\n\t}, [ pageItems, fieldValue, parentPostTitle, pageId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue: string ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId: string | null | undefined ) => {\n\t\tif ( selectedPostId ) {\n\t\t\treturn onChangeControl( parseInt( selectedPostId, 10 ) ?? 0 );\n\t\t}\n\n\t\tonChangeControl( 0 );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ pageId?.toString() }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce(\n\t\t\t\t( value: unknown ) => handleKeydown( value as string ),\n\t\t\t\t300\n\t\t\t) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nexport const ParentEdit = ( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\n\tconst homeUrl = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getEntityRecord< {\n\t\t\thome: string;\n\t\t} >( 'root', '__unstableBase' )?.home as string;\n\t}, [] );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue?: number ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__parent\">\n\t\t\t<div>\n\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %1$s The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %1$s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t'<wbr />$1'\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\twbr: <wbr />,\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t\t<p>\n\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tchildren={ undefined }\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</p>\n\t\t\t\t<PageAttributesParent\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonChangeControl={ onChangeControl }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { ParentEdit } from './parent-edit';\nimport { ParentView } from './parent-view';\n\nconst parentField: Field< BasePost > = {\n\tid: 'parent',\n\ttype: 'text',\n\tlabel: __( 'Parent' ),\n\tEdit: ParentEdit,\n\trender: ParentView,\n\tenableSorting: true,\n};\n\n/**\n * Parent field for BasePost.\n */\nexport default parentField;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataViewRenderFieldProps } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getTitleWithFallbackName } from './utils';\n\nexport const ParentView = ( {\n\titem,\n}: DataViewRenderFieldProps< BasePost > ) => {\n\tconst parent = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord } = select( coreStore );\n\t\t\treturn item?.parent\n\t\t\t\t? getEntityRecord( 'postType', item.type, item.parent )\n\t\t\t\t: null;\n\t\t},\n\t\t[ item.parent, item.type ]\n\t);\n\n\tif ( parent ) {\n\t\treturn <>{ getTitleWithFallbackName( parent ) }</>;\n\t}\n\n\treturn <>{ __( 'None' ) }</>;\n};\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nconst commentStatusField: Field< BasePost > = {\n\tid: 'comment_status',\n\tlabel: __( 'Discussion' ),\n\ttype: 'text',\n\tEdit: 'radio',\n\tenableSorting: false,\n\tfilterBy: {\n\t\toperators: [],\n\t},\n\telements: [\n\t\t{\n\t\t\tvalue: 'open',\n\t\t\tlabel: __( 'Open' ),\n\t\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'closed',\n\t\t\tlabel: __( 'Closed' ),\n\t\t\tdescription: __(\n\t\t\t\t'Visitors cannot add new comments or replies. Existing comments remain visible.'\n\t\t\t),\n\t\t},\n\t],\n};\n\n/**\n * Comment status field for BasePost.\n */\nexport default commentStatusField;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport type { BasePost } from '../../types';\nimport { TemplateEdit } from './template-edit';\n\nconst templateField: Field< BasePost > = {\n\tid: 'template',\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tEdit: TemplateEdit,\n\tenableSorting: false,\n};\n\n/**\n * Template field for BasePost.\n */\nexport default templateField;\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo, useState } from '@wordpress/element';\n// @ts-ignore\nimport { parse } from '@wordpress/blocks';\nimport type { WpTemplate } from '@wordpress/core-data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\n// @ts-expect-error block-editor is not typed correctly.\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport {\n\tButton,\n\tDropdown,\n\tMenuGroup,\n\tMenuItem,\n\tModal,\n} from '@wordpress/components';\nimport { useAsyncList } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __ } from '@wordpress/i18n';\nimport { getItemTitle } from '../../actions/utils';\nimport type { BasePost } from '../../types';\nimport { unlock } from '../../lock-unlock';\n\nexport const TemplateEdit = ( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< BasePost > ) => {\n\tconst { id } = field;\n\tconst postType = data.type;\n\tconst postId =\n\t\ttypeof data.id === 'number' ? data.id : parseInt( data.id, 10 );\n\tconst slug = data.slug;\n\n\tconst { availableTemplates, templates } = useSelect(\n\t\t( select ) => {\n\t\t\tconst allTemplates =\n\t\t\t\tselect( coreStore ).getEntityRecords< WpTemplate >(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t{\n\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t\tpost_type: postType,\n\t\t\t\t\t}\n\t\t\t\t) ?? [];\n\n\t\t\tconst { getHomePage, getPostsPageId } = unlock(\n\t\t\t\tselect( coreStore )\n\t\t\t);\n\n\t\t\tconst isPostsPage = getPostsPageId() === +postId;\n\t\t\tconst isFrontPage =\n\t\t\t\tpostType === 'page' && getHomePage()?.postId === +postId;\n\n\t\t\tconst allowSwitchingTemplate = ! isPostsPage && ! isFrontPage;\n\n\t\t\treturn {\n\t\t\t\ttemplates: allTemplates,\n\t\t\t\tavailableTemplates: allowSwitchingTemplate\n\t\t\t\t\t? allTemplates.filter(\n\t\t\t\t\t\t\t( template ) =>\n\t\t\t\t\t\t\t\ttemplate.is_custom &&\n\t\t\t\t\t\t\t\ttemplate.slug !== data.template &&\n\t\t\t\t\t\t\t\t!! template.content.raw // Skip empty templates.\n\t\t\t\t\t )\n\t\t\t\t\t: [],\n\t\t\t};\n\t\t},\n\t\t[ data.template, postId, postType ]\n\t);\n\n\tconst templatesAsPatterns = useMemo(\n\t\t() =>\n\t\t\tavailableTemplates.map( ( template ) => ( {\n\t\t\t\tname: template.slug,\n\t\t\t\tblocks: parse( template.content.raw ),\n\t\t\t\ttitle: decodeEntities( template.title.rendered ),\n\t\t\t\tid: template.id,\n\t\t\t} ) ),\n\t\t[ availableTemplates ]\n\t);\n\n\tconst shownTemplates = useAsyncList( templatesAsPatterns );\n\n\tconst value = field.getValue( { item: data } );\n\n\tconst currentTemplate = useSelect(\n\t\t( select ) => {\n\t\t\tconst foundTemplate = templates?.find(\n\t\t\t\t( template ) => template.slug === value\n\t\t\t);\n\n\t\t\tif ( foundTemplate ) {\n\t\t\t\treturn foundTemplate;\n\t\t\t}\n\n\t\t\tlet slugToCheck;\n\t\t\t// In `draft` status we might not have a slug available, so we use the `single`\n\t\t\t// post type templates slug(ex page, single-post, single-product etc..).\n\t\t\t// Pages do not need the `single` prefix in the slug to be prioritized\n\t\t\t// through template hierarchy.\n\t\t\tif ( slug ) {\n\t\t\t\tslugToCheck =\n\t\t\t\t\tpostType === 'page'\n\t\t\t\t\t\t? `${ postType }-${ slug }`\n\t\t\t\t\t\t: `single-${ postType }-${ slug }`;\n\t\t\t} else {\n\t\t\t\tslugToCheck =\n\t\t\t\t\tpostType === 'page' ? 'page' : `single-${ postType }`;\n\t\t\t}\n\n\t\t\tif ( postType ) {\n\t\t\t\tconst templateId = select( coreStore ).getDefaultTemplateId( {\n\t\t\t\t\tslug: slugToCheck,\n\t\t\t\t} );\n\n\t\t\t\treturn select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\ttemplateId\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ postType, slug, templates, value ]\n\t);\n\n\tconst [ showModal, setShowModal ] = useState( false );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string ) =>\n\t\t\tonChange( {\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<fieldset className=\"fields-controls__template\">\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ { placement: 'bottom-start' } }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ currentTemplate\n\t\t\t\t\t\t\t? getItemTitle( currentTemplate )\n\t\t\t\t\t\t\t: '' }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onToggle } ) => (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowModal( true );\n\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Change template' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// The default template in a post is indicated by an empty string\n\t\t\t\t\t\t\tvalue !== '' && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonChangeControl( '' );\n\t\t\t\t\t\t\t\t\t\tonToggle();\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\t{ __( 'Use default template' ) }\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}\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Choose a template' ) }\n\t\t\t\t\tonRequestClose={ () => setShowModal( false ) }\n\t\t\t\t\toverlayClassName=\"fields-controls__template-modal\"\n\t\t\t\t\tisFullScreen\n\t\t\t\t>\n\t\t\t\t\t<div className=\"fields-controls__template-content\">\n\t\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\t\tlabel={ __( 'Templates' ) }\n\t\t\t\t\t\t\tblockPatterns={ templatesAsPatterns }\n\t\t\t\t\t\t\tshownPatterns={ shownTemplates }\n\t\t\t\t\t\t\tonClickPattern={ (\n\t\t\t\t\t\t\t\ttemplate: ( typeof templatesAsPatterns )[ 0 ]\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tonChangeControl( template.name );\n\t\t\t\t\t\t\t\tsetShowModal( false );\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</Modal>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport PasswordEdit from './edit';\n\nconst passwordField: Field< BasePost > = {\n\tid: 'password',\n\ttype: 'text',\n\tEdit: PasswordEdit,\n\tenableSorting: false,\n\tenableHiding: false,\n\tisVisible: ( item ) => item.status !== 'private',\n};\n\n/**\n * Password field for BasePost.\n */\nexport default passwordField;\n","/**\n * WordPress dependencies\n */\nimport {\n\tCheckboxControl,\n\t__experimentalVStack as VStack,\n\tTextControl,\n} from '@wordpress/components';\nimport type { DataFormControlProps } from '@wordpress/dataviews';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\n\nfunction PasswordEdit( {\n\tdata,\n\tonChange,\n\tfield,\n}: DataFormControlProps< BasePost > ) {\n\tconst [ showPassword, setShowPassword ] = useState(\n\t\t!! field.getValue( { item: data } )\n\t);\n\n\tconst handleTogglePassword = ( value: boolean ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tonChange( { password: '' } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<VStack\n\t\t\tas=\"fieldset\"\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"fields-controls__password\"\n\t\t>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ __( 'Password protected' ) }\n\t\t\t\thelp={ __( 'Only visible to those who know the password' ) }\n\t\t\t\tchecked={ showPassword }\n\t\t\t\tonChange={ handleTogglePassword }\n\t\t\t/>\n\t\t\t{ showPassword && (\n\t\t\t\t<div className=\"fields-controls__password-input\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Password' ) }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ field.getValue( { item: data } ) || '' }\n\t\t\t\t\t\tplaceholder={ __( 'Use a secure password' ) }\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\nexport default PasswordEdit;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Settings } from '@wordpress/core-data';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { BaseTitleView } from '../title/view';\nimport { unlock } from '../../lock-unlock';\nconst { Badge } = unlock( componentsPrivateApis );\n\nexport default function PageTitleView( { item }: { item: CommonPost } ) {\n\tconst { frontPageId, postsPageId } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = getEntityRecord(\n\t\t\t'root',\n\t\t\t'site'\n\t\t) as Partial< Settings >;\n\t\treturn {\n\t\t\tfrontPageId: siteSettings?.page_on_front,\n\t\t\tpostsPageId: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<BaseTitleView item={ item } className=\"fields-field__page-title\">\n\t\t\t{ [ frontPageId, postsPageId ].includes( item.id as number ) && (\n\t\t\t\t<Badge>\n\t\t\t\t\t{ item.id === frontPageId\n\t\t\t\t\t\t? __( 'Homepage' )\n\t\t\t\t\t\t: __( 'Posts Page' ) }\n\t\t\t\t</Badge>\n\t\t\t) }\n\t\t</BaseTitleView>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { BasePost } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport PageTitleView from './view';\n\nconst pageTitleField: Field< BasePost > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: PageTitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the page entity.\n */\nexport default pageTitleField;\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Template } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport TitleView from '../title/view';\n\nconst templateTitleField: Field< Template > = {\n\ttype: 'text',\n\tlabel: __( 'Template' ),\n\tplaceholder: __( 'No title' ),\n\tid: 'title',\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: TitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the template entity.\n */\nexport default templateTitleField;\n","/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n * size is a number specifying the icon size in pixels\n * Other props will be passed to wrapped SVG component\n * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.\n *\n * @return {JSX.Element} Icon component\n */\nfunction Icon( { icon, size = 24, ...props }, ref ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t\tref,\n\t} );\n}\n\nexport default forwardRef( Icon );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst lockSmall = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lockSmall;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, lockSmall } from '@wordpress/icons';\nimport { Tooltip } from '@wordpress/components';\n// @ts-ignore\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport type { CommonPost } from '../../types';\nimport { BaseTitleView } from '../title/view';\nimport { unlock } from '../../lock-unlock';\n\nexport const { PATTERN_TYPES } = unlock( patternPrivateApis );\n\nexport default function PatternTitleView( { item }: { item: CommonPost } ) {\n\treturn (\n\t\t<BaseTitleView item={ item } className=\"fields-field__pattern-title\">\n\t\t\t{ item.type === PATTERN_TYPES.theme && (\n\t\t\t\t<Tooltip\n\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\ttext={ __( 'This pattern cannot be edited.' ) }\n\t\t\t\t>\n\t\t\t\t\t<Icon icon={ lockSmall } size={ 24 } />\n\t\t\t\t</Tooltip>\n\t\t\t) }\n\t\t</BaseTitleView>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Pattern } from '../../types';\nimport { getItemTitle } from '../../actions/utils';\nimport PatternTitleView from './view';\n\nconst patternTitleField: Field< Pattern > = {\n\ttype: 'text',\n\tid: 'title',\n\tlabel: __( 'Title' ),\n\tplaceholder: __( 'No title' ),\n\tgetValue: ( { item } ) => getItemTitle( item ),\n\trender: PatternTitleView,\n\tenableHiding: false,\n\tenableGlobalSearch: true,\n};\n\n/**\n * Title for the pattern entity.\n */\nexport default patternTitleField;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { useRegistry, createRegistry, RegistryProvider } from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { storeConfig as blockEditorStoreConfig } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { storeConfig } from '../../store';\n\nfunction getSubRegistry( subRegistries, registry, useSubRegistry ) {\n\tif ( ! useSubRegistry ) {\n\t\treturn registry;\n\t}\n\tlet subRegistry = subRegistries.get( registry );\n\tif ( ! subRegistry ) {\n\t\tsubRegistry = createRegistry(\n\t\t\t{\n\t\t\t\t'core/block-editor': blockEditorStoreConfig,\n\t\t\t},\n\t\t\tregistry\n\t\t);\n\t\t// Todo: The interface store should also be created per instance.\n\t\tsubRegistry.registerStore( 'core/editor', storeConfig );\n\t\tsubRegistries.set( registry, subRegistry );\n\t}\n\treturn subRegistry;\n}\n\nconst withRegistryProvider = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\t( { useSubRegistry = true, ...props } ) => {\n\t\t\tconst registry = useRegistry();\n\t\t\tconst [ subRegistries ] = useState( () => new WeakMap() );\n\t\t\tconst subRegistry = getSubRegistry(\n\t\t\t\tsubRegistries,\n\t\t\t\tregistry,\n\t\t\t\tuseSubRegistry\n\t\t\t);\n\n\t\t\tif ( subRegistry === registry ) {\n\t\t\t\treturn <WrappedComponent registry={ registry } { ...props } />;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<RegistryProvider value={ subRegistry }>\n\t\t\t\t\t<WrappedComponent registry={ subRegistry } { ...props } />\n\t\t\t\t</RegistryProvider>\n\t\t\t);\n\t\t},\n\t'withRegistryProvider'\n);\n\nexport default withRegistryProvider;\n","/**\n * The `editor` settings here need to be in sync with the corresponding ones in `editor` package.\n * See `packages/editor/src/components/media-categories/index.js`.\n *\n * In the future we could consider creating an Openvese package that can be used in both `editor` and `site-editor`.\n * The rest of the settings would still need to be in sync though.\n */\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _x } from '@wordpress/i18n';\nimport { resolveSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\n\n/** @typedef {import('@wordpress/block-editor').InserterMediaRequest} InserterMediaRequest */\n/** @typedef {import('@wordpress/block-editor').InserterMediaItem} InserterMediaItem */\n/** @typedef {import('@wordpress/block-editor').InserterMediaCategory} InserterMediaCategory */\n\nconst getExternalLink = ( url, text ) =>\n\t`<a ${ getExternalLinkAttributes( url ) }>${ text }</a>`;\n\nconst getExternalLinkAttributes = ( url ) =>\n\t`href=\"${ url }\" target=\"_blank\" rel=\"noreferrer noopener\"`;\n\nconst getOpenverseLicense = ( license, licenseVersion ) => {\n\tlet licenseName = license.trim();\n\t// PDM has no abbreviation\n\tif ( license !== 'pdm' ) {\n\t\tlicenseName = license.toUpperCase().replace( 'SAMPLING', 'Sampling' );\n\t}\n\t// If version is known, append version to the name.\n\t// The license has to have a version to be valid. Only\n\t// PDM (public domain mark) doesn't have a version.\n\tif ( licenseVersion ) {\n\t\tlicenseName += ` ${ licenseVersion }`;\n\t}\n\t// For licenses other than public-domain marks, prepend 'CC' to the name.\n\tif ( ! [ 'pdm', 'cc0' ].includes( license ) ) {\n\t\tlicenseName = `CC ${ licenseName }`;\n\t}\n\treturn licenseName;\n};\n\nconst getOpenverseCaption = ( item ) => {\n\tconst {\n\t\ttitle,\n\t\tforeign_landing_url: foreignLandingUrl,\n\t\tcreator,\n\t\tcreator_url: creatorUrl,\n\t\tlicense,\n\t\tlicense_version: licenseVersion,\n\t\tlicense_url: licenseUrl,\n\t} = item;\n\tconst fullLicense = getOpenverseLicense( license, licenseVersion );\n\tconst _creator = decodeEntities( creator );\n\tlet _caption;\n\tif ( _creator ) {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Name of the work's creator; %3s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\" by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Name of the work's creator; %3s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a> by %2$s/ %3$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tcreatorUrl\n\t\t\t\t\t\t? getExternalLink( creatorUrl, _creator )\n\t\t\t\t\t\t: _creator,\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t} else {\n\t\t_caption = title\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %1s: Title of a media work from Openverse; %2s: Work's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '\"%1$s\"/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLink(\n\t\t\t\t\t\tforeignLandingUrl,\n\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %1s: Link attributes for a given Openverse media work; %2s: Works's licence e.g: \"CC0 1.0\".\n\t\t\t\t\t_x( '<a %1$s>Work</a>/ %2$s', 'caption' ),\n\t\t\t\t\tgetExternalLinkAttributes( foreignLandingUrl ),\n\t\t\t\t\tlicenseUrl\n\t\t\t\t\t\t? getExternalLink(\n\t\t\t\t\t\t\t\t`${ licenseUrl }?ref=openverse`,\n\t\t\t\t\t\t\t\tfullLicense\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: fullLicense\n\t\t\t );\n\t}\n\treturn _caption.replace( /\\s{2}/g, ' ' );\n};\n\nconst coreMediaFetch = async ( query = {} ) => {\n\tconst mediaItems = await resolveSelect( coreStore ).getMediaItems( {\n\t\t...query,\n\t\torderBy: !! query?.search ? 'relevance' : 'date',\n\t} );\n\treturn mediaItems.map( ( mediaItem ) => ( {\n\t\t...mediaItem,\n\t\talt: mediaItem.alt_text,\n\t\turl: mediaItem.source_url,\n\t\tpreviewUrl: mediaItem.media_details?.sizes?.medium?.source_url,\n\t\tcaption: mediaItem.caption?.raw,\n\t} ) );\n};\n\n/** @type {InserterMediaCategory[]} */\nconst inserterMediaCategories = [\n\t{\n\t\tname: 'images',\n\t\tlabels: {\n\t\t\tname: __( 'Images' ),\n\t\t\tsearch_items: __( 'Search images' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'image' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'videos',\n\t\tlabels: {\n\t\t\tname: __( 'Videos' ),\n\t\t\tsearch_items: __( 'Search videos' ),\n\t\t},\n\t\tmediaType: 'video',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'video' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'audio',\n\t\tlabels: {\n\t\t\tname: __( 'Audio' ),\n\t\t\tsearch_items: __( 'Search audio' ),\n\t\t},\n\t\tmediaType: 'audio',\n\t\tasync fetch( query = {} ) {\n\t\t\treturn coreMediaFetch( { ...query, media_type: 'audio' } );\n\t\t},\n\t},\n\t{\n\t\tname: 'openverse',\n\t\tlabels: {\n\t\t\tname: __( 'Openverse' ),\n\t\t\tsearch_items: __( 'Search Openverse' ),\n\t\t},\n\t\tmediaType: 'image',\n\t\tasync fetch( query = {} ) {\n\t\t\tconst defaultArgs = {\n\t\t\t\tmature: false,\n\t\t\t\texcluded_source: 'flickr,inaturalist,wikimedia',\n\t\t\t\tlicense: 'pdm,cc0',\n\t\t\t};\n\t\t\tconst finalQuery = { ...query, ...defaultArgs };\n\t\t\tconst mapFromInserterMediaRequest = {\n\t\t\t\tper_page: 'page_size',\n\t\t\t\tsearch: 'q',\n\t\t\t};\n\t\t\tconst url = new URL( 'https://api.openverse.org/v1/images/' );\n\t\t\tObject.entries( finalQuery ).forEach( ( [ key, value ] ) => {\n\t\t\t\tconst queryKey = mapFromInserterMediaRequest[ key ] || key;\n\t\t\t\turl.searchParams.set( queryKey, value );\n\t\t\t} );\n\t\t\tconst response = await window.fetch( url, {\n\t\t\t\theaders: {\n\t\t\t\t\t'User-Agent': 'WordPress/inserter-media-fetch',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst jsonResponse = await response.json();\n\t\t\tconst results = jsonResponse.results;\n\t\t\treturn results.map( ( result ) => ( {\n\t\t\t\t...result,\n\t\t\t\t// This is a temp solution for better titles, until Openverse API\n\t\t\t\t// completes the cleaning up of some titles of their upstream data.\n\t\t\t\ttitle: result.title?.toLowerCase().startsWith( 'file:' )\n\t\t\t\t\t? result.title.slice( 5 )\n\t\t\t\t\t: result.title,\n\t\t\t\tsourceId: result.id,\n\t\t\t\tid: undefined,\n\t\t\t\tcaption: getOpenverseCaption( result ),\n\t\t\t\tpreviewUrl: result.thumbnail,\n\t\t\t} ) );\n\t\t},\n\t\tgetReportUrl: ( { sourceId } ) =>\n\t\t\t`https://wordpress.org/openverse/image/${ sourceId }/report/`,\n\t\tisExternalResource: true,\n\t},\n];\n\nexport default inserterMediaCategories;\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { select, dispatch } from '@wordpress/data';\nimport { uploadMedia } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\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 {?Object} $0.additionalData Additional data to include in the request.\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 * @param {Function} $0.onSuccess Function called after the final representation of the file is available.\n */\nexport default function mediaUpload( {\n\tadditionalData = {},\n\tallowedTypes,\n\tfilesList,\n\tmaxUploadFileSize,\n\tonError = noop,\n\tonFileChange,\n\tonSuccess,\n} ) {\n\tconst { getCurrentPost, getEditorSettings } = select( editorStore );\n\tconst {\n\t\tlockPostAutosaving,\n\t\tunlockPostAutosaving,\n\t\tlockPostSaving,\n\t\tunlockPostSaving,\n\t} = dispatch( editorStore );\n\n\tconst wpAllowedMimeTypes = getEditorSettings().allowedMimeTypes;\n\tconst lockKey = `image-upload-${ uuid() }`;\n\tlet imageIsUploading = false;\n\tmaxUploadFileSize =\n\t\tmaxUploadFileSize || getEditorSettings().maxUploadFileSize;\n\tconst currentPost = getCurrentPost();\n\t// Templates and template parts' numerical ID is stored in `wp_id`.\n\tconst currentPostId =\n\t\ttypeof currentPost?.id === 'number'\n\t\t\t? currentPost.id\n\t\t\t: currentPost?.wp_id;\n\tconst setSaveLock = () => {\n\t\tlockPostSaving( lockKey );\n\t\tlockPostAutosaving( lockKey );\n\t\timageIsUploading = true;\n\t};\n\n\tconst postData = currentPostId ? { post: currentPostId } : {};\n\tconst clearSaveLock = () => {\n\t\tunlockPostSaving( lockKey );\n\t\tunlockPostAutosaving( lockKey );\n\t\timageIsUploading = false;\n\t};\n\n\tuploadMedia( {\n\t\tallowedTypes,\n\t\tfilesList,\n\t\tonFileChange: ( file ) => {\n\t\t\tif ( ! imageIsUploading ) {\n\t\t\t\tsetSaveLock();\n\t\t\t} else {\n\t\t\t\tclearSaveLock();\n\t\t\t}\n\t\t\tonFileChange?.( file );\n\t\t},\n\t\tonSuccess,\n\t\tadditionalData: {\n\t\t\t...postData,\n\t\t\t...additionalData,\n\t\t},\n\t\tmaxUploadFileSize,\n\t\tonError: ( { message } ) => {\n\t\t\tclearSaveLock();\n\t\t\tonError( message );\n\t\t},\n\t\twpAllowedMimeTypes,\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis } from '@wordpress/media-utils';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { sideloadMedia: mediaSideload } = unlock( privateApis );\n\nexport default mediaSideload;\n","/*!\n * is-plain-object <https://github.com/jonschlinkert/is-plain-object>\n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","/**\n * External dependencies\n */\nimport deepmerge from 'deepmerge';\nimport { isPlainObject } from 'is-plain-object';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, cleanEmptyObject } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport function mergeBaseAndUserConfigs( base, user ) {\n\treturn deepmerge( base, user, {\n\t\t/*\n\t\t * We only pass as arrays the presets,\n\t\t * in which case we want the new array of values\n\t\t * to override the old array (no merging).\n\t\t */\n\t\tisMergeableObject: isPlainObject,\n\t\t/*\n\t\t * Exceptions to the above rule.\n\t\t * Background images should be replaced, not merged,\n\t\t * as they themselves are specific object definitions for the style.\n\t\t */\n\t\tcustomMerge: ( key ) => {\n\t\t\tif ( key === 'backgroundImage' ) {\n\t\t\t\treturn ( baseConfig, userConfig ) => userConfig;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t},\n\t} );\n}\n\nfunction useGlobalStylesUserConfig() {\n\tconst { globalStylesId, isReady, settings, styles, _links } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t\thasFinishedResolution,\n\t\t\t\tcanUser,\n\t\t\t} = select( coreStore );\n\t\t\tconst _globalStylesId =\n\t\t\t\tselect( coreStore ).__experimentalGetCurrentGlobalStylesId();\n\n\t\t\tlet record;\n\n\t\t\t/*\n\t\t\t * Ensure that the global styles ID request is complete by testing `_globalStylesId`,\n\t\t\t * before firing off the `canUser` OPTIONS request for user capabilities, otherwise it will\n\t\t\t * fetch `/wp/v2/global-styles` instead of `/wp/v2/global-styles/{id}`.\n\t\t\t * NOTE: Please keep in sync any preload paths sent to `block_editor_rest_api_preload()`,\n\t\t\t * or set using the `block_editor_rest_api_preload_paths` filter, if this changes.\n\t\t\t */\n\t\t\tconst userCanEditGlobalStyles = _globalStylesId\n\t\t\t\t? canUser( 'update', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'globalStyles',\n\t\t\t\t\t\tid: _globalStylesId,\n\t\t\t\t } )\n\t\t\t\t: null;\n\n\t\t\tif (\n\t\t\t\t_globalStylesId &&\n\t\t\t\t/*\n\t\t\t\t * Test that the OPTIONS request for user capabilities is complete\n\t\t\t\t * before fetching the global styles entity record.\n\t\t\t\t * This is to avoid fetching the global styles entity unnecessarily.\n\t\t\t\t */\n\t\t\t\ttypeof userCanEditGlobalStyles === 'boolean'\n\t\t\t) {\n\t\t\t\t/*\n\t\t\t\t * Fetch the global styles entity record based on the user's capabilities.\n\t\t\t\t * The default context is `edit` for users who can edit global styles.\n\t\t\t\t * Otherwise, the context is `view`.\n\t\t\t\t * NOTE: There is an equivalent conditional check using `current_user_can()` in the backend\n\t\t\t\t * to preload the global styles entity. Please keep in sync any preload paths sent to `block_editor_rest_api_preload()`,\n\t\t\t\t * or set using `block_editor_rest_api_preload_paths` filter, if this changes.\n\t\t\t\t */\n\t\t\t\tif ( userCanEditGlobalStyles ) {\n\t\t\t\t\trecord = getEditedEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\trecord = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t{ context: 'view' }\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet hasResolved = false;\n\t\t\tif (\n\t\t\t\thasFinishedResolution(\n\t\t\t\t\t'__experimentalGetCurrentGlobalStylesId'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif ( _globalStylesId ) {\n\t\t\t\t\thasResolved = userCanEditGlobalStyles\n\t\t\t\t\t\t? hasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t ] )\n\t\t\t\t\t\t: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t\t\t\t'root',\n\t\t\t\t\t\t\t\t'globalStyles',\n\t\t\t\t\t\t\t\t_globalStylesId,\n\t\t\t\t\t\t\t\t{ context: 'view' },\n\t\t\t\t\t\t ] );\n\t\t\t\t} else {\n\t\t\t\t\thasResolved = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tglobalStylesId: _globalStylesId,\n\t\t\t\tisReady: hasResolved,\n\t\t\t\tsettings: record?.settings,\n\t\t\t\tstyles: record?.styles,\n\t\t\t\t_links: record?._links,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst config = useMemo( () => {\n\t\treturn {\n\t\t\tsettings: settings ?? {},\n\t\t\tstyles: styles ?? {},\n\t\t\t_links: _links ?? {},\n\t\t};\n\t}, [ settings, styles, _links ] );\n\n\tconst setConfig = useCallback(\n\t\t/**\n\t\t * Set the global styles config.\n\t\t * @param {Function|Object} callbackOrObject If the callbackOrObject is a function, pass the current config to the callback so the consumer can merge values.\n\t\t * Otherwise, overwrite the current config with the incoming object.\n\t\t * @param {Object} options Options for editEntityRecord Core selector.\n\t\t */\n\t\t( callbackOrObject, options = {} ) => {\n\t\t\tconst record = getEditedEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId\n\t\t\t);\n\n\t\t\tconst currentConfig = {\n\t\t\t\tstyles: record?.styles ?? {},\n\t\t\t\tsettings: record?.settings ?? {},\n\t\t\t\t_links: record?._links ?? {},\n\t\t\t};\n\n\t\t\tconst updatedConfig =\n\t\t\t\ttypeof callbackOrObject === 'function'\n\t\t\t\t\t? callbackOrObject( currentConfig )\n\t\t\t\t\t: callbackOrObject;\n\n\t\t\teditEntityRecord(\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t{\n\t\t\t\t\tstyles: cleanEmptyObject( updatedConfig.styles ) || {},\n\t\t\t\t\tsettings: cleanEmptyObject( updatedConfig.settings ) || {},\n\t\t\t\t\t_links: cleanEmptyObject( updatedConfig._links ) || {},\n\t\t\t\t},\n\t\t\t\toptions\n\t\t\t);\n\t\t},\n\t\t[ globalStylesId, editEntityRecord, getEditedEntityRecord ]\n\t);\n\n\treturn [ isReady, config, setConfig ];\n}\n\nfunction useGlobalStylesBaseConfig() {\n\tconst baseConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).__experimentalGetCurrentThemeBaseGlobalStyles(),\n\t\t[]\n\t);\n\treturn [ !! baseConfig, baseConfig ];\n}\n\nexport function useGlobalStylesContext() {\n\tconst [ isUserConfigReady, userConfig, setUserConfig ] =\n\t\tuseGlobalStylesUserConfig();\n\tconst [ isBaseConfigReady, baseConfig ] = useGlobalStylesBaseConfig();\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! baseConfig || ! userConfig ) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t}, [ userConfig, baseConfig ] );\n\n\tconst context = useMemo( () => {\n\t\treturn {\n\t\t\tisReady: isUserConfigReady && isBaseConfigReady,\n\t\t\tuser: userConfig,\n\t\t\tbase: baseConfig,\n\t\t\tmerged: mergedConfig,\n\t\t\tsetUserConfig,\n\t\t};\n\t}, [\n\t\tmergedConfig,\n\t\tuserConfig,\n\t\tbaseConfig,\n\t\tsetUserConfig,\n\t\tisUserConfigReady,\n\t\tisBaseConfigReady,\n\t] );\n\n\treturn context;\n}\n\nexport function GlobalStylesProvider( { children } ) {\n\tconst context = useGlobalStylesContext();\n\tif ( ! context.isReady ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ children }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as coreStore,\n\t__experimentalFetchLinkSuggestions as fetchLinkSuggestions,\n\t__experimentalFetchUrlData as fetchUrlData,\n\tprivateApis as coreDataPrivateApis,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tprivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport inserterMediaCategories from '../media-categories';\nimport { mediaUpload } from '../../utils';\nimport { default as mediaSideload } from '../../utils/media-sideload';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useGlobalStylesContext } from '../global-styles-provider';\n\nconst EMPTY_OBJECT = {};\n\nfunction __experimentalReusableBlocksSelect( select ) {\n\tconst { RECEIVE_INTERMEDIATE_RESULTS } = unlock( coreDataPrivateApis );\n\tconst { getEntityRecords } = select( coreStore );\n\treturn getEntityRecords( 'postType', 'wp_block', {\n\t\tper_page: -1,\n\t\t[ RECEIVE_INTERMEDIATE_RESULTS ]: true,\n\t} );\n}\n\nconst BLOCK_EDITOR_SETTINGS = [\n\t'__experimentalBlockDirectory',\n\t'__experimentalDiscussionSettings',\n\t'__experimentalFeatures',\n\t'__experimentalGlobalStylesBaseStyles',\n\t'alignWide',\n\t'blockInspectorTabs',\n\t'maxUploadFileSize',\n\t'allowedMimeTypes',\n\t'bodyPlaceholder',\n\t'canLockBlocks',\n\t'canUpdateBlockBindings',\n\t'capabilities',\n\t'clearBlockSelection',\n\t'codeEditingEnabled',\n\t'colors',\n\t'disableCustomColors',\n\t'disableCustomFontSizes',\n\t'disableCustomSpacingSizes',\n\t'disableCustomGradients',\n\t'disableLayoutStyles',\n\t'enableCustomLineHeight',\n\t'enableCustomSpacing',\n\t'enableCustomUnits',\n\t'enableOpenverseMediaCategory',\n\t'fontSizes',\n\t'gradients',\n\t'generateAnchors',\n\t'onNavigateToEntityRecord',\n\t'imageDefaultSize',\n\t'imageDimensions',\n\t'imageEditing',\n\t'imageSizes',\n\t'isPreviewMode',\n\t'isRTL',\n\t'locale',\n\t'maxWidth',\n\t'postContentAttributes',\n\t'postsPerPage',\n\t'readOnly',\n\t'styles',\n\t'titlePlaceholder',\n\t'supportsLayout',\n\t'widgetTypesToHideFromLegacyWidgetBlock',\n\t'__unstableHasCustomAppender',\n\t'__unstableResolvedAssets',\n\t'__unstableIsBlockBasedTheme',\n];\n\nconst {\n\tglobalStylesDataKey,\n\tglobalStylesLinksDataKey,\n\tselectBlockPatternsKey,\n\treusableBlocksSelectKey,\n\tsectionRootClientIdKey,\n} = unlock( privateApis );\n\n/**\n * React hook used to compute the block editor settings to use for the post editor.\n *\n * @param {Object} settings EditorProvider settings prop.\n * @param {string} postType Editor root level post type.\n * @param {string} postId Editor root level post ID.\n * @param {string} renderingMode Editor rendering mode.\n *\n * @return {Object} Block Editor Settings.\n */\nfunction useBlockEditorSettings( settings, postType, postId, renderingMode ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst {\n\t\tallowRightClickOverrides,\n\t\tblockTypes,\n\t\tfocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\thasUploadPermissions,\n\t\thiddenBlockTypes,\n\t\tcanUseUnfilteredHTML,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tuserPatternCategories,\n\t\trestBlockPatternCategories,\n\t\tsectionRootClientId,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanUser,\n\t\t\t\tgetRawEntityRecord,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetUserPatternCategories,\n\t\t\t\tgetBlockPatternCategories,\n\t\t\t} = select( coreStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { getBlockTypes } = select( blocksStore );\n\t\t\tconst { getBlocksByName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\n\t\t\tfunction getSectionRootBlock() {\n\t\t\t\tif ( renderingMode === 'template-locked' ) {\n\t\t\t\t\treturn getBlocksByName( 'core/post-content' )?.[ 0 ] ?? '';\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tgetBlocksByName( 'core/group' ).find(\n\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\tgetBlockAttributes( clientId )?.tagName === 'main'\n\t\t\t\t\t) ?? ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tallowRightClickOverrides: get(\n\t\t\t\t\t'core',\n\t\t\t\t\t'allowRightClickOverrides'\n\t\t\t\t),\n\t\t\t\tblockTypes: getBlockTypes(),\n\t\t\t\tcanUseUnfilteredHTML: getRawEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t)?._links?.hasOwnProperty( 'wp:action-unfiltered-html' ),\n\t\t\t\tfocusMode: get( 'core', 'focusMode' ),\n\t\t\t\thasFixedToolbar:\n\t\t\t\t\tget( 'core', 'fixedToolbar' ) || ! isLargeViewport,\n\t\t\t\thiddenBlockTypes: get( 'core', 'hiddenBlockTypes' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tkeepCaretInsideBlock: get( 'core', 'keepCaretInsideBlock' ),\n\t\t\t\thasUploadPermissions:\n\t\t\t\t\tcanUser( 'create', {\n\t\t\t\t\t\tkind: 'root',\n\t\t\t\t\t\tname: 'media',\n\t\t\t\t\t} ) ?? true,\n\t\t\t\tuserCanCreatePages: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'page',\n\t\t\t\t} ),\n\t\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t\t\tuserPatternCategories: getUserPatternCategories(),\n\t\t\t\trestBlockPatternCategories: getBlockPatternCategories(),\n\t\t\t\tsectionRootClientId: getSectionRootBlock(),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, isLargeViewport, renderingMode ]\n\t);\n\n\tconst { merged: mergedGlobalStyles } = useGlobalStylesContext();\n\tconst globalStylesData = mergedGlobalStyles.styles ?? EMPTY_OBJECT;\n\tconst globalStylesLinksData = mergedGlobalStyles._links ?? EMPTY_OBJECT;\n\n\tconst settingsBlockPatterns =\n\t\tsettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatterns; // WP 5.9\n\tconst settingsBlockPatternCategories =\n\t\tsettings.__experimentalAdditionalBlockPatternCategories ?? // WP 6.0\n\t\tsettings.__experimentalBlockPatternCategories; // WP 5.9\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( settingsBlockPatterns || [] ) ].filter(\n\t\t\t\t( { postTypes } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t! postTypes ||\n\t\t\t\t\t\t( Array.isArray( postTypes ) &&\n\t\t\t\t\t\t\tpostTypes.includes( postType ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t),\n\t\t[ settingsBlockPatterns, postType ]\n\t);\n\n\tconst blockPatternCategories = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatternCategories || [] ),\n\t\t\t\t...( restBlockPatternCategories || [] ),\n\t\t\t].filter(\n\t\t\t\t( x, index, arr ) =>\n\t\t\t\t\tindex === arr.findIndex( ( y ) => x.name === y.name )\n\t\t\t),\n\t\t[ settingsBlockPatternCategories, restBlockPatternCategories ]\n\t);\n\n\tconst { undo, setIsInserterOpened } = useDispatch( editorStore );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\t/**\n\t * Creates a Post entity.\n\t * This is utilised by the Link UI to allow for on-the-fly creation of Posts/Pages.\n\t *\n\t * @param {Object} options parameters for the post being created. These mirror those used on 3rd param of saveEntityRecord.\n\t * @return {Object} the post type object that was created.\n\t */\n\tconst createPageEntity = useCallback(\n\t\t( options ) => {\n\t\t\tif ( ! userCanCreatePages ) {\n\t\t\t\treturn Promise.reject( {\n\t\t\t\t\tmessage: __(\n\t\t\t\t\t\t'You do not have permission to create Pages.'\n\t\t\t\t\t),\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn saveEntityRecord( 'postType', 'page', options );\n\t\t},\n\t\t[ saveEntityRecord, userCanCreatePages ]\n\t);\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\t// Omit hidden block types if exists and non-empty.\n\t\tif ( hiddenBlockTypes && hiddenBlockTypes.length > 0 ) {\n\t\t\t// Defer to passed setting for `allowedBlockTypes` if provided as\n\t\t\t// anything other than `true` (where `true` is equivalent to allow\n\t\t\t// all block types).\n\t\t\tconst defaultAllowedBlockTypes =\n\t\t\t\ttrue === settings.allowedBlockTypes\n\t\t\t\t\t? blockTypes.map( ( { name } ) => name )\n\t\t\t\t\t: settings.allowedBlockTypes || [];\n\n\t\t\treturn defaultAllowedBlockTypes.filter(\n\t\t\t\t( type ) => ! hiddenBlockTypes.includes( type )\n\t\t\t);\n\t\t}\n\n\t\treturn settings.allowedBlockTypes;\n\t}, [ settings.allowedBlockTypes, hiddenBlockTypes, blockTypes ] );\n\n\tconst forceDisableFocusMode = settings.focusMode === false;\n\n\treturn useMemo( () => {\n\t\tconst blockEditorSettings = {\n\t\t\t...Object.fromEntries(\n\t\t\t\tObject.entries( settings ).filter( ( [ key ] ) =>\n\t\t\t\t\tBLOCK_EDITOR_SETTINGS.includes( key )\n\t\t\t\t)\n\t\t\t),\n\t\t\t[ globalStylesDataKey ]: globalStylesData,\n\t\t\t[ globalStylesLinksDataKey ]: globalStylesLinksData,\n\t\t\tallowedBlockTypes,\n\t\t\tallowRightClickOverrides,\n\t\t\tfocusMode: focusMode && ! forceDisableFocusMode,\n\t\t\thasFixedToolbar,\n\t\t\tisDistractionFree,\n\t\t\tkeepCaretInsideBlock,\n\t\t\tmediaUpload: hasUploadPermissions ? mediaUpload : undefined,\n\t\t\tmediaSideload: hasUploadPermissions ? mediaSideload : undefined,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t[ selectBlockPatternsKey ]: ( select ) => {\n\t\t\t\tconst { hasFinishedResolution, getBlockPatternsForPostType } =\n\t\t\t\t\tunlock( select( coreStore ) );\n\t\t\t\tconst patterns = getBlockPatternsForPostType( postType );\n\t\t\t\treturn hasFinishedResolution( 'getBlockPatterns' )\n\t\t\t\t\t? patterns\n\t\t\t\t\t: undefined;\n\t\t\t},\n\t\t\t[ reusableBlocksSelectKey ]: __experimentalReusableBlocksSelect,\n\t\t\t__experimentalBlockPatternCategories: blockPatternCategories,\n\t\t\t__experimentalUserPatternCategories: userPatternCategories,\n\t\t\t__experimentalFetchLinkSuggestions: ( search, searchOptions ) =>\n\t\t\t\tfetchLinkSuggestions( search, searchOptions, settings ),\n\t\t\tinserterMediaCategories,\n\t\t\t__experimentalFetchRichUrlData: fetchUrlData,\n\t\t\t// Todo: This only checks the top level post, not the post within a template or any other entity that can be edited.\n\t\t\t// This might be better as a generic \"canUser\" selector.\n\t\t\t__experimentalCanUserUseUnfilteredHTML: canUseUnfilteredHTML,\n\t\t\t//Todo: this is only needed for native and should probably be removed.\n\t\t\t__experimentalUndo: undo,\n\t\t\t// Check whether we want all site editor frames to have outlines\n\t\t\t// including the navigation / pattern / parts editors.\n\t\t\toutlineMode: ! isDistractionFree && postType === 'wp_template',\n\t\t\t// Check these two properties: they were not present in the site editor.\n\t\t\t__experimentalCreatePageEntity: createPageEntity,\n\t\t\t__experimentalUserCanCreatePages: userCanCreatePages,\n\t\t\tpageOnFront,\n\t\t\tpageForPosts,\n\t\t\t__experimentalPreferPatternsOnRoot: postType === 'wp_template',\n\t\t\ttemplateLock:\n\t\t\t\tpostType === 'wp_navigation' ? 'insert' : settings.templateLock,\n\t\t\ttemplate:\n\t\t\t\tpostType === 'wp_navigation'\n\t\t\t\t\t? [ [ 'core/navigation', {}, [] ] ]\n\t\t\t\t\t: settings.template,\n\t\t\t__experimentalSetIsInserterOpened: setIsInserterOpened,\n\t\t\t[ sectionRootClientIdKey ]: sectionRootClientId,\n\t\t\teditorTool:\n\t\t\t\trenderingMode === 'post-only' && postType !== 'wp_template'\n\t\t\t\t\t? 'edit'\n\t\t\t\t\t: undefined,\n\t\t};\n\n\t\treturn blockEditorSettings;\n\t}, [\n\t\tallowedBlockTypes,\n\t\tallowRightClickOverrides,\n\t\tfocusMode,\n\t\tforceDisableFocusMode,\n\t\thasFixedToolbar,\n\t\tisDistractionFree,\n\t\tkeepCaretInsideBlock,\n\t\tsettings,\n\t\thasUploadPermissions,\n\t\tuserPatternCategories,\n\t\tblockPatterns,\n\t\tblockPatternCategories,\n\t\tcanUseUnfilteredHTML,\n\t\tundo,\n\t\tcreatePageEntity,\n\t\tuserCanCreatePages,\n\t\tpageOnFront,\n\t\tpageForPosts,\n\t\tpostType,\n\t\tsetIsInserterOpened,\n\t\tsectionRootClientId,\n\t\tglobalStylesData,\n\t\tglobalStylesLinksData,\n\t\trenderingMode,\n\t] );\n}\n\nexport default useBlockEditorSettings;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst POST_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n\nexport default function usePostContentBlocks() {\n\tconst contentOnlyBlockTypes = useMemo(\n\t\t() => [\n\t\t\t...applyFilters(\n\t\t\t\t'editor.postContentBlockTypes',\n\t\t\t\tPOST_CONTENT_BLOCK_TYPES\n\t\t\t),\n\t\t],\n\t\t[]\n\t);\n\n\t// Note that there are two separate subscriptions because the result for each\n\t// returns a new array.\n\tconst contentOnlyIds = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostBlocksByName } = unlock( select( editorStore ) );\n\t\t\treturn getPostBlocksByName( contentOnlyBlockTypes );\n\t\t},\n\t\t[ contentOnlyBlockTypes ]\n\t);\n\n\treturn contentOnlyIds;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useRegistry } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport usePostContentBlocks from './use-post-content-blocks';\n\n/**\n * Component that when rendered, makes it so that the site editor allows only\n * page content to be edited.\n */\nexport default function DisableNonPageContentBlocks() {\n\tconst contentOnlyIds = usePostContentBlocks();\n\tconst { templateParts, isNavigationMode } = useSelect( ( select ) => {\n\t\tconst { getBlocksByName, isNavigationMode: _isNavigationMode } =\n\t\t\tselect( blockEditorStore );\n\t\treturn {\n\t\t\ttemplateParts: getBlocksByName( 'core/template-part' ),\n\t\t\tisNavigationMode: _isNavigationMode(),\n\t\t};\n\t}, [] );\n\tconst disabledIds = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockOrder } = select( blockEditorStore );\n\t\t\treturn templateParts.flatMap( ( clientId ) =>\n\t\t\t\tgetBlockOrder( clientId )\n\t\t\t);\n\t\t},\n\t\t[ templateParts ]\n\t);\n\n\tconst registry = useRegistry();\n\n\t// The code here is split into multiple `useEffects` calls.\n\t// This is done to avoid setting/unsetting block editing modes multiple times unnecessarily.\n\t//\n\t// For example, the block editing mode of the root block (clientId: '') only\n\t// needs to be set once, not when `contentOnlyIds` or `disabledIds` change.\n\t//\n\t// It's also unlikely that these different types of blocks are being inserted\n\t// or removed at the same time, so using different effects reflects that.\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tsetBlockEditingMode( '', 'disabled' );\n\n\t\treturn () => {\n\t\t\tunsetBlockEditingMode( '' );\n\t\t};\n\t}, [ registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tfor ( const clientId of contentOnlyIds ) {\n\t\t\t\tsetBlockEditingMode( clientId, 'contentOnly' );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tfor ( const clientId of contentOnlyIds ) {\n\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ contentOnlyIds, registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tif ( ! isNavigationMode ) {\n\t\t\t\tfor ( const clientId of templateParts ) {\n\t\t\t\t\tsetBlockEditingMode( clientId, 'contentOnly' );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tif ( ! isNavigationMode ) {\n\t\t\t\t\tfor ( const clientId of templateParts ) {\n\t\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ templateParts, isNavigationMode, registry ] );\n\n\tuseEffect( () => {\n\t\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\t\tregistry.dispatch( blockEditorStore );\n\n\t\tregistry.batch( () => {\n\t\t\tfor ( const clientId of disabledIds ) {\n\t\t\t\tsetBlockEditingMode( clientId, 'disabled' );\n\t\t\t}\n\t\t} );\n\n\t\treturn () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tfor ( const clientId of disabledIds ) {\n\t\t\t\t\tunsetBlockEditingMode( clientId );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\t}, [ disabledIds, registry ] );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * For the Navigation block editor, we need to force the block editor to contentOnly for that block.\n *\n * Set block editing mode to contentOnly when entering Navigation focus mode.\n * this ensures that non-content controls on the block will be hidden and thus\n * the user can focus on editing the Navigation Menu content only.\n */\n\nexport default function NavigationBlockEditingMode() {\n\t// In the navigation block editor,\n\t// the navigation block is the only root block.\n\tconst blockClientId = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockOrder()?.[ 0 ],\n\t\t[]\n\t);\n\tconst { setBlockEditingMode, unsetBlockEditingMode } =\n\t\tuseDispatch( blockEditorStore );\n\n\tuseEffect( () => {\n\t\tif ( ! blockClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetBlockEditingMode( blockClientId, 'contentOnly' );\n\n\t\treturn () => {\n\t\t\tunsetBlockEditingMode( blockClientId );\n\t\t};\n\t}, [ blockClientId, unsetBlockEditingMode, setBlockEditingMode ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { addFilter, removeFilter } from '@wordpress/hooks';\n\n// These post types are \"structural\" block lists.\n// We should be allowed to use\n// the post content and template parts blocks within them.\nconst POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART = [\n\t'wp_block',\n\t'wp_template',\n\t'wp_template_part',\n];\n\n/**\n * In some specific contexts,\n * the template part and post content blocks need to be hidden.\n *\n * @param {string} postType Post Type\n * @param {string} mode Rendering mode\n */\nexport function useHideBlocksFromInserter( postType, mode ) {\n\tuseEffect( () => {\n\t\t/*\n\t\t * Prevent adding template part in the editor.\n\t\t */\n\t\taddFilter(\n\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t'removeTemplatePartsFromInserter',\n\t\t\t( canInsert, blockType ) => {\n\t\t\t\tif (\n\t\t\t\t\t! POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) &&\n\t\t\t\t\tblockType.name === 'core/template-part' &&\n\t\t\t\t\tmode === 'post-only'\n\t\t\t\t) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn canInsert;\n\t\t\t}\n\t\t);\n\n\t\t/*\n\t\t * Prevent adding post content block (except in query block) in the editor.\n\t\t */\n\t\taddFilter(\n\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t'removePostContentFromInserter',\n\t\t\t(\n\t\t\t\tcanInsert,\n\t\t\t\tblockType,\n\t\t\t\trootClientId,\n\t\t\t\t{ getBlockParentsByBlockName }\n\t\t\t) => {\n\t\t\t\tif (\n\t\t\t\t\t! POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART.includes(\n\t\t\t\t\t\tpostType\n\t\t\t\t\t) &&\n\t\t\t\t\tblockType.name === 'core/post-content'\n\t\t\t\t) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tgetBlockParentsByBlockName( rootClientId, 'core/query' )\n\t\t\t\t\t\t\t.length > 0\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn canInsert;\n\t\t\t}\n\t\t);\n\n\t\treturn () => {\n\t\t\tremoveFilter(\n\t\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t\t'removeTemplatePartsFromInserter'\n\t\t\t);\n\t\t\tremoveFilter(\n\t\t\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\t\t\t'removePostContentFromInserter'\n\t\t\t);\n\t\t};\n\t}, [ postType, mode ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst keyboard = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m16 15.5h-8v-1.5h8zm-7.5-2.5h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm-9-3h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2zm3 0h-2v-2h2z\" />\n\t\t<Path d=\"m18.5 6.5h-13a.5.5 0 0 0 -.5.5v9.5a.5.5 0 0 0 .5.5h13a.5.5 0 0 0 .5-.5v-9.5a.5.5 0 0 0 -.5-.5zm-13-1.5h13a2 2 0 0 1 2 2v9.5a2 2 0 0 1 -2 2h-13a2 2 0 0 1 -2-2v-9.5a2 2 0 0 1 2-2z\" />\n\t</SVG>\n);\n\nexport default keyboard;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst listView = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M3 6h11v1.5H3V6Zm3.5 5.5h11V13h-11v-1.5ZM21 17H10v1.5h11V17Z\" />\n\t</SVG>\n);\n\nexport default listView;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst code = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M20.8 10.7l-4.3-4.3-1.1 1.1 4.3 4.3c.1.1.1.3 0 .4l-4.3 4.3 1.1 1.1 4.3-4.3c.7-.8.7-1.9 0-2.6zM4.2 11.8l4.3-4.3-1-1-4.3 4.3c-.7.7-.7 1.8 0 2.5l4.3 4.3 1.1-1.1-4.3-4.3c-.2-.1-.2-.3-.1-.4z\" />\n\t</SVG>\n);\n\nexport default code;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerLeft = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM8.5 18.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h2.5v13zm10-.5c0 .3-.2.5-.5.5h-8v-13h8c.3 0 .5.2.5.5v12z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drawerLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerRight = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drawerRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockDefault = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z\" />\n\t</SVG>\n);\n\nexport default blockDefault;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatListBullets = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\" />\n\t</SVG>\n);\n\nexport default formatListBullets;\n","/**\n * Internal dependencies\n */\n\nimport { default as pencil } from './pencil';\nexport default pencil;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pencil = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z\" />\n\t</SVG>\n);\n\nexport default pencil;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbol = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n\nexport default symbol;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst page = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z\" />\n\t\t<Path d=\"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z\" />\n\t</SVG>\n);\n\nexport default page;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst rotateRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z\" />\n\t</SVG>\n);\n\nexport default rotateRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst rotateLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z\" />\n\t</SVG>\n);\n\nexport default rotateLeft;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"commands\"];","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z\" />\n\t</SVG>\n);\n\nexport default starFilled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst starEmpty = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default starEmpty;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"viewport\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"plugins\"];","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\nexport function normalizeComplementaryAreaScope( scope ) {\n\tif ( [ 'core/edit-post', 'core/edit-site' ].includes( scope ) ) {\n\t\tdeprecated( `${ scope } interface scope`, {\n\t\t\talternative: 'core interface scope',\n\t\t\thint: 'core/edit-post and core/edit-site are merging.',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'core';\n\t}\n\n\treturn scope;\n}\n\nexport function normalizeComplementaryAreaName( scope, name ) {\n\tif ( scope === 'core' && name === 'edit-site/template' ) {\n\t\tdeprecated( `edit-site/template sidebar`, {\n\t\t\talternative: 'edit-post/document',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/document';\n\t}\n\n\tif ( scope === 'core' && name === 'edit-site/block-inspector' ) {\n\t\tdeprecated( `edit-site/block-inspector sidebar`, {\n\t\t\talternative: 'edit-post/block',\n\t\t\tversion: '6.6',\n\t\t} );\n\t\treturn 'edit-post/block';\n\t}\n\n\treturn name;\n}\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Set a default complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n *\n * @return {Object} Action object.\n */\nexport const setDefaultComplementaryArea = ( scope, area ) => {\n\tscope = normalizeComplementaryAreaScope( scope );\n\tarea = normalizeComplementaryAreaName( scope, area );\n\treturn {\n\t\ttype: 'SET_DEFAULT_COMPLEMENTARY_AREA',\n\t\tscope,\n\t\tarea,\n\t};\n};\n\n/**\n * Enable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n * @param {string} area Area identifier.\n */\nexport const enableComplementaryArea =\n\t( scope, area ) =>\n\t( { registry, dispatch } ) => {\n\t\t// Return early if there's no area.\n\t\tif ( ! area ) {\n\t\t\treturn;\n\t\t}\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tarea = normalizeComplementaryAreaName( scope, area );\n\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( ! isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', true );\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'ENABLE_COMPLEMENTARY_AREA',\n\t\t\tscope,\n\t\t\tarea,\n\t\t} );\n\t};\n\n/**\n * Disable the complementary area.\n *\n * @param {string} scope Complementary area scope.\n */\nexport const disableComplementaryArea =\n\t( scope ) =>\n\t( { registry } ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'isComplementaryAreaVisible' );\n\n\t\tif ( isComplementaryAreaVisible ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( preferencesStore )\n\t\t\t\t.set( scope, 'isComplementaryAreaVisible', false );\n\t\t}\n\t};\n\n/**\n * Pins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n *\n * @return {Object} Action object.\n */\nexport const pinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\t// The item is already pinned, there's nothing to do.\n\t\tif ( pinnedItems?.[ item ] === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: true,\n\t\t} );\n\t};\n\n/**\n * Unpins an item.\n *\n * @param {string} scope Item scope.\n * @param {string} item Item identifier.\n */\nexport const unpinItem =\n\t( scope, item ) =>\n\t( { registry } ) => {\n\t\t// Return early if there's no item.\n\t\tif ( ! item ) {\n\t\t\treturn;\n\t\t}\n\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = registry\n\t\t\t.select( preferencesStore )\n\t\t\t.get( scope, 'pinnedItems' );\n\n\t\tregistry.dispatch( preferencesStore ).set( scope, 'pinnedItems', {\n\t\t\t...pinnedItems,\n\t\t\t[ item ]: false,\n\t\t} );\n\t};\n\n/**\n * Returns an action object used in signalling that a feature should be toggled.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n */\nexport function toggleFeature( scope, featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).toggleFeature`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).toggle`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).toggle( scope, featureName );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that a feature should be set to\n * a true or false value\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {string} featureName The feature name.\n * @param {boolean} value The value to set.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureValue( scope, featureName, value ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureValue`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).set`,\n\t\t} );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( scope, featureName, !! value );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that defaults should be set for features.\n *\n * @param {string} scope The feature scope (e.g. core/edit-post).\n * @param {Object<string, boolean>} defaults A key/value map of feature names to values.\n *\n * @return {Object} Action object.\n */\nexport function setFeatureDefaults( scope, defaults ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated( `dispatch( 'core/interface' ).setFeatureDefaults`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `dispatch( 'core/preferences' ).setDefaults`,\n\t\t} );\n\n\t\tregistry.dispatch( preferencesStore ).setDefaults( scope, defaults );\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user opened a modal.\n *\n * @param {string} name A string that uniquely identifies the modal.\n *\n * @return {Object} Action object.\n */\nexport function openModal( name ) {\n\treturn {\n\t\ttype: 'OPEN_MODAL',\n\t\tname,\n\t};\n}\n\n/**\n * Returns an action object signalling that the user closed a modal.\n *\n * @return {Object} Action object.\n */\nexport function closeModal() {\n\treturn {\n\t\ttype: 'CLOSE_MODAL',\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { createRegistrySelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tnormalizeComplementaryAreaScope,\n\tnormalizeComplementaryAreaName,\n} from './deprecated';\n\n/**\n * Returns the complementary area that is active in a given scope.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Item scope.\n *\n * @return {string | null | undefined} The complementary area that is active in the given scope.\n */\nexport const getActiveComplementaryArea = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isComplementaryAreaVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\n\t\t// Return `undefined` to indicate that the user has never toggled\n\t\t// visibility, this is the vanilla default. Other code relies on this\n\t\t// nuance in the return value.\n\t\tif ( isComplementaryAreaVisible === undefined ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Return `null` to indicate the user hid the complementary area.\n\t\tif ( isComplementaryAreaVisible === false ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn state?.complementaryAreas?.[ scope ];\n\t}\n);\n\nexport const isComplementaryAreaLoading = createRegistrySelector(\n\t( select ) => ( state, scope ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\tconst isVisible = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'isComplementaryAreaVisible'\n\t\t);\n\t\tconst identifier = state?.complementaryAreas?.[ scope ];\n\n\t\treturn isVisible && identifier === undefined;\n\t}\n);\n\n/**\n * Returns a boolean indicating if an item is pinned or not.\n *\n * @param {Object} state Global application state.\n * @param {string} scope Scope.\n * @param {string} item Item to check.\n *\n * @return {boolean} True if the item is pinned and false otherwise.\n */\nexport const isItemPinned = createRegistrySelector(\n\t( select ) => ( state, scope, item ) => {\n\t\tscope = normalizeComplementaryAreaScope( scope );\n\t\titem = normalizeComplementaryAreaName( scope, item );\n\t\tconst pinnedItems = select( preferencesStore ).get(\n\t\t\tscope,\n\t\t\t'pinnedItems'\n\t\t);\n\t\treturn pinnedItems?.[ item ] ?? true;\n\t}\n);\n\n/**\n * Returns a boolean indicating whether a feature is active for a particular\n * scope.\n *\n * @param {Object} state The store state.\n * @param {string} scope The scope of the feature (e.g. core/edit-post).\n * @param {string} featureName The name of the feature.\n *\n * @return {boolean} Is the feature enabled?\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( state, scope, featureName ) => {\n\t\tdeprecated(\n\t\t\t`select( 'core/interface' ).isFeatureActive( scope, featureName )`,\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative: `select( 'core/preferences' ).get( scope, featureName )`,\n\t\t\t}\n\t\t);\n\n\t\treturn !! select( preferencesStore ).get( scope, featureName );\n\t}\n);\n\n/**\n * Returns true if a modal is active, or false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} modalName A string that uniquely identifies the modal.\n *\n * @return {boolean} Whether the modal is active.\n */\nexport function isModalActive( state, modalName ) {\n\treturn state.activeModal === modalName;\n}\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\nexport function complementaryAreas( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_DEFAULT_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\n\t\t\t// If there's already an area, don't overwrite it.\n\t\t\tif ( state[ scope ] ) {\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[ scope ]: area,\n\t\t\t};\n\t\t}\n\t\tcase 'ENABLE_COMPLEMENTARY_AREA': {\n\t\t\tconst { scope, area } = action;\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ scope ]: area,\n\t\t\t};\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer for storing the name of the open modal, or null if no modal is open.\n *\n * @param {Object} state Previous state.\n * @param {Object} action Action object containing the `name` of the modal\n *\n * @return {Object} Updated state\n */\nexport function activeModal( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'OPEN_MODAL':\n\t\t\treturn action.name;\n\t\tcase 'CLOSE_MODAL':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tcomplementaryAreas,\n\tactiveModal,\n} );\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport reducer from './reducer';\nimport { STORE_NAME } from './constants';\n\n/**\n * Store definition for the interface namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n *\n * @type {Object}\n */\nexport const store = createReduxStore( STORE_NAME, {\n\treducer,\n\tactions,\n\tselectors,\n} );\n\n// Once we build a more generic persistence plugin that works across types of stores\n// we'd be able to replace this with a register call.\nregister( store );\n","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/interface';\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { usePluginContext } from '@wordpress/plugins';\n\n/**\n * Internal dependencies\n */\nimport { store as interfaceStore } from '../../store';\n\n/**\n * Whether the role supports checked state.\n *\n * @see https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n * @param {import('react').AriaRole} role Role.\n * @return {boolean} Whether the role supports checked state.\n */\nfunction roleSupportsCheckedState( role ) {\n\treturn [\n\t\t'checkbox',\n\t\t'option',\n\t\t'radio',\n\t\t'switch',\n\t\t'menuitemcheckbox',\n\t\t'menuitemradio',\n\t\t'treeitem',\n\t].includes( role );\n}\n\nexport default function ComplementaryAreaToggle( {\n\tas = Button,\n\tscope,\n\tidentifier: identifierProp,\n\ticon: iconProp,\n\tselectedIcon,\n\tname,\n\tshortcut,\n\t...props\n} ) {\n\tconst ComponentToUse = as;\n\tconst context = usePluginContext();\n\tconst icon = iconProp || context.icon;\n\tconst identifier = identifierProp || `${ context.name }/${ name }`;\n\tconst isSelected = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( scope ) ===\n\t\t\tidentifier,\n\t\t[ identifier, scope ]\n\t);\n\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\n\treturn (\n\t\t<ComponentToUse\n\t\t\ticon={ selectedIcon && isSelected ? selectedIcon : icon }\n\t\t\taria-controls={ identifier.replace( '/', ':' ) }\n\t\t\t// Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n\t\t\taria-checked={\n\t\t\t\troleSupportsCheckedState( props.role ) ? isSelected : undefined\n\t\t\t}\n\t\t\tonClick={ () => {\n\t\t\t\tif ( isSelected ) {\n\t\t\t\t\tdisableComplementaryArea( scope );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( scope, identifier );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tshortcut={ shortcut }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\n\nconst ComplementaryAreaHeader = ( {\n\tchildren,\n\tclassName,\n\ttoggleButtonProps,\n} ) => {\n\tconst toggleButton = (\n\t\t<ComplementaryAreaToggle icon={ closeSmall } { ...toggleButtonProps } />\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-panel__header',\n\t\t\t\t'interface-complementary-area-header',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ toggleButton }\n\t\t</div>\n\t);\n};\n\nexport default ComplementaryAreaHeader;\n","/**\n * WordPress dependencies\n */\nimport { MenuGroup, Button, Slot, Fill } from '@wordpress/components';\nimport { Children } from '@wordpress/element';\n\nconst noop = () => {};\n\nfunction ActionItemSlot( {\n\tname,\n\tas: Component = MenuGroup,\n\tfillProps = {},\n\tbubblesVirtually,\n\t...props\n} ) {\n\treturn (\n\t\t<Slot\n\t\t\tname={ name }\n\t\t\tbubblesVirtually={ bubblesVirtually }\n\t\t\tfillProps={ fillProps }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif ( ! Children.toArray( fills ).length ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t// Special handling exists for backward compatibility.\n\t\t\t\t// It ensures that menu items created by plugin authors aren't\n\t\t\t\t// duplicated with automatically injected menu items coming\n\t\t\t\t// from pinnable plugin sidebars.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t\tconst initializedByPlugins = [];\n\t\t\t\tChildren.forEach(\n\t\t\t\t\tfills,\n\t\t\t\t\t( {\n\t\t\t\t\t\tprops: { __unstableExplicitMenuItem, __unstableTarget },\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\tif ( __unstableTarget && __unstableExplicitMenuItem ) {\n\t\t\t\t\t\t\tinitializedByPlugins.push( __unstableTarget );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst children = Children.map( fills, ( child ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t! child.props.__unstableExplicitMenuItem &&\n\t\t\t\t\t\tinitializedByPlugins.includes(\n\t\t\t\t\t\t\tchild.props.__unstableTarget\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn child;\n\t\t\t\t} );\n\n\t\t\t\treturn <Component { ...props }>{ children }</Component>;\n\t\t\t} }\n\t\t</Slot>\n\t);\n}\n\nfunction ActionItem( { name, as: Component = Button, onClick, ...props } ) {\n\treturn (\n\t\t<Fill name={ name }>\n\t\t\t{ ( { onClick: fpOnClick } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\tonClick || fpOnClick\n\t\t\t\t\t\t\t\t? ( ...args ) => {\n\t\t\t\t\t\t\t\t\t\t( onClick || noop )( ...args );\n\t\t\t\t\t\t\t\t\t\t( fpOnClick || noop )( ...args );\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t</Fill>\n\t);\n}\n\nActionItem.Slot = ActionItemSlot;\n\nexport default ActionItem;\n","/**\n * WordPress dependencies\n */\nimport { check } from '@wordpress/icons';\nimport { MenuItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport ActionItem from '../action-item';\n\nconst PluginsMenuItem = ( {\n\t// Menu item is marked with unstable prop for backward compatibility.\n\t// They are removed so they don't leak to DOM elements.\n\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t__unstableExplicitMenuItem,\n\t__unstableTarget,\n\t...restProps\n} ) => <MenuItem { ...restProps } />;\n\nexport default function ComplementaryAreaMoreMenuItem( {\n\tscope,\n\ttarget,\n\t__unstableExplicitMenuItem,\n\t...props\n} ) {\n\treturn (\n\t\t<ComplementaryAreaToggle\n\t\t\tas={ ( toggleProps ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<ActionItem\n\t\t\t\t\t\t__unstableExplicitMenuItem={\n\t\t\t\t\t\t\t__unstableExplicitMenuItem\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableTarget={ `${ scope }/${ target }` }\n\t\t\t\t\t\tas={ PluginsMenuItem }\n\t\t\t\t\t\tname={ `${ scope }/plugin-more-menu` }\n\t\t\t\t\t\t{ ...toggleProps }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trole=\"menuitemcheckbox\"\n\t\t\tselectedIcon={ check }\n\t\t\tname={ target }\n\t\t\tscope={ scope }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Slot, Fill } from '@wordpress/components';\n\nfunction PinnedItems( { scope, ...props } ) {\n\treturn <Fill name={ `PinnedItems/${ scope }` } { ...props } />;\n}\n\nfunction PinnedItemsSlot( { scope, className, ...props } ) {\n\treturn (\n\t\t<Slot name={ `PinnedItems/${ scope }` } { ...props }>\n\t\t\t{ ( fills ) =>\n\t\t\t\tfills?.length > 0 && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t'interface-pinned-items'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</div>\n\t\t\t\t)\n\t\t\t}\n\t\t</Slot>\n\t);\n}\n\nPinnedItems.Slot = PinnedItemsSlot;\n\nexport default PinnedItems;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tPanel,\n\tSlot,\n\tFill,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { check, starEmpty, starFilled } from '@wordpress/icons';\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { store as viewportStore } from '@wordpress/viewport';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { usePluginContext } from '@wordpress/plugins';\n\n/**\n * Internal dependencies\n */\nimport ComplementaryAreaHeader from '../complementary-area-header';\nimport ComplementaryAreaMoreMenuItem from '../complementary-area-more-menu-item';\nimport ComplementaryAreaToggle from '../complementary-area-toggle';\nimport PinnedItems from '../pinned-items';\nimport { store as interfaceStore } from '../../store';\n\nconst ANIMATION_DURATION = 0.3;\n\nfunction ComplementaryAreaSlot( { scope, ...props } ) {\n\treturn <Slot name={ `ComplementaryArea/${ scope }` } { ...props } />;\n}\n\nconst SIDEBAR_WIDTH = 280;\nconst variants = {\n\topen: { width: SIDEBAR_WIDTH },\n\tclosed: { width: 0 },\n\tmobileOpen: { width: '100vw' },\n};\n\nfunction ComplementaryAreaFill( {\n\tactiveArea,\n\tisActive,\n\tscope,\n\tchildren,\n\tclassName,\n\tid,\n} ) {\n\tconst disableMotion = useReducedMotion();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\t// This is used to delay the exit animation to the next tick.\n\t// The reason this is done is to allow us to apply the right transition properties\n\t// When we switch from an open sidebar to another open sidebar.\n\t// we don't want to animate in this case.\n\tconst previousActiveArea = usePrevious( activeArea );\n\tconst previousIsActive = usePrevious( isActive );\n\tconst [ , setState ] = useState( {} );\n\tuseEffect( () => {\n\t\tsetState( {} );\n\t}, [ isActive ] );\n\tconst transition = {\n\t\ttype: 'tween',\n\t\tduration:\n\t\t\tdisableMotion ||\n\t\t\tisMobileViewport ||\n\t\t\t( !! previousActiveArea &&\n\t\t\t\t!! activeArea &&\n\t\t\t\tactiveArea !== previousActiveArea )\n\t\t\t\t? 0\n\t\t\t\t: ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\n\treturn (\n\t\t<Fill name={ `ComplementaryArea/${ scope }` }>\n\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t{ ( previousIsActive || isActive ) && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ variants }\n\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\tanimate={ isMobileViewport ? 'mobileOpen' : 'open' }\n\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\ttransition={ transition }\n\t\t\t\t\t\tclassName=\"interface-complementary-area__fill\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t: SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t</Fill>\n\t);\n}\n\nfunction useAdjustComplementaryListener(\n\tscope,\n\tidentifier,\n\tactiveArea,\n\tisActive,\n\tisSmall\n) {\n\tconst previousIsSmallRef = useRef( false );\n\tconst shouldOpenWhenNotSmallRef = useRef( false );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tuseEffect( () => {\n\t\t// If the complementary area is active and the editor is switching from\n\t\t// a big to a small window size.\n\t\tif ( isActive && isSmall && ! previousIsSmallRef.current ) {\n\t\t\tdisableComplementaryArea( scope );\n\t\t\t// Flag the complementary area to be reopened when the window size\n\t\t\t// goes from small to big.\n\t\t\tshouldOpenWhenNotSmallRef.current = true;\n\t\t} else if (\n\t\t\t// If there is a flag indicating the complementary area should be\n\t\t\t// enabled when we go from small to big window size and we are going\n\t\t\t// from a small to big window size.\n\t\t\tshouldOpenWhenNotSmallRef.current &&\n\t\t\t! isSmall &&\n\t\t\tpreviousIsSmallRef.current\n\t\t) {\n\t\t\t// Remove the flag indicating the complementary area should be\n\t\t\t// enabled.\n\t\t\tshouldOpenWhenNotSmallRef.current = false;\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if (\n\t\t\t// If the flag is indicating the current complementary should be\n\t\t\t// reopened but another complementary area becomes active, remove\n\t\t\t// the flag.\n\t\t\tshouldOpenWhenNotSmallRef.current &&\n\t\t\tactiveArea &&\n\t\t\tactiveArea !== identifier\n\t\t) {\n\t\t\tshouldOpenWhenNotSmallRef.current = false;\n\t\t}\n\t\tif ( isSmall !== previousIsSmallRef.current ) {\n\t\t\tpreviousIsSmallRef.current = isSmall;\n\t\t}\n\t}, [\n\t\tisActive,\n\t\tisSmall,\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tdisableComplementaryArea,\n\t\tenableComplementaryArea,\n\t] );\n}\n\nfunction ComplementaryArea( {\n\tchildren,\n\tclassName,\n\tcloseLabel = __( 'Close plugin' ),\n\tidentifier: identifierProp,\n\theader,\n\theaderClassName,\n\ticon: iconProp,\n\tisPinnable = true,\n\tpanelClassName,\n\tscope,\n\tname,\n\ttitle,\n\ttoggleShortcut,\n\tisActiveByDefault,\n} ) {\n\tconst context = usePluginContext();\n\tconst icon = iconProp || context.icon;\n\tconst identifier = identifierProp || `${ context.name }/${ name }`;\n\n\t// This state is used to delay the rendering of the Fill\n\t// until the initial effect runs.\n\t// This prevents the animation from running on mount if\n\t// the complementary area is active by default.\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst {\n\t\tisLoading,\n\t\tisActive,\n\t\tisPinned,\n\t\tactiveArea,\n\t\tisSmall,\n\t\tisLarge,\n\t\tshowIconLabels,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetActiveComplementaryArea,\n\t\t\t\tisComplementaryAreaLoading,\n\t\t\t\tisItemPinned,\n\t\t\t} = select( interfaceStore );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\tconst _activeArea = getActiveComplementaryArea( scope );\n\n\t\t\treturn {\n\t\t\t\tisLoading: isComplementaryAreaLoading( scope ),\n\t\t\t\tisActive: _activeArea === identifier,\n\t\t\t\tisPinned: isItemPinned( scope, identifier ),\n\t\t\t\tactiveArea: _activeArea,\n\t\t\t\tisSmall: select( viewportStore ).isViewportMatch( '< medium' ),\n\t\t\t\tisLarge: select( viewportStore ).isViewportMatch( 'large' ),\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t},\n\t\t[ identifier, scope ]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tuseAdjustComplementaryListener(\n\t\tscope,\n\t\tidentifier,\n\t\tactiveArea,\n\t\tisActive,\n\t\tisSmall\n\t);\n\tconst {\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t\tpinItem,\n\t\tunpinItem,\n\t} = useDispatch( interfaceStore );\n\n\tuseEffect( () => {\n\t\t// Set initial visibility: For large screens, enable if it's active by\n\t\t// default. For small screens, always initially disable.\n\t\tif ( isActiveByDefault && activeArea === undefined && ! isSmall ) {\n\t\t\tenableComplementaryArea( scope, identifier );\n\t\t} else if ( activeArea === undefined && isSmall ) {\n\t\t\tdisableComplementaryArea( scope, identifier );\n\t\t}\n\t\tsetIsReady( true );\n\t}, [\n\t\tactiveArea,\n\t\tisActiveByDefault,\n\t\tscope,\n\t\tidentifier,\n\t\tisSmall,\n\t\tenableComplementaryArea,\n\t\tdisableComplementaryArea,\n\t] );\n\n\tif ( ! isReady ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isPinnable && (\n\t\t\t\t<PinnedItems scope={ scope }>\n\t\t\t\t\t{ isPinned && (\n\t\t\t\t\t\t<ComplementaryAreaToggle\n\t\t\t\t\t\t\tscope={ scope }\n\t\t\t\t\t\t\tidentifier={ identifier }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisActive && ( ! showIconLabels || isLarge )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-expanded={ isActive }\n\t\t\t\t\t\t\taria-disabled={ isLoading }\n\t\t\t\t\t\t\tlabel={ title }\n\t\t\t\t\t\t\ticon={ showIconLabels ? check : icon }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tshortcut={ toggleShortcut }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PinnedItems>\n\t\t\t) }\n\t\t\t{ name && isPinnable && (\n\t\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\t\ttarget={ name }\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t\t) }\n\t\t\t<ComplementaryAreaFill\n\t\t\t\tactiveArea={ activeArea }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tclassName={ clsx( 'interface-complementary-area', className ) }\n\t\t\t\tscope={ scope }\n\t\t\t\tid={ identifier.replace( '/', ':' ) }\n\t\t\t>\n\t\t\t\t<ComplementaryAreaHeader\n\t\t\t\t\tclassName={ headerClassName }\n\t\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\t\tonClose={ () => disableComplementaryArea( scope ) }\n\t\t\t\t\ttoggleButtonProps={ {\n\t\t\t\t\t\tlabel: closeLabel,\n\t\t\t\t\t\tsize: 'compact',\n\t\t\t\t\t\tshortcut: toggleShortcut,\n\t\t\t\t\t\tscope,\n\t\t\t\t\t\tidentifier,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ header || (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h2 className=\"interface-complementary-area-header__title\">\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t{ isPinnable && ! isMobileViewport && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"interface-complementary-area__pin-unpin-item\"\n\t\t\t\t\t\t\t\t\ticon={ isPinned ? starFilled : starEmpty }\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\tisPinned\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Unpin from toolbar' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Pin to toolbar' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t( isPinned ? unpinItem : pinItem )(\n\t\t\t\t\t\t\t\t\t\t\tscope,\n\t\t\t\t\t\t\t\t\t\t\tidentifier\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\tisPressed={ isPinned }\n\t\t\t\t\t\t\t\t\taria-expanded={ isPinned }\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\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</ComplementaryAreaHeader>\n\t\t\t\t<Panel className={ panelClassName }>{ children }</Panel>\n\t\t\t</ComplementaryAreaFill>\n\t\t</>\n\t);\n}\n\nComplementaryArea.Slot = ComplementaryAreaSlot;\n\nexport default ComplementaryArea;\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\nconst FullscreenMode = ( { isActive } ) => {\n\tuseEffect( () => {\n\t\tlet isSticky = false;\n\t\t// `is-fullscreen-mode` is set in PHP as a body class by Gutenberg, and this causes\n\t\t// `sticky-menu` to be applied by WordPress and prevents the admin menu being scrolled\n\t\t// even if `is-fullscreen-mode` is then removed. Let's remove `sticky-menu` here as\n\t\t// a consequence of the FullscreenMode setup.\n\t\tif ( document.body.classList.contains( 'sticky-menu' ) ) {\n\t\t\tisSticky = true;\n\t\t\tdocument.body.classList.remove( 'sticky-menu' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isSticky ) {\n\t\t\t\tdocument.body.classList.add( 'sticky-menu' );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( isActive ) {\n\t\t\tdocument.body.classList.add( 'is-fullscreen-mode' );\n\t\t} else {\n\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( isActive ) {\n\t\t\t\tdocument.body.classList.remove( 'is-fullscreen-mode' );\n\t\t\t}\n\t\t};\n\t}, [ isActive ] );\n\n\treturn null;\n};\nexport default FullscreenMode;\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nconst NavigableRegion = forwardRef(\n\t( { children, className, ariaLabel, as: Tag = 'div', ...props }, ref ) => {\n\t\treturn (\n\t\t\t<Tag\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( 'interface-navigable-region', className ) }\n\t\t\t\taria-label={ ariaLabel }\n\t\t\t\trole=\"region\"\n\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t{ ...props }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Tag>\n\t\t);\n\t}\n);\n\nNavigableRegion.displayName = 'NavigableRegion';\nexport default NavigableRegion;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect } from '@wordpress/element';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NavigableRegion from '../navigable-region';\n\nconst ANIMATION_DURATION = 0.25;\nconst commonTransition = {\n\ttype: 'tween',\n\tduration: ANIMATION_DURATION,\n\tease: [ 0.6, 0, 0.4, 1 ],\n};\n\nfunction useHTMLClass( className ) {\n\tuseEffect( () => {\n\t\tconst element =\n\t\t\tdocument && document.querySelector( `html:not(.${ className })` );\n\t\tif ( ! element ) {\n\t\t\treturn;\n\t\t}\n\t\telement.classList.toggle( className );\n\t\treturn () => {\n\t\t\telement.classList.toggle( className );\n\t\t};\n\t}, [ className ] );\n}\n\nconst headerVariants = {\n\thidden: { opacity: 1, marginTop: -60 },\n\tvisible: { opacity: 1, marginTop: 0 },\n\tdistractionFreeHover: {\n\t\topacity: 1,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.2,\n\t\t\tdelayChildren: 0.2,\n\t\t},\n\t},\n\tdistractionFreeHidden: {\n\t\topacity: 0,\n\t\tmarginTop: -60,\n\t},\n\tdistractionFreeDisabled: {\n\t\topacity: 0,\n\t\tmarginTop: 0,\n\t\ttransition: {\n\t\t\t...commonTransition,\n\t\t\tdelay: 0.8,\n\t\t\tdelayChildren: 0.8,\n\t\t},\n\t},\n};\n\nfunction InterfaceSkeleton(\n\t{\n\t\tisDistractionFree,\n\t\tfooter,\n\t\theader,\n\t\teditorNotices,\n\t\tsidebar,\n\t\tsecondarySidebar,\n\t\tcontent,\n\t\tactions,\n\t\tlabels,\n\t\tclassName,\n\t},\n\tref\n) {\n\tconst [ secondarySidebarResizeListener, secondarySidebarSize ] =\n\t\tuseResizeObserver();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst disableMotion = useReducedMotion();\n\tconst defaultTransition = {\n\t\ttype: 'tween',\n\t\tduration: disableMotion ? 0 : ANIMATION_DURATION,\n\t\tease: [ 0.6, 0, 0.4, 1 ],\n\t};\n\tuseHTMLClass( 'interface-interface-skeleton__html-container' );\n\n\tconst defaultLabels = {\n\t\t/* translators: accessibility text for the top bar landmark region. */\n\t\theader: _x( 'Header', 'header landmark area' ),\n\t\t/* translators: accessibility text for the content landmark region. */\n\t\tbody: __( 'Content' ),\n\t\t/* translators: accessibility text for the secondary sidebar landmark region. */\n\t\tsecondarySidebar: __( 'Block Library' ),\n\t\t/* translators: accessibility text for the settings landmark region. */\n\t\tsidebar: _x( 'Settings', 'settings landmark area' ),\n\t\t/* translators: accessibility text for the publish landmark region. */\n\t\tactions: __( 'Publish' ),\n\t\t/* translators: accessibility text for the footer landmark region. */\n\t\tfooter: __( 'Footer' ),\n\t};\n\n\tconst mergedLabels = { ...defaultLabels, ...labels };\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'interface-interface-skeleton',\n\t\t\t\t!! footer && 'has-footer'\n\t\t\t) }\n\t\t>\n\t\t\t<div className=\"interface-interface-skeleton__editor\">\n\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t{ !! header && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__header\"\n\t\t\t\t\t\t\taria-label={ mergedLabels.header }\n\t\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhileHover={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHover'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeDisabled'\n\t\t\t\t\t\t\t\t\t: 'visible'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\texit={\n\t\t\t\t\t\t\t\tisDistractionFree && ! isMobileViewport\n\t\t\t\t\t\t\t\t\t? 'distractionFreeHidden'\n\t\t\t\t\t\t\t\t\t: 'hidden'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariants={ headerVariants }\n\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ header }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</AnimatePresence>\n\t\t\t\t{ isDistractionFree && (\n\t\t\t\t\t<div className=\"interface-interface-skeleton__header\">\n\t\t\t\t\t\t{ editorNotices }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<div className=\"interface-interface-skeleton__body\">\n\t\t\t\t\t<AnimatePresence initial={ false }>\n\t\t\t\t\t\t{ !! secondarySidebar && (\n\t\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__secondary-sidebar\"\n\t\t\t\t\t\t\t\tariaLabel={ mergedLabels.secondarySidebar }\n\t\t\t\t\t\t\t\tas={ motion.div }\n\t\t\t\t\t\t\t\tinitial=\"closed\"\n\t\t\t\t\t\t\t\tanimate=\"open\"\n\t\t\t\t\t\t\t\texit=\"closed\"\n\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\topen: { width: secondarySidebarSize.width },\n\t\t\t\t\t\t\t\t\tclosed: { width: 0 },\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\t\t\t\t\twidth: isMobileViewport\n\t\t\t\t\t\t\t\t\t\t\t? '100vw'\n\t\t\t\t\t\t\t\t\t\t\t: 'fit-content',\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tvariants={ {\n\t\t\t\t\t\t\t\t\t\topen: { x: 0 },\n\t\t\t\t\t\t\t\t\t\tclosed: { x: '-100%' },\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\ttransition={ defaultTransition }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ secondarySidebarResizeListener }\n\t\t\t\t\t\t\t\t\t{ secondarySidebar }\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\tclassName=\"interface-interface-skeleton__content\"\n\t\t\t\t\t\tariaLabel={ mergedLabels.body }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ content }\n\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t{ !! sidebar && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__sidebar\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.sidebar }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sidebar }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t\t{ !! actions && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tclassName=\"interface-interface-skeleton__actions\"\n\t\t\t\t\t\t\tariaLabel={ mergedLabels.actions }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ !! footer && (\n\t\t\t\t<NavigableRegion\n\t\t\t\t\tclassName=\"interface-interface-skeleton__footer\"\n\t\t\t\t\tariaLabel={ mergedLabels.footer }\n\t\t\t\t>\n\t\t\t\t\t{ footer }\n\t\t\t\t</NavigableRegion>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InterfaceSkeleton );\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { RenamePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-rename';\n\nexport default function PatternRenameModal() {\n\tconst { record, postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tgetCurrentPostId()\n\t\t\t),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )\n\t);\n\n\tif ( ! isActive || postType !== PATTERN_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn <RenamePatternModal onClose={ closeModal } pattern={ record } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport { PATTERN_POST_TYPE } from '../../store/constants';\n\nconst { DuplicatePatternModal } = unlock( patternsPrivateApis );\nexport const modalName = 'editor/pattern-duplicate';\n\nexport default function PatternDuplicateModal() {\n\tconst { record, postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\treturn {\n\t\t\trecord: getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\tgetCurrentPostId()\n\t\t\t),\n\t\t\tpostType: _postType,\n\t\t};\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tconst isActive = useSelect( ( select ) =>\n\t\tselect( interfaceStore ).isModalActive( modalName )\n\t);\n\n\tif ( ! isActive || postType !== PATTERN_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<DuplicatePatternModal\n\t\t\tonClose={ closeModal }\n\t\t\tonSuccess={ () => closeModal() }\n\t\t\tpattern={ record }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\n\nimport { _n } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { BlockRemovalWarningModal } = unlock( blockEditorPrivateApis );\n\n// Prevent accidental removal of certain blocks, asking the user for confirmation first.\nconst TEMPLATE_BLOCKS = [\n\t'core/post-content',\n\t'core/post-template',\n\t'core/query',\n];\nconst BLOCK_REMOVAL_RULES = [\n\t{\n\t\t// Template blocks.\n\t\t// The warning is only shown when a user manipulates templates or template parts.\n\t\tpostTypes: [ 'wp_template', 'wp_template_part' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedTemplateBlocks = removedBlocks.filter( ( { name } ) =>\n\t\t\t\tTEMPLATE_BLOCKS.includes( name )\n\t\t\t);\n\t\t\tif ( removedTemplateBlocks.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'Deleting this block will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\t'Some of the deleted blocks will stop your post or page content from displaying on this template. It is not recommended.',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n\t{\n\t\t// Pattern overrides.\n\t\t// The warning is only shown when the user edits a pattern.\n\t\tpostTypes: [ 'wp_block' ],\n\t\tcallback( removedBlocks ) {\n\t\t\tconst removedBlocksWithOverrides = removedBlocks.filter(\n\t\t\t\t( { attributes } ) =>\n\t\t\t\t\tattributes?.metadata?.bindings &&\n\t\t\t\t\tObject.values( attributes.metadata.bindings ).some(\n\t\t\t\t\t\t( binding ) =>\n\t\t\t\t\t\t\tbinding.source === 'core/pattern-overrides'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tif ( removedBlocksWithOverrides.length ) {\n\t\t\t\treturn _n(\n\t\t\t\t\t'The deleted block allows instance overrides. Removing it may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\t'Some of the deleted blocks allow instance overrides. Removing them may result in content not displaying where this pattern is used. Are you sure you want to proceed?',\n\t\t\t\t\tremovedBlocks.length\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t},\n];\n\nexport default function BlockRemovalWarnings() {\n\tconst currentPostType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\n\tconst removalRulesForPostType = useMemo(\n\t\t() =>\n\t\t\tBLOCK_REMOVAL_RULES.filter( ( rule ) =>\n\t\t\t\trule.postTypes.includes( currentPostType )\n\t\t\t),\n\t\t[ currentPostType ]\n\t);\n\n\t// `BlockRemovalWarnings` is rendered in the editor provider, a shared component\n\t// across react native and web. However, `BlockRemovalWarningModal` is web only.\n\t// Check it exists before trying to render it.\n\tif ( ! BlockRemovalWarningModal ) {\n\t\treturn null;\n\t}\n\n\tif ( ! removalRulesForPostType ) {\n\t\treturn null;\n\t}\n\n\treturn <BlockRemovalWarningModal rules={ removalRulesForPostType } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function StartPageOptions() {\n\tconst { postId, shouldEnable } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostEmpty,\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t} = select( editorStore );\n\t\tconst preferencesModalActive =\n\t\t\tselect( interfaceStore ).isModalActive( 'editor/preferences' );\n\t\tconst choosePatternModalEnabled = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'enableChoosePatternModal'\n\t\t);\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tshouldEnable:\n\t\t\t\tchoosePatternModalEnabled &&\n\t\t\t\t! preferencesModalActive &&\n\t\t\t\t! isEditedPostDirty() &&\n\t\t\t\tisEditedPostEmpty() &&\n\t\t\t\t'page' === getCurrentPostType(),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tif ( shouldEnable ) {\n\t\t\tsetIsInserterOpened( {\n\t\t\t\ttab: 'patterns',\n\t\t\t\tcategory: 'core/starter-content',\n\t\t\t} );\n\t\t}\n\t}, [ postId, shouldEnable, setIsInserterOpened ] );\n\n\treturn null;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const textFormattingShortcuts = [\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'b' },\n\t\tdescription: __( 'Make the selected text bold.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'i' },\n\t\tdescription: __( 'Make the selected text italic.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'k' },\n\t\tdescription: __( 'Convert the selected text into a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'k' },\n\t\tdescription: __( 'Remove a link.' ),\n\t},\n\t{\n\t\tkeyCombination: { character: '[[' },\n\t\tdescription: __( 'Insert a link to a post or page.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primary', character: 'u' },\n\t\tdescription: __( 'Underline the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'd' },\n\t\tdescription: __( 'Strikethrough the selected text.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: 'x' },\n\t\tdescription: __( 'Make the selected text inline code.' ),\n\t},\n\t{\n\t\tkeyCombination: {\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: '0',\n\t\t},\n\t\taliases: [\n\t\t\t{\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: '7',\n\t\t\t},\n\t\t],\n\t\tdescription: __( 'Convert the current heading to a paragraph.' ),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'access', character: '1-6' },\n\t\tdescription: __(\n\t\t\t'Convert the current paragraph or heading to a heading of level 1 to 6.'\n\t\t),\n\t},\n\t{\n\t\tkeyCombination: { modifier: 'primaryShift', character: 'SPACE' },\n\t\tdescription: __( 'Add non breaking space.' ),\n\t},\n];\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { displayShortcutList, shortcutAriaLabel } from '@wordpress/keycodes';\n\nfunction KeyCombination( { keyCombination, forceAriaLabel } ) {\n\tconst shortcut = keyCombination.modifier\n\t\t? displayShortcutList[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\tconst ariaLabel = keyCombination.modifier\n\t\t? shortcutAriaLabel[ keyCombination.modifier ](\n\t\t\t\tkeyCombination.character\n\t\t )\n\t\t: keyCombination.character;\n\n\treturn (\n\t\t<kbd\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key-combination\"\n\t\t\taria-label={ forceAriaLabel || ariaLabel }\n\t\t>\n\t\t\t{ ( Array.isArray( shortcut ) ? shortcut : [ shortcut ] ).map(\n\t\t\t\t( character, index ) => {\n\t\t\t\t\tif ( character === '+' ) {\n\t\t\t\t\t\treturn <Fragment key={ index }>{ character }</Fragment>;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<kbd\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ character }\n\t\t\t\t\t\t</kbd>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t</kbd>\n\t);\n}\n\nfunction Shortcut( { description, keyCombination, aliases = [], ariaLabel } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-description\">\n\t\t\t\t{ description }\n\t\t\t</div>\n\t\t\t<div className=\"editor-keyboard-shortcut-help-modal__shortcut-term\">\n\t\t\t\t<KeyCombination\n\t\t\t\t\tkeyCombination={ keyCombination }\n\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t/>\n\t\t\t\t{ aliases.map( ( alias, index ) => (\n\t\t\t\t\t<KeyCombination\n\t\t\t\t\t\tkeyCombination={ alias }\n\t\t\t\t\t\tforceAriaLabel={ ariaLabel }\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default Shortcut;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from './shortcut';\n\nfunction DynamicShortcut( { name } ) {\n\tconst { keyCombination, description, aliases } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetShortcutKeyCombination,\n\t\t\t\tgetShortcutDescription,\n\t\t\t\tgetShortcutAliases,\n\t\t\t} = select( keyboardShortcutsStore );\n\n\t\t\treturn {\n\t\t\t\tkeyCombination: getShortcutKeyCombination( name ),\n\t\t\t\taliases: getShortcutAliases( name ),\n\t\t\t\tdescription: getShortcutDescription( name ),\n\t\t\t};\n\t\t},\n\t\t[ name ]\n\t);\n\n\tif ( ! keyCombination ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Shortcut\n\t\t\tkeyCombination={ keyCombination }\n\t\t\tdescription={ description }\n\t\t\taliases={ aliases }\n\t\t/>\n\t);\n}\n\nexport default DynamicShortcut;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { textFormattingShortcuts } from './config';\nimport Shortcut from './shortcut';\nimport DynamicShortcut from './dynamic-shortcut';\n\nconst KEYBOARD_SHORTCUT_HELP_MODAL_NAME = 'editor/keyboard-shortcut-help';\n\nconst ShortcutList = ( { shortcuts } ) => (\n\t/*\n\t * Disable reason: The `list` ARIA role is redundant but\n\t * Safari+VoiceOver won't announce the list otherwise.\n\t */\n\t/* eslint-disable jsx-a11y/no-redundant-roles */\n\t<ul\n\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut-list\"\n\t\trole=\"list\"\n\t>\n\t\t{ shortcuts.map( ( shortcut, index ) => (\n\t\t\t<li\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__shortcut\"\n\t\t\t\tkey={ index }\n\t\t\t>\n\t\t\t\t{ typeof shortcut === 'string' ? (\n\t\t\t\t\t<DynamicShortcut name={ shortcut } />\n\t\t\t\t) : (\n\t\t\t\t\t<Shortcut { ...shortcut } />\n\t\t\t\t) }\n\t\t\t</li>\n\t\t) ) }\n\t</ul>\n\t/* eslint-enable jsx-a11y/no-redundant-roles */\n);\n\nconst ShortcutSection = ( { title, shortcuts, className } ) => (\n\t<section\n\t\tclassName={ clsx(\n\t\t\t'editor-keyboard-shortcut-help-modal__section',\n\t\t\tclassName\n\t\t) }\n\t>\n\t\t{ !! title && (\n\t\t\t<h2 className=\"editor-keyboard-shortcut-help-modal__section-title\">\n\t\t\t\t{ title }\n\t\t\t</h2>\n\t\t) }\n\t\t<ShortcutList shortcuts={ shortcuts } />\n\t</section>\n);\n\nconst ShortcutCategorySection = ( {\n\ttitle,\n\tcategoryName,\n\tadditionalShortcuts = [],\n} ) => {\n\tconst categoryShortcuts = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( keyboardShortcutsStore ).getCategoryShortcuts(\n\t\t\t\tcategoryName\n\t\t\t);\n\t\t},\n\t\t[ categoryName ]\n\t);\n\n\treturn (\n\t\t<ShortcutSection\n\t\t\ttitle={ title }\n\t\t\tshortcuts={ categoryShortcuts.concat( additionalShortcuts ) }\n\t\t/>\n\t);\n};\n\nfunction KeyboardShortcutHelpModal() {\n\tconst isModalActive = useSelect(\n\t\t( select ) =>\n\t\t\tselect( interfaceStore ).isModalActive(\n\t\t\t\tKEYBOARD_SHORTCUT_HELP_MODAL_NAME\n\t\t\t),\n\t\t[]\n\t);\n\tconst { openModal, closeModal } = useDispatch( interfaceStore );\n\tconst toggleModal = () => {\n\t\tif ( isModalActive ) {\n\t\t\tcloseModal();\n\t\t} else {\n\t\t\topenModal( KEYBOARD_SHORTCUT_HELP_MODAL_NAME );\n\t\t}\n\t};\n\tuseShortcut( 'core/editor/keyboard-shortcuts', toggleModal );\n\n\tif ( ! isModalActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-keyboard-shortcut-help-modal\"\n\t\t\ttitle={ __( 'Keyboard shortcuts' ) }\n\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ toggleModal }\n\t\t>\n\t\t\t<ShortcutSection\n\t\t\t\tclassName=\"editor-keyboard-shortcut-help-modal__main-shortcuts\"\n\t\t\t\tshortcuts={ [ 'core/editor/keyboard-shortcuts' ] }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Global shortcuts' ) }\n\t\t\t\tcategoryName=\"global\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Selection shortcuts' ) }\n\t\t\t\tcategoryName=\"selection\"\n\t\t\t/>\n\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'Block shortcuts' ) }\n\t\t\t\tcategoryName=\"block\"\n\t\t\t\tadditionalShortcuts={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tkeyCombination: { character: '/' },\n\t\t\t\t\t\tdescription: __(\n\t\t\t\t\t\t\t'Change the block type after adding a new paragraph.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t/* translators: The forward-slash character. e.g. '/'. */\n\t\t\t\t\t\tariaLabel: __( 'Forward-slash' ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t/>\n\t\t\t<ShortcutSection\n\t\t\t\ttitle={ __( 'Text formatting' ) }\n\t\t\t\tshortcuts={ textFormattingShortcuts }\n\t\t\t/>\n\t\t\t<ShortcutCategorySection\n\t\t\t\ttitle={ __( 'List View shortcuts' ) }\n\t\t\t\tcategoryName=\"list-view\"\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nexport default KeyboardShortcutHelpModal;\n","/**\n * WordPress dependencies\n */\nimport {\n\tBlockSettingsMenuControls,\n\t__unstableBlockSettingsMenuFirstItem as BlockSettingsMenuFirstItem,\n\tstore as blockEditorStore,\n\tuseBlockDisplayInformation,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalText as Text, MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport usePostContentBlocks from '../provider/use-post-content-blocks';\n\nfunction ContentOnlySettingsMenuItems( { clientId, onClose } ) {\n\tconst postContentBlocks = usePostContentBlocks();\n\tconst { entity, onNavigateToEntityRecord, canEditTemplates } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockParentsByBlockName,\n\t\t\t\tgetSettings,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockParents,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getCurrentTemplateId, getRenderingMode } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst patternParent = getBlockParentsByBlockName(\n\t\t\t\tclientId,\n\t\t\t\t'core/block',\n\t\t\t\ttrue\n\t\t\t)[ 0 ];\n\n\t\t\tlet record;\n\t\t\tif ( patternParent ) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_block',\n\t\t\t\t\tgetBlockAttributes( patternParent ).ref\n\t\t\t\t);\n\t\t\t} else if (\n\t\t\t\tgetRenderingMode() === 'template-locked' &&\n\t\t\t\t! getBlockParents( clientId ).some( ( parent ) =>\n\t\t\t\t\tpostContentBlocks.includes( parent )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\trecord = select( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_template',\n\t\t\t\t\tgetCurrentTemplateId()\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( ! record ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst _canEditTemplates = select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\treturn {\n\t\t\t\tcanEditTemplates: _canEditTemplates,\n\t\t\t\tentity: record,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\tgetSettings().onNavigateToEntityRecord,\n\t\t\t};\n\t\t},\n\t\t[ clientId, postContentBlocks ]\n\t);\n\n\tif ( ! entity ) {\n\t\treturn (\n\t\t\t<TemplateLockContentOnlyMenuItems\n\t\t\t\tclientId={ clientId }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst isPattern = entity.type === 'wp_block';\n\tlet helpText = isPattern\n\t\t? __(\n\t\t\t\t'Edit the pattern to move, delete, or make further changes to this block.'\n\t\t )\n\t\t: __(\n\t\t\t\t'Edit the template to move, delete, or make further changes to this block.'\n\t\t );\n\n\tif ( ! canEditTemplates ) {\n\t\thelpText = __(\n\t\t\t'Only users with permissions to edit the template can move or delete this block'\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\tpostId: entity.id,\n\t\t\t\t\t\t\tpostType: entity.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={ ! canEditTemplates }\n\t\t\t\t>\n\t\t\t\t\t{ isPattern ? __( 'Edit pattern' ) : __( 'Edit template' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ helpText }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nfunction TemplateLockContentOnlyMenuItems( { clientId, onClose } ) {\n\tconst { contentLockingParent } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getContentLockingParent } = unlock(\n\t\t\t\tselect( blockEditorStore )\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcontentLockingParent: getContentLockingParent( clientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst blockDisplayInformation =\n\t\tuseBlockDisplayInformation( contentLockingParent );\n\tconst blockEditorActions = useDispatch( blockEditorStore );\n\tif ( ! blockDisplayInformation?.title ) {\n\t\treturn null;\n\t}\n\n\tconst { modifyContentLockBlock } = unlock( blockEditorActions );\n\n\treturn (\n\t\t<>\n\t\t\t<BlockSettingsMenuFirstItem>\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tmodifyContentLockBlock( contentLockingParent );\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ _x( 'Unlock', 'Unlock content locked blocks' ) }\n\t\t\t\t</MenuItem>\n\t\t\t</BlockSettingsMenuFirstItem>\n\t\t\t<Text\n\t\t\t\tvariant=\"muted\"\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"editor-content-only-settings-menu__description\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Temporarily unlock the parent block to edit, delete or make further changes to this block.'\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t</>\n\t);\n}\n\nexport default function ContentOnlySettingsMenu() {\n\treturn (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds, onClose } ) =>\n\t\t\t\tselectedClientIds.length === 1 && (\n\t\t\t\t\t<ContentOnlySettingsMenuItems\n\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t</BlockSettingsMenuControls>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Modal, Flex, FlexItem, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\n\nfunction useFallbackTemplateContent( slug, isCustom = false ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getDefaultTemplateId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateId = getDefaultTemplateId( {\n\t\t\t\tslug,\n\t\t\t\tis_custom: isCustom,\n\t\t\t\tignore_empty: true,\n\t\t\t} );\n\t\t\treturn templateId\n\t\t\t\t? getEntityRecord( 'postType', TEMPLATE_POST_TYPE, templateId )\n\t\t\t\t\t\t?.content?.raw\n\t\t\t\t: undefined;\n\t\t},\n\t\t[ slug, isCustom ]\n\t);\n}\n\nfunction useStartPatterns( fallbackContent ) {\n\tconst { slug, patterns } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEntityRecord, getBlockPatterns } = select( coreStore );\n\t\tconst postId = getCurrentPostId();\n\t\tconst postType = getCurrentPostType();\n\t\tconst record = getEntityRecord( 'postType', postType, postId );\n\t\treturn {\n\t\t\tslug: record.slug,\n\t\t\tpatterns: getBlockPatterns(),\n\t\t};\n\t}, [] );\n\n\tconst currentThemeStylesheet = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme().stylesheet\n\t);\n\n\t// Duplicated from packages/block-library/src/pattern/edit.js.\n\tfunction injectThemeAttributeInBlockTemplateContent( block ) {\n\t\tif (\n\t\t\tblock.innerBlocks.find(\n\t\t\t\t( innerBlock ) => innerBlock.name === 'core/template-part'\n\t\t\t)\n\t\t) {\n\t\t\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\t\t\tif (\n\t\t\t\t\tinnerBlock.name === 'core/template-part' &&\n\t\t\t\t\tinnerBlock.attributes.theme === undefined\n\t\t\t\t) {\n\t\t\t\t\tinnerBlock.attributes.theme = currentThemeStylesheet;\n\t\t\t\t}\n\t\t\t\treturn innerBlock;\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tblock.name === 'core/template-part' &&\n\t\t\tblock.attributes.theme === undefined\n\t\t) {\n\t\t\tblock.attributes.theme = currentThemeStylesheet;\n\t\t}\n\t\treturn block;\n\t}\n\n\treturn useMemo( () => {\n\t\t// filter patterns that are supposed to be used in the current template being edited.\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'fallback',\n\t\t\t\tblocks: parse( fallbackContent ),\n\t\t\t\ttitle: __( 'Fallback content' ),\n\t\t\t},\n\t\t\t...patterns\n\t\t\t\t.filter( ( pattern ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tArray.isArray( pattern.templateTypes ) &&\n\t\t\t\t\t\tpattern.templateTypes.some( ( templateType ) =>\n\t\t\t\t\t\t\tslug.startsWith( templateType )\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t\t.map( ( pattern ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...pattern,\n\t\t\t\t\t\tblocks: parse( pattern.content ).map( ( block ) =>\n\t\t\t\t\t\t\tinjectThemeAttributeInBlockTemplateContent( block )\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t];\n\t}, [ fallbackContent, slug, patterns ] );\n}\n\nfunction PatternSelection( { fallbackContent, onChoosePattern, postType } ) {\n\tconst [ , , onChange ] = useEntityBlockEditor( 'postType', postType );\n\tconst blockPatterns = useStartPatterns( fallbackContent );\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tblockPatterns={ blockPatterns }\n\t\t\tonClickPattern={ ( pattern, blocks ) => {\n\t\t\t\tonChange( blocks, { selection: undefined } );\n\t\t\t\tonChoosePattern();\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction StartModal( { slug, isCustom, onClose, postType } ) {\n\tconst fallbackContent = useFallbackTemplateContent( slug, isCustom );\n\tif ( ! fallbackContent ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Modal\n\t\t\tclassName=\"editor-start-template-options__modal\"\n\t\t\ttitle={ __( 'Choose a pattern' ) }\n\t\t\tcloseLabel={ __( 'Cancel' ) }\n\t\t\tfocusOnMount=\"firstElement\"\n\t\t\tonRequestClose={ onClose }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<div className=\"editor-start-template-options__modal-content\">\n\t\t\t\t<PatternSelection\n\t\t\t\t\tfallbackContent={ fallbackContent }\n\t\t\t\t\tslug={ slug }\n\t\t\t\t\tisCustom={ isCustom }\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tonChoosePattern={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<Flex\n\t\t\t\tclassName=\"editor-start-template-options__modal__actions\"\n\t\t\t\tjustify=\"flex-end\"\n\t\t\t\texpanded={ false }\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</Modal>\n\t);\n}\n\nexport default function StartTemplateOptions() {\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { shouldOpenModal, slug, isCustom, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getCurrentPostId } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\tconst _postId = getCurrentPostId();\n\t\t\tconst { getEditedEntityRecord, hasEditsForEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst templateRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\t\t\tconst hasEdits = hasEditsForEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t_postType,\n\t\t\t\t_postId\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tshouldOpenModal:\n\t\t\t\t\t! hasEdits &&\n\t\t\t\t\t'' === templateRecord.content &&\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType,\n\t\t\t\tslug: templateRecord.slug,\n\t\t\t\tisCustom: templateRecord.is_custom,\n\t\t\t\tpostType: _postType,\n\t\t\t\tpostId: _postId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\t// Should reset the modal state when navigating to a new page/post.\n\t\tsetIsClosed( false );\n\t}, [ postType, postId ] );\n\n\tif ( ! shouldOpenModal || isClosed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StartModal\n\t\t\tslug={ slug }\n\t\t\tisCustom={ isCustom }\n\t\t\tpostType={ postType }\n\t\t\tonClose={ () => setIsClosed( true ) }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport default function EditorKeyboardShortcuts() {\n\tconst isModeToggleDisabled = useSelect( ( select ) => {\n\t\tconst { richEditingEnabled, codeEditingEnabled } =\n\t\t\tselect( editorStore ).getEditorSettings();\n\t\treturn ! richEditingEnabled || ! codeEditingEnabled;\n\t}, [] );\n\tconst { getBlockSelectionStart } = useSelect( blockEditorStore );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea, disableComplementaryArea } =\n\t\tuseDispatch( interfaceStore );\n\tconst {\n\t\tredo,\n\t\tundo,\n\t\tsavePost,\n\t\tsetIsListViewOpened,\n\t\tswitchEditorMode,\n\t\ttoggleDistractionFree,\n\t} = useDispatch( editorStore );\n\tconst {\n\t\tisEditedPostDirty,\n\t\tisPostSavingLocked,\n\t\tisListViewOpened,\n\t\tgetEditorMode,\n\t} = useSelect( editorStore );\n\n\tuseShortcut(\n\t\t'core/editor/toggle-mode',\n\t\t() => {\n\t\t\tswitchEditorMode(\n\t\t\t\tgetEditorMode() === 'visual' ? 'text' : 'visual'\n\t\t\t);\n\t\t},\n\t\t{\n\t\t\tisDisabled: isModeToggleDisabled,\n\t\t}\n\t);\n\n\tuseShortcut( 'core/editor/toggle-distraction-free', () => {\n\t\ttoggleDistractionFree();\n\t} );\n\n\tuseShortcut( 'core/editor/undo', ( event ) => {\n\t\tundo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/redo', ( event ) => {\n\t\tredo();\n\t\tevent.preventDefault();\n\t} );\n\n\tuseShortcut( 'core/editor/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\t/**\n\t\t * Do not save the post if post saving is locked.\n\t\t */\n\t\tif ( isPostSavingLocked() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO: This should be handled in the `savePost` effect in\n\t\t// considering `isSaveable`. See note on `isEditedPostSaveable`\n\t\t// selector about dirtiness and meta-boxes.\n\t\t//\n\t\t// See: `isEditedPostSaveable`\n\t\tif ( ! isEditedPostDirty() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsavePost();\n\t} );\n\n\t// Only opens the list view. Other functionality for this shortcut happens in the rendered sidebar.\n\tuseShortcut( 'core/editor/toggle-list-view', ( event ) => {\n\t\tif ( ! isListViewOpened() ) {\n\t\t\tevent.preventDefault();\n\t\t\tsetIsListViewOpened( true );\n\t\t}\n\t} );\n\n\tuseShortcut( 'core/editor/toggle-sidebar', ( event ) => {\n\t\t// This shortcut has no known clashes, but use preventDefault to prevent any\n\t\t// obscure shortcuts from triggering.\n\t\tevent.preventDefault();\n\t\tconst isEditorSidebarOpened = [\n\t\t\t'edit-post/document',\n\t\t\t'edit-post/block',\n\t\t].includes( getActiveComplementaryArea( 'core' ) );\n\n\t\tif ( isEditorSidebarOpened ) {\n\t\t\tdisableComplementaryArea( 'core' );\n\t\t} else {\n\t\t\tconst sidebarToOpen = getBlockSelectionStart()\n\t\t\t\t? 'edit-post/block'\n\t\t\t\t: 'edit-post/document';\n\t\t\tenableComplementaryArea( 'core', sidebarToOpen );\n\t\t}\n\t} );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function ConvertToRegularBlocks( { clientId, onClose } ) {\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\n\tconst canRemove = useSelect(\n\t\t( select ) => select( blockEditorStore ).canRemoveBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\n\tif ( ! canRemove ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\treplaceBlocks( clientId, getBlocks( clientId ) );\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Detach' ) }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { createBlock } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { symbolFilled } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CreateTemplatePartModal } from '@wordpress/fields';\n\nexport default function ConvertToTemplatePart( { clientIds, blocks } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst { canCreate } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tcanCreate:\n\t\t\t\tselect( blockEditorStore ).canInsertBlockType(\n\t\t\t\t\t'core/template-part'\n\t\t\t\t),\n\t\t};\n\t}, [] );\n\n\tif ( ! canCreate ) {\n\t\treturn null;\n\t}\n\n\tconst onConvert = async ( templatePart ) => {\n\t\treplaceBlocks(\n\t\t\tclientIds,\n\t\t\tcreateBlock( 'core/template-part', {\n\t\t\t\tslug: templatePart.slug,\n\t\t\t\ttheme: templatePart.theme,\n\t\t\t} )\n\t\t);\n\t\tcreateSuccessNotice( __( 'Template part created.' ), {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\n\t\t// The modal and this component will be unmounted because of `replaceBlocks` above,\n\t\t// so no need to call `closeModal` or `onClose`.\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\ticon={ symbolFilled }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsModalOpen( true );\n\t\t\t\t} }\n\t\t\t\taria-expanded={ isModalOpen }\n\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t>\n\t\t\t\t{ __( 'Create template part' ) }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<CreateTemplatePartModal\n\t\t\t\t\tcloseModal={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t} }\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tonCreate={ onConvert }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tBlockSettingsMenuControls,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ConvertToRegularBlocks from './convert-to-regular';\nimport ConvertToTemplatePart from './convert-to-template-part';\n\nexport default function TemplatePartMenuItems() {\n\treturn (\n\t\t<BlockSettingsMenuControls>\n\t\t\t{ ( { selectedClientIds, onClose } ) => (\n\t\t\t\t<TemplatePartConverterMenuItem\n\t\t\t\t\tclientIds={ selectedClientIds }\n\t\t\t\t\tonClose={ onClose }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockSettingsMenuControls>\n\t);\n}\n\nfunction TemplatePartConverterMenuItem( { clientIds, onClose } ) {\n\tconst { blocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlocksByClientId } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tblocks: getBlocksByClientId( clientIds ),\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\t// Allow converting a single template part to standard blocks.\n\tif ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) {\n\t\treturn (\n\t\t\t<ConvertToRegularBlocks\n\t\t\t\tclientId={ clientIds[ 0 ] }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t);\n\t}\n\treturn <ConvertToTemplatePart clientIds={ clientIds } blocks={ blocks } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useLayoutEffect, useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tEntityProvider,\n\tuseEntityBlockEditor,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport {\n\tBlockEditorProvider,\n\tBlockContextProvider,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as editPatternsPrivateApis } from '@wordpress/patterns';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport { store as editorStore } from '../../store';\nimport useBlockEditorSettings from './use-block-editor-settings';\nimport { unlock } from '../../lock-unlock';\nimport DisableNonPageContentBlocks from './disable-non-page-content-blocks';\nimport NavigationBlockEditingMode from './navigation-block-editing-mode';\nimport { useHideBlocksFromInserter } from './use-hide-blocks-from-inserter';\nimport useCommands from '../commands';\nimport BlockRemovalWarnings from '../block-removal-warnings';\nimport StartPageOptions from '../start-page-options';\nimport KeyboardShortcutHelpModal from '../keyboard-shortcut-help-modal';\nimport ContentOnlySettingsMenu from '../block-settings-menu/content-only-settings-menu';\nimport StartTemplateOptions from '../start-template-options';\nimport EditorKeyboardShortcuts from '../global-keyboard-shortcuts';\nimport PatternRenameModal from '../pattern-rename-modal';\nimport PatternDuplicateModal from '../pattern-duplicate-modal';\nimport TemplatePartMenuItems from '../template-part-menu-items';\n\nconst { ExperimentalBlockEditorProvider } = unlock( blockEditorPrivateApis );\nconst { PatternsMenuItems } = unlock( editPatternsPrivateApis );\n\nconst noop = () => {};\n\n/**\n * These are global entities that are only there to split blocks into logical units\n * They don't provide a \"context\" for the current post/page being rendered.\n * So we should not use their ids as post context. This is important to allow post blocks\n * (post content, post title) to be used within them without issues.\n */\nconst NON_CONTEXTUAL_POST_TYPES = [\n\t'wp_block',\n\t'wp_navigation',\n\t'wp_template_part',\n];\n\n/**\n * These are rendering modes that the editor supports.\n */\nconst RENDERING_MODES = [ 'post-only', 'template-locked' ];\n\n/**\n * Depending on the post, template and template mode,\n * returns the appropriate blocks and change handlers for the block editor provider.\n *\n * @param {Array} post Block list.\n * @param {boolean} template Whether the page content has focus (and the surrounding template is inert). If `true` return page content blocks. Default `false`.\n * @param {string} mode Rendering mode.\n *\n * @example\n * ```jsx\n * const [ blocks, onInput, onChange ] = useBlockEditorProps( post, template, mode );\n * ```\n *\n * @return {Array} Block editor props.\n */\nfunction useBlockEditorProps( post, template, mode ) {\n\tconst rootLevelPost = mode === 'template-locked' ? 'template' : 'post';\n\tconst [ postBlocks, onInput, onChange ] = useEntityBlockEditor(\n\t\t'postType',\n\t\tpost.type,\n\t\t{ id: post.id }\n\t);\n\tconst [ templateBlocks, onInputTemplate, onChangeTemplate ] =\n\t\tuseEntityBlockEditor( 'postType', template?.type, {\n\t\t\tid: template?.id,\n\t\t} );\n\tconst maybeNavigationBlocks = useMemo( () => {\n\t\tif ( post.type === 'wp_navigation' ) {\n\t\t\treturn [\n\t\t\t\tcreateBlock( 'core/navigation', {\n\t\t\t\t\tref: post.id,\n\t\t\t\t\t// As the parent editor is locked with `templateLock`, the template locking\n\t\t\t\t\t// must be explicitly \"unset\" on the block itself to allow the user to modify\n\t\t\t\t\t// the block's content.\n\t\t\t\t\ttemplateLock: false,\n\t\t\t\t} ),\n\t\t\t];\n\t\t}\n\t}, [ post.type, post.id ] );\n\n\t// It is important that we don't create a new instance of blocks on every change\n\t// We should only create a new instance if the blocks them selves change, not a dependency of them.\n\tconst blocks = useMemo( () => {\n\t\tif ( maybeNavigationBlocks ) {\n\t\t\treturn maybeNavigationBlocks;\n\t\t}\n\n\t\tif ( rootLevelPost === 'template' ) {\n\t\t\treturn templateBlocks;\n\t\t}\n\n\t\treturn postBlocks;\n\t}, [ maybeNavigationBlocks, rootLevelPost, templateBlocks, postBlocks ] );\n\n\t// Handle fallback to postBlocks outside of the above useMemo, to ensure\n\t// that constructed block templates that call `createBlock` are not generated\n\t// too frequently. This ensures that clientIds are stable.\n\tconst disableRootLevelChanges =\n\t\t( !! template && mode === 'template-locked' ) ||\n\t\tpost.type === 'wp_navigation';\n\tif ( disableRootLevelChanges ) {\n\t\treturn [ blocks, noop, noop ];\n\t}\n\n\treturn [\n\t\tblocks,\n\t\trootLevelPost === 'post' ? onInput : onInputTemplate,\n\t\trootLevelPost === 'post' ? onChange : onChangeTemplate,\n\t];\n}\n\n/**\n * This component provides the editor context and manages the state of the block editor.\n *\n * @param {Object} props The component props.\n * @param {Object} props.post The post object.\n * @param {Object} props.settings The editor settings.\n * @param {boolean} props.recovery Indicates if the editor is in recovery mode.\n * @param {Array} props.initialEdits The initial edits for the editor.\n * @param {Object} props.children The child components.\n * @param {Object} [props.BlockEditorProviderComponent] The block editor provider component to use. Defaults to ExperimentalBlockEditorProvider.\n * @param {Object} [props.__unstableTemplate] The template object.\n *\n * @example\n * ```jsx\n * <ExperimentalEditorProvider\n * post={ post }\n * settings={ settings }\n * recovery={ recovery }\n * initialEdits={ initialEdits }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </ExperimentalEditorProvider>\n *\n * @return {Object} The rendered ExperimentalEditorProvider component.\n */\nexport const ExperimentalEditorProvider = withRegistryProvider(\n\t( {\n\t\tpost,\n\t\tsettings,\n\t\trecovery,\n\t\tinitialEdits,\n\t\tchildren,\n\t\tBlockEditorProviderComponent = ExperimentalBlockEditorProvider,\n\t\t__unstableTemplate: template,\n\t} ) => {\n\t\tconst hasTemplate = !! template;\n\t\tconst {\n\t\t\teditorSettings,\n\t\t\tselection,\n\t\t\tisReady,\n\t\t\tmode,\n\t\t\tdefaultMode,\n\t\t\tpostTypeEntities,\n\t\t} = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetEditorSettings,\n\t\t\t\t\tgetEditorSelection,\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\t__unstableIsEditorReady,\n\t\t\t\t} = select( editorStore );\n\t\t\t\tconst {\n\t\t\t\t\tgetEntitiesConfig,\n\t\t\t\t\tgetPostType,\n\t\t\t\t\thasFinishedResolution,\n\t\t\t\t} = select( coreStore );\n\n\t\t\t\tconst postTypeSupports = getPostType( post.type )?.supports;\n\t\t\t\tconst hasLoadedPostObject = hasFinishedResolution(\n\t\t\t\t\t'getPostType',\n\t\t\t\t\t[ post.type ]\n\t\t\t\t);\n\n\t\t\t\tconst _defaultMode = Array.isArray( postTypeSupports?.editor )\n\t\t\t\t\t? postTypeSupports.editor.find(\n\t\t\t\t\t\t\t( features ) => 'default_mode' in features\n\t\t\t\t\t )?.default_mode\n\t\t\t\t\t: undefined;\n\t\t\t\tconst hasDefaultMode = RENDERING_MODES.includes( _defaultMode );\n\n\t\t\t\treturn {\n\t\t\t\t\teditorSettings: getEditorSettings(),\n\t\t\t\t\tisReady: __unstableIsEditorReady() && hasLoadedPostObject,\n\t\t\t\t\tmode: getRenderingMode(),\n\t\t\t\t\tdefaultMode:\n\t\t\t\t\t\thasTemplate && hasDefaultMode\n\t\t\t\t\t\t\t? _defaultMode\n\t\t\t\t\t\t\t: 'post-only',\n\t\t\t\t\tselection: getEditorSelection(),\n\t\t\t\t\tpostTypeEntities:\n\t\t\t\t\t\tpost.type === 'wp_template'\n\t\t\t\t\t\t\t? getEntitiesConfig( 'postType' )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ post.type, hasTemplate ]\n\t\t);\n\n\t\tconst shouldRenderTemplate = !! template && mode !== 'post-only';\n\t\tconst rootLevelPost = shouldRenderTemplate ? template : post;\n\t\tconst defaultBlockContext = useMemo( () => {\n\t\t\tconst postContext = {};\n\t\t\t// If it is a template, try to inherit the post type from the name.\n\t\t\tif ( post.type === 'wp_template' ) {\n\t\t\t\tif ( post.slug === 'page' ) {\n\t\t\t\t\tpostContext.postType = 'page';\n\t\t\t\t} else if ( post.slug === 'single' ) {\n\t\t\t\t\tpostContext.postType = 'post';\n\t\t\t\t} else if ( post.slug.split( '-' )[ 0 ] === 'single' ) {\n\t\t\t\t\t// If the slug is single-{postType}, infer the post type from the name.\n\t\t\t\t\tconst postTypeNames =\n\t\t\t\t\t\tpostTypeEntities?.map( ( entity ) => entity.name ) ||\n\t\t\t\t\t\t[];\n\t\t\t\t\tconst match = post.slug.match(\n\t\t\t\t\t\t`^single-(${ postTypeNames.join( '|' ) })(?:-.+)?$`\n\t\t\t\t\t);\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tpostContext.postType = match[ 1 ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\t! NON_CONTEXTUAL_POST_TYPES.includes( rootLevelPost.type ) ||\n\t\t\t\tshouldRenderTemplate\n\t\t\t) {\n\t\t\t\tpostContext.postId = post.id;\n\t\t\t\tpostContext.postType = post.type;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...postContext,\n\t\t\t\ttemplateSlug:\n\t\t\t\t\trootLevelPost.type === 'wp_template'\n\t\t\t\t\t\t? rootLevelPost.slug\n\t\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t}, [\n\t\t\tshouldRenderTemplate,\n\t\t\tpost.id,\n\t\t\tpost.type,\n\t\t\tpost.slug,\n\t\t\trootLevelPost.type,\n\t\t\trootLevelPost.slug,\n\t\t\tpostTypeEntities,\n\t\t] );\n\t\tconst { id, type } = rootLevelPost;\n\t\tconst blockEditorSettings = useBlockEditorSettings(\n\t\t\teditorSettings,\n\t\t\ttype,\n\t\t\tid,\n\t\t\tmode\n\t\t);\n\t\tconst [ blocks, onInput, onChange ] = useBlockEditorProps(\n\t\t\tpost,\n\t\t\ttemplate,\n\t\t\tmode\n\t\t);\n\n\t\tconst {\n\t\t\tupdatePostLock,\n\t\t\tsetupEditor,\n\t\t\tupdateEditorSettings,\n\t\t\tsetCurrentTemplateId,\n\t\t\tsetEditedPost,\n\t\t\tsetRenderingMode,\n\t\t} = unlock( useDispatch( editorStore ) );\n\t\tconst { createWarningNotice } = useDispatch( noticesStore );\n\n\t\t// Ideally this should be synced on each change and not just something you do once.\n\t\tuseLayoutEffect( () => {\n\t\t\t// Assume that we don't need to initialize in the case of an error recovery.\n\t\t\tif ( recovery ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tupdatePostLock( settings.postLock );\n\t\t\tsetupEditor( post, initialEdits, settings.template );\n\t\t\tif ( settings.autosave ) {\n\t\t\t\tcreateWarningNotice(\n\t\t\t\t\t__(\n\t\t\t\t\t\t'There is an autosave of this post that is more recent than the version below.'\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'autosave-exists',\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'View the autosave' ),\n\t\t\t\t\t\t\t\turl: settings.autosave.editLink,\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\n\t\t\t// The dependencies of the hook are omitted deliberately\n\t\t\t// We only want to run setupEditor (with initialEdits) only once per post.\n\t\t\t// A better solution in the future would be to split this effect into multiple ones.\n\t\t}, [] );\n\n\t\t// Synchronizes the active post with the state\n\t\tuseEffect( () => {\n\t\t\tsetEditedPost( post.type, post.id );\n\t\t}, [ post.type, post.id, setEditedPost ] );\n\n\t\t// Synchronize the editor settings as they change.\n\t\tuseEffect( () => {\n\t\t\tupdateEditorSettings( settings );\n\t\t}, [ settings, updateEditorSettings ] );\n\n\t\t// Synchronizes the active template with the state.\n\t\tuseEffect( () => {\n\t\t\tsetCurrentTemplateId( template?.id );\n\t\t}, [ template?.id, setCurrentTemplateId ] );\n\n\t\t// Sets the right rendering mode when loading the editor.\n\t\tuseEffect( () => {\n\t\t\tsetRenderingMode( defaultMode );\n\t\t}, [ defaultMode, setRenderingMode ] );\n\n\t\tuseHideBlocksFromInserter( post.type, mode );\n\n\t\t// Register the editor commands.\n\t\tuseCommands();\n\n\t\tif ( ! isReady || ! mode ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<EntityProvider kind=\"root\" type=\"site\">\n\t\t\t\t<EntityProvider\n\t\t\t\t\tkind=\"postType\"\n\t\t\t\t\ttype={ post.type }\n\t\t\t\t\tid={ post.id }\n\t\t\t\t>\n\t\t\t\t\t<BlockContextProvider value={ defaultBlockContext }>\n\t\t\t\t\t\t<BlockEditorProviderComponent\n\t\t\t\t\t\t\tvalue={ blocks }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonInput={ onInput }\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tsettings={ blockEditorSettings }\n\t\t\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t{ ! settings.isPreviewMode && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<PatternsMenuItems />\n\t\t\t\t\t\t\t\t\t<TemplatePartMenuItems />\n\t\t\t\t\t\t\t\t\t<ContentOnlySettingsMenu />\n\t\t\t\t\t\t\t\t\t{ mode === 'template-locked' && (\n\t\t\t\t\t\t\t\t\t\t<DisableNonPageContentBlocks />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ type === 'wp_navigation' && (\n\t\t\t\t\t\t\t\t\t\t<NavigationBlockEditingMode />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<EditorKeyboardShortcuts />\n\t\t\t\t\t\t\t\t\t<KeyboardShortcutHelpModal />\n\t\t\t\t\t\t\t\t\t<BlockRemovalWarnings />\n\t\t\t\t\t\t\t\t\t<StartPageOptions />\n\t\t\t\t\t\t\t\t\t<StartTemplateOptions />\n\t\t\t\t\t\t\t\t\t<PatternRenameModal />\n\t\t\t\t\t\t\t\t\t<PatternDuplicateModal />\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockEditorProviderComponent>\n\t\t\t\t\t</BlockContextProvider>\n\t\t\t\t</EntityProvider>\n\t\t\t</EntityProvider>\n\t\t);\n\t}\n);\n\n/**\n * This component establishes a new post editing context, and serves as the entry point for a new post editor (or post with template editor).\n *\n * It supports a large number of post types, including post, page, templates,\n * custom post types, patterns, template parts.\n *\n * All modification and changes are performed to the `@wordpress/core-data` store.\n *\n * @param {Object} props The component props.\n * @param {Object} [props.post] The post object to edit. This is required.\n * @param {Object} [props.__unstableTemplate] The template object wrapper the edited post.\n * This is optional and can only be used when the post type supports templates (like posts and pages).\n * @param {Object} [props.settings] The settings object to use for the editor.\n * This is optional and can be used to override the default settings.\n * @param {React.ReactNode} [props.children] Children elements for which the BlockEditorProvider context should apply.\n * This is optional.\n *\n * @example\n * ```jsx\n * <EditorProvider\n * post={ post }\n * settings={ settings }\n * __unstableTemplate={ template }\n * >\n * { children }\n * </EditorProvider>\n * ```\n *\n * @return {React.ReactNode} The rendered EditorProvider component.\n */\nexport function EditorProvider( props ) {\n\treturn (\n\t\t<ExperimentalEditorProvider\n\t\t\t{ ...props }\n\t\t\tBlockEditorProviderComponent={ BlockEditorProvider }\n\t\t>\n\t\t\t{ props.children }\n\t\t</ExperimentalEditorProvider>\n\t);\n}\n\nexport default EditorProvider;\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, isRTL, sprintf } from '@wordpress/i18n';\nimport {\n\tblockDefault,\n\tcode,\n\tdrawerLeft,\n\tdrawerRight,\n\tedit,\n\tformatListBullets,\n\tlistView,\n\texternal,\n\tkeyboard,\n\tsymbol,\n\tpage,\n\tlayout,\n\trotateRight,\n\trotateLeft,\n} from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore, useEntityRecord } from '@wordpress/core-data';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { getPath } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport { modalName as patternRenameModalName } from '../pattern-rename-modal';\nimport { modalName as patternDuplicateModalName } from '../pattern-duplicate-modal';\nimport isTemplateRevertable from '../../store/utils/is-template-revertable';\n\nconst getEditorCommandLoader = () =>\n\tfunction useEditorCommandLoader() {\n\t\tconst {\n\t\t\teditorMode,\n\t\t\tisListViewOpen,\n\t\t\tshowBlockBreadcrumbs,\n\t\t\tisDistractionFree,\n\t\t\tisFocusMode,\n\t\t\tisPreviewMode,\n\t\t\tisViewable,\n\t\t\tisCodeEditingEnabled,\n\t\t\tisRichEditingEnabled,\n\t\t\tisPublishSidebarEnabled,\n\t\t} = useSelect( ( select ) => {\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst { isListViewOpened, getCurrentPostType, getEditorSettings } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst { getPostType } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditorMode: get( 'core', 'editorMode' ) ?? 'visual',\n\t\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\t\tisFocusMode: get( 'core', 'focusMode' ),\n\t\t\t\tisPreviewMode: getSettings().isPreviewMode,\n\t\t\t\tisViewable:\n\t\t\t\t\tgetPostType( getCurrentPostType() )?.viewable ?? false,\n\t\t\t\tisCodeEditingEnabled: getEditorSettings().codeEditingEnabled,\n\t\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t\t\tisPublishSidebarEnabled:\n\t\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\t\tconst { toggle } = useDispatch( preferencesStore );\n\t\tconst { createInfoNotice } = useDispatch( noticesStore );\n\t\tconst {\n\t\t\t__unstableSaveForPreview,\n\t\t\tsetIsListViewOpened,\n\t\t\tswitchEditorMode,\n\t\t\ttoggleDistractionFree,\n\t\t\ttoggleSpotlightMode,\n\t\t\ttoggleTopToolbar,\n\t\t} = useDispatch( editorStore );\n\t\tconst { openModal, enableComplementaryArea, disableComplementaryArea } =\n\t\t\tuseDispatch( interfaceStore );\n\t\tconst { getCurrentPostId } = useSelect( editorStore );\n\t\tconst { isBlockBasedTheme, canCreateTemplate } = useSelect(\n\t\t\t( select ) => {\n\t\t\t\treturn {\n\t\t\t\t\tisBlockBasedTheme:\n\t\t\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t\t\t\tcanCreateTemplate: select( coreStore ).canUser( 'create', {\n\t\t\t\t\t\tkind: 'postType',\n\t\t\t\t\t\tname: 'wp_template',\n\t\t\t\t\t} ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[]\n\t\t);\n\t\tconst allowSwitchEditorMode =\n\t\t\tisCodeEditingEnabled && isRichEditingEnabled;\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { commands: [], isLoading: false };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-shortcut-help',\n\t\t\tlabel: __( 'Keyboard shortcuts' ),\n\t\t\ticon: keyboard,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/keyboard-shortcut-help' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-distraction-free',\n\t\t\tlabel: isDistractionFree\n\t\t\t\t? __( 'Exit Distraction free' )\n\t\t\t\t: __( 'Enter Distraction free' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleDistractionFree();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-preferences',\n\t\t\tlabel: __( 'Editor preferences' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\topenModal( 'editor/preferences' );\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-spotlight-mode',\n\t\t\tlabel: isFocusMode\n\t\t\t\t? __( 'Exit Spotlight mode' )\n\t\t\t\t: __( 'Enter Spotlight mode' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleSpotlightMode();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-list-view',\n\t\t\tlabel: isListViewOpen\n\t\t\t\t? __( 'Close List View' )\n\t\t\t\t: __( 'Open List View' ),\n\t\t\ticon: listView,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetIsListViewOpened( ! isListViewOpen );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisListViewOpen\n\t\t\t\t\t\t? __( 'List View off.' )\n\t\t\t\t\t\t: __( 'List View on.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-list-view/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-top-toolbar',\n\t\t\tlabel: __( 'Top toolbar' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggleTopToolbar();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\n\t\tif ( allowSwitchEditorMode ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/toggle-code-editor',\n\t\t\t\tlabel:\n\t\t\t\t\teditorMode === 'visual'\n\t\t\t\t\t\t? __( 'Open code editor' )\n\t\t\t\t\t\t: __( 'Exit code editor' ),\n\t\t\t\ticon: code,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tswitchEditorMode(\n\t\t\t\t\t\teditorMode === 'visual' ? 'text' : 'visual'\n\t\t\t\t\t);\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-breadcrumbs',\n\t\t\tlabel: showBlockBreadcrumbs\n\t\t\t\t? __( 'Hide block breadcrumbs' )\n\t\t\t\t: __( 'Show block breadcrumbs' ),\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\ttoggle( 'core', 'showBlockBreadcrumbs' );\n\t\t\t\tclose();\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tshowBlockBreadcrumbs\n\t\t\t\t\t\t? __( 'Breadcrumbs hidden.' )\n\t\t\t\t\t\t: __( 'Breadcrumbs visible.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/toggle-breadcrumbs/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-settings-sidebar',\n\t\t\tlabel: __( 'Show or hide the Settings panel.' ),\n\t\t\ticon: isRTL() ? drawerLeft : drawerRight,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/document' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/open-block-inspector',\n\t\t\tlabel: __( 'Show or hide the Block settings panel' ),\n\t\t\ticon: blockDefault,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\t\t\t\tclose();\n\t\t\t\tif ( activeSidebar === 'edit-post/block' ) {\n\t\t\t\t\tdisableComplementaryArea( 'core' );\n\t\t\t\t} else {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\n\t\tcommands.push( {\n\t\t\tname: 'core/toggle-publish-sidebar',\n\t\t\tlabel: isPublishSidebarEnabled\n\t\t\t\t? __( 'Disable pre-publish checks' )\n\t\t\t\t: __( 'Enable pre-publish checks' ),\n\t\t\ticon: formatListBullets,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tclose();\n\t\t\t\ttoggle( 'core', 'isPublishSidebarEnabled' );\n\t\t\t\tcreateInfoNotice(\n\t\t\t\t\tisPublishSidebarEnabled\n\t\t\t\t\t\t? __( 'Pre-publish checks disabled.' )\n\t\t\t\t\t\t: __( 'Pre-publish checks enabled.' ),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'core/editor/publish-sidebar/notice',\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t},\n\t\t} );\n\n\t\tif ( isViewable ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/preview-link',\n\t\t\t\tlabel: __( 'Preview in a new tab' ),\n\t\t\t\ticon: external,\n\t\t\t\tcallback: async ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\t\tconst link = await __unstableSaveForPreview();\n\t\t\t\t\twindow.open( link, `wp-preview-${ postId }` );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\tif ( canCreateTemplate && isBlockBasedTheme ) {\n\t\t\tconst isSiteEditor = getPath( window.location.href )?.includes(\n\t\t\t\t'site-editor.php'\n\t\t\t);\n\t\t\tif ( ! isSiteEditor ) {\n\t\t\t\tcommands.push( {\n\t\t\t\t\tname: 'core/go-to-site-editor',\n\t\t\t\t\tlabel: __( 'Open Site Editor' ),\n\t\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\t\tclose();\n\t\t\t\t\t\tdocument.location = 'site-editor.php';\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcommands,\n\t\t\tisLoading: false,\n\t\t};\n\t};\n\nconst getEditedEntityContextualCommands = () =>\n\tfunction useEditedEntityContextualCommands() {\n\t\tconst { postType } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostType } = select( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { openModal } = useDispatch( interfaceStore );\n\t\tconst commands = [];\n\n\t\tif ( postType === PATTERN_POST_TYPE ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/rename-pattern',\n\t\t\t\tlabel: __( 'Rename pattern' ),\n\t\t\t\ticon: edit,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternRenameModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/duplicate-pattern',\n\t\t\t\tlabel: __( 'Duplicate pattern' ),\n\t\t\t\ticon: symbol,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\topenModal( patternDuplicateModalName );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getPageContentFocusCommands = () =>\n\tfunction usePageContentFocusCommands() {\n\t\tconst { onNavigateToEntityRecord, goBack, templateId, isPreviewMode } =\n\t\t\tuseSelect( ( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetRenderingMode,\n\t\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\t\tgetCurrentTemplateId,\n\t\t\t\t} = unlock( select( editorStore ) );\n\t\t\t\tconst editorSettings = _getEditorSettings();\n\t\t\t\treturn {\n\t\t\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\t\t\tgoBack: editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\t\t};\n\t\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_template',\n\t\t\ttemplateId\n\t\t);\n\n\t\tif ( isPreviewMode ) {\n\t\t\treturn { isLoading: false, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( templateId && hasResolved ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-template-focus',\n\t\t\t\tlabel: sprintf(\n\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t__( 'Edit template: %s' ),\n\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t),\n\t\t\t\ticon: layout,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\tpostId: templateId,\n\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t} );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tif ( !! goBack ) {\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/switch-to-previous-entity',\n\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\ticon: page,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tgoBack();\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn { isLoading: false, commands };\n\t};\n\nconst getManipulateDocumentCommands = () =>\n\tfunction useManipulateDocumentCommands() {\n\t\tconst { postType, postId } = useSelect( ( select ) => {\n\t\t\tconst { getCurrentPostId, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t}, [] );\n\t\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId\n\t\t);\n\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\tconst { revertTemplate } = unlock( useDispatch( editorStore ) );\n\n\t\tif (\n\t\t\t! hasResolved ||\n\t\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t)\n\t\t) {\n\t\t\treturn { isLoading: true, commands: [] };\n\t\t}\n\n\t\tconst commands = [];\n\n\t\tif ( isTemplateRevertable( template ) ) {\n\t\t\tconst label =\n\t\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t\t__( 'Reset template: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t\t__( 'Reset template part: %s' ),\n\t\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t\t );\n\t\t\tcommands.push( {\n\t\t\t\tname: 'core/reset-template',\n\t\t\t\tlabel,\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\trevertTemplate( template );\n\t\t\t\t\tclose();\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn {\n\t\t\tisLoading: ! hasResolved,\n\t\t\tcommands,\n\t\t};\n\t};\n\nexport default function useCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/editor/edit-ui',\n\t\thook: getEditorCommandLoader(),\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/contextual-commands',\n\t\thook: getEditedEntityContextualCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/editor/page-content-focus',\n\t\thook: getPageContentFocusCommands(),\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: getManipulateDocumentCommands(),\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockPreview,\n\tprivateApis as blockEditorPrivateApis,\n\t// @ts-ignore\n} from '@wordpress/block-editor';\nimport type { BasePost } from '@wordpress/fields';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityBlockEditor, store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { EditorProvider } from '../../../components/provider';\nimport { unlock } from '../../../lock-unlock';\n// @ts-ignore\nimport { store as editorStore } from '../../../store';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction PostPreviewContainer( {\n\ttemplate,\n\tpost,\n}: {\n\ttemplate: any;\n\tpost: any;\n} ) {\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ postBlocks ] = useEntityBlockEditor( 'postType', post.type, {\n\t\tid: post.id,\n\t} );\n\tconst [ templateBlocks ] = useEntityBlockEditor(\n\t\t'postType',\n\t\ttemplate?.type,\n\t\t{\n\t\t\tid: template?.id,\n\t\t}\n\t);\n\tconst blocks = template && templateBlocks ? templateBlocks : postBlocks;\n\tconst isEmpty = ! blocks?.length;\n\treturn (\n\t\t<div\n\t\t\tclassName=\"editor-fields-content-preview\"\n\t\t\tstyle={ {\n\t\t\t\tbackgroundColor,\n\t\t\t} }\n\t\t>\n\t\t\t{ isEmpty && (\n\t\t\t\t<span className=\"editor-fields-content-preview__empty\">\n\t\t\t\t\t{ __( 'Empty content' ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t\t{ ! isEmpty && (\n\t\t\t\t<BlockPreview.Async>\n\t\t\t\t\t<BlockPreview blocks={ blocks } />\n\t\t\t\t</BlockPreview.Async>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default function PostPreviewView( { item }: { item: BasePost } ) {\n\tconst { settings, template } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getPostType, getTemplateId, getEntityRecord } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\tconst canViewTemplate = canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\tconst _settings = select( editorStore ).getEditorSettings();\n\t\t\t// @ts-ignore\n\t\t\tconst supportsTemplateMode = _settings.supportsTemplateMode;\n\t\t\tconst isViewable = getPostType( item.type )?.viewable ?? false;\n\n\t\t\tconst templateId =\n\t\t\t\tsupportsTemplateMode && isViewable && canViewTemplate\n\t\t\t\t\t? getTemplateId( item.type, item.id )\n\t\t\t\t\t: null;\n\t\t\treturn {\n\t\t\t\tsettings: _settings,\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord( 'postType', 'wp_template', templateId )\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[ item.type, item.id ]\n\t);\n\t// Wrap everything in a block editor provider to ensure 'styles' that are needed\n\t// for the previews are synced between the site editor store and the block editor store.\n\t// Additionally we need to have the `__experimentalBlockPatterns` setting in order to\n\t// render patterns inside the previews.\n\t// TODO: Same approach is used in the patterns list and it becomes obvious that some of\n\t// the block editor settings are needed in context where we don't have the block editor.\n\t// Explore how we can solve this in a better way.\n\treturn (\n\t\t<EditorProvider\n\t\t\tpost={ item }\n\t\t\tsettings={ settings }\n\t\t\t__unstableTemplate={ template }\n\t\t>\n\t\t\t<PostPreviewContainer template={ template } post={ item } />\n\t\t</EditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport type { Field } from '@wordpress/dataviews';\nimport type { BasePost } from '@wordpress/fields';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPreviewView from './content-preview-view';\n\nconst postPreviewField: Field< BasePost > = {\n\ttype: 'media',\n\tid: 'content-preview',\n\tlabel: __( 'Content preview' ),\n\trender: PostPreviewView,\n\tenableSorting: false,\n};\n\nexport default postPreviewField;\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport type { Action, Field } from '@wordpress/dataviews';\nimport { doAction } from '@wordpress/hooks';\nimport type { PostType } from '@wordpress/fields';\nimport {\n\tviewPost,\n\tviewPostRevisions,\n\tduplicatePost,\n\tduplicatePattern,\n\treorderPage,\n\texportPattern,\n\tpermanentlyDeletePost,\n\trestorePost,\n\ttrashPost,\n\trenamePost,\n\tresetPost,\n\tdeletePost,\n\tduplicateTemplatePart,\n\tfeaturedImageField,\n\tdateField,\n\tparentField,\n\tpasswordField,\n\tcommentStatusField,\n\tslugField,\n\tstatusField,\n\tauthorField,\n\ttitleField,\n\ttemplateField,\n\ttemplateTitleField,\n\tpageTitleField,\n\tpatternTitleField,\n} from '@wordpress/fields';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport postPreviewField from '../fields/content-preview';\nimport { unlock } from '../../lock-unlock';\n\nexport function registerEntityAction< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Action< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityAction(\n\tkind: string,\n\tname: string,\n\tactionId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_ACTION' as const,\n\t\tkind,\n\t\tname,\n\t\tactionId,\n\t};\n}\n\nexport function registerEntityField< Item >(\n\tkind: string,\n\tname: string,\n\tconfig: Field< Item >\n) {\n\treturn {\n\t\ttype: 'REGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tconfig,\n\t};\n}\n\nexport function unregisterEntityField(\n\tkind: string,\n\tname: string,\n\tfieldId: string\n) {\n\treturn {\n\t\ttype: 'UNREGISTER_ENTITY_FIELD' as const,\n\t\tkind,\n\t\tname,\n\t\tfieldId,\n\t};\n}\n\nexport function setIsReady( kind: string, name: string ) {\n\treturn {\n\t\ttype: 'SET_IS_READY' as const,\n\t\tkind,\n\t\tname,\n\t};\n}\n\nexport const registerPostTypeSchema =\n\t( postType: string ) =>\n\tasync ( { registry }: { registry: any } ) => {\n\t\tconst isReady = unlock( registry.select( editorStore ) ).isEntityReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\t\tif ( isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\tunlock( registry.dispatch( editorStore ) ).setIsReady(\n\t\t\t'postType',\n\t\t\tpostType\n\t\t);\n\n\t\tconst postTypeConfig = ( await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getPostType( postType ) ) as PostType;\n\n\t\tconst canCreate = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: postType,\n\t\t\t} );\n\t\tconst currentTheme = await registry\n\t\t\t.resolveSelect( coreStore )\n\t\t\t.getCurrentTheme();\n\n\t\tconst actions = [\n\t\t\tpostTypeConfig.viewable ? viewPost : undefined,\n\t\t\t!! postTypeConfig.supports?.revisions\n\t\t\t\t? viewPostRevisions\n\t\t\t\t: undefined,\n\t\t\t// @ts-ignore\n\t\t\tglobalThis.IS_GUTENBERG_PLUGIN\n\t\t\t\t? ! [ 'wp_template', 'wp_block', 'wp_template_part' ].includes(\n\t\t\t\t\t\tpostTypeConfig.slug\n\t\t\t\t ) &&\n\t\t\t\t canCreate &&\n\t\t\t\t duplicatePost\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_template_part' &&\n\t\t\tcanCreate &&\n\t\t\tcurrentTheme?.is_block_theme\n\t\t\t\t? duplicateTemplatePart\n\t\t\t\t: undefined,\n\t\t\tcanCreate && postTypeConfig.slug === 'wp_block'\n\t\t\t\t? duplicatePattern\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.supports?.title ? renamePost : undefined,\n\t\t\tpostTypeConfig.supports?.[ 'page-attributes' ]\n\t\t\t\t? reorderPage\n\t\t\t\t: undefined,\n\t\t\tpostTypeConfig.slug === 'wp_block' ? exportPattern : undefined,\n\t\t\trestorePost,\n\t\t\tresetPost,\n\t\t\tdeletePost,\n\t\t\ttrashPost,\n\t\t\tpermanentlyDeletePost,\n\t\t].filter( Boolean );\n\n\t\tconst fields = [\n\t\t\tpostTypeConfig.supports?.thumbnail &&\n\t\t\t\tcurrentTheme?.theme_supports?.[ 'post-thumbnails' ] &&\n\t\t\t\tfeaturedImageField,\n\t\t\tpostTypeConfig.supports?.author && authorField,\n\t\t\tstatusField,\n\t\t\tdateField,\n\t\t\tslugField,\n\t\t\tpostTypeConfig.supports?.[ 'page-attributes' ] && parentField,\n\t\t\tpostTypeConfig.supports?.comments && commentStatusField,\n\t\t\ttemplateField,\n\t\t\tpasswordField,\n\t\t\tpostTypeConfig.supports?.editor &&\n\t\t\t\tpostTypeConfig.viewable &&\n\t\t\t\tpostPreviewField,\n\t\t].filter( Boolean );\n\t\tif ( postTypeConfig.supports?.title ) {\n\t\t\tlet _titleField;\n\t\t\tif ( postType === 'page' ) {\n\t\t\t\t_titleField = pageTitleField;\n\t\t\t} else if ( postType === 'wp_template' ) {\n\t\t\t\t_titleField = templateTitleField;\n\t\t\t} else if ( postType === 'wp_block' ) {\n\t\t\t\t_titleField = patternTitleField;\n\t\t\t} else {\n\t\t\t\t_titleField = titleField;\n\t\t\t}\n\t\t\tfields.push( _titleField );\n\t\t}\n\n\t\tregistry.batch( () => {\n\t\t\tactions.forEach( ( action ) => {\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityAction(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\taction\n\t\t\t\t);\n\t\t\t} );\n\t\t\tfields.forEach( ( field ) => {\n\t\t\t\tunlock( registry.dispatch( editorStore ) ).registerEntityField(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tfield\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\n\t\tdoAction( 'core.registerPostTypeSchema', postType );\n\t};\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport { parse, __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport isTemplateRevertable from './utils/is-template-revertable';\nexport * from '../dataviews/store/private-actions';\n\n/**\n * Returns an action object used to set which template is currently being used/edited.\n *\n * @param {string} id Template Id.\n *\n * @return {Object} Action object.\n */\nexport function setCurrentTemplateId( id ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_TEMPLATE_ID',\n\t\tid,\n\t};\n}\n\n/**\n * Create a block based template.\n *\n * @param {?Object} template Template to create and assign.\n */\nexport const createTemplate =\n\t( template ) =>\n\tasync ( { select, dispatch, registry } ) => {\n\t\tconst savedTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', 'wp_template', template );\n\t\tregistry\n\t\t\t.dispatch( coreStore )\n\t\t\t.editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tselect.getCurrentPostType(),\n\t\t\t\tselect.getCurrentPostId(),\n\t\t\t\t{\n\t\t\t\t\ttemplate: savedTemplate.slug,\n\t\t\t\t}\n\t\t\t);\n\t\tregistry\n\t\t\t.dispatch( noticesStore )\n\t\t\t.createSuccessNotice(\n\t\t\t\t__( \"Custom template created. You're in template mode now.\" ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\tdispatch.setRenderingMode(\n\t\t\t\t\t\t\t\t\tselect.getEditorSettings()\n\t\t\t\t\t\t\t\t\t\t.defaultRenderingMode\n\t\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\treturn savedTemplate;\n\t};\n\n/**\n * Update the provided block types to be visible.\n *\n * @param {string[]} blockNames Names of block types to show.\n */\nexport const showBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst newBlockNames = existingBlockNames.filter(\n\t\t\t( type ) =>\n\t\t\t\t! (\n\t\t\t\t\tArray.isArray( blockNames ) ? blockNames : [ blockNames ]\n\t\t\t\t).includes( type )\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', newBlockNames );\n\t};\n\n/**\n * Update the provided block types to be hidden.\n *\n * @param {string[]} blockNames Names of block types to hide.\n */\nexport const hideBlockTypes =\n\t( blockNames ) =>\n\t( { registry } ) => {\n\t\tconst existingBlockNames =\n\t\t\tregistry\n\t\t\t\t.select( preferencesStore )\n\t\t\t\t.get( 'core', 'hiddenBlockTypes' ) ?? [];\n\n\t\tconst mergedBlockNames = new Set( [\n\t\t\t...existingBlockNames,\n\t\t\t...( Array.isArray( blockNames ) ? blockNames : [ blockNames ] ),\n\t\t] );\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.set( 'core', 'hiddenBlockTypes', [ ...mergedBlockNames ] );\n\t};\n\n/**\n * Save entity records marked as dirty.\n *\n * @param {Object} options Options for the action.\n * @param {Function} [options.onSave] Callback when saving happens.\n * @param {object[]} [options.dirtyEntityRecords] Array of dirty entities.\n * @param {object[]} [options.entitiesToSkip] Array of entities to skip saving.\n * @param {Function} [options.close] Callback when the actions is called. It should be consolidated with `onSave`.\n */\nexport const saveDirtyEntities =\n\t( { onSave, dirtyEntityRecords = [], entitiesToSkip = [], close } = {} ) =>\n\t( { registry } ) => {\n\t\tconst PUBLISH_ON_SAVE_ENTITIES = [\n\t\t\t{ kind: 'postType', name: 'wp_navigation' },\n\t\t];\n\t\tconst saveNoticeId = 'site-editor-save-success';\n\t\tconst homeUrl = registry\n\t\t\t.select( coreStore )\n\t\t\t.getEntityRecord( 'root', '__unstableBase' )?.home;\n\t\tregistry.dispatch( noticesStore ).removeNotice( saveNoticeId );\n\t\tconst entitiesToSave = dirtyEntityRecords.filter(\n\t\t\t( { kind, name, key, property } ) => {\n\t\t\t\treturn ! entitiesToSkip.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === kind &&\n\t\t\t\t\t\telt.name === name &&\n\t\t\t\t\t\telt.key === key &&\n\t\t\t\t\t\telt.property === property\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t\tclose?.( entitiesToSave );\n\t\tconst siteItemsToSave = [];\n\t\tconst pendingSavedRecords = [];\n\t\tentitiesToSave.forEach( ( { kind, name, key, property } ) => {\n\t\t\tif ( 'root' === kind && 'site' === name ) {\n\t\t\t\tsiteItemsToSave.push( property );\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tPUBLISH_ON_SAVE_ENTITIES.some(\n\t\t\t\t\t\t( typeToPublish ) =>\n\t\t\t\t\t\t\ttypeToPublish.kind === kind &&\n\t\t\t\t\t\t\ttypeToPublish.name === name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord( kind, name, key, {\n\t\t\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\tpendingSavedRecords.push(\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.saveEditedEntityRecord( kind, name, key )\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t\tif ( siteItemsToSave.length ) {\n\t\t\tpendingSavedRecords.push(\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.__experimentalSaveSpecifiedEntityEdits(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'site',\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tsiteItemsToSave\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\tregistry\n\t\t\t.dispatch( blockEditorStore )\n\t\t\t.__unstableMarkLastChangeAsPersistent();\n\t\tPromise.all( pendingSavedRecords )\n\t\t\t.then( ( values ) => {\n\t\t\t\treturn onSave ? onSave( values ) : values;\n\t\t\t} )\n\t\t\t.then( ( values ) => {\n\t\t\t\tif (\n\t\t\t\t\tvalues.some( ( value ) => typeof value === 'undefined' )\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createErrorNotice( __( 'Saving failed.' ) );\n\t\t\t\t} else {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t\t.createSuccessNotice( __( 'Site updated.' ), {\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tid: saveNoticeId,\n\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: __( 'View site' ),\n\t\t\t\t\t\t\t\t\turl: homeUrl,\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}\n\t\t\t} )\n\t\t\t.catch( ( error ) =>\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t`${ __( 'Saving failed.' ) } ${ error }`\n\t\t\t\t\t)\n\t\t\t);\n\t};\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, { allowUndo = true } = {} ) =>\n\tasync ( { registry } ) => {\n\t\tconst noticeId = 'edit-site-template-reverted';\n\t\tregistry.dispatch( noticesStore ).removeNotice( noticeId );\n\t\tif ( ! isTemplateRevertable( template ) ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( __( 'This template is not revertable.' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst templateEntityConfig = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEntityConfig( 'postType', template.type );\n\n\t\t\tif ( ! templateEntityConfig ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst fileTemplatePath = addQueryArgs(\n\t\t\t\t`${ templateEntityConfig.baseURL }/${ template.id }`,\n\t\t\t\t{ context: 'edit', source: template.origin }\n\t\t\t);\n\n\t\t\tconst fileTemplate = await apiFetch( { path: fileTemplatePath } );\n\t\t\tif ( ! fileTemplate ) {\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createErrorNotice(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'The editor has encountered an unexpected error. Please reload.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{ type: 'snackbar' }\n\t\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst serializeBlocks = ( {\n\t\t\t\tblocks: blocksForSerialization = [],\n\t\t\t} ) => __unstableSerializeAndClean( blocksForSerialization );\n\n\t\t\tconst edited = registry\n\t\t\t\t.select( coreStore )\n\t\t\t\t.getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\ttemplate.type,\n\t\t\t\t\ttemplate.id\n\t\t\t\t);\n\n\t\t\t// We are fixing up the undo level here to make sure we can undo\n\t\t\t// the revert in the header toolbar correctly.\n\t\t\tregistry.dispatch( coreStore ).editEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\ttemplate.type,\n\t\t\t\ttemplate.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: serializeBlocks, // Required to make the `undo` behave correctly.\n\t\t\t\t\tblocks: edited.blocks, // Required to revert the blocks in the editor.\n\t\t\t\t\tsource: 'custom', // required to avoid turning the editor into a dirty state\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tundoIgnore: true, // Required to merge this edit with the last undo level.\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tconst blocks = parse( fileTemplate?.content?.raw );\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord( 'postType', template.type, fileTemplate.id, {\n\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\tblocks,\n\t\t\t\t\tsource: 'theme',\n\t\t\t\t} );\n\n\t\t\tif ( allowUndo ) {\n\t\t\t\tconst undoRevert = () => {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t\t.editEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\ttemplate.type,\n\t\t\t\t\t\t\tedited.id,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontent: serializeBlocks,\n\t\t\t\t\t\t\t\tblocks: edited.blocks,\n\t\t\t\t\t\t\t\tsource: 'custom',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t\t.createSuccessNotice( __( 'Template reset.' ), {\n\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\tid: noticeId,\n\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\t\tonClick: undoRevert,\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}\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'Template revert failed. Please reload.' );\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n\n/**\n * Action that removes an array of templates, template parts or patterns.\n *\n * @param {Array} items An array of template,template part or pattern objects to remove.\n */\nexport const removeTemplates =\n\t( items ) =>\n\tasync ( { registry } ) => {\n\t\tconst isResetting = items.every( ( item ) => item?.has_theme_file );\n\n\t\tconst promiseResult = await Promise.allSettled(\n\t\t\titems.map( ( item ) => {\n\t\t\t\treturn registry\n\t\t\t\t\t.dispatch( coreStore )\n\t\t\t\t\t.deleteEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\titem.type,\n\t\t\t\t\t\titem.id,\n\t\t\t\t\t\t{ force: true },\n\t\t\t\t\t\t{ throwOnError: true }\n\t\t\t\t\t);\n\t\t\t} )\n\t\t);\n\n\t\t// If all the promises were fulfilled with success.\n\t\tif ( promiseResult.every( ( { status } ) => status === 'fulfilled' ) ) {\n\t\t\tlet successMessage;\n\n\t\t\tif ( items.length === 1 ) {\n\t\t\t\t// Depending on how the entity was retrieved its title might be\n\t\t\t\t// an object or simple string.\n\t\t\t\tlet title;\n\t\t\t\tif ( typeof items[ 0 ].title === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.rendered === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.rendered;\n\t\t\t\t} else if ( typeof items[ 0 ].title?.raw === 'string' ) {\n\t\t\t\t\ttitle = items[ 0 ].title?.raw;\n\t\t\t\t}\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: The template/part's name. */\n\t\t\t\t\t\t\t__( '\"%s\" reset.' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t/* translators: %s: The template/part's name. */\n\t\t\t\t\t\t\t_x( '\"%s\" deleted.', 'template part' ),\n\t\t\t\t\t\t\tdecodeEntities( title )\n\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tsuccessMessage = isResetting\n\t\t\t\t\t? __( 'Items reset.' )\n\t\t\t\t\t: __( 'Items deleted.' );\n\t\t\t}\n\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createSuccessNotice( successMessage, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tid: 'editor-template-deleted-success',\n\t\t\t\t} );\n\t\t} else {\n\t\t\t// If there was at lease one failure.\n\t\t\tlet errorMessage;\n\t\t\t// If we were trying to delete a single template.\n\t\t\tif ( promiseResult.length === 1 ) {\n\t\t\t\tif ( promiseResult[ 0 ].reason?.message ) {\n\t\t\t\t\terrorMessage = promiseResult[ 0 ].reason.message;\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? __( 'An error occurred while reverting the item.' )\n\t\t\t\t\t\t: __( 'An error occurred while deleting the item.' );\n\t\t\t\t}\n\t\t\t\t// If we were trying to delete a multiple templates\n\t\t\t} else {\n\t\t\t\tconst errorMessages = new Set();\n\t\t\t\tconst failedPromises = promiseResult.filter(\n\t\t\t\t\t( { status } ) => status === 'rejected'\n\t\t\t\t);\n\t\t\t\tfor ( const failedPromise of failedPromises ) {\n\t\t\t\t\tif ( failedPromise.reason?.message ) {\n\t\t\t\t\t\terrorMessages.add( failedPromise.reason.message );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( errorMessages.size === 0 ) {\n\t\t\t\t\terrorMessage = __(\n\t\t\t\t\t\t'An error occurred while deleting the items.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( errorMessages.size === 1 ) {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: an error message */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'An error occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ][ 0 ]\n\t\t\t\t\t\t );\n\t\t\t\t} else {\n\t\t\t\t\terrorMessage = isResetting\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while reverting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: a list of comma separated error messages */\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Some errors occurred while deleting the items: %s'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t[ ...errorMessages ].join( ',' )\n\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t}\n\t\t\tregistry\n\t\t\t\t.dispatch( noticesStore )\n\t\t\t\t.createErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t};\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst navigation = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z\" />\n\t</SVG>\n);\n\nexport default navigation;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst verse = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z\" />\n\t</SVG>\n);\n\nexport default verse;\n","/**\n * Internal dependencies\n */\nimport type { State } from './reducer';\n\nconst EMPTY_ARRAY = [] as [];\n\nexport function getEntityActions( state: State, kind: string, name: string ) {\n\treturn state.actions[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function getEntityFields( state: State, kind: string, name: string ) {\n\treturn state.fields[ kind ]?.[ name ] ?? EMPTY_ARRAY;\n}\n\nexport function isEntityReady( state: State, kind: string, name: string ) {\n\treturn state.isReady[ kind ]?.[ name ];\n}\n","/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal';\n\n/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { createSelector, createRegistrySelector } from '@wordpress/data';\nimport {\n\tlayout,\n\tsymbol,\n\tnavigation,\n\tpage as pageIcon,\n\tverse,\n} from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { getRenderingMode, getCurrentPost } from './selectors';\nimport {\n\tgetEntityActions as _getEntityActions,\n\tgetEntityFields as _getEntityFields,\n\tisEntityReady as _isEntityReady,\n} from '../dataviews/store/private-selectors';\nimport { getTemplatePartIcon } from '../utils';\n\nconst EMPTY_INSERTION_POINT = {\n\trootClientId: undefined,\n\tinsertionIndex: undefined,\n\tfilterValue: undefined,\n};\n\n/**\n * Get the inserter.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const getInserter = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state ) => {\n\t\t\tif ( typeof state.blockInserterPanel === 'object' ) {\n\t\t\t\treturn state.blockInserterPanel;\n\t\t\t}\n\n\t\t\tif ( getRenderingMode( state ) === 'template-locked' ) {\n\t\t\t\tconst [ postContentClientId ] =\n\t\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t\t'core/post-content'\n\t\t\t\t\t);\n\t\t\t\tif ( postContentClientId ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trootClientId: postContentClientId,\n\t\t\t\t\t\tinsertionIndex: undefined,\n\t\t\t\t\t\tfilterValue: undefined,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn EMPTY_INSERTION_POINT;\n\t\t},\n\t\t( state ) => {\n\t\t\tconst [ postContentClientId ] =\n\t\t\t\tselect( blockEditorStore ).getBlocksByName(\n\t\t\t\t\t'core/post-content'\n\t\t\t\t);\n\t\t\treturn [\n\t\t\t\tstate.blockInserterPanel,\n\t\t\t\tgetRenderingMode( state ),\n\t\t\t\tpostContentClientId,\n\t\t\t];\n\t\t}\n\t)\n);\n\nexport function getListViewToggleRef( state ) {\n\treturn state.listViewToggleRef;\n}\nexport function getInserterSidebarToggleRef( state ) {\n\treturn state.inserterSidebarToggleRef;\n}\nconst CARD_ICONS = {\n\twp_block: symbol,\n\twp_navigation: navigation,\n\tpage: pageIcon,\n\tpost: verse,\n};\n\nexport const getPostIcon = createRegistrySelector(\n\t( select ) => ( state, postType, options ) => {\n\t\t{\n\t\t\tif (\n\t\t\t\tpostType === 'wp_template_part' ||\n\t\t\t\tpostType === 'wp_template'\n\t\t\t) {\n\t\t\t\tconst templateAreas =\n\t\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t)?.default_template_part_areas || [];\n\n\t\t\t\tconst areaData = templateAreas.find(\n\t\t\t\t\t( item ) => options.area === item.area\n\t\t\t\t);\n\n\t\t\t\tif ( areaData?.icon ) {\n\t\t\t\t\treturn getTemplatePartIcon( areaData.icon );\n\t\t\t\t}\n\n\t\t\t\treturn layout;\n\t\t\t}\n\t\t\tif ( CARD_ICONS[ postType ] ) {\n\t\t\t\treturn CARD_ICONS[ postType ];\n\t\t\t}\n\t\t\tconst postTypeEntity = select( coreStore ).getPostType( postType );\n\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t// also supports urls and svg as values.\n\t\t\tif (\n\t\t\t\ttypeof postTypeEntity?.icon === 'string' &&\n\t\t\t\tpostTypeEntity.icon.startsWith( 'dashicons-' )\n\t\t\t) {\n\t\t\t\treturn postTypeEntity.icon.slice( 10 );\n\t\t\t}\n\t\t\treturn pageIcon;\n\t\t}\n\t}\n);\n\n/**\n * Returns true if there are unsaved changes to the\n * post's meta fields, and false otherwise.\n *\n * @param {Object} state Global application state.\n * @param {string} postType The post type of the post.\n * @param {number} postId The ID of the post.\n *\n * @return {boolean} Whether there are edits or not in the meta fields of the relevant post.\n */\nexport const hasPostMetaChanges = createRegistrySelector(\n\t( select ) => ( state, postType, postId ) => {\n\t\tconst { type: currentPostType, id: currentPostId } =\n\t\t\tgetCurrentPost( state );\n\t\t// If no postType or postId is passed, use the current post.\n\t\tconst edits = select( coreStore ).getEntityRecordNonTransientEdits(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t);\n\n\t\tif ( ! edits?.meta ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Compare if anything apart from `footnotes` has changed.\n\t\tconst originalPostMeta = select( coreStore ).getEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType || currentPostType,\n\t\t\tpostId || currentPostId\n\t\t)?.meta;\n\n\t\treturn ! fastDeepEqual(\n\t\t\t{ ...originalPostMeta, footnotes: undefined },\n\t\t\t{ ...edits.meta, footnotes: undefined }\n\t\t);\n\t}\n);\n\nexport function getEntityActions( state, ...args ) {\n\treturn _getEntityActions( state.dataviews, ...args );\n}\n\nexport function isEntityReady( state, ...args ) {\n\treturn _isEntityReady( state.dataviews, ...args );\n}\n\nexport function getEntityFields( state, ...args ) {\n\treturn _getEntityFields( state.dataviews, ...args );\n}\n\n/**\n * Similar to getBlocksByName in @wordpress/block-editor, but only returns the top-most\n * blocks that aren't descendants of the query block.\n *\n * @param {Object} state Global application state.\n * @param {Array|string} blockNames Block names of the blocks to retrieve.\n *\n * @return {Array} Block client IDs.\n */\nexport const getPostBlocksByName = createRegistrySelector( ( select ) =>\n\tcreateSelector(\n\t\t( state, blockNames ) => {\n\t\t\tblockNames = Array.isArray( blockNames )\n\t\t\t\t? blockNames\n\t\t\t\t: [ blockNames ];\n\t\t\tconst { getBlocksByName, getBlockParents, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn getBlocksByName( blockNames ).filter( ( clientId ) =>\n\t\t\t\tgetBlockParents( clientId ).every( ( parentClientId ) => {\n\t\t\t\t\tconst parentBlockName = getBlockName( parentClientId );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t// Ignore descendents of the query block.\n\t\t\t\t\t\tparentBlockName !== 'core/query' &&\n\t\t\t\t\t\t// Enable only the top-most block.\n\t\t\t\t\t\t! blockNames.includes( parentBlockName )\n\t\t\t\t\t);\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t() => [ select( blockEditorStore ).getBlocks() ]\n\t)\n);\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Post editor data store configuration.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#registerStore\n */\nexport const storeConfig = {\n\treducer,\n\tselectors,\n\tactions,\n};\n\n/**\n * Store definition for the editor namespace.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore\n */\nexport const store = createReduxStore( STORE_NAME, {\n\t...storeConfig,\n} );\n\nregister( store );\nunlock( store ).registerPrivateActions( privateActions );\nunlock( store ).registerPrivateSelectors( privateSelectors );\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\nexport function getUserLabel( user ) {\n\tconst avatar =\n\t\tuser.avatar_urls && user.avatar_urls[ 24 ] ? (\n\t\t\t<img\n\t\t\t\tclassName=\"editor-autocompleters__user-avatar\"\n\t\t\t\talt=\"\"\n\t\t\t\tsrc={ user.avatar_urls[ 24 ] }\n\t\t\t/>\n\t\t) : (\n\t\t\t<span className=\"editor-autocompleters__no-avatar\"></span>\n\t\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ avatar }\n\t\t\t<span className=\"editor-autocompleters__user-name\">\n\t\t\t\t{ user.name }\n\t\t\t</span>\n\t\t\t<span className=\"editor-autocompleters__user-slug\">\n\t\t\t\t{ user.slug }\n\t\t\t</span>\n\t\t</>\n\t);\n}\n\n/**\n * A user mentions completer.\n *\n * @type {Object}\n */\nexport default {\n\tname: 'users',\n\tclassName: 'editor-autocompleters__user',\n\ttriggerPrefix: '@',\n\n\tuseItems( filterValue ) {\n\t\tconst users = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getUsers } = select( coreStore );\n\t\t\t\treturn getUsers( {\n\t\t\t\t\tcontext: 'view',\n\t\t\t\t\tsearch: encodeURIComponent( filterValue ),\n\t\t\t\t} );\n\t\t\t},\n\t\t\t[ filterValue ]\n\t\t);\n\n\t\tconst options = useMemo(\n\t\t\t() =>\n\t\t\t\tusers\n\t\t\t\t\t? users.map( ( user ) => ( {\n\t\t\t\t\t\t\tkey: `user-${ user.slug }`,\n\t\t\t\t\t\t\tvalue: user,\n\t\t\t\t\t\t\tlabel: getUserLabel( user ),\n\t\t\t\t\t } ) )\n\t\t\t\t\t: [],\n\t\t\t[ users ]\n\t\t);\n\n\t\treturn [ options ];\n\t},\n\n\tgetOptionCompletion( user ) {\n\t\treturn `@${ user.slug }`;\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEntityProp } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\n\n/** @typedef {import('@wordpress/compose').WPHigherOrderComponent} WPHigherOrderComponent */\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\n/**\n * Object whose keys are the names of block attributes, where each value\n * represents the meta key to which the block attribute is intended to save.\n *\n * @see https://developer.wordpress.org/reference/functions/register_meta/\n *\n * @typedef {Object<string,string>} WPMetaAttributeMapping\n */\n\n/**\n * Given a mapping of attribute names (meta source attributes) to their\n * associated meta key, returns a higher order component that overrides its\n * `attributes` and `setAttributes` props to sync any changes with the edited\n * post's meta keys.\n *\n * @param {WPMetaAttributeMapping} metaAttributes Meta attribute mapping.\n *\n * @return {WPHigherOrderComponent} Higher-order component.\n */\nconst createWithMetaAttributeSource = ( metaAttributes ) =>\n\tcreateHigherOrderComponent(\n\t\t( BlockEdit ) =>\n\t\t\t( { attributes, setAttributes, ...props } ) => {\n\t\t\t\tconst postType = useSelect(\n\t\t\t\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tconst [ meta, setMeta ] = useEntityProp(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\t'meta'\n\t\t\t\t);\n\n\t\t\t\tconst mergedAttributes = useMemo(\n\t\t\t\t\t() => ( {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries( metaAttributes ).map(\n\t\t\t\t\t\t\t\t( [ attributeKey, metaKey ] ) => [\n\t\t\t\t\t\t\t\t\tattributeKey,\n\t\t\t\t\t\t\t\t\tmeta[ metaKey ],\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\t[ attributes, meta ]\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<BlockEdit\n\t\t\t\t\t\tattributes={ mergedAttributes }\n\t\t\t\t\t\tsetAttributes={ ( nextAttributes ) => {\n\t\t\t\t\t\t\tconst nextMeta = Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries( nextAttributes ?? {} )\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t// Filter to intersection of keys between the updated\n\t\t\t\t\t\t\t\t\t\t// attributes and those with an associated meta key.\n\t\t\t\t\t\t\t\t\t\t( [ key ] ) => key in metaAttributes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map( ( [ attributeKey, value ] ) => [\n\t\t\t\t\t\t\t\t\t\t// Rename the keys to the expected meta key name.\n\t\t\t\t\t\t\t\t\t\tmetaAttributes[ attributeKey ],\n\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t] )\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif ( Object.entries( nextMeta ).length ) {\n\t\t\t\t\t\t\t\tsetMeta( nextMeta );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsetAttributes( nextAttributes );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t},\n\t\t'withMetaAttributeSource'\n\t);\n\n/**\n * Filters a registered block's settings to enhance a block's `edit` component\n * to upgrade meta-sourced attributes to use the post's meta entity property.\n *\n * @param {WPBlockSettings} settings Registered block settings.\n *\n * @return {WPBlockSettings} Filtered block settings.\n */\nfunction shimAttributeSource( settings ) {\n\t/** @type {WPMetaAttributeMapping} */\n\tconst metaAttributes = Object.fromEntries(\n\t\tObject.entries( settings.attributes ?? {} )\n\t\t\t.filter( ( [ , { source } ] ) => source === 'meta' )\n\t\t\t.map( ( [ attributeKey, { meta } ] ) => [ attributeKey, meta ] )\n\t);\n\tif ( Object.entries( metaAttributes ).length ) {\n\t\tsettings.edit = createWithMetaAttributeSource( metaAttributes )(\n\t\t\tsettings.edit\n\t\t);\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/custom-sources-backwards-compatibility/shim-attribute-source',\n\tshimAttributeSource\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { userAutocompleter } from '../components';\n\nfunction setDefaultCompleters( completers = [] ) {\n\t// Provide copies so filters may directly modify them.\n\tcompleters.push( { ...userAutocompleter } );\n\n\treturn completers;\n}\n\naddFilter(\n\t'editor.Autocomplete.completers',\n\t'editor/autocompleters/set-default-completers',\n\tsetDefaultCompleters\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { MediaUpload } from '@wordpress/media-utils';\n\naddFilter(\n\t'editor.MediaUpload',\n\t'core/editor/components/media-upload',\n\t() => MediaUpload\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useBlockEditingMode } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { getBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/** @typedef {import('@wordpress/blocks').WPBlockSettings} WPBlockSettings */\n\nconst {\n\tPatternOverridesControls,\n\tResetOverridesControl,\n\tPatternOverridesBlockControls,\n\tPATTERN_TYPES,\n\tPARTIAL_SYNCING_SUPPORTED_BLOCKS,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternsPrivateApis );\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning a partial syncing controls to supported blocks in the pattern editor.\n * Currently, only the `core/paragraph` block is supported.\n *\n * @param {Component} BlockEdit Original component.\n *\n * @return {Component} Wrapped component.\n */\nconst withPatternOverrideControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst isSupportedBlock =\n\t\t\t!! PARTIAL_SYNCING_SUPPORTED_BLOCKS[ props.name ];\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t\t{ props.isSelected && isSupportedBlock && (\n\t\t\t\t\t<ControlsWithStoreSubscription { ...props } />\n\t\t\t\t) }\n\t\t\t\t{ isSupportedBlock && <PatternOverridesBlockControls /> }\n\t\t\t</>\n\t\t);\n\t},\n\t'withPatternOverrideControls'\n);\n\n// Split into a separate component to avoid a store subscription\n// on every block.\nfunction ControlsWithStoreSubscription( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst { hasPatternOverridesSource, isEditingSyncedPattern } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\t// For editing link to the site editor if the theme and user permissions support it.\n\t\t\t\thasPatternOverridesSource: !! getBlockBindingsSource(\n\t\t\t\t\t'core/pattern-overrides'\n\t\t\t\t),\n\t\t\t\tisEditingSyncedPattern:\n\t\t\t\t\tgetCurrentPostType() === PATTERN_TYPES.user &&\n\t\t\t\t\tgetEditedPostAttribute( 'meta' )?.wp_pattern_sync_status !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced &&\n\t\t\t\t\tgetEditedPostAttribute( 'wp_pattern_sync_status' ) !==\n\t\t\t\t\t\tPATTERN_SYNC_TYPES.unsynced,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst bindings = props.attributes.metadata?.bindings;\n\tconst hasPatternBindings =\n\t\t!! bindings &&\n\t\tObject.values( bindings ).some(\n\t\t\t( binding ) => binding.source === 'core/pattern-overrides'\n\t\t);\n\n\tconst shouldShowPatternOverridesControls =\n\t\tisEditingSyncedPattern && blockEditingMode === 'default';\n\tconst shouldShowResetOverridesControl =\n\t\t! isEditingSyncedPattern &&\n\t\t!! props.attributes.metadata?.name &&\n\t\tblockEditingMode !== 'disabled' &&\n\t\thasPatternBindings;\n\n\tif ( ! hasPatternOverridesSource ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ shouldShowPatternOverridesControls && (\n\t\t\t\t<PatternOverridesControls { ...props } />\n\t\t\t) }\n\t\t\t{ shouldShowResetOverridesControl && (\n\t\t\t\t<ResetOverridesControl { ...props } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/with-pattern-override-controls',\n\twithPatternOverrideControls\n);\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport class AutosaveMonitor extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.needsAutosave = !! ( props.isDirty && props.isAutosaveable );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.props.disableIntervalChecks ) {\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( this.props.disableIntervalChecks ) {\n\t\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\t\tthis.props.autosave();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.interval !== prevProps.interval ) {\n\t\t\tclearTimeout( this.timerId );\n\t\t\tthis.setAutosaveTimer();\n\t\t}\n\n\t\tif ( ! this.props.isDirty ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.isAutosaving && ! prevProps.isAutosaving ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.props.editsReference !== prevProps.editsReference ) {\n\t\t\tthis.needsAutosave = true;\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timerId );\n\t}\n\n\tsetAutosaveTimer( timeout = this.props.interval * 1000 ) {\n\t\tthis.timerId = setTimeout( () => {\n\t\t\tthis.autosaveTimerHandler();\n\t\t}, timeout );\n\t}\n\n\tautosaveTimerHandler() {\n\t\tif ( ! this.props.isAutosaveable ) {\n\t\t\tthis.setAutosaveTimer( 1000 );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.needsAutosave ) {\n\t\t\tthis.needsAutosave = false;\n\t\t\tthis.props.autosave();\n\t\t}\n\n\t\tthis.setAutosaveTimer();\n\t}\n\n\trender() {\n\t\treturn null;\n\t}\n}\n\n/**\n * Monitors the changes made to the edited post and triggers autosave if necessary.\n *\n * The logic is straightforward: a check is performed every `props.interval` seconds. If any changes are detected, `props.autosave()` is called.\n * The time between the change and the autosave varies but is no larger than `props.interval` seconds. Refer to the code below for more details, such as\n * the specific way of detecting changes.\n *\n * There are two caveats:\n * * If `props.isAutosaveable` happens to be false at a time of checking for changes, the check is retried every second.\n * * The timer may be disabled by setting `props.disableIntervalChecks` to `true`. In that mode, any change will immediately trigger `props.autosave()`.\n *\n * @param {Object} props - The properties passed to the component.\n * @param {Function} props.autosave - The function to call when changes need to be saved.\n * @param {number} props.interval - The maximum time in seconds between an unsaved change and an autosave.\n * @param {boolean} props.isAutosaveable - If false, the check for changes is retried every second.\n * @param {boolean} props.disableIntervalChecks - If true, disables the timer and any change will immediately trigger `props.autosave()`.\n * @param {boolean} props.isDirty - Indicates if there are unsaved changes.\n *\n * @example\n * ```jsx\n * <AutosaveMonitor interval={30000} />\n * ```\n */\nexport default compose( [\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getReferenceByDistinctEdits } = select( coreStore );\n\n\t\tconst {\n\t\t\tisEditedPostDirty,\n\t\t\tisEditedPostAutosaveable,\n\t\t\tisAutosavingPost,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\n\t\tconst { interval = getEditorSettings().autosaveInterval } = ownProps;\n\n\t\treturn {\n\t\t\teditsReference: getReferenceByDistinctEdits(),\n\t\t\tisDirty: isEditedPostDirty(),\n\t\t\tisAutosaveable: isEditedPostAutosaveable(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\tinterval,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => ( {\n\t\tautosave() {\n\t\t\tconst { autosave = dispatch( editorStore ).autosave } = ownProps;\n\t\t\tautosave();\n\t\t},\n\t} ) ),\n] )( AutosaveMonitor );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRightSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.8622 8.04053L14.2805 12.0286L10.8622 16.0167L9.72327 15.0405L12.3049 12.0286L9.72327 9.01672L10.8622 8.04053Z\" />\n\t</SVG>\n);\n\nexport default chevronRightSmall;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeftSmall = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m13.1 16-3.4-4 3.4-4 1.1 1-2.6 3 2.6 3-1.1 1z\" />\n\t</SVG>\n);\n\nexport default chevronLeftSmall;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Custom hook to get the page type badge for the current post on edit site view.\n *\n * @param {number|string} postId postId of the current post being edited.\n */\nexport default function usePageTypeBadge( postId ) {\n\tconst { isFrontPage, isPostsPage } = useSelect( ( select ) => {\n\t\tconst { canUser, getEditedEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\tconst _postId = parseInt( postId, 10 );\n\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _postId,\n\t\t\tisPostsPage: siteSettings?.page_for_posts === _postId,\n\t\t};\n\t} );\n\n\tif ( isFrontPage ) {\n\t\treturn __( 'Homepage' );\n\t} else if ( isPostsPage ) {\n\t\treturn __( 'Posts Page' );\n\t}\n\n\treturn false;\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { BlockIcon } from '@wordpress/block-editor';\nimport { chevronLeftSmall, chevronRightSmall, layout } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPES } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\n/** @typedef {import(\"@wordpress/components\").IconType} IconType */\n\nconst MotionButton = motion( Button );\n\n/**\n * This component renders a navigation bar at the top of the editor. It displays the title of the current document,\n * a back button (if applicable), and a command center button. It also handles different states of the document,\n * such as \"not found\" or \"unsynced\".\n *\n * @example\n * ```jsx\n * <DocumentBar />\n * ```\n * @param {Object} props The component props.\n * @param {string} props.title A title for the document, defaulting to the document or\n * template title currently being edited.\n * @param {IconType} props.icon An icon for the document, no default.\n * (A default icon indicating the document post type is no longer used.)\n *\n * @return {React.ReactNode} The rendered DocumentBar component.\n */\nexport default function DocumentBar( props ) {\n\tconst {\n\t\tpostId,\n\t\tpostType,\n\t\tpostTypeLabel,\n\t\tdocumentTitle,\n\t\tisNotFound,\n\t\ttemplateTitle,\n\t\tonNavigateToPreviousEntityRecord,\n\t\tisTemplatePreview,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t} = select( editorStore );\n\n\t\tconst {\n\t\t\tgetEditedEntityRecord,\n\t\t\tgetPostType,\n\t\t\tisResolving: isResolvingSelector,\n\t\t} = select( coreStore );\n\t\tconst _postType = getCurrentPostType();\n\t\tconst _postId = getCurrentPostId();\n\t\tconst _document = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t_postType,\n\t\t\t_postId\n\t\t);\n\n\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\tselect( coreStore ).getEntityRecord( 'root', '__unstableBase' ) ??\n\t\t\t{};\n\n\t\tconst _templateInfo = getTemplateInfo( {\n\t\t\ttemplateTypes,\n\t\t\ttemplate: _document,\n\t\t} );\n\t\tconst _postTypeLabel = getPostType( _postType )?.labels?.singular_name;\n\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t\tpostType: _postType,\n\t\t\tpostTypeLabel: _postTypeLabel,\n\t\t\tdocumentTitle: _document.title,\n\t\t\tisNotFound:\n\t\t\t\t! _document &&\n\t\t\t\t! isResolvingSelector(\n\t\t\t\t\t'getEditedEntityRecord',\n\t\t\t\t\t'postType',\n\t\t\t\t\t_postType,\n\t\t\t\t\t_postId\n\t\t\t\t),\n\t\t\ttemplateTitle: _templateInfo.title,\n\t\t\tonNavigateToPreviousEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord,\n\t\t\tisTemplatePreview: getRenderingMode() === 'template-locked',\n\t\t};\n\t}, [] );\n\n\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst isTemplate = TEMPLATE_POST_TYPES.includes( postType );\n\tconst hasBackButton = !! onNavigateToPreviousEntityRecord;\n\tconst entityTitle = isTemplate ? templateTitle : documentTitle;\n\tconst title = props.title || entityTitle;\n\tconst icon = props.icon;\n\n\tconst pageTypeBadge = usePageTypeBadge( postId );\n\n\tconst mountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tmountedRef.current = true;\n\t}, [] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'editor-document-bar', {\n\t\t\t\t'has-back-button': hasBackButton,\n\t\t\t} ) }\n\t\t>\n\t\t\t<AnimatePresence>\n\t\t\t\t{ hasBackButton && (\n\t\t\t\t\t<MotionButton\n\t\t\t\t\t\tclassName=\"editor-document-bar__back\"\n\t\t\t\t\t\ticon={ isRTL() ? chevronRightSmall : chevronLeftSmall }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t\tonNavigateToPreviousEntityRecord();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? { opacity: 0, transform: 'translateX(15%)' }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ { opacity: 1, transform: 'translateX(0%)' } }\n\t\t\t\t\t\texit={ { opacity: 0, transform: 'translateX(15%)' } }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Back' ) }\n\t\t\t\t\t</MotionButton>\n\t\t\t\t) }\n\t\t\t</AnimatePresence>\n\t\t\t{ ! isTemplate && isTemplatePreview && (\n\t\t\t\t<BlockIcon\n\t\t\t\t\ticon={ layout }\n\t\t\t\t\tclassName=\"editor-document-bar__icon-layout\"\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isNotFound ? (\n\t\t\t\t<Text>{ __( 'Document not found' ) }</Text>\n\t\t\t) : (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"editor-document-bar__command\"\n\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName=\"editor-document-bar__title\"\n\t\t\t\t\t\t// Force entry animation when the back button is added or removed.\n\t\t\t\t\t\tkey={ hasBackButton }\n\t\t\t\t\t\tinitial={\n\t\t\t\t\t\t\tmountedRef.current\n\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\t\t\ttransform: hasBackButton\n\t\t\t\t\t\t\t\t\t\t\t? 'translateX(15%)'\n\t\t\t\t\t\t\t\t\t\t\t: 'translateX(-15%)',\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t: false // Don't show entry animation when DocumentBar mounts.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tanimate={ {\n\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\ttransform: 'translateX(0%)',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tisReducedMotion ? { duration: 0 } : undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ icon && <BlockIcon icon={ icon } /> }\n\t\t\t\t\t\t<Text size=\"body\" as=\"h1\">\n\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-title\">\n\t\t\t\t\t\t\t\t{ title\n\t\t\t\t\t\t\t\t\t? stripHTML( title )\n\t\t\t\t\t\t\t\t\t: __( 'No title' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{ pageTypeBadge && (\n\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t{ `· ${ pageTypeBadge }` }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ postTypeLabel &&\n\t\t\t\t\t\t\t\t! props.title &&\n\t\t\t\t\t\t\t\t! pageTypeBadge && (\n\t\t\t\t\t\t\t\t\t<span className=\"editor-document-bar__post-type-label\">\n\t\t\t\t\t\t\t\t\t\t{ `· ${ decodeEntities(\n\t\t\t\t\t\t\t\t\t\t\tpostTypeLabel\n\t\t\t\t\t\t\t\t\t\t) }` }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</motion.div>\n\t\t\t\t\t<span className=\"editor-document-bar__shortcut\">\n\t\t\t\t\t\t{ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t</span>\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"richText\"];","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\nconst TableOfContentsItem = ( {\n\tchildren,\n\tisValid,\n\tlevel,\n\thref,\n\tonSelect,\n} ) => (\n\t<li\n\t\tclassName={ clsx(\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<a\n\t\t\thref={ href }\n\t\t\tclassName=\"document-outline__button\"\n\t\t\tonClick={ onSelect }\n\t\t>\n\t\t\t<span\n\t\t\t\tclassName=\"document-outline__emdash\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t></span>\n\t\t\t<strong className=\"document-outline__level\">{ level }</strong>\n\t\t\t<span className=\"document-outline__item-content\">{ children }</span>\n\t\t</a>\n\t</li>\n);\n\nexport default TableOfContentsItem;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { create, getTextContent } from '@wordpress/rich-text';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Path, SVG, Line, Rect } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport DocumentOutlineItem from './item';\nimport { store as editorStore } from '../../store';\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\">\n\t\t{ __( '(Your theme may already use a H1 for the post title)' ) }\n\t</em>,\n];\nconst multipleH1Headings = [\n\t<br key=\"incorrect-break-multiple-h1\" />,\n\t<em key=\"incorrect-message-multiple-h1\">\n\t\t{ __( '(Multiple H1 headings are not recommended)' ) }\n\t</em>,\n];\nfunction EmptyOutlineIllustration() {\n\treturn (\n\t\t<SVG\n\t\t\twidth=\"138\"\n\t\t\theight=\"148\"\n\t\t\tviewBox=\"0 0 138 148\"\n\t\t\tfill=\"none\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<Rect width=\"138\" height=\"148\" rx=\"4\" fill=\"#F0F6FC\" />\n\t\t\t<Line x1=\"44\" y1=\"28\" x2=\"24\" y2=\"28\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"48\" y=\"16\" width=\"27\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M54.7585 32V23.2727H56.6037V26.8736H60.3494V23.2727H62.1903V32H60.3494V28.3949H56.6037V32H54.7585ZM67.4574 23.2727V32H65.6122V25.0241H65.5611L63.5625 26.277V24.6406L65.723 23.2727H67.4574Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"55\" y1=\"59\" x2=\"24\" y2=\"59\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"59\" y=\"47\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M65.7585 63V54.2727H67.6037V57.8736H71.3494V54.2727H73.1903V63H71.3494V59.3949H67.6037V63H65.7585ZM74.6605 63V61.6705L77.767 58.794C78.0313 58.5384 78.2528 58.3082 78.4318 58.1037C78.6136 57.8991 78.7514 57.6989 78.8452 57.5028C78.9389 57.304 78.9858 57.0895 78.9858 56.8594C78.9858 56.6037 78.9276 56.3835 78.8111 56.1989C78.6946 56.0114 78.5355 55.8679 78.3338 55.7685C78.1321 55.6662 77.9034 55.6151 77.6477 55.6151C77.3807 55.6151 77.1477 55.669 76.9489 55.777C76.75 55.8849 76.5966 56.0398 76.4886 56.2415C76.3807 56.4432 76.3267 56.6832 76.3267 56.9616H74.5753C74.5753 56.3906 74.7045 55.8949 74.9631 55.4744C75.2216 55.054 75.5838 54.7287 76.0497 54.4986C76.5156 54.2685 77.0526 54.1534 77.6605 54.1534C78.2855 54.1534 78.8295 54.2642 79.2926 54.4858C79.7585 54.7045 80.1207 55.0085 80.3793 55.3977C80.6378 55.7869 80.767 56.233 80.767 56.7358C80.767 57.0653 80.7017 57.3906 80.571 57.7116C80.4432 58.0327 80.2145 58.3892 79.8849 58.7812C79.5554 59.1705 79.0909 59.6378 78.4915 60.1832L77.2173 61.4318V61.4915H80.8821V63H74.6605Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"80\" y1=\"90\" x2=\"24\" y2=\"90\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"84\" y=\"78\" width=\"30\" height=\"23\" rx=\"4\" fill=\"#F0B849\" />\n\t\t\t<Path\n\t\t\t\td=\"M90.7585 94V85.2727H92.6037V88.8736H96.3494V85.2727H98.1903V94H96.3494V90.3949H92.6037V94H90.7585ZM99.5284 92.4659V91.0128L103.172 85.2727H104.425V87.2841H103.683L101.386 90.919V90.9872H106.564V92.4659H99.5284ZM103.717 94V92.0227L103.751 91.3793V85.2727H105.482V94H103.717Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t\t<Line x1=\"66\" y1=\"121\" x2=\"24\" y2=\"121\" stroke=\"#DDDDDD\" />\n\t\t\t<Rect x=\"70\" y=\"109\" width=\"29\" height=\"23\" rx=\"4\" fill=\"#DDDDDD\" />\n\t\t\t<Path\n\t\t\t\td=\"M76.7585 125V116.273H78.6037V119.874H82.3494V116.273H84.1903V125H82.3494V121.395H78.6037V125H76.7585ZM88.8864 125.119C88.25 125.119 87.6832 125.01 87.1861 124.791C86.6918 124.57 86.3011 124.266 86.0142 123.879C85.7301 123.49 85.5838 123.041 85.5753 122.533H87.4332C87.4446 122.746 87.5142 122.933 87.642 123.095C87.7727 123.254 87.946 123.378 88.1619 123.466C88.3778 123.554 88.6207 123.598 88.8906 123.598C89.1719 123.598 89.4205 123.548 89.6364 123.449C89.8523 123.349 90.0213 123.212 90.1435 123.036C90.2656 122.859 90.3267 122.656 90.3267 122.426C90.3267 122.193 90.2614 121.987 90.1307 121.808C90.0028 121.626 89.8182 121.484 89.5767 121.382C89.3381 121.28 89.054 121.229 88.7244 121.229H87.9105V119.874H88.7244C89.0028 119.874 89.2486 119.825 89.4616 119.729C89.6776 119.632 89.8452 119.499 89.9645 119.328C90.0838 119.155 90.1435 118.953 90.1435 118.723C90.1435 118.504 90.0909 118.312 89.9858 118.148C89.8835 117.98 89.7386 117.849 89.5511 117.756C89.3665 117.662 89.1506 117.615 88.9034 117.615C88.6534 117.615 88.4247 117.661 88.2173 117.751C88.0099 117.839 87.8438 117.966 87.7188 118.131C87.5938 118.295 87.527 118.489 87.5185 118.71H85.75C85.7585 118.207 85.902 117.764 86.1804 117.381C86.4588 116.997 86.8338 116.697 87.3054 116.482C87.7798 116.263 88.3153 116.153 88.9119 116.153C89.5142 116.153 90.0412 116.263 90.4929 116.482C90.9446 116.7 91.2955 116.996 91.5455 117.368C91.7983 117.737 91.9233 118.152 91.9205 118.612C91.9233 119.101 91.7713 119.509 91.4645 119.835C91.1605 120.162 90.7642 120.369 90.2756 120.457V120.526C90.9176 120.608 91.4063 120.831 91.7415 121.195C92.0795 121.555 92.2472 122.007 92.2443 122.55C92.2472 123.047 92.1037 123.489 91.8139 123.875C91.527 124.261 91.1307 124.565 90.625 124.787C90.1193 125.009 89.5398 125.119 88.8864 125.119Z\"\n\t\t\t\tfill=\"black\"\n\t\t\t/>\n\t\t</SVG>\n\t);\n}\n\n/**\n * Returns an array of heading blocks enhanced with the following properties:\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 *\n * @return {Array} An array of heading blocks enhanced with the properties described above.\n */\nconst computeOutlineHeadings = ( blocks = [] ) => {\n\treturn blocks.flatMap( ( block = {} ) => {\n\t\tif ( block.name === 'core/heading' ) {\n\t\t\treturn {\n\t\t\t\t...block,\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 );\n\t} );\n};\n\nconst isEmptyHeading = ( heading ) =>\n\t! heading.attributes.content ||\n\theading.attributes.content.trim().length === 0;\n\n/**\n * Renders a document outline component.\n *\n * @param {Object} props Props.\n * @param {Function} props.onSelect Function to be called when an outline item is selected\n * @param {boolean} props.hasOutlineItemsDisabled Indicates whether the outline items are disabled.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function DocumentOutline( {\n\tonSelect,\n\thasOutlineItemsDisabled,\n} ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { blocks, title, isTitleSupported } = useSelect( ( select ) => {\n\t\tconst { getBlocks } = select( blockEditorStore );\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\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: postType?.supports?.title ?? false,\n\t\t};\n\t} );\n\n\tconst prevHeadingLevelRef = useRef( 1 );\n\n\tconst headings = computeOutlineHeadings( blocks );\n\tif ( headings.length < 1 ) {\n\t\treturn (\n\t\t\t<div className=\"editor-document-outline has-no-headings\">\n\t\t\t\t<EmptyOutlineIllustration />\n\t\t\t\t<p>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Navigate the structure of your document and address issues like empty or incorrect heading levels.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Not great but it's the simplest way to locate the title right now.\n\tconst titleNode = document.querySelector( '.editor-post-title__input' );\n\tconst hasTitle = isTitleSupported && title && titleNode;\n\tconst countByLevel = headings.reduce(\n\t\t( acc, heading ) => ( {\n\t\t\t...acc,\n\t\t\t[ heading.level ]: ( acc[ heading.level ] || 0 ) + 1,\n\t\t} ),\n\t\t{}\n\t);\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\tonSelect={ onSelect }\n\t\t\t\t\t\thref={ `#${ titleNode.id }` }\n\t\t\t\t\t\tisDisabled={ hasOutlineItemsDisabled }\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 ) => {\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 =\n\t\t\t\t\t\titem.level > prevHeadingLevelRef.current + 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 ||\n\t\t\t\t\t\t\t( ! hasMultipleH1 && ! hasTitle ) );\n\t\t\t\t\tprevHeadingLevelRef.current = 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={ item.clientId }\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\tisDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t\t\thref={ `#block-${ item.clientId }` }\n\t\t\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\t\t\tselectBlock( item.clientId );\n\t\t\t\t\t\t\t\tonSelect?.();\n\t\t\t\t\t\t\t} }\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\t? emptyHeadingContent\n\t\t\t\t\t\t\t\t: getTextContent(\n\t\t\t\t\t\t\t\t\t\tcreate( {\n\t\t\t\t\t\t\t\t\t\t\thtml: item.attributes.content,\n\t\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{ isIncorrectLevel && incorrectLevelContent }\n\t\t\t\t\t\t\t{ item.level === 1 &&\n\t\t\t\t\t\t\t\thasMultipleH1 &&\n\t\t\t\t\t\t\t\tmultipleH1Headings }\n\t\t\t\t\t\t\t{ hasTitle &&\n\t\t\t\t\t\t\t\titem.level === 1 &&\n\t\t\t\t\t\t\t\t! hasMultipleH1 &&\n\t\t\t\t\t\t\t\tsingleH1Headings }\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","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Component check if there are any headings (core/heading blocks) present in the document.\n *\n * @param {Object} props Props.\n * @param {React.ReactElement} props.children Children to be rendered.\n *\n * @return {React.ReactElement} The component to be rendered or null if there are headings.\n */\nexport default function DocumentOutlineCheck( { children } ) {\n\tconst hasHeadings = useSelect( ( select ) => {\n\t\tconst { getGlobalBlockCount } = select( blockEditorStore );\n\n\t\treturn getGlobalBlockCount( 'core/heading' ) > 0;\n\t} );\n\n\tif ( ! hasHeadings ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { BlockEditorKeyboardShortcuts } from '@wordpress/block-editor';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Component for registering editor keyboard shortcuts.\n *\n * @return {Element} The component to be rendered.\n */\nfunction EditorKeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-mode',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Switch between visual editor and code editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'm',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/undo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Undo your last changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/redo',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Redo your last undo.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t\t// Disable on Apple OS because it conflicts with the browser's\n\t\t\t// history shortcut. It's a fine alias for both Windows and Linux.\n\t\t\t// Since there's no conflict for Ctrl+Shift+Z on both Windows and\n\t\t\t// Linux, we keep it as the default for consistency.\n\t\t\taliases: isAppleOS()\n\t\t\t\t? []\n\t\t\t\t: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmodifier: 'primary',\n\t\t\t\t\t\t\tcharacter: 'y',\n\t\t\t\t\t\t},\n\t\t\t\t ],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-list-view',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the List View.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'o',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-distraction-free',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enter or exit distraction free mode.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: '\\\\',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/toggle-sidebar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Show or hide the Settings panel.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: ',',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/keyboard-shortcuts',\n\t\t\tcategory: 'main',\n\t\t\tdescription: __( 'Display these keyboard shortcuts.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'h',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/next-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the next part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrl',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'n',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/previous-region',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the previous part of the editor.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\tcharacter: '`',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'access',\n\t\t\t\t\tcharacter: 'p',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tmodifier: 'ctrlShift',\n\t\t\t\t\tcharacter: '~',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn <BlockEditorKeyboardShortcuts.Register />;\n}\n\nexport default EditorKeyboardShortcutsRegister;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst redo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.6 6.5l-1.1 1 2.9 3.3H8c-.9 0-1.7.3-2.3.9-1.4 1.5-1.4 4.2-1.4 5.6v.2h1.5v-.3c0-1.1 0-3.5 1-4.5.3-.3.7-.5 1.3-.5h9.2L14.5 15l1.1 1.1 4.6-4.6-4.6-5z\" />\n\t</SVG>\n);\n\nexport default redo;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst undo = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.3 11.7c-.6-.6-1.4-.9-2.3-.9H6.7l2.9-3.3-1.1-1-4.5 5L8.5 16l1-1-2.7-2.7H16c.5 0 .9.2 1.3.5 1 1 1 3.4 1 4.5v.3h1.5v-.2c0-1.5 0-4.3-1.5-5.7z\" />\n\t</SVG>\n);\n\nexport default undo;\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut, isAppleOS } from '@wordpress/keycodes';\nimport { redo as redoIcon, undo as undoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryRedo( props, ref ) {\n\tconst shortcut = isAppleOS()\n\t\t? displayShortcut.primaryShift( 'z' )\n\t\t: displayShortcut.primary( 'y' );\n\n\tconst hasRedo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorRedo(),\n\t\t[]\n\t);\n\tconst { redo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? redoIcon : undoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'Redo' ) }\n\t\t\tshortcut={ shortcut }\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\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the redo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryRedo );\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { undo as undoIcon, redo as redoIcon } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction EditorHistoryUndo( props, ref ) {\n\tconst hasUndo = useSelect(\n\t\t( select ) => select( editorStore ).hasEditorUndo(),\n\t\t[]\n\t);\n\tconst { undo } = useDispatch( editorStore );\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t\ticon={ ! isRTL() ? undoIcon : redoIcon }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\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\n/** @typedef {import('react').Ref<HTMLElement>} Ref */\n\n/**\n * Renders the undo button for the editor history.\n *\n * @param {Object} props - Props.\n * @param {Ref} ref - Forwarded ref.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default forwardRef( EditorHistoryUndo );\n","/**\n * WordPress dependencies\n */\nimport {\n\tNotice,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nexport default function TemplateValidationNotice() {\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\tconst isValid = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).isValidTemplate();\n\t}, [] );\n\tconst { setTemplateValidity, synchronizeTemplate } =\n\t\tuseDispatch( blockEditorStore );\n\n\tif ( isValid ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Notice\n\t\t\t\tclassName=\"editor-template-validation-notice\"\n\t\t\t\tisDismissible={ false }\n\t\t\t\tstatus=\"warning\"\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Keep it as is' ),\n\t\t\t\t\t\tonClick: () => setTemplateValidity( true ),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Reset the template' ),\n\t\t\t\t\t\tonClick: () => setShowConfirmDialog( true ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'The content of your post doesn’t match the template assigned to your post type.'\n\t\t\t\t) }\n\t\t\t</Notice>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tconfirmButtonText={ __( 'Reset' ) }\n\t\t\t\tonConfirm={ () => {\n\t\t\t\t\tsetShowConfirmDialog( false );\n\t\t\t\t\tsynchronizeTemplate();\n\t\t\t\t} }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tsize=\"medium\"\n\t\t\t>\n\t\t\t\t{ __(\n\t\t\t\t\t'Resetting the template may result in loss of content, do you want to continue?'\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { NoticeList } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport TemplateValidationNotice from '../template-validation-notice';\n\n/**\n * This component renders the notices displayed in the editor. It displays pinned notices first, followed by dismissible\n *\n * @example\n * ```jsx\n * <EditorNotices />\n * ```\n *\n * @return {React.ReactNode} The rendered EditorNotices component.\n */\nexport function EditorNotices() {\n\tconst { notices } = useSelect(\n\t\t( select ) => ( {\n\t\t\tnotices: select( noticesStore ).getNotices(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst dismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => isDismissible && type === 'default'\n\t);\n\tconst nonDismissibleNotices = notices.filter(\n\t\t( { isDismissible, type } ) => ! isDismissible && type === 'default'\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ nonDismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__pinned\"\n\t\t\t/>\n\t\t\t<NoticeList\n\t\t\t\tnotices={ dismissibleNotices }\n\t\t\t\tclassName=\"components-editor-notices__dismissible\"\n\t\t\t\tonRemove={ removeNotice }\n\t\t\t>\n\t\t\t\t<TemplateValidationNotice />\n\t\t\t</NoticeList>\n\t\t</>\n\t);\n}\n\nexport default EditorNotices;\n","/**\n * WordPress dependencies\n */\nimport { SnackbarList } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n// Last three notices. Slices from the tail end of the list.\nconst MAX_VISIBLE_NOTICES = -3;\n\n/**\n * Renders the editor snackbars component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EditorSnackbars() {\n\tconst notices = useSelect(\n\t\t( select ) => select( noticesStore ).getNotices(),\n\t\t[]\n\t);\n\tconst { removeNotice } = useDispatch( noticesStore );\n\tconst snackbarNotices = notices\n\t\t.filter( ( { type } ) => type === 'snackbar' )\n\t\t.slice( MAX_VISIBLE_NOTICES );\n\n\treturn (\n\t\t<SnackbarList\n\t\t\tnotices={ snackbarNotices }\n\t\t\tclassName=\"components-editor-notices__snackbar\"\n\t\t\tonRemove={ removeNotice }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { CheckboxControl, PanelRow } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { getTemplateInfo } from '../../utils/get-template-info';\n\nexport default function EntityRecordItem( { record, checked, onChange } ) {\n\tconst { name, kind, title, key } = record;\n\n\t// Handle templates that might use default descriptive titles.\n\tconst { entityRecordTitle, hasPostMetaChanges } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( 'postType' !== kind || 'wp_template' !== name ) {\n\t\t\t\treturn {\n\t\t\t\t\tentityRecordTitle: title,\n\t\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\t\tselect( editorStore )\n\t\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst template = select( coreStore ).getEditedEntityRecord(\n\t\t\t\tkind,\n\t\t\t\tname,\n\t\t\t\tkey\n\t\t\t);\n\n\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t'root',\n\t\t\t\t\t'__unstableBase'\n\t\t\t\t) ?? {};\n\n\t\t\treturn {\n\t\t\t\tentityRecordTitle: getTemplateInfo( {\n\t\t\t\t\ttemplate,\n\t\t\t\t\ttemplateTypes,\n\t\t\t\t} ).title,\n\t\t\t\thasPostMetaChanges: unlock(\n\t\t\t\t\tselect( editorStore )\n\t\t\t\t).hasPostMetaChanges( name, key ),\n\t\t\t};\n\t\t},\n\t\t[ name, kind, title, key ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<PanelRow>\n\t\t\t\t<CheckboxControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tdecodeEntities( entityRecordTitle ) || __( 'Untitled' )\n\t\t\t\t\t}\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ hasPostMetaChanges && (\n\t\t\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t\t\t<li>{ __( 'Post Meta.' ) }</li>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody, PanelRow } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntityRecordItem from './entity-record-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { getGlobalStylesChanges, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction getEntityDescription( entity, count ) {\n\tswitch ( entity ) {\n\t\tcase 'site':\n\t\t\treturn 1 === count\n\t\t\t\t? __( 'This change will affect your whole site.' )\n\t\t\t\t: __( 'These changes will affect your whole site.' );\n\t\tcase 'wp_template':\n\t\t\treturn __(\n\t\t\t\t'This change will affect pages and posts that use this template.'\n\t\t\t);\n\t\tcase 'page':\n\t\tcase 'post':\n\t\t\treturn __( 'The following has been modified.' );\n\t}\n}\n\nfunction GlobalStylesDescription( { record } ) {\n\tconst { user: currentEditorGlobalStyles } =\n\t\tuseContext( GlobalStylesContext );\n\tconst savedRecord = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\trecord.kind,\n\t\t\t\trecord.name,\n\t\t\t\trecord.key\n\t\t\t),\n\t\t[ record.kind, record.name, record.key ]\n\t);\n\n\tconst globalStylesChanges = getGlobalStylesChanges(\n\t\tcurrentEditorGlobalStyles,\n\t\tsavedRecord,\n\t\t{\n\t\t\tmaxResults: 10,\n\t\t}\n\t);\n\treturn globalStylesChanges.length ? (\n\t\t<ul className=\"entities-saved-states__changes\">\n\t\t\t{ globalStylesChanges.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t) : null;\n}\n\nfunction EntityDescription( { record, count } ) {\n\tif ( 'globalStyles' === record?.name ) {\n\t\treturn null;\n\t}\n\tconst description = getEntityDescription( record?.name, count );\n\treturn description ? <PanelRow>{ description }</PanelRow> : null;\n}\n\nexport default function EntityTypeList( {\n\tlist,\n\tunselectedEntities,\n\tsetUnselectedEntities,\n} ) {\n\tconst count = list.length;\n\tconst firstRecord = list[ 0 ];\n\tconst entityConfig = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityConfig(\n\t\t\t\tfirstRecord.kind,\n\t\t\t\tfirstRecord.name\n\t\t\t),\n\t\t[ firstRecord.kind, firstRecord.name ]\n\t);\n\n\tlet entityLabel = entityConfig.label;\n\tif ( firstRecord?.name === 'wp_template_part' ) {\n\t\tentityLabel =\n\t\t\t1 === count ? __( 'Template Part' ) : __( 'Template Parts' );\n\t}\n\n\treturn (\n\t\t<PanelBody title={ entityLabel } initialOpen>\n\t\t\t<EntityDescription record={ firstRecord } count={ count } />\n\t\t\t{ list.map( ( record ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityRecordItem\n\t\t\t\t\t\tkey={ record.key || record.property }\n\t\t\t\t\t\trecord={ record }\n\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t! unselectedEntities.some(\n\t\t\t\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\t\t\t\telt.kind === record.kind &&\n\t\t\t\t\t\t\t\t\telt.name === record.name &&\n\t\t\t\t\t\t\t\t\telt.key === record.key &&\n\t\t\t\t\t\t\t\t\telt.property === record.property\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tsetUnselectedEntities( record, value )\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\t{ 'globalStyles' === firstRecord?.name && (\n\t\t\t\t<GlobalStylesDescription record={ firstRecord } />\n\t\t\t) }\n\t\t</PanelBody>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Custom hook that determines if any entities are dirty (edited) and provides a way to manage selected/unselected entities.\n *\n * @return {Object} An object containing the following properties:\n * - dirtyEntityRecords: An array of dirty entity records.\n * - isDirty: A boolean indicating if there are any dirty entity records.\n * - setUnselectedEntities: A function to set the unselected entities.\n * - unselectedEntities: An array of unselected entities.\n */\nexport const useIsDirty = () => {\n\tconst { editedEntities, siteEdits, siteEntityConfig } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetEntityRecordEdits,\n\t\t\t\tgetEntityConfig,\n\t\t\t} = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\teditedEntities: __experimentalGetDirtyEntityRecords(),\n\t\t\t\tsiteEdits: getEntityRecordEdits( 'root', 'site' ),\n\t\t\t\tsiteEntityConfig: getEntityConfig( 'root', 'site' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst dirtyEntityRecords = useMemo( () => {\n\t\t// Remove site object and decouple into its edited pieces.\n\t\tconst editedEntitiesWithoutSite = editedEntities.filter(\n\t\t\t( record ) => ! ( record.kind === 'root' && record.name === 'site' )\n\t\t);\n\n\t\tconst siteEntityLabels = siteEntityConfig?.meta?.labels ?? {};\n\t\tconst editedSiteEntities = [];\n\t\tfor ( const property in siteEdits ) {\n\t\t\teditedSiteEntities.push( {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t\ttitle: siteEntityLabels[ property ] || property,\n\t\t\t\tproperty,\n\t\t\t} );\n\t\t}\n\n\t\treturn [ ...editedEntitiesWithoutSite, ...editedSiteEntities ];\n\t}, [ editedEntities, siteEdits, siteEntityConfig ] );\n\n\t// Unchecked entities to be ignored by save function.\n\tconst [ unselectedEntities, _setUnselectedEntities ] = useState( [] );\n\n\tconst setUnselectedEntities = (\n\t\t{ kind, name, key, property },\n\t\tchecked\n\t) => {\n\t\tif ( checked ) {\n\t\t\t_setUnselectedEntities(\n\t\t\t\tunselectedEntities.filter(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind !== kind ||\n\t\t\t\t\t\telt.name !== name ||\n\t\t\t\t\t\telt.key !== key ||\n\t\t\t\t\t\telt.property !== property\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t_setUnselectedEntities( [\n\t\t\t\t...unselectedEntities,\n\t\t\t\t{ kind, name, key, property },\n\t\t\t] );\n\t\t}\n\t};\n\n\tconst isDirty = dirtyEntityRecords.length - unselectedEntities.length > 0;\n\n\treturn {\n\t\tdirtyEntityRecords,\n\t\tisDirty,\n\t\tsetUnselectedEntities,\n\t\tunselectedEntities,\n\t};\n};\n","/**\n * WordPress dependencies\n */\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tuseCallback,\n\tuseRef,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalUseDialog as useDialog,\n\tuseInstanceId,\n} from '@wordpress/compose';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport EntityTypeList from './entity-type-list';\nimport { useIsDirty } from './hooks/use-is-dirty';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction identity( values ) {\n\treturn values;\n}\n\n/**\n * Renders the component for managing saved states of entities.\n *\n * @param {Object} props The component props.\n * @param {Function} props.close The function to close the dialog.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function EntitiesSavedStates( { close, renderDialog } ) {\n\tconst isDirtyProps = useIsDirty();\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\tclose={ close }\n\t\t\trenderDialog={ renderDialog }\n\t\t\t{ ...isDirtyProps }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a panel for saving entities with dirty records.\n *\n * @param {Object} props The component props.\n * @param {string} props.additionalPrompt Additional prompt to display.\n * @param {Function} props.close Function to close the panel.\n * @param {Function} props.onSave Function to call when saving entities.\n * @param {boolean} props.saveEnabled Flag indicating if save is enabled.\n * @param {string} props.saveLabel Label for the save button.\n * @param {boolean} props.renderDialog Whether to render the component with modal dialog behavior.\n * @param {Array} props.dirtyEntityRecords Array of dirty entity records.\n * @param {boolean} props.isDirty Flag indicating if there are dirty entities.\n * @param {Function} props.setUnselectedEntities Function to set unselected entities.\n * @param {Array} props.unselectedEntities Array of unselected entities.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function EntitiesSavedStatesExtensible( {\n\tadditionalPrompt = undefined,\n\tclose,\n\tonSave = identity,\n\tsaveEnabled: saveEnabledProp = undefined,\n\tsaveLabel = __( 'Save' ),\n\trenderDialog,\n\tdirtyEntityRecords,\n\tisDirty,\n\tsetUnselectedEntities,\n\tunselectedEntities,\n} ) {\n\tconst saveButtonRef = useRef();\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\t// To group entities by type.\n\tconst partitionedSavables = dirtyEntityRecords.reduce( ( acc, record ) => {\n\t\tconst { name } = record;\n\t\tif ( ! acc[ name ] ) {\n\t\t\tacc[ name ] = [];\n\t\t}\n\t\tacc[ name ].push( record );\n\t\treturn acc;\n\t}, {} );\n\n\t// Sort entity groups.\n\tconst {\n\t\tsite: siteSavables,\n\t\twp_template: templateSavables,\n\t\twp_template_part: templatePartSavables,\n\t\t...contentSavables\n\t} = partitionedSavables;\n\tconst sortedPartitionedSavables = [\n\t\tsiteSavables,\n\t\ttemplateSavables,\n\t\ttemplatePartSavables,\n\t\t...Object.values( contentSavables ),\n\t].filter( Array.isArray );\n\n\tconst saveEnabled = saveEnabledProp ?? isDirty;\n\t// Explicitly define this with no argument passed. Using `close` on\n\t// its own will use the event object in place of the expected saved entities.\n\tconst dismissPanel = useCallback( () => close(), [ close ] );\n\n\tconst [ saveDialogRef, saveDialogProps ] = useDialog( {\n\t\tonClose: () => dismissPanel(),\n\t} );\n\tconst dialogLabel = useInstanceId( EntitiesSavedStatesExtensible, 'label' );\n\tconst dialogDescription = useInstanceId(\n\t\tEntitiesSavedStatesExtensible,\n\t\t'description'\n\t);\n\n\tconst selectItemsToSaveDescription = !! dirtyEntityRecords.length\n\t\t? __( 'Select the items you want to save.' )\n\t\t: undefined;\n\n\treturn (\n\t\t<div\n\t\t\tref={ renderDialog ? saveDialogRef : undefined }\n\t\t\t{ ...( renderDialog && saveDialogProps ) }\n\t\t\tclassName=\"entities-saved-states__panel\"\n\t\t\trole={ renderDialog ? 'dialog' : undefined }\n\t\t\taria-labelledby={ renderDialog ? dialogLabel : undefined }\n\t\t\taria-describedby={ renderDialog ? dialogDescription : undefined }\n\t\t>\n\t\t\t<Flex className=\"entities-saved-states__panel-header\" gap={ 2 }>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tonClick={ dismissPanel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem\n\t\t\t\t\tisBlock\n\t\t\t\t\tas={ Button }\n\t\t\t\t\tref={ saveButtonRef }\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tdisabled={ ! saveEnabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsaveDirtyEntities( {\n\t\t\t\t\t\t\tonSave,\n\t\t\t\t\t\t\tdirtyEntityRecords,\n\t\t\t\t\t\t\tentitiesToSkip: unselectedEntities,\n\t\t\t\t\t\t\tclose,\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t\tclassName=\"editor-entities-saved-states__save-button\"\n\t\t\t\t>\n\t\t\t\t\t{ saveLabel }\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\n\t\t\t<div className=\"entities-saved-states__text-prompt\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"entities-saved-states__text-prompt--header-wrapper\"\n\t\t\t\t\tid={ renderDialog ? dialogLabel : undefined }\n\t\t\t\t>\n\t\t\t\t\t<strong className=\"entities-saved-states__text-prompt--header\">\n\t\t\t\t\t\t{ __( 'Are you ready to save?' ) }\n\t\t\t\t\t</strong>\n\t\t\t\t\t{ additionalPrompt }\n\t\t\t\t</div>\n\t\t\t\t<p id={ renderDialog ? dialogDescription : undefined }>\n\t\t\t\t\t{ isDirty\n\t\t\t\t\t\t? createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: number of site changes waiting to be saved. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'There is <strong>%d site change</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\t'There are <strong>%d site changes</strong> waiting to be saved.',\n\t\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t{ strong: <strong /> }\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: selectItemsToSaveDescription }\n\t\t\t\t</p>\n\t\t\t</div>\n\n\t\t\t{ sortedPartitionedSavables.map( ( list ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<EntityTypeList\n\t\t\t\t\t\tkey={ list[ 0 ].name }\n\t\t\t\t\t\tlist={ list }\n\t\t\t\t\t\tunselectedEntities={ unselectedEntities }\n\t\t\t\t\t\tsetUnselectedEntities={ setUnselectedEntities }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { select } from '@wordpress/data';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction getContent() {\n\ttry {\n\t\t// While `select` in a component is generally discouraged, it is\n\t\t// used here because it (a) reduces the chance of data loss in the\n\t\t// case of additional errors by performing a direct retrieval and\n\t\t// (b) avoids the performance cost associated with unnecessary\n\t\t// content serialization throughout the lifetime of a non-erroring\n\t\t// application.\n\t\treturn select( editorStore ).getEditedPostContent();\n\t} catch ( error ) {}\n}\n\nfunction CopyButton( { text, children, variant = 'secondary' } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button __next40pxDefaultSize variant={ variant } ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nclass ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tconst { error } = this.state;\n\t\tconst { canCopyContent = false } = this.props;\n\t\tif ( ! error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<HStack\n\t\t\t\tclassName=\"editor-error-boundary\"\n\t\t\t\talignment=\"baseline\"\n\t\t\t\tspacing={ 4 }\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\texpanded={ false }\n\t\t\t\twrap\n\t\t\t>\n\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t{ __( 'The editor has encountered an unexpected error.' ) }\n\t\t\t\t</Text>\n\t\t\t\t<HStack expanded={ false }>\n\t\t\t\t\t{ canCopyContent && (\n\t\t\t\t\t\t<CopyButton text={ getContent }>\n\t\t\t\t\t\t\t{ __( 'Copy contents' ) }\n\t\t\t\t\t\t</CopyButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<CopyButton variant=\"primary\" text={ error?.stack }>\n\t\t\t\t\t\t{ __( 'Copy error' ) }\n\t\t\t\t\t</CopyButton>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t);\n\t}\n}\n\n/**\n * ErrorBoundary is used to catch JavaScript errors anywhere in a child component tree, log those errors, and display a fallback UI.\n *\n * It uses the lifecycle methods getDerivedStateFromError and componentDidCatch to catch errors in a child component tree.\n *\n * getDerivedStateFromError is used to render a fallback UI after an error has been thrown, and componentDidCatch is used to log error information.\n *\n * @class ErrorBoundary\n * @augments Component\n */\nexport default ErrorBoundary;\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\nimport { ifCondition, usePrevious } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { parse } from '@wordpress/blocks';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport AutosaveMonitor from '../autosave-monitor';\nimport {\n\tlocalAutosaveGet,\n\tlocalAutosaveClear,\n} from '../../store/local-autosave';\nimport { store as editorStore } from '../../store';\n\nconst requestIdleCallback = window.requestIdleCallback\n\t? window.requestIdleCallback\n\t: window.requestAnimationFrame;\n\nlet hasStorageSupport;\n\n/**\n * Function which returns true if the current environment supports browser\n * sessionStorage, or false otherwise. The result of this function is cached and\n * reused in subsequent invocations.\n */\nconst hasSessionStorageSupport = () => {\n\tif ( hasStorageSupport !== undefined ) {\n\t\treturn hasStorageSupport;\n\t}\n\n\ttry {\n\t\t// Private Browsing in Safari 10 and earlier will throw an error when\n\t\t// attempting to set into sessionStorage. The test here is intentional in\n\t\t// causing a thrown error as condition bailing from local autosave.\n\t\twindow.sessionStorage.setItem( '__wpEditorTestSessionStorage', '' );\n\t\twindow.sessionStorage.removeItem( '__wpEditorTestSessionStorage' );\n\t\thasStorageSupport = true;\n\t} catch {\n\t\thasStorageSupport = false;\n\t}\n\n\treturn hasStorageSupport;\n};\n\n/**\n * Custom hook which manages the creation of a notice prompting the user to\n * restore a local autosave, if one exists.\n */\nfunction useAutosaveNotice() {\n\tconst { postId, isEditedPostNew, hasRemoteAutosave } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\thasRemoteAutosave:\n\t\t\t\t!! select( editorStore ).getEditorSettings().autosave,\n\t\t} ),\n\t\t[]\n\t);\n\tconst { getEditedPostAttribute } = useSelect( editorStore );\n\n\tconst { createWarningNotice, removeNotice } = useDispatch( noticesStore );\n\tconst { editPost, resetEditorBlocks } = useDispatch( editorStore );\n\n\tuseEffect( () => {\n\t\tlet localAutosave = localAutosaveGet( postId, isEditedPostNew );\n\t\tif ( ! localAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tlocalAutosave = JSON.parse( localAutosave );\n\t\t} catch {\n\t\t\t// Not usable if it can't be parsed.\n\t\t\treturn;\n\t\t}\n\n\t\tconst { post_title: title, content, excerpt } = localAutosave;\n\t\tconst edits = { title, content, excerpt };\n\n\t\t{\n\t\t\t// Only display a notice if there is a difference between what has been\n\t\t\t// saved and that which is stored in sessionStorage.\n\t\t\tconst hasDifference = Object.keys( edits ).some( ( key ) => {\n\t\t\t\treturn edits[ key ] !== getEditedPostAttribute( key );\n\t\t\t} );\n\n\t\t\tif ( ! hasDifference ) {\n\t\t\t\t// If there is no difference, it can be safely ejected from storage.\n\t\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif ( hasRemoteAutosave ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst id = 'wpEditorAutosaveRestore';\n\n\t\tcreateWarningNotice(\n\t\t\t__(\n\t\t\t\t'The backup of this post in your browser is different from the version below.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tid,\n\t\t\t\tactions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Restore the backup' ),\n\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\tcontent: editsContent,\n\t\t\t\t\t\t\t\t...editsWithoutContent\n\t\t\t\t\t\t\t} = edits;\n\t\t\t\t\t\t\teditPost( editsWithoutContent );\n\t\t\t\t\t\t\tresetEditorBlocks( parse( edits.content ) );\n\t\t\t\t\t\t\tremoveNotice( id );\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}, [ isEditedPostNew, postId ] );\n}\n\n/**\n * Custom hook which ejects a local autosave after a successful save occurs.\n */\nfunction useAutosavePurge() {\n\tconst { postId, isEditedPostNew, isDirty, isAutosaving, didError } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tpostId: select( editorStore ).getCurrentPostId(),\n\t\t\t\tisEditedPostNew: select( editorStore ).isEditedPostNew(),\n\t\t\t\tisDirty: select( editorStore ).isEditedPostDirty(),\n\t\t\t\tisAutosaving: select( editorStore ).isAutosavingPost(),\n\t\t\t\tdidError: select( editorStore ).didPostSaveRequestFail(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\n\tconst lastIsDirtyRef = useRef( isDirty );\n\tconst lastIsAutosavingRef = useRef( isAutosaving );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! didError &&\n\t\t\t( ( lastIsAutosavingRef.current && ! isAutosaving ) ||\n\t\t\t\t( lastIsDirtyRef.current && ! isDirty ) )\n\t\t) {\n\t\t\tlocalAutosaveClear( postId, isEditedPostNew );\n\t\t}\n\n\t\tlastIsDirtyRef.current = isDirty;\n\t\tlastIsAutosavingRef.current = isAutosaving;\n\t}, [ isDirty, isAutosaving, didError ] );\n\n\t// Once the isEditedPostNew changes from true to false, let's clear the auto-draft autosave.\n\tconst wasEditedPostNew = usePrevious( isEditedPostNew );\n\tconst prevPostId = usePrevious( postId );\n\tuseEffect( () => {\n\t\tif ( prevPostId === postId && wasEditedPostNew && ! isEditedPostNew ) {\n\t\t\tlocalAutosaveClear( postId, true );\n\t\t}\n\t}, [ isEditedPostNew, postId ] );\n}\n\nfunction LocalAutosaveMonitor() {\n\tconst { autosave } = useDispatch( editorStore );\n\tconst deferredAutosave = useCallback( () => {\n\t\trequestIdleCallback( () => autosave( { local: true } ) );\n\t}, [] );\n\tuseAutosaveNotice();\n\tuseAutosavePurge();\n\n\tconst localAutosaveInterval = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().localAutosaveInterval,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<AutosaveMonitor\n\t\t\tinterval={ localAutosaveInterval }\n\t\t\tautosave={ deferredAutosave }\n\t\t/>\n\t);\n}\n\n/**\n * Monitors local autosaves of a post in the editor.\n * It uses several hooks and functions to manage autosave behavior:\n * - `useAutosaveNotice` hook: Manages the creation of a notice prompting the user to restore a local autosave, if one exists.\n * - `useAutosavePurge` hook: Ejects a local autosave after a successful save occurs.\n * - `hasSessionStorageSupport` function: Checks if the current environment supports browser sessionStorage.\n * - `LocalAutosaveMonitor` component: Uses the `AutosaveMonitor` component to perform autosaves at a specified interval.\n *\n * The module also checks for sessionStorage support and conditionally exports the `LocalAutosaveMonitor` component based on that.\n *\n * @module LocalAutosaveMonitor\n */\nexport default ifCondition( hasSessionStorageSupport )( LocalAutosaveMonitor );\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if the post type supports page attributes.\n *\n * @param {Object} props - The component props.\n * @param {React.ReactElement} props.children - The child components to render.\n *\n * @return {React.ReactElement} The rendered child components or null if page attributes are not supported.\n */\nexport function PageAttributesCheck( { children } ) {\n\tconst supportsPageAttributes = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn !! postType?.supports?.[ 'page-attributes' ];\n\t}, [] );\n\n\t// Only render fields if post type supports page attributes or available templates exist.\n\tif ( ! supportsPageAttributes ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PageAttributesCheck;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\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 Props.\n * @param {React.ReactElement} 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 {React.ReactElement} The component to be rendered.\n */\nfunction PostTypeSupportCheck( { children, supportKeys } ) {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn getPostType( getEditedPostAttribute( 'type' ) );\n\t}, [] );\n\tlet isSupported = !! postType;\n\tif ( postType ) {\n\t\tisSupported = (\n\t\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t\t).some( ( key ) => !! postType.supports[ key ] );\n\t}\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostTypeSupportCheck;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tFlex,\n\tFlexBlock,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\nfunction PageAttributesOrder() {\n\tconst order = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'menu_order' ) ?? 0,\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ orderInput, setOrderInput ] = useState( null );\n\n\tconst setUpdatedOrder = ( value ) => {\n\t\tsetOrderInput( value );\n\t\tconst newOrder = Number( value );\n\t\tif ( Number.isInteger( newOrder ) && value.trim?.() !== '' ) {\n\t\t\teditPost( { menu_order: newOrder } );\n\t\t}\n\t};\n\n\tconst value = orderInput ?? order;\n\n\treturn (\n\t\t<Flex>\n\t\t\t<FlexBlock>\n\t\t\t\t<NumberControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tlabel={ __( 'Order' ) }\n\t\t\t\t\thelp={ __( 'Set the page order.' ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ setUpdatedOrder }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tonBlur={ () => {\n\t\t\t\t\t\tsetOrderInput( null );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</FlexBlock>\n\t\t</Flex>\n\t);\n}\n\n/**\n * Renders the Page Attributes Order component. A number input in an editor interface\n * for setting the order of a given page.\n * The component is now not used in core but was kept for backward compatibility.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PageAttributesOrderWithChecks() {\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"page-attributes\">\n\t\t\t<PageAttributesOrder />\n\t\t</PostTypeSupportCheck>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\n\nconst PostPanelRow = forwardRef( ( { className, label, children }, ref ) => {\n\treturn (\n\t\t<HStack\n\t\t\tclassName={ clsx( 'editor-post-panel__row', className ) }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ label && (\n\t\t\t\t<div className=\"editor-post-panel__row-label\">{ label }</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-post-panel__row-control\">{ children }</div>\n\t\t</HStack>\n\t);\n} );\n\nexport default PostPanelRow;\n","/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\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 flatTermsWithParentAndChildren = flatTerms.map( ( term ) => {\n\t\treturn {\n\t\t\tchildren: [],\n\t\t\tparent: undefined,\n\t\t\t...term,\n\t\t};\n\t} );\n\n\t// All terms should have a `parent` because we're about to index them by it.\n\tif (\n\t\tflatTermsWithParentAndChildren.some(\n\t\t\t( { parent } ) => parent === undefined\n\t\t)\n\t) {\n\t\treturn flatTermsWithParentAndChildren;\n\t}\n\n\tconst termsByParent = flatTermsWithParentAndChildren.reduce(\n\t\t( acc, term ) => {\n\t\t\tconst { parent } = term;\n\t\t\tif ( ! acc[ parent ] ) {\n\t\t\t\tacc[ parent ] = [];\n\t\t\t}\n\t\t\tacc[ parent ].push( term );\n\t\t\treturn acc;\n\t\t},\n\t\t{}\n\t);\n\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:\n\t\t\t\t\tchildren && children.length\n\t\t\t\t\t\t? fillWithChildren( children )\n\t\t\t\t\t\t: [],\n\t\t\t};\n\t\t} );\n\t};\n\n\treturn fillWithChildren( termsByParent[ '0' ] || [] );\n}\n\nexport const unescapeString = ( arg ) => {\n\treturn decodeEntities( arg );\n};\n\n/**\n * Returns a term object with name unescaped.\n *\n * @param {Object} term The term object to unescape.\n *\n * @return {Object} Term object with name property unescaped.\n */\nexport const unescapeTerm = ( term ) => {\n\treturn {\n\t\t...term,\n\t\tname: unescapeString( term.name ),\n\t};\n};\n\n/**\n * Returns an array of term objects with names unescaped.\n * The unescape of each term is performed using the unescapeTerm function.\n *\n * @param {Object[]} terms Array of term objects to unescape.\n *\n * @return {Object[]} Array of term objects unescaped.\n */\nexport const unescapeTerms = ( terms ) => {\n\treturn ( terms ?? [] ).map( unescapeTerm );\n};\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdown,\n\tComboboxControl,\n\tExternalLink,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport {\n\tcreateInterpolateElement,\n\tuseState,\n\tuseMemo,\n} from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { filterURLForDisplay } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\n\nfunction getTitle( post ) {\n\treturn post?.title?.rendered\n\t\t? decodeEntities( post.title.rendered )\n\t\t: `#${ post.id } (${ __( 'no title' ) })`;\n}\n\nexport const getItemPriority = ( name, searchValue ) => {\n\tconst normalizedName = removeAccents( name || '' ).toLowerCase();\n\tconst normalizedSearch = removeAccents( searchValue || '' ).toLowerCase();\n\tif ( normalizedName === normalizedSearch ) {\n\t\treturn 0;\n\t}\n\n\tif ( normalizedName.startsWith( normalizedSearch ) ) {\n\t\treturn normalizedName.length;\n\t}\n\n\treturn Infinity;\n};\n\n/**\n * Renders the Page Attributes Parent component. A dropdown menu in an editor interface\n * for selecting the parent page of a given page.\n *\n * @return {React.ReactNode} The component to be rendered. Return null if post type is not hierarchical.\n */\nexport function PageAttributesParent() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ fieldValue, setFieldValue ] = useState( false );\n\tconst { isHierarchical, parentPostId, parentPostTitle, pageItems } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { getPostType, getEntityRecords, getEntityRecord } =\n\t\t\t\t\tselect( coreStore );\n\t\t\t\tconst { getCurrentPostId, getEditedPostAttribute } =\n\t\t\t\t\tselect( editorStore );\n\t\t\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\t\t\tconst pageId = getEditedPostAttribute( 'parent' );\n\t\t\t\tconst pType = getPostType( postTypeSlug );\n\t\t\t\tconst postId = getCurrentPostId();\n\t\t\t\tconst postIsHierarchical = pType?.hierarchical ?? false;\n\t\t\t\tconst query = {\n\t\t\t\t\tper_page: 100,\n\t\t\t\t\texclude: postId,\n\t\t\t\t\tparent_exclude: postId,\n\t\t\t\t\torderby: 'menu_order',\n\t\t\t\t\torder: 'asc',\n\t\t\t\t\t_fields: 'id,title,parent',\n\t\t\t\t};\n\n\t\t\t\t// Perform a search when the field is changed.\n\t\t\t\tif ( !! fieldValue ) {\n\t\t\t\t\tquery.search = fieldValue;\n\t\t\t\t}\n\n\t\t\t\tconst parentPost = pageId\n\t\t\t\t\t? getEntityRecord( 'postType', postTypeSlug, pageId )\n\t\t\t\t\t: null;\n\n\t\t\t\treturn {\n\t\t\t\t\tisHierarchical: postIsHierarchical,\n\t\t\t\t\tparentPostId: pageId,\n\t\t\t\t\tparentPostTitle: parentPost ? getTitle( parentPost ) : '',\n\t\t\t\t\tpageItems: postIsHierarchical\n\t\t\t\t\t\t? getEntityRecords( 'postType', postTypeSlug, query )\n\t\t\t\t\t\t: null,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ fieldValue ]\n\t\t);\n\n\tconst parentOptions = useMemo( () => {\n\t\tconst getOptionsFromTree = ( tree, level = 0 ) => {\n\t\t\tconst mappedNodes = tree.map( ( treeNode ) => [\n\t\t\t\t{\n\t\t\t\t\tvalue: treeNode.id,\n\t\t\t\t\tlabel:\n\t\t\t\t\t\t'— '.repeat( level ) + decodeEntities( treeNode.name ),\n\t\t\t\t\trawName: treeNode.name,\n\t\t\t\t},\n\t\t\t\t...getOptionsFromTree( treeNode.children || [], level + 1 ),\n\t\t\t] );\n\n\t\t\tconst sortedNodes = mappedNodes.sort( ( [ a ], [ b ] ) => {\n\t\t\t\tconst priorityA = getItemPriority( a.rawName, fieldValue );\n\t\t\t\tconst priorityB = getItemPriority( b.rawName, fieldValue );\n\t\t\t\treturn priorityA >= priorityB ? 1 : -1;\n\t\t\t} );\n\n\t\t\treturn sortedNodes.flat();\n\t\t};\n\n\t\tif ( ! pageItems ) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet tree = pageItems.map( ( item ) => ( {\n\t\t\tid: item.id,\n\t\t\tparent: item.parent,\n\t\t\tname: getTitle( item ),\n\t\t} ) );\n\n\t\t// Only build a hierarchical tree when not searching.\n\t\tif ( ! fieldValue ) {\n\t\t\ttree = buildTermsTree( tree );\n\t\t}\n\n\t\tconst opts = getOptionsFromTree( tree );\n\n\t\t// Ensure the current parent is in the options list.\n\t\tconst optsHasParent = opts.find(\n\t\t\t( item ) => item.value === parentPostId\n\t\t);\n\t\tif ( parentPostTitle && ! optsHasParent ) {\n\t\t\topts.unshift( {\n\t\t\t\tvalue: parentPostId,\n\t\t\t\tlabel: parentPostTitle,\n\t\t\t} );\n\t\t}\n\t\treturn opts;\n\t}, [ pageItems, fieldValue, parentPostTitle, parentPostId ] );\n\n\tif ( ! isHierarchical ) {\n\t\treturn null;\n\t}\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {Object} selectedPostId The selected Author.\n\t */\n\tconst handleChange = ( selectedPostId ) => {\n\t\teditPost( { parent: selectedPostId } );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tclassName=\"editor-page-attributes__parent\"\n\t\t\tlabel={ __( 'Parent' ) }\n\t\t\thelp={ __( 'Choose a parent page.' ) }\n\t\t\tvalue={ parentPostId }\n\t\t\toptions={ parentOptions }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleChange }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n\nfunction PostParentToggle( { isOpen, onClick } ) {\n\tconst parentPost = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst parentPostId = getEditedPostAttribute( 'parent' );\n\t\tif ( ! parentPostId ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getEditedPostAttribute( 'type' );\n\t\treturn getEntityRecord( 'postType', postTypeSlug, parentPostId );\n\t}, [] );\n\tconst parentTitle = useMemo(\n\t\t() => ( ! parentPost ? __( 'None' ) : getTitle( parentPost ) ),\n\t\t[ parentPost ]\n\t);\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-parent__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Current post parent.\n\t\t\t\tsprintf( __( 'Change parent: %s' ), parentTitle )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ parentTitle }\n\t\t</Button>\n\t);\n}\n\nexport function ParentRow() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\t// Site index.\n\t\treturn select( coreStore ).getEntityRecord( 'root', '__unstableBase' )\n\t\t\t?.home;\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostPanelRow label={ __( 'Parent' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tclassName=\"editor-post-parent__panel-dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-parent__panel-dialog\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<PostParentToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<div className=\"editor-post-parent\">\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Parent' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: The home URL of the WordPress installation without the scheme. */\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Child pages inherit characteristics from their parent, such as URL structure. For instance, if \"Pricing\" is a child of \"Services\", its URL would be %s<wbr />/services<wbr />/pricing.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tfilterURLForDisplay( homeUrl ).replace(\n\t\t\t\t\t\t\t\t\t\t/([/.])/g,\n\t\t\t\t\t\t\t\t\t\t'<wbr />$1'\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\twbr: <wbr />,\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<p>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'They also show up as sub-items in the default navigation menu. <a>Learn more.</a>'\n\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\ta: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#page-attributes'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\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</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<PageAttributesParent />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n\nexport default PageAttributesParent;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PageAttributesCheck from './check';\nimport { ParentRow } from './parent';\n\nconst PANEL_NAME = 'page-attributes';\n\nfunction AttributesPanel() {\n\tconst { isEnabled, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, isEditorPanelEnabled } =\n\t\t\tselect( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t};\n\t}, [] );\n\n\tif ( ! isEnabled || ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn <ParentRow />;\n}\n\n/**\n * Renders the Page Attributes Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PageAttributesPanel() {\n\treturn (\n\t\t<PageAttributesCheck>\n\t\t\t<AttributesPanel />\n\t\t</PageAttributesCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst addTemplate = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18.5 5.5V8H20V5.5H22.5V4H20V1.5H18.5V4H16V5.5H18.5ZM13.9624 4H6C4.89543 4 4 4.89543 4 6V18C4 19.1046 4.89543 20 6 20H18C19.1046 20 20 19.1046 20 18V10.0391H18.5V18C18.5 18.2761 18.2761 18.5 18 18.5H10L10 10.4917L16.4589 10.5139L16.4641 9.01389L5.5 8.97618V6C5.5 5.72386 5.72386 5.5 6 5.5H13.9624V4ZM5.5 10.4762V18C5.5 18.2761 5.72386 18.5 6 18.5H8.5L8.5 10.4865L5.5 10.4762Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default addTemplate;\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { serialize, createBlock } from '@wordpress/blocks';\nimport {\n\tModal,\n\tTextControl,\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { cleanForSlug } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst DEFAULT_TITLE = __( 'Custom Template' );\n\nexport default function CreateNewTemplateModal( { onClose } ) {\n\tconst { defaultBlockTemplate, onNavigateToEntityRecord } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tdefaultBlockTemplate: getEditorSettings().defaultBlockTemplate,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\t\tgetTemplateId: getCurrentTemplateId,\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { createTemplate } = unlock( useDispatch( editorStore ) );\n\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\n\tconst cancel = () => {\n\t\tsetTitle( '' );\n\t\tonClose();\n\t};\n\n\tconst submit = async ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tif ( isBusy ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsBusy( true );\n\n\t\tconst newTemplateContent =\n\t\t\tdefaultBlockTemplate ??\n\t\t\tserialize( [\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{\n\t\t\t\t\t\ttagName: 'header',\n\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock( 'core/site-title' ),\n\t\t\t\t\t\tcreateBlock( 'core/site-tagline' ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t\tcreateBlock( 'core/separator' ),\n\t\t\t\tcreateBlock(\n\t\t\t\t\t'core/group',\n\t\t\t\t\t{\n\t\t\t\t\t\ttagName: 'main',\n\t\t\t\t\t},\n\t\t\t\t\t[\n\t\t\t\t\t\tcreateBlock(\n\t\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t[ createBlock( 'core/post-title' ) ]\n\t\t\t\t\t\t),\n\t\t\t\t\t\tcreateBlock( 'core/post-content', {\n\t\t\t\t\t\t\tlayout: { inherit: true },\n\t\t\t\t\t\t} ),\n\t\t\t\t\t]\n\t\t\t\t),\n\t\t\t] );\n\n\t\tconst newTemplate = await createTemplate( {\n\t\t\tslug: cleanForSlug( title || DEFAULT_TITLE ),\n\t\t\tcontent: newTemplateContent,\n\t\t\ttitle: title || DEFAULT_TITLE,\n\t\t} );\n\n\t\tsetIsBusy( false );\n\t\tonNavigateToEntityRecord( {\n\t\t\tpostId: newTemplate.id,\n\t\t\tpostType: 'wp_template',\n\t\t} );\n\t\tcancel();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Create custom template' ) }\n\t\t\tonRequestClose={ cancel }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form\n\t\t\t\tclassName=\"editor-post-template__create-form\"\n\t\t\t\tonSubmit={ submit }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\tplaceholder={ DEFAULT_TITLE }\n\t\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t'Describe the template, e.g. \"Post with sidebar\". A custom template can be manually applied to any post or page.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ cancel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\t\taria-disabled={ isBusy }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport function useEditedPostContext() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\treturn {\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n}\nexport function useAllowSwitchingTemplates() {\n\tconst { postType, postId } = useEditedPostContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getEntityRecord, getEntityRecords } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\t\t\tconst templates = getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\t\t\tconst isPostsPage = +postId === siteSettings?.page_for_posts;\n\t\t\t// If current page is set front page or posts page, we also need\n\t\t\t// to check if the current theme has a template for it. If not\n\t\t\tconst isFrontPage =\n\t\t\t\tpostType === 'page' &&\n\t\t\t\t+postId === siteSettings?.page_on_front &&\n\t\t\t\ttemplates?.some( ( { slug } ) => slug === 'front-page' );\n\t\t\treturn ! isPostsPage && ! isFrontPage;\n\t\t},\n\t\t[ postId, postType ]\n\t);\n}\n\nfunction useTemplates( postType ) {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\tper_page: -1,\n\t\t\t\tpost_type: postType,\n\t\t\t} ),\n\t\t[ postType ]\n\t);\n}\n\nexport function useAvailableTemplates( postType ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst templates = useTemplates( postType );\n\treturn useMemo(\n\t\t() =>\n\t\t\tallowSwitchingTemplate &&\n\t\t\ttemplates?.filter(\n\t\t\t\t( template ) =>\n\t\t\t\t\ttemplate.is_custom &&\n\t\t\t\t\ttemplate.slug !== currentTemplateSlug &&\n\t\t\t\t\t!! template.content.raw // Skip empty templates.\n\t\t\t),\n\t\t[ templates, currentTemplateSlug, allowSwitchingTemplate ]\n\t);\n}\n\nexport function useCurrentTemplateSlug() {\n\tconst { postType, postId } = useEditedPostContext();\n\tconst templates = useTemplates( postType );\n\tconst entityTemplate = useSelect(\n\t\t( select ) => {\n\t\t\tconst post = select( coreStore ).getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\treturn post?.template;\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\tif ( ! entityTemplate ) {\n\t\treturn;\n\t}\n\t// If a page has a `template` set and is not included in the list\n\t// of the theme's templates, do not return it, in order to resolve\n\t// to the current theme's default template.\n\treturn templates?.find( ( template ) => template.slug === entityTemplate )\n\t\t?.slug;\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { SelectControl, Dropdown, Button, Notice } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useState, useMemo } from '@wordpress/element';\nimport { addTemplate } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport CreateNewTemplateModal from './create-new-template-modal';\nimport { useAllowSwitchingTemplates } from './hooks';\n\nconst POPOVER_PROPS = {\n\tclassName: 'editor-post-template__dropdown',\n\tplacement: 'bottom-start',\n};\n\nfunction PostTemplateToggle( { isOpen, onClick } ) {\n\tconst templateTitle = useSelect( ( select ) => {\n\t\tconst templateSlug =\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' );\n\n\t\tconst { supportsTemplateMode, availableTemplates } =\n\t\t\tselect( editorStore ).getEditorSettings();\n\t\tif ( ! supportsTemplateMode && availableTemplates[ templateSlug ] ) {\n\t\t\treturn availableTemplates[ templateSlug ];\n\t\t}\n\t\tconst template =\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) && select( editorStore ).getCurrentTemplateId();\n\t\treturn (\n\t\t\ttemplate?.title ||\n\t\t\ttemplate?.slug ||\n\t\t\tavailableTemplates?.[ templateSlug ]\n\t\t);\n\t}, [] );\n\n\treturn (\n\t\t<Button\n\t\t\t__next40pxDefaultSize\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={ __( 'Template options' ) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ templateTitle ?? __( 'Default template' ) }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the dropdown content for selecting a post template.\n *\n * @param {Object} props The component props.\n * @param {Function} props.onClose The function to close the dropdown.\n *\n * @return {React.ReactNode} The rendered dropdown content.\n */\nfunction PostTemplateDropdownContent( { onClose } ) {\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst {\n\t\tavailableTemplates,\n\t\tfetchedTemplates,\n\t\tselectedTemplateSlug,\n\t\tcanCreate,\n\t\tcanEdit,\n\t\tcurrentTemplateId,\n\t\tonNavigateToEntityRecord,\n\t\tgetEditorSettings,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser, getEntityRecords } = select( coreStore );\n\t\t\tconst editorSettings = select( editorStore ).getEditorSettings();\n\t\t\tconst canCreateTemplates = canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} );\n\t\t\tconst _currentTemplateId =\n\t\t\t\tselect( editorStore ).getCurrentTemplateId();\n\t\t\treturn {\n\t\t\t\tavailableTemplates: editorSettings.availableTemplates,\n\t\t\t\tfetchedTemplates: canCreateTemplates\n\t\t\t\t\t? getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\t\t\t\tpost_type:\n\t\t\t\t\t\t\t\tselect( editorStore ).getCurrentPostType(),\n\t\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined,\n\t\t\t\tselectedTemplateSlug:\n\t\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'template' ),\n\t\t\t\tcanCreate:\n\t\t\t\t\tallowSwitchingTemplate &&\n\t\t\t\t\tcanCreateTemplates &&\n\t\t\t\t\teditorSettings.supportsTemplateMode,\n\t\t\t\tcanEdit:\n\t\t\t\t\tallowSwitchingTemplate &&\n\t\t\t\t\tcanCreateTemplates &&\n\t\t\t\t\teditorSettings.supportsTemplateMode &&\n\t\t\t\t\t!! _currentTemplateId,\n\t\t\t\tcurrentTemplateId: _currentTemplateId,\n\t\t\t\tonNavigateToEntityRecord:\n\t\t\t\t\teditorSettings.onNavigateToEntityRecord,\n\t\t\t\tgetEditorSettings: select( editorStore ).getEditorSettings,\n\t\t\t};\n\t\t},\n\t\t[ allowSwitchingTemplate ]\n\t);\n\n\tconst options = useMemo(\n\t\t() =>\n\t\t\tObject.entries( {\n\t\t\t\t...availableTemplates,\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\t( fetchedTemplates ?? [] ).map( ( { slug, title } ) => [\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\ttitle.rendered,\n\t\t\t\t\t] )\n\t\t\t\t),\n\t\t\t} ).map( ( [ slug, title ] ) => ( { value: slug, label: title } ) ),\n\t\t[ availableTemplates, fetchedTemplates ]\n\t);\n\n\tconst selectedOption =\n\t\toptions.find( ( option ) => option.value === selectedTemplateSlug ) ??\n\t\toptions.find( ( option ) => ! option.value ); // The default option has '' value.\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst [ isCreateModalOpen, setIsCreateModalOpen ] = useState( false );\n\n\treturn (\n\t\t<div className=\"editor-post-template__classic-theme-dropdown\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Template' ) }\n\t\t\t\thelp={ __(\n\t\t\t\t\t'Templates define the way content is displayed when viewing your site.'\n\t\t\t\t) }\n\t\t\t\tactions={\n\t\t\t\t\tcanCreate\n\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ticon: addTemplate,\n\t\t\t\t\t\t\t\t\tlabel: __( 'Add template' ),\n\t\t\t\t\t\t\t\t\tonClick: () => setIsCreateModalOpen( true ),\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t: []\n\t\t\t\t}\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t{ ! allowSwitchingTemplate ? (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __( 'The posts page template cannot be changed.' ) }\n\t\t\t\t</Notice>\n\t\t\t) : (\n\t\t\t\t<SelectControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tlabel={ __( 'Template' ) }\n\t\t\t\t\tvalue={ selectedOption?.value ?? '' }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\tonChange={ ( slug ) =>\n\t\t\t\t\t\teditPost( { template: slug || '' } )\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canEdit && onNavigateToEntityRecord && (\n\t\t\t\t<p>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\t\tpostId: currentTemplateId,\n\t\t\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\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\ttype: 'snackbar',\n\t\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\t\t\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\t\t\t\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord(),\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);\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Edit template' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</p>\n\t\t\t) }\n\t\t\t{ isCreateModalOpen && (\n\t\t\t\t<CreateNewTemplateModal\n\t\t\t\t\tonClose={ () => setIsCreateModalOpen( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction ClassicThemeControl() {\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tfocusOnMount\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<PostTemplateToggle isOpen={ isOpen } onClick={ onToggle } />\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<PostTemplateDropdownContent onClose={ onClose } />\n\t\t\t) }\n\t\t/>\n\t);\n}\n\n/**\n * Provides a dropdown menu for selecting and managing post templates.\n *\n * The dropdown menu includes a button for toggling the menu, a list of available templates, and options for creating and editing templates.\n *\n * @return {React.ReactNode} The rendered ClassicThemeControl component.\n */\nexport default ClassicThemeControl;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nexport default function EnablePanelOption( props ) {\n\tconst { toggleEditorPanelEnabled } = useDispatch( editorStore );\n\tconst { isChecked, isRemoved } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelEnabled, isEditorPanelRemoved } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisChecked: isEditorPanelEnabled( props.panelName ),\n\t\t\t\tisRemoved: isEditorPanelRemoved( props.panelName ),\n\t\t\t};\n\t\t},\n\t\t[ props.panelName ]\n\t);\n\n\tif ( isRemoved ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ () => toggleEditorPanelEnabled( props.panelName ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"warning\"];","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\n\nconst { Fill, Slot } = createSlotFill(\n\t'EnablePluginDocumentSettingPanelOption'\n);\n\nconst EnablePluginDocumentSettingPanelOption = ( { label, panelName } ) => (\n\t<Fill>\n\t\t<EnablePanelOption label={ label } panelName={ panelName } />\n\t</Fill>\n);\n\nEnablePluginDocumentSettingPanelOption.Slot = Slot;\n\nexport default EnablePluginDocumentSettingPanelOption;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport EnablePluginDocumentSettingPanelOption from '../preferences-modal/enable-plugin-document-setting-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'PluginDocumentSettingPanel' );\n\n/**\n * Renders items below the Status & Availability panel in the Document Sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} props.name Required. A machine-friendly name for the panel.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {string} [props.title] The title of the panel\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var el = React.createElement;\n * var __ = wp.i18n.__;\n * var registerPlugin = wp.plugins.registerPlugin;\n * var PluginDocumentSettingPanel = wp.editor.PluginDocumentSettingPanel;\n *\n * function MyDocumentSettingPlugin() {\n * \treturn el(\n * \t\tPluginDocumentSettingPanel,\n * \t\t{\n * \t\t\tclassName: 'my-document-setting-plugin',\n * \t\t\ttitle: 'My Panel',\n * \t\t\tname: 'my-panel',\n * \t\t},\n * \t\t__( 'My Document Setting Panel' )\n * \t);\n * }\n *\n * registerPlugin( 'my-document-setting-plugin', {\n * \t\trender: MyDocumentSettingPlugin\n * } );\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { registerPlugin } from '@wordpress/plugins';\n * import { PluginDocumentSettingPanel } from '@wordpress/editor';\n *\n * const MyDocumentSettingTest = () => (\n * \t\t<PluginDocumentSettingPanel className=\"my-document-setting-plugin\" title=\"My Panel\" name=\"my-panel\">\n *\t\t\t<p>My Document Setting Panel</p>\n *\t\t</PluginDocumentSettingPanel>\n *\t);\n *\n * registerPlugin( 'document-setting-test', { render: MyDocumentSettingTest } );\n * ```\n *\n * @return {React.ReactNode} The component to be rendered.\n */\nconst PluginDocumentSettingPanel = ( {\n\tname,\n\tclassName,\n\ttitle,\n\ticon,\n\tchildren,\n} ) => {\n\tconst { name: pluginName } = usePluginContext();\n\tconst panelName = `${ pluginName }/${ name }`;\n\tconst { opened, isEnabled } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelOpened, isEditorPanelEnabled } =\n\t\t\t\tselect( editorStore );\n\n\t\t\treturn {\n\t\t\t\topened: isEditorPanelOpened( panelName ),\n\t\t\t\tisEnabled: isEditorPanelEnabled( panelName ),\n\t\t\t};\n\t\t},\n\t\t[ panelName ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( undefined === name ) {\n\t\twarning( 'PluginDocumentSettingPanel requires a name property.' );\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<EnablePluginDocumentSettingPanelOption\n\t\t\t\tlabel={ title }\n\t\t\t\tpanelName={ panelName }\n\t\t\t/>\n\t\t\t<Fill>\n\t\t\t\t{ isEnabled && (\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\topened={ opened }\n\t\t\t\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t</Fill>\n\t\t</>\n\t);\n};\n\nPluginDocumentSettingPanel.Slot = Slot;\n\nexport default PluginDocumentSettingPanel;\n","/**\n * WordPress dependencies\n */\nimport { BlockSettingsMenuControls } from '@wordpress/block-editor';\nimport { MenuItem } from '@wordpress/components';\nimport { compose } from '@wordpress/compose';\n\nconst isEverySelectedBlockAllowed = ( selected, allowed ) =>\n\tselected.filter( ( id ) => ! allowed.includes( id ) ).length === 0;\n\n/**\n * Plugins may want to add an item to the menu either for every block\n * or only for the specific ones provided in the `allowedBlocks` component property.\n *\n * If there are multiple blocks selected the item will be rendered if every block\n * is of one allowed type (not necessarily the same).\n *\n * @param {string[]} selectedBlocks Array containing the names of the blocks selected\n * @param {string[]} allowedBlocks Array containing the names of the blocks allowed\n * @return {boolean} Whether the item will be rendered or not.\n */\nconst shouldRenderItem = ( selectedBlocks, allowedBlocks ) =>\n\t! Array.isArray( allowedBlocks ) ||\n\tisEverySelectedBlockAllowed( selectedBlocks, allowedBlocks );\n\n/**\n * Renders a new item in the block settings menu.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.allowedBlocks] An array containing a list of block names for which the item should be shown. If not present, it'll be rendered for any block. If multiple blocks are selected, it'll be shown if and only if all of them are in the allowed list.\n * @param {WPBlockTypeIconRender} [props.icon] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element.\n * @param {string} props.label The menu item text.\n * @param {Function} props.onClick Callback function to be executed when the user click the menu item.\n * @param {boolean} [props.small] Whether to render the label or not.\n * @param {string} [props.role] The ARIA role for the menu item.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginBlockSettingsMenuItem = wp.editor.PluginBlockSettingsMenuItem;\n *\n * function doOnClick(){\n * \t// To be called when the user clicks the menu item.\n * }\n *\n * function MyPluginBlockSettingsMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginBlockSettingsMenuItem,\n * \t\t{\n * \t\t\tallowedBlocks: [ 'core/paragraph' ],\n * \t\t\ticon: 'dashicon-name',\n * \t\t\tlabel: __( 'Menu item text' ),\n * \t\t\tonClick: doOnClick,\n * \t\t}\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginBlockSettingsMenuItem } from '@wordpress/editor';\n *\n * const doOnClick = ( ) => {\n * // To be called when the user clicks the menu item.\n * };\n *\n * const MyPluginBlockSettingsMenuItem = () => (\n * <PluginBlockSettingsMenuItem\n * \t\tallowedBlocks={ [ 'core/paragraph' ] }\n * \t\ticon='dashicon-name'\n * \t\tlabel={ __( 'Menu item text' ) }\n * \t\tonClick={ doOnClick } />\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginBlockSettingsMenuItem = ( {\n\tallowedBlocks,\n\ticon,\n\tlabel,\n\tonClick,\n\tsmall,\n\trole,\n} ) => (\n\t<BlockSettingsMenuControls>\n\t\t{ ( { selectedBlocks, onClose } ) => {\n\t\t\tif ( ! shouldRenderItem( selectedBlocks, allowedBlocks ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ compose( onClick, onClose ) }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tlabel={ small ? label : undefined }\n\t\t\t\t\trole={ role }\n\t\t\t\t>\n\t\t\t\t\t{ ! small && label }\n\t\t\t\t</MenuItem>\n\t\t\t);\n\t\t} }\n\t</BlockSettingsMenuControls>\n);\n\nexport default PluginBlockSettingsMenuItem;\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down, and can be used to as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided then the menu item is represented as an anchor rather than button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n * @param {Function} [props.onClick=noop] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying [Button](/packages/components/src/button/README.md) component.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginMoreMenuItem = wp.editor.PluginMoreMenuItem;\n * var moreIcon = wp.element.createElement( 'svg' ); //... svg element.\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * function MyButtonMoreMenuItem() {\n * \treturn wp.element.createElement(\n * \t\tPluginMoreMenuItem,\n * \t\t{\n * \t\t\ticon: moreIcon,\n * \t\t\tonClick: onButtonClick,\n * \t\t},\n * \t\t__( 'My button title' )\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * function onButtonClick() {\n * \talert( 'Button clicked.' );\n * }\n *\n * const MyButtonMoreMenuItem = () => (\n * \t<PluginMoreMenuItem\n * \t\ticon={ more }\n * \t\tonClick={ onButtonClick }\n * \t>\n * \t\t{ __( 'My button title' ) }\n * \t</PluginMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginMoreMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-more-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { usePluginContext } from '@wordpress/plugins';\nimport { createSlotFill, PanelBody } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostPublishPanel' );\n\n/**\n * Renders provided content to the post-publish panel in the publish flow\n * (side panel that opens after a user publishes the post).\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened. When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostPublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPostPublishPanel = () => (\n * \t<PluginPostPublishPanel\n * \t\tclassName=\"my-plugin-post-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * { __( 'My panel content' ) }\n * \t</PluginPostPublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostPublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPostPublishPanel.Slot = Slot;\n\nexport default PluginPostPublishPanel;\n","/**\n * Defines as extensibility slot for the Summary panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostStatusInfo' );\n\n/**\n * Renders a row in the Summary panel of the Document sidebar.\n * It should be noted that this is named and implemented around the function it serves\n * and not its location, which may change in future iterations.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostStatusInfo = wp.editor.PluginPostStatusInfo;\n *\n * function MyPluginPostStatusInfo() {\n * \treturn React.createElement(\n * \t\tPluginPostStatusInfo,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-status-info',\n * \t\t},\n * \t\t__( 'My post status info' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPostStatusInfo } from '@wordpress/editor';\n *\n * const MyPluginPostStatusInfo = () => (\n * \t<PluginPostStatusInfo\n * \t\tclassName=\"my-plugin-post-status-info\"\n * \t>\n * \t\t{ __( 'My post status info' ) }\n * \t</PluginPostStatusInfo>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostStatusInfo = ( { children, className } ) => (\n\t<Fill>\n\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t</Fill>\n);\n\nPluginPostStatusInfo.Slot = Slot;\n\nexport default PluginPostStatusInfo;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelBody } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPrePublishPanel' );\n\n/**\n * Renders provided content to the pre-publish side panel in the publish flow\n * (side panel that opens when a user first pushes \"Publish\" from the main editor).\n *\n * @param {Object} props Component props.\n * @param {string} [props.className] An optional class name added to the panel.\n * @param {string} [props.title] Title displayed at the top of the panel.\n * @param {boolean} [props.initialOpen=false] Whether to have the panel initially opened.\n * When no title is provided it is always opened.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/)\n * icon slug string, or an SVG WP element, to be rendered when\n * the sidebar is pinned to toolbar.\n * @param {React.ReactNode} props.children Children to be rendered\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginPrePublishPanel } from '@wordpress/editor';\n *\n * const MyPluginPrePublishPanel = () => (\n * \t<PluginPrePublishPanel\n * \t\tclassName=\"my-plugin-pre-publish-panel\"\n * \t\ttitle={ __( 'My panel title' ) }\n * \t\tinitialOpen={ true }\n * \t>\n * \t { __( 'My panel content' ) }\n * \t</PluginPrePublishPanel>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPrePublishPanel = ( {\n\tchildren,\n\tclassName,\n\ttitle,\n\tinitialOpen = false,\n\ticon,\n} ) => {\n\tconst { icon: pluginIcon } = usePluginContext();\n\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelBody\n\t\t\t\tclassName={ className }\n\t\t\t\tinitialOpen={ initialOpen || ! title }\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ icon ?? pluginIcon }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</PanelBody>\n\t\t</Fill>\n\t);\n};\n\nPluginPrePublishPanel.Slot = Slot;\n\nexport default PluginPrePublishPanel;\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { usePluginContext } from '@wordpress/plugins';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in the Preview dropdown, which can be used as a button or link depending on the props provided.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.href] When `href` is provided, the menu item is rendered as an anchor instead of a button. It corresponds to the `href` attribute of the anchor.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The icon to be rendered to the left of the menu item label. Can be a Dashicon slug or an SVG WP element.\n * @param {Function} [props.onClick] The callback function to be executed when the user clicks the menu item.\n * @param {...*} [props.other] Any additional props are passed through to the underlying MenuItem component.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import { PluginPreviewMenuItem } from '@wordpress/editor';\n * import { external } from '@wordpress/icons';\n *\n * function onPreviewClick() {\n * // Handle preview action\n * }\n *\n * const ExternalPreviewMenuItem = () => (\n * <PluginPreviewMenuItem\n * icon={ external }\n * onClick={ onPreviewClick }\n * >\n * { __( 'Preview in new tab' ) }\n * </PluginPreviewMenuItem>\n * );\n * registerPlugin( 'external-preview-menu-item', {\n * render: ExternalPreviewMenuItem,\n * } );\n * ```\n *\n * @return {React.ReactNode} The rendered menu item component.\n */\nexport default function PluginPreviewMenuItem( props ) {\n\tconst context = usePluginContext();\n\treturn (\n\t\t<ActionItem\n\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\tas={ props.as ?? MenuItem }\n\t\t\ticon={ props.icon || context.icon }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ComplementaryArea } from '@wordpress/interface';\n\n/**\n * Renders a sidebar when activated. The contents within the `PluginSidebar` will appear as content within the sidebar.\n * It also automatically renders a corresponding `PluginSidebarMenuItem` component when `isPinnable` flag is set to `true`.\n * If you wish to display the sidebar, you can with use the `PluginSidebarMoreMenuItem` component or the `wp.data.dispatch` API:\n *\n * ```js\n * wp.data.dispatch( 'core/edit-post' ).openGeneralSidebar( 'plugin-name/sidebar-name' );\n * ```\n *\n * @see PluginSidebarMoreMenuItem\n *\n * @param {Object} props Element props.\n * @param {string} props.name A string identifying the sidebar. Must be unique for every sidebar registered within the scope of your plugin.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {string} [props.className] An optional class name added to the sidebar body.\n * @param {string} props.title Title displayed at the top of the sidebar.\n * @param {boolean} [props.isPinnable=true] Whether to allow to pin sidebar to the toolbar. When set to `true` it also automatically renders a corresponding menu item.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered when the sidebar is pinned to toolbar.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var el = React.createElement;\n * var PanelBody = wp.components.PanelBody;\n * var PluginSidebar = wp.editor.PluginSidebar;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MyPluginSidebar() {\n * \treturn el(\n * \t\t\tPluginSidebar,\n * \t\t\t{\n * \t\t\t\tname: 'my-sidebar',\n * \t\t\t\ttitle: 'My sidebar title',\n * \t\t\t\ticon: moreIcon,\n * \t\t\t},\n * \t\t\tel(\n * \t\t\t\tPanelBody,\n * \t\t\t\t{},\n * \t\t\t\t__( 'My sidebar content' )\n * \t\t\t)\n * \t);\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PanelBody } from '@wordpress/components';\n * import { PluginSidebar } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MyPluginSidebar = () => (\n * \t<PluginSidebar\n * \t\tname=\"my-sidebar\"\n * \t\ttitle=\"My sidebar title\"\n * \t\ticon={ more }\n * \t>\n * \t\t<PanelBody>\n * \t\t\t{ __( 'My sidebar content' ) }\n * \t\t</PanelBody>\n * \t</PluginSidebar>\n * );\n * ```\n */\nexport default function PluginSidebar( { className, ...props } ) {\n\treturn (\n\t\t<ComplementaryArea\n\t\t\tpanelClassName={ className }\n\t\t\tclassName=\"editor-sidebar\"\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ComplementaryAreaMoreMenuItem } from '@wordpress/interface';\n\n/**\n * Renders a menu item in `Plugins` group in `More Menu` drop down,\n * and can be used to activate the corresponding `PluginSidebar` component.\n * The text within the component appears as the menu item label.\n *\n * @param {Object} props Component props.\n * @param {string} props.target A string identifying the target sidebar you wish to be activated by this menu item. Must be the same as the `name` prop you have given to that sidebar.\n * @param {React.ReactNode} [props.children] Children to be rendered.\n * @param {WPBlockTypeIconRender} [props.icon=inherits from the plugin] The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element, to be rendered to the left of the menu item label.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginSidebarMoreMenuItem = wp.editor.PluginSidebarMoreMenuItem;\n * var moreIcon = React.createElement( 'svg' ); //... svg element.\n *\n * function MySidebarMoreMenuItem() {\n * \treturn React.createElement(\n * \t\tPluginSidebarMoreMenuItem,\n * \t\t{\n * \t\t\ttarget: 'my-sidebar',\n * \t\t\ticon: moreIcon,\n * \t\t},\n * \t\t__( 'My sidebar title' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { PluginSidebarMoreMenuItem } from '@wordpress/editor';\n * import { more } from '@wordpress/icons';\n *\n * const MySidebarMoreMenuItem = () => (\n * \t<PluginSidebarMoreMenuItem\n * \t\ttarget=\"my-sidebar\"\n * \t\ticon={ more }\n * \t>\n * \t\t{ __( 'My sidebar title' ) }\n * \t</PluginSidebarMoreMenuItem>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PluginSidebarMoreMenuItem( props ) {\n\treturn (\n\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t// Menu item is marked with unstable prop for backward compatibility.\n\t\t\t// @see https://github.com/WordPress/gutenberg/issues/14457\n\t\t\t__unstableExplicitMenuItem\n\t\t\tscope=\"core\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { MenuItem, Modal } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { parse } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useAvailableTemplates, useEditedPostContext } from './hooks';\n\nexport default function SwapTemplateButton( { onClick } ) {\n\tconst [ showModal, setShowModal ] = useState( false );\n\tconst { postType, postId } = useEditedPostContext();\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tif ( ! availableTemplates?.length ) {\n\t\treturn null;\n\t}\n\tconst onTemplateSelect = async ( template ) => {\n\t\teditEntityRecord(\n\t\t\t'postType',\n\t\t\tpostType,\n\t\t\tpostId,\n\t\t\t{ template: template.name },\n\t\t\t{ undoIgnore: true }\n\t\t);\n\t\tsetShowModal( false ); // Close the template suggestions modal first.\n\t\tonClick();\n\t};\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={ () => setShowModal( true ) }>\n\t\t\t\t{ __( 'Change template' ) }\n\t\t\t</MenuItem>\n\t\t\t{ showModal && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Choose a template' ) }\n\t\t\t\t\tonRequestClose={ () => setShowModal( false ) }\n\t\t\t\t\toverlayClassName=\"editor-post-template__swap-template-modal\"\n\t\t\t\t\tisFullScreen\n\t\t\t\t>\n\t\t\t\t\t<div className=\"editor-post-template__swap-template-modal-content\">\n\t\t\t\t\t\t<TemplatesList\n\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\tonSelect={ onTemplateSelect }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction TemplatesList( { postType, onSelect } ) {\n\tconst availableTemplates = useAvailableTemplates( postType );\n\tconst templatesAsPatterns = useMemo(\n\t\t() =>\n\t\t\tavailableTemplates.map( ( template ) => ( {\n\t\t\t\tname: template.slug,\n\t\t\t\tblocks: parse( template.content.raw ),\n\t\t\t\ttitle: decodeEntities( template.title.rendered ),\n\t\t\t\tid: template.id,\n\t\t\t} ) ),\n\t\t[ availableTemplates ]\n\t);\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tlabel={ __( 'Templates' ) }\n\t\t\tblockPatterns={ templatesAsPatterns }\n\t\t\tonClickPattern={ onSelect }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseAllowSwitchingTemplates,\n\tuseCurrentTemplateSlug,\n\tuseEditedPostContext,\n} from './hooks';\n\nexport default function ResetDefaultTemplate( { onClick } ) {\n\tconst currentTemplateSlug = useCurrentTemplateSlug();\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\tconst { postType, postId } = useEditedPostContext();\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// The default template in a post is indicated by an empty string.\n\tif ( ! currentTemplateSlug || ! allowSwitchingTemplate ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<MenuItem\n\t\t\tonClick={ () => {\n\t\t\t\teditEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t\t{ template: '' },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t\t\tonClick();\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Use default template' ) }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport CreateNewTemplateModal from './create-new-template-modal';\nimport { useAllowSwitchingTemplates } from './hooks';\n\nexport default function CreateNewTemplate( { onClick } ) {\n\tconst { canCreateTemplates } = useSelect( ( select ) => {\n\t\tconst { canUser } = select( coreStore );\n\t\treturn {\n\t\t\tcanCreateTemplates: canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t};\n\t}, [] );\n\tconst [ isCreateModalOpen, setIsCreateModalOpen ] = useState( false );\n\tconst allowSwitchingTemplate = useAllowSwitchingTemplates();\n\n\t// The default template in a post is indicated by an empty string.\n\tif ( ! canCreateTemplates || ! allowSwitchingTemplate ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsCreateModalOpen( true );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Create new template' ) }\n\t\t\t</MenuItem>\n\n\t\t\t{ isCreateModalOpen && (\n\t\t\t\t<CreateNewTemplateModal\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tsetIsCreateModalOpen( false );\n\t\t\t\t\t\tonClick();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport SwapTemplateButton from './swap-template-button';\nimport ResetDefaultTemplate from './reset-default-template';\nimport { unlock } from '../../lock-unlock';\nimport CreateNewTemplate from './create-new-template';\n\nconst POPOVER_PROPS = {\n\tclassName: 'editor-post-template__dropdown',\n\tplacement: 'bottom-start',\n};\n\nexport default function BlockThemeControl( { id } ) {\n\tconst {\n\t\tisTemplateHidden,\n\t\tonNavigateToEntityRecord,\n\t\tgetEditorSettings,\n\t\thasGoBack,\n\t} = useSelect( ( select ) => {\n\t\tconst { getRenderingMode, getEditorSettings: _getEditorSettings } =\n\t\t\tunlock( select( editorStore ) );\n\t\tconst editorSettings = _getEditorSettings();\n\t\treturn {\n\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\tonNavigateToEntityRecord: editorSettings.onNavigateToEntityRecord,\n\t\t\tgetEditorSettings: _getEditorSettings,\n\t\t\thasGoBack: editorSettings.hasOwnProperty(\n\t\t\t\t'onNavigateToPreviousEntityRecord'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tconst { editedRecord: template, hasResolved } = useEntityRecord(\n\t\t'postType',\n\t\t'wp_template',\n\t\tid\n\t);\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tconst canCreateTemplate = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\tif ( ! hasResolved ) {\n\t\treturn null;\n\t}\n\n\t// The site editor does not have a `onNavigateToPreviousEntityRecord` setting as it uses its own routing\n\t// and assigns its own backlink to focusMode pages.\n\tconst notificationAction = hasGoBack\n\t\t? [\n\t\t\t\t{\n\t\t\t\t\tlabel: __( 'Go back' ),\n\t\t\t\t\tonClick: () =>\n\t\t\t\t\t\tgetEditorSettings().onNavigateToPreviousEntityRecord(),\n\t\t\t\t},\n\t\t ]\n\t\t: undefined;\n\n\tconst mayShowTemplateEditNotice = () => {\n\t\tif ( ! getPreference( 'core/edit-site', 'welcomeGuideTemplate' ) ) {\n\t\t\tcreateSuccessNotice(\n\t\t\t\t__(\n\t\t\t\t\t'Editing template. Changes made here affect all posts and pages that use the template.'\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', actions: notificationAction }\n\t\t\t);\n\t\t}\n\t};\n\treturn (\n\t\t<DropdownMenu\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tfocusOnMount\n\t\t\ttoggleProps={ {\n\t\t\t\tsize: 'compact',\n\t\t\t\tvariant: 'tertiary',\n\t\t\t\ttooltipPosition: 'middle left',\n\t\t\t} }\n\t\t\tlabel={ __( 'Template options' ) }\n\t\t\ttext={ decodeEntities( template.title ) }\n\t\t\ticon={ null }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ canCreateTemplate && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\t\t\t\t\t\tpostId: template.id,\n\t\t\t\t\t\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\tmayShowTemplateEditNotice();\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\t{ __( 'Edit template' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<SwapTemplateButton onClick={ onClose } />\n\t\t\t\t\t\t<ResetDefaultTemplate onClick={ onClose } />\n\t\t\t\t\t\t{ canCreateTemplate && (\n\t\t\t\t\t\t\t<CreateNewTemplate onClick={ onClose } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ ! isTemplateHidden ? check : undefined }\n\t\t\t\t\t\t\tisSelected={ ! isTemplateHidden }\n\t\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetRenderingMode(\n\t\t\t\t\t\t\t\t\tisTemplateHidden\n\t\t\t\t\t\t\t\t\t\t? 'template-locked'\n\t\t\t\t\t\t\t\t\t\t: 'post-only'\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\t\t{ __( 'Show template' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport ClassicThemeControl from './classic-theme';\nimport BlockThemeControl from './block-theme';\nimport PostPanelRow from '../post-panel-row';\n\n/**\n * Displays the template controls based on the current editor settings and user permissions.\n *\n * @return {React.ReactNode} The rendered PostTemplatePanel component.\n */\nexport default function PostTemplatePanel() {\n\tconst { templateId, isBlockTheme } = useSelect( ( select ) => {\n\t\tconst { getCurrentTemplateId, getEditorSettings } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\tisBlockTheme: getEditorSettings().__unstableIsBlockBasedTheme,\n\t\t};\n\t}, [] );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst settings = select( editorStore ).getEditorSettings();\n\t\tconst hasTemplates =\n\t\t\t!! settings.availableTemplates &&\n\t\t\tObject.keys( settings.availableTemplates ).length > 0;\n\t\tif ( hasTemplates ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( ! settings.supportsTemplateMode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst canCreateTemplates =\n\t\t\tselect( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) ?? false;\n\t\treturn canCreateTemplates;\n\t}, [] );\n\n\tconst canViewTemplates = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( coreStore ).canUser( 'read', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ) ?? false\n\t\t);\n\t}, [] );\n\n\tif ( ( ! isBlockTheme || ! canViewTemplates ) && isVisible ) {\n\t\treturn (\n\t\t\t<PostPanelRow label={ __( 'Template' ) }>\n\t\t\t\t<ClassicThemeControl />\n\t\t\t</PostPanelRow>\n\t\t);\n\t}\n\n\tif ( isBlockTheme && !! templateId ) {\n\t\treturn (\n\t\t\t<PostPanelRow label={ __( 'Template' ) }>\n\t\t\t\t<BlockThemeControl id={ templateId } />\n\t\t\t</PostPanelRow>\n\t\t);\n\t}\n\treturn null;\n}\n","export const BASE_QUERY = {\n\t_fields: 'id,name',\n\tcontext: 'view', // Allows non-admins to perform requests.\n};\n\nexport const AUTHORS_QUERY = {\n\twho: 'authors',\n\tper_page: 100,\n\t...BASE_QUERY,\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { AUTHORS_QUERY, BASE_QUERY } from './constants';\n\nexport function useAuthorsQuery( search ) {\n\tconst { authorId, authors, postAuthor } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser, getUsers } = select( coreStore );\n\t\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\t\tconst _authorId = getEditedPostAttribute( 'author' );\n\t\t\tconst query = { ...AUTHORS_QUERY };\n\n\t\t\tif ( search ) {\n\t\t\t\tquery.search = search;\n\t\t\t\tquery.search_columns = [ 'name' ];\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tauthorId: _authorId,\n\t\t\t\tauthors: getUsers( query ),\n\t\t\t\tpostAuthor: getUser( _authorId, BASE_QUERY ),\n\t\t\t};\n\t\t},\n\t\t[ search ]\n\t);\n\n\tconst authorOptions = useMemo( () => {\n\t\tconst fetchedAuthors = ( authors ?? [] ).map( ( author ) => {\n\t\t\treturn {\n\t\t\t\tvalue: author.id,\n\t\t\t\tlabel: decodeEntities( author.name ),\n\t\t\t};\n\t\t} );\n\n\t\t// Ensure the current author is included in the dropdown list.\n\t\tconst foundAuthor = fetchedAuthors.findIndex(\n\t\t\t( { value } ) => postAuthor?.id === value\n\t\t);\n\n\t\tlet currentAuthor = [];\n\t\tif ( foundAuthor < 0 && postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: postAuthor.id,\n\t\t\t\t\tlabel: decodeEntities( postAuthor.name ),\n\t\t\t\t},\n\t\t\t];\n\t\t} else if ( foundAuthor < 0 && ! postAuthor ) {\n\t\t\tcurrentAuthor = [\n\t\t\t\t{\n\t\t\t\t\tvalue: 0,\n\t\t\t\t\tlabel: __( '(No author)' ),\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn [ ...currentAuthor, ...fetchedAuthors ];\n\t}, [ authors, postAuthor ] );\n\n\treturn { authorId, authorOptions, postAuthor };\n}\n","/**\n * WordPress dependencies\n */\nimport { debounce } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { ComboboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorCombobox() {\n\tconst [ fieldValue, setFieldValue ] = useState();\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions } = useAuthorsQuery( fieldValue );\n\n\t/**\n\t * Handle author selection.\n\t *\n\t * @param {number} postAuthorId The selected Author.\n\t */\n\tconst handleSelect = ( postAuthorId ) => {\n\t\tif ( ! postAuthorId ) {\n\t\t\treturn;\n\t\t}\n\t\teditPost( { author: postAuthorId } );\n\t};\n\n\t/**\n\t * Handle user input.\n\t *\n\t * @param {string} inputValue The current value of the input field.\n\t */\n\tconst handleKeydown = ( inputValue ) => {\n\t\tsetFieldValue( inputValue );\n\t};\n\n\treturn (\n\t\t<ComboboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\t__next40pxDefaultSize\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tvalue={ authorId }\n\t\t\tonFilterValueChange={ debounce( handleKeydown, 300 ) }\n\t\t\tonChange={ handleSelect }\n\t\t\tallowReset={ false }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { SelectControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAuthorsQuery } from './hook';\n\nexport default function PostAuthorSelect() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { authorId, authorOptions } = useAuthorsQuery();\n\n\tconst setAuthorId = ( value ) => {\n\t\tconst author = Number( value );\n\t\teditPost( { author } );\n\t};\n\n\treturn (\n\t\t<SelectControl\n\t\t\t__next40pxDefaultSize\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName=\"post-author-selector\"\n\t\t\tlabel={ __( 'Author' ) }\n\t\t\toptions={ authorOptions }\n\t\t\tonChange={ setAuthorId }\n\t\t\tvalue={ authorId }\n\t\t\thideLabelFromVision\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCombobox from './combobox';\nimport PostAuthorSelect from './select';\nimport { AUTHORS_QUERY } from './constants';\n\nconst minimumUsersForCombobox = 25;\n\n/**\n * Renders the component for selecting the post author.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostAuthor() {\n\tconst showCombobox = useSelect( ( select ) => {\n\t\tconst authors = select( coreStore ).getUsers( AUTHORS_QUERY );\n\n\t\treturn authors?.length >= minimumUsersForCombobox;\n\t}, [] );\n\n\tif ( showCombobox ) {\n\t\treturn <PostAuthorCombobox />;\n\t}\n\treturn <PostAuthorSelect />;\n}\n\nexport default PostAuthor;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\nimport { AUTHORS_QUERY } from './constants';\n\n/**\n * Wrapper component that renders its children only if the post type supports the author.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The component to be rendered. Return `null` if the post type doesn't\n * supports the author or if there are no authors available.\n */\nexport default function PostAuthorCheck( { children } ) {\n\tconst { hasAssignAuthorAction, hasAuthors } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst authors = select( coreStore ).getUsers( AUTHORS_QUERY );\n\t\treturn {\n\t\t\thasAssignAuthorAction:\n\t\t\t\tpost._links?.[ 'wp:action-assign-author' ] ?? false,\n\t\t\thasAuthors: authors?.length >= 1,\n\t\t};\n\t}, [] );\n\n\tif ( ! hasAssignAuthorAction || ! hasAuthors ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"author\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, Dropdown } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PostAuthorCheck from './check';\nimport PostAuthorForm from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { useAuthorsQuery } from './hook';\n\nfunction PostAuthorToggle( { isOpen, onClick } ) {\n\tconst { postAuthor } = useAuthorsQuery();\n\tconst authorName =\n\t\tdecodeEntities( postAuthor?.name ) || __( '(No author)' );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-author__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Author name.\n\t\t\t\tsprintf( __( 'Change author: %s' ), authorName )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ authorName }\n\t\t</Button>\n\t);\n}\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function PostAuthor() {\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostAuthorCheck>\n\t\t\t<PostPanelRow label={ __( 'Author' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-author__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostAuthorToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\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<div className=\"editor-post-author\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Author' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostAuthorForm onClose={ onClose } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostAuthorCheck>\n\t);\n}\n\nexport default PostAuthor;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tRadioControl,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nconst COMMENT_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' ),\n\t\tvalue: 'open',\n\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t},\n\t{\n\t\tlabel: __( 'Closed' ),\n\t\tvalue: 'closed',\n\t\tdescription: [\n\t\t\t__( 'Visitors cannot add new comments or replies.' ),\n\t\t\t__( 'Existing comments remain visible.' ),\n\t\t].join( ' ' ),\n\t},\n];\n\nfunction PostComments() {\n\tconst commentStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'comment_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst handleStatus = ( newCommentStatus ) =>\n\t\teditPost( {\n\t\t\tcomment_status: newCommentStatus,\n\t\t} );\n\n\treturn (\n\t\t<form>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<RadioControl\n\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tlabel={ __( 'Comment status' ) }\n\t\t\t\t\toptions={ COMMENT_OPTIONS }\n\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\tselected={ commentStatus }\n\t\t\t\t/>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\n/**\n * A form for managing comment status.\n *\n * @return {React.ReactNode} The rendered PostComments component.\n */\nexport default PostComments;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl, ExternalLink } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nfunction PostPingbacks() {\n\tconst pingStatus = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'ping_status' ) ??\n\t\t\t'open',\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onTogglePingback = () =>\n\t\teditPost( {\n\t\t\tping_status: pingStatus === 'open' ? 'closed' : 'open',\n\t\t} );\n\n\treturn (\n\t\t<CheckboxControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ __( 'Enable pingbacks & trackbacks' ) }\n\t\t\tchecked={ pingStatus === 'open' }\n\t\t\tonChange={ onTogglePingback }\n\t\t\thelp={\n\t\t\t\t<ExternalLink\n\t\t\t\t\thref={ __(\n\t\t\t\t\t\t'https://wordpress.org/documentation/article/trackbacks-and-pingbacks/'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Learn more about pingbacks & trackbacks' ) }\n\t\t\t\t</ExternalLink>\n\t\t\t}\n\t\t/>\n\t);\n}\n\n/**\n * Renders a control for enabling or disabling pingbacks and trackbacks\n * in a WordPress post.\n *\n * @module PostPingbacks\n */\nexport default PostPingbacks;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tDropdown,\n\tButton,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport PostComments from '../post-comments';\nimport PostPingbacks from '../post-pingbacks';\nimport PostPanelRow from '../post-panel-row';\n\nconst PANEL_NAME = 'discussion-panel';\n\nfunction ModalContents( { onClose } ) {\n\treturn (\n\t\t<div className=\"editor-post-discussion\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"comments\">\n\t\t\t\t\t<PostComments />\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t<PostTypeSupportCheck supportKeys=\"trackbacks\">\n\t\t\t\t\t<PostPingbacks />\n\t\t\t\t</PostTypeSupportCheck>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nfunction PostDiscussionToggle( { isOpen, onClick } ) {\n\tconst {\n\t\tcommentStatus,\n\t\tpingStatus,\n\t\tcommentsSupported,\n\t\ttrackbacksSupported,\n\t} = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\t\treturn {\n\t\t\tcommentStatus: getEditedPostAttribute( 'comment_status' ) ?? 'open',\n\t\t\tpingStatus: getEditedPostAttribute( 'ping_status' ) ?? 'open',\n\t\t\tcommentsSupported: !! postType.supports.comments,\n\t\t\ttrackbacksSupported: !! postType.supports.trackbacks,\n\t\t};\n\t}, [] );\n\tlet label;\n\tif ( commentStatus === 'open' ) {\n\t\tif ( pingStatus === 'open' ) {\n\t\t\tlabel = _x( 'Open', 'Adjective: e.g. \"Comments are open\"' );\n\t\t} else {\n\t\t\tlabel = trackbacksSupported\n\t\t\t\t? __( 'Comments only' )\n\t\t\t\t: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' );\n\t\t}\n\t} else if ( pingStatus === 'open' ) {\n\t\tlabel = commentsSupported ? __( 'Pings only' ) : __( 'Pings enabled' );\n\t} else {\n\t\tlabel = __( 'Closed' );\n\t}\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-discussion__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-label={ __( 'Change discussion options' ) }\n\t\t\taria-expanded={ isOpen }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n\n/**\n * This component allows to update comment and pingback\n * settings for the current post. Internally there are\n * checks whether the current post has support for the\n * above and if the `discussion-panel` panel is enabled.\n *\n * @return {React.ReactNode} The rendered PostDiscussionPanel component.\n */\nexport default function PostDiscussionPanel() {\n\tconst { isEnabled } = useSelect( ( select ) => {\n\t\tconst { isEditorPanelEnabled } = select( editorStore );\n\t\treturn {\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys={ [ 'comments', 'trackbacks' ] }>\n\t\t\t<PostPanelRow label={ __( 'Discussion' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tclassName=\"editor-post-discussion__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-discussion__panel-dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<PostDiscussionToggle\n\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\tonClick={ onToggle }\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<ModalContents onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostTypeSupportCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink, TextareaControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders an editable textarea for the post excerpt.\n * Templates, template parts and patterns use the `excerpt` field as a description semantically.\n * Additionally templates and template parts override the `excerpt` field as `description` in\n * REST API. So this component handles proper labeling and updating the edited entity.\n *\n * @param {Object} props - Component props.\n * @param {boolean} [props.hideLabelFromVision=false] - Whether to visually hide the textarea's label.\n * @param {boolean} [props.updateOnBlur=false] - Whether to update the post on change or use local state and update on blur.\n */\nexport default function PostExcerpt( {\n\thideLabelFromVision = false,\n\tupdateOnBlur = false,\n} ) {\n\tconst { excerpt, shouldUseDescriptionLabel, usedAttribute } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPostType, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\t// This special case is unfortunate, but the REST API of wp_template and wp_template_part\n\t\t\t// support the excerpt field through the \"description\" field rather than \"excerpt\".\n\t\t\tconst _usedAttribute = [\n\t\t\t\t'wp_template',\n\t\t\t\t'wp_template_part',\n\t\t\t].includes( postType )\n\t\t\t\t? 'description'\n\t\t\t\t: 'excerpt';\n\t\t\treturn {\n\t\t\t\texcerpt: getEditedPostAttribute( _usedAttribute ),\n\t\t\t\t// There are special cases where we want to label the excerpt as a description.\n\t\t\t\tshouldUseDescriptionLabel: [\n\t\t\t\t\t'wp_template',\n\t\t\t\t\t'wp_template_part',\n\t\t\t\t\t'wp_block',\n\t\t\t\t].includes( postType ),\n\t\t\t\tusedAttribute: _usedAttribute,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst [ localExcerpt, setLocalExcerpt ] = useState(\n\t\tdecodeEntities( excerpt )\n\t);\n\tconst updatePost = ( value ) => {\n\t\teditPost( { [ usedAttribute ]: value } );\n\t};\n\tconst label = shouldUseDescriptionLabel\n\t\t? __( 'Write a description (optional)' )\n\t\t: __( 'Write an excerpt (optional)' );\n\n\treturn (\n\t\t<div className=\"editor-post-excerpt\">\n\t\t\t<TextareaControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tlabel={ label }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tclassName=\"editor-post-excerpt__textarea\"\n\t\t\t\tonChange={ updateOnBlur ? setLocalExcerpt : updatePost }\n\t\t\t\tonBlur={\n\t\t\t\t\tupdateOnBlur ? () => updatePost( localExcerpt ) : undefined\n\t\t\t\t}\n\t\t\t\tvalue={ updateOnBlur ? localExcerpt : excerpt }\n\t\t\t\thelp={\n\t\t\t\t\t! shouldUseDescriptionLabel ? (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#excerpt'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about manual excerpts' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t__( 'Write a description' )\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\n\n/**\n * Component for checking if the post type supports the excerpt field.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostExcerptCheck( { children } ) {\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"excerpt\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostExcerptCheck;\n","/**\n * Defines as extensibility slot for the Excerpt panel.\n */\n\n/**\n * WordPress dependencies\n */\nimport { createSlotFill, PanelRow } from '@wordpress/components';\n\nconst { Fill, Slot } = createSlotFill( 'PluginPostExcerpt' );\n\n/**\n * Renders a post excerpt panel in the post sidebar.\n *\n * @param {Object} props Component properties.\n * @param {string} [props.className] An optional class name added to the row.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @example\n * ```js\n * // Using ES5 syntax\n * var __ = wp.i18n.__;\n * var PluginPostExcerpt = wp.editPost.__experimentalPluginPostExcerpt;\n *\n * function MyPluginPostExcerpt() {\n * \treturn React.createElement(\n * \t\tPluginPostExcerpt,\n * \t\t{\n * \t\t\tclassName: 'my-plugin-post-excerpt',\n * \t\t},\n * \t\t__( 'Post excerpt custom content' )\n * \t)\n * }\n * ```\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { __ } from '@wordpress/i18n';\n * import { __experimentalPluginPostExcerpt as PluginPostExcerpt } from '@wordpress/edit-post';\n *\n * const MyPluginPostExcerpt = () => (\n * \t<PluginPostExcerpt className=\"my-plugin-post-excerpt\">\n * \t\t{ __( 'Post excerpt custom content' ) }\n * \t</PluginPostExcerpt>\n * );\n * ```\n *\n * @return {React.ReactNode} The rendered component.\n */\nconst PluginPostExcerpt = ( { children, className } ) => {\n\treturn (\n\t\t<Fill>\n\t\t\t<PanelRow className={ className }>{ children }</PanelRow>\n\t\t</Fill>\n\t);\n};\n\nPluginPostExcerpt.Slot = Slot;\n\nexport default PluginPostExcerpt;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPanelBody,\n\t__experimentalText as Text,\n\tDropdown,\n\tButton,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo, useState } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport PostExcerptForm from './index';\nimport PostExcerptCheck from './check';\nimport PluginPostExcerpt from './plugin';\nimport { TEMPLATE_ORIGINS } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-excerpt';\n\nfunction ExcerptPanel() {\n\tconst { isOpened, isEnabled, postType } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisEditorPanelOpened,\n\t\t\tisEditorPanelEnabled,\n\t\t\tgetCurrentPostType,\n\t\t} = select( editorStore );\n\n\t\treturn {\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\tconst toggleExcerptPanel = () => toggleEditorPanelOpened( PANEL_NAME );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\t// There are special cases where we want to label the excerpt as a description.\n\tconst shouldUseDescriptionLabel = [\n\t\t'wp_template',\n\t\t'wp_template_part',\n\t\t'wp_block',\n\t].includes( postType );\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={\n\t\t\t\tshouldUseDescriptionLabel\n\t\t\t\t\t? __( 'Description' )\n\t\t\t\t\t: __( 'Excerpt' )\n\t\t\t}\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ toggleExcerptPanel }\n\t\t>\n\t\t\t<PluginPostExcerpt.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<PostExcerptForm />\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostExcerpt.Slot>\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * Is rendered if the post type supports excerpts and allows editing the excerpt.\n *\n * @return {React.ReactNode} The rendered PostExcerptPanel component.\n */\nexport default function PostExcerptPanel() {\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<ExcerptPanel />\n\t\t</PostExcerptCheck>\n\t);\n}\n\nexport function PrivatePostExcerptPanel() {\n\treturn (\n\t\t<PostExcerptCheck>\n\t\t\t<PrivateExcerpt />\n\t\t</PostExcerptCheck>\n\t);\n}\n\nfunction PrivateExcerpt() {\n\tconst { shouldRender, excerpt, shouldBeUsedAsDescription, allowEditing } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tisEditorPanelEnabled,\n\t\t\t} = select( editorStore );\n\t\t\tconst postType = getCurrentPostType();\n\t\t\tconst isTemplateOrTemplatePart = [\n\t\t\t\t'wp_template',\n\t\t\t\t'wp_template_part',\n\t\t\t].includes( postType );\n\t\t\tconst isPattern = postType === 'wp_block';\n\t\t\t// These post types use the `excerpt` field as a description semantically, so we need to\n\t\t\t// handle proper labeling and some flows where we should always render them as text.\n\t\t\tconst _shouldBeUsedAsDescription =\n\t\t\t\tisTemplateOrTemplatePart || isPattern;\n\t\t\tconst _usedAttribute = isTemplateOrTemplatePart\n\t\t\t\t? 'description'\n\t\t\t\t: 'excerpt';\n\t\t\t// We need to fetch the entity in this case to check if we'll allow editing.\n\t\t\tconst template =\n\t\t\t\tisTemplateOrTemplatePart &&\n\t\t\t\tselect( coreStore ).getEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tgetCurrentPostId()\n\t\t\t\t);\n\t\t\t// For post types that use excerpt as description, we do not abide\n\t\t\t// by the `isEnabled` panel flag in order to render them as text.\n\t\t\tconst _shouldRender =\n\t\t\t\tisEditorPanelEnabled( PANEL_NAME ) ||\n\t\t\t\t_shouldBeUsedAsDescription;\n\t\t\treturn {\n\t\t\t\texcerpt: getEditedPostAttribute( _usedAttribute ),\n\t\t\t\tshouldRender: _shouldRender,\n\t\t\t\tshouldBeUsedAsDescription: _shouldBeUsedAsDescription,\n\t\t\t\t// If we should render, allow editing for all post types that are not used as description.\n\t\t\t\t// For the rest allow editing only for user generated entities.\n\t\t\t\tallowEditing:\n\t\t\t\t\t_shouldRender &&\n\t\t\t\t\t( ! _shouldBeUsedAsDescription ||\n\t\t\t\t\t\tisPattern ||\n\t\t\t\t\t\t( template &&\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom &&\n\t\t\t\t\t\t\t! template.has_theme_file &&\n\t\t\t\t\t\t\ttemplate.is_custom ) ),\n\t\t\t};\n\t\t}, [] );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst label = shouldBeUsedAsDescription\n\t\t? __( 'Description' )\n\t\t: __( 'Excerpt' );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': label,\n\t\t\theaderTitle: label,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor, label ]\n\t);\n\tif ( ! shouldRender ) {\n\t\treturn false;\n\t}\n\tconst excerptText = !! excerpt && (\n\t\t<Text align=\"left\" numberOfLines={ 4 } truncate={ allowEditing }>\n\t\t\t{ decodeEntities( excerpt ) }\n\t\t</Text>\n\t);\n\tif ( ! allowEditing ) {\n\t\treturn excerptText;\n\t}\n\tconst excerptPlaceholder = shouldBeUsedAsDescription\n\t\t? __( 'Add a description…' )\n\t\t: __( 'Add an excerpt…' );\n\tconst triggerEditLabel = shouldBeUsedAsDescription\n\t\t? __( 'Edit description' )\n\t\t: __( 'Edit excerpt' );\n\treturn (\n\t\t<VStack>\n\t\t\t{ excerptText }\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"editor-post-excerpt__dropdown\"\n\t\t\t\tcontentClassName=\"editor-post-excerpt__dropdown__content\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tfocusOnMount\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t\trenderToggle={ ( { onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ excerptText ? triggerEditLabel : excerptPlaceholder }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ label }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PluginPostExcerpt.Slot>\n\t\t\t\t\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<PostExcerptForm\n\t\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\t\tupdateOnBlur\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ fills }\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</PluginPostExcerpt.Slot>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Checks if the current theme supports specific features and renders the children if supported.\n *\n * @param {Object} props The component props.\n * @param {React.ReactElement} props.children The children to render if the theme supports the specified features.\n * @param {string|string[]} props.supportKeys The key(s) of the theme support(s) to check.\n *\n * @return {React.ReactElement} The rendered children if the theme supports the specified features, otherwise null.\n */\nexport default function ThemeSupportCheck( { children, supportKeys } ) {\n\tconst { postType, themeSupports } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( editorStore ).getEditedPostAttribute( 'type' ),\n\t\t\tthemeSupports: select( coreStore ).getThemeSupports(),\n\t\t};\n\t}, [] );\n\n\tconst isSupported = (\n\t\tArray.isArray( supportKeys ) ? supportKeys : [ supportKeys ]\n\t).some( ( key ) => {\n\t\tconst supported = themeSupports?.[ key ] ?? false;\n\t\t// 'post-thumbnails' can be boolean or an array of post types.\n\t\t// In the latter case, we need to verify `postType` exists\n\t\t// within `supported`. If `postType` isn't passed, then the check\n\t\t// should fail.\n\t\tif ( 'post-thumbnails' === key && Array.isArray( supported ) ) {\n\t\t\treturn supported.includes( postType );\n\t\t}\n\t\treturn supported;\n\t} );\n\n\tif ( ! isSupported ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport ThemeSupportCheck from '../theme-support-check';\n\n/**\n * Wrapper component that renders its children only if the post type supports a featured image\n * and the theme supports post thumbnails.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFeaturedImageCheck( { children } ) {\n\treturn (\n\t\t<ThemeSupportCheck supportKeys=\"post-thumbnails\">\n\t\t\t<PostTypeSupportCheck supportKeys=\"thumbnail\">\n\t\t\t\t{ children }\n\t\t\t</PostTypeSupportCheck>\n\t\t</ThemeSupportCheck>\n\t);\n}\n\nexport default PostFeaturedImageCheck;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { applyFilters } from '@wordpress/hooks';\nimport {\n\tDropZone,\n\tButton,\n\tSpinner,\n\twithNotices,\n\twithFilters,\n\t__experimentalHStack as HStack,\n\tNotice,\n} from '@wordpress/components';\nimport { isBlobURL } from '@wordpress/blob';\nimport { useState, useRef } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { useSelect, withDispatch, withSelect } from '@wordpress/data';\nimport {\n\tMediaUpload,\n\tMediaUploadCheck,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFeaturedImageCheck from './check';\nimport { store as editorStore } from '../../store';\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 = __( 'Add a featured image' );\n\nconst instructions = (\n\t<p>\n\t\t{ __(\n\t\t\t'To edit the featured image, you need permission to upload media.'\n\t\t) }\n\t</p>\n);\n\nfunction getMediaDetails( media, postId ) {\n\tif ( ! media ) {\n\t\treturn {};\n\t}\n\n\tconst defaultSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'large',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( defaultSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ defaultSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ defaultSize ].height,\n\t\t\tmediaSourceUrl: media.media_details.sizes[ defaultSize ].source_url,\n\t\t};\n\t}\n\n\t// Use fallbackSize when defaultSize is not available.\n\tconst fallbackSize = applyFilters(\n\t\t'editor.PostFeaturedImage.imageSize',\n\t\t'thumbnail',\n\t\tmedia.id,\n\t\tpostId\n\t);\n\tif ( fallbackSize in ( media?.media_details?.sizes ?? {} ) ) {\n\t\treturn {\n\t\t\tmediaWidth: media.media_details.sizes[ fallbackSize ].width,\n\t\t\tmediaHeight: media.media_details.sizes[ fallbackSize ].height,\n\t\t\tmediaSourceUrl:\n\t\t\t\tmedia.media_details.sizes[ fallbackSize ].source_url,\n\t\t};\n\t}\n\n\t// Use full image size when fallbackSize and defaultSize are not available.\n\treturn {\n\t\tmediaWidth: media.media_details.width,\n\t\tmediaHeight: media.media_details.height,\n\t\tmediaSourceUrl: media.source_url,\n\t};\n}\n\nfunction PostFeaturedImage( {\n\tcurrentPostId,\n\tfeaturedImageId,\n\tonUpdateImage,\n\tonRemoveImage,\n\tmedia,\n\tpostType,\n\tnoticeUI,\n\tnoticeOperations,\n\tisRequestingFeaturedImageMedia,\n} ) {\n\tconst returnsFocusRef = useRef( false );\n\tconst [ isLoading, setIsLoading ] = useState( false );\n\tconst { getSettings } = useSelect( blockEditorStore );\n\tconst { mediaSourceUrl } = getMediaDetails( media, currentPostId );\n\n\tfunction onDropFiles( filesList ) {\n\t\tgetSettings().mediaUpload( {\n\t\t\tallowedTypes: ALLOWED_MEDIA_TYPES,\n\t\t\tfilesList,\n\t\t\tonFileChange( [ image ] ) {\n\t\t\t\tif ( isBlobURL( image?.url ) ) {\n\t\t\t\t\tsetIsLoading( true );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( image ) {\n\t\t\t\t\tonUpdateImage( image );\n\t\t\t\t}\n\t\t\t\tsetIsLoading( false );\n\t\t\t},\n\t\t\tonError( message ) {\n\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t},\n\t\t} );\n\t}\n\n\t/**\n\t * Generates the featured image alt text for this editing context.\n\t *\n\t * @param {Object} imageMedia The image media object.\n\t * @param {string} imageMedia.alt_text The alternative text of the image.\n\t * @param {Object} imageMedia.media_details The media details of the image.\n\t * @param {Object} imageMedia.media_details.sizes The sizes of the image.\n\t * @param {Object} imageMedia.media_details.sizes.full The full size details of the image.\n\t * @param {string} imageMedia.media_details.sizes.full.file The file name of the full size image.\n\t * @param {string} imageMedia.slug The slug of the image.\n\t * @return {string} The featured image alt text.\n\t */\n\tfunction getImageDescription( imageMedia ) {\n\t\tif ( imageMedia.alt_text ) {\n\t\t\treturn sprintf(\n\t\t\t\t// Translators: %s: The selected image alt text.\n\t\t\t\t__( 'Current image: %s' ),\n\t\t\t\timageMedia.alt_text\n\t\t\t);\n\t\t}\n\t\treturn sprintf(\n\t\t\t// Translators: %s: The selected image filename.\n\t\t\t__(\n\t\t\t\t'The current image has no alternative text. The file name is: %s'\n\t\t\t),\n\t\t\timageMedia.media_details.sizes?.full?.file || imageMedia.slug\n\t\t);\n\t}\n\n\tfunction returnFocus( node ) {\n\t\tif ( returnsFocusRef.current && node ) {\n\t\t\tnode.focus();\n\t\t\treturnsFocusRef.current = false;\n\t\t}\n\t}\n\n\tconst isMissingMedia =\n\t\t! isRequestingFeaturedImageMedia && !! featuredImageId && ! media;\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t{ noticeUI }\n\t\t\t<div className=\"editor-post-featured-image\">\n\t\t\t\t{ media && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={ `editor-post-featured-image-${ featuredImageId }-describedby` }\n\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ getImageDescription( media ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t<MediaUploadCheck fallback={ instructions }>\n\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tpostType?.labels?.featured_image ||\n\t\t\t\t\t\t\tDEFAULT_FEATURE_IMAGE_LABEL\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonSelect={ onUpdateImage }\n\t\t\t\t\t\tunstableFeaturedImageFlow\n\t\t\t\t\t\tallowedTypes={ ALLOWED_MEDIA_TYPES }\n\t\t\t\t\t\tmodalClass=\"editor-post-featured-image__media-modal\"\n\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t<div className=\"editor-post-featured-image__container\">\n\t\t\t\t\t\t\t\t{ isMissingMedia ? (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus=\"warning\"\n\t\t\t\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'Could not retrieve the featured image data.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\tref={ returnFocus }\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? 'editor-post-featured-image__toggle'\n\t\t\t\t\t\t\t\t\t\t\t\t: 'editor-post-featured-image__preview'\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Edit or replace the featured image'\n\t\t\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t\t\t\t! featuredImageId\n\t\t\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t\t\t: `editor-post-featured-image-${ featuredImageId }-describedby`\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ !! featuredImageId && media && (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__preview-image\"\n\t\t\t\t\t\t\t\t\t\t\t\tsrc={ mediaSourceUrl }\n\t\t\t\t\t\t\t\t\t\t\t\talt={ getImageDescription(\n\t\t\t\t\t\t\t\t\t\t\t\t\tmedia\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ( isLoading ||\n\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia ) && (\n\t\t\t\t\t\t\t\t\t\t\t<Spinner />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t{ ! featuredImageId &&\n\t\t\t\t\t\t\t\t\t\t\t! isLoading &&\n\t\t\t\t\t\t\t\t\t\t\t( postType?.labels\n\t\t\t\t\t\t\t\t\t\t\t\t?.set_featured_image ||\n\t\t\t\t\t\t\t\t\t\t\t\tDEFAULT_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\t{ !! featuredImageId && (\n\t\t\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions',\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-missing-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia,\n\t\t\t\t\t\t\t\t\t\t\t\t'editor-post-featured-image__actions-is-requesting-image':\n\t\t\t\t\t\t\t\t\t\t\t\t\tisRequestingFeaturedImageMedia,\n\t\t\t\t\t\t\t\t\t\t\t}\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\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Replace' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-post-featured-image__action\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\tonRemoveImage();\n\t\t\t\t\t\t\t\t\t\t\t\t// Signal that the toggle button should be focused,\n\t\t\t\t\t\t\t\t\t\t\t\t// when it is rendered. Can't focus it directly here\n\t\t\t\t\t\t\t\t\t\t\t\t// because it's rendered conditionally.\n\t\t\t\t\t\t\t\t\t\t\t\treturnsFocusRef.current = true;\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\t\tisMissingMedia\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'secondary'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tisDestructive={ isMissingMedia }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Remove' ) }\n\t\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t<DropZone onFilesDrop={ onDropFiles } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ featuredImageId }\n\t\t\t\t\t/>\n\t\t\t\t</MediaUploadCheck>\n\t\t\t</div>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select ) => {\n\tconst { getMedia, getPostType, hasFinishedResolution } =\n\t\tselect( coreStore );\n\tconst { getCurrentPostId, getEditedPostAttribute } = select( editorStore );\n\tconst featuredImageId = getEditedPostAttribute( 'featured_media' );\n\n\treturn {\n\t\tmedia: featuredImageId\n\t\t\t? getMedia( featuredImageId, { context: 'view' } )\n\t\t\t: null,\n\t\tcurrentPostId: getCurrentPostId(),\n\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\tfeaturedImageId,\n\t\tisRequestingFeaturedImageMedia:\n\t\t\t!! featuredImageId &&\n\t\t\t! hasFinishedResolution( 'getMedia', [\n\t\t\t\tfeaturedImageId,\n\t\t\t\t{ context: 'view' },\n\t\t\t] ),\n\t};\n} );\n\nconst applyWithDispatch = withDispatch(\n\t( dispatch, { noticeOperations }, { select } ) => {\n\t\tconst { editPost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tonUpdateImage( image ) {\n\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t},\n\t\t\tonDropImage( filesList ) {\n\t\t\t\tselect( blockEditorStore )\n\t\t\t\t\t.getSettings()\n\t\t\t\t\t.mediaUpload( {\n\t\t\t\t\t\tallowedTypes: [ 'image' ],\n\t\t\t\t\t\tfilesList,\n\t\t\t\t\t\tonFileChange( [ image ] ) {\n\t\t\t\t\t\t\teditPost( { featured_media: image.id } );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tonError( message ) {\n\t\t\t\t\t\t\tnoticeOperations.removeAllNotices();\n\t\t\t\t\t\t\tnoticeOperations.createErrorNotice( message );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t},\n\t\t\tonRemoveImage() {\n\t\t\t\teditPost( { featured_media: 0 } );\n\t\t\t},\n\t\t};\n\t}\n);\n\n/**\n * Renders the component for managing the featured image of a post.\n *\n * @param {Object} props Props.\n * @param {number} props.currentPostId ID of the current post.\n * @param {number} props.featuredImageId ID of the featured image.\n * @param {Function} props.onUpdateImage Function to call when the image is updated.\n * @param {Function} props.onRemoveImage Function to call when the image is removed.\n * @param {Object} props.media The media object representing the featured image.\n * @param {string} props.postType Post type.\n * @param {Element} props.noticeUI UI for displaying notices.\n * @param {Object} props.noticeOperations Operations for managing notices.\n *\n * @return {Element} Component to be rendered .\n */\nexport default compose(\n\twithNotices,\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\twithFilters( 'editor.PostFeaturedImage' )\n)( PostFeaturedImage );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostFeaturedImage from './index';\nimport PostFeaturedImageCheck from './check';\n\nconst PANEL_NAME = 'featured-image';\n\n/**\n * Renders the panel for the post featured image.\n *\n * @param {Object} props Props.\n * @param {boolean} props.withPanelBody Whether to include the panel body. Default true.\n *\n * @return {React.ReactNode} The component to be rendered.\n * Return Null if the editor panel is disabled for featured image.\n */\nexport default function PostFeaturedImagePanel( { withPanelBody = true } ) {\n\tconst { postType, isEnabled, isOpened } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tisEditorPanelEnabled,\n\t\t\tisEditorPanelOpened,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisEnabled: isEditorPanelEnabled( PANEL_NAME ),\n\t\t\tisOpened: isEditorPanelOpened( PANEL_NAME ),\n\t\t};\n\t}, [] );\n\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tif ( ! withPanelBody ) {\n\t\treturn (\n\t\t\t<PostFeaturedImageCheck>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PostFeaturedImageCheck>\n\t\t);\n\t}\n\n\treturn (\n\t\t<PostFeaturedImageCheck>\n\t\t\t<PanelBody\n\t\t\t\ttitle={\n\t\t\t\t\tpostType?.labels?.featured_image ?? __( 'Featured image' )\n\t\t\t\t}\n\t\t\t\topened={ isOpened }\n\t\t\t\tonToggle={ () => toggleEditorPanelOpened( PANEL_NAME ) }\n\t\t\t>\n\t\t\t\t<PostFeaturedImage />\n\t\t\t</PanelBody>\n\t\t</PostFeaturedImageCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component check if there are any post formats.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The child elements to render.\n *\n * @return {React.ReactNode} The rendered component or null if post formats are disabled.\n */\nexport default function PostFormatCheck( { children } ) {\n\tconst disablePostFormats = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().disablePostFormats,\n\t\t[]\n\t);\n\n\tif ( disablePostFormats ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"post-formats\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button, RadioControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostFormatCheck from './check';\nimport { store as editorStore } from '../../store';\n\n// All WP post formats, sorted alphabetically by translated name.\nexport const POST_FORMATS = [\n\t{ id: 'aside', caption: __( 'Aside' ) },\n\t{ id: 'audio', caption: __( 'Audio' ) },\n\t{ id: 'chat', caption: __( 'Chat' ) },\n\t{ id: 'gallery', caption: __( 'Gallery' ) },\n\t{ id: 'image', caption: __( 'Image' ) },\n\t{ id: 'link', caption: __( 'Link' ) },\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].sort( ( a, b ) => {\n\tconst normalizedA = a.caption.toUpperCase();\n\tconst normalizedB = b.caption.toUpperCase();\n\n\tif ( normalizedA < normalizedB ) {\n\t\treturn -1;\n\t}\n\tif ( normalizedA > normalizedB ) {\n\t\treturn 1;\n\t}\n\treturn 0;\n} );\n\n/**\n * `PostFormat` a component that allows changing the post format while also providing a suggestion for the current post.\n *\n * @example\n * ```jsx\n * <PostFormat />\n * ```\n *\n * @return {React.ReactNode} The rendered PostFormat component.\n */\nexport default function PostFormat() {\n\tconst instanceId = useInstanceId( PostFormat );\n\tconst postFormatSelectorId = `post-format-selector-${ instanceId }`;\n\n\tconst { postFormat, suggestedFormat, supportedFormats } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\t\tconst themeSupports = select( coreStore ).getThemeSupports();\n\t\t\treturn {\n\t\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t\t\tsuggestedFormat: getSuggestedPostFormat(),\n\t\t\t\tsupportedFormats: themeSupports.formats,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst formats = POST_FORMATS.filter( ( format ) => {\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\treturn (\n\t\t\tsupportedFormats?.includes( format.id ) || postFormat === format.id\n\t\t);\n\t} );\n\tconst suggestion = formats.find(\n\t\t( format ) => format.id === suggestedFormat\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<div className=\"editor-post-format\">\n\t\t\t\t<RadioControl\n\t\t\t\t\tclassName=\"editor-post-format__options\"\n\t\t\t\t\tlabel={ __( 'Post Format' ) }\n\t\t\t\t\tselected={ postFormat }\n\t\t\t\t\tonChange={ ( format ) => onUpdatePostFormat( format ) }\n\t\t\t\t\tid={ postFormatSelectorId }\n\t\t\t\t\toptions={ formats.map( ( format ) => ( {\n\t\t\t\t\t\tlabel: format.caption,\n\t\t\t\t\t\tvalue: format.id,\n\t\t\t\t\t} ) ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t/>\n\t\t\t\t{ suggestion && suggestion.id !== postFormat && (\n\t\t\t\t\t<p className=\"editor-post-format__suggestion\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\tonUpdatePostFormat( suggestion.id )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: post format */\n\t\t\t\t\t\t\t\t__( 'Apply suggested format: %s' ),\n\t\t\t\t\t\t\t\tsuggestion.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</PostFormatCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children if the post has more than one revision.\n *\n * @param {Object} props Props.\n * @param {React.ReactNode} props.children Children to be rendered.\n *\n * @return {React.ReactNode} Rendered child components if post has more than one revision, otherwise null.\n */\nfunction PostLastRevisionCheck( { children } ) {\n\tconst { lastRevisionId, revisionsCount } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n\n\tif ( ! lastRevisionId || revisionsCount < 2 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostTypeSupportCheck supportKeys=\"revisions\">\n\t\t\t{ children }\n\t\t</PostTypeSupportCheck>\n\t);\n}\n\nexport default PostLastRevisionCheck;\n","/**\n * WordPress dependencies\n */\nimport { sprintf, __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { backup } from '@wordpress/icons';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevisionCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nfunction usePostLastRevisionInfo() {\n\treturn useSelect( ( select ) => {\n\t\tconst { getCurrentPostLastRevisionId, getCurrentPostRevisionsCount } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tlastRevisionId: getCurrentPostLastRevisionId(),\n\t\t\trevisionsCount: getCurrentPostRevisionsCount(),\n\t\t};\n\t}, [] );\n}\n\n/**\n * Renders the component for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t} ) }\n\t\t\t\tclassName=\"editor-post-last-revision__title\"\n\t\t\t\ticon={ backup }\n\t\t\t\ticonPosition=\"right\"\n\t\t\t\ttext={ sprintf(\n\t\t\t\t\t/* translators: %s: number of revisions. */\n\t\t\t\t\t__( 'Revisions (%s)' ),\n\t\t\t\t\trevisionsCount\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport function PrivatePostLastRevision() {\n\tconst { lastRevisionId, revisionsCount } = usePostLastRevisionInfo();\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PostPanelRow label={ __( 'Revisions' ) }>\n\t\t\t\t<Button\n\t\t\t\t\thref={ addQueryArgs( 'revision.php', {\n\t\t\t\t\t\trevision: lastRevisionId,\n\t\t\t\t\t} ) }\n\t\t\t\t\tclassName=\"editor-private-post-last-revision__button\"\n\t\t\t\t\ttext={ revisionsCount }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevision;\n","/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PostLastRevision from './';\nimport PostLastRevisionCheck from './check';\n\n/**\n * Renders the panel for displaying the last revision of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostLastRevisionPanel() {\n\treturn (\n\t\t<PostLastRevisionCheck>\n\t\t\t<PanelBody className=\"editor-post-last-revision__panel\">\n\t\t\t\t<PostLastRevision />\n\t\t\t</PanelBody>\n\t\t</PostLastRevisionCheck>\n\t);\n}\n\nexport default PostLastRevisionPanel;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tModal,\n\tButton,\n\tExternalLink,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { addQueryArgs } from '@wordpress/url';\nimport { useEffect, createInterpolateElement } from '@wordpress/element';\nimport { addAction, removeAction } from '@wordpress/hooks';\nimport { useInstanceId } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * A modal component that is displayed when a post is locked for editing by another user.\n * The modal provides information about the lock status and options to take over or exit the editor.\n *\n * @return {React.ReactNode} The rendered PostLockedModal component.\n */\nexport default function PostLockedModal() {\n\tconst instanceId = useInstanceId( PostLockedModal );\n\tconst hookName = 'core/editor/post-locked-modal-' + instanceId;\n\tconst { autosave, updatePostLock } = useDispatch( editorStore );\n\tconst {\n\t\tisLocked,\n\t\tisTakeover,\n\t\tuser,\n\t\tpostId,\n\t\tpostLockUtils,\n\t\tactivePostLock,\n\t\tpostType,\n\t\tpreviewLink,\n\t} = useSelect( ( select ) => {\n\t\tconst {\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\tgetEditedPostPreviewLink,\n\t\t\tgetEditorSettings,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\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\tpreviewLink: getEditedPostPreviewLink(),\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Keep the lock refreshed.\n\t\t *\n\t\t * When the user does not send a heartbeat in a heartbeat-tick\n\t\t * the user is no longer editing and another user can start editing.\n\t\t *\n\t\t * @param {Object} data Data to send in the heartbeat request.\n\t\t */\n\t\tfunction sendPostLock( data ) {\n\t\t\tif ( isLocked ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tdata[ 'wp-refresh-post-lock' ] = {\n\t\t\t\tlock: activePostLock,\n\t\t\t\tpost_id: postId,\n\t\t\t};\n\t\t}\n\n\t\t/**\n\t\t * Refresh post locks: update the lock string or show the dialog if somebody has taken over editing.\n\t\t *\n\t\t * @param {Object} data Data received in the heartbeat request\n\t\t */\n\t\tfunction receivePostLock( data ) {\n\t\t\tif ( ! data[ 'wp-refresh-post-lock' ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst received = data[ 'wp-refresh-post-lock' ];\n\t\t\tif ( received.lock_error ) {\n\t\t\t\t// Auto save and display the takeover modal.\n\t\t\t\tautosave();\n\t\t\t\tupdatePostLock( {\n\t\t\t\t\tisLocked: true,\n\t\t\t\t\tisTakeover: true,\n\t\t\t\t\tuser: {\n\t\t\t\t\t\tname: received.lock_error.name,\n\t\t\t\t\t\tavatar: received.lock_error.avatar_src_2x,\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t} else if ( received.new_lock ) {\n\t\t\t\tupdatePostLock( {\n\t\t\t\t\tisLocked: false,\n\t\t\t\t\tactivePostLock: received.new_lock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Unlock the post before the window is exited.\n\t\t */\n\t\tfunction releasePostLock() {\n\t\t\tif ( isLocked || ! activePostLock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst data = new window.FormData();\n\t\t\tdata.append( 'action', 'wp-remove-post-lock' );\n\t\t\tdata.append( '_wpnonce', postLockUtils.unlockNonce );\n\t\t\tdata.append( 'post_ID', postId );\n\t\t\tdata.append( 'active_post_lock', activePostLock );\n\n\t\t\tif ( window.navigator.sendBeacon ) {\n\t\t\t\twindow.navigator.sendBeacon( postLockUtils.ajaxUrl, data );\n\t\t\t} else {\n\t\t\t\tconst xhr = new window.XMLHttpRequest();\n\t\t\t\txhr.open( 'POST', postLockUtils.ajaxUrl, false );\n\t\t\t\txhr.send( data );\n\t\t\t}\n\t\t}\n\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\taddAction( 'heartbeat.send', hookName, sendPostLock );\n\t\taddAction( 'heartbeat.tick', hookName, receivePostLock );\n\t\twindow.addEventListener( 'beforeunload', releasePostLock );\n\n\t\treturn () => {\n\t\t\tremoveAction( 'heartbeat.send', hookName );\n\t\t\tremoveAction( 'heartbeat.tick', hookName );\n\t\t\twindow.removeEventListener( 'beforeunload', releasePostLock );\n\t\t};\n\t}, [] );\n\n\tif ( ! isLocked ) {\n\t\treturn null;\n\t}\n\n\tconst userDisplayName = user.name;\n\tconst userAvatar = user.avatar;\n\n\tconst unlockUrl = addQueryArgs( 'post.php', {\n\t\t'get-post-lock': '1',\n\t\tlockKey: true,\n\t\tpost: postId,\n\t\taction: 'edit',\n\t\t_wpnonce: postLockUtils.nonce,\n\t} );\n\tconst allPostsUrl = addQueryArgs( 'edit.php', {\n\t\tpost_type: postType?.slug,\n\t} );\n\tconst allPostsLabel = __( 'Exit editor' );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={\n\t\t\t\tisTakeover\n\t\t\t\t\t? __( 'Someone else has taken over this post' )\n\t\t\t\t\t: __( 'This post is already being edited' )\n\t\t\t}\n\t\t\tfocusOnMount\n\t\t\tshouldCloseOnClickOutside={ false }\n\t\t\tshouldCloseOnEsc={ false }\n\t\t\tisDismissible={ false }\n\t\t\t// Do not remove this class, as this class is used by third party plugins.\n\t\t\tclassName=\"editor-post-locked-modal\"\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t<HStack alignment=\"top\" spacing={ 6 }>\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\twidth={ 64 }\n\t\t\t\t\t\theight={ 64 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ !! isTakeover && (\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\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\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t'<strong>%s</strong> now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved.'\n\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\tuserDisplayName\n\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\t\t'Another user now has editing control of this post (<PreviewLink />). Don’t worry, your changes up to this moment have been saved.'\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\tstrong: <strong />,\n\t\t\t\t\t\t\t\t\tPreviewLink: (\n\t\t\t\t\t\t\t\t\t\t<ExternalLink href={ previewLink }>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'preview' ) }\n\t\t\t\t\t\t\t\t\t\t</ExternalLink>\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) }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isTakeover && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t\t? sprintf(\n\t\t\t\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\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'<strong>%s</strong> is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over.'\n\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\tuserDisplayName\n\t\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t\t: __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Another user is currently working on this post (<PreviewLink />), which means you cannot make changes, unless you take over.'\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\tstrong: <strong />,\n\t\t\t\t\t\t\t\t\t\tPreviewLink: (\n\t\t\t\t\t\t\t\t\t\t\t<ExternalLink href={ previewLink }>\n\t\t\t\t\t\t\t\t\t\t\t\t{ __( 'preview' ) }\n\t\t\t\t\t\t\t\t\t\t\t</ExternalLink>\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</p>\n\t\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'If you take over, the other user will lose editing control to the post, but their changes will be saved.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tclassName=\"editor-post-locked-modal__buttons\"\n\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isTakeover && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\thref={ unlockUrl }\n\t\t\t\t\t\t\t>\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) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ allPostsUrl }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ allPostsLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</div>\n\t\t\t</HStack>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * This component checks the publishing status of the current post.\n * If the post is already published or the user doesn't have the\n * capability to publish, it returns null.\n *\n * @param {Object} props Component properties.\n * @param {React.ReactElement} props.children Children to be rendered.\n *\n * @return {React.ReactElement} The rendered child elements or null if the post is already published or the user doesn't have the capability to publish.\n */\nexport function PostPendingStatusCheck( { children } ) {\n\tconst { hasPublishAction, isPublished } = useSelect( ( select ) => {\n\t\tconst { isCurrentPostPublished, getCurrentPost } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t};\n\t}, [] );\n\n\tif ( isPublished || ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n\nexport default PostPendingStatusCheck;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPendingStatusCheck from './check';\nimport { store as editorStore } from '../../store';\n\n/**\n * A component for displaying and toggling the pending status of a post.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport function PostPendingStatus() {\n\tconst status = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t[]\n\t);\n\tconst { editPost } = useDispatch( editorStore );\n\tconst togglePendingStatus = () => {\n\t\tconst updatedStatus = status === 'pending' ? 'draft' : 'pending';\n\t\teditPost( { status: updatedStatus } );\n\t};\n\n\treturn (\n\t\t<PostPendingStatusCheck>\n\t\t\t<CheckboxControl\n\t\t\t\t__nextHasNoMarginBottom\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 PostPendingStatus;\n","/**\n * WordPress dependencies\n */\nimport { renderToString } from '@wordpress/element';\nimport { Button, Path, SVG, VisuallyHidden } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { applyFilters } from '@wordpress/hooks';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\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\n\t\t\t\t\tclassName=\"outer\"\n\t\t\t\t\td=\"M48 12c19.9 0 36 16.1 36 36S67.9 84 48 84 12 67.9 12 48s16.1-36 36-36\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\n\t\t\t\t<Path\n\t\t\t\t\tclassName=\"inner\"\n\t\t\t\t\td=\"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\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t/>\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\t/**\n\t * Filters the interstitial message shown when generating previews.\n\t *\n\t * @param {string} markup The preview interstitial markup.\n\t */\n\tmarkup = applyFilters( 'editor.PostPreview.interstitialMarkup', markup );\n\n\ttargetDocument.write( markup );\n\ttargetDocument.title = __( 'Generating preview…' );\n\ttargetDocument.close();\n}\n\n/**\n * Renders a button that opens a new window or tab for the preview,\n * writes the interstitial message to this window, and then navigates\n * to the actual preview link. The button is not rendered if the post\n * is not viewable and disabled if the post is not saveable.\n *\n * @param {Object} props The component props.\n * @param {string} props.className The class name for the button.\n * @param {string} props.textContent The text content for the button.\n * @param {boolean} props.forceIsAutosaveable Whether to force autosave.\n * @param {string} props.role The role attribute for the button.\n * @param {Function} props.onPreview The callback function for preview event.\n *\n * @return {React.ReactNode} The rendered button component.\n */\nexport default function PostPreviewButton( {\n\tclassName,\n\ttextContent,\n\tforceIsAutosaveable,\n\trole,\n\tonPreview,\n} ) {\n\tconst { postId, currentPostLink, previewLink, isSaveable, isViewable } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst editor = select( editorStore );\n\t\t\tconst core = select( coreStore );\n\n\t\t\tconst postType = core.getPostType(\n\t\t\t\teditor.getCurrentPostType( 'type' )\n\t\t\t);\n\t\t\tconst canView = postType?.viewable ?? false;\n\t\t\tif ( ! canView ) {\n\t\t\t\treturn { isViewable: canView };\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostId: editor.getCurrentPostId(),\n\t\t\t\tcurrentPostLink: editor.getCurrentPostAttribute( 'link' ),\n\t\t\t\tpreviewLink: editor.getEditedPostPreviewLink(),\n\t\t\t\tisSaveable: editor.isEditedPostSaveable(),\n\t\t\t\tisViewable: canView,\n\t\t\t};\n\t\t}, [] );\n\n\tconst { __unstableSaveForPreview } = useDispatch( editorStore );\n\n\tif ( ! isViewable ) {\n\t\treturn null;\n\t}\n\n\tconst targetId = `wp-preview-${ postId }`;\n\n\tconst openPreviewWindow = async ( 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\tconst previewWindow = window.open( '', targetId );\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\tpreviewWindow.focus();\n\n\t\twriteInterstitialMessage( previewWindow.document );\n\n\t\tconst link = await __unstableSaveForPreview( { forceIsAutosaveable } );\n\n\t\tpreviewWindow.location = link;\n\n\t\tonPreview?.();\n\t};\n\n\t// Link to the `?preview=true` URL if we have it, since this lets us see\n\t// changes that were autosaved since the post was last published. Otherwise,\n\t// just link to the post's URL.\n\tconst href = previewLink || currentPostLink;\n\n\treturn (\n\t\t<Button\n\t\t\tvariant={ ! className ? 'tertiary' : undefined }\n\t\t\tclassName={ className || 'editor-post-preview' }\n\t\t\thref={ href }\n\t\t\ttarget={ targetId }\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ ! isSaveable }\n\t\t\tonClick={ openPreviewWindow }\n\t\t\trole={ role }\n\t\t\tsize=\"compact\"\n\t\t>\n\t\t\t{ textContent || (\n\t\t\t\t<>\n\t\t\t\t\t{ _x( 'Preview', 'imperative verb' ) }\n\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the label for the publish button.\n *\n * @return {string} The label for the publish button.\n */\nexport default function PublishButtonLabel() {\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst {\n\t\tisPublished,\n\t\tisBeingScheduled,\n\t\tisSaving,\n\t\tisPublishing,\n\t\thasPublishAction,\n\t\tisAutosaving,\n\t\thasNonPostEntityChanges,\n\t\tpostStatusHasChanged,\n\t\tpostStatus,\n\t} = useSelect( ( select ) => {\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\tgetPostEdits,\n\t\t\tgetEditedPostAttribute,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublishing: isPublishingPost(),\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\thasNonPostEntityChanges:\n\t\t\t\tselect( editorStore ).hasNonPostEntityChanges(),\n\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t};\n\t}, [] );\n\tif ( isPublishing ) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Publishing…' );\n\t} else if (\n\t\t( isPublished || isBeingScheduled ) &&\n\t\tisSaving &&\n\t\t! isAutosaving\n\t) {\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\treturn __( 'Saving…' );\n\t}\n\tif ( ! hasPublishAction ) {\n\t\t// TODO: this is because \"Submit for review\" string is too long in some languages.\n\t\t// @see https://github.com/WordPress/gutenberg/issues/10475\n\t\treturn isSmallerThanMediumViewport\n\t\t\t? __( 'Publish' )\n\t\t\t: __( 'Submit for Review' );\n\t}\n\tif (\n\t\thasNonPostEntityChanges ||\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( ! postStatusHasChanged && postStatus === 'future' )\n\t) {\n\t\treturn __( 'Save' );\n\t}\n\tif ( isBeingScheduled ) {\n\t\treturn __( 'Schedule' );\n\t}\n\treturn __( 'Publish' );\n}\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PublishButtonLabel from './label';\nimport { store as editorStore } from '../../store';\n\nconst noop = () => {};\n\nexport class PostPublishButton extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.createOnClick = this.createOnClick.bind( this );\n\t\tthis.closeEntitiesSavedStates =\n\t\t\tthis.closeEntitiesSavedStates.bind( this );\n\n\t\tthis.state = {\n\t\t\tentitiesSavedStatesCallback: false,\n\t\t};\n\t}\n\n\tcreateOnClick( callback ) {\n\t\treturn ( ...args ) => {\n\t\t\tconst { hasNonPostEntityChanges, setEntitiesSavedStatesCallback } =\n\t\t\t\tthis.props;\n\t\t\t// If a post with non-post entities is published, but the user\n\t\t\t// elects to not save changes to the non-post entities, those\n\t\t\t// entities will still be dirty when the Publish button is clicked.\n\t\t\t// We also need to check that the `setEntitiesSavedStatesCallback`\n\t\t\t// prop was passed. See https://github.com/WordPress/gutenberg/pull/37383\n\t\t\tif ( hasNonPostEntityChanges && setEntitiesSavedStatesCallback ) {\n\t\t\t\t// The modal for multiple entity saving will open,\n\t\t\t\t// hold the callback for saving/publishing the post\n\t\t\t\t// so that we can call it if the post entity is checked.\n\t\t\t\tthis.setState( {\n\t\t\t\t\tentitiesSavedStatesCallback: () => callback( ...args ),\n\t\t\t\t} );\n\n\t\t\t\t// Open the save panel by setting its callback.\n\t\t\t\t// To set a function on the useState hook, we must set it\n\t\t\t\t// with another function (() => myFunction). Passing the\n\t\t\t\t// function on its own will cause an error when called.\n\t\t\t\tsetEntitiesSavedStatesCallback(\n\t\t\t\t\t() => this.closeEntitiesSavedStates\n\t\t\t\t);\n\t\t\t\treturn noop;\n\t\t\t}\n\n\t\t\treturn callback( ...args );\n\t\t};\n\t}\n\n\tcloseEntitiesSavedStates( savedEntities ) {\n\t\tconst { postType, postId } = this.props;\n\t\tconst { entitiesSavedStatesCallback } = this.state;\n\t\tthis.setState( { entitiesSavedStatesCallback: false }, () => {\n\t\t\tif (\n\t\t\t\tsavedEntities &&\n\t\t\t\tsavedEntities.some(\n\t\t\t\t\t( elt ) =>\n\t\t\t\t\t\telt.kind === 'postType' &&\n\t\t\t\t\t\telt.name === postType &&\n\t\t\t\t\t\telt.key === postId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// The post entity was checked, call the held callback from `createOnClick`.\n\t\t\t\tentitiesSavedStatesCallback();\n\t\t\t}\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tforceIsDirty,\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\tisAutoSaving,\n\t\t\tisToggle,\n\t\t\tsavePostStatus,\n\t\t\tonSubmit = noop,\n\t\t\tonToggle,\n\t\t\tvisibility,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tpostStatus,\n\t\t\tpostStatusHasChanged,\n\t\t} = this.props;\n\n\t\tconst isButtonDisabled =\n\t\t\t( isSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\tisPostSavingLocked ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges );\n\n\t\tconst isToggleDisabled =\n\t\t\t( isPublished ||\n\t\t\t\tisSaving ||\n\t\t\t\t! isSaveable ||\n\t\t\t\t( ! isPublishable && ! forceIsDirty ) ) &&\n\t\t\t( ! hasNonPostEntityChanges || isSavingNonPostEntityChanges );\n\n\t\t// If the new status has not changed explicitly, we derive it from\n\t\t// other factors, like having a publish action, etc.. We need to preserve\n\t\t// this because it affects when to show the pre and post publish panels.\n\t\t// If it has changed though explicitly, we need to respect that.\n\t\tlet publishStatus = 'publish';\n\t\tif ( postStatusHasChanged ) {\n\t\t\tpublishStatus = postStatus;\n\t\t} else if ( ! hasPublishAction ) {\n\t\t\tpublishStatus = 'pending';\n\t\t} else if ( visibility === 'private' ) {\n\t\t\tpublishStatus = 'private';\n\t\t} else if ( isBeingScheduled ) {\n\t\t\tpublishStatus = 'future';\n\t\t}\n\n\t\tconst onClickButton = () => {\n\t\t\tif ( isButtonDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonSubmit();\n\t\t\tsavePostStatus( publishStatus );\n\t\t};\n\n\t\t// Callback to open the publish panel.\n\t\tconst onClickToggle = () => {\n\t\t\tif ( isToggleDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tonToggle();\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: ! isAutoSaving && isSaving,\n\t\t\tvariant: 'primary',\n\t\t\tonClick: this.createOnClick( onClickButton ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\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\tvariant: 'primary',\n\t\t\tsize: 'compact',\n\t\t\tonClick: this.createOnClick( onClickToggle ),\n\t\t\t'aria-haspopup': hasNonPostEntityChanges ? 'dialog' : undefined,\n\t\t};\n\t\tconst componentProps = isToggle ? toggleProps : buttonProps;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...componentProps }\n\t\t\t\t\tclassName={ `${ componentProps.className } editor-post-publish-button__button` }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t>\n\t\t\t\t\t<PublishButtonLabel />\n\t\t\t\t</Button>\n\t\t\t</>\n\t\t);\n\t}\n}\n\n/**\n * Renders the publish button.\n */\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tisSavingPost,\n\t\t\tisAutosavingPost,\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\tgetCurrentPostId,\n\t\t\thasNonPostEntityChanges,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetPostEdits,\n\t\t} = select( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisAutoSaving: isAutosavingPost(),\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:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostId: getCurrentPostId(),\n\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: getPostEdits()?.status,\n\t\t\thasNonPostEntityChanges: hasNonPostEntityChanges(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { editPost, savePost } = dispatch( editorStore );\n\t\treturn {\n\t\t\tsavePostStatus: ( status ) => {\n\t\t\t\teditPost( { status }, { undoIgnore: true } );\n\t\t\t\tsavePost();\n\t\t\t},\n\t\t};\n\t} ),\n] )( PostPublishButton );\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst wordpress = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t\t<Path d=\"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z\" />\n\t</SVG>\n);\n\nexport default wordpress;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nexport const visibilityOptions = {\n\tpublic: {\n\t\tlabel: __( 'Public' ),\n\t\tinfo: __( 'Visible to everyone.' ),\n\t},\n\tprivate: {\n\t\tlabel: __( 'Private' ),\n\t\tinfo: __( 'Only visible to site admins and editors.' ),\n\t},\n\tpassword: {\n\t\tlabel: __( 'Password protected' ),\n\t\tinfo: __( 'Only those with the password can view this post.' ),\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport {\n\tVisuallyHidden,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { visibilityOptions } from './utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * Allows users to set the visibility of a post.\n *\n * @param {Object} props The component props.\n * @param {Function} props.onClose Function to call when the popover is closed.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostVisibility( { onClose } ) {\n\tconst instanceId = useInstanceId( PostVisibility );\n\n\tconst { status, visibility, password } = useSelect( ( select ) => ( {\n\t\tstatus: select( editorStore ).getEditedPostAttribute( 'status' ),\n\t\tvisibility: select( editorStore ).getEditedPostVisibility(),\n\t\tpassword: select( editorStore ).getEditedPostAttribute( 'password' ),\n\t} ) );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\n\tconst [ hasPassword, setHasPassword ] = useState( !! password );\n\tconst [ showPrivateConfirmDialog, setShowPrivateConfirmDialog ] =\n\t\tuseState( false );\n\n\tconst setPublic = () => {\n\t\teditPost( {\n\t\t\tstatus: visibility === 'private' ? 'draft' : status,\n\t\t\tpassword: '',\n\t\t} );\n\t\tsetHasPassword( false );\n\t};\n\n\tconst setPrivate = () => {\n\t\tsetShowPrivateConfirmDialog( true );\n\t};\n\n\tconst confirmPrivate = () => {\n\t\teditPost( { status: 'private', password: '' } );\n\t\tsetHasPassword( false );\n\t\tsetShowPrivateConfirmDialog( false );\n\t\tsavePost();\n\t};\n\n\tconst handleDialogCancel = () => {\n\t\tsetShowPrivateConfirmDialog( false );\n\t};\n\n\tconst setPasswordProtected = () => {\n\t\teditPost( {\n\t\t\tstatus: visibility === 'private' ? 'draft' : status,\n\t\t\tpassword: password || '',\n\t\t} );\n\t\tsetHasPassword( true );\n\t};\n\n\tconst updatePassword = ( event ) => {\n\t\teditPost( { password: event.target.value } );\n\t};\n\n\treturn (\n\t\t<div className=\"editor-post-visibility\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Visibility' ) }\n\t\t\t\thelp={ __( 'Control how this post is viewed.' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<fieldset className=\"editor-post-visibility__fieldset\">\n\t\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t\t{ __( 'Visibility' ) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t\t<PostVisibilityChoice\n\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\tvalue=\"public\"\n\t\t\t\t\tlabel={ visibilityOptions.public.label }\n\t\t\t\t\tinfo={ visibilityOptions.public.info }\n\t\t\t\t\tchecked={ visibility === 'public' && ! hasPassword }\n\t\t\t\t\tonChange={ setPublic }\n\t\t\t\t/>\n\t\t\t\t<PostVisibilityChoice\n\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\tvalue=\"private\"\n\t\t\t\t\tlabel={ visibilityOptions.private.label }\n\t\t\t\t\tinfo={ visibilityOptions.private.info }\n\t\t\t\t\tchecked={ visibility === 'private' }\n\t\t\t\t\tonChange={ setPrivate }\n\t\t\t\t/>\n\t\t\t\t<PostVisibilityChoice\n\t\t\t\t\tinstanceId={ instanceId }\n\t\t\t\t\tvalue=\"password\"\n\t\t\t\t\tlabel={ visibilityOptions.password.label }\n\t\t\t\t\tinfo={ visibilityOptions.password.info }\n\t\t\t\t\tchecked={ hasPassword }\n\t\t\t\t\tonChange={ setPasswordProtected }\n\t\t\t\t/>\n\t\t\t\t{ hasPassword && (\n\t\t\t\t\t<div className=\"editor-post-visibility__password\">\n\t\t\t\t\t\t<VisuallyHidden\n\t\t\t\t\t\t\tas=\"label\"\n\t\t\t\t\t\t\thtmlFor={ `editor-post-visibility__password-input-${ instanceId }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Create password' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tclassName=\"editor-post-visibility__password-input\"\n\t\t\t\t\t\t\tid={ `editor-post-visibility__password-input-${ instanceId }` }\n\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\tonChange={ updatePassword }\n\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\tplaceholder={ __( 'Use a secure password' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</fieldset>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showPrivateConfirmDialog }\n\t\t\t\tonConfirm={ confirmPrivate }\n\t\t\t\tonCancel={ handleDialogCancel }\n\t\t\t\tconfirmButtonText={ __( 'Publish' ) }\n\t\t\t\tsize=\"medium\"\n\t\t\t>\n\t\t\t\t{ __( 'Would you like to privately publish this post now?' ) }\n\t\t\t</ConfirmDialog>\n\t\t</div>\n\t);\n}\n\nfunction PostVisibilityChoice( { instanceId, value, label, info, ...props } ) {\n\treturn (\n\t\t<div className=\"editor-post-visibility__choice\">\n\t\t\t<input\n\t\t\t\ttype=\"radio\"\n\t\t\t\tname={ `editor-post-visibility__setting-${ instanceId }` }\n\t\t\t\tvalue={ value }\n\t\t\t\tid={ `editor-post-${ value }-${ instanceId }` }\n\t\t\t\taria-describedby={ `editor-post-${ value }-${ instanceId }-description` }\n\t\t\t\tclassName=\"editor-post-visibility__radio\"\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t\t<label\n\t\t\t\thtmlFor={ `editor-post-${ value }-${ instanceId }` }\n\t\t\t\tclassName=\"editor-post-visibility__label\"\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</label>\n\t\t\t<p\n\t\t\t\tid={ `editor-post-${ value }-${ instanceId }-description` }\n\t\t\t\tclassName=\"editor-post-visibility__info\"\n\t\t\t>\n\t\t\t\t{ info }\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { visibilityOptions } from './utils';\nimport { store as editorStore } from '../../store';\n\n/**\n * Returns the label for the current post visibility setting.\n *\n * @return {string} Post visibility label.\n */\nexport default function PostVisibilityLabel() {\n\treturn usePostVisibilityLabel();\n}\n\n/**\n * Get the label for the current post visibility setting.\n *\n * @return {string} Post visibility label.\n */\nexport function usePostVisibilityLabel() {\n\tconst visibility = useSelect( ( select ) =>\n\t\tselect( editorStore ).getEditedPostVisibility()\n\t);\n\treturn visibilityOptions[ visibility ]?.label;\n}\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The start of a month\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfMonth(date) {\n const _date = toDate(date);\n _date.setDate(1);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfMonth;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","import { millisecondsInHour, millisecondsInMinute } from \"./constants.mjs\";\n\n/**\n * The {@link parseISO} function options.\n */\n\n/**\n * @name parseISO\n * @category Common Helpers\n * @summary Parse ISO string\n *\n * @description\n * Parse the given string in ISO 8601 format and return an instance of Date.\n *\n * Function accepts complete ISO 8601 formats as well as partial implementations.\n * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601\n *\n * If the argument isn't a string, the function cannot parse the string or\n * the values are invalid, it returns Invalid Date.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n * @param options - An object with options\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Convert string '2014-02-11T11:30:30' to date:\n * const result = parseISO('2014-02-11T11:30:30')\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert string '+02014101' to date,\n * // if the additional number of digits in the extended year format is 1:\n * const result = parseISO('+02014101', { additionalDigits: 1 })\n * //=> Fri Apr 11 2014 00:00:00\n */\nexport function parseISO(argument, options) {\n const additionalDigits = options?.additionalDigits ?? 2;\n const dateStrings = splitDateString(argument);\n\n let date;\n if (dateStrings.date) {\n const parseYearResult = parseYear(dateStrings.date, additionalDigits);\n date = parseDate(parseYearResult.restDateString, parseYearResult.year);\n }\n\n if (!date || isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n const timestamp = date.getTime();\n let time = 0;\n let offset;\n\n if (dateStrings.time) {\n time = parseTime(dateStrings.time);\n if (isNaN(time)) {\n return new Date(NaN);\n }\n }\n\n if (dateStrings.timezone) {\n offset = parseTimezone(dateStrings.timezone);\n if (isNaN(offset)) {\n return new Date(NaN);\n }\n } else {\n const dirtyDate = new Date(timestamp + time);\n // JS parsed string assuming it's in UTC timezone\n // but we need it to be parsed in our timezone\n // so we use utc values to build date in our timezone.\n // Year values from 0 to 99 map to the years 1900 to 1999\n // so set year explicitly with setFullYear.\n const result = new Date(0);\n result.setFullYear(\n dirtyDate.getUTCFullYear(),\n dirtyDate.getUTCMonth(),\n dirtyDate.getUTCDate(),\n );\n result.setHours(\n dirtyDate.getUTCHours(),\n dirtyDate.getUTCMinutes(),\n dirtyDate.getUTCSeconds(),\n dirtyDate.getUTCMilliseconds(),\n );\n return result;\n }\n\n return new Date(timestamp + time + offset);\n}\n\nconst patterns = {\n dateTimeDelimiter: /[T ]/,\n timeZoneDelimiter: /[Z ]/i,\n timezone: /([Z+-].*)$/,\n};\n\nconst dateRegex =\n /^-?(?:(\\d{3})|(\\d{2})(?:-?(\\d{2}))?|W(\\d{2})(?:-?(\\d{1}))?|)$/;\nconst timeRegex =\n /^(\\d{2}(?:[.,]\\d*)?)(?::?(\\d{2}(?:[.,]\\d*)?))?(?::?(\\d{2}(?:[.,]\\d*)?))?$/;\nconst timezoneRegex = /^([+-])(\\d{2})(?::?(\\d{2}))?$/;\n\nfunction splitDateString(dateString) {\n const dateStrings = {};\n const array = dateString.split(patterns.dateTimeDelimiter);\n let timeString;\n\n // The regex match should only return at maximum two array elements.\n // [date], [time], or [date, time].\n if (array.length > 2) {\n return dateStrings;\n }\n\n if (/:/.test(array[0])) {\n timeString = array[0];\n } else {\n dateStrings.date = array[0];\n timeString = array[1];\n if (patterns.timeZoneDelimiter.test(dateStrings.date)) {\n dateStrings.date = dateString.split(patterns.timeZoneDelimiter)[0];\n timeString = dateString.substr(\n dateStrings.date.length,\n dateString.length,\n );\n }\n }\n\n if (timeString) {\n const token = patterns.timezone.exec(timeString);\n if (token) {\n dateStrings.time = timeString.replace(token[1], \"\");\n dateStrings.timezone = token[1];\n } else {\n dateStrings.time = timeString;\n }\n }\n\n return dateStrings;\n}\n\nfunction parseYear(dateString, additionalDigits) {\n const regex = new RegExp(\n \"^(?:(\\\\d{4}|[+-]\\\\d{\" +\n (4 + additionalDigits) +\n \"})|(\\\\d{2}|[+-]\\\\d{\" +\n (2 + additionalDigits) +\n \"})$)\",\n );\n\n const captures = dateString.match(regex);\n // Invalid ISO-formatted year\n if (!captures) return { year: NaN, restDateString: \"\" };\n\n const year = captures[1] ? parseInt(captures[1]) : null;\n const century = captures[2] ? parseInt(captures[2]) : null;\n\n // either year or century is null, not both\n return {\n year: century === null ? year : century * 100,\n restDateString: dateString.slice((captures[1] || captures[2]).length),\n };\n}\n\nfunction parseDate(dateString, year) {\n // Invalid ISO-formatted year\n if (year === null) return new Date(NaN);\n\n const captures = dateString.match(dateRegex);\n // Invalid ISO-formatted string\n if (!captures) return new Date(NaN);\n\n const isWeekDate = !!captures[4];\n const dayOfYear = parseDateUnit(captures[1]);\n const month = parseDateUnit(captures[2]) - 1;\n const day = parseDateUnit(captures[3]);\n const week = parseDateUnit(captures[4]);\n const dayOfWeek = parseDateUnit(captures[5]) - 1;\n\n if (isWeekDate) {\n if (!validateWeekDate(year, week, dayOfWeek)) {\n return new Date(NaN);\n }\n return dayOfISOWeekYear(year, week, dayOfWeek);\n } else {\n const date = new Date(0);\n if (\n !validateDate(year, month, day) ||\n !validateDayOfYearDate(year, dayOfYear)\n ) {\n return new Date(NaN);\n }\n date.setUTCFullYear(year, month, Math.max(dayOfYear, day));\n return date;\n }\n}\n\nfunction parseDateUnit(value) {\n return value ? parseInt(value) : 1;\n}\n\nfunction parseTime(timeString) {\n const captures = timeString.match(timeRegex);\n if (!captures) return NaN; // Invalid ISO-formatted time\n\n const hours = parseTimeUnit(captures[1]);\n const minutes = parseTimeUnit(captures[2]);\n const seconds = parseTimeUnit(captures[3]);\n\n if (!validateTime(hours, minutes, seconds)) {\n return NaN;\n }\n\n return (\n hours * millisecondsInHour + minutes * millisecondsInMinute + seconds * 1000\n );\n}\n\nfunction parseTimeUnit(value) {\n return (value && parseFloat(value.replace(\",\", \".\"))) || 0;\n}\n\nfunction parseTimezone(timezoneString) {\n if (timezoneString === \"Z\") return 0;\n\n const captures = timezoneString.match(timezoneRegex);\n if (!captures) return 0;\n\n const sign = captures[1] === \"+\" ? -1 : 1;\n const hours = parseInt(captures[2]);\n const minutes = (captures[3] && parseInt(captures[3])) || 0;\n\n if (!validateTimezone(hours, minutes)) {\n return NaN;\n }\n\n return sign * (hours * millisecondsInHour + minutes * millisecondsInMinute);\n}\n\nfunction dayOfISOWeekYear(isoWeekYear, week, day) {\n const date = new Date(0);\n date.setUTCFullYear(isoWeekYear, 0, 4);\n const fourthOfJanuaryDay = date.getUTCDay() || 7;\n const diff = (week - 1) * 7 + day + 1 - fourthOfJanuaryDay;\n date.setUTCDate(date.getUTCDate() + diff);\n return date;\n}\n\n// Validation functions\n\n// February is null to handle the leap year (using ||)\nconst daysInMonths = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n\nfunction isLeapYearIndex(year) {\n return year % 400 === 0 || (year % 4 === 0 && year % 100 !== 0);\n}\n\nfunction validateDate(year, month, date) {\n return (\n month >= 0 &&\n month <= 11 &&\n date >= 1 &&\n date <= (daysInMonths[month] || (isLeapYearIndex(year) ? 29 : 28))\n );\n}\n\nfunction validateDayOfYearDate(year, dayOfYear) {\n return dayOfYear >= 1 && dayOfYear <= (isLeapYearIndex(year) ? 366 : 365);\n}\n\nfunction validateWeekDate(_year, week, day) {\n return week >= 1 && week <= 53 && day >= 0 && day <= 6;\n}\n\nfunction validateTime(hours, minutes, seconds) {\n if (hours === 24) {\n return minutes === 0 && seconds === 0;\n }\n\n return (\n seconds >= 0 &&\n seconds < 60 &&\n minutes >= 0 &&\n minutes < 60 &&\n hours >= 0 &&\n hours < 25\n );\n}\n\nfunction validateTimezone(_hours, minutes) {\n return minutes >= 0 && minutes <= 59;\n}\n\n// Fallback for modularized imports:\nexport default parseISO;\n","/**\n * External dependencies\n */\nimport { parseISO, endOfMonth, startOfMonth } from 'date-fns';\n\n/**\n * WordPress dependencies\n */\nimport { getSettings } from '@wordpress/date';\nimport { _x } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { PrivatePublishDateTimePicker } = unlock( blockEditorPrivateApis );\n\n/**\n * Renders the PostSchedule component. It allows the user to schedule a post.\n *\n * @param {Object} props Props.\n * @param {Function} props.onClose Function to close the component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedule( props ) {\n\treturn (\n\t\t<PrivatePostSchedule\n\t\t\t{ ...props }\n\t\t\tshowPopoverHeaderActions\n\t\t\tisCompact={ false }\n\t\t/>\n\t);\n}\n\nexport function PrivatePostSchedule( {\n\tonClose,\n\tshowPopoverHeaderActions,\n\tisCompact,\n} ) {\n\tconst { postDate, postType } = useSelect(\n\t\t( select ) => ( {\n\t\t\tpostDate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t} ),\n\t\t[]\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst onUpdateDate = ( date ) => editPost( { date } );\n\n\tconst [ previewedMonth, setPreviewedMonth ] = useState(\n\t\tstartOfMonth( new Date( postDate ) )\n\t);\n\n\t// Pick up published and scheduled site posts.\n\tconst eventsByPostType = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords( 'postType', postType, {\n\t\t\t\tstatus: 'publish,future',\n\t\t\t\tafter: startOfMonth( previewedMonth ).toISOString(),\n\t\t\t\tbefore: endOfMonth( previewedMonth ).toISOString(),\n\t\t\t\texclude: [ select( editorStore ).getCurrentPostId() ],\n\t\t\t\tper_page: 100,\n\t\t\t\t_fields: 'id,date',\n\t\t\t} ),\n\t\t[ previewedMonth, postType ]\n\t);\n\n\tconst events = useMemo(\n\t\t() =>\n\t\t\t( eventsByPostType || [] ).map( ( { date: eventDate } ) => ( {\n\t\t\t\tdate: new Date( eventDate ),\n\t\t\t} ) ),\n\t\t[ eventsByPostType ]\n\t);\n\n\tconst settings = getSettings();\n\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( '' )\n\t\t\t.reverse()\n\t\t\t.join( '' ) // Reverse the string and test for \"a\" not followed by a slash.\n\t);\n\n\treturn (\n\t\t<PrivatePublishDateTimePicker\n\t\t\tcurrentDate={ postDate }\n\t\t\tonChange={ onUpdateDate }\n\t\t\tis12Hour={ is12HourTime }\n\t\t\tdateOrder={\n\t\t\t\t/* translators: Order of day, month, and year. Available formats are 'dmy', 'mdy', and 'ymd'. */\n\t\t\t\t_x( 'dmy', 'date order' )\n\t\t\t}\n\t\t\tevents={ events }\n\t\t\tonMonthPreviewed={ ( date ) =>\n\t\t\t\tsetPreviewedMonth( parseISO( date ) )\n\t\t\t}\n\t\t\tonClose={ onClose }\n\t\t\tisCompact={ isCompact }\n\t\t\tshowPopoverHeaderActions={ showPopoverHeaderActions }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf, isRTL } from '@wordpress/i18n';\nimport { getSettings, getDate, dateI18n } from '@wordpress/date';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the PostScheduleLabel component.\n *\n * @param {Object} props Props.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostScheduleLabel( props ) {\n\treturn usePostScheduleLabel( props );\n}\n\n/**\n * Custom hook to get the label for post schedule.\n *\n * @param {Object} options Options for the hook.\n * @param {boolean} options.full Whether to get the full label or not. Default is false.\n *\n * @return {string} The label for post schedule.\n */\nexport function usePostScheduleLabel( { full = false } = {} ) {\n\tconst { date, isFloating } = useSelect(\n\t\t( select ) => ( {\n\t\t\tdate: select( editorStore ).getEditedPostAttribute( 'date' ),\n\t\t\tisFloating: select( editorStore ).isEditedPostDateFloating(),\n\t\t} ),\n\t\t[]\n\t);\n\n\treturn full\n\t\t? getFullPostScheduleLabel( date )\n\t\t: getPostScheduleLabel( date, { isFloating } );\n}\n\nexport function getFullPostScheduleLabel( dateAttribute ) {\n\tconst date = getDate( dateAttribute );\n\n\tconst timezoneAbbreviation = getTimezoneAbbreviation();\n\tconst formattedDate = dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n\treturn isRTL()\n\t\t? `${ timezoneAbbreviation } ${ formattedDate }`\n\t\t: `${ formattedDate } ${ timezoneAbbreviation }`;\n}\n\nexport function getPostScheduleLabel(\n\tdateAttribute,\n\t{ isFloating = false, now = new Date() } = {}\n) {\n\tif ( ! dateAttribute || isFloating ) {\n\t\treturn __( 'Immediately' );\n\t}\n\n\t// If the user timezone does not equal the site timezone then using words\n\t// like 'tomorrow' is confusing, so show the full date.\n\tif ( ! isTimezoneSameAsSiteTimezone( now ) ) {\n\t\treturn getFullPostScheduleLabel( dateAttribute );\n\t}\n\n\tconst date = getDate( dateAttribute );\n\n\tif ( isSameDay( date, now ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Today at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tconst tomorrow = new Date( now );\n\ttomorrow.setDate( tomorrow.getDate() + 1 );\n\n\tif ( isSameDay( date, tomorrow ) ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Time of day the post is scheduled for.\n\t\t\t__( 'Tomorrow at %s' ),\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\tdateI18n( _x( 'g:i\\xa0a', 'post schedule time format' ), date )\n\t\t);\n\t}\n\n\tif ( date.getFullYear() === now.getFullYear() ) {\n\t\treturn dateI18n(\n\t\t\t// translators: If using a space between 'g:i' and 'a', use a non-breaking space.\n\t\t\t_x( 'F j g:i\\xa0a', 'post schedule date format without year' ),\n\t\t\tdate\n\t\t);\n\t}\n\n\treturn dateI18n(\n\t\t// translators: Use a non-breaking space between 'g:i' and 'a' if appropriate.\n\t\t_x( 'F j, Y g:i\\xa0a', 'post schedule full date format' ),\n\t\tdate\n\t);\n}\n\nfunction getTimezoneAbbreviation() {\n\tconst { timezone } = getSettings();\n\n\tif ( timezone.abbr && isNaN( Number( timezone.abbr ) ) ) {\n\t\treturn timezone.abbr;\n\t}\n\n\tconst symbol = timezone.offset < 0 ? '' : '+';\n\treturn `UTC${ symbol }${ timezone.offsetFormatted }`;\n}\n\nfunction isTimezoneSameAsSiteTimezone( date ) {\n\tconst { timezone } = getSettings();\n\n\tconst siteOffset = Number( timezone.offset );\n\tconst dateOffset = -1 * ( date.getTimezoneOffset() / 60 );\n\treturn siteOffset === dateOffset;\n}\n\nfunction isSameDay( left, right ) {\n\treturn (\n\t\tleft.getDate() === right.getDate() &&\n\t\tleft.getMonth() === right.getMonth() &&\n\t\tleft.getFullYear() === right.getFullYear()\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unescapeTerms } from '../../utils/terms';\n\nconst MIN_MOST_USED_TERMS = 3;\nconst DEFAULT_QUERY = {\n\tper_page: 10,\n\torderby: 'count',\n\torder: 'desc',\n\thide_empty: true,\n\t_fields: 'id,name,count',\n\tcontext: 'view',\n};\n\nexport default function MostUsedTerms( { onSelect, taxonomy } ) {\n\tconst { _terms, showTerms } = useSelect(\n\t\t( select ) => {\n\t\t\tconst mostUsedTerms = select( coreStore ).getEntityRecords(\n\t\t\t\t'taxonomy',\n\t\t\t\ttaxonomy.slug,\n\t\t\t\tDEFAULT_QUERY\n\t\t\t);\n\t\t\treturn {\n\t\t\t\t_terms: mostUsedTerms,\n\t\t\t\tshowTerms: mostUsedTerms?.length >= MIN_MOST_USED_TERMS,\n\t\t\t};\n\t\t},\n\t\t[ taxonomy.slug ]\n\t);\n\n\tif ( ! showTerms ) {\n\t\treturn null;\n\t}\n\n\tconst terms = unescapeTerms( _terms );\n\n\treturn (\n\t\t<div className=\"editor-post-taxonomies__flat-term-most-used\">\n\t\t\t<BaseControl.VisualLabel\n\t\t\t\tas=\"h3\"\n\t\t\t\tclassName=\"editor-post-taxonomies__flat-term-most-used-label\"\n\t\t\t>\n\t\t\t\t{ taxonomy.labels.most_used }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t{ /*\n\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t */\n\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t<ul\n\t\t\t\trole=\"list\"\n\t\t\t\tclassName=\"editor-post-taxonomies__flat-term-most-used-list\"\n\t\t\t>\n\t\t\t\t{ terms.map( ( term ) => (\n\t\t\t\t\t<li key={ term.id }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\tonClick={ () => onSelect( term ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ term.name }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</li>\n\t\t\t\t) ) }\n\t\t\t</ul>\n\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Fragment, useEffect, useMemo, useState } from '@wordpress/element';\nimport {\n\tFormTokenField,\n\twithFilters,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unescapeString, unescapeTerm } from '../../utils/terms';\nimport MostUsedTerms from './most-used-terms';\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.\n *\n * @type {Array<any>}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * How the max suggestions limit was chosen:\n * - Matches the `per_page` range set by the REST API.\n * - Can't use \"unbound\" query. The `FormTokenField` needs a fixed number.\n * - Matches default for `FormTokenField`.\n */\nconst MAX_TERMS_SUGGESTIONS = 100;\nconst DEFAULT_QUERY = {\n\tper_page: MAX_TERMS_SUGGESTIONS,\n\t_fields: 'id,name',\n\tcontext: 'view',\n};\n\nconst isSameTermName = ( termA, termB ) =>\n\tunescapeString( termA ).toLowerCase() ===\n\tunescapeString( termB ).toLowerCase();\n\nconst termNamesToIds = ( names, terms ) => {\n\treturn names\n\t\t.map(\n\t\t\t( termName ) =>\n\t\t\t\tterms.find( ( term ) => isSameTermName( term.name, termName ) )\n\t\t\t\t\t?.id\n\t\t)\n\t\t.filter( ( id ) => id !== undefined );\n};\n\nconst Wrapper = ( { children, __nextHasNoMarginBottom } ) =>\n\t__nextHasNoMarginBottom ? (\n\t\t<VStack spacing={ 4 }>{ children }</VStack>\n\t) : (\n\t\t<Fragment>{ children }</Fragment>\n\t);\n\n/**\n * Renders a flat term selector component.\n *\n * @param {Object} props The component props.\n * @param {string} props.slug The slug of the taxonomy.\n * @param {boolean} props.__nextHasNoMarginBottom Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 7.0. (The prop can be safely removed once this happens.)\n *\n * @return {React.ReactNode} The rendered flat term selector component.\n */\nexport function FlatTermSelector( { slug, __nextHasNoMarginBottom } ) {\n\tconst [ values, setValues ] = useState( [] );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst debouncedSearch = useDebounce( setSearch, 500 );\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.editor.PostTaxonomiesFlatTermSelector',\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\tversion: '7.0',\n\t\t\t\thint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',\n\t\t\t}\n\t\t);\n\t}\n\n\tconst {\n\t\tterms,\n\t\ttermIds,\n\t\ttaxonomy,\n\t\thasAssignAction,\n\t\thasCreateAction,\n\t\thasResolvedTerms,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPost, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEntityRecords, getTaxonomy, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst post = getCurrentPost();\n\t\t\tconst _taxonomy = getTaxonomy( slug );\n\t\t\tconst _termIds = _taxonomy\n\t\t\t\t? getEditedPostAttribute( _taxonomy.rest_base )\n\t\t\t\t: EMPTY_ARRAY;\n\n\t\t\tconst query = {\n\t\t\t\t...DEFAULT_QUERY,\n\t\t\t\tinclude: _termIds?.join( ',' ),\n\t\t\t\tper_page: -1,\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\thasCreateAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-create-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\thasAssignAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-assign-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\ttaxonomy: _taxonomy,\n\t\t\t\ttermIds: _termIds,\n\t\t\t\tterms: _termIds?.length\n\t\t\t\t\t? getEntityRecords( 'taxonomy', slug, query )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t\thasResolvedTerms: hasFinishedResolution( 'getEntityRecords', [\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\tslug,\n\t\t\t\t\tquery,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ slug ]\n\t);\n\n\tconst { searchResults } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\n\t\t\treturn {\n\t\t\t\tsearchResults: !! search\n\t\t\t\t\t? getEntityRecords( 'taxonomy', slug, {\n\t\t\t\t\t\t\t...DEFAULT_QUERY,\n\t\t\t\t\t\t\tsearch,\n\t\t\t\t\t } )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t};\n\t\t},\n\t\t[ search, slug ]\n\t);\n\n\t// Update terms state only after the selectors are resolved.\n\t// We're using this to avoid terms temporarily disappearing on slow networks\n\t// while core data makes REST API requests.\n\tuseEffect( () => {\n\t\tif ( hasResolvedTerms ) {\n\t\t\tconst newValues = ( terms ?? [] ).map( ( term ) =>\n\t\t\t\tunescapeString( term.name )\n\t\t\t);\n\n\t\t\tsetValues( newValues );\n\t\t}\n\t}, [ terms, hasResolvedTerms ] );\n\n\tconst suggestions = useMemo( () => {\n\t\treturn ( searchResults ?? [] ).map( ( term ) =>\n\t\t\tunescapeString( term.name )\n\t\t);\n\t}, [ searchResults ] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tif ( ! hasAssignAction ) {\n\t\treturn null;\n\t}\n\n\tasync function findOrCreateTerm( term ) {\n\t\ttry {\n\t\t\tconst newTerm = await saveEntityRecord( 'taxonomy', slug, term, {\n\t\t\t\tthrowOnError: true,\n\t\t\t} );\n\t\t\treturn unescapeTerm( newTerm );\n\t\t} catch ( error ) {\n\t\t\tif ( error.code !== 'term_exists' ) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tid: error.data.term_id,\n\t\t\t\tname: term.name,\n\t\t\t};\n\t\t}\n\t}\n\n\tfunction onUpdateTerms( newTermIds ) {\n\t\teditPost( { [ taxonomy.rest_base ]: newTermIds } );\n\t}\n\n\tfunction onChange( termNames ) {\n\t\tconst availableTerms = [\n\t\t\t...( terms ?? [] ),\n\t\t\t...( searchResults ?? [] ),\n\t\t];\n\t\tconst uniqueTerms = termNames.reduce( ( acc, name ) => {\n\t\t\tif (\n\t\t\t\t! acc.some( ( n ) => n.toLowerCase() === name.toLowerCase() )\n\t\t\t) {\n\t\t\t\tacc.push( name );\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, [] );\n\n\t\tconst newTermNames = uniqueTerms.filter(\n\t\t\t( termName ) =>\n\t\t\t\t! availableTerms.find( ( term ) =>\n\t\t\t\t\tisSameTermName( term.name, termName )\n\t\t\t\t)\n\t\t);\n\n\t\t// Optimistically update term values.\n\t\t// The selector will always re-fetch terms later.\n\t\tsetValues( uniqueTerms );\n\n\t\tif ( newTermNames.length === 0 ) {\n\t\t\tonUpdateTerms( termNamesToIds( uniqueTerms, availableTerms ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! hasCreateAction ) {\n\t\t\treturn;\n\t\t}\n\n\t\tPromise.all(\n\t\t\tnewTermNames.map( ( termName ) =>\n\t\t\t\tfindOrCreateTerm( { name: termName } )\n\t\t\t)\n\t\t)\n\t\t\t.then( ( newTerms ) => {\n\t\t\t\tconst newAvailableTerms = availableTerms.concat( newTerms );\n\t\t\t\tonUpdateTerms(\n\t\t\t\t\ttermNamesToIds( uniqueTerms, newAvailableTerms )\n\t\t\t\t);\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tcreateErrorNotice( error.message, {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\t// In case of a failure, try assigning available terms.\n\t\t\t\t// This will invalidate the optimistic update.\n\t\t\t\tonUpdateTerms( termNamesToIds( uniqueTerms, availableTerms ) );\n\t\t\t} );\n\t}\n\n\tfunction appendTerm( newTerm ) {\n\t\tif ( termIds.includes( newTerm.id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newTermIds = [ ...termIds, newTerm.id ];\n\t\tconst defaultName = slug === 'post_tag' ? __( 'Tag' ) : __( 'Term' );\n\t\tconst termAddedMessage = sprintf(\n\t\t\t/* translators: %s: term name. */\n\t\t\t_x( '%s added', 'term' ),\n\t\t\ttaxonomy?.labels?.singular_name ?? defaultName\n\t\t);\n\n\t\tspeak( termAddedMessage, 'assertive' );\n\t\tonUpdateTerms( newTermIds );\n\t}\n\n\tconst newTermLabel =\n\t\ttaxonomy?.labels?.add_new_item ??\n\t\t( slug === 'post_tag' ? __( 'Add new tag' ) : __( 'Add new Term' ) );\n\tconst singularName =\n\t\ttaxonomy?.labels?.singular_name ??\n\t\t( slug === 'post_tag' ? __( 'Tag' ) : __( 'Term' ) );\n\tconst termAddedLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( '%s added', 'term' ),\n\t\tsingularName\n\t);\n\tconst termRemovedLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( '%s removed', 'term' ),\n\t\tsingularName\n\t);\n\tconst removeTermLabel = sprintf(\n\t\t/* translators: %s: term name. */\n\t\t_x( 'Remove %s', 'term' ),\n\t\tsingularName\n\t);\n\n\treturn (\n\t\t<Wrapper __nextHasNoMarginBottom={ __nextHasNoMarginBottom }>\n\t\t\t<FormTokenField\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvalue={ values }\n\t\t\t\tsuggestions={ suggestions }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonInputChange={ debouncedSearch }\n\t\t\t\tmaxSuggestions={ MAX_TERMS_SUGGESTIONS }\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\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t/>\n\t\t\t<MostUsedTerms taxonomy={ taxonomy } onSelect={ appendTerm } />\n\t\t</Wrapper>\n\t);\n}\n\nexport default withFilters( 'editor.PostTaxonomyType' )( FlatTermSelector );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport FlatTermSelector from '../post-taxonomies/flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst TagsPanel = () => {\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Add tags' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\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\t) }\n\t\t\t</p>\n\t\t\t<FlatTermSelector slug=\"post_tag\" __nextHasNoMarginBottom />\n\t\t</PanelBody>\n\t);\n};\n\nconst MaybeTagsPanel = () => {\n\tconst { hasTags, isPostTypeSupported } = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst tagsTaxonomy = select( coreStore ).getTaxonomy( 'post_tag' );\n\t\tconst _isPostTypeSupported = tagsTaxonomy?.types?.includes( postType );\n\t\tconst areTagsFetched = tagsTaxonomy !== undefined;\n\t\tconst tags =\n\t\t\ttagsTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\ttagsTaxonomy.rest_base\n\t\t\t);\n\t\treturn {\n\t\t\thasTags: !! tags?.length,\n\t\t\tisPostTypeSupported: areTagsFetched && _isPostTypeSupported,\n\t\t};\n\t}, [] );\n\tconst [ hadTagsWhenOpeningThePanel ] = useState( hasTags );\n\n\tif ( ! isPostTypeSupported ) {\n\t\treturn null;\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\tif ( ! hadTagsWhenOpeningThePanel ) {\n\t\treturn <TagsPanel />;\n\t}\n\n\treturn null;\n};\n\nexport default MaybeTagsPanel;\n","/**\n * WordPress dependencies\n */\nimport { Button, PanelBody } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { POST_FORMATS } from '../post-format';\nimport { store as editorStore } from '../../store';\n\nconst getSuggestion = ( supportedFormats, suggestedPostFormat ) => {\n\tconst formats = POST_FORMATS.filter( ( format ) =>\n\t\tsupportedFormats?.includes( format.id )\n\t);\n\treturn formats.find( ( format ) => format.id === suggestedPostFormat );\n};\n\nconst PostFormatSuggestion = ( {\n\tsuggestedPostFormat,\n\tsuggestionText,\n\tonUpdatePostFormat,\n} ) => (\n\t<Button\n\t\t__next40pxDefaultSize\n\t\tvariant=\"link\"\n\t\tonClick={ () => onUpdatePostFormat( suggestedPostFormat ) }\n\t>\n\t\t{ suggestionText }\n\t</Button>\n);\n\nexport default function PostFormatPanel() {\n\tconst { currentPostFormat, suggestion } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getSuggestedPostFormat } =\n\t\t\tselect( editorStore );\n\t\tconst supportedFormats =\n\t\t\tselect( coreStore ).getThemeSupports().formats ?? [];\n\t\treturn {\n\t\t\tcurrentPostFormat: getEditedPostAttribute( 'format' ),\n\t\t\tsuggestion: getSuggestion(\n\t\t\t\tsupportedFormats,\n\t\t\t\tgetSuggestedPostFormat()\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { editPost } = useDispatch( editorStore );\n\n\tconst onUpdatePostFormat = ( format ) => editPost( { format } );\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Use a post format' ) }\n\t\t</span>,\n\t];\n\n\tif ( ! suggestion || suggestion.id === currentPostFormat ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\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\t) }\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/* translators: %s: post format */\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","/**\n * WordPress dependencies\n */\nimport { __, _n, _x, sprintf } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport {\n\tButton,\n\tCheckboxControl,\n\tTextControl,\n\tTreeSelect,\n\twithFilters,\n\tFlex,\n\tFlexItem,\n\tSearchControl,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useDebounce } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { speak } from '@wordpress/a11y';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { buildTermsTree } from '../../utils/terms';\nimport { store as editorStore } from '../../store';\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\tcontext: 'view',\n};\n\nconst MIN_TERMS_COUNT_FOR_FILTER = 8;\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Sort Terms by Selected.\n *\n * @param {Object[]} termsTree Array of terms in tree format.\n * @param {number[]} terms Selected terms.\n *\n * @return {Object[]} Sorted array of terms.\n */\nexport function sortBySelected( termsTree, terms ) {\n\tconst treeHasSelection = ( termTree ) => {\n\t\tif ( terms.indexOf( termTree.id ) !== -1 ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( undefined === termTree.children ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn (\n\t\t\ttermTree.children\n\t\t\t\t.map( treeHasSelection )\n\t\t\t\t.filter( ( child ) => child ).length > 0\n\t\t);\n\t};\n\tconst termOrChildIsSelected = ( termA, termB ) => {\n\t\tconst termASelected = treeHasSelection( termA );\n\t\tconst termBSelected = treeHasSelection( termB );\n\n\t\tif ( termASelected === termBSelected ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif ( termASelected && ! termBSelected ) {\n\t\t\treturn -1;\n\t\t}\n\n\t\tif ( ! termASelected && termBSelected ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t};\n\tconst newTermTree = [ ...termsTree ];\n\tnewTermTree.sort( termOrChildIsSelected );\n\treturn newTermTree;\n}\n\n/**\n * Find term by parent id or name.\n *\n * @param {Object[]} terms Array of Terms.\n * @param {number|string} parent id.\n * @param {string} name Term name.\n * @return {Object} Term object.\n */\nexport function findTerm( terms, parent, name ) {\n\treturn terms.find( ( term ) => {\n\t\treturn (\n\t\t\t( ( ! term.parent && ! parent ) ||\n\t\t\t\tparseInt( term.parent ) === parseInt( parent ) ) &&\n\t\t\tterm.name.toLowerCase() === name.toLowerCase()\n\t\t);\n\t} );\n}\n\n/**\n * Get filter matcher function.\n *\n * @param {string} filterValue Filter value.\n * @return {(function(Object): (Object|boolean))} Matcher function.\n */\nexport function getFilterMatcher( filterValue ) {\n\tconst matchTermsForFilter = ( originalTerm ) => {\n\t\tif ( '' === filterValue ) {\n\t\t\treturn originalTerm;\n\t\t}\n\n\t\t// Shallow clone, because we'll be filtering the term's children and\n\t\t// don't want to modify the original term.\n\t\tconst term = { ...originalTerm };\n\n\t\t// Map and filter the children, recursive so we deal with grandchildren\n\t\t// and any deeper levels.\n\t\tif ( term.children.length > 0 ) {\n\t\t\tterm.children = term.children\n\t\t\t\t.map( matchTermsForFilter )\n\t\t\t\t.filter( ( child ) => child );\n\t\t}\n\n\t\t// If the term's name contains the filterValue, or it has children\n\t\t// (i.e. some child matched at some point in the tree) then return it.\n\t\tif (\n\t\t\t-1 !==\n\t\t\t\tterm.name.toLowerCase().indexOf( filterValue.toLowerCase() ) ||\n\t\t\tterm.children.length > 0\n\t\t) {\n\t\t\treturn term;\n\t\t}\n\n\t\t// Otherwise, return false. After mapping, the list of terms will need\n\t\t// to have false values filtered out.\n\t\treturn false;\n\t};\n\treturn matchTermsForFilter;\n}\n\n/**\n * Hierarchical term selector.\n *\n * @param {Object} props Component props.\n * @param {string} props.slug Taxonomy slug.\n * @return {Element} Hierarchical term selector component.\n */\nexport function HierarchicalTermSelector( { slug } ) {\n\tconst [ adding, setAdding ] = useState( false );\n\tconst [ formName, setFormName ] = useState( '' );\n\t/**\n\t * @type {[number|'', Function]}\n\t */\n\tconst [ formParent, setFormParent ] = useState( '' );\n\tconst [ showForm, setShowForm ] = useState( false );\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ filteredTermsTree, setFilteredTermsTree ] = useState( [] );\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\tconst {\n\t\thasCreateAction,\n\t\thasAssignAction,\n\t\tterms,\n\t\tloading,\n\t\tavailableTerms,\n\t\ttaxonomy,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCurrentPost, getEditedPostAttribute } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getTaxonomy, getEntityRecords, isResolving } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst _taxonomy = getTaxonomy( slug );\n\t\t\tconst post = getCurrentPost();\n\n\t\t\treturn {\n\t\t\t\thasCreateAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-create-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\thasAssignAction: _taxonomy\n\t\t\t\t\t? post._links?.[\n\t\t\t\t\t\t\t'wp:action-assign-' + _taxonomy.rest_base\n\t\t\t\t\t ] ?? false\n\t\t\t\t\t: false,\n\t\t\t\tterms: _taxonomy\n\t\t\t\t\t? getEditedPostAttribute( _taxonomy.rest_base )\n\t\t\t\t\t: EMPTY_ARRAY,\n\t\t\t\tloading: isResolving( 'getEntityRecords', [\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\tslug,\n\t\t\t\t\tDEFAULT_QUERY,\n\t\t\t\t] ),\n\t\t\t\tavailableTerms:\n\t\t\t\t\tgetEntityRecords( 'taxonomy', slug, DEFAULT_QUERY ) ||\n\t\t\t\t\tEMPTY_ARRAY,\n\t\t\t\ttaxonomy: _taxonomy,\n\t\t\t};\n\t\t},\n\t\t[ slug ]\n\t);\n\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst availableTermsTree = useMemo(\n\t\t() => sortBySelected( buildTermsTree( availableTerms ), terms ),\n\t\t// Remove `terms` from the dependency list to avoid reordering every time\n\t\t// checking or unchecking a term.\n\t\t[ availableTerms ]\n\t);\n\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tif ( ! hasAssignAction ) {\n\t\treturn null;\n\t}\n\n\t/**\n\t * Append new term.\n\t *\n\t * @param {Object} term Term object.\n\t * @return {Promise} A promise that resolves to save term object.\n\t */\n\tconst addTerm = ( term ) => {\n\t\treturn saveEntityRecord( 'taxonomy', slug, term, {\n\t\t\tthrowOnError: true,\n\t\t} );\n\t};\n\n\t/**\n\t * Update terms for post.\n\t *\n\t * @param {number[]} termIds Term ids.\n\t */\n\tconst onUpdateTerms = ( termIds ) => {\n\t\teditPost( { [ taxonomy.rest_base ]: termIds } );\n\t};\n\n\t/**\n\t * Handler for checking term.\n\t *\n\t * @param {number} termId\n\t */\n\tconst onChange = ( termId ) => {\n\t\tconst hasTerm = terms.includes( termId );\n\t\tconst newTerms = hasTerm\n\t\t\t? terms.filter( ( id ) => id !== termId )\n\t\t\t: [ ...terms, termId ];\n\t\tonUpdateTerms( newTerms );\n\t};\n\n\tconst onChangeFormName = ( value ) => {\n\t\tsetFormName( value );\n\t};\n\n\t/**\n\t * Handler for changing form parent.\n\t *\n\t * @param {number|''} parentId Parent post id.\n\t */\n\tconst onChangeFormParent = ( parentId ) => {\n\t\tsetFormParent( parentId );\n\t};\n\n\tconst onToggleForm = () => {\n\t\tsetShowForm( ! showForm );\n\t};\n\n\tconst onAddTerm = async ( event ) => {\n\t\tevent.preventDefault();\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 = 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 ( ! terms.some( ( term ) => term === existingTerm.id ) ) {\n\t\t\t\tonUpdateTerms( [ ...terms, existingTerm.id ] );\n\t\t\t}\n\n\t\t\tsetFormName( '' );\n\t\t\tsetFormParent( '' );\n\n\t\t\treturn;\n\t\t}\n\t\tsetAdding( true );\n\t\tlet newTerm;\n\t\ttry {\n\t\t\tnewTerm = await addTerm( {\n\t\t\t\tname: formName,\n\t\t\t\tparent: formParent ? formParent : undefined,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice( error.message, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\t\tconst defaultName =\n\t\t\tslug === 'category' ? __( 'Category' ) : __( 'Term' );\n\t\tconst termAddedMessage = sprintf(\n\t\t\t/* translators: %s: term name. */\n\t\t\t_x( '%s added', 'term' ),\n\t\t\ttaxonomy?.labels?.singular_name ?? defaultName\n\t\t);\n\t\tspeak( termAddedMessage, 'assertive' );\n\t\tsetAdding( false );\n\t\tsetFormName( '' );\n\t\tsetFormParent( '' );\n\t\tonUpdateTerms( [ ...terms, newTerm.id ] );\n\t};\n\n\tconst setFilter = ( value ) => {\n\t\tconst newFilteredTermsTree = availableTermsTree\n\t\t\t.map( getFilterMatcher( value ) )\n\t\t\t.filter( ( term ) => term );\n\t\tconst getResultCount = ( termsTree ) => {\n\t\t\tlet count = 0;\n\t\t\tfor ( let i = 0; i < termsTree.length; i++ ) {\n\t\t\t\tcount++;\n\t\t\t\tif ( undefined !== termsTree[ i ].children ) {\n\t\t\t\t\tcount += getResultCount( termsTree[ i ].children );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn count;\n\t\t};\n\n\t\tsetFilterValue( value );\n\t\tsetFilteredTermsTree( newFilteredTermsTree );\n\n\t\tconst resultCount = getResultCount( newFilteredTermsTree );\n\t\tconst resultsFoundMessage = sprintf(\n\t\t\t/* translators: %d: number of results. */\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\tconst renderTerms = ( renderedTerms ) => {\n\t\treturn renderedTerms.map( ( term ) => {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tkey={ term.id }\n\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-choice\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tchecked={ terms.indexOf( term.id ) !== -1 }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tconst termId = parseInt( term.id, 10 );\n\t\t\t\t\t\t\tonChange( termId );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tlabel={ decodeEntities( term.name ) }\n\t\t\t\t\t/>\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{ 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\tconst labelWithFallback = (\n\t\tlabelProperty,\n\t\tfallbackIsCategory,\n\t\tfallbackIsNotCategory\n\t) =>\n\t\ttaxonomy?.labels?.[ labelProperty ] ??\n\t\t( slug === 'category' ? fallbackIsCategory : fallbackIsNotCategory );\n\n\tconst newTermButtonLabel = labelWithFallback(\n\t\t'add_new_item',\n\t\t__( 'Add new category' ),\n\t\t__( 'Add new term' )\n\t);\n\tconst newTermLabel = labelWithFallback(\n\t\t'new_item_name',\n\t\t__( 'Add new category' ),\n\t\t__( 'Add new term' )\n\t);\n\tconst parentSelectLabel = labelWithFallback(\n\t\t'parent_item',\n\t\t__( 'Parent Category' ),\n\t\t__( 'Parent Term' )\n\t);\n\tconst noParentOption = `— ${ parentSelectLabel } —`;\n\tconst newTermSubmitLabel = newTermButtonLabel;\n\tconst filterLabel = taxonomy?.labels?.search_items ?? __( 'Search Terms' );\n\tconst groupLabel = taxonomy?.name ?? __( 'Terms' );\n\tconst showFilter = availableTerms.length >= MIN_TERMS_COUNT_FOR_FILTER;\n\n\treturn (\n\t\t<Flex direction=\"column\" gap=\"4\">\n\t\t\t{ showFilter && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ filterLabel }\n\t\t\t\t\tplaceholder={ filterLabel }\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ setFilter }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div\n\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-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{ renderTerms(\n\t\t\t\t\t'' !== filterValue ? filteredTermsTree : availableTermsTree\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ ! loading && hasCreateAction && (\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tonClick={ onToggleForm }\n\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-add\"\n\t\t\t\t\t\taria-expanded={ showForm }\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ newTermButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t) }\n\t\t\t{ showForm && (\n\t\t\t\t<form onSubmit={ onAddTerm }>\n\t\t\t\t\t<Flex direction=\"column\" gap=\"4\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-input\"\n\t\t\t\t\t\t\tlabel={ newTermLabel }\n\t\t\t\t\t\t\tvalue={ formName }\n\t\t\t\t\t\t\tonChange={ onChangeFormName }\n\t\t\t\t\t\t\trequired\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ !! availableTerms.length && (\n\t\t\t\t\t\t\t<TreeSelect\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tlabel={ parentSelectLabel }\n\t\t\t\t\t\t\t\tnoOptionLabel={ noParentOption }\n\t\t\t\t\t\t\t\tonChange={ onChangeFormParent }\n\t\t\t\t\t\t\t\tselectedId={ formParent }\n\t\t\t\t\t\t\t\ttree={ availableTermsTree }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\tclassName=\"editor-post-taxonomies__hierarchical-terms-submit\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ newTermSubmitLabel }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t</form>\n\t\t\t) }\n\t\t</Flex>\n\t);\n}\n\nexport default withFilters( 'editor.PostTaxonomyType' )(\n\tHierarchicalTermSelector\n);\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { PanelBody } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from '../post-taxonomies/hierarchical-term-selector';\nimport { store as editorStore } from '../../store';\n\nfunction MaybeCategoryPanel() {\n\tconst hasNoCategory = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst { canUser, getEntityRecord, getTaxonomy } = select( coreStore );\n\t\tconst categoriesTaxonomy = getTaxonomy( 'category' );\n\t\tconst defaultCategoryId = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )?.default_category\n\t\t\t: undefined;\n\t\tconst defaultCategory = defaultCategoryId\n\t\t\t? getEntityRecord( 'taxonomy', 'category', defaultCategoryId )\n\t\t\t: undefined;\n\t\tconst postTypeSupportsCategories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tcategoriesTaxonomy.types.some( ( type ) => type === postType );\n\t\tconst categories =\n\t\t\tcategoriesTaxonomy &&\n\t\t\tselect( editorStore ).getEditedPostAttribute(\n\t\t\t\tcategoriesTaxonomy.rest_base\n\t\t\t);\n\n\t\t// This boolean should return true if everything is loaded\n\t\t// ( categoriesTaxonomy, defaultCategory )\n\t\t// and the post has not been assigned a category different than \"uncategorized\".\n\t\treturn (\n\t\t\t!! categoriesTaxonomy &&\n\t\t\t!! defaultCategory &&\n\t\t\tpostTypeSupportsCategories &&\n\t\t\t( categories?.length === 0 ||\n\t\t\t\t( categories?.length === 1 &&\n\t\t\t\t\tdefaultCategory?.id === categories[ 0 ] ) )\n\t\t);\n\t}, [] );\n\tconst [ shouldShowPanel, setShouldShowPanel ] = useState( false );\n\tuseEffect( () => {\n\t\t// We use state to avoid hiding the panel if the user edits the categories\n\t\t// and adds one within the panel itself (while visible).\n\t\tif ( hasNoCategory ) {\n\t\t\tsetShouldShowPanel( true );\n\t\t}\n\t}, [ hasNoCategory ] );\n\n\tif ( ! shouldShowPanel ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'Assign a category' ) }\n\t\t</span>,\n\t];\n\n\treturn (\n\t\t<PanelBody initialOpen={ false } title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Categories provide a helpful way to group related posts together and to quickly tell readers what a post is about.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<HierarchicalTermSelector slug=\"category\" />\n\t\t</PanelBody>\n\t);\n}\n\nexport default MaybeCategoryPanel;\n","/**\n * WordPress dependencies\n */\nimport {\n\tPanelBody,\n\tButton,\n\tSpinner,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState } from '@wordpress/element';\nimport { isBlobURL } from '@wordpress/blob';\n\n/**\n * Internal dependencies\n */\nimport { fetchMedia } from './media-util';\n\nfunction flattenBlocks( blocks ) {\n\tconst result = [];\n\n\tblocks.forEach( ( block ) => {\n\t\tresult.push( block );\n\t\tresult.push( ...flattenBlocks( block.innerBlocks ) );\n\t} );\n\n\treturn result;\n}\n\n/**\n * Determine whether a block has external media.\n *\n * Different blocks use different attribute names (and potentially\n * different logic as well) in determining whether the media is\n * present, and whether it's external.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {boolean?} Whether the block has external media\n */\nfunction hasExternalMedia( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\treturn block.attributes.url && ! block.attributes.id;\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\treturn block.attributes.mediaUrl && ! block.attributes.mediaId;\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Retrieve media info from a block.\n *\n * Different blocks use different attribute names, so we need this\n * function to normalize things into a consistent naming scheme.\n *\n * @param {{name: string, attributes: Object}} block The block.\n * @return {{url: ?string, alt: ?string, id: ?number}} The media info for the block.\n */\nfunction getMediaInfo( block ) {\n\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\tconst { url, alt, id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\tif ( block.name === 'core/media-text' ) {\n\t\tconst { mediaUrl: url, mediaAlt: alt, mediaId: id } = block.attributes;\n\t\treturn { url, alt, id };\n\t}\n\n\treturn {};\n}\n\n// Image component to represent a single image in the upload dialog.\nfunction Image( { clientId, alt, url } ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn (\n\t\t<motion.img\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\taria-label={ __( 'Select image block.' ) }\n\t\t\tonClick={ () => {\n\t\t\t\tselectBlock( clientId );\n\t\t\t} }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.key === 'Enter' || event.key === ' ' ) {\n\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tkey={ clientId }\n\t\t\talt={ alt }\n\t\t\tsrc={ url }\n\t\t\tanimate={ { opacity: 1 } }\n\t\t\texit={ { opacity: 0, scale: 0 } }\n\t\t\tstyle={ {\n\t\t\t\twidth: '32px',\n\t\t\t\theight: '32px',\n\t\t\t\tobjectFit: 'cover',\n\t\t\t\tborderRadius: '2px',\n\t\t\t\tcursor: 'pointer',\n\t\t\t} }\n\t\t\twhileHover={ { scale: 1.08 } }\n\t\t/>\n\t);\n}\n\nexport default function MaybeUploadMediaPanel() {\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\tconst [ isAnimating, setIsAnimating ] = useState( false );\n\tconst [ hadUploadError, setHadUploadError ] = useState( false );\n\tconst { editorBlocks, mediaUpload } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorBlocks: select( blockEditorStore ).getBlocks(),\n\t\t\tmediaUpload: select( blockEditorStore ).getSettings().mediaUpload,\n\t\t} ),\n\t\t[]\n\t);\n\n\t// Get a list of blocks with external media.\n\tconst blocksWithExternalMedia = flattenBlocks( editorBlocks ).filter(\n\t\t( block ) => hasExternalMedia( block )\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\tif ( ! mediaUpload || ! blocksWithExternalMedia.length ) {\n\t\treturn null;\n\t}\n\n\tconst panelBodyTitle = [\n\t\t__( 'Suggestion:' ),\n\t\t<span className=\"editor-post-publish-panel__link\" key=\"label\">\n\t\t\t{ __( 'External media' ) }\n\t\t</span>,\n\t];\n\n\t/**\n\t * Update an individual block to point to newly-added library media.\n\t *\n\t * Different blocks use different attribute names, so we need this\n\t * function to ensure we modify the correct attributes for each type.\n\t *\n\t * @param {{name: string, attributes: Object}} block The block.\n\t * @param {{id: number, url: string}} media Media library file info.\n\t */\n\tfunction updateBlockWithUploadedMedia( block, media ) {\n\t\tif ( block.name === 'core/image' || block.name === 'core/cover' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tid: media.id,\n\t\t\t\turl: media.url,\n\t\t\t} );\n\t\t}\n\n\t\tif ( block.name === 'core/media-text' ) {\n\t\t\tupdateBlockAttributes( block.clientId, {\n\t\t\t\tmediaId: media.id,\n\t\t\t\tmediaUrl: media.url,\n\t\t\t} );\n\t\t}\n\t}\n\n\t// Handle fetching and uploading all external media in the post.\n\tfunction uploadImages() {\n\t\tsetIsUploading( true );\n\t\tsetHadUploadError( false );\n\n\t\t// Multiple blocks can be using the same URL, so we\n\t\t// should ensure we only fetch and upload each of them once.\n\t\tconst mediaUrls = new Set(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\t\t\t\treturn url;\n\t\t\t} )\n\t\t);\n\n\t\t// Create an upload promise for each URL, that we can wait for in all\n\t\t// blocks that make use of that media.\n\t\tconst uploadPromises = Object.fromEntries(\n\t\t\tObject.entries( fetchMedia( [ ...mediaUrls ] ) ).map(\n\t\t\t\t( [ url, filePromise ] ) => {\n\t\t\t\t\tconst uploadPromise = filePromise.then(\n\t\t\t\t\t\t( blob ) =>\n\t\t\t\t\t\t\tnew Promise( ( resolve, reject ) => {\n\t\t\t\t\t\t\t\tmediaUpload( {\n\t\t\t\t\t\t\t\t\tfilesList: [ blob ],\n\t\t\t\t\t\t\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\t\t\t\t\t\t\tif ( isBlobURL( media.url ) ) {\n\t\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tresolve( media );\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tonError() {\n\t\t\t\t\t\t\t\t\t\treject();\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} )\n\t\t\t\t\t);\n\n\t\t\t\t\treturn [ url, uploadPromise ];\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\n\t\t// Wait for all blocks to be updated with library media.\n\t\tPromise.allSettled(\n\t\t\tblocksWithExternalMedia.map( ( block ) => {\n\t\t\t\tconst { url } = getMediaInfo( block );\n\n\t\t\t\treturn uploadPromises[ url ]\n\t\t\t\t\t.then( ( media ) =>\n\t\t\t\t\t\tupdateBlockWithUploadedMedia( block, media )\n\t\t\t\t\t)\n\t\t\t\t\t.then( () => setIsAnimating( true ) )\n\t\t\t\t\t.catch( () => setHadUploadError( true ) );\n\t\t\t} )\n\t\t).finally( () => {\n\t\t\tsetIsUploading( false );\n\t\t} );\n\t}\n\n\treturn (\n\t\t<PanelBody initialOpen title={ panelBodyTitle }>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Upload external images to the Media Library. Images from different domains may load slowly, display incorrectly, or be removed unexpectedly.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<div\n\t\t\t\tstyle={ {\n\t\t\t\t\tdisplay: 'inline-flex',\n\t\t\t\t\tflexWrap: 'wrap',\n\t\t\t\t\tgap: '8px',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<AnimatePresence\n\t\t\t\t\tonExitComplete={ () => setIsAnimating( false ) }\n\t\t\t\t>\n\t\t\t\t\t{ blocksWithExternalMedia.map( ( block ) => {\n\t\t\t\t\t\tconst { url, alt } = getMediaInfo( block );\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Image\n\t\t\t\t\t\t\t\tkey={ block.clientId }\n\t\t\t\t\t\t\t\tclientId={ block.clientId }\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\talt={ alt }\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</AnimatePresence>\n\t\t\t\t{ isUploading || isAnimating ? (\n\t\t\t\t\t<Spinner />\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ uploadImages }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x( 'Upload', 'verb' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ hadUploadError && <p>{ __( 'Upload failed, try again.' ) }</p> }\n\t\t</PanelBody>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { getFilename } from '@wordpress/url';\n\n/**\n * Generate a list of unique basenames given a list of URLs.\n *\n * We want all basenames to be unique, since sometimes the extension\n * doesn't reflect the mime type, and may end up getting changed by\n * the server, on upload.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, string >} A URL => basename record.\n */\nexport function generateUniqueBasenames( urls ) {\n\tconst basenames = new Set();\n\n\treturn Object.fromEntries(\n\t\turls.map( ( url ) => {\n\t\t\t// We prefer to match the remote filename, if possible.\n\t\t\tconst filename = getFilename( url );\n\t\t\tlet basename = '';\n\n\t\t\tif ( filename ) {\n\t\t\t\tconst parts = filename.split( '.' );\n\t\t\t\tif ( parts.length > 1 ) {\n\t\t\t\t\t// Assume the last part is the extension.\n\t\t\t\t\tparts.pop();\n\t\t\t\t}\n\t\t\t\tbasename = parts.join( '.' );\n\t\t\t}\n\n\t\t\tif ( ! basename ) {\n\t\t\t\t// It looks like we don't have a basename, so let's use a UUID.\n\t\t\t\tbasename = uuid();\n\t\t\t}\n\n\t\t\tif ( basenames.has( basename ) ) {\n\t\t\t\t// Append a UUID to deduplicate the basename.\n\t\t\t\t// The server will try to deduplicate on its own if we don't do this,\n\t\t\t\t// but it may run into a race condition\n\t\t\t\t// (see https://github.com/WordPress/gutenberg/issues/64899).\n\t\t\t\t// Deduplicating the filenames before uploading is safer.\n\t\t\t\tbasename = `${ basename }-${ uuid() }`;\n\t\t\t}\n\n\t\t\tbasenames.add( basename );\n\n\t\t\treturn [ url, basename ];\n\t\t} )\n\t);\n}\n\n/**\n * Fetch a list of URLs, turning those into promises for files with\n * unique filenames.\n *\n * @param {string[]} urls The list of URLs\n * @return {Record< string, Promise< File > >} A URL => File promise record.\n */\nexport function fetchMedia( urls ) {\n\treturn Object.fromEntries(\n\t\tObject.entries( generateUniqueBasenames( urls ) ).map(\n\t\t\t( [ url, basename ] ) => {\n\t\t\t\tconst filePromise = window\n\t\t\t\t\t.fetch( url.includes( '?' ) ? url : url + '?' )\n\t\t\t\t\t.then( ( response ) => response.blob() )\n\t\t\t\t\t.then( ( blob ) => {\n\t\t\t\t\t\t// The server will reject the upload if it doesn't have an extension,\n\t\t\t\t\t\t// even though it'll rewrite the file name to match the mime type.\n\t\t\t\t\t\t// Here we provide it with a safe extension to get it past that check.\n\t\t\t\t\t\treturn new File( [ blob ], `${ basename }.png`, {\n\t\t\t\t\t\t\ttype: blob.type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\n\t\t\t\treturn [ url, filePromise ];\n\t\t\t}\n\t\t)\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, PanelBody } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { wordpress } from '@wordpress/icons';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\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';\nimport { store as editorStore } from '../../store';\nimport MaybeCategoryPanel from './maybe-category-panel';\nimport MaybeUploadMedia from './maybe-upload-media';\n\nfunction PostPublishPanelPrepublish( { children } ) {\n\tconst {\n\t\tisBeingScheduled,\n\t\tisRequestingSiteIcon,\n\t\thasPublishAction,\n\t\tsiteIconUrl,\n\t\tsiteTitle,\n\t\tsiteHome,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentPost, isEditedPostBeingScheduled } =\n\t\t\tselect( editorStore );\n\t\tconst { getEntityRecord, isResolving } = select( coreStore );\n\t\tconst siteData =\n\t\t\tgetEntityRecord( 'root', '__unstableBase', undefined ) || {};\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisBeingScheduled: isEditedPostBeingScheduled(),\n\t\t\tisRequestingSiteIcon: isResolving( 'getEntityRecord', [\n\t\t\t\t'root',\n\t\t\t\t'__unstableBase',\n\t\t\t\tundefined,\n\t\t\t] ),\n\t\t\tsiteIconUrl: siteData.site_icon_url,\n\t\t\tsiteTitle: siteData.name,\n\t\t\tsiteHome: siteData.home && filterURLForDisplay( siteData.home ),\n\t\t};\n\t}, [] );\n\n\tlet siteIcon = (\n\t\t<Icon className=\"components-site-icon\" size=\"36px\" icon={ wordpress } />\n\t);\n\n\tif ( siteIconUrl ) {\n\t\tsiteIcon = (\n\t\t\t<img\n\t\t\t\talt={ __( 'Site Icon' ) }\n\t\t\t\tclassName=\"components-site-icon\"\n\t\t\t\tsrc={ siteIconUrl }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isRequestingSiteIcon ) {\n\t\tsiteIcon = null;\n\t}\n\n\tlet prePublishTitle, prePublishBodyText;\n\n\tif ( ! hasPublishAction ) {\n\t\tprePublishTitle = __( 'Are you ready to submit for review?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be reviewed and then approved.'\n\t\t);\n\t} else if ( isBeingScheduled ) {\n\t\tprePublishTitle = __( 'Are you ready to schedule?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Your work will be published at the specified date and time.'\n\t\t);\n\t} else {\n\t\tprePublishTitle = __( 'Are you ready to publish?' );\n\t\tprePublishBodyText = __(\n\t\t\t'Double-check your settings before publishing.'\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className=\"editor-post-publish-panel__prepublish\">\n\t\t\t<div>\n\t\t\t\t<strong>{ prePublishTitle }</strong>\n\t\t\t</div>\n\t\t\t<p>{ prePublishBodyText }</p>\n\t\t\t<div className=\"components-site-card\">\n\t\t\t\t{ siteIcon }\n\t\t\t\t<div className=\"components-site-info\">\n\t\t\t\t\t<span className=\"components-site-name\">\n\t\t\t\t\t\t{ decodeEntities( siteTitle ) || __( '(Untitled)' ) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"components-site-home\">{ siteHome }</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<MaybeUploadMedia />\n\t\t\t{ hasPublishAction && (\n\t\t\t\t<>\n\t\t\t\t\t<PanelBody\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Visibility:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostVisibilityLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\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\n\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\ttitle={ [\n\t\t\t\t\t\t\t__( 'Publish:' ),\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"editor-post-publish-panel__link\"\n\t\t\t\t\t\t\t\tkey=\"label\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PostScheduleLabel />\n\t\t\t\t\t\t\t</span>,\n\t\t\t\t\t\t] }\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</>\n\t\t\t) }\n\t\t\t<MaybePostFormatPanel />\n\t\t\t<MaybeTagsPanel />\n\t\t\t<MaybeCategoryPanel />\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PostPublishPanelPrepublish;\n","/**\n * WordPress dependencies\n */\nimport { PanelBody, Button, TextControl } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useEffect, useState, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { addQueryArgs, safeDecodeURIComponent } from '@wordpress/url';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleLabel from '../post-schedule/label';\nimport { store as editorStore } from '../../store';\n\nconst POSTNAME = '%postname%';\nconst PAGENAME = '%pagename%';\n\n/**\n * Returns URL for a future post.\n *\n * @param {Object} post Post object.\n *\n * @return {string} PostPublish URL.\n */\n\nconst getFuturePostUrl = ( post ) => {\n\tconst { slug } = post;\n\n\tif ( post.permalink_template.includes( POSTNAME ) ) {\n\t\treturn post.permalink_template.replace( POSTNAME, slug );\n\t}\n\n\tif ( post.permalink_template.includes( PAGENAME ) ) {\n\t\treturn post.permalink_template.replace( PAGENAME, slug );\n\t}\n\n\treturn post.permalink_template;\n};\n\nfunction CopyButton( { text } ) {\n\tconst [ showCopyConfirmation, setShowCopyConfirmation ] = useState( false );\n\tconst timeoutIdRef = useRef();\n\tconst ref = useCopyToClipboard( text, () => {\n\t\tsetShowCopyConfirmation( true );\n\t\tif ( timeoutIdRef.current ) {\n\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t}\n\t\ttimeoutIdRef.current = setTimeout( () => {\n\t\t\tsetShowCopyConfirmation( false );\n\t\t}, 4000 );\n\t} );\n\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( timeoutIdRef.current ) {\n\t\t\t\tclearTimeout( timeoutIdRef.current );\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Button __next40pxDefaultSize variant=\"secondary\" ref={ ref }>\n\t\t\t{ showCopyConfirmation ? __( 'Copied!' ) : __( 'Copy' ) }\n\t\t</Button>\n\t);\n}\n\nexport default function PostPublishPanelPostpublish( {\n\tfocusOnMount,\n\tchildren,\n} ) {\n\tconst { post, postType, isScheduled } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditedPostAttribute,\n\t\t\tgetCurrentPost,\n\t\t\tisCurrentPostScheduled,\n\t\t} = select( editorStore );\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpost: getCurrentPost(),\n\t\t\tpostType: getPostType( getEditedPostAttribute( 'type' ) ),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst postLabel = postType?.labels?.singular_name;\n\tconst viewPostLabel = postType?.labels?.view_item;\n\tconst addNewPostLabel = postType?.labels?.add_new_item;\n\tconst link =\n\t\tpost.status === 'future' ? getFuturePostUrl( post ) : post.link;\n\tconst addLink = addQueryArgs( 'post-new.php', {\n\t\tpost_type: post.type,\n\t} );\n\n\tconst postLinkRef = useCallback(\n\t\t( node ) => {\n\t\t\tif ( focusOnMount && node ) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t},\n\t\t[ focusOnMount ]\n\t);\n\n\tconst postPublishNonLinkHeader = isScheduled ? (\n\t\t<>\n\t\t\t{ __( 'is now scheduled. It will go live on' ) }{ ' ' }\n\t\t\t<PostScheduleLabel />.\n\t\t</>\n\t) : (\n\t\t__( 'is now live.' )\n\t);\n\n\treturn (\n\t\t<div className=\"post-publish-panel__postpublish\">\n\t\t\t<PanelBody className=\"post-publish-panel__postpublish-header\">\n\t\t\t\t<a ref={ postLinkRef } href={ link }>\n\t\t\t\t\t{ decodeEntities( post.title ) || __( '(no title)' ) }\n\t\t\t\t</a>{ ' ' }\n\t\t\t\t{ postPublishNonLinkHeader }\n\t\t\t</PanelBody>\n\t\t\t<PanelBody>\n\t\t\t\t<p className=\"post-publish-panel__postpublish-subheader\">\n\t\t\t\t\t<strong>{ __( 'What’s next?' ) }</strong>\n\t\t\t\t</p>\n\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address-container\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\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' ),\n\t\t\t\t\t\t\tpostLabel\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tvalue={ safeDecodeURIComponent( link ) }\n\t\t\t\t\t\tonFocus={ ( event ) => event.target.select() }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<div className=\"post-publish-panel__postpublish-post-address__copy-button-wrap\">\n\t\t\t\t\t\t<CopyButton text={ link } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"post-publish-panel__postpublish-buttons\">\n\t\t\t\t\t{ ! isScheduled && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\thref={ link }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ viewPostLabel }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant={ isScheduled ? 'primary' : 'secondary' }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\thref={ addLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ addNewPostLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t</PanelBody>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport {\n\tButton,\n\tSpinner,\n\tCheckboxControl,\n\twithFocusReturn,\n\twithConstrainedTabbing,\n} from '@wordpress/components';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { closeSmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from '../post-publish-button';\nimport PostPublishPanelPrepublish from './prepublish';\nimport PostPublishPanelPostpublish from './postpublish';\nimport { store as editorStore } from '../../store';\n\nexport class PostPublishPanel extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSubmit = this.onSubmit.bind( this );\n\t\tthis.cancelButtonNode = createRef();\n\t}\n\n\tcomponentDidMount() {\n\t\t// This timeout is necessary to make sure the `useEffect` hook of\n\t\t// `useFocusReturn` gets the correct element (the button that opens the\n\t\t// PostPublishPanel) otherwise it will get this button.\n\t\tthis.timeoutID = setTimeout( () => {\n\t\t\tthis.cancelButtonNode.current.focus();\n\t\t}, 0 );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tclearTimeout( this.timeoutID );\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 (\n\t\t\t( prevProps.isPublished &&\n\t\t\t\t! this.props.isSaving &&\n\t\t\t\tthis.props.isDirty ) ||\n\t\t\tthis.props.currentPostId !== prevProps.currentPostId\n\t\t) {\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\tisBeingScheduled,\n\t\t\tisPublished,\n\t\t\tisPublishSidebarEnabled,\n\t\t\tisScheduled,\n\t\t\tisSaving,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t\tonClose,\n\t\t\tonTogglePublishSidebar,\n\t\t\tPostPublishExtension,\n\t\t\tPrePublishExtension,\n\t\t\tcurrentPostId,\n\t\t\t...additionalProps\n\t\t} = this.props;\n\t\tconst {\n\t\t\thasPublishAction,\n\t\t\tisDirty,\n\t\t\tisPostTypeViewable,\n\t\t\t...propsForPanel\n\t\t} = additionalProps;\n\t\tconst isPublishedOrScheduled =\n\t\t\tisPublished || ( 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<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\tlabel={ __( 'Close panel' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-cancel-button\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tref={ this.cancelButtonNode }\n\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\tdisabled={ isSavingNonPostEntityChanges }\n\t\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"editor-post-publish-panel__header-publish-button\">\n\t\t\t\t\t\t\t\t<PostPublishButton\n\t\t\t\t\t\t\t\t\tonSubmit={ this.onSubmit }\n\t\t\t\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\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>\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\t__nextHasNoMarginBottom\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\n/**\n * Renders a panel for publishing a post.\n */\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\t\tconst {\n\t\t\tgetCurrentPost,\n\t\t\tgetCurrentPostId,\n\t\t\tgetEditedPostAttribute,\n\t\t\tisCurrentPostPublished,\n\t\t\tisCurrentPostScheduled,\n\t\t\tisEditedPostBeingScheduled,\n\t\t\tisEditedPostDirty,\n\t\t\tisAutosavingPost,\n\t\t\tisSavingPost,\n\t\t\tisSavingNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst { isPublishSidebarEnabled } = select( editorStore );\n\t\tconst postType = getPostType( getEditedPostAttribute( 'type' ) );\n\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\tisPostTypeViewable: postType?.viewable,\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() && ! isAutosavingPost(),\n\t\t\tisSavingNonPostEntityChanges: isSavingNonPostEntityChanges(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\tcurrentPostId: getCurrentPostId(),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { isPublishSidebarEnabled } ) => {\n\t\tconst { disablePublishSidebar, enablePublishSidebar } =\n\t\t\tdispatch( editorStore );\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 * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst cloudUpload = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M17.3 10.1C17.3 7.60001 15.2 5.70001 12.5 5.70001C10.3 5.70001 8.4 7.10001 7.9 9.00001H7.7C5.7 9.00001 4 10.7 4 12.8C4 14.9 5.7 16.6 7.7 16.6H9.5V15.2H7.7C6.5 15.2 5.5 14.1 5.5 12.9C5.5 11.7 6.5 10.5 7.7 10.5H9L9.3 9.40001C9.7 8.10001 11 7.20001 12.5 7.20001C14.3 7.20001 15.8 8.50001 15.8 10.1V11.4L17.1 11.6C17.9 11.7 18.5 12.5 18.5 13.4C18.5 14.4 17.7 15.2 16.8 15.2H14.5V16.6H16.7C18.5 16.6 19.9 15.1 19.9 13.3C20 11.7 18.8 10.4 17.3 10.1Z M14.1245 14.2426L15.1852 13.182L12.0032 10L8.82007 13.1831L9.88072 14.2438L11.25 12.8745V18H12.75V12.8681L14.1245 14.2426Z\" />\n\t</SVG>\n);\n\nexport default cloudUpload;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst cloud = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z\" />\n\t</SVG>\n);\n\nexport default cloud;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a sticky action.\n *\n * @param {Object} props Props.\n * @param {React.ReactElement} props.children Children to be rendered.\n *\n * @return {React.ReactElement} The component to be rendered or null if post type is not 'post' or hasStickyAction is false.\n */\nexport default function PostStickyCheck( { children } ) {\n\tconst { hasStickyAction, postType } = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\treturn {\n\t\t\thasStickyAction: post._links?.[ 'wp:action-sticky' ] ?? false,\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tif ( postType !== 'post' || ! hasStickyAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostStickyCheck from './check';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the PostSticky component. It provides a checkbox control for the sticky post feature.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSticky() {\n\tconst postSticky = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'sticky' ) ?? false\n\t\t);\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\n\treturn (\n\t\t<PostStickyCheck>\n\t\t\t<CheckboxControl\n\t\t\t\tclassName=\"editor-post-sticky__checkbox-control\"\n\t\t\t\tlabel={ __( 'Sticky' ) }\n\t\t\t\thelp={ __( 'Pin this post to the top of the blog' ) }\n\t\t\t\tchecked={ postSticky }\n\t\t\t\tonChange={ () => editPost( { sticky: ! postSticky } ) }\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t/>\n\t\t</PostStickyCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tCheckboxControl,\n\tDropdown,\n\t__experimentalVStack as VStack,\n\tTextControl,\n\tRadioControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport PostSticky from '../post-sticky';\nimport { PrivatePostSchedule } from '../post-schedule';\nimport { store as editorStore } from '../../store';\n\nconst postStatusesInfo = {\n\t'auto-draft': { label: __( 'Draft' ), icon: drafts },\n\tdraft: { label: __( 'Draft' ), icon: drafts },\n\tpending: { label: __( 'Pending' ), icon: pending },\n\tprivate: { label: __( 'Private' ), icon: notAllowed },\n\tfuture: { label: __( 'Scheduled' ), icon: scheduled },\n\tpublish: { label: __( 'Published' ), icon: published },\n};\n\nexport const STATUS_OPTIONS = [\n\t{\n\t\tlabel: __( 'Draft' ),\n\t\tvalue: 'draft',\n\t\tdescription: __( 'Not ready to publish.' ),\n\t},\n\t{\n\t\tlabel: __( 'Pending' ),\n\t\tvalue: 'pending',\n\t\tdescription: __( 'Waiting for review before publishing.' ),\n\t},\n\t{\n\t\tlabel: __( 'Private' ),\n\t\tvalue: 'private',\n\t\tdescription: __( 'Only visible to site admins and editors.' ),\n\t},\n\t{\n\t\tlabel: __( 'Scheduled' ),\n\t\tvalue: 'future',\n\t\tdescription: __( 'Publish automatically on a chosen date.' ),\n\t},\n\t{\n\t\tlabel: __( 'Published' ),\n\t\tvalue: 'publish',\n\t\tdescription: __( 'Visible to everyone.' ),\n\t},\n];\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\nexport default function PostStatus() {\n\tconst { status, date, password, postId, postType, canEdit } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetCurrentPostId,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPost,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tstatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tdate: getEditedPostAttribute( 'date' ),\n\t\t\t\tpassword: getEditedPostAttribute( 'password' ),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tcanEdit:\n\t\t\t\t\tgetCurrentPost()._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ showPassword, setShowPassword ] = useState( !! password );\n\tconst passwordInputId = useInstanceId(\n\t\tPostStatus,\n\t\t'editor-change-status__password-input'\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Status & visibility' ),\n\t\t\theaderTitle: __( 'Status & visibility' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\tconst updatePost = ( {\n\t\tstatus: newStatus = status,\n\t\tpassword: newPassword = password,\n\t\tdate: newDate = date,\n\t} ) => {\n\t\teditEntityRecord( 'postType', postType, postId, {\n\t\t\tstatus: newStatus,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\tconst handleTogglePassword = ( value ) => {\n\t\tsetShowPassword( value );\n\t\tif ( ! value ) {\n\t\t\tupdatePost( { password: '' } );\n\t\t}\n\t};\n\n\tconst handleStatus = ( value ) => {\n\t\tlet newDate = date;\n\t\tlet newPassword = password;\n\t\tif ( status === 'future' && new Date( date ) > new Date() ) {\n\t\t\tnewDate = null;\n\t\t}\n\t\tif ( value === 'private' && password ) {\n\t\t\tnewPassword = '';\n\t\t}\n\t\tupdatePost( {\n\t\t\tstatus: value,\n\t\t\tdate: newDate,\n\t\t\tpassword: newPassword,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Status' ) } ref={ setPopoverAnchor }>\n\t\t\t{ canEdit ? (\n\t\t\t\t<Dropdown\n\t\t\t\t\tclassName=\"editor-post-status\"\n\t\t\t\t\tcontentClassName=\"editor-change-status__content\"\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"editor-post-status__toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\ticon={ postStatusesInfo[ status ]?.icon }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post status.\n\t\t\t\t\t\t\t\t__( 'Change status: %s' ),\n\t\t\t\t\t\t\t\tpostStatusesInfo[ status ]?.label\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Status & visibility' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<form>\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__options\"\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Status' ) }\n\t\t\t\t\t\t\t\t\t\toptions={ STATUS_OPTIONS }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleStatus }\n\t\t\t\t\t\t\t\t\t\tselected={\n\t\t\t\t\t\t\t\t\t\t\tstatus === 'auto-draft'\n\t\t\t\t\t\t\t\t\t\t\t\t? 'draft'\n\t\t\t\t\t\t\t\t\t\t\t\t: status\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{ status === 'future' && (\n\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__publish-date-wrapper\">\n\t\t\t\t\t\t\t\t\t\t\t<PrivatePostSchedule\n\t\t\t\t\t\t\t\t\t\t\t\tshowPopoverHeaderActions={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfalse\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tisCompact\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ status !== 'private' && (\n\t\t\t\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\t\t\t\tas=\"fieldset\"\n\t\t\t\t\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"editor-change-status__password-fieldset\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Password protected'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Only visible to those who know the password'\n\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ showPassword }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={\n\t\t\t\t\t\t\t\t\t\t\t\t\thandleTogglePassword\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t{ showPassword && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"editor-change-status__password-input\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tupdatePost( {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpassword: value,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ password }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Use a secure password'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tid={ passwordInputId }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaxLength={ 255 }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<PostSticky />\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t</form>\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\t\t<div className=\"editor-post-status is-read-only\">\n\t\t\t\t\t{ postStatusesInfo[ status ]?.label }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</PostPanelRow>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__unstableGetAnimateClassName as getAnimateClassName,\n\tButton,\n} from '@wordpress/components';\nimport { usePrevious, useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, check, cloud, cloudUpload } from '@wordpress/icons';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { STATUS_OPTIONS } from '../../components/post-status';\nimport { store as editorStore } from '../../store';\n\n/**\n * Component showing whether the post is saved or not and providing save\n * buttons.\n *\n * @param {Object} props Component props.\n * @param {?boolean} props.forceIsDirty Whether to force the post to be marked\n * as dirty.\n * @return {import('react').ComponentType} The component.\n */\nexport default function PostSavedState( { forceIsDirty } ) {\n\tconst [ forceSavedMessage, setForceSavedMessage ] = useState( false );\n\tconst isLargeViewport = useViewportMatch( 'small' );\n\n\tconst {\n\t\tisAutosaving,\n\t\tisDirty,\n\t\tisNew,\n\t\tisPublished,\n\t\tisSaveable,\n\t\tisSaving,\n\t\tisScheduled,\n\t\thasPublishAction,\n\t\tshowIconLabels,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisEditedPostNew,\n\t\t\t\tisCurrentPostPublished,\n\t\t\t\tisCurrentPostScheduled,\n\t\t\t\tisEditedPostDirty,\n\t\t\t\tisSavingPost,\n\t\t\t\tisEditedPostSaveable,\n\t\t\t\tgetCurrentPost,\n\t\t\t\tisAutosavingPost,\n\t\t\t\tgetEditedPostAttribute,\n\t\t\t\tgetPostEdits,\n\t\t\t} = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\treturn {\n\t\t\t\tisAutosaving: isAutosavingPost(),\n\t\t\t\tisDirty: forceIsDirty || isEditedPostDirty(),\n\t\t\t\tisNew: isEditedPostNew(),\n\t\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\t\tisSaving: isSavingPost(),\n\t\t\t\tisSaveable: isEditedPostSaveable(),\n\t\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t\t\thasPublishAction:\n\t\t\t\t\tgetCurrentPost()?._links?.[ 'wp:action-publish' ] ?? false,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t\tpostStatus: getEditedPostAttribute( 'status' ),\n\t\t\t\tpostStatusHasChanged: !! getPostEdits()?.status,\n\t\t\t};\n\t\t},\n\t\t[ forceIsDirty ]\n\t);\n\tconst isPending = postStatus === 'pending';\n\tconst { savePost } = useDispatch( editorStore );\n\n\tconst wasSaving = usePrevious( isSaving );\n\n\tuseEffect( () => {\n\t\tlet timeoutId;\n\n\t\tif ( wasSaving && ! isSaving ) {\n\t\t\tsetForceSavedMessage( true );\n\t\t\ttimeoutId = setTimeout( () => {\n\t\t\t\tsetForceSavedMessage( false );\n\t\t\t}, 1000 );\n\t\t}\n\n\t\treturn () => clearTimeout( timeoutId );\n\t}, [ isSaving ] );\n\n\t// Once the post has been submitted for review this button\n\t// is not needed for the contributor role.\n\tif ( ! hasPublishAction && isPending ) {\n\t\treturn null;\n\t}\n\n\t// We shouldn't render the button if the post has not one of the following statuses: pending, draft, auto-draft.\n\t// The reason for this is that this button handles the `save as pending` and `save draft` actions.\n\t// An exception for this is when the post has a custom status and there should be a way to save changes without\n\t// having to publish. This should be handled better in the future when custom statuses have better support.\n\t// @see https://github.com/WordPress/gutenberg/issues/3144.\n\tconst isIneligibleStatus =\n\t\t! [ 'pending', 'draft', 'auto-draft' ].includes( postStatus ) &&\n\t\tSTATUS_OPTIONS.map( ( { value } ) => value ).includes( postStatus );\n\n\tif (\n\t\tisPublished ||\n\t\tisScheduled ||\n\t\tisIneligibleStatus ||\n\t\t( postStatusHasChanged &&\n\t\t\t[ 'pending', 'draft' ].includes( postStatus ) )\n\t) {\n\t\treturn null;\n\t}\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst label = isPending ? __( 'Save as pending' ) : __( 'Save draft' );\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst shortLabel = __( 'Save' );\n\n\tconst isSaved = forceSavedMessage || ( ! isNew && ! isDirty );\n\tconst isSavedState = isSaving || isSaved;\n\tconst isDisabled = isSaving || isSaved || ! isSaveable;\n\tlet text;\n\n\tif ( isSaving ) {\n\t\ttext = isAutosaving ? __( 'Autosaving' ) : __( 'Saving' );\n\t} else if ( isSaved ) {\n\t\ttext = __( 'Saved' );\n\t} else if ( isLargeViewport ) {\n\t\ttext = label;\n\t} else if ( showIconLabels ) {\n\t\ttext = shortLabel;\n\t}\n\n\t// Use common Button instance for all saved states so that focus is not\n\t// lost.\n\treturn (\n\t\t<Button\n\t\t\tclassName={\n\t\t\t\tisSaveable || isSaving\n\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t'editor-post-save-draft': ! isSavedState,\n\t\t\t\t\t\t\t'editor-post-saved-state': isSavedState,\n\t\t\t\t\t\t\t'is-saving': isSaving,\n\t\t\t\t\t\t\t'is-autosaving': isAutosaving,\n\t\t\t\t\t\t\t'is-saved': isSaved,\n\t\t\t\t\t\t\t[ getAnimateClassName( {\n\t\t\t\t\t\t\t\ttype: 'loading',\n\t\t\t\t\t\t\t} ) ]: isSaving,\n\t\t\t\t\t } )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tonClick={ isDisabled ? undefined : () => savePost() }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ isDisabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\tvariant=\"tertiary\"\n\t\t\tsize=\"compact\"\n\t\t\ticon={ isLargeViewport ? undefined : cloudUpload }\n\t\t\tlabel={ text || label }\n\t\t\taria-disabled={ isDisabled }\n\t\t>\n\t\t\t{ isSavedState && <Icon icon={ isSaved ? check : cloud } /> }\n\t\t\t{ text }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Wrapper component that renders its children only if post has a publish action.\n *\n * @param {Object} props Props.\n * @param {React.ReactElement} props.children Children to be rendered.\n *\n * @return {React.ReactElement} - The component to be rendered or null if there is no publish action.\n */\nexport default function PostScheduleCheck( { children } ) {\n\tconst hasPublishAction = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getCurrentPost()._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false\n\t\t);\n\t}, [] );\n\n\tif ( ! hasPublishAction ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostScheduleCheck from './check';\nimport PostScheduleForm from './index';\nimport { usePostScheduleLabel } from './label';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\n\nconst DESIGN_POST_TYPES = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n];\n\n/**\n * Renders the Post Schedule Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSchedulePanel() {\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\tconst postType = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType(),\n\t\t[]\n\t);\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\t'aria-label': __( 'Change publish date' ),\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst label = usePostScheduleLabel();\n\tconst fullLabel = usePostScheduleLabel( { full: true } );\n\tif ( DESIGN_POST_TYPES.includes( postType ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostScheduleCheck>\n\t\t\t<PostPanelRow label={ __( 'Publish' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\tclassName=\"editor-post-schedule__panel-dropdown\"\n\t\t\t\t\tcontentClassName=\"editor-post-schedule__dialog\"\n\t\t\t\t\trenderToggle={ ( { onToggle, isOpen } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tclassName=\"editor-post-schedule__dialog-toggle\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\ttooltipPosition=\"middle left\"\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post date.\n\t\t\t\t\t\t\t\t__( 'Change date: %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlabel={ fullLabel }\n\t\t\t\t\t\t\tshowTooltip={ label !== fullLabel }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<PostScheduleForm onClose={ onClose } />\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostScheduleCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders a button component that allows the user to switch a post to draft status.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostSwitchToDraftButton() {\n\tdeprecated( 'wp.editor.PostSwitchToDraftButton', {\n\t\tsince: '6.7',\n\t\tversion: '6.9',\n\t} );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst { editPost, savePost } = useDispatch( editorStore );\n\tconst { isSaving, isPublished, isScheduled } = useSelect( ( select ) => {\n\t\tconst { isSavingPost, isCurrentPostPublished, isCurrentPostScheduled } =\n\t\t\tselect( editorStore );\n\t\treturn {\n\t\t\tisSaving: isSavingPost(),\n\t\t\tisPublished: isCurrentPostPublished(),\n\t\t\tisScheduled: isCurrentPostScheduled(),\n\t\t};\n\t}, [] );\n\n\tconst isDisabled = isSaving || ( ! isPublished && ! isScheduled );\n\n\tlet alertMessage;\n\tlet confirmButtonText;\n\tif ( isPublished ) {\n\t\talertMessage = __( 'Are you sure you want to unpublish this post?' );\n\t\tconfirmButtonText = __( 'Unpublish' );\n\t} else if ( isScheduled ) {\n\t\talertMessage = __( 'Are you sure you want to unschedule this post?' );\n\t\tconfirmButtonText = __( 'Unschedule' );\n\t}\n\n\tconst handleConfirm = () => {\n\t\tsetShowConfirmDialog( false );\n\t\teditPost( { status: 'draft' } );\n\t\tsavePost();\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-switch-to-draft\"\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tif ( ! isDisabled ) {\n\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\taria-disabled={ isDisabled }\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tstyle={ { flexGrow: '1', justifyContent: 'center' } }\n\t\t\t>\n\t\t\t\t{ __( 'Switch to draft' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\t>\n\t\t\t\t{ alertMessage }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the sync status of a post.\n *\n * @return {React.ReactNode} The rendered sync status component.\n */\nexport default function PostSyncStatus() {\n\tconst { syncStatus, postType } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst meta = getEditedPostAttribute( 'meta' );\n\n\t\t// When the post is first created, the top level wp_pattern_sync_status is not set so get meta value instead.\n\t\tconst currentSyncStatus =\n\t\t\tmeta?.wp_pattern_sync_status === 'unsynced'\n\t\t\t\t? 'unsynced'\n\t\t\t\t: getEditedPostAttribute( 'wp_pattern_sync_status' );\n\n\t\treturn {\n\t\t\tsyncStatus: currentSyncStatus,\n\t\t\tpostType: getEditedPostAttribute( 'type' ),\n\t\t};\n\t} );\n\n\tif ( postType !== 'wp_block' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PostPanelRow label={ __( 'Sync status' ) }>\n\t\t\t<div className=\"editor-post-sync-status__value\">\n\t\t\t\t{ syncStatus === 'unsynced'\n\t\t\t\t\t? _x( 'Not synced', 'pattern (singular)' )\n\t\t\t\t\t: _x( 'Synced', 'pattern (singular)' ) }\n\t\t\t</div>\n\t\t</PostPanelRow>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport HierarchicalTermSelector from './hierarchical-term-selector';\nimport FlatTermSelector from './flat-term-selector';\nimport { store as editorStore } from '../../store';\n\nconst identity = ( x ) => x;\n\nexport function PostTaxonomies( { taxonomyWrapper = identity } ) {\n\tconst { postType, taxonomies } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tpostType: select( editorStore ).getCurrentPostType(),\n\t\t\ttaxonomies: select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t};\n\t}, [] );\n\tconst visibleTaxonomies = ( taxonomies ?? [] ).filter(\n\t\t( taxonomy ) =>\n\t\t\t// In some circumstances .visibility can end up as undefined so optional chaining operator required.\n\t\t\t// https://github.com/WordPress/gutenberg/issues/40326\n\t\t\ttaxonomy.types.includes( postType ) && taxonomy.visibility?.show_ui\n\t);\n\n\treturn visibleTaxonomies.map( ( taxonomy ) => {\n\t\tconst TaxonomyComponent = taxonomy.hierarchical\n\t\t\t? HierarchicalTermSelector\n\t\t\t: FlatTermSelector;\n\t\tconst taxonomyComponentProps = {\n\t\t\tslug: taxonomy.slug,\n\t\t\t...( taxonomy.hierarchical\n\t\t\t\t? {}\n\t\t\t\t: { __nextHasNoMarginBottom: true } ),\n\t\t};\n\n\t\treturn (\n\t\t\t<Fragment key={ `taxonomy-${ taxonomy.slug }` }>\n\t\t\t\t{ taxonomyWrapper(\n\t\t\t\t\t<TaxonomyComponent { ...taxonomyComponentProps } />,\n\t\t\t\t\ttaxonomy\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t);\n\t} );\n}\n\n/**\n * Renders the taxonomies associated with a post.\n *\n * @param {Object} props The component props.\n * @param {Function} props.taxonomyWrapper The wrapper function for each taxonomy component.\n *\n * @return {Array} An array of JSX elements representing the visible taxonomies.\n */\nexport default PostTaxonomies;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the children components only if the current post type has taxonomies.\n *\n * @param {Object} props The component props.\n * @param {React.ReactNode} props.children The children components to render.\n *\n * @return {React.ReactElement} The rendered children components or null if the current post type has no taxonomies.\n */\nexport default function PostTaxonomiesCheck( { children } ) {\n\tconst hasTaxonomies = useSelect( ( select ) => {\n\t\tconst postType = select( editorStore ).getCurrentPostType();\n\t\tconst taxonomies = select( coreStore ).getTaxonomies( {\n\t\t\tper_page: -1,\n\t\t} );\n\t\treturn taxonomies?.some( ( taxonomy ) =>\n\t\t\ttaxonomy.types.includes( postType )\n\t\t);\n\t}, [] );\n\tif ( ! hasTaxonomies ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { PanelBody } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTaxonomiesForm from './index';\nimport PostTaxonomiesCheck from './check';\n\n/**\n * Renders a panel for a specific taxonomy.\n *\n * @param {Object} props The component props.\n * @param {Object} props.taxonomy The taxonomy object.\n * @param {React.ReactNode} props.children The child components.\n *\n * @return {React.ReactNode} The rendered taxonomy panel.\n */\nfunction TaxonomyPanel( { taxonomy, children } ) {\n\tconst slug = taxonomy?.slug;\n\tconst panelName = slug ? `taxonomy-panel-${ slug }` : '';\n\tconst { isEnabled, isOpened } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isEditorPanelEnabled, isEditorPanelOpened } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisEnabled: slug ? isEditorPanelEnabled( panelName ) : false,\n\t\t\t\tisOpened: slug ? isEditorPanelOpened( panelName ) : false,\n\t\t\t};\n\t\t},\n\t\t[ panelName, slug ]\n\t);\n\tconst { toggleEditorPanelOpened } = useDispatch( editorStore );\n\n\tif ( ! isEnabled ) {\n\t\treturn null;\n\t}\n\n\tconst taxonomyMenuName = taxonomy?.labels?.menu_name;\n\tif ( ! taxonomyMenuName ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ taxonomyMenuName }\n\t\t\topened={ isOpened }\n\t\t\tonToggle={ () => toggleEditorPanelOpened( panelName ) }\n\t\t>\n\t\t\t{ children }\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * Component that renders the post taxonomies panel.\n *\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostTaxonomies() {\n\treturn (\n\t\t<PostTaxonomiesCheck>\n\t\t\t<PostTaxonomiesForm\n\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<TaxonomyPanel taxonomy={ taxonomy }>\n\t\t\t\t\t\t\t{ content }\n\t\t\t\t\t\t</TaxonomyPanel>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PostTaxonomiesCheck>\n\t);\n}\n","/**\n * External dependencies\n */\nimport Textarea from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Displays the Post Text Editor along with content in Visual and Text mode.\n *\n * @return {React.ReactNode} The rendered PostTextEditor component.\n */\nexport default function PostTextEditor() {\n\tconst instanceId = useInstanceId( PostTextEditor );\n\tconst { content, blocks, type, id } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst _type = getCurrentPostType();\n\t\tconst _id = getCurrentPostId();\n\t\tconst editedRecord = getEditedEntityRecord( 'postType', _type, _id );\n\n\t\treturn {\n\t\t\tcontent: editedRecord?.content,\n\t\t\tblocks: editedRecord?.blocks,\n\t\t\ttype: _type,\n\t\t\tid: _id,\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\t// Replicates the logic found in getEditedPostContent().\n\tconst value = useMemo( () => {\n\t\tif ( content instanceof Function ) {\n\t\t\treturn content( { blocks } );\n\t\t} else if ( blocks ) {\n\t\t\t// If we have parsed blocks already, they should be our source of truth.\n\t\t\t// Parsing applies block deprecations and legacy block conversions that\n\t\t\t// unparsed content will not have.\n\t\t\treturn __unstableSerializeAndClean( blocks );\n\t\t}\n\t\treturn content;\n\t}, [ content, blocks ] );\n\n\treturn (\n\t\t<>\n\t\t\t<VisuallyHidden\n\t\t\t\tas=\"label\"\n\t\t\t\thtmlFor={ `post-content-${ instanceId }` }\n\t\t\t>\n\t\t\t\t{ __( 'Type text or HTML' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t<Textarea\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tdir=\"auto\"\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\teditEntityRecord( 'postType', type, id, {\n\t\t\t\t\t\tcontent: event.target.value,\n\t\t\t\t\t\tblocks: undefined,\n\t\t\t\t\t\tselection: undefined,\n\t\t\t\t\t} );\n\t\t\t\t} }\n\t\t\t\tclassName=\"editor-post-text-editor\"\n\t\t\t\tid={ `post-content-${ instanceId }` }\n\t\t\t\tplaceholder={ __( 'Start writing with text or HTML' ) }\n\t\t\t/>\n\t\t</>\n\t);\n}\n","export const DEFAULT_CLASSNAMES =\n\t'wp-block wp-block-post-title block-editor-block-list__block editor-post-title editor-post-title__input rich-text';\n\nexport const REGEXP_NEWLINES = /[\\r\\n]+/g;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useImperativeHandle, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Custom hook that manages the focus behavior of the post title input field.\n *\n * @param {Element} forwardedRef - The forwarded ref for the input field.\n *\n * @return {Object} - The ref object.\n */\nexport default function usePostTitleFocus( forwardedRef ) {\n\tconst ref = useRef();\n\n\tconst { isCleanNewPost } = useSelect( ( select ) => {\n\t\tconst { isCleanNewPost: _isCleanNewPost } = select( editorStore );\n\n\t\treturn {\n\t\t\tisCleanNewPost: _isCleanNewPost(),\n\t\t};\n\t}, [] );\n\n\tuseImperativeHandle( forwardedRef, () => ( {\n\t\tfocus: () => {\n\t\t\tref?.current?.focus();\n\t\t},\n\t} ) );\n\n\tuseEffect( () => {\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = ref.current.ownerDocument;\n\t\tconst { name, parent } = defaultView;\n\t\tconst ownerDocument =\n\t\t\tname === 'editor-canvas' ? parent.document : defaultView.document;\n\t\tconst { activeElement, body } = ownerDocument;\n\n\t\t// Only autofocus the title when the post is entirely empty. This should\n\t\t// only happen for a new post, which means we focus the title on new\n\t\t// post so the author can start typing right away, without needing to\n\t\t// click anything.\n\t\tif ( isCleanNewPost && ( ! activeElement || body === activeElement ) ) {\n\t\t\tref.current.focus();\n\t\t}\n\t}, [ isCleanNewPost ] );\n\n\treturn { ref };\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Custom hook for managing the post title in the editor.\n *\n * @return {Object} An object containing the current title and a function to update the title.\n */\nexport default function usePostTitle() {\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { title } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\n\t\treturn {\n\t\t\ttitle: getEditedPostAttribute( 'title' ),\n\t\t};\n\t}, [] );\n\n\tfunction updateTitle( newTitle ) {\n\t\teditPost( { title: newTitle } );\n\t}\n\n\treturn { title, setTitle: updateTitle };\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef, useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { ENTER } from '@wordpress/keycodes';\nimport { pasteHandler } from '@wordpress/blocks';\nimport {\n\t__unstableUseRichText as useRichText,\n\tcreate,\n\tinsert,\n} from '@wordpress/rich-text';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_CLASSNAMES, REGEXP_NEWLINES } from './constants';\nimport usePostTitleFocus from './use-post-title-focus';\nimport usePostTitle from './use-post-title';\nimport PostTypeSupportCheck from '../post-type-support-check';\n\nconst PostTitle = forwardRef( ( _, forwardedRef ) => {\n\tconst { placeholder } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { titlePlaceholder } = getSettings();\n\n\t\treturn {\n\t\t\tplaceholder: titlePlaceholder,\n\t\t};\n\t}, [] );\n\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\n\tconst { ref: focusRef } = usePostTitleFocus( forwardedRef );\n\n\tconst { title, setTitle: onUpdate } = usePostTitle();\n\n\tconst [ selection, setSelection ] = useState( {} );\n\n\tconst { clearSelectedBlock, insertBlocks, insertDefaultBlock } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\n\tconst {\n\t\tvalue,\n\t\tonChange,\n\t\tref: richTextRef,\n\t} = useRichText( {\n\t\tvalue: title,\n\t\tonChange( newValue ) {\n\t\t\tonUpdate( newValue.replace( REGEXP_NEWLINES, ' ' ) );\n\t\t},\n\t\tplaceholder: decodedPlaceholder,\n\t\tselectionStart: selection.start,\n\t\tselectionEnd: selection.end,\n\t\tonSelectionChange( newStart, newEnd ) {\n\t\t\tsetSelection( ( sel ) => {\n\t\t\t\tconst { start, end } = sel;\n\t\t\t\tif ( start === newStart && end === newEnd ) {\n\t\t\t\t\treturn sel;\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tstart: newStart,\n\t\t\t\t\tend: newEnd,\n\t\t\t\t};\n\t\t\t} );\n\t\t},\n\t\t__unstableDisableFormats: false,\n\t} );\n\n\tfunction onInsertBlockAfter( blocks ) {\n\t\tinsertBlocks( blocks, 0 );\n\t}\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t\tclearSelectedBlock();\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t\tsetSelection( {} );\n\t}\n\n\tfunction onEnterPress() {\n\t\tinsertDefaultBlock( undefined, undefined, 0 );\n\t}\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tonEnterPress();\n\t\t}\n\t}\n\n\tfunction onPaste( event ) {\n\t\tconst clipboardData = event.clipboardData;\n\n\t\tlet plainText = '';\n\t\tlet html = '';\n\n\t\ttry {\n\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t} catch ( error ) {\n\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t// behaviour.\n\t\t\treturn;\n\t\t}\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\tconst content = pasteHandler( {\n\t\t\tHTML: html,\n\t\t\tplainText,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( ! content.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( typeof content !== 'string' ) {\n\t\t\tconst [ firstBlock ] = content;\n\n\t\t\tif (\n\t\t\t\t! title &&\n\t\t\t\t( firstBlock.name === 'core/heading' ||\n\t\t\t\t\tfirstBlock.name === 'core/paragraph' )\n\t\t\t) {\n\t\t\t\t// Strip HTML to avoid unwanted HTML being added to the title.\n\t\t\t\t// In the majority of cases it is assumed that HTML in the title\n\t\t\t\t// is undesirable.\n\t\t\t\tconst contentNoHTML = stripHTML(\n\t\t\t\t\tfirstBlock.attributes.content\n\t\t\t\t);\n\t\t\t\tonUpdate( contentNoHTML );\n\t\t\t\tonInsertBlockAfter( content.slice( 1 ) );\n\t\t\t} else {\n\t\t\t\tonInsertBlockAfter( content );\n\t\t\t}\n\t\t} else {\n\t\t\t// Strip HTML to avoid unwanted HTML being added to the title.\n\t\t\t// In the majority of cases it is assumed that HTML in the title\n\t\t\t// is undesirable.\n\t\t\tconst contentNoHTML = stripHTML( content );\n\t\t\tonChange( insert( value, create( { html: contentNoHTML } ) ) );\n\t\t}\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = clsx( DEFAULT_CLASSNAMES, {\n\t\t'is-selected': isSelected,\n\t} );\n\n\treturn (\n\t\t/* eslint-disable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\t\t<h1\n\t\t\tref={ useMergeRefs( [ richTextRef, focusRef ] ) }\n\t\t\tcontentEditable\n\t\t\tclassName={ className }\n\t\t\taria-label={ decodedPlaceholder }\n\t\t\trole=\"textbox\"\n\t\t\taria-multiline=\"true\"\n\t\t\tonFocus={ onSelect }\n\t\t\tonBlur={ onUnselect }\n\t\t\tonKeyDown={ onKeyDown }\n\t\t\tonPaste={ onPaste }\n\t\t/>\n\t\t/* eslint-enable jsx-a11y/heading-has-content, jsx-a11y/no-noninteractive-element-to-interactive-role */\n\t);\n} );\n\n/**\n * Renders the `PostTitle` component.\n *\n * @param {Object} _ Unused parameter.\n * @param {Element} forwardedRef Forwarded ref for the component.\n *\n * @return {React.ReactNode} The rendered PostTitle component.\n */\nexport default forwardRef( ( _, forwardedRef ) => (\n\t<PostTypeSupportCheck supportKeys=\"title\">\n\t\t<PostTitle ref={ forwardedRef } />\n\t</PostTypeSupportCheck>\n) );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { TextareaControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { DEFAULT_CLASSNAMES, REGEXP_NEWLINES } from './constants';\nimport usePostTitleFocus from './use-post-title-focus';\nimport usePostTitle from './use-post-title';\n\n/**\n * Renders a raw post title input field.\n *\n * @param {Object} _ Unused parameter.\n * @param {Element} forwardedRef Reference to the component's DOM node.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostTitleRaw( _, forwardedRef ) {\n\tconst { placeholder } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { titlePlaceholder } = getSettings();\n\n\t\treturn {\n\t\t\tplaceholder: titlePlaceholder,\n\t\t};\n\t}, [] );\n\n\tconst [ isSelected, setIsSelected ] = useState( false );\n\n\tconst { title, setTitle: onUpdate } = usePostTitle();\n\tconst { ref: focusRef } = usePostTitleFocus( forwardedRef );\n\n\tfunction onChange( value ) {\n\t\tonUpdate( value.replace( REGEXP_NEWLINES, ' ' ) );\n\t}\n\n\tfunction onSelect() {\n\t\tsetIsSelected( true );\n\t}\n\n\tfunction onUnselect() {\n\t\tsetIsSelected( false );\n\t}\n\n\t// The wp-block className is important for editor styles.\n\t// This same block is used in both the visual and the code editor.\n\tconst className = clsx( DEFAULT_CLASSNAMES, {\n\t\t'is-selected': isSelected,\n\t\t'is-raw-text': true,\n\t} );\n\n\tconst decodedPlaceholder =\n\t\tdecodeEntities( placeholder ) || __( 'Add title' );\n\n\treturn (\n\t\t<TextareaControl\n\t\t\tref={ focusRef }\n\t\t\tvalue={ title }\n\t\t\tonChange={ onChange }\n\t\t\tonFocus={ onSelect }\n\t\t\tonBlur={ onUnselect }\n\t\t\tlabel={ placeholder }\n\t\t\tclassName={ className }\n\t\t\tplaceholder={ decodedPlaceholder }\n\t\t\thideLabelFromVision\n\t\t\tautoComplete=\"off\"\n\t\t\tdir=\"auto\"\n\t\t\trows={ 1 }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\nexport default forwardRef( PostTitleRaw );\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { GLOBAL_POST_TYPES } from '../../store/constants';\n\n/**\n * Wrapper component that renders its children only if the post can be trashed.\n *\n * @param {Object} props The component props.\n * @param {React.ReactElement} props.children The child components.\n *\n * @return {React.ReactElement | null} The rendered child components or null if the post can't be trashed.\n */\nexport default function PostTrashCheck( { children } ) {\n\tconst { canTrashPost } = useSelect( ( select ) => {\n\t\tconst { isEditedPostNew, getCurrentPostId, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst postType = getCurrentPostType();\n\t\tconst postId = getCurrentPostId();\n\t\tconst isNew = isEditedPostNew();\n\t\tconst canUserDelete = !! postId\n\t\t\t? canUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: postType,\n\t\t\t\t\tid: postId,\n\t\t\t } )\n\t\t\t: false;\n\n\t\treturn {\n\t\t\tcanTrashPost:\n\t\t\t\t( ! isNew || postId ) &&\n\t\t\t\tcanUserDelete &&\n\t\t\t\t! GLOBAL_POST_TYPES.includes( postType ),\n\t\t};\n\t}, [] );\n\tif ( ! canTrashPost ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTrashCheck from './check';\n\n/**\n * Displays the Post Trash Button and Confirm Dialog in the Editor.\n *\n * @param {?{onActionPerformed: Object}} An object containing the onActionPerformed function.\n * @return {React.ReactNode} The rendered PostTrash component.\n */\nexport default function PostTrash( { onActionPerformed } ) {\n\tconst registry = useRegistry();\n\tconst { isNew, isDeleting, postId, title } = useSelect( ( select ) => {\n\t\tconst store = select( editorStore );\n\t\treturn {\n\t\t\tisNew: store.isEditedPostNew(),\n\t\t\tisDeleting: store.isDeletingPost(),\n\t\t\tpostId: store.getCurrentPostId(),\n\t\t\ttitle: store.getCurrentPostAttribute( 'title' ),\n\t\t};\n\t}, [] );\n\tconst { trashPost } = useDispatch( editorStore );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tif ( isNew || ! postId ) {\n\t\treturn null;\n\t}\n\n\tconst handleConfirm = async () => {\n\t\tsetShowConfirmDialog( false );\n\t\tawait trashPost();\n\t\tconst item = await registry\n\t\t\t.resolveSelect( editorStore )\n\t\t\t.getCurrentPost();\n\t\t// After the post is trashed, we want to trigger the onActionPerformed callback, so the user is redirect\n\t\t// to the post view depending on if the user is on post editor or site editor.\n\t\tonActionPerformed?.( 'move-to-trash', [ item ] );\n\t};\n\treturn (\n\t\t<PostTrashCheck>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tclassName=\"editor-post-trash\"\n\t\t\t\tisDestructive\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\tisBusy={ isDeleting }\n\t\t\t\taria-disabled={ isDeleting }\n\t\t\t\tonClick={\n\t\t\t\t\tisDeleting ? undefined : () => setShowConfirmDialog( true )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ __( 'Move to trash' ) }\n\t\t\t</Button>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\tonConfirm={ handleConfirm }\n\t\t\t\tonCancel={ () => setShowConfirmDialog( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Move to trash' ) }\n\t\t\t\tsize=\"small\"\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s: The item's title.\n\t\t\t\t\t__( 'Are you sure you want to move \"%s\" to the trash?' ),\n\t\t\t\t\ttitle\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</PostTrashCheck>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { safeDecodeURIComponent, cleanForSlug } from '@wordpress/url';\nimport { useState, createInterpolateElement } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tExternalLink,\n\tButton,\n\t__experimentalInputControl as InputControl,\n\t__experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t__experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { copySmall } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useCopyToClipboard, useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURL` component.\n *\n * @example\n * ```jsx\n * <PostURL />\n * ```\n *\n * @param {{ onClose: () => void }} props The props for the component.\n * @param {() => void} props.onClose Callback function to be executed when the popover is closed.\n *\n * @return {React.ReactNode} The rendered PostURL component.\n */\nexport default function PostURL( { onClose } ) {\n\tconst {\n\t\tisEditable,\n\t\tpostSlug,\n\t\tpostLink,\n\t\tpermalinkPrefix,\n\t\tpermalinkSuffix,\n\t\tpermalink,\n\t} = useSelect( ( select ) => {\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tconst hasPublishAction = post?._links?.[ 'wp:action-publish' ] ?? false;\n\n\t\treturn {\n\t\t\tisEditable:\n\t\t\t\tselect( editorStore ).isPermalinkEditable() && hasPublishAction,\n\t\t\tpostSlug: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getEditedPostSlug()\n\t\t\t),\n\t\t\tviewPostLabel: postType?.labels.view_item,\n\t\t\tpostLink: post.link,\n\t\t\tpermalinkPrefix: permalinkParts?.prefix,\n\t\t\tpermalinkSuffix: permalinkParts?.suffix,\n\t\t\tpermalink: safeDecodeURIComponent(\n\t\t\t\tselect( editorStore ).getPermalink()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { editPost } = useDispatch( editorStore );\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst [ forceEmptyField, setForceEmptyField ] = useState( false );\n\tconst copyButtonRef = useCopyToClipboard( permalink, () => {\n\t\tcreateNotice( 'info', __( 'Copied Permalink to clipboard.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t} );\n\tconst postUrlSlugDescriptionId =\n\t\t'editor-post-url__slug-description-' + useInstanceId( PostURL );\n\n\treturn (\n\t\t<div className=\"editor-post-url\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Slug' ) }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t{ isEditable && (\n\t\t\t\t\t<p className=\"editor-post-url__intro\">\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'<span>Customize the last part of the Permalink.</span> <a>Learn more.</a>'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span id={ postUrlSlugDescriptionId } />,\n\t\t\t\t\t\t\t\ta: (\n\t\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/page-post-settings-sidebar/#permalink'\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}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t) }\n\t\t\t\t<div>\n\t\t\t\t\t{ isEditable && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\tprefix={\n\t\t\t\t\t\t\t\t\t<InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t\t\t/\n\t\t\t\t\t\t\t\t\t</InputControlPrefixWrapper>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsuffix={\n\t\t\t\t\t\t\t\t\t<InputControlSuffixWrapper variant=\"control\">\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\ticon={ copySmall }\n\t\t\t\t\t\t\t\t\t\t\tref={ copyButtonRef }\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tlabel=\"Copy\"\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</InputControlSuffixWrapper>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tlabel={ __( 'Slug' ) }\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tvalue={ forceEmptyField ? '' : postSlug }\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tspellCheck=\"false\"\n\t\t\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t\t\tclassName=\"editor-post-url__input\"\n\t\t\t\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\t\teditPost( { slug: newValue } );\n\t\t\t\t\t\t\t\t\t// When we delete the field the permalink gets\n\t\t\t\t\t\t\t\t\t// reverted to the original value.\n\t\t\t\t\t\t\t\t\t// The forceEmptyField logic allows the user to have\n\t\t\t\t\t\t\t\t\t// the field temporarily empty while typing.\n\t\t\t\t\t\t\t\t\tif ( ! newValue ) {\n\t\t\t\t\t\t\t\t\t\tif ( ! forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( true );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\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\tonBlur={ ( event ) => {\n\t\t\t\t\t\t\t\t\teditPost( {\n\t\t\t\t\t\t\t\t\t\tslug: cleanForSlug(\n\t\t\t\t\t\t\t\t\t\t\tevent.target.value\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\tif ( forceEmptyField ) {\n\t\t\t\t\t\t\t\t\t\tsetForceEmptyField( false );\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\taria-describedby={ postUrlSlugDescriptionId }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<p className=\"editor-post-url__permalink\">\n\t\t\t\t\t\t\t\t<span className=\"editor-post-url__permalink-visual-label\">\n\t\t\t\t\t\t\t\t\t{ __( 'Permalink:' ) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-prefix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkPrefix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-slug\">\n\t\t\t\t\t\t\t\t\t\t{ postSlug }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<span className=\"editor-post-url__link-suffix\">\n\t\t\t\t\t\t\t\t\t\t{ permalinkSuffix }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isEditable && (\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\tclassName=\"editor-post-url__link\"\n\t\t\t\t\t\t\thref={ postLink }\n\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ postLink }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Check if the post URL is valid and visible.\n *\n * @param {Object} props The component props.\n * @param {React.ReactElement} props.children The child components.\n *\n * @return {React.ReactElement} The child components if the post URL is valid and visible, otherwise null.\n */\nexport default function PostURLCheck( { children } ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\tif ( ! postType?.viewable ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst post = select( editorStore ).getCurrentPost();\n\t\tif ( ! post.link ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst permalinkParts = select( editorStore ).getPermalinkParts();\n\t\tif ( ! permalinkParts ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\treturn children;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { filterURLForDisplay, safeDecodeURIComponent } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Represents a label component for a post URL.\n *\n * @return {React.ReactNode} The PostURLLabel component.\n */\nexport default function PostURLLabel() {\n\treturn usePostURLLabel();\n}\n\n/**\n * Custom hook to get the label for the post URL.\n *\n * @return {string} The filtered and decoded post URL label.\n */\nexport function usePostURLLabel() {\n\tconst postLink = useSelect(\n\t\t( select ) => select( editorStore ).getPermalink(),\n\t\t[]\n\t);\n\treturn filterURLForDisplay( safeDecodeURIComponent( postLink ) );\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { Dropdown, Button, ExternalLink } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { safeDecodeURIComponent } from '@wordpress/url';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport PostURLCheck from './check';\nimport PostURL from './index';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the `PostURLPanel` component.\n *\n * @return {React.ReactNode} The rendered PostURLPanel component.\n */\nexport default function PostURLPanel() {\n\tconst { isFrontPage } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst _id = getCurrentPostId();\n\t\treturn {\n\t\t\tisFrontPage: siteSettings?.page_on_front === _id,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tconst label = isFrontPage ? __( 'Link' ) : __( 'Slug' );\n\n\treturn (\n\t\t<PostURLCheck>\n\t\t\t<PostPanelRow label={ label } ref={ setPopoverAnchor }>\n\t\t\t\t{ ! isFrontPage && (\n\t\t\t\t\t<Dropdown\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\tclassName=\"editor-post-url__panel-dropdown\"\n\t\t\t\t\t\tcontentClassName=\"editor-post-url__panel-dialog\"\n\t\t\t\t\t\tfocusOnMount\n\t\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t\t<PostURLToggle\n\t\t\t\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t\t<PostURL onClose={ onClose } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ isFrontPage && <FrontPageLink /> }\n\t\t\t</PostPanelRow>\n\t\t</PostURLCheck>\n\t);\n}\n\nfunction PostURLToggle( { isOpen, onClick } ) {\n\tconst { slug } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tslug: select( editorStore ).getEditedPostSlug(),\n\t\t};\n\t}, [] );\n\tconst decodedSlug = safeDecodeURIComponent( slug );\n\treturn (\n\t\t<Button\n\t\t\tsize=\"compact\"\n\t\t\tclassName=\"editor-post-url__panel-toggle\"\n\t\t\tvariant=\"tertiary\"\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: Current post link.\n\t\t\t\tsprintf( __( 'Change link: %s' ), decodedSlug )\n\t\t\t}\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t<>{ decodedSlug }</>\n\t\t</Button>\n\t);\n}\n\nfunction FrontPageLink() {\n\tconst { postLink } = useSelect( ( select ) => {\n\t\tconst { getCurrentPost } = select( editorStore );\n\t\treturn {\n\t\t\tpostLink: getCurrentPost()?.link,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<ExternalLink\n\t\t\tclassName=\"editor-post-url__front-page-link\"\n\t\t\thref={ postLink }\n\t\t\ttarget=\"_blank\"\n\t\t>\n\t\t\t{ postLink }\n\t\t</ExternalLink>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Determines if the current post can be edited (published)\n * and passes this information to the provided render function.\n *\n * @param {Object} props The component props.\n * @param {Function} props.render Function to render the component.\n * Receives an object with a `canEdit` property.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostVisibilityCheck( { render } ) {\n\tconst canEdit = useSelect( ( select ) => {\n\t\treturn (\n\t\t\tselect( editorStore ).getCurrentPost()._links?.[\n\t\t\t\t'wp:action-publish'\n\t\t\t] ?? false\n\t\t);\n\t} );\n\n\treturn render( { canEdit } );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst info = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M5.5 12a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0ZM12 4a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm.75 4v1.5h-1.5V8h1.5Zm0 8v-5h-1.5v5h1.5Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default info;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"wordcount\"];","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the word count of the post content.\n *\n * @return {React.ReactNode} The rendered WordCount component.\n */\nexport default function WordCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\n\treturn (\n\t\t<span className=\"word-count\">\n\t\t\t{ wordCount( content, wordCountType ) }\n\t\t</span>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { _x, _n, __, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Average reading rate - based on average taken from\n * https://irisreading.com/average-reading-speed-in-various-languages/\n * (Characters/minute used for Chinese rather than words).\n *\n * @type {number} A rough estimate of the average reading rate across multiple languages.\n */\nconst AVERAGE_READING_RATE = 189;\n\n/**\n * Component for showing Time To Read in Content.\n *\n * @return {React.ReactNode} The rendered TimeToRead component.\n */\nexport default function TimeToRead() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst minutesToRead = Math.round(\n\t\twordCount( content, wordCountType ) / AVERAGE_READING_RATE\n\t);\n\tconst minutesToReadString =\n\t\tminutesToRead === 0\n\t\t\t? createInterpolateElement( __( '<span>< 1</span> minute' ), {\n\t\t\t\t\tspan: <span />,\n\t\t\t } )\n\t\t\t: createInterpolateElement(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: %s: the number of minutes to read the post. */\n\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t'<span>%s</span> minute',\n\t\t\t\t\t\t\t'<span>%s</span> minutes',\n\t\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t\t),\n\t\t\t\t\t\tminutesToRead\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t}\n\t\t\t );\n\n\treturn <span className=\"time-to-read\">{ minutesToReadString }</span>;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { count as characterCount } from '@wordpress/wordcount';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the character count of the post content.\n *\n * @return {number} The character count.\n */\nexport default function CharacterCount() {\n\tconst content = useSelect(\n\t\t( select ) => select( editorStore ).getEditedPostAttribute( 'content' ),\n\t\t[]\n\t);\n\n\treturn characterCount( content, 'characters_including_spaces' );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\nimport CharacterCount from '../character-count';\n\nfunction TableOfContentsPanel( { hasOutlineItemsDisabled, onRequestClose } ) {\n\tconst { headingCount, paragraphCount, numberOfBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getGlobalBlockCount } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\theadingCount: getGlobalBlockCount( 'core/heading' ),\n\t\t\t\tparagraphCount: getGlobalBlockCount( 'core/paragraph' ),\n\t\t\t\tnumberOfBlocks: getGlobalBlockCount(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\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<>\n\t\t\t<div\n\t\t\t\tclassName=\"table-of-contents__wrapper\"\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<ul role=\"list\" className=\"table-of-contents__counts\">\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Words' ) }\n\t\t\t\t\t\t<WordCount />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Characters' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Time to read' ) }\n\t\t\t\t\t\t<TimeToRead />\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Headings' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ headingCount }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Paragraphs' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ paragraphCount }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li className=\"table-of-contents__count\">\n\t\t\t\t\t\t{ __( 'Blocks' ) }\n\t\t\t\t\t\t<span className=\"table-of-contents__number\">\n\t\t\t\t\t\t\t{ numberOfBlocks }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t{ headingCount > 0 && (\n\t\t\t\t<>\n\t\t\t\t\t<hr />\n\t\t\t\t\t<h2 className=\"table-of-contents__title\">\n\t\t\t\t\t\t{ __( 'Document Outline' ) }\n\t\t\t\t\t</h2>\n\t\t\t\t\t<DocumentOutline\n\t\t\t\t\t\tonSelect={ onRequestClose }\n\t\t\t\t\t\thasOutlineItemsDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default TableOfContentsPanel;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { info } from '@wordpress/icons';\nimport { forwardRef } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport TableOfContentsPanel from './panel';\n\nfunction TableOfContents(\n\t{ hasOutlineItemsDisabled, repositionDropdown, ...props },\n\tref\n) {\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ {\n\t\t\t\tplacement: repositionDropdown ? 'right' : 'bottom',\n\t\t\t} }\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<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tonClick={ hasBlocks ? onToggle : undefined }\n\t\t\t\t\ticon={ info }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Details' ) }\n\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\taria-disabled={ ! hasBlocks }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<TableOfContentsPanel\n\t\t\t\t\tonRequestClose={ onClose }\n\t\t\t\t\thasOutlineItemsDisabled={ hasOutlineItemsDisabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\n/**\n * Renders a table of contents component.\n *\n * @param {Object} props The component props.\n * @param {boolean} props.hasOutlineItemsDisabled Whether outline items are disabled.\n * @param {boolean} props.repositionDropdown Whether to reposition the dropdown.\n * @param {Element.ref} ref The component's ref.\n *\n * @return {React.ReactNode} The rendered table of contents component.\n */\nexport default forwardRef( TableOfContents );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Warns the user if there are unsaved changes before leaving the editor.\n * Compatible with Post Editor and Site Editor.\n *\n * @return {React.ReactNode} The component.\n */\nexport default function UnsavedChangesWarning() {\n\tconst { __experimentalGetDirtyEntityRecords } = useSelect( coreStore );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * Warns the user if there are unsaved changes before leaving the editor.\n\t\t *\n\t\t * @param {Event} event `beforeunload` event.\n\t\t *\n\t\t * @return {string | undefined} Warning prompt message, if unsaved changes exist.\n\t\t */\n\t\tconst warnIfUnsavedChanges = ( event ) => {\n\t\t\t// We need to call the selector directly in the listener to avoid race\n\t\t\t// conditions with `BrowserURL` where `componentDidUpdate` gets the\n\t\t\t// new value of `isEditedPostDirty` before this component does,\n\t\t\t// causing this component to incorrectly think a trashed post is still dirty.\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tif ( dirtyEntityRecords.length > 0 ) {\n\t\t\t\tevent.returnValue = __(\n\t\t\t\t\t'You have unsaved changes. If you proceed, they will be lost.'\n\t\t\t\t);\n\t\t\t\treturn event.returnValue;\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener( 'beforeunload', warnIfUnsavedChanges );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'beforeunload', warnIfUnsavedChanges );\n\t\t};\n\t}, [ __experimentalGetDirtyEntityRecords ] );\n\n\treturn null;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"serverSideRender\"];","// Block Creation Components.\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef } from '@wordpress/element';\nimport {\n\tAutocomplete as RootAutocomplete,\n\tAlignmentToolbar as RootAlignmentToolbar,\n\tBlockAlignmentToolbar as RootBlockAlignmentToolbar,\n\tBlockControls as RootBlockControls,\n\tBlockEdit as RootBlockEdit,\n\tBlockEditorKeyboardShortcuts as RootBlockEditorKeyboardShortcuts,\n\tBlockFormatControls as RootBlockFormatControls,\n\tBlockIcon as RootBlockIcon,\n\tBlockInspector as RootBlockInspector,\n\tBlockList as RootBlockList,\n\tBlockMover as RootBlockMover,\n\tBlockNavigationDropdown as RootBlockNavigationDropdown,\n\tBlockSelectionClearer as RootBlockSelectionClearer,\n\tBlockSettingsMenu as RootBlockSettingsMenu,\n\tBlockTitle as RootBlockTitle,\n\tBlockToolbar as RootBlockToolbar,\n\tColorPalette as RootColorPalette,\n\tContrastChecker as RootContrastChecker,\n\tCopyHandler as RootCopyHandler,\n\tcreateCustomColorsHOC as rootCreateCustomColorsHOC,\n\tDefaultBlockAppender as RootDefaultBlockAppender,\n\tFontSizePicker as RootFontSizePicker,\n\tgetColorClassName as rootGetColorClassName,\n\tgetColorObjectByAttributeValues as rootGetColorObjectByAttributeValues,\n\tgetColorObjectByColorValue as rootGetColorObjectByColorValue,\n\tgetFontSize as rootGetFontSize,\n\tgetFontSizeClass as rootGetFontSizeClass,\n\tInserter as RootInserter,\n\tInnerBlocks as RootInnerBlocks,\n\tInspectorAdvancedControls as RootInspectorAdvancedControls,\n\tInspectorControls as RootInspectorControls,\n\tPanelColorSettings as RootPanelColorSettings,\n\tPlainText as RootPlainText,\n\tRichText as RootRichText,\n\tRichTextShortcut as RootRichTextShortcut,\n\tRichTextToolbarButton as RootRichTextToolbarButton,\n\t__unstableRichTextInputEvent as __unstableRootRichTextInputEvent,\n\tMediaPlaceholder as RootMediaPlaceholder,\n\tMediaUpload as RootMediaUpload,\n\tMediaUploadCheck as RootMediaUploadCheck,\n\tMultiSelectScrollIntoView as RootMultiSelectScrollIntoView,\n\tNavigableToolbar as RootNavigableToolbar,\n\tObserveTyping as RootObserveTyping,\n\tSkipToSelectedBlock as RootSkipToSelectedBlock,\n\tURLInput as RootURLInput,\n\tURLInputButton as RootURLInputButton,\n\tURLPopover as RootURLPopover,\n\tWarning as RootWarning,\n\tWritingFlow as RootWritingFlow,\n\twithColorContext as rootWithColorContext,\n\twithColors as rootWithColors,\n\twithFontSizes as rootWithFontSizes,\n} from '@wordpress/block-editor';\n\nexport { default as ServerSideRender } from '@wordpress/server-side-render';\n\nfunction deprecateComponent( name, Wrapped, staticsToHoist = [] ) {\n\tconst Component = forwardRef( ( props, ref ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn <Wrapped ref={ ref } { ...props } />;\n\t} );\n\n\tstaticsToHoist.forEach( ( staticName ) => {\n\t\tComponent[ staticName ] = deprecateComponent(\n\t\t\tname + '.' + staticName,\n\t\t\tWrapped[ staticName ]\n\t\t);\n\t} );\n\n\treturn Component;\n}\n\nfunction deprecateFunction( name, func ) {\n\treturn ( ...args ) => {\n\t\tdeprecated( 'wp.editor.' + name, {\n\t\t\tsince: '5.3',\n\t\t\talternative: 'wp.blockEditor.' + name,\n\t\t\tversion: '6.2',\n\t\t} );\n\n\t\treturn func( ...args );\n\t};\n}\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichText` instead.\n */\nconst RichText = deprecateComponent( 'RichText', RootRichText, [ 'Content' ] );\nRichText.isEmpty = deprecateFunction(\n\t'RichText.isEmpty',\n\tRootRichText.isEmpty\n);\n\nexport { RichText };\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Autocomplete` instead.\n */\nexport const Autocomplete = deprecateComponent(\n\t'Autocomplete',\n\tRootAutocomplete\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.AlignmentToolbar` instead.\n */\nexport const AlignmentToolbar = deprecateComponent(\n\t'AlignmentToolbar',\n\tRootAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockAlignmentToolbar` instead.\n */\nexport const BlockAlignmentToolbar = deprecateComponent(\n\t'BlockAlignmentToolbar',\n\tRootBlockAlignmentToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockControls` instead.\n */\nexport const BlockControls = deprecateComponent(\n\t'BlockControls',\n\tRootBlockControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEdit` instead.\n */\nexport const BlockEdit = deprecateComponent( 'BlockEdit', RootBlockEdit );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockEditorKeyboardShortcuts` instead.\n */\nexport const BlockEditorKeyboardShortcuts = deprecateComponent(\n\t'BlockEditorKeyboardShortcuts',\n\tRootBlockEditorKeyboardShortcuts\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockFormatControls` instead.\n */\nexport const BlockFormatControls = deprecateComponent(\n\t'BlockFormatControls',\n\tRootBlockFormatControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockIcon` instead.\n */\nexport const BlockIcon = deprecateComponent( 'BlockIcon', RootBlockIcon );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockInspector` instead.\n */\nexport const BlockInspector = deprecateComponent(\n\t'BlockInspector',\n\tRootBlockInspector\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockList` instead.\n */\nexport const BlockList = deprecateComponent( 'BlockList', RootBlockList );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockMover` instead.\n */\nexport const BlockMover = deprecateComponent( 'BlockMover', RootBlockMover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockNavigationDropdown` instead.\n */\nexport const BlockNavigationDropdown = deprecateComponent(\n\t'BlockNavigationDropdown',\n\tRootBlockNavigationDropdown\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSelectionClearer` instead.\n */\nexport const BlockSelectionClearer = deprecateComponent(\n\t'BlockSelectionClearer',\n\tRootBlockSelectionClearer\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockSettingsMenu` instead.\n */\nexport const BlockSettingsMenu = deprecateComponent(\n\t'BlockSettingsMenu',\n\tRootBlockSettingsMenu\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockTitle` instead.\n */\nexport const BlockTitle = deprecateComponent( 'BlockTitle', RootBlockTitle );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.BlockToolbar` instead.\n */\nexport const BlockToolbar = deprecateComponent(\n\t'BlockToolbar',\n\tRootBlockToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ColorPalette` instead.\n */\nexport const ColorPalette = deprecateComponent(\n\t'ColorPalette',\n\tRootColorPalette\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ContrastChecker` instead.\n */\nexport const ContrastChecker = deprecateComponent(\n\t'ContrastChecker',\n\tRootContrastChecker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.CopyHandler` instead.\n */\nexport const CopyHandler = deprecateComponent( 'CopyHandler', RootCopyHandler );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.DefaultBlockAppender` instead.\n */\nexport const DefaultBlockAppender = deprecateComponent(\n\t'DefaultBlockAppender',\n\tRootDefaultBlockAppender\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.FontSizePicker` instead.\n */\nexport const FontSizePicker = deprecateComponent(\n\t'FontSizePicker',\n\tRootFontSizePicker\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Inserter` instead.\n */\nexport const Inserter = deprecateComponent( 'Inserter', RootInserter );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InnerBlocks` instead.\n */\nexport const InnerBlocks = deprecateComponent( 'InnerBlocks', RootInnerBlocks, [\n\t'ButtonBlockAppender',\n\t'DefaultBlockAppender',\n\t'Content',\n] );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorAdvancedControls` instead.\n */\nexport const InspectorAdvancedControls = deprecateComponent(\n\t'InspectorAdvancedControls',\n\tRootInspectorAdvancedControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.InspectorControls` instead.\n */\nexport const InspectorControls = deprecateComponent(\n\t'InspectorControls',\n\tRootInspectorControls,\n\t[ 'Slot' ]\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PanelColorSettings` instead.\n */\nexport const PanelColorSettings = deprecateComponent(\n\t'PanelColorSettings',\n\tRootPanelColorSettings\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.PlainText` instead.\n */\nexport const PlainText = deprecateComponent( 'PlainText', RootPlainText );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextShortcut` instead.\n */\nexport const RichTextShortcut = deprecateComponent(\n\t'RichTextShortcut',\n\tRootRichTextShortcut\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.RichTextToolbarButton` instead.\n */\nexport const RichTextToolbarButton = deprecateComponent(\n\t'RichTextToolbarButton',\n\tRootRichTextToolbarButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.__unstableRichTextInputEvent` instead.\n */\nexport const __unstableRichTextInputEvent = deprecateComponent(\n\t'__unstableRichTextInputEvent',\n\t__unstableRootRichTextInputEvent\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaPlaceholder` instead.\n */\nexport const MediaPlaceholder = deprecateComponent(\n\t'MediaPlaceholder',\n\tRootMediaPlaceholder\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUpload` instead.\n */\nexport const MediaUpload = deprecateComponent( 'MediaUpload', RootMediaUpload );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MediaUploadCheck` instead.\n */\nexport const MediaUploadCheck = deprecateComponent(\n\t'MediaUploadCheck',\n\tRootMediaUploadCheck\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.MultiSelectScrollIntoView` instead.\n */\nexport const MultiSelectScrollIntoView = deprecateComponent(\n\t'MultiSelectScrollIntoView',\n\tRootMultiSelectScrollIntoView\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.NavigableToolbar` instead.\n */\nexport const NavigableToolbar = deprecateComponent(\n\t'NavigableToolbar',\n\tRootNavigableToolbar\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.ObserveTyping` instead.\n */\nexport const ObserveTyping = deprecateComponent(\n\t'ObserveTyping',\n\tRootObserveTyping\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.SkipToSelectedBlock` instead.\n */\nexport const SkipToSelectedBlock = deprecateComponent(\n\t'SkipToSelectedBlock',\n\tRootSkipToSelectedBlock\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInput` instead.\n */\nexport const URLInput = deprecateComponent( 'URLInput', RootURLInput );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLInputButton` instead.\n */\nexport const URLInputButton = deprecateComponent(\n\t'URLInputButton',\n\tRootURLInputButton\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.URLPopover` instead.\n */\nexport const URLPopover = deprecateComponent( 'URLPopover', RootURLPopover );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.Warning` instead.\n */\nexport const Warning = deprecateComponent( 'Warning', RootWarning );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.WritingFlow` instead.\n */\nexport const WritingFlow = deprecateComponent( 'WritingFlow', RootWritingFlow );\n\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const createCustomColorsHOC = deprecateFunction(\n\t'createCustomColorsHOC',\n\trootCreateCustomColorsHOC\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorClassName` instead.\n */\nexport const getColorClassName = deprecateFunction(\n\t'getColorClassName',\n\trootGetColorClassName\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByAttributeValues` instead.\n */\nexport const getColorObjectByAttributeValues = deprecateFunction(\n\t'getColorObjectByAttributeValues',\n\trootGetColorObjectByAttributeValues\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getColorObjectByColorValue` instead.\n */\nexport const getColorObjectByColorValue = deprecateFunction(\n\t'getColorObjectByColorValue',\n\trootGetColorObjectByColorValue\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSize` instead.\n */\nexport const getFontSize = deprecateFunction( 'getFontSize', rootGetFontSize );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.getFontSizeClass` instead.\n */\nexport const getFontSizeClass = deprecateFunction(\n\t'getFontSizeClass',\n\trootGetFontSizeClass\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.createCustomColorsHOC` instead.\n */\nexport const withColorContext = deprecateFunction(\n\t'withColorContext',\n\trootWithColorContext\n);\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withColors` instead.\n */\nexport const withColors = deprecateFunction( 'withColors', rootWithColors );\n/**\n * @deprecated since 5.3, use `wp.blockEditor.withFontSizes` instead.\n */\nexport const withFontSizes = deprecateFunction(\n\t'withFontSizes',\n\trootWithFontSizes\n);\n","/**\n * Internal dependencies\n */\nimport EditorKeyboardShortcuts from './global-keyboard-shortcuts';\n\n// Block Creation Components.\nexport * from './autocompleters';\n\n// Post Related Components.\nexport { default as AutosaveMonitor } from './autosave-monitor';\nexport { default as DocumentBar } from './document-bar';\nexport { default as DocumentOutline } from './document-outline';\nexport { default as DocumentOutlineCheck } from './document-outline/check';\nexport { EditorKeyboardShortcuts };\nexport { default as EditorKeyboardShortcutsRegister } from './global-keyboard-shortcuts/register-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 EditorSnackbars } from './editor-snackbars';\nexport { default as EntitiesSavedStates } from './entities-saved-states';\nexport { useIsDirty as useEntitiesSavedStatesIsDirty } from './entities-saved-states/hooks/use-is-dirty';\nexport { default as ErrorBoundary } from './error-boundary';\nexport { default as LocalAutosaveMonitor } from './local-autosave-monitor';\nexport { default as PageAttributesCheck } from './page-attributes/check';\nexport { default as PageAttributesOrder } from './page-attributes/order';\nexport { default as PageAttributesPanel } from './page-attributes/panel';\nexport { default as PageAttributesParent } from './page-attributes/parent';\nexport { default as PageTemplate } from './post-template/classic-theme';\nexport { default as PluginDocumentSettingPanel } from './plugin-document-setting-panel';\nexport { default as PluginBlockSettingsMenuItem } from './block-settings-menu/plugin-block-settings-menu-item';\nexport { default as PluginMoreMenuItem } from './plugin-more-menu-item';\nexport { default as PluginPostPublishPanel } from './plugin-post-publish-panel';\nexport { default as PluginPostStatusInfo } from './plugin-post-status-info';\nexport { default as PluginPrePublishPanel } from './plugin-pre-publish-panel';\nexport { default as PluginPreviewMenuItem } from './plugin-preview-menu-item';\nexport { default as PluginSidebar } from './plugin-sidebar';\nexport { default as PluginSidebarMoreMenuItem } from './plugin-sidebar-more-menu-item';\nexport { default as PostTemplatePanel } from './post-template/panel';\nexport { default as PostAuthor } from './post-author';\nexport { default as PostAuthorCheck } from './post-author/check';\nexport { default as PostAuthorPanel } from './post-author/panel';\nexport { default as PostComments } from './post-comments';\nexport { default as PostDiscussionPanel } from './post-discussion/panel';\nexport { default as PostExcerpt } from './post-excerpt';\nexport { default as PostExcerptCheck } from './post-excerpt/check';\nexport { default as PostExcerptPanel } from './post-excerpt/panel';\nexport { default as PostFeaturedImage } from './post-featured-image';\nexport { default as PostFeaturedImageCheck } from './post-featured-image/check';\nexport { default as PostFeaturedImagePanel } from './post-featured-image/panel';\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 PostLastRevisionPanel } from './post-last-revision/panel';\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 {\n\tdefault as PostScheduleLabel,\n\tusePostScheduleLabel,\n} from './post-schedule/label';\nexport { default as PostSchedulePanel } from './post-schedule/panel';\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 PostSyncStatus } from './post-sync-status';\nexport { default as PostTaxonomies } from './post-taxonomies';\nexport { FlatTermSelector as PostTaxonomiesFlatTermSelector } from './post-taxonomies/flat-term-selector';\nexport { HierarchicalTermSelector as PostTaxonomiesHierarchicalTermSelector } from './post-taxonomies/hierarchical-term-selector';\nexport { default as PostTaxonomiesCheck } from './post-taxonomies/check';\nexport { default as PostTaxonomiesPanel } from './post-taxonomies/panel';\nexport { default as PostTextEditor } from './post-text-editor';\nexport { default as PostTitle } from './post-title';\nexport { default as PostTitleRaw } from './post-title/post-title-raw';\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 PostURL } from './post-url';\nexport { default as PostURLCheck } from './post-url/check';\nexport { default as PostURLLabel, usePostURLLabel } from './post-url/label';\nexport { default as PostURLPanel } from './post-url/panel';\nexport { default as PostVisibility } from './post-visibility';\nexport {\n\tdefault as PostVisibilityLabel,\n\tusePostVisibilityLabel,\n} from './post-visibility/label';\nexport { default as PostVisibilityCheck } from './post-visibility/check';\nexport { default as TableOfContents } from './table-of-contents';\nexport { default as ThemeSupportCheck } from './theme-support-check';\nexport { default as UnsavedChangesWarning } from './unsaved-changes-warning';\nexport { default as WordCount } from './word-count';\nexport { default as TimeToRead } from './time-to-read';\nexport { default as CharacterCount } from './character-count';\n\n// State Related Components.\nexport { default as EditorProvider } from './provider';\n\nexport * from './deprecated';\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport const VisualEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n\n/**\n * Handles the keyboard shortcuts for the editor.\n *\n * It provides functionality for various keyboard shortcuts such as toggling editor mode,\n * toggling distraction-free mode, undo/redo, saving the post, toggling list view,\n * and toggling the sidebar.\n */\nexport const TextEditorGlobalKeyboardShortcuts = EditorKeyboardShortcuts;\n","/**\n * WordPress dependencies\n */\nimport { cleanForSlug as urlCleanForSlug } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Performs some basic cleanup of a string for use as a post slug\n *\n * This replicates some of what sanitize_title() does in WordPress core, but\n * is only designed to approximate what the slug will be.\n *\n * Converts Latin-1 Supplement and Latin Extended-A letters to basic Latin letters.\n * Removes combining diacritical marks. Converts whitespace, periods,\n * and forward slashes to hyphens. Removes any remaining non-word characters\n * except hyphens and underscores. Converts remaining string to lowercase.\n * It does not account for octets, HTML entities, or other encoded characters.\n *\n * @param {string} string Title or slug to be processed\n *\n * @return {string} Processed string\n */\nexport function cleanForSlug( string ) {\n\tdeprecated( 'wp.editor.cleanForSlug', {\n\t\tsince: '12.7',\n\t\tplugin: 'Gutenberg',\n\t\talternative: 'wp.url.cleanForSlug',\n\t} );\n\treturn urlCleanForSlug( string );\n}\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst EditorContentSlotFill = createSlotFill(\n\tSymbol( 'EditCanvasContainerSlot' )\n);\n\nexport default EditorContentSlotFill;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlotFills as useSlotFills,\n\tcreateSlotFill,\n} from '@wordpress/components';\n\n// Keeping an old name for backward compatibility.\nconst slotName = '__experimentalMainDashboardButton';\n\nexport const useHasBackButton = () => {\n\tconst fills = useSlotFills( slotName );\n\treturn Boolean( fills && fills.length );\n};\n\nconst { Fill, Slot } = createSlotFill( slotName );\n\nconst BackButton = Fill;\nconst BackButtonSlot = () => {\n\tconst fills = useSlotFills( slotName );\n\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tfillProps={ { length: ! fills ? 0 : fills.length } }\n\t\t/>\n\t);\n};\nBackButton.Slot = BackButtonSlot;\n\nexport default BackButton;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst comment = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z\" />\n\t</SVG>\n);\n\nexport default comment;\n","export const collabHistorySidebarName = 'edit-post/collab-history-sidebar';\nexport const collabSidebarName = 'edit-post/collab-sidebar';\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreVertical = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n\nexport default moreVertical;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { dateI18n, getSettings as getDateSettings } from '@wordpress/date';\nimport { useEntityProp, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Render author information for a comment.\n *\n * @param {Object} props - Component properties.\n * @param {string} props.avatar - URL of the author's avatar.\n * @param {string} props.name - Name of the author.\n * @param {string} props.date - Date of the comment.\n *\n * @return {React.ReactNode} The JSX element representing the author's information.\n */\nfunction CommentAuthorInfo( { avatar, name, date } ) {\n\tconst dateSettings = getDateSettings();\n\tconst [ dateTimeFormat = dateSettings.formats.time ] = useEntityProp(\n\t\t'root',\n\t\t'site',\n\t\t'time_format'\n\t);\n\n\tconst { currentUserAvatar, currentUserName } = useSelect( ( select ) => {\n\t\tconst userData = select( coreStore ).getCurrentUser();\n\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\tconst { __experimentalDiscussionSettings } = getSettings();\n\t\tconst defaultAvatar = __experimentalDiscussionSettings?.avatarURL;\n\t\treturn {\n\t\t\tcurrentUserAvatar: userData?.avatar_urls[ 48 ] ?? defaultAvatar,\n\t\t\tcurrentUserName: userData?.name,\n\t\t};\n\t}, [] );\n\n\tconst currentDate = new Date();\n\n\treturn (\n\t\t<>\n\t\t\t<img\n\t\t\t\tsrc={ avatar ?? currentUserAvatar }\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-avatar\"\n\t\t\t\t// translators: alt text for user avatar image\n\t\t\t\talt={ __( 'User avatar' ) }\n\t\t\t\twidth={ 32 }\n\t\t\t\theight={ 32 }\n\t\t\t/>\n\t\t\t<VStack spacing=\"0\">\n\t\t\t\t<span className=\"editor-collab-sidebar-panel__user-name\">\n\t\t\t\t\t{ name ?? currentUserName }\n\t\t\t\t</span>\n\t\t\t\t<time\n\t\t\t\t\tdateTime={ dateI18n( 'c', date ?? currentDate ) }\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-time\"\n\t\t\t\t>\n\t\t\t\t\t{ dateI18n( dateTimeFormat, date ?? currentDate ) }\n\t\t\t\t</time>\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default CommentAuthorInfo;\n","/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\tButton,\n\tTextareaControl,\n} from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { sanitizeCommentString } from './utils';\n\n/**\n * EditComment component.\n *\n * @param {Object} props - The component props.\n * @param {Function} props.onSubmit - The function to call when updating the comment.\n * @param {Function} props.onCancel - The function to call when canceling the comment update.\n * @param {Object} props.thread - The comment thread object.\n * @param {string} props.submitButtonText - The text to display on the submit button.\n * @return {React.ReactNode} The CommentForm component.\n */\nfunction CommentForm( { onSubmit, onCancel, thread, submitButtonText } ) {\n\tconst [ inputComment, setInputComment ] = useState(\n\t\tthread?.content?.raw ?? ''\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<TextareaControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tvalue={ inputComment ?? '' }\n\t\t\t\tonChange={ setInputComment }\n\t\t\t/>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonSubmit( inputComment );\n\t\t\t\t\t\tsetInputComment( '' );\n\t\t\t\t\t} }\n\t\t\t\t\tdisabled={\n\t\t\t\t\t\t0 === sanitizeCommentString( inputComment ).length\n\t\t\t\t\t}\n\t\t\t\t\ttext={ submitButtonText }\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ onCancel }\n\t\t\t\t\ttext={ _x( 'Cancel', 'Cancel comment button' ) }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</>\n\t);\n}\n\nexport default CommentForm;\n","/**\n * Sanitizes a comment string by removing non-printable ASCII characters.\n *\n * @param {string} str - The comment string to sanitize.\n * @return {string} - The sanitized comment string.\n */\nexport function sanitizeCommentString( str ) {\n\treturn str.trim();\n}\n\n/**\n * Extracts comment IDs from an array of blocks.\n *\n * This function recursively traverses the blocks and their inner blocks to\n * collect all comment IDs found in the block attributes.\n *\n * @param {Array} blocks - The array of blocks to extract comment IDs from.\n * @return {Array} An array of comment IDs extracted from the blocks.\n */\nexport function getCommentIdsFromBlocks( blocks ) {\n\t// Recursive function to extract comment IDs from blocks\n\tconst extractCommentIds = ( items ) => {\n\t\treturn items.reduce( ( commentIds, block ) => {\n\t\t\t// Check for comment IDs in the current block's attributes\n\t\t\tif (\n\t\t\t\tblock.attributes &&\n\t\t\t\tblock.attributes.blockCommentId &&\n\t\t\t\t! commentIds.includes( block.attributes.blockCommentId )\n\t\t\t) {\n\t\t\t\tcommentIds.push( block.attributes.blockCommentId );\n\t\t\t}\n\n\t\t\t// Recursively check inner blocks\n\t\t\tif ( block.innerBlocks && block.innerBlocks.length > 0 ) {\n\t\t\t\tconst innerCommentIds = extractCommentIds( block.innerBlocks );\n\t\t\t\tcommentIds.push( ...innerCommentIds );\n\t\t\t}\n\n\t\t\treturn commentIds;\n\t\t}, [] );\n\t};\n\n\t// Extract all comment IDs recursively\n\treturn extractCommentIds( blocks );\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, RawHTML } from '@wordpress/element';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tButton,\n\tDropdownMenu,\n\tTooltip,\n} from '@wordpress/components';\nimport { Icon, check, published, moreVertical } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\n\n/**\n * Renders the Comments component.\n *\n * @param {Object} props - The component props.\n * @param {Array} props.threads - The array of comment threads.\n * @param {Function} props.onEditComment - The function to handle comment editing.\n * @param {Function} props.onAddReply - The function to add a reply to a comment.\n * @param {Function} props.onCommentDelete - The function to delete a comment.\n * @param {Function} props.onCommentResolve - The function to mark a comment as resolved.\n * @param {boolean} props.showCommentBoard - Whether to show the comment board.\n * @param {Function} props.setShowCommentBoard - The function to set the comment board visibility.\n * @return {React.ReactNode} The rendered Comments component.\n */\nexport function Comments( {\n\tthreads,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n} ) {\n\tconst { blockCommentId } = useSelect( ( select ) => {\n\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst _clientId = getSelectedBlockClientId();\n\n\t\treturn {\n\t\t\tblockCommentId: _clientId\n\t\t\t\t? getBlockAttributes( _clientId )?.blockCommentId\n\t\t\t\t: null,\n\t\t};\n\t}, [] );\n\n\tconst [ focusThread, setFocusThread ] = useState(\n\t\tshowCommentBoard && blockCommentId ? blockCommentId : null\n\t);\n\n\tconst clearThreadFocus = () => {\n\t\tsetFocusThread( null );\n\t\tsetShowCommentBoard( false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{\n\t\t\t\t// If there are no comments, show a message indicating no comments are available.\n\t\t\t\t( ! Array.isArray( threads ) || threads.length === 0 ) && (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\talignment=\"left\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__thread\"\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// translators: message displayed when there are no comments available\n\t\t\t\t\t\t\t__( 'No comments available' )\n\t\t\t\t\t\t}\n\t\t\t\t\t</VStack>\n\t\t\t\t)\n\t\t\t}\n\t\t\t{ Array.isArray( threads ) &&\n\t\t\t\tthreads.length > 0 &&\n\t\t\t\tthreads.map( ( thread ) => (\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tkey={ thread.id }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'editor-collab-sidebar-panel__thread',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__active-thread':\n\t\t\t\t\t\t\t\t\tblockCommentId &&\n\t\t\t\t\t\t\t\t\tblockCommentId === thread.id,\n\t\t\t\t\t\t\t\t'editor-collab-sidebar-panel__focus-thread':\n\t\t\t\t\t\t\t\t\tfocusThread && focusThread === thread.id,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tid={ thread.id }\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tonClick={ () => setFocusThread( thread.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thread\n\t\t\t\t\t\t\tthread={ thread }\n\t\t\t\t\t\t\tonAddReply={ onAddReply }\n\t\t\t\t\t\t\tonCommentDelete={ onCommentDelete }\n\t\t\t\t\t\t\tonCommentResolve={ onCommentResolve }\n\t\t\t\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\t\t\t\tisFocused={ focusThread === thread.id }\n\t\t\t\t\t\t\tclearThreadFocus={ clearThreadFocus }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t) ) }\n\t\t</>\n\t);\n}\n\nfunction Thread( {\n\tthread,\n\tonEditComment,\n\tonAddReply,\n\tonCommentDelete,\n\tonCommentResolve,\n\tisFocused,\n\tclearThreadFocus,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<CommentBoard\n\t\t\t\tthread={ thread }\n\t\t\t\tonResolve={ onCommentResolve }\n\t\t\t\tonEdit={ onEditComment }\n\t\t\t\tonDelete={ onCommentDelete }\n\t\t\t\tstatus={ thread.status }\n\t\t\t/>\n\t\t\t{ 0 < thread?.reply?.length && (\n\t\t\t\t<>\n\t\t\t\t\t{ ! isFocused && (\n\t\t\t\t\t\t<VStack className=\"editor-collab-sidebar-panel__show-more-reply\">\n\t\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t\t// translators: 1: number of replies.\n\t\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t\t'%s more replies..',\n\t\t\t\t\t\t\t\t\t'Show replies button'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tthread?.reply?.length\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ isFocused &&\n\t\t\t\t\t\tthread.reply.map( ( reply ) => (\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tkey={ reply.id }\n\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\t\t\t\tid={ reply.id }\n\t\t\t\t\t\t\t\tspacing=\"2\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ 'approved' !== thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard\n\t\t\t\t\t\t\t\t\t\tthread={ reply }\n\t\t\t\t\t\t\t\t\t\tonEdit={ onEditComment }\n\t\t\t\t\t\t\t\t\t\tonDelete={ onCommentDelete }\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{ 'approved' === thread.status && (\n\t\t\t\t\t\t\t\t\t<CommentBoard thread={ reply } />\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ 'approved' !== thread.status && isFocused && (\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__child-thread\"\n\t\t\t\t\tspacing=\"2\"\n\t\t\t\t>\n\t\t\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t\t\t<CommentAuthorInfo />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-field\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\t\t\t\tonAddReply( inputComment, thread.id );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ ( event ) => {\n\t\t\t\t\t\t\t\tevent.stopPropagation(); // Prevent the parent onClick from being triggered\n\t\t\t\t\t\t\t\tclearThreadFocus();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsubmitButtonText={ _x(\n\t\t\t\t\t\t\t\t'Reply',\n\t\t\t\t\t\t\t\t'Add reply comment'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst CommentBoard = ( { thread, onResolve, onEdit, onDelete, status } ) => {\n\tconst [ actionState, setActionState ] = useState( false );\n\tconst [ showConfirmDialog, setShowConfirmDialog ] = useState( false );\n\n\tconst handleConfirmDelete = () => {\n\t\tonDelete( thread.id );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleConfirmResolve = () => {\n\t\tonResolve( thread.id );\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst handleCancel = () => {\n\t\tsetActionState( false );\n\t\tsetShowConfirmDialog( false );\n\t};\n\n\tconst actions = [\n\t\tonEdit && {\n\t\t\ttitle: _x( 'Edit', 'Edit comment' ),\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'edit' );\n\t\t\t},\n\t\t},\n\t\tonDelete && {\n\t\t\ttitle: _x( 'Delete', 'Delete comment' ),\n\t\t\tonClick: () => {\n\t\t\t\tsetActionState( 'delete' );\n\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t},\n\t\t},\n\t];\n\n\tconst moreActions = actions.filter( ( item ) => item?.onClick );\n\n\treturn (\n\t\t<>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\" justify=\"flex-start\">\n\t\t\t\t<CommentAuthorInfo\n\t\t\t\t\tavatar={ thread?.author_avatar_urls?.[ 48 ] }\n\t\t\t\t\tname={ thread?.author_name }\n\t\t\t\t\tdate={ thread?.date }\n\t\t\t\t/>\n\t\t\t\t<span className=\"editor-collab-sidebar-panel__comment-status\">\n\t\t\t\t\t{ status !== 'approved' && (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\talignment=\"right\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\tspacing=\"0\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ 0 === thread?.parent && onResolve && (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Resolve',\n\t\t\t\t\t\t\t\t\t\t'Mark comment as resolved'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t\ticon={ published }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetActionState( 'resolve' );\n\t\t\t\t\t\t\t\t\t\tsetShowConfirmDialog( true );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tshowTooltip\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{ 0 < moreActions.length && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t\t\t'Select an action',\n\t\t\t\t\t\t\t\t\t\t'Select comment action'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-dropdown-menu\"\n\t\t\t\t\t\t\t\t\tcontrols={ moreActions }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) }\n\t\t\t\t\t{ status === 'approved' && (\n\t\t\t\t\t\t// translators: tooltip for resolved comment\n\t\t\t\t\t\t<Tooltip text={ __( 'Resolved' ) }>\n\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) }\n\t\t\t\t</span>\n\t\t\t</HStack>\n\t\t\t<HStack\n\t\t\t\talignment=\"left\"\n\t\t\t\tspacing=\"3\"\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tclassName=\"editor-collab-sidebar-panel__user-comment\"\n\t\t\t>\n\t\t\t\t<VStack\n\t\t\t\t\tspacing=\"3\"\n\t\t\t\t\tclassName=\"editor-collab-sidebar-panel__comment-field\"\n\t\t\t\t>\n\t\t\t\t\t{ 'edit' === actionState && (\n\t\t\t\t\t\t<CommentForm\n\t\t\t\t\t\t\tonSubmit={ ( value ) => {\n\t\t\t\t\t\t\t\tonEdit( thread.id, value );\n\t\t\t\t\t\t\t\tsetActionState( false );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonCancel={ () => handleCancel() }\n\t\t\t\t\t\t\tthread={ thread }\n\t\t\t\t\t\t\tsubmitButtonText={ _x( 'Update', 'verb' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ 'edit' !== actionState && (\n\t\t\t\t\t\t<RawHTML>{ thread?.content?.raw }</RawHTML>\n\t\t\t\t\t) }\n\t\t\t\t</VStack>\n\t\t\t</HStack>\n\t\t\t{ 'resolve' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmResolve }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText=\"Yes\"\n\t\t\t\t\tcancelButtonText=\"No\"\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\t// translators: message displayed when confirming an action\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Are you sure you want to mark this comment as resolved?'\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ 'delete' === actionState && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ showConfirmDialog }\n\t\t\t\t\tonConfirm={ handleConfirmDelete }\n\t\t\t\t\tonCancel={ handleCancel }\n\t\t\t\t\tconfirmButtonText=\"Yes\"\n\t\t\t\t\tcancelButtonText=\"No\"\n\t\t\t\t>\n\t\t\t\t\t{\n\t\t\t\t\t\t// translators: message displayed when confirming an action\n\t\t\t\t\t\t__( 'Are you sure you want to delete this comment?' )\n\t\t\t\t\t}\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport CommentAuthorInfo from './comment-author-info';\nimport CommentForm from './comment-form';\n\n/**\n * Renders the UI for adding a comment in the Gutenberg editor's collaboration sidebar.\n *\n * @param {Object} props - The component props.\n * @param {Function} props.onSubmit - A callback function to be called when the user submits a comment.\n * @param {boolean} props.showCommentBoard - The function to edit the comment.\n * @param {Function} props.setShowCommentBoard - The function to delete the comment.\n * @return {React.ReactNode} The rendered comment input UI.\n */\nexport function AddComment( {\n\tonSubmit,\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n} ) {\n\tconst { clientId, blockCommentId } = useSelect( ( select ) => {\n\t\tconst { getSelectedBlock } = select( blockEditorStore );\n\t\tconst selectedBlock = getSelectedBlock();\n\t\treturn {\n\t\t\tclientId: selectedBlock?.clientId,\n\t\t\tblockCommentId: selectedBlock?.attributes?.blockCommentId,\n\t\t};\n\t} );\n\n\tif ( ! showCommentBoard || ! clientId || undefined !== blockCommentId ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack\n\t\t\tspacing=\"3\"\n\t\t\tclassName=\"editor-collab-sidebar-panel__thread editor-collab-sidebar-panel__active-thread editor-collab-sidebar-panel__focus-thread\"\n\t\t>\n\t\t\t<HStack alignment=\"left\" spacing=\"3\">\n\t\t\t\t<CommentAuthorInfo />\n\t\t\t</HStack>\n\t\t\t<CommentForm\n\t\t\t\tonSubmit={ ( inputComment ) => {\n\t\t\t\t\tonSubmit( inputComment );\n\t\t\t\t} }\n\t\t\t\tonCancel={ () => {\n\t\t\t\t\tsetShowCommentBoard( false );\n\t\t\t\t} }\n\t\t\t\tsubmitButtonText={ _x( 'Comment', 'Add comment button' ) }\n\t\t\t/>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { comment as commentIcon } from '@wordpress/icons';\n\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { CommentIconSlotFill } = unlock( blockEditorPrivateApis );\n\nconst AddCommentButton = ( { onClick } ) => {\n\treturn (\n\t\t<CommentIconSlotFill.Fill>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<MenuItem\n\t\t\t\t\ticon={ commentIcon }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonClick();\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t>\n\t\t\t\t\t{ _x( 'Comment', 'Add comment button' ) }\n\t\t\t\t</MenuItem>\n\t\t\t) }\n\t\t</CommentIconSlotFill.Fill>\n\t);\n};\n\nexport default AddCommentButton;\n","/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { CommentIconToolbarSlotFill } = unlock( blockEditorPrivateApis );\n\nconst AddCommentToolbarButton = ( { onClick } ) => {\n\treturn (\n\t\t<CommentIconToolbarSlotFill.Fill>\n\t\t\t<ToolbarButton\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\ticon={ commentIcon }\n\t\t\t\tlabel={ _x( 'Comment', 'View comment' ) }\n\t\t\t\tonClick={ onClick }\n\t\t\t/>\n\t\t</CommentIconToolbarSlotFill.Fill>\n\t);\n};\n\nexport default AddCommentToolbarButton;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseSelect,\n\tuseDispatch,\n\tresolveSelect,\n\tsubscribe,\n} from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { comment as commentIcon } from '@wordpress/icons';\nimport { addFilter } from '@wordpress/hooks';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore, useEntityBlockEditor } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PluginSidebar from '../plugin-sidebar';\nimport { collabHistorySidebarName, collabSidebarName } from './constants';\nimport { Comments } from './comments';\nimport { AddComment } from './add-comment';\nimport { store as editorStore } from '../../store';\nimport AddCommentButton from './comment-button';\nimport AddCommentToolbarButton from './comment-button-toolbar';\nimport { useGlobalStylesContext } from '../global-styles-provider';\nimport { getCommentIdsFromBlocks } from './utils';\n\nconst modifyBlockCommentAttributes = ( settings ) => {\n\tif ( ! settings.attributes.blockCommentId ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tblockCommentId: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n};\n\n// Apply the filter to all core blocks\naddFilter(\n\t'blocks.registerBlockType',\n\t'block-comment/modify-core-block-attributes',\n\tmodifyBlockCommentAttributes\n);\n\nfunction CollabSidebarContent( {\n\tshowCommentBoard,\n\tsetShowCommentBoard,\n\tstyles,\n\tcomments,\n} ) {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { saveEntityRecord, deleteEntityRecord } = useDispatch( coreStore );\n\tconst { getEntityRecord } = resolveSelect( coreStore );\n\n\tconst { postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId } = select( editorStore );\n\t\tconst _postId = getCurrentPostId();\n\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t};\n\t}, [] );\n\n\tconst { getSelectedBlockClientId } = useSelect( blockEditorStore );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\n\t// Function to save the comment.\n\tconst addNewComment = async ( comment, parentCommentId ) => {\n\t\tconst args = {\n\t\t\tpost: postId,\n\t\t\tcontent: comment,\n\t\t\tcomment_type: 'block_comment',\n\t\t\tcomment_approved: 0,\n\t\t};\n\n\t\t// Create a new object, conditionally including the parent property\n\t\tconst updatedArgs = {\n\t\t\t...args,\n\t\t\t...( parentCommentId ? { parent: parentCommentId } : {} ),\n\t\t};\n\n\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t'root',\n\t\t\t'comment',\n\t\t\tupdatedArgs\n\t\t);\n\n\t\tif ( savedRecord ) {\n\t\t\t// If it's a main comment, update the block attributes with the comment id.\n\t\t\tif ( ! parentCommentId ) {\n\t\t\t\tupdateBlockAttributes( getSelectedBlockClientId(), {\n\t\t\t\t\tblockCommentId: savedRecord?.id,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\tparentCommentId\n\t\t\t\t\t? // translators: Reply added successfully\n\t\t\t\t\t __( 'Reply added successfully.' )\n\t\t\t\t\t: // translators: Comment added successfully\n\t\t\t\t\t __( 'Comment added successfully.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tonError();\n\t\t}\n\t};\n\n\tconst onCommentResolve = async ( commentId ) => {\n\t\tconst savedRecord = await saveEntityRecord( 'root', 'comment', {\n\t\t\tid: commentId,\n\t\t\tstatus: 'approved',\n\t\t} );\n\n\t\tif ( savedRecord ) {\n\t\t\t// translators: Comment resolved successfully\n\t\t\tcreateNotice( 'snackbar', __( 'Comment marked as resolved.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t} else {\n\t\t\tonError();\n\t\t}\n\t};\n\n\tconst onEditComment = async ( commentId, comment ) => {\n\t\tconst savedRecord = await saveEntityRecord( 'root', 'comment', {\n\t\t\tid: commentId,\n\t\t\tcontent: comment,\n\t\t} );\n\n\t\tif ( savedRecord ) {\n\t\t\tcreateNotice(\n\t\t\t\t'snackbar',\n\t\t\t\t// translators: Comment edited successfully\n\t\t\t\t__( 'Comment edited successfully.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tisDismissible: true,\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tonError();\n\t\t}\n\t};\n\n\tconst onError = () => {\n\t\tcreateNotice(\n\t\t\t'error',\n\t\t\t// translators: Error message when comment submission fails\n\t\t\t__(\n\t\t\t\t'Something went wrong. Please try publishing the post, or you may have already submitted your comment earlier.'\n\t\t\t),\n\t\t\t{\n\t\t\t\tisDismissible: true,\n\t\t\t}\n\t\t);\n\t};\n\n\tconst onCommentDelete = async ( commentId ) => {\n\t\tconst childComment = await getEntityRecord(\n\t\t\t'root',\n\t\t\t'comment',\n\t\t\tcommentId\n\t\t);\n\t\tawait deleteEntityRecord( 'root', 'comment', commentId );\n\n\t\tif ( childComment && ! childComment.parent ) {\n\t\t\tupdateBlockAttributes( getSelectedBlockClientId(), {\n\t\t\t\tblockCommentId: undefined,\n\t\t\t} );\n\t\t}\n\n\t\tcreateNotice(\n\t\t\t'snackbar',\n\t\t\t// translators: Comment deleted successfully\n\t\t\t__( 'Comment deleted successfully.' ),\n\t\t\t{\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tisDismissible: true,\n\t\t\t}\n\t\t);\n\t};\n\n\treturn (\n\t\t<div className=\"editor-collab-sidebar-panel\" style={ styles }>\n\t\t\t<AddComment\n\t\t\t\tonSubmit={ addNewComment }\n\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t/>\n\t\t\t<Comments\n\t\t\t\tkey={ getSelectedBlockClientId() }\n\t\t\t\tthreads={ comments }\n\t\t\t\tonEditComment={ onEditComment }\n\t\t\t\tonAddReply={ addNewComment }\n\t\t\t\tonCommentDelete={ onCommentDelete }\n\t\t\t\tonCommentResolve={ onCommentResolve }\n\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\n/**\n * Renders the Collab sidebar.\n */\nexport default function CollabSidebar() {\n\tconst [ showCommentBoard, setShowCommentBoard ] = useState( false );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\n\tconst { postId, postType, postStatus, threads } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostId, getCurrentPostType } = select( editorStore );\n\t\tconst _postId = getCurrentPostId();\n\t\tconst data =\n\t\t\t!! _postId && typeof _postId === 'number'\n\t\t\t\t? select( coreStore ).getEntityRecords( 'root', 'comment', {\n\t\t\t\t\t\tpost: _postId,\n\t\t\t\t\t\ttype: 'block_comment',\n\t\t\t\t\t\tstatus: 'any',\n\t\t\t\t\t\tper_page: 100,\n\t\t\t\t } )\n\t\t\t\t: null;\n\t\treturn {\n\t\t\tpostId: _postId,\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tpostStatus:\n\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t\tthreads: data,\n\t\t};\n\t}, [] );\n\n\tconst { blockCommentId } = useSelect( ( select ) => {\n\t\tconst { getBlockAttributes, getSelectedBlockClientId } =\n\t\t\tselect( blockEditorStore );\n\t\tconst _clientId = getSelectedBlockClientId();\n\n\t\treturn {\n\t\t\tblockCommentId: _clientId\n\t\t\t\t? getBlockAttributes( _clientId )?.blockCommentId\n\t\t\t\t: null,\n\t\t};\n\t}, [] );\n\n\tconst openCollabBoard = () => {\n\t\tsetShowCommentBoard( true );\n\t\tenableComplementaryArea( 'core', 'edit-post/collab-sidebar' );\n\t};\n\n\tconst [ blocks ] = useEntityBlockEditor( 'postType', postType, {\n\t\tid: postId,\n\t} );\n\n\t// Process comments to build the tree structure\n\tconst { resultComments, sortedThreads } = useMemo( () => {\n\t\t// Create a compare to store the references to all objects by id\n\t\tconst compare = {};\n\t\tconst result = [];\n\n\t\tconst filteredComments = ( threads ?? [] ).filter(\n\t\t\t( comment ) => comment.status !== 'trash'\n\t\t);\n\n\t\t// Initialize each object with an empty `reply` array\n\t\tfilteredComments.forEach( ( item ) => {\n\t\t\tcompare[ item.id ] = { ...item, reply: [] };\n\t\t} );\n\n\t\t// Iterate over the data to build the tree structure\n\t\tfilteredComments.forEach( ( item ) => {\n\t\t\tif ( item.parent === 0 ) {\n\t\t\t\t// If parent is 0, it's a root item, push it to the result array\n\t\t\t\tresult.push( compare[ item.id ] );\n\t\t\t} else if ( compare[ item.parent ] ) {\n\t\t\t\t// Otherwise, find its parent and push it to the parent's `reply` array\n\t\t\t\tcompare[ item.parent ].reply.push( compare[ item.id ] );\n\t\t\t}\n\t\t} );\n\n\t\tif ( 0 === result?.length ) {\n\t\t\treturn { resultComments: [], sortedThreads: [] };\n\t\t}\n\n\t\tconst updatedResult = result.map( ( item ) => ( {\n\t\t\t...item,\n\t\t\treply: [ ...item.reply ].reverse(),\n\t\t} ) );\n\n\t\tconst blockCommentIds = getCommentIdsFromBlocks( blocks );\n\n\t\tconst threadIdMap = new Map(\n\t\t\tupdatedResult.map( ( thread ) => [ thread.id, thread ] )\n\t\t);\n\n\t\tconst sortedComments = blockCommentIds\n\t\t\t.map( ( id ) => threadIdMap.get( id ) )\n\t\t\t.filter( ( thread ) => thread !== undefined );\n\n\t\treturn { resultComments: updatedResult, sortedThreads: sortedComments };\n\t}, [ threads, blocks ] );\n\n\t// Get the global styles to set the background color of the sidebar.\n\tconst { merged: GlobalStyles } = useGlobalStylesContext();\n\tconst backgroundColor = GlobalStyles?.styles?.color?.background;\n\n\tif ( 0 < resultComments.length ) {\n\t\tconst unsubscribe = subscribe( () => {\n\t\t\tconst activeSidebar = getActiveComplementaryArea( 'core' );\n\n\t\t\tif ( ! activeSidebar ) {\n\t\t\t\tenableComplementaryArea( 'core', collabSidebarName );\n\t\t\t\tunsubscribe();\n\t\t\t}\n\t\t} );\n\t}\n\n\tif ( postStatus === 'publish' ) {\n\t\treturn null; // or maybe return some message indicating no threads are available.\n\t}\n\n\tconst AddCommentComponent = blockCommentId\n\t\t? AddCommentToolbarButton\n\t\t: AddCommentButton;\n\n\treturn (\n\t\t<>\n\t\t\t<AddCommentComponent onClick={ openCollabBoard } />\n\t\t\t<PluginSidebar\n\t\t\t\tidentifier={ collabHistorySidebarName }\n\t\t\t\t// translators: Comments sidebar title\n\t\t\t\ttitle={ __( 'Comments' ) }\n\t\t\t\ticon={ commentIcon }\n\t\t\t>\n\t\t\t\t<CollabSidebarContent\n\t\t\t\t\tcomments={ resultComments }\n\t\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t\t/>\n\t\t\t</PluginSidebar>\n\t\t\t<PluginSidebar\n\t\t\t\tisPinnable={ false }\n\t\t\t\theader={ false }\n\t\t\t\tidentifier={ collabSidebarName }\n\t\t\t\tclassName=\"editor-collab-sidebar\"\n\t\t\t\theaderClassName=\"editor-collab-sidebar__header\"\n\t\t\t>\n\t\t\t\t<CollabSidebarContent\n\t\t\t\t\tcomments={ sortedThreads }\n\t\t\t\t\tshowCommentBoard={ showCommentBoard }\n\t\t\t\t\tsetShowCommentBoard={ setShowCommentBoard }\n\t\t\t\t\tstyles={ {\n\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</PluginSidebar>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst next = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z\" />\n\t</SVG>\n);\n\nexport default next;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst previous = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z\" />\n\t</SVG>\n);\n\nexport default previous;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockToolbar,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useEffect } from '@wordpress/element';\nimport { Button, Popover } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHasBlockToolbar } = unlock( blockEditorPrivateApis );\n\nexport default function CollapsibleBlockToolbar( { isCollapsed, onToggle } ) {\n\tconst { blockSelectionStart } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tblockSelectionStart:\n\t\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\tconst hasBlockToolbar = useHasBlockToolbar();\n\n\tconst hasBlockSelection = !! blockSelectionStart;\n\n\tuseEffect( () => {\n\t\t// If we have a new block selection, show the block tools\n\t\tif ( blockSelectionStart ) {\n\t\t\tonToggle( false );\n\t\t}\n\t}, [ blockSelectionStart, onToggle ] );\n\n\tif ( ! hasBlockToolbar ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'editor-collapsible-block-toolbar', {\n\t\t\t\t\t'is-collapsed': isCollapsed || ! hasBlockSelection,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t</div>\n\t\t\t<Popover.Slot name=\"block-toolbar\" />\n\n\t\t\t<Button\n\t\t\t\tclassName=\"editor-collapsible-block-toolbar__toggle\"\n\t\t\t\ticon={ isCollapsed ? next : previous }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tonToggle( ! isCollapsed );\n\t\t\t\t} }\n\t\t\t\tlabel={\n\t\t\t\t\tisCollapsed\n\t\t\t\t\t\t? __( 'Show block tools' )\n\t\t\t\t\t\t: __( 'Hide block tools' )\n\t\t\t\t}\n\t\t\t\tsize=\"compact\"\n\t\t\t/>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { NavigableToolbar, ToolSelector } from '@wordpress/block-editor';\nimport { ToolbarButton, ToolbarItem } from '@wordpress/components';\nimport { listView, plus } from '@wordpress/icons';\nimport { useCallback } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport EditorHistoryRedo from '../editor-history/redo';\nimport EditorHistoryUndo from '../editor-history/undo';\n\nfunction DocumentTools( { className, disableBlockTools = false } ) {\n\tconst { setIsInserterOpened, setIsListViewOpened } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tisDistractionFree,\n\t\tisInserterOpened,\n\t\tisListViewOpen,\n\t\tlistViewShortcut,\n\t\tinserterSidebarToggleRef,\n\t\tlistViewToggleRef,\n\t\tshowIconLabels,\n\t\tshowTools,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst {\n\t\t\tisListViewOpened,\n\t\t\tgetEditorMode,\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetListViewToggleRef,\n\t\t\tgetRenderingMode,\n\t\t\tgetCurrentPostType,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpen: isListViewOpened(),\n\t\t\tlistViewShortcut: getShortcutRepresentation(\n\t\t\t\t'core/editor/toggle-list-view'\n\t\t\t),\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tlistViewToggleRef: getListViewToggleRef(),\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisVisualMode: getEditorMode() === 'visual',\n\t\t\tshowTools:\n\t\t\t\t!! window?.__experimentalEditorWriteMode &&\n\t\t\t\t( getRenderingMode() !== 'post-only' ||\n\t\t\t\t\tgetCurrentPostType() === 'wp_template' ),\n\t\t};\n\t}, [] );\n\n\tconst preventDefault = ( event ) => {\n\t\t// Because the inserter behaves like a dialog,\n\t\t// if the inserter is opened already then when we click on the toggle button\n\t\t// then the initial click event will close the inserter and then be propagated\n\t\t// to the inserter toggle and it will open it again.\n\t\t// To prevent this we need to stop the propagation of the event.\n\t\t// This won't be necessary when the inserter no longer behaves like a dialog.\n\n\t\tif ( isInserterOpened ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t};\n\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isWideViewport = useViewportMatch( 'wide' );\n\n\t/* translators: accessibility text for the editor toolbar */\n\tconst toolbarAriaLabel = __( 'Document tools' );\n\n\tconst toggleListView = useCallback(\n\t\t() => setIsListViewOpened( ! isListViewOpen ),\n\t\t[ setIsListViewOpened, isListViewOpen ]\n\t);\n\n\tconst toggleInserter = useCallback(\n\t\t() => setIsInserterOpened( ! isInserterOpened ),\n\t\t[ isInserterOpened, setIsInserterOpened ]\n\t);\n\n\t/* translators: button label text should, if possible, be under 16 characters. */\n\tconst longLabel = _x(\n\t\t'Block Inserter',\n\t\t'Generic label for block inserter button'\n\t);\n\tconst shortLabel = ! isInserterOpened ? __( 'Add' ) : __( 'Close' );\n\n\treturn (\n\t\t// Some plugins expect and use the `edit-post-header-toolbar` CSS class to\n\t\t// find the toolbar and inject UI elements into it. This is not officially\n\t\t// supported, but we're keeping it in the list of class names for backwards\n\t\t// compatibility.\n\t\t<NavigableToolbar\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-document-tools',\n\t\t\t\t'edit-post-header-toolbar',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\taria-label={ toolbarAriaLabel }\n\t\t\tvariant=\"unstyled\"\n\t\t>\n\t\t\t<div className=\"editor-document-tools__left\">\n\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tref={ inserterSidebarToggleRef }\n\t\t\t\t\t\tclassName=\"editor-document-tools__inserter-toggle\"\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tisPressed={ isInserterOpened }\n\t\t\t\t\t\tonMouseDown={ preventDefault }\n\t\t\t\t\t\tonClick={ toggleInserter }\n\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\tlabel={ showIconLabels ? shortLabel : longLabel }\n\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\taria-expanded={ isInserterOpened }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ showTools && isLargeViewport && (\n\t\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\t\tas={ ToolSelector }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryUndo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToolbarItem\n\t\t\t\t\t\t\tas={ EditorHistoryRedo }\n\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\tvariant={ showIconLabels ? 'tertiary' : undefined }\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ ! isDistractionFree && (\n\t\t\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\t\t\tclassName=\"editor-document-tools__document-overview-toggle\"\n\t\t\t\t\t\t\t\ticon={ listView }\n\t\t\t\t\t\t\t\tdisabled={ disableBlockTools }\n\t\t\t\t\t\t\t\tisPressed={ isListViewOpen }\n\t\t\t\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\t\t\t\tlabel={ __( 'Document Overview' ) }\n\t\t\t\t\t\t\t\tonClick={ toggleListView }\n\t\t\t\t\t\t\t\tshortcut={ listViewShortcut }\n\t\t\t\t\t\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\tshowIconLabels ? 'tertiary' : undefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-expanded={ isListViewOpen }\n\t\t\t\t\t\t\t\tref={ listViewToggleRef }\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</div>\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default DocumentTools;\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __unstableSerializeAndClean } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function CopyContentMenuItem() {\n\tconst { createNotice } = useDispatch( noticesStore );\n\tconst { getCurrentPostId, getCurrentPostType } = useSelect( editorStore );\n\tconst { getEditedEntityRecord } = useSelect( coreStore );\n\n\tfunction getText() {\n\t\tconst record = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tgetCurrentPostType(),\n\t\t\tgetCurrentPostId()\n\t\t);\n\t\tif ( ! record ) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif ( typeof record.content === 'function' ) {\n\t\t\treturn record.content( record );\n\t\t} else if ( record.blocks ) {\n\t\t\treturn __unstableSerializeAndClean( record.blocks );\n\t\t} else if ( record.content ) {\n\t\t\treturn record.content;\n\t\t}\n\t}\n\n\tfunction onSuccess() {\n\t\tcreateNotice( 'info', __( 'All content copied.' ), {\n\t\t\tisDismissible: true,\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}\n\n\tconst ref = useCopyToClipboard( getText, onSuccess );\n\n\treturn <MenuItem ref={ ref }>{ __( 'Copy all blocks' ) }</MenuItem>;\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItemsChoice, MenuGroup } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Set of available mode options.\n *\n * @type {Array}\n */\nconst MODES = [\n\t{\n\t\tvalue: 'visual',\n\t\tlabel: __( 'Visual editor' ),\n\t},\n\t{\n\t\tvalue: 'text',\n\t\tlabel: __( 'Code editor' ),\n\t},\n];\n\nfunction ModeSwitcher() {\n\tconst { shortcut, isRichEditingEnabled, isCodeEditingEnabled, mode } =\n\t\tuseSelect(\n\t\t\t( select ) => ( {\n\t\t\t\tshortcut: select(\n\t\t\t\t\tkeyboardShortcutsStore\n\t\t\t\t).getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\t\tisRichEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.richEditingEnabled,\n\t\t\t\tisCodeEditingEnabled:\n\t\t\t\t\tselect( editorStore ).getEditorSettings()\n\t\t\t\t\t\t.codeEditingEnabled,\n\t\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\t} ),\n\t\t\t[]\n\t\t);\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\n\tlet selectedMode = mode;\n\tif ( ! isRichEditingEnabled && mode === 'visual' ) {\n\t\tselectedMode = 'text';\n\t}\n\tif ( ! isCodeEditingEnabled && mode === 'text' ) {\n\t\tselectedMode = 'visual';\n\t}\n\n\tconst choices = MODES.map( ( choice ) => {\n\t\tif ( ! isCodeEditingEnabled && choice.value === 'text' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t}\n\t\tif ( ! isRichEditingEnabled && choice.value === 'visual' ) {\n\t\t\tchoice = {\n\t\t\t\t...choice,\n\t\t\t\tdisabled: true,\n\t\t\t\tinfo: __(\n\t\t\t\t\t'You can enable the visual editor in your profile settings.'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tif ( choice.value !== selectedMode && ! choice.disabled ) {\n\t\t\treturn { ...choice, shortcut };\n\t\t}\n\t\treturn choice;\n\t} );\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Editor' ) }>\n\t\t\t<MenuItemsChoice\n\t\t\t\tchoices={ choices }\n\t\t\t\tvalue={ selectedMode }\n\t\t\t\tonSelect={ switchEditorMode }\n\t\t\t/>\n\t\t</MenuGroup>\n\t);\n}\n\nexport default ModeSwitcher;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: ToolsMoreMenuGroup, Slot } =\n\tcreateSlotFill( 'ToolsMoreMenuGroup' );\n\nToolsMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;\n\nexport default ToolsMoreMenuGroup;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\nimport { Platform } from '@wordpress/element';\n\nconst { Fill: ViewMoreMenuGroup, Slot } = createSlotFill(\n\tPlatform.OS === 'web' ? Symbol( 'ViewMoreMenuGroup' ) : 'ViewMoreMenuGroup'\n);\n\nViewMoreMenuGroup.Slot = ( { fillProps } ) => <Slot fillProps={ fillProps } />;\n\nexport default ViewMoreMenuGroup;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { external, moreVertical } from '@wordpress/icons';\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tVisuallyHidden,\n\tDropdownMenu,\n} from '@wordpress/components';\nimport {\n\tPreferenceToggleMenuItem,\n\tstore as preferencesStore,\n} from '@wordpress/preferences';\nimport { store as interfaceStore, ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CopyContentMenuItem from './copy-content-menu-item';\nimport ModeSwitcher from '../mode-switcher';\nimport ToolsMoreMenuGroup from './tools-more-menu-group';\nimport ViewMoreMenuGroup from './view-more-menu-group';\nimport { store as editorStore } from '../../store';\n\nexport default function MoreMenu() {\n\tconst { openModal } = useDispatch( interfaceStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\tconst { toggleDistractionFree } = useDispatch( editorStore );\n\tconst showIconLabels = useSelect(\n\t\t( select ) =>\n\t\t\tselect( preferencesStore ).get( 'core', 'showIconLabels' ),\n\t\t[]\n\t);\n\n\tconst turnOffDistractionFree = () => {\n\t\tsetPreference( 'core', 'distractionFree', false );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tplacement: 'bottom-end',\n\t\t\t\t\tclassName: 'more-menu-dropdown__content',\n\t\t\t\t} }\n\t\t\t\ttoggleProps={ {\n\t\t\t\t\tshowTooltip: ! showIconLabels,\n\t\t\t\t\t...( showIconLabels && { variant: 'tertiary' } ),\n\t\t\t\t\ttooltipPosition: 'bottom',\n\t\t\t\t\tsize: 'compact',\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup label={ _x( 'View', 'noun' ) }>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ turnOffDistractionFree }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t\tinfo={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Top toolbar deactivated.'\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<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"distractionFree\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Write with calmness' ) }\n\t\t\t\t\t\t\t\thandleToggling={ false }\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\ttoggleDistractionFree( {\n\t\t\t\t\t\t\t\t\t\tcreateNotice: false,\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\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Distraction free mode deactivated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primaryShift(\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/>\n\t\t\t\t\t\t\t<PreferenceToggleMenuItem\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tname=\"focusMode\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t\tinfo={ __( 'Focus on one block at a time' ) }\n\t\t\t\t\t\t\t\tmessageActivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode activated.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tmessageDeactivated={ __(\n\t\t\t\t\t\t\t\t\t'Spotlight mode deactivated.'\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<ViewMoreMenuGroup.Slot fillProps={ { onClose } } />\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<ModeSwitcher />\n\t\t\t\t\t\t<ActionItem.Slot\n\t\t\t\t\t\t\tname=\"core/plugin-more-menu\"\n\t\t\t\t\t\t\tlabel={ __( 'Plugins' ) }\n\t\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/keyboard-shortcut-help' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.access( 'h' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Keyboard shortcuts' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<CopyContentMenuItem />\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\thref={ __(\n\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/wordpress-block-editor/'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Help' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<ToolsMoreMenuGroup.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\topenModal( 'editor/preferences' )\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\t{ __( 'Preferences' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PostPublishButton from './index';\nimport { store as editorStore } from '../../store';\n\nconst IS_TOGGLE = 'toggle';\nconst IS_BUTTON = 'button';\n\nexport default function PostPublishButtonOrToggle( {\n\tforceIsDirty,\n\tsetEntitiesSavedStatesCallback,\n} ) {\n\tlet component;\n\tconst isSmallerThanMediumViewport = useViewportMatch( 'medium', '<' );\n\tconst { togglePublishSidebar } = useDispatch( editorStore );\n\tconst {\n\t\thasPublishAction,\n\t\tisBeingScheduled,\n\t\tisPending,\n\t\tisPublished,\n\t\tisPublishSidebarEnabled,\n\t\tisPublishSidebarOpened,\n\t\tisScheduled,\n\t\tpostStatus,\n\t\tpostStatusHasChanged,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasPublishAction:\n\t\t\t\t!! select( editorStore ).getCurrentPost()?._links?.[\n\t\t\t\t\t'wp:action-publish'\n\t\t\t\t] ?? false,\n\t\t\tisBeingScheduled:\n\t\t\t\tselect( editorStore ).isEditedPostBeingScheduled(),\n\t\t\tisPending: select( editorStore ).isCurrentPostPending(),\n\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\tisPublishSidebarEnabled:\n\t\t\t\tselect( editorStore ).isPublishSidebarEnabled(),\n\t\t\tisPublishSidebarOpened:\n\t\t\t\tselect( editorStore ).isPublishSidebarOpened(),\n\t\t\tisScheduled: select( editorStore ).isCurrentPostScheduled(),\n\t\t\tpostStatus:\n\t\t\t\tselect( editorStore ).getEditedPostAttribute( 'status' ),\n\t\t\tpostStatusHasChanged: select( editorStore ).getPostEdits()?.status,\n\t\t};\n\t}, [] );\n\n\t/**\n\t * Conditions to show a BUTTON (publish directly) or a TOGGLE (open publish sidebar):\n\t *\n\t * 1) We want to show a BUTTON when the post status is at the _final stage_\n\t * for a particular role (see https://wordpress.org/documentation/article/post-status/):\n\t *\n\t * - is published\n\t * - post status has changed explicitly to something different than 'future' or 'publish'\n\t * - is scheduled to be published\n\t * - is pending and can't be published (but only for viewports >= medium).\n\t * \t Originally, we considered showing a button for pending posts that couldn't be published\n\t * \t (for example, for an author with the contributor role). Some languages can have\n\t * \t long translations for \"Submit for review\", so given the lack of UI real estate available\n\t * \t we decided to take into account the viewport in that case.\n\t * \t See: https://github.com/WordPress/gutenberg/issues/10475\n\t *\n\t * 2) Then, in small viewports, we'll show a TOGGLE.\n\t *\n\t * 3) Finally, we'll use the publish sidebar status to decide:\n\t *\n\t * - if it is enabled, we show a TOGGLE\n\t * - if it is disabled, we show a BUTTON\n\t */\n\tif (\n\t\tisPublished ||\n\t\t( postStatusHasChanged &&\n\t\t\t! [ 'future', 'publish' ].includes( postStatus ) ) ||\n\t\t( isScheduled && isBeingScheduled ) ||\n\t\t( isPending && ! hasPublishAction && ! isSmallerThanMediumViewport )\n\t) {\n\t\tcomponent = IS_BUTTON;\n\t} else if ( isSmallerThanMediumViewport || isPublishSidebarEnabled ) {\n\t\tcomponent = IS_TOGGLE;\n\t} else {\n\t\tcomponent = IS_BUTTON;\n\t}\n\n\treturn (\n\t\t<PostPublishButton\n\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\tisOpen={ isPublishSidebarOpened }\n\t\t\tisToggle={ component === IS_TOGGLE }\n\t\t\tonToggle={ togglePublishSidebar }\n\t\t\tsetEntitiesSavedStatesCallback={ setEntitiesSavedStatesCallback }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { external } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostViewLink() {\n\tconst { hasLoaded, permalink, isPublished, label, showIconLabels } =\n\t\tuseSelect( ( select ) => {\n\t\t\t// Grab post type to retrieve the view_item label.\n\t\t\tconst postTypeSlug = select( editorStore ).getCurrentPostType();\n\t\t\tconst postType = select( coreStore ).getPostType( postTypeSlug );\n\t\t\tconst { get } = select( preferencesStore );\n\n\t\t\treturn {\n\t\t\t\tpermalink: select( editorStore ).getPermalink(),\n\t\t\t\tisPublished: select( editorStore ).isCurrentPostPublished(),\n\t\t\t\tlabel: postType?.labels.view_item,\n\t\t\t\thasLoaded: !! postType,\n\t\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\t};\n\t\t}, [] );\n\n\t// Only render the view button if the post is published and has a permalink.\n\tif ( ! isPublished || ! permalink || ! hasLoaded ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ external }\n\t\t\tlabel={ label || __( 'View post' ) }\n\t\t\thref={ permalink }\n\t\t\ttarget=\"_blank\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst desktop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20.5 16h-.7V8c0-1.1-.9-2-2-2H6.2c-1.1 0-2 .9-2 2v8h-.7c-.8 0-1.5.7-1.5 1.5h20c0-.8-.7-1.5-1.5-1.5zM5.7 8c0-.3.2-.5.5-.5h11.6c.3 0 .5.2.5.5v7.6H5.7V8z\" />\n\t</SVG>\n);\n\nexport default desktop;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst mobile = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H9c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h6c.3 0 .5.2.5.5v12zm-4.5-.5h2V16h-2v1.5z\" />\n\t</SVG>\n);\n\nexport default mobile;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst tablet = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M17 4H7c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H7c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h10c.3 0 .5.2.5.5v12zm-7.5-.5h4V16h-4v1.5z\" />\n\t</SVG>\n);\n\nexport default tablet;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tMenuItemsChoice,\n\tVisuallyHidden,\n\tIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { desktop, mobile, tablet, external, check } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ActionItem } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport PostPreviewButton from '../post-preview-button';\nimport { unlock } from '../../lock-unlock';\n\nexport default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {\n\tconst {\n\t\tdeviceType,\n\t\thomeUrl,\n\t\tisTemplate,\n\t\tisViewable,\n\t\tshowIconLabels,\n\t\tisTemplateHidden,\n\t\ttemplateId,\n\t} = useSelect( ( select ) => {\n\t\tconst { getDeviceType, getCurrentPostType, getCurrentTemplateId } =\n\t\t\tselect( editorStore );\n\t\tconst { getRenderingMode } = unlock( select( editorStore ) );\n\t\tconst { getEntityRecord, getPostType } = select( coreStore );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst _currentPostType = getCurrentPostType();\n\t\treturn {\n\t\t\tdeviceType: getDeviceType(),\n\t\t\thomeUrl: getEntityRecord( 'root', '__unstableBase' )?.home,\n\t\t\tisTemplate: _currentPostType === 'wp_template',\n\t\t\tisViewable: getPostType( _currentPostType )?.viewable ?? false,\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\tisTemplateHidden: getRenderingMode() === 'post-only',\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\tconst { setDeviceType, setRenderingMode } = useDispatch( editorStore );\n\tconst { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );\n\n\tconst handleDevicePreviewChange = ( newDeviceType ) => {\n\t\tsetDeviceType( newDeviceType );\n\t\tresetZoomLevel();\n\t};\n\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tif ( isMobile ) {\n\t\treturn null;\n\t}\n\n\tconst popoverProps = {\n\t\tplacement: 'bottom-end',\n\t};\n\tconst toggleProps = {\n\t\tclassName: 'editor-preview-dropdown__toggle',\n\t\ticonPosition: 'right',\n\t\tsize: 'compact',\n\t\tshowTooltip: ! showIconLabels,\n\t\tdisabled,\n\t\taccessibleWhenDisabled: disabled,\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\n\tconst deviceIcons = {\n\t\tdesktop,\n\t\tmobile,\n\t\ttablet,\n\t};\n\n\t/**\n\t * The choices for the device type.\n\t *\n\t * @type {Array}\n\t */\n\tconst choices = [\n\t\t{\n\t\t\tvalue: 'Desktop',\n\t\t\tlabel: __( 'Desktop' ),\n\t\t\ticon: desktop,\n\t\t},\n\t\t{\n\t\t\tvalue: 'Tablet',\n\t\t\tlabel: __( 'Tablet' ),\n\t\t\ticon: tablet,\n\t\t},\n\t\t{\n\t\t\tvalue: 'Mobile',\n\t\t\tlabel: __( 'Mobile' ),\n\t\t\ticon: mobile,\n\t\t},\n\t];\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-preview-dropdown',\n\t\t\t\t`editor-preview-dropdown--${ deviceType.toLowerCase() }`\n\t\t\t) }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ deviceIcons[ deviceType.toLowerCase() ] }\n\t\t\tlabel={ __( 'View' ) }\n\t\t\tdisableOpenOnArrowDown={ disabled }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ choices }\n\t\t\t\t\t\t\tvalue={ deviceType }\n\t\t\t\t\t\t\tonSelect={ handleDevicePreviewChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ isTemplate && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\ticon={ external }\n\t\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'View site' ) }\n\t\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t/* translators: accessibility text */\n\t\t\t\t\t\t\t\t\t\t__( '(opens in a new tab)' )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! isTemplate && !! templateId && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ ! isTemplateHidden ? check : undefined }\n\t\t\t\t\t\t\t\tisSelected={ ! isTemplateHidden }\n\t\t\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tsetRenderingMode(\n\t\t\t\t\t\t\t\t\t\tisTemplateHidden\n\t\t\t\t\t\t\t\t\t\t\t? 'template-locked'\n\t\t\t\t\t\t\t\t\t\t\t: 'post-only'\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>\n\t\t\t\t\t\t\t\t{ __( 'Show template' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isViewable && (\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<PostPreviewButton\n\t\t\t\t\t\t\t\tclassName=\"editor-preview-dropdown__button-external\"\n\t\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\t\tforceIsAutosaveable={ forceIsAutosaveable }\n\t\t\t\t\t\t\t\taria-label={ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\ttextContent={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Preview in new tab' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ external } />\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\tonPreview={ onClose }\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\t<ActionItem.Slot\n\t\t\t\t\t\tname=\"core/plugin-preview-menu\"\n\t\t\t\t\t\tfillProps={ { onClick: onClose } }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst square = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n\t\t<Path\n\t\t\tfill=\"none\"\n\t\t\td=\"M5.75 12.75V18.25H11.25M12.75 5.75H18.25V11.25\"\n\t\t\tstroke=\"currentColor\"\n\t\t\tstrokeWidth=\"1.5\"\n\t\t\tstrokeLinecap=\"square\"\n\t\t/>\n\t</SVG>\n);\n\nexport default square;\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { square as zoomOutIcon } from '@wordpress/icons';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tuseShortcut,\n\tstore as keyboardShortcutsStore,\n} from '@wordpress/keyboard-shortcuts';\nimport { isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst ZoomOutToggle = ( { disabled } ) => {\n\tconst { isZoomOut, showIconLabels, isDistractionFree } = useSelect(\n\t\t( select ) => ( {\n\t\t\tisZoomOut: unlock( select( blockEditorStore ) ).isZoomOut(),\n\t\t\tshowIconLabels: select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showIconLabels'\n\t\t\t),\n\t\t\tisDistractionFree: select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'distractionFree'\n\t\t\t),\n\t\t} )\n\t);\n\n\tconst { resetZoomLevel, setZoomLevel } = unlock(\n\t\tuseDispatch( blockEditorStore )\n\t);\n\tconst { registerShortcut, unregisterShortcut } = useDispatch(\n\t\tkeyboardShortcutsStore\n\t);\n\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/editor/zoom',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Enter or exit zoom out.' ),\n\t\t\tkeyCombination: {\n\t\t\t\t// `primaryShift+0` (`ctrl+shift+0`) is the shortcut for switching\n\t\t\t\t// to input mode in Windows, so apply a different key combination.\n\t\t\t\tmodifier: isAppleOS() ? 'primaryShift' : 'secondary',\n\t\t\t\tcharacter: '0',\n\t\t\t},\n\t\t} );\n\t\treturn () => {\n\t\t\tunregisterShortcut( 'core/editor/zoom' );\n\t\t};\n\t}, [ registerShortcut, unregisterShortcut ] );\n\n\tuseShortcut(\n\t\t'core/editor/zoom',\n\t\t() => {\n\t\t\tif ( isZoomOut ) {\n\t\t\t\tresetZoomLevel();\n\t\t\t} else {\n\t\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\tisDisabled: isDistractionFree,\n\t\t}\n\t);\n\n\tconst handleZoomOut = () => {\n\t\tif ( isZoomOut ) {\n\t\t\tresetZoomLevel();\n\t\t} else {\n\t\t\tsetZoomLevel( 'auto-scaled' );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\taccessibleWhenDisabled\n\t\t\tdisabled={ disabled }\n\t\t\tonClick={ handleZoomOut }\n\t\t\ticon={ zoomOutIcon }\n\t\t\tlabel={ __( 'Zoom Out' ) }\n\t\t\tisPressed={ isZoomOut }\n\t\t\tsize=\"compact\"\n\t\t\tshowTooltip={ ! showIconLabels }\n\t\t\tclassName=\"editor-zoom-out-toggle\"\n\t\t/>\n\t);\n};\n\nexport default ZoomOutToggle;\n","/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { useMediaQuery, useViewportMatch } from '@wordpress/compose';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { useState } from '@wordpress/element';\nimport { PinnedItems } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport CollabSidebar from '../collab-sidebar';\nimport BackButton, { useHasBackButton } from './back-button';\nimport CollapsibleBlockToolbar from '../collapsible-block-toolbar';\nimport DocumentBar from '../document-bar';\nimport DocumentTools from '../document-tools';\nimport MoreMenu from '../more-menu';\nimport PostPreviewButton from '../post-preview-button';\nimport PostPublishButtonOrToggle from '../post-publish-button/post-publish-button-or-toggle';\nimport PostSavedState from '../post-saved-state';\nimport PostViewLink from '../post-view-link';\nimport PreviewDropdown from '../preview-dropdown';\nimport ZoomOutToggle from '../zoom-out-toggle';\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../../store/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst isBlockCommentExperimentEnabled =\n\twindow?.__experimentalEnableBlockComment;\n\nconst toolbarVariations = {\n\tdistractionFreeDisabled: { y: '-50px' },\n\tdistractionFreeHover: { y: 0 },\n\tdistractionFreeHidden: { y: '-50px' },\n\tvisible: { y: 0 },\n\thidden: { y: 0 },\n};\n\nconst backButtonVariations = {\n\tdistractionFreeDisabled: { x: '-100%' },\n\tdistractionFreeHover: { x: 0 },\n\tdistractionFreeHidden: { x: '-100%' },\n\tvisible: { x: 0 },\n\thidden: { x: 0 },\n};\n\nfunction Header( {\n\tcustomSaveButton,\n\tforceIsDirty,\n\tforceDisableBlockTools,\n\tsetEntitiesSavedStatesCallback,\n\ttitle,\n} ) {\n\tconst isWideViewport = useViewportMatch( 'large' );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isTooNarrowForDocumentBar = useMediaQuery( '(max-width: 403px)' );\n\tconst {\n\t\tpostType,\n\t\tisTextEditor,\n\t\tisPublishSidebarOpened,\n\t\tshowIconLabels,\n\t\thasFixedToolbar,\n\t\thasBlockSelection,\n\t} = useSelect( ( select ) => {\n\t\tconst { get: getPreference } = select( preferencesStore );\n\t\tconst {\n\t\t\tgetEditorMode,\n\t\t\tgetCurrentPostType,\n\t\t\tisPublishSidebarOpened: _isPublishSidebarOpened,\n\t\t} = select( editorStore );\n\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t\tisTextEditor: getEditorMode() === 'text',\n\t\t\tisPublishSidebarOpened: _isPublishSidebarOpened(),\n\t\t\tshowIconLabels: getPreference( 'core', 'showIconLabels' ),\n\t\t\thasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\tconst canBeZoomedOut = [ 'post', 'page', 'wp_template' ].includes(\n\t\tpostType\n\t);\n\n\tconst disablePreviewOption = [\n\t\tNAVIGATION_POST_TYPE,\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\tPATTERN_POST_TYPE,\n\t].includes( postType );\n\n\tconst [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =\n\t\tuseState( true );\n\n\tconst hasCenter =\n\t\t! isTooNarrowForDocumentBar &&\n\t\t( ! hasFixedToolbar ||\n\t\t\t( hasFixedToolbar &&\n\t\t\t\t( ! hasBlockSelection || isBlockToolsCollapsed ) ) );\n\tconst hasBackButton = useHasBackButton();\n\n\tconst hasSectionRootClientId = useSelect(\n\t\t( select ) =>\n\t\t\t!! unlock( select( blockEditorStore ) ).getSectionRootClientId(),\n\t\t[]\n\t);\n\n\t/*\n\t * The edit-post-header classname is only kept for backward compatibility\n\t * as some plugins might be relying on its presence.\n\t */\n\treturn (\n\t\t<div className=\"editor-header edit-post-header\">\n\t\t\t{ hasBackButton && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"editor-header__back-button\"\n\t\t\t\t\tvariants={ backButtonVariations }\n\t\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\t>\n\t\t\t\t\t<BackButton.Slot />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t<motion.div\n\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\tclassName=\"editor-header__toolbar\"\n\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t>\n\t\t\t\t<DocumentTools\n\t\t\t\t\tdisableBlockTools={ forceDisableBlockTools || isTextEditor }\n\t\t\t\t/>\n\t\t\t\t{ hasFixedToolbar && isLargeViewport && (\n\t\t\t\t\t<CollapsibleBlockToolbar\n\t\t\t\t\t\tisCollapsed={ isBlockToolsCollapsed }\n\t\t\t\t\t\tonToggle={ setIsBlockToolsCollapsed }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t\t{ hasCenter && (\n\t\t\t\t<motion.div\n\t\t\t\t\tclassName=\"editor-header__center\"\n\t\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\t>\n\t\t\t\t\t<DocumentBar title={ title } />\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t<motion.div\n\t\t\t\tvariants={ toolbarVariations }\n\t\t\t\ttransition={ { type: 'tween' } }\n\t\t\t\tclassName=\"editor-header__settings\"\n\t\t\t>\n\t\t\t\t{ ! customSaveButton && ! isPublishSidebarOpened && (\n\t\t\t\t\t/*\n\t\t\t\t\t * This button isn't completely hidden by the publish sidebar.\n\t\t\t\t\t * We can't hide the whole toolbar when the publish sidebar is open because\n\t\t\t\t\t * we want to prevent mounting/unmounting the PostPublishButtonOrToggle DOM node.\n\t\t\t\t\t * We track that DOM node to return focus to the PostPublishButtonOrToggle\n\t\t\t\t\t * when the publish sidebar has been closed.\n\t\t\t\t\t */\n\t\t\t\t\t<PostSavedState forceIsDirty={ forceIsDirty } />\n\t\t\t\t) }\n\n\t\t\t\t<PostViewLink />\n\n\t\t\t\t<PreviewDropdown\n\t\t\t\t\tforceIsAutosaveable={ forceIsDirty }\n\t\t\t\t\tdisabled={ disablePreviewOption }\n\t\t\t\t/>\n\n\t\t\t\t<PostPreviewButton\n\t\t\t\t\tclassName=\"editor-header__post-preview-button\"\n\t\t\t\t\tforceIsAutosaveable={ forceIsDirty }\n\t\t\t\t/>\n\n\t\t\t\t{ canBeZoomedOut &&\n\t\t\t\t\tisWideViewport &&\n\t\t\t\t\thasSectionRootClientId && (\n\t\t\t\t\t\t<ZoomOutToggle disabled={ forceDisableBlockTools } />\n\t\t\t\t\t) }\n\n\t\t\t\t{ ( isWideViewport || ! showIconLabels ) && (\n\t\t\t\t\t<PinnedItems.Slot scope=\"core\" />\n\t\t\t\t) }\n\n\t\t\t\t{ ! customSaveButton && (\n\t\t\t\t\t<PostPublishButtonOrToggle\n\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ isBlockCommentExperimentEnabled ? (\n\t\t\t\t\t<CollabSidebar />\n\t\t\t\t) : undefined }\n\n\t\t\t\t{ customSaveButton }\n\t\t\t\t<MoreMenu />\n\t\t\t</motion.div>\n\t\t</div>\n\t);\n}\n\nexport default Header;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback, useRef } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PrivateInserterLibrary } = unlock( blockEditorPrivateApis );\n\nexport default function InserterSidebar() {\n\tconst {\n\t\tblockSectionRootClientId,\n\t\tinserterSidebarToggleRef,\n\t\tinserter,\n\t\tshowMostUsedBlocks,\n\t\tsidebarIsOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetInserterSidebarToggleRef,\n\t\t\tgetInserter,\n\t\t\tisPublishSidebarOpened,\n\t\t} = unlock( select( editorStore ) );\n\t\tconst { getBlockRootClientId, isZoomOut, getSectionRootClientId } =\n\t\t\tunlock( select( blockEditorStore ) );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst getBlockSectionRootClientId = () => {\n\t\t\tif ( isZoomOut() ) {\n\t\t\t\tconst sectionRootClientId = getSectionRootClientId();\n\n\t\t\t\tif ( sectionRootClientId ) {\n\t\t\t\t\treturn sectionRootClientId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn getBlockRootClientId();\n\t\t};\n\t\treturn {\n\t\t\tinserterSidebarToggleRef: getInserterSidebarToggleRef(),\n\t\t\tinserter: getInserter(),\n\t\t\tshowMostUsedBlocks: get( 'core', 'mostUsedBlocks' ),\n\t\t\tblockSectionRootClientId: getBlockSectionRootClientId(),\n\t\t\tsidebarIsOpened: !! (\n\t\t\t\tgetActiveComplementaryArea( 'core' ) || isPublishSidebarOpened()\n\t\t\t),\n\t\t};\n\t}, [] );\n\tconst { setIsInserterOpened } = useDispatch( editorStore );\n\tconst { disableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst libraryRef = useRef();\n\n\t// When closing the inserter, focus should return to the toggle button.\n\tconst closeInserterSidebar = useCallback( () => {\n\t\tsetIsInserterOpened( false );\n\t\tinserterSidebarToggleRef.current?.focus();\n\t}, [ inserterSidebarToggleRef, setIsInserterOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseInserterSidebar();\n\t\t\t}\n\t\t},\n\t\t[ closeInserterSidebar ]\n\t);\n\n\tconst inserterContents = (\n\t\t<div className=\"editor-inserter-sidebar__content\">\n\t\t\t<PrivateInserterLibrary\n\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\tshowInserterHelpPanel\n\t\t\t\tshouldFocusBlock={ isMobileViewport }\n\t\t\t\trootClientId={ blockSectionRootClientId }\n\t\t\t\tonSelect={ inserter.onSelect }\n\t\t\t\t__experimentalInitialTab={ inserter.tab }\n\t\t\t\t__experimentalInitialCategory={ inserter.category }\n\t\t\t\t__experimentalFilterValue={ inserter.filterValue }\n\t\t\t\tonPatternCategorySelection={\n\t\t\t\t\tsidebarIsOpened\n\t\t\t\t\t\t? () => disableComplementaryArea( 'core' )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tref={ libraryRef }\n\t\t\t\tonClose={ closeInserterSidebar }\n\t\t\t/>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div onKeyDown={ closeOnEscape } className=\"editor-inserter-sidebar\">\n\t\t\t{ inserterContents }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport CharacterCount from '../character-count';\nimport WordCount from '../word-count';\nimport TimeToRead from '../time-to-read';\nimport DocumentOutline from '../document-outline';\n\nexport default function ListViewOutline() {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"editor-list-view-sidebar__outline\">\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Characters:' ) }</Text>\n\t\t\t\t\t<Text>\n\t\t\t\t\t\t<CharacterCount />\n\t\t\t\t\t</Text>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Words:' ) }</Text>\n\t\t\t\t\t<WordCount />\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<Text>{ __( 'Time to read:' ) }</Text>\n\t\t\t\t\t<TimeToRead />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<DocumentOutline />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalListView as ListView,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useFocusOnMount, useMergeRefs } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { focus } from '@wordpress/dom';\nimport { useCallback, useRef, useState } from '@wordpress/element';\nimport { __, _x } from '@wordpress/i18n';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport ListViewOutline from './list-view-outline';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { TabbedSidebar } = unlock( blockEditorPrivateApis );\n\nexport default function ListViewSidebar() {\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { getListViewToggleRef } = unlock( useSelect( editorStore ) );\n\n\t// This hook handles focus when the sidebar first renders.\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\n\t// When closing the list view, focus should return to the toggle button.\n\tconst closeListView = useCallback( () => {\n\t\tsetIsListViewOpened( false );\n\t\tgetListViewToggleRef().current?.focus();\n\t}, [ getListViewToggleRef, setIsListViewOpened ] );\n\n\tconst closeOnEscape = useCallback(\n\t\t( event ) => {\n\t\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcloseListView();\n\t\t\t}\n\t\t},\n\t\t[ closeListView ]\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the dropZoneElement updates.\n\tconst [ dropZoneElement, setDropZoneElement ] = useState( null );\n\t// Tracks our current tab.\n\tconst [ tab, setTab ] = useState( 'list-view' );\n\n\t// This ref refers to the sidebar as a whole.\n\tconst sidebarRef = useRef();\n\t// This ref refers to the tab panel.\n\tconst tabsRef = useRef();\n\t// This ref refers to the list view application area.\n\tconst listViewRef = useRef();\n\n\t// Must merge the refs together so focus can be handled properly in the next function.\n\tconst listViewContainerRef = useMergeRefs( [\n\t\tfocusOnMountRef,\n\t\tlistViewRef,\n\t\tsetDropZoneElement,\n\t] );\n\n\t/*\n\t * Callback function to handle list view or outline focus.\n\t *\n\t * @param {string} currentTab The current tab. Either list view or outline.\n\t *\n\t * @return void\n\t */\n\tfunction handleSidebarFocus( currentTab ) {\n\t\t// Tab panel focus.\n\t\tconst tabPanelFocus = focus.tabbable.find( tabsRef.current )[ 0 ];\n\t\t// List view tab is selected.\n\t\tif ( currentTab === 'list-view' ) {\n\t\t\t// Either focus the list view or the tab panel. Must have a fallback because the list view does not render when there are no blocks.\n\t\t\tconst listViewApplicationFocus = focus.tabbable.find(\n\t\t\t\tlistViewRef.current\n\t\t\t)[ 0 ];\n\t\t\tconst listViewFocusArea = sidebarRef.current.contains(\n\t\t\t\tlistViewApplicationFocus\n\t\t\t)\n\t\t\t\t? listViewApplicationFocus\n\t\t\t\t: tabPanelFocus;\n\t\t\tlistViewFocusArea.focus();\n\t\t\t// Outline tab is selected.\n\t\t} else {\n\t\t\ttabPanelFocus.focus();\n\t\t}\n\t}\n\n\tconst handleToggleListViewShortcut = useCallback( () => {\n\t\t// If the sidebar has focus, it is safe to close.\n\t\tif (\n\t\t\tsidebarRef.current.contains(\n\t\t\t\tsidebarRef.current.ownerDocument.activeElement\n\t\t\t)\n\t\t) {\n\t\t\tcloseListView();\n\t\t} else {\n\t\t\t// If the list view or outline does not have focus, focus should be moved to it.\n\t\t\thandleSidebarFocus( tab );\n\t\t}\n\t}, [ closeListView, tab ] );\n\n\t// This only fires when the sidebar is open because of the conditional rendering.\n\t// It is the same shortcut to open but that is defined as a global shortcut and only fires when the sidebar is closed.\n\tuseShortcut( 'core/editor/toggle-list-view', handleToggleListViewShortcut );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tclassName=\"editor-list-view-sidebar\"\n\t\t\tonKeyDown={ closeOnEscape }\n\t\t\tref={ sidebarRef }\n\t\t>\n\t\t\t<TabbedSidebar\n\t\t\t\ttabs={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'list-view',\n\t\t\t\t\t\ttitle: _x( 'List View', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-panel-content\">\n\t\t\t\t\t\t\t\t\t<ListView\n\t\t\t\t\t\t\t\t\t\tdropZoneElement={ dropZoneElement }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t\tpanelRef: listViewContainerRef,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'outline',\n\t\t\t\t\t\ttitle: _x( 'Outline', 'Post overview' ),\n\t\t\t\t\t\tpanel: (\n\t\t\t\t\t\t\t<div className=\"editor-list-view-sidebar__list-view-container\">\n\t\t\t\t\t\t\t\t<ListViewOutline />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ closeListView }\n\t\t\t\tonSelect={ ( tabName ) => setTab( tabName ) }\n\t\t\t\tdefaultTabId=\"list-view\"\n\t\t\t\tref={ tabsRef }\n\t\t\t\tcloseButtonLabel={ __( 'Close' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, createSlotFill } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EntitiesSavedStates from '../entities-saved-states';\nimport PostPublishPanel from '../post-publish-panel';\nimport PluginPrePublishPanel from '../plugin-pre-publish-panel';\nimport PluginPostPublishPanel from '../plugin-post-publish-panel';\nimport { store as editorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'ActionsPanel' );\n\nexport const ActionsPanelFill = Fill;\n\nexport default function SavePublishPanels( {\n\tsetEntitiesSavedStatesCallback,\n\tcloseEntitiesSavedStates,\n\tisEntitiesSavedStatesOpen,\n\tforceIsDirtyPublishPanel,\n} ) {\n\tconst { closePublishSidebar, togglePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\tconst {\n\t\tpublishSidebarOpened,\n\t\tisPublishable,\n\t\tisDirty,\n\t\thasOtherEntitiesChanges,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tisPublishSidebarOpened,\n\t\t\tisEditedPostPublishable,\n\t\t\tisCurrentPostPublished,\n\t\t\tisEditedPostDirty,\n\t\t\thasNonPostEntityChanges,\n\t\t} = select( editorStore );\n\t\tconst _hasOtherEntitiesChanges = hasNonPostEntityChanges();\n\t\treturn {\n\t\t\tpublishSidebarOpened: isPublishSidebarOpened(),\n\t\t\tisPublishable:\n\t\t\t\t! isCurrentPostPublished() && isEditedPostPublishable(),\n\t\t\tisDirty: _hasOtherEntitiesChanges || isEditedPostDirty(),\n\t\t\thasOtherEntitiesChanges: _hasOtherEntitiesChanges,\n\t\t};\n\t}, [] );\n\n\tconst openEntitiesSavedStates = useCallback(\n\t\t() => setEntitiesSavedStatesCallback( true ),\n\t\t[]\n\t);\n\n\t// It is ok for these components to be unmounted when not in visual use.\n\t// We don't want more than one present at a time, decide which to render.\n\tlet unmountableContent;\n\tif ( publishSidebarOpened ) {\n\t\tunmountableContent = (\n\t\t\t<PostPublishPanel\n\t\t\t\tonClose={ closePublishSidebar }\n\t\t\t\tforceIsDirty={ forceIsDirtyPublishPanel }\n\t\t\t\tPrePublishExtension={ PluginPrePublishPanel.Slot }\n\t\t\t\tPostPublishExtension={ PluginPostPublishPanel.Slot }\n\t\t\t/>\n\t\t);\n\t} else if ( isPublishable && ! hasOtherEntitiesChanges ) {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-publish-panel\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ togglePublishSidebar }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open publish panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t} else {\n\t\tunmountableContent = (\n\t\t\t<div className=\"editor-layout__toggle-entities-saved-states-panel\">\n\t\t\t\t<Button\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tonClick={ openEntitiesSavedStates }\n\t\t\t\t\taria-expanded={ false }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\tdisabled={ ! isDirty }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// Since EntitiesSavedStates controls its own panel, we can keep it\n\t// always mounted to retain its own component state (such as checkboxes).\n\treturn (\n\t\t<>\n\t\t\t{ isEntitiesSavedStatesOpen && (\n\t\t\t\t<EntitiesSavedStates\n\t\t\t\t\tclose={ closeEntitiesSavedStates }\n\t\t\t\t\trenderDialog\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<Slot bubblesVirtually />\n\t\t\t{ ! isEntitiesSavedStatesOpen && unmountableContent }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport PostTextEditor from '../post-text-editor';\nimport PostTitleRaw from '../post-title/post-title-raw';\n\nexport default function TextEditor( { autoFocus = false } ) {\n\tconst { switchEditorMode } = useDispatch( editorStore );\n\tconst { shortcut, isRichEditingEnabled } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings } = select( editorStore );\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\n\t\treturn {\n\t\t\tshortcut: getShortcutRepresentation( 'core/editor/toggle-mode' ),\n\t\t\tisRichEditingEnabled: getEditorSettings().richEditingEnabled,\n\t\t};\n\t}, [] );\n\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( autoFocus ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus ] );\n\n\treturn (\n\t\t<div className=\"editor-text-editor\">\n\t\t\t{ isRichEditingEnabled && (\n\t\t\t\t<div className=\"editor-text-editor__toolbar\">\n\t\t\t\t\t<h2>{ __( 'Editing code' ) }</h2>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => switchEditorMode( 'visual' ) }\n\t\t\t\t\t\tshortcut={ shortcut }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Exit code editor' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"editor-text-editor__body\">\n\t\t\t\t<PostTitleRaw ref={ titleRef } />\n\t\t\t\t<PostTextEditor />\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\n/**\n * Component that:\n *\n * - Displays a 'Edit your template to edit this block' notification when the\n * user is focusing on editing page content and clicks on a disabled template\n * block.\n * - Displays a 'Edit your template to edit this block' dialog when the user\n * is focusing on editing page content and double clicks on a disabled\n * template block.\n *\n * @param {Object} props\n * @param {import('react').RefObject<HTMLElement>} props.contentRef Ref to the block\n * editor iframe canvas.\n */\nexport default function EditTemplateBlocksNotification( { contentRef } ) {\n\tconst { onNavigateToEntityRecord, templateId } = useSelect( ( select ) => {\n\t\tconst { getEditorSettings, getCurrentTemplateId } =\n\t\t\tselect( editorStore );\n\n\t\treturn {\n\t\t\tonNavigateToEntityRecord:\n\t\t\t\tgetEditorSettings().onNavigateToEntityRecord,\n\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t};\n\t}, [] );\n\n\tconst canEditTemplate = useSelect(\n\t\t( select ) =>\n\t\t\t!! select( coreStore ).canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: 'wp_template',\n\t\t\t} ),\n\t\t[]\n\t);\n\n\tconst [ isDialogOpen, setIsDialogOpen ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst handleDblClick = ( event ) => {\n\t\t\tif ( ! canEditTemplate ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t! event.target.classList.contains( 'is-root-container' ) ||\n\t\t\t\tevent.target.dataset?.type === 'core/template-part'\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetIsDialogOpen( true );\n\t\t\t}\n\t\t};\n\n\t\tconst canvas = contentRef.current;\n\t\tcanvas?.addEventListener( 'dblclick', handleDblClick );\n\t\treturn () => {\n\t\t\tcanvas?.removeEventListener( 'dblclick', handleDblClick );\n\t\t};\n\t}, [ contentRef, canEditTemplate ] );\n\n\tif ( ! canEditTemplate ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isDialogOpen }\n\t\t\tconfirmButtonText={ __( 'Edit template' ) }\n\t\t\tonConfirm={ () => {\n\t\t\t\tsetIsDialogOpen( false );\n\t\t\t\tonNavigateToEntityRecord( {\n\t\t\t\t\tpostId: templateId,\n\t\t\t\t\tpostType: 'wp_template',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tonCancel={ () => setIsDialogOpen( false ) }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ __(\n\t\t\t\t'You’ve tried to select a block that is part of a template, which may be used on other posts and pages. Would you like to edit the template?'\n\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { LEFT, RIGHT } from '@wordpress/keycodes';\nimport {\n\tVisuallyHidden,\n\tTooltip,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\nconst DELTA_DISTANCE = 20; // The distance to resize per keydown in pixels.\n\nexport default function ResizeHandle( { direction, resizeWidthBy } ) {\n\tfunction handleKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( keyCode !== LEFT && keyCode !== RIGHT ) {\n\t\t\treturn;\n\t\t}\n\t\tevent.preventDefault();\n\n\t\tif (\n\t\t\t( direction === 'left' && keyCode === LEFT ) ||\n\t\t\t( direction === 'right' && keyCode === RIGHT )\n\t\t) {\n\t\t\tresizeWidthBy( DELTA_DISTANCE );\n\t\t} else if (\n\t\t\t( direction === 'left' && keyCode === RIGHT ) ||\n\t\t\t( direction === 'right' && keyCode === LEFT )\n\t\t) {\n\t\t\tresizeWidthBy( -DELTA_DISTANCE );\n\t\t}\n\t}\n\n\tconst resizeHandleVariants = {\n\t\tactive: {\n\t\t\topacity: 1,\n\t\t\tscaleY: 1.3,\n\t\t},\n\t};\n\n\tconst resizableHandleHelpId = `resizable-editor__resize-help-${ direction }`;\n\n\treturn (\n\t\t<>\n\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t<motion.button\n\t\t\t\t\tclassName={ `editor-resizable-editor__resize-handle is-${ direction }` }\n\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\taria-describedby={ resizableHandleHelpId }\n\t\t\t\t\tonKeyDown={ handleKeyDown }\n\t\t\t\t\tvariants={ resizeHandleVariants }\n\t\t\t\t\twhileFocus=\"active\"\n\t\t\t\t\twhileHover=\"active\"\n\t\t\t\t\twhileTap=\"active\"\n\t\t\t\t\tkey=\"handle\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\t/>\n\t\t\t</Tooltip>\n\t\t\t<VisuallyHidden id={ resizableHandleHelpId }>\n\t\t\t\t{ __( 'Use left and right arrow keys to resize the canvas.' ) }\n\t\t\t</VisuallyHidden>\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useRef, useCallback } from '@wordpress/element';\nimport { ResizableBox } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResizeHandle from './resize-handle';\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDE = {\n\tposition: undefined,\n\tuserSelect: undefined,\n\tcursor: undefined,\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nfunction ResizableEditor( { className, enableResizing, height, children } ) {\n\tconst [ width, setWidth ] = useState( '100%' );\n\tconst resizableRef = useRef();\n\tconst resizeWidthBy = useCallback( ( deltaPixels ) => {\n\t\tif ( resizableRef.current ) {\n\t\t\tsetWidth( resizableRef.current.offsetWidth + deltaPixels );\n\t\t}\n\t}, [] );\n\treturn (\n\t\t<ResizableBox\n\t\t\tclassName={ clsx( 'editor-resizable-editor', className, {\n\t\t\t\t'is-resizable': enableResizing,\n\t\t\t} ) }\n\t\t\tref={ ( api ) => {\n\t\t\t\tresizableRef.current = api?.resizable;\n\t\t\t} }\n\t\t\tsize={ {\n\t\t\t\twidth: enableResizing ? width : '100%',\n\t\t\t\theight: enableResizing && height ? height : '100%',\n\t\t\t} }\n\t\t\tonResizeStop={ ( event, direction, element ) => {\n\t\t\t\tsetWidth( element.style.width );\n\t\t\t} }\n\t\t\tminWidth={ 300 }\n\t\t\tmaxWidth=\"100%\"\n\t\t\tmaxHeight=\"100%\"\n\t\t\tenable={ {\n\t\t\t\tleft: enableResizing,\n\t\t\t\tright: enableResizing,\n\t\t\t} }\n\t\t\tshowHandle={ enableResizing }\n\t\t\t// The editor is centered horizontally, resizing it only\n\t\t\t// moves half the distance. Hence double the ratio to correctly\n\t\t\t// align the cursor to the resizer handle.\n\t\t\tresizeRatio={ 2 }\n\t\t\thandleComponent={ {\n\t\t\t\tleft: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"left\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tright: (\n\t\t\t\t\t<ResizeHandle\n\t\t\t\t\t\tdirection=\"right\"\n\t\t\t\t\t\tresizeWidthBy={ resizeWidthBy }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t} }\n\t\t\thandleClasses={ undefined }\n\t\t\thandleStyles={ {\n\t\t\t\tleft: HANDLE_STYLES_OVERRIDE,\n\t\t\t\tright: HANDLE_STYLES_OVERRIDE,\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</ResizableBox>\n\t);\n}\n\nexport default ResizableEditor;\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst DISTANCE_THRESHOLD = 500;\n\nfunction clamp( value, min, max ) {\n\treturn Math.min( Math.max( value, min ), max );\n}\n\nfunction distanceFromRect( x, y, rect ) {\n\tconst dx = x - clamp( x, rect.left, rect.right );\n\tconst dy = y - clamp( y, rect.top, rect.bottom );\n\treturn Math.sqrt( dx * dx + dy * dy );\n}\n\nexport default function useSelectNearestEditableBlock( {\n\tisEnabled = true,\n} = {} ) {\n\tconst { getEnabledClientIdsTree, getBlockName, getBlockOrder } = unlock(\n\t\tuseSelect( blockEditorStore )\n\t);\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\tif ( ! isEnabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectNearestEditableBlock = ( x, y ) => {\n\t\t\t\tconst editableBlockClientIds =\n\t\t\t\t\tgetEnabledClientIdsTree().flatMap( ( { clientId } ) => {\n\t\t\t\t\t\tconst blockName = getBlockName( clientId );\n\t\t\t\t\t\tif ( blockName === 'core/template-part' ) {\n\t\t\t\t\t\t\treturn [];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( blockName === 'core/post-content' ) {\n\t\t\t\t\t\t\tconst innerBlocks = getBlockOrder( clientId );\n\t\t\t\t\t\t\tif ( innerBlocks.length ) {\n\t\t\t\t\t\t\t\treturn innerBlocks;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn [ clientId ];\n\t\t\t\t\t} );\n\n\t\t\t\tlet nearestDistance = Infinity,\n\t\t\t\t\tnearestClientId = null;\n\n\t\t\t\tfor ( const clientId of editableBlockClientIds ) {\n\t\t\t\t\tconst block = element.querySelector(\n\t\t\t\t\t\t`[data-block=\"${ clientId }\"]`\n\t\t\t\t\t);\n\t\t\t\t\tif ( ! block ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tconst rect = block.getBoundingClientRect();\n\t\t\t\t\tconst distance = distanceFromRect( x, y, rect );\n\t\t\t\t\tif (\n\t\t\t\t\t\tdistance < nearestDistance &&\n\t\t\t\t\t\tdistance < DISTANCE_THRESHOLD\n\t\t\t\t\t) {\n\t\t\t\t\t\tnearestDistance = distance;\n\t\t\t\t\t\tnearestClientId = clientId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( nearestClientId ) {\n\t\t\t\t\tselectBlock( nearestClientId );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tconst handleClick = ( event ) => {\n\t\t\t\tconst shouldSelect =\n\t\t\t\t\tevent.target === element ||\n\t\t\t\t\tevent.target.classList.contains( 'is-root-container' );\n\t\t\t\tif ( shouldSelect ) {\n\t\t\t\t\tselectNearestEditableBlock( event.clientX, event.clientY );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\telement.addEventListener( 'click', handleClick );\n\t\t\treturn () => element.removeEventListener( 'click', handleClick );\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n/**\n * Allows Zoom Out mode to be exited by double clicking in the selected block.\n */\nexport function useZoomOutModeExit() {\n\tconst { getSettings, isZoomOut } = unlock( useSelect( blockEditorStore ) );\n\tconst { resetZoomLevel } = unlock( useDispatch( blockEditorStore ) );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onDoubleClick( event ) {\n\t\t\t\tif ( ! isZoomOut() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! event.defaultPrevented ) {\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\tconst { __experimentalSetIsInserterOpened } = getSettings();\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof __experimentalSetIsInserterOpened === 'function'\n\t\t\t\t\t) {\n\t\t\t\t\t\t__experimentalSetIsInserterOpened( false );\n\t\t\t\t\t}\n\t\t\t\t\tresetZoomLevel();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'dblclick', onDoubleClick );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'dblclick', onDoubleClick );\n\t\t\t};\n\t\t},\n\t\t[ getSettings, isZoomOut, resetZoomLevel ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBlockList,\n\tstore as blockEditorStore,\n\t__unstableUseTypewriter as useTypewriter,\n\t__unstableUseTypingObserver as useTypingObserver,\n\tuseSettings,\n\tRecursionProvider,\n\tprivateApis as blockEditorPrivateApis,\n\t__experimentalUseResizeCanvas as useResizeCanvas,\n} from '@wordpress/block-editor';\nimport { useEffect, useRef, useMemo, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { parse } from '@wordpress/blocks';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tuseMergeRefs,\n\tuseViewportMatch,\n\tuseResizeObserver,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PostTitle from '../post-title';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport EditTemplateBlocksNotification from './edit-template-blocks-notification';\nimport ResizableEditor from '../resizable-editor';\nimport useSelectNearestEditableBlock from './use-select-nearest-editable-block';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\nimport { useZoomOutModeExit } from './use-zoom-out-mode-exit';\n\nconst {\n\tLayoutStyle,\n\tuseLayoutClasses,\n\tuseLayoutStyles,\n\tExperimentalBlockCanvas: BlockCanvas,\n\tuseFlashEditableBlocks,\n} = unlock( blockEditorPrivateApis );\n\n/**\n * These post types have a special editor where they don't allow you to fill the title\n * and they don't apply the layout styles.\n */\nconst DESIGN_POST_TYPES = [\n\tPATTERN_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n];\n\n/**\n * Given an array of nested blocks, find the first Post Content\n * block inside it, recursing through any nesting levels,\n * and return its attributes.\n *\n * @param {Array} blocks A list of blocks.\n *\n * @return {Object | undefined} The Post Content block.\n */\nfunction getPostContentAttributes( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn blocks[ i ].attributes;\n\t\t}\n\t\tif ( blocks[ i ].innerBlocks.length ) {\n\t\t\tconst nestedPostContent = getPostContentAttributes(\n\t\t\t\tblocks[ i ].innerBlocks\n\t\t\t);\n\n\t\t\tif ( nestedPostContent ) {\n\t\t\t\treturn nestedPostContent;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction checkForPostContentAtRootLevel( blocks ) {\n\tfor ( let i = 0; i < blocks.length; i++ ) {\n\t\tif ( blocks[ i ].name === 'core/post-content' ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\nfunction VisualEditor( {\n\t// Ideally as we unify post and site editors, we won't need these props.\n\tautoFocus,\n\tstyles,\n\tdisableIframe = false,\n\tiframeProps,\n\tcontentRef,\n\tclassName,\n} ) {\n\tconst [ contentHeight, setContentHeight ] = useState( '' );\n\tconst effectContentHeight = useResizeObserver( ( [ entry ] ) => {\n\t\tsetContentHeight( entry.borderBoxSize[ 0 ].blockSize );\n\t} );\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst {\n\t\trenderingMode,\n\t\tpostContentAttributes,\n\t\teditedPostTemplate = {},\n\t\twrapperBlockName,\n\t\twrapperUniqueId,\n\t\tdeviceType,\n\t\tisFocusedEntity,\n\t\tisDesignPostType,\n\t\tpostType,\n\t\tisPreview,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetCurrentPostId,\n\t\t\tgetCurrentPostType,\n\t\t\tgetCurrentTemplateId,\n\t\t\tgetEditorSettings,\n\t\t\tgetRenderingMode,\n\t\t\tgetDeviceType,\n\t\t} = select( editorStore );\n\t\tconst { getPostType, getEditedEntityRecord } = select( coreStore );\n\t\tconst postTypeSlug = getCurrentPostType();\n\t\tconst _renderingMode = getRenderingMode();\n\t\tlet _wrapperBlockName;\n\n\t\tif ( postTypeSlug === PATTERN_POST_TYPE ) {\n\t\t\t_wrapperBlockName = 'core/block';\n\t\t} else if ( _renderingMode === 'post-only' ) {\n\t\t\t_wrapperBlockName = 'core/post-content';\n\t\t}\n\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst supportsTemplateMode = editorSettings.supportsTemplateMode;\n\t\tconst postTypeObject = getPostType( postTypeSlug );\n\t\tconst currentTemplateId = getCurrentTemplateId();\n\t\tconst template = currentTemplateId\n\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tcurrentTemplateId\n\t\t\t )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\trenderingMode: _renderingMode,\n\t\t\tpostContentAttributes: editorSettings.postContentAttributes,\n\t\t\tisDesignPostType: DESIGN_POST_TYPES.includes( postTypeSlug ),\n\t\t\t// Post template fetch returns a 404 on classic themes, which\n\t\t\t// messes with e2e tests, so check it's a block theme first.\n\t\t\teditedPostTemplate:\n\t\t\t\tpostTypeObject?.viewable && supportsTemplateMode\n\t\t\t\t\t? template\n\t\t\t\t\t: undefined,\n\t\t\twrapperBlockName: _wrapperBlockName,\n\t\t\twrapperUniqueId: getCurrentPostId(),\n\t\t\tdeviceType: getDeviceType(),\n\t\t\tisFocusedEntity: !! editorSettings.onNavigateToPreviousEntityRecord,\n\t\t\tpostType: postTypeSlug,\n\t\t\tisPreview: editorSettings.isPreviewMode,\n\t\t};\n\t}, [] );\n\tconst { isCleanNewPost } = useSelect( editorStore );\n\tconst {\n\t\thasRootPaddingAwareAlignments,\n\t\tthemeHasDisabledLayoutStyles,\n\t\tthemeSupportsLayout,\n\t\tisZoomedOut,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSettings, isZoomOut: _isZoomOut } = unlock(\n\t\t\tselect( blockEditorStore )\n\t\t);\n\n\t\tconst _settings = getSettings();\n\t\treturn {\n\t\t\tthemeHasDisabledLayoutStyles: _settings.disableLayoutStyles,\n\t\t\tthemeSupportsLayout: _settings.supportsLayout,\n\t\t\thasRootPaddingAwareAlignments:\n\t\t\t\t_settings.__experimentalFeatures?.useRootPaddingAwareAlignments,\n\t\t\tisZoomedOut: _isZoomOut(),\n\t\t};\n\t}, [] );\n\n\tconst deviceStyles = useResizeCanvas( deviceType );\n\tconst [ globalLayoutSettings ] = useSettings( 'layout' );\n\n\t// fallbackLayout is used if there is no Post Content,\n\t// and for Post Title.\n\tconst fallbackLayout = useMemo( () => {\n\t\tif ( renderingMode !== 'post-only' || isDesignPostType ) {\n\t\t\treturn { type: 'default' };\n\t\t}\n\n\t\tif ( themeSupportsLayout ) {\n\t\t\t// We need to ensure support for wide and full alignments,\n\t\t\t// so we add the constrained type.\n\t\t\treturn { ...globalLayoutSettings, type: 'constrained' };\n\t\t}\n\t\t// Set default layout for classic themes so all alignments are supported.\n\t\treturn { type: 'default' };\n\t}, [\n\t\trenderingMode,\n\t\tthemeSupportsLayout,\n\t\tglobalLayoutSettings,\n\t\tisDesignPostType,\n\t] );\n\n\tconst newestPostContentAttributes = useMemo( () => {\n\t\tif (\n\t\t\t! editedPostTemplate?.content &&\n\t\t\t! editedPostTemplate?.blocks &&\n\t\t\tpostContentAttributes\n\t\t) {\n\t\t\treturn postContentAttributes;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn getPostContentAttributes( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn getPostContentAttributes( parse( parseableContent ) ) || {};\n\t}, [\n\t\teditedPostTemplate?.content,\n\t\teditedPostTemplate?.blocks,\n\t\tpostContentAttributes,\n\t] );\n\n\tconst hasPostContentAtRootLevel = useMemo( () => {\n\t\tif ( ! editedPostTemplate?.content && ! editedPostTemplate?.blocks ) {\n\t\t\treturn false;\n\t\t}\n\t\t// When in template editing mode, we can access the blocks directly.\n\t\tif ( editedPostTemplate?.blocks ) {\n\t\t\treturn checkForPostContentAtRootLevel( editedPostTemplate?.blocks );\n\t\t}\n\t\t// If there are no blocks, we have to parse the content string.\n\t\t// Best double-check it's a string otherwise the parse function gets unhappy.\n\t\tconst parseableContent =\n\t\t\ttypeof editedPostTemplate?.content === 'string'\n\t\t\t\t? editedPostTemplate?.content\n\t\t\t\t: '';\n\n\t\treturn (\n\t\t\tcheckForPostContentAtRootLevel( parse( parseableContent ) ) || false\n\t\t);\n\t}, [ editedPostTemplate?.content, editedPostTemplate?.blocks ] );\n\n\tconst { layout = {}, align = '' } = newestPostContentAttributes || {};\n\n\tconst postContentLayoutClasses = useLayoutClasses(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content'\n\t);\n\n\tconst blockListLayoutClass = clsx(\n\t\t{\n\t\t\t'is-layout-flow': ! themeSupportsLayout,\n\t\t},\n\t\tthemeSupportsLayout && postContentLayoutClasses,\n\t\talign && `align${ align }`\n\t);\n\n\tconst postContentLayoutStyles = useLayoutStyles(\n\t\tnewestPostContentAttributes,\n\t\t'core/post-content',\n\t\t'.block-editor-block-list__layout.is-root-container'\n\t);\n\n\t// Update type for blocks using legacy layouts.\n\tconst postContentLayout = useMemo( () => {\n\t\treturn layout &&\n\t\t\t( layout?.type === 'constrained' ||\n\t\t\t\tlayout?.inherit ||\n\t\t\t\tlayout?.contentSize ||\n\t\t\t\tlayout?.wideSize )\n\t\t\t? { ...globalLayoutSettings, ...layout, type: 'constrained' }\n\t\t\t: { ...globalLayoutSettings, ...layout, type: 'default' };\n\t}, [\n\t\tlayout?.type,\n\t\tlayout?.inherit,\n\t\tlayout?.contentSize,\n\t\tlayout?.wideSize,\n\t\tglobalLayoutSettings,\n\t] );\n\n\t// If there is a Post Content block we use its layout for the block list;\n\t// if not, this must be a classic theme, in which case we use the fallback layout.\n\tconst blockListLayout = postContentAttributes\n\t\t? postContentLayout\n\t\t: fallbackLayout;\n\n\tconst postEditorLayout =\n\t\tblockListLayout?.type === 'default' && ! hasPostContentAtRootLevel\n\t\t\t? fallbackLayout\n\t\t\t: blockListLayout;\n\tconst observeTypingRef = useTypingObserver();\n\tconst titleRef = useRef();\n\tuseEffect( () => {\n\t\tif ( ! autoFocus || ! isCleanNewPost() ) {\n\t\t\treturn;\n\t\t}\n\t\ttitleRef?.current?.focus();\n\t}, [ autoFocus, isCleanNewPost ] );\n\n\t// Add some styles for alignwide/alignfull Post Content and its children.\n\tconst alignCSS = `.is-root-container.alignwide { max-width: var(--wp--style--global--wide-size); margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignwide:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: var(--wp--style--global--wide-size);}\n\t\t.is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;}\n\t\t.is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`;\n\n\tconst forceFullHeight = postType === NAVIGATION_POST_TYPE;\n\tconst enableResizing =\n\t\t[\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\tPATTERN_POST_TYPE,\n\t\t].includes( postType ) &&\n\t\t// Disable in previews / view mode.\n\t\t! isPreview &&\n\t\t// Disable resizing in mobile viewport.\n\t\t! isMobileViewport &&\n\t\t// Disable resizing in zoomed-out mode.\n\t\t! isZoomedOut;\n\n\tconst iframeStyles = useMemo( () => {\n\t\treturn [\n\t\t\t...( styles ?? [] ),\n\t\t\t{\n\t\t\t\t// Ensures margins of children are contained so that the body background paints behind them.\n\t\t\t\t// Otherwise, the background of html (when zoomed out) would show there and appear broken. It’s\n\t\t\t\t// important mostly for post-only views yet conceivably an issue in templated views too.\n\t\t\t\tcss: `:where(.block-editor-iframe__body){display:flow-root;}.is-root-container{display:flow-root;${\n\t\t\t\t\t// Some themes will have `min-height: 100vh` for the root container,\n\t\t\t\t\t// which isn't a requirement in auto resize mode.\n\t\t\t\t\tenableResizing ? 'min-height:0!important;' : ''\n\t\t\t\t}}`,\n\t\t\t},\n\t\t];\n\t}, [ styles, enableResizing ] );\n\n\tconst localRef = useRef();\n\tconst typewriterRef = useTypewriter();\n\tcontentRef = useMergeRefs( [\n\t\tlocalRef,\n\t\tcontentRef,\n\t\trenderingMode === 'post-only' ? typewriterRef : null,\n\t\tuseFlashEditableBlocks( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t\tuseSelectNearestEditableBlock( {\n\t\t\tisEnabled: renderingMode === 'template-locked',\n\t\t} ),\n\t\tuseZoomOutModeExit(),\n\t\t// Avoid resize listeners when not needed, these will trigger\n\t\t// unnecessary re-renders when animating the iframe width.\n\t\tenableResizing ? effectContentHeight : null,\n\t] );\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx(\n\t\t\t\t'editor-visual-editor',\n\t\t\t\t// this class is here for backward compatibility reasons.\n\t\t\t\t'edit-post-visual-editor',\n\t\t\t\tclassName,\n\t\t\t\t{\n\t\t\t\t\t'has-padding': isFocusedEntity || enableResizing,\n\t\t\t\t\t'is-resizable': enableResizing,\n\t\t\t\t\t'is-iframed': ! disableIframe,\n\t\t\t\t\t'is-scrollable': disableIframe || deviceType !== 'Desktop',\n\t\t\t\t}\n\t\t\t) }\n\t\t>\n\t\t\t<ResizableEditor\n\t\t\t\tenableResizing={ enableResizing }\n\t\t\t\theight={\n\t\t\t\t\tcontentHeight && ! forceFullHeight ? contentHeight : '100%'\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<BlockCanvas\n\t\t\t\t\tshouldIframe={ ! disableIframe }\n\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\tstyles={ iframeStyles }\n\t\t\t\t\theight=\"100%\"\n\t\t\t\t\tiframeProps={ {\n\t\t\t\t\t\t...iframeProps,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...iframeProps?.style,\n\t\t\t\t\t\t\t...deviceStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ themeSupportsLayout &&\n\t\t\t\t\t\t! themeHasDisabledLayoutStyles &&\n\t\t\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t\t\t! isDesignPostType && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\tselector=\".editor-visual-editor__post-title-wrapper\"\n\t\t\t\t\t\t\t\t\tlayout={ fallbackLayout }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\tselector=\".block-editor-block-list__layout.is-root-container\"\n\t\t\t\t\t\t\t\t\tlayout={ postEditorLayout }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ align && <LayoutStyle css={ alignCSS } /> }\n\t\t\t\t\t\t\t\t{ postContentLayoutStyles && (\n\t\t\t\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\t\t\t\tlayout={ postContentLayout }\n\t\t\t\t\t\t\t\t\t\tcss={ postContentLayoutStyles }\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</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t{ renderingMode === 'post-only' && ! isDesignPostType && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'editor-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t\t\t// The following class is only here for backward compatibility\n\t\t\t\t\t\t\t\t// some themes might be using it to style the post title.\n\t\t\t\t\t\t\t\t'edit-post-visual-editor__post-title-wrapper',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-global-padding':\n\t\t\t\t\t\t\t\t\t\thasRootPaddingAwareAlignments,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tcontentEditable={ false }\n\t\t\t\t\t\t\tref={ observeTypingRef }\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t// This is using inline styles\n\t\t\t\t\t\t\t\t// so it's applied for both iframed and non iframed editors.\n\t\t\t\t\t\t\t\tmarginTop: '4rem',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PostTitle ref={ titleRef } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t\t<RecursionProvider\n\t\t\t\t\t\tblockName={ wrapperBlockName }\n\t\t\t\t\t\tuniqueId={ wrapperUniqueId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockList\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'is-' + deviceType.toLowerCase() + '-preview',\n\t\t\t\t\t\t\t\trenderingMode !== 'post-only' ||\n\t\t\t\t\t\t\t\t\tisDesignPostType\n\t\t\t\t\t\t\t\t\t? 'wp-site-blocks'\n\t\t\t\t\t\t\t\t\t: `${ blockListLayoutClass } wp-block-post-content`, // Ensure root level blocks receive default/flow blockGap styling rules.\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-global-padding':\n\t\t\t\t\t\t\t\t\t\trenderingMode === 'post-only' &&\n\t\t\t\t\t\t\t\t\t\t! isDesignPostType &&\n\t\t\t\t\t\t\t\t\t\thasRootPaddingAwareAlignments,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tlayout={ blockListLayout }\n\t\t\t\t\t\t\tdropZoneElement={\n\t\t\t\t\t\t\t\t// When iframed, pass in the html element of the iframe to\n\t\t\t\t\t\t\t\t// ensure the drop zone extends to the edges of the iframe.\n\t\t\t\t\t\t\t\tdisableIframe\n\t\t\t\t\t\t\t\t\t? localRef.current\n\t\t\t\t\t\t\t\t\t: localRef.current?.parentNode\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t__unstableDisableDropZone={\n\t\t\t\t\t\t\t\t// In template preview mode, disable drop zones at the root of the template.\n\t\t\t\t\t\t\t\trenderingMode === 'template-locked'\n\t\t\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t\t\t: false\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ renderingMode === 'template-locked' && (\n\t\t\t\t\t\t\t<EditTemplateBlocksNotification\n\t\t\t\t\t\t\t\tcontentRef={ localRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</RecursionProvider>\n\t\t\t\t</BlockCanvas>\n\t\t\t</ResizableEditor>\n\t\t</div>\n\t);\n}\n\nexport default VisualEditor;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { InterfaceSkeleton, ComplementaryArea } from '@wordpress/interface';\nimport { useSelect } from '@wordpress/data';\nimport { __, _x } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { BlockBreadcrumb, BlockToolbar } from '@wordpress/block-editor';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useState, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport EditorNotices from '../editor-notices';\nimport Header from '../header';\nimport InserterSidebar from '../inserter-sidebar';\nimport ListViewSidebar from '../list-view-sidebar';\nimport SavePublishPanels from '../save-publish-panels';\nimport TextEditor from '../text-editor';\nimport VisualEditor from '../visual-editor';\nimport EditorContentSlotFill from './content-slot-fill';\n\nconst interfaceLabels = {\n\t/* translators: accessibility text for the editor top bar landmark region. */\n\theader: __( 'Editor top bar' ),\n\t/* translators: accessibility text for the editor content landmark region. */\n\tbody: __( 'Editor content' ),\n\t/* translators: accessibility text for the editor settings landmark region. */\n\tsidebar: __( 'Editor settings' ),\n\t/* translators: accessibility text for the editor publish landmark region. */\n\tactions: __( 'Editor publish' ),\n\t/* translators: accessibility text for the editor footer landmark region. */\n\tfooter: __( 'Editor footer' ),\n};\n\nexport default function EditorInterface( {\n\tclassName,\n\tstyles,\n\tchildren,\n\tforceIsDirty,\n\tcontentRef,\n\tdisableIframe,\n\tautoFocus,\n\tcustomSaveButton,\n\tcustomSavePanel,\n\tforceDisableBlockTools,\n\ttitle,\n\tiframeProps,\n} ) {\n\tconst {\n\t\tmode,\n\t\tisRichEditingEnabled,\n\t\tisInserterOpened,\n\t\tisListViewOpened,\n\t\tisDistractionFree,\n\t\tisPreviewMode,\n\t\tshowBlockBreadcrumbs,\n\t\tdocumentLabel,\n\t} = useSelect( ( select ) => {\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getEditorSettings, getPostTypeLabel } = select( editorStore );\n\t\tconst editorSettings = getEditorSettings();\n\t\tconst postTypeLabel = getPostTypeLabel();\n\n\t\treturn {\n\t\t\tmode: select( editorStore ).getEditorMode(),\n\t\t\tisRichEditingEnabled: editorSettings.richEditingEnabled,\n\t\t\tisInserterOpened: select( editorStore ).isInserterOpened(),\n\t\t\tisListViewOpened: select( editorStore ).isListViewOpened(),\n\t\t\tisDistractionFree: get( 'core', 'distractionFree' ),\n\t\t\tisPreviewMode: editorSettings.isPreviewMode,\n\t\t\tshowBlockBreadcrumbs: get( 'core', 'showBlockBreadcrumbs' ),\n\t\t\tdocumentLabel:\n\t\t\t\t// translators: Default label for the Document in the Block Breadcrumb.\n\t\t\t\tpostTypeLabel || _x( 'Document', 'noun, breadcrumb' ),\n\t\t};\n\t}, [] );\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst secondarySidebarLabel = isListViewOpened\n\t\t? __( 'Document Overview' )\n\t\t: __( 'Block Library' );\n\n\t// Local state for save panel.\n\t// Note 'truthy' callback implies an open panel.\n\tconst [ entitiesSavedStatesCallback, setEntitiesSavedStatesCallback ] =\n\t\tuseState( false );\n\tconst closeEntitiesSavedStates = useCallback(\n\t\t( arg ) => {\n\t\t\tif ( typeof entitiesSavedStatesCallback === 'function' ) {\n\t\t\t\tentitiesSavedStatesCallback( arg );\n\t\t\t}\n\t\t\tsetEntitiesSavedStatesCallback( false );\n\t\t},\n\t\t[ entitiesSavedStatesCallback ]\n\t);\n\n\treturn (\n\t\t<InterfaceSkeleton\n\t\t\tisDistractionFree={ isDistractionFree }\n\t\t\tclassName={ clsx( 'editor-editor-interface', className, {\n\t\t\t\t'is-entity-save-view-open': !! entitiesSavedStatesCallback,\n\t\t\t\t'is-distraction-free': isDistractionFree && ! isPreviewMode,\n\t\t\t} ) }\n\t\t\tlabels={ {\n\t\t\t\t...interfaceLabels,\n\t\t\t\tsecondarySidebar: secondarySidebarLabel,\n\t\t\t} }\n\t\t\theader={\n\t\t\t\t! isPreviewMode && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\tforceIsDirty={ forceIsDirty }\n\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcustomSaveButton={ customSaveButton }\n\t\t\t\t\t\tforceDisableBlockTools={ forceDisableBlockTools }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t}\n\t\t\teditorNotices={ <EditorNotices /> }\n\t\t\tsecondarySidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\tmode === 'visual' &&\n\t\t\t\t( ( isInserterOpened && <InserterSidebar /> ) ||\n\t\t\t\t\t( isListViewOpened && <ListViewSidebar /> ) )\n\t\t\t}\n\t\t\tsidebar={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree && <ComplementaryArea.Slot scope=\"core\" />\n\t\t\t}\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ ! isDistractionFree && ! isPreviewMode && (\n\t\t\t\t\t\t<EditorNotices />\n\t\t\t\t\t) }\n\n\t\t\t\t\t<EditorContentSlotFill.Slot>\n\t\t\t\t\t\t{ ( [ editorCanvasView ] ) =>\n\t\t\t\t\t\t\teditorCanvasView ? (\n\t\t\t\t\t\t\t\teditorCanvasView\n\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{ ! isPreviewMode &&\n\t\t\t\t\t\t\t\t\t\t( mode === 'text' ||\n\t\t\t\t\t\t\t\t\t\t\t! isRichEditingEnabled ) && (\n\t\t\t\t\t\t\t\t\t\t\t<TextEditor\n\t\t\t\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ ! isPreviewMode &&\n\t\t\t\t\t\t\t\t\t\t! isLargeViewport &&\n\t\t\t\t\t\t\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t\t\t\t\t\t\t<BlockToolbar hideDragHandle />\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ ( isPreviewMode ||\n\t\t\t\t\t\t\t\t\t\t( isRichEditingEnabled &&\n\t\t\t\t\t\t\t\t\t\t\tmode === 'visual' ) ) && (\n\t\t\t\t\t\t\t\t\t\t<VisualEditor\n\t\t\t\t\t\t\t\t\t\t\tstyles={ styles }\n\t\t\t\t\t\t\t\t\t\t\tcontentRef={ contentRef }\n\t\t\t\t\t\t\t\t\t\t\tdisableIframe={ disableIframe }\n\t\t\t\t\t\t\t\t\t\t\t// We should auto-focus the canvas (title) on load.\n\t\t\t\t\t\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-autofocus\n\t\t\t\t\t\t\t\t\t\t\tautoFocus={ autoFocus }\n\t\t\t\t\t\t\t\t\t\t\tiframeProps={ iframeProps }\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{ children }\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</EditorContentSlotFill.Slot>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tfooter={\n\t\t\t\t! isPreviewMode &&\n\t\t\t\t! isDistractionFree &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tshowBlockBreadcrumbs &&\n\t\t\t\tisRichEditingEnabled &&\n\t\t\t\tmode === 'visual' && (\n\t\t\t\t\t<BlockBreadcrumb rootLabelText={ documentLabel } />\n\t\t\t\t)\n\t\t\t}\n\t\t\tactions={\n\t\t\t\t! isPreviewMode\n\t\t\t\t\t? customSavePanel || (\n\t\t\t\t\t\t\t<SavePublishPanels\n\t\t\t\t\t\t\t\tcloseEntitiesSavedStates={\n\t\t\t\t\t\t\t\t\tcloseEntitiesSavedStates\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tisEntitiesSavedStatesOpen={\n\t\t\t\t\t\t\t\t\tentitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback={\n\t\t\t\t\t\t\t\t\tsetEntitiesSavedStatesCallback\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tforceIsDirtyPublishPanel={ forceIsDirty }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { OverridesPanel } = unlock( patternsPrivateApis );\n\nexport default function PatternOverridesPanel() {\n\tconst supportsPatternOverridesPanel = useSelect(\n\t\t( select ) => select( editorStore ).getCurrentPostType() === 'wp_block',\n\t\t[]\n\t);\n\n\tif ( ! supportsPatternOverridesPanel ) {\n\t\treturn null;\n\t}\n\n\treturn <OverridesPanel />;\n}\n","/**\n * WordPress dependencies\n */\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Helper function to get the title of a post item.\n * This is duplicated from the `@wordpress/fields` package.\n * `packages/fields/src/actions/utils.ts`\n *\n * @param {Object} item The post item.\n * @return {string} The title of the item, or an empty string if the title is not found.\n */\nexport function getItemTitle( item ) {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn decodeEntities( item.title );\n\t}\n\tif ( item.title && 'rendered' in item.title ) {\n\t\treturn decodeEntities( item.title.rendered );\n\t}\n\tif ( item.title && 'raw' in item.title ) {\n\t\treturn decodeEntities( item.title.raw );\n\t}\n\treturn '';\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsHomepageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { showOnFront, currentHomePage, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentHomePageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_on_front\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tshowOnFront: siteSettings?.show_on_front,\n\t\t\t\tcurrentHomePage: currentHomePageItem,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsHomepage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_on_front: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Homepage updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the homepage.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tlet modalWarning = '';\n\tif ( 'posts' === showOnFront ) {\n\t\tmodalWarning = __(\n\t\t\t'This will replace the current homepage which is set to display latest posts.'\n\t\t);\n\t} else if ( currentHomePage ) {\n\t\tmodalWarning = sprintf(\n\t\t\t// translators: %s: title of the current home page.\n\t\t\t__( 'This will replace the current homepage: \"%s\"' ),\n\t\t\tgetItemTitle( currentHomePage )\n\t\t);\n\t}\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the homepage, %2$s: homepage replacement warning message.\n\t\t__( 'Set \"%1$s\" as the site homepage? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t).trim();\n\n\t// translators: Button label to confirm setting the specified page as the homepage.\n\tconst modalButtonLabel = __( 'Set homepage' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsHomepage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsHomepageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-homepage',\n\t\t\tlabel: __( 'Set as homepage' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tRenderModal: SetAsHomepageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { getItemTitle } from '../../utils/get-item-title';\n\nconst SetAsPostsPageModal = ( { items, closeModal } ) => {\n\tconst [ item ] = items;\n\tconst pageTitle = getItemTitle( item );\n\tconst { currentPostsPage, isPageForPostsSet, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, isSavingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\t\tconst currentPostsPageItem = getEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'page',\n\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcurrentPostsPage: currentPostsPageItem,\n\t\t\t\tisPageForPostsSet: siteSettings?.page_for_posts !== 0,\n\t\t\t\tisSaving: isSavingEntityRecord( 'root', 'site' ),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tasync function onSetPageAsPostsPage( event ) {\n\t\tevent.preventDefault();\n\n\t\ttry {\n\t\t\tawait saveEntityRecord( 'root', 'site', {\n\t\t\t\tpage_for_posts: item.id,\n\t\t\t\tshow_on_front: 'page',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice( __( 'Posts page updated.' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while setting the posts page.' );\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t} finally {\n\t\t\tcloseModal?.();\n\t\t}\n\t}\n\n\tconst modalWarning =\n\t\tisPageForPostsSet && currentPostsPage\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: title of the current posts page.\n\t\t\t\t\t__( 'This will replace the current posts page: \"%s\"' ),\n\t\t\t\t\tgetItemTitle( currentPostsPage )\n\t\t\t )\n\t\t\t: __( 'This page will show the latest posts.' );\n\n\tconst modalText = sprintf(\n\t\t// translators: %1$s: title of the page to be set as the posts page, %2$s: posts page replacement warning message.\n\t\t__( 'Set \"%1$s\" as the posts page? %2$s' ),\n\t\tpageTitle,\n\t\tmodalWarning\n\t);\n\n\t// translators: Button label to confirm setting the specified page as the posts page.\n\tconst modalButtonLabel = __( 'Set posts page' );\n\n\treturn (\n\t\t<form onSubmit={ onSetPageAsPostsPage }>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<Text>{ modalText }</Text>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tcloseModal?.();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tdisabled={ isSaving }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ modalButtonLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n};\n\nexport const useSetAsPostsPageAction = () => {\n\tconst { pageOnFront, pageForPosts } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tpageOnFront: siteSettings?.page_on_front,\n\t\t\tpageForPosts: siteSettings?.page_for_posts,\n\t\t};\n\t} );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'set-as-posts-page',\n\t\t\tlabel: __( 'Set as posts page' ),\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status !== 'publish' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ( post.type !== 'page' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the homepage.\n\t\t\t\tif ( pageOnFront === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the action if the page is already set as the page for posts.\n\t\t\t\tif ( pageForPosts === post.id ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t},\n\t\t\tRenderModal: SetAsPostsPageModal,\n\t\t} ),\n\t\t[ pageForPosts, pageOnFront ]\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useSetAsHomepageAction } from './set-as-homepage';\nimport { useSetAsPostsPageAction } from './set-as-posts-page';\n\nexport function usePostActions( { postType, onActionPerformed, context } ) {\n\tconst { defaultActions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityActions } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tdefaultActions: getEntityActions( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst { canManageOptions, hasFrontPageTemplate } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecords } = select( coreStore );\n\t\t\tconst templates = getEntityRecords( 'postType', 'wp_template', {\n\t\t\t\tper_page: -1,\n\t\t\t} );\n\n\t\t\treturn {\n\t\t\t\tcanManageOptions: select( coreStore ).canUser( 'update', {\n\t\t\t\t\tkind: 'root',\n\t\t\t\t\tname: 'site',\n\t\t\t\t} ),\n\t\t\t\thasFrontPageTemplate: !! templates?.find(\n\t\t\t\t\t( template ) => template?.slug === 'front-page'\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t);\n\n\tconst setAsHomepageAction = useSetAsHomepageAction();\n\tconst setAsPostsPageAction = useSetAsPostsPageAction();\n\tconst shouldShowHomepageActions =\n\t\tcanManageOptions && ! hasFrontPageTemplate;\n\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\treturn useMemo( () => {\n\t\tlet actions = [ ...defaultActions ];\n\t\tif ( shouldShowHomepageActions ) {\n\t\t\tactions.push( setAsHomepageAction, setAsPostsPageAction );\n\t\t}\n\n\t\t// Ensure \"Move to trash\" is always the last action.\n\t\tactions = actions.sort( ( a, b ) =>\n\t\t\tb.id === 'move-to-trash' ? -1 : 0\n\t\t);\n\n\t\t// Filter actions based on provided context. If not provided\n\t\t// all actions are returned. We'll have a single entry for getting the actions\n\t\t// and the consumer should provide the context to filter the actions, if needed.\n\t\t// Actions should also provide the `context` they support, if it's specific, to\n\t\t// compare with the provided context to get all the actions.\n\t\t// Right now the only supported context is `list`.\n\t\tactions = actions.filter( ( action ) => {\n\t\t\tif ( ! action.context ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn action.context === context;\n\t\t} );\n\n\t\tif ( onActionPerformed ) {\n\t\t\tfor ( let i = 0; i < actions.length; ++i ) {\n\t\t\t\tif ( actions[ i ].callback ) {\n\t\t\t\t\tconst existingCallback = actions[ i ].callback;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tcallback: ( items, argsObject ) => {\n\t\t\t\t\t\t\texistingCallback( items, {\n\t\t\t\t\t\t\t\t...argsObject,\n\t\t\t\t\t\t\t\tonActionPerformed: ( _items ) => {\n\t\t\t\t\t\t\t\t\tif ( argsObject?.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\targsObject.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t_items\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} );\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tif ( actions[ i ].RenderModal ) {\n\t\t\t\t\tconst ExistingRenderModal = actions[ i ].RenderModal;\n\t\t\t\t\tactions[ i ] = {\n\t\t\t\t\t\t...actions[ i ],\n\t\t\t\t\t\tRenderModal: ( props ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<ExistingRenderModal\n\t\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\t\tonActionPerformed={ ( _items ) => {\n\t\t\t\t\t\t\t\t\t\tif ( props.onActionPerformed ) {\n\t\t\t\t\t\t\t\t\t\t\tprops.onActionPerformed( _items );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonActionPerformed(\n\t\t\t\t\t\t\t\t\t\t\tactions[ i ].id,\n\t\t\t\t\t\t\t\t\t\t\t_items\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);\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\n\t\treturn actions;\n\t}, [\n\t\tcontext,\n\t\tdefaultActions,\n\t\tonActionPerformed,\n\t\tsetAsHomepageAction,\n\t\tsetAsPostsPageAction,\n\t\tshouldShowHomepageActions,\n\t] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { usePostActions } from './actions';\n\nconst { Menu, kebabCase } = unlock( componentsPrivateApis );\n\nfunction useEditedEntityRecordsWithPermissions( postType, postIds ) {\n\tconst { items, permissions } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecordPermissions } =\n\t\t\t\tunlock( select( coreStore ) );\n\t\t\treturn {\n\t\t\t\titems: postIds.map( ( postId ) =>\n\t\t\t\t\tgetEditedEntityRecord( 'postType', postType, postId )\n\t\t\t\t),\n\t\t\t\tpermissions: postIds.map( ( postId ) =>\n\t\t\t\t\tgetEntityRecordPermissions( 'postType', postType, postId )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postIds, postType ]\n\t);\n\n\treturn useMemo( () => {\n\t\treturn items.map( ( item, index ) => ( {\n\t\t\t...item,\n\t\t\tpermissions: permissions[ index ],\n\t\t} ) );\n\t}, [ items, permissions ] );\n}\n\nexport default function PostActions( { postType, postId, onActionPerformed } ) {\n\tconst [ activeModalAction, setActiveModalAction ] = useState( null );\n\tconst _postIds = useMemo( () => {\n\t\tif ( Array.isArray( postId ) ) {\n\t\t\treturn postId;\n\t\t}\n\t\treturn postId ? [ postId ] : [];\n\t}, [ postId ] );\n\n\tconst itemsWithPermissions = useEditedEntityRecordsWithPermissions(\n\t\tpostType,\n\t\t_postIds\n\t);\n\tconst allActions = usePostActions( { postType, onActionPerformed } );\n\n\tconst actions = useMemo( () => {\n\t\treturn allActions.filter( ( action ) => {\n\t\t\treturn (\n\t\t\t\t( ! action.isEligible ||\n\t\t\t\t\titemsWithPermissions.some( ( itemWithPermissions ) =>\n\t\t\t\t\t\taction.isEligible( itemWithPermissions )\n\t\t\t\t\t) ) &&\n\t\t\t\t( itemsWithPermissions.length < 2 || action.supportsBulk )\n\t\t\t);\n\t\t} );\n\t}, [ allActions, itemsWithPermissions ] );\n\n\treturn (\n\t\t<>\n\t\t\t<Menu placement=\"bottom-end\">\n\t\t\t\t<Menu.TriggerButton\n\t\t\t\t\trender={\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tclassName=\"editor-all-actions-button\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t\t<Menu.Popover>\n\t\t\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\titems={ itemsWithPermissions }\n\t\t\t\t\t\tsetActiveModalAction={ setActiveModalAction }\n\t\t\t\t\t/>\n\t\t\t\t</Menu.Popover>\n\t\t\t</Menu>\n\t\t\t{ !! activeModalAction && (\n\t\t\t\t<ActionModal\n\t\t\t\t\taction={ activeModalAction }\n\t\t\t\t\titems={ itemsWithPermissions }\n\t\t\t\t\tcloseModal={ () => setActiveModalAction( null ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\n// From now on all the functions on this file are copied as from the dataviews packages,\n// The editor packages should not be using the dataviews packages directly,\n// and the dataviews package should not be using the editor packages directly,\n// so duplicating the code here seems like the least bad option.\n\nfunction DropdownMenuItemTrigger( { action, onClick, items } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Menu.Item onClick={ onClick }>\n\t\t\t<Menu.ItemLabel>{ label }</Menu.ItemLabel>\n\t\t</Menu.Item>\n\t);\n}\n\nexport function ActionModal( { action, items, closeModal } ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ action.modalHeader || label }\n\t\t\t__experimentalHideHeader={ !! action.hideModalHeader }\n\t\t\tonRequestClose={ closeModal ?? ( () => {} ) }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"medium\"\n\t\t\toverlayClassName={ `editor-action-modal editor-action-modal__${ kebabCase(\n\t\t\t\taction.id\n\t\t\t) }` }\n\t\t>\n\t\t\t<action.RenderModal items={ items } closeModal={ closeModal } />\n\t\t</Modal>\n\t);\n}\n\nfunction ActionsDropdownMenuGroup( { actions, items, setActiveModalAction } ) {\n\tconst registry = useRegistry();\n\treturn (\n\t\t<Menu.Group>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( 'RenderModal' in action ) {\n\t\t\t\t\t\t\t\tsetActiveModalAction( action );\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taction.callback( items, { registry } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\titems={ items }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Menu.Group>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tIcon,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalText as Text,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\nimport { unlock } from '../../lock-unlock';\nimport PostActions from '../post-actions';\nimport usePageTypeBadge from '../../utils/pageTypeBadge';\nimport { getTemplateInfo } from '../../utils/get-template-info';\nconst { Badge } = unlock( componentsPrivateApis );\n\n/**\n * Renders a title of the post type and the available quick actions available within a 3-dot dropdown.\n *\n * @param {Object} props - Component props.\n * @param {string} [props.postType] - The post type string.\n * @param {string|string[]} [props.postId] - The post id or list of post ids.\n * @param {Function} [props.onActionPerformed] - A callback function for when a quick action is performed.\n * @return {React.ReactNode} The rendered component.\n */\nexport default function PostCardPanel( {\n\tpostType,\n\tpostId,\n\tonActionPerformed,\n} ) {\n\tconst postIds = useMemo(\n\t\t() => ( Array.isArray( postId ) ? postId : [ postId ] ),\n\t\t[ postId ]\n\t);\n\tconst { postTitle, icon, labels } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord, getEntityRecord, getPostType } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { getPostIcon } = unlock( select( editorStore ) );\n\t\t\tlet _title = '';\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostIds[ 0 ]\n\t\t\t);\n\t\t\tif ( postIds.length === 1 ) {\n\t\t\t\tconst { default_template_types: templateTypes = [] } =\n\t\t\t\t\tgetEntityRecord( 'root', '__unstableBase' ) ?? {};\n\n\t\t\t\tconst _templateInfo = [\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t].includes( postType )\n\t\t\t\t\t? getTemplateInfo( {\n\t\t\t\t\t\t\ttemplate: _record,\n\t\t\t\t\t\t\ttemplateTypes,\n\t\t\t\t\t } )\n\t\t\t\t\t: {};\n\t\t\t\t_title = _templateInfo?.title || _record?.title;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tpostTitle: _title,\n\t\t\t\ticon: getPostIcon( postType, {\n\t\t\t\t\tarea: _record?.area,\n\t\t\t\t} ),\n\t\t\t\tlabels: getPostType( postType )?.labels,\n\t\t\t};\n\t\t},\n\t\t[ postIds, postType ]\n\t);\n\n\tconst pageTypeBadge = usePageTypeBadge( postId );\n\tlet title = __( 'No title' );\n\tif ( labels?.name && postIds.length > 1 ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: %i number of selected items %s: Name of the plural post type e.g: \"Posts\".\n\t\t\t__( '%i %s' ),\n\t\t\tpostId.length,\n\t\t\tlabels?.name\n\t\t);\n\t} else if ( postTitle ) {\n\t\ttitle = stripHTML( postTitle );\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 1 } className=\"editor-post-card-panel\">\n\t\t\t<HStack\n\t\t\t\tspacing={ 2 }\n\t\t\t\tclassName=\"editor-post-card-panel__header\"\n\t\t\t\talign=\"flex-start\"\n\t\t\t>\n\t\t\t\t<Icon className=\"editor-post-card-panel__icon\" icon={ icon } />\n\t\t\t\t<Text\n\t\t\t\t\tnumberOfLines={ 2 }\n\t\t\t\t\ttruncate\n\t\t\t\t\tclassName=\"editor-post-card-panel__title\"\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"editor-post-card-panel__title-name\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t{ pageTypeBadge && postIds.length === 1 && (\n\t\t\t\t\t\t<Badge>{ pageTypeBadge }</Badge>\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t\t<PostActions\n\t\t\t\t\tpostType={ postType }\n\t\t\t\t\tpostId={ postId }\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t\t{ postIds.length > 1 && (\n\t\t\t\t<Text className=\"editor-post-card-panel__description\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t// translators: %s: Name of the plural post type e.g: \"Posts\".\n\t\t\t\t\t\t__( 'Changes will be applied to all selected %s.' ),\n\t\t\t\t\t\tlabels?.name.toLowerCase()\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\n\n// Taken from packages/editor/src/components/time-to-read/index.js.\nconst AVERAGE_READING_RATE = 189;\n\n// This component renders the wordcount and reading time for the post.\nexport default function PostContentInformation() {\n\tconst { postContent } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType, getCurrentPostId } =\n\t\t\tselect( editorStore );\n\t\tconst { canUser } = select( coreStore );\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\tconst postType = getCurrentPostType();\n\t\tconst _id = getCurrentPostId();\n\t\tconst isPostsPage = +_id === siteSettings?.page_for_posts;\n\t\tconst showPostContentInfo =\n\t\t\t! isPostsPage &&\n\t\t\t! [ TEMPLATE_POST_TYPE, TEMPLATE_PART_POST_TYPE ].includes(\n\t\t\t\tpostType\n\t\t\t);\n\t\treturn {\n\t\t\tpostContent:\n\t\t\t\tshowPostContentInfo && getEditedPostAttribute( 'content' ),\n\t\t};\n\t}, [] );\n\n\t/*\n\t * translators: If your word count is based on single characters (e.g. East Asian characters),\n\t * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.\n\t * Do not translate into your own language.\n\t */\n\tconst wordCountType = _x( 'words', 'Word count type. Do not translate!' );\n\tconst wordsCounted = useMemo(\n\t\t() => ( postContent ? wordCount( postContent, wordCountType ) : 0 ),\n\t\t[ postContent, wordCountType ]\n\t);\n\tif ( ! wordsCounted ) {\n\t\treturn null;\n\t}\n\tconst readingTime = Math.round( wordsCounted / AVERAGE_READING_RATE );\n\tconst wordsCountText = sprintf(\n\t\t// translators: %s: the number of words in the post.\n\t\t_n( '%s word', '%s words', wordsCounted ),\n\t\twordsCounted.toLocaleString()\n\t);\n\tconst minutesText =\n\t\treadingTime <= 1\n\t\t\t? __( '1 minute' )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: %s: the number of minutes to read the post. */\n\t\t\t\t\t_n( '%s minute', '%s minutes', readingTime ),\n\t\t\t\t\treadingTime.toLocaleString()\n\t\t\t );\n\treturn (\n\t\t<div className=\"editor-post-content-information\">\n\t\t\t<Text>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t/* translators: 1: How many words a post has. 2: the number of minutes to read the post (e.g. 130 words, 2 minutes read time.) */\n\t\t\t\t\t__( '%1$s, %2$s read time.' ),\n\t\t\t\t\twordsCountText,\n\t\t\t\t\tminutesText\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { default as PostFormatForm, POST_FORMATS } from './';\nimport PostFormatCheck from './check';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\n/**\n * Renders the Post Author Panel component.\n *\n * @return {React.ReactNode} The rendered component.\n */\nfunction PostFormat() {\n\tconst { postFormat } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute } = select( editorStore );\n\t\tconst _postFormat = getEditedPostAttribute( 'format' );\n\t\treturn {\n\t\t\tpostFormat: _postFormat ?? 'standard',\n\t\t};\n\t}, [] );\n\tconst activeFormat = POST_FORMATS.find(\n\t\t( format ) => format.id === postFormat\n\t);\n\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\treturn (\n\t\t<PostFormatCheck>\n\t\t\t<PostPanelRow label={ __( 'Format' ) } ref={ setPopoverAnchor }>\n\t\t\t\t<Dropdown\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\tcontentClassName=\"editor-post-format__dialog\"\n\t\t\t\t\tfocusOnMount\n\t\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Current post format.\n\t\t\t\t\t\t\t\t__( 'Change format: %s' ),\n\t\t\t\t\t\t\t\tactiveFormat?.caption\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ activeFormat?.caption }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t\t<div className=\"editor-post-format__dialog-content\">\n\t\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\t\ttitle={ __( 'Format' ) }\n\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFormatForm />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</PostPanelRow>\n\t\t</PostFormatCheck>\n\t);\n}\n\nexport default PostFormat;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\n\nexport default function PostLastEditedPanel() {\n\tconst modified = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditedPostAttribute( 'modified' ),\n\t\t[]\n\t);\n\tconst lastEditedText =\n\t\tmodified &&\n\t\tsprintf(\n\t\t\t// translators: %s: Human-readable time difference, e.g. \"2 days ago\".\n\t\t\t__( 'Last edited %s.' ),\n\t\t\thumanTimeDiff( modified )\n\t\t);\n\tif ( ! lastEditedText ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<div className=\"editor-post-last-edited-panel\">\n\t\t\t<Text>{ lastEditedText }</Text>\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\n\nfunction PostPanelSection( { className, children } ) {\n\treturn (\n\t\t<VStack className={ clsx( 'editor-post-panel__section', className ) }>\n\t\t\t{ children }\n\t\t</VStack>\n\t);\n}\n\nexport default PostPanelSection;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { debounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalInputControl as InputControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nconst EMPTY_OBJECT = {};\n\nexport default function BlogTitle() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPageTitle, postsPageId, isTemplate, postSlug } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, getEditedEntityRecord, canUser } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\t\t\tconst _postsPageRecord = siteSettings?.page_for_posts\n\t\t\t\t? getEditedEntityRecord(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t'page',\n\t\t\t\t\t\tsiteSettings?.page_for_posts\n\t\t\t\t )\n\t\t\t\t: EMPTY_OBJECT;\n\t\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tpostsPageId: _postsPageRecord?.id,\n\t\t\t\tpostsPageTitle: _postsPageRecord?.title,\n\t\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif (\n\t\t! isTemplate ||\n\t\t! [ 'home', 'index' ].includes( postSlug ) ||\n\t\t! postsPageId\n\t) {\n\t\treturn null;\n\t}\n\n\tconst setPostsPageTitle = ( newValue ) => {\n\t\teditEntityRecord( 'postType', 'page', postsPageId, {\n\t\t\ttitle: newValue,\n\t\t} );\n\t};\n\tconst decodedTitle = decodeEntities( postsPageTitle );\n\treturn (\n\t\t<PostPanelRow label={ __( 'Blog title' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-blog-title-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t// translators: %s: Current post link.\n\t\t\t\t\t\t\t__( 'Change blog title: %s' ),\n\t\t\t\t\t\t\tdecodedTitle\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ decodedTitle }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Blog title' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tvalue={ postsPageTitle }\n\t\t\t\t\t\t\tonChange={ debounce( setPostsPageTitle, 300 ) }\n\t\t\t\t\t\t\tlabel={ __( 'Blog title' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the Posts Page title. Appears in search results, and when the page is shared on social media.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\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</PostPanelRow>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\t__experimentalNumberControl as NumberControl,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\nimport PostPanelRow from '../post-panel-row';\n\nexport default function PostsPerPage() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { postsPerPage, isTemplate, postSlug } = useSelect( ( select ) => {\n\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\tselect( editorStore );\n\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\tconst siteSettings = canUser( 'read', {\n\t\t\tkind: 'root',\n\t\t\tname: 'site',\n\t\t} )\n\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t: undefined;\n\t\treturn {\n\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\tpostsPerPage: siteSettings?.posts_per_page || 1,\n\t\t};\n\t}, [] );\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setPostsPerPage = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tposts_per_page: newValue,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Posts per page' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-posts-per-page-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change posts per page' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ postsPerPage }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NumberControl\n\t\t\t\t\t\t\tplaceholder={ 0 }\n\t\t\t\t\t\t\tvalue={ postsPerPage }\n\t\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t\tspinControls=\"custom\"\n\t\t\t\t\t\t\tstep=\"1\"\n\t\t\t\t\t\t\tmin=\"1\"\n\t\t\t\t\t\t\tonChange={ setPostsPerPage }\n\t\t\t\t\t\t\tlabel={ __( 'Posts per page' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Set the default number of posts to display on blog pages, including categories and tags. Some templates may override this setting.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\thideLabelFromVision\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</PostPanelRow>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tButton,\n\tDropdown,\n\tRadioControl,\n\t__experimentalVStack as VStack,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\nimport { __experimentalInspectorPopoverHeader as InspectorPopoverHeader } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport PostPanelRow from '../post-panel-row';\nimport { store as editorStore } from '../../store';\n\nconst COMMENT_OPTIONS = [\n\t{\n\t\tlabel: _x( 'Open', 'Adjective: e.g. \"Comments are open\"' ),\n\t\tvalue: 'open',\n\t\tdescription: __( 'Visitors can add new comments and replies.' ),\n\t},\n\t{\n\t\tlabel: __( 'Closed' ),\n\t\tvalue: '',\n\t\tdescription: [\n\t\t\t__( 'Visitors cannot add new comments or replies.' ),\n\t\t\t__( 'Existing comments remain visible.' ),\n\t\t].join( ' ' ),\n\t},\n];\n\nexport default function SiteDiscussion() {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst { allowCommentsOnNewPosts, isTemplate, postSlug } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostAttribute, getCurrentPostType } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst { getEditedEntityRecord, canUser } = select( coreStore );\n\t\t\tconst siteSettings = canUser( 'read', {\n\t\t\t\tkind: 'root',\n\t\t\t\tname: 'site',\n\t\t\t} )\n\t\t\t\t? getEditedEntityRecord( 'root', 'site' )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisTemplate: getCurrentPostType() === TEMPLATE_POST_TYPE,\n\t\t\t\tpostSlug: getEditedPostAttribute( 'slug' ),\n\t\t\t\tallowCommentsOnNewPosts:\n\t\t\t\t\tsiteSettings?.default_comment_status || '',\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\t// Use internal state instead of a ref to make sure that the component\n\t// re-renders when the popover's anchor updates.\n\tconst [ popoverAnchor, setPopoverAnchor ] = useState( null );\n\t// Memoize popoverProps to avoid returning a new object every time.\n\tconst popoverProps = useMemo(\n\t\t() => ( {\n\t\t\t// Anchor the popover to the middle of the entire row so that it doesn't\n\t\t\t// move around when the label changes.\n\t\t\tanchor: popoverAnchor,\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t} ),\n\t\t[ popoverAnchor ]\n\t);\n\n\tif ( ! isTemplate || ! [ 'home', 'index' ].includes( postSlug ) ) {\n\t\treturn null;\n\t}\n\tconst setAllowCommentsOnNewPosts = ( newValue ) => {\n\t\teditEntityRecord( 'root', 'site', undefined, {\n\t\t\tdefault_comment_status: newValue ? 'open' : null,\n\t\t} );\n\t};\n\treturn (\n\t\t<PostPanelRow label={ __( 'Discussion' ) } ref={ setPopoverAnchor }>\n\t\t\t<Dropdown\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\tcontentClassName=\"editor-site-discussion-dropdown__content\"\n\t\t\t\tfocusOnMount\n\t\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\taria-label={ __( 'Change discussion settings' ) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ allowCommentsOnNewPosts\n\t\t\t\t\t\t\t? __( 'Comments open' )\n\t\t\t\t\t\t\t: __( 'Comments closed' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<InspectorPopoverHeader\n\t\t\t\t\t\t\ttitle={ __( 'Discussion' ) }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Changes will apply to new posts only. Individual posts may override these settings.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\t\tclassName=\"editor-site-discussion__options\"\n\t\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\t\tlabel={ __( 'Comment status' ) }\n\t\t\t\t\t\t\t\toptions={ COMMENT_OPTIONS }\n\t\t\t\t\t\t\t\tonChange={ setAllowCommentsOnNewPosts }\n\t\t\t\t\t\t\t\tselected={ allowCommentsOnNewPosts }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t/>\n\t\t</PostPanelRow>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport PluginPostStatusInfo from '../plugin-post-status-info';\nimport PostAuthorPanel from '../post-author/panel';\nimport PostCardPanel from '../post-card-panel';\nimport PostContentInformation from '../post-content-information';\nimport PageAttributesPanel from '../page-attributes/panel';\nimport PostDiscussionPanel from '../post-discussion/panel';\nimport { PrivatePostExcerptPanel as PostExcerptPanel } from '../post-excerpt/panel';\nimport PostFeaturedImagePanel from '../post-featured-image/panel';\nimport PostFormatPanel from '../post-format/panel';\nimport PostLastEditedPanel from '../post-last-edited-panel';\nimport PostPanelSection from '../post-panel-section';\nimport PostSchedulePanel from '../post-schedule/panel';\nimport PostStatusPanel from '../post-status';\nimport PostSyncStatus from '../post-sync-status';\nimport PostTemplatePanel from '../post-template/panel';\nimport PostURLPanel from '../post-url/panel';\nimport BlogTitle from '../blog-title';\nimport PostsPerPage from '../posts-per-page';\nimport SiteDiscussion from '../site-discussion';\nimport { store as editorStore } from '../../store';\nimport { PrivatePostLastRevision } from '../post-last-revision';\nimport PostTrash from '../post-trash';\n\n/**\n * Module Constants\n */\nconst PANEL_NAME = 'post-status';\n\nexport default function PostSummary( { onActionPerformed } ) {\n\tconst { isRemovedPostStatusPanel, postType, postId } = useSelect(\n\t\t( select ) => {\n\t\t\t// We use isEditorPanelRemoved to hide the panel if it was programmatically removed. We do\n\t\t\t// not use isEditorPanelEnabled since this panel should not be disabled through the UI.\n\t\t\tconst {\n\t\t\t\tisEditorPanelRemoved,\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetCurrentPostId,\n\t\t\t} = select( editorStore );\n\t\t\treturn {\n\t\t\t\tisRemovedPostStatusPanel: isEditorPanelRemoved( PANEL_NAME ),\n\t\t\t\tpostType: getCurrentPostType(),\n\t\t\t\tpostId: getCurrentPostId(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\treturn (\n\t\t<PostPanelSection className=\"editor-post-summary\">\n\t\t\t<PluginPostStatusInfo.Slot>\n\t\t\t\t{ ( fills ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<PostCardPanel\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tpostId={ postId }\n\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PostFeaturedImagePanel withPanelBody={ false } />\n\t\t\t\t\t\t\t<PostExcerptPanel />\n\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<PostContentInformation />\n\t\t\t\t\t\t\t\t<PostLastEditedPanel />\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t{ ! isRemovedPostStatusPanel && (\n\t\t\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t\t\t<PostStatusPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSchedulePanel />\n\t\t\t\t\t\t\t\t\t\t<PostURLPanel />\n\t\t\t\t\t\t\t\t\t\t<PostAuthorPanel />\n\t\t\t\t\t\t\t\t\t\t<PostTemplatePanel />\n\t\t\t\t\t\t\t\t\t\t<PostDiscussionPanel />\n\t\t\t\t\t\t\t\t\t\t<PrivatePostLastRevision />\n\t\t\t\t\t\t\t\t\t\t<PageAttributesPanel />\n\t\t\t\t\t\t\t\t\t\t<PostSyncStatus />\n\t\t\t\t\t\t\t\t\t\t<BlogTitle />\n\t\t\t\t\t\t\t\t\t\t<PostsPerPage />\n\t\t\t\t\t\t\t\t\t\t<SiteDiscussion />\n\t\t\t\t\t\t\t\t\t\t<PostFormatPanel />\n\t\t\t\t\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t\t<PostTrash\n\t\t\t\t\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</PluginPostStatusInfo.Slot>\n\t\t</PostPanelSection>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { parse } from '@wordpress/blocks';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { EXCLUDED_PATTERN_SOURCES, PATTERN_TYPES } =\n\tunlock( patternsPrivateApis );\n\nfunction injectThemeAttributeInBlockTemplateContent(\n\tblock,\n\tcurrentThemeStylesheet\n) {\n\tblock.innerBlocks = block.innerBlocks.map( ( innerBlock ) => {\n\t\treturn injectThemeAttributeInBlockTemplateContent(\n\t\t\tinnerBlock,\n\t\t\tcurrentThemeStylesheet\n\t\t);\n\t} );\n\n\tif (\n\t\tblock.name === 'core/template-part' &&\n\t\tblock.attributes.theme === undefined\n\t) {\n\t\tblock.attributes.theme = currentThemeStylesheet;\n\t}\n\treturn block;\n}\n\n/**\n * Filter all patterns and return only the ones that are compatible with the current template.\n *\n * @param {Array} patterns An array of patterns.\n * @param {Object} template The current template.\n * @return {Array} Array of patterns that are compatible with the current template.\n */\nfunction filterPatterns( patterns, template ) {\n\t// Filter out duplicates.\n\tconst filterOutDuplicatesByName = ( currentItem, index, items ) =>\n\t\tindex === items.findIndex( ( item ) => currentItem.name === item.name );\n\n\t// Filter out core/directory patterns not included in theme.json.\n\tconst filterOutExcludedPatternSources = ( pattern ) =>\n\t\t! EXCLUDED_PATTERN_SOURCES.includes( pattern.source );\n\n\t// Looks for patterns that have the same template type as the current template,\n\t// or have a block type that matches the current template area.\n\tconst filterCompatiblePatterns = ( pattern ) =>\n\t\tpattern.templateTypes?.includes( template.slug ) ||\n\t\tpattern.blockTypes?.includes( 'core/template-part/' + template.area );\n\n\treturn patterns.filter( ( pattern, index, items ) => {\n\t\treturn (\n\t\t\tfilterOutDuplicatesByName( pattern, index, items ) &&\n\t\t\tfilterOutExcludedPatternSources( pattern ) &&\n\t\t\tfilterCompatiblePatterns( pattern )\n\t\t);\n\t} );\n}\n\nfunction preparePatterns( patterns, currentThemeStylesheet ) {\n\treturn patterns.map( ( pattern ) => ( {\n\t\t...pattern,\n\t\tkeywords: pattern.keywords || [],\n\t\ttype: PATTERN_TYPES.theme,\n\t\tblocks: parse( pattern.content, {\n\t\t\t__unstableSkipMigrationLogs: true,\n\t\t} ).map( ( block ) =>\n\t\t\tinjectThemeAttributeInBlockTemplateContent(\n\t\t\t\tblock,\n\t\t\t\tcurrentThemeStylesheet\n\t\t\t)\n\t\t),\n\t} ) );\n}\n\nexport function useAvailablePatterns( template ) {\n\tconst { blockPatterns, restBlockPatterns, currentThemeStylesheet } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst settings = getEditorSettings();\n\n\t\t\treturn {\n\t\t\t\tblockPatterns:\n\t\t\t\t\tsettings.__experimentalAdditionalBlockPatterns ??\n\t\t\t\t\tsettings.__experimentalBlockPatterns,\n\t\t\t\trestBlockPatterns: select( coreStore ).getBlockPatterns(),\n\t\t\t\tcurrentThemeStylesheet:\n\t\t\t\t\tselect( coreStore ).getCurrentTheme().stylesheet,\n\t\t\t};\n\t\t}, [] );\n\n\treturn useMemo( () => {\n\t\tconst mergedPatterns = [\n\t\t\t...( blockPatterns || [] ),\n\t\t\t...( restBlockPatterns || [] ),\n\t\t];\n\t\tconst filteredPatterns = filterPatterns( mergedPatterns, template );\n\t\treturn preparePatterns(\n\t\t\tfilteredPatterns,\n\t\t\ttemplate,\n\t\t\tcurrentThemeStylesheet\n\t\t);\n\t}, [ blockPatterns, restBlockPatterns, template, currentThemeStylesheet ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalBlockPatternsList as BlockPatternsList } from '@wordpress/block-editor';\nimport { serialize } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { useAvailablePatterns } from './hooks';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../store/constants';\n\nfunction TemplatesList( { availableTemplates, onSelect } ) {\n\tif ( ! availableTemplates || availableTemplates?.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPatternsList\n\t\t\tlabel={ __( 'Templates' ) }\n\t\t\tblockPatterns={ availableTemplates }\n\t\t\tonClickPattern={ onSelect }\n\t\t\tshowTitlesAsTooltip\n\t\t/>\n\t);\n}\n\nfunction PostTransform() {\n\tconst { record, postType, postId } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType, getCurrentPostId } = select( editorStore );\n\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\tconst type = getCurrentPostType();\n\t\tconst id = getCurrentPostId();\n\t\treturn {\n\t\t\tpostType: type,\n\t\t\tpostId: id,\n\t\t\trecord: getEditedEntityRecord( 'postType', type, id ),\n\t\t};\n\t}, [] );\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst availablePatterns = useAvailablePatterns( record );\n\tconst onTemplateSelect = async ( selectedTemplate ) => {\n\t\tawait editEntityRecord( 'postType', postType, postId, {\n\t\t\tblocks: selectedTemplate.blocks,\n\t\t\tcontent: serialize( selectedTemplate.blocks ),\n\t\t} );\n\t};\n\tif ( ! availablePatterns?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tinitialOpen={ record.type === TEMPLATE_PART_POST_TYPE }\n\t\t>\n\t\t\t<TemplatesList\n\t\t\t\tavailableTemplates={ availablePatterns }\n\t\t\t\tonSelect={ onTemplateSelect }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n\nexport default function PostTransformPanel() {\n\tconst { postType } = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn {\n\t\t\tpostType: getCurrentPostType(),\n\t\t};\n\t}, [] );\n\n\tif (\n\t\t! [ TEMPLATE_PART_POST_TYPE, TEMPLATE_POST_TYPE ].includes( postType )\n\t) {\n\t\treturn null;\n\t}\n\n\treturn <PostTransform />;\n}\n","export const sidebars = {\n\tdocument: 'edit-post/document',\n\tblock: 'edit-post/block',\n};\n","/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { sidebars } from './constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SidebarHeader = ( _, ref ) => {\n\tconst { documentLabel } = useSelect( ( select ) => {\n\t\tconst { getPostTypeLabel } = select( editorStore );\n\n\t\treturn {\n\t\t\tdocumentLabel:\n\t\t\t\t// translators: Default label for the Document sidebar tab, not selected.\n\t\t\t\tgetPostTypeLabel() || _x( 'Document', 'noun, sidebar' ),\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Tabs.TabList ref={ ref }>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.document }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.document }\n\t\t\t>\n\t\t\t\t{ documentLabel }\n\t\t\t</Tabs.Tab>\n\t\t\t<Tabs.Tab\n\t\t\t\ttabId={ sidebars.block }\n\t\t\t\t// Used for focus management in the SettingsSidebar component.\n\t\t\t\tdata-tab-id={ sidebars.block }\n\t\t\t>\n\t\t\t\t{ /* translators: Text label for the Block Settings Sidebar tab. */ }\n\t\t\t\t{ __( 'Block' ) }\n\t\t\t</Tabs.Tab>\n\t\t</Tabs.TabList>\n\t);\n};\n\nexport default forwardRef( SidebarHeader );\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as interfaceStore } from '@wordpress/interface';\nimport { applyFilters } from '@wordpress/hooks';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\nconst { BlockQuickNavigation } = unlock( blockEditorPrivateApis );\n\nconst POST_CONTENT_BLOCK_TYPES = [\n\t'core/post-title',\n\t'core/post-featured-image',\n\t'core/post-content',\n];\n\nconst TEMPLATE_PART_BLOCK = 'core/template-part';\n\nexport default function TemplateContentPanel() {\n\tconst postContentBlockTypes = useMemo(\n\t\t() =>\n\t\t\tapplyFilters(\n\t\t\t\t'editor.postContentBlockTypes',\n\t\t\t\tPOST_CONTENT_BLOCK_TYPES\n\t\t\t),\n\t\t[]\n\t);\n\n\tconst { clientIds, postType, renderingMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetCurrentPostType,\n\t\t\t\tgetPostBlocksByName,\n\t\t\t\tgetRenderingMode,\n\t\t\t} = unlock( select( editorStore ) );\n\t\t\tconst _postType = getCurrentPostType();\n\t\t\treturn {\n\t\t\t\tpostType: _postType,\n\t\t\t\tclientIds: getPostBlocksByName(\n\t\t\t\t\tTEMPLATE_POST_TYPE === _postType\n\t\t\t\t\t\t? TEMPLATE_PART_BLOCK\n\t\t\t\t\t\t: postContentBlockTypes\n\t\t\t\t),\n\t\t\t\trenderingMode: getRenderingMode(),\n\t\t\t};\n\t\t},\n\t\t[ postContentBlockTypes ]\n\t);\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tif (\n\t\t( renderingMode === 'post-only' && postType !== TEMPLATE_POST_TYPE ) ||\n\t\tclientIds.length === 0\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t<BlockQuickNavigation\n\t\t\t\tclientIds={ clientIds }\n\t\t\t\tonSelect={ () => {\n\t\t\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</PanelBody>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { PanelBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../../store/constants';\nimport { store as editorStore } from '../../store';\n\nconst { BlockQuickNavigation } = unlock( blockEditorPrivateApis );\n\nfunction TemplatePartContentPanelInner() {\n\tconst blockTypes = useSelect( ( select ) => {\n\t\tconst { getBlockTypes } = select( blocksStore );\n\t\treturn getBlockTypes();\n\t}, [] );\n\tconst themeBlockNames = useMemo( () => {\n\t\treturn blockTypes\n\t\t\t.filter( ( blockType ) => {\n\t\t\t\treturn blockType.category === 'theme';\n\t\t\t} )\n\t\t\t.map( ( { name } ) => name );\n\t}, [ blockTypes ] );\n\tconst themeBlocks = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlocksByName } = select( blockEditorStore );\n\t\t\treturn getBlocksByName( themeBlockNames );\n\t\t},\n\t\t[ themeBlockNames ]\n\t);\n\tif ( themeBlocks.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<PanelBody title={ __( 'Content' ) }>\n\t\t\t<BlockQuickNavigation clientIds={ themeBlocks } />\n\t\t</PanelBody>\n\t);\n}\n\nexport default function TemplatePartContentPanel() {\n\tconst postType = useSelect( ( select ) => {\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn getCurrentPostType();\n\t}, [] );\n\tif ( postType !== TEMPLATE_PART_POST_TYPE ) {\n\t\treturn null;\n\t}\n\n\treturn <TemplatePartContentPanelInner />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * This listener hook monitors for block selection and triggers the appropriate\n * sidebar state.\n */\nfunction useAutoSwitchEditorSidebars() {\n\tconst { hasBlockSelection } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\thasBlockSelection:\n\t\t\t\t!! select( blockEditorStore ).getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\tconst { getActiveComplementaryArea } = useSelect( interfaceStore );\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\tconst { get: getPreference } = useSelect( preferencesStore );\n\n\tuseEffect( () => {\n\t\tconst activeGeneralSidebar = getActiveComplementaryArea( 'core' );\n\t\tconst isEditorSidebarOpened = [\n\t\t\t'edit-post/document',\n\t\t\t'edit-post/block',\n\t\t].includes( activeGeneralSidebar );\n\t\tconst isDistractionFree = getPreference( 'core', 'distractionFree' );\n\t\tif ( ! isEditorSidebarOpened || isDistractionFree ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( hasBlockSelection ) {\n\t\t\tenableComplementaryArea( 'core', 'edit-post/block' );\n\t\t} else {\n\t\t\tenableComplementaryArea( 'core', 'edit-post/document' );\n\t\t}\n\t}, [\n\t\thasBlockSelection,\n\t\tgetActiveComplementaryArea,\n\t\tenableComplementaryArea,\n\t\tgetPreference,\n\t] );\n}\n\nexport default useAutoSwitchEditorSidebars;\n","/**\n * WordPress dependencies\n */\nimport {\n\tBlockInspector,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tPlatform,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n} from '@wordpress/element';\nimport { isRTL, __, _x } from '@wordpress/i18n';\nimport { drawerLeft, drawerRight } from '@wordpress/icons';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport PatternOverridesPanel from '../pattern-overrides-panel';\nimport PluginDocumentSettingPanel from '../plugin-document-setting-panel';\nimport PluginSidebar from '../plugin-sidebar';\nimport PostSummary from './post-summary';\nimport PostTaxonomiesPanel from '../post-taxonomies/panel';\nimport PostTransformPanel from '../post-transform-panel';\nimport SidebarHeader from './header';\nimport TemplateContentPanel from '../template-content-panel';\nimport TemplatePartContentPanel from '../template-part-content-panel';\nimport useAutoSwitchEditorSidebars from '../provider/use-auto-switch-editor-sidebars';\nimport { sidebars } from './constants';\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../store/constants';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst SIDEBAR_ACTIVE_BY_DEFAULT = Platform.select( {\n\tweb: true,\n\tnative: false,\n} );\n\nconst SidebarContent = ( {\n\ttabName,\n\tkeyboardShortcut,\n\tonActionPerformed,\n\textraPanels,\n} ) => {\n\tconst tabListRef = useRef( null );\n\t// Because `PluginSidebar` renders a `ComplementaryArea`, we\n\t// need to forward the `Tabs` context so it can be passed through the\n\t// underlying slot/fill.\n\tconst tabsContextValue = useContext( Tabs.Context );\n\n\t// This effect addresses a race condition caused by tabbing from the last\n\t// block in the editor into the settings sidebar. Without this effect, the\n\t// selected tab and browser focus can become separated in an unexpected way\n\t// (e.g the \"block\" tab is focused, but the \"post\" tab is selected).\n\tuseEffect( () => {\n\t\tconst tabsElements = Array.from(\n\t\t\ttabListRef.current?.querySelectorAll( '[role=\"tab\"]' ) || []\n\t\t);\n\t\tconst selectedTabElement = tabsElements.find(\n\t\t\t// We are purposefully using a custom `data-tab-id` attribute here\n\t\t\t// because we don't want rely on any assumptions about `Tabs`\n\t\t\t// component internals.\n\t\t\t( element ) => element.getAttribute( 'data-tab-id' ) === tabName\n\t\t);\n\t\tconst activeElement = selectedTabElement?.ownerDocument.activeElement;\n\t\tconst tabsHasFocus = tabsElements.some( ( element ) => {\n\t\t\treturn activeElement && activeElement.id === element.id;\n\t\t} );\n\t\tif (\n\t\t\ttabsHasFocus &&\n\t\t\tselectedTabElement &&\n\t\t\tselectedTabElement.id !== activeElement?.id\n\t\t) {\n\t\t\tselectedTabElement?.focus();\n\t\t}\n\t}, [ tabName ] );\n\n\treturn (\n\t\t<PluginSidebar\n\t\t\tidentifier={ tabName }\n\t\t\theader={\n\t\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t\t<SidebarHeader ref={ tabListRef } />\n\t\t\t\t</Tabs.Context.Provider>\n\t\t\t}\n\t\t\tcloseLabel={ __( 'Close Settings' ) }\n\t\t\t// This classname is added so we can apply a corrective negative\n\t\t\t// margin to the panel.\n\t\t\t// see https://github.com/WordPress/gutenberg/pull/55360#pullrequestreview-1737671049\n\t\t\tclassName=\"editor-sidebar__panel\"\n\t\t\theaderClassName=\"editor-sidebar__panel-tabs\"\n\t\t\ttitle={\n\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t_x( 'Settings', 'sidebar button label' )\n\t\t\t}\n\t\t\ttoggleShortcut={ keyboardShortcut }\n\t\t\ticon={ isRTL() ? drawerLeft : drawerRight }\n\t\t\tisActiveByDefault={ SIDEBAR_ACTIVE_BY_DEFAULT }\n\t\t>\n\t\t\t<Tabs.Context.Provider value={ tabsContextValue }>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.document } focusable={ false }>\n\t\t\t\t\t<PostSummary onActionPerformed={ onActionPerformed } />\n\t\t\t\t\t<PluginDocumentSettingPanel.Slot />\n\t\t\t\t\t<TemplateContentPanel />\n\t\t\t\t\t<TemplatePartContentPanel />\n\t\t\t\t\t<PostTransformPanel />\n\t\t\t\t\t<PostTaxonomiesPanel />\n\t\t\t\t\t<PatternOverridesPanel />\n\t\t\t\t\t{ extraPanels }\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId={ sidebars.block } focusable={ false }>\n\t\t\t\t\t<BlockInspector />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs.Context.Provider>\n\t\t</PluginSidebar>\n\t);\n};\n\nconst Sidebar = ( { extraPanels, onActionPerformed } ) => {\n\tuseAutoSwitchEditorSidebars();\n\tconst { tabName, keyboardShortcut, showSummary } = useSelect(\n\t\t( select ) => {\n\t\t\tconst shortcut = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t).getShortcutRepresentation( 'core/editor/toggle-sidebar' );\n\n\t\t\tconst sidebar =\n\t\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\t\t\tconst _isEditorSidebarOpened = [\n\t\t\t\tsidebars.block,\n\t\t\t\tsidebars.document,\n\t\t\t].includes( sidebar );\n\t\t\tlet _tabName = sidebar;\n\t\t\tif ( ! _isEditorSidebarOpened ) {\n\t\t\t\t_tabName = !! select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).getBlockSelectionStart()\n\t\t\t\t\t? sidebars.block\n\t\t\t\t\t: sidebars.document;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\ttabName: _tabName,\n\t\t\t\tkeyboardShortcut: shortcut,\n\t\t\t\tshowSummary: ! [\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t\t\tNAVIGATION_POST_TYPE,\n\t\t\t\t].includes( select( editorStore ).getCurrentPostType() ),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { enableComplementaryArea } = useDispatch( interfaceStore );\n\n\tconst onTabSelect = useCallback(\n\t\t( newSelectedTabId ) => {\n\t\t\tif ( !! newSelectedTabId ) {\n\t\t\t\tenableComplementaryArea( 'core', newSelectedTabId );\n\t\t\t}\n\t\t},\n\t\t[ enableComplementaryArea ]\n\t);\n\n\treturn (\n\t\t<Tabs\n\t\t\tselectedTabId={ tabName }\n\t\t\tonSelect={ onTabSelect }\n\t\t\tselectOnMove={ false }\n\t\t>\n\t\t\t<SidebarContent\n\t\t\t\ttabName={ tabName }\n\t\t\t\tkeyboardShortcut={ keyboardShortcut }\n\t\t\t\tshowSummary={ showSummary }\n\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\textraPanels={ extraPanels }\n\t\t\t/>\n\t\t</Tabs>\n\t);\n};\n\nexport default Sidebar;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { privateApis as preferencesPrivateApis } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\nconst { PreferenceBaseOption } = unlock( preferencesPrivateApis );\n\nexport default function EnablePublishSidebarOption( props ) {\n\tconst isChecked = useSelect( ( select ) => {\n\t\treturn select( editorStore ).isPublishSidebarEnabled();\n\t}, [] );\n\tconst { enablePublishSidebar, disablePublishSidebar } =\n\t\tuseDispatch( editorStore );\n\n\treturn (\n\t\t<PreferenceBaseOption\n\t\t\tisChecked={ isChecked }\n\t\t\tonChange={ ( isEnabled ) =>\n\t\t\t\tisEnabled ? enablePublishSidebar() : disablePublishSidebar()\n\t\t\t}\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { BlockManager } = unlock( blockEditorPrivateApis );\n\nexport default function BlockVisibility() {\n\tconst { showBlockTypes, hideBlockTypes } = unlock(\n\t\tuseDispatch( editorStore )\n\t);\n\n\tconst {\n\t\tblockTypes,\n\t\tallowedBlockTypes: _allowedBlockTypes,\n\t\thiddenBlockTypes: _hiddenBlockTypes,\n\t} = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tblockTypes: select( blocksStore ).getBlockTypes(),\n\t\t\tallowedBlockTypes:\n\t\t\t\tselect( editorStore ).getEditorSettings().allowedBlockTypes,\n\t\t\thiddenBlockTypes:\n\t\t\t\tselect( preferencesStore ).get( 'core', 'hiddenBlockTypes' ) ??\n\t\t\t\t[],\n\t\t};\n\t}, [] );\n\n\tconst allowedBlockTypes = useMemo( () => {\n\t\tif ( _allowedBlockTypes === true ) {\n\t\t\treturn blockTypes;\n\t\t}\n\t\treturn blockTypes.filter( ( { name } ) => {\n\t\t\treturn _allowedBlockTypes?.includes( name );\n\t\t} );\n\t}, [ _allowedBlockTypes, blockTypes ] );\n\n\tconst filteredBlockTypes = allowedBlockTypes.filter(\n\t\t( blockType ) =>\n\t\t\thasBlockSupport( blockType, 'inserter', true ) &&\n\t\t\t( ! blockType.parent ||\n\t\t\t\tblockType.parent.includes( 'core/post-content' ) )\n\t);\n\n\t// Some hidden blocks become unregistered\n\t// by removing for instance the plugin that registered them, yet\n\t// they're still remain as hidden by the user's action.\n\t// We consider \"hidden\", blocks which were hidden and\n\t// are still registered.\n\tconst hiddenBlockTypes = _hiddenBlockTypes.filter( ( hiddenBlock ) => {\n\t\treturn filteredBlockTypes.some(\n\t\t\t( registeredBlock ) => registeredBlock.name === hiddenBlock\n\t\t);\n\t} );\n\n\tconst selectedBlockTypes = filteredBlockTypes.filter(\n\t\t( blockType ) => ! hiddenBlockTypes.includes( blockType.name )\n\t);\n\n\tconst onChangeSelectedBlockTypes = ( newSelectedBlockTypes ) => {\n\t\tif ( selectedBlockTypes.length > newSelectedBlockTypes.length ) {\n\t\t\tconst blockTypesToHide = selectedBlockTypes.filter(\n\t\t\t\t( blockType ) =>\n\t\t\t\t\t! newSelectedBlockTypes.find(\n\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t)\n\t\t\t);\n\t\t\thideBlockTypes( blockTypesToHide.map( ( { name } ) => name ) );\n\t\t} else if ( selectedBlockTypes.length < newSelectedBlockTypes.length ) {\n\t\t\tconst blockTypesToShow = newSelectedBlockTypes.filter(\n\t\t\t\t( blockType ) =>\n\t\t\t\t\t! selectedBlockTypes.find(\n\t\t\t\t\t\t( { name } ) => name === blockType.name\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tshowBlockTypes( blockTypesToShow.map( ( { name } ) => name ) );\n\t\t}\n\t};\n\n\treturn (\n\t\t<BlockManager\n\t\t\tblockTypes={ filteredBlockTypes }\n\t\t\tselectedBlockTypes={ selectedBlockTypes }\n\t\t\tonChange={ onChangeSelectedBlockTypes }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport {\n\tstore as preferencesStore,\n\tprivateApis as preferencesPrivateApis,\n} from '@wordpress/preferences';\nimport { store as interfaceStore } from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport EnablePanelOption from './enable-panel';\nimport EnablePluginDocumentSettingPanelOption from './enable-plugin-document-setting-panel';\nimport EnablePublishSidebarOption from './enable-publish-sidebar';\nimport BlockVisibility from './block-visibility';\nimport PostTaxonomies from '../post-taxonomies';\nimport PostFeaturedImageCheck from '../post-featured-image/check';\nimport PostExcerptCheck from '../post-excerpt/check';\nimport PageAttributesCheck from '../page-attributes/check';\nimport PostTypeSupportCheck from '../post-type-support-check';\nimport { store as editorStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tPreferencesModal,\n\tPreferencesModalTabs,\n\tPreferencesModalSection,\n\tPreferenceToggleControl,\n} = unlock( preferencesPrivateApis );\n\nexport default function EditorPreferencesModal( { extraSections = {} } ) {\n\tconst isActive = useSelect( ( select ) => {\n\t\treturn select( interfaceStore ).isModalActive( 'editor/preferences' );\n\t}, [] );\n\tconst { closeModal } = useDispatch( interfaceStore );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\t// Please wrap all contents inside PreferencesModalContents to prevent all\n\t// hooks from executing when the modal is not open.\n\treturn (\n\t\t<PreferencesModal closeModal={ closeModal }>\n\t\t\t<PreferencesModalContents extraSections={ extraSections } />\n\t\t</PreferencesModal>\n\t);\n}\n\nfunction PreferencesModalContents( { extraSections = {} } ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst showBlockBreadcrumbsOption = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditorSettings } = select( editorStore );\n\t\t\tconst { get } = select( preferencesStore );\n\t\t\tconst isRichEditingEnabled = getEditorSettings().richEditingEnabled;\n\t\t\tconst isDistractionFreeEnabled = get( 'core', 'distractionFree' );\n\t\t\treturn (\n\t\t\t\t! isDistractionFreeEnabled &&\n\t\t\t\tisLargeViewport &&\n\t\t\t\tisRichEditingEnabled\n\t\t\t);\n\t\t},\n\t\t[ isLargeViewport ]\n\t);\n\tconst { setIsListViewOpened, setIsInserterOpened } =\n\t\tuseDispatch( editorStore );\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst sections = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\tname: 'general',\n\t\t\t\t\ttabLabel: __( 'General' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showListViewByDefault\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Opens the List View sidebar by default.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Always open List View' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ showBlockBreadcrumbsOption && (\n\t\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\t\tfeatureName=\"showBlockBreadcrumbs\"\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Display the block hierarchy trail at the bottom of the editor.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Show block breadcrumbs' ) }\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<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"allowRightClickOverrides\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Allows contextual List View menus via right-click, overriding browser defaults.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Allow right-click contextual menus'\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<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"enableChoosePatternModal\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Shows starter patterns when creating a new page.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show starter patterns' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Document settings' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Select what settings are shown in the document panel.'\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\t<EnablePluginDocumentSettingPanelOption.Slot />\n\t\t\t\t\t\t\t\t<PostTaxonomies\n\t\t\t\t\t\t\t\t\ttaxonomyWrapper={ ( content, taxonomy ) => (\n\t\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\t\tlabel={ taxonomy.labels.menu_name }\n\t\t\t\t\t\t\t\t\t\t\tpanelName={ `taxonomy-panel-${ taxonomy.slug }` }\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<PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Featured image' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"featured-image\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostFeaturedImageCheck>\n\t\t\t\t\t\t\t\t<PostExcerptCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Excerpt' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"post-excerpt\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostExcerptCheck>\n\t\t\t\t\t\t\t\t<PostTypeSupportCheck\n\t\t\t\t\t\t\t\t\tsupportKeys={ [ 'comments', 'trackbacks' ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Discussion' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"discussion-panel\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PostTypeSupportCheck>\n\t\t\t\t\t\t\t\t<PageAttributesCheck>\n\t\t\t\t\t\t\t\t\t<EnablePanelOption\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Page attributes' ) }\n\t\t\t\t\t\t\t\t\t\tpanelName=\"page-attributes\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PageAttributesCheck>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t{ isLargeViewport && (\n\t\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\t\ttitle={ __( 'Publishing' ) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<EnablePublishSidebarOption\n\t\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Review settings, such as visibility and tags.'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Enable pre-publish checks'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ extraSections?.general }\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'appearance',\n\t\t\t\t\ttabLabel: __( 'Appearance' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\ttitle={ __( 'Appearance' ) }\n\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t'Customize the editor interface to suit your needs.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"fixedToolbar\"\n\t\t\t\t\t\t\t\tonToggle={ () =>\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'distractionFree',\n\t\t\t\t\t\t\t\t\t\tfalse\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\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Access all block and document tools in a single place.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Top toolbar' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"distractionFree\"\n\t\t\t\t\t\t\t\tonToggle={ () => {\n\t\t\t\t\t\t\t\t\tsetPreference(\n\t\t\t\t\t\t\t\t\t\t'core',\n\t\t\t\t\t\t\t\t\t\t'fixedToolbar',\n\t\t\t\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tsetIsInserterOpened( false );\n\t\t\t\t\t\t\t\t\tsetIsListViewOpened( false );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Reduce visual distractions by hiding the toolbar and other elements to focus on writing.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Distraction free' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\tfeatureName=\"focusMode\"\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Highlights the current block and fades other content.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tlabel={ __( 'Spotlight mode' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{ extraSections?.appearance }\n\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'accessibility',\n\t\t\t\t\ttabLabel: __( 'Accessibility' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Navigation' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Optimize the editing experience for enhanced control.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"keepCaretInsideBlock\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Keeps the text cursor within the block boundaries, aiding users with screen readers by preventing unintentional cursor movement outside the block.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t'Contain text cursor inside block'\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</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Interface' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"showIconLabels\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show button text labels' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Show text instead of icons on buttons across the interface.'\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</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tname: 'blocks',\n\t\t\t\t\ttabLabel: __( 'Blocks' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection title={ __( 'Inserter' ) }>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"mostUsedBlocks\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Adds a category with the most frequently used blocks in the inserter.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Show most used blocks' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'Manage block visibility' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t\"Disable blocks that you don't want to appear in the inserter. They can always be toggled back on later.\"\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\t<BlockVisibility />\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\twindow.__experimentalMediaProcessing && {\n\t\t\t\t\tname: 'media',\n\t\t\t\t\ttabLabel: __( 'Media' ),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<PreferencesModalSection\n\t\t\t\t\t\t\t\ttitle={ __( 'General' ) }\n\t\t\t\t\t\t\t\tdescription={ __(\n\t\t\t\t\t\t\t\t\t'Customize options related to the media upload flow.'\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\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"optimizeOnUpload\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Compress media items before uploading to the server.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Pre-upload compression' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<PreferenceToggleControl\n\t\t\t\t\t\t\t\t\tscope=\"core/media\"\n\t\t\t\t\t\t\t\t\tfeatureName=\"requireApproval\"\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Require approval step when optimizing existing media.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Approval step' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PreferencesModalSection>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[\n\t\t\tshowBlockBreadcrumbsOption,\n\t\t\textraSections,\n\t\t\tsetIsInserterOpened,\n\t\t\tsetIsListViewOpened,\n\t\t\tsetPreference,\n\t\t\tisLargeViewport,\n\t\t]\n\t);\n\n\treturn <PreferencesModalTabs sections={ sections } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useMemo } from '@wordpress/element';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport type { Field } from '@wordpress/dataviews';\nimport type { BasePostWithEmbeddedAuthor } from '@wordpress/fields';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editorStore } from '../../store';\n\ninterface UsePostFieldsReturn {\n\tisLoading: boolean;\n\tfields: Field< BasePostWithEmbeddedAuthor >[];\n}\n\ninterface Author {\n\tid: number;\n\tname: string;\n}\n\nfunction usePostFields( {\n\tpostType,\n}: {\n\tpostType: string;\n} ): UsePostFieldsReturn {\n\tconst { registerPostTypeSchema } = unlock( useDispatch( editorStore ) );\n\tuseEffect( () => {\n\t\tregisterPostTypeSchema( postType );\n\t}, [ registerPostTypeSchema, postType ] );\n\n\tconst { defaultFields } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityFields } = unlock( select( editorStore ) );\n\t\t\treturn {\n\t\t\t\tdefaultFields: getEntityFields( 'postType', postType ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst { records: authors, isResolving: isLoadingAuthors } =\n\t\tuseEntityRecords< Author >( 'root', 'user', { per_page: -1 } );\n\n\tconst fields = useMemo(\n\t\t() =>\n\t\t\tdefaultFields.map(\n\t\t\t\t( field: Field< BasePostWithEmbeddedAuthor > ) => {\n\t\t\t\t\tif ( field.id === 'author' ) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...field,\n\t\t\t\t\t\t\telements: authors?.map( ( { id, name } ) => ( {\n\t\t\t\t\t\t\t\tvalue: id,\n\t\t\t\t\t\t\t\tlabel: name,\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\treturn field;\n\t\t\t\t}\n\t\t\t) as Field< BasePostWithEmbeddedAuthor >[],\n\t\t[ authors, defaultFields ]\n\t);\n\n\treturn {\n\t\tisLoading: isLoadingAuthors,\n\t\tfields,\n\t};\n}\n\n/**\n * Hook to get the fields for a post (BasePost or BasePostWithEmbeddedAuthor).\n */\nexport default usePostFields;\n","/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\nconst CONTENT = 'content';\n\nexport default {\n\tname: 'core/pattern-overrides',\n\tgetValues( { select, clientId, context, bindings } ) {\n\t\tconst patternOverridesContent = context[ 'pattern/overrides' ];\n\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\n\t\tconst overridesValues = {};\n\t\tfor ( const attributeName of Object.keys( bindings ) ) {\n\t\t\tconst overridableValue =\n\t\t\t\tpatternOverridesContent?.[\n\t\t\t\t\tcurrentBlockAttributes?.metadata?.name\n\t\t\t\t]?.[ attributeName ];\n\n\t\t\t// If it has not been overridden, return the original value.\n\t\t\t// Check undefined because empty string is a valid value.\n\t\t\tif ( overridableValue === undefined ) {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\tcurrentBlockAttributes[ attributeName ];\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\toverridesValues[ attributeName ] =\n\t\t\t\t\toverridableValue === '' ? undefined : overridableValue;\n\t\t\t}\n\t\t}\n\t\treturn overridesValues;\n\t},\n\tsetValues( { select, dispatch, clientId, bindings } ) {\n\t\tconst { getBlockAttributes, getBlockParentsByBlockName, getBlocks } =\n\t\t\tselect( blockEditorStore );\n\t\tconst currentBlockAttributes = getBlockAttributes( clientId );\n\t\tconst blockName = currentBlockAttributes?.metadata?.name;\n\t\tif ( ! blockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [ patternClientId ] = getBlockParentsByBlockName(\n\t\t\tclientId,\n\t\t\t'core/block',\n\t\t\ttrue\n\t\t);\n\n\t\t// Extract the updated attributes from the source bindings.\n\t\tconst attributes = Object.entries( bindings ).reduce(\n\t\t\t( attrs, [ key, { newValue } ] ) => {\n\t\t\t\tattrs[ key ] = newValue;\n\t\t\t\treturn attrs;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\n\t\t// If there is no pattern client ID, sync blocks with the same name and same attributes.\n\t\tif ( ! patternClientId ) {\n\t\t\tconst syncBlocksWithSameName = ( blocks ) => {\n\t\t\t\tfor ( const block of blocks ) {\n\t\t\t\t\tif ( block.attributes?.metadata?.name === blockName ) {\n\t\t\t\t\t\tdispatch( blockEditorStore ).updateBlockAttributes(\n\t\t\t\t\t\t\tblock.clientId,\n\t\t\t\t\t\t\tattributes\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tsyncBlocksWithSameName( block.innerBlocks );\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tsyncBlocksWithSameName( getBlocks() );\n\t\t\treturn;\n\t\t}\n\t\tconst currentBindingValue =\n\t\t\tgetBlockAttributes( patternClientId )?.[ CONTENT ];\n\n\t\tdispatch( blockEditorStore ).updateBlockAttributes( patternClientId, {\n\t\t\t[ CONTENT ]: {\n\t\t\t\t...currentBindingValue,\n\t\t\t\t[ blockName ]: {\n\t\t\t\t\t...currentBindingValue?.[ blockName ],\n\t\t\t\t\t...Object.entries( attributes ).reduce(\n\t\t\t\t\t\t( acc, [ key, value ] ) => {\n\t\t\t\t\t\t\t// TODO: We need a way to represent `undefined` in the serialized overrides.\n\t\t\t\t\t\t\t// Also see: https://github.com/WordPress/gutenberg/pull/57249#discussion_r1452987871\n\t\t\t\t\t\t\t// We use an empty string to represent undefined for now until\n\t\t\t\t\t\t\t// we support a richer format for overrides and the block bindings API.\n\t\t\t\t\t\t\tacc[ key ] = value === undefined ? '' : value;\n\t\t\t\t\t\t\treturn acc;\n\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},\n\tcanUserEditValue: () => true,\n};\n","/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editorStore } from '../store';\nimport { unlock } from '../lock-unlock';\n\n/**\n * Gets a list of post meta fields with their values and labels\n * to be consumed in the needed callbacks.\n * If the value is not available based on context, like in templates,\n * it falls back to the default value, label, or key.\n *\n * @param {Object} select The select function from the data store.\n * @param {Object} context The context provided.\n * @return {Object} List of post meta fields with their value and label.\n *\n * @example\n * ```js\n * {\n * field_1_key: {\n * label: 'Field 1 Label',\n * value: 'Field 1 Value',\n * },\n * field_2_key: {\n * label: 'Field 2 Label',\n * value: 'Field 2 Value',\n * },\n * ...\n * }\n * ```\n */\nfunction getPostMetaFields( select, context ) {\n\tconst { getEditedEntityRecord } = select( coreDataStore );\n\tconst { getRegisteredPostMeta } = unlock( select( coreDataStore ) );\n\n\tlet entityMetaValues;\n\t// Try to get the current entity meta values.\n\tif ( context?.postType && context?.postId ) {\n\t\tentityMetaValues = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId\n\t\t).meta;\n\t}\n\n\tconst registeredFields = getRegisteredPostMeta( context?.postType );\n\tconst metaFields = {};\n\tObject.entries( registeredFields || {} ).forEach( ( [ key, props ] ) => {\n\t\t// Don't include footnotes or private fields.\n\t\tif ( key !== 'footnotes' && key.charAt( 0 ) !== '_' ) {\n\t\t\tmetaFields[ key ] = {\n\t\t\t\tlabel: props.title || key,\n\t\t\t\tvalue:\n\t\t\t\t\t// When using the entity value, an empty string IS a valid value.\n\t\t\t\t\tentityMetaValues?.[ key ] ??\n\t\t\t\t\t// When using the default, an empty string IS NOT a valid value.\n\t\t\t\t\t( props.default || undefined ),\n\t\t\t\ttype: props.type,\n\t\t\t};\n\t\t}\n\t} );\n\n\tif ( ! Object.keys( metaFields || {} ).length ) {\n\t\treturn null;\n\t}\n\n\treturn metaFields;\n}\n\nexport default {\n\tname: 'core/post-meta',\n\tgetValues( { select, context, bindings } ) {\n\t\tconst metaFields = getPostMetaFields( select, context );\n\n\t\tconst newValues = {};\n\t\tfor ( const [ attributeName, source ] of Object.entries( bindings ) ) {\n\t\t\t// Use the value, the field label, or the field key.\n\t\t\tconst fieldKey = source.args.key;\n\t\t\tconst { value: fieldValue, label: fieldLabel } =\n\t\t\t\tmetaFields?.[ fieldKey ] || {};\n\t\t\tnewValues[ attributeName ] = fieldValue ?? fieldLabel ?? fieldKey;\n\t\t}\n\t\treturn newValues;\n\t},\n\tsetValues( { dispatch, context, bindings } ) {\n\t\tconst newMeta = {};\n\t\tObject.values( bindings ).forEach( ( { args, newValue } ) => {\n\t\t\tnewMeta[ args.key ] = newValue;\n\t\t} );\n\n\t\tdispatch( coreDataStore ).editEntityRecord(\n\t\t\t'postType',\n\t\t\tcontext?.postType,\n\t\t\tcontext?.postId,\n\t\t\t{\n\t\t\t\tmeta: newMeta,\n\t\t\t}\n\t\t);\n\t},\n\tcanUserEditValue( { select, context, args } ) {\n\t\t// Lock editing in query loop.\n\t\tif ( context?.query || context?.queryId ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Lock editing when `postType` is not defined.\n\t\tif ( ! context?.postType ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst fieldValue = getPostMetaFields( select, context )?.[ args.key ]\n\t\t\t?.value;\n\t\t// Empty string or `false` could be a valid value, so we need to check if the field value is undefined.\n\t\tif ( fieldValue === undefined ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Check that custom fields metabox is not enabled.\n\t\tconst areCustomFieldsEnabled =\n\t\t\tselect( editorStore ).getEditorSettings().enableCustomFields;\n\t\tif ( areCustomFieldsEnabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check that the user has the capability to edit post meta.\n\t\tconst canUserEdit = select( coreDataStore ).canUser( 'update', {\n\t\t\tkind: 'postType',\n\t\t\tname: context?.postType,\n\t\t\tid: context?.postId,\n\t\t} );\n\t\tif ( ! canUserEdit ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t},\n\tgetFieldsList( { select, context } ) {\n\t\treturn getPostMetaFields( select, context );\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport * as interfaceApis from '@wordpress/interface';\n\n/**\n * Internal dependencies\n */\nimport { lock } from './lock-unlock';\nimport { EntitiesSavedStatesExtensible } from './components/entities-saved-states';\nimport EditorContentSlotFill from './components/editor-interface/content-slot-fill';\nimport BackButton from './components/header/back-button';\nimport Editor from './components/editor';\nimport PluginPostExcerpt from './components/post-excerpt/plugin';\nimport PostCardPanel from './components/post-card-panel';\nimport PreferencesModal from './components/preferences-modal';\nimport { usePostActions } from './components/post-actions/actions';\nimport usePostFields from './components/post-fields';\nimport ToolsMoreMenuGroup from './components/more-menu/tools-more-menu-group';\nimport ViewMoreMenuGroup from './components/more-menu/view-more-menu-group';\nimport ResizableEditor from './components/resizable-editor';\nimport {\n\tmergeBaseAndUserConfigs,\n\tGlobalStylesProvider,\n} from './components/global-styles-provider';\nimport { CreateTemplatePartModal } from '@wordpress/fields';\nimport { registerCoreBlockBindingsSources } from './bindings/api';\nimport { getTemplateInfo } from './utils/get-template-info';\n\nconst { store: interfaceStore, ...remainingInterfaceApis } = interfaceApis;\n\nexport const privateApis = {};\nlock( privateApis, {\n\tCreateTemplatePartModal,\n\tBackButton,\n\tEntitiesSavedStatesExtensible,\n\tEditor,\n\tEditorContentSlotFill,\n\tGlobalStylesProvider,\n\tmergeBaseAndUserConfigs,\n\tPluginPostExcerpt,\n\tPostCardPanel,\n\tPreferencesModal,\n\tusePostActions,\n\tusePostFields,\n\tToolsMoreMenuGroup,\n\tViewMoreMenuGroup,\n\tResizableEditor,\n\tregisterCoreBlockBindingsSources,\n\tgetTemplateInfo,\n\t// This is a temporary private API while we're updating the site editor to use EditorProvider.\n\tinterfaceStore,\n\t...remainingInterfaceApis,\n} );\n","/**\n * WordPress dependencies\n */\nimport { dispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { store as editorStore } from '../store';\n\n/**\n * @typedef {import('@wordpress/dataviews').Action} Action\n * @typedef {import('@wordpress/dataviews').Field} Field\n */\n\n/**\n * Registers a new DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Action} config Action configuration.\n */\n\nexport function registerEntityAction( kind, name, config ) {\n\tconst { registerEntityAction: _registerEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityAction( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews action.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} actionId Action ID.\n */\nexport function unregisterEntityAction( kind, name, actionId ) {\n\tconst { unregisterEntityAction: _unregisterEntityAction } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityAction( kind, name, actionId );\n\t}\n}\n\n/**\n * Registers a new DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {Field} config Field configuration.\n */\nexport function registerEntityField( kind, name, config ) {\n\tconst { registerEntityField: _registerEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_registerEntityField( kind, name, config );\n\t}\n}\n\n/**\n * Unregisters a DataViews field.\n *\n * This is an experimental API and is subject to change.\n * it's only available in the Gutenberg plugin for now.\n *\n * @param {string} kind Entity kind.\n * @param {string} name Entity name.\n * @param {string} fieldId Field ID.\n */\nexport function unregisterEntityField( kind, name, fieldId ) {\n\tconst { unregisterEntityField: _unregisterEntityField } = unlock(\n\t\tdispatch( editorStore )\n\t);\n\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t_unregisterEntityField( kind, name, fieldId );\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { Notice } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../store/constants';\nimport EditorInterface from '../editor-interface';\nimport { ExperimentalEditorProvider } from '../provider';\nimport Sidebar from '../sidebar';\n\nfunction Editor( {\n\tpostType,\n\tpostId,\n\ttemplateId,\n\tsettings,\n\tchildren,\n\tinitialEdits,\n\n\t// This could be part of the settings.\n\tonActionPerformed,\n\n\t// The following abstractions are not ideal but necessary\n\t// to account for site editor and post editor differences for now.\n\textraContent,\n\textraSidebarPanels,\n\t...props\n} ) {\n\tconst { post, template, hasLoadedPost } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\treturn {\n\t\t\t\tpost: getEntityRecord( 'postType', postType, postId ),\n\t\t\t\ttemplate: templateId\n\t\t\t\t\t? getEntityRecord(\n\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t\ttemplateId\n\t\t\t\t\t )\n\t\t\t\t\t: undefined,\n\t\t\t\thasLoadedPost: hasFinishedResolution( 'getEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId,\n\t\t\t\t] ),\n\t\t\t};\n\t\t},\n\t\t[ postType, postId, templateId ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ hasLoadedPost && ! post && (\n\t\t\t\t<Notice status=\"warning\" isDismissible={ false }>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t\"You attempted to edit an item that doesn't exist. Perhaps it was deleted?\"\n\t\t\t\t\t) }\n\t\t\t\t</Notice>\n\t\t\t) }\n\t\t\t{ !! post && (\n\t\t\t\t<ExperimentalEditorProvider\n\t\t\t\t\tpost={ post }\n\t\t\t\t\t__unstableTemplate={ template }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tinitialEdits={ initialEdits }\n\t\t\t\t\tuseSubRegistry={ false }\n\t\t\t\t>\n\t\t\t\t\t<EditorInterface { ...props }>\n\t\t\t\t\t\t{ extraContent }\n\t\t\t\t\t</EditorInterface>\n\t\t\t\t\t{ children }\n\t\t\t\t\t<Sidebar\n\t\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\t\textraPanels={ extraSidebarPanels }\n\t\t\t\t\t/>\n\t\t\t\t</ExperimentalEditorProvider>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default Editor;\n","/**\n * WordPress dependencies\n */\nimport { registerBlockBindingsSource } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport patternOverrides from './pattern-overrides';\nimport postMeta from './post-meta';\n\n/**\n * Function to register core block bindings sources provided by the editor.\n *\n * @example\n * ```js\n * import { registerCoreBlockBindingsSources } from '@wordpress/editor';\n *\n * registerCoreBlockBindingsSources();\n * ```\n */\nexport function registerCoreBlockBindingsSources() {\n\tregisterBlockBindingsSource( patternOverrides );\n\tregisterBlockBindingsSource( postMeta );\n}\n"],"names":["module","exports","keys","values","map","Map","has","key","indexOf","get","set","value","push","delete","index","splice","createEvent","name","Event","bubbles","e","evt","document","initEvent","assign","ta","nodeName","heightOffset","clientWidth","cachedHeight","pageResize","update","destroy","style","window","removeEventListener","Object","forEach","bind","height","resize","overflowY","overflowX","wordWrap","addEventListener","getComputedStyle","boxSizing","parseFloat","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","isNaN","changeOverflow","width","offsetWidth","scrollHeight","overflows","el","arr","parentNode","Element","scrollTop","node","getParentOverflows","docTop","documentElement","styleHeight","Math","round","computed","actualHeight","offsetHeight","dispatchEvent","err","methods","autosize","options","Array","prototype","call","length","x","default","prop","currentStyle","replace","word","letter","toUpperCase","isMergeableObject","isNonNullObject","stringValue","toString","$$typeof","REACT_ELEMENT_TYPE","isReactElement","isSpecial","Symbol","for","cloneUnlessOtherwiseSpecified","clone","deepmerge","val","isArray","defaultArrayMerge","target","source","concat","element","getKeys","getOwnPropertySymbols","filter","symbol","propertyIsEnumerable","getEnumerableOwnPropertySymbols","propertyIsOnObject","object","property","_","arrayMerge","sourceIsArray","destination","hasOwnProperty","propertyIsUnsafe","customMerge","getMergeFunction","mergeObject","all","array","Error","reduce","prev","next","deepmerge_1","equal","a","b","constructor","i","RegExp","flags","valueOf","computedStyle","lnHeightStr","lnHeight","_lnHeightStyle","lineHeight","_node","createElement","innerHTML","setAttribute","fontSizeStr","fontSize","padding","border","body","appendChild","removeChild","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","location","propFullName","secret","getShim","isRequired","ReactPropTypes","bigint","bool","func","number","string","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","extendStatics","__extends","this","setPrototypeOf","__proto__","d","p","__","create","__assign","t","s","n","arguments","__rest","__esModule","React","getLineHeight","RESIZED","TextareaAutosizeClass","_super","_this","apply","state","textarea","onResize","updateLineHeight","setState","onChange","currentValue","currentTarget","componentDidMount","_a","maxRows","async","setTimeout","componentWillUnmount","render","_b","children","innerRef","maxHeight","ref","current","componentDidUpdate","defaultProps","rows","propTypes","Component","TextareaAutosize","forwardRef","TextareaAutosize_1","characterMap","chars","join","allAccents","firstAccent","matcher","match","removeAccents","remove","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","definition","o","defineProperty","enumerable","obj","r","toStringTag","EDITOR_SETTINGS_DEFAULTS","SETTINGS_DEFAULTS","richEditingEnabled","codeEditingEnabled","fontLibraryEnabled","enableCustomFields","defaultRenderingMode","combineReducers","actions","action","_state$action$kind$ac","type","kind","_action","id","config","_state$action$kind$ac2","actionId","fields","_state$action$kind$ac3","_state$action$kind$ac4","_field","fieldId","isReady","getPostRawValue","raw","postId","postType","templateId","saving","pending","deleting","postLock","isLocked","lock","template","isValid","postSavingLock","lockName","removedLockName","restState","editorSettings","settings","postAutosavingLock","renderingMode","mode","deviceType","removedPanels","includes","panelName","blockInserterPanel","isOpen","inserterSidebarToggleRef","listViewPanel","listViewToggleRef","publishSidebarActive","dataviews","dataviewsReducer","EDIT_MERGE_PROPERTIES","Set","PERMALINK_POSTNAME_REGEX","ONE_MINUTE_IN_MS","AUTOSAVE_PROPERTIES","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","PATTERN_POST_TYPE","NAVIGATION_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_POST_TYPES","GLOBAL_POST_TYPES","_jsx","SVG","xmlns","viewBox","Path","fillRule","getTemplatePartIcon","iconName","headerIcon","footerIcon","sidebarIcon","symbolFilledIcon","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","EMPTY_OBJECT","getTemplateInfo","params","_Object$values$find","templateTypes","templateAreas","description","slug","title","area","defaultTitle","defaultDescription","find","templateTitle","rendered","templateDescription","templateAreasWithIcon","item","icon","templateIcon","layout","hasEditorUndo","createRegistrySelector","select","coreStore","hasUndo","hasEditorRedo","hasRedo","isEditedPostNew","getCurrentPost","status","hasChangedContent","getPostEdits","isEditedPostDirty","getCurrentPostType","getCurrentPostId","hasEditsForEntityRecord","hasNonPostEntityChanges","dirtyEntityRecords","__experimentalGetDirtyEntityRecords","some","entityRecord","isCleanNewPost","getRawEntityRecord","getCurrentTemplateId","getCurrentPostRevisionsCount","_getCurrentPost$_link","_links","count","getCurrentPostLastRevisionId","_getCurrentPost$_link2","getEntityRecordEdits","getCurrentPostAttribute","attributeName","post","getNestedEditedPostProperty","createSelector","edits","getEditedPostAttribute","getEditedPostContent","getAutosaveAttribute","currentUserId","getCurrentUser","autosave","getAutosave","getEditedPostVisibility","isCurrentPostPending","isCurrentPostPublished","currentPost","isInTheFuture","Date","Number","getDate","date","isCurrentPostScheduled","isEditedPostPublishable","isEditedPostSaveable","isSavingPost","isEditedPostEmpty","Platform","OS","record","getEditedEntityRecord","content","blocks","blockName","getDefaultBlockName","getFreeformContentHandlerName","isEditedPostAutosaveable","isPostAutosavingLocked","hasFetchedAutosave","hasFetchedAutosaves","field","isEditedPostBeingScheduled","checkedDate","isEditedPostDateFloating","modified","isDeletingPost","isSavingNonPostEntityChanges","entitiesBeingSaved","__experimentalGetEntitiesBeingSaved","didPostSaveRequestSucceed","getLastEntitySaveError","didPostSaveRequestFail","isAutosavingPost","Boolean","isAutosave","isPreviewingPost","isPreview","getEditedPostPreviewLink","previewLink","addQueryArgs","preview","featuredImageId","_thumbnail_id","getSuggestedPostFormat","blockEditorStore","getBlocks","provider","attributes","providerNameSlug","__unstableSerializeAndClean","isPublishingPost","isPermalinkEditable","permalinkTemplate","test","getPermalink","permalinkParts","getPermalinkParts","prefix","postName","suffix","getEditedPostSlug","cleanForSlug","split","isPostLocked","isPostSavingLocked","isPostLockTakeover","isTakeover","getPostLockUser","user","getActivePostLock","activePostLock","canUserUseUnfilteredHTML","isPublishSidebarEnabled","preferencesStore","getEditorBlocks","parse","isEditorPanelRemoved","isEditorPanelEnabled","inactivePanels","isEditorPanelOpened","openPanels","getEditorSelectionStart","deprecated","since","alternative","selectionStart","getEditorSelectionEnd","selectionEnd","getEditorSelection","__unstableIsEditorReady","getEditorSettings","getRenderingMode","getDeviceType","isZoomOut","isListViewOpened","isInserterOpened","getEditorMode","_select$get","getStateBeforeOptimisticTransaction","hint","inSomeHistory","getBlockEditorSelector","args","version","getBlockName","isBlockValid","getBlockAttributes","getBlock","getClientIdsOfDescendants","getClientIdsWithDescendants","getGlobalBlockCount","getBlocksByClientId","getBlockCount","getBlockSelectionStart","getBlockSelectionEnd","getSelectedBlockCount","hasSelectedBlock","getSelectedBlockClientId","getSelectedBlock","getBlockRootClientId","getBlockHierarchyRootClientId","getAdjacentBlockClientId","getPreviousBlockClientId","getNextBlockClientId","getSelectedBlocksInitialCaretPosition","getMultiSelectedBlockClientIds","getMultiSelectedBlocks","getFirstMultiSelectedBlockClientId","getLastMultiSelectedBlockClientId","isFirstMultiSelectedBlock","isBlockMultiSelected","isAncestorMultiSelected","getMultiSelectedBlocksStartClientId","getMultiSelectedBlocksEndClientId","getBlockOrder","getBlockIndex","isBlockSelected","hasSelectedInnerBlock","isBlockWithinSelection","hasMultiSelection","isMultiSelecting","isSelectionEnabled","getBlockMode","isTyping","isCaretWithinFormattedText","getBlockInsertionPoint","isBlockInsertionPointVisible","isValidTemplate","getTemplate","getTemplateLock","canInsertBlockType","getInserterItems","hasInserterItems","getBlockListSettings","__experimentalGetDefaultTemplateTypes","getEntityRecord","default_template_types","__experimentalGetDefaultTemplatePartAreas","default_template_part_areas","__experimentalGetDefaultTemplateType","__experimentalGetTemplateInfo","getPostTypeLabel","currentPostType","getPostType","labels","singular_name","isPublishSidebarOpened","postKey","isPostNew","localAutosaveClear","sessionStorage","removeItem","setupEditor","dispatch","setEditedPost","synchronizeBlocksWithTemplate","resetEditorBlocks","__unstableShouldCreateUndoLevel","edit","_post$key$raw","editPost","__experimentalTearDownEditor","resetPost","updatePost","setupEditorState","registry","editEntityRecord","savePost","undoIgnore","previousRecord","getEntityRecordNonTransientEdits","error","applyFiltersAsync","saveEntityRecord","message","code","applyFilters","Promise","resolve","doActionAsync","data","publishStatus","isPublished","messages","publish","private","future","noticeMessage","getNotificationArgumentsForSaveFail","noticesStore","createErrorNotice","updatedRecord","_postType$viewable","previousPost","willPublish","willTrash","isDraft","shouldShowLink","viewable","item_trashed","item_reverted_to_draft","item_published","item_published_privately","item_scheduled","item_updated","label","view_item","url","link","getNotificationArgumentsForSaveSuccess","resolveSelect","createSuccessNotice","__unstableMarkLastChangeAsPersistent","refreshPost","trashPost","postTypeSlug","rest_base","restBase","rest_namespace","restNamespace","apiFetch","path","method","local","excerpt","setItem","JSON","stringify","post_title","localAutosaveSet","__unstableSaveForPreview","forceIsAutosaveable","redo","undo","createUndoLevel","updatePostLock","enablePublishSidebar","disablePublishSidebar","lockPostSaving","unlockPostSaving","lockPostAutosaving","unlockPostAutosaving","selection","__unstableCreateUndoLevel","blocksForSerialization","updateEditorSettings","setRenderingMode","clearSelectedBlock","setDeviceType","toggleEditorPanelEnabled","_registry$select$get","updatedInactivePanels","invactivePanelName","toggleEditorPanelOpened","_registry$select$get2","updatedOpenPanels","openPanelName","removeEditorPanel","setIsInserterOpened","setInsertionPoint","rootClientId","insertionIndex","setIsListViewOpened","toggleDistractionFree","createNotice","isDistractionFree","batch","resetZoomLevel","createInfoNotice","onClick","toggle","toggleSpotlightMode","isFocusMode","toggleTopToolbar","isTopToolbar","switchEditorMode","speak","openPublishSidebar","closePublishSidebar","togglePublishSidebar","getBlockEditorAction","resetBlocks","receiveBlocks","updateBlock","updateBlockAttributes","selectBlock","startMultiSelect","stopMultiSelect","multiSelect","toggleSelection","replaceBlocks","replaceBlock","moveBlocksDown","moveBlocksUp","moveBlockToPosition","insertBlock","insertBlocks","showInsertionPoint","hideInsertionPoint","setTemplateValidity","synchronizeTemplate","mergeBlocks","removeBlocks","removeBlock","toggleBlockMode","startTyping","stopTyping","enterFormattedText","exitFormattedText","insertDefaultBlock","updateBlockListSettings","isTemplateRevertable","templateOrTemplatePart","has_theme_file","_x","isPrimary","external","isEligible","callback","posts","onActionPerformed","open","context","items","_items$0$_links$versi","revisionsCount","sprintf","_post$_links$predeces","_post$_links$version","lastRevisionId","href","revision","DataFormContext","createContext","DataFormProvider","Provider","sort","direction","isInteger","elements","validValues","f","Edit","valueA","valueB","localeCompare","timeA","getTime","timeB","FORM_CONTROLS","datetime","hideLabelFromVision","getValue","onChangeControl","useCallback","newValue","_jsxs","className","BaseControl","VisualLabel","as","VisuallyHidden","TimePicker","currentTime","integer","_field$getValue","NumberControl","help","__next40pxDefaultSize","radio","RadioControl","selected","_field$elements","SelectControl","__nextHasNoMarginBottom","text","placeholder","TextControl","getControlByType","getValueFromId","segment","normalizeFields","_field$sort","_field$isValid","_field$enableHiding","_field$enableSorting","fieldTypeDefinition","getControl","renderFromElements","header","enableHiding","enableSorting","isCombinedField","Header","VStack","spacing","HStack","alignment","Heading","level","size","Spacer","DropdownHeader","onClose","Button","closeSmall","PanelDropdown","fieldDefinition","popoverAnchor","labelPosition","fieldLabel","form","useMemo","child","popoverProps","anchor","placement","offset","shift","Dropdown","contentClassName","focusOnMount","toggleProps","variant","tooltipPosition","renderToggle","onToggle","renderContent","_Fragment","DataFormLayout","FieldLayout","nestedField","_form$fields","FORM_FIELD_LAYOUTS","component","_field$labelPosition","useContext","fieldDef","firstChildFieldId","setPopoverAnchor","useState","fieldDefinitions","normalizedFormFields","_form$type","_form$labelPosition","_field$layout","fieldLayout","fieldLabelPosition","normalizeFormFields","formField","getFieldDefinition","isVisible","DataForm","normalizedFields","isTemplateOrTemplatePart","getItemTitle","decodeEntities","isTemplateRemovable","BaseTitleView","renderedTitle","clsx","justify","TitleView","enableGlobalSearch","titleField","formDuplicateAction","duplicatePost","RenderModal","closeModal","isCreatingPage","setIsCreatingPage","useDispatch","onSubmit","event","preventDefault","newItemObject","comment_status","meta","parent","password","format","featured_media","menu_order","ping_status","startsWith","slice","assignablePropertiesPrefix","newItem","throwOnError","typedError","errorMessage","changes","isBusy","lowerCase","str","toLowerCase","SuppressedError","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","input","re","paramCase","splitRegexp","stripRegexp","transform","delimiter","result","start","end","charAt","noCase","dotCase","useExistingTemplateParts","_useSelect","useSelect","getEntityRecords","per_page","getUniqueTemplatePartTitle","templateParts","lowercaseTitle","existingTitles","templatePart","getCleanTemplatePartSlug","kebabCase","getAreaRadioId","instanceId","getAreaRadioDescriptionId","CreateTemplatePartModal","modalTitle","restProps","defaultModalTitle","add_new_item","Modal","onRequestClose","overlayClassName","CreateTemplatePartModalContents","defaultArea","confirmLabel","onCreate","onError","existingTemplateParts","setTitle","setArea","isSubmitting","setIsSubmitting","useInstanceId","defaultTemplatePartAreas","uniqueTitle","cleanSlug","serialize","createTemplatePart","required","checked","Icon","htmlFor","check","duplicateTemplatePart","modalHeader","_item$blocks","__unstableSkipMigrationLogs","CreatePatternModalContents","useDuplicatePatternProps","patternsPrivateApis","duplicatePattern","duplicatedProps","pattern","onSuccess","PATTERN_TYPES","renamePost","isTemplate","is_custom","permissions","isTemplatePart","saveEditedEntityRecord","isItemValid","every","formOrderAction","reorderPage","orderInput","isSaveDisabled","accessibleWhenDisabled","disabled","Blob","Response","DataView","setUint32","ArrayBuffer","Uint8Array","buffer","TextEncoder","encode","String","min","File","isFile","lastModified","stream","headers","now","ReadableStream","isView","asyncIterator","TypeError","pull","desiredSize","close","enqueue","byteLength","cancel","throw","u","BigInt","l","URL","pathname","findLast","decodeURIComponent","c","subarray","Uint32Array","y","w","getSeconds","getMinutes","getHours","getMonth","getFullYear","setUint16","B","decode","TextDecoder","fatal","g","m","getReader","done","read","I","setBigUint64","v","h","D","N","iterator","buffersAreUTF8","getJsonFromItem","__file","syncStatus","wp_pattern_sync_status","download","supportsBulk","downloadBlob","nameCount","filesToZip","metadata","S","downloadZip","blob","backup","allSettled","promiseResult","successMessage","reason","errorMessages","failedPromises","failedPromise","add","revertTemplate","allowUndo","noticeId","removeNotice","templateEntityConfig","getEntityConfig","fileTemplatePath","baseURL","origin","fileTemplate","serializeBlocks","edited","undoRevert","resetPostAction","hideModalHeader","setIsBusy","Text","fallbackErrorMessage","onConfirm","clipRule","deletePostAction","trash","isResetting","_n","notice","success","getMessage","getBatchMessage","errors","callbacks","deleteEntityRecord","allSettledResults","force","_notice$success$type","_notice$error$type","getErrorMessagesFromPromises","onActionError","deletePostWithNotices","permanentlyDeletePost","featuredImageField","FeaturedImageEdit","media","source_url","useRef","MediaUpload","onSelect","selectedMedia","allowedTypes","role","tabIndex","onKeyDown","Grid","rowGap","columnGap","templateColumns","alt","src","lineSolid","stopPropagation","FeaturedImageView","mediaId","authorField","imageUrl","author","avatar_urls","isImageLoaded","setIsImageLoaded","onLoad","authorIcon","nameA","_embedded","nameB","drafts","scheduled","notAllowed","published","STATUSES","filterBy","operators","getFormattedDate","dateToDisplay","dateI18n","getSettings","formats","datetimeAbbreviated","DateView","_item$status","_item$modified","_item$date4","_item$date5","_item$date","_item$date2","_item$date3","createInterpolateElement","span","time","getSlug","SlugEdit","permalink_template","permalinkPrefix","permalinkSuffix","isEditable","originalSlugRef","slugToDisplay","permalink","safeDecodeURIComponent","useEffect","copyButtonRef","useCopyToClipboard","isDismissible","postUrlSlugDescriptionId","ExternalLink","InputControl","InputControlPrefixWrapper","copySmall","autoComplete","spellCheck","onBlur","SlugView","getTitleWithFallbackName","getItemPriority","searchValue","normalizedName","normalizedSearch","Infinity","PageAttributesParent","fieldValue","setFieldValue","pageId","parentPostTitle","pageItems","isHierarchical","postTypeInfo","postIsHierarchical","hierarchical","parentPost","query","exclude","parent_exclude","orderby","order","_fields","search","parentOptions","getOptionsFromTree","tree","sortedNodes","treeNode","repeat","rawName","flat","_item$parent","flatTerms","flatTermsWithParentAndChildren","term","termsByParent","acc","fillWithChildren","terms","buildTermsTree","opts","optsHasParent","unshift","option","ComboboxControl","onFilterValueChange","debounce","selectedPostId","_parseInt","parseInt","ParentEdit","homeUrl","home","filterURLForDisplay","wbr","ParentView","templateField","TemplateEdit","availableTemplates","templates","_select$getEntityReco","allTemplates","post_type","getHomePage","getPostsPageId","isPostsPage","isFrontPage","templatesAsPatterns","shownTemplates","useAsyncList","currentTemplate","foundTemplate","slugToCheck","getDefaultTemplateId","showModal","setShowModal","MenuGroup","MenuItem","isFullScreen","BlockPatternsList","blockPatterns","shownPatterns","onClickPattern","showPassword","setShowPassword","CheckboxControl","maxLength","Badge","componentsPrivateApis","frontPageId","postsPageId","siteSettings","page_on_front","page_for_posts","cloneElement","patternPrivateApis","Tooltip","lockSmall","createHigherOrderComponent","WrappedComponent","useSubRegistry","useRegistry","subRegistries","WeakMap","subRegistry","createRegistry","blockEditorStoreConfig","registerStore","storeConfig","getSubRegistry","RegistryProvider","getExternalLink","getExternalLinkAttributes","getOpenverseCaption","foreign_landing_url","foreignLandingUrl","creator","creator_url","creatorUrl","license","license_version","licenseVersion","license_url","licenseUrl","fullLicense","getOpenverseLicense","licenseName","trim","_creator","_caption","coreMediaFetch","getMediaItems","orderBy","mediaItem","alt_text","previewUrl","media_details","sizes","medium","caption","search_items","mediaType","fetch","media_type","finalQuery","mature","excluded_source","mapFromInserterMediaRequest","entries","queryKey","searchParams","response","json","results","sourceId","thumbnail","getReportUrl","isExternalResource","randomUUID","crypto","getRandomValues","rnds8","rng","byteToHex","buf","rnds","random","unsafeStringify","noop","mediaUpload","additionalData","filesList","maxUploadFileSize","onFileChange","editorStore","wpAllowedMimeTypes","allowedMimeTypes","lockKey","uuid","imageIsUploading","currentPostId","wp_id","postData","clearSaveLock","uploadMedia","file","sideloadMedia","mediaSideload","privateApis","isObject","isPlainObject","ctor","prot","GlobalStylesContext","cleanEmptyObject","blockEditorPrivateApis","mergeBaseAndUserConfigs","base","baseConfig","userConfig","useGlobalStylesContext","isUserConfigReady","setUserConfig","globalStylesId","styles","hasFinishedResolution","canUser","_globalStylesId","__experimentalGetCurrentGlobalStylesId","userCanEditGlobalStyles","hasResolved","callbackOrObject","_record$styles","_record$settings","_record$_links","currentConfig","updatedConfig","useGlobalStylesUserConfig","isBaseConfigReady","__experimentalGetCurrentThemeBaseGlobalStyles","useGlobalStylesBaseConfig","mergedConfig","merged","__experimentalReusableBlocksSelect","RECEIVE_INTERMEDIATE_RESULTS","coreDataPrivateApis","BLOCK_EDITOR_SETTINGS","globalStylesDataKey","globalStylesLinksDataKey","selectBlockPatternsKey","reusableBlocksSelectKey","sectionRootClientIdKey","POST_CONTENT_BLOCK_TYPES","usePostContentBlocks","contentOnlyBlockTypes","contentOnlyIds","getPostBlocksByName","DisableNonPageContentBlocks","isNavigationMode","getBlocksByName","_isNavigationMode","disabledIds","flatMap","clientId","setBlockEditingMode","unsetBlockEditingMode","NavigationBlockEditingMode","blockClientId","POST_TYPES_ALLOWING_POST_CONTENT_TEMPLATE_PART","normalizeComplementaryAreaScope","scope","normalizeComplementaryAreaName","setDefaultComplementaryArea","enableComplementaryArea","disableComplementaryArea","pinItem","pinnedItems","unpinItem","toggleFeature","featureName","setFeatureValue","setFeatureDefaults","defaults","setDefaults","openModal","getActiveComplementaryArea","isComplementaryAreaVisible","complementaryAreas","isComplementaryAreaLoading","identifier","isItemPinned","_pinnedItems$item","isFeatureActive","isModalActive","modalName","activeModal","store","createReduxStore","reducer","selectors","ComplementaryAreaToggle","identifierProp","iconProp","selectedIcon","shortcut","ComponentToUse","usePluginContext","isSelected","interfaceStore","register","ComplementaryAreaHeader","toggleButtonProps","toggleButton","ActionItem","Fill","fpOnClick","Slot","fillProps","bubblesVirtually","fills","Children","toArray","initializedByPlugins","__unstableExplicitMenuItem","__unstableTarget","PluginsMenuItem","ComplementaryAreaMoreMenuItem","PinnedItems","ANIMATION_DURATION","SIDEBAR_WIDTH","variants","closed","mobileOpen","ComplementaryAreaFill","activeArea","isActive","disableMotion","useReducedMotion","isMobileViewport","useViewportMatch","previousActiveArea","usePrevious","previousIsActive","transition","duration","ease","AnimatePresence","initial","motion","div","animate","exit","ComplementaryArea","closeLabel","headerClassName","isPinnable","panelClassName","toggleShortcut","isActiveByDefault","setIsReady","isLoading","isPinned","isSmall","isLarge","showIconLabels","_activeArea","viewportStore","isViewportMatch","previousIsSmallRef","shouldOpenWhenNotSmallRef","useAdjustComplementaryListener","isPressed","showTooltip","starFilled","starEmpty","Panel","FullscreenMode","isSticky","classList","contains","NavigableRegion","ariaLabel","Tag","displayName","commonTransition","headerVariants","hidden","opacity","marginTop","visible","distractionFreeHover","delay","delayChildren","distractionFreeHidden","distractionFreeDisabled","footer","editorNotices","sidebar","secondarySidebar","secondarySidebarResizeListener","secondarySidebarSize","useResizeObserver","defaultTransition","querySelector","useHTMLClass","mergedLabels","whileHover","position","left","RenamePatternModal","PatternRenameModal","_postType","DuplicatePatternModal","PatternDuplicateModal","BlockRemovalWarningModal","TEMPLATE_BLOCKS","BLOCK_REMOVAL_RULES","postTypes","removedBlocks","bindings","binding","BlockRemovalWarnings","removalRulesForPostType","rule","rules","StartPageOptions","shouldEnable","preferencesModalActive","choosePatternModalEnabled","tab","category","textFormattingShortcuts","keyCombination","modifier","character","aliases","KeyCombination","forceAriaLabel","displayShortcutList","shortcutAriaLabel","Fragment","alias","getShortcutKeyCombination","getShortcutDescription","getShortcutAliases","keyboardShortcutsStore","Shortcut","KEYBOARD_SHORTCUT_HELP_MODAL_NAME","ShortcutList","shortcuts","DynamicShortcut","ShortcutSection","ShortcutCategorySection","categoryName","additionalShortcuts","categoryShortcuts","getCategoryShortcuts","toggleModal","useShortcut","closeButtonLabel","ContentOnlySettingsMenuItems","postContentBlocks","entity","onNavigateToEntityRecord","canEditTemplates","getBlockParentsByBlockName","getBlockParents","patternParent","TemplateLockContentOnlyMenuItems","isPattern","helpText","BlockSettingsMenuFirstItem","contentLockingParent","getContentLockingParent","blockDisplayInformation","useBlockDisplayInformation","blockEditorActions","modifyContentLockBlock","ContentOnlySettingsMenu","BlockSettingsMenuControls","selectedClientIds","PatternSelection","fallbackContent","onChoosePattern","useEntityBlockEditor","patterns","getBlockPatterns","currentThemeStylesheet","getCurrentTheme","stylesheet","templateType","block","innerBlocks","innerBlock","injectThemeAttributeInBlockTemplateContent","useStartPatterns","StartModal","isCustom","ignore_empty","useFallbackTemplateContent","Flex","expanded","FlexItem","StartTemplateOptions","isClosed","setIsClosed","shouldOpenModal","_postId","templateRecord","EditorKeyboardShortcuts","isModeToggleDisabled","isDisabled","sidebarToOpen","ConvertToRegularBlocks","canRemoveBlock","ConvertToTemplatePart","clientIds","isModalOpen","setIsModalOpen","canCreate","symbolFilled","createBlock","TemplatePartMenuItems","TemplatePartConverterMenuItem","ExperimentalBlockEditorProvider","PatternsMenuItems","editPatternsPrivateApis","NON_CONTEXTUAL_POST_TYPES","RENDERING_MODES","ExperimentalEditorProvider","withRegistryProvider","recovery","initialEdits","BlockEditorProviderComponent","__unstableTemplate","hasTemplate","defaultMode","postTypeEntities","getEntitiesConfig","postTypeSupports","supports","hasLoadedPostObject","_defaultMode","editor","features","default_mode","hasDefaultMode","shouldRenderTemplate","rootLevelPost","defaultBlockContext","postContext","postTypeNames","templateSlug","blockEditorSettings","_mergedGlobalStyles$s","_mergedGlobalStyles$_","_settings$__experimen","_settings$__experimen2","isLargeViewport","allowRightClickOverrides","blockTypes","focusMode","hasFixedToolbar","keepCaretInsideBlock","hasUploadPermissions","hiddenBlockTypes","canUseUnfilteredHTML","userCanCreatePages","pageOnFront","pageForPosts","userPatternCategories","restBlockPatternCategories","sectionRootClientId","_canUser","getUserPatternCategories","getBlockPatternCategories","getBlockTypes","blocksStore","_getBlocksByName$","_getBlocksByName$find","tagName","mergedGlobalStyles","globalStylesData","globalStylesLinksData","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","settingsBlockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","blockPatternCategories","findIndex","createPageEntity","reject","allowedBlockTypes","forceDisableFocusMode","fromEntries","getBlockPatternsForPostType","__experimentalUserPatternCategories","__experimentalFetchLinkSuggestions","searchOptions","fetchLinkSuggestions","inserterMediaCategories","__experimentalFetchRichUrlData","fetchUrlData","__experimentalCanUserUseUnfilteredHTML","__experimentalUndo","outlineMode","__experimentalCreatePageEntity","__experimentalUserCanCreatePages","__experimentalPreferPatternsOnRoot","templateLock","__experimentalSetIsInserterOpened","editorTool","useBlockEditorSettings","onInput","postBlocks","templateBlocks","onInputTemplate","onChangeTemplate","maybeNavigationBlocks","useBlockEditorProps","setCurrentTemplateId","createWarningNotice","useLayoutEffect","editLink","addFilter","canInsert","blockType","removeFilter","useHideBlocksFromInserter","useCommandLoader","hook","editorMode","isListViewOpen","showBlockBreadcrumbs","isPreviewMode","isViewable","isCodeEditingEnabled","isRichEditingEnabled","_get","_getPostType$viewable","isBlockBasedTheme","canCreateTemplate","is_block_theme","allowSwitchEditorMode","commands","keyboard","listView","isRTL","drawerLeft","drawerRight","activeSidebar","blockDefault","formatListBullets","isSiteEditor","getPath","patternRenameModalName","patternDuplicateModalName","goBack","_getEditorSettings","isTemplateHidden","onNavigateToPreviousEntityRecord","editedRecord","useEntityRecord","page","rotateRight","rotateLeft","EntityProvider","BlockContextProvider","KeyboardShortcutHelpModal","EditorProvider","BlockEditorProvider","useGlobalStyle","PostPreviewContainer","backgroundColor","isEmpty","BlockPreview","Async","getTemplateId","canViewTemplate","_settings","supportsTemplateMode","registerEntityAction","unregisterEntityAction","registerEntityField","unregisterEntityField","registerPostTypeSchema","isEntityReady","postTypeConfig","currentTheme","viewPost","revisions","viewPostRevisions","exportPattern","restorePost","deletePost","theme_supports","statusField","dateField","slugField","parentField","comments","commentStatusField","passwordField","postPreviewField","_titleField","pageTitleField","templateTitleField","patternTitleField","doAction","createTemplate","savedTemplate","showBlockTypes","blockNames","newBlockNames","hideBlockTypes","existingBlockNames","mergedBlockNames","saveDirtyEntities","onSave","entitiesToSkip","PUBLISH_ON_SAVE_ENTITIES","saveNoticeId","entitiesToSave","elt","siteItemsToSave","pendingSavedRecords","typeToPublish","__experimentalSaveSpecifiedEntityEdits","then","catch","removeTemplates","EMPTY_ARRAY","EMPTY_INSERTION_POINT","filterValue","getInserter","postContentClientId","getListViewToggleRef","getInserterSidebarToggleRef","CARD_ICONS","wp_block","wp_navigation","navigation","pageIcon","verse","getPostIcon","areaData","postTypeEntity","hasPostMetaChanges","originalPostMeta","fastDeepEqual","footnotes","getEntityActions","_state$actions$kind$n","_getEntityActions","_isEntityReady","getEntityFields","_state$fields$kind$na","_getEntityFields","parentClientId","parentBlockName","getUserLabel","avatar","registerPrivateActions","privateActions","registerPrivateSelectors","privateSelectors","_settings$attributes","metaAttributes","attributeKey","BlockEdit","setAttributes","setMeta","useEntityProp","mergedAttributes","metaKey","nextAttributes","nextMeta","createWithMetaAttributeSource","triggerPrefix","useItems","users","getUsers","encodeURIComponent","getOptionCompletion","completers","userAutocompleter","PatternOverridesControls","ResetOverridesControl","PatternOverridesBlockControls","PARTIAL_SYNCING_SUPPORTED_BLOCKS","PATTERN_SYNC_TYPES","withPatternOverrideControls","isSupportedBlock","ControlsWithStoreSubscription","blockEditingMode","useBlockEditingMode","hasPatternOverridesSource","isEditingSyncedPattern","getBlockBindingsSource","unsynced","hasPatternBindings","shouldShowPatternOverridesControls","shouldShowResetOverridesControl","AutosaveMonitor","super","needsAutosave","isDirty","isAutosaveable","disableIntervalChecks","setAutosaveTimer","prevProps","editsReference","interval","clearTimeout","timerId","isAutosaving","timeout","autosaveTimerHandler","compose","withSelect","ownProps","getReferenceByDistinctEdits","autosaveInterval","withDispatch","usePageTypeBadge","MotionButton","DocumentBar","postTypeLabel","documentTitle","isNotFound","isTemplatePreview","isResolving","isResolvingSelector","_document","_templateInfo","_postTypeLabel","openCommandCenter","commandsStore","isReducedMotion","hasBackButton","entityTitle","pageTypeBadge","mountedRef","chevronRightSmall","chevronLeftSmall","BlockIcon","stripHTML","displayShortcut","primary","TableOfContentsItem","emptyHeadingContent","incorrectLevelContent","singleH1Headings","multipleH1Headings","EmptyOutlineIllustration","fill","Rect","rx","Line","x1","y1","x2","y2","stroke","computeOutlineHeadings","isEmptyHeading","heading","DocumentOutline","hasOutlineItemsDisabled","isTitleSupported","_postType$supports$ti","prevHeadingLevelRef","headings","titleNode","hasTitle","hasMultipleH1","DocumentOutlineItem","isIncorrectLevel","getTextContent","html","DocumentOutlineCheck","hasHeadings","registerShortcut","isAppleOS","BlockEditorKeyboardShortcuts","Register","primaryShift","undoIcon","redoIcon","TemplateValidationNotice","showConfirmDialog","setShowConfirmDialog","Notice","ConfirmDialog","confirmButtonText","onCancel","notices","getNotices","dismissibleNotices","nonDismissibleNotices","NoticeList","onRemove","MAX_VISIBLE_NOTICES","EditorSnackbars","snackbarNotices","SnackbarList","EntityRecordItem","entityRecordTitle","PanelRow","getGlobalStylesChanges","GlobalStylesDescription","currentEditorGlobalStyles","savedRecord","globalStylesChanges","maxResults","change","EntityDescription","getEntityDescription","EntityTypeList","list","unselectedEntities","setUnselectedEntities","firstRecord","entityLabel","PanelBody","initialOpen","useIsDirty","editedEntities","siteEdits","siteEntityConfig","_siteEntityConfig$met","editedEntitiesWithoutSite","siteEntityLabels","editedSiteEntities","_setUnselectedEntities","identity","EntitiesSavedStates","renderDialog","isDirtyProps","EntitiesSavedStatesExtensible","additionalPrompt","saveEnabled","saveEnabledProp","saveLabel","saveButtonRef","partitionedSavables","site","siteSavables","wp_template","templateSavables","wp_template_part","templatePartSavables","contentSavables","sortedPartitionedSavables","dismissPanel","saveDialogRef","saveDialogProps","useDialog","dialogLabel","dialogDescription","selectItemsToSaveDescription","gap","isBlock","strong","getContent","CopyButton","ErrorBoundary","componentDidCatch","getDerivedStateFromError","canCopyContent","wrap","stack","requestIdleCallback","requestAnimationFrame","hasStorageSupport","ifCondition","hasSessionStorageSupport","deferredAutosave","hasRemoteAutosave","localAutosave","getItem","localAutosaveGet","editsContent","editsWithoutContent","useAutosaveNotice","didError","lastIsDirtyRef","lastIsAutosavingRef","wasEditedPostNew","prevPostId","useAutosavePurge","localAutosaveInterval","supportsPageAttributes","supportKeys","isSupported","PageAttributesOrder","_select$getEditedPost","setOrderInput","FlexBlock","newOrder","PageAttributesOrderWithChecks","PostTypeSupportCheck","unescapeString","arg","unescapeTerm","unescapeTerms","getTitle","parentPostId","_pType$hierarchical","pType","inputValue","PostParentToggle","parentTitle","ParentRow","PostPanelRow","InspectorPopoverHeader","PANEL_NAME","AttributesPanel","isEnabled","PageAttributesPanel","PageAttributesCheck","DEFAULT_TITLE","CreateNewTemplateModal","defaultBlockTemplate","newTemplateContent","inherit","newTemplate","useEditedPostContext","useAllowSwitchingTemplates","useTemplates","useAvailableTemplates","currentTemplateSlug","useCurrentTemplateSlug","allowSwitchingTemplate","entityTemplate","POPOVER_PROPS","PostTemplateToggle","PostTemplateDropdownContent","_options$find","_selectedOption$value","fetchedTemplates","selectedTemplateSlug","canEdit","currentTemplateId","canCreateTemplates","_currentTemplateId","selectedOption","isCreateModalOpen","setIsCreateModalOpen","addTemplate","PreferenceBaseOption","preferencesPrivateApis","EnablePanelOption","isChecked","isRemoved","createSlotFill","EnablePluginDocumentSettingPanelOption","PluginDocumentSettingPanel","pluginName","opened","PluginBlockSettingsMenuItem","allowedBlocks","small","selectedBlocks","shouldRenderItem","allowed","isEverySelectedBlockAllowed","PluginMoreMenuItem","_props$as","PluginPostPublishPanel","pluginIcon","PluginPostStatusInfo","PluginPrePublishPanel","PluginPreviewMenuItem","PluginSidebar","PluginSidebarMoreMenuItem","SwapTemplateButton","TemplatesList","ResetDefaultTemplate","CreateNewTemplate","BlockThemeControl","hasGoBack","getPreference","notificationAction","DropdownMenu","PostTemplatePanel","isBlockTheme","__unstableIsBlockBasedTheme","_select$canUser","canViewTemplates","_select$canUser2","ClassicThemeControl","BASE_QUERY","AUTHORS_QUERY","who","useAuthorsQuery","authorId","authors","postAuthor","getUser","_authorId","search_columns","authorOptions","fetchedAuthors","foundAuthor","currentAuthor","PostAuthorCombobox","postAuthorId","allowReset","PostAuthorSelect","PostAuthorCheck","hasAssignAuthorAction","hasAuthors","_post$_links$wpActio","PostAuthorToggle","authorName","PostAuthorForm","COMMENT_OPTIONS","commentStatus","newCommentStatus","pingStatus","onTogglePingback","ModalContents","PostComments","PostPingbacks","PostDiscussionToggle","commentsSupported","trackbacksSupported","_getEditedPostAttribu","_getEditedPostAttribu2","trackbacks","PostDiscussionPanel","PostExcerpt","updateOnBlur","shouldUseDescriptionLabel","usedAttribute","_usedAttribute","localExcerpt","setLocalExcerpt","TextareaControl","PluginPostExcerpt","ExcerptPanel","isOpened","toggleExcerptPanel","PostExcerptForm","PostExcerptPanel","PostExcerptCheck","PrivatePostExcerptPanel","PrivateExcerpt","shouldRender","shouldBeUsedAsDescription","allowEditing","_shouldBeUsedAsDescription","_shouldRender","headerTitle","excerptText","align","numberOfLines","truncate","excerptPlaceholder","triggerEditLabel","ThemeSupportCheck","themeSupports","getThemeSupports","_themeSupports$key","supported","ALLOWED_MEDIA_TYPES","DEFAULT_FEATURE_IMAGE_LABEL","DEFAULT_SET_FEATURE_IMAGE_LABEL","instructions","applyWithSelect","getMedia","isRequestingFeaturedImageMedia","applyWithDispatch","noticeOperations","onUpdateImage","image","onDropImage","removeAllNotices","onRemoveImage","withNotices","withFilters","noticeUI","returnsFocusRef","setIsLoading","mediaSourceUrl","_media$media_details$","_media$media_details$2","defaultSize","mediaWidth","mediaHeight","fallbackSize","getMediaDetails","onDropFiles","isBlobURL","getImageDescription","imageMedia","full","returnFocus","focus","isMissingMedia","PostFeaturedImageCheck","MediaUploadCheck","fallback","featured_image","unstableFeaturedImageFlow","modalClass","Spinner","set_featured_image","isDestructive","DropZone","onFilesDrop","PostFeaturedImagePanel","withPanelBody","_postType$labels$feat","PostFeaturedImage","PostFormatCheck","disablePostFormats","POST_FORMATS","normalizedA","normalizedB","PostFormat","postFormatSelectorId","postFormat","suggestedFormat","supportedFormats","_postFormat","suggestion","onUpdatePostFormat","usePostLastRevisionInfo","PrivatePostLastRevision","PostLastRevisionCheck","iconPosition","PostLastRevision","PostLockedModal","hookName","postLockUtils","releasePostLock","FormData","append","unlockNonce","navigator","sendBeacon","ajaxUrl","xhr","XMLHttpRequest","send","addAction","post_id","received","lock_error","avatar_src_2x","new_lock","removeAction","userDisplayName","userAvatar","unlockUrl","_wpnonce","nonce","allPostsUrl","allPostsLabel","shouldCloseOnClickOutside","shouldCloseOnEsc","PreviewLink","hasPublishAction","PostPendingStatusCheck","togglePendingStatus","PostPreviewButton","textContent","onPreview","currentPostLink","isSaveable","canView","targetId","previewWindow","targetDocument","markup","renderToString","write","writeInterstitialMessage","PublishButtonLabel","isSmallerThanMediumViewport","isBeingScheduled","isSaving","isPublishing","postStatusHasChanged","postStatus","PostPublishButton","createOnClick","closeEntitiesSavedStates","entitiesSavedStatesCallback","setEntitiesSavedStatesCallback","savedEntities","forceIsDirty","isPublishable","isAutoSaving","isToggle","savePostStatus","visibility","isButtonDisabled","isToggleDisabled","buttonProps","onClickButton","onClickToggle","componentProps","visibilityOptions","public","info","PostVisibility","hasPassword","setHasPassword","showPrivateConfirmDialog","setShowPrivateConfirmDialog","PostVisibilityChoice","setPublic","setPrivate","setPasswordProtected","confirmPrivate","handleDialogCancel","PostVisibilityLabel","usePostVisibilityLabel","toDate","argument","argStr","NaN","startOfMonth","_date","setDate","setHours","endOfMonth","month","setFullYear","pow","millisecondsInMinute","millisecondsInHour","dateTimeDelimiter","timeZoneDelimiter","timezone","dateRegex","timeRegex","timezoneRegex","parseDateUnit","parseTimeUnit","daysInMonths","isLeapYearIndex","year","PrivatePublishDateTimePicker","PostSchedule","PrivatePostSchedule","showPopoverHeaderActions","isCompact","postDate","previewedMonth","setPreviewedMonth","eventsByPostType","after","toISOString","before","events","eventDate","is12HourTime","reverse","currentDate","is12Hour","dateOrder","onMonthPreviewed","additionalDigits","dateStrings","dateString","timeString","substr","token","exec","splitDateString","parseYearResult","regex","captures","restDateString","century","parseYear","isWeekDate","dayOfYear","day","week","dayOfWeek","_year","validateWeekDate","isoWeekYear","setUTCFullYear","diff","getUTCDay","setUTCDate","getUTCDate","dayOfISOWeekYear","validateDate","validateDayOfYearDate","max","parseDate","timestamp","hours","minutes","seconds","validateTime","parseTime","dirtyDate","getUTCFullYear","getUTCMonth","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","timezoneString","sign","_hours","validateTimezone","parseTimezone","parseISO","PostScheduleLabel","usePostScheduleLabel","isFloating","getFullPostScheduleLabel","dateAttribute","getTimezoneOffset","isTimezoneSameAsSiteTimezone","isSameDay","tomorrow","getPostScheduleLabel","timezoneAbbreviation","abbr","offsetFormatted","getTimezoneAbbreviation","formattedDate","right","MIN_MOST_USED_TERMS","DEFAULT_QUERY","hide_empty","MostUsedTerms","taxonomy","_terms","showTerms","mostUsedTerms","most_used","MAX_TERMS_SUGGESTIONS","isSameTermName","termA","termB","termNamesToIds","names","termName","Wrapper","FlatTermSelector","_taxonomy$labels$add_","_taxonomy$labels$sing2","setValues","setSearch","debouncedSearch","useDebounce","termIds","hasAssignAction","hasCreateAction","hasResolvedTerms","_post$_links","_post$_links2","getTaxonomy","_taxonomy","_termIds","include","searchResults","newValues","suggestions","onUpdateTerms","newTermIds","newTermLabel","singularName","termAddedLabel","termRemovedLabel","removeTermLabel","FormTokenField","termNames","availableTerms","uniqueTerms","newTermNames","newTerm","term_id","findOrCreateTerm","newTerms","newAvailableTerms","onInputChange","maxSuggestions","added","removed","_taxonomy$labels$sing","defaultName","termAddedMessage","TagsPanel","panelBodyTitle","MaybeTagsPanel","hasTags","isPostTypeSupported","tagsTaxonomy","_isPostTypeSupported","types","areTagsFetched","tags","hadTagsWhenOpeningThePanel","getSuggestion","suggestedPostFormat","PostFormatSuggestion","suggestionText","PostFormatPanel","currentPostFormat","_select$getThemeSuppo","MIN_TERMS_COUNT_FOR_FILTER","HierarchicalTermSelector","_taxonomy$labels$sear","_taxonomy$name","adding","setAdding","formName","setFormName","formParent","setFormParent","showForm","setShowForm","setFilterValue","filteredTermsTree","setFilteredTermsTree","debouncedSpeak","loading","availableTermsTree","termsTree","treeHasSelection","termTree","newTermTree","termOrChildIsSelected","termASelected","termBSelected","sortBySelected","renderTerms","renderedTerms","termId","labelWithFallback","labelProperty","fallbackIsCategory","fallbackIsNotCategory","_taxonomy$labels$labe","newTermButtonLabel","parentSelectLabel","noParentOption","newTermSubmitLabel","filterLabel","groupLabel","showFilter","SearchControl","newFilteredTermsTree","matchTermsForFilter","originalTerm","getFilterMatcher","getResultCount","resultCount","resultsFoundMessage","onToggleForm","existingTerm","findTerm","TreeSelect","noOptionLabel","parentId","selectedId","hasNoCategory","categoriesTaxonomy","defaultCategoryId","default_category","defaultCategory","postTypeSupportsCategories","categories","shouldShowPanel","setShouldShowPanel","flattenBlocks","getMediaInfo","mediaUrl","mediaAlt","Image","img","scale","objectFit","borderRadius","cursor","MaybeUploadMediaPanel","isUploading","setIsUploading","isAnimating","setIsAnimating","hadUploadError","setHadUploadError","editorBlocks","blocksWithExternalMedia","hasExternalMedia","display","flexWrap","onExitComplete","mediaUrls","uploadPromises","urls","basenames","filename","getFilename","basename","parts","pop","generateUniqueBasenames","filePromise","updateBlockWithUploadedMedia","finally","isRequestingSiteIcon","siteIconUrl","siteTitle","siteHome","siteData","site_icon_url","prePublishTitle","prePublishBodyText","siteIcon","wordpress","MaybeUploadMedia","MaybePostFormatPanel","MaybeCategoryPanel","POSTNAME","PAGENAME","showCopyConfirmation","setShowCopyConfirmation","timeoutIdRef","PostPublishPanelPostpublish","isScheduled","postLabel","viewPostLabel","addNewPostLabel","getFuturePostUrl","addLink","postLinkRef","postPublishNonLinkHeader","readOnly","onFocus","PostPublishPanel","cancelButtonNode","createRef","timeoutID","isPostTypeViewable","onTogglePublishSidebar","PostPublishExtension","PrePublishExtension","additionalProps","propsForPanel","isPublishedOrScheduled","isPrePublish","isPostPublish","PostPublishPanelPrepublish","withFocusReturn","withConstrainedTabbing","PostStickyCheck","hasStickyAction","PostSticky","postSticky","sticky","postStatusesInfo","draft","STATUS_OPTIONS","DESIGN_POST_TYPES","PostStatus","passwordInputId","newStatus","newPassword","newDate","handleTogglePassword","handleStatus","PostSavedState","forceSavedMessage","setForceSavedMessage","isNew","isPending","wasSaving","timeoutId","isIneligibleStatus","shortLabel","isSaved","isSavedState","getAnimateClassName","cloudUpload","cloud","PostScheduleCheck","_select$getCurrentPos","PostSchedulePanel","fullLabel","PostScheduleForm","PostSwitchToDraftButton","alertMessage","flexGrow","justifyContent","handleConfirm","PostSyncStatus","taxonomyWrapper","taxonomies","getTaxonomies","show_ui","TaxonomyComponent","taxonomyComponentProps","PostTaxonomiesCheck","TaxonomyPanel","taxonomyMenuName","menu_name","PostTaxonomies","PostTaxonomiesForm","PostTextEditor","_type","_id","Function","Textarea","dir","DEFAULT_CLASSNAMES","REGEXP_NEWLINES","usePostTitleFocus","forwardedRef","_isCleanNewPost","useImperativeHandle","defaultView","ownerDocument","activeElement","usePostTitle","newTitle","PostTitle","titlePlaceholder","setIsSelected","focusRef","onUpdate","setSelection","decodedPlaceholder","richTextRef","useRichText","onSelectionChange","newStart","newEnd","sel","__unstableDisableFormats","onInsertBlockAfter","useMergeRefs","contentEditable","keyCode","ENTER","onPaste","clipboardData","plainText","getData","console","log","pasteHandler","HTML","firstBlock","contentNoHTML","insert","PostTrashCheck","canTrashPost","canUserDelete","PostTrash","isDeleting","PostURL","postSlug","postLink","forceEmptyField","setForceEmptyField","InputControlSuffixWrapper","PostURLCheck","PostURLLabel","usePostURLLabel","PostURLPanel","PostURLToggle","FrontPageLink","decodedSlug","PostVisibilityCheck","WordCount","wordCountType","wordCount","AVERAGE_READING_RATE","TimeToRead","minutesToRead","minutesToReadString","CharacterCount","characterCount","headingCount","paragraphCount","numberOfBlocks","repositionDropdown","hasBlocks","TableOfContentsPanel","UnsavedChangesWarning","warnIfUnsavedChanges","returnValue","deprecateComponent","Wrapped","staticsToHoist","staticName","deprecateFunction","RichText","RootRichText","Autocomplete","RootAutocomplete","AlignmentToolbar","RootAlignmentToolbar","BlockAlignmentToolbar","RootBlockAlignmentToolbar","BlockControls","RootBlockControls","RootBlockEdit","RootBlockEditorKeyboardShortcuts","BlockFormatControls","RootBlockFormatControls","RootBlockIcon","BlockInspector","RootBlockInspector","BlockList","RootBlockList","BlockMover","RootBlockMover","BlockNavigationDropdown","RootBlockNavigationDropdown","BlockSelectionClearer","RootBlockSelectionClearer","BlockSettingsMenu","RootBlockSettingsMenu","BlockTitle","RootBlockTitle","BlockToolbar","RootBlockToolbar","ColorPalette","RootColorPalette","ContrastChecker","RootContrastChecker","CopyHandler","RootCopyHandler","DefaultBlockAppender","RootDefaultBlockAppender","FontSizePicker","RootFontSizePicker","Inserter","RootInserter","InnerBlocks","RootInnerBlocks","InspectorAdvancedControls","RootInspectorAdvancedControls","InspectorControls","RootInspectorControls","PanelColorSettings","RootPanelColorSettings","PlainText","RootPlainText","RichTextShortcut","RootRichTextShortcut","RichTextToolbarButton","RootRichTextToolbarButton","__unstableRichTextInputEvent","__unstableRootRichTextInputEvent","MediaPlaceholder","RootMediaPlaceholder","RootMediaUpload","RootMediaUploadCheck","MultiSelectScrollIntoView","RootMultiSelectScrollIntoView","NavigableToolbar","RootNavigableToolbar","ObserveTyping","RootObserveTyping","SkipToSelectedBlock","RootSkipToSelectedBlock","URLInput","RootURLInput","URLInputButton","RootURLInputButton","URLPopover","RootURLPopover","Warning","RootWarning","WritingFlow","RootWritingFlow","createCustomColorsHOC","rootCreateCustomColorsHOC","getColorClassName","rootGetColorClassName","getColorObjectByAttributeValues","rootGetColorObjectByAttributeValues","getColorObjectByColorValue","rootGetColorObjectByColorValue","getFontSize","rootGetFontSize","getFontSizeClass","rootGetFontSizeClass","withColorContext","rootWithColorContext","withColors","rootWithColors","withFontSizes","rootWithFontSizes","VisualEditorGlobalKeyboardShortcuts","TextEditorGlobalKeyboardShortcuts","urlCleanForSlug","slotName","BackButton","BackButtonSlot","useSlotFills","collabSidebarName","dateSettings","getDateSettings","dateTimeFormat","currentUserAvatar","currentUserName","_userData$avatar_urls","userData","__experimentalDiscussionSettings","defaultAvatar","avatarURL","dateTime","thread","submitButtonText","_thread$content$raw","inputComment","setInputComment","Comments","threads","onEditComment","onAddReply","onCommentDelete","onCommentResolve","showCommentBoard","setShowCommentBoard","blockCommentId","_clientId","focusThread","setFocusThread","clearThreadFocus","Thread","isFocused","CommentBoard","onResolve","onEdit","onDelete","reply","CommentAuthorInfo","CommentForm","actionState","setActionState","handleCancel","moreActions","author_avatar_urls","author_name","moreVertical","controls","RawHTML","handleConfirmResolve","cancelButtonText","handleConfirmDelete","AddComment","selectedBlock","CommentIconSlotFill","AddCommentButton","commentIcon","CommentIconToolbarSlotFill","AddCommentToolbarButton","ToolbarButton","CollabSidebarContent","addNewComment","comment","parentCommentId","updatedArgs","comment_type","comment_approved","commentId","childComment","CollabSidebar","resultComments","sortedThreads","compare","filteredComments","updatedResult","blockCommentIds","extractCommentIds","commentIds","innerCommentIds","getCommentIdsFromBlocks","threadIdMap","GlobalStyles","color","background","unsubscribe","subscribe","AddCommentComponent","openCollabBoard","useHasBlockToolbar","CollapsibleBlockToolbar","isCollapsed","blockSelectionStart","hasBlockToolbar","hasBlockSelection","hideDragHandle","Popover","previous","disableBlockTools","listViewShortcut","showTools","getShortcutRepresentation","isVisualMode","__experimentalEditorWriteMode","isWideViewport","toolbarAriaLabel","toggleListView","toggleInserter","longLabel","onMouseDown","plus","ToolbarItem","ToolSelector","EditorHistoryUndo","EditorHistoryRedo","CopyContentMenuItem","MODES","selectedMode","choices","choice","MenuItemsChoice","ToolsMoreMenuGroup","ViewMoreMenuGroup","MoreMenu","setPreference","turnOffDistractionFree","PreferenceToggleMenuItem","messageActivated","messageDeactivated","handleToggling","ModeSwitcher","access","rel","IS_TOGGLE","IS_BUTTON","PostPublishButtonOrToggle","PostViewLink","hasLoaded","PreviewDropdown","_currentPostType","handleDevicePreviewChange","newDeviceType","menuProps","deviceIcons","desktop","mobile","tablet","disableOpenOnArrowDown","strokeWidth","strokeLinecap","ZoomOutToggle","setZoomLevel","unregisterShortcut","handleZoomOut","zoomOutIcon","isBlockCommentExperimentEnabled","__experimentalEnableBlockComment","toolbarVariations","backButtonVariations","customSaveButton","forceDisableBlockTools","isTooNarrowForDocumentBar","useMediaQuery","isTextEditor","_isPublishSidebarOpened","canBeZoomedOut","disablePreviewOption","isBlockToolsCollapsed","setIsBlockToolsCollapsed","hasCenter","useHasBackButton","hasSectionRootClientId","getSectionRootClientId","DocumentTools","PrivateInserterLibrary","InserterSidebar","blockSectionRootClientId","inserter","showMostUsedBlocks","sidebarIsOpened","getBlockSectionRootClientId","libraryRef","closeInserterSidebar","closeOnEscape","ESCAPE","defaultPrevented","inserterContents","showInserterHelpPanel","shouldFocusBlock","__experimentalInitialTab","__experimentalInitialCategory","__experimentalFilterValue","onPatternCategorySelection","ListViewOutline","TabbedSidebar","ListViewSidebar","focusOnMountRef","useFocusOnMount","closeListView","dropZoneElement","setDropZoneElement","setTab","sidebarRef","tabsRef","listViewRef","listViewContainerRef","handleToggleListViewShortcut","currentTab","tabPanelFocus","tabbable","listViewApplicationFocus","handleSidebarFocus","tabs","panel","ListView","panelRef","tabName","defaultTabId","SavePublishPanels","isEntitiesSavedStatesOpen","forceIsDirtyPublishPanel","publishSidebarOpened","hasOtherEntitiesChanges","_hasOtherEntitiesChanges","openEntitiesSavedStates","unmountableContent","TextEditor","autoFocus","titleRef","PostTitleRaw","EditTemplateBlocksNotification","contentRef","canEditTemplate","isDialogOpen","setIsDialogOpen","handleDblClick","dataset","canvas","ResizeHandle","resizeWidthBy","resizableHandleHelpId","button","LEFT","RIGHT","active","scaleY","whileFocus","whileTap","HANDLE_STYLES_OVERRIDE","userSelect","top","bottom","enableResizing","setWidth","resizableRef","deltaPixels","ResizableBox","api","resizable","onResizeStop","minWidth","maxWidth","enable","showHandle","resizeRatio","handleComponent","handleClasses","handleStyles","clamp","distanceFromRect","rect","dx","dy","sqrt","useSelectNearestEditableBlock","getEnabledClientIdsTree","useRefEffect","handleClick","selectNearestEditableBlock","editableBlockClientIds","nearestDistance","nearestClientId","distance","getBoundingClientRect","clientX","clientY","useZoomOutModeExit","onDoubleClick","LayoutStyle","useLayoutClasses","useLayoutStyles","ExperimentalBlockCanvas","BlockCanvas","useFlashEditableBlocks","getPostContentAttributes","nestedPostContent","checkForPostContentAtRootLevel","disableIframe","iframeProps","contentHeight","setContentHeight","effectContentHeight","entry","borderBoxSize","blockSize","postContentAttributes","editedPostTemplate","wrapperBlockName","wrapperUniqueId","isFocusedEntity","isDesignPostType","_renderingMode","_wrapperBlockName","postTypeObject","hasRootPaddingAwareAlignments","themeHasDisabledLayoutStyles","themeSupportsLayout","isZoomedOut","_isZoomOut","disableLayoutStyles","supportsLayout","__experimentalFeatures","useRootPaddingAwareAlignments","deviceStyles","useResizeCanvas","globalLayoutSettings","useSettings","fallbackLayout","newestPostContentAttributes","parseableContent","hasPostContentAtRootLevel","postContentLayoutClasses","blockListLayoutClass","postContentLayoutStyles","postContentLayout","contentSize","wideSize","blockListLayout","postEditorLayout","observeTypingRef","useTypingObserver","forceFullHeight","iframeStyles","css","localRef","typewriterRef","useTypewriter","ResizableEditor","shouldIframe","selector","RecursionProvider","uniqueId","__unstableDisableDropZone","interfaceLabels","EditorInterface","customSavePanel","documentLabel","secondarySidebarLabel","InterfaceSkeleton","EditorNotices","EditorContentSlotFill","editorCanvasView","VisualEditor","BlockBreadcrumb","rootLabelText","OverridesPanel","PatternOverridesPanel","SetAsHomepageModal","pageTitle","showOnFront","currentHomePage","isSavingEntityRecord","currentHomePageItem","show_on_front","modalWarning","modalText","modalButtonLabel","useSetAsHomepageAction","SetAsPostsPageModal","currentPostsPage","isPageForPostsSet","useSetAsPostsPageAction","usePostActions","defaultActions","canManageOptions","hasFrontPageTemplate","setAsHomepageAction","setAsPostsPageAction","shouldShowHomepageActions","existingCallback","argsObject","_items","ExistingRenderModal","Menu","PostActions","activeModalAction","setActiveModalAction","itemsWithPermissions","postIds","getEntityRecordPermissions","useEditedEntityRecordsWithPermissions","allActions","itemWithPermissions","TriggerButton","ActionsDropdownMenuGroup","ActionModal","DropdownMenuItemTrigger","Item","ItemLabel","__experimentalHideHeader","Group","PostCardPanel","postTitle","_title","_record","_getEntityRecord","PostContentInformation","postContent","wordsCounted","readingTime","wordsCountText","toLocaleString","minutesText","activeFormat","PostFormatForm","PostLastEditedPanel","lastEditedText","humanTimeDiff","BlogTitle","postsPageTitle","_postsPageRecord","setPostsPageTitle","decodedTitle","PostsPerPage","postsPerPage","posts_per_page","setPostsPerPage","spinControls","step","SiteDiscussion","allowCommentsOnNewPosts","default_comment_status","setAllowCommentsOnNewPosts","PostSummary","isRemovedPostStatusPanel","PostPanelSection","PostStatusPanel","PostAuthorPanel","EXCLUDED_PATTERN_SOURCES","preparePatterns","keywords","showTitlesAsTooltip","PostTransform","availablePatterns","restBlockPatterns","filterOutDuplicatesByName","currentItem","filterOutExcludedPatternSources","filterCompatiblePatterns","filterPatterns","useAvailablePatterns","selectedTemplate","PostTransformPanel","sidebars","Tabs","SidebarHeader","TabList","Tab","tabId","BlockQuickNavigation","TemplateContentPanel","postContentBlockTypes","TemplatePartContentPanelInner","themeBlockNames","themeBlocks","TemplatePartContentPanel","SIDEBAR_ACTIVE_BY_DEFAULT","web","native","SidebarContent","keyboardShortcut","extraPanels","tabListRef","tabsContextValue","Context","tabsElements","from","querySelectorAll","selectedTabElement","getAttribute","TabPanel","focusable","PostTaxonomiesPanel","Sidebar","activeGeneralSidebar","isEditorSidebarOpened","useAutoSwitchEditorSidebars","showSummary","_tabName","onTabSelect","newSelectedTabId","selectedTabId","selectOnMove","EnablePublishSidebarOption","BlockManager","BlockVisibility","_allowedBlockTypes","_hiddenBlockTypes","filteredBlockTypes","hasBlockSupport","hiddenBlock","registeredBlock","selectedBlockTypes","newSelectedBlockTypes","blockTypesToHide","blockTypesToShow","PreferencesModal","PreferencesModalTabs","PreferencesModalSection","PreferenceToggleControl","PreferencesModalContents","extraSections","showBlockBreadcrumbsOption","sections","tabLabel","general","appearance","__experimentalMediaProcessing","CONTENT","getValues","patternOverridesContent","currentBlockAttributes","overridesValues","overridableValue","patternClientId","attrs","syncBlocksWithSameName","currentBindingValue","canUserEditValue","getPostMetaFields","coreDataStore","getRegisteredPostMeta","entityMetaValues","registeredFields","metaFields","_entityMetaValues$key","_ref","fieldKey","newMeta","queryId","getFieldsList","remainingInterfaceApis","interfaceApis","_registerEntityAction","_unregisterEntityAction","_registerEntityField","_unregisterEntityField","Editor","extraContent","extraSidebarPanels","hasLoadedPost","GlobalStylesProvider","usePostFields","defaultFields","records","isLoadingAuthors","useEntityRecords","registerCoreBlockBindingsSources","registerBlockBindingsSource","patternOverrides","postMeta"],"sourceRoot":""}
| ver. 1.4 |
Github
|
.
| PHP 5.4.45 | Generation time: 0.07 |
proxy
|
phpinfo
|
Settings