%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-editor/
Upload File :
Create Path :
Current File : /home/dordingu/public_html/hardkjarni/wp-content/plugins/gutenberg/build/block-editor/index.min.js.map

{"version":3,"file":"./build/block-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,OAQX,CAPE,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,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,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,I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SAAUggF,GACrB,OAAOA,EAAQa,QAAS,GAAM,KAE/B,QAAiBllK,IAAZqkK,EACJ,OAAO,KAER,IAAInjD,EAAakjD,GAAWC,GAM5B,OAJOnjD,EAAW58C,OACjB48C,EAAawjD,GAAmBL,IAG5BO,GAAkBP,KAAenjD,EAAW58C,KACzCugG,GAAoBR,GAGrBc,GAAuBjkD,EAAYxkH,EAC1C,CAGD,MAAM2oB,GAAQ,CAAC,EAiBf,SAASghJ,GAAa3pK,GACrB,IAAI4pK,EAAO,GAgBX,OAfK5pK,EAAQQ,eAAgB,cAC5BopK,EAAO,IAAM5pK,EAAQvB,OAEjBuB,EAAQQ,eAAgB,gBAC5BopK,EAAO,IAAM5pK,EAAQ2N,YAEjB3N,EAAQQ,eAAgB,WAC5BopK,EAAO,IAAM5pK,EAAQvB,OAEjBuB,EAAQQ,eAAgB,YAC5BopK,EAAO,IAAM5pK,EAAQtC,QAEjBsC,EAAQQ,eAAgB,UAC5BopK,EAAO,IAAM5pK,EAAQghB,MAEf4oJ,CACP,CAED,SA7BA,SAAmCjC,GAAwB,IAAf3nK,EAAe,uDAAL,CAAC,EACtD,MAAM4pK,EAAOjC,EAAUgC,GAAa3pK,GAKpC,OAHO2oB,GAAOihJ,KACbjhJ,GAAOihJ,GAAS7B,GAAkBJ,EAAS3nK,IAErC2oB,GAAOihJ,EACd,C","sources":["webpack://wp/./node_modules/autosize/dist/autosize.js","webpack://wp/./node_modules/classnames/index.js","webpack://wp/./node_modules/computed-style/dist/computedStyle.commonjs.js","webpack://wp/./node_modules/diff/src/diff/base.js","webpack://wp/./node_modules/diff/src/diff/character.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/dom-scroll-into-view.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/index.js","webpack://wp/./node_modules/dom-scroll-into-view/lib/util.js","webpack://wp/./node_modules/inherits/inherits_browser.js","webpack://wp/./node_modules/line-height/lib/line-height.js","webpack://wp/./node_modules/normalize-wheel/index.js","webpack://wp/./node_modules/normalize-wheel/src/ExecutionEnvironment.js","webpack://wp/./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack://wp/./node_modules/normalize-wheel/src/isEventSupported.js","webpack://wp/./node_modules/normalize-wheel/src/normalizeWheel.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/./node_modules/traverse/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\",\"blocks\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/compat.js","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window \"lodash\"","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/./packages/block-editor/build-module/components/block-controls/@wordpress/block-editor/src/components/block-controls/groups.js","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/defaults.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/array.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/reducer.js","webpack://wp/./node_modules/rememo/es/rememo.js","webpack://wp/external window [\"wp\",\"primitives\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/symbol.js","webpack://wp/external window [\"wp\",\"richText\"]","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/utils.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/selectors.js","webpack://wp/external window [\"wp\",\"a11y\"]","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/selection.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/actions.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/constants.js","webpack://wp/./packages/block-editor/build-module/store/@wordpress/block-editor/src/store/index.js","webpack://wp/./packages/block-editor/build-module/components/block-edit/@wordpress/block-editor/src/components/block-edit/context.js","webpack://wp/./packages/block-editor/build-module/components/use-display-block-controls/@wordpress/block-editor/src/components/use-display-block-controls/index.js","webpack://wp/./packages/block-editor/build-module/components/block-controls/@wordpress/block-editor/src/components/block-controls/fill.js","webpack://wp/./packages/block-editor/build-module/components/block-controls/@wordpress/block-editor/src/components/block-controls/hook.js","webpack://wp/./packages/block-editor/build-module/components/block-controls/@wordpress/block-editor/src/components/block-controls/slot.js","webpack://wp/./packages/block-editor/build-module/components/block-controls/@wordpress/block-editor/src/components/block-controls/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/justify-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/justify-center.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/justify-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/justify-space-between.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-down.js","webpack://wp/./packages/block-editor/build-module/layouts/@wordpress/block-editor/src/layouts/utils.js","webpack://wp/./packages/block-editor/build-module/components/provider/@wordpress/block-editor/src/components/provider/block-refs-provider.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-block-refs.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/utils.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/settings.js","webpack://wp/./packages/block-editor/build-module/components/use-setting/@wordpress/block-editor/src/components/use-setting/index.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/spacing-input-control.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/all-input-control.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/input-controls.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/axial-input-controls.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/link.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/link-off.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/linked-button.js","webpack://wp/./packages/block-editor/build-module/components/spacing-sizes-control/@wordpress/block-editor/src/components/spacing-sizes-control/index.js","webpack://wp/external window [\"wp\",\"warning\"]","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/groups.js","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/fill.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/utils.js","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/block-support-tools-panel.js","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/block-support-slot-container.js","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/slot.js","webpack://wp/./packages/block-editor/build-module/components/inspector-controls/@wordpress/block-editor/src/components/inspector-controls/index.js","webpack://wp/external window [\"wp\",\"isShallowEqual\"]","webpack://wp/./packages/block-editor/build-module/components/block-popover/@wordpress/block-editor/src/components/block-popover/use-popover-scroll.js","webpack://wp/./packages/block-editor/build-module/components/block-popover/@wordpress/block-editor/src/components/block-popover/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/margin.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/padding.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/dimensions.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/gap.js","webpack://wp/./packages/block-editor/build-module/components/block-vertical-alignment-control/@wordpress/block-editor/src/components/block-vertical-alignment-control/icons.js","webpack://wp/./packages/block-editor/build-module/components/block-vertical-alignment-control/@wordpress/block-editor/src/components/block-vertical-alignment-control/ui.js","webpack://wp/./packages/block-editor/build-module/components/block-vertical-alignment-control/@wordpress/block-editor/src/components/block-vertical-alignment-control/index.js","webpack://wp/./packages/block-editor/build-module/components/justify-content-control/@wordpress/block-editor/src/components/justify-content-control/ui.js","webpack://wp/./packages/block-editor/build-module/components/justify-content-control/@wordpress/block-editor/src/components/justify-content-control/index.js","webpack://wp/./packages/block-editor/build-module/layouts/@wordpress/block-editor/src/layouts/flex.js","webpack://wp/./packages/block-editor/build-module/layouts/@wordpress/block-editor/src/layouts/flow.js","webpack://wp/./packages/icons/build-module/icon/@wordpress/icons/src/icon/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/position-center.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/stretch-wide.js","webpack://wp/external window [\"wp\",\"styleEngine\"]","webpack://wp/./packages/block-editor/build-module/layouts/@wordpress/block-editor/src/layouts/constrained.js","webpack://wp/./packages/block-editor/build-module/layouts/@wordpress/block-editor/src/layouts/index.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/layout.js","webpack://wp/./packages/block-editor/build-module/components/block-alignment-control/@wordpress/block-editor/src/components/block-alignment-control/use-available-alignments.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/align-none.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/position-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/position-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/stretch-full-width.js","webpack://wp/./packages/block-editor/build-module/components/block-alignment-control/@wordpress/block-editor/src/components/block-alignment-control/constants.js","webpack://wp/./packages/block-editor/build-module/components/block-alignment-control/@wordpress/block-editor/src/components/block-alignment-control/ui.js","webpack://wp/./packages/block-editor/build-module/components/block-alignment-control/@wordpress/block-editor/src/components/block-alignment-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/align.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/lock.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/anchor.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/aria-label.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/custom-class-name.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/generated-class-name.js","webpack://wp/external window [\"wp\",\"dom\"]","webpack://wp/./packages/block-editor/build-module/components/block-context/@wordpress/block-editor/src/components/block-context/index.js","webpack://wp/./packages/block-editor/build-module/components/block-edit/@wordpress/block-editor/src/components/block-edit/edit.js","webpack://wp/./packages/block-editor/build-module/components/block-edit/@wordpress/block-editor/src/components/block-edit/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/more-horizontal.js","webpack://wp/./packages/block-editor/build-module/components/warning/@wordpress/block-editor/src/components/warning/index.js","webpack://wp/./packages/block-editor/build-module/components/block-compare/@wordpress/block-editor/src/components/block-compare/block-view.js","webpack://wp/./packages/block-editor/build-module/components/block-compare/@wordpress/block-editor/src/components/block-compare/index.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/block-invalid-warning.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/block-crash-warning.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/block-crash-boundary.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/block-html.js","webpack://wp/./node_modules/@react-spring/rafz/dist/react-spring-rafz.esm.js","webpack://wp/./node_modules/@react-spring/shared/dist/react-spring-shared.esm.js","webpack://wp/./node_modules/@react-spring/animated/dist/react-spring-animated.esm.js","webpack://wp/./node_modules/@react-spring/core/dist/react-spring-core.esm.js","webpack://wp/external window \"ReactDOM\"","webpack://wp/./node_modules/@react-spring/web/dist/react-spring-web.esm.js","webpack://wp/./packages/block-editor/build-module/components/use-moving-animation/@wordpress/block-editor/src/components/use-moving-animation/index.js","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/dom.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-focus-first-element.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-is-hovered.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-block-class-names.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-block-default-class-name.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-block-custom-class-name.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-block-moving-mode-class-names.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-focus-handler.js","webpack://wp/external window [\"wp\",\"keycodes\"]","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-nav-mode-exit.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/use-intersection-observer.js","webpack://wp/./packages/block-editor/build-module/components/block-content-overlay/@wordpress/block-editor/src/components/block-content-overlay/index.js","webpack://wp/./packages/block-editor/build-module/components/block-list/use-block-props/@wordpress/block-editor/src/components/block-list/use-block-props/index.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/block.js","webpack://wp/external window [\"wp\",\"htmlEntities\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/plus.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/tips.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/block-default.js","webpack://wp/./packages/block-editor/build-module/components/block-icon/@wordpress/block-editor/src/components/block-icon/index.js","webpack://wp/./packages/block-editor/build-module/components/block-card/@wordpress/block-editor/src/components/block-card/index.js","webpack://wp/./packages/block-editor/build-module/components/provider/@wordpress/block-editor/src/components/provider/with-registry-provider.js","webpack://wp/./packages/block-editor/build-module/components/provider/@wordpress/block-editor/src/components/provider/use-block-sync.js","webpack://wp/./packages/block-editor/build-module/components/provider/@wordpress/block-editor/src/components/provider/index.js","webpack://wp/./packages/block-editor/build-module/components/block-preview/@wordpress/block-editor/src/components/block-preview/live.js","webpack://wp/./packages/block-editor/build-module/components/block-selection-clearer/@wordpress/block-editor/src/components/block-selection-clearer/index.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-multi-selection.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-arrow-nav.js","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-select-all.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-drag-selection.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-selection-observer.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-click-selection.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-input.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/index.js","webpack://wp/./packages/block-editor/build-module/components/writing-flow/@wordpress/block-editor/src/components/writing-flow/use-tab-nav.js","webpack://wp/./packages/block-editor/build-module/components/iframe/@wordpress/block-editor/src/components/iframe/index.js","webpack://wp/./node_modules/colord/index.mjs","webpack://wp/./node_modules/colord/plugins/names.mjs","webpack://wp/./node_modules/colord/plugins/a11y.mjs","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/ast/@wordpress/block-editor/src/utils/transform-styles/ast/parse.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/ast/stringify/@wordpress/block-editor/src/utils/transform-styles/ast/stringify/compiler.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/ast/stringify/@wordpress/block-editor/src/utils/transform-styles/ast/stringify/compress.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/ast/stringify/@wordpress/block-editor/src/utils/transform-styles/ast/stringify/identity.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/@wordpress/block-editor/src/utils/transform-styles/traverse.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/ast/stringify/@wordpress/block-editor/src/utils/transform-styles/ast/stringify/index.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/transforms/@wordpress/block-editor/src/utils/transform-styles/transforms/url-rewrite.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/transforms/@wordpress/block-editor/src/utils/transform-styles/transforms/wrap.js","webpack://wp/./packages/block-editor/build-module/utils/transform-styles/@wordpress/block-editor/src/utils/transform-styles/index.js","webpack://wp/./packages/block-editor/build-module/components/editor-styles/@wordpress/block-editor/src/components/editor-styles/index.js","webpack://wp/./packages/block-editor/build-module/components/duotone/@wordpress/block-editor/src/components/duotone/utils.js","webpack://wp/./packages/block-editor/build-module/components/duotone/@wordpress/block-editor/src/components/duotone/components.js","webpack://wp/./packages/block-editor/build-module/components/block-preview/@wordpress/block-editor/src/components/block-preview/auto.js","webpack://wp/./packages/block-editor/build-module/components/block-preview/@wordpress/block-editor/src/components/block-preview/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/preview-panel.js","webpack://wp/./packages/block-editor/build-module/components/inserter-listbox/@wordpress/block-editor/src/components/inserter-listbox/context.js","webpack://wp/./packages/block-editor/build-module/components/inserter-listbox/@wordpress/block-editor/src/components/inserter-listbox/item.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/drag-handle.js","webpack://wp/./packages/block-editor/build-module/components/block-draggable/@wordpress/block-editor/src/components/block-draggable/draggable-chip.js","webpack://wp/./packages/block-editor/build-module/components/inserter-draggable-blocks/@wordpress/block-editor/src/components/inserter-draggable-blocks/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter-list-item/@wordpress/block-editor/src/components/inserter-list-item/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter-listbox/@wordpress/block-editor/src/components/inserter-listbox/group.js","webpack://wp/./packages/block-editor/build-module/components/inserter-listbox/@wordpress/block-editor/src/components/inserter-listbox/row.js","webpack://wp/./packages/block-editor/build-module/components/block-types-list/@wordpress/block-editor/src/components/block-types-list/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/panel.js","webpack://wp/./packages/block-editor/build-module/components/inserter/hooks/@wordpress/block-editor/src/components/inserter/hooks/use-block-types-state.js","webpack://wp/./packages/block-editor/build-module/components/inserter-listbox/@wordpress/block-editor/src/components/inserter-listbox/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/block-types-tab.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/pattern-panel.js","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/./packages/block-editor/build-module/components/inserter/hooks/@wordpress/block-editor/src/components/inserter/hooks/use-patterns-state.js","webpack://wp/./packages/block-editor/build-module/components/block-patterns-list/@wordpress/block-editor/src/components/block-patterns-list/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/block-patterns-explorer/@wordpress/block-editor/src/components/inserter/block-patterns-explorer/sidebar.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/no-results.js","webpack://wp/./packages/block-editor/build-module/components/inserter/hooks/@wordpress/block-editor/src/components/inserter/hooks/use-insertion-point.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/search-items.js","webpack://wp/./packages/block-editor/build-module/components/inserter/block-patterns-explorer/@wordpress/block-editor/src/components/inserter/block-patterns-explorer/patterns-list.js","webpack://wp/./packages/block-editor/build-module/components/inserter/block-patterns-explorer/@wordpress/block-editor/src/components/inserter/block-patterns-explorer/explorer.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/block-patterns-tab.js","webpack://wp/external window [\"wp\",\"url\"]","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/reusable-blocks-tab.js","webpack://wp/./packages/block-editor/build-module/components/inserter-menu-extension/@wordpress/block-editor/src/components/inserter-menu-extension/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/search-results.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/tabs.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/menu.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/quick-inserter.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/index.js","webpack://wp/./packages/block-editor/build-module/components/default-block-appender/@wordpress/block-editor/src/components/default-block-appender/index.js","webpack://wp/./packages/block-editor/build-module/components/button-block-appender/@wordpress/block-editor/src/components/button-block-appender/index.js","webpack://wp/./packages/block-editor/build-module/components/block-list-appender/@wordpress/block-editor/src/components/block-list-appender/index.js","webpack://wp/./packages/block-editor/build-module/components/block-popover/@wordpress/block-editor/src/components/block-popover/inbetween.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/insertion-point.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/use-in-between-inserter.js","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/pre-parse-patterns.js","webpack://wp/./packages/block-editor/build-module/components/use-block-display-information/@wordpress/block-editor/src/components/use-block-display-information/index.js","webpack://wp/./packages/block-editor/build-module/components/block-title/@wordpress/block-editor/src/components/block-title/use-block-display-title.js","webpack://wp/./packages/block-editor/build-module/components/block-title/@wordpress/block-editor/src/components/block-title/index.js","webpack://wp/./packages/block-editor/build-module/components/block-draggable/@wordpress/block-editor/src/components/block-draggable/index.js","webpack://wp/./packages/block-editor/build-module/components/block-draggable/@wordpress/block-editor/src/components/block-draggable/use-scroll-when-dragging.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-right.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-up.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-down.js","webpack://wp/./packages/block-editor/build-module/components/block-mover/@wordpress/block-editor/src/components/block-mover/mover-description.js","webpack://wp/./packages/block-editor/build-module/components/block-mover/@wordpress/block-editor/src/components/block-mover/button.js","webpack://wp/./packages/block-editor/build-module/components/block-mover/@wordpress/block-editor/src/components/block-mover/index.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/block-selection-button.js","webpack://wp/./packages/block-editor/build-module/components/navigable-toolbar/@wordpress/block-editor/src/components/navigable-toolbar/index.js","webpack://wp/./packages/block-editor/build-module/components/block-toolbar/@wordpress/block-editor/src/components/block-toolbar/utils.js","webpack://wp/./packages/block-editor/build-module/components/block-parent-selector/@wordpress/block-editor/src/components/block-parent-selector/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/copy.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/preview-block-popover.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/block-transformations-menu.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/check.js","webpack://wp/external window [\"wp\",\"tokenList\"]","webpack://wp/./packages/block-editor/build-module/components/block-styles/@wordpress/block-editor/src/components/block-styles/utils.js","webpack://wp/./packages/block-editor/build-module/components/block-styles/@wordpress/block-editor/src/components/block-styles/use-styles-for-block.js","webpack://wp/./packages/block-editor/build-module/components/block-styles/@wordpress/block-editor/src/components/block-styles/menu-items.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/block-styles-menu.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/utils.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/use-transformed-patterns.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/pattern-transformations-menu.js","webpack://wp/./packages/block-editor/build-module/components/block-switcher/@wordpress/block-editor/src/components/block-switcher/index.js","webpack://wp/./packages/block-editor/build-module/components/block-toolbar/@wordpress/block-editor/src/components/block-toolbar/block-toolbar-last-item.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/more-vertical.js","webpack://wp/external window [\"wp\",\"blob\"]","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/pasting.js","webpack://wp/./packages/block-editor/build-module/components/copy-handler/@wordpress/block-editor/src/components/copy-handler/index.js","webpack://wp/./packages/block-editor/build-module/components/block-actions/@wordpress/block-editor/src/components/block-actions/index.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/block-mode-toggle.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/block-html-convert-button.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/block-convert-button.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/block-settings-menu-first-item.js","webpack://wp/./packages/block-editor/build-module/components/convert-to-group-buttons/@wordpress/block-editor/src/components/convert-to-group-buttons/index.js","webpack://wp/./packages/block-editor/build-module/components/convert-to-group-buttons/@wordpress/block-editor/src/components/convert-to-group-buttons/use-convert-to-group-button-props.js","webpack://wp/./packages/block-editor/build-module/components/block-lock/@wordpress/block-editor/src/components/block-lock/use-block-lock.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/unlock.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/lock.js","webpack://wp/./packages/block-editor/build-module/components/block-lock/@wordpress/block-editor/src/components/block-lock/modal.js","webpack://wp/./packages/block-editor/build-module/components/block-lock/@wordpress/block-editor/src/components/block-lock/menu-item.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu-controls/@wordpress/block-editor/src/components/block-settings-menu-controls/index.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/block-settings-dropdown.js","webpack://wp/./packages/block-editor/build-module/components/block-settings-menu/@wordpress/block-editor/src/components/block-settings-menu/index.js","webpack://wp/./packages/block-editor/build-module/components/block-lock/@wordpress/block-editor/src/components/block-lock/toolbar.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/group.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/row.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/stack.js","webpack://wp/./packages/block-editor/build-module/components/convert-to-group-buttons/@wordpress/block-editor/src/components/convert-to-group-buttons/toolbar.js","webpack://wp/./packages/block-editor/build-module/components/block-edit-visually-button/@wordpress/block-editor/src/components/block-edit-visually-button/index.js","webpack://wp/./packages/block-editor/build-module/components/block-toolbar/@wordpress/block-editor/src/components/block-toolbar/block-name-context.js","webpack://wp/./packages/block-editor/build-module/components/block-toolbar/@wordpress/block-editor/src/components/block-toolbar/index.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/block-contextual-toolbar.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/use-block-toolbar-popover-props.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/selected-block-popover.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/back-compat.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/with-client-id.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/button-block-appender.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/default-block-appender.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/use-nested-settings-update.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/get-block-context.js","webpack://wp/./packages/block-editor/build-module/components/use-on-block-drop/@wordpress/block-editor/src/components/use-on-block-drop/index.js","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/math.js","webpack://wp/./packages/block-editor/build-module/components/use-block-drop-zone/@wordpress/block-editor/src/components/use-block-drop-zone/index.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/index.js","webpack://wp/./packages/block-editor/build-module/components/inner-blocks/@wordpress/block-editor/src/components/inner-blocks/use-inner-block-template-sync.js","webpack://wp/./packages/block-editor/build-module/components/block-list/@wordpress/block-editor/src/components/block-list/index.js","webpack://wp/./packages/block-editor/build-module/components/border-radius-control/@wordpress/block-editor/src/components/border-radius-control/utils.js","webpack://wp/./packages/block-editor/build-module/components/border-radius-control/@wordpress/block-editor/src/components/border-radius-control/all-input-control.js","webpack://wp/./packages/block-editor/build-module/components/border-radius-control/@wordpress/block-editor/src/components/border-radius-control/input-controls.js","webpack://wp/./packages/block-editor/build-module/components/border-radius-control/@wordpress/block-editor/src/components/border-radius-control/linked-button.js","webpack://wp/./packages/block-editor/build-module/components/border-radius-control/@wordpress/block-editor/src/components/border-radius-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/border-radius.js","webpack://wp/./packages/block-editor/build-module/components/colors/@wordpress/block-editor/src/components/colors/utils.js","webpack://wp/./packages/block-editor/build-module/components/colors-gradients/@wordpress/block-editor/src/components/colors-gradients/use-common-single-multiple-selects.js","webpack://wp/./packages/block-editor/build-module/components/colors-gradients/@wordpress/block-editor/src/components/colors-gradients/use-multiple-origin-colors-and-gradients.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/border.js","webpack://wp/./packages/block-editor/build-module/components/gradients/@wordpress/block-editor/src/components/gradients/use-gradient.js","webpack://wp/./packages/block-editor/build-module/components/colors-gradients/@wordpress/block-editor/src/components/colors-gradients/control.js","webpack://wp/./packages/block-editor/build-module/components/colors-gradients/@wordpress/block-editor/src/components/colors-gradients/dropdown.js","webpack://wp/./packages/block-editor/build-module/components/contrast-checker/@wordpress/block-editor/src/components/contrast-checker/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/color-panel.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/color.js","webpack://wp/./packages/block-editor/build-module/components/font-appearance-control/@wordpress/block-editor/src/components/font-appearance-control/index.js","webpack://wp/./packages/block-editor/build-module/components/line-height-control/@wordpress/block-editor/src/components/line-height-control/utils.js","webpack://wp/./packages/block-editor/build-module/components/line-height-control/@wordpress/block-editor/src/components/line-height-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/line-height.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/font-appearance.js","webpack://wp/./packages/block-editor/build-module/components/font-family/@wordpress/block-editor/src/components/font-family/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/font-family.js","webpack://wp/./packages/block-editor/build-module/components/font-sizes/@wordpress/block-editor/src/components/font-sizes/utils.js","webpack://wp/./packages/block-editor/build-module/components/font-sizes/@wordpress/block-editor/src/components/font-sizes/font-size-picker.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/font-size.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/reset.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/format-underline.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/format-strikethrough.js","webpack://wp/./packages/block-editor/build-module/components/text-decoration-control/@wordpress/block-editor/src/components/text-decoration-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/text-decoration.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/format-uppercase.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/format-lowercase.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/format-capitalize.js","webpack://wp/./packages/block-editor/build-module/components/text-transform-control/@wordpress/block-editor/src/components/text-transform-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/text-transform.js","webpack://wp/./packages/block-editor/build-module/components/letter-spacing-control/@wordpress/block-editor/src/components/letter-spacing-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/letter-spacing.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/typography.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/style.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/settings.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/filter.js","webpack://wp/./packages/block-editor/build-module/components/duotone-control/@wordpress/block-editor/src/components/duotone-control/index.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/duotone.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/layout.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/content-lock-ui.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/metadata.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/use-border-props.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/use-color-props.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/metadata-name.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/use-spacing-props.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/use-typography-props.js","webpack://wp/./packages/block-editor/build-module/hooks/@wordpress/block-editor/src/hooks/use-cached-truthy.js","webpack://wp/./packages/block-editor/build-module/components/colors/@wordpress/block-editor/src/components/colors/with-colors.js","webpack://wp/./packages/block-editor/build-module/components/font-sizes/@wordpress/block-editor/src/components/font-sizes/with-font-sizes.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/align-left.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/align-center.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/align-right.js","webpack://wp/./packages/block-editor/build-module/components/alignment-control/@wordpress/block-editor/src/components/alignment-control/ui.js","webpack://wp/./packages/block-editor/build-module/components/alignment-control/@wordpress/block-editor/src/components/alignment-control/index.js","webpack://wp/./packages/block-editor/build-module/autocompleters/@wordpress/block-editor/src/autocompleters/block.js","webpack://wp/external window [\"wp\",\"apiFetch\"]","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/page.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/post.js","webpack://wp/./packages/block-editor/build-module/autocompleters/@wordpress/block-editor/src/autocompleters/link.js","webpack://wp/./packages/block-editor/build-module/components/autocomplete/@wordpress/block-editor/src/components/autocomplete/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/fullscreen.js","webpack://wp/./packages/block-editor/build-module/components/block-full-height-alignment-control/@wordpress/block-editor/src/components/block-full-height-alignment-control/index.js","webpack://wp/./packages/block-editor/build-module/components/block-alignment-matrix-control/@wordpress/block-editor/src/components/block-alignment-matrix-control/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-right-small.js","webpack://wp/./packages/block-editor/build-module/components/block-breadcrumb/@wordpress/block-editor/src/components/block-breadcrumb/index.js","webpack://wp/./packages/block-editor/build-module/components/color-style-selector/@wordpress/block-editor/src/components/color-style-selector/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/list-view.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/leaf.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/chevron-left-small.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/expander.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/block-select-button.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/block-contents.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/context.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/block.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/utils.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/branch.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/drop-indicator.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/use-list-view-drop-zone.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/index.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/use-list-view-client-ids.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/use-block-selection.js","webpack://wp/./packages/block-editor/build-module/components/list-view/@wordpress/block-editor/src/components/list-view/use-list-view-expand-selected-item.js","webpack://wp/./packages/block-editor/build-module/components/block-navigation/@wordpress/block-editor/src/components/block-navigation/dropdown.js","webpack://wp/./packages/block-editor/build-module/components/block-styles/@wordpress/block-editor/src/components/block-styles/preview-panel.js","webpack://wp/./packages/block-editor/build-module/components/block-styles/@wordpress/block-editor/src/components/block-styles/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/layout.js","webpack://wp/./packages/block-editor/build-module/components/block-variation-picker/@wordpress/block-editor/src/components/block-variation-picker/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/grid.js","webpack://wp/./packages/block-editor/build-module/components/block-pattern-setup/@wordpress/block-editor/src/components/block-pattern-setup/constants.js","webpack://wp/./packages/block-editor/build-module/components/block-pattern-setup/@wordpress/block-editor/src/components/block-pattern-setup/setup-toolbar.js","webpack://wp/./packages/block-editor/build-module/components/block-pattern-setup/@wordpress/block-editor/src/components/block-pattern-setup/index.js","webpack://wp/./packages/block-editor/build-module/components/block-pattern-setup/@wordpress/block-editor/src/components/block-pattern-setup/use-patterns-setup.js","webpack://wp/./packages/block-editor/build-module/components/block-variation-transforms/@wordpress/block-editor/src/components/block-variation-transforms/index.js","webpack://wp/./packages/block-editor/build-module/components/color-palette/@wordpress/block-editor/src/components/color-palette/with-color-context.js","webpack://wp/./packages/block-editor/build-module/components/color-palette/@wordpress/block-editor/src/components/color-palette/index.js","webpack://wp/./packages/block-editor/build-module/components/color-palette/@wordpress/block-editor/src/components/color-palette/control.js","webpack://wp/external window [\"wp\",\"date\"]","webpack://wp/./packages/block-editor/build-module/components/date-format-picker/@wordpress/block-editor/src/components/date-format-picker/index.js","webpack://wp/./packages/block-editor/build-module/components/colors-gradients/@wordpress/block-editor/src/components/colors-gradients/panel-color-gradient-settings.js","webpack://wp/./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js","webpack://wp/./node_modules/src/helpers.ts","webpack://wp/./node_modules/src/Cropper.tsx","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/constants.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/context.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/use-transform-image.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/use-save-image.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/cropper.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/search.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/zoom-dropdown.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/aspect-ratio.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/aspect-ratio-dropdown.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/rotate-right.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/rotation-button.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/form-controls.js","webpack://wp/./packages/block-editor/build-module/components/image-editor/@wordpress/block-editor/src/components/image-editor/index.js","webpack://wp/./packages/block-editor/build-module/components/image-size-control/@wordpress/block-editor/src/components/image-size-control/index.js","webpack://wp/./packages/block-editor/build-module/components/image-size-control/@wordpress/block-editor/src/components/image-size-control/use-dimension-handler.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/keyboard-return.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/settings-drawer.js","webpack://wp/./packages/block-editor/build-module/components/url-input/@wordpress/block-editor/src/components/url-input/index.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/search-create-button.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/post-list.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/tag.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/category.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/file.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/globe.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/search-item.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/constants.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/search-results.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/is-url-like.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/use-search-handler.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/search-input.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/info.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/edit.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/pencil.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/viewer-slot.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/use-rich-url-data.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/link-preview.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/use-create-page.js","webpack://wp/./packages/block-editor/build-module/components/link-control/@wordpress/block-editor/src/components/link-control/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/media.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/upload.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/post-featured-image.js","webpack://wp/./packages/block-editor/build-module/components/media-upload/@wordpress/block-editor/src/components/media-upload/index.js","webpack://wp/./packages/block-editor/build-module/components/media-upload/@wordpress/block-editor/src/components/media-upload/check.js","webpack://wp/./packages/block-editor/build-module/components/media-replace-flow/@wordpress/block-editor/src/components/media-replace-flow/index.js","webpack://wp/./packages/block-editor/build-module/components/url-popover/@wordpress/block-editor/src/components/url-popover/link-viewer-url.js","webpack://wp/./packages/block-editor/build-module/components/url-popover/@wordpress/block-editor/src/components/url-popover/index.js","webpack://wp/./packages/block-editor/build-module/components/url-popover/@wordpress/block-editor/src/components/url-popover/link-editor.js","webpack://wp/./packages/block-editor/build-module/components/url-popover/@wordpress/block-editor/src/components/url-popover/link-viewer.js","webpack://wp/./packages/block-editor/build-module/components/media-placeholder/@wordpress/block-editor/src/components/media-placeholder/index.js","webpack://wp/./packages/block-editor/build-module/components/panel-color-settings/@wordpress/block-editor/src/components/panel-color-settings/index.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/format-toolbar/@wordpress/block-editor/src/components/rich-text/format-toolbar/index.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/format-toolbar-container.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-undo-automatic-change.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/file-paste-handler.js","webpack://wp/external window [\"wp\",\"shortcode\"]","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/utils.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/split-value.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-paste-handler.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-before-input-rules.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-input-rules.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/prevent-event-discovery.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-enter.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-format-types.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-shortcuts.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-input-events.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-firefox-compat.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/format-edit.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/index.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-mark-persistent.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/use-remove-browser-shortcuts.js","webpack://wp/./packages/block-editor/build-module/components/editable-text/@wordpress/block-editor/src/components/editable-text/index.js","webpack://wp/./packages/block-editor/build-module/components/plain-text/@wordpress/block-editor/src/components/plain-text/index.js","webpack://wp/./packages/block-editor/build-module/components/responsive-block-control/@wordpress/block-editor/src/components/responsive-block-control/label.js","webpack://wp/./packages/block-editor/build-module/components/responsive-block-control/@wordpress/block-editor/src/components/responsive-block-control/index.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/shortcut.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/toolbar-button.js","webpack://wp/./packages/block-editor/build-module/components/rich-text/@wordpress/block-editor/src/components/rich-text/input-event.js","webpack://wp/./packages/block-editor/build-module/components/tool-selector/@wordpress/block-editor/src/components/tool-selector/index.js","webpack://wp/./packages/block-editor/build-module/components/unit-control/@wordpress/block-editor/src/components/unit-control/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/arrow-left.js","webpack://wp/./packages/block-editor/build-module/components/url-input/@wordpress/block-editor/src/components/url-input/button.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close.js","webpack://wp/./packages/block-editor/build-module/components/url-popover/@wordpress/block-editor/src/components/url-popover/image-url-input-ui.js","webpack://wp/./packages/block-editor/build-module/components/preview-options/@wordpress/block-editor/src/components/preview-options/index.js","webpack://wp/./packages/block-editor/build-module/components/use-resize-canvas/@wordpress/block-editor/src/components/use-resize-canvas/index.js","webpack://wp/./packages/block-editor/build-module/components/skip-to-selected-block/@wordpress/block-editor/src/components/skip-to-selected-block/index.js","webpack://wp/external window [\"wp\",\"wordcount\"]","webpack://wp/./packages/block-editor/build-module/components/multi-selection-inspector/@wordpress/block-editor/src/components/multi-selection-inspector/index.js","webpack://wp/./packages/block-editor/build-module/components/default-style-picker/@wordpress/block-editor/src/components/default-style-picker/index.js","webpack://wp/./packages/block-editor/build-module/components/block-inspector/@wordpress/block-editor/src/components/block-inspector/index.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/zoom-out-mode-inserters.js","webpack://wp/./packages/block-editor/build-module/components/block-tools/@wordpress/block-editor/src/components/block-tools/index.js","webpack://wp/./packages/block-editor/build-module/components/inserter/@wordpress/block-editor/src/components/inserter/library.js","webpack://wp/./packages/block-editor/build-module/components/keyboard-shortcuts/@wordpress/block-editor/src/components/keyboard-shortcuts/index.js","webpack://wp/./packages/block-editor/build-module/components/selection-scroll-into-view/@wordpress/block-editor/src/components/selection-scroll-into-view/index.js","webpack://wp/./packages/block-editor/build-module/components/observe-typing/@wordpress/block-editor/src/components/observe-typing/index.js","webpack://wp/./packages/block-editor/build-module/components/typewriter/@wordpress/block-editor/src/components/typewriter/index.js","webpack://wp/./packages/block-editor/build-module/components/recursion-provider/@wordpress/block-editor/src/components/recursion-provider/index.js","webpack://wp/./packages/icons/build-module/library/@wordpress/icons/src/library/close-small.js","webpack://wp/./packages/block-editor/build-module/components/inspector-popover-header/@wordpress/block-editor/src/components/inspector-popover-header/index.js","webpack://wp/./packages/block-editor/build-module/components/publish-date-time-picker/@wordpress/block-editor/src/components/publish-date-time-picker/index.js","webpack://wp/./packages/block-editor/build-module/elements/@wordpress/block-editor/src/elements/index.js","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/block-variation-transforms.js","webpack://wp/./packages/block-editor/build-module/utils/@wordpress/block-editor/src/utils/parse-css-unit-to-px.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});","/*!\n  Copyright (c) 2018 Jed Watson.\n  Licensed under the MIT License (MIT), see\n  http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// This code has been refactored for 140 bytes\n// You can see the original here: https://github.com/twolfson/computedStyle/blob/04cd1da2e30fa45844f95f5cb1ac898e9b9ef050/lib/computedStyle.js\nvar computedStyle = function (el, prop, getComputedStyle) {\n  getComputedStyle = window.getComputedStyle;\n\n  // In one fell swoop\n  return (\n    // If we have getComputedStyle\n    getComputedStyle ?\n      // Query it\n      // TODO: From CSS-Query notes, we might need (node, null) for FF\n      getComputedStyle(el) :\n\n    // Otherwise, we are in IE and use currentStyle\n      el.currentStyle\n  )[\n    // Switch to camelCase for CSSOM\n    // DEV: Grabbed from jQuery\n    // https://github.com/jquery/jquery/blob/1.9-stable/src/css.js#L191-L194\n    // https://github.com/jquery/jquery/blob/1.9-stable/src/core.js#L593-L597\n    prop.replace(/-(\\w)/gi, function (word, letter) {\n      return letter.toUpperCase();\n    })\n  ];\n};\n\nmodule.exports = computedStyle;\n","export default function Diff() {}\n\nDiff.prototype = {\n  diff(oldString, newString, options = {}) {\n    let callback = options.callback;\n    if (typeof options === 'function') {\n      callback = options;\n      options = {};\n    }\n    this.options = options;\n\n    let self = this;\n\n    function done(value) {\n      if (callback) {\n        setTimeout(function() { callback(undefined, value); }, 0);\n        return true;\n      } else {\n        return value;\n      }\n    }\n\n    // Allow subclasses to massage the input prior to running\n    oldString = this.castInput(oldString);\n    newString = this.castInput(newString);\n\n    oldString = this.removeEmpty(this.tokenize(oldString));\n    newString = this.removeEmpty(this.tokenize(newString));\n\n    let newLen = newString.length, oldLen = oldString.length;\n    let editLength = 1;\n    let maxEditLength = newLen + oldLen;\n    let bestPath = [{ newPos: -1, components: [] }];\n\n    // Seed editLength = 0, i.e. the content starts with the same values\n    let oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);\n    if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n      // Identity per the equality and tokenizer\n      return done([{value: this.join(newString), count: newString.length}]);\n    }\n\n    // Main worker method. checks all permutations of a given edit length for acceptance.\n    function execEditLength() {\n      for (let diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {\n        let basePath;\n        let addPath = bestPath[diagonalPath - 1],\n            removePath = bestPath[diagonalPath + 1],\n            oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;\n        if (addPath) {\n          // No one else is going to attempt to use this value, clear it\n          bestPath[diagonalPath - 1] = undefined;\n        }\n\n        let canAdd = addPath && addPath.newPos + 1 < newLen,\n            canRemove = removePath && 0 <= oldPos && oldPos < oldLen;\n        if (!canAdd && !canRemove) {\n          // If this path is a terminal then prune\n          bestPath[diagonalPath] = undefined;\n          continue;\n        }\n\n        // Select the diagonal that we want to branch from. We select the prior\n        // path whose position in the new string is the farthest from the origin\n        // and does not pass the bounds of the diff graph\n        if (!canAdd || (canRemove && addPath.newPos < removePath.newPos)) {\n          basePath = clonePath(removePath);\n          self.pushComponent(basePath.components, undefined, true);\n        } else {\n          basePath = addPath; // No need to clone, we've pulled it from the list\n          basePath.newPos++;\n          self.pushComponent(basePath.components, true, undefined);\n        }\n\n        oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);\n\n        // If we have hit the end of both strings, then we are done\n        if (basePath.newPos + 1 >= newLen && oldPos + 1 >= oldLen) {\n          return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));\n        } else {\n          // Otherwise track this path as a potential candidate and continue.\n          bestPath[diagonalPath] = basePath;\n        }\n      }\n\n      editLength++;\n    }\n\n    // Performs the length of edit iteration. Is a bit fugly as this has to support the\n    // sync and async mode which is never fun. Loops over execEditLength until a value\n    // is produced.\n    if (callback) {\n      (function exec() {\n        setTimeout(function() {\n          // This should not happen, but we want to be safe.\n          /* istanbul ignore next */\n          if (editLength > maxEditLength) {\n            return callback();\n          }\n\n          if (!execEditLength()) {\n            exec();\n          }\n        }, 0);\n      }());\n    } else {\n      while (editLength <= maxEditLength) {\n        let ret = execEditLength();\n        if (ret) {\n          return ret;\n        }\n      }\n    }\n  },\n\n  pushComponent(components, added, removed) {\n    let last = components[components.length - 1];\n    if (last && last.added === added && last.removed === removed) {\n      // We need to clone here as the component clone operation is just\n      // as shallow array clone\n      components[components.length - 1] = {count: last.count + 1, added: added, removed: removed };\n    } else {\n      components.push({count: 1, added: added, removed: removed });\n    }\n  },\n  extractCommon(basePath, newString, oldString, diagonalPath) {\n    let newLen = newString.length,\n        oldLen = oldString.length,\n        newPos = basePath.newPos,\n        oldPos = newPos - diagonalPath,\n\n        commonCount = 0;\n    while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {\n      newPos++;\n      oldPos++;\n      commonCount++;\n    }\n\n    if (commonCount) {\n      basePath.components.push({count: commonCount});\n    }\n\n    basePath.newPos = newPos;\n    return oldPos;\n  },\n\n  equals(left, right) {\n    if (this.options.comparator) {\n      return this.options.comparator(left, right);\n    } else {\n      return left === right\n        || (this.options.ignoreCase && left.toLowerCase() === right.toLowerCase());\n    }\n  },\n  removeEmpty(array) {\n    let ret = [];\n    for (let i = 0; i < array.length; i++) {\n      if (array[i]) {\n        ret.push(array[i]);\n      }\n    }\n    return ret;\n  },\n  castInput(value) {\n    return value;\n  },\n  tokenize(value) {\n    return value.split('');\n  },\n  join(chars) {\n    return chars.join('');\n  }\n};\n\nfunction buildValues(diff, components, newString, oldString, useLongestToken) {\n  let componentPos = 0,\n      componentLen = components.length,\n      newPos = 0,\n      oldPos = 0;\n\n  for (; componentPos < componentLen; componentPos++) {\n    let component = components[componentPos];\n    if (!component.removed) {\n      if (!component.added && useLongestToken) {\n        let value = newString.slice(newPos, newPos + component.count);\n        value = value.map(function(value, i) {\n          let oldValue = oldString[oldPos + i];\n          return oldValue.length > value.length ? oldValue : value;\n        });\n\n        component.value = diff.join(value);\n      } else {\n        component.value = diff.join(newString.slice(newPos, newPos + component.count));\n      }\n      newPos += component.count;\n\n      // Common case\n      if (!component.added) {\n        oldPos += component.count;\n      }\n    } else {\n      component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));\n      oldPos += component.count;\n\n      // Reverse add and remove so removes are output first to match common convention\n      // The diffing algorithm is tied to add then remove output and this is the simplest\n      // route to get the desired output with minimal overhead.\n      if (componentPos && components[componentPos - 1].added) {\n        let tmp = components[componentPos - 1];\n        components[componentPos - 1] = components[componentPos];\n        components[componentPos] = tmp;\n      }\n    }\n  }\n\n  // Special case handle for when one terminal is ignored (i.e. whitespace).\n  // For this case we merge the terminal into the prior string and drop the change.\n  // This is only available for string mode.\n  let lastComponent = components[componentLen - 1];\n  if (componentLen > 1\n      && typeof lastComponent.value === 'string'\n      && (lastComponent.added || lastComponent.removed)\n      && diff.equals('', lastComponent.value)) {\n    components[componentLen - 2].value += lastComponent.value;\n    components.pop();\n  }\n\n  return components;\n}\n\nfunction clonePath(path) {\n  return { newPos: path.newPos, components: path.components.slice(0) };\n}\n","import Diff from './base';\n\nexport const characterDiff = new Diff();\nexport function diffChars(oldStr, newStr, options) { return characterDiff.diff(oldStr, newStr, options); }\n","'use strict';\n\nvar util = require('./util');\n\nfunction scrollIntoView(elem, container, config) {\n  config = config || {};\n  // document 归一化到 window\n  if (container.nodeType === 9) {\n    container = util.getWindow(container);\n  }\n\n  var allowHorizontalScroll = config.allowHorizontalScroll;\n  var onlyScrollIfNeeded = config.onlyScrollIfNeeded;\n  var alignWithTop = config.alignWithTop;\n  var alignWithLeft = config.alignWithLeft;\n  var offsetTop = config.offsetTop || 0;\n  var offsetLeft = config.offsetLeft || 0;\n  var offsetBottom = config.offsetBottom || 0;\n  var offsetRight = config.offsetRight || 0;\n\n  allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll;\n\n  var isWin = util.isWindow(container);\n  var isFramed = !!(isWin && container.frameElement);\n  var elemOffset = util.offset(elem);\n  var eh = util.outerHeight(elem);\n  var ew = util.outerWidth(elem);\n  var containerOffset = undefined;\n  var ch = undefined;\n  var cw = undefined;\n  var containerScroll = undefined;\n  var diffTop = undefined;\n  var diffBottom = undefined;\n  var win = undefined;\n  var winScroll = undefined;\n  var ww = undefined;\n  var wh = undefined;\n\n  if (isFramed) {\n    container = container.document.scrollingElement || container.document.body;\n  }\n\n  if (isWin || isFramed) {\n    win = container;\n    wh = util.height(win);\n    ww = util.width(win);\n    winScroll = {\n      left: util.scrollLeft(win),\n      top: util.scrollTop(win)\n    };\n    // elem 相对 container 可视视窗的距离\n    diffTop = {\n      left: elemOffset.left - winScroll.left - offsetLeft,\n      top: elemOffset.top - winScroll.top - offsetTop\n    };\n    diffBottom = {\n      left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight,\n      top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom\n    };\n    containerScroll = winScroll;\n  } else {\n    containerOffset = util.offset(container);\n    ch = container.clientHeight;\n    cw = container.clientWidth;\n    containerScroll = {\n      left: container.scrollLeft,\n      top: container.scrollTop\n    };\n    // elem 相对 container 可视视窗的距离\n    // 注意边框, offset 是边框到根节点\n    diffTop = {\n      left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft,\n      top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop\n    };\n    diffBottom = {\n      left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight,\n      top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom\n    };\n  }\n\n  if (diffTop.top < 0 || diffBottom.top > 0) {\n    // 强制向上\n    if (alignWithTop === true) {\n      util.scrollTop(container, containerScroll.top + diffTop.top);\n    } else if (alignWithTop === false) {\n      util.scrollTop(container, containerScroll.top + diffBottom.top);\n    } else {\n      // 自动调整\n      if (diffTop.top < 0) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  } else {\n    if (!onlyScrollIfNeeded) {\n      alignWithTop = alignWithTop === undefined ? true : !!alignWithTop;\n      if (alignWithTop) {\n        util.scrollTop(container, containerScroll.top + diffTop.top);\n      } else {\n        util.scrollTop(container, containerScroll.top + diffBottom.top);\n      }\n    }\n  }\n\n  if (allowHorizontalScroll) {\n    if (diffTop.left < 0 || diffBottom.left > 0) {\n      // 强制向上\n      if (alignWithLeft === true) {\n        util.scrollLeft(container, containerScroll.left + diffTop.left);\n      } else if (alignWithLeft === false) {\n        util.scrollLeft(container, containerScroll.left + diffBottom.left);\n      } else {\n        // 自动调整\n        if (diffTop.left < 0) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    } else {\n      if (!onlyScrollIfNeeded) {\n        alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft;\n        if (alignWithLeft) {\n          util.scrollLeft(container, containerScroll.left + diffTop.left);\n        } else {\n          util.scrollLeft(container, containerScroll.left + diffBottom.left);\n        }\n      }\n    }\n  }\n}\n\nmodule.exports = scrollIntoView;","'use strict';\n\nmodule.exports = require('./dom-scroll-into-view');","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\nvar RE_NUM = /[\\-+]?(?:\\d*\\.|)\\d+(?:[eE][\\-+]?\\d+|)/.source;\n\nfunction getClientPosition(elem) {\n  var box = undefined;\n  var x = undefined;\n  var y = undefined;\n  var doc = elem.ownerDocument;\n  var body = doc.body;\n  var docElem = doc && doc.documentElement;\n  // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式\n  box = elem.getBoundingClientRect();\n\n  // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop\n  // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确\n  // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin\n\n  x = box.left;\n  y = box.top;\n\n  // In IE, most of the time, 2 extra pixels are added to the top and left\n  // due to the implicit 2-pixel inset border.  In IE6/7 quirks mode and\n  // IE6 standards mode, this border can be overridden by setting the\n  // document element's border to zero -- thus, we cannot rely on the\n  // offset always being 2 pixels.\n\n  // In quirks mode, the offset can be determined by querying the body's\n  // clientLeft/clientTop, but in standards mode, it is found by querying\n  // the document element's clientLeft/clientTop.  Since we already called\n  // getClientBoundingRect we have already forced a reflow, so it is not\n  // too expensive just to query them all.\n\n  // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的\n  // 窗口边框标准是设 documentElement ,quirks 时设置 body\n  // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去\n  // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置\n  // 标准 ie 下 docElem.clientTop 就是 border-top\n  // ie7 html 即窗口边框改变不了。永远为 2\n  // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0\n\n  x -= docElem.clientLeft || body.clientLeft || 0;\n  y -= docElem.clientTop || body.clientTop || 0;\n\n  return {\n    left: x,\n    top: y\n  };\n}\n\nfunction getScroll(w, top) {\n  var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];\n  var method = 'scroll' + (top ? 'Top' : 'Left');\n  if (typeof ret !== 'number') {\n    var d = w.document;\n    // ie6,7,8 standard mode\n    ret = d.documentElement[method];\n    if (typeof ret !== 'number') {\n      // quirks mode\n      ret = d.body[method];\n    }\n  }\n  return ret;\n}\n\nfunction getScrollLeft(w) {\n  return getScroll(w);\n}\n\nfunction getScrollTop(w) {\n  return getScroll(w, true);\n}\n\nfunction getOffset(el) {\n  var pos = getClientPosition(el);\n  var doc = el.ownerDocument;\n  var w = doc.defaultView || doc.parentWindow;\n  pos.left += getScrollLeft(w);\n  pos.top += getScrollTop(w);\n  return pos;\n}\nfunction _getComputedStyle(elem, name, computedStyle_) {\n  var val = '';\n  var d = elem.ownerDocument;\n  var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null);\n\n  // https://github.com/kissyteam/kissy/issues/61\n  if (computedStyle) {\n    val = computedStyle.getPropertyValue(name) || computedStyle[name];\n  }\n\n  return val;\n}\n\nvar _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i');\nvar RE_POS = /^(top|right|bottom|left)$/;\nvar CURRENT_STYLE = 'currentStyle';\nvar RUNTIME_STYLE = 'runtimeStyle';\nvar LEFT = 'left';\nvar PX = 'px';\n\nfunction _getComputedStyleIE(elem, name) {\n  // currentStyle maybe null\n  // http://msdn.microsoft.com/en-us/library/ms535231.aspx\n  var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];\n\n  // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值\n  // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19\n  // 在 ie 下不对,需要直接用 offset 方式\n  // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了\n\n  // From the awesome hack by Dean Edwards\n  // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n  // If we're not dealing with a regular pixel number\n  // but a number that has a weird ending, we need to convert it to pixels\n  // exclude left right for relativity\n  if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {\n    // Remember the original values\n    var style = elem.style;\n    var left = style[LEFT];\n    var rsLeft = elem[RUNTIME_STYLE][LEFT];\n\n    // prevent flashing of content\n    elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];\n\n    // Put in the new values to get a computed value out\n    style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;\n    ret = style.pixelLeft + PX;\n\n    // Revert the changed values\n    style[LEFT] = left;\n\n    elem[RUNTIME_STYLE][LEFT] = rsLeft;\n  }\n  return ret === '' ? 'auto' : ret;\n}\n\nvar getComputedStyleX = undefined;\nif (typeof window !== 'undefined') {\n  getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;\n}\n\nfunction each(arr, fn) {\n  for (var i = 0; i < arr.length; i++) {\n    fn(arr[i]);\n  }\n}\n\nfunction isBorderBoxFn(elem) {\n  return getComputedStyleX(elem, 'boxSizing') === 'border-box';\n}\n\nvar BOX_MODELS = ['margin', 'border', 'padding'];\nvar CONTENT_INDEX = -1;\nvar PADDING_INDEX = 2;\nvar BORDER_INDEX = 1;\nvar MARGIN_INDEX = 0;\n\nfunction swap(elem, options, callback) {\n  var old = {};\n  var style = elem.style;\n  var name = undefined;\n\n  // Remember the old values, and insert the new ones\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      old[name] = style[name];\n      style[name] = options[name];\n    }\n  }\n\n  callback.call(elem);\n\n  // Revert the old values\n  for (name in options) {\n    if (options.hasOwnProperty(name)) {\n      style[name] = old[name];\n    }\n  }\n}\n\nfunction getPBMWidth(elem, props, which) {\n  var value = 0;\n  var prop = undefined;\n  var j = undefined;\n  var i = undefined;\n  for (j = 0; j < props.length; j++) {\n    prop = props[j];\n    if (prop) {\n      for (i = 0; i < which.length; i++) {\n        var cssProp = undefined;\n        if (prop === 'border') {\n          cssProp = prop + which[i] + 'Width';\n        } else {\n          cssProp = prop + which[i];\n        }\n        value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;\n      }\n    }\n  }\n  return value;\n}\n\n/**\n * A crude way of determining if an object is a window\n * @member util\n */\nfunction isWindow(obj) {\n  // must use == for ie8\n  /* eslint eqeqeq:0 */\n  return obj != null && obj == obj.window;\n}\n\nvar domUtils = {};\n\neach(['Width', 'Height'], function (name) {\n  domUtils['doc' + name] = function (refWin) {\n    var d = refWin.document;\n    return Math.max(\n    // firefox chrome documentElement.scrollHeight< body.scrollHeight\n    // ie standard mode : documentElement.scrollHeight> body.scrollHeight\n    d.documentElement['scroll' + name],\n    // quirks : documentElement.scrollHeight 最大等于可视窗口多一点?\n    d.body['scroll' + name], domUtils['viewport' + name](d));\n  };\n\n  domUtils['viewport' + name] = function (win) {\n    // pc browser includes scrollbar in window.innerWidth\n    var prop = 'client' + name;\n    var doc = win.document;\n    var body = doc.body;\n    var documentElement = doc.documentElement;\n    var documentElementProp = documentElement[prop];\n    // 标准模式取 documentElement\n    // backcompat 取 body\n    return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;\n  };\n});\n\n/*\n 得到元素的大小信息\n @param elem\n @param name\n @param {String} [extra]  'padding' : (css width) + padding\n 'border' : (css width) + padding + border\n 'margin' : (css width) + padding + border + margin\n */\nfunction getWH(elem, name, extra) {\n  if (isWindow(elem)) {\n    return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);\n  } else if (elem.nodeType === 9) {\n    return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);\n  }\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n  var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight;\n  var computedStyle = getComputedStyleX(elem);\n  var isBorderBox = isBorderBoxFn(elem, computedStyle);\n  var cssBoxValue = 0;\n  if (borderBoxValue == null || borderBoxValue <= 0) {\n    borderBoxValue = undefined;\n    // Fall back to computed then un computed css if necessary\n    cssBoxValue = getComputedStyleX(elem, name);\n    if (cssBoxValue == null || Number(cssBoxValue) < 0) {\n      cssBoxValue = elem.style[name] || 0;\n    }\n    // Normalize '', auto, and prepare for extra\n    cssBoxValue = parseFloat(cssBoxValue) || 0;\n  }\n  if (extra === undefined) {\n    extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;\n  }\n  var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;\n  var val = borderBoxValue || cssBoxValue;\n  if (extra === CONTENT_INDEX) {\n    if (borderBoxValueOrIsBorderBox) {\n      return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle);\n    }\n    return cssBoxValue;\n  }\n  if (borderBoxValueOrIsBorderBox) {\n    var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle);\n    return val + (extra === BORDER_INDEX ? 0 : padding);\n  }\n  return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle);\n}\n\nvar cssShow = {\n  position: 'absolute',\n  visibility: 'hidden',\n  display: 'block'\n};\n\n// fix #119 : https://github.com/kissyteam/kissy/issues/119\nfunction getWHIgnoreDisplay(elem) {\n  var val = undefined;\n  var args = arguments;\n  // in case elem is window\n  // elem.offsetWidth === undefined\n  if (elem.offsetWidth !== 0) {\n    val = getWH.apply(undefined, args);\n  } else {\n    swap(elem, cssShow, function () {\n      val = getWH.apply(undefined, args);\n    });\n  }\n  return val;\n}\n\nfunction css(el, name, v) {\n  var value = v;\n  if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') {\n    for (var i in name) {\n      if (name.hasOwnProperty(i)) {\n        css(el, i, name[i]);\n      }\n    }\n    return undefined;\n  }\n  if (typeof value !== 'undefined') {\n    if (typeof value === 'number') {\n      value += 'px';\n    }\n    el.style[name] = value;\n    return undefined;\n  }\n  return getComputedStyleX(el, name);\n}\n\neach(['width', 'height'], function (name) {\n  var first = name.charAt(0).toUpperCase() + name.slice(1);\n  domUtils['outer' + first] = function (el, includeMargin) {\n    return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);\n  };\n  var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];\n\n  domUtils[name] = function (elem, val) {\n    if (val !== undefined) {\n      if (elem) {\n        var computedStyle = getComputedStyleX(elem);\n        var isBorderBox = isBorderBoxFn(elem);\n        if (isBorderBox) {\n          val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle);\n        }\n        return css(elem, name, val);\n      }\n      return undefined;\n    }\n    return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);\n  };\n});\n\n// 设置 elem 相对 elem.ownerDocument 的坐标\nfunction setOffset(elem, offset) {\n  // set position first, in-case top/left are set even on static elem\n  if (css(elem, 'position') === 'static') {\n    elem.style.position = 'relative';\n  }\n\n  var old = getOffset(elem);\n  var ret = {};\n  var current = undefined;\n  var key = undefined;\n\n  for (key in offset) {\n    if (offset.hasOwnProperty(key)) {\n      current = parseFloat(css(elem, key)) || 0;\n      ret[key] = current + offset[key] - old[key];\n    }\n  }\n  css(elem, ret);\n}\n\nmodule.exports = _extends({\n  getWindow: function getWindow(node) {\n    var doc = node.ownerDocument || node;\n    return doc.defaultView || doc.parentWindow;\n  },\n  offset: function offset(el, value) {\n    if (typeof value !== 'undefined') {\n      setOffset(el, value);\n    } else {\n      return getOffset(el);\n    }\n  },\n\n  isWindow: isWindow,\n  each: each,\n  css: css,\n  clone: function clone(obj) {\n    var ret = {};\n    for (var i in obj) {\n      if (obj.hasOwnProperty(i)) {\n        ret[i] = obj[i];\n      }\n    }\n    var overflow = obj.overflow;\n    if (overflow) {\n      for (var i in obj) {\n        if (obj.hasOwnProperty(i)) {\n          ret.overflow[i] = obj.overflow[i];\n        }\n      }\n    }\n    return ret;\n  },\n  scrollLeft: function scrollLeft(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollLeft(w);\n      }\n      window.scrollTo(v, getScrollTop(w));\n    } else {\n      if (v === undefined) {\n        return w.scrollLeft;\n      }\n      w.scrollLeft = v;\n    }\n  },\n  scrollTop: function scrollTop(w, v) {\n    if (isWindow(w)) {\n      if (v === undefined) {\n        return getScrollTop(w);\n      }\n      window.scrollTo(getScrollLeft(w), v);\n    } else {\n      if (v === undefined) {\n        return w.scrollTop;\n      }\n      w.scrollTop = v;\n    }\n  },\n\n  viewportWidth: 0,\n  viewportHeight: 0\n}, domUtils);","if (typeof Object.create === 'function') {\n  // implementation from standard node.js 'util' module\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    ctor.prototype = Object.create(superCtor.prototype, {\n      constructor: {\n        value: ctor,\n        enumerable: false,\n        writable: true,\n        configurable: true\n      }\n    });\n  };\n} else {\n  // old school shim for old browsers\n  module.exports = function inherits(ctor, superCtor) {\n    ctor.super_ = superCtor\n    var TempCtor = function () {}\n    TempCtor.prototype = superCtor.prototype\n    ctor.prototype = new TempCtor()\n    ctor.prototype.constructor = ctor\n  }\n}\n","// Load in dependencies\nvar computedStyle = require('computed-style');\n\n/**\n * Calculate the `line-height` of a given node\n * @param {HTMLElement} node Element to calculate line height of. Must be in the DOM.\n * @returns {Number} `line-height` of the element in pixels\n */\nfunction lineHeight(node) {\n  // Grab the line-height via style\n  var lnHeightStr = computedStyle(node, 'line-height');\n  var lnHeight = parseFloat(lnHeightStr, 10);\n\n  // If the lineHeight did not contain a unit (i.e. it was numeric), convert it to ems (e.g. '2.3' === '2.3em')\n  if (lnHeightStr === lnHeight + '') {\n    // Save the old lineHeight style and update the em unit to the element\n    var _lnHeightStyle = node.style.lineHeight;\n    node.style.lineHeight = lnHeightStr + 'em';\n\n    // Calculate the em based height\n    lnHeightStr = computedStyle(node, 'line-height');\n    lnHeight = parseFloat(lnHeightStr, 10);\n\n    // Revert the lineHeight style\n    if (_lnHeightStyle) {\n      node.style.lineHeight = _lnHeightStyle;\n    } else {\n      delete node.style.lineHeight;\n    }\n  }\n\n  // If the lineHeight is in `pt`, convert it to pixels (4px for 3pt)\n  // DEV: `em` units are converted to `pt` in IE6\n  // Conversion ratio from https://developer.mozilla.org/en-US/docs/Web/CSS/length\n  if (lnHeightStr.indexOf('pt') !== -1) {\n    lnHeight *= 4;\n    lnHeight /= 3;\n  // Otherwise, if the lineHeight is in `mm`, convert it to pixels (96px for 25.4mm)\n  } else if (lnHeightStr.indexOf('mm') !== -1) {\n    lnHeight *= 96;\n    lnHeight /= 25.4;\n  // Otherwise, if the lineHeight is in `cm`, convert it to pixels (96px for 2.54cm)\n  } else if (lnHeightStr.indexOf('cm') !== -1) {\n    lnHeight *= 96;\n    lnHeight /= 2.54;\n  // Otherwise, if the lineHeight is in `in`, convert it to pixels (96px for 1in)\n  } else if (lnHeightStr.indexOf('in') !== -1) {\n    lnHeight *= 96;\n  // Otherwise, if the lineHeight is in `pc`, convert it to pixels (12pt for 1pc)\n  } else if (lnHeightStr.indexOf('pc') !== -1) {\n    lnHeight *= 16;\n  }\n\n  // Continue our computation\n  lnHeight = Math.round(lnHeight);\n\n  // If the line-height is \"normal\", calculate by font-size\n  if (lnHeightStr === 'normal') {\n    // Create a temporary node\n    var nodeName = node.nodeName;\n    var _node = document.createElement(nodeName);\n    _node.innerHTML = '&nbsp;';\n\n    // If we have a text area, reset it to only 1 row\n    // https://github.com/twolfson/line-height/issues/4\n    if (nodeName.toUpperCase() === 'TEXTAREA') {\n      _node.setAttribute('rows', '1');\n    }\n\n    // Set the font-size of the element\n    var fontSizeStr = computedStyle(node, 'font-size');\n    _node.style.fontSize = fontSizeStr;\n\n    // Remove default padding/border which can affect offset height\n    // https://github.com/twolfson/line-height/issues/4\n    // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight\n    _node.style.padding = '0px';\n    _node.style.border = '0px';\n\n    // Append it to the body\n    var body = document.body;\n    body.appendChild(_node);\n\n    // Assume the line height of the element is the height\n    var height = _node.offsetHeight;\n    lnHeight = height;\n\n    // Remove our child from the DOM\n    body.removeChild(_node);\n  }\n\n  // Return the calculated height\n  return lnHeight;\n}\n\n// Export lineHeight\nmodule.exports = lineHeight;\n","module.exports = require('./src/normalizeWheel.js');\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n  typeof window !== 'undefined' &&\n  window.document &&\n  window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n  canUseDOM: canUseDOM,\n\n  canUseWorkers: typeof Worker !== 'undefined',\n\n  canUseEventListeners:\n    canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n  canUseViewport: canUseDOM && !!window.screen,\n\n  isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n *  Provides entirely client-side User Agent and OS detection. You should prefer\n *  the non-deprecated UserAgent module when possible, which exposes our\n *  authoritative server-side PHP-based detection to the client.\n *\n *  Usage is straightforward:\n *\n *    if (UserAgent_DEPRECATED.ie()) {\n *      //  IE\n *    }\n *\n *  You can also do version checks:\n *\n *    if (UserAgent_DEPRECATED.ie() >= 7) {\n *      //  IE7 or better\n *    }\n *\n *  The browser functions will return NaN if the browser does not match, so\n *  you can also do version compares the other way:\n *\n *    if (UserAgent_DEPRECATED.ie() < 7) {\n *      //  IE6 or worse\n *    }\n *\n *  Note that the version is a float and may include a minor version number,\n *  so you should always use range operators to perform comparisons, not\n *  strict equality.\n *\n *  **Note:** You should **strongly** prefer capability detection to browser\n *  version detection where it's reasonable:\n *\n *    http://www.quirksmode.org/js/support.html\n *\n *  Further, we have a large number of mature wrapper functions and classes\n *  which abstract away many browser irregularities. Check the documentation,\n *  grep for things, or ask on javascript@lists.facebook.com before writing yet\n *  another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n  if (_populated) {\n    return;\n  }\n\n  _populated = true;\n\n  // To work around buggy JS libraries that can't handle multi-digit\n  // version numbers, Opera 10's user agent string claims it's Opera\n  // 9, then later includes a Version/X.Y field:\n  //\n  // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n  var uas = navigator.userAgent;\n  var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n  var os    = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n  _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n  _ipad = /\\b(iP[ao]d)/.exec(uas);\n  _android = /Android/i.exec(uas);\n  _native = /FBAN\\/\\w+;/i.exec(uas);\n  _mobile = /Mobile/i.exec(uas);\n\n  // Note that the IE team blog would have you believe you should be checking\n  // for 'Win64; x64'.  But MSDN then reveals that you can actually be coming\n  // from either x64 or ia64;  so ultimately, you should just check for Win64\n  // as in indicator of whether you're in 64-bit IE.  32-bit IE on 64-bit\n  // Windows will send 'WOW64' instead.\n  _win64 = !!(/Win64/.exec(uas));\n\n  if (agent) {\n    _ie = agent[1] ? parseFloat(agent[1]) : (\n          agent[5] ? parseFloat(agent[5]) : NaN);\n    // IE compatibility mode\n    if (_ie && document && document.documentMode) {\n      _ie = document.documentMode;\n    }\n    // grab the \"true\" ie version from the trident token if available\n    var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n    _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n    _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n    _opera   = agent[3] ? parseFloat(agent[3]) : NaN;\n    _webkit  = agent[4] ? parseFloat(agent[4]) : NaN;\n    if (_webkit) {\n      // We do not add the regexp to the above test, because it will always\n      // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n      // the userAgent string.\n      agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n      _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n    } else {\n      _chrome = NaN;\n    }\n  } else {\n    _ie = _firefox = _opera = _chrome = _webkit = NaN;\n  }\n\n  if (os) {\n    if (os[1]) {\n      // Detect OS X version.  If no version number matches, set _osx to true.\n      // Version examples:  10, 10_6_1, 10.7\n      // Parses version number as a float, taking only first two sets of\n      // digits.  If only one set of digits is found, returns just the major\n      // version number.\n      var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n      _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n    } else {\n      _osx = false;\n    }\n    _windows = !!os[2];\n    _linux   = !!os[3];\n  } else {\n    _osx = _windows = _linux = false;\n  }\n}\n\nvar UserAgent_DEPRECATED = {\n\n  /**\n   *  Check if the UA is Internet Explorer.\n   *\n   *\n   *  @return float|NaN Version number (if match) or NaN.\n   */\n  ie: function() {\n    return _populate() || _ie;\n  },\n\n  /**\n   * Check if we're in Internet Explorer compatibility mode.\n   *\n   * @return bool true if in compatibility mode, false if\n   * not compatibility mode or not ie\n   */\n  ieCompatibilityMode: function() {\n    return _populate() || (_ie_real_version > _ie);\n  },\n\n\n  /**\n   * Whether the browser is 64-bit IE.  Really, this is kind of weak sauce;  we\n   * only need this because Skype can't handle 64-bit IE yet.  We need to remove\n   * this when we don't need it -- tracked by #601957.\n   */\n  ie64: function() {\n    return UserAgent_DEPRECATED.ie() && _win64;\n  },\n\n  /**\n   *  Check if the UA is Firefox.\n   *\n   *\n   *  @return float|NaN Version number (if match) or NaN.\n   */\n  firefox: function() {\n    return _populate() || _firefox;\n  },\n\n\n  /**\n   *  Check if the UA is Opera.\n   *\n   *\n   *  @return float|NaN Version number (if match) or NaN.\n   */\n  opera: function() {\n    return _populate() || _opera;\n  },\n\n\n  /**\n   *  Check if the UA is WebKit.\n   *\n   *\n   *  @return float|NaN Version number (if match) or NaN.\n   */\n  webkit: function() {\n    return _populate() || _webkit;\n  },\n\n  /**\n   *  For Push\n   *  WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n   */\n  safari: function() {\n    return UserAgent_DEPRECATED.webkit();\n  },\n\n  /**\n   *  Check if the UA is a Chrome browser.\n   *\n   *\n   *  @return float|NaN Version number (if match) or NaN.\n   */\n  chrome : function() {\n    return _populate() || _chrome;\n  },\n\n\n  /**\n   *  Check if the user is running Windows.\n   *\n   *  @return bool `true' if the user's OS is Windows.\n   */\n  windows: function() {\n    return _populate() || _windows;\n  },\n\n\n  /**\n   *  Check if the user is running Mac OS X.\n   *\n   *  @return float|bool   Returns a float if a version number is detected,\n   *                       otherwise true/false.\n   */\n  osx: function() {\n    return _populate() || _osx;\n  },\n\n  /**\n   * Check if the user is running Linux.\n   *\n   * @return bool `true' if the user's OS is some flavor of Linux.\n   */\n  linux: function() {\n    return _populate() || _linux;\n  },\n\n  /**\n   * Check if the user is running on an iPhone or iPod platform.\n   *\n   * @return bool `true' if the user is running some flavor of the\n   *    iPhone OS.\n   */\n  iphone: function() {\n    return _populate() || _iphone;\n  },\n\n  mobile: function() {\n    return _populate() || (_iphone || _ipad || _android || _mobile);\n  },\n\n  nativeApp: function() {\n    // webviews inside of the native apps\n    return _populate() || _native;\n  },\n\n  android: function() {\n    return _populate() || _android;\n  },\n\n  ipad: function() {\n    return _populate() || _ipad;\n  }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n  useHasFeature =\n    document.implementation &&\n    document.implementation.hasFeature &&\n    // always returns true in newer browsers as per the standard.\n    // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n    document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n  if (!ExecutionEnvironment.canUseDOM ||\n      capture && !('addEventListener' in document)) {\n    return false;\n  }\n\n  var eventName = 'on' + eventNameSuffix;\n  var isSupported = eventName in document;\n\n  if (!isSupported) {\n    var element = document.createElement('div');\n    element.setAttribute(eventName, 'return;');\n    isSupported = typeof element[eventName] === 'function';\n  }\n\n  if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n    // This is the only way to test support for the `wheel` event in IE9+.\n    isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n  }\n\n  return isSupported;\n}\n\nmodule.exports = isEventSupported;\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP  = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks.  It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n *   'wheel'                -- Chrome(31+), FF(17+), IE(9+)\n *   'mousewheel'           -- Chrome, IE(6+), Opera, Safari\n *   'MozMousePixelScroll'  -- FF(3.5 only!) (2010-2013) -- don't bother!\n *   'DOMMouseScroll'       -- FF(0.9.7+) since 2003\n *\n * So what to do?  The is the best:\n *\n *   normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas.  This code will return an object with properties:\n *\n *   spinX   -- normalized spin speed (use for zoom) - x plane\n *   spinY   -- \" - y plane\n *   pixelX  -- normalized distance (to pixels) - x plane\n *   pixelY  -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages).  Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds.  Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n *   - spin is trying to normalize how far the wheel was spun (or trackpad\n *     dragged).  This is super useful for zoom support where you want to\n *     throw away the chunky scroll steps on the PC and make those equal to\n *     the slow and smooth tiny steps on the Mac. Key data: This code tries to\n *     resolve a single slow step on a wheel to 1.\n *\n *   - pixel is normalizing the desired scroll delta in pixel units.  You'll\n *     get the crazy differences between browsers, but at least it'll be in\n *     pixels!\n *\n *   - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT.  This\n *     should translate to positive value zooming IN, negative zooming OUT.\n *     This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n *   - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n *     with a mouse.  It results in side-scrolling in the browser by default.\n *\n *   - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n *   - I dropped spinZ/pixelZ.  It is supported by the DOM 3 'wheel' event and\n *     probably is by browsers in conjunction with fancy 3D controllers .. but\n *     you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n *   OS X + Chrome  (mouse)     -    4   pixel delta  (wheelDelta -120)\n *   OS X + Safari  (mouse)     -  N/A   pixel delta  (wheelDelta  -12)\n *   OS X + Firefox (mouse)     -    0.1 line  delta  (wheelDelta  N/A)\n *   Win8 + Chrome  (mouse)     -  100   pixel delta  (wheelDelta -120)\n *   Win8 + Firefox (mouse)     -    3   line  delta  (wheelDelta -120)\n *\n * On the trackpad:\n *\n *   OS X + Chrome  (trackpad)  -    2   pixel delta  (wheelDelta   -6)\n *   OS X + Firefox (trackpad)  -    1   pixel delta  (wheelDelta  N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ.  Some browsers provide other values to maintain\n * backward compatibility with older events.  Those other values help us\n * better normalize spin speed.  Example of what the browsers provide:\n *\n *                          | event.wheelDelta | event.detail\n *        ------------------+------------------+--------------\n *          Safari v5/OS X  |       -120       |       0\n *          Safari v5/Win7  |       -120       |       0\n *         Chrome v17/OS X  |       -120       |       0\n *         Chrome v17/Win7  |       -120       |       0\n *                IE9/Win7  |       -120       |   undefined\n *         Firefox v4/OS X  |     undefined    |       1\n *         Firefox v4/Win7  |     undefined    |       3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n  var sX = 0, sY = 0,       // spinX, spinY\n      pX = 0, pY = 0;       // pixelX, pixelY\n\n  // Legacy\n  if ('detail'      in event) { sY = event.detail; }\n  if ('wheelDelta'  in event) { sY = -event.wheelDelta / 120; }\n  if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n  if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n  // side scrolling on FF with DOMMouseScroll\n  if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n    sX = sY;\n    sY = 0;\n  }\n\n  pX = sX * PIXEL_STEP;\n  pY = sY * PIXEL_STEP;\n\n  if ('deltaY' in event) { pY = event.deltaY; }\n  if ('deltaX' in event) { pX = event.deltaX; }\n\n  if ((pX || pY) && event.deltaMode) {\n    if (event.deltaMode == 1) {          // delta in LINE units\n      pX *= LINE_HEIGHT;\n      pY *= LINE_HEIGHT;\n    } else {                             // delta in PAGE units\n      pX *= PAGE_HEIGHT;\n      pY *= PAGE_HEIGHT;\n    }\n  }\n\n  // Fall-back if spin cannot be determined\n  if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n  if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n  return { spinX  : sX,\n           spinY  : sY,\n           pixelX : pX,\n           pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization.  It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n  return (UserAgent_DEPRECATED.firefox())\n           ? 'DOMMouseScroll'\n           : (isEventSupported('wheel'))\n               ? 'wheel'\n               : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\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    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 = {\r\n\t\"À\": \"A\",\r\n\t\"Á\": \"A\",\r\n\t\"Â\": \"A\",\r\n\t\"Ã\": \"A\",\r\n\t\"Ä\": \"A\",\r\n\t\"Å\": \"A\",\r\n\t\"Ấ\": \"A\",\r\n\t\"Ắ\": \"A\",\r\n\t\"Ẳ\": \"A\",\r\n\t\"Ẵ\": \"A\",\r\n\t\"Ặ\": \"A\",\r\n\t\"Æ\": \"AE\",\r\n\t\"Ầ\": \"A\",\r\n\t\"Ằ\": \"A\",\r\n\t\"Ȃ\": \"A\",\r\n\t\"Ç\": \"C\",\r\n\t\"Ḉ\": \"C\",\r\n\t\"È\": \"E\",\r\n\t\"É\": \"E\",\r\n\t\"Ê\": \"E\",\r\n\t\"Ë\": \"E\",\r\n\t\"Ế\": \"E\",\r\n\t\"Ḗ\": \"E\",\r\n\t\"Ề\": \"E\",\r\n\t\"Ḕ\": \"E\",\r\n\t\"Ḝ\": \"E\",\r\n\t\"Ȇ\": \"E\",\r\n\t\"Ì\": \"I\",\r\n\t\"Í\": \"I\",\r\n\t\"Î\": \"I\",\r\n\t\"Ï\": \"I\",\r\n\t\"Ḯ\": \"I\",\r\n\t\"Ȋ\": \"I\",\r\n\t\"Ð\": \"D\",\r\n\t\"Ñ\": \"N\",\r\n\t\"Ò\": \"O\",\r\n\t\"Ó\": \"O\",\r\n\t\"Ô\": \"O\",\r\n\t\"Õ\": \"O\",\r\n\t\"Ö\": \"O\",\r\n\t\"Ø\": \"O\",\r\n\t\"Ố\": \"O\",\r\n\t\"Ṍ\": \"O\",\r\n\t\"Ṓ\": \"O\",\r\n\t\"Ȏ\": \"O\",\r\n\t\"Ù\": \"U\",\r\n\t\"Ú\": \"U\",\r\n\t\"Û\": \"U\",\r\n\t\"Ü\": \"U\",\r\n\t\"Ý\": \"Y\",\r\n\t\"à\": \"a\",\r\n\t\"á\": \"a\",\r\n\t\"â\": \"a\",\r\n\t\"ã\": \"a\",\r\n\t\"ä\": \"a\",\r\n\t\"å\": \"a\",\r\n\t\"ấ\": \"a\",\r\n\t\"ắ\": \"a\",\r\n\t\"ẳ\": \"a\",\r\n\t\"ẵ\": \"a\",\r\n\t\"ặ\": \"a\",\r\n\t\"æ\": \"ae\",\r\n\t\"ầ\": \"a\",\r\n\t\"ằ\": \"a\",\r\n\t\"ȃ\": \"a\",\r\n\t\"ç\": \"c\",\r\n\t\"ḉ\": \"c\",\r\n\t\"è\": \"e\",\r\n\t\"é\": \"e\",\r\n\t\"ê\": \"e\",\r\n\t\"ë\": \"e\",\r\n\t\"ế\": \"e\",\r\n\t\"ḗ\": \"e\",\r\n\t\"ề\": \"e\",\r\n\t\"ḕ\": \"e\",\r\n\t\"ḝ\": \"e\",\r\n\t\"ȇ\": \"e\",\r\n\t\"ì\": \"i\",\r\n\t\"í\": \"i\",\r\n\t\"î\": \"i\",\r\n\t\"ï\": \"i\",\r\n\t\"ḯ\": \"i\",\r\n\t\"ȋ\": \"i\",\r\n\t\"ð\": \"d\",\r\n\t\"ñ\": \"n\",\r\n\t\"ò\": \"o\",\r\n\t\"ó\": \"o\",\r\n\t\"ô\": \"o\",\r\n\t\"õ\": \"o\",\r\n\t\"ö\": \"o\",\r\n\t\"ø\": \"o\",\r\n\t\"ố\": \"o\",\r\n\t\"ṍ\": \"o\",\r\n\t\"ṓ\": \"o\",\r\n\t\"ȏ\": \"o\",\r\n\t\"ù\": \"u\",\r\n\t\"ú\": \"u\",\r\n\t\"û\": \"u\",\r\n\t\"ü\": \"u\",\r\n\t\"ý\": \"y\",\r\n\t\"ÿ\": \"y\",\r\n\t\"Ā\": \"A\",\r\n\t\"ā\": \"a\",\r\n\t\"Ă\": \"A\",\r\n\t\"ă\": \"a\",\r\n\t\"Ą\": \"A\",\r\n\t\"ą\": \"a\",\r\n\t\"Ć\": \"C\",\r\n\t\"ć\": \"c\",\r\n\t\"Ĉ\": \"C\",\r\n\t\"ĉ\": \"c\",\r\n\t\"Ċ\": \"C\",\r\n\t\"ċ\": \"c\",\r\n\t\"Č\": \"C\",\r\n\t\"č\": \"c\",\r\n\t\"C̆\": \"C\",\r\n\t\"c̆\": \"c\",\r\n\t\"Ď\": \"D\",\r\n\t\"ď\": \"d\",\r\n\t\"Đ\": \"D\",\r\n\t\"đ\": \"d\",\r\n\t\"Ē\": \"E\",\r\n\t\"ē\": \"e\",\r\n\t\"Ĕ\": \"E\",\r\n\t\"ĕ\": \"e\",\r\n\t\"Ė\": \"E\",\r\n\t\"ė\": \"e\",\r\n\t\"Ę\": \"E\",\r\n\t\"ę\": \"e\",\r\n\t\"Ě\": \"E\",\r\n\t\"ě\": \"e\",\r\n\t\"Ĝ\": \"G\",\r\n\t\"Ǵ\": \"G\",\r\n\t\"ĝ\": \"g\",\r\n\t\"ǵ\": \"g\",\r\n\t\"Ğ\": \"G\",\r\n\t\"ğ\": \"g\",\r\n\t\"Ġ\": \"G\",\r\n\t\"ġ\": \"g\",\r\n\t\"Ģ\": \"G\",\r\n\t\"ģ\": \"g\",\r\n\t\"Ĥ\": \"H\",\r\n\t\"ĥ\": \"h\",\r\n\t\"Ħ\": \"H\",\r\n\t\"ħ\": \"h\",\r\n\t\"Ḫ\": \"H\",\r\n\t\"ḫ\": \"h\",\r\n\t\"Ĩ\": \"I\",\r\n\t\"ĩ\": \"i\",\r\n\t\"Ī\": \"I\",\r\n\t\"ī\": \"i\",\r\n\t\"Ĭ\": \"I\",\r\n\t\"ĭ\": \"i\",\r\n\t\"Į\": \"I\",\r\n\t\"į\": \"i\",\r\n\t\"İ\": \"I\",\r\n\t\"ı\": \"i\",\r\n\t\"IJ\": \"IJ\",\r\n\t\"ij\": \"ij\",\r\n\t\"Ĵ\": \"J\",\r\n\t\"ĵ\": \"j\",\r\n\t\"Ķ\": \"K\",\r\n\t\"ķ\": \"k\",\r\n\t\"Ḱ\": \"K\",\r\n\t\"ḱ\": \"k\",\r\n\t\"K̆\": \"K\",\r\n\t\"k̆\": \"k\",\r\n\t\"Ĺ\": \"L\",\r\n\t\"ĺ\": \"l\",\r\n\t\"Ļ\": \"L\",\r\n\t\"ļ\": \"l\",\r\n\t\"Ľ\": \"L\",\r\n\t\"ľ\": \"l\",\r\n\t\"Ŀ\": \"L\",\r\n\t\"ŀ\": \"l\",\r\n\t\"Ł\": \"l\",\r\n\t\"ł\": \"l\",\r\n\t\"Ḿ\": \"M\",\r\n\t\"ḿ\": \"m\",\r\n\t\"M̆\": \"M\",\r\n\t\"m̆\": \"m\",\r\n\t\"Ń\": \"N\",\r\n\t\"ń\": \"n\",\r\n\t\"Ņ\": \"N\",\r\n\t\"ņ\": \"n\",\r\n\t\"Ň\": \"N\",\r\n\t\"ň\": \"n\",\r\n\t\"ʼn\": \"n\",\r\n\t\"N̆\": \"N\",\r\n\t\"n̆\": \"n\",\r\n\t\"Ō\": \"O\",\r\n\t\"ō\": \"o\",\r\n\t\"Ŏ\": \"O\",\r\n\t\"ŏ\": \"o\",\r\n\t\"Ő\": \"O\",\r\n\t\"ő\": \"o\",\r\n\t\"Œ\": \"OE\",\r\n\t\"œ\": \"oe\",\r\n\t\"P̆\": \"P\",\r\n\t\"p̆\": \"p\",\r\n\t\"Ŕ\": \"R\",\r\n\t\"ŕ\": \"r\",\r\n\t\"Ŗ\": \"R\",\r\n\t\"ŗ\": \"r\",\r\n\t\"Ř\": \"R\",\r\n\t\"ř\": \"r\",\r\n\t\"R̆\": \"R\",\r\n\t\"r̆\": \"r\",\r\n\t\"Ȓ\": \"R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": \"a\",\r\n\t\"B̧\": \"B\",\r\n\t\"b̧\": \"b\",\r\n\t\"Ḑ\": \"D\",\r\n\t\"ḑ\": \"d\",\r\n\t\"Ȩ\": \"E\",\r\n\t\"ȩ\": \"e\",\r\n\t\"Ɛ̧\": \"E\",\r\n\t\"ɛ̧\": \"e\",\r\n\t\"Ḩ\": \"H\",\r\n\t\"ḩ\": \"h\",\r\n\t\"I̧\": \"I\",\r\n\t\"i̧\": \"i\",\r\n\t\"Ɨ̧\": \"I\",\r\n\t\"ɨ̧\": \"i\",\r\n\t\"M̧\": \"M\",\r\n\t\"m̧\": \"m\",\r\n\t\"O̧\": \"O\",\r\n\t\"o̧\": \"o\",\r\n\t\"Q̧\": \"Q\",\r\n\t\"q̧\": \"q\",\r\n\t\"U̧\": \"U\",\r\n\t\"u̧\": \"u\",\r\n\t\"X̧\": \"X\",\r\n\t\"x̧\": \"x\",\r\n\t\"Z̧\": \"Z\",\r\n\t\"z̧\": \"z\",\r\n};\r\n\r\nvar chars = Object.keys(characterMap).join('|');\r\nvar allAccents = new RegExp(chars, 'g');\r\nvar firstAccent = new RegExp(chars, '');\r\n\r\nvar removeAccents = function(string) {\t\r\n\treturn string.replace(allAccents, function(match) {\r\n\t\treturn characterMap[match];\r\n\t});\r\n};\r\n\r\nvar hasAccents = function(string) {\r\n\treturn !!string.match(firstAccent);\r\n};\r\n\r\nmodule.exports = removeAccents;\r\nmodule.exports.has = hasAccents;\r\nmodule.exports.remove = removeAccents;\r\n","var traverse = module.exports = function (obj) {\n    return new Traverse(obj);\n};\n\nfunction Traverse (obj) {\n    this.value = obj;\n}\n\nTraverse.prototype.get = function (ps) {\n    var node = this.value;\n    for (var i = 0; i < ps.length; i ++) {\n        var key = ps[i];\n        if (!node || !hasOwnProperty.call(node, key)) {\n            node = undefined;\n            break;\n        }\n        node = node[key];\n    }\n    return node;\n};\n\nTraverse.prototype.has = function (ps) {\n    var node = this.value;\n    for (var i = 0; i < ps.length; i ++) {\n        var key = ps[i];\n        if (!node || !hasOwnProperty.call(node, key)) {\n            return false;\n        }\n        node = node[key];\n    }\n    return true;\n};\n\nTraverse.prototype.set = function (ps, value) {\n    var node = this.value;\n    for (var i = 0; i < ps.length - 1; i ++) {\n        var key = ps[i];\n        if (!hasOwnProperty.call(node, key)) node[key] = {};\n        node = node[key];\n    }\n    node[ps[i]] = value;\n    return value;\n};\n\nTraverse.prototype.map = function (cb) {\n    return walk(this.value, cb, true);\n};\n\nTraverse.prototype.forEach = function (cb) {\n    this.value = walk(this.value, cb, false);\n    return this.value;\n};\n\nTraverse.prototype.reduce = function (cb, init) {\n    var skip = arguments.length === 1;\n    var acc = skip ? this.value : init;\n    this.forEach(function (x) {\n        if (!this.isRoot || !skip) {\n            acc = cb.call(this, acc, x);\n        }\n    });\n    return acc;\n};\n\nTraverse.prototype.paths = function () {\n    var acc = [];\n    this.forEach(function (x) {\n        acc.push(this.path); \n    });\n    return acc;\n};\n\nTraverse.prototype.nodes = function () {\n    var acc = [];\n    this.forEach(function (x) {\n        acc.push(this.node);\n    });\n    return acc;\n};\n\nTraverse.prototype.clone = function () {\n    var parents = [], nodes = [];\n    \n    return (function clone (src) {\n        for (var i = 0; i < parents.length; i++) {\n            if (parents[i] === src) {\n                return nodes[i];\n            }\n        }\n        \n        if (typeof src === 'object' && src !== null) {\n            var dst = copy(src);\n            \n            parents.push(src);\n            nodes.push(dst);\n            \n            forEach(objectKeys(src), function (key) {\n                dst[key] = clone(src[key]);\n            });\n            \n            parents.pop();\n            nodes.pop();\n            return dst;\n        }\n        else {\n            return src;\n        }\n    })(this.value);\n};\n\nfunction walk (root, cb, immutable) {\n    var path = [];\n    var parents = [];\n    var alive = true;\n    \n    return (function walker (node_) {\n        var node = immutable ? copy(node_) : node_;\n        var modifiers = {};\n        \n        var keepGoing = true;\n        \n        var state = {\n            node : node,\n            node_ : node_,\n            path : [].concat(path),\n            parent : parents[parents.length - 1],\n            parents : parents,\n            key : path.slice(-1)[0],\n            isRoot : path.length === 0,\n            level : path.length,\n            circular : null,\n            update : function (x, stopHere) {\n                if (!state.isRoot) {\n                    state.parent.node[state.key] = x;\n                }\n                state.node = x;\n                if (stopHere) keepGoing = false;\n            },\n            'delete' : function (stopHere) {\n                delete state.parent.node[state.key];\n                if (stopHere) keepGoing = false;\n            },\n            remove : function (stopHere) {\n                if (isArray(state.parent.node)) {\n                    state.parent.node.splice(state.key, 1);\n                }\n                else {\n                    delete state.parent.node[state.key];\n                }\n                if (stopHere) keepGoing = false;\n            },\n            keys : null,\n            before : function (f) { modifiers.before = f },\n            after : function (f) { modifiers.after = f },\n            pre : function (f) { modifiers.pre = f },\n            post : function (f) { modifiers.post = f },\n            stop : function () { alive = false },\n            block : function () { keepGoing = false }\n        };\n        \n        if (!alive) return state;\n        \n        function updateState() {\n            if (typeof state.node === 'object' && state.node !== null) {\n                if (!state.keys || state.node_ !== state.node) {\n                    state.keys = objectKeys(state.node)\n                }\n                \n                state.isLeaf = state.keys.length == 0;\n                \n                for (var i = 0; i < parents.length; i++) {\n                    if (parents[i].node_ === node_) {\n                        state.circular = parents[i];\n                        break;\n                    }\n                }\n            }\n            else {\n                state.isLeaf = true;\n                state.keys = null;\n            }\n            \n            state.notLeaf = !state.isLeaf;\n            state.notRoot = !state.isRoot;\n        }\n        \n        updateState();\n        \n        // use return values to update if defined\n        var ret = cb.call(state, state.node);\n        if (ret !== undefined && state.update) state.update(ret);\n        \n        if (modifiers.before) modifiers.before.call(state, state.node);\n        \n        if (!keepGoing) return state;\n        \n        if (typeof state.node == 'object'\n        && state.node !== null && !state.circular) {\n            parents.push(state);\n            \n            updateState();\n            \n            forEach(state.keys, function (key, i) {\n                path.push(key);\n                \n                if (modifiers.pre) modifiers.pre.call(state, state.node[key], key);\n                \n                var child = walker(state.node[key]);\n                if (immutable && hasOwnProperty.call(state.node, key)) {\n                    state.node[key] = child.node;\n                }\n                \n                child.isLast = i == state.keys.length - 1;\n                child.isFirst = i == 0;\n                \n                if (modifiers.post) modifiers.post.call(state, child);\n                \n                path.pop();\n            });\n            parents.pop();\n        }\n        \n        if (modifiers.after) modifiers.after.call(state, state.node);\n        \n        return state;\n    })(root).node;\n}\n\nfunction copy (src) {\n    if (typeof src === 'object' && src !== null) {\n        var dst;\n        \n        if (isArray(src)) {\n            dst = [];\n        }\n        else if (isDate(src)) {\n            dst = new Date(src.getTime ? src.getTime() : src);\n        }\n        else if (isRegExp(src)) {\n            dst = new RegExp(src);\n        }\n        else if (isError(src)) {\n            dst = { message: src.message };\n        }\n        else if (isBoolean(src)) {\n            dst = new Boolean(src);\n        }\n        else if (isNumber(src)) {\n            dst = new Number(src);\n        }\n        else if (isString(src)) {\n            dst = new String(src);\n        }\n        else if (Object.create && Object.getPrototypeOf) {\n            dst = Object.create(Object.getPrototypeOf(src));\n        }\n        else if (src.constructor === Object) {\n            dst = {};\n        }\n        else {\n            var proto =\n                (src.constructor && src.constructor.prototype)\n                || src.__proto__\n                || {}\n            ;\n            var T = function () {};\n            T.prototype = proto;\n            dst = new T;\n        }\n        \n        forEach(objectKeys(src), function (key) {\n            dst[key] = src[key];\n        });\n        return dst;\n    }\n    else return src;\n}\n\nvar objectKeys = Object.keys || function keys (obj) {\n    var res = [];\n    for (var key in obj) res.push(key)\n    return res;\n};\n\nfunction toS (obj) { return Object.prototype.toString.call(obj) }\nfunction isDate (obj) { return toS(obj) === '[object Date]' }\nfunction isRegExp (obj) { return toS(obj) === '[object RegExp]' }\nfunction isError (obj) { return toS(obj) === '[object Error]' }\nfunction isBoolean (obj) { return toS(obj) === '[object Boolean]' }\nfunction isNumber (obj) { return toS(obj) === '[object Number]' }\nfunction isString (obj) { return toS(obj) === '[object String]' }\n\nvar isArray = Array.isArray || function isArray (xs) {\n    return Object.prototype.toString.call(xs) === '[object Array]';\n};\n\nvar forEach = function (xs, fn) {\n    if (xs.forEach) return xs.forEach(fn)\n    else for (var i = 0; i < xs.length; i++) {\n        fn(xs[i], i, xs);\n    }\n};\n\nforEach(objectKeys(Traverse.prototype), function (key) {\n    traverse[key] = function (obj) {\n        var args = [].slice.call(arguments, 1);\n        var t = new Traverse(obj);\n        return t[key].apply(t, args);\n    };\n});\n\nvar hasOwnProperty = Object.hasOwnProperty || function (obj, key) {\n    return key in obj;\n};\n","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\"][\"blocks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","export default function _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { addFilter } from '@wordpress/hooks';\n\nfunction migrateLightBlockWrapper( settings ) {\n\tconst { apiVersion = 1 } = settings;\n\tif (\n\t\tapiVersion < 2 &&\n\t\thasBlockSupport( settings, 'lightBlockWrapper', false )\n\t) {\n\t\tsettings.apiVersion = 2;\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/compat/migrateLightBlockWrapper',\n\tmigrateLightBlockWrapper\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"lodash\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst BlockControlsDefault = createSlotFill( 'BlockControls' );\nconst BlockControlsBlock = createSlotFill( 'BlockControlsBlock' );\nconst BlockControlsInline = createSlotFill( 'BlockFormatControls' );\nconst BlockControlsOther = createSlotFill( 'BlockControlsOther' );\nconst BlockControlsParent = createSlotFill( 'BlockControlsParent' );\n\nconst groups = {\n\tdefault: BlockControlsDefault,\n\tblock: BlockControlsBlock,\n\tinline: BlockControlsInline,\n\tother: BlockControlsOther,\n\tparent: BlockControlsParent,\n};\n\nexport default groups;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\nexport const PREFERENCES_DEFAULTS = {\n\tinsertUsage: {},\n};\n\n/**\n * The default editor settings\n *\n * @typedef {Object} SETTINGS_DEFAULT\n * @property {boolean}       alignWide                              Enable/Disable Wide/Full Alignments\n * @property {boolean}       supportsLayout                         Enable/disable layouts support in container blocks.\n * @property {boolean}       imageEditing                           Image Editing settings set to false to disable.\n * @property {Array}         imageSizes                             Available image sizes\n * @property {number}        maxWidth                               Max width to constraint resizing\n * @property {boolean|Array} allowedBlockTypes                      Allowed block types\n * @property {boolean}       hasFixedToolbar                        Whether or not the editor toolbar is fixed\n * @property {boolean}       focusMode                              Whether the focus mode is enabled or not\n * @property {Array}         styles                                 Editor Styles\n * @property {boolean}       keepCaretInsideBlock                   Whether caret should move between blocks in edit mode\n * @property {string}        bodyPlaceholder                        Empty post placeholder\n * @property {string}        titlePlaceholder                       Empty title placeholder\n * @property {boolean}       canLockBlocks                          Whether the user can manage Block Lock state\n * @property {boolean}       codeEditingEnabled                     Whether or not the user can switch to the code editor\n * @property {boolean}       generateAnchors                        Enable/Disable auto anchor generation for Heading blocks\n * @property {boolean}       __experimentalCanUserUseUnfilteredHTML Whether the user should be able to use unfiltered HTML or the HTML should be filtered e.g., to remove elements considered insecure like iframes.\n * @property {boolean}       __experimentalBlockDirectory           Whether the user has enabled the Block Directory\n * @property {Array}         __experimentalBlockPatterns            Array of objects representing the block patterns\n * @property {Array}         __experimentalBlockPatternCategories   Array of objects representing the block pattern categories\n * @property {boolean}       __unstableGalleryWithImageBlocks       Whether the user has enabled the refactored gallery block which uses InnerBlocks\n */\nexport const SETTINGS_DEFAULTS = {\n\talignWide: false,\n\tsupportsLayout: true,\n\n\t// colors setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tcolors: [\n\t\t{\n\t\t\tname: __( 'Black' ),\n\t\t\tslug: 'black',\n\t\t\tcolor: '#000000',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cyan bluish gray' ),\n\t\t\tslug: 'cyan-bluish-gray',\n\t\t\tcolor: '#abb8c3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'White' ),\n\t\t\tslug: 'white',\n\t\t\tcolor: '#ffffff',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale pink' ),\n\t\t\tslug: 'pale-pink',\n\t\t\tcolor: '#f78da7',\n\t\t},\n\t\t{ name: __( 'Vivid red' ), slug: 'vivid-red', color: '#cf2e2e' },\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange' ),\n\t\t\tslug: 'luminous-vivid-orange',\n\t\t\tcolor: '#ff6900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber' ),\n\t\t\tslug: 'luminous-vivid-amber',\n\t\t\tcolor: '#fcb900',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan' ),\n\t\t\tslug: 'light-green-cyan',\n\t\t\tcolor: '#7bdcb5',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid green cyan' ),\n\t\t\tslug: 'vivid-green-cyan',\n\t\t\tcolor: '#00d084',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale cyan blue' ),\n\t\t\tslug: 'pale-cyan-blue',\n\t\t\tcolor: '#8ed1fc',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue' ),\n\t\t\tslug: 'vivid-cyan-blue',\n\t\t\tcolor: '#0693e3',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Vivid purple' ),\n\t\t\tslug: 'vivid-purple',\n\t\t\tcolor: '#9b51e0',\n\t\t},\n\t],\n\t// fontSizes setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tfontSizes: [\n\t\t{\n\t\t\tname: _x( 'Small', 'font size name' ),\n\t\t\tsize: 13,\n\t\t\tslug: 'small',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Normal', 'font size name' ),\n\t\t\tsize: 16,\n\t\t\tslug: 'normal',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Medium', 'font size name' ),\n\t\t\tsize: 20,\n\t\t\tslug: 'medium',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Large', 'font size name' ),\n\t\t\tsize: 36,\n\t\t\tslug: 'large',\n\t\t},\n\t\t{\n\t\t\tname: _x( 'Huge', 'font size name' ),\n\t\t\tsize: 42,\n\t\t\tslug: 'huge',\n\t\t},\n\t],\n\n\t// Image default size slug.\n\timageDefaultSize: 'large',\n\n\timageSizes: [\n\t\t{ slug: 'thumbnail', name: __( 'Thumbnail' ) },\n\t\t{ slug: 'medium', name: __( 'Medium' ) },\n\t\t{ slug: 'large', name: __( 'Large' ) },\n\t\t{ slug: 'full', name: __( 'Full Size' ) },\n\t],\n\n\t// Allow plugin to disable Image Editor if need be.\n\timageEditing: true,\n\n\t// This is current max width of the block inner area\n\t// It's used to constraint image resizing and this value could be overridden later by themes\n\tmaxWidth: 580,\n\n\t// Allowed block types for the editor, defaulting to true (all supported).\n\tallowedBlockTypes: true,\n\n\t// Maximum upload size in bytes allowed for the site.\n\tmaxUploadFileSize: 0,\n\n\t// List of allowed mime types and file extensions.\n\tallowedMimeTypes: null,\n\n\t// Allows to disable block locking interface.\n\tcanLockBlocks: true,\n\n\t__experimentalCanUserUseUnfilteredHTML: false,\n\t__experimentalBlockDirectory: false,\n\t__mobileEnablePageTemplates: false,\n\t__experimentalBlockPatterns: [],\n\t__experimentalBlockPatternCategories: [],\n\t__unstableGalleryWithImageBlocks: false,\n\n\tgenerateAnchors: false,\n\t// gradients setting is not used anymore now defaults are passed from theme.json on the server and core has its own defaults.\n\t// The setting is only kept for backward compatibility purposes.\n\tgradients: [\n\t\t{\n\t\t\tname: __( 'Vivid cyan blue to vivid purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%)',\n\t\t\tslug: 'vivid-cyan-blue-to-vivid-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Light green cyan to vivid green cyan' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%)',\n\t\t\tslug: 'light-green-cyan-to-vivid-green-cyan',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid amber to luminous vivid orange' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%)',\n\t\t\tslug: 'luminous-vivid-amber-to-luminous-vivid-orange',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous vivid orange to vivid red' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%)',\n\t\t\tslug: 'luminous-vivid-orange-to-vivid-red',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Very light gray to cyan bluish gray' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%)',\n\t\t\tslug: 'very-light-gray-to-cyan-bluish-gray',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Cool to warm spectrum' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%)',\n\t\t\tslug: 'cool-to-warm-spectrum',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush light purple' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%)',\n\t\t\tslug: 'blush-light-purple',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Blush bordeaux' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%)',\n\t\t\tslug: 'blush-bordeaux',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Luminous dusk' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%)',\n\t\t\tslug: 'luminous-dusk',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Pale ocean' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%)',\n\t\t\tslug: 'pale-ocean',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Electric grass' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%)',\n\t\t\tslug: 'electric-grass',\n\t\t},\n\t\t{\n\t\t\tname: __( 'Midnight' ),\n\t\t\tgradient:\n\t\t\t\t'linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%)',\n\t\t\tslug: 'midnight',\n\t\t},\n\t],\n\n\t__unstableResolvedAssets: { styles: [], scripts: [] },\n};\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * Insert one or multiple elements into a given position of an array.\n *\n * @param {Array}  array    Source array.\n * @param {*}      elements Elements to insert.\n * @param {number} index    Insert Position.\n *\n * @return {Array} Result.\n */\nexport function insertAt( array, elements, index ) {\n\treturn [\n\t\t...array.slice( 0, index ),\n\t\t...castArray( elements ),\n\t\t...array.slice( index ),\n\t];\n}\n\n/**\n * Moves an element in an array.\n *\n * @param {Array}  array Source array.\n * @param {number} from  Source index.\n * @param {number} to    Destination index.\n * @param {number} count Number of elements to move.\n *\n * @return {Array} Result.\n */\nexport function moveTo( array, from, to, count = 1 ) {\n\tconst withoutMovedElements = [ ...array ];\n\twithoutMovedElements.splice( from, count );\n\treturn insertAt(\n\t\twithoutMovedElements,\n\t\tarray.slice( from, from + count ),\n\t\tto\n\t);\n}\n","/**\n * External dependencies\n */\nimport {\n\treduce,\n\tomit,\n\twithout,\n\tmapValues,\n\tisEqual,\n\tisEmpty,\n\tomitBy,\n} from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { pipe } from '@wordpress/compose';\nimport { combineReducers, select } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n/**\n * Internal dependencies\n */\nimport { PREFERENCES_DEFAULTS, SETTINGS_DEFAULTS } from './defaults';\nimport { insertAt, moveTo } from './array';\n\nconst identity = ( x ) => x;\n\n/**\n * Given an array of blocks, returns an object where each key is a nesting\n * context, the value of which is an array of block client IDs existing within\n * that nesting context.\n *\n * @param {Array}   blocks       Blocks to map.\n * @param {?string} rootClientId Assumed root client ID.\n *\n * @return {Object} Block order map object.\n */\nfunction mapBlockOrder( blocks, rootClientId = '' ) {\n\tconst result = { [ rootClientId ]: [] };\n\n\tblocks.forEach( ( block ) => {\n\t\tconst { clientId, innerBlocks } = block;\n\n\t\tresult[ rootClientId ].push( clientId );\n\n\t\tObject.assign( result, mapBlockOrder( innerBlocks, clientId ) );\n\t} );\n\n\treturn result;\n}\n\n/**\n * Given an array of blocks, returns an object where each key contains\n * the clientId of the block and the value is the parent of the block.\n *\n * @param {Array}   blocks       Blocks to map.\n * @param {?string} rootClientId Assumed root client ID.\n *\n * @return {Object} Block order map object.\n */\nfunction mapBlockParents( blocks, rootClientId = '' ) {\n\treturn blocks.reduce(\n\t\t( result, block ) =>\n\t\t\tObject.assign(\n\t\t\t\tresult,\n\t\t\t\t{ [ block.clientId ]: rootClientId },\n\t\t\t\tmapBlockParents( block.innerBlocks, block.clientId )\n\t\t\t),\n\t\t{}\n\t);\n}\n\n/**\n * Helper method to iterate through all blocks, recursing into inner blocks,\n * applying a transformation function to each one.\n * Returns a flattened object with the transformed blocks.\n *\n * @param {Array}    blocks    Blocks to flatten.\n * @param {Function} transform Transforming function to be applied to each block.\n *\n * @return {Object} Flattened object.\n */\nfunction flattenBlocks( blocks, transform = identity ) {\n\tconst result = {};\n\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\tstack.push( ...innerBlocks );\n\t\tresult[ block.clientId ] = transform( block );\n\t}\n\n\treturn result;\n}\n\n/**\n * Given an array of blocks, returns an object containing all blocks, without\n * attributes, recursing into inner blocks. Keys correspond to the block client\n * ID, the value of which is the attributes object.\n *\n * @param {Array} blocks Blocks to flatten.\n *\n * @return {Object} Flattened block attributes object.\n */\nfunction getFlattenedBlocksWithoutAttributes( blocks ) {\n\treturn flattenBlocks( blocks, ( block ) => omit( block, 'attributes' ) );\n}\n\n/**\n * Given an array of blocks, returns an object containing all block attributes,\n * recursing into inner blocks. Keys correspond to the block client ID, the\n * value of which is the attributes object.\n *\n * @param {Array} blocks Blocks to flatten.\n *\n * @return {Object} Flattened block attributes object.\n */\nfunction getFlattenedBlockAttributes( blocks ) {\n\treturn flattenBlocks( blocks, ( block ) => block.attributes );\n}\n\n/**\n * Returns an object against which it is safe to perform mutating operations,\n * given the original object and its current working copy.\n *\n * @param {Object} original Original object.\n * @param {Object} working  Working object.\n *\n * @return {Object} Mutation-safe object.\n */\nfunction getMutateSafeObject( original, working ) {\n\tif ( original === working ) {\n\t\treturn { ...original };\n\t}\n\n\treturn working;\n}\n\n/**\n * Returns true if the two object arguments have the same keys, or false\n * otherwise.\n *\n * @param {Object} a First object.\n * @param {Object} b Second object.\n *\n * @return {boolean} Whether the two objects have the same keys.\n */\nexport function hasSameKeys( a, b ) {\n\treturn isEqual( Object.keys( a ), Object.keys( b ) );\n}\n\n/**\n * Returns true if, given the currently dispatching action and the previously\n * dispatched action, the two actions are updating the same block attribute, or\n * false otherwise.\n *\n * @param {Object} action     Currently dispatching action.\n * @param {Object} lastAction Previously dispatched action.\n *\n * @return {boolean} Whether actions are updating the same block attribute.\n */\nexport function isUpdatingSameBlockAttribute( action, lastAction ) {\n\treturn (\n\t\taction.type === 'UPDATE_BLOCK_ATTRIBUTES' &&\n\t\tlastAction !== undefined &&\n\t\tlastAction.type === 'UPDATE_BLOCK_ATTRIBUTES' &&\n\t\tisEqual( action.clientIds, lastAction.clientIds ) &&\n\t\thasSameKeys( action.attributes, lastAction.attributes )\n\t);\n}\n\nfunction buildBlockTree( state, blocks ) {\n\tconst result = {};\n\tconst stack = [ ...blocks ];\n\tconst flattenedBlocks = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst block = stack.shift();\n\t\tstack.push( ...block.innerBlocks );\n\t\tflattenedBlocks.push( ...block.innerBlocks );\n\t}\n\t// Create objects before mutating them, that way it's always defined.\n\tfor ( const block of flattenedBlocks ) {\n\t\tresult[ block.clientId ] = {};\n\t}\n\tfor ( const block of flattenedBlocks ) {\n\t\tresult[ block.clientId ] = Object.assign( result[ block.clientId ], {\n\t\t\t...state.byClientId[ block.clientId ],\n\t\t\tattributes: state.attributes[ block.clientId ],\n\t\t\tinnerBlocks: block.innerBlocks.map(\n\t\t\t\t( subBlock ) => result[ subBlock.clientId ]\n\t\t\t),\n\t\t} );\n\t}\n\n\treturn result;\n}\n\nfunction updateParentInnerBlocksInTree(\n\tstate,\n\ttree,\n\tupdatedClientIds,\n\tupdateChildrenOfUpdatedClientIds = false\n) {\n\tconst uncontrolledParents = new Set( [] );\n\tconst controlledParents = new Set();\n\tfor ( const clientId of updatedClientIds ) {\n\t\tlet current = updateChildrenOfUpdatedClientIds\n\t\t\t? clientId\n\t\t\t: state.parents[ clientId ];\n\t\tdo {\n\t\t\tif ( state.controlledInnerBlocks[ current ] ) {\n\t\t\t\t// Should stop on controlled blocks.\n\t\t\t\t// If we reach a controlled parent, break out of the loop.\n\t\t\t\tcontrolledParents.add( current );\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Else continue traversing up through parents.\n\t\t\t\tuncontrolledParents.add( current );\n\t\t\t\tcurrent = state.parents[ current ];\n\t\t\t}\n\t\t} while ( current !== undefined );\n\t}\n\n\t// To make sure the order of assignments doesn't matter,\n\t// we first create empty objects and mutates the inner blocks later.\n\tfor ( const clientId of uncontrolledParents ) {\n\t\ttree[ clientId ] = {\n\t\t\t...tree[ clientId ],\n\t\t};\n\t}\n\tfor ( const clientId of uncontrolledParents ) {\n\t\ttree[ clientId ].innerBlocks = ( state.order[ clientId ] || [] ).map(\n\t\t\t( subClientId ) => tree[ subClientId ]\n\t\t);\n\t}\n\n\t// Controlled parent blocks, need a dedicated key for their inner blocks\n\t// to be used when doing getBlocks( controlledBlockClientId ).\n\tfor ( const clientId of controlledParents ) {\n\t\ttree[ 'controlled||' + clientId ] = {\n\t\t\tinnerBlocks: ( state.order[ clientId ] || [] ).map(\n\t\t\t\t( subClientId ) => tree[ subClientId ]\n\t\t\t),\n\t\t};\n\t}\n\n\treturn tree;\n}\n\n/**\n * Higher-order reducer intended to compute full block objects key for each block in the post.\n * This is a denormalization to optimize the performance of the getBlock selectors and avoid\n * recomputing the block objects and avoid heavy memoization.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withBlockTree =\n\t( reducer ) =>\n\t( state = {}, action ) => {\n\t\tconst newState = reducer( state, action );\n\n\t\tif ( newState === state ) {\n\t\t\treturn state;\n\t\t}\n\n\t\tnewState.tree = state.tree ? state.tree : {};\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\tcase 'INSERT_BLOCKS': {\n\t\t\t\tconst subTree = buildBlockTree( newState, action.blocks );\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\t{\n\t\t\t\t\t\t...newState.tree,\n\t\t\t\t\t\t...subTree,\n\t\t\t\t\t},\n\t\t\t\t\taction.rootClientId ? [ action.rootClientId ] : [ '' ],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'UPDATE_BLOCK':\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\t{\n\t\t\t\t\t\t...newState.tree,\n\t\t\t\t\t\t[ action.clientId ]: {\n\t\t\t\t\t\t\t...newState.tree[ action.clientId ],\n\t\t\t\t\t\t\t...newState.byClientId[ action.clientId ],\n\t\t\t\t\t\t\tattributes: newState.attributes[ action.clientId ],\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t[ action.clientId ],\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'UPDATE_BLOCK_ATTRIBUTES': {\n\t\t\t\tconst newSubTree = action.clientIds.reduce(\n\t\t\t\t\t( result, clientId ) => {\n\t\t\t\t\t\tresult[ clientId ] = {\n\t\t\t\t\t\t\t...newState.tree[ clientId ],\n\t\t\t\t\t\t\tattributes: newState.attributes[ clientId ],\n\t\t\t\t\t\t};\n\t\t\t\t\t\treturn result;\n\t\t\t\t\t},\n\t\t\t\t\t{}\n\t\t\t\t);\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\t{\n\t\t\t\t\t\t...newState.tree,\n\t\t\t\t\t\t...newSubTree,\n\t\t\t\t\t},\n\t\t\t\t\taction.clientIds,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN': {\n\t\t\t\tconst subTree = buildBlockTree( newState, action.blocks );\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\t{\n\t\t\t\t\t\t...omit(\n\t\t\t\t\t\t\tnewState.tree,\n\t\t\t\t\t\t\taction.replacedClientIds.concat(\n\t\t\t\t\t\t\t\t// Controlled inner blocks are only removed\n\t\t\t\t\t\t\t\t// if the block doesn't move to another position\n\t\t\t\t\t\t\t\t// otherwise their content will be lost.\n\t\t\t\t\t\t\t\taction.replacedClientIds\n\t\t\t\t\t\t\t\t\t.filter(\n\t\t\t\t\t\t\t\t\t\t( clientId ) => ! subTree[ clientId ]\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t( clientId ) =>\n\t\t\t\t\t\t\t\t\t\t\t'controlled||' + clientId\n\t\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...subTree,\n\t\t\t\t\t},\n\t\t\t\t\taction.blocks.map( ( b ) => b.clientId ),\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\t// If there are no replaced blocks, it means we're removing blocks so we need to update their parent.\n\t\t\t\tconst parentsOfRemovedBlocks = [];\n\t\t\t\tfor ( const clientId of action.clientIds ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tstate.parents[ clientId ] !== undefined &&\n\t\t\t\t\t\t( state.parents[ clientId ] === '' ||\n\t\t\t\t\t\t\tnewState.byClientId[ state.parents[ clientId ] ] )\n\t\t\t\t\t) {\n\t\t\t\t\t\tparentsOfRemovedBlocks.push(\n\t\t\t\t\t\t\tstate.parents[ clientId ]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\tnewState.tree,\n\t\t\t\t\tparentsOfRemovedBlocks,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\tconst parentsOfRemovedBlocks = [];\n\t\t\t\tfor ( const clientId of action.clientIds ) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tstate.parents[ clientId ] !== undefined &&\n\t\t\t\t\t\t( state.parents[ clientId ] === '' ||\n\t\t\t\t\t\t\tnewState.byClientId[ state.parents[ clientId ] ] )\n\t\t\t\t\t) {\n\t\t\t\t\t\tparentsOfRemovedBlocks.push(\n\t\t\t\t\t\t\tstate.parents[ clientId ]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\tomit(\n\t\t\t\t\t\tnewState.tree,\n\t\t\t\t\t\taction.removedClientIds.concat(\n\t\t\t\t\t\t\taction.removedClientIds.map(\n\t\t\t\t\t\t\t\t( clientId ) => 'controlled||' + clientId\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\tparentsOfRemovedBlocks,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'MOVE_BLOCKS_TO_POSITION': {\n\t\t\t\tconst updatedBlockUids = [];\n\t\t\t\tif ( action.fromRootClientId ) {\n\t\t\t\t\tupdatedBlockUids.push( action.fromRootClientId );\n\t\t\t\t} else {\n\t\t\t\t\tupdatedBlockUids.push( '' );\n\t\t\t\t}\n\t\t\t\tif ( action.toRootClientId ) {\n\t\t\t\t\tupdatedBlockUids.push( action.toRootClientId );\n\t\t\t\t}\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\tnewState.tree,\n\t\t\t\t\tupdatedBlockUids,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'MOVE_BLOCKS_UP':\n\t\t\tcase 'MOVE_BLOCKS_DOWN': {\n\t\t\t\tconst updatedBlockUids = [\n\t\t\t\t\taction.rootClientId ? action.rootClientId : '',\n\t\t\t\t];\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\tnewState.tree,\n\t\t\t\t\tupdatedBlockUids,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'SAVE_REUSABLE_BLOCK_SUCCESS': {\n\t\t\t\tconst updatedBlockUids = Object.keys(\n\t\t\t\t\tomitBy( newState.attributes, ( attributes, clientId ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tnewState.byClientId[ clientId ].name !==\n\t\t\t\t\t\t\t\t'core/block' ||\n\t\t\t\t\t\t\tattributes.ref !== action.updatedId\n\t\t\t\t\t\t);\n\t\t\t\t\t} )\n\t\t\t\t);\n\n\t\t\t\tnewState.tree = updateParentInnerBlocksInTree(\n\t\t\t\t\tnewState,\n\t\t\t\t\t{\n\t\t\t\t\t\t...newState.tree,\n\t\t\t\t\t\t...updatedBlockUids.reduce( ( result, clientId ) => {\n\t\t\t\t\t\t\tresult[ clientId ] = {\n\t\t\t\t\t\t\t\t...newState.byClientId[ clientId ],\n\t\t\t\t\t\t\t\tattributes: newState.attributes[ clientId ],\n\t\t\t\t\t\t\t\tinnerBlocks:\n\t\t\t\t\t\t\t\t\tnewState.tree[ clientId ].innerBlocks,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t}, {} ),\n\t\t\t\t\t},\n\t\t\t\t\tupdatedBlockUids,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn newState;\n\t};\n\n/**\n * Higher-order reducer intended to augment the blocks reducer, assigning an\n * `isPersistentChange` property value corresponding to whether a change in\n * state can be considered as persistent. All changes are considered persistent\n * except when updating the same block attribute as in the previous action.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nfunction withPersistentBlockChange( reducer ) {\n\tlet lastAction;\n\tlet markNextChangeAsNotPersistent = false;\n\n\treturn ( state, action ) => {\n\t\tlet nextState = reducer( state, action );\n\n\t\tconst isExplicitPersistentChange =\n\t\t\taction.type === 'MARK_LAST_CHANGE_AS_PERSISTENT' ||\n\t\t\tmarkNextChangeAsNotPersistent;\n\n\t\t// Defer to previous state value (or default) unless changing or\n\t\t// explicitly marking as persistent.\n\t\tif ( state === nextState && ! isExplicitPersistentChange ) {\n\t\t\tmarkNextChangeAsNotPersistent =\n\t\t\t\taction.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';\n\n\t\t\tconst nextIsPersistentChange = state?.isPersistentChange ?? true;\n\t\t\tif ( state.isPersistentChange === nextIsPersistentChange ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...nextState,\n\t\t\t\tisPersistentChange: nextIsPersistentChange,\n\t\t\t};\n\t\t}\n\n\t\tnextState = {\n\t\t\t...nextState,\n\t\t\tisPersistentChange: isExplicitPersistentChange\n\t\t\t\t? ! markNextChangeAsNotPersistent\n\t\t\t\t: ! isUpdatingSameBlockAttribute( action, lastAction ),\n\t\t};\n\n\t\t// In comparing against the previous action, consider only those which\n\t\t// would have qualified as one which would have been ignored or not\n\t\t// have resulted in a changed state.\n\t\tlastAction = action;\n\t\tmarkNextChangeAsNotPersistent =\n\t\t\taction.type === 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT';\n\n\t\treturn nextState;\n\t};\n}\n\n/**\n * Higher-order reducer intended to augment the blocks reducer, assigning an\n * `isIgnoredChange` property value corresponding to whether a change in state\n * can be considered as ignored. A change is considered ignored when the result\n * of an action not incurred by direct user interaction.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nfunction withIgnoredBlockChange( reducer ) {\n\t/**\n\t * Set of action types for which a blocks state change should be ignored.\n\t *\n\t * @type {Set}\n\t */\n\tconst IGNORED_ACTION_TYPES = new Set( [ 'RECEIVE_BLOCKS' ] );\n\n\treturn ( state, action ) => {\n\t\tconst nextState = reducer( state, action );\n\n\t\tif ( nextState !== state ) {\n\t\t\tnextState.isIgnoredChange = IGNORED_ACTION_TYPES.has( action.type );\n\t\t}\n\n\t\treturn nextState;\n\t};\n}\n\n/**\n * Higher-order reducer targeting the combined blocks reducer, augmenting\n * block client IDs in remove action to include cascade of inner blocks.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withInnerBlocksRemoveCascade = ( reducer ) => ( state, action ) => {\n\t// Gets all children which need to be removed.\n\tconst getAllChildren = ( clientIds ) => {\n\t\tlet result = clientIds;\n\t\tfor ( let i = 0; i < result.length; i++ ) {\n\t\t\tif (\n\t\t\t\t! state.order[ result[ i ] ] ||\n\t\t\t\t( action.keepControlledInnerBlocks &&\n\t\t\t\t\taction.keepControlledInnerBlocks[ result[ i ] ] )\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( result === clientIds ) {\n\t\t\t\tresult = [ ...result ];\n\t\t\t}\n\n\t\t\tresult.push( ...state.order[ result[ i ] ] );\n\t\t}\n\t\treturn result;\n\t};\n\n\tif ( state ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'REMOVE_BLOCKS':\n\t\t\t\taction = {\n\t\t\t\t\t...action,\n\t\t\t\t\ttype: 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN',\n\t\t\t\t\tremovedClientIds: getAllChildren( action.clientIds ),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\tcase 'REPLACE_BLOCKS':\n\t\t\t\taction = {\n\t\t\t\t\t...action,\n\t\t\t\t\ttype: 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN',\n\t\t\t\t\treplacedClientIds: getAllChildren( action.clientIds ),\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Higher-order reducer which targets the combined blocks reducer and handles\n * the `RESET_BLOCKS` action. When dispatched, this action will replace all\n * blocks that exist in the post, leaving blocks that exist only in state (e.g.\n * reusable blocks and blocks controlled by inner blocks controllers) alone.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withBlockReset = ( reducer ) => ( state, action ) => {\n\tif ( action.type === 'RESET_BLOCKS' ) {\n\t\tconst newState = {\n\t\t\t...state,\n\t\t\tbyClientId: getFlattenedBlocksWithoutAttributes( action.blocks ),\n\t\t\tattributes: getFlattenedBlockAttributes( action.blocks ),\n\t\t\torder: mapBlockOrder( action.blocks ),\n\t\t\tparents: mapBlockParents( action.blocks ),\n\t\t\tcontrolledInnerBlocks: {},\n\t\t};\n\n\t\tconst subTree = buildBlockTree( newState, action.blocks );\n\t\tnewState.tree = {\n\t\t\t...subTree,\n\t\t\t// Root.\n\t\t\t'': {\n\t\t\t\tinnerBlocks: action.blocks.map(\n\t\t\t\t\t( subBlock ) => subTree[ subBlock.clientId ]\n\t\t\t\t),\n\t\t\t},\n\t\t};\n\n\t\treturn newState;\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Higher-order reducer which targets the combined blocks reducer and handles\n * the `REPLACE_INNER_BLOCKS` action. When dispatched, this action the state\n * should become equivalent to the execution of a `REMOVE_BLOCKS` action\n * containing all the child's of the root block followed by the execution of\n * `INSERT_BLOCKS` with the new blocks.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withReplaceInnerBlocks = ( reducer ) => ( state, action ) => {\n\tif ( action.type !== 'REPLACE_INNER_BLOCKS' ) {\n\t\treturn reducer( state, action );\n\t}\n\n\t// Finds every nested inner block controller. We must check the action blocks\n\t// and not just the block parent state because some inner block controllers\n\t// should be deleted if specified, whereas others should not be deleted. If\n\t// a controlled should not be deleted, then we need to avoid deleting its\n\t// inner blocks from the block state because its inner blocks will not be\n\t// attached to the block in the action.\n\tconst nestedControllers = {};\n\tif ( Object.keys( state.controlledInnerBlocks ).length ) {\n\t\tconst stack = [ ...action.blocks ];\n\t\twhile ( stack.length ) {\n\t\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t\tstack.push( ...innerBlocks );\n\t\t\tif ( !! state.controlledInnerBlocks[ block.clientId ] ) {\n\t\t\t\tnestedControllers[ block.clientId ] = true;\n\t\t\t}\n\t\t}\n\t}\n\n\t// The `keepControlledInnerBlocks` prop will keep the inner blocks of the\n\t// marked block in the block state so that they can be reattached to the\n\t// marked block when we re-insert everything a few lines below.\n\tlet stateAfterBlocksRemoval = state;\n\tif ( state.order[ action.rootClientId ] ) {\n\t\tstateAfterBlocksRemoval = reducer( stateAfterBlocksRemoval, {\n\t\t\ttype: 'REMOVE_BLOCKS',\n\t\t\tkeepControlledInnerBlocks: nestedControllers,\n\t\t\tclientIds: state.order[ action.rootClientId ],\n\t\t} );\n\t}\n\tlet stateAfterInsert = stateAfterBlocksRemoval;\n\tif ( action.blocks.length ) {\n\t\tstateAfterInsert = reducer( stateAfterInsert, {\n\t\t\t...action,\n\t\t\ttype: 'INSERT_BLOCKS',\n\t\t\tindex: 0,\n\t\t} );\n\n\t\t// We need to re-attach the controlled inner blocks to the blocks tree and\n\t\t// preserve their block order. Otherwise, an inner block controller's blocks\n\t\t// will be deleted entirely from its entity.\n\t\tstateAfterInsert.order = {\n\t\t\t...stateAfterInsert.order,\n\t\t\t...reduce(\n\t\t\t\tnestedControllers,\n\t\t\t\t( result, value, key ) => {\n\t\t\t\t\tif ( state.order[ key ] ) {\n\t\t\t\t\t\tresult[ key ] = state.order[ key ];\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t\tstateAfterInsert.tree = {\n\t\t\t...stateAfterInsert.tree,\n\t\t\t...reduce(\n\t\t\t\tnestedControllers,\n\t\t\t\t( result, value, _key ) => {\n\t\t\t\t\tconst key = `controlled||${ _key }`;\n\t\t\t\t\tif ( state.tree[ key ] ) {\n\t\t\t\t\t\tresult[ key ] = state.tree[ key ];\n\t\t\t\t\t}\n\t\t\t\t\treturn result;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn stateAfterInsert;\n};\n\n/**\n * Higher-order reducer which targets the combined blocks reducer and handles\n * the `SAVE_REUSABLE_BLOCK_SUCCESS` action. This action can't be handled by\n * regular reducers and needs a higher-order reducer since it needs access to\n * both `byClientId` and `attributes` simultaneously.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withSaveReusableBlock = ( reducer ) => ( state, action ) => {\n\tif ( state && action.type === 'SAVE_REUSABLE_BLOCK_SUCCESS' ) {\n\t\tconst { id, updatedId } = action;\n\n\t\t// If a temporary reusable block is saved, we swap the temporary id with the final one.\n\t\tif ( id === updatedId ) {\n\t\t\treturn state;\n\t\t}\n\n\t\tstate = { ...state };\n\n\t\tstate.attributes = mapValues(\n\t\t\tstate.attributes,\n\t\t\t( attributes, clientId ) => {\n\t\t\t\tconst { name } = state.byClientId[ clientId ];\n\t\t\t\tif ( name === 'core/block' && attributes.ref === id ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...attributes,\n\t\t\t\t\t\tref: updatedId,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn attributes;\n\t\t\t}\n\t\t);\n\t}\n\n\treturn reducer( state, action );\n};\n/**\n * Higher-order reducer which removes blocks from state when switching parent block controlled state.\n *\n * @param {Function} reducer Original reducer function.\n *\n * @return {Function} Enhanced reducer function.\n */\nconst withResetControlledBlocks = ( reducer ) => ( state, action ) => {\n\tif ( action.type === 'SET_HAS_CONTROLLED_INNER_BLOCKS' ) {\n\t\t// when switching a block from controlled to uncontrolled or inverse,\n\t\t// we need to remove its content first.\n\t\tconst tempState = reducer( state, {\n\t\t\ttype: 'REPLACE_INNER_BLOCKS',\n\t\t\trootClientId: action.clientId,\n\t\t\tblocks: [],\n\t\t} );\n\t\treturn reducer( tempState, action );\n\t}\n\n\treturn reducer( state, action );\n};\n\n/**\n * Reducer returning the blocks state.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const blocks = pipe(\n\tcombineReducers,\n\twithSaveReusableBlock, // Needs to be before withBlockCache.\n\twithBlockTree, // Needs to be before withInnerBlocksRemoveCascade.\n\twithInnerBlocksRemoveCascade,\n\twithReplaceInnerBlocks, // Needs to be after withInnerBlocksRemoveCascade.\n\twithBlockReset,\n\twithPersistentBlockChange,\n\twithIgnoredBlockChange,\n\twithResetControlledBlocks\n)( {\n\tbyClientId( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\tcase 'INSERT_BLOCKS':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...getFlattenedBlocksWithoutAttributes( action.blocks ),\n\t\t\t\t};\n\n\t\t\tcase 'UPDATE_BLOCK':\n\t\t\t\t// Ignore updates if block isn't known.\n\t\t\t\tif ( ! state[ action.clientId ] ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\t// Do nothing if only attributes change.\n\t\t\t\tconst changes = omit( action.updates, 'attributes' );\n\t\t\t\tif ( isEmpty( changes ) ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ action.clientId ]: {\n\t\t\t\t\t\t...state[ action.clientId ],\n\t\t\t\t\t\t...changes,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\tcase 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\tif ( ! action.blocks ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...omit( state, action.replacedClientIds ),\n\t\t\t\t\t...getFlattenedBlocksWithoutAttributes( action.blocks ),\n\t\t\t\t};\n\n\t\t\tcase 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\treturn omit( state, action.removedClientIds );\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tattributes( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\tcase 'INSERT_BLOCKS':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...getFlattenedBlockAttributes( action.blocks ),\n\t\t\t\t};\n\n\t\t\tcase 'UPDATE_BLOCK':\n\t\t\t\t// Ignore updates if block isn't known or there are no attribute changes.\n\t\t\t\tif (\n\t\t\t\t\t! state[ action.clientId ] ||\n\t\t\t\t\t! action.updates.attributes\n\t\t\t\t) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ action.clientId ]: {\n\t\t\t\t\t\t...state[ action.clientId ],\n\t\t\t\t\t\t...action.updates.attributes,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\tcase 'UPDATE_BLOCK_ATTRIBUTES': {\n\t\t\t\t// Avoid a state change if none of the block IDs are known.\n\t\t\t\tif ( action.clientIds.every( ( id ) => ! state[ id ] ) ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst next = action.clientIds.reduce(\n\t\t\t\t\t( accumulator, id ) => ( {\n\t\t\t\t\t\t...accumulator,\n\t\t\t\t\t\t[ id ]: reduce(\n\t\t\t\t\t\t\taction.uniqueByBlock\n\t\t\t\t\t\t\t\t? action.attributes[ id ]\n\t\t\t\t\t\t\t\t: action.attributes,\n\t\t\t\t\t\t\t( result, value, key ) => {\n\t\t\t\t\t\t\t\t// Consider as updates only changed values.\n\t\t\t\t\t\t\t\tif ( value !== result[ key ] ) {\n\t\t\t\t\t\t\t\t\tresult = getMutateSafeObject(\n\t\t\t\t\t\t\t\t\t\tstate[ id ],\n\t\t\t\t\t\t\t\t\t\tresult\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tresult[ key ] = value;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tstate[ id ]\n\t\t\t\t\t\t),\n\t\t\t\t\t} ),\n\t\t\t\t\t{}\n\t\t\t\t);\n\n\t\t\t\tif (\n\t\t\t\t\taction.clientIds.every(\n\t\t\t\t\t\t( id ) => next[ id ] === state[ id ]\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn { ...state, ...next };\n\t\t\t}\n\n\t\t\tcase 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\tif ( ! action.blocks ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...omit( state, action.replacedClientIds ),\n\t\t\t\t\t...getFlattenedBlockAttributes( action.blocks ),\n\t\t\t\t};\n\n\t\t\tcase 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\treturn omit( state, action.removedClientIds );\n\t\t}\n\n\t\treturn state;\n\t},\n\n\torder( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_BLOCKS': {\n\t\t\t\tconst blockOrder = mapBlockOrder( action.blocks );\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...omit( blockOrder, '' ),\n\t\t\t\t\t'': ( state?.[ '' ] || [] ).concat( blockOrder[ '' ] ),\n\t\t\t\t};\n\t\t\t}\n\t\t\tcase 'INSERT_BLOCKS': {\n\t\t\t\tconst { rootClientId = '' } = action;\n\t\t\t\tconst subState = state[ rootClientId ] || [];\n\t\t\t\tconst mappedBlocks = mapBlockOrder(\n\t\t\t\t\taction.blocks,\n\t\t\t\t\trootClientId\n\t\t\t\t);\n\t\t\t\tconst { index = subState.length } = action;\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...mappedBlocks,\n\t\t\t\t\t[ rootClientId ]: insertAt(\n\t\t\t\t\t\tsubState,\n\t\t\t\t\t\tmappedBlocks[ rootClientId ],\n\t\t\t\t\t\tindex\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'MOVE_BLOCKS_TO_POSITION': {\n\t\t\t\tconst {\n\t\t\t\t\tfromRootClientId = '',\n\t\t\t\t\ttoRootClientId = '',\n\t\t\t\t\tclientIds,\n\t\t\t\t} = action;\n\t\t\t\tconst { index = state[ toRootClientId ].length } = action;\n\n\t\t\t\t// Moving inside the same parent block.\n\t\t\t\tif ( fromRootClientId === toRootClientId ) {\n\t\t\t\t\tconst subState = state[ toRootClientId ];\n\t\t\t\t\tconst fromIndex = subState.indexOf( clientIds[ 0 ] );\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...state,\n\t\t\t\t\t\t[ toRootClientId ]: moveTo(\n\t\t\t\t\t\t\tstate[ toRootClientId ],\n\t\t\t\t\t\t\tfromIndex,\n\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\tclientIds.length\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Moving from a parent block to another.\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ fromRootClientId ]: without(\n\t\t\t\t\t\tstate[ fromRootClientId ],\n\t\t\t\t\t\t...clientIds\n\t\t\t\t\t),\n\t\t\t\t\t[ toRootClientId ]: insertAt(\n\t\t\t\t\t\tstate[ toRootClientId ],\n\t\t\t\t\t\tclientIds,\n\t\t\t\t\t\tindex\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'MOVE_BLOCKS_UP': {\n\t\t\t\tconst { clientIds, rootClientId = '' } = action;\n\t\t\t\tconst firstClientId = clientIds[ 0 ];\n\t\t\t\tconst subState = state[ rootClientId ];\n\n\t\t\t\tif ( ! subState.length || firstClientId === subState[ 0 ] ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst firstIndex = subState.indexOf( firstClientId );\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ rootClientId ]: moveTo(\n\t\t\t\t\t\tsubState,\n\t\t\t\t\t\tfirstIndex,\n\t\t\t\t\t\tfirstIndex - 1,\n\t\t\t\t\t\tclientIds.length\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'MOVE_BLOCKS_DOWN': {\n\t\t\t\tconst { clientIds, rootClientId = '' } = action;\n\t\t\t\tconst firstClientId = clientIds[ 0 ];\n\t\t\t\tconst lastClientId = clientIds[ clientIds.length - 1 ];\n\t\t\t\tconst subState = state[ rootClientId ];\n\n\t\t\t\tif (\n\t\t\t\t\t! subState.length ||\n\t\t\t\t\tlastClientId === subState[ subState.length - 1 ]\n\t\t\t\t) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst firstIndex = subState.indexOf( firstClientId );\n\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t[ rootClientId ]: moveTo(\n\t\t\t\t\t\tsubState,\n\t\t\t\t\t\tfirstIndex,\n\t\t\t\t\t\tfirstIndex + 1,\n\t\t\t\t\t\tclientIds.length\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN': {\n\t\t\t\tconst { clientIds } = action;\n\t\t\t\tif ( ! action.blocks ) {\n\t\t\t\t\treturn state;\n\t\t\t\t}\n\n\t\t\t\tconst mappedBlocks = mapBlockOrder( action.blocks );\n\n\t\t\t\treturn pipe( [\n\t\t\t\t\t( nextState ) =>\n\t\t\t\t\t\tomit( nextState, action.replacedClientIds ),\n\t\t\t\t\t( nextState ) => ( {\n\t\t\t\t\t\t...nextState,\n\t\t\t\t\t\t...omit( mappedBlocks, '' ),\n\t\t\t\t\t} ),\n\t\t\t\t\t( nextState ) =>\n\t\t\t\t\t\tmapValues( nextState, ( subState ) =>\n\t\t\t\t\t\t\treduce(\n\t\t\t\t\t\t\t\tsubState,\n\t\t\t\t\t\t\t\t( result, clientId ) => {\n\t\t\t\t\t\t\t\t\tif ( clientId === clientIds[ 0 ] ) {\n\t\t\t\t\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\t\t\t\t\t...result,\n\t\t\t\t\t\t\t\t\t\t\t...mappedBlocks[ '' ],\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tclientIds.indexOf( clientId ) === -1\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tresult.push( clientId );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn result;\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)\n\t\t\t\t\t\t),\n\t\t\t\t] )( state );\n\t\t\t}\n\n\t\t\tcase 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\treturn pipe( [\n\t\t\t\t\t// Remove inner block ordering for removed blocks.\n\t\t\t\t\t( nextState ) => omit( nextState, action.removedClientIds ),\n\n\t\t\t\t\t// Remove deleted blocks from other blocks' orderings.\n\t\t\t\t\t( nextState ) =>\n\t\t\t\t\t\tmapValues( nextState, ( subState ) =>\n\t\t\t\t\t\t\twithout( subState, ...action.removedClientIds )\n\t\t\t\t\t\t),\n\t\t\t\t] )( state );\n\t\t}\n\n\t\treturn state;\n\t},\n\n\t// While technically redundant data as the inverse of `order`, it serves as\n\t// an optimization for the selectors which derive the ancestry of a block.\n\tparents( state = {}, action ) {\n\t\tswitch ( action.type ) {\n\t\t\tcase 'RECEIVE_BLOCKS':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...mapBlockParents( action.blocks ),\n\t\t\t\t};\n\n\t\t\tcase 'INSERT_BLOCKS':\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...mapBlockParents(\n\t\t\t\t\t\taction.blocks,\n\t\t\t\t\t\taction.rootClientId || ''\n\t\t\t\t\t),\n\t\t\t\t};\n\n\t\t\tcase 'MOVE_BLOCKS_TO_POSITION': {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\t...action.clientIds.reduce( ( accumulator, id ) => {\n\t\t\t\t\t\taccumulator[ id ] = action.toRootClientId || '';\n\t\t\t\t\t\treturn accumulator;\n\t\t\t\t\t}, {} ),\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tcase 'REPLACE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\treturn {\n\t\t\t\t\t...omit( state, action.replacedClientIds ),\n\t\t\t\t\t...mapBlockParents(\n\t\t\t\t\t\taction.blocks,\n\t\t\t\t\t\tstate[ action.clientIds[ 0 ] ]\n\t\t\t\t\t),\n\t\t\t\t};\n\n\t\t\tcase 'REMOVE_BLOCKS_AUGMENTED_WITH_CHILDREN':\n\t\t\t\treturn omit( state, action.removedClientIds );\n\t\t}\n\n\t\treturn state;\n\t},\n\n\tcontrolledInnerBlocks(\n\t\tstate = {},\n\t\t{ type, clientId, hasControlledInnerBlocks }\n\t) {\n\t\tif ( type === 'SET_HAS_CONTROLLED_INNER_BLOCKS' ) {\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ clientId ]: hasControlledInnerBlocks,\n\t\t\t};\n\t\t}\n\t\treturn state;\n\t},\n} );\n\n/**\n * Reducer returning typing state.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function isTyping( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'START_TYPING':\n\t\t\treturn true;\n\n\t\tcase 'STOP_TYPING':\n\t\t\treturn false;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning dragged block client id.\n *\n * @param {string[]} state  Current state.\n * @param {Object}   action Dispatched action.\n *\n * @return {string[]} Updated state.\n */\nexport function draggedBlocks( state = [], action ) {\n\tswitch ( action.type ) {\n\t\tcase 'START_DRAGGING_BLOCKS':\n\t\t\treturn action.clientIds;\n\n\t\tcase 'STOP_DRAGGING_BLOCKS':\n\t\t\treturn [];\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer tracking the visible blocks.\n *\n * @param {Record<string,boolean>} state  Current state.\n * @param {Object}                 action Dispatched action.\n *\n * @return {Record<string,boolean>} Block visibility.\n */\nexport function blockVisibility( state = {}, action ) {\n\tif ( action.type === 'SET_BLOCK_VISIBILITY' ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.updates,\n\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Internal helper reducer for selectionStart and selectionEnd. Can hold a block\n * selection, represented by an object with property clientId.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nfunction selectionHelper( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'CLEAR_SELECTED_BLOCK': {\n\t\t\tif ( state.clientId ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\treturn state;\n\t\t}\n\t\tcase 'SELECT_BLOCK':\n\t\t\tif ( action.clientId === state.clientId ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn { clientId: action.clientId };\n\t\tcase 'REPLACE_INNER_BLOCKS':\n\t\tcase 'INSERT_BLOCKS': {\n\t\t\tif ( ! action.updateSelection || ! action.blocks.length ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn { clientId: action.blocks[ 0 ].clientId };\n\t\t}\n\t\tcase 'REMOVE_BLOCKS':\n\t\t\tif (\n\t\t\t\t! action.clientIds ||\n\t\t\t\t! action.clientIds.length ||\n\t\t\t\taction.clientIds.indexOf( state.clientId ) === -1\n\t\t\t) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {};\n\t\tcase 'REPLACE_BLOCKS': {\n\t\t\tif ( action.clientIds.indexOf( state.clientId ) === -1 ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tconst blockToSelect =\n\t\t\t\taction.blocks[ action.indexToSelect ] ||\n\t\t\t\taction.blocks[ action.blocks.length - 1 ];\n\n\t\t\tif ( ! blockToSelect ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tif ( blockToSelect.clientId === state.clientId ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn { clientId: blockToSelect.clientId };\n\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the selection state.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function selection( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SELECTION_CHANGE':\n\t\t\tif ( action.clientId ) {\n\t\t\t\treturn {\n\t\t\t\t\tselectionStart: {\n\t\t\t\t\t\tclientId: action.clientId,\n\t\t\t\t\t\tattributeKey: action.attributeKey,\n\t\t\t\t\t\toffset: action.startOffset,\n\t\t\t\t\t},\n\t\t\t\t\tselectionEnd: {\n\t\t\t\t\t\tclientId: action.clientId,\n\t\t\t\t\t\tattributeKey: action.attributeKey,\n\t\t\t\t\t\toffset: action.endOffset,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tselectionStart: action.start || state.selectionStart,\n\t\t\t\tselectionEnd: action.end || state.selectionEnd,\n\t\t\t};\n\t\tcase 'RESET_SELECTION':\n\t\t\tconst { selectionStart, selectionEnd } = action;\n\t\t\treturn {\n\t\t\t\tselectionStart,\n\t\t\t\tselectionEnd,\n\t\t\t};\n\t\tcase 'MULTI_SELECT':\n\t\t\tconst { start, end } = action;\n\n\t\t\tif (\n\t\t\t\tstart === state.selectionStart?.clientId &&\n\t\t\t\tend === state.selectionEnd?.clientId\n\t\t\t) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tselectionStart: { clientId: start },\n\t\t\t\tselectionEnd: { clientId: end },\n\t\t\t};\n\t\tcase 'RESET_BLOCKS':\n\t\t\tconst startClientId = state?.selectionStart?.clientId;\n\t\t\tconst endClientId = state?.selectionEnd?.clientId;\n\n\t\t\t// Do nothing if there's no selected block.\n\t\t\tif ( ! startClientId && ! endClientId ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\t// If the start of the selection won't exist after reset, remove selection.\n\t\t\tif (\n\t\t\t\t! action.blocks.some(\n\t\t\t\t\t( block ) => block.clientId === startClientId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\tselectionStart: {},\n\t\t\t\t\tselectionEnd: {},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// If the end of the selection won't exist after reset, collapse selection.\n\t\t\tif (\n\t\t\t\t! action.blocks.some(\n\t\t\t\t\t( block ) => block.clientId === endClientId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\tselectionEnd: state.selectionStart,\n\t\t\t\t};\n\t\t\t}\n\t}\n\n\treturn {\n\t\tselectionStart: selectionHelper( state.selectionStart, action ),\n\t\tselectionEnd: selectionHelper( state.selectionEnd, action ),\n\t};\n}\n\n/**\n * Reducer returning whether the user is multi-selecting.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function isMultiSelecting( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'START_MULTI_SELECT':\n\t\t\treturn true;\n\n\t\tcase 'STOP_MULTI_SELECT':\n\t\t\treturn false;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether selection is enabled.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function isSelectionEnabled( state = true, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'TOGGLE_SELECTION':\n\t\t\treturn action.isSelectionEnabled;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the initial block selection.\n *\n * Currently this in only used to restore the selection after block deletion and\n * pasting new content.This reducer should eventually be removed in favour of setting\n * selection directly.\n *\n * @param {boolean} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {number|null} Initial position: 0, -1 or null.\n */\nexport function initialPosition( state = null, action ) {\n\tif (\n\t\taction.type === 'REPLACE_BLOCKS' &&\n\t\taction.initialPosition !== undefined\n\t) {\n\t\treturn action.initialPosition;\n\t} else if (\n\t\t[\n\t\t\t'MULTI_SELECT',\n\t\t\t'SELECT_BLOCK',\n\t\t\t'RESET_SELECTION',\n\t\t\t'INSERT_BLOCKS',\n\t\t\t'REPLACE_INNER_BLOCKS',\n\t\t].includes( action.type )\n\t) {\n\t\treturn action.initialPosition;\n\t}\n\n\treturn state;\n}\n\nexport function blocksMode( state = {}, action ) {\n\tif ( action.type === 'TOGGLE_BLOCK_MODE' ) {\n\t\tconst { clientId } = action;\n\t\treturn {\n\t\t\t...state,\n\t\t\t[ clientId ]:\n\t\t\t\tstate[ clientId ] && state[ clientId ] === 'html'\n\t\t\t\t\t? 'visual'\n\t\t\t\t\t: 'html',\n\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the block insertion point visibility, either null if there\n * is not an explicit insertion point assigned, or an object of its `index` and\n * `rootClientId`.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function insertionPoint( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SHOW_INSERTION_POINT':\n\t\t\tconst { rootClientId, index, __unstableWithInserter } = action;\n\t\t\treturn { rootClientId, index, __unstableWithInserter };\n\n\t\tcase 'HIDE_INSERTION_POINT':\n\t\t\treturn null;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the post blocks match the defined template or not.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {boolean} Updated state.\n */\nexport function template( state = { isValid: true }, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_TEMPLATE_VALIDITY':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisValid: action.isValid,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the editor setting.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = SETTINGS_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_SETTINGS':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t...action.settings,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the user preferences.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function preferences( state = PREFERENCES_DEFAULTS, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'INSERT_BLOCKS':\n\t\tcase 'REPLACE_BLOCKS':\n\t\t\treturn action.blocks.reduce( ( prevState, block ) => {\n\t\t\t\tconst { attributes, name: blockName } = block;\n\t\t\t\tconst match = select( blocksStore ).getActiveBlockVariation(\n\t\t\t\t\tblockName,\n\t\t\t\t\tattributes\n\t\t\t\t);\n\t\t\t\t// If a block variation match is found change the name to be the same with the\n\t\t\t\t// one that is used for block variations in the Inserter (`getItemFromVariation`).\n\t\t\t\tlet id = match?.name\n\t\t\t\t\t? `${ blockName }/${ match.name }`\n\t\t\t\t\t: blockName;\n\t\t\t\tconst insert = { name: id };\n\t\t\t\tif ( blockName === 'core/block' ) {\n\t\t\t\t\tinsert.ref = attributes.ref;\n\t\t\t\t\tid += '/' + attributes.ref;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...prevState,\n\t\t\t\t\tinsertUsage: {\n\t\t\t\t\t\t...prevState.insertUsage,\n\t\t\t\t\t\t[ id ]: {\n\t\t\t\t\t\t\ttime: action.time,\n\t\t\t\t\t\t\tcount: prevState.insertUsage[ id ]\n\t\t\t\t\t\t\t\t? prevState.insertUsage[ id ].count + 1\n\t\t\t\t\t\t\t\t: 1,\n\t\t\t\t\t\t\tinsert,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}, state );\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning an object where each key is a block client ID, its value\n * representing the settings for its nested blocks.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport const blockListSettings = ( state = {}, action ) => {\n\tswitch ( action.type ) {\n\t\t// Even if the replaced blocks have the same client ID, our logic\n\t\t// should correct the state.\n\t\tcase 'REPLACE_BLOCKS':\n\t\tcase 'REMOVE_BLOCKS': {\n\t\t\treturn omit( state, action.clientIds );\n\t\t}\n\t\tcase 'UPDATE_BLOCK_LIST_SETTINGS': {\n\t\t\tconst { clientId } = action;\n\t\t\tif ( ! action.settings ) {\n\t\t\t\tif ( state.hasOwnProperty( clientId ) ) {\n\t\t\t\t\treturn omit( state, clientId );\n\t\t\t\t}\n\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tif ( isEqual( state[ clientId ], action.settings ) ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\t[ clientId ]: action.settings,\n\t\t\t};\n\t\t}\n\t}\n\treturn state;\n};\n\n/**\n * Reducer returning which mode is enabled.\n *\n * @param {string} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function editorMode( state = 'edit', action ) {\n\t// Let inserting block in navigation mode always trigger Edit mode.\n\tif ( action.type === 'INSERT_BLOCKS' && state === 'navigation' ) {\n\t\treturn 'edit';\n\t}\n\n\tif ( action.type === 'SET_EDITOR_MODE' ) {\n\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning whether the block moving mode is enabled or not.\n *\n * @param {string|null} state  Current state.\n * @param {Object}      action Dispatched action.\n *\n * @return {string|null} Updated state.\n */\nexport function hasBlockMovingClientId( state = null, action ) {\n\tif ( action.type === 'SET_BLOCK_MOVING_MODE' ) {\n\t\treturn action.hasBlockMovingClientId;\n\t}\n\n\tif ( action.type === 'SET_EDITOR_MODE' ) {\n\t\treturn null;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer return an updated state representing the most recent block attribute\n * update. The state is structured as an object where the keys represent the\n * client IDs of blocks, the values a subset of attributes from the most recent\n * block update. The state is always reset to null if the last action is\n * anything other than an attributes update.\n *\n * @param {Object<string,Object>} state  Current state.\n * @param {Object}                action Action object.\n *\n * @return {[string,Object]} Updated state.\n */\nexport function lastBlockAttributesChange( state = null, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'UPDATE_BLOCK':\n\t\t\tif ( ! action.updates.attributes ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\treturn { [ action.clientId ]: action.updates.attributes };\n\n\t\tcase 'UPDATE_BLOCK_ATTRIBUTES':\n\t\t\treturn action.clientIds.reduce(\n\t\t\t\t( accumulator, id ) => ( {\n\t\t\t\t\t...accumulator,\n\t\t\t\t\t[ id ]: action.uniqueByBlock\n\t\t\t\t\t\t? action.attributes[ id ]\n\t\t\t\t\t\t: action.attributes,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t);\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning automatic change state.\n *\n * @param {?string} state  Current state.\n * @param {Object}  action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function automaticChangeStatus( state, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'MARK_AUTOMATIC_CHANGE':\n\t\t\treturn 'pending';\n\t\tcase 'MARK_AUTOMATIC_CHANGE_FINAL':\n\t\t\tif ( state === 'pending' ) {\n\t\t\t\treturn 'final';\n\t\t\t}\n\n\t\t\treturn;\n\t\tcase 'SELECTION_CHANGE':\n\t\t\t// As long as the state is not final, ignore any selection changes.\n\t\t\tif ( state !== 'final' ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\treturn;\n\t\t// Undoing an automatic change should still be possible after mouse\n\t\t// move or after visibility change.\n\t\tcase 'SET_BLOCK_VISIBILITY':\n\t\tcase 'START_TYPING':\n\t\tcase 'STOP_TYPING':\n\t\tcase 'UPDATE_BLOCK_LIST_SETTINGS':\n\t\t\treturn state;\n\t}\n\n\t// TODO: This is a source of bug, as each time there's a change in timing,\n\t// or a new action is added, this could break.\n\t// Reset the state by default (for any action not handled).\n}\n\n/**\n * Reducer returning current highlighted block.\n *\n * @param {boolean} state  Current highlighted block.\n * @param {Object}  action Dispatched action.\n *\n * @return {string} Updated state.\n */\nexport function highlightedBlock( state, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'TOGGLE_BLOCK_HIGHLIGHT':\n\t\t\tconst { clientId, isHighlighted } = action;\n\n\t\t\tif ( isHighlighted ) {\n\t\t\t\treturn clientId;\n\t\t\t} else if ( state === clientId ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn state;\n\t\tcase 'SELECT_BLOCK':\n\t\t\tif ( action.clientId !== state ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer returning the block insertion event list state.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function lastBlockInserted( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'INSERT_BLOCKS':\n\t\t\tif ( ! action.blocks.length ) {\n\t\t\t\treturn state;\n\t\t\t}\n\n\t\t\tconst clientId = action.blocks[ 0 ].clientId;\n\t\t\tconst source = action.meta?.source;\n\n\t\t\treturn { clientId, source };\n\t\tcase 'RESET_BLOCKS':\n\t\t\treturn {};\n\t}\n\treturn state;\n}\n\n/**\n * Reducer returning the block that is eding temporarily edited as blocks.\n *\n * @param {Object} state  Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function temporarilyEditingAsBlocks( state = '', action ) {\n\tif ( action.type === 'SET_TEMPORARILY_EDITING_AS_BLOCKS' ) {\n\t\treturn action.temporarilyEditingAsBlocks;\n\t}\n\treturn state;\n}\n\nexport default combineReducers( {\n\tblocks,\n\tisTyping,\n\tdraggedBlocks,\n\tselection,\n\tisMultiSelecting,\n\tisSelectionEnabled,\n\tinitialPosition,\n\tblocksMode,\n\tblockListSettings,\n\tinsertionPoint,\n\ttemplate,\n\tsettings,\n\tpreferences,\n\tlastBlockAttributesChange,\n\teditorMode,\n\thasBlockMovingClientId,\n\tautomaticChangeStatus,\n\thighlightedBlock,\n\tlastBlockInserted,\n\ttemporarilyEditingAsBlocks,\n\tblockVisibility,\n} );\n","'use strict';\n\n/** @typedef {(...args: any[]) => *[]} GetDependants */\n\n/** @typedef {() => void} Clear */\n\n/**\n * @typedef {{\n *   getDependants: GetDependants,\n *   clear: Clear\n * }} EnhancedSelector\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef CacheNode\n *\n * @property {?CacheNode|undefined} [prev] Previous node.\n * @property {?CacheNode|undefined} [next] Next node.\n * @property {*[]} args Function arguments for cache entry.\n * @property {*} val Function result.\n */\n\n/**\n * @typedef Cache\n *\n * @property {Clear} clear Function to clear cache.\n * @property {boolean} [isUniqueByDependants] Whether dependants are valid in\n * considering cache uniqueness. A cache is unique if dependents are all arrays\n * or objects.\n * @property {CacheNode?} [head] Cache head.\n * @property {*[]} [lastDependants] Dependants from previous invocation.\n */\n\n/**\n * Arbitrary value used as key for referencing cache object in WeakMap tree.\n *\n * @type {{}}\n */\nvar LEAF_KEY = {};\n\n/**\n * Returns the first argument as the sole entry in an array.\n *\n * @template T\n *\n * @param {T} value Value to return.\n *\n * @return {[T]} Value returned as entry in array.\n */\nfunction arrayOf(value) {\n\treturn [value];\n}\n\n/**\n * Returns true if the value passed is object-like, or false otherwise. A value\n * is object-like if it can support property assignment, e.g. object or array.\n *\n * @param {*} value Value to test.\n *\n * @return {boolean} Whether value is object-like.\n */\nfunction isObjectLike(value) {\n\treturn !!value && 'object' === typeof value;\n}\n\n/**\n * Creates and returns a new cache object.\n *\n * @return {Cache} Cache object.\n */\nfunction createCache() {\n\t/** @type {Cache} */\n\tvar cache = {\n\t\tclear: function () {\n\t\t\tcache.head = null;\n\t\t},\n\t};\n\n\treturn cache;\n}\n\n/**\n * Returns true if entries within the two arrays are strictly equal by\n * reference from a starting index.\n *\n * @param {*[]} a First array.\n * @param {*[]} b Second array.\n * @param {number} fromIndex Index from which to start comparison.\n *\n * @return {boolean} Whether arrays are shallowly equal.\n */\nfunction isShallowEqual(a, b, fromIndex) {\n\tvar i;\n\n\tif (a.length !== b.length) {\n\t\treturn false;\n\t}\n\n\tfor (i = fromIndex; i < a.length; i++) {\n\t\tif (a[i] !== b[i]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns a memoized selector function. The getDependants function argument is\n * called before the memoized selector and is expected to return an immutable\n * reference or array of references on which the selector depends for computing\n * its own return value. The memoize cache is preserved only as long as those\n * dependant references remain the same. If getDependants returns a different\n * reference(s), the cache is cleared and the selector value regenerated.\n *\n * @template {(...args: *[]) => *} S\n *\n * @param {S} selector Selector function.\n * @param {GetDependants=} getDependants Dependant getter returning an array of\n * references used in cache bust consideration.\n */\nexport default function (selector, getDependants) {\n\t/** @type {WeakMap<*,*>} */\n\tvar rootCache;\n\n\t/** @type {GetDependants} */\n\tvar normalizedGetDependants = getDependants ? getDependants : arrayOf;\n\n\t/**\n\t * Returns the cache for a given dependants array. When possible, a WeakMap\n\t * will be used to create a unique cache for each set of dependants. This\n\t * is feasible due to the nature of WeakMap in allowing garbage collection\n\t * to occur on entries where the key object is no longer referenced. Since\n\t * WeakMap requires the key to be an object, this is only possible when the\n\t * dependant is object-like. The root cache is created as a hierarchy where\n\t * each top-level key is the first entry in a dependants set, the value a\n\t * WeakMap where each key is the next dependant, and so on. This continues\n\t * so long as the dependants are object-like. If no dependants are object-\n\t * like, then the cache is shared across all invocations.\n\t *\n\t * @see isObjectLike\n\t *\n\t * @param {*[]} dependants Selector dependants.\n\t *\n\t * @return {Cache} Cache object.\n\t */\n\tfunction getCache(dependants) {\n\t\tvar caches = rootCache,\n\t\t\tisUniqueByDependants = true,\n\t\t\ti,\n\t\t\tdependant,\n\t\t\tmap,\n\t\t\tcache;\n\n\t\tfor (i = 0; i < dependants.length; i++) {\n\t\t\tdependant = dependants[i];\n\n\t\t\t// Can only compose WeakMap from object-like key.\n\t\t\tif (!isObjectLike(dependant)) {\n\t\t\t\tisUniqueByDependants = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Does current segment of cache already have a WeakMap?\n\t\t\tif (caches.has(dependant)) {\n\t\t\t\t// Traverse into nested WeakMap.\n\t\t\t\tcaches = caches.get(dependant);\n\t\t\t} else {\n\t\t\t\t// Create, set, and traverse into a new one.\n\t\t\t\tmap = new WeakMap();\n\t\t\t\tcaches.set(dependant, map);\n\t\t\t\tcaches = map;\n\t\t\t}\n\t\t}\n\n\t\t// We use an arbitrary (but consistent) object as key for the last item\n\t\t// in the WeakMap to serve as our running cache.\n\t\tif (!caches.has(LEAF_KEY)) {\n\t\t\tcache = createCache();\n\t\t\tcache.isUniqueByDependants = isUniqueByDependants;\n\t\t\tcaches.set(LEAF_KEY, cache);\n\t\t}\n\n\t\treturn caches.get(LEAF_KEY);\n\t}\n\n\t/**\n\t * Resets root memoization cache.\n\t */\n\tfunction clear() {\n\t\trootCache = new WeakMap();\n\t}\n\n\t/* eslint-disable jsdoc/check-param-names */\n\t/**\n\t * The augmented selector call, considering first whether dependants have\n\t * changed before passing it to underlying memoize function.\n\t *\n\t * @param {*}    source    Source object for derivation.\n\t * @param {...*} extraArgs Additional arguments to pass to selector.\n\t *\n\t * @return {*} Selector result.\n\t */\n\t/* eslint-enable jsdoc/check-param-names */\n\tfunction callSelector(/* source, ...extraArgs */) {\n\t\tvar len = arguments.length,\n\t\t\tcache,\n\t\t\tnode,\n\t\t\ti,\n\t\t\targs,\n\t\t\tdependants;\n\n\t\t// Create copy of arguments (avoid leaking deoptimization).\n\t\targs = new Array(len);\n\t\tfor (i = 0; i < len; i++) {\n\t\t\targs[i] = arguments[i];\n\t\t}\n\n\t\tdependants = normalizedGetDependants.apply(null, args);\n\t\tcache = getCache(dependants);\n\n\t\t// If not guaranteed uniqueness by dependants (primitive type), shallow\n\t\t// compare against last dependants and, if references have changed,\n\t\t// destroy cache to recalculate result.\n\t\tif (!cache.isUniqueByDependants) {\n\t\t\tif (\n\t\t\t\tcache.lastDependants &&\n\t\t\t\t!isShallowEqual(dependants, cache.lastDependants, 0)\n\t\t\t) {\n\t\t\t\tcache.clear();\n\t\t\t}\n\n\t\t\tcache.lastDependants = dependants;\n\t\t}\n\n\t\tnode = cache.head;\n\t\twhile (node) {\n\t\t\t// Check whether node arguments match arguments\n\t\t\tif (!isShallowEqual(node.args, args, 1)) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif (node !== cache.head) {\n\t\t\t\t// Adjust siblings to point to each other.\n\t\t\t\t/** @type {CacheNode} */ (node.prev).next = node.next;\n\t\t\t\tif (node.next) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = cache.head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {CacheNode} */ (cache.head).prev = node;\n\t\t\t\tcache.head = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\tnode = /** @type {CacheNode} */ ({\n\t\t\t// Generate the result from original function\n\t\t\tval: selector.apply(null, args),\n\t\t});\n\n\t\t// Avoid including the source object in the cache.\n\t\targs[0] = null;\n\t\tnode.args = args;\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif (cache.head) {\n\t\t\tcache.head.prev = node;\n\t\t\tnode.next = cache.head;\n\t\t}\n\n\t\tcache.head = node;\n\n\t\treturn node.val;\n\t}\n\n\tcallSelector.getDependants = normalizedGetDependants;\n\tcallSelector.clear = clear;\n\tclear();\n\n\treturn /** @type {S & EnhancedSelector} */ (callSelector);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"richText\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","/**\n * Helper function that maps attribute definition properties to the\n * ones used by RichText utils like `create, toHTMLString, etc..`.\n *\n * @param {Object} attributeDefinition A block's attribute definition object.\n * @return {Object} The mapped object.\n */\nexport function mapRichTextSettings( attributeDefinition ) {\n\tconst {\n\t\tmultiline: multilineTag,\n\t\t__unstableMultilineWrapperTags: multilineWrapperTags,\n\t\t__unstablePreserveWhiteSpace: preserveWhiteSpace,\n\t} = attributeDefinition;\n\treturn {\n\t\tmultilineTag,\n\t\tmultilineWrapperTags,\n\t\tpreserveWhiteSpace,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { castArray, map, reduce, some, find, filter, orderBy } from 'lodash';\nimport createSelector from 'rememo';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tgetBlockType,\n\tgetBlockTypes,\n\tgetBlockVariations,\n\thasBlockSupport,\n\tgetPossibleBlockTransformations,\n\tparse,\n\tswitchToBlockType,\n} from '@wordpress/blocks';\nimport { Platform } from '@wordpress/element';\nimport { applyFilters } from '@wordpress/hooks';\nimport { symbol } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { create, remove, toHTMLString } from '@wordpress/rich-text';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { mapRichTextSettings } from './utils';\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// Module constants.\nconst MILLISECONDS_PER_HOUR = 3600 * 1000;\nconst MILLISECONDS_PER_DAY = 24 * 3600 * 1000;\nconst MILLISECONDS_PER_WEEK = 7 * 24 * 3600 * 1000;\n\n/**\n * Shared reference to an empty array for cases where it is important to avoid\n * returning a new array reference on every invocation, as in a connected or\n * other pure component which performs `shouldComponentUpdate` check on props.\n * This should be used as a last resort, since the normalized data should be\n * maintained by the reducer result in state.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\n/**\n * Returns a block's name given its client ID, or null if no block exists with\n * the client ID.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {string} Block name.\n */\nexport function getBlockName( state, clientId ) {\n\tconst block = state.blocks.byClientId[ clientId ];\n\tconst socialLinkName = 'core/social-link';\n\n\tif ( Platform.OS !== 'web' && block?.name === socialLinkName ) {\n\t\tconst attributes = state.blocks.attributes[ clientId ];\n\t\tconst { service } = attributes;\n\n\t\treturn service ? `${ socialLinkName }-${ service }` : socialLinkName;\n\t}\n\treturn block ? block.name : null;\n}\n\n/**\n * Returns whether a block is valid or not.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Is Valid.\n */\nexport function isBlockValid( state, clientId ) {\n\tconst block = state.blocks.byClientId[ clientId ];\n\treturn !! block && block.isValid;\n}\n\n/**\n * Returns a block's attributes given its client ID, or null if no block exists with\n * the client ID.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {Object?} Block attributes.\n */\nexport function getBlockAttributes( state, clientId ) {\n\tconst block = state.blocks.byClientId[ clientId ];\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\treturn state.blocks.attributes[ clientId ];\n}\n\n/**\n * Returns a block given its client ID. This is a parsed copy of the block,\n * containing its `blockName`, `clientId`, and current `attributes` state. This\n * is not the block's registration settings, which must be retrieved from the\n * blocks module registration store.\n *\n * getBlock recurses through its inner blocks until all its children blocks have\n * been retrieved. Note that getBlock will not return the child inner blocks of\n * an inner block controller. This is because an inner block controller syncs\n * itself with its own entity, and should therefore not be included with the\n * blocks of a different entity. For example, say you call `getBlocks( TP )` to\n * get the blocks of a template part. If another template part is a child of TP,\n * then the nested template part's child blocks will not be returned. This way,\n * the template block itself is considered part of the parent, but the children\n * are not.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Parsed block object.\n */\nexport function getBlock( state, clientId ) {\n\tconst block = state.blocks.byClientId[ clientId ];\n\tif ( ! block ) {\n\t\treturn null;\n\t}\n\n\treturn state.blocks.tree[ clientId ];\n}\n\nexport const __unstableGetBlockWithoutInnerBlocks = createSelector(\n\t( state, clientId ) => {\n\t\tconst block = state.blocks.byClientId[ clientId ];\n\t\tif ( ! block ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn {\n\t\t\t...block,\n\t\t\tattributes: getBlockAttributes( state, clientId ),\n\t\t};\n\t},\n\t( state, clientId ) => [\n\t\tstate.blocks.byClientId[ clientId ],\n\t\tstate.blocks.attributes[ clientId ],\n\t]\n);\n\n/**\n * Returns all block objects for the current post being edited as an array in\n * the order they appear in the post. Note that this will exclude child blocks\n * of nested inner block controllers.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Post blocks.\n */\nexport function getBlocks( state, rootClientId ) {\n\tconst treeKey =\n\t\t! rootClientId || ! areInnerBlocksControlled( state, rootClientId )\n\t\t\t? rootClientId || ''\n\t\t\t: 'controlled||' + rootClientId;\n\treturn state.blocks.tree[ treeKey ]?.innerBlocks || EMPTY_ARRAY;\n}\n\n/**\n * Returns a stripped down block object containing only its client ID,\n * and its inner blocks' client IDs.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Client ID of the block to get.\n *\n * @return {Object} Client IDs of the post blocks.\n */\nexport const __unstableGetClientIdWithClientIdsTree = createSelector(\n\t( state, clientId ) => ( {\n\t\tclientId,\n\t\tinnerBlocks: __unstableGetClientIdsTree( state, clientId ),\n\t} ),\n\t( state ) => [ state.blocks.order ]\n);\n\n/**\n * Returns the block tree represented in the block-editor store from the\n * given root, consisting of stripped down block objects containing only\n * their client IDs, and their inner blocks' client IDs.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Object[]} Client IDs of the post blocks.\n */\nexport const __unstableGetClientIdsTree = createSelector(\n\t( state, rootClientId = '' ) =>\n\t\tmap( getBlockOrder( state, rootClientId ), ( clientId ) =>\n\t\t\t__unstableGetClientIdWithClientIdsTree( state, clientId )\n\t\t),\n\t( state ) => [ state.blocks.order ]\n);\n\n/**\n * Returns an array containing the clientIds of all descendants of the blocks\n * given. Returned ids are ordered first by the order of the ids given, then\n * by the order that they appear in the editor.\n *\n * @param {Object} state     Global application state.\n * @param {Array}  clientIds Array of blocks to inspect.\n *\n * @return {Array} ids of descendants.\n */\nexport const getClientIdsOfDescendants = createSelector(\n\t( state, clientIds ) => {\n\t\tconst collectedIds = [];\n\t\tfor ( const givenId of clientIds ) {\n\t\t\tfor ( const descendantId of getBlockOrder( state, givenId ) ) {\n\t\t\t\tcollectedIds.push(\n\t\t\t\t\tdescendantId,\n\t\t\t\t\t...getClientIdsOfDescendants( state, [ descendantId ] )\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn collectedIds;\n\t},\n\t( state ) => [ state.blocks.order ]\n);\n\n/**\n * Returns an array containing the clientIds of the top-level blocks and\n * their descendants of any depth (for nested blocks). Ids are returned\n * in the same order that they appear in the editor.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} ids of top-level and descendant blocks.\n */\nexport const getClientIdsWithDescendants = createSelector(\n\t( state ) => {\n\t\tconst collectedIds = [];\n\t\tfor ( const topLevelId of getBlockOrder( state ) ) {\n\t\t\tcollectedIds.push(\n\t\t\t\ttopLevelId,\n\t\t\t\t...getClientIdsOfDescendants( state, [ topLevelId ] )\n\t\t\t);\n\t\t}\n\t\treturn collectedIds;\n\t},\n\t( state ) => [ state.blocks.order ]\n);\n\n/**\n * Returns the total number of blocks, or the total number of blocks with a specific name in a post.\n * The number returned includes nested blocks.\n *\n * @param {Object}  state     Global application state.\n * @param {?string} blockName Optional block name, if specified only blocks of that type will be counted.\n *\n * @return {number} Number of blocks in the post, or number of blocks with name equal to blockName.\n */\nexport const getGlobalBlockCount = createSelector(\n\t( state, blockName ) => {\n\t\tconst clientIds = getClientIdsWithDescendants( state );\n\t\tif ( ! blockName ) {\n\t\t\treturn clientIds.length;\n\t\t}\n\t\treturn reduce(\n\t\t\tclientIds,\n\t\t\t( accumulator, clientId ) => {\n\t\t\t\tconst block = state.blocks.byClientId[ clientId ];\n\t\t\t\treturn block.name === blockName ? accumulator + 1 : accumulator;\n\t\t\t},\n\t\t\t0\n\t\t);\n\t},\n\t( state ) => [ state.blocks.order, state.blocks.byClientId ]\n);\n\n/**\n * Returns all global blocks that match a blockName. Results include nested blocks.\n *\n * @param {Object}  state     Global application state.\n * @param {?string} blockName Optional block name, if not specified, returns an empty array.\n *\n * @return {Array} Array of clientIds of blocks with name equal to blockName.\n */\nexport const __experimentalGetGlobalBlocksByName = createSelector(\n\t( state, blockName ) => {\n\t\tif ( ! blockName ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\tconst clientIds = getClientIdsWithDescendants( state );\n\t\tconst foundBlocks = clientIds.filter( ( clientId ) => {\n\t\t\tconst block = state.blocks.byClientId[ clientId ];\n\t\t\treturn block.name === blockName;\n\t\t} );\n\t\treturn foundBlocks.length > 0 ? foundBlocks : EMPTY_ARRAY;\n\t},\n\t( state ) => [ state.blocks.order, state.blocks.byClientId ]\n);\n\n/**\n * Given an array of block client IDs, returns the corresponding array of block\n * objects.\n *\n * @param {Object}   state     Editor state.\n * @param {string[]} clientIds Client IDs for which blocks are to be returned.\n *\n * @return {WPBlock[]} Block objects.\n */\nexport const getBlocksByClientId = createSelector(\n\t( state, clientIds ) =>\n\t\tmap( castArray( clientIds ), ( clientId ) =>\n\t\t\tgetBlock( state, clientId )\n\t\t),\n\t( state, clientIds ) =>\n\t\tmap(\n\t\t\tcastArray( clientIds ),\n\t\t\t( clientId ) => state.blocks.tree[ clientId ]\n\t\t)\n);\n\n/**\n * Returns the number of blocks currently present in the post.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {number} Number of blocks in the post.\n */\nexport function getBlockCount( state, rootClientId ) {\n\treturn getBlockOrder( state, rootClientId ).length;\n}\n\n/**\n * Returns the current selection start block client ID, attribute key and text\n * offset.\n *\n * @param {Object} state Block editor state.\n *\n * @return {WPBlockSelection} Selection start information.\n */\nexport function getSelectionStart( state ) {\n\treturn state.selection.selectionStart;\n}\n\n/**\n * Returns the current selection end block client ID, attribute key and text\n * offset.\n *\n * @param {Object} state Block editor state.\n *\n * @return {WPBlockSelection} Selection end information.\n */\nexport function getSelectionEnd( state ) {\n\treturn state.selection.selectionEnd;\n}\n\n/**\n * Returns the current block selection start. This value may be null, and it\n * may represent either a singular block selection or multi-selection start.\n * A selection is singular if its start and end match.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Client ID of block selection start.\n */\nexport function getBlockSelectionStart( state ) {\n\treturn state.selection.selectionStart.clientId;\n}\n\n/**\n * Returns the current block selection end. This value may be null, and it\n * may represent either a singular block selection or multi-selection end.\n * A selection is singular if its start and end match.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Client ID of block selection end.\n */\nexport function getBlockSelectionEnd( state ) {\n\treturn state.selection.selectionEnd.clientId;\n}\n\n/**\n * Returns the number of blocks currently selected in the post.\n *\n * @param {Object} state Global application state.\n *\n * @return {number} Number of blocks selected in the post.\n */\nexport function getSelectedBlockCount( state ) {\n\tconst multiSelectedBlockCount =\n\t\tgetMultiSelectedBlockClientIds( state ).length;\n\n\tif ( multiSelectedBlockCount ) {\n\t\treturn multiSelectedBlockCount;\n\t}\n\n\treturn state.selection.selectionStart.clientId ? 1 : 0;\n}\n\n/**\n * Returns true if there is a single selected block, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether a single block is selected.\n */\nexport function hasSelectedBlock( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\treturn (\n\t\t!! selectionStart.clientId &&\n\t\tselectionStart.clientId === selectionEnd.clientId\n\t);\n}\n\n/**\n * Returns the currently selected block client ID, or null if there is no\n * selected block.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Selected block client ID.\n */\nexport function getSelectedBlockClientId( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\tconst { clientId } = selectionStart;\n\n\tif ( ! clientId || clientId !== selectionEnd.clientId ) {\n\t\treturn null;\n\t}\n\n\treturn clientId;\n}\n\n/**\n * Returns the currently selected block, or null if there is no selected block.\n *\n * @param {Object} state Global application state.\n *\n * @return {?Object} Selected block.\n */\nexport function getSelectedBlock( state ) {\n\tconst clientId = getSelectedBlockClientId( state );\n\treturn clientId ? getBlock( state, clientId ) : null;\n}\n\n/**\n * Given a block client ID, returns the root block from which the block is\n * nested, an empty string for top-level blocks, or null if the block does not\n * exist.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block from which to find root client ID.\n *\n * @return {?string} Root client ID, if exists\n */\nexport function getBlockRootClientId( state, clientId ) {\n\treturn state.blocks.parents[ clientId ] !== undefined\n\t\t? state.blocks.parents[ clientId ]\n\t\t: null;\n}\n\n/**\n * Given a block client ID, returns the list of all its parents from top to bottom.\n *\n * @param {Object}  state     Editor state.\n * @param {string}  clientId  Block from which to find root client ID.\n * @param {boolean} ascending Order results from bottom to top (true) or top to bottom (false).\n *\n * @return {Array} ClientIDs of the parent blocks.\n */\nexport const getBlockParents = createSelector(\n\t( state, clientId, ascending = false ) => {\n\t\tconst parents = [];\n\t\tlet current = clientId;\n\t\twhile ( !! state.blocks.parents[ current ] ) {\n\t\t\tcurrent = state.blocks.parents[ current ];\n\t\t\tparents.push( current );\n\t\t}\n\n\t\treturn ascending ? parents : parents.reverse();\n\t},\n\t( state ) => [ state.blocks.parents ]\n);\n\n/**\n * Given a block client ID and a block name, returns the list of all its parents\n * from top to bottom, filtered by the given name(s). For example, if passed\n * 'core/group' as the blockName, it will only return parents which are group\n * blocks. If passed `[ 'core/group', 'core/cover']`, as the blockName, it will\n * return parents which are group blocks and parents which are cover blocks.\n *\n * @param {Object}          state     Editor state.\n * @param {string}          clientId  Block from which to find root client ID.\n * @param {string|string[]} blockName Block name(s) to filter.\n * @param {boolean}         ascending Order results from bottom to top (true) or top to bottom (false).\n *\n * @return {Array} ClientIDs of the parent blocks.\n */\nexport const getBlockParentsByBlockName = createSelector(\n\t( state, clientId, blockName, ascending = false ) => {\n\t\tconst parents = getBlockParents( state, clientId, ascending );\n\t\treturn map(\n\t\t\tfilter(\n\t\t\t\tmap( parents, ( id ) => ( {\n\t\t\t\t\tid,\n\t\t\t\t\tname: getBlockName( state, id ),\n\t\t\t\t} ) ),\n\t\t\t\t( { name } ) => {\n\t\t\t\t\tif ( Array.isArray( blockName ) ) {\n\t\t\t\t\t\treturn blockName.includes( name );\n\t\t\t\t\t}\n\t\t\t\t\treturn name === blockName;\n\t\t\t\t}\n\t\t\t),\n\t\t\t( { id } ) => id\n\t\t);\n\t},\n\t( state ) => [ state.blocks.parents ]\n);\n\n/**\n * Given a block client ID, returns the root of the hierarchy from which the block is nested, return the block itself for root level blocks.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block from which to find root client ID.\n *\n * @return {string} Root client ID\n */\nexport function getBlockHierarchyRootClientId( state, clientId ) {\n\tlet current = clientId;\n\tlet parent;\n\tdo {\n\t\tparent = current;\n\t\tcurrent = state.blocks.parents[ current ];\n\t} while ( current );\n\treturn parent;\n}\n\n/**\n * Given a block client ID, returns the lowest common ancestor with selected client ID.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block from which to find common ancestor client ID.\n *\n * @return {string} Common ancestor client ID or undefined\n */\nexport function getLowestCommonAncestorWithSelectedBlock( state, clientId ) {\n\tconst selectedId = getSelectedBlockClientId( state );\n\tconst clientParents = [ ...getBlockParents( state, clientId ), clientId ];\n\tconst selectedParents = [\n\t\t...getBlockParents( state, selectedId ),\n\t\tselectedId,\n\t];\n\n\tlet lowestCommonAncestor;\n\n\tconst maxDepth = Math.min( clientParents.length, selectedParents.length );\n\tfor ( let index = 0; index < maxDepth; index++ ) {\n\t\tif ( clientParents[ index ] === selectedParents[ index ] ) {\n\t\t\tlowestCommonAncestor = clientParents[ index ];\n\t\t} else {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn lowestCommonAncestor;\n}\n\n/**\n * Returns the client ID of the block adjacent one at the given reference\n * startClientId and modifier directionality. Defaults start startClientId to\n * the selected block, and direction as next block. Returns null if there is no\n * adjacent block.\n *\n * @param {Object}  state         Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n *                                search.\n * @param {?number} modifier      Directionality multiplier (1 next, -1\n *                                previous).\n *\n * @return {?string} Return the client ID of the block, or null if none exists.\n */\nexport function getAdjacentBlockClientId( state, startClientId, modifier = 1 ) {\n\t// Default to selected block.\n\tif ( startClientId === undefined ) {\n\t\tstartClientId = getSelectedBlockClientId( state );\n\t}\n\n\t// Try multi-selection starting at extent based on modifier.\n\tif ( startClientId === undefined ) {\n\t\tif ( modifier < 0 ) {\n\t\t\tstartClientId = getFirstMultiSelectedBlockClientId( state );\n\t\t} else {\n\t\t\tstartClientId = getLastMultiSelectedBlockClientId( state );\n\t\t}\n\t}\n\n\t// Validate working start client ID.\n\tif ( ! startClientId ) {\n\t\treturn null;\n\t}\n\n\t// Retrieve start block root client ID, being careful to allow the falsey\n\t// empty string top-level root by explicitly testing against null.\n\tconst rootClientId = getBlockRootClientId( state, startClientId );\n\tif ( rootClientId === null ) {\n\t\treturn null;\n\t}\n\n\tconst { order } = state.blocks;\n\tconst orderSet = order[ rootClientId ];\n\tconst index = orderSet.indexOf( startClientId );\n\tconst nextIndex = index + 1 * modifier;\n\n\t// Block was first in set and we're attempting to get previous.\n\tif ( nextIndex < 0 ) {\n\t\treturn null;\n\t}\n\n\t// Block was last in set and we're attempting to get next.\n\tif ( nextIndex === orderSet.length ) {\n\t\treturn null;\n\t}\n\n\t// Assume incremented index is within the set.\n\treturn orderSet[ nextIndex ];\n}\n\n/**\n * Returns the previous block's client ID from the given reference start ID.\n * Defaults start to the selected block. Returns null if there is no previous\n * block.\n *\n * @param {Object}  state         Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n *                                search.\n *\n * @return {?string} Adjacent block's client ID, or null if none exists.\n */\nexport function getPreviousBlockClientId( state, startClientId ) {\n\treturn getAdjacentBlockClientId( state, startClientId, -1 );\n}\n\n/**\n * Returns the next block's client ID from the given reference start ID.\n * Defaults start to the selected block. Returns null if there is no next\n * block.\n *\n * @param {Object}  state         Editor state.\n * @param {?string} startClientId Optional client ID of block from which to\n *                                search.\n *\n * @return {?string} Adjacent block's client ID, or null if none exists.\n */\nexport function getNextBlockClientId( state, startClientId ) {\n\treturn getAdjacentBlockClientId( state, startClientId, 1 );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns the initial caret position for the selected block.\n * This position is to used to position the caret properly when the selected block changes.\n * If the current block is not a RichText, having initial position set to 0 means \"focus block\"\n *\n * @param {Object} state Global application state.\n *\n * @return {0|-1|null} Initial position.\n */\nexport function getSelectedBlocksInitialCaretPosition( state ) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn state.initialPosition;\n}\n\n/**\n * Returns the current selection set of block client IDs (multiselection or single selection).\n *\n * @param {Object} state Editor state.\n *\n * @return {Array} Multi-selected block client IDs.\n */\nexport const getSelectedBlockClientIds = createSelector(\n\t( state ) => {\n\t\tconst { selectionStart, selectionEnd } = state.selection;\n\n\t\tif (\n\t\t\tselectionStart.clientId === undefined ||\n\t\t\tselectionEnd.clientId === undefined\n\t\t) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\n\t\tif ( selectionStart.clientId === selectionEnd.clientId ) {\n\t\t\treturn [ selectionStart.clientId ];\n\t\t}\n\n\t\t// Retrieve root client ID to aid in retrieving relevant nested block\n\t\t// order, being careful to allow the falsey empty string top-level root\n\t\t// by explicitly testing against null.\n\t\tconst rootClientId = getBlockRootClientId(\n\t\t\tstate,\n\t\t\tselectionStart.clientId\n\t\t);\n\t\tif ( rootClientId === null ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\n\t\tconst blockOrder = getBlockOrder( state, rootClientId );\n\t\tconst startIndex = blockOrder.indexOf( selectionStart.clientId );\n\t\tconst endIndex = blockOrder.indexOf( selectionEnd.clientId );\n\n\t\tif ( startIndex > endIndex ) {\n\t\t\treturn blockOrder.slice( endIndex, startIndex + 1 );\n\t\t}\n\n\t\treturn blockOrder.slice( startIndex, endIndex + 1 );\n\t},\n\t( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.selection.selectionStart.clientId,\n\t\tstate.selection.selectionEnd.clientId,\n\t]\n);\n\n/**\n * Returns the current multi-selection set of block client IDs, or an empty\n * array if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {Array} Multi-selected block client IDs.\n */\nexport function getMultiSelectedBlockClientIds( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\n\tif ( selectionStart.clientId === selectionEnd.clientId ) {\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\treturn getSelectedBlockClientIds( state );\n}\n\n/**\n * Returns the current multi-selection set of blocks, or an empty array if\n * there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {Array} Multi-selected block objects.\n */\nexport const getMultiSelectedBlocks = createSelector(\n\t( state ) => {\n\t\tconst multiSelectedBlockClientIds =\n\t\t\tgetMultiSelectedBlockClientIds( state );\n\t\tif ( ! multiSelectedBlockClientIds.length ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\n\t\treturn multiSelectedBlockClientIds.map( ( clientId ) =>\n\t\t\tgetBlock( state, clientId )\n\t\t);\n\t},\n\t( state ) => [\n\t\t...getSelectedBlockClientIds.getDependants( state ),\n\t\tstate.blocks.byClientId,\n\t\tstate.blocks.order,\n\t\tstate.blocks.attributes,\n\t]\n);\n\n/**\n * Returns the client ID of the first block in the multi-selection set, or null\n * if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} First block client ID in the multi-selection set.\n */\nexport function getFirstMultiSelectedBlockClientId( state ) {\n\treturn getMultiSelectedBlockClientIds( state )[ 0 ] || null;\n}\n\n/**\n * Returns the client ID of the last block in the multi-selection set, or null\n * if there is no multi-selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Last block client ID in the multi-selection set.\n */\nexport function getLastMultiSelectedBlockClientId( state ) {\n\tconst selectedClientIds = getMultiSelectedBlockClientIds( state );\n\treturn selectedClientIds[ selectedClientIds.length - 1 ] || null;\n}\n\n/**\n * Returns true if a multi-selection exists, and the block corresponding to the\n * specified client ID is the first block of the multi-selection set, or false\n * otherwise.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is first in multi-selection.\n */\nexport function isFirstMultiSelectedBlock( state, clientId ) {\n\treturn getFirstMultiSelectedBlockClientId( state ) === clientId;\n}\n\n/**\n * Returns true if the client ID occurs within the block multi-selection, or\n * false otherwise.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is in multi-selection set.\n */\nexport function isBlockMultiSelected( state, clientId ) {\n\treturn getMultiSelectedBlockClientIds( state ).indexOf( clientId ) !== -1;\n}\n\n/**\n * Returns true if an ancestor of the block is multi-selected, or false\n * otherwise.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether an ancestor of the block is in multi-selection\n *                   set.\n */\nexport const isAncestorMultiSelected = createSelector(\n\t( state, clientId ) => {\n\t\tlet ancestorClientId = clientId;\n\t\tlet isMultiSelected = false;\n\t\twhile ( ancestorClientId && ! isMultiSelected ) {\n\t\t\tancestorClientId = getBlockRootClientId( state, ancestorClientId );\n\t\t\tisMultiSelected = isBlockMultiSelected( state, ancestorClientId );\n\t\t}\n\t\treturn isMultiSelected;\n\t},\n\t( state ) => [\n\t\tstate.blocks.order,\n\t\tstate.selection.selectionStart.clientId,\n\t\tstate.selection.selectionEnd.clientId,\n\t]\n);\n\n/**\n * Returns the client ID of the block which begins the multi-selection set, or\n * null if there is no multi-selection.\n *\n * This is not necessarily the first client ID in the selection.\n *\n * @see getFirstMultiSelectedBlockClientId\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Client ID of block beginning multi-selection.\n */\nexport function getMultiSelectedBlocksStartClientId( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\n\tif ( selectionStart.clientId === selectionEnd.clientId ) {\n\t\treturn null;\n\t}\n\n\treturn selectionStart.clientId || null;\n}\n\n/**\n * Returns the client ID of the block which ends the multi-selection set, or\n * null if there is no multi-selection.\n *\n * This is not necessarily the last client ID in the selection.\n *\n * @see getLastMultiSelectedBlockClientId\n *\n * @param {Object} state Editor state.\n *\n * @return {?string} Client ID of block ending multi-selection.\n */\nexport function getMultiSelectedBlocksEndClientId( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\n\tif ( selectionStart.clientId === selectionEnd.clientId ) {\n\t\treturn null;\n\t}\n\n\treturn selectionEnd.clientId || null;\n}\n\n/**\n * Returns true if the selection is not partial.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the selection is mergeable.\n */\nexport function __unstableIsFullySelected( state ) {\n\tconst selectionAnchor = getSelectionStart( state );\n\tconst selectionFocus = getSelectionEnd( state );\n\treturn (\n\t\t! selectionAnchor.attributeKey &&\n\t\t! selectionFocus.attributeKey &&\n\t\ttypeof selectionAnchor.offset === 'undefined' &&\n\t\ttypeof selectionFocus.offset === 'undefined'\n\t);\n}\n\n/**\n * Returns true if the selection is collapsed.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether the selection is collapsed.\n */\nexport function __unstableIsSelectionCollapsed( state ) {\n\tconst selectionAnchor = getSelectionStart( state );\n\tconst selectionFocus = getSelectionEnd( state );\n\treturn (\n\t\t!! selectionAnchor &&\n\t\t!! selectionFocus &&\n\t\tselectionAnchor.clientId === selectionFocus.clientId &&\n\t\tselectionAnchor.attributeKey === selectionFocus.attributeKey &&\n\t\tselectionAnchor.offset === selectionFocus.offset\n\t);\n}\n\nexport function __unstableSelectionHasUnmergeableBlock( state ) {\n\treturn getSelectedBlockClientIds( state ).some( ( clientId ) => {\n\t\tconst blockName = getBlockName( state, clientId );\n\t\tconst blockType = getBlockType( blockName );\n\t\treturn ! blockType.merge;\n\t} );\n}\n\n/**\n * Check whether the selection is mergeable.\n *\n * @param {Object}  state     Editor state.\n * @param {boolean} isForward Whether to merge forwards.\n *\n * @return {boolean} Whether the selection is mergeable.\n */\nexport function __unstableIsSelectionMergeable( state, isForward ) {\n\tconst selectionAnchor = getSelectionStart( state );\n\tconst selectionFocus = getSelectionEnd( state );\n\n\t// It's not mergeable if the start and end are within the same block.\n\tif ( selectionAnchor.clientId === selectionFocus.clientId ) return false;\n\n\t// It's not mergeable if there's no rich text selection.\n\tif (\n\t\t! selectionAnchor.attributeKey ||\n\t\t! selectionFocus.attributeKey ||\n\t\ttypeof selectionAnchor.offset === 'undefined' ||\n\t\ttypeof selectionFocus.offset === 'undefined'\n\t)\n\t\treturn false;\n\n\tconst anchorRootClientId = getBlockRootClientId(\n\t\tstate,\n\t\tselectionAnchor.clientId\n\t);\n\tconst focusRootClientId = getBlockRootClientId(\n\t\tstate,\n\t\tselectionFocus.clientId\n\t);\n\n\t// It's not mergeable if the selection doesn't start and end in the same\n\t// block list. Maybe in the future it should be allowed.\n\tif ( anchorRootClientId !== focusRootClientId ) {\n\t\treturn false;\n\t}\n\n\tconst blockOrder = getBlockOrder( state, anchorRootClientId );\n\tconst anchorIndex = blockOrder.indexOf( selectionAnchor.clientId );\n\tconst focusIndex = blockOrder.indexOf( selectionFocus.clientId );\n\n\t// Reassign selection start and end based on order.\n\tlet selectionStart, selectionEnd;\n\n\tif ( anchorIndex > focusIndex ) {\n\t\tselectionStart = selectionFocus;\n\t\tselectionEnd = selectionAnchor;\n\t} else {\n\t\tselectionStart = selectionAnchor;\n\t\tselectionEnd = selectionFocus;\n\t}\n\n\tconst targetBlockClientId = isForward\n\t\t? selectionEnd.clientId\n\t\t: selectionStart.clientId;\n\tconst blockToMergeClientId = isForward\n\t\t? selectionStart.clientId\n\t\t: selectionEnd.clientId;\n\n\tconst targetBlockName = getBlockName( state, targetBlockClientId );\n\tconst targetBlockType = getBlockType( targetBlockName );\n\n\tif ( ! targetBlockType.merge ) return false;\n\n\tconst blockToMerge = getBlock( state, blockToMergeClientId );\n\n\t// It's mergeable if the blocks are of the same type.\n\tif ( blockToMerge.name === targetBlockName ) return true;\n\n\t// If the blocks are of a different type, try to transform the block being\n\t// merged into the same type of block.\n\tconst blocksToMerge = switchToBlockType( blockToMerge, targetBlockName );\n\n\treturn blocksToMerge && blocksToMerge.length;\n}\n\n/**\n * Get partial selected blocks with their content updated\n * based on the selection.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object[]} Updated partial selected blocks.\n */\nexport const __unstableGetSelectedBlocksWithPartialSelection = ( state ) => {\n\tconst selectionAnchor = getSelectionStart( state );\n\tconst selectionFocus = getSelectionEnd( state );\n\n\tif ( selectionAnchor.clientId === selectionFocus.clientId ) {\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\t// Can't split if the selection is not set.\n\tif (\n\t\t! selectionAnchor.attributeKey ||\n\t\t! selectionFocus.attributeKey ||\n\t\ttypeof selectionAnchor.offset === 'undefined' ||\n\t\ttypeof selectionFocus.offset === 'undefined'\n\t) {\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\tconst anchorRootClientId = getBlockRootClientId(\n\t\tstate,\n\t\tselectionAnchor.clientId\n\t);\n\tconst focusRootClientId = getBlockRootClientId(\n\t\tstate,\n\t\tselectionFocus.clientId\n\t);\n\n\t// It's not splittable if the selection doesn't start and end in the same\n\t// block list. Maybe in the future it should be allowed.\n\tif ( anchorRootClientId !== focusRootClientId ) {\n\t\treturn EMPTY_ARRAY;\n\t}\n\n\tconst blockOrder = getBlockOrder( state, anchorRootClientId );\n\tconst anchorIndex = blockOrder.indexOf( selectionAnchor.clientId );\n\tconst focusIndex = blockOrder.indexOf( selectionFocus.clientId );\n\n\t// Reassign selection start and end based on order.\n\tconst [ selectionStart, selectionEnd ] =\n\t\tanchorIndex > focusIndex\n\t\t\t? [ selectionFocus, selectionAnchor ]\n\t\t\t: [ selectionAnchor, selectionFocus ];\n\n\tconst blockA = getBlock( state, selectionStart.clientId );\n\tconst blockAType = getBlockType( blockA.name );\n\n\tconst blockB = getBlock( state, selectionEnd.clientId );\n\tconst blockBType = getBlockType( blockB.name );\n\n\tconst htmlA = blockA.attributes[ selectionStart.attributeKey ];\n\tconst htmlB = blockB.attributes[ selectionEnd.attributeKey ];\n\n\tconst attributeDefinitionA =\n\t\tblockAType.attributes[ selectionStart.attributeKey ];\n\tconst attributeDefinitionB =\n\t\tblockBType.attributes[ selectionEnd.attributeKey ];\n\n\tlet valueA = create( {\n\t\thtml: htmlA,\n\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t} );\n\tlet valueB = create( {\n\t\thtml: htmlB,\n\t\t...mapRichTextSettings( attributeDefinitionB ),\n\t} );\n\n\tvalueA = remove( valueA, 0, selectionStart.offset );\n\tvalueB = remove( valueB, selectionEnd.offset, valueB.text.length );\n\n\treturn [\n\t\t{\n\t\t\t...blockA,\n\t\t\tattributes: {\n\t\t\t\t...blockA.attributes,\n\t\t\t\t[ selectionStart.attributeKey ]: toHTMLString( {\n\t\t\t\t\tvalue: valueA,\n\t\t\t\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t\t\t\t} ),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t...blockB,\n\t\t\tattributes: {\n\t\t\t\t...blockB.attributes,\n\t\t\t\t[ selectionEnd.attributeKey ]: toHTMLString( {\n\t\t\t\t\tvalue: valueB,\n\t\t\t\t\t...mapRichTextSettings( attributeDefinitionB ),\n\t\t\t\t} ),\n\t\t\t},\n\t\t},\n\t];\n};\n\n/**\n * Returns an array containing all block client IDs in the editor in the order\n * they appear. Optionally accepts a root client ID of the block list for which\n * the order should be returned, defaulting to the top-level block order.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Array} Ordered client IDs of editor blocks.\n */\nexport function getBlockOrder( state, rootClientId ) {\n\treturn state.blocks.order[ rootClientId || '' ] || EMPTY_ARRAY;\n}\n\n/**\n * Returns the index at which the block corresponding to the specified client\n * ID occurs within the block order, or `-1` if the block does not exist.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {number} Index at which block exists in order.\n */\nexport function getBlockIndex( state, clientId ) {\n\tconst rootClientId = getBlockRootClientId( state, clientId );\n\treturn getBlockOrder( state, rootClientId ).indexOf( clientId );\n}\n\n/**\n * Returns true if the block corresponding to the specified client ID is\n * currently selected and no multi-selection exists, or false otherwise.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is selected and multi-selection exists.\n */\nexport function isBlockSelected( state, clientId ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\n\tif ( selectionStart.clientId !== selectionEnd.clientId ) {\n\t\treturn false;\n\t}\n\n\treturn selectionStart.clientId === clientId;\n}\n\n/**\n * Returns true if one of the block's inner blocks is selected.\n *\n * @param {Object}  state    Editor state.\n * @param {string}  clientId Block client ID.\n * @param {boolean} deep     Perform a deep check.\n *\n * @return {boolean} Whether the block as an inner block selected\n */\nexport function hasSelectedInnerBlock( state, clientId, deep = false ) {\n\treturn some(\n\t\tgetBlockOrder( state, clientId ),\n\t\t( innerClientId ) =>\n\t\t\tisBlockSelected( state, innerClientId ) ||\n\t\t\tisBlockMultiSelected( state, innerClientId ) ||\n\t\t\t( deep && hasSelectedInnerBlock( state, innerClientId, deep ) )\n\t);\n}\n\n/**\n * Returns true if the block corresponding to the specified client ID is\n * currently selected but isn't the last of the selected blocks. Here \"last\"\n * refers to the block sequence in the document, _not_ the sequence of\n * multi-selection, which is why `state.selectionEnd` isn't used.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {boolean} Whether block is selected and not the last in the\n *                   selection.\n */\nexport function isBlockWithinSelection( state, clientId ) {\n\tif ( ! clientId ) {\n\t\treturn false;\n\t}\n\n\tconst clientIds = getMultiSelectedBlockClientIds( state );\n\tconst index = clientIds.indexOf( clientId );\n\treturn index > -1 && index < clientIds.length - 1;\n}\n\n/**\n * Returns true if a multi-selection has been made, or false otherwise.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Whether multi-selection has been made.\n */\nexport function hasMultiSelection( state ) {\n\tconst { selectionStart, selectionEnd } = state.selection;\n\treturn selectionStart.clientId !== selectionEnd.clientId;\n}\n\n/**\n * Whether in the process of multi-selecting or not. This flag is only true\n * while the multi-selection is being selected (by mouse move), and is false\n * once the multi-selection has been settled.\n *\n * @see hasMultiSelection\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if multi-selecting, false if not.\n */\nexport function isMultiSelecting( state ) {\n\treturn state.isMultiSelecting;\n}\n\n/**\n * Selector that returns if multi-selection is enabled or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if it should be possible to multi-select blocks, false if multi-selection is disabled.\n */\nexport function isSelectionEnabled( state ) {\n\treturn state.isSelectionEnabled;\n}\n\n/**\n * Returns the block's editing mode, defaulting to \"visual\" if not explicitly\n * assigned.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Block editing mode.\n */\nexport function getBlockMode( state, clientId ) {\n\treturn state.blocksMode[ clientId ] || 'visual';\n}\n\n/**\n * Returns true if the user is typing, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether user is typing.\n */\nexport function isTyping( state ) {\n\treturn state.isTyping;\n}\n\n/**\n * Returns true if the user is dragging blocks, or false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether user is dragging blocks.\n */\nexport function isDraggingBlocks( state ) {\n\treturn !! state.draggedBlocks.length;\n}\n\n/**\n * Returns the client ids of any blocks being directly dragged.\n *\n * This does not include children of a parent being dragged.\n *\n * @param {Object} state Global application state.\n *\n * @return {string[]} Array of dragged block client ids.\n */\nexport function getDraggedBlockClientIds( state ) {\n\treturn state.draggedBlocks;\n}\n\n/**\n * Returns whether the block is being dragged.\n *\n * Only returns true if the block is being directly dragged,\n * not if the block is a child of a parent being dragged.\n * See `isAncestorBeingDragged` for child blocks.\n *\n * @param {Object} state    Global application state.\n * @param {string} clientId Client id for block to check.\n *\n * @return {boolean} Whether the block is being dragged.\n */\nexport function isBlockBeingDragged( state, clientId ) {\n\treturn state.draggedBlocks.includes( clientId );\n}\n\n/**\n * Returns whether a parent/ancestor of the block is being dragged.\n *\n * @param {Object} state    Global application state.\n * @param {string} clientId Client id for block to check.\n *\n * @return {boolean} Whether the block's ancestor is being dragged.\n */\nexport function isAncestorBeingDragged( state, clientId ) {\n\t// Return early if no blocks are being dragged rather than\n\t// the more expensive check for parents.\n\tif ( ! isDraggingBlocks( state ) ) {\n\t\treturn false;\n\t}\n\n\tconst parents = getBlockParents( state, clientId );\n\treturn some( parents, ( parentClientId ) =>\n\t\tisBlockBeingDragged( state, parentClientId )\n\t);\n}\n\n/**\n * Returns true if the caret is within formatted text, or false otherwise.\n *\n * @deprecated\n *\n * @return {boolean} Whether the caret is within formatted text.\n */\nexport function isCaretWithinFormattedText() {\n\tdeprecated(\n\t\t'wp.data.select( \"core/block-editor\" ).isCaretWithinFormattedText',\n\t\t{\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t}\n\t);\n\n\treturn false;\n}\n\n/**\n * Returns the insertion point, the index at which the new inserted block would\n * be placed. Defaults to the last index.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} Insertion point object with `rootClientId`, `index`.\n */\nexport function getBlockInsertionPoint( state ) {\n\tlet rootClientId, index;\n\n\tconst {\n\t\tinsertionPoint,\n\t\tselection: { selectionEnd },\n\t} = state;\n\tif ( insertionPoint !== null ) {\n\t\treturn insertionPoint;\n\t}\n\n\tconst { clientId } = selectionEnd;\n\n\tif ( clientId ) {\n\t\trootClientId = getBlockRootClientId( state, clientId ) || undefined;\n\t\tindex = getBlockIndex( state, selectionEnd.clientId ) + 1;\n\t} else {\n\t\tindex = getBlockOrder( state ).length;\n\t}\n\n\treturn { rootClientId, index };\n}\n\n/**\n * Returns true if we should show the block insertion point.\n *\n * @param {Object} state Global application state.\n *\n * @return {?boolean} Whether the insertion point is visible or not.\n */\nexport function isBlockInsertionPointVisible( state ) {\n\treturn state.insertionPoint !== null;\n}\n\n/**\n * Returns whether the blocks matches the template or not.\n *\n * @param {boolean} state\n * @return {?boolean} Whether the template is valid or not.\n */\nexport function isValidTemplate( state ) {\n\treturn state.template.isValid;\n}\n\n/**\n * Returns the defined block template\n *\n * @param {boolean} state\n *\n * @return {?Array} Block Template.\n */\nexport function getTemplate( state ) {\n\treturn state.settings.template;\n}\n\n/**\n * Returns the defined block template lock. Optionally accepts a root block\n * client ID as context, otherwise defaulting to the global context.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional block root client ID.\n *\n * @return {?string} Block Template Lock\n */\nexport function getTemplateLock( state, rootClientId ) {\n\tif ( ! rootClientId ) {\n\t\treturn state.settings.templateLock;\n\t}\n\n\tconst blockListSettings = getBlockListSettings( state, rootClientId );\n\tif ( ! blockListSettings ) {\n\t\treturn undefined;\n\t}\n\n\treturn blockListSettings.templateLock;\n}\n\nconst checkAllowList = ( list, item, defaultResult = null ) => {\n\tif ( typeof list === 'boolean' ) {\n\t\treturn list;\n\t}\n\tif ( Array.isArray( list ) ) {\n\t\t// TODO: when there is a canonical way to detect that we are editing a post\n\t\t// the following check should be changed to something like:\n\t\t// if ( list.includes( 'core/post-content' ) && getEditorMode() === 'post-content' && item === null )\n\t\tif ( list.includes( 'core/post-content' ) && item === null ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn list.includes( item );\n\t}\n\treturn defaultResult;\n};\n\n/**\n * Determines if the given block type is allowed to be inserted into the block list.\n * This function is not exported and not memoized because using a memoized selector\n * inside another memoized selector is just a waste of time.\n *\n * @param {Object}        state        Editor state.\n * @param {string|Object} blockName    The block type object, e.g., the response\n *                                     from the block directory; or a string name of\n *                                     an installed block type, e.g.' core/paragraph'.\n * @param {?string}       rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be inserted.\n */\nconst canInsertBlockTypeUnmemoized = (\n\tstate,\n\tblockName,\n\trootClientId = null\n) => {\n\tlet blockType;\n\tif ( blockName && 'object' === typeof blockName ) {\n\t\tblockType = blockName;\n\t\tblockName = blockType.name;\n\t} else {\n\t\tblockType = getBlockType( blockName );\n\t}\n\tif ( ! blockType ) {\n\t\treturn false;\n\t}\n\n\tconst { allowedBlockTypes } = getSettings( state );\n\n\tconst isBlockAllowedInEditor = checkAllowList(\n\t\tallowedBlockTypes,\n\t\tblockName,\n\t\ttrue\n\t);\n\tif ( ! isBlockAllowedInEditor ) {\n\t\treturn false;\n\t}\n\n\tconst isLocked = !! getTemplateLock( state, rootClientId );\n\tif ( isLocked ) {\n\t\treturn false;\n\t}\n\n\tconst parentBlockListSettings = getBlockListSettings( state, rootClientId );\n\n\t// The parent block doesn't have settings indicating it doesn't support\n\t// inner blocks, return false.\n\tif ( rootClientId && parentBlockListSettings === undefined ) {\n\t\treturn false;\n\t}\n\n\tconst parentAllowedBlocks = parentBlockListSettings?.allowedBlocks;\n\tconst hasParentAllowedBlock = checkAllowList(\n\t\tparentAllowedBlocks,\n\t\tblockName\n\t);\n\n\tconst blockAllowedParentBlocks = blockType.parent;\n\tconst parentName = getBlockName( state, rootClientId );\n\tconst hasBlockAllowedParent = checkAllowList(\n\t\tblockAllowedParentBlocks,\n\t\tparentName\n\t);\n\n\tlet hasBlockAllowedAncestor = true;\n\tconst blockAllowedAncestorBlocks = blockType.ancestor;\n\tif ( blockAllowedAncestorBlocks ) {\n\t\tconst ancestors = [\n\t\t\trootClientId,\n\t\t\t...getBlockParents( state, rootClientId ),\n\t\t];\n\n\t\thasBlockAllowedAncestor = some( ancestors, ( ancestorClientId ) =>\n\t\t\tcheckAllowList(\n\t\t\t\tblockAllowedAncestorBlocks,\n\t\t\t\tgetBlockName( state, ancestorClientId )\n\t\t\t)\n\t\t);\n\t}\n\n\tconst canInsert =\n\t\thasBlockAllowedAncestor &&\n\t\t( ( hasParentAllowedBlock === null &&\n\t\t\thasBlockAllowedParent === null ) ||\n\t\t\thasParentAllowedBlock === true ||\n\t\t\thasBlockAllowedParent === true );\n\n\tif ( ! canInsert ) {\n\t\treturn canInsert;\n\t}\n\n\t/**\n\t * This filter is an ad-hoc solution to prevent adding template parts inside post content.\n\t * Conceptually, having a filter inside a selector is bad pattern so this code will be\n\t * replaced by a declarative API that doesn't the following drawbacks:\n\t *\n\t * Filters are not reactive: Upon switching between \"template mode\" and non \"template mode\",\n\t * the filter and selector won't necessarily be executed again. For now, it doesn't matter much\n\t * because you can't switch between the two modes while the inserter stays open.\n\t *\n\t * Filters are global: Once they're defined, they will affect all editor instances and all registries.\n\t * An ideal API would only affect specific editor instances.\n\t */\n\treturn applyFilters(\n\t\t'blockEditor.__unstableCanInsertBlockType',\n\t\tcanInsert,\n\t\tblockType,\n\t\trootClientId,\n\t\t{\n\t\t\t// Pass bound selectors of the current registry. If we're in a nested\n\t\t\t// context, the data will differ from the one selected from the root\n\t\t\t// registry.\n\t\t\tgetBlock: getBlock.bind( null, state ),\n\t\t\tgetBlockParentsByBlockName: getBlockParentsByBlockName.bind(\n\t\t\t\tnull,\n\t\t\t\tstate\n\t\t\t),\n\t\t}\n\t);\n};\n\n/**\n * Determines if the given block type is allowed to be inserted into the block list.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  blockName    The name of the block type, e.g.' core/paragraph'.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be inserted.\n */\nexport const canInsertBlockType = createSelector(\n\tcanInsertBlockTypeUnmemoized,\n\t( state, blockName, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId[ rootClientId ],\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t]\n);\n\n/**\n * Determines if the given blocks are allowed to be inserted into the block\n * list.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  clientIds    The block client IDs to be inserted.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given blocks are allowed to be inserted.\n */\nexport function canInsertBlocks( state, clientIds, rootClientId = null ) {\n\treturn clientIds.every( ( id ) =>\n\t\tcanInsertBlockType( state, getBlockName( state, id ), rootClientId )\n\t);\n}\n\n/**\n * Determines if the given block is allowed to be deleted.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  clientId     The block client Id.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block is allowed to be removed.\n */\nexport function canRemoveBlock( state, clientId, rootClientId = null ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\n\t// attributes can be null if the block is already deleted.\n\tif ( attributes === null ) {\n\t\treturn true;\n\t}\n\n\tconst { lock } = attributes;\n\tconst parentIsLocked = !! getTemplateLock( state, rootClientId );\n\t// If we don't have a lock on the blockType level, we defer to the parent templateLock.\n\tif ( lock === undefined || lock?.remove === undefined ) {\n\t\treturn ! parentIsLocked;\n\t}\n\n\t// When remove is true, it means we cannot remove it.\n\treturn ! lock?.remove;\n}\n\n/**\n * Determines if the given blocks are allowed to be removed.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  clientIds    The block client IDs to be removed.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given blocks are allowed to be removed.\n */\nexport function canRemoveBlocks( state, clientIds, rootClientId = null ) {\n\treturn clientIds.every( ( clientId ) =>\n\t\tcanRemoveBlock( state, clientId, rootClientId )\n\t);\n}\n\n/**\n * Determines if the given block is allowed to be moved.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  clientId     The block client Id.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block is allowed to be moved.\n */\nexport function canMoveBlock( state, clientId, rootClientId = null ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\tif ( attributes === null ) {\n\t\treturn;\n\t}\n\n\tconst { lock } = attributes;\n\tconst parentIsLocked = getTemplateLock( state, rootClientId ) === 'all';\n\t// If we don't have a lock on the blockType level, we defer to the parent templateLock.\n\tif ( lock === undefined || lock?.move === undefined ) {\n\t\treturn ! parentIsLocked;\n\t}\n\n\t// When move is true, it means we cannot move it.\n\treturn ! lock?.move;\n}\n\n/**\n * Determines if the given blocks are allowed to be moved.\n *\n * @param {Object}  state        Editor state.\n * @param {string}  clientIds    The block client IDs to be moved.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given blocks are allowed to be moved.\n */\nexport function canMoveBlocks( state, clientIds, rootClientId = null ) {\n\treturn clientIds.every( ( clientId ) =>\n\t\tcanMoveBlock( state, clientId, rootClientId )\n\t);\n}\n\n/**\n * Determines if the given block is allowed to be edited.\n *\n * @param {Object} state    Editor state.\n * @param {string} clientId The block client Id.\n *\n * @return {boolean} Whether the given block is allowed to be edited.\n */\nexport function canEditBlock( state, clientId ) {\n\tconst attributes = getBlockAttributes( state, clientId );\n\tif ( attributes === null ) {\n\t\treturn true;\n\t}\n\n\tconst { lock } = attributes;\n\n\t// When the edit is true, we cannot edit the block.\n\treturn ! lock?.edit;\n}\n\n/**\n * Determines if the given block type can be locked/unlocked by a user.\n *\n * @param {Object}          state      Editor state.\n * @param {(string|Object)} nameOrType Block name or type object.\n *\n * @return {boolean} Whether a given block type can be locked/unlocked.\n */\nexport function canLockBlockType( state, nameOrType ) {\n\tif ( ! hasBlockSupport( nameOrType, 'lock', true ) ) {\n\t\treturn false;\n\t}\n\n\t// Use block editor settings as the default value.\n\treturn !! state.settings?.canLockBlocks;\n}\n\n/**\n * Returns information about how recently and frequently a block has been inserted.\n *\n * @param {Object} state Global application state.\n * @param {string} id    A string which identifies the insert, e.g. 'core/block/12'\n *\n * @return {?{ time: number, count: number }} An object containing `time` which is when the last\n *                                            insert occurred as a UNIX epoch, and `count` which is\n *                                            the number of inserts that have occurred.\n */\nfunction getInsertUsage( state, id ) {\n\treturn state.preferences.insertUsage?.[ id ] ?? null;\n}\n\n/**\n * Returns whether we can show a block type in the inserter\n *\n * @param {Object}  state        Global State\n * @param {Object}  blockType    BlockType\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Whether the given block type is allowed to be shown in the inserter.\n */\nconst canIncludeBlockTypeInInserter = ( state, blockType, rootClientId ) => {\n\tif ( ! hasBlockSupport( blockType, 'inserter', true ) ) {\n\t\treturn false;\n\t}\n\n\treturn canInsertBlockTypeUnmemoized( state, blockType.name, rootClientId );\n};\n\n/**\n * Return a function to be used to tranform a block variation to an inserter item\n *\n * @param {Object} state Global State\n * @param {Object} item  Denormalized inserter item\n * @return {Function} Function to transform a block variation to inserter item\n */\nconst getItemFromVariation = ( state, item ) => ( variation ) => {\n\tconst variationId = `${ item.id }/${ variation.name }`;\n\tconst { time, count = 0 } = getInsertUsage( state, variationId ) || {};\n\treturn {\n\t\t...item,\n\t\tid: variationId,\n\t\ticon: variation.icon || item.icon,\n\t\ttitle: variation.title || item.title,\n\t\tdescription: variation.description || item.description,\n\t\tcategory: variation.category || item.category,\n\t\t// If `example` is explicitly undefined for the variation, the preview will not be shown.\n\t\texample: variation.hasOwnProperty( 'example' )\n\t\t\t? variation.example\n\t\t\t: item.example,\n\t\tinitialAttributes: {\n\t\t\t...item.initialAttributes,\n\t\t\t...variation.attributes,\n\t\t},\n\t\tinnerBlocks: variation.innerBlocks,\n\t\tkeywords: variation.keywords || item.keywords,\n\t\tfrecency: calculateFrecency( time, count ),\n\t};\n};\n\n/**\n * Returns the calculated frecency.\n *\n * 'frecency' is a heuristic (https://en.wikipedia.org/wiki/Frecency)\n * that combines block usage frequenty and recency.\n *\n * @param {number} time  When the last insert occurred as a UNIX epoch\n * @param {number} count The number of inserts that have occurred.\n *\n * @return {number} The calculated frecency.\n */\nconst calculateFrecency = ( time, count ) => {\n\tif ( ! time ) {\n\t\treturn count;\n\t}\n\t// The selector is cached, which means Date.now() is the last time that the\n\t// relevant state changed. This suits our needs.\n\tconst duration = Date.now() - time;\n\tswitch ( true ) {\n\t\tcase duration < MILLISECONDS_PER_HOUR:\n\t\t\treturn count * 4;\n\t\tcase duration < MILLISECONDS_PER_DAY:\n\t\t\treturn count * 2;\n\t\tcase duration < MILLISECONDS_PER_WEEK:\n\t\t\treturn count / 2;\n\t\tdefault:\n\t\t\treturn count / 4;\n\t}\n};\n\n/**\n * Returns a function that accepts a block type and builds an item to be shown\n * in a specific context. It's used for building items for Inserter and available\n * block Transfroms list.\n *\n * @param {Object} state              Editor state.\n * @param {Object} options            Options object for handling the building of a block type.\n * @param {string} options.buildScope The scope for which the item is going to be used.\n * @return {Function} Function returns an item to be shown in a specific context (Inserter|Transforms list).\n */\nconst buildBlockTypeItem =\n\t( state, { buildScope = 'inserter' } ) =>\n\t( blockType ) => {\n\t\tconst id = blockType.name;\n\n\t\tlet isDisabled = false;\n\t\tif ( ! hasBlockSupport( blockType.name, 'multiple', true ) ) {\n\t\t\tisDisabled = some(\n\t\t\t\tgetBlocksByClientId(\n\t\t\t\t\tstate,\n\t\t\t\t\tgetClientIdsWithDescendants( state )\n\t\t\t\t),\n\t\t\t\t{ name: blockType.name }\n\t\t\t);\n\t\t}\n\n\t\tconst { time, count = 0 } = getInsertUsage( state, id ) || {};\n\t\tconst blockItemBase = {\n\t\t\tid,\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\ticon: blockType.icon,\n\t\t\tisDisabled,\n\t\t\tfrecency: calculateFrecency( time, count ),\n\t\t};\n\t\tif ( buildScope === 'transform' ) return blockItemBase;\n\n\t\tconst inserterVariations = getBlockVariations(\n\t\t\tblockType.name,\n\t\t\t'inserter'\n\t\t);\n\t\treturn {\n\t\t\t...blockItemBase,\n\t\t\tinitialAttributes: {},\n\t\t\tdescription: blockType.description,\n\t\t\tcategory: blockType.category,\n\t\t\tkeywords: blockType.keywords,\n\t\t\tvariations: inserterVariations,\n\t\t\texample: blockType.example,\n\t\t\tutility: 1, // Deprecated.\n\t\t};\n\t};\n\n/**\n * Determines the items that appear in the inserter. Includes both static\n * items (e.g. a regular block type) and dynamic items (e.g. a reusable block).\n *\n * Each item object contains what's necessary to display a button in the\n * inserter and handle its selection.\n *\n * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)\n * that combines block usage frequenty and recency.\n *\n * Items are returned ordered descendingly by their 'utility' and 'frecency'.\n *\n * @param    {Object}   state             Editor state.\n * @param    {?string}  rootClientId      Optional root client ID of block list.\n *\n * @return {WPEditorInserterItem[]} Items that appear in inserter.\n *\n * @typedef {Object} WPEditorInserterItem\n * @property {string}   id                Unique identifier for the item.\n * @property {string}   name              The type of block to create.\n * @property {Object}   initialAttributes Attributes to pass to the newly created block.\n * @property {string}   title             Title of the item, as it appears in the inserter.\n * @property {string}   icon              Dashicon for the item, as it appears in the inserter.\n * @property {string}   category          Block category that the item is associated with.\n * @property {string[]} keywords          Keywords that can be searched to find this item.\n * @property {boolean}  isDisabled        Whether or not the user should be prevented from inserting\n *                                        this item.\n * @property {number}   frecency          Heuristic that combines frequency and recency.\n */\nexport const getInserterItems = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tconst buildBlockTypeInserterItem = buildBlockTypeItem( state, {\n\t\t\tbuildScope: 'inserter',\n\t\t} );\n\n\t\t/*\n\t\t * Matches block comment delimiters amid serialized content.\n\t\t *\n\t\t * @see `tokenizer` in `@wordpress/block-serialization-default-parser`\n\t\t * package\n\t\t *\n\t\t * blockParserTokenizer differs from the original tokenizer in the\n\t\t * following ways:\n\t\t *\n\t\t * - removed global flag (/g)\n\t\t * - prepended ^\\s*\n\t\t *\n\t\t */\n\t\tconst blockParserTokenizer =\n\t\t\t/^\\s*<!--\\s+(\\/)?wp:([a-z][a-z0-9_-]*\\/)?([a-z][a-z0-9_-]*)\\s+({(?:(?=([^}]+|}+(?=})|(?!}\\s+\\/?-->)[^])*)\\5|[^]*?)}\\s+)?(\\/)?-->/;\n\n\t\tconst buildReusableBlockInserterItem = ( reusableBlock ) => {\n\t\t\tlet icon = symbol;\n\n\t\t\t/*\n\t\t\t * Instead of always displaying a generic \"symbol\" icon for every\n\t\t\t * reusable block, try to use an icon that represents the first\n\t\t\t * outermost block contained in the reusable block. This requires\n\t\t\t * scanning the serialized form of the reusable block to find its\n\t\t\t * first block delimiter, then looking up the corresponding block\n\t\t\t * type, if available.\n\t\t\t */\n\t\t\tif ( Platform.OS === 'web' ) {\n\t\t\t\tconst content =\n\t\t\t\t\ttypeof reusableBlock.content.raw === 'string'\n\t\t\t\t\t\t? reusableBlock.content.raw\n\t\t\t\t\t\t: reusableBlock.content;\n\t\t\t\tconst rawBlockMatch = content.match( blockParserTokenizer );\n\t\t\t\tif ( rawBlockMatch ) {\n\t\t\t\t\tconst [ , , namespace = 'core/', blockName ] =\n\t\t\t\t\t\trawBlockMatch;\n\t\t\t\t\tconst referencedBlockType = getBlockType(\n\t\t\t\t\t\tnamespace + blockName\n\t\t\t\t\t);\n\t\t\t\t\tif ( referencedBlockType ) {\n\t\t\t\t\t\ticon = referencedBlockType.icon;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst id = `core/block/${ reusableBlock.id }`;\n\t\t\tconst { time, count = 0 } = getInsertUsage( state, id ) || {};\n\t\t\tconst frecency = calculateFrecency( time, count );\n\n\t\t\treturn {\n\t\t\t\tid,\n\t\t\t\tname: 'core/block',\n\t\t\t\tinitialAttributes: { ref: reusableBlock.id },\n\t\t\t\ttitle: reusableBlock.title.raw,\n\t\t\t\ticon,\n\t\t\t\tcategory: 'reusable',\n\t\t\t\tkeywords: [],\n\t\t\t\tisDisabled: false,\n\t\t\t\tutility: 1, // Deprecated.\n\t\t\t\tfrecency,\n\t\t\t};\n\t\t};\n\n\t\tconst blockTypeInserterItems = getBlockTypes()\n\t\t\t.filter( ( blockType ) =>\n\t\t\t\tcanIncludeBlockTypeInInserter( state, blockType, rootClientId )\n\t\t\t)\n\t\t\t.map( buildBlockTypeInserterItem );\n\n\t\tconst reusableBlockInserterItems = canInsertBlockTypeUnmemoized(\n\t\t\tstate,\n\t\t\t'core/block',\n\t\t\trootClientId\n\t\t)\n\t\t\t? getReusableBlocks( state ).map( buildReusableBlockInserterItem )\n\t\t\t: [];\n\n\t\tconst items = blockTypeInserterItems.reduce( ( accumulator, item ) => {\n\t\t\tconst { variations = [] } = item;\n\t\t\t// Exclude any block type item that is to be replaced by a default variation.\n\t\t\tif ( ! variations.some( ( { isDefault } ) => isDefault ) ) {\n\t\t\t\taccumulator.push( item );\n\t\t\t}\n\t\t\tif ( variations.length ) {\n\t\t\t\tconst variationMapper = getItemFromVariation( state, item );\n\t\t\t\taccumulator.push( ...variations.map( variationMapper ) );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\n\t\t// Ensure core blocks are prioritized in the returned results,\n\t\t// because third party blocks can be registered earlier than\n\t\t// the core blocks (usually by using the `init` action),\n\t\t// thus affecting the display order.\n\t\t// We don't sort reusable blocks as they are handled differently.\n\t\tconst groupByType = ( blocks, block ) => {\n\t\t\tconst { core, noncore } = blocks;\n\t\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\n\t\t\ttype.push( block );\n\t\t\treturn blocks;\n\t\t};\n\t\tconst { core: coreItems, noncore: nonCoreItems } = items.reduce(\n\t\t\tgroupByType,\n\t\t\t{ core: [], noncore: [] }\n\t\t);\n\t\tconst sortedBlockTypes = [ ...coreItems, ...nonCoreItems ];\n\t\treturn [ ...sortedBlockTypes, ...reusableBlockInserterItems ];\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId,\n\t\tstate.blocks.order,\n\t\tstate.preferences.insertUsage,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tgetReusableBlocks( state ),\n\t\tgetBlockTypes(),\n\t]\n);\n\n/**\n * Determines the items that appear in the available block transforms list.\n *\n * Each item object contains what's necessary to display a menu item in the\n * transform list and handle its selection.\n *\n * The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)\n * that combines block usage frequenty and recency.\n *\n * Items are returned ordered descendingly by their 'frecency'.\n *\n * @param    {Object}          state        Editor state.\n * @param    {Object|Object[]} blocks       Block object or array objects.\n * @param    {?string}         rootClientId Optional root client ID of block list.\n *\n * @return {WPEditorTransformItem[]} Items that appear in inserter.\n *\n * @typedef {Object} WPEditorTransformItem\n * @property {string}          id           Unique identifier for the item.\n * @property {string}          name         The type of block to create.\n * @property {string}          title        Title of the item, as it appears in the inserter.\n * @property {string}          icon         Dashicon for the item, as it appears in the inserter.\n * @property {boolean}         isDisabled   Whether or not the user should be prevented from inserting\n *                                          this item.\n * @property {number}          frecency     Heuristic that combines frequency and recency.\n */\nexport const getBlockTransformItems = createSelector(\n\t( state, blocks, rootClientId = null ) => {\n\t\tconst normalizedBlocks = castArray( blocks );\n\t\tconst [ sourceBlock ] = normalizedBlocks;\n\t\tconst buildBlockTypeTransformItem = buildBlockTypeItem( state, {\n\t\t\tbuildScope: 'transform',\n\t\t} );\n\t\tconst blockTypeTransformItems = getBlockTypes()\n\t\t\t.filter( ( blockType ) =>\n\t\t\t\tcanIncludeBlockTypeInInserter( state, blockType, rootClientId )\n\t\t\t)\n\t\t\t.map( buildBlockTypeTransformItem );\n\n\t\tconst itemsByName = Object.fromEntries(\n\t\t\tObject.entries( blockTypeTransformItems ).map( ( [ , value ] ) => [\n\t\t\t\tvalue.name,\n\t\t\t\tvalue,\n\t\t\t] )\n\t\t);\n\n\t\t// Consider unwraping the highest priority.\n\t\titemsByName[ '*' ] = {\n\t\t\tfrecency: +Infinity,\n\t\t\tid: '*',\n\t\t\tisDisabled: false,\n\t\t\tname: '*',\n\t\t\ttitle: __( 'Unwrap' ),\n\t\t\ticon: itemsByName[ sourceBlock?.name ]?.icon,\n\t\t};\n\n\t\tconst possibleTransforms = getPossibleBlockTransformations(\n\t\t\tnormalizedBlocks\n\t\t).reduce( ( accumulator, block ) => {\n\t\t\tif ( block === '*' ) {\n\t\t\t\taccumulator.push( itemsByName[ '*' ] );\n\t\t\t} else if ( itemsByName[ block?.name ] ) {\n\t\t\t\taccumulator.push( itemsByName[ block.name ] );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t}, [] );\n\t\treturn orderBy(\n\t\t\tpossibleTransforms,\n\t\t\t( block ) => itemsByName[ block.name ].frecency,\n\t\t\t'desc'\n\t\t);\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId,\n\t\tstate.preferences.insertUsage,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tgetBlockTypes(),\n\t]\n);\n\n/**\n * Determines whether there are items to show in the inserter.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {boolean} Items that appear in inserter.\n */\nexport const hasInserterItems = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tconst hasBlockType = some( getBlockTypes(), ( blockType ) =>\n\t\t\tcanIncludeBlockTypeInInserter( state, blockType, rootClientId )\n\t\t);\n\t\tif ( hasBlockType ) {\n\t\t\treturn true;\n\t\t}\n\t\tconst hasReusableBlock =\n\t\t\tcanInsertBlockTypeUnmemoized( state, 'core/block', rootClientId ) &&\n\t\t\tgetReusableBlocks( state ).length > 0;\n\n\t\treturn hasReusableBlock;\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tgetReusableBlocks( state ),\n\t\tgetBlockTypes(),\n\t]\n);\n\n/**\n * Returns the list of allowed inserter blocks for inner blocks children\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional root client ID of block list.\n *\n * @return {Array?} The list of allowed block types.\n */\nexport const __experimentalGetAllowedBlocks = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tif ( ! rootClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn filter( getBlockTypes(), ( blockType ) =>\n\t\t\tcanIncludeBlockTypeInInserter( state, blockType, rootClientId )\n\t\t);\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tgetBlockTypes(),\n\t]\n);\n\n/**\n * Returns the block to be directly inserted by the block appender.\n *\n * @param    {Object}         state            Editor state.\n * @param    {?string}        rootClientId     Optional root client ID of block list.\n *\n * @return {?WPDirectInsertBlock}              The block type to be directly inserted.\n *\n * @typedef {Object} WPDirectInsertBlock\n * @property {string}         name             The type of block.\n * @property {?Object}        attributes       Attributes to pass to the newly created block.\n * @property {?Array<string>} attributesToCopy Attributes to be copied from adjecent blocks when inserted.\n */\nexport const __experimentalGetDirectInsertBlock = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tif ( ! rootClientId ) {\n\t\t\treturn;\n\t\t}\n\t\tconst defaultBlock =\n\t\t\tstate.blockListSettings[ rootClientId ]?.__experimentalDefaultBlock;\n\t\tconst directInsert =\n\t\t\tstate.blockListSettings[ rootClientId ]?.__experimentalDirectInsert;\n\t\tif ( ! defaultBlock || ! directInsert ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( typeof directInsert === 'function' ) {\n\t\t\treturn directInsert( getBlock( state, rootClientId ) )\n\t\t\t\t? defaultBlock\n\t\t\t\t: null;\n\t\t}\n\t\treturn defaultBlock;\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.tree[ rootClientId ],\n\t]\n);\n\nconst checkAllowListRecursive = ( blocks, allowedBlockTypes ) => {\n\tif ( typeof allowedBlockTypes === 'boolean' ) {\n\t\treturn allowedBlockTypes;\n\t}\n\n\tconst blocksQueue = [ ...blocks ];\n\twhile ( blocksQueue.length > 0 ) {\n\t\tconst block = blocksQueue.shift();\n\n\t\tconst isAllowed = checkAllowList(\n\t\t\tallowedBlockTypes,\n\t\t\tblock.name || block.blockName,\n\t\t\ttrue\n\t\t);\n\t\tif ( ! isAllowed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tblock.innerBlocks?.forEach( ( innerBlock ) => {\n\t\t\tblocksQueue.push( innerBlock );\n\t\t} );\n\t}\n\n\treturn true;\n};\n\nexport const __experimentalGetParsedPattern = createSelector(\n\t( state, patternName ) => {\n\t\tconst patterns = state.settings.__experimentalBlockPatterns;\n\t\tconst pattern = patterns.find( ( { name } ) => name === patternName );\n\t\tif ( ! pattern ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn {\n\t\t\t...pattern,\n\t\t\tblocks: parse( pattern.content, {\n\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t} ),\n\t\t};\n\t},\n\t( state ) => [ state.settings.__experimentalBlockPatterns ]\n);\n\nconst getAllAllowedPatterns = createSelector(\n\t( state ) => {\n\t\tconst patterns = state.settings.__experimentalBlockPatterns;\n\t\tconst { allowedBlockTypes } = getSettings( state );\n\t\tconst parsedPatterns = patterns\n\t\t\t.filter( ( { inserter = true } ) => !! inserter )\n\t\t\t.map( ( { name } ) =>\n\t\t\t\t__experimentalGetParsedPattern( state, name )\n\t\t\t);\n\t\tconst allowedPatterns = parsedPatterns.filter( ( { blocks } ) =>\n\t\t\tcheckAllowListRecursive( blocks, allowedBlockTypes )\n\t\t);\n\t\treturn allowedPatterns;\n\t},\n\t( state ) => [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.allowedBlockTypes,\n\t]\n);\n\n/**\n * Returns the list of allowed patterns for inner blocks children.\n *\n * @param {Object}  state        Editor state.\n * @param {?string} rootClientId Optional target root client ID.\n *\n * @return {Array?} The list of allowed patterns.\n */\nexport const __experimentalGetAllowedPatterns = createSelector(\n\t( state, rootClientId = null ) => {\n\t\tconst availableParsedPatterns = getAllAllowedPatterns( state );\n\t\tconst patternsAllowed = filter(\n\t\t\tavailableParsedPatterns,\n\t\t\t( { blocks } ) =>\n\t\t\t\tblocks.every( ( { name } ) =>\n\t\t\t\t\tcanInsertBlockType( state, name, rootClientId )\n\t\t\t\t)\n\t\t);\n\n\t\treturn patternsAllowed;\n\t},\n\t( state, rootClientId ) => [\n\t\tstate.settings.__experimentalBlockPatterns,\n\t\tstate.settings.allowedBlockTypes,\n\t\tstate.settings.templateLock,\n\t\tstate.blockListSettings[ rootClientId ],\n\t\tstate.blocks.byClientId[ rootClientId ],\n\t]\n);\n\n/**\n * Returns the list of patterns based on their declared `blockTypes`\n * and a block's name.\n * Patterns can use `blockTypes` to integrate in work flows like\n * suggesting appropriate patterns in a Placeholder state(during insertion)\n * or blocks transformations.\n *\n * @param {Object}          state        Editor state.\n * @param {string|string[]} blockNames   Block's name or array of block names to find matching pattens.\n * @param {?string}         rootClientId Optional target root client ID.\n *\n * @return {Array} The list of matched block patterns based on declared `blockTypes` and block name.\n */\nexport const __experimentalGetPatternsByBlockTypes = createSelector(\n\t( state, blockNames, rootClientId = null ) => {\n\t\tif ( ! blockNames ) return EMPTY_ARRAY;\n\t\tconst patterns = __experimentalGetAllowedPatterns(\n\t\t\tstate,\n\t\t\trootClientId\n\t\t);\n\t\tconst normalizedBlockNames = Array.isArray( blockNames )\n\t\t\t? blockNames\n\t\t\t: [ blockNames ];\n\t\treturn patterns.filter( ( pattern ) =>\n\t\t\tpattern?.blockTypes?.some?.( ( blockName ) =>\n\t\t\t\tnormalizedBlockNames.includes( blockName )\n\t\t\t)\n\t\t);\n\t},\n\t( state, rootClientId ) => [\n\t\t...__experimentalGetAllowedPatterns.getDependants(\n\t\t\tstate,\n\t\t\trootClientId\n\t\t),\n\t]\n);\n\n/**\n * Determines the items that appear in the available pattern transforms list.\n *\n * For now we only handle blocks without InnerBlocks and take into account\n * the `__experimentalRole` property of blocks' attributes for the transformation.\n *\n * We return the first set of possible eligible block patterns,\n * by checking the `blockTypes` property. We still have to recurse through\n * block pattern's blocks and try to find matches from the selected blocks.\n * Now this happens in the consumer to avoid heavy operations in the selector.\n *\n * @param {Object}   state        Editor state.\n * @param {Object[]} blocks       The selected blocks.\n * @param {?string}  rootClientId Optional root client ID of block list.\n *\n * @return {WPBlockPattern[]} Items that are eligible for a pattern transformation.\n */\nexport const __experimentalGetPatternTransformItems = createSelector(\n\t( state, blocks, rootClientId = null ) => {\n\t\tif ( ! blocks ) return EMPTY_ARRAY;\n\t\t/**\n\t\t * For now we only handle blocks without InnerBlocks and take into account\n\t\t * the `__experimentalRole` property of blocks' attributes for the transformation.\n\t\t * Note that the blocks have been retrieved through `getBlock`, which doesn't\n\t\t * return the inner blocks of an inner block controller, so we still need\n\t\t * to check for this case too.\n\t\t */\n\t\tif (\n\t\t\tblocks.some(\n\t\t\t\t( { clientId, innerBlocks } ) =>\n\t\t\t\t\tinnerBlocks.length ||\n\t\t\t\t\tareInnerBlocksControlled( state, clientId )\n\t\t\t)\n\t\t) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\n\t\t// Create a Set of the selected block names that is used in patterns filtering.\n\t\tconst selectedBlockNames = Array.from(\n\t\t\tnew Set( blocks.map( ( { name } ) => name ) )\n\t\t);\n\t\t/**\n\t\t * Here we will return first set of possible eligible block patterns,\n\t\t * by checking the `blockTypes` property. We still have to recurse through\n\t\t * block pattern's blocks and try to find matches from the selected blocks.\n\t\t * Now this happens in the consumer to avoid heavy operations in the selector.\n\t\t */\n\t\treturn __experimentalGetPatternsByBlockTypes(\n\t\t\tstate,\n\t\t\tselectedBlockNames,\n\t\t\trootClientId\n\t\t);\n\t},\n\t( state, rootClientId ) => [\n\t\t...__experimentalGetPatternsByBlockTypes.getDependants(\n\t\t\tstate,\n\t\t\trootClientId\n\t\t),\n\t]\n);\n\n/**\n * Returns the Block List settings of a block, if any exist.\n *\n * @param {Object}  state    Editor state.\n * @param {?string} clientId Block client ID.\n *\n * @return {?Object} Block settings of the block if set.\n */\nexport function getBlockListSettings( state, clientId ) {\n\treturn state.blockListSettings[ clientId ];\n}\n\n/**\n * Returns the editor settings.\n *\n * @param {Object} state Editor state.\n *\n * @return {Object} The editor settings object.\n */\nexport function getSettings( state ) {\n\treturn state.settings;\n}\n\n/**\n * Returns true if the most recent block change is be considered persistent, or\n * false otherwise. A persistent change is one committed by BlockEditorProvider\n * via its `onChange` callback, in addition to `onInput`.\n *\n * @param {Object} state Block editor state.\n *\n * @return {boolean} Whether the most recent block change was persistent.\n */\nexport function isLastBlockChangePersistent( state ) {\n\treturn state.blocks.isPersistentChange;\n}\n\n/**\n * Returns the block list settings for an array of blocks, if any exist.\n *\n * @param {Object} state     Editor state.\n * @param {Array}  clientIds Block client IDs.\n *\n * @return {Object} An object where the keys are client ids and the values are\n *                  a block list setting object.\n */\nexport const __experimentalGetBlockListSettingsForBlocks = createSelector(\n\t( state, clientIds = [] ) => {\n\t\treturn clientIds.reduce( ( blockListSettingsForBlocks, clientId ) => {\n\t\t\tif ( ! state.blockListSettings[ clientId ] ) {\n\t\t\t\treturn blockListSettingsForBlocks;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...blockListSettingsForBlocks,\n\t\t\t\t[ clientId ]: state.blockListSettings[ clientId ],\n\t\t\t};\n\t\t}, {} );\n\t},\n\t( state ) => [ state.blockListSettings ]\n);\n\n/**\n * Returns the title of a given reusable block\n *\n * @param {Object}        state Global application state.\n * @param {number|string} ref   The shared block's ID.\n *\n * @return {string} The reusable block saved title.\n */\nexport const __experimentalGetReusableBlockTitle = createSelector(\n\t( state, ref ) => {\n\t\tconst reusableBlock = find(\n\t\t\tgetReusableBlocks( state ),\n\t\t\t( block ) => block.id === ref\n\t\t);\n\t\tif ( ! reusableBlock ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn reusableBlock.title?.raw;\n\t},\n\t( state ) => [ getReusableBlocks( state ) ]\n);\n\n/**\n * Returns true if the most recent block change is be considered ignored, or\n * false otherwise. An ignored change is one not to be committed by\n * BlockEditorProvider, neither via `onChange` nor `onInput`.\n *\n * @param {Object} state Block editor state.\n *\n * @return {boolean} Whether the most recent block change was ignored.\n */\nexport function __unstableIsLastBlockChangeIgnored( state ) {\n\t// TODO: Removal Plan: Changes incurred by RECEIVE_BLOCKS should not be\n\t// ignored if in-fact they result in a change in blocks state. The current\n\t// need to ignore changes not a result of user interaction should be\n\t// accounted for in the refactoring of reusable blocks as occurring within\n\t// their own separate block editor / state (#7119).\n\treturn state.blocks.isIgnoredChange;\n}\n\n/**\n * Returns the block attributes changed as a result of the last dispatched\n * action.\n *\n * @param {Object} state Block editor state.\n *\n * @return {Object<string,Object>} Subsets of block attributes changed, keyed\n *                                 by block client ID.\n */\nexport function __experimentalGetLastBlockAttributeChanges( state ) {\n\treturn state.lastBlockAttributesChange;\n}\n\n/**\n * Returns the available reusable blocks\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} Reusable blocks\n */\nfunction getReusableBlocks( state ) {\n\treturn state?.settings?.__experimentalReusableBlocks ?? EMPTY_ARRAY;\n}\n\n/**\n * Returns whether the navigation mode is enabled.\n *\n * @param {Object} state Editor state.\n *\n * @return {boolean} Is navigation mode enabled.\n */\nexport function isNavigationMode( state ) {\n\treturn state.editorMode === 'navigation';\n}\n\n/**\n * Returns the current editor mode.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} the editor mode.\n */\nexport function __unstableGetEditorMode( state ) {\n\treturn state.editorMode;\n}\n\n/**\n * Returns whether block moving mode is enabled.\n *\n * @param {Object} state Editor state.\n *\n * @return {string} Client Id of moving block.\n */\nexport function hasBlockMovingClientId( state ) {\n\treturn state.hasBlockMovingClientId;\n}\n\n/**\n * Returns true if the last change was an automatic change, false otherwise.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the last change was automatic.\n */\nexport function didAutomaticChange( state ) {\n\treturn !! state.automaticChangeStatus;\n}\n\n/**\n * Returns true if the current highlighted block matches the block clientId.\n *\n * @param {Object} state    Global application state.\n * @param {string} clientId The block to check.\n *\n * @return {boolean} Whether the block is currently highlighted.\n */\nexport function isBlockHighlighted( state, clientId ) {\n\treturn state.highlightedBlock === clientId;\n}\n\n/**\n * Checks if a given block has controlled inner blocks.\n *\n * @param {Object} state    Global application state.\n * @param {string} clientId The block to check.\n *\n * @return {boolean} True if the block has controlled inner blocks.\n */\nexport function areInnerBlocksControlled( state, clientId ) {\n\treturn !! state.blocks.controlledInnerBlocks[ clientId ];\n}\n\n/**\n * Returns the clientId for the first 'active' block of a given array of block names.\n * A block is 'active' if it (or a child) is the selected block.\n * Returns the first match moving up the DOM from the selected block.\n *\n * @param {Object}   state            Global application state.\n * @param {string[]} validBlocksNames The names of block types to check for.\n *\n * @return {string} The matching block's clientId.\n */\nexport const __experimentalGetActiveBlockIdByBlockNames = createSelector(\n\t( state, validBlockNames ) => {\n\t\tif ( ! validBlockNames.length ) {\n\t\t\treturn null;\n\t\t}\n\t\t// Check if selected block is a valid entity area.\n\t\tconst selectedBlockClientId = getSelectedBlockClientId( state );\n\t\tif (\n\t\t\tvalidBlockNames.includes(\n\t\t\t\tgetBlockName( state, selectedBlockClientId )\n\t\t\t)\n\t\t) {\n\t\t\treturn selectedBlockClientId;\n\t\t}\n\t\t// Check if first selected block is a child of a valid entity area.\n\t\tconst multiSelectedBlockClientIds =\n\t\t\tgetMultiSelectedBlockClientIds( state );\n\t\tconst entityAreaParents = getBlockParentsByBlockName(\n\t\t\tstate,\n\t\t\tselectedBlockClientId || multiSelectedBlockClientIds[ 0 ],\n\t\t\tvalidBlockNames\n\t\t);\n\t\tif ( entityAreaParents ) {\n\t\t\t// Last parent closest/most interior.\n\t\t\treturn entityAreaParents[ entityAreaParents.length - 1 ];\n\t\t}\n\t\treturn null;\n\t},\n\t( state, validBlockNames ) => [\n\t\tstate.selection.selectionStart.clientId,\n\t\tstate.selection.selectionEnd.clientId,\n\t\tvalidBlockNames,\n\t]\n);\n\n/**\n * Tells if the block with the passed clientId was just inserted.\n *\n * @param {Object}  state    Global application state.\n * @param {Object}  clientId Client Id of the block.\n * @param {?string} source   Optional insertion source of the block.\n * @return {boolean} True if the block matches the last block inserted from the specified source.\n */\nexport function wasBlockJustInserted( state, clientId, source ) {\n\tconst { lastBlockInserted } = state;\n\treturn (\n\t\tlastBlockInserted.clientId === clientId &&\n\t\tlastBlockInserted.source === source\n\t);\n}\n\n/**\n * Tells if the block is visible on the canvas or not.\n *\n * @param {Object} state    Global application state.\n * @param {Object} clientId Client Id of the block.\n * @return {boolean} True if the block is visible.\n */\nexport function isBlockVisible( state, clientId ) {\n\treturn state.blockVisibility?.[ clientId ] ?? true;\n}\n\n/**\n * Returns the list of all hidden blocks.\n *\n * @param {Object} state Global application state.\n * @return {[string]} List of hidden blocks.\n */\nexport const __unstableGetVisibleBlocks = createSelector(\n\t( state ) => {\n\t\treturn new Set(\n\t\t\tObject.keys( state.blockVisibility ).filter(\n\t\t\t\t( key ) => state.blockVisibility[ key ]\n\t\t\t)\n\t\t);\n\t},\n\t( state ) => [ state.blockVisibility ]\n);\n\nexport const __unstableGetContentLockingParent = createSelector(\n\t( state, clientId ) => {\n\t\tlet current = clientId;\n\t\tlet result;\n\t\twhile ( !! state.blocks.parents[ current ] ) {\n\t\t\tcurrent = state.blocks.parents[ current ];\n\t\t\tif ( getTemplateLock( state, current ) === 'contentOnly' ) {\n\t\t\t\tresult = current;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t},\n\t( state ) => [ state.blocks.parents, state.blockListSettings ]\n);\n\nexport function __unstableGetTemporarilyEditingAsBlocks( state ) {\n\treturn state.temporarilyEditingAsBlocks;\n}\n\nexport function __unstableHasActiveBlockOverlayActive( state, clientId ) {\n\t// If the block editing is locked, the block overlay is always active.\n\tif ( ! canEditBlock( state, clientId ) ) {\n\t\treturn true;\n\t}\n\n\tconst editorMode = __unstableGetEditorMode( state );\n\n\t// In zoom-out mode, the block overlay is always active for top level blocks.\n\tif (\n\t\teditorMode === 'zoom-out' &&\n\t\tclientId &&\n\t\t! getBlockRootClientId( state, clientId )\n\t) {\n\t\treturn true;\n\t}\n\n\t// In navigation mode, the block overlay is active when the block is not\n\t// selected (and doesn't contain a selected child). The same behavior is\n\t// also enabled in all modes for blocks that have controlled children\n\t// (reusable block, template part, navigation), unless explicitly disabled\n\t// with `supports.__experimentalDisableBlockOverlay`.\n\tconst blockSupportDisable = hasBlockSupport(\n\t\tgetBlockName( state, clientId ),\n\t\t'__experimentalDisableBlockOverlay',\n\t\tfalse\n\t);\n\tconst shouldEnableIfUnselected =\n\t\teditorMode === 'navigation' ||\n\t\t( blockSupportDisable\n\t\t\t? false\n\t\t\t: areInnerBlocksControlled( state, clientId ) );\n\n\treturn (\n\t\tshouldEnableIfUnselected &&\n\t\t! isBlockSelected( state, clientId ) &&\n\t\t! hasSelectedInnerBlock( state, clientId, true )\n\t);\n}\n\nexport function __unstableIsWithinBlockOverlay( state, clientId ) {\n\tlet parent = state.blocks.parents[ clientId ];\n\twhile ( !! parent ) {\n\t\tif ( __unstableHasActiveBlockOverlayActive( state, parent ) ) {\n\t\t\treturn true;\n\t\t}\n\t\tparent = state.blocks.parents[ parent ];\n\t}\n\treturn false;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","/**\n * A robust way to retain selection position through various\n * transforms is to insert a special character at the position and\n * then recover it.\n */\nexport const START_OF_SELECTED_AREA = '\\u0086';\n\n/**\n * Retrieve the block attribute that contains the selection position.\n *\n * @param {Object} blockAttributes Block attributes.\n * @return {string|void} The name of the block attribute that was previously selected.\n */\nexport function retrieveSelectedAttribute( blockAttributes ) {\n\tif ( ! blockAttributes ) {\n\t\treturn;\n\t}\n\n\treturn Object.keys( blockAttributes ).find( ( name ) => {\n\t\tconst value = blockAttributes[ name ];\n\t\treturn (\n\t\t\ttypeof value === 'string' &&\n\t\t\tvalue.indexOf( START_OF_SELECTED_AREA ) !== -1\n\t\t);\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tcloneBlock,\n\t__experimentalCloneSanitizedBlock,\n\tcreateBlock,\n\tdoBlocksMatchTemplate,\n\tgetBlockType,\n\tgetDefaultBlockName,\n\thasBlockSupport,\n\tswitchToBlockType,\n\tsynchronizeBlocksWithTemplate,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { create, insert, remove, toHTMLString } from '@wordpress/rich-text';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { mapRichTextSettings } from './utils';\nimport {\n\tretrieveSelectedAttribute,\n\tSTART_OF_SELECTED_AREA,\n} from '../utils/selection';\n\nconst castArray = ( maybeArray ) =>\n\tArray.isArray( maybeArray ) ? maybeArray : [ maybeArray ];\n\n/**\n * Action which will insert a default block insert action if there\n * are no other blocks at the root of the editor. This action should be used\n * in actions which may result in no blocks remaining in the editor (removal,\n * replacement, etc).\n */\nconst ensureDefaultBlock =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tconst count = select.getBlockCount();\n\t\tif ( count > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there's an custom appender, don't insert default block.\n\t\t// We have to remember to manually move the focus elsewhere to\n\t\t// prevent it from being lost though.\n\t\tconst { __unstableHasCustomAppender } = select.getSettings();\n\t\tif ( __unstableHasCustomAppender ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch.insertDefaultBlock();\n\t};\n\n/**\n * Action that resets blocks state to the specified array of blocks, taking precedence\n * over any other content reflected as an edit in state.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport const resetBlocks =\n\t( blocks ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( { type: 'RESET_BLOCKS', blocks } );\n\t\tdispatch( validateBlocksToTemplate( blocks ) );\n\t};\n\n/**\n * Block validity is a function of blocks state (at the point of a\n * reset) and the template setting. As a compromise to its placement\n * across distinct parts of state, it is implemented here as a side-\n * effect of the block reset action.\n *\n * @param {Array} blocks Array of blocks.\n */\nexport const validateBlocksToTemplate =\n\t( blocks ) =>\n\t( { select, dispatch } ) => {\n\t\tconst template = select.getTemplate();\n\t\tconst templateLock = select.getTemplateLock();\n\n\t\t// Unlocked templates are considered always valid because they act\n\t\t// as default values only.\n\t\tconst isBlocksValidToTemplate =\n\t\t\t! template ||\n\t\t\ttemplateLock !== 'all' ||\n\t\t\tdoBlocksMatchTemplate( blocks, template );\n\n\t\t// Update if validity has changed.\n\t\tconst isValidTemplate = select.isValidTemplate();\n\n\t\tif ( isBlocksValidToTemplate !== isValidTemplate ) {\n\t\t\tdispatch.setTemplateValidity( isBlocksValidToTemplate );\n\t\t\treturn isBlocksValidToTemplate;\n\t\t}\n\t};\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 * A selection object.\n *\n * @typedef {Object} WPSelection\n *\n * @property {WPBlockSelection} start The selection start.\n * @property {WPBlockSelection} end   The selection end.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that selection state should be\n * reset to the specified selection.\n *\n * @param {WPBlockSelection} selectionStart  The selection start.\n * @param {WPBlockSelection} selectionEnd    The selection end.\n * @param {0|-1|null}        initialPosition Initial block position.\n *\n * @return {Object} Action object.\n */\nexport function resetSelection(\n\tselectionStart,\n\tselectionEnd,\n\tinitialPosition\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'RESET_SELECTION',\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tinitialPosition,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that blocks have been received.\n * Unlike resetBlocks, these should be appended to the existing known set, not\n * replacing.\n *\n * @deprecated\n *\n * @param {Object[]} blocks Array of block objects.\n *\n * @return {Object} Action object.\n */\nexport function receiveBlocks( blocks ) {\n\tdeprecated( 'wp.data.dispatch( \"core/block-editor\" ).receiveBlocks', {\n\t\tsince: '5.9',\n\t\talternative: 'resetBlocks or insertBlocks',\n\t} );\n\n\treturn {\n\t\ttype: 'RECEIVE_BLOCKS',\n\t\tblocks,\n\t};\n}\n\n/**\n * Action that updates attributes of multiple blocks with the specified client IDs.\n *\n * @param {string|string[]} clientIds     Block client IDs.\n * @param {Object}          attributes    Block attributes to be merged. Should be keyed by clientIds if\n *                                        uniqueByBlock is true.\n * @param {boolean}         uniqueByBlock true if each block in clientIds array has a unique set of attributes\n * @return {Object} Action object.\n */\nexport function updateBlockAttributes(\n\tclientIds,\n\tattributes,\n\tuniqueByBlock = false\n) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_ATTRIBUTES',\n\t\tclientIds: castArray( clientIds ),\n\t\tattributes,\n\t\tuniqueByBlock,\n\t};\n}\n\n/**\n * Action that updates the block with the specified client ID.\n *\n * @param {string} clientId Block client ID.\n * @param {Object} updates  Block attributes to be merged.\n *\n * @return {Object} Action object.\n */\nexport function updateBlock( clientId, updates ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK',\n\t\tclientId,\n\t\tupdates,\n\t};\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID has been selected, optionally accepting a position\n * value reflecting its selection directionality. An initialPosition of -1\n * reflects a reverse selection.\n *\n * @param {string}    clientId        Block client ID.\n * @param {0|-1|null} initialPosition Optional initial position. Pass as -1 to\n *                                    reflect reverse selection.\n *\n * @return {Object} Action object.\n */\nexport function selectBlock( clientId, initialPosition = 0 ) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'SELECT_BLOCK',\n\t\tinitialPosition,\n\t\tclientId,\n\t};\n}\n\n/**\n * Yields action objects used in signalling that the block preceding the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport const selectPreviousBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tconst previousBlockClientId =\n\t\t\tselect.getPreviousBlockClientId( clientId );\n\t\tif ( previousBlockClientId ) {\n\t\t\tdispatch.selectBlock( previousBlockClientId, -1 );\n\t\t}\n\t};\n\n/**\n * Yields action objects used in signalling that the block following the given\n * clientId should be selected.\n *\n * @param {string} clientId Block client ID.\n */\nexport const selectNextBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tconst nextBlockClientId = select.getNextBlockClientId( clientId );\n\t\tif ( nextBlockClientId ) {\n\t\t\tdispatch.selectBlock( nextBlockClientId );\n\t\t}\n\t};\n\n/**\n * Action that starts block multi-selection.\n *\n * @return {Object} Action object.\n */\nexport function startMultiSelect() {\n\treturn {\n\t\ttype: 'START_MULTI_SELECT',\n\t};\n}\n\n/**\n * Action that stops block multi-selection.\n *\n * @return {Object} Action object.\n */\nexport function stopMultiSelect() {\n\treturn {\n\t\ttype: 'STOP_MULTI_SELECT',\n\t};\n}\n\n/**\n * Action that changes block multi-selection.\n *\n * @param {string}      start                         First block of the multi selection.\n * @param {string}      end                           Last block of the multiselection.\n * @param {number|null} __experimentalInitialPosition Optional initial position. Pass as null to skip focus within editor canvas.\n */\nexport const multiSelect =\n\t( start, end, __experimentalInitialPosition = 0 ) =>\n\t( { select, dispatch } ) => {\n\t\tconst startBlockRootClientId = select.getBlockRootClientId( start );\n\t\tconst endBlockRootClientId = select.getBlockRootClientId( end );\n\n\t\t// Only allow block multi-selections at the same level.\n\t\tif ( startBlockRootClientId !== endBlockRootClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'MULTI_SELECT',\n\t\t\tstart,\n\t\t\tend,\n\t\t\tinitialPosition: __experimentalInitialPosition,\n\t\t} );\n\n\t\tconst blockCount = select.getSelectedBlockCount();\n\n\t\tspeak(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: number of selected blocks */\n\t\t\t\t_n( '%s block selected.', '%s blocks selected.', blockCount ),\n\t\t\t\tblockCount\n\t\t\t),\n\t\t\t'assertive'\n\t\t);\n\t};\n\n/**\n * Action that clears the block selection.\n *\n * @return {Object} Action object.\n */\nexport function clearSelectedBlock() {\n\treturn {\n\t\ttype: 'CLEAR_SELECTED_BLOCK',\n\t};\n}\n\n/**\n * Action that enables or disables block selection.\n *\n * @param {boolean} [isSelectionEnabled=true] Whether block selection should\n *                                            be enabled.\n *\n * @return {Object} Action object.\n */\nexport function toggleSelection( isSelectionEnabled = true ) {\n\treturn {\n\t\ttype: 'TOGGLE_SELECTION',\n\t\tisSelectionEnabled,\n\t};\n}\n\nfunction getBlocksWithDefaultStylesApplied( blocks, blockEditorSettings ) {\n\tconst preferredStyleVariations =\n\t\tblockEditorSettings?.__experimentalPreferredStyleVariations?.value ??\n\t\t{};\n\treturn blocks.map( ( block ) => {\n\t\tconst blockName = block.name;\n\t\tif ( ! hasBlockSupport( blockName, 'defaultStylePicker', true ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tif ( ! preferredStyleVariations[ blockName ] ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst className = block.attributes?.className;\n\t\tif ( className?.includes( 'is-style-' ) ) {\n\t\t\treturn block;\n\t\t}\n\t\tconst { attributes = {} } = block;\n\t\tconst blockStyle = preferredStyleVariations[ blockName ];\n\t\treturn {\n\t\t\t...block,\n\t\t\tattributes: {\n\t\t\t\t...attributes,\n\t\t\t\tclassName: `${\n\t\t\t\t\tclassName || ''\n\t\t\t\t} is-style-${ blockStyle }`.trim(),\n\t\t\t},\n\t\t};\n\t} );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Action that replaces given blocks with one or more replacement blocks.\n *\n * @param {(string|string[])} clientIds       Block client ID(s) to replace.\n * @param {(Object|Object[])} blocks          Replacement block(s).\n * @param {number}            indexToSelect   Index of replacement block to select.\n * @param {0|-1|null}         initialPosition Index of caret after in the selected block after the operation.\n * @param {?Object}           meta            Optional Meta values to be passed to the action object.\n *\n * @return {Object} Action object.\n */\nexport const replaceBlocks =\n\t( clientIds, blocks, indexToSelect, initialPosition = 0, meta ) =>\n\t( { select, dispatch } ) => {\n\t\t/* eslint-enable jsdoc/valid-types */\n\t\tclientIds = castArray( clientIds );\n\t\tblocks = getBlocksWithDefaultStylesApplied(\n\t\t\tcastArray( blocks ),\n\t\t\tselect.getSettings()\n\t\t);\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\t// Replace is valid if the new blocks can be inserted in the root block.\n\t\tfor ( let index = 0; index < blocks.length; index++ ) {\n\t\t\tconst block = blocks[ index ];\n\t\t\tconst canInsertBlock = select.canInsertBlockType(\n\t\t\t\tblock.name,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t\tif ( ! canInsertBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'REPLACE_BLOCKS',\n\t\t\tclientIds,\n\t\t\tblocks,\n\t\t\ttime: Date.now(),\n\t\t\tindexToSelect,\n\t\t\tinitialPosition,\n\t\t\tmeta,\n\t\t} );\n\t\tdispatch( ensureDefaultBlock() );\n\t};\n\n/**\n * Action that replaces a single block with one or more replacement blocks.\n *\n * @param {(string|string[])} clientId Block client ID to replace.\n * @param {(Object|Object[])} block    Replacement block(s).\n *\n * @return {Object} Action object.\n */\nexport function replaceBlock( clientId, block ) {\n\treturn replaceBlocks( clientId, block );\n}\n\n/**\n * Higher-order action creator which, given the action type to dispatch creates\n * an action creator for managing block movement.\n *\n * @param {string} type Action type to dispatch.\n *\n * @return {Function} Action creator.\n */\nconst createOnMove =\n\t( type ) =>\n\t( clientIds, rootClientId ) =>\n\t( { select, dispatch } ) => {\n\t\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\t\tconst canMoveBlocks = select.canMoveBlocks( clientIds, rootClientId );\n\t\tif ( ! canMoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdispatch( { type, clientIds: castArray( clientIds ), rootClientId } );\n\t};\n\nexport const moveBlocksDown = createOnMove( 'MOVE_BLOCKS_DOWN' );\nexport const moveBlocksUp = createOnMove( 'MOVE_BLOCKS_UP' );\n\n/**\n * Action that moves given blocks to a new position.\n *\n * @param {?string} clientIds        The client IDs of the blocks.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId   Root client ID destination.\n * @param {number}  index            The index to move the blocks to.\n */\nexport const moveBlocksToPosition =\n\t( clientIds, fromRootClientId = '', toRootClientId = '', index ) =>\n\t( { select, dispatch } ) => {\n\t\tconst canMoveBlocks = select.canMoveBlocks(\n\t\t\tclientIds,\n\t\t\tfromRootClientId\n\t\t);\n\n\t\t// If one of the blocks is locked or the parent is locked, we cannot move any block.\n\t\tif ( ! canMoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If moving inside the same root block the move is always possible.\n\t\tif ( fromRootClientId !== toRootClientId ) {\n\t\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\t\tclientIds,\n\t\t\t\tfromRootClientId\n\t\t\t);\n\n\t\t\t// If we're moving to another block, it means we're deleting blocks from\n\t\t\t// the original block, so we need to check if removing is possible.\n\t\t\tif ( ! canRemoveBlocks ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst canInsertBlocks = select.canInsertBlocks(\n\t\t\t\tclientIds,\n\t\t\t\ttoRootClientId\n\t\t\t);\n\n\t\t\t// If moving to other parent block, the move is possible if we can insert a block of the same type inside the new parent block.\n\t\t\tif ( ! canInsertBlocks ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'MOVE_BLOCKS_TO_POSITION',\n\t\t\tfromRootClientId,\n\t\t\ttoRootClientId,\n\t\t\tclientIds,\n\t\t\tindex,\n\t\t} );\n\t};\n\n/**\n * Action that moves given block to a new position.\n *\n * @param {?string} clientId         The client ID of the block.\n * @param {?string} fromRootClientId Root client ID source.\n * @param {?string} toRootClientId   Root client ID destination.\n * @param {number}  index            The index to move the block to.\n */\nexport function moveBlockToPosition(\n\tclientId,\n\tfromRootClientId = '',\n\ttoRootClientId = '',\n\tindex\n) {\n\treturn moveBlocksToPosition(\n\t\t[ clientId ],\n\t\tfromRootClientId,\n\t\ttoRootClientId,\n\t\tindex\n\t);\n}\n\n/**\n * Action that inserts a single block, optionally at a specific index respective a root block list.\n *\n * @param {Object}   block           Block object to insert.\n * @param {?number}  index           Index at which block should be inserted.\n * @param {?string}  rootClientId    Optional root client ID of block list on which to insert.\n * @param {?boolean} updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to true.\n * @param {?Object}  meta            Optional Meta values to be passed to the action object.\n *\n * @return {Object} Action object.\n */\nexport function insertBlock(\n\tblock,\n\tindex,\n\trootClientId,\n\tupdateSelection,\n\tmeta\n) {\n\treturn insertBlocks(\n\t\t[ block ],\n\t\tindex,\n\t\trootClientId,\n\t\tupdateSelection,\n\t\t0,\n\t\tmeta\n\t);\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Action that inserts an array of blocks, optionally at a specific index respective a root block list.\n *\n * @param {Object[]}  blocks          Block objects to insert.\n * @param {?number}   index           Index at which block should be inserted.\n * @param {?string}   rootClientId    Optional root client ID of block list on which to insert.\n * @param {?boolean}  updateSelection If true block selection will be updated.  If false, block selection will not change. Defaults to true.\n * @param {0|-1|null} initialPosition Initial focus position. Setting it to null prevent focusing the inserted block.\n * @param {?Object}   meta            Optional Meta values to be passed to the action object.\n * @return {Object} Action object.\n */\nexport const insertBlocks =\n\t(\n\t\tblocks,\n\t\tindex,\n\t\trootClientId,\n\t\tupdateSelection = true,\n\t\tinitialPosition = 0,\n\t\tmeta\n\t) =>\n\t( { select, dispatch } ) => {\n\t\t/* eslint-enable jsdoc/valid-types */\n\t\tif ( initialPosition !== null && typeof initialPosition === 'object' ) {\n\t\t\tmeta = initialPosition;\n\t\t\tinitialPosition = 0;\n\t\t\tdeprecated(\n\t\t\t\t\"meta argument in wp.data.dispatch('core/block-editor')\",\n\t\t\t\t{\n\t\t\t\t\tsince: '5.8',\n\t\t\t\t\thint: 'The meta argument is now the 6th argument of the function',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tblocks = getBlocksWithDefaultStylesApplied(\n\t\t\tcastArray( blocks ),\n\t\t\tselect.getSettings()\n\t\t);\n\t\tconst allowedBlocks = [];\n\t\tfor ( const block of blocks ) {\n\t\t\tconst isValid = select.canInsertBlockType(\n\t\t\t\tblock.name,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t\tif ( isValid ) {\n\t\t\t\tallowedBlocks.push( block );\n\t\t\t}\n\t\t}\n\t\tif ( allowedBlocks.length ) {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'INSERT_BLOCKS',\n\t\t\t\tblocks: allowedBlocks,\n\t\t\t\tindex,\n\t\t\t\trootClientId,\n\t\t\t\ttime: Date.now(),\n\t\t\t\tupdateSelection,\n\t\t\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\t\t\tmeta,\n\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Action that shows the insertion point.\n *\n * @param {?string} rootClientId      Optional root client ID of block list on\n *                                    which to insert.\n * @param {?number} index             Index at which block should be inserted.\n * @param {Object}  __unstableOptions Whether or not to show an inserter button.\n *\n * @return {Object} Action object.\n */\nexport function showInsertionPoint(\n\trootClientId,\n\tindex,\n\t__unstableOptions = {}\n) {\n\tconst { __unstableWithInserter } = __unstableOptions;\n\treturn {\n\t\ttype: 'SHOW_INSERTION_POINT',\n\t\trootClientId,\n\t\tindex,\n\t\t__unstableWithInserter,\n\t};\n}\n\n/**\n * Action that hides the insertion point.\n *\n * @return {Object} Action object.\n */\nexport function hideInsertionPoint() {\n\treturn {\n\t\ttype: 'HIDE_INSERTION_POINT',\n\t};\n}\n\n/**\n * Action that resets the template validity.\n *\n * @param {boolean} isValid template validity flag.\n *\n * @return {Object} Action object.\n */\nexport function setTemplateValidity( isValid ) {\n\treturn {\n\t\ttype: 'SET_TEMPLATE_VALIDITY',\n\t\tisValid,\n\t};\n}\n\n/**\n * Action that synchronizes the template with the list of blocks.\n *\n * @return {Object} Action object.\n */\nexport const synchronizeTemplate =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tdispatch( { type: 'SYNCHRONIZE_TEMPLATE' } );\n\t\tconst blocks = select.getBlocks();\n\t\tconst template = select.getTemplate();\n\t\tconst updatedBlockList = synchronizeBlocksWithTemplate(\n\t\t\tblocks,\n\t\t\ttemplate\n\t\t);\n\n\t\tdispatch.resetBlocks( updatedBlockList );\n\t};\n\n/**\n * Delete the current selection.\n *\n * @param {boolean} isForward\n */\nexport const __unstableDeleteSelection =\n\t( isForward ) =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst selectionAnchor = select.getSelectionStart();\n\t\tconst selectionFocus = select.getSelectionEnd();\n\n\t\tif ( selectionAnchor.clientId === selectionFocus.clientId ) return;\n\n\t\t// It's not mergeable if there's no rich text selection.\n\t\tif (\n\t\t\t! selectionAnchor.attributeKey ||\n\t\t\t! selectionFocus.attributeKey ||\n\t\t\ttypeof selectionAnchor.offset === 'undefined' ||\n\t\t\ttypeof selectionFocus.offset === 'undefined'\n\t\t)\n\t\t\treturn false;\n\n\t\tconst anchorRootClientId = select.getBlockRootClientId(\n\t\t\tselectionAnchor.clientId\n\t\t);\n\t\tconst focusRootClientId = select.getBlockRootClientId(\n\t\t\tselectionFocus.clientId\n\t\t);\n\n\t\t// It's not mergeable if the selection doesn't start and end in the same\n\t\t// block list. Maybe in the future it should be allowed.\n\t\tif ( anchorRootClientId !== focusRootClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst blockOrder = select.getBlockOrder( anchorRootClientId );\n\t\tconst anchorIndex = blockOrder.indexOf( selectionAnchor.clientId );\n\t\tconst focusIndex = blockOrder.indexOf( selectionFocus.clientId );\n\n\t\t// Reassign selection start and end based on order.\n\t\tlet selectionStart, selectionEnd;\n\n\t\tif ( anchorIndex > focusIndex ) {\n\t\t\tselectionStart = selectionFocus;\n\t\t\tselectionEnd = selectionAnchor;\n\t\t} else {\n\t\t\tselectionStart = selectionAnchor;\n\t\t\tselectionEnd = selectionFocus;\n\t\t}\n\n\t\tconst targetSelection = isForward ? selectionEnd : selectionStart;\n\t\tconst targetBlock = select.getBlock( targetSelection.clientId );\n\t\tconst targetBlockType = getBlockType( targetBlock.name );\n\n\t\tif ( ! targetBlockType.merge ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectionA = selectionStart;\n\t\tconst selectionB = selectionEnd;\n\n\t\tconst blockA = select.getBlock( selectionA.clientId );\n\t\tconst blockAType = getBlockType( blockA.name );\n\n\t\tconst blockB = select.getBlock( selectionB.clientId );\n\t\tconst blockBType = getBlockType( blockB.name );\n\n\t\tconst htmlA = blockA.attributes[ selectionA.attributeKey ];\n\t\tconst htmlB = blockB.attributes[ selectionB.attributeKey ];\n\n\t\tconst attributeDefinitionA =\n\t\t\tblockAType.attributes[ selectionA.attributeKey ];\n\t\tconst attributeDefinitionB =\n\t\t\tblockBType.attributes[ selectionB.attributeKey ];\n\n\t\tlet valueA = create( {\n\t\t\thtml: htmlA,\n\t\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t\t} );\n\t\tlet valueB = create( {\n\t\t\thtml: htmlB,\n\t\t\t...mapRichTextSettings( attributeDefinitionB ),\n\t\t} );\n\n\t\tvalueA = remove( valueA, selectionA.offset, valueA.text.length );\n\t\tvalueB = insert( valueB, START_OF_SELECTED_AREA, 0, selectionB.offset );\n\n\t\t// Clone the blocks so we don't manipulate the original.\n\t\tconst cloneA = cloneBlock( blockA, {\n\t\t\t[ selectionA.attributeKey ]: toHTMLString( {\n\t\t\t\tvalue: valueA,\n\t\t\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t\t\t} ),\n\t\t} );\n\t\tconst cloneB = cloneBlock( blockB, {\n\t\t\t[ selectionB.attributeKey ]: toHTMLString( {\n\t\t\t\tvalue: valueB,\n\t\t\t\t...mapRichTextSettings( attributeDefinitionB ),\n\t\t\t} ),\n\t\t} );\n\n\t\tconst followingBlock = isForward ? cloneA : cloneB;\n\n\t\t// We can only merge blocks with similar types\n\t\t// thus, we transform the block to merge first\n\t\tconst blocksWithTheSameType =\n\t\t\tblockA.name === blockB.name\n\t\t\t\t? [ followingBlock ]\n\t\t\t\t: switchToBlockType( followingBlock, targetBlockType.name );\n\n\t\t// If the block types can not match, do nothing\n\t\tif ( ! blocksWithTheSameType || ! blocksWithTheSameType.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet updatedAttributes;\n\n\t\tif ( isForward ) {\n\t\t\tconst blockToMerge = blocksWithTheSameType.pop();\n\t\t\tupdatedAttributes = targetBlockType.merge(\n\t\t\t\tblockToMerge.attributes,\n\t\t\t\tcloneB.attributes\n\t\t\t);\n\t\t} else {\n\t\t\tconst blockToMerge = blocksWithTheSameType.shift();\n\t\t\tupdatedAttributes = targetBlockType.merge(\n\t\t\t\tcloneA.attributes,\n\t\t\t\tblockToMerge.attributes\n\t\t\t);\n\t\t}\n\n\t\tconst newAttributeKey = retrieveSelectedAttribute( updatedAttributes );\n\n\t\tconst convertedHtml = updatedAttributes[ newAttributeKey ];\n\t\tconst convertedValue = create( {\n\t\t\thtml: convertedHtml,\n\t\t\t...mapRichTextSettings(\n\t\t\t\ttargetBlockType.attributes[ newAttributeKey ]\n\t\t\t),\n\t\t} );\n\t\tconst newOffset = convertedValue.text.indexOf( START_OF_SELECTED_AREA );\n\t\tconst newValue = remove( convertedValue, newOffset, newOffset + 1 );\n\t\tconst newHtml = toHTMLString( {\n\t\t\tvalue: newValue,\n\t\t\t...mapRichTextSettings(\n\t\t\t\ttargetBlockType.attributes[ newAttributeKey ]\n\t\t\t),\n\t\t} );\n\n\t\tupdatedAttributes[ newAttributeKey ] = newHtml;\n\n\t\tconst selectedBlockClientIds = select.getSelectedBlockClientIds();\n\t\tconst replacement = [\n\t\t\t...( isForward ? blocksWithTheSameType : [] ),\n\t\t\t{\n\t\t\t\t// Preserve the original client ID.\n\t\t\t\t...targetBlock,\n\t\t\t\tattributes: {\n\t\t\t\t\t...targetBlock.attributes,\n\t\t\t\t\t...updatedAttributes,\n\t\t\t\t},\n\t\t\t},\n\t\t\t...( isForward ? [] : blocksWithTheSameType ),\n\t\t];\n\n\t\tregistry.batch( () => {\n\t\t\tdispatch.selectionChange(\n\t\t\t\ttargetBlock.clientId,\n\t\t\t\tnewAttributeKey,\n\t\t\t\tnewOffset,\n\t\t\t\tnewOffset\n\t\t\t);\n\n\t\t\tdispatch.replaceBlocks(\n\t\t\t\tselectedBlockClientIds,\n\t\t\t\treplacement,\n\t\t\t\t0, // If we don't pass the `indexToSelect` it will default to the last block.\n\t\t\t\tselect.getSelectedBlocksInitialCaretPosition()\n\t\t\t);\n\t\t} );\n\t};\n\n/**\n * Split the current selection.\n */\nexport const __unstableSplitSelection =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst selectionAnchor = select.getSelectionStart();\n\t\tconst selectionFocus = select.getSelectionEnd();\n\n\t\tif ( selectionAnchor.clientId === selectionFocus.clientId ) return;\n\n\t\t// Can't split if the selection is not set.\n\t\tif (\n\t\t\t! selectionAnchor.attributeKey ||\n\t\t\t! selectionFocus.attributeKey ||\n\t\t\ttypeof selectionAnchor.offset === 'undefined' ||\n\t\t\ttypeof selectionFocus.offset === 'undefined'\n\t\t)\n\t\t\treturn;\n\n\t\tconst anchorRootClientId = select.getBlockRootClientId(\n\t\t\tselectionAnchor.clientId\n\t\t);\n\t\tconst focusRootClientId = select.getBlockRootClientId(\n\t\t\tselectionFocus.clientId\n\t\t);\n\n\t\t// It's not splittable if the selection doesn't start and end in the same\n\t\t// block list. Maybe in the future it should be allowed.\n\t\tif ( anchorRootClientId !== focusRootClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst blockOrder = select.getBlockOrder( anchorRootClientId );\n\t\tconst anchorIndex = blockOrder.indexOf( selectionAnchor.clientId );\n\t\tconst focusIndex = blockOrder.indexOf( selectionFocus.clientId );\n\n\t\t// Reassign selection start and end based on order.\n\t\tlet selectionStart, selectionEnd;\n\n\t\tif ( anchorIndex > focusIndex ) {\n\t\t\tselectionStart = selectionFocus;\n\t\t\tselectionEnd = selectionAnchor;\n\t\t} else {\n\t\t\tselectionStart = selectionAnchor;\n\t\t\tselectionEnd = selectionFocus;\n\t\t}\n\n\t\tconst selectionA = selectionStart;\n\t\tconst selectionB = selectionEnd;\n\n\t\tconst blockA = select.getBlock( selectionA.clientId );\n\t\tconst blockAType = getBlockType( blockA.name );\n\n\t\tconst blockB = select.getBlock( selectionB.clientId );\n\t\tconst blockBType = getBlockType( blockB.name );\n\n\t\tconst htmlA = blockA.attributes[ selectionA.attributeKey ];\n\t\tconst htmlB = blockB.attributes[ selectionB.attributeKey ];\n\n\t\tconst attributeDefinitionA =\n\t\t\tblockAType.attributes[ selectionA.attributeKey ];\n\t\tconst attributeDefinitionB =\n\t\t\tblockBType.attributes[ selectionB.attributeKey ];\n\n\t\tlet valueA = create( {\n\t\t\thtml: htmlA,\n\t\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t\t} );\n\t\tlet valueB = create( {\n\t\t\thtml: htmlB,\n\t\t\t...mapRichTextSettings( attributeDefinitionB ),\n\t\t} );\n\n\t\tvalueA = remove( valueA, selectionA.offset, valueA.text.length );\n\t\tvalueB = remove( valueB, 0, selectionB.offset );\n\n\t\tdispatch.replaceBlocks(\n\t\t\tselect.getSelectedBlockClientIds(),\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t// Preserve the original client ID.\n\t\t\t\t\t...blockA,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockA.attributes,\n\t\t\t\t\t\t[ selectionA.attributeKey ]: toHTMLString( {\n\t\t\t\t\t\t\tvalue: valueA,\n\t\t\t\t\t\t\t...mapRichTextSettings( attributeDefinitionA ),\n\t\t\t\t\t\t} ),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tcreateBlock( getDefaultBlockName() ),\n\t\t\t\t{\n\t\t\t\t\t// Preserve the original client ID.\n\t\t\t\t\t...blockB,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockB.attributes,\n\t\t\t\t\t\t[ selectionB.attributeKey ]: toHTMLString( {\n\t\t\t\t\t\t\tvalue: valueB,\n\t\t\t\t\t\t\t...mapRichTextSettings( attributeDefinitionB ),\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\t1, // If we don't pass the `indexToSelect` it will default to the last block.\n\t\t\tselect.getSelectedBlocksInitialCaretPosition()\n\t\t);\n\t};\n\n/**\n * Expand the selection to cover the entire blocks, removing partial selection.\n */\nexport const __unstableExpandSelection =\n\t() =>\n\t( { select, dispatch } ) => {\n\t\tconst selectionAnchor = select.getSelectionStart();\n\t\tconst selectionFocus = select.getSelectionEnd();\n\t\tdispatch.selectionChange( {\n\t\t\tstart: { clientId: selectionAnchor.clientId },\n\t\t\tend: { clientId: selectionFocus.clientId },\n\t\t} );\n\t};\n\n/**\n * Action that merges two blocks.\n *\n * @param {string} firstBlockClientId  Client ID of the first block to merge.\n * @param {string} secondBlockClientId Client ID of the second block to merge.\n */\nexport const mergeBlocks =\n\t( firstBlockClientId, secondBlockClientId ) =>\n\t( { registry, select, dispatch } ) => {\n\t\tconst blocks = [ firstBlockClientId, secondBlockClientId ];\n\t\tdispatch( { type: 'MERGE_BLOCKS', blocks } );\n\n\t\tconst [ clientIdA, clientIdB ] = blocks;\n\t\tconst blockA = select.getBlock( clientIdA );\n\t\tconst blockAType = getBlockType( blockA.name );\n\n\t\tif ( ! blockAType ) return;\n\n\t\tconst blockB = select.getBlock( clientIdB );\n\n\t\tif ( blockAType && ! blockAType.merge ) {\n\t\t\t// If there's no merge function defined, attempt merging inner\n\t\t\t// blocks.\n\t\t\tconst blocksWithTheSameType = switchToBlockType(\n\t\t\t\tblockB,\n\t\t\t\tblockAType.name\n\t\t\t);\n\t\t\t// Only focus the previous block if it's not mergeable.\n\t\t\tif ( blocksWithTheSameType?.length !== 1 ) {\n\t\t\t\tdispatch.selectBlock( blockA.clientId );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst [ blockWithSameType ] = blocksWithTheSameType;\n\t\t\tif ( blockWithSameType.innerBlocks.length < 1 ) {\n\t\t\t\tdispatch.selectBlock( blockA.clientId );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tregistry.batch( () => {\n\t\t\t\tdispatch.insertBlocks(\n\t\t\t\t\tblockWithSameType.innerBlocks,\n\t\t\t\t\tundefined,\n\t\t\t\t\tclientIdA\n\t\t\t\t);\n\t\t\t\tdispatch.removeBlock( clientIdB );\n\t\t\t\tdispatch.selectBlock(\n\t\t\t\t\tblockWithSameType.innerBlocks[ 0 ].clientId\n\t\t\t\t);\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\tconst blockBType = getBlockType( blockB.name );\n\t\tconst { clientId, attributeKey, offset } = select.getSelectionStart();\n\t\tconst selectedBlockType =\n\t\t\tclientId === clientIdA ? blockAType : blockBType;\n\t\tconst attributeDefinition =\n\t\t\tselectedBlockType.attributes[ attributeKey ];\n\t\tconst canRestoreTextSelection =\n\t\t\t( clientId === clientIdA || clientId === clientIdB ) &&\n\t\t\tattributeKey !== undefined &&\n\t\t\toffset !== undefined &&\n\t\t\t// We cannot restore text selection if the RichText identifier\n\t\t\t// is not a defined block attribute key. This can be the case if the\n\t\t\t// fallback intance ID is used to store selection (and no RichText\n\t\t\t// identifier is set), or when the identifier is wrong.\n\t\t\t!! attributeDefinition;\n\n\t\tif ( ! attributeDefinition ) {\n\t\t\tif ( typeof attributeKey === 'number' ) {\n\t\t\t\twindow.console.error(\n\t\t\t\t\t`RichText needs an identifier prop that is the block attribute key of the attribute it controls. Its type is expected to be a string, but was ${ typeof attributeKey }`\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\twindow.console.error(\n\t\t\t\t\t'The RichText identifier prop does not match any attributes defined by the block.'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Clone the blocks so we don't insert the character in a \"live\" block.\n\t\tconst cloneA = cloneBlock( blockA );\n\t\tconst cloneB = cloneBlock( blockB );\n\n\t\tif ( canRestoreTextSelection ) {\n\t\t\tconst selectedBlock = clientId === clientIdA ? cloneA : cloneB;\n\t\t\tconst html = selectedBlock.attributes[ attributeKey ];\n\t\t\tconst value = insert(\n\t\t\t\tcreate( {\n\t\t\t\t\thtml,\n\t\t\t\t\t...mapRichTextSettings( attributeDefinition ),\n\t\t\t\t} ),\n\t\t\t\tSTART_OF_SELECTED_AREA,\n\t\t\t\toffset,\n\t\t\t\toffset\n\t\t\t);\n\n\t\t\tselectedBlock.attributes[ attributeKey ] = toHTMLString( {\n\t\t\t\tvalue,\n\t\t\t\t...mapRichTextSettings( attributeDefinition ),\n\t\t\t} );\n\t\t}\n\n\t\t// We can only merge blocks with similar types\n\t\t// thus, we transform the block to merge first.\n\t\tconst blocksWithTheSameType =\n\t\t\tblockA.name === blockB.name\n\t\t\t\t? [ cloneB ]\n\t\t\t\t: switchToBlockType( cloneB, blockA.name );\n\n\t\t// If the block types can not match, do nothing.\n\t\tif ( ! blocksWithTheSameType || ! blocksWithTheSameType.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Calling the merge to update the attributes and remove the block to be merged.\n\t\tconst updatedAttributes = blockAType.merge(\n\t\t\tcloneA.attributes,\n\t\t\tblocksWithTheSameType[ 0 ].attributes\n\t\t);\n\n\t\tif ( canRestoreTextSelection ) {\n\t\t\tconst newAttributeKey =\n\t\t\t\tretrieveSelectedAttribute( updatedAttributes );\n\t\t\tconst convertedHtml = updatedAttributes[ newAttributeKey ];\n\t\t\tconst convertedValue = create( {\n\t\t\t\thtml: convertedHtml,\n\t\t\t\t...mapRichTextSettings(\n\t\t\t\t\tblockAType.attributes[ newAttributeKey ]\n\t\t\t\t),\n\t\t\t} );\n\t\t\tconst newOffset = convertedValue.text.indexOf(\n\t\t\t\tSTART_OF_SELECTED_AREA\n\t\t\t);\n\t\t\tconst newValue = remove( convertedValue, newOffset, newOffset + 1 );\n\t\t\tconst newHtml = toHTMLString( {\n\t\t\t\tvalue: newValue,\n\t\t\t\t...mapRichTextSettings(\n\t\t\t\t\tblockAType.attributes[ newAttributeKey ]\n\t\t\t\t),\n\t\t\t} );\n\n\t\t\tupdatedAttributes[ newAttributeKey ] = newHtml;\n\n\t\t\tdispatch.selectionChange(\n\t\t\t\tblockA.clientId,\n\t\t\t\tnewAttributeKey,\n\t\t\t\tnewOffset,\n\t\t\t\tnewOffset\n\t\t\t);\n\t\t}\n\n\t\tdispatch.replaceBlocks(\n\t\t\t[ blockA.clientId, blockB.clientId ],\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t...blockA,\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\t...blockA.attributes,\n\t\t\t\t\t\t...updatedAttributes,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t...blocksWithTheSameType.slice( 1 ),\n\t\t\t],\n\t\t\t0 // If we don't pass the `indexToSelect` it will default to the last block.\n\t\t);\n\t};\n\n/**\n * Yields action objects used in signalling that the blocks corresponding to\n * the set of specified client IDs are to be removed.\n *\n * @param {string|string[]} clientIds      Client IDs of blocks to remove.\n * @param {boolean}         selectPrevious True if the previous block should be\n *                                         selected when a block is removed.\n */\nexport const removeBlocks =\n\t( clientIds, selectPrevious = true ) =>\n\t( { select, dispatch } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclientIds = castArray( clientIds );\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst canRemoveBlocks = select.canRemoveBlocks(\n\t\t\tclientIds,\n\t\t\trootClientId\n\t\t);\n\n\t\tif ( ! canRemoveBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( selectPrevious ) {\n\t\t\tdispatch.selectPreviousBlock( clientIds[ 0 ] );\n\t\t}\n\n\t\tdispatch( { type: 'REMOVE_BLOCKS', clientIds } );\n\n\t\t// To avoid a focus loss when removing the last block, assure there is\n\t\t// always a default block if the last of the blocks have been removed.\n\t\tdispatch( ensureDefaultBlock() );\n\t};\n\n/**\n * Returns an action object used in signalling that the block with the\n * specified client ID is to be removed.\n *\n * @param {string}  clientId       Client ID of block to remove.\n * @param {boolean} selectPrevious True if the previous block should be\n *                                 selected when a block is removed.\n *\n * @return {Object} Action object.\n */\nexport function removeBlock( clientId, selectPrevious ) {\n\treturn removeBlocks( [ clientId ], selectPrevious );\n}\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Returns an action object used in signalling that the inner blocks with the\n * specified client ID should be replaced.\n *\n * @param {string}    rootClientId    Client ID of the block whose InnerBlocks will re replaced.\n * @param {Object[]}  blocks          Block objects to insert as new InnerBlocks\n * @param {?boolean}  updateSelection If true block selection will be updated. If false, block selection will not change. Defaults to false.\n * @param {0|-1|null} initialPosition Initial block position.\n * @return {Object} Action object.\n */\nexport function replaceInnerBlocks(\n\trootClientId,\n\tblocks,\n\tupdateSelection = false,\n\tinitialPosition = 0\n) {\n\t/* eslint-enable jsdoc/valid-types */\n\treturn {\n\t\ttype: 'REPLACE_INNER_BLOCKS',\n\t\trootClientId,\n\t\tblocks,\n\t\tupdateSelection,\n\t\tinitialPosition: updateSelection ? initialPosition : null,\n\t\ttime: Date.now(),\n\t};\n}\n\n/**\n * Returns an action object used to toggle the block editing mode between\n * visual and HTML modes.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {Object} Action object.\n */\nexport function toggleBlockMode( clientId ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_MODE',\n\t\tclientId,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to type.\n *\n * @return {Object} Action object.\n */\nexport function startTyping() {\n\treturn {\n\t\ttype: 'START_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped typing.\n *\n * @return {Object} Action object.\n */\nexport function stopTyping() {\n\treturn {\n\t\ttype: 'STOP_TYPING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has begun to drag blocks.\n *\n * @param {string[]} clientIds An array of client ids being dragged\n *\n * @return {Object} Action object.\n */\nexport function startDraggingBlocks( clientIds = [] ) {\n\treturn {\n\t\ttype: 'START_DRAGGING_BLOCKS',\n\t\tclientIds,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user has stopped dragging blocks.\n *\n * @return {Object} Action object.\n */\nexport function stopDraggingBlocks() {\n\treturn {\n\t\ttype: 'STOP_DRAGGING_BLOCKS',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the caret has entered formatted text.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function enterFormattedText() {\n\tdeprecated( 'wp.data.dispatch( \"core/block-editor\" ).enterFormattedText', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Returns an action object used in signalling that the user caret has exited formatted text.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function exitFormattedText() {\n\tdeprecated( 'wp.data.dispatch( \"core/block-editor\" ).exitFormattedText', {\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t} );\n\treturn {\n\t\ttype: 'DO_NOTHING',\n\t};\n}\n\n/**\n * Action that changes the position of the user caret.\n *\n * @param {string|WPSelection} clientId     The selected block client ID.\n * @param {string}             attributeKey The selected block attribute key.\n * @param {number}             startOffset  The start offset.\n * @param {number}             endOffset    The end offset.\n *\n * @return {Object} Action object.\n */\nexport function selectionChange(\n\tclientId,\n\tattributeKey,\n\tstartOffset,\n\tendOffset\n) {\n\tif ( typeof clientId === 'string' ) {\n\t\treturn {\n\t\t\ttype: 'SELECTION_CHANGE',\n\t\t\tclientId,\n\t\t\tattributeKey,\n\t\t\tstartOffset,\n\t\t\tendOffset,\n\t\t};\n\t}\n\n\treturn { type: 'SELECTION_CHANGE', ...clientId };\n}\n\n/**\n * Action that adds a new block of the default type to the block list.\n *\n * @param {?Object} attributes   Optional attributes of the block to assign.\n * @param {?string} rootClientId Optional root client ID of block list on which\n *                               to append.\n * @param {?number} index        Optional index where to insert the default block.\n */\nexport const insertDefaultBlock =\n\t( attributes, rootClientId, index ) =>\n\t( { dispatch } ) => {\n\t\t// Abort if there is no default block type (if it has been unregistered).\n\t\tconst defaultBlockName = getDefaultBlockName();\n\t\tif ( ! defaultBlockName ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst block = createBlock( defaultBlockName, attributes );\n\n\t\treturn dispatch.insertBlock( block, index, rootClientId );\n\t};\n\n/**\n * Action that changes the nested settings of a given block.\n *\n * @param {string} clientId Client ID of the block whose nested setting are\n *                          being received.\n * @param {Object} settings Object with the new settings for the nested block.\n *\n * @return {Object} Action object\n */\nexport function updateBlockListSettings( clientId, settings ) {\n\treturn {\n\t\ttype: 'UPDATE_BLOCK_LIST_SETTINGS',\n\t\tclientId,\n\t\tsettings,\n\t};\n}\n\n/**\n * Action that updates the block editor settings.\n *\n * @param {Object} settings Updated settings\n *\n * @return {Object} Action object\n */\nexport function updateSettings( settings ) {\n\treturn {\n\t\ttype: 'UPDATE_SETTINGS',\n\t\tsettings,\n\t};\n}\n\n/**\n * Action that signals that a temporary reusable block has been saved\n * in order to switch its temporary id with the real id.\n *\n * @param {string} id        Reusable block's id.\n * @param {string} updatedId Updated block's id.\n *\n * @return {Object} Action object.\n */\nexport function __unstableSaveReusableBlock( id, updatedId ) {\n\treturn {\n\t\ttype: 'SAVE_REUSABLE_BLOCK_SUCCESS',\n\t\tid,\n\t\tupdatedId,\n\t};\n}\n\n/**\n * Action that marks the last block change explicitly as persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkLastChangeAsPersistent() {\n\treturn { type: 'MARK_LAST_CHANGE_AS_PERSISTENT' };\n}\n\n/**\n * Action that signals that the next block change should be marked explicitly as not persistent.\n *\n * @return {Object} Action object.\n */\nexport function __unstableMarkNextChangeAsNotPersistent() {\n\treturn { type: 'MARK_NEXT_CHANGE_AS_NOT_PERSISTENT' };\n}\n\n/**\n * Action that marks the last block change as an automatic change, meaning it was not\n * performed by the user, and can be undone using the `Escape` and `Backspace` keys.\n * This action must be called after the change was made, and any actions that are a\n * consequence of it, so it is recommended to be called at the next idle period to ensure all\n * selection changes have been recorded.\n */\nexport const __unstableMarkAutomaticChange =\n\t() =>\n\t( { dispatch } ) => {\n\t\tdispatch( { type: 'MARK_AUTOMATIC_CHANGE' } );\n\t\tconst { requestIdleCallback = ( cb ) => setTimeout( cb, 100 ) } =\n\t\t\twindow;\n\t\trequestIdleCallback( () => {\n\t\t\tdispatch( { type: 'MARK_AUTOMATIC_CHANGE_FINAL' } );\n\t\t} );\n\t};\n\n/**\n * Action that enables or disables the navigation mode.\n *\n * @param {boolean} isNavigationMode Enable/Disable navigation mode.\n */\nexport const setNavigationMode =\n\t( isNavigationMode = true ) =>\n\t( { dispatch } ) => {\n\t\tdispatch.__unstableSetEditorMode(\n\t\t\tisNavigationMode ? 'navigation' : 'edit'\n\t\t);\n\t};\n\n/**\n * Action that sets the editor mode\n *\n * @param {string} mode Editor mode\n */\nexport const __unstableSetEditorMode =\n\t( mode ) =>\n\t( { dispatch, select } ) => {\n\t\t// When switching to zoom-out mode, we need to select the root block\n\t\tif ( mode === 'zoom-out' ) {\n\t\t\tconst firstSelectedClientId = select.getBlockSelectionStart();\n\t\t\tif ( firstSelectedClientId ) {\n\t\t\t\tdispatch.selectBlock(\n\t\t\t\t\tselect.getBlockHierarchyRootClientId(\n\t\t\t\t\t\tfirstSelectedClientId\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tdispatch( { type: 'SET_EDITOR_MODE', mode } );\n\n\t\tif ( mode === 'navigation' ) {\n\t\t\tspeak(\n\t\t\t\t__(\n\t\t\t\t\t'You are currently in navigation mode. Navigate blocks using the Tab key and Arrow keys. Use Left and Right Arrow keys to move between nesting levels. To exit navigation mode and edit the selected block, press Enter.'\n\t\t\t\t)\n\t\t\t);\n\t\t} else if ( mode === 'edit' ) {\n\t\t\tspeak(\n\t\t\t\t__(\n\t\t\t\t\t'You are currently in edit mode. To return to the navigation mode, press Escape.'\n\t\t\t\t)\n\t\t\t);\n\t\t} else if ( mode === 'zoom-out' ) {\n\t\t\tspeak( __( 'You are currently in zoom-out mode.' ) );\n\t\t}\n\t};\n\n/**\n * Action that enables or disables the block moving mode.\n *\n * @param {string|null} hasBlockMovingClientId Enable/Disable block moving mode.\n */\nexport const setBlockMovingClientId =\n\t( hasBlockMovingClientId = null ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( { type: 'SET_BLOCK_MOVING_MODE', hasBlockMovingClientId } );\n\n\t\tif ( hasBlockMovingClientId ) {\n\t\t\tspeak(\n\t\t\t\t__(\n\t\t\t\t\t'Use the Tab key and Arrow keys to choose new block location. Use Left and Right Arrow keys to move between nesting levels. Once location is selected press Enter or Space to move the block.'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t};\n\n/**\n * Action that duplicates a list of blocks.\n *\n * @param {string[]} clientIds\n * @param {boolean}  updateSelection\n */\nexport const duplicateBlocks =\n\t( clientIds, updateSelection = true ) =>\n\t( { select, dispatch } ) => {\n\t\tif ( ! clientIds || ! clientIds.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return early if blocks don't exist.\n\t\tconst blocks = select.getBlocksByClientId( clientIds );\n\t\tif ( blocks.some( ( block ) => ! block ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Return early if blocks don't support multiple usage.\n\t\tconst blockNames = blocks.map( ( block ) => block.name );\n\t\tif (\n\t\t\tblockNames.some(\n\t\t\t\t( blockName ) =>\n\t\t\t\t\t! hasBlockSupport( blockName, 'multiple', true )\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rootClientId = select.getBlockRootClientId( clientIds[ 0 ] );\n\t\tconst clientIdsArray = castArray( clientIds );\n\t\tconst lastSelectedIndex = select.getBlockIndex(\n\t\t\tclientIdsArray[ clientIdsArray.length - 1 ]\n\t\t);\n\t\tconst clonedBlocks = blocks.map( ( block ) =>\n\t\t\t__experimentalCloneSanitizedBlock( block )\n\t\t);\n\t\tdispatch.insertBlocks(\n\t\t\tclonedBlocks,\n\t\t\tlastSelectedIndex + 1,\n\t\t\trootClientId,\n\t\t\tupdateSelection\n\t\t);\n\t\tif ( clonedBlocks.length > 1 && updateSelection ) {\n\t\t\tdispatch.multiSelect(\n\t\t\t\tclonedBlocks[ 0 ].clientId,\n\t\t\t\tclonedBlocks[ clonedBlocks.length - 1 ].clientId\n\t\t\t);\n\t\t}\n\t\treturn clonedBlocks.map( ( block ) => block.clientId );\n\t};\n\n/**\n * Action that inserts an empty block before a given block.\n *\n * @param {string} clientId\n */\nexport const insertBeforeBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tif ( ! clientId ) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootClientId = select.getBlockRootClientId( clientId );\n\t\tconst isLocked = select.getTemplateLock( rootClientId );\n\t\tif ( isLocked ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst firstSelectedIndex = select.getBlockIndex( clientId );\n\t\treturn dispatch.insertDefaultBlock(\n\t\t\t{},\n\t\t\trootClientId,\n\t\t\tfirstSelectedIndex\n\t\t);\n\t};\n\n/**\n * Action that inserts an empty block after a given block.\n *\n * @param {string} clientId\n */\nexport const insertAfterBlock =\n\t( clientId ) =>\n\t( { select, dispatch } ) => {\n\t\tif ( ! clientId ) {\n\t\t\treturn;\n\t\t}\n\t\tconst rootClientId = select.getBlockRootClientId( clientId );\n\t\tconst isLocked = select.getTemplateLock( rootClientId );\n\t\tif ( isLocked ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst firstSelectedIndex = select.getBlockIndex( clientId );\n\t\treturn dispatch.insertDefaultBlock(\n\t\t\t{},\n\t\t\trootClientId,\n\t\t\tfirstSelectedIndex + 1\n\t\t);\n\t};\n\n/**\n * Action that toggles the highlighted block state.\n *\n * @param {string}  clientId      The block's clientId.\n * @param {boolean} isHighlighted The highlight state.\n */\nexport function toggleBlockHighlight( clientId, isHighlighted ) {\n\treturn {\n\t\ttype: 'TOGGLE_BLOCK_HIGHLIGHT',\n\t\tclientId,\n\t\tisHighlighted,\n\t};\n}\n\n/**\n * Action that \"flashes\" the block with a given `clientId` by rhythmically highlighting it.\n *\n * @param {string} clientId Target block client ID.\n */\nexport const flashBlock =\n\t( clientId ) =>\n\tasync ( { dispatch } ) => {\n\t\tdispatch( toggleBlockHighlight( clientId, true ) );\n\t\tawait new Promise( ( resolve ) => setTimeout( resolve, 150 ) );\n\t\tdispatch( toggleBlockHighlight( clientId, false ) );\n\t};\n\n/**\n * Action that sets whether a block has controlled inner blocks.\n *\n * @param {string}  clientId                 The block's clientId.\n * @param {boolean} hasControlledInnerBlocks True if the block's inner blocks are controlled.\n */\nexport function setHasControlledInnerBlocks(\n\tclientId,\n\thasControlledInnerBlocks\n) {\n\treturn {\n\t\ttype: 'SET_HAS_CONTROLLED_INNER_BLOCKS',\n\t\thasControlledInnerBlocks,\n\t\tclientId,\n\t};\n}\n\n/**\n * Action that sets whether given blocks are visible on the canvas.\n *\n * @param {Record<string,boolean>} updates For each block's clientId, its new visibility setting.\n */\nexport function setBlockVisibility( updates ) {\n\treturn {\n\t\ttype: 'SET_BLOCK_VISIBILITY',\n\t\tupdates,\n\t};\n}\n\n/**\n * Action that sets whether a block is being temporaritly edited as blocks.\n *\n * @param {?string} temporarilyEditingAsBlocks The block's clientId being temporaritly edited as blocks.\n */\nexport function __unstableSetTemporarilyEditingAsBlocks(\n\ttemporarilyEditingAsBlocks\n) {\n\treturn {\n\t\ttype: 'SET_TEMPORARILY_EDITING_AS_BLOCKS',\n\t\ttemporarilyEditingAsBlocks,\n\t};\n}\n","export const STORE_NAME = 'core/block-editor';\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, registerStore } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as selectors from './selectors';\nimport * as actions from './actions';\nimport { STORE_NAME } from './constants';\n\n/**\n * Block 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 block 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\tpersist: [ 'preferences' ],\n} );\n\n// Ideally we'd use register instead of register stores.\nregisterStore( STORE_NAME, {\n\t...storeConfig,\n\tpersist: [ 'preferences' ],\n} );\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const DEFAULT_BLOCK_EDIT_CONTEXT = {\n\tname: '',\n\tisSelected: false,\n};\n\nconst Context = createContext( DEFAULT_BLOCK_EDIT_CONTEXT );\nconst { Provider } = Context;\n\nexport { Provider as BlockEditContextProvider };\n\n/**\n * A hook that returns the block edit context.\n *\n * @return {Object} Block edit context\n */\nexport function useBlockEditContext() {\n\treturn useContext( Context );\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useDisplayBlockControls() {\n\tconst { isSelected, clientId, name } = useBlockEditContext();\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( isSelected ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tisFirstMultiSelectedBlock,\n\t\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tif ( isFirstMultiSelectedBlock( clientId ) ) {\n\t\t\t\treturn getMultiSelectedBlockClientIds().every(\n\t\t\t\t\t( id ) => getBlockName( id ) === name\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t},\n\t\t[ clientId, isSelected, name ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalStyleProvider as StyleProvider,\n\t__experimentalToolbarContext as ToolbarContext,\n\tToolbarGroup,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useBlockControlsFill from './hook';\n\nexport default function BlockControlsFill( {\n\tgroup = 'default',\n\tcontrols,\n\tchildren,\n\t__experimentalShareWithChildBlocks = false,\n} ) {\n\tconst Fill = useBlockControlsFill(\n\t\tgroup,\n\t\t__experimentalShareWithChildBlocks\n\t);\n\tif ( ! Fill ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill>\n\t\t\t\t{ ( fillProps ) => {\n\t\t\t\t\t// Children passed to BlockControlsFill will not have access to any\n\t\t\t\t\t// React Context whose Provider is part of the BlockControlsSlot tree.\n\t\t\t\t\t// So we re-create the Provider in this subtree.\n\t\t\t\t\tconst value = ! isEmpty( fillProps ) ? fillProps : null;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ToolbarContext.Provider value={ value }>\n\t\t\t\t\t\t\t{ group === 'default' && (\n\t\t\t\t\t\t\t\t<ToolbarGroup controls={ controls } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</ToolbarContext.Provider>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Fill>\n\t\t</StyleProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport groups from './groups';\nimport { store as blockEditorStore } from '../../store';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useDisplayBlockControls from '../use-display-block-controls';\n\nexport default function useBlockControlsFill( group, shareWithChildBlocks ) {\n\tconst isDisplayed = useDisplayBlockControls();\n\tconst { clientId } = useBlockEditContext();\n\tconst isParentDisplayed = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { hasBlockSupport } = select( blocksStore );\n\t\t\treturn (\n\t\t\t\tshareWithChildBlocks &&\n\t\t\t\thasBlockSupport(\n\t\t\t\t\tgetBlockName( clientId ),\n\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\tfalse\n\t\t\t\t) &&\n\t\t\t\thasSelectedInnerBlock( clientId )\n\t\t\t);\n\t\t},\n\t\t[ shareWithChildBlocks, clientId ]\n\t);\n\n\tif ( isDisplayed ) {\n\t\treturn groups[ group ]?.Fill;\n\t}\n\tif ( isParentDisplayed ) {\n\t\treturn groups.parent.Fill;\n\t}\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport {\n\t__experimentalToolbarContext as ToolbarContext,\n\tToolbarGroup,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport groups from './groups';\n\nexport default function BlockControlsSlot( { group = 'default', ...props } ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\tconst Slot = groups[ group ].Slot;\n\tconst fills = useSlotFills( Slot.__unstableName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn null;\n\t}\n\n\tif ( group === 'default' ) {\n\t\treturn (\n\t\t\t<Slot\n\t\t\t\t{ ...props }\n\t\t\t\tbubblesVirtually\n\t\t\t\tfillProps={ accessibleToolbarState }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<Slot\n\t\t\t\t{ ...props }\n\t\t\t\tbubblesVirtually\n\t\t\t\tfillProps={ accessibleToolbarState }\n\t\t\t/>\n\t\t</ToolbarGroup>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport BlockControlsFill from './fill';\nimport BlockControlsSlot from './slot';\n\nconst BlockControls = BlockControlsFill;\n\nBlockControls.Slot = BlockControlsSlot;\n\n// This is just here for backward compatibility.\nexport const BlockFormatControls = ( props ) => {\n\treturn <BlockControlsFill group=\"inline\" { ...props } />;\n};\nBlockFormatControls.Slot = ( props ) => {\n\treturn <BlockControlsSlot group=\"inline\" { ...props } />;\n};\n\nexport default BlockControls;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst justifyLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 9v6h11V9H9zM4 20h1.5V4H4v16z\" />\n\t</SVG>\n);\n\nexport default justifyLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst justifyCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 9h-7.2V4h-1.6v5H4v6h7.2v5h1.6v-5H20z\" />\n\t</SVG>\n);\n\nexport default justifyCenter;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst justifyRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 15h11V9H4v6zM18.5 4v16H20V4h-1.5z\" />\n\t</SVG>\n);\n\nexport default justifyRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst justifySpaceBetween = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 15h6V9H9v6zm-5 5h1.5V4H4v16zM18.5 4v16H20V4h-1.5z\" />\n\t</SVG>\n);\n\nexport default justifySpaceBetween;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.3 6.7l-1.1 1.1 4 4H4v1.5h13.3l-4.1 4.4 1.1 1.1 5.8-6.3z\" />\n\t</SVG>\n);\n\nexport default arrowRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowDown = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.2 13.2l-4 4V4h-1.5v13.3l-4.5-4.1-1 1.1 6.2 5.8 5.8-5.8-1-1.1z\" />\n\t</SVG>\n);\n\nexport default arrowDown;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Utility to generate the proper CSS selector for layout styles.\n *\n * @param {string} selectors CSS selector, also supports multiple comma-separated selectors.\n * @param {string} append    The string to append.\n *\n * @return {string} - CSS selector.\n */\nexport function appendSelectors( selectors, append = '' ) {\n\t// Ideally we shouldn't need the `.editor-styles-wrapper` increased specificity here\n\t// The problem though is that we have a `.editor-styles-wrapper p { margin: reset; }` style\n\t// it's used to reset the default margin added by wp-admin to paragraphs\n\t// so we need this to be higher speficity otherwise, it won't be applied to paragraphs inside containers\n\t// When the post editor is fully iframed, this extra classname could be removed.\n\n\treturn selectors\n\t\t.split( ',' )\n\t\t.map(\n\t\t\t( subselector ) =>\n\t\t\t\t`.editor-styles-wrapper ${ subselector }${\n\t\t\t\t\tappend ? ` ${ append }` : ''\n\t\t\t\t}`\n\t\t)\n\t\t.join( ',' );\n}\n\n/**\n * Get generated blockGap CSS rules based on layout definitions provided in theme.json\n * Falsy values in the layout definition's spacingStyles rules will be swapped out\n * with the provided `blockGapValue`.\n *\n * @param {string} selector          The CSS selector to target for the generated rules.\n * @param {Object} layoutDefinitions Layout definitions object from theme.json.\n * @param {string} layoutType        The layout type (e.g. `default` or `flex`).\n * @param {string} blockGapValue     The current blockGap value to be applied.\n * @return {string} The generated CSS rules.\n */\nexport function getBlockGapCSS(\n\tselector,\n\tlayoutDefinitions,\n\tlayoutType,\n\tblockGapValue\n) {\n\tlet output = '';\n\tif (\n\t\tlayoutDefinitions?.[ layoutType ]?.spacingStyles?.length &&\n\t\tblockGapValue\n\t) {\n\t\tlayoutDefinitions[ layoutType ].spacingStyles.forEach( ( gapStyle ) => {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\tgapStyle.selector.trim()\n\t\t\t) } { `;\n\t\t\toutput += Object.entries( gapStyle.rules )\n\t\t\t\t.map(\n\t\t\t\t\t( [ cssProperty, value ] ) =>\n\t\t\t\t\t\t`${ cssProperty }: ${ value ? value : blockGapValue }`\n\t\t\t\t)\n\t\t\t\t.join( '; ' );\n\t\t\toutput += '; }';\n\t\t} );\n\t}\n\treturn output;\n}\n\n/**\n * Helper method to assign contextual info to clarify\n * alignment settings.\n *\n * Besides checking if `contentSize` and `wideSize` have a\n * value, we now show this information only if their values\n * are not a `css var`. This needs to change when parsing\n * css variables land.\n *\n * @see https://github.com/WordPress/gutenberg/pull/34710#issuecomment-918000752\n *\n * @param {Object} layout The layout object.\n * @return {Object} An object with contextual info per alignment.\n */\nexport function getAlignmentsInfo( layout ) {\n\tconst { contentSize, wideSize } = layout;\n\tconst alignmentInfo = {};\n\tconst sizeRegex = /^(?!0)\\d+(px|em|rem|vw|vh|%)?$/i;\n\tif ( sizeRegex.test( contentSize ) ) {\n\t\t// translators: %s: container size (i.e. 600px etc)\n\t\talignmentInfo.none = sprintf( __( 'Max %s wide' ), contentSize );\n\t}\n\tif ( sizeRegex.test( wideSize ) ) {\n\t\t// translators: %s: container size (i.e. 600px etc)\n\t\talignmentInfo.wide = sprintf( __( 'Max %s wide' ), wideSize );\n\t}\n\treturn alignmentInfo;\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useMemo } from '@wordpress/element';\n\nexport const BlockRefs = createContext( {\n\trefs: new Map(),\n\tcallbacks: new Map(),\n} );\n\nexport function BlockRefsProvider( { children } ) {\n\tconst value = useMemo(\n\t\t() => ( { refs: new Map(), callbacks: new Map() } ),\n\t\t[]\n\t);\n\treturn (\n\t\t<BlockRefs.Provider value={ value }>{ children }</BlockRefs.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { BlockRefs } from '../../provider/block-refs-provider';\n\n/** @typedef {import('@wordpress/element').RefCallback} RefCallback */\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Provides a ref to the BlockRefs context.\n *\n * @param {string} clientId The client ID of the element ref.\n *\n * @return {RefCallback} Ref callback.\n */\nexport function useBlockRefProvider( clientId ) {\n\tconst { refs, callbacks } = useContext( BlockRefs );\n\tconst ref = useRef();\n\tuseLayoutEffect( () => {\n\t\trefs.set( ref, clientId );\n\t\treturn () => {\n\t\t\trefs.delete( ref );\n\t\t};\n\t}, [ clientId ] );\n\treturn useRefEffect(\n\t\t( element ) => {\n\t\t\t// Update the ref in the provider.\n\t\t\tref.current = element;\n\t\t\t// Call any update functions.\n\t\t\tcallbacks.forEach( ( id, setElement ) => {\n\t\t\t\tif ( clientId === id ) {\n\t\t\t\t\tsetElement( element );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n\n/**\n * Gets a ref pointing to the current block element. Continues to return a\n * stable ref even if the block client ID changes.\n *\n * @param {string} clientId The client ID to get a ref for.\n *\n * @return {RefObject} A ref containing the element.\n */\nfunction useBlockRef( clientId ) {\n\tconst { refs } = useContext( BlockRefs );\n\tconst freshClientId = useRef();\n\tfreshClientId.current = clientId;\n\t// Always return an object, even if no ref exists for a given client ID, so\n\t// that `current` works at a later point.\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tget current() {\n\t\t\t\tlet element = null;\n\n\t\t\t\t// Multiple refs may be created for a single block. Find the\n\t\t\t\t// first that has an element set.\n\t\t\t\tfor ( const [ ref, id ] of refs.entries() ) {\n\t\t\t\t\tif ( id === freshClientId.current && ref.current ) {\n\t\t\t\t\t\telement = ref.current;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn element;\n\t\t\t},\n\t\t} ),\n\t\t[]\n\t);\n}\n\n/**\n * Return the element for a given client ID. Updates whenever the element\n * changes, becomes available, or disappears.\n *\n * @param {string} clientId The client ID to an element for.\n *\n * @return {Element|null} The block's wrapper element.\n */\nfunction useBlockElement( clientId ) {\n\tconst { callbacks } = useContext( BlockRefs );\n\tconst ref = useBlockRef( clientId );\n\tconst [ element, setElement ] = useState( null );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! clientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\tcallbacks.set( setElement, clientId );\n\t\treturn () => {\n\t\t\tcallbacks.delete( setElement );\n\t\t};\n\t}, [ clientId ] );\n\n\treturn ref.current || element;\n}\n\nexport { useBlockRef as __unstableUseBlockRef };\nexport { useBlockElement as __unstableUseBlockElement };\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Checks is given value is a spacing preset.\n *\n * @param {string} value Value to check\n *\n * @return {boolean} Return true if value is string in format var:preset|spacing|.\n */\nexport function isValueSpacingPreset( value ) {\n\tif ( ! value?.includes ) {\n\t\treturn false;\n\t}\n\treturn value === '0' || value.includes( 'var:preset|spacing|' );\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value        Value to convert\n * @param {Array}  spacingSizes Array of the current spacing preset objects\n *\n * @return {string} Mapping of the spacing preset to its equivalent custom value.\n */\nexport function getCustomValueFromPreset( value, spacingSizes ) {\n\tif ( ! isValueSpacingPreset( value ) ) {\n\t\treturn value;\n\t}\n\n\tconst slug = getSpacingPresetSlug( value );\n\tconst spacingSize = spacingSizes.find(\n\t\t( size ) => String( size.slug ) === slug\n\t);\n\n\treturn spacingSize?.size;\n}\n\n/**\n * Converts a custom value to preset value if one can be found.\n *\n * Returns value as-is if no match is found.\n *\n * @param {string} value        Value to convert\n * @param {Array}  spacingSizes Array of the current spacing preset objects\n *\n * @return {string} The preset value if it can be found.\n */\nexport function getPresetValueFromCustomValue( value, spacingSizes ) {\n\t// Return value as-is if it is already a preset;\n\tif ( isValueSpacingPreset( value ) ) {\n\t\treturn value;\n\t}\n\n\tconst spacingMatch = spacingSizes.find(\n\t\t( size ) => String( size.size ) === String( value )\n\t);\n\n\tif ( spacingMatch?.slug ) {\n\t\treturn `var:preset|spacing|${ spacingMatch.slug }`;\n\t}\n\n\treturn value;\n}\n\n/**\n * Converts a spacing preset into a custom value.\n *\n * @param {string} value Value to convert.\n *\n * @return {string} CSS var string for given spacing preset value.\n */\nexport function getSpacingPresetCssVar( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\tif ( ! slug ) {\n\t\treturn value;\n\t}\n\n\treturn `var(--wp--preset--spacing--${ slug[ 1 ] })`;\n}\n\n/**\n * Returns the slug section of the given spacing preset string.\n *\n * @param {string} value Value to extract slug from.\n *\n * @return {number} The int value of the slug from given spacing preset.\n */\nexport function getSpacingPresetSlug( value ) {\n\tif ( ! value ) {\n\t\treturn;\n\t}\n\n\tif ( value === '0' || value === 'default' ) {\n\t\treturn value;\n\t}\n\n\tconst slug = value.match( /var:preset\\|spacing\\|(.+)/ );\n\n\treturn slug ? slug[ 1 ] : undefined;\n}\n\n/**\n * Converts spacing preset value into a Range component value .\n *\n * @param {string} presetValue  Value to convert to Range value.\n * @param {Array}  spacingSizes Array of current spacing preset value objects.\n *\n * @return {number} The int value for use in Range control.\n */\nexport function getSliderValueFromPreset( presetValue, spacingSizes ) {\n\tif ( presetValue === undefined ) {\n\t\treturn 0;\n\t}\n\tconst slug =\n\t\tparseFloat( presetValue, 10 ) === 0\n\t\t\t? '0'\n\t\t\t: getSpacingPresetSlug( presetValue );\n\tconst sliderValue = spacingSizes.findIndex( ( spacingSize ) => {\n\t\treturn String( spacingSize.slug ) === slug;\n\t} );\n\n\t// Returning NaN rather than undefined as undefined makes range control thumb sit in center\n\treturn sliderValue !== -1 ? sliderValue : NaN;\n}\n\nexport const LABELS = {\n\tall: __( 'All sides' ),\n\ttop: __( 'Top' ),\n\tbottom: __( 'Bottom' ),\n\tleft: __( 'Left' ),\n\tright: __( 'Right' ),\n\tmixed: __( 'Mixed' ),\n\tvertical: __( 'Vertical' ),\n\thorizontal: __( 'Horizontal' ),\n};\n\nexport const DEFAULT_VALUES = {\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];\n\n/**\n * Gets an items with the most occurrence within an array\n * https://stackoverflow.com/a/20762713\n *\n * @param {Array<any>} arr Array of items to check.\n * @return {any} The item with the most occurrences.\n */\nfunction mode( arr ) {\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tarr.filter( ( v ) => v === a ).length -\n\t\t\t\tarr.filter( ( v ) => v === b ).length\n\t\t)\n\t\t.pop();\n}\n\n/**\n * Gets the 'all' input value from values data.\n *\n * @param {Object} values Box spacing values\n *\n * @return {string} The most common value from all sides of box.\n */\nexport function getAllRawValue( values = {} ) {\n\treturn mode( Object.values( values ) );\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Box values.\n * @param {Array}  sides  Sides that values relate to.\n *\n * @return {boolean} Whether values are mixed.\n */\nexport function isValuesMixed( values = {}, sides = ALL_SIDES ) {\n\treturn (\n\t\t( Object.values( values ).length >= 1 &&\n\t\t\tObject.values( values ).length < sides.length ) ||\n\t\tnew Set( Object.values( values ) ).size > 1\n\t);\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Box values.\n *\n * @return {boolean} Whether values are defined.\n */\nexport function isValuesDefined( values ) {\n\tif ( values === undefined || values === null ) {\n\t\treturn false;\n\t}\n\treturn ! isEmpty( Object.values( values ).filter( ( value ) => !! value ) );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst settings = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.5 13.8c-1.1 0-2.1.7-2.4 1.8H4V17h8.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20v-1.5h-3.1c-.3-1-1.3-1.7-2.4-1.7zM11.9 7c-.3-1-1.3-1.8-2.4-1.8S7.4 6 7.1 7H4v1.5h3.1c.3 1 1.3 1.8 2.4 1.8s2.1-.7 2.4-1.8H20V7h-8.1z\" />\n\t</SVG>\n);\n\nexport default settings;\n","/**\n * External dependencies\n */\nimport { get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__EXPERIMENTAL_PATHS_WITH_MERGE as PATHS_WITH_MERGE,\n\thasBlockSupport,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit';\nimport { store as blockEditorStore } from '../../store';\n\nconst blockedPaths = [ 'color', 'border', 'typography', 'spacing' ];\n\nconst deprecatedFlags = {\n\t'color.palette': ( settings ) => settings.colors,\n\t'color.gradients': ( settings ) => settings.gradients,\n\t'color.custom': ( settings ) =>\n\t\tsettings.disableCustomColors === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomColors,\n\t'color.customGradient': ( settings ) =>\n\t\tsettings.disableCustomGradients === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomGradients,\n\t'typography.fontSizes': ( settings ) => settings.fontSizes,\n\t'typography.customFontSize': ( settings ) =>\n\t\tsettings.disableCustomFontSizes === undefined\n\t\t\t? undefined\n\t\t\t: ! settings.disableCustomFontSizes,\n\t'typography.lineHeight': ( settings ) => settings.enableCustomLineHeight,\n\t'spacing.units': ( settings ) => {\n\t\tif ( settings.enableCustomUnits === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( settings.enableCustomUnits === true ) {\n\t\t\treturn [ 'px', 'em', 'rem', 'vh', 'vw', '%' ];\n\t\t}\n\n\t\treturn settings.enableCustomUnits;\n\t},\n\t'spacing.padding': ( settings ) => settings.enableCustomSpacing,\n};\n\nconst prefixedFlags = {\n\t/*\n\t * These were only available in the plugin\n\t * and can be removed when the minimum WordPress version\n\t * for the plugin is 5.9.\n\t */\n\t'border.customColor': 'border.color',\n\t'border.customStyle': 'border.style',\n\t'border.customWidth': 'border.width',\n\t'typography.customFontStyle': 'typography.fontStyle',\n\t'typography.customFontWeight': 'typography.fontWeight',\n\t'typography.customLetterSpacing': 'typography.letterSpacing',\n\t'typography.customTextDecorations': 'typography.textDecoration',\n\t'typography.customTextTransforms': 'typography.textTransform',\n\t/*\n\t * These were part of WordPress 5.8 and we need to keep them.\n\t */\n\t'border.customRadius': 'border.radius',\n\t'spacing.customMargin': 'spacing.margin',\n\t'spacing.customPadding': 'spacing.padding',\n\t'typography.customLineHeight': 'typography.lineHeight',\n};\n\n/**\n * Remove `custom` prefixes for flags that did not land in 5.8.\n *\n * This provides continued support for `custom` prefixed properties. It will\n * be removed once third party devs have had sufficient time to update themes,\n * plugins, etc.\n *\n * @see https://github.com/WordPress/gutenberg/pull/34485\n *\n * @param {string} path Path to desired value in settings.\n * @return {string}     The value for defined setting.\n */\nconst removeCustomPrefixes = ( path ) => {\n\treturn prefixedFlags[ path ] || path;\n};\n\n/**\n * Hook that retrieves the given setting for the block instance in use.\n *\n * It looks up the settings first in the block instance hierarchy.\n * If none is found, it'll look it up in the block editor store.\n *\n * @param {string} path The path to the setting.\n * @return {any} Returns the value defined for the setting.\n * @example\n * ```js\n * const isEnabled = useSetting( 'typography.dropCap' );\n * ```\n */\nexport default function useSetting( path ) {\n\tconst { name: blockName, clientId } = useBlockEditContext();\n\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( blockedPaths.includes( path ) ) {\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\tconsole.warn(\n\t\t\t\t\t'Top level useSetting paths are disabled. Please use a subpath to query the information needed.'\n\t\t\t\t);\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tlet result;\n\n\t\t\tconst normalizedPath = removeCustomPrefixes( path );\n\n\t\t\t// 1. Take settings from the block instance or its ancestors.\n\t\t\t// Start from the current block and work our way up the ancestors.\n\t\t\tconst candidates = [\n\t\t\t\tclientId,\n\t\t\t\t...select( blockEditorStore ).getBlockParents(\n\t\t\t\t\tclientId,\n\t\t\t\t\t/* ascending */ true\n\t\t\t\t),\n\t\t\t];\n\n\t\t\tfor ( const candidateClientId of candidates ) {\n\t\t\t\tconst candidateBlockName =\n\t\t\t\t\tselect( blockEditorStore ).getBlockName(\n\t\t\t\t\t\tcandidateClientId\n\t\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\tcandidateBlockName,\n\t\t\t\t\t\t'__experimentalSettings',\n\t\t\t\t\t\tfalse\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tconst candidateAtts =\n\t\t\t\t\t\tselect( blockEditorStore ).getBlockAttributes(\n\t\t\t\t\t\t\tcandidateClientId\n\t\t\t\t\t\t);\n\t\t\t\t\tresult =\n\t\t\t\t\t\tget(\n\t\t\t\t\t\t\tcandidateAtts,\n\t\t\t\t\t\t\t`settings.blocks.${ blockName }.${ normalizedPath }`\n\t\t\t\t\t\t) ??\n\t\t\t\t\t\tget( candidateAtts, `settings.${ normalizedPath }` );\n\t\t\t\t\tif ( result !== undefined ) {\n\t\t\t\t\t\t// Stop the search for more distant ancestors and move on.\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 2. Fall back to the settings from the block editor store (__experimentalFeatures).\n\t\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\t\tif ( result === undefined ) {\n\t\t\t\tconst defaultsPath = `__experimentalFeatures.${ normalizedPath }`;\n\t\t\t\tconst blockPath = `__experimentalFeatures.blocks.${ blockName }.${ normalizedPath }`;\n\t\t\t\tresult =\n\t\t\t\t\tget( settings, blockPath ) ?? get( settings, defaultsPath );\n\t\t\t}\n\n\t\t\t// Return if the setting was found in either the block instance or the store.\n\t\t\tif ( result !== undefined ) {\n\t\t\t\tif ( PATHS_WITH_MERGE[ normalizedPath ] ) {\n\t\t\t\t\treturn result.custom ?? result.theme ?? result.default;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\t// 3. Otherwise, use deprecated settings.\n\t\t\tconst deprecatedSettingsValue = deprecatedFlags[ normalizedPath ]\n\t\t\t\t? deprecatedFlags[ normalizedPath ]( settings )\n\t\t\t\t: undefined;\n\t\t\tif ( deprecatedSettingsValue !== undefined ) {\n\t\t\t\treturn deprecatedSettingsValue;\n\t\t\t}\n\n\t\t\t// 4. Fallback for typography.dropCap:\n\t\t\t// This is only necessary to support typography.dropCap.\n\t\t\t// when __experimentalFeatures are not present (core without plugin).\n\t\t\t// To remove when __experimentalFeatures are ported to core.\n\t\t\treturn normalizedPath === 'typography.dropCap' ? true : undefined;\n\t\t},\n\t\t[ blockName, clientId, path ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tBaseControl,\n\tButton,\n\tRangeControl,\n\tCustomSelectControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalHStack as HStack,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\nimport { store as blockEditorStore } from '../../store';\nimport {\n\tLABELS,\n\tgetSliderValueFromPreset,\n\tgetCustomValueFromPreset,\n\tgetPresetValueFromCustomValue,\n\tisValueSpacingPreset,\n} from './utils';\n\nexport default function SpacingInputControl( {\n\tspacingSizes,\n\tvalue,\n\tside,\n\tonChange,\n\tisMixed = false,\n\ttype,\n\tminimumCustomValue,\n} ) {\n\t// Treat value as a preset value if the passed in value matches the value of one of the spacingSizes.\n\tvalue = getPresetValueFromCustomValue( value, spacingSizes );\n\n\tlet selectListSizes = spacingSizes;\n\tconst showRangeControl = spacingSizes.length <= 8;\n\n\tconst disableCustomSpacingSizes = useSelect( ( select ) => {\n\t\tconst editorSettings = select( blockEditorStore ).getSettings();\n\t\treturn editorSettings?.disableCustomSpacingSizes;\n\t} );\n\n\tconst [ showCustomValueControl, setShowCustomValueControl ] = useState(\n\t\t! disableCustomSpacingSizes &&\n\t\t\tvalue !== undefined &&\n\t\t\t! isValueSpacingPreset( value )\n\t);\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tlet currentValue = null;\n\n\tconst showCustomValueInSelectList =\n\t\t! showRangeControl &&\n\t\t! showCustomValueControl &&\n\t\tvalue !== undefined &&\n\t\t( ! isValueSpacingPreset( value ) ||\n\t\t\t( isValueSpacingPreset( value ) && isMixed ) );\n\n\tif ( showCustomValueInSelectList ) {\n\t\tselectListSizes = [\n\t\t\t...spacingSizes,\n\t\t\t{\n\t\t\t\tname: ! isMixed\n\t\t\t\t\t? // translators: A custom measurement, eg. a number followed by a unit like 12px.\n\t\t\t\t\t  sprintf( __( 'Custom (%s)' ), value )\n\t\t\t\t\t: __( 'Mixed' ),\n\t\t\t\tslug: 'custom',\n\t\t\t\tsize: value,\n\t\t\t},\n\t\t];\n\t\tcurrentValue = selectListSizes.length - 1;\n\t} else if ( ! isMixed ) {\n\t\tcurrentValue = ! showCustomValueControl\n\t\t\t? getSliderValueFromPreset( value, spacingSizes )\n\t\t\t: getCustomValueFromPreset( value, spacingSizes );\n\t}\n\n\tconst selectedUnit =\n\t\tuseMemo(\n\t\t\t() => parseQuantityAndUnitFromRawValue( currentValue ),\n\t\t\t[ currentValue ]\n\t\t)[ 1 ] || units[ 0 ].value;\n\n\tconst setInitialValue = () => {\n\t\tif ( value === undefined ) {\n\t\t\tonChange( '0' );\n\t\t}\n\t};\n\n\tconst customTooltipContent = ( newValue ) =>\n\t\tvalue === undefined ? undefined : spacingSizes[ newValue ]?.name;\n\n\tconst customRangeValue = parseInt( currentValue, 10 );\n\n\tconst getNewCustomValue = ( newSize ) => {\n\t\tconst isNumeric = ! isNaN( parseFloat( newSize ) );\n\t\tconst nextValue = isNumeric ? newSize : undefined;\n\t\treturn nextValue;\n\t};\n\n\tconst getNewPresetValue = ( newSize, controlType ) => {\n\t\tconst size = parseInt( newSize, 10 );\n\n\t\tif ( controlType === 'selectList' ) {\n\t\t\tif ( size === 0 ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\tif ( size === 1 ) {\n\t\t\t\treturn '0';\n\t\t\t}\n\t\t} else if ( size === 0 ) {\n\t\t\treturn '0';\n\t\t}\n\t\treturn `var:preset|spacing|${ spacingSizes[ newSize ]?.slug }`;\n\t};\n\n\tconst handleCustomValueSliderChange = ( next ) => {\n\t\tonChange( [ next, selectedUnit ].join( '' ) );\n\t};\n\n\tconst allPlaceholder = isMixed ? __( 'Mixed' ) : null;\n\n\tconst currentValueHint = ! isMixed\n\t\t? customTooltipContent( currentValue )\n\t\t: __( 'Mixed' );\n\n\tconst options = selectListSizes.map( ( size, index ) => ( {\n\t\tkey: index,\n\t\tname: size.name,\n\t} ) );\n\n\tconst marks = spacingSizes.map( ( newValue, index ) => ( {\n\t\tvalue: index,\n\t\tlabel: undefined,\n\t} ) );\n\n\tconst ariaLabel = sprintf(\n\t\t// translators: 1: The side of the block being modified (top, bottom, left, etc.). 2. Type of spacing being modified (Padding, margin, etc)\n\t\t__( '%1$s %2$s' ),\n\t\tLABELS[ side ],\n\t\ttype?.toLowerCase()\n\t);\n\n\tconst showHint =\n\t\tshowRangeControl &&\n\t\t! showCustomValueControl &&\n\t\tcurrentValueHint !== undefined;\n\n\treturn (\n\t\t<>\n\t\t\t{ side !== 'all' && (\n\t\t\t\t<HStack className=\"components-spacing-sizes-control__side-labels\">\n\t\t\t\t\t<BaseControl.VisualLabel className=\"components-spacing-sizes-control__side-label\">\n\t\t\t\t\t\t{ LABELS[ side ] }\n\t\t\t\t\t</BaseControl.VisualLabel>\n\n\t\t\t\t\t{ showHint && (\n\t\t\t\t\t\t<BaseControl.VisualLabel className=\"components-spacing-sizes-control__hint-single\">\n\t\t\t\t\t\t\t{ currentValueHint }\n\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ side === 'all' && showHint && (\n\t\t\t\t<BaseControl.VisualLabel className=\"components-spacing-sizes-control__hint-all\">\n\t\t\t\t\t{ currentValueHint }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\n\t\t\t{ ! disableCustomSpacingSizes && (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tshowCustomValueControl\n\t\t\t\t\t\t\t? __( 'Use size preset' )\n\t\t\t\t\t\t\t: __( 'Set custom size' )\n\t\t\t\t\t}\n\t\t\t\t\ticon={ settings }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tsetShowCustomValueControl( ! showCustomValueControl );\n\t\t\t\t\t} }\n\t\t\t\t\tisPressed={ showCustomValueControl }\n\t\t\t\t\tisSmall\n\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t'components-spacing-sizes-control__custom-toggle-all':\n\t\t\t\t\t\t\tside === 'all',\n\t\t\t\t\t\t'components-spacing-sizes-control__custom-toggle-single':\n\t\t\t\t\t\t\tside !== 'all',\n\t\t\t\t\t} ) }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showCustomValueControl && (\n\t\t\t\t<>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\tonChange={ ( newSize ) =>\n\t\t\t\t\t\t\tonChange( getNewCustomValue( newSize ) )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ currentValue }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tmin={ minimumCustomValue }\n\t\t\t\t\t\tplaceholder={ allPlaceholder }\n\t\t\t\t\t\tdisableUnits={ isMixed }\n\t\t\t\t\t\tlabel={ ariaLabel }\n\t\t\t\t\t\thideLabelFromVision={ true }\n\t\t\t\t\t\tclassName=\"components-spacing-sizes-control__custom-value-input\"\n\t\t\t\t\t\tstyle={ { gridColumn: '1' } }\n\t\t\t\t\t/>\n\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\tvalue={ customRangeValue }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tmax={ 100 }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\tonChange={ handleCustomValueSliderChange }\n\t\t\t\t\t\tclassName=\"components-spacing-sizes-control__custom-value-range\"\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ showRangeControl && ! showCustomValueControl && (\n\t\t\t\t<RangeControl\n\t\t\t\t\tclassName=\"components-spacing-sizes-control__range-control\"\n\t\t\t\t\tvalue={ currentValue }\n\t\t\t\t\tonChange={ ( newSize ) =>\n\t\t\t\t\t\tonChange( getNewPresetValue( newSize ) )\n\t\t\t\t\t}\n\t\t\t\t\tonMouseDown={ ( event ) => {\n\t\t\t\t\t\t// If mouse down is near start of range set initial value to 0, which\n\t\t\t\t\t\t// prevents the user have to drag right then left to get 0 setting.\n\t\t\t\t\t\tif ( event?.nativeEvent?.offsetX < 35 ) {\n\t\t\t\t\t\t\tsetInitialValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\twithInputField={ false }\n\t\t\t\t\taria-valuenow={ currentValue }\n\t\t\t\t\taria-valuetext={ spacingSizes[ currentValue ]?.name }\n\t\t\t\t\trenderTooltipContent={ customTooltipContent }\n\t\t\t\t\tmin={ 0 }\n\t\t\t\t\tmax={ spacingSizes.length - 1 }\n\t\t\t\t\tmarks={ marks }\n\t\t\t\t\tlabel={ ariaLabel }\n\t\t\t\t\thideLabelFromVision={ true }\n\t\t\t\t\t__nextHasNoMarginBottom={ true }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ ! showRangeControl && ! showCustomValueControl && (\n\t\t\t\t<CustomSelectControl\n\t\t\t\t\tclassName=\"components-spacing-sizes-control__custom-select-control\"\n\t\t\t\t\tvalue={\n\t\t\t\t\t\toptions.find(\n\t\t\t\t\t\t\t( option ) => option.key === currentValue\n\t\t\t\t\t\t) || '' // passing undefined here causes a downshift controlled/uncontrolled warning\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( selection ) => {\n\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\tgetNewPresetValue(\n\t\t\t\t\t\t\t\tselection.selectedItem.key,\n\t\t\t\t\t\t\t\t'selectList'\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\toptions={ options }\n\t\t\t\t\tlabel={ ariaLabel }\n\t\t\t\t\thideLabelFromVision={ true }\n\t\t\t\t\t__nextUnconstrainedWidth={ true }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalApplyValueToSides as applyValueToSides } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport SpacingInputControl from './spacing-input-control';\nimport { getAllRawValue, isValuesMixed, isValuesDefined } from './utils';\n\nexport default function AllInputControl( {\n\tonChange,\n\tvalues,\n\tsides,\n\tspacingSizes,\n\ttype,\n\tminimumCustomValue,\n} ) {\n\tconst allValue = getAllRawValue( values );\n\tconst hasValues = isValuesDefined( values );\n\tconst isMixed = hasValues && isValuesMixed( values, sides );\n\n\tconst handleOnChange = ( next ) => {\n\t\tconst nextValues = applyValueToSides( values, next, sides );\n\t\tonChange( nextValues );\n\t};\n\n\treturn (\n\t\t<SpacingInputControl\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tside={ 'all' }\n\t\t\tspacingSizes={ spacingSizes }\n\t\t\tisMixed={ isMixed }\n\t\t\ttype={ type }\n\t\t\tminimumCustomValue={ minimumCustomValue }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport SpacingInputControl from './spacing-input-control';\nimport { ALL_SIDES, LABELS } from './utils';\n\nexport default function BoxInputControls( {\n\tvalues,\n\tsides,\n\tonChange,\n\tspacingSizes,\n\ttype,\n\tminimumCustomValue,\n} ) {\n\t// Filter sides if custom configuration provided, maintaining default order.\n\tconst filteredSides = sides?.length\n\t\t? ALL_SIDES.filter( ( side ) => sides.includes( side ) )\n\t\t: ALL_SIDES;\n\n\tconst createHandleOnChange = ( side ) => ( next ) => {\n\t\tconst nextValues = { ...values };\n\t\tnextValues[ side ] = next;\n\n\t\tonChange( nextValues );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredSides.map( ( side ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<SpacingInputControl\n\t\t\t\t\t\tvalue={ values[ side ] }\n\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\tkey={ `spacing-sizes-control-${ side }` }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\tside={ side }\n\t\t\t\t\t\tonChange={ createHandleOnChange( side ) }\n\t\t\t\t\t\tspacingSizes={ spacingSizes }\n\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\tminimumCustomValue={ minimumCustomValue }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport SpacingInputControl from './spacing-input-control';\nimport { LABELS } from './utils';\n\nconst groupedSides = [ 'vertical', 'horizontal' ];\n\nexport default function AxialInputControls( {\n\tonChange,\n\tvalues,\n\tsides,\n\tspacingSizes,\n\ttype,\n\tminimumCustomValue,\n} ) {\n\tconst createHandleOnChange = ( side ) => ( next ) => {\n\t\tif ( ! onChange ) {\n\t\t\treturn;\n\t\t}\n\t\tconst nextValues = { ...values };\n\n\t\tif ( side === 'vertical' ) {\n\t\t\tnextValues.top = next;\n\t\t\tnextValues.bottom = next;\n\t\t}\n\n\t\tif ( side === 'horizontal' ) {\n\t\t\tnextValues.left = next;\n\t\t\tnextValues.right = next;\n\t\t}\n\n\t\tonChange( nextValues );\n\t};\n\n\t// Filter sides if custom configuration provided, maintaining default order.\n\tconst filteredSides = sides?.length\n\t\t? groupedSides.filter( ( side ) => sides.includes( side ) )\n\t\t: groupedSides;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredSides.map( ( side ) => {\n\t\t\t\tconst axisValue =\n\t\t\t\t\tside === 'vertical' ? values.top : values.left;\n\t\t\t\treturn (\n\t\t\t\t\t<SpacingInputControl\n\t\t\t\t\t\tvalue={ axisValue }\n\t\t\t\t\t\tonChange={ createHandleOnChange( side ) }\n\t\t\t\t\t\tlabel={ LABELS[ side ] }\n\t\t\t\t\t\tkey={ `spacing-sizes-control-${ side }` }\n\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\tside={ side }\n\t\t\t\t\t\tspacingSizes={ spacingSizes }\n\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\tminimumCustomValue={ minimumCustomValue }\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 { SVG, Path } from '@wordpress/primitives';\n\nconst link = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.6 7.2H14v1.5h1.6c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.8 0 5.2-2.3 5.2-5.2 0-2.9-2.3-5.2-5.2-5.2zM4.7 12.4c0-2 1.7-3.7 3.7-3.7H10V7.2H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H10v-1.5H8.4c-2 0-3.7-1.7-3.7-3.7zm4.6.9h5.3v-1.5H9.3v1.5z\" />\n\t</SVG>\n);\n\nexport default link;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst linkOff = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.6 7.3h-.7l1.6-3.5-.9-.4-3.9 8.5H9v1.5h2l-1.3 2.8H8.4c-2 0-3.7-1.7-3.7-3.7s1.7-3.7 3.7-3.7H10V7.3H8.4c-2.9 0-5.2 2.3-5.2 5.2 0 2.9 2.3 5.2 5.2 5.2H9l-1.4 3.2.9.4 5.7-12.5h1.4c2 0 3.7 1.7 3.7 3.7s-1.7 3.7-3.7 3.7H14v1.5h1.6c2.9 0 5.2-2.3 5.2-5.2 0-2.9-2.4-5.2-5.2-5.2z\" />\n\t</SVG>\n);\n\nexport default linkOff;\n","/**\n * WordPress dependencies\n */\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { Button, Tooltip } from '@wordpress/components';\n\nexport default function LinkedButton( { isLinked, onClick } ) {\n\tconst label = isLinked ? __( 'Unlink sides' ) : __( 'Link sides' );\n\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<span className=\"component-spacing-sizes-control__linked-button\">\n\t\t\t\t<Button\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Tooltip>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { BaseControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport AxialInputControls from './axial-input-controls';\nimport LinkedButton from './linked-button';\nimport { DEFAULT_VALUES, isValuesMixed, isValuesDefined } from './utils';\nimport useSetting from '../use-setting';\n\nexport default function SpacingSizesControl( {\n\tinputProps,\n\tonChange,\n\tlabel = __( 'Spacing Control' ),\n\tvalues,\n\tsides,\n\tsplitOnAxis = false,\n\tuseSelect,\n\tminimumCustomValue = 0,\n} ) {\n\tconst spacingSizes = [\n\t\t{ name: 0, slug: '0', size: 0 },\n\t\t...( useSetting( 'spacing.spacingSizes' ) || [] ),\n\t];\n\n\tif ( spacingSizes.length > 8 ) {\n\t\tspacingSizes.unshift( {\n\t\t\tname: __( 'Default' ),\n\t\t\tslug: 'default',\n\t\t\tsize: undefined,\n\t\t} );\n\t}\n\n\tconst inputValues = values || DEFAULT_VALUES;\n\tconst hasInitialValue = isValuesDefined( values );\n\tconst hasOneSide = sides?.length === 1;\n\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasInitialValue || ! isValuesMixed( inputValues, sides ) || hasOneSide\n\t);\n\n\tconst toggleLinked = () => {\n\t\tsetIsLinked( ! isLinked );\n\t};\n\n\tconst handleOnChange = ( nextValue ) => {\n\t\tconst newValues = { ...values, ...nextValue };\n\t\tonChange( newValues );\n\t};\n\n\tconst inputControlProps = {\n\t\t...inputProps,\n\t\tonChange: handleOnChange,\n\t\tisLinked,\n\t\tsides,\n\t\tvalues: inputValues,\n\t\tspacingSizes,\n\t\tuseSelect,\n\t\ttype: label,\n\t\tminimumCustomValue,\n\t};\n\n\treturn (\n\t\t<fieldset\n\t\t\trole=\"region\"\n\t\t\tclassName={ classnames( 'component-spacing-sizes-control', {\n\t\t\t\t'is-unlinked': ! isLinked,\n\t\t\t} ) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ label }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t{ ! hasOneSide && (\n\t\t\t\t<LinkedButton onClick={ toggleLinked } isLinked={ isLinked } />\n\t\t\t) }\n\t\t\t{ isLinked && (\n\t\t\t\t<AllInputControl\n\t\t\t\t\taria-label={ label }\n\t\t\t\t\t{ ...inputControlProps }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ ! isLinked && splitOnAxis && (\n\t\t\t\t<AxialInputControls { ...inputControlProps } />\n\t\t\t) }\n\t\t\t{ ! isLinked && ! splitOnAxis && (\n\t\t\t\t<InputControls { ...inputControlProps } />\n\t\t\t) }\n\t\t</fieldset>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"warning\"];","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst InspectorControlsDefault = createSlotFill( 'InspectorControls' );\nconst InspectorControlsAdvanced = createSlotFill( 'InspectorAdvancedControls' );\nconst InspectorControlsBorder = createSlotFill( 'InspectorControlsBorder' );\nconst InspectorControlsColor = createSlotFill( 'InspectorControlsColor' );\nconst InspectorControlsDimensions = createSlotFill(\n\t'InspectorControlsDimensions'\n);\nconst InspectorControlsTypography = createSlotFill(\n\t'InspectorControlsTypography'\n);\n\nconst groups = {\n\tdefault: InspectorControlsDefault,\n\tadvanced: InspectorControlsAdvanced,\n\tborder: InspectorControlsBorder,\n\tcolor: InspectorControlsColor,\n\tdimensions: InspectorControlsDimensions,\n\ttypography: InspectorControlsTypography,\n};\n\nexport default groups;\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalStyleProvider as StyleProvider,\n\t__experimentalToolsPanelContext as ToolsPanelContext,\n} from '@wordpress/components';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useDisplayBlockControls from '../use-display-block-controls';\nimport groups from './groups';\n\nexport default function InspectorControlsFill( {\n\t__experimentalGroup: group = 'default',\n\tchildren,\n} ) {\n\tconst isDisplayed = useDisplayBlockControls();\n\tconst Fill = groups[ group ]?.Fill;\n\tif ( ! Fill ) {\n\t\twarning( `Unknown InspectorControl group \"${ group }\" provided.` );\n\t\treturn null;\n\t}\n\tif ( ! isDisplayed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill>\n\t\t\t\t{ ( fillProps ) => {\n\t\t\t\t\t// Children passed to InspectorControlsFill will not have\n\t\t\t\t\t// access to any React Context whose Provider is part of\n\t\t\t\t\t// the InspectorControlsSlot tree. So we re-create the\n\t\t\t\t\t// Provider in this subtree.\n\t\t\t\t\tconst value = ! isEmpty( fillProps ) ? fillProps : null;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ToolsPanelContext.Provider value={ value }>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</ToolsPanelContext.Provider>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Fill>\n\t\t</StyleProvider>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { pickBy, isEmpty, mapValues, get, setWith, clone, every } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\n\nconst identity = ( x ) => x;\n\n/**\n * Removed falsy values from nested object.\n *\n * @param {*} object\n * @return {*} Object cleaned from falsy values\n */\nexport const cleanEmptyObject = ( object ) => {\n\tif (\n\t\tobject === null ||\n\t\ttypeof object !== 'object' ||\n\t\tArray.isArray( object )\n\t) {\n\t\treturn object;\n\t}\n\tconst cleanedNestedObjects = pickBy(\n\t\tmapValues( object, cleanEmptyObject ),\n\t\tidentity\n\t);\n\treturn isEmpty( cleanedNestedObjects ) ? undefined : cleanedNestedObjects;\n};\n\nexport function immutableSet( object, path, value ) {\n\treturn setWith( object ? clone( object ) : {}, path, value, clone );\n}\n\nexport function transformStyles(\n\tactiveSupports,\n\tmigrationPaths,\n\tresult,\n\tsource,\n\tindex,\n\tresults\n) {\n\t// If there are no active supports return early.\n\tif ( every( activeSupports, ( isActive ) => ! isActive ) ) {\n\t\treturn result;\n\t}\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the styles should not be transformed.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\t// For cases where we have a transform from one block to multiple blocks\n\t// or multiple blocks to one block we apply the styles of the first source block\n\t// to the result(s).\n\tlet referenceBlockAttributes = source[ 0 ]?.attributes;\n\t// If we are in presence of transform between more than one block in the source\n\t// that has more than one block in the result\n\t// we apply the styles on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( results.length > 1 && source.length > 1 ) {\n\t\tif ( source[ index ] ) {\n\t\t\treferenceBlockAttributes = source[ index ]?.attributes;\n\t\t} else {\n\t\t\treturn result;\n\t\t}\n\t}\n\tlet returnBlock = result;\n\tObject.entries( activeSupports ).forEach( ( [ support, isActive ] ) => {\n\t\tif ( isActive ) {\n\t\t\tmigrationPaths[ support ].forEach( ( path ) => {\n\t\t\t\tconst styleValue = get( referenceBlockAttributes, path );\n\t\t\t\tif ( styleValue ) {\n\t\t\t\t\treturnBlock = {\n\t\t\t\t\t\t...returnBlock,\n\t\t\t\t\t\tattributes: immutableSet(\n\t\t\t\t\t\t\treturnBlock.attributes,\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tstyleValue\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\treturn returnBlock;\n}\n\n/**\n * Check whether serialization of specific block support feature or set should\n * be skipped.\n *\n * @param {string|Object} blockType  Block name or block type object.\n * @param {string}        featureSet Name of block support feature set.\n * @param {string}        feature    Name of the individual feature to check.\n *\n * @return {boolean} Whether serialization should occur.\n */\nexport function shouldSkipSerialization( blockType, featureSet, feature ) {\n\tconst support = getBlockSupport( blockType, featureSet );\n\tconst skipSerialization = support?.__experimentalSkipSerialization;\n\n\tif ( Array.isArray( skipSerialization ) ) {\n\t\treturn skipSerialization.includes( feature );\n\t}\n\n\treturn skipSerialization;\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalToolsPanel as ToolsPanel } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { cleanEmptyObject } from '../../hooks/utils';\n\nexport default function BlockSupportToolsPanel( { children, group, label } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst {\n\t\tgetBlockAttributes,\n\t\tgetMultiSelectedBlockClientIds,\n\t\tgetSelectedBlockClientId,\n\t\thasMultiSelection,\n\t} = useSelect( blockEditorStore );\n\n\tconst panelId = getSelectedBlockClientId();\n\tconst resetAll = useCallback(\n\t\t( resetFilters = [] ) => {\n\t\t\tconst newAttributes = {};\n\n\t\t\tconst clientIds = hasMultiSelection()\n\t\t\t\t? getMultiSelectedBlockClientIds()\n\t\t\t\t: [ panelId ];\n\n\t\t\tclientIds.forEach( ( clientId ) => {\n\t\t\t\tconst { style } = getBlockAttributes( clientId );\n\t\t\t\tlet newBlockAttributes = { style };\n\n\t\t\t\tresetFilters.forEach( ( resetFilter ) => {\n\t\t\t\t\tnewBlockAttributes = {\n\t\t\t\t\t\t...newBlockAttributes,\n\t\t\t\t\t\t...resetFilter( newBlockAttributes ),\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\t// Enforce a cleaned style object.\n\t\t\t\tnewBlockAttributes = {\n\t\t\t\t\t...newBlockAttributes,\n\t\t\t\t\tstyle: cleanEmptyObject( newBlockAttributes.style ),\n\t\t\t\t};\n\n\t\t\t\tnewAttributes[ clientId ] = newBlockAttributes;\n\t\t\t} );\n\n\t\t\tupdateBlockAttributes( clientIds, newAttributes, true );\n\t\t},\n\t\t[\n\t\t\tcleanEmptyObject,\n\t\t\tgetBlockAttributes,\n\t\t\tgetMultiSelectedBlockClientIds,\n\t\t\thasMultiSelection,\n\t\t\tpanelId,\n\t\t\tupdateBlockAttributes,\n\t\t]\n\t);\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tclassName={ `${ group }-block-support-panel` }\n\t\t\tlabel={ label }\n\t\t\tresetAll={ resetAll }\n\t\t\tkey={ panelId }\n\t\t\tpanelId={ panelId }\n\t\t\thasInnerWrapper={ true }\n\t\t\tshouldRenderPlaceholderItems={ true } // Required to maintain fills ordering.\n\t\t\t__experimentalFirstVisibleItemClass=\"first\"\n\t\t\t__experimentalLastVisibleItemClass=\"last\"\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanel>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalToolsPanelContext as ToolsPanelContext } from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\nexport default function BlockSupportSlotContainer( { Slot, ...props } ) {\n\tconst toolsPanelContext = useContext( ToolsPanelContext );\n\treturn (\n\t\t<Slot { ...props } fillProps={ toolsPanelContext } bubblesVirtually />\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseSlot as useSlot,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport BlockSupportToolsPanel from './block-support-tools-panel';\nimport BlockSupportSlotContainer from './block-support-slot-container';\nimport groups from './groups';\n\nexport default function InspectorControlsSlot( {\n\t__experimentalGroup: group = 'default',\n\tlabel,\n\t...props\n} ) {\n\tconst Slot = groups[ group ]?.Slot;\n\tconst slot = useSlot( Slot?.__unstableName );\n\tconst fills = useSlotFills( Slot?.__unstableName );\n\tif ( ! Slot || ! slot ) {\n\t\twarning( `Unknown InspectorControl group \"${ group }\" provided.` );\n\t\treturn null;\n\t}\n\n\tconst hasFills = Boolean( fills && fills.length );\n\tif ( ! hasFills ) {\n\t\treturn null;\n\t}\n\n\tif ( label ) {\n\t\treturn (\n\t\t\t<BlockSupportToolsPanel group={ group } label={ label }>\n\t\t\t\t<BlockSupportSlotContainer { ...props } Slot={ Slot } />\n\t\t\t</BlockSupportToolsPanel>\n\t\t);\n\t}\n\n\treturn <Slot { ...props } bubblesVirtually />;\n}\n","/**\n * Internal dependencies\n */\nimport InspectorControlsFill from './fill';\nimport InspectorControlsSlot from './slot';\n\nconst InspectorControls = InspectorControlsFill;\n\nInspectorControls.Slot = InspectorControlsSlot;\n\n// This is just here for backward compatibility.\nexport const InspectorAdvancedControls = ( props ) => {\n\treturn (\n\t\t<InspectorControlsFill { ...props } __experimentalGroup=\"advanced\" />\n\t);\n};\nInspectorAdvancedControls.Slot = ( props ) => {\n\treturn (\n\t\t<InspectorControlsSlot { ...props } __experimentalGroup=\"advanced\" />\n\t);\n};\nInspectorAdvancedControls.slotName = 'InspectorAdvancedControls';\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inspector-controls/README.md\n */\nexport default InspectorControls;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"isShallowEqual\"];","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Allow scrolling \"through\" popovers over the canvas. This is only called for\n * as long as the pointer is over a popover. Do not use React events because it\n * will bubble through portals.\n *\n * @param {Object} scrollableRef\n */\nfunction usePopoverScroll( scrollableRef ) {\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! scrollableRef ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onWheel( event ) {\n\t\t\t\tconst { deltaX, deltaY } = event;\n\t\t\t\tscrollableRef.current.scrollBy( deltaX, deltaY );\n\t\t\t}\n\t\t\t// Tell the browser that we do not call event.preventDefault\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners\n\t\t\tconst options = { passive: true };\n\t\t\tnode.addEventListener( 'wheel', onWheel, options );\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'wheel', onWheel, options );\n\t\t\t};\n\t\t},\n\t\t[ scrollableRef ]\n\t);\n}\n\nexport default usePopoverScroll;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMergeRefs } from '@wordpress/compose';\nimport { Popover } from '@wordpress/components';\nimport {\n\tforwardRef,\n\tuseMemo,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nfunction BlockPopover(\n\t{\n\t\tclientId,\n\t\tbottomClientId,\n\t\tchildren,\n\t\t__unstableRefreshSize,\n\t\t__unstableCoverTarget = false,\n\t\t__unstablePopoverSlot,\n\t\t__unstableContentRef,\n\t\t...props\n\t},\n\tref\n) {\n\tconst selectedElement = useBlockElement( clientId );\n\tconst lastSelectedElement = useBlockElement( bottomClientId ?? clientId );\n\tconst mergedRefs = useMergeRefs( [\n\t\tref,\n\t\tusePopoverScroll( __unstableContentRef ),\n\t] );\n\n\tconst [\n\t\tpopoverDimensionsRecomputeCounter,\n\t\tforceRecomputePopoverDimensions,\n\t] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\t// When blocks are moved up/down, they are animated to their new position by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! selectedElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new window.MutationObserver(\n\t\t\tforceRecomputePopoverDimensions\n\t\t);\n\t\tobserver.observe( selectedElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ selectedElement ] );\n\n\tconst style = useMemo( () => {\n\t\tif (\n\t\t\t// popoverDimensionsRecomputeCounter is by definition always equal or greater\n\t\t\t// than 0. This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverDimensionsRecomputeCounter < 0 ||\n\t\t\t! selectedElement ||\n\t\t\tlastSelectedElement !== selectedElement\n\t\t) {\n\t\t\treturn {};\n\t\t}\n\n\t\treturn {\n\t\t\tposition: 'absolute',\n\t\t\twidth: selectedElement.offsetWidth,\n\t\t\theight: selectedElement.offsetHeight,\n\t\t};\n\t}, [\n\t\tselectedElement,\n\t\tlastSelectedElement,\n\t\t__unstableRefreshSize,\n\t\tpopoverDimensionsRecomputeCounter,\n\t] );\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverDimensionsRecomputeCounter is by definition always equal or greater\n\t\t\t// than 0. This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverDimensionsRecomputeCounter < 0 ||\n\t\t\t! selectedElement ||\n\t\t\t( bottomClientId && ! lastSelectedElement )\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst selectedBCR = selectedElement.getBoundingClientRect();\n\t\t\t\tconst lastSelectedBCR =\n\t\t\t\t\tlastSelectedElement?.getBoundingClientRect();\n\n\t\t\t\t// Get the biggest rectangle that encompasses completely the currently\n\t\t\t\t// selected element and the last selected element:\n\t\t\t\t// - for top/left coordinates, use the smaller numbers\n\t\t\t\t// - for the bottom/right coordinates, use the largest numbers\n\t\t\t\tconst left = Math.min(\n\t\t\t\t\tselectedBCR.left,\n\t\t\t\t\tlastSelectedBCR?.left ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst top = Math.min(\n\t\t\t\t\tselectedBCR.top,\n\t\t\t\t\tlastSelectedBCR?.top ?? Infinity\n\t\t\t\t);\n\t\t\t\tconst right = Math.max(\n\t\t\t\t\tselectedBCR.right,\n\t\t\t\t\tlastSelectedBCR.right ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst bottom = Math.max(\n\t\t\t\t\tselectedBCR.bottom,\n\t\t\t\t\tlastSelectedBCR.bottom ?? -Infinity\n\t\t\t\t);\n\t\t\t\tconst width = right - left;\n\t\t\t\tconst height = bottom - top;\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t\townerDocument: selectedElement.ownerDocument,\n\t\t};\n\t}, [\n\t\tbottomClientId,\n\t\tlastSelectedElement,\n\t\tselectedElement,\n\t\tpopoverDimensionsRecomputeCounter,\n\t] );\n\n\tif ( ! selectedElement || ( bottomClientId && ! lastSelectedElement ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Popover\n\t\t\tref={ mergedRefs }\n\t\t\tanimate={ false }\n\t\t\tfocusOnMount={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot || null }\n\t\t\tplacement=\"top-start\"\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tshift\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t>\n\t\t\t{ __unstableCoverTarget && <div style={ style }>{ children }</div> }\n\t\t\t{ ! __unstableCoverTarget && children }\n\t\t</Popover>\n\t);\n}\n\nexport default forwardRef( BlockPopover );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPlatform,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalBoxControl as BoxControl,\n} from '@wordpress/components';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../components/use-setting';\nimport {\n\tAXIAL_SIDES,\n\tSPACING_SUPPORT_KEY,\n\tuseCustomSides,\n\tuseIsDimensionsSupportValid,\n} from './dimensions';\nimport { cleanEmptyObject } from './utils';\nimport BlockPopover from '../components/block-popover';\nimport SpacingSizesControl from '../components/spacing-sizes-control';\nimport { getCustomValueFromPreset } from '../components/spacing-sizes-control/utils';\n\n/**\n * Determines if there is margin support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasMarginSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, SPACING_SUPPORT_KEY );\n\treturn !! ( true === support || support?.margin );\n}\n\n/**\n * Checks if there is a current value in the margin block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean}      Whether or not the block has a margin value set.\n */\nexport function hasMarginValue( props ) {\n\treturn props.attributes.style?.spacing?.margin !== undefined;\n}\n\n/**\n * Resets the margin block support attributes. This can be used when disabling\n * the margin support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetMargin( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tmargin: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if margin settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether margin setting is disabled.\n */\nexport function useIsMarginDisabled( { name: blockName } = {} ) {\n\tconst isDisabled = ! useSetting( 'spacing.margin' );\n\tconst isInvalid = ! useIsDimensionsSupportValid( blockName, 'margin' );\n\n\treturn ! hasMarginSupport( blockName ) || isDisabled || isInvalid;\n}\n\n/**\n * Inspector control panel containing the margin related configuration\n *\n * @param {Object} props Block props.\n *\n * @return {WPElement} Margin edit element.\n */\nexport function MarginEdit( props ) {\n\tconst {\n\t\tname: blockName,\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst spacingSizes = useSetting( 'spacing.spacingSizes' );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\tconst sides = useCustomSides( blockName, 'margin' );\n\tconst splitOnAxis =\n\t\tsides && sides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\n\tif ( useIsMarginDisabled( props ) ) {\n\t\treturn null;\n\t}\n\n\tconst onChange = ( next ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tmargin: next,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\treturn Platform.select( {\n\t\tweb: (\n\t\t\t<>\n\t\t\t\t{ ( ! spacingSizes || spacingSizes?.length === 0 ) && (\n\t\t\t\t\t<BoxControl\n\t\t\t\t\t\tvalues={ style?.spacing?.margin }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\tsides={ sides }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ splitOnAxis }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ spacingSizes?.length > 0 && (\n\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\tvalues={ style?.spacing?.margin }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\tsides={ sides }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t),\n\t\tnative: null,\n\t} );\n}\n\nexport function MarginVisualizer( { clientId, attributes } ) {\n\tconst margin = attributes?.style?.spacing?.margin;\n\tconst spacingSizes = useSetting( 'spacing.spacingSizes' );\n\n\tconst style = useMemo( () => {\n\t\tconst marginTop = margin?.top\n\t\t\t? getCustomValueFromPreset( margin?.top, spacingSizes )\n\t\t\t: 0;\n\t\tconst marginRight = margin?.right\n\t\t\t? getCustomValueFromPreset( margin?.right, spacingSizes )\n\t\t\t: 0;\n\t\tconst marginBottom = margin?.bottom\n\t\t\t? getCustomValueFromPreset( margin?.bottom, spacingSizes )\n\t\t\t: 0;\n\t\tconst marginLeft = margin?.left\n\t\t\t? getCustomValueFromPreset( margin?.left, spacingSizes )\n\t\t\t: 0;\n\n\t\treturn {\n\t\t\tborderTopWidth: marginTop,\n\t\t\tborderRightWidth: marginRight,\n\t\t\tborderBottomWidth: marginBottom,\n\t\t\tborderLeftWidth: marginLeft,\n\t\t\ttop: marginTop !== 0 ? `-${ marginTop }` : 0,\n\t\t\tright: marginRight !== 0 ? `-${ marginRight }` : 0,\n\t\t\tbottom: marginBottom !== 0 ? `-${ marginBottom }` : 0,\n\t\t\tleft: marginLeft !== 0 ? `-${ marginLeft }` : 0,\n\t\t};\n\t}, [ margin ] );\n\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst valueRef = useRef( margin );\n\tconst timeoutRef = useRef();\n\n\tconst clearTimer = () => {\n\t\tif ( timeoutRef.current ) {\n\t\t\twindow.clearTimeout( timeoutRef.current );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! isShallowEqual( margin, valueRef.current ) ) {\n\t\t\tsetIsActive( true );\n\t\t\tvalueRef.current = margin;\n\n\t\t\tclearTimer();\n\n\t\t\ttimeoutRef.current = setTimeout( () => {\n\t\t\t\tsetIsActive( false );\n\t\t\t}, 400 );\n\t\t}\n\n\t\treturn () => clearTimer();\n\t}, [ margin ] );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ clientId }\n\t\t\t__unstableCoverTarget\n\t\t\t__unstableRefreshSize={ margin }\n\t\t>\n\t\t\t<div className=\"block-editor__padding-visualizer\" style={ style } />\n\t\t</BlockPopover>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tPlatform,\n\tuseState,\n\tuseRef,\n\tuseEffect,\n\tuseMemo,\n} from '@wordpress/element';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalBoxControl as BoxControl,\n} from '@wordpress/components';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../components/use-setting';\nimport {\n\tAXIAL_SIDES,\n\tSPACING_SUPPORT_KEY,\n\tuseCustomSides,\n\tuseIsDimensionsSupportValid,\n} from './dimensions';\nimport { cleanEmptyObject } from './utils';\nimport BlockPopover from '../components/block-popover';\nimport SpacingSizesControl from '../components/spacing-sizes-control';\nimport {\n\tgetSpacingPresetCssVar,\n\tisValueSpacingPreset,\n} from '../components/spacing-sizes-control/utils';\n/**\n * Determines if there is padding support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasPaddingSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, SPACING_SUPPORT_KEY );\n\treturn !! ( true === support || support?.padding );\n}\n\n/**\n * Checks if there is a current value in the padding block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean}      Whether or not the block has a padding value set.\n */\nexport function hasPaddingValue( props ) {\n\treturn props.attributes.style?.spacing?.padding !== undefined;\n}\n\n/**\n * Resets the padding block support attributes. This can be used when disabling\n * the padding support controls for a block via a `ToolsPanel`.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetPadding( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tpadding: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if padding settings have been disabled.\n *\n * @param {string} name The name of the block.\n *\n * @return {boolean} Whether padding setting is disabled.\n */\nexport function useIsPaddingDisabled( { name: blockName } = {} ) {\n\tconst isDisabled = ! useSetting( 'spacing.padding' );\n\tconst isInvalid = ! useIsDimensionsSupportValid( blockName, 'padding' );\n\n\treturn ! hasPaddingSupport( blockName ) || isDisabled || isInvalid;\n}\n\n/**\n * Inspector control panel containing the padding related configuration\n *\n * @param {Object} props\n *\n * @return {WPElement} Padding edit element.\n */\nexport function PaddingEdit( props ) {\n\tconst {\n\t\tname: blockName,\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst spacingSizes = useSetting( 'spacing.spacingSizes' );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\tconst sides = useCustomSides( blockName, 'padding' );\n\tconst splitOnAxis =\n\t\tsides && sides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\n\tif ( useIsPaddingDisabled( props ) ) {\n\t\treturn null;\n\t}\n\n\tconst onChange = ( next ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tpadding: next,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\t};\n\n\treturn Platform.select( {\n\t\tweb: (\n\t\t\t<>\n\t\t\t\t{ ( ! spacingSizes || spacingSizes?.length === 0 ) && (\n\t\t\t\t\t<BoxControl\n\t\t\t\t\t\tvalues={ style?.spacing?.padding }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\tsides={ sides }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ splitOnAxis }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ spacingSizes?.length > 0 && (\n\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\tvalues={ style?.spacing?.padding }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\tsides={ sides }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ splitOnAxis }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t),\n\t\tnative: null,\n\t} );\n}\n\nexport function PaddingVisualizer( { clientId, attributes } ) {\n\tconst padding = attributes?.style?.spacing?.padding;\n\tconst style = useMemo( () => {\n\t\treturn {\n\t\t\tborderTopWidth: isValueSpacingPreset( padding?.top )\n\t\t\t\t? getSpacingPresetCssVar( padding?.top )\n\t\t\t\t: padding?.top,\n\t\t\tborderRightWidth: isValueSpacingPreset( padding?.right )\n\t\t\t\t? getSpacingPresetCssVar( padding?.right )\n\t\t\t\t: padding?.right,\n\t\t\tborderBottomWidth: isValueSpacingPreset( padding?.bottom )\n\t\t\t\t? getSpacingPresetCssVar( padding?.bottom )\n\t\t\t\t: padding?.bottom,\n\t\t\tborderLeftWidth: isValueSpacingPreset( padding?.left )\n\t\t\t\t? getSpacingPresetCssVar( padding?.left )\n\t\t\t\t: padding?.left,\n\t\t};\n\t}, [ padding ] );\n\n\tconst [ isActive, setIsActive ] = useState( false );\n\tconst valueRef = useRef( padding );\n\tconst timeoutRef = useRef();\n\n\tconst clearTimer = () => {\n\t\tif ( timeoutRef.current ) {\n\t\t\twindow.clearTimeout( timeoutRef.current );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tif ( ! isShallowEqual( padding, valueRef.current ) ) {\n\t\t\tsetIsActive( true );\n\t\t\tvalueRef.current = padding;\n\n\t\t\tclearTimer();\n\n\t\t\ttimeoutRef.current = setTimeout( () => {\n\t\t\t\tsetIsActive( false );\n\t\t\t}, 400 );\n\t\t}\n\n\t\treturn () => clearTimer();\n\t}, [ padding ] );\n\n\tif ( ! isActive ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ clientId }\n\t\t\t__unstableCoverTarget\n\t\t\t__unstableRefreshSize={ padding }\n\t\t>\n\t\t\t<div className=\"block-editor__padding-visualizer\" style={ style } />\n\t\t</BlockPopover>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';\nimport { Platform } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { getBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport {\n\tGapEdit,\n\thasGapSupport,\n\thasGapValue,\n\tresetGap,\n\tuseIsGapDisabled,\n} from './gap';\nimport {\n\tMarginEdit,\n\tMarginVisualizer,\n\thasMarginSupport,\n\thasMarginValue,\n\tresetMargin,\n\tuseIsMarginDisabled,\n} from './margin';\nimport {\n\tPaddingEdit,\n\tPaddingVisualizer,\n\thasPaddingSupport,\n\thasPaddingValue,\n\tresetPadding,\n\tuseIsPaddingDisabled,\n} from './padding';\nimport useSetting from '../components/use-setting';\n\nexport const SPACING_SUPPORT_KEY = 'spacing';\nexport const ALL_SIDES = [ 'top', 'right', 'bottom', 'left' ];\nexport const AXIAL_SIDES = [ 'vertical', 'horizontal' ];\n\n/**\n * Inspector controls for dimensions support.\n *\n * @param {Object} props Block props.\n *\n * @return {WPElement} Inspector controls for spacing support features.\n */\nexport function DimensionsPanel( props ) {\n\tconst isGapDisabled = useIsGapDisabled( props );\n\tconst isPaddingDisabled = useIsPaddingDisabled( props );\n\tconst isMarginDisabled = useIsMarginDisabled( props );\n\tconst isDisabled = useIsDimensionsDisabled( props );\n\tconst isSupported = hasDimensionsSupport( props.name );\n\tconst spacingSizes = useSetting( 'spacing.spacingSizes' );\n\n\tif ( isDisabled || ! isSupported ) {\n\t\treturn null;\n\t}\n\n\tconst defaultSpacingControls = getBlockSupport( props.name, [\n\t\tSPACING_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\tconst createResetAllFilter = ( attribute ) => ( newAttributes ) => ( {\n\t\t...newAttributes,\n\t\tstyle: {\n\t\t\t...newAttributes.style,\n\t\t\tspacing: {\n\t\t\t\t...newAttributes.style?.spacing,\n\t\t\t\t[ attribute ]: undefined,\n\t\t\t},\n\t\t},\n\t} );\n\n\tconst spacingClassnames = classnames( {\n\t\t'tools-panel-item-spacing': spacingSizes && spacingSizes.length > 0,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls __experimentalGroup=\"dimensions\">\n\t\t\t\t{ ! isPaddingDisabled && (\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tclassName={ spacingClassnames }\n\t\t\t\t\t\thasValue={ () => hasPaddingValue( props ) }\n\t\t\t\t\t\tlabel={ __( 'Padding' ) }\n\t\t\t\t\t\tonDeselect={ () => resetPadding( props ) }\n\t\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'padding' ) }\n\t\t\t\t\t\tisShownByDefault={ defaultSpacingControls?.padding }\n\t\t\t\t\t\tpanelId={ props.clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PaddingEdit { ...props } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t) }\n\t\t\t\t{ ! isMarginDisabled && (\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tclassName={ spacingClassnames }\n\t\t\t\t\t\thasValue={ () => hasMarginValue( props ) }\n\t\t\t\t\t\tlabel={ __( 'Margin' ) }\n\t\t\t\t\t\tonDeselect={ () => resetMargin( props ) }\n\t\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'margin' ) }\n\t\t\t\t\t\tisShownByDefault={ defaultSpacingControls?.margin }\n\t\t\t\t\t\tpanelId={ props.clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<MarginEdit { ...props } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t) }\n\t\t\t\t{ ! isGapDisabled && (\n\t\t\t\t\t<ToolsPanelItem\n\t\t\t\t\t\tclassName={ spacingClassnames }\n\t\t\t\t\t\thasValue={ () => hasGapValue( props ) }\n\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\tonDeselect={ () => resetGap( props ) }\n\t\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'blockGap' ) }\n\t\t\t\t\t\tisShownByDefault={ defaultSpacingControls?.blockGap }\n\t\t\t\t\t\tpanelId={ props.clientId }\n\t\t\t\t\t>\n\t\t\t\t\t\t<GapEdit { ...props } />\n\t\t\t\t\t</ToolsPanelItem>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t{ ! isPaddingDisabled && <PaddingVisualizer { ...props } /> }\n\t\t\t{ ! isMarginDisabled && <MarginVisualizer { ...props } /> }\n\t\t</>\n\t);\n}\n\n/**\n * Determine whether there is dimensions related block support.\n *\n * @param {string} blockName Block name.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasDimensionsSupport( blockName ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\thasGapSupport( blockName ) ||\n\t\thasPaddingSupport( blockName ) ||\n\t\thasMarginSupport( blockName )\n\t);\n}\n\n/**\n * Determines whether dimensions support has been disabled.\n *\n * @param {Object} props Block properties.\n *\n * @return {boolean} If spacing support is completely disabled.\n */\nconst useIsDimensionsDisabled = ( props = {} ) => {\n\tconst gapDisabled = useIsGapDisabled( props );\n\tconst paddingDisabled = useIsPaddingDisabled( props );\n\tconst marginDisabled = useIsMarginDisabled( props );\n\n\treturn gapDisabled && paddingDisabled && marginDisabled;\n};\n\n/**\n * Custom hook to retrieve which padding/margin/blockGap is supported\n * e.g. top, right, bottom or left.\n *\n * Sides are opted into by default. It is only if a specific side is set to\n * false that it is omitted.\n *\n * @param {string} blockName Block name.\n * @param {string} feature   The feature custom sides relate to e.g. padding or margins.\n *\n * @return {?string[]} Strings representing the custom sides available.\n */\nexport function useCustomSides( blockName, feature ) {\n\tconst support = getBlockSupport( blockName, SPACING_SUPPORT_KEY );\n\n\t// Skip when setting is boolean as theme isn't setting arbitrary sides.\n\tif ( ! support || typeof support[ feature ] === 'boolean' ) {\n\t\treturn;\n\t}\n\n\t// Return if the setting is an array of sides (e.g. `[ 'top', 'bottom' ]`).\n\tif ( Array.isArray( support[ feature ] ) ) {\n\t\treturn support[ feature ];\n\t}\n\n\t// Finally, attempt to return `.sides` if the setting is an object.\n\tif ( support[ feature ]?.sides ) {\n\t\treturn support[ feature ].sides;\n\t}\n}\n\n/**\n * Custom hook to determine whether the sides configured in the\n * block support are valid. A dimension property cannot declare\n * support for a mix of axial and individual sides.\n *\n * @param {string} blockName Block name.\n * @param {string} feature   The feature custom sides relate to e.g. padding or margins.\n *\n * @return {boolean} If the feature has a valid configuration of sides.\n */\nexport function useIsDimensionsSupportValid( blockName, feature ) {\n\tconst sides = useCustomSides( blockName, feature );\n\n\tif (\n\t\tsides &&\n\t\tsides.some( ( side ) => ALL_SIDES.includes( side ) ) &&\n\t\tsides.some( ( side ) => AXIAL_SIDES.includes( side ) )\n\t) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn(\n\t\t\t`The ${ feature } support for the \"${ blockName }\" block can not be configured to support both axial and arbitrary sides.`\n\t\t);\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Platform } from '@wordpress/element';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalBoxControl as BoxControl,\n\t__experimentalUnitControl as UnitControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { __unstableUseBlockRef as useBlockRef } from '../components/block-list/use-block-props/use-block-refs';\nimport { getSpacingPresetCssVar } from '../components/spacing-sizes-control/utils';\nimport SpacingSizesControl from '../components/spacing-sizes-control';\nimport useSetting from '../components/use-setting';\nimport { AXIAL_SIDES, SPACING_SUPPORT_KEY, useCustomSides } from './dimensions';\nimport { cleanEmptyObject } from './utils';\n\n/**\n * Determines if there is gap support.\n *\n * @param {string|Object} blockType Block name or Block Type object.\n * @return {boolean}                Whether there is support.\n */\nexport function hasGapSupport( blockType ) {\n\tconst support = getBlockSupport( blockType, SPACING_SUPPORT_KEY );\n\treturn !! ( true === support || support?.blockGap );\n}\n\n/**\n * Checks if there is a current value in the gap block support attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean}      Whether or not the block has a gap value set.\n */\nexport function hasGapValue( props ) {\n\treturn props.attributes.style?.spacing?.blockGap !== undefined;\n}\n\n/**\n * Returns a BoxControl object value from a given blockGap style value.\n * The string check is for backwards compatibility before Gutenberg supported\n * split gap values (row and column) and the value was a string n + unit.\n *\n * @param {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @return {Object|null}                    A value to pass to the BoxControl component.\n */\nexport function getGapBoxControlValueFromStyle( blockGapValue ) {\n\tif ( ! blockGapValue ) {\n\t\treturn null;\n\t}\n\n\tconst isValueString = typeof blockGapValue === 'string';\n\treturn {\n\t\ttop: isValueString ? blockGapValue : blockGapValue?.top,\n\t\tleft: isValueString ? blockGapValue : blockGapValue?.left,\n\t};\n}\n\n/**\n * Returns a CSS value for the `gap` property from a given blockGap style.\n *\n * @param {string? | Object?} blockGapValue A block gap string or axial object value, e.g., '10px' or { top: '10px', left: '10px'}.\n * @param {string?}           defaultValue  A default gap value.\n * @return {string|null}                    The concatenated gap value (row and column).\n */\nexport function getGapCSSValue( blockGapValue, defaultValue = '0' ) {\n\tconst blockGapBoxControlValue =\n\t\tgetGapBoxControlValueFromStyle( blockGapValue );\n\tif ( ! blockGapBoxControlValue ) {\n\t\treturn null;\n\t}\n\n\tconst row =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.top ) || defaultValue;\n\tconst column =\n\t\tgetSpacingPresetCssVar( blockGapBoxControlValue?.left ) || defaultValue;\n\n\treturn row === column ? row : `${ row } ${ column }`;\n}\n\n/**\n * Resets the gap block support attribute. This can be used when disabling\n * the gap support controls for a block via a progressive discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetGap( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tblockGap: undefined,\n\t\t\t},\n\t\t},\n\t} );\n}\n\n/**\n * Custom hook that checks if gap settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean}     Whether the gap setting is disabled.\n */\nexport function useIsGapDisabled( { name: blockName } = {} ) {\n\tconst isDisabled = ! useSetting( 'spacing.blockGap' );\n\treturn ! hasGapSupport( blockName ) || isDisabled;\n}\n\n/**\n * Inspector control panel containing the gap related configuration\n *\n * @param {Object} props\n *\n * @return {WPElement} Gap edit element.\n */\nexport function GapEdit( props ) {\n\tconst {\n\t\tclientId,\n\t\tattributes: { style },\n\t\tname: blockName,\n\t\tsetAttributes,\n\t} = props;\n\n\tconst spacingSizes = useSetting( 'spacing.spacingSizes' );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t} );\n\tconst sides = useCustomSides( blockName, 'blockGap' );\n\tconst ref = useBlockRef( clientId );\n\n\tif ( useIsGapDisabled( props ) ) {\n\t\treturn null;\n\t}\n\n\tconst splitOnAxis =\n\t\tsides && sides.some( ( side ) => AXIAL_SIDES.includes( side ) );\n\n\tconst onChange = ( next ) => {\n\t\tlet blockGap = next;\n\n\t\t// If splitOnAxis activated we need to return a BoxControl object to the BoxControl component.\n\t\tif ( !! next && splitOnAxis ) {\n\t\t\tblockGap = { ...getGapBoxControlValueFromStyle( next ) };\n\t\t} else if ( next?.hasOwnProperty( 'top' ) ) {\n\t\t\t// If splitOnAxis is not enabled, treat the 'top' value as the shorthand gap value.\n\t\t\tblockGap = next.top;\n\t\t}\n\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\tspacing: {\n\t\t\t\t...style?.spacing,\n\t\t\t\tblockGap,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t} );\n\n\t\t// In Safari, changing the `gap` CSS value on its own will not trigger the layout\n\t\t// to be recalculated / re-rendered. To force the updated gap to re-render, here\n\t\t// we replace the block's node with itself.\n\t\tconst isSafari =\n\t\t\twindow?.navigator.userAgent &&\n\t\t\twindow.navigator.userAgent.includes( 'Safari' ) &&\n\t\t\t! window.navigator.userAgent.includes( 'Chrome ' ) &&\n\t\t\t! window.navigator.userAgent.includes( 'Chromium ' );\n\n\t\tif ( ref.current && isSafari ) {\n\t\t\tref.current.parentNode?.replaceChild( ref.current, ref.current );\n\t\t}\n\t};\n\n\tconst gapValue = getGapBoxControlValueFromStyle( style?.spacing?.blockGap );\n\n\t// The BoxControl component expects a full complement of side values.\n\t// Gap row and column values translate to top/bottom and left/right respectively.\n\tconst boxControlGapValue = splitOnAxis\n\t\t? {\n\t\t\t\t...gapValue,\n\t\t\t\tright: gapValue?.left,\n\t\t\t\tbottom: gapValue?.top,\n\t\t  }\n\t\t: {\n\t\t\t\ttop: gapValue?.top,\n\t\t  };\n\n\treturn Platform.select( {\n\t\tweb: (\n\t\t\t<>\n\t\t\t\t{ ( ! spacingSizes || spacingSizes?.length === 0 ) &&\n\t\t\t\t\t( splitOnAxis ? (\n\t\t\t\t\t\t<BoxControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\tsides={ sides }\n\t\t\t\t\t\t\tvalues={ boxControlGapValue }\n\t\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\t\tsplitOnAxis={ splitOnAxis }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t\t// Default to `row` for combined values.\n\t\t\t\t\t\t\tvalue={ boxControlGapValue }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t{ spacingSizes?.length > 0 && (\n\t\t\t\t\t<SpacingSizesControl\n\t\t\t\t\t\tvalues={ boxControlGapValue }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tlabel={ __( 'Block spacing' ) }\n\t\t\t\t\t\tsides={ splitOnAxis ? sides : [ 'top' ] } // Use 'top' as the shorthand property in non-axial configurations.\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tallowReset={ false }\n\t\t\t\t\t\tsplitOnAxis={ splitOnAxis }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t),\n\t\tnative: null,\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport const alignBottom = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15 4H9v11h6V4zM4 18.5V20h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport const alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 11h-5V4H9v7H4v1.5h5V20h6v-7.5h5z\" />\n\t</SVG>\n);\n\nexport const alignTop = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9 20h6V9H9v11zM4 4v1.5h16V4H4z\" />\n\t</SVG>\n);\n","/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\nimport { ToolbarGroup, ToolbarDropdownMenu } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { alignTop, alignCenter, alignBottom } from './icons';\n\nconst BLOCK_ALIGNMENTS_CONTROLS = {\n\ttop: {\n\t\ticon: alignTop,\n\t\ttitle: _x( 'Align top', 'Block vertical alignment setting' ),\n\t},\n\tcenter: {\n\t\ticon: alignCenter,\n\t\ttitle: _x( 'Align middle', 'Block vertical alignment setting' ),\n\t},\n\tbottom: {\n\t\ticon: alignBottom,\n\t\ttitle: _x( 'Align bottom', 'Block vertical alignment setting' ),\n\t},\n};\n\nconst DEFAULT_CONTROLS = [ 'top', 'center', 'bottom' ];\nconst DEFAULT_CONTROL = 'top';\n\nconst POPOVER_PROPS = {\n\tisAlternate: true,\n};\n\nfunction BlockVerticalAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols = DEFAULT_CONTROLS,\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar\n\t\t? { isCollapsed }\n\t\t: { popoverProps: { POPOVER_PROPS } };\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={\n\t\t\t\tactiveAlignment\n\t\t\t\t\t? activeAlignment.icon\n\t\t\t\t\t: defaultAlignmentControl.icon\n\t\t\t}\n\t\t\tlabel={ _x(\n\t\t\t\t'Change vertical alignment',\n\t\t\t\t'Block vertical alignment setting label'\n\t\t\t) }\n\t\t\tcontrols={ controls.map( ( control ) => {\n\t\t\t\treturn {\n\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ control ],\n\t\t\t\t\tisActive: value === control,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( control ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-toolbar/README.md\n */\nexport default BlockVerticalAlignmentUI;\n","/**\n * Internal dependencies\n */\nimport BlockVerticalAlignmentUI from './ui';\n\nconst BlockVerticalAlignmentControl = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar={ false } />;\n};\n\nconst BlockVerticalAlignmentToolbar = ( props ) => {\n\treturn <BlockVerticalAlignmentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-vertical-alignment-control/README.md\n */\nexport { BlockVerticalAlignmentControl, BlockVerticalAlignmentToolbar };\n","/**\n * WordPress dependencies\n */\nimport { ToolbarDropdownMenu, ToolbarGroup } from '@wordpress/components';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nconst icons = {\n\tleft: justifyLeft,\n\tcenter: justifyCenter,\n\tright: justifyRight,\n\t'space-between': justifySpaceBetween,\n};\n\nfunction JustifyContentUI( {\n\tallowedControls = [ 'left', 'center', 'right', 'space-between' ],\n\tisCollapsed = true,\n\tonChange,\n\tvalue,\n\tpopoverProps,\n\tisToolbar,\n} ) {\n\t// If the control is already selected we want a click\n\t// again on the control to deselect the item, so we\n\t// call onChange( undefined )\n\tconst handleClick = ( next ) => {\n\t\tif ( next === value ) {\n\t\t\tonChange( undefined );\n\t\t} else {\n\t\t\tonChange( next );\n\t\t}\n\t};\n\n\tconst icon = value ? icons[ value ] : icons.left;\n\tconst allControls = [\n\t\t{\n\t\t\tname: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\ttitle: __( 'Justify items left' ),\n\t\t\tisActive: 'left' === value,\n\t\t\tonClick: () => handleClick( 'left' ),\n\t\t},\n\t\t{\n\t\t\tname: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\ttitle: __( 'Justify items center' ),\n\t\t\tisActive: 'center' === value,\n\t\t\tonClick: () => handleClick( 'center' ),\n\t\t},\n\t\t{\n\t\t\tname: 'right',\n\t\t\ticon: justifyRight,\n\t\t\ttitle: __( 'Justify items right' ),\n\t\t\tisActive: 'right' === value,\n\t\t\tonClick: () => handleClick( 'right' ),\n\t\t},\n\t\t{\n\t\t\tname: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\ttitle: __( 'Space between items' ),\n\t\t\tisActive: 'space-between' === value,\n\t\t\tonClick: () => handleClick( 'space-between' ),\n\t\t},\n\t];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar ? { isCollapsed } : {};\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={ icon }\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tlabel={ __( 'Change items justification' ) }\n\t\t\tcontrols={ allControls.filter( ( elem ) =>\n\t\t\t\tallowedControls.includes( elem.name )\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\nexport default JustifyContentUI;\n","/**\n * Internal dependencies\n */\nimport JustifyContentUI from './ui';\n\nconst JustifyContentControl = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar={ false } />;\n};\n\nconst JustifyToolbar = ( props ) => {\n\treturn <JustifyContentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/justify-content-control/README.md\n */\nexport { JustifyContentControl, JustifyToolbar };\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n\tjustifySpaceBetween,\n\tarrowRight,\n\tarrowDown,\n} from '@wordpress/icons';\nimport { Button, ToggleControl, Flex, FlexItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { appendSelectors, getBlockGapCSS } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport {\n\tBlockControls,\n\tJustifyContentControl,\n\tBlockVerticalAlignmentControl,\n} from '../components';\nimport { shouldSkipSerialization } from '../hooks/utils';\n\n// Used with the default, horizontal flex orientation.\nconst justifyContentMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n\t'space-between': 'space-between',\n};\n\n// Used with the vertical (column) flex orientation.\nconst alignItemsMap = {\n\tleft: 'flex-start',\n\tright: 'flex-end',\n\tcenter: 'center',\n};\n\nconst verticalAlignmentMap = {\n\ttop: 'flex-start',\n\tcenter: 'center',\n\tbottom: 'flex-end',\n};\n\nconst flexWrapOptions = [ 'wrap', 'nowrap' ];\n\nexport default {\n\tname: 'flex',\n\tlabel: __( 'Flex' ),\n\tinspectorControls: function FlexLayoutInspectorControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport = {},\n\t} ) {\n\t\tconst { allowOrientation = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Flex>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ allowOrientation && (\n\t\t\t\t\t\t\t<OrientationControl\n\t\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t\t<FlexWrapControl layout={ layout } onChange={ onChange } />\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function FlexLayoutToolbarControls( {\n\t\tlayout = {},\n\t\tonChange,\n\t\tlayoutBlockSupport,\n\t} ) {\n\t\tif ( layoutBlockSupport?.allowSwitching ) {\n\t\t\treturn null;\n\t\t}\n\t\tconst { allowVerticalAlignment = true } = layoutBlockSupport;\n\t\treturn (\n\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t<FlexLayoutJustifyContentControl\n\t\t\t\t\tlayout={ layout }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tisToolbar\n\t\t\t\t/>\n\t\t\t\t{ allowVerticalAlignment &&\n\t\t\t\t\tlayout?.orientation !== 'vertical' && (\n\t\t\t\t\t\t<FlexLayoutVerticalAlignmentControl\n\t\t\t\t\t\t\tlayout={ layout }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tisToolbar\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t</BlockControls>\n\t\t);\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions,\n\t} ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\n\t\t// If a block's block.json skips serialization for spacing or spacing.blockGap,\n\t\t// don't apply the user-defined value to the styles.\n\t\tconst blockGapValue =\n\t\t\tstyle?.spacing?.blockGap &&\n\t\t\t! shouldSkipSerialization( blockName, 'spacing', 'blockGap' )\n\t\t\t\t? getGapCSSValue( style?.spacing?.blockGap, '0.5em' )\n\t\t\t\t: undefined;\n\t\tconst justifyContent = justifyContentMap[ layout.justifyContent ];\n\t\tconst flexWrap = flexWrapOptions.includes( layout.flexWrap )\n\t\t\t? layout.flexWrap\n\t\t\t: 'wrap';\n\t\tconst verticalAlignment =\n\t\t\tverticalAlignmentMap[ layout.verticalAlignment ];\n\t\tconst alignItems =\n\t\t\talignItemsMap[ layout.justifyContent ] || alignItemsMap.left;\n\n\t\tlet output = '';\n\t\tconst rules = [];\n\n\t\tif ( flexWrap && flexWrap !== 'wrap' ) {\n\t\t\trules.push( `flex-wrap: ${ flexWrap }` );\n\t\t}\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tif ( verticalAlignment ) {\n\t\t\t\trules.push( `align-items: ${ verticalAlignment }` );\n\t\t\t}\n\t\t\tif ( justifyContent ) {\n\t\t\t\trules.push( `justify-content: ${ justifyContent }` );\n\t\t\t}\n\t\t} else {\n\t\t\trules.push( 'flex-direction: column' );\n\t\t\trules.push( `align-items: ${ alignItems }` );\n\t\t}\n\n\t\tif ( rules.length ) {\n\t\t\toutput = `${ appendSelectors( selector ) } {\n\t\t\t\t${ rules.join( '; ' ) };\n\t\t\t}`;\n\t\t}\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'flex',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation( layout ) {\n\t\tconst { orientation = 'horizontal' } = layout;\n\t\treturn orientation;\n\t},\n\tgetAlignments() {\n\t\treturn [];\n\t},\n};\n\nfunction FlexLayoutVerticalAlignmentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { verticalAlignment = verticalAlignmentMap.center } = layout;\n\n\tconst onVerticalAlignmentChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tverticalAlignment: value,\n\t\t} );\n\t};\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<BlockVerticalAlignmentControl\n\t\t\t\tonChange={ onVerticalAlignmentChange }\n\t\t\t\tvalue={ verticalAlignment }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst verticalAlignmentOptions = [\n\t\t{\n\t\t\tvalue: 'flex-start',\n\t\t\tlabel: __( 'Align items top' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\tlabel: __( 'Align items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'flex-end',\n\t\t\tlabel: __( 'Align items bottom' ),\n\t\t},\n\t];\n\n\treturn (\n\t\t<fieldset className=\"block-editor-hooks__flex-layout-vertical-alignment-control\">\n\t\t\t<legend>{ __( 'Vertical alignment' ) }</legend>\n\t\t\t<div>\n\t\t\t\t{ verticalAlignmentOptions.map( ( value, icon, label ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisPressed={ verticalAlignment === value }\n\t\t\t\t\t\t\tonClick={ () => onVerticalAlignmentChange( value ) }\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\nfunction FlexLayoutJustifyContentControl( {\n\tlayout,\n\tonChange,\n\tisToolbar = false,\n} ) {\n\tconst { justifyContent = 'left', orientation = 'horizontal' } = layout;\n\tconst onJustificationChange = ( value ) => {\n\t\tonChange( {\n\t\t\t...layout,\n\t\t\tjustifyContent: value,\n\t\t} );\n\t};\n\tconst allowedControls = [ 'left', 'center', 'right' ];\n\tif ( orientation === 'horizontal' ) {\n\t\tallowedControls.push( 'space-between' );\n\t}\n\tif ( isToolbar ) {\n\t\treturn (\n\t\t\t<JustifyContentControl\n\t\t\t\tallowedControls={ allowedControls }\n\t\t\t\tvalue={ justifyContent }\n\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tposition: 'bottom right',\n\t\t\t\t\tisAlternate: true,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst justificationOptions = [\n\t\t{\n\t\t\tvalue: 'left',\n\t\t\ticon: justifyLeft,\n\t\t\tlabel: __( 'Justify items left' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'center',\n\t\t\ticon: justifyCenter,\n\t\t\tlabel: __( 'Justify items center' ),\n\t\t},\n\t\t{\n\t\t\tvalue: 'right',\n\t\t\ticon: justifyRight,\n\t\t\tlabel: __( 'Justify items right' ),\n\t\t},\n\t];\n\tif ( orientation === 'horizontal' ) {\n\t\tjustificationOptions.push( {\n\t\t\tvalue: 'space-between',\n\t\t\ticon: justifySpaceBetween,\n\t\t\tlabel: __( 'Space between items' ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<fieldset className=\"block-editor-hooks__flex-layout-justification-controls\">\n\t\t\t<legend>{ __( 'Justification' ) }</legend>\n\t\t\t<div>\n\t\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tisPressed={ justifyContent === value }\n\t\t\t\t\t\t\tonClick={ () => onJustificationChange( value ) }\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\nfunction FlexWrapControl( { layout, onChange } ) {\n\tconst { flexWrap = 'wrap' } = layout;\n\treturn (\n\t\t<ToggleControl\n\t\t\tlabel={ __( 'Allow to wrap to multiple lines' ) }\n\t\t\tonChange={ ( value ) => {\n\t\t\t\tonChange( {\n\t\t\t\t\t...layout,\n\t\t\t\t\tflexWrap: value ? 'wrap' : 'nowrap',\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tchecked={ flexWrap === 'wrap' }\n\t\t/>\n\t);\n}\n\nfunction OrientationControl( { layout, onChange } ) {\n\tconst { orientation = 'horizontal' } = layout;\n\treturn (\n\t\t<fieldset className=\"block-editor-hooks__flex-layout-orientation-controls\">\n\t\t\t<legend>{ __( 'Orientation' ) }</legend>\n\t\t\t<Button\n\t\t\t\tlabel={ __( 'Horizontal' ) }\n\t\t\t\ticon={ arrowRight }\n\t\t\t\tisPressed={ orientation === 'horizontal' }\n\t\t\t\tonClick={ () =>\n\t\t\t\t\tonChange( {\n\t\t\t\t\t\t...layout,\n\t\t\t\t\t\torientation: 'horizontal',\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\tlabel={ __( 'Vertical' ) }\n\t\t\t\ticon={ arrowDown }\n\t\t\t\tisPressed={ orientation === 'vertical' }\n\t\t\t\tonClick={ () =>\n\t\t\t\t\tonChange( {\n\t\t\t\t\t\t...layout,\n\t\t\t\t\t\torientation: 'vertical',\n\t\t\t\t\t} )\n\t\t\t\t}\n\t\t\t/>\n\t\t</fieldset>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { shouldSkipSerialization } from '../hooks/utils';\n\nexport default {\n\tname: 'default',\n\tlabel: __( 'Flow' ),\n\tinspectorControls: function DefaultLayoutInspectorControls() {\n\t\treturn null;\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls() {\n\t\treturn null;\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions,\n\t} ) {\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tlet output = '';\n\n\t\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'default',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\t\tconst { contentSize, wideSize } = layout;\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\tif ( contentSize ) {\n\t\t\talignments.unshift( { name: 'full' } );\n\t\t}\n\n\t\tif ( wideSize ) {\n\t\t\talignments.unshift( { name: 'wide', info: alignmentInfo.wide } );\n\t\t}\n\n\t\talignments.unshift( { name: 'none', info: alignmentInfo.none } );\n\n\t\treturn alignments;\n\t},\n};\n","/**\n * WordPress dependencies\n */\nimport { cloneElement } 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 specifiying the icon size in pixels\n *                          Other props will be passed to wrapped SVG component\n *\n * @return {JSX.Element}  Icon component\n */\nfunction Icon( { icon, size = 24, ...props } ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t} );\n}\n\nexport default Icon;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst positionCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z\" />\n\t</SVG>\n);\n\nexport default positionCenter;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst stretchWide = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 9v6h14V9H5zm11-4.8H8v1.5h8V4.2zM8 19.8h8v-1.5H8v1.5z\" />\n\t</SVG>\n);\n\nexport default stretchWide;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"styleEngine\"];","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tIcon,\n\tpositionCenter,\n\tstretchWide,\n\tjustifyLeft,\n\tjustifyCenter,\n\tjustifyRight,\n} from '@wordpress/icons';\nimport { getCSSRules } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../components/use-setting';\nimport { appendSelectors, getBlockGapCSS, getAlignmentsInfo } from './utils';\nimport { getGapCSSValue } from '../hooks/gap';\nimport { shouldSkipSerialization } from '../hooks/utils';\n\nexport default {\n\tname: 'constrained',\n\tlabel: __( 'Constrained' ),\n\tinspectorControls: function DefaultLayoutInspectorControls( {\n\t\tlayout,\n\t\tonChange,\n\t} ) {\n\t\tconst { wideSize, contentSize, justifyContent = 'center' } = layout;\n\t\tconst onJustificationChange = ( value ) => {\n\t\t\tonChange( {\n\t\t\t\t...layout,\n\t\t\t\tjustifyContent: value,\n\t\t\t} );\n\t\t};\n\t\tconst justificationOptions = [\n\t\t\t{\n\t\t\t\tvalue: 'left',\n\t\t\t\ticon: justifyLeft,\n\t\t\t\tlabel: __( 'Justify items left' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'center',\n\t\t\t\ticon: justifyCenter,\n\t\t\t\tlabel: __( 'Justify items center' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tvalue: 'right',\n\t\t\t\ticon: justifyRight,\n\t\t\t\tlabel: __( 'Justify items right' ),\n\t\t\t},\n\t\t];\n\t\tconst units = useCustomUnits( {\n\t\t\tavailableUnits: useSetting( 'spacing.units' ) || [\n\t\t\t\t'%',\n\t\t\t\t'px',\n\t\t\t\t'em',\n\t\t\t\t'rem',\n\t\t\t\t'vw',\n\t\t\t],\n\t\t} );\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className=\"block-editor-hooks__layout-controls\">\n\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Content' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ contentSize || wideSize || '' }\n\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\tcontentSize: nextWidth,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Icon icon={ positionCenter } />\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"block-editor-hooks__layout-controls-unit\">\n\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\tlabel={ __( 'Wide' ) }\n\t\t\t\t\t\t\tlabelPosition=\"top\"\n\t\t\t\t\t\t\t__unstableInputWidth=\"80px\"\n\t\t\t\t\t\t\tvalue={ wideSize || contentSize || '' }\n\t\t\t\t\t\t\tonChange={ ( nextWidth ) => {\n\t\t\t\t\t\t\t\tnextWidth =\n\t\t\t\t\t\t\t\t\t0 > parseFloat( nextWidth )\n\t\t\t\t\t\t\t\t\t\t? '0'\n\t\t\t\t\t\t\t\t\t\t: nextWidth;\n\t\t\t\t\t\t\t\tonChange( {\n\t\t\t\t\t\t\t\t\t...layout,\n\t\t\t\t\t\t\t\t\twideSize: nextWidth,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Icon icon={ stretchWide } />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<p className=\"block-editor-hooks__layout-controls-helptext\">\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the width for all elements that are assigned to the center or wide columns.'\n\t\t\t\t\t) }\n\t\t\t\t</p>\n\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t__experimentalIsBorderless\n\t\t\t\t\tlabel={ __( 'Justification' ) }\n\t\t\t\t\tvalue={ justifyContent }\n\t\t\t\t\tonChange={ onJustificationChange }\n\t\t\t\t>\n\t\t\t\t\t{ justificationOptions.map( ( { value, icon, label } ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ToggleGroupControlOptionIcon\n\t\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\tlabel={ label }\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</ToggleGroupControl>\n\t\t\t</>\n\t\t);\n\t},\n\ttoolBarControls: function DefaultLayoutToolbarControls() {\n\t\treturn null;\n\t},\n\tgetLayoutStyle: function getLayoutStyle( {\n\t\tselector,\n\t\tlayout = {},\n\t\tstyle,\n\t\tblockName,\n\t\thasBlockGapSupport,\n\t\tlayoutDefinitions,\n\t} ) {\n\t\tconst { contentSize, wideSize, justifyContent } = layout;\n\t\tconst blockGapStyleValue = getGapCSSValue( style?.spacing?.blockGap );\n\n\t\t// If a block's block.json skips serialization for spacing or\n\t\t// spacing.blockGap, don't apply the user-defined value to the styles.\n\t\tlet blockGapValue = '';\n\t\tif ( ! shouldSkipSerialization( blockName, 'spacing', 'blockGap' ) ) {\n\t\t\t// If an object is provided only use the 'top' value for this kind of gap.\n\t\t\tif ( blockGapStyleValue?.top ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue?.top );\n\t\t\t} else if ( typeof blockGapStyleValue === 'string' ) {\n\t\t\t\tblockGapValue = getGapCSSValue( blockGapStyleValue );\n\t\t\t}\n\t\t}\n\n\t\tconst marginLeft =\n\t\t\tjustifyContent === 'left' ? '0 !important' : 'auto !important';\n\t\tconst marginRight =\n\t\t\tjustifyContent === 'right' ? '0 !important' : 'auto !important';\n\n\t\tlet output =\n\t\t\t!! contentSize || !! wideSize\n\t\t\t\t? `\n\t\t\t\t\t${ appendSelectors(\n\t\t\t\t\t\tselector,\n\t\t\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t\t\t) } {\n\t\t\t\t\t\tmax-width: ${ contentSize ?? wideSize };\n\t\t\t\t\t\tmargin-left: ${ marginLeft };\n\t\t\t\t\t\tmargin-right: ${ marginRight };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignwide' ) }  {\n\t\t\t\t\t\tmax-width: ${ wideSize ?? contentSize };\n\t\t\t\t\t}\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmax-width: none;\n\t\t\t\t\t}\n\t\t\t\t`\n\t\t\t\t: '';\n\n\t\tif ( justifyContent === 'left' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-left: ${ marginLeft }; }`;\n\t\t} else if ( justifyContent === 'right' ) {\n\t\t\toutput += `${ appendSelectors(\n\t\t\t\tselector,\n\t\t\t\t'> :where(:not(.alignleft):not(.alignright):not(.alignfull))'\n\t\t\t) }\n\t\t\t{ margin-right: ${ marginRight }; }`;\n\t\t}\n\n\t\t// If there is custom padding, add negative margins for alignfull blocks.\n\t\tif ( style?.spacing?.padding ) {\n\t\t\t// The style object might be storing a preset so we need to make sure we get a usable value.\n\t\t\tconst paddingValues = getCSSRules( style );\n\t\t\tpaddingValues.forEach( ( rule ) => {\n\t\t\t\tif ( rule.key === 'paddingRight' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-right: calc(${ rule.value } * -1);\n\t\t\t\t\t}\n\t\t\t\t\t`;\n\t\t\t\t} else if ( rule.key === 'paddingLeft' ) {\n\t\t\t\t\toutput += `\n\t\t\t\t\t${ appendSelectors( selector, '> .alignfull' ) } {\n\t\t\t\t\t\tmargin-left: calc(${ rule.value } * -1);\n\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\t// Output blockGap styles based on rules contained in layout definitions in theme.json.\n\t\tif ( hasBlockGapSupport && blockGapValue ) {\n\t\t\toutput += getBlockGapCSS(\n\t\t\t\tselector,\n\t\t\t\tlayoutDefinitions,\n\t\t\t\t'constrained',\n\t\t\t\tblockGapValue\n\t\t\t);\n\t\t}\n\t\treturn output;\n\t},\n\tgetOrientation() {\n\t\treturn 'vertical';\n\t},\n\tgetAlignments( layout ) {\n\t\tconst alignmentInfo = getAlignmentsInfo( layout );\n\t\tif ( layout.alignments !== undefined ) {\n\t\t\tif ( ! layout.alignments.includes( 'none' ) ) {\n\t\t\t\tlayout.alignments.unshift( 'none' );\n\t\t\t}\n\t\t\treturn layout.alignments.map( ( alignment ) => ( {\n\t\t\t\tname: alignment,\n\t\t\t\tinfo: alignmentInfo[ alignment ],\n\t\t\t} ) );\n\t\t}\n\t\tconst { contentSize, wideSize } = layout;\n\n\t\tconst alignments = [\n\t\t\t{ name: 'left' },\n\t\t\t{ name: 'center' },\n\t\t\t{ name: 'right' },\n\t\t];\n\n\t\tif ( contentSize ) {\n\t\t\talignments.unshift( { name: 'full' } );\n\t\t}\n\n\t\tif ( wideSize ) {\n\t\t\talignments.unshift( { name: 'wide', info: alignmentInfo.wide } );\n\t\t}\n\n\t\talignments.unshift( { name: 'none', info: alignmentInfo.none } );\n\n\t\treturn alignments;\n\t},\n};\n","/**\n * Internal dependencies\n */\nimport flex from './flex';\nimport flow from './flow';\nimport constrained from './constrained';\n\nconst layoutTypes = [ flow, flex, constrained ];\n\n/**\n * Retrieves a layout type by name.\n *\n * @param {string} name - The name of the layout type.\n * @return {Object} Layout type.\n */\nexport function getLayoutType( name = 'default' ) {\n\treturn layoutTypes.find( ( layoutType ) => layoutType.name === name );\n}\n\n/**\n * Retrieves the available layout types.\n *\n * @return {Array} Layout types.\n */\nexport function getLayoutTypes() {\n\treturn layoutTypes;\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getLayoutType } from '../../layouts';\nimport useSetting from '../use-setting';\n\nexport const defaultLayout = { type: 'default' };\n\nconst Layout = createContext( defaultLayout );\n\n/**\n * Allows to define the layout.\n */\nexport const LayoutProvider = Layout.Provider;\n\n/**\n * React hook used to retrieve the layout config.\n */\nexport function useLayout() {\n\treturn useContext( Layout );\n}\n\nexport function LayoutStyle( { layout = {}, css, ...props } ) {\n\tconst layoutType = getLayoutType( layout.type );\n\tconst blockGapSupport = useSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\tif ( layoutType ) {\n\t\tif ( css ) {\n\t\t\treturn <style>{ css }</style>;\n\t\t}\n\t\tconst layoutStyle = layoutType.getLayoutStyle?.( {\n\t\t\thasBlockGapSupport,\n\t\t\tlayout,\n\t\t\t...props,\n\t\t} );\n\t\tif ( layoutStyle ) {\n\t\t\treturn <style>{ layoutStyle }</style>;\n\t\t}\n\t}\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useLayout } from '../block-list/layout';\nimport { store as blockEditorStore } from '../../store';\nimport { getLayoutType } from '../../layouts';\n\nconst DEFAULT_CONTROLS = [ 'none', 'left', 'center', 'right', 'wide', 'full' ];\nconst WIDE_CONTROLS = [ 'wide', 'full' ];\n\nexport default function useAvailableAlignments( controls = DEFAULT_CONTROLS ) {\n\t// Always add the `none` option if not exists.\n\tif ( ! controls.includes( 'none' ) ) {\n\t\tcontrols = [ 'none', ...controls ];\n\t}\n\tconst { wideControlsEnabled = false, themeSupportsLayout } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\treturn {\n\t\t\t\twideControlsEnabled: settings.alignWide,\n\t\t\t\tthemeSupportsLayout: settings.supportsLayout,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst layout = useLayout();\n\tconst layoutType = getLayoutType( layout?.type );\n\tconst layoutAlignments = layoutType.getAlignments( layout );\n\n\tif ( themeSupportsLayout ) {\n\t\tconst alignments = layoutAlignments.filter(\n\t\t\t( { name: alignmentName } ) => controls.includes( alignmentName )\n\t\t);\n\t\t// While we treat `none` as an alignment, we shouldn't return it if no\n\t\t// other alignments exist.\n\t\tif ( alignments.length === 1 && alignments[ 0 ].name === 'none' ) {\n\t\t\treturn [];\n\t\t}\n\t\treturn alignments;\n\t}\n\n\t// Starting here, it's the fallback for themes not supporting the layout config.\n\tif ( layoutType.name !== 'default' && layoutType.name !== 'constrained' ) {\n\t\treturn [];\n\t}\n\tconst { alignments: availableAlignments = DEFAULT_CONTROLS } = layout;\n\tconst enabledControls = controls\n\t\t.filter(\n\t\t\t( control ) =>\n\t\t\t\t( layout.alignments || // Ignore the global wideAlignment check if the layout explicitely defines alignments.\n\t\t\t\t\twideControlsEnabled ||\n\t\t\t\t\t! WIDE_CONTROLS.includes( control ) ) &&\n\t\t\t\tavailableAlignments.includes( control )\n\t\t)\n\t\t.map( ( enabledControl ) => ( { name: enabledControl } ) );\n\n\t// While we treat `none` as an alignment, we shouldn't return it if no\n\t// other alignments exist.\n\tif (\n\t\tenabledControls.length === 1 &&\n\t\tenabledControls[ 0 ].name === 'none'\n\t) {\n\t\treturn [];\n\t}\n\n\treturn enabledControls;\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst alignNone = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 15h14V9H5v6zm0 4.8h14v-1.5H5v1.5zM5 4.2v1.5h14V4.2H5z\" />\n\t</SVG>\n);\n\nexport default alignNone;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst positionLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z\" />\n\t</SVG>\n);\n\nexport default positionLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst positionRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z\" />\n\t</SVG>\n);\n\nexport default positionRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst stretchFullWidth = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 4v11h14V4H5zm3 15.8h8v-1.5H8v1.5z\" />\n\t</SVG>\n);\n\nexport default stretchFullWidth;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\talignNone,\n\tpositionCenter,\n\tpositionLeft,\n\tpositionRight,\n\tstretchFullWidth,\n\tstretchWide,\n} from '@wordpress/icons';\n\nexport const BLOCK_ALIGNMENTS_CONTROLS = {\n\tnone: {\n\t\ticon: alignNone,\n\t\ttitle: _x( 'None', 'Alignment option' ),\n\t},\n\tleft: {\n\t\ticon: positionLeft,\n\t\ttitle: __( 'Align left' ),\n\t},\n\tcenter: {\n\t\ticon: positionCenter,\n\t\ttitle: __( 'Align center' ),\n\t},\n\tright: {\n\t\ticon: positionRight,\n\t\ttitle: __( 'Align right' ),\n\t},\n\twide: {\n\t\ticon: stretchWide,\n\t\ttitle: __( 'Wide width' ),\n\t},\n\tfull: {\n\t\ticon: stretchFullWidth,\n\t\ttitle: __( 'Full width' ),\n\t},\n};\n\nexport const DEFAULT_CONTROL = 'none';\n\nexport const POPOVER_PROPS = {\n\tisAlternate: true,\n};\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useAvailableAlignments from './use-available-alignments';\nimport {\n\tBLOCK_ALIGNMENTS_CONTROLS,\n\tDEFAULT_CONTROL,\n\tPOPOVER_PROPS,\n} from './constants';\n\nfunction BlockAlignmentUI( {\n\tvalue,\n\tonChange,\n\tcontrols,\n\tisToolbar,\n\tisCollapsed = true,\n} ) {\n\tconst enabledControls = useAvailableAlignments( controls );\n\tconst hasEnabledControls = !! enabledControls.length;\n\n\tif ( ! hasEnabledControls ) {\n\t\treturn null;\n\t}\n\n\tfunction onChangeAlignment( align ) {\n\t\tonChange( [ value, 'none' ].includes( align ) ? undefined : align );\n\t}\n\n\tconst activeAlignmentControl = BLOCK_ALIGNMENTS_CONTROLS[ value ];\n\tconst defaultAlignmentControl =\n\t\tBLOCK_ALIGNMENTS_CONTROLS[ DEFAULT_CONTROL ];\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst commonProps = {\n\t\ticon: activeAlignmentControl\n\t\t\t? activeAlignmentControl.icon\n\t\t\t: defaultAlignmentControl.icon,\n\t\tlabel: __( 'Align' ),\n\t};\n\tconst extraProps = isToolbar\n\t\t? {\n\t\t\t\tisCollapsed,\n\t\t\t\tcontrols: enabledControls.map( ( { name: controlName } ) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...BLOCK_ALIGNMENTS_CONTROLS[ controlName ],\n\t\t\t\t\t\tisActive:\n\t\t\t\t\t\t\tvalue === controlName ||\n\t\t\t\t\t\t\t( ! value && controlName === 'none' ),\n\t\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\t\tonClick: () => onChangeAlignment( controlName ),\n\t\t\t\t\t};\n\t\t\t\t} ),\n\t\t  }\n\t\t: {\n\t\t\t\ttoggleProps: { describedBy: __( 'Change alignment' ) },\n\t\t\t\tpopoverProps: POPOVER_PROPS,\n\t\t\t\tchildren: ( { onClose } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MenuGroup className=\"block-editor-block-alignment-control__menu-group\">\n\t\t\t\t\t\t\t\t{ enabledControls.map(\n\t\t\t\t\t\t\t\t\t( { name: controlName, info } ) => {\n\t\t\t\t\t\t\t\t\t\tconst { icon, title } =\n\t\t\t\t\t\t\t\t\t\t\tBLOCK_ALIGNMENTS_CONTROLS[\n\t\t\t\t\t\t\t\t\t\t\t\tcontrolName\n\t\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t\t// If no value is provided, mark as selected the `none` option.\n\t\t\t\t\t\t\t\t\t\tconst isSelected =\n\t\t\t\t\t\t\t\t\t\t\tcontrolName === value ||\n\t\t\t\t\t\t\t\t\t\t\t( ! value &&\n\t\t\t\t\t\t\t\t\t\t\t\tcontrolName === 'none' );\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\tkey={ controlName }\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\t\t\ticonPosition=\"left\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={ classNames(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'components-dropdown-menu__menu-item',\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'is-active': isSelected,\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) }\n\t\t\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\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\tonChangeAlignment(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontrolName\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\tonClose();\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\trole=\"menuitemradio\"\n\t\t\t\t\t\t\t\t\t\t\t\tinfo={ info }\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{ title }\n\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\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</MenuGroup>\n\t\t\t\t\t\t</>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t  };\n\n\treturn <UIComponent { ...commonProps } { ...extraProps } />;\n}\n\nexport default BlockAlignmentUI;\n","/**\n * Internal dependencies\n */\nimport BlockAlignmentUI from './ui';\n\nconst BlockAlignmentControl = ( props ) => {\n\treturn <BlockAlignmentUI { ...props } isToolbar={ false } />;\n};\n\nconst BlockAlignmentToolbar = ( props ) => {\n\treturn <BlockAlignmentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-alignment-control/README.md\n */\nexport { BlockAlignmentControl, BlockAlignmentToolbar };\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { without } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { BlockControls, BlockAlignmentControl } from '../components';\nimport useAvailableAlignments from '../components/block-alignment-control/use-available-alignments';\nimport { store as blockEditorStore } from '../store';\n\n/**\n * An array which includes all possible valid alignments,\n * used to validate if an alignment is valid or not.\n *\n * @constant\n * @type {string[]}\n */\nconst ALL_ALIGNMENTS = [ 'left', 'center', 'right', 'wide', 'full' ];\n\n/**\n * An array which includes all wide alignments.\n * In order for this alignments to be valid they need to be supported by the block,\n * and by the theme.\n *\n * @constant\n * @type {string[]}\n */\nconst WIDE_ALIGNMENTS = [ 'wide', 'full' ];\n\n/**\n * Returns the valid alignments.\n * Takes into consideration the aligns supported by a block, if the block supports wide controls or not and if theme supports wide controls or not.\n * Exported just for testing purposes, not exported outside the module.\n *\n * @param {?boolean|string[]} blockAlign          Aligns supported by the block.\n * @param {?boolean}          hasWideBlockSupport True if block supports wide alignments. And False otherwise.\n * @param {?boolean}          hasWideEnabled      True if theme supports wide alignments. And False otherwise.\n *\n * @return {string[]} Valid alignments.\n */\nexport function getValidAlignments(\n\tblockAlign,\n\thasWideBlockSupport = true,\n\thasWideEnabled = true\n) {\n\tlet validAlignments;\n\tif ( Array.isArray( blockAlign ) ) {\n\t\tvalidAlignments = ALL_ALIGNMENTS.filter( ( value ) =>\n\t\t\tblockAlign.includes( value )\n\t\t);\n\t} else if ( blockAlign === true ) {\n\t\t// `true` includes all alignments...\n\t\tvalidAlignments = [ ...ALL_ALIGNMENTS ];\n\t} else {\n\t\tvalidAlignments = [];\n\t}\n\n\tif (\n\t\t! hasWideEnabled ||\n\t\t( blockAlign === true && ! hasWideBlockSupport )\n\t) {\n\t\treturn without( validAlignments, ...WIDE_ALIGNMENTS );\n\t}\n\n\treturn validAlignments;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `align`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.align ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'align' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\talign: {\n\t\t\t\ttype: 'string',\n\t\t\t\t// Allow for '' since it is used by updateAlignment function\n\t\t\t\t// in withToolbarControls for special cases with defined default values.\n\t\t\t\tenum: [ ...ALL_ALIGNMENTS, '' ],\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include new toolbar controls for block\n * alignment, if block defines support.\n *\n * @param {Function} BlockEdit Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withToolbarControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst blockEdit = <BlockEdit { ...props } />;\n\t\tconst { name: blockName } = props;\n\t\t// Compute the block valid alignments by taking into account,\n\t\t// if the theme supports wide alignments or not and the layout's\n\t\t// availble alignments. We do that for conditionally rendering\n\t\t// Slot.\n\t\tconst blockAllowedAlignments = getValidAlignments(\n\t\t\tgetBlockSupport( blockName, 'align' ),\n\t\t\thasBlockSupport( blockName, 'alignWide', true )\n\t\t);\n\n\t\tconst validAlignments = useAvailableAlignments(\n\t\t\tblockAllowedAlignments\n\t\t).map( ( { name } ) => name );\n\t\tconst isContentLocked = useSelect(\n\t\t\t( select ) => {\n\t\t\t\treturn select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).__unstableGetContentLockingParent( props.clientId );\n\t\t\t},\n\t\t\t[ props.clientId ]\n\t\t);\n\t\tif ( ! validAlignments.length || isContentLocked ) {\n\t\t\treturn blockEdit;\n\t\t}\n\n\t\tconst updateAlignment = ( nextAlign ) => {\n\t\t\tif ( ! nextAlign ) {\n\t\t\t\tconst blockType = getBlockType( props.name );\n\t\t\t\tconst blockDefaultAlign = blockType?.attributes?.align?.default;\n\t\t\t\tif ( blockDefaultAlign ) {\n\t\t\t\t\tnextAlign = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\tprops.setAttributes( { align: nextAlign } );\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t\t\t<BlockAlignmentControl\n\t\t\t\t\t\tvalue={ props.attributes.align }\n\t\t\t\t\t\tonChange={ updateAlignment }\n\t\t\t\t\t\tcontrols={ validAlignments }\n\t\t\t\t\t/>\n\t\t\t\t</BlockControls>\n\t\t\t\t{ blockEdit }\n\t\t\t</>\n\t\t);\n\t},\n\t'withToolbarControls'\n);\n\n/**\n * Override the default block element to add alignment wrapper props.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withDataAlign = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { name, attributes } = props;\n\t\tconst { align } = attributes;\n\t\tconst blockAllowedAlignments = getValidAlignments(\n\t\t\tgetBlockSupport( name, 'align' ),\n\t\t\thasBlockSupport( name, 'alignWide', true )\n\t\t);\n\t\tconst validAlignments = useAvailableAlignments(\n\t\t\tblockAllowedAlignments\n\t\t);\n\n\t\t// If an alignment is not assigned, there's no need to go through the\n\t\t// effort to validate or assign its value.\n\t\tif ( align === undefined ) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\n\t\tlet wrapperProps = props.wrapperProps;\n\t\tif (\n\t\t\tvalidAlignments.some( ( alignment ) => alignment.name === align )\n\t\t) {\n\t\t\twrapperProps = { ...wrapperProps, 'data-align': align };\n\t\t}\n\n\t\treturn <BlockListBlock { ...props } wrapperProps={ wrapperProps } />;\n\t}\n);\n\n/**\n * Override props assigned to save component to inject alignment class name if\n * block supports it.\n *\n * @param {Object} props      Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addAssignedAlign( props, blockType, attributes ) {\n\tconst { align } = attributes;\n\tconst blockAlign = getBlockSupport( blockType, 'align' );\n\tconst hasWideBlockSupport = hasBlockSupport( blockType, 'alignWide', true );\n\n\t// Compute valid alignments without taking into account if\n\t// the theme supports wide alignments or not.\n\t// This way changing themes does not impact the block save.\n\tconst isAlignValid = getValidAlignments(\n\t\tblockAlign,\n\t\thasWideBlockSupport\n\t).includes( align );\n\tif ( isAlignValid ) {\n\t\tprops.className = classnames( `align${ align }`, props.className );\n\t}\n\n\treturn props;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/align/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/align/with-data-align',\n\twithDataAlign\n);\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/align/with-toolbar-controls',\n\twithToolbarControls\n);\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/align/addAssignedAlign',\n\taddAssignedAlign\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n\n/**\n * Filters registered block settings, extending attributes to include `lock`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.lock ?? {} ) ) {\n\t\treturn settings;\n\t}\n\t// Gracefully handle if settings.attributes is undefined.\n\tsettings.attributes = {\n\t\t...settings.attributes,\n\t\tlock: {\n\t\t\ttype: 'object',\n\t\t},\n\t};\n\n\treturn settings;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/lock/addAttribute', addAttribute );\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { PanelBody, TextControl, ExternalLink } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { Platform } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { InspectorControls } from '../components';\n\n/**\n * Regular expression matching invalid anchor characters for replacement.\n *\n * @type {RegExp}\n */\nconst ANCHOR_REGEX = /[\\s#]/g;\n\nconst ANCHOR_SCHEMA = {\n\ttype: 'string',\n\tsource: 'attribute',\n\tattribute: 'id',\n\tselector: '*',\n};\n\n/**\n * Filters registered block settings, extending attributes with anchor using ID\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( 'type' in ( settings.attributes?.anchor ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'anchor' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tanchor: ANCHOR_SCHEMA,\n\t\t};\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning the anchor ID, if block supports anchor.\n *\n * @param {WPComponent} BlockEdit Original component.\n *\n * @return {WPComponent} Wrapped component.\n */\nexport const withInspectorControl = createHigherOrderComponent(\n\t( BlockEdit ) => {\n\t\treturn ( props ) => {\n\t\t\tconst hasAnchor = hasBlockSupport( props.name, 'anchor' );\n\n\t\t\tif ( hasAnchor && props.isSelected ) {\n\t\t\t\tconst isWeb = Platform.OS === 'web';\n\t\t\t\tconst textControl = (\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tclassName=\"html-anchor-control\"\n\t\t\t\t\t\tlabel={ __( 'HTML anchor' ) }\n\t\t\t\t\t\thelp={\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'Enter a word or two — without spaces — to make a unique web address just for this block, called an “anchor.” Then, you’ll be able to link directly to this section of your page.'\n\t\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t\t{ isWeb && (\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/support/article/page-jumps/'\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{ __( 'Learn more about anchors' ) }\n\t\t\t\t\t\t\t\t\t</ExternalLink>\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\tvalue={ props.attributes.anchor || '' }\n\t\t\t\t\t\tplaceholder={ ! isWeb ? __( 'Add an anchor' ) : null }\n\t\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\t\tnextValue = nextValue.replace( ANCHOR_REGEX, '-' );\n\t\t\t\t\t\t\tprops.setAttributes( {\n\t\t\t\t\t\t\t\tanchor: nextValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tautoCapitalize=\"none\"\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t/>\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t\t\t{ isWeb && (\n\t\t\t\t\t\t\t<InspectorControls __experimentalGroup=\"advanced\">\n\t\t\t\t\t\t\t\t{ textControl }\n\t\t\t\t\t\t\t</InspectorControls>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t * We plan to remove scoping anchors to 'core/heading' to support\n\t\t\t\t\t\t * anchors for all eligble blocks. Additionally we plan to explore\n\t\t\t\t\t\t * leveraging InspectorAdvancedControls instead of a custom\n\t\t\t\t\t\t * PanelBody title. https://github.com/WordPress/gutenberg/issues/28363\n\t\t\t\t\t\t */ }\n\t\t\t\t\t\t{ ! isWeb && props.name === 'core/heading' && (\n\t\t\t\t\t\t\t<InspectorControls>\n\t\t\t\t\t\t\t\t<PanelBody title={ __( 'Heading settings' ) }>\n\t\t\t\t\t\t\t\t\t{ textControl }\n\t\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t\t</InspectorControls>\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\treturn <BlockEdit { ...props } />;\n\t\t};\n\t},\n\t'withInspectorControl'\n);\n\n/**\n * Override props assigned to save component to inject anchor ID, if block\n * supports anchor. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockSupport( blockType, 'anchor' ) ) {\n\t\textraProps.id = attributes.anchor === '' ? null : attributes.anchor;\n\t}\n\n\treturn extraProps;\n}\n\naddFilter( 'blocks.registerBlockType', 'core/anchor/attribute', addAttribute );\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/anchor/with-inspector-control',\n\twithInspectorControl\n);\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/anchor/save-props',\n\taddSaveProps\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\nconst ARIA_LABEL_SCHEMA = {\n\ttype: 'string',\n\tsource: 'attribute',\n\tattribute: 'aria-label',\n\tselector: '*',\n};\n\n/**\n * Filters registered block settings, extending attributes with ariaLabel using aria-label\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( settings?.attributes?.ariaLabel?.type ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, 'ariaLabel' ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tariaLabel: ARIA_LABEL_SCHEMA,\n\t\t};\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject aria-label, if block\n * supports ariaLabel. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockSupport( blockType, 'ariaLabel' ) ) {\n\t\textraProps[ 'aria-label' ] =\n\t\t\tattributes.ariaLabel === '' ? null : attributes.ariaLabel;\n\t}\n\n\treturn extraProps;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/ariaLabel/attribute',\n\taddAttribute\n);\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/ariaLabel/save-props',\n\taddSaveProps\n);\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { TextControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { InspectorControls } from '../components';\n\n/**\n * Filters registered block settings, extending attributes with anchor using ID\n * of the first node.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( hasBlockSupport( settings, 'customClassName', true ) ) {\n\t\t// Gracefully handle if settings.attributes is undefined.\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tclassName: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include a new block inspector control for\n * assigning the custom class name, if block supports custom class name.\n *\n * @param {WPComponent} BlockEdit Original component.\n *\n * @return {WPComponent} Wrapped component.\n */\nexport const withInspectorControl = createHigherOrderComponent(\n\t( BlockEdit ) => {\n\t\treturn ( props ) => {\n\t\t\tconst hasCustomClassName = hasBlockSupport(\n\t\t\t\tprops.name,\n\t\t\t\t'customClassName',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\tif ( hasCustomClassName && props.isSelected ) {\n\t\t\t\treturn (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t\t\t<InspectorControls __experimentalGroup=\"advanced\">\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Additional CSS class(es)' ) }\n\t\t\t\t\t\t\t\tvalue={ props.attributes.className || '' }\n\t\t\t\t\t\t\t\tonChange={ ( nextValue ) => {\n\t\t\t\t\t\t\t\t\tprops.setAttributes( {\n\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\tnextValue !== ''\n\t\t\t\t\t\t\t\t\t\t\t\t? nextValue\n\t\t\t\t\t\t\t\t\t\t\t\t: undefined,\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'Separate multiple classes with spaces.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</InspectorControls>\n\t\t\t\t\t</>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t};\n\t},\n\t'withInspectorControl'\n);\n\n/**\n * Override props assigned to save component to inject anchor ID, if block\n * supports anchor. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Current block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif (\n\t\thasBlockSupport( blockType, 'customClassName', true ) &&\n\t\tattributes.className\n\t) {\n\t\textraProps.className = classnames(\n\t\t\textraProps.className,\n\t\t\tattributes.className\n\t\t);\n\t}\n\n\treturn extraProps;\n}\n\nexport function addTransforms( result, source, index, results ) {\n\tif ( ! hasBlockSupport( result.name, 'customClassName', true ) ) {\n\t\treturn result;\n\t}\n\n\t// If the condition verifies we are probably in the presence of a wrapping transform\n\t// e.g: nesting paragraphs in a group or columns and in that case the class should not be kept.\n\tif ( results.length === 1 && result.innerBlocks.length === source.length ) {\n\t\treturn result;\n\t}\n\n\t// If we are transforming one block to multiple blocks or multiple blocks to one block,\n\t// we ignore the class during the transform.\n\tif (\n\t\t( results.length === 1 && source.length > 1 ) ||\n\t\t( results.length > 1 && source.length === 1 )\n\t) {\n\t\treturn result;\n\t}\n\n\t// If we are in presence of transform between one or more block in the source\n\t// that have one or more blocks in the result\n\t// we apply the class on source N to the result N,\n\t// if source N does not exists we do nothing.\n\tif ( source[ index ] ) {\n\t\tconst originClassName = source[ index ]?.attributes.className;\n\t\tif ( originClassName ) {\n\t\t\treturn {\n\t\t\t\t...result,\n\t\t\t\tattributes: {\n\t\t\t\t\t...result.attributes,\n\t\t\t\t\tclassName: originClassName,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t}\n\treturn result;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/custom-class-name/attribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/custom-class-name/with-inspector-control',\n\twithInspectorControl\n);\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/custom-class-name/save-props',\n\taddSaveProps\n);\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/color/addTransforms',\n\taddTransforms\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Override props assigned to save component to inject generated className if\n * block supports it. This is only applied if the block's save result is an\n * element and not a markup string.\n *\n * @param {Object} extraProps Additional props applied to save element.\n * @param {Object} blockType  Block type.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addGeneratedClassName( extraProps, blockType ) {\n\t// Adding the generated className.\n\tif ( hasBlockSupport( blockType, 'className', true ) ) {\n\t\tif ( typeof extraProps.className === 'string' ) {\n\t\t\t// We have some extra classes and want to add the default classname\n\t\t\t// We use uniq to prevent duplicate classnames.\n\n\t\t\textraProps.className = [\n\t\t\t\t...new Set( [\n\t\t\t\t\tgetBlockDefaultClassName( blockType.name ),\n\t\t\t\t\t...extraProps.className.split( ' ' ),\n\t\t\t\t] ),\n\t\t\t]\n\t\t\t\t.join( ' ' )\n\t\t\t\t.trim();\n\t\t} else {\n\t\t\t// There is no string in the className variable,\n\t\t\t// so we just dump the default name in there.\n\t\t\textraProps.className = getBlockDefaultClassName( blockType.name );\n\t\t}\n\t}\n\treturn extraProps;\n}\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/generated-class-name/save-props',\n\taddGeneratedClassName\n);\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/** @typedef {import('react').ReactNode} ReactNode */\n\n/**\n * @typedef BlockContextProviderProps\n *\n * @property {Record<string,*>} value    Context value to merge with current\n *                                       value.\n * @property {ReactNode}        children Component children.\n */\n\n/** @type {import('react').Context<Record<string,*>>} */\nconst Context = createContext( {} );\n\n/**\n * Component which merges passed value with current consumed block context.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-context/README.md\n *\n * @param {BlockContextProviderProps} props\n */\nexport function BlockContextProvider( { value, children } ) {\n\tconst context = useContext( Context );\n\tconst nextValue = useMemo(\n\t\t() => ( { ...context, ...value } ),\n\t\t[ context, value ]\n\t);\n\n\treturn <Context.Provider value={ nextValue } children={ children } />;\n}\n\nexport default Context;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { pick } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\nimport {\n\tgetBlockDefaultClassName,\n\thasBlockSupport,\n\tgetBlockType,\n} from '@wordpress/blocks';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockContext from '../block-context';\n\n/**\n * Default value used for blocks which do not define their own context needs,\n * used to guarantee that a block's `context` prop will always be an object. It\n * is assigned as a constant since it is always expected to be an empty object,\n * and in order to avoid unnecessary React reconciliations of a changing object.\n *\n * @type {{}}\n */\nconst DEFAULT_BLOCK_CONTEXT = {};\n\nexport const Edit = ( props ) => {\n\tconst { attributes = {}, name } = props;\n\tconst blockType = getBlockType( name );\n\tconst blockContext = useContext( BlockContext );\n\n\t// Assign context values using the block type's declared context needs.\n\tconst context = useMemo( () => {\n\t\treturn blockType && blockType.usesContext\n\t\t\t? pick( blockContext, blockType.usesContext )\n\t\t\t: DEFAULT_BLOCK_CONTEXT;\n\t}, [ blockType, blockContext ] );\n\n\tif ( ! blockType ) {\n\t\treturn null;\n\t}\n\n\t// `edit` and `save` are functions or components describing the markup\n\t// with which a block is displayed. If `blockType` is valid, assign\n\t// them preferentially as the render value for the block.\n\tconst Component = blockType.edit || blockType.save;\n\n\tif ( blockType.apiVersion > 1 ) {\n\t\treturn <Component { ...props } context={ context } />;\n\t}\n\n\t// Generate a class name for the block's editable form.\n\tconst generatedClassName = hasBlockSupport( blockType, 'className', true )\n\t\t? getBlockDefaultClassName( name )\n\t\t: null;\n\tconst className = classnames(\n\t\tgeneratedClassName,\n\t\tattributes.className,\n\t\tprops.className\n\t);\n\n\treturn (\n\t\t<Component { ...props } context={ context } className={ className } />\n\t);\n};\n\nexport default withFilters( 'editor.BlockEdit' )( Edit );\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit';\nimport { BlockEditContextProvider, useBlockEditContext } from './context';\n\n/**\n * The `useBlockEditContext` hook provides information about the block this hook is being used in.\n * It returns an object with the `name`, `isSelected` state, and the `clientId` of the block.\n * It is useful if you want to create custom hooks that need access to the current blocks clientId\n * but don't want to rely on the data getting passed in as a parameter.\n *\n * @return {Object} Block edit context\n */\nexport { useBlockEditContext };\n\nexport default function BlockEdit( props ) {\n\tconst { name, isSelected, clientId } = props;\n\tconst context = {\n\t\tname,\n\t\tisSelected,\n\t\tclientId,\n\t};\n\treturn (\n\t\t<BlockEditContextProvider\n\t\t\t// It is important to return the same object if props haven't\n\t\t\t// changed to avoid  unnecessary rerenders.\n\t\t\t// See https://reactjs.org/docs/context.html#caveats.\n\t\t\tvalue={ useMemo( () => context, Object.values( context ) ) }\n\t\t>\n\t\t\t<Edit { ...props } />\n\t\t</BlockEditContextProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreHorizontal = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 13h2v-2h-2v2zm-6 0h2v-2H5v2zm12-2v2h2v-2h-2z\" />\n\t</SVG>\n);\n\nexport default moreHorizontal;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Children } from '@wordpress/element';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { moreHorizontal } from '@wordpress/icons';\n\nfunction Warning( { className, actions, children, secondaryActions } ) {\n\treturn (\n\t\t<div style={ { display: 'contents', all: 'initial' } }>\n\t\t\t<div className={ classnames( className, 'block-editor-warning' ) }>\n\t\t\t\t<div className=\"block-editor-warning__contents\">\n\t\t\t\t\t<p className=\"block-editor-warning__message\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t{ ( Children.count( actions ) > 0 || secondaryActions ) && (\n\t\t\t\t\t\t<div className=\"block-editor-warning__actions\">\n\t\t\t\t\t\t\t{ Children.count( actions ) > 0 &&\n\t\t\t\t\t\t\t\tChildren.map( actions, ( action, i ) => (\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__action\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ action }\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\t{ secondaryActions && (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-warning__secondary\"\n\t\t\t\t\t\t\t\t\ticon={ moreHorizontal }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'More options' ) }\n\t\t\t\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t\t\t\t\t\t\tclassName:\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-warning__dropdown',\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tnoIcons\n\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<MenuGroup>\n\t\t\t\t\t\t\t\t\t\t\t{ secondaryActions.map(\n\t\t\t\t\t\t\t\t\t\t\t\t( item, pos ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ item.onClick }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ pos }\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{ item.title }\n\t\t\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\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</MenuGroup>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/warning/README.md\n */\nexport default Warning;\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { RawHTML } from '@wordpress/element';\nimport { safeHTML } from '@wordpress/dom';\n\nexport default function BlockView( {\n\ttitle,\n\trawContent,\n\trenderedContent,\n\taction,\n\tactionText,\n\tclassName,\n} ) {\n\treturn (\n\t\t<div className={ className }>\n\t\t\t<div className=\"block-editor-block-compare__content\">\n\t\t\t\t<h2 className=\"block-editor-block-compare__heading\">\n\t\t\t\t\t{ title }\n\t\t\t\t</h2>\n\n\t\t\t\t<div className=\"block-editor-block-compare__html\">\n\t\t\t\t\t{ rawContent }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"block-editor-block-compare__preview edit-post-visual-editor\">\n\t\t\t\t\t<RawHTML>{ safeHTML( renderedContent ) }</RawHTML>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div className=\"block-editor-block-compare__action\">\n\t\t\t\t<Button variant=\"secondary\" tabIndex=\"0\" onClick={ action }>\n\t\t\t\t\t{ actionText }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { castArray } from 'lodash';\n// diff doesn't tree-shake correctly, so we import from the individual\n// module here, to avoid including too much of the library\nimport { diffChars } from 'diff/lib/diff/character';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { getSaveContent } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport BlockView from './block-view';\n\nfunction BlockCompare( {\n\tblock,\n\tonKeep,\n\tonConvert,\n\tconvertor,\n\tconvertButtonText,\n} ) {\n\tfunction getDifference( originalContent, newContent ) {\n\t\tconst difference = diffChars( originalContent, newContent );\n\n\t\treturn difference.map( ( item, pos ) => {\n\t\t\tconst classes = classnames( {\n\t\t\t\t'block-editor-block-compare__added': item.added,\n\t\t\t\t'block-editor-block-compare__removed': item.removed,\n\t\t\t} );\n\n\t\t\treturn (\n\t\t\t\t<span key={ pos } className={ classes }>\n\t\t\t\t\t{ item.value }\n\t\t\t\t</span>\n\t\t\t);\n\t\t} );\n\t}\n\n\tfunction getConvertedContent( convertedBlock ) {\n\t\t// The convertor may return an array of items or a single item.\n\t\tconst newBlocks = castArray( convertedBlock );\n\n\t\t// Get converted block details.\n\t\tconst newContent = newBlocks.map( ( item ) =>\n\t\t\tgetSaveContent( item.name, item.attributes, item.innerBlocks )\n\t\t);\n\n\t\treturn newContent.join( '' );\n\t}\n\n\tconst converted = getConvertedContent( convertor( block ) );\n\tconst difference = getDifference( block.originalContent, converted );\n\n\treturn (\n\t\t<div className=\"block-editor-block-compare__wrapper\">\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'Current' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__current\"\n\t\t\t\taction={ onKeep }\n\t\t\t\tactionText={ __( 'Convert to HTML' ) }\n\t\t\t\trawContent={ block.originalContent }\n\t\t\t\trenderedContent={ block.originalContent }\n\t\t\t/>\n\n\t\t\t<BlockView\n\t\t\t\ttitle={ __( 'After Conversion' ) }\n\t\t\t\tclassName=\"block-editor-block-compare__converted\"\n\t\t\t\taction={ onConvert }\n\t\t\t\tactionText={ convertButtonText }\n\t\t\t\trawContent={ difference }\n\t\t\t\trenderedContent={ converted }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default BlockCompare;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { Button, Modal } from '@wordpress/components';\nimport { useState, useCallback, useMemo } from '@wordpress/element';\nimport { getBlockType, createBlock, rawHandler } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\nimport BlockCompare from '../block-compare';\nimport { store as blockEditorStore } from '../../store';\n\nexport function BlockInvalidWarning( {\n\tconvertToHTML,\n\tconvertToBlocks,\n\tconvertToClassic,\n\tattemptBlockRecovery,\n\tblock,\n} ) {\n\tconst hasHTMLBlock = !! getBlockType( 'core/html' );\n\tconst [ compare, setCompare ] = useState( false );\n\n\tconst onCompare = useCallback( () => setCompare( true ), [] );\n\tconst onCompareClose = useCallback( () => setCompare( false ), [] );\n\n\t// We memo the array here to prevent the children components from being updated unexpectedly.\n\tconst hiddenActions = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t// translators: Button to fix block content\n\t\t\t\t\ttitle: _x( 'Resolve', 'imperative verb' ),\n\t\t\t\t\tonClick: onCompare,\n\t\t\t\t},\n\t\t\t\thasHTMLBlock && {\n\t\t\t\t\ttitle: __( 'Convert to HTML' ),\n\t\t\t\t\tonClick: convertToHTML,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Convert to Classic Block' ),\n\t\t\t\t\tonClick: convertToClassic,\n\t\t\t\t},\n\t\t\t].filter( Boolean ),\n\t\t[ onCompare, convertToHTML, convertToClassic ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<Warning\n\t\t\t\tactions={ [\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey=\"recover\"\n\t\t\t\t\t\tonClick={ attemptBlockRecovery }\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Attempt Block Recovery' ) }\n\t\t\t\t\t</Button>,\n\t\t\t\t] }\n\t\t\t\tsecondaryActions={ hiddenActions }\n\t\t\t>\n\t\t\t\t{ __( 'This block contains unexpected or invalid content.' ) }\n\t\t\t</Warning>\n\t\t\t{ compare && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={\n\t\t\t\t\t\t// translators: Dialog title to fix block content\n\t\t\t\t\t\t__( 'Resolve Block' )\n\t\t\t\t\t}\n\t\t\t\t\tonRequestClose={ onCompareClose }\n\t\t\t\t\tclassName=\"block-editor-block-compare\"\n\t\t\t\t>\n\t\t\t\t\t<BlockCompare\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tonKeep={ convertToHTML }\n\t\t\t\t\t\tonConvert={ convertToBlocks }\n\t\t\t\t\t\tconvertor={ blockToBlocks }\n\t\t\t\t\t\tconvertButtonText={ __( 'Convert to Blocks' ) }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nconst blockToClassic = ( block ) =>\n\tcreateBlock( 'core/freeform', {\n\t\tcontent: block.originalContent,\n\t} );\nconst blockToHTML = ( block ) =>\n\tcreateBlock( 'core/html', {\n\t\tcontent: block.originalContent,\n\t} );\nconst blockToBlocks = ( block ) =>\n\trawHandler( {\n\t\tHTML: block.originalContent,\n\t} );\nconst recoverBlock = ( { name, attributes, innerBlocks } ) =>\n\tcreateBlock( name, attributes, innerBlocks );\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => ( {\n\t\tblock: select( blockEditorStore ).getBlock( clientId ),\n\t} ) ),\n\twithDispatch( ( dispatch, { block } ) => {\n\t\tconst { replaceBlock } = dispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tconvertToClassic() {\n\t\t\t\treplaceBlock( block.clientId, blockToClassic( block ) );\n\t\t\t},\n\t\t\tconvertToHTML() {\n\t\t\t\treplaceBlock( block.clientId, blockToHTML( block ) );\n\t\t\t},\n\t\t\tconvertToBlocks() {\n\t\t\t\treplaceBlock( block.clientId, blockToBlocks( block ) );\n\t\t\t},\n\t\t\tattemptBlockRecovery() {\n\t\t\t\treplaceBlock( block.clientId, recoverBlock( block ) );\n\t\t\t},\n\t\t};\n\t} ),\n] )( BlockInvalidWarning );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Warning from '../warning';\n\nconst warning = (\n\t<Warning className=\"block-editor-block-list__block-crash-warning\">\n\t\t{ __( 'This block has encountered an error and cannot be previewed.' ) }\n\t</Warning>\n);\n\nexport default () => warning;\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\nclass BlockCrashBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\thasError: false,\n\t\t};\n\t}\n\n\tcomponentDidCatch() {\n\t\tthis.setState( {\n\t\t\thasError: true,\n\t\t} );\n\t}\n\n\trender() {\n\t\tif ( this.state.hasError ) {\n\t\t\treturn this.props.fallback;\n\t\t}\n\n\t\treturn this.props.children;\n\t}\n}\n\nexport default BlockCrashBoundary;\n","/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tgetBlockAttributes,\n\tgetBlockContent,\n\tgetBlockType,\n\tgetSaveContent,\n\tvalidateBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockHTML( { clientId } ) {\n\tconst [ html, setHtml ] = useState( '' );\n\tconst block = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlock( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { updateBlock } = useDispatch( blockEditorStore );\n\tconst onChange = () => {\n\t\tconst blockType = getBlockType( block.name );\n\n\t\tif ( ! blockType ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst attributes = getBlockAttributes(\n\t\t\tblockType,\n\t\t\thtml,\n\t\t\tblock.attributes\n\t\t);\n\n\t\t// If html is empty  we reset the block to the default HTML and mark it as valid to avoid triggering an error\n\t\tconst content = html ? html : getSaveContent( blockType, attributes );\n\t\tconst [ isValid ] = html\n\t\t\t? validateBlock( {\n\t\t\t\t\t...block,\n\t\t\t\t\tattributes,\n\t\t\t\t\toriginalContent: content,\n\t\t\t  } )\n\t\t\t: [ true ];\n\n\t\tupdateBlock( clientId, {\n\t\t\tattributes,\n\t\t\toriginalContent: content,\n\t\t\tisValid,\n\t\t} );\n\n\t\t// Ensure the state is updated if we reset so it displays the default content.\n\t\tif ( ! html ) {\n\t\t\tsetHtml( { content } );\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tsetHtml( getBlockContent( block ) );\n\t}, [ block ] );\n\n\treturn (\n\t\t<TextareaAutosize\n\t\t\tclassName=\"block-editor-block-list__block-html-textarea\"\n\t\t\tvalue={ html }\n\t\t\tonBlur={ onChange }\n\t\t\tonChange={ ( event ) => setHtml( event.target.value ) }\n\t\t/>\n\t);\n}\n\nexport default BlockHTML;\n","let updateQueue = makeQueue();\nconst raf = fn => schedule(fn, updateQueue);\nlet writeQueue = makeQueue();\n\nraf.write = fn => schedule(fn, writeQueue);\n\nlet onStartQueue = makeQueue();\n\nraf.onStart = fn => schedule(fn, onStartQueue);\n\nlet onFrameQueue = makeQueue();\n\nraf.onFrame = fn => schedule(fn, onFrameQueue);\n\nlet onFinishQueue = makeQueue();\n\nraf.onFinish = fn => schedule(fn, onFinishQueue);\n\nlet timeouts = [];\n\nraf.setTimeout = (handler, ms) => {\n  let time = raf.now() + ms;\n\n  let cancel = () => {\n    let i = timeouts.findIndex(t => t.cancel == cancel);\n    if (~i) timeouts.splice(i, 1);\n    pendingCount -= ~i ? 1 : 0;\n  };\n\n  let timeout = {\n    time,\n    handler,\n    cancel\n  };\n  timeouts.splice(findTimeout(time), 0, timeout);\n  pendingCount += 1;\n  start();\n  return timeout;\n};\n\nlet findTimeout = time => ~(~timeouts.findIndex(t => t.time > time) || ~timeouts.length);\n\nraf.cancel = fn => {\n  onStartQueue.delete(fn);\n  onFrameQueue.delete(fn);\n  onFinishQueue.delete(fn);\n  updateQueue.delete(fn);\n  writeQueue.delete(fn);\n};\n\nraf.sync = fn => {\n  sync = true;\n  raf.batchedUpdates(fn);\n  sync = false;\n};\n\nraf.throttle = fn => {\n  let lastArgs;\n\n  function queuedFn() {\n    try {\n      fn(...lastArgs);\n    } finally {\n      lastArgs = null;\n    }\n  }\n\n  function throttled(...args) {\n    lastArgs = args;\n    raf.onStart(queuedFn);\n  }\n\n  throttled.handler = fn;\n\n  throttled.cancel = () => {\n    onStartQueue.delete(queuedFn);\n    lastArgs = null;\n  };\n\n  return throttled;\n};\n\nlet nativeRaf = typeof window != 'undefined' ? window.requestAnimationFrame : () => {};\n\nraf.use = impl => nativeRaf = impl;\n\nraf.now = typeof performance != 'undefined' ? () => performance.now() : Date.now;\n\nraf.batchedUpdates = fn => fn();\n\nraf.catch = console.error;\nraf.frameLoop = 'always';\n\nraf.advance = () => {\n  if (raf.frameLoop !== 'demand') {\n    console.warn('Cannot call the manual advancement of rafz whilst frameLoop is not set as demand');\n  } else {\n    update();\n  }\n};\n\nlet ts = -1;\nlet pendingCount = 0;\nlet sync = false;\n\nfunction schedule(fn, queue) {\n  if (sync) {\n    queue.delete(fn);\n    fn(0);\n  } else {\n    queue.add(fn);\n    start();\n  }\n}\n\nfunction start() {\n  if (ts < 0) {\n    ts = 0;\n\n    if (raf.frameLoop !== 'demand') {\n      nativeRaf(loop);\n    }\n  }\n}\n\nfunction stop() {\n  ts = -1;\n}\n\nfunction loop() {\n  if (~ts) {\n    nativeRaf(loop);\n    raf.batchedUpdates(update);\n  }\n}\n\nfunction update() {\n  let prevTs = ts;\n  ts = raf.now();\n  let count = findTimeout(ts);\n\n  if (count) {\n    eachSafely(timeouts.splice(0, count), t => t.handler());\n    pendingCount -= count;\n  }\n\n  if (!pendingCount) {\n    stop();\n    return;\n  }\n\n  onStartQueue.flush();\n  updateQueue.flush(prevTs ? Math.min(64, ts - prevTs) : 16.667);\n  onFrameQueue.flush();\n  writeQueue.flush();\n  onFinishQueue.flush();\n}\n\nfunction makeQueue() {\n  let next = new Set();\n  let current = next;\n  return {\n    add(fn) {\n      pendingCount += current == next && !next.has(fn) ? 1 : 0;\n      next.add(fn);\n    },\n\n    delete(fn) {\n      pendingCount -= current == next && next.has(fn) ? 1 : 0;\n      return next.delete(fn);\n    },\n\n    flush(arg) {\n      if (current.size) {\n        next = new Set();\n        pendingCount -= current.size;\n        eachSafely(current, fn => fn(arg) && next.add(fn));\n        pendingCount += next.size;\n        current = next;\n      }\n    }\n\n  };\n}\n\nfunction eachSafely(values, each) {\n  values.forEach(value => {\n    try {\n      each(value);\n    } catch (e) {\n      raf.catch(e);\n    }\n  });\n}\n\nconst __raf = {\n  count() {\n    return pendingCount;\n  },\n\n  isRunning() {\n    return ts >= 0;\n  },\n\n  clear() {\n    ts = -1;\n    timeouts = [];\n    onStartQueue = makeQueue();\n    updateQueue = makeQueue();\n    onFrameQueue = makeQueue();\n    writeQueue = makeQueue();\n    onFinishQueue = makeQueue();\n    pendingCount = 0;\n  }\n\n};\n\nexport { __raf, raf };\n","import { raf } from '@react-spring/rafz';\nexport { raf } from '@react-spring/rafz';\nimport { useEffect, useLayoutEffect, useRef, useState } from 'react';\n\nfunction noop() {}\nconst defineHidden = (obj, key, value) => Object.defineProperty(obj, key, {\n  value,\n  writable: true,\n  configurable: true\n});\nconst is = {\n  arr: Array.isArray,\n  obj: a => !!a && a.constructor.name === 'Object',\n  fun: a => typeof a === 'function',\n  str: a => typeof a === 'string',\n  num: a => typeof a === 'number',\n  und: a => a === undefined\n};\nfunction isEqual(a, b) {\n  if (is.arr(a)) {\n    if (!is.arr(b) || a.length !== b.length) return false;\n\n    for (let i = 0; i < a.length; i++) {\n      if (a[i] !== b[i]) return false;\n    }\n\n    return true;\n  }\n\n  return a === b;\n}\nconst each = (obj, fn) => obj.forEach(fn);\nfunction eachProp(obj, fn, ctx) {\n  if (is.arr(obj)) {\n    for (let i = 0; i < obj.length; i++) {\n      fn.call(ctx, obj[i], `${i}`);\n    }\n\n    return;\n  }\n\n  for (const key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      fn.call(ctx, obj[key], key);\n    }\n  }\n}\nconst toArray = a => is.und(a) ? [] : is.arr(a) ? a : [a];\nfunction flush(queue, iterator) {\n  if (queue.size) {\n    const items = Array.from(queue);\n    queue.clear();\n    each(items, iterator);\n  }\n}\nconst flushCalls = (queue, ...args) => flush(queue, fn => fn(...args));\nconst isSSR = () => typeof window === 'undefined' || !window.navigator || /ServerSideRendering|^Deno\\//.test(window.navigator.userAgent);\n\nlet createStringInterpolator$1;\nlet to;\nlet colors$1 = null;\nlet skipAnimation = false;\nlet willAdvance = noop;\nconst assign = globals => {\n  if (globals.to) to = globals.to;\n  if (globals.now) raf.now = globals.now;\n  if (globals.colors !== undefined) colors$1 = globals.colors;\n  if (globals.skipAnimation != null) skipAnimation = globals.skipAnimation;\n  if (globals.createStringInterpolator) createStringInterpolator$1 = globals.createStringInterpolator;\n  if (globals.requestAnimationFrame) raf.use(globals.requestAnimationFrame);\n  if (globals.batchedUpdates) raf.batchedUpdates = globals.batchedUpdates;\n  if (globals.willAdvance) willAdvance = globals.willAdvance;\n  if (globals.frameLoop) raf.frameLoop = globals.frameLoop;\n};\n\nvar globals = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  get createStringInterpolator () { return createStringInterpolator$1; },\n  get to () { return to; },\n  get colors () { return colors$1; },\n  get skipAnimation () { return skipAnimation; },\n  get willAdvance () { return willAdvance; },\n  assign: assign\n});\n\nconst startQueue = new Set();\nlet currentFrame = [];\nlet prevFrame = [];\nlet priority = 0;\nconst frameLoop = {\n  get idle() {\n    return !startQueue.size && !currentFrame.length;\n  },\n\n  start(animation) {\n    if (priority > animation.priority) {\n      startQueue.add(animation);\n      raf.onStart(flushStartQueue);\n    } else {\n      startSafely(animation);\n      raf(advance);\n    }\n  },\n\n  advance,\n\n  sort(animation) {\n    if (priority) {\n      raf.onFrame(() => frameLoop.sort(animation));\n    } else {\n      const prevIndex = currentFrame.indexOf(animation);\n\n      if (~prevIndex) {\n        currentFrame.splice(prevIndex, 1);\n        startUnsafely(animation);\n      }\n    }\n  },\n\n  clear() {\n    currentFrame = [];\n    startQueue.clear();\n  }\n\n};\n\nfunction flushStartQueue() {\n  startQueue.forEach(startSafely);\n  startQueue.clear();\n  raf(advance);\n}\n\nfunction startSafely(animation) {\n  if (!currentFrame.includes(animation)) startUnsafely(animation);\n}\n\nfunction startUnsafely(animation) {\n  currentFrame.splice(findIndex(currentFrame, other => other.priority > animation.priority), 0, animation);\n}\n\nfunction advance(dt) {\n  const nextFrame = prevFrame;\n\n  for (let i = 0; i < currentFrame.length; i++) {\n    const animation = currentFrame[i];\n    priority = animation.priority;\n\n    if (!animation.idle) {\n      willAdvance(animation);\n      animation.advance(dt);\n\n      if (!animation.idle) {\n        nextFrame.push(animation);\n      }\n    }\n  }\n\n  priority = 0;\n  prevFrame = currentFrame;\n  prevFrame.length = 0;\n  currentFrame = nextFrame;\n  return currentFrame.length > 0;\n}\n\nfunction findIndex(arr, test) {\n  const index = arr.findIndex(test);\n  return index < 0 ? arr.length : index;\n}\n\nconst colors = {\n  transparent: 0x00000000,\n  aliceblue: 0xf0f8ffff,\n  antiquewhite: 0xfaebd7ff,\n  aqua: 0x00ffffff,\n  aquamarine: 0x7fffd4ff,\n  azure: 0xf0ffffff,\n  beige: 0xf5f5dcff,\n  bisque: 0xffe4c4ff,\n  black: 0x000000ff,\n  blanchedalmond: 0xffebcdff,\n  blue: 0x0000ffff,\n  blueviolet: 0x8a2be2ff,\n  brown: 0xa52a2aff,\n  burlywood: 0xdeb887ff,\n  burntsienna: 0xea7e5dff,\n  cadetblue: 0x5f9ea0ff,\n  chartreuse: 0x7fff00ff,\n  chocolate: 0xd2691eff,\n  coral: 0xff7f50ff,\n  cornflowerblue: 0x6495edff,\n  cornsilk: 0xfff8dcff,\n  crimson: 0xdc143cff,\n  cyan: 0x00ffffff,\n  darkblue: 0x00008bff,\n  darkcyan: 0x008b8bff,\n  darkgoldenrod: 0xb8860bff,\n  darkgray: 0xa9a9a9ff,\n  darkgreen: 0x006400ff,\n  darkgrey: 0xa9a9a9ff,\n  darkkhaki: 0xbdb76bff,\n  darkmagenta: 0x8b008bff,\n  darkolivegreen: 0x556b2fff,\n  darkorange: 0xff8c00ff,\n  darkorchid: 0x9932ccff,\n  darkred: 0x8b0000ff,\n  darksalmon: 0xe9967aff,\n  darkseagreen: 0x8fbc8fff,\n  darkslateblue: 0x483d8bff,\n  darkslategray: 0x2f4f4fff,\n  darkslategrey: 0x2f4f4fff,\n  darkturquoise: 0x00ced1ff,\n  darkviolet: 0x9400d3ff,\n  deeppink: 0xff1493ff,\n  deepskyblue: 0x00bfffff,\n  dimgray: 0x696969ff,\n  dimgrey: 0x696969ff,\n  dodgerblue: 0x1e90ffff,\n  firebrick: 0xb22222ff,\n  floralwhite: 0xfffaf0ff,\n  forestgreen: 0x228b22ff,\n  fuchsia: 0xff00ffff,\n  gainsboro: 0xdcdcdcff,\n  ghostwhite: 0xf8f8ffff,\n  gold: 0xffd700ff,\n  goldenrod: 0xdaa520ff,\n  gray: 0x808080ff,\n  green: 0x008000ff,\n  greenyellow: 0xadff2fff,\n  grey: 0x808080ff,\n  honeydew: 0xf0fff0ff,\n  hotpink: 0xff69b4ff,\n  indianred: 0xcd5c5cff,\n  indigo: 0x4b0082ff,\n  ivory: 0xfffff0ff,\n  khaki: 0xf0e68cff,\n  lavender: 0xe6e6faff,\n  lavenderblush: 0xfff0f5ff,\n  lawngreen: 0x7cfc00ff,\n  lemonchiffon: 0xfffacdff,\n  lightblue: 0xadd8e6ff,\n  lightcoral: 0xf08080ff,\n  lightcyan: 0xe0ffffff,\n  lightgoldenrodyellow: 0xfafad2ff,\n  lightgray: 0xd3d3d3ff,\n  lightgreen: 0x90ee90ff,\n  lightgrey: 0xd3d3d3ff,\n  lightpink: 0xffb6c1ff,\n  lightsalmon: 0xffa07aff,\n  lightseagreen: 0x20b2aaff,\n  lightskyblue: 0x87cefaff,\n  lightslategray: 0x778899ff,\n  lightslategrey: 0x778899ff,\n  lightsteelblue: 0xb0c4deff,\n  lightyellow: 0xffffe0ff,\n  lime: 0x00ff00ff,\n  limegreen: 0x32cd32ff,\n  linen: 0xfaf0e6ff,\n  magenta: 0xff00ffff,\n  maroon: 0x800000ff,\n  mediumaquamarine: 0x66cdaaff,\n  mediumblue: 0x0000cdff,\n  mediumorchid: 0xba55d3ff,\n  mediumpurple: 0x9370dbff,\n  mediumseagreen: 0x3cb371ff,\n  mediumslateblue: 0x7b68eeff,\n  mediumspringgreen: 0x00fa9aff,\n  mediumturquoise: 0x48d1ccff,\n  mediumvioletred: 0xc71585ff,\n  midnightblue: 0x191970ff,\n  mintcream: 0xf5fffaff,\n  mistyrose: 0xffe4e1ff,\n  moccasin: 0xffe4b5ff,\n  navajowhite: 0xffdeadff,\n  navy: 0x000080ff,\n  oldlace: 0xfdf5e6ff,\n  olive: 0x808000ff,\n  olivedrab: 0x6b8e23ff,\n  orange: 0xffa500ff,\n  orangered: 0xff4500ff,\n  orchid: 0xda70d6ff,\n  palegoldenrod: 0xeee8aaff,\n  palegreen: 0x98fb98ff,\n  paleturquoise: 0xafeeeeff,\n  palevioletred: 0xdb7093ff,\n  papayawhip: 0xffefd5ff,\n  peachpuff: 0xffdab9ff,\n  peru: 0xcd853fff,\n  pink: 0xffc0cbff,\n  plum: 0xdda0ddff,\n  powderblue: 0xb0e0e6ff,\n  purple: 0x800080ff,\n  rebeccapurple: 0x663399ff,\n  red: 0xff0000ff,\n  rosybrown: 0xbc8f8fff,\n  royalblue: 0x4169e1ff,\n  saddlebrown: 0x8b4513ff,\n  salmon: 0xfa8072ff,\n  sandybrown: 0xf4a460ff,\n  seagreen: 0x2e8b57ff,\n  seashell: 0xfff5eeff,\n  sienna: 0xa0522dff,\n  silver: 0xc0c0c0ff,\n  skyblue: 0x87ceebff,\n  slateblue: 0x6a5acdff,\n  slategray: 0x708090ff,\n  slategrey: 0x708090ff,\n  snow: 0xfffafaff,\n  springgreen: 0x00ff7fff,\n  steelblue: 0x4682b4ff,\n  tan: 0xd2b48cff,\n  teal: 0x008080ff,\n  thistle: 0xd8bfd8ff,\n  tomato: 0xff6347ff,\n  turquoise: 0x40e0d0ff,\n  violet: 0xee82eeff,\n  wheat: 0xf5deb3ff,\n  white: 0xffffffff,\n  whitesmoke: 0xf5f5f5ff,\n  yellow: 0xffff00ff,\n  yellowgreen: 0x9acd32ff\n};\n\nconst NUMBER = '[-+]?\\\\d*\\\\.?\\\\d+';\nconst PERCENTAGE = NUMBER + '%';\n\nfunction call(...parts) {\n  return '\\\\(\\\\s*(' + parts.join(')\\\\s*,\\\\s*(') + ')\\\\s*\\\\)';\n}\n\nconst rgb = new RegExp('rgb' + call(NUMBER, NUMBER, NUMBER));\nconst rgba = new RegExp('rgba' + call(NUMBER, NUMBER, NUMBER, NUMBER));\nconst hsl = new RegExp('hsl' + call(NUMBER, PERCENTAGE, PERCENTAGE));\nconst hsla = new RegExp('hsla' + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\nconst hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\nconst hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\nconst hex6 = /^#([0-9a-fA-F]{6})$/;\nconst hex8 = /^#([0-9a-fA-F]{8})$/;\n\nfunction normalizeColor(color) {\n  let match;\n\n  if (typeof color === 'number') {\n    return color >>> 0 === color && color >= 0 && color <= 0xffffffff ? color : null;\n  }\n\n  if (match = hex6.exec(color)) return parseInt(match[1] + 'ff', 16) >>> 0;\n\n  if (colors$1 && colors$1[color] !== undefined) {\n    return colors$1[color];\n  }\n\n  if (match = rgb.exec(color)) {\n    return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 0x000000ff) >>> 0;\n  }\n\n  if (match = rgba.exec(color)) {\n    return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n  }\n\n  if (match = hex3.exec(color)) {\n    return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + 'ff', 16) >>> 0;\n  }\n\n  if (match = hex8.exec(color)) return parseInt(match[1], 16) >>> 0;\n\n  if (match = hex4.exec(color)) {\n    return parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n  }\n\n  if (match = hsl.exec(color)) {\n    return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 0x000000ff) >>> 0;\n  }\n\n  if (match = hsla.exec(color)) {\n    return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n  }\n\n  return null;\n}\n\nfunction hue2rgb(p, q, t) {\n  if (t < 0) t += 1;\n  if (t > 1) t -= 1;\n  if (t < 1 / 6) return p + (q - p) * 6 * t;\n  if (t < 1 / 2) return q;\n  if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n  return p;\n}\n\nfunction hslToRgb(h, s, l) {\n  const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n  const p = 2 * l - q;\n  const r = hue2rgb(p, q, h + 1 / 3);\n  const g = hue2rgb(p, q, h);\n  const b = hue2rgb(p, q, h - 1 / 3);\n  return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;\n}\n\nfunction parse255(str) {\n  const int = parseInt(str, 10);\n  if (int < 0) return 0;\n  if (int > 255) return 255;\n  return int;\n}\n\nfunction parse360(str) {\n  const int = parseFloat(str);\n  return (int % 360 + 360) % 360 / 360;\n}\n\nfunction parse1(str) {\n  const num = parseFloat(str);\n  if (num < 0) return 0;\n  if (num > 1) return 255;\n  return Math.round(num * 255);\n}\n\nfunction parsePercentage(str) {\n  const int = parseFloat(str);\n  if (int < 0) return 0;\n  if (int > 100) return 1;\n  return int / 100;\n}\n\nfunction colorToRgba(input) {\n  let int32Color = normalizeColor(input);\n  if (int32Color === null) return input;\n  int32Color = int32Color || 0;\n  let r = (int32Color & 0xff000000) >>> 24;\n  let g = (int32Color & 0x00ff0000) >>> 16;\n  let b = (int32Color & 0x0000ff00) >>> 8;\n  let a = (int32Color & 0x000000ff) / 255;\n  return `rgba(${r}, ${g}, ${b}, ${a})`;\n}\n\nconst createInterpolator = (range, output, extrapolate) => {\n  if (is.fun(range)) {\n    return range;\n  }\n\n  if (is.arr(range)) {\n    return createInterpolator({\n      range,\n      output: output,\n      extrapolate\n    });\n  }\n\n  if (is.str(range.output[0])) {\n    return createStringInterpolator$1(range);\n  }\n\n  const config = range;\n  const outputRange = config.output;\n  const inputRange = config.range || [0, 1];\n  const extrapolateLeft = config.extrapolateLeft || config.extrapolate || 'extend';\n  const extrapolateRight = config.extrapolateRight || config.extrapolate || 'extend';\n\n  const easing = config.easing || (t => t);\n\n  return input => {\n    const range = findRange(input, inputRange);\n    return interpolate(input, inputRange[range], inputRange[range + 1], outputRange[range], outputRange[range + 1], easing, extrapolateLeft, extrapolateRight, config.map);\n  };\n};\n\nfunction interpolate(input, inputMin, inputMax, outputMin, outputMax, easing, extrapolateLeft, extrapolateRight, map) {\n  let result = map ? map(input) : input;\n\n  if (result < inputMin) {\n    if (extrapolateLeft === 'identity') return result;else if (extrapolateLeft === 'clamp') result = inputMin;\n  }\n\n  if (result > inputMax) {\n    if (extrapolateRight === 'identity') return result;else if (extrapolateRight === 'clamp') result = inputMax;\n  }\n\n  if (outputMin === outputMax) return outputMin;\n  if (inputMin === inputMax) return input <= inputMin ? outputMin : outputMax;\n  if (inputMin === -Infinity) result = -result;else if (inputMax === Infinity) result = result - inputMin;else result = (result - inputMin) / (inputMax - inputMin);\n  result = easing(result);\n  if (outputMin === -Infinity) result = -result;else if (outputMax === Infinity) result = result + outputMin;else result = result * (outputMax - outputMin) + outputMin;\n  return result;\n}\n\nfunction findRange(input, inputRange) {\n  for (var i = 1; i < inputRange.length - 1; ++i) if (inputRange[i] >= input) break;\n\n  return i - 1;\n}\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\nconst $get = Symbol.for('FluidValue.get');\nconst $observers = Symbol.for('FluidValue.observers');\n\nconst hasFluidValue = arg => Boolean(arg && arg[$get]);\n\nconst getFluidValue = arg => arg && arg[$get] ? arg[$get]() : arg;\n\nconst getFluidObservers = target => target[$observers] || null;\n\nfunction callFluidObserver(observer, event) {\n  if (observer.eventObserved) {\n    observer.eventObserved(event);\n  } else {\n    observer(event);\n  }\n}\n\nfunction callFluidObservers(target, event) {\n  let observers = target[$observers];\n\n  if (observers) {\n    observers.forEach(observer => {\n      callFluidObserver(observer, event);\n    });\n  }\n}\n\nclass FluidValue {\n  constructor(get) {\n    this[$get] = void 0;\n    this[$observers] = void 0;\n\n    if (!get && !(get = this.get)) {\n      throw Error('Unknown getter');\n    }\n\n    setFluidGetter(this, get);\n  }\n\n}\n\nconst setFluidGetter = (target, get) => setHidden(target, $get, get);\n\nfunction addFluidObserver(target, observer) {\n  if (target[$get]) {\n    let observers = target[$observers];\n\n    if (!observers) {\n      setHidden(target, $observers, observers = new Set());\n    }\n\n    if (!observers.has(observer)) {\n      observers.add(observer);\n\n      if (target.observerAdded) {\n        target.observerAdded(observers.size, observer);\n      }\n    }\n  }\n\n  return observer;\n}\n\nfunction removeFluidObserver(target, observer) {\n  let observers = target[$observers];\n\n  if (observers && observers.has(observer)) {\n    const count = observers.size - 1;\n\n    if (count) {\n      observers.delete(observer);\n    } else {\n      target[$observers] = null;\n    }\n\n    if (target.observerRemoved) {\n      target.observerRemoved(count, observer);\n    }\n  }\n}\n\nconst setHidden = (target, key, value) => Object.defineProperty(target, key, {\n  value,\n  writable: true,\n  configurable: true\n});\n\nconst numberRegex = /[+\\-]?(?:0|[1-9]\\d*)(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g;\nconst colorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d\\.]+%?\\))/gi;\nconst unitRegex = new RegExp(`(${numberRegex.source})(%|[a-z]+)`, 'i');\nconst rgbaRegex = /rgba\\(([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+), ([0-9\\.-]+)\\)/gi;\nconst cssVariableRegex = /var\\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\\)/;\n\nconst variableToRgba = input => {\n  const [token, fallback] = parseCSSVariable(input);\n\n  if (!token || isSSR()) {\n    return input;\n  }\n\n  const value = window.getComputedStyle(document.documentElement).getPropertyValue(token);\n\n  if (value) {\n    return value.trim();\n  } else if (fallback && fallback.startsWith('--')) {\n    const _value = window.getComputedStyle(document.documentElement).getPropertyValue(fallback);\n\n    if (_value) {\n      return _value;\n    } else {\n      return input;\n    }\n  } else if (fallback && cssVariableRegex.test(fallback)) {\n    return variableToRgba(fallback);\n  } else if (fallback) {\n    return fallback;\n  }\n\n  return input;\n};\n\nconst parseCSSVariable = current => {\n  const match = cssVariableRegex.exec(current);\n  if (!match) return [,];\n  const [, token, fallback] = match;\n  return [token, fallback];\n};\n\nlet namedColorRegex;\n\nconst rgbaRound = (_, p1, p2, p3, p4) => `rgba(${Math.round(p1)}, ${Math.round(p2)}, ${Math.round(p3)}, ${p4})`;\n\nconst createStringInterpolator = config => {\n  if (!namedColorRegex) namedColorRegex = colors$1 ? new RegExp(`(${Object.keys(colors$1).join('|')})(?!\\\\w)`, 'g') : /^\\b$/;\n  const output = config.output.map(value => {\n    return getFluidValue(value).replace(cssVariableRegex, variableToRgba).replace(colorRegex, colorToRgba).replace(namedColorRegex, colorToRgba);\n  });\n  const keyframes = output.map(value => value.match(numberRegex).map(Number));\n  const outputRanges = keyframes[0].map((_, i) => keyframes.map(values => {\n    if (!(i in values)) {\n      throw Error('The arity of each \"output\" value must be equal');\n    }\n\n    return values[i];\n  }));\n  const interpolators = outputRanges.map(output => createInterpolator(_extends({}, config, {\n    output\n  })));\n  return input => {\n    var _output$find;\n\n    const missingUnit = !unitRegex.test(output[0]) && ((_output$find = output.find(value => unitRegex.test(value))) == null ? void 0 : _output$find.replace(numberRegex, ''));\n    let i = 0;\n    return output[0].replace(numberRegex, () => `${interpolators[i++](input)}${missingUnit || ''}`).replace(rgbaRegex, rgbaRound);\n  };\n};\n\nconst prefix = 'react-spring: ';\n\nconst once = fn => {\n  const func = fn;\n  let called = false;\n\n  if (typeof func != 'function') {\n    throw new TypeError(`${prefix}once requires a function parameter`);\n  }\n\n  return (...args) => {\n    if (!called) {\n      func(...args);\n      called = true;\n    }\n  };\n};\n\nconst warnInterpolate = once(console.warn);\nfunction deprecateInterpolate() {\n  warnInterpolate(`${prefix}The \"interpolate\" function is deprecated in v9 (use \"to\" instead)`);\n}\nconst warnDirectCall = once(console.warn);\nfunction deprecateDirectCall() {\n  warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use \".start\" instead), this will be removed in later 0.X.0 versions`);\n}\n\nfunction isAnimatedString(value) {\n  return is.str(value) && (value[0] == '#' || /\\d/.test(value) || !isSSR() && cssVariableRegex.test(value) || value in (colors$1 || {}));\n}\n\nconst useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;\n\nconst useIsMounted = () => {\n  const isMounted = useRef(false);\n  useIsomorphicLayoutEffect(() => {\n    isMounted.current = true;\n    return () => {\n      isMounted.current = false;\n    };\n  }, []);\n  return isMounted;\n};\n\nfunction useForceUpdate() {\n  const update = useState()[1];\n  const isMounted = useIsMounted();\n  return () => {\n    if (isMounted.current) {\n      update(Math.random());\n    }\n  };\n}\n\nfunction useMemoOne(getResult, inputs) {\n  const [initial] = useState(() => ({\n    inputs,\n    result: getResult()\n  }));\n  const committed = useRef();\n  const prevCache = committed.current;\n  let cache = prevCache;\n\n  if (cache) {\n    const useCache = Boolean(inputs && cache.inputs && areInputsEqual(inputs, cache.inputs));\n\n    if (!useCache) {\n      cache = {\n        inputs,\n        result: getResult()\n      };\n    }\n  } else {\n    cache = initial;\n  }\n\n  useEffect(() => {\n    committed.current = cache;\n\n    if (prevCache == initial) {\n      initial.inputs = initial.result = undefined;\n    }\n  }, [cache]);\n  return cache.result;\n}\n\nfunction areInputsEqual(next, prev) {\n  if (next.length !== prev.length) {\n    return false;\n  }\n\n  for (let i = 0; i < next.length; i++) {\n    if (next[i] !== prev[i]) {\n      return false;\n    }\n  }\n\n  return true;\n}\n\nconst useOnce = effect => useEffect(effect, emptyDeps);\nconst emptyDeps = [];\n\nfunction usePrev(value) {\n  const prevRef = useRef();\n  useEffect(() => {\n    prevRef.current = value;\n  });\n  return prevRef.current;\n}\n\nconst useReducedMotion = () => {\n  const [reducedMotion, setReducedMotion] = useState(null);\n  useIsomorphicLayoutEffect(() => {\n    const mql = window.matchMedia('(prefers-reduced-motion)');\n\n    const handleMediaChange = e => {\n      setReducedMotion(e.matches);\n      assign({\n        skipAnimation: e.matches\n      });\n    };\n\n    handleMediaChange(mql);\n    mql.addEventListener('change', handleMediaChange);\n    return () => {\n      mql.removeEventListener('change', handleMediaChange);\n    };\n  }, []);\n  return reducedMotion;\n};\n\nexport { FluidValue, globals as Globals, addFluidObserver, callFluidObserver, callFluidObservers, colorToRgba, colors, createInterpolator, createStringInterpolator, defineHidden, deprecateDirectCall, deprecateInterpolate, each, eachProp, flush, flushCalls, frameLoop, getFluidObservers, getFluidValue, hasFluidValue, hex3, hex4, hex6, hex8, hsl, hsla, is, isAnimatedString, isEqual, isSSR, noop, removeFluidObserver, rgb, rgba, setFluidGetter, toArray, useForceUpdate, useIsomorphicLayoutEffect, useMemoOne, useOnce, usePrev, useReducedMotion };\n","import { defineHidden, is, createInterpolator, eachProp, hasFluidValue, getFluidValue, each, isAnimatedString, useForceUpdate, useIsomorphicLayoutEffect, addFluidObserver, removeFluidObserver, raf, useOnce } from '@react-spring/shared';\nimport * as React from 'react';\nimport { forwardRef, useRef, useCallback, useEffect } from 'react';\n\nconst $node = Symbol.for('Animated:node');\nconst isAnimated = value => !!value && value[$node] === value;\nconst getAnimated = owner => owner && owner[$node];\nconst setAnimated = (owner, node) => defineHidden(owner, $node, node);\nconst getPayload = owner => owner && owner[$node] && owner[$node].getPayload();\nclass Animated {\n  constructor() {\n    this.payload = void 0;\n    setAnimated(this, this);\n  }\n\n  getPayload() {\n    return this.payload || [];\n  }\n\n}\n\nclass AnimatedValue extends Animated {\n  constructor(_value) {\n    super();\n    this.done = true;\n    this.elapsedTime = void 0;\n    this.lastPosition = void 0;\n    this.lastVelocity = void 0;\n    this.v0 = void 0;\n    this.durationProgress = 0;\n    this._value = _value;\n\n    if (is.num(this._value)) {\n      this.lastPosition = this._value;\n    }\n  }\n\n  static create(value) {\n    return new AnimatedValue(value);\n  }\n\n  getPayload() {\n    return [this];\n  }\n\n  getValue() {\n    return this._value;\n  }\n\n  setValue(value, step) {\n    if (is.num(value)) {\n      this.lastPosition = value;\n\n      if (step) {\n        value = Math.round(value / step) * step;\n\n        if (this.done) {\n          this.lastPosition = value;\n        }\n      }\n    }\n\n    if (this._value === value) {\n      return false;\n    }\n\n    this._value = value;\n    return true;\n  }\n\n  reset() {\n    const {\n      done\n    } = this;\n    this.done = false;\n\n    if (is.num(this._value)) {\n      this.elapsedTime = 0;\n      this.durationProgress = 0;\n      this.lastPosition = this._value;\n      if (done) this.lastVelocity = null;\n      this.v0 = null;\n    }\n  }\n\n}\n\nclass AnimatedString extends AnimatedValue {\n  constructor(value) {\n    super(0);\n    this._string = null;\n    this._toString = void 0;\n    this._toString = createInterpolator({\n      output: [value, value]\n    });\n  }\n\n  static create(value) {\n    return new AnimatedString(value);\n  }\n\n  getValue() {\n    let value = this._string;\n    return value == null ? this._string = this._toString(this._value) : value;\n  }\n\n  setValue(value) {\n    if (is.str(value)) {\n      if (value == this._string) {\n        return false;\n      }\n\n      this._string = value;\n      this._value = 1;\n    } else if (super.setValue(value)) {\n      this._string = null;\n    } else {\n      return false;\n    }\n\n    return true;\n  }\n\n  reset(goal) {\n    if (goal) {\n      this._toString = createInterpolator({\n        output: [this.getValue(), goal]\n      });\n    }\n\n    this._value = 0;\n    super.reset();\n  }\n\n}\n\nconst TreeContext = {\n  dependencies: null\n};\n\nclass AnimatedObject extends Animated {\n  constructor(source) {\n    super();\n    this.source = source;\n    this.setValue(source);\n  }\n\n  getValue(animated) {\n    const values = {};\n    eachProp(this.source, (source, key) => {\n      if (isAnimated(source)) {\n        values[key] = source.getValue(animated);\n      } else if (hasFluidValue(source)) {\n        values[key] = getFluidValue(source);\n      } else if (!animated) {\n        values[key] = source;\n      }\n    });\n    return values;\n  }\n\n  setValue(source) {\n    this.source = source;\n    this.payload = this._makePayload(source);\n  }\n\n  reset() {\n    if (this.payload) {\n      each(this.payload, node => node.reset());\n    }\n  }\n\n  _makePayload(source) {\n    if (source) {\n      const payload = new Set();\n      eachProp(source, this._addToPayload, payload);\n      return Array.from(payload);\n    }\n  }\n\n  _addToPayload(source) {\n    if (TreeContext.dependencies && hasFluidValue(source)) {\n      TreeContext.dependencies.add(source);\n    }\n\n    const payload = getPayload(source);\n\n    if (payload) {\n      each(payload, node => this.add(node));\n    }\n  }\n\n}\n\nclass AnimatedArray extends AnimatedObject {\n  constructor(source) {\n    super(source);\n  }\n\n  static create(source) {\n    return new AnimatedArray(source);\n  }\n\n  getValue() {\n    return this.source.map(node => node.getValue());\n  }\n\n  setValue(source) {\n    const payload = this.getPayload();\n\n    if (source.length == payload.length) {\n      return payload.map((node, i) => node.setValue(source[i])).some(Boolean);\n    }\n\n    super.setValue(source.map(makeAnimated));\n    return true;\n  }\n\n}\n\nfunction makeAnimated(value) {\n  const nodeType = isAnimatedString(value) ? AnimatedString : AnimatedValue;\n  return nodeType.create(value);\n}\n\nfunction getAnimatedType(value) {\n  const parentNode = getAnimated(value);\n  return parentNode ? parentNode.constructor : is.arr(value) ? AnimatedArray : isAnimatedString(value) ? AnimatedString : AnimatedValue;\n}\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\nconst withAnimated = (Component, host) => {\n  const hasInstance = !is.fun(Component) || Component.prototype && Component.prototype.isReactComponent;\n  return forwardRef((givenProps, givenRef) => {\n    const instanceRef = useRef(null);\n    const ref = hasInstance && useCallback(value => {\n      instanceRef.current = updateRef(givenRef, value);\n    }, [givenRef]);\n    const [props, deps] = getAnimatedState(givenProps, host);\n    const forceUpdate = useForceUpdate();\n\n    const callback = () => {\n      const instance = instanceRef.current;\n\n      if (hasInstance && !instance) {\n        return;\n      }\n\n      const didUpdate = instance ? host.applyAnimatedValues(instance, props.getValue(true)) : false;\n\n      if (didUpdate === false) {\n        forceUpdate();\n      }\n    };\n\n    const observer = new PropsObserver(callback, deps);\n    const observerRef = useRef();\n    useIsomorphicLayoutEffect(() => {\n      observerRef.current = observer;\n      each(deps, dep => addFluidObserver(dep, observer));\n      return () => {\n        if (observerRef.current) {\n          each(observerRef.current.deps, dep => removeFluidObserver(dep, observerRef.current));\n          raf.cancel(observerRef.current.update);\n        }\n      };\n    });\n    useEffect(callback, []);\n    useOnce(() => () => {\n      const observer = observerRef.current;\n      each(observer.deps, dep => removeFluidObserver(dep, observer));\n    });\n    const usedProps = host.getComponentProps(props.getValue());\n    return React.createElement(Component, _extends({}, usedProps, {\n      ref: ref\n    }));\n  });\n};\n\nclass PropsObserver {\n  constructor(update, deps) {\n    this.update = update;\n    this.deps = deps;\n  }\n\n  eventObserved(event) {\n    if (event.type == 'change') {\n      raf.write(this.update);\n    }\n  }\n\n}\n\nfunction getAnimatedState(props, host) {\n  const dependencies = new Set();\n  TreeContext.dependencies = dependencies;\n  if (props.style) props = _extends({}, props, {\n    style: host.createAnimatedStyle(props.style)\n  });\n  props = new AnimatedObject(props);\n  TreeContext.dependencies = null;\n  return [props, dependencies];\n}\n\nfunction updateRef(ref, value) {\n  if (ref) {\n    if (is.fun(ref)) ref(value);else ref.current = value;\n  }\n\n  return value;\n}\n\nconst cacheKey = Symbol.for('AnimatedComponent');\nconst createHost = (components, {\n  applyAnimatedValues: _applyAnimatedValues = () => false,\n  createAnimatedStyle: _createAnimatedStyle = style => new AnimatedObject(style),\n  getComponentProps: _getComponentProps = props => props\n} = {}) => {\n  const hostConfig = {\n    applyAnimatedValues: _applyAnimatedValues,\n    createAnimatedStyle: _createAnimatedStyle,\n    getComponentProps: _getComponentProps\n  };\n\n  const animated = Component => {\n    const displayName = getDisplayName(Component) || 'Anonymous';\n\n    if (is.str(Component)) {\n      Component = animated[Component] || (animated[Component] = withAnimated(Component, hostConfig));\n    } else {\n      Component = Component[cacheKey] || (Component[cacheKey] = withAnimated(Component, hostConfig));\n    }\n\n    Component.displayName = `Animated(${displayName})`;\n    return Component;\n  };\n\n  eachProp(components, (Component, key) => {\n    if (is.arr(components)) {\n      key = getDisplayName(Component);\n    }\n\n    animated[key] = animated(Component);\n  });\n  return {\n    animated\n  };\n};\n\nconst getDisplayName = arg => is.str(arg) ? arg : arg && is.str(arg.displayName) ? arg.displayName : is.fun(arg) && arg.name || null;\n\nexport { Animated, AnimatedArray, AnimatedObject, AnimatedString, AnimatedValue, createHost, getAnimated, getAnimatedType, getPayload, isAnimated, setAnimated };\n","import { eachProp, is, toArray, getFluidValue, isAnimatedString, Globals, useIsomorphicLayoutEffect, each, raf, flush, FluidValue, deprecateInterpolate, callFluidObservers, frameLoop, hasFluidValue, flushCalls, isEqual, getFluidObservers, addFluidObserver, removeFluidObserver, noop, useMemoOne, deprecateDirectCall, useForceUpdate, usePrev, useOnce, createInterpolator, createStringInterpolator } from '@react-spring/shared';\nexport { Globals, createInterpolator, useIsomorphicLayoutEffect, useReducedMotion } from '@react-spring/shared';\nimport * as React from 'react';\nimport { useContext, useMemo, useRef, useState } from 'react';\nimport { getAnimated, AnimatedValue, getPayload, AnimatedString, getAnimatedType, setAnimated } from '@react-spring/animated';\nexport * from '@react-spring/types/animated';\nexport * from '@react-spring/types/interpolation';\n\nfunction _extends() {\n  _extends = Object.assign ? Object.assign.bind() : function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n  return _extends.apply(this, arguments);\n}\n\nfunction callProp(value, ...args) {\n  return is.fun(value) ? value(...args) : value;\n}\nconst matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray(value).includes(key)));\nconst resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;\nconst getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : undefined;\n\nconst noopTransform = value => value;\n\nconst getDefaultProps = (props, transform = noopTransform) => {\n  let keys = DEFAULT_PROPS;\n\n  if (props.default && props.default !== true) {\n    props = props.default;\n    keys = Object.keys(props);\n  }\n\n  const defaults = {};\n\n  for (const key of keys) {\n    const value = transform(props[key], key);\n\n    if (!is.und(value)) {\n      defaults[key] = value;\n    }\n  }\n\n  return defaults;\n};\nconst DEFAULT_PROPS = ['config', 'onProps', 'onStart', 'onChange', 'onPause', 'onResume', 'onRest'];\nconst RESERVED_PROPS = {\n  config: 1,\n  from: 1,\n  to: 1,\n  ref: 1,\n  loop: 1,\n  reset: 1,\n  pause: 1,\n  cancel: 1,\n  reverse: 1,\n  immediate: 1,\n  default: 1,\n  delay: 1,\n  onProps: 1,\n  onStart: 1,\n  onChange: 1,\n  onPause: 1,\n  onResume: 1,\n  onRest: 1,\n  onResolve: 1,\n  items: 1,\n  trail: 1,\n  sort: 1,\n  expires: 1,\n  initial: 1,\n  enter: 1,\n  update: 1,\n  leave: 1,\n  children: 1,\n  onDestroyed: 1,\n  keys: 1,\n  callId: 1,\n  parentId: 1\n};\n\nfunction getForwardProps(props) {\n  const forward = {};\n  let count = 0;\n  eachProp(props, (value, prop) => {\n    if (!RESERVED_PROPS[prop]) {\n      forward[prop] = value;\n      count++;\n    }\n  });\n\n  if (count) {\n    return forward;\n  }\n}\n\nfunction inferTo(props) {\n  const to = getForwardProps(props);\n\n  if (to) {\n    const out = {\n      to\n    };\n    eachProp(props, (val, key) => key in to || (out[key] = val));\n    return out;\n  }\n\n  return _extends({}, props);\n}\nfunction computeGoal(value) {\n  value = getFluidValue(value);\n  return is.arr(value) ? value.map(computeGoal) : isAnimatedString(value) ? Globals.createStringInterpolator({\n    range: [0, 1],\n    output: [value, value]\n  })(1) : value;\n}\nfunction hasProps(props) {\n  for (const _ in props) return true;\n\n  return false;\n}\nfunction isAsyncTo(to) {\n  return is.fun(to) || is.arr(to) && is.obj(to[0]);\n}\nfunction detachRefs(ctrl, ref) {\n  var _ctrl$ref;\n\n  (_ctrl$ref = ctrl.ref) == null ? void 0 : _ctrl$ref.delete(ctrl);\n  ref == null ? void 0 : ref.delete(ctrl);\n}\nfunction replaceRef(ctrl, ref) {\n  if (ref && ctrl.ref !== ref) {\n    var _ctrl$ref2;\n\n    (_ctrl$ref2 = ctrl.ref) == null ? void 0 : _ctrl$ref2.delete(ctrl);\n    ref.add(ctrl);\n    ctrl.ref = ref;\n  }\n}\n\nfunction useChain(refs, timeSteps, timeFrame = 1000) {\n  useIsomorphicLayoutEffect(() => {\n    if (timeSteps) {\n      let prevDelay = 0;\n      each(refs, (ref, i) => {\n        const controllers = ref.current;\n\n        if (controllers.length) {\n          let delay = timeFrame * timeSteps[i];\n          if (isNaN(delay)) delay = prevDelay;else prevDelay = delay;\n          each(controllers, ctrl => {\n            each(ctrl.queue, props => {\n              const memoizedDelayProp = props.delay;\n\n              props.delay = key => delay + callProp(memoizedDelayProp || 0, key);\n            });\n          });\n          ref.start();\n        }\n      });\n    } else {\n      let p = Promise.resolve();\n      each(refs, ref => {\n        const controllers = ref.current;\n\n        if (controllers.length) {\n          const queues = controllers.map(ctrl => {\n            const q = ctrl.queue;\n            ctrl.queue = [];\n            return q;\n          });\n          p = p.then(() => {\n            each(controllers, (ctrl, i) => each(queues[i] || [], update => ctrl.queue.push(update)));\n            return Promise.all(ref.start());\n          });\n        }\n      });\n    }\n  });\n}\n\nconst config = {\n  default: {\n    tension: 170,\n    friction: 26\n  },\n  gentle: {\n    tension: 120,\n    friction: 14\n  },\n  wobbly: {\n    tension: 180,\n    friction: 12\n  },\n  stiff: {\n    tension: 210,\n    friction: 20\n  },\n  slow: {\n    tension: 280,\n    friction: 60\n  },\n  molasses: {\n    tension: 280,\n    friction: 120\n  }\n};\nconst c1 = 1.70158;\nconst c2 = c1 * 1.525;\nconst c3 = c1 + 1;\nconst c4 = 2 * Math.PI / 3;\nconst c5 = 2 * Math.PI / 4.5;\n\nconst bounceOut = x => {\n  const n1 = 7.5625;\n  const d1 = 2.75;\n\n  if (x < 1 / d1) {\n    return n1 * x * x;\n  } else if (x < 2 / d1) {\n    return n1 * (x -= 1.5 / d1) * x + 0.75;\n  } else if (x < 2.5 / d1) {\n    return n1 * (x -= 2.25 / d1) * x + 0.9375;\n  } else {\n    return n1 * (x -= 2.625 / d1) * x + 0.984375;\n  }\n};\n\nconst easings = {\n  linear: x => x,\n  easeInQuad: x => x * x,\n  easeOutQuad: x => 1 - (1 - x) * (1 - x),\n  easeInOutQuad: x => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,\n  easeInCubic: x => x * x * x,\n  easeOutCubic: x => 1 - Math.pow(1 - x, 3),\n  easeInOutCubic: x => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,\n  easeInQuart: x => x * x * x * x,\n  easeOutQuart: x => 1 - Math.pow(1 - x, 4),\n  easeInOutQuart: x => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,\n  easeInQuint: x => x * x * x * x * x,\n  easeOutQuint: x => 1 - Math.pow(1 - x, 5),\n  easeInOutQuint: x => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,\n  easeInSine: x => 1 - Math.cos(x * Math.PI / 2),\n  easeOutSine: x => Math.sin(x * Math.PI / 2),\n  easeInOutSine: x => -(Math.cos(Math.PI * x) - 1) / 2,\n  easeInExpo: x => x === 0 ? 0 : Math.pow(2, 10 * x - 10),\n  easeOutExpo: x => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),\n  easeInOutExpo: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,\n  easeInCirc: x => 1 - Math.sqrt(1 - Math.pow(x, 2)),\n  easeOutCirc: x => Math.sqrt(1 - Math.pow(x - 1, 2)),\n  easeInOutCirc: x => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,\n  easeInBack: x => c3 * x * x * x - c1 * x * x,\n  easeOutBack: x => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),\n  easeInOutBack: x => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,\n  easeInElastic: x => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),\n  easeOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,\n  easeInOutElastic: x => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,\n  easeInBounce: x => 1 - bounceOut(1 - x),\n  easeOutBounce: bounceOut,\n  easeInOutBounce: x => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2\n};\n\nconst defaults = _extends({}, config.default, {\n  mass: 1,\n  damping: 1,\n  easing: easings.linear,\n  clamp: false\n});\n\nclass AnimationConfig {\n  constructor() {\n    this.tension = void 0;\n    this.friction = void 0;\n    this.frequency = void 0;\n    this.damping = void 0;\n    this.mass = void 0;\n    this.velocity = 0;\n    this.restVelocity = void 0;\n    this.precision = void 0;\n    this.progress = void 0;\n    this.duration = void 0;\n    this.easing = void 0;\n    this.clamp = void 0;\n    this.bounce = void 0;\n    this.decay = void 0;\n    this.round = void 0;\n    Object.assign(this, defaults);\n  }\n\n}\nfunction mergeConfig(config, newConfig, defaultConfig) {\n  if (defaultConfig) {\n    defaultConfig = _extends({}, defaultConfig);\n    sanitizeConfig(defaultConfig, newConfig);\n    newConfig = _extends({}, defaultConfig, newConfig);\n  }\n\n  sanitizeConfig(config, newConfig);\n  Object.assign(config, newConfig);\n\n  for (const key in defaults) {\n    if (config[key] == null) {\n      config[key] = defaults[key];\n    }\n  }\n\n  let {\n    mass,\n    frequency,\n    damping\n  } = config;\n\n  if (!is.und(frequency)) {\n    if (frequency < 0.01) frequency = 0.01;\n    if (damping < 0) damping = 0;\n    config.tension = Math.pow(2 * Math.PI / frequency, 2) * mass;\n    config.friction = 4 * Math.PI * damping * mass / frequency;\n  }\n\n  return config;\n}\n\nfunction sanitizeConfig(config, props) {\n  if (!is.und(props.decay)) {\n    config.duration = undefined;\n  } else {\n    const isTensionConfig = !is.und(props.tension) || !is.und(props.friction);\n\n    if (isTensionConfig || !is.und(props.frequency) || !is.und(props.damping) || !is.und(props.mass)) {\n      config.duration = undefined;\n      config.decay = undefined;\n    }\n\n    if (isTensionConfig) {\n      config.frequency = undefined;\n    }\n  }\n}\n\nconst emptyArray = [];\nclass Animation {\n  constructor() {\n    this.changed = false;\n    this.values = emptyArray;\n    this.toValues = null;\n    this.fromValues = emptyArray;\n    this.to = void 0;\n    this.from = void 0;\n    this.config = new AnimationConfig();\n    this.immediate = false;\n  }\n\n}\n\nfunction scheduleProps(callId, {\n  key,\n  props,\n  defaultProps,\n  state,\n  actions\n}) {\n  return new Promise((resolve, reject) => {\n    var _props$cancel;\n\n    let delay;\n    let timeout;\n    let cancel = matchProp((_props$cancel = props.cancel) != null ? _props$cancel : defaultProps == null ? void 0 : defaultProps.cancel, key);\n\n    if (cancel) {\n      onStart();\n    } else {\n      if (!is.und(props.pause)) {\n        state.paused = matchProp(props.pause, key);\n      }\n\n      let pause = defaultProps == null ? void 0 : defaultProps.pause;\n\n      if (pause !== true) {\n        pause = state.paused || matchProp(pause, key);\n      }\n\n      delay = callProp(props.delay || 0, key);\n\n      if (pause) {\n        state.resumeQueue.add(onResume);\n        actions.pause();\n      } else {\n        actions.resume();\n        onResume();\n      }\n    }\n\n    function onPause() {\n      state.resumeQueue.add(onResume);\n      state.timeouts.delete(timeout);\n      timeout.cancel();\n      delay = timeout.time - raf.now();\n    }\n\n    function onResume() {\n      if (delay > 0 && !Globals.skipAnimation) {\n        state.delayed = true;\n        timeout = raf.setTimeout(onStart, delay);\n        state.pauseQueue.add(onPause);\n        state.timeouts.add(timeout);\n      } else {\n        onStart();\n      }\n    }\n\n    function onStart() {\n      if (state.delayed) {\n        state.delayed = false;\n      }\n\n      state.pauseQueue.delete(onPause);\n      state.timeouts.delete(timeout);\n\n      if (callId <= (state.cancelId || 0)) {\n        cancel = true;\n      }\n\n      try {\n        actions.start(_extends({}, props, {\n          callId,\n          cancel\n        }), resolve);\n      } catch (err) {\n        reject(err);\n      }\n    }\n  });\n}\n\nconst getCombinedResult = (target, results) => results.length == 1 ? results[0] : results.some(result => result.cancelled) ? getCancelledResult(target.get()) : results.every(result => result.noop) ? getNoopResult(target.get()) : getFinishedResult(target.get(), results.every(result => result.finished));\nconst getNoopResult = value => ({\n  value,\n  noop: true,\n  finished: true,\n  cancelled: false\n});\nconst getFinishedResult = (value, finished, cancelled = false) => ({\n  value,\n  finished,\n  cancelled\n});\nconst getCancelledResult = value => ({\n  value,\n  cancelled: true,\n  finished: false\n});\n\nfunction runAsync(to, props, state, target) {\n  const {\n    callId,\n    parentId,\n    onRest\n  } = props;\n  const {\n    asyncTo: prevTo,\n    promise: prevPromise\n  } = state;\n\n  if (!parentId && to === prevTo && !props.reset) {\n    return prevPromise;\n  }\n\n  return state.promise = (async () => {\n    state.asyncId = callId;\n    state.asyncTo = to;\n    const defaultProps = getDefaultProps(props, (value, key) => key === 'onRest' ? undefined : value);\n    let preventBail;\n    let bail;\n    const bailPromise = new Promise((resolve, reject) => (preventBail = resolve, bail = reject));\n\n    const bailIfEnded = bailSignal => {\n      const bailResult = callId <= (state.cancelId || 0) && getCancelledResult(target) || callId !== state.asyncId && getFinishedResult(target, false);\n\n      if (bailResult) {\n        bailSignal.result = bailResult;\n        bail(bailSignal);\n        throw bailSignal;\n      }\n    };\n\n    const animate = (arg1, arg2) => {\n      const bailSignal = new BailSignal();\n      const skipAnimationSignal = new SkipAniamtionSignal();\n      return (async () => {\n        if (Globals.skipAnimation) {\n          stopAsync(state);\n          skipAnimationSignal.result = getFinishedResult(target, false);\n          bail(skipAnimationSignal);\n          throw skipAnimationSignal;\n        }\n\n        bailIfEnded(bailSignal);\n        const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n          to: arg1\n        });\n        props.parentId = callId;\n        eachProp(defaultProps, (value, key) => {\n          if (is.und(props[key])) {\n            props[key] = value;\n          }\n        });\n        const result = await target.start(props);\n        bailIfEnded(bailSignal);\n\n        if (state.paused) {\n          await new Promise(resume => {\n            state.resumeQueue.add(resume);\n          });\n        }\n\n        return result;\n      })();\n    };\n\n    let result;\n\n    if (Globals.skipAnimation) {\n      stopAsync(state);\n      return getFinishedResult(target, false);\n    }\n\n    try {\n      let animating;\n\n      if (is.arr(to)) {\n        animating = (async queue => {\n          for (const props of queue) {\n            await animate(props);\n          }\n        })(to);\n      } else {\n        animating = Promise.resolve(to(animate, target.stop.bind(target)));\n      }\n\n      await Promise.all([animating.then(preventBail), bailPromise]);\n      result = getFinishedResult(target.get(), true, false);\n    } catch (err) {\n      if (err instanceof BailSignal) {\n        result = err.result;\n      } else if (err instanceof SkipAniamtionSignal) {\n        result = err.result;\n      } else {\n        throw err;\n      }\n    } finally {\n      if (callId == state.asyncId) {\n        state.asyncId = parentId;\n        state.asyncTo = parentId ? prevTo : undefined;\n        state.promise = parentId ? prevPromise : undefined;\n      }\n    }\n\n    if (is.fun(onRest)) {\n      raf.batchedUpdates(() => {\n        onRest(result, target, target.item);\n      });\n    }\n\n    return result;\n  })();\n}\nfunction stopAsync(state, cancelId) {\n  flush(state.timeouts, t => t.cancel());\n  state.pauseQueue.clear();\n  state.resumeQueue.clear();\n  state.asyncId = state.asyncTo = state.promise = undefined;\n  if (cancelId) state.cancelId = cancelId;\n}\nclass BailSignal extends Error {\n  constructor() {\n    super('An async animation has been interrupted. You see this error because you ' + 'forgot to use `await` or `.catch(...)` on its returned promise.');\n    this.result = void 0;\n  }\n\n}\nclass SkipAniamtionSignal extends Error {\n  constructor() {\n    super('SkipAnimationSignal');\n    this.result = void 0;\n  }\n\n}\n\nconst isFrameValue = value => value instanceof FrameValue;\nlet nextId$1 = 1;\nclass FrameValue extends FluidValue {\n  constructor(...args) {\n    super(...args);\n    this.id = nextId$1++;\n    this.key = void 0;\n    this._priority = 0;\n  }\n\n  get priority() {\n    return this._priority;\n  }\n\n  set priority(priority) {\n    if (this._priority != priority) {\n      this._priority = priority;\n\n      this._onPriorityChange(priority);\n    }\n  }\n\n  get() {\n    const node = getAnimated(this);\n    return node && node.getValue();\n  }\n\n  to(...args) {\n    return Globals.to(this, args);\n  }\n\n  interpolate(...args) {\n    deprecateInterpolate();\n    return Globals.to(this, args);\n  }\n\n  toJSON() {\n    return this.get();\n  }\n\n  observerAdded(count) {\n    if (count == 1) this._attach();\n  }\n\n  observerRemoved(count) {\n    if (count == 0) this._detach();\n  }\n\n  _attach() {}\n\n  _detach() {}\n\n  _onChange(value, idle = false) {\n    callFluidObservers(this, {\n      type: 'change',\n      parent: this,\n      value,\n      idle\n    });\n  }\n\n  _onPriorityChange(priority) {\n    if (!this.idle) {\n      frameLoop.sort(this);\n    }\n\n    callFluidObservers(this, {\n      type: 'priority',\n      parent: this,\n      priority\n    });\n  }\n\n}\n\nconst $P = Symbol.for('SpringPhase');\nconst HAS_ANIMATED = 1;\nconst IS_ANIMATING = 2;\nconst IS_PAUSED = 4;\nconst hasAnimated = target => (target[$P] & HAS_ANIMATED) > 0;\nconst isAnimating = target => (target[$P] & IS_ANIMATING) > 0;\nconst isPaused = target => (target[$P] & IS_PAUSED) > 0;\nconst setActiveBit = (target, active) => active ? target[$P] |= IS_ANIMATING | HAS_ANIMATED : target[$P] &= ~IS_ANIMATING;\nconst setPausedBit = (target, paused) => paused ? target[$P] |= IS_PAUSED : target[$P] &= ~IS_PAUSED;\n\nclass SpringValue extends FrameValue {\n  constructor(arg1, arg2) {\n    super();\n    this.key = void 0;\n    this.animation = new Animation();\n    this.queue = void 0;\n    this.defaultProps = {};\n    this._state = {\n      paused: false,\n      delayed: false,\n      pauseQueue: new Set(),\n      resumeQueue: new Set(),\n      timeouts: new Set()\n    };\n    this._pendingCalls = new Set();\n    this._lastCallId = 0;\n    this._lastToId = 0;\n    this._memoizedDuration = 0;\n\n    if (!is.und(arg1) || !is.und(arg2)) {\n      const props = is.obj(arg1) ? _extends({}, arg1) : _extends({}, arg2, {\n        from: arg1\n      });\n\n      if (is.und(props.default)) {\n        props.default = true;\n      }\n\n      this.start(props);\n    }\n  }\n\n  get idle() {\n    return !(isAnimating(this) || this._state.asyncTo) || isPaused(this);\n  }\n\n  get goal() {\n    return getFluidValue(this.animation.to);\n  }\n\n  get velocity() {\n    const node = getAnimated(this);\n    return node instanceof AnimatedValue ? node.lastVelocity || 0 : node.getPayload().map(node => node.lastVelocity || 0);\n  }\n\n  get hasAnimated() {\n    return hasAnimated(this);\n  }\n\n  get isAnimating() {\n    return isAnimating(this);\n  }\n\n  get isPaused() {\n    return isPaused(this);\n  }\n\n  get isDelayed() {\n    return this._state.delayed;\n  }\n\n  advance(dt) {\n    let idle = true;\n    let changed = false;\n    const anim = this.animation;\n    let {\n      config,\n      toValues\n    } = anim;\n    const payload = getPayload(anim.to);\n\n    if (!payload && hasFluidValue(anim.to)) {\n      toValues = toArray(getFluidValue(anim.to));\n    }\n\n    anim.values.forEach((node, i) => {\n      if (node.done) return;\n      const to = node.constructor == AnimatedString ? 1 : payload ? payload[i].lastPosition : toValues[i];\n      let finished = anim.immediate;\n      let position = to;\n\n      if (!finished) {\n        position = node.lastPosition;\n\n        if (config.tension <= 0) {\n          node.done = true;\n          return;\n        }\n\n        let elapsed = node.elapsedTime += dt;\n        const from = anim.fromValues[i];\n        const v0 = node.v0 != null ? node.v0 : node.v0 = is.arr(config.velocity) ? config.velocity[i] : config.velocity;\n        let velocity;\n        const precision = config.precision || (from == to ? 0.005 : Math.min(1, Math.abs(to - from) * 0.001));\n\n        if (!is.und(config.duration)) {\n          let p = 1;\n\n          if (config.duration > 0) {\n            if (this._memoizedDuration !== config.duration) {\n              this._memoizedDuration = config.duration;\n\n              if (node.durationProgress > 0) {\n                node.elapsedTime = config.duration * node.durationProgress;\n                elapsed = node.elapsedTime += dt;\n              }\n            }\n\n            p = (config.progress || 0) + elapsed / this._memoizedDuration;\n            p = p > 1 ? 1 : p < 0 ? 0 : p;\n            node.durationProgress = p;\n          }\n\n          position = from + config.easing(p) * (to - from);\n          velocity = (position - node.lastPosition) / dt;\n          finished = p == 1;\n        } else if (config.decay) {\n          const decay = config.decay === true ? 0.998 : config.decay;\n          const e = Math.exp(-(1 - decay) * elapsed);\n          position = from + v0 / (1 - decay) * (1 - e);\n          finished = Math.abs(node.lastPosition - position) <= precision;\n          velocity = v0 * e;\n        } else {\n          velocity = node.lastVelocity == null ? v0 : node.lastVelocity;\n          const restVelocity = config.restVelocity || precision / 10;\n          const bounceFactor = config.clamp ? 0 : config.bounce;\n          const canBounce = !is.und(bounceFactor);\n          const isGrowing = from == to ? node.v0 > 0 : from < to;\n          let isMoving;\n          let isBouncing = false;\n          const step = 1;\n          const numSteps = Math.ceil(dt / step);\n\n          for (let n = 0; n < numSteps; ++n) {\n            isMoving = Math.abs(velocity) > restVelocity;\n\n            if (!isMoving) {\n              finished = Math.abs(to - position) <= precision;\n\n              if (finished) {\n                break;\n              }\n            }\n\n            if (canBounce) {\n              isBouncing = position == to || position > to == isGrowing;\n\n              if (isBouncing) {\n                velocity = -velocity * bounceFactor;\n                position = to;\n              }\n            }\n\n            const springForce = -config.tension * 0.000001 * (position - to);\n            const dampingForce = -config.friction * 0.001 * velocity;\n            const acceleration = (springForce + dampingForce) / config.mass;\n            velocity = velocity + acceleration * step;\n            position = position + velocity * step;\n          }\n        }\n\n        node.lastVelocity = velocity;\n\n        if (Number.isNaN(position)) {\n          console.warn(`Got NaN while animating:`, this);\n          finished = true;\n        }\n      }\n\n      if (payload && !payload[i].done) {\n        finished = false;\n      }\n\n      if (finished) {\n        node.done = true;\n      } else {\n        idle = false;\n      }\n\n      if (node.setValue(position, config.round)) {\n        changed = true;\n      }\n    });\n    const node = getAnimated(this);\n    const currVal = node.getValue();\n\n    if (idle) {\n      const finalVal = getFluidValue(anim.to);\n\n      if ((currVal !== finalVal || changed) && !config.decay) {\n        node.setValue(finalVal);\n\n        this._onChange(finalVal);\n      } else if (changed && config.decay) {\n        this._onChange(currVal);\n      }\n\n      this._stop();\n    } else if (changed) {\n      this._onChange(currVal);\n    }\n  }\n\n  set(value) {\n    raf.batchedUpdates(() => {\n      this._stop();\n\n      this._focus(value);\n\n      this._set(value);\n    });\n    return this;\n  }\n\n  pause() {\n    this._update({\n      pause: true\n    });\n  }\n\n  resume() {\n    this._update({\n      pause: false\n    });\n  }\n\n  finish() {\n    if (isAnimating(this)) {\n      const {\n        to,\n        config\n      } = this.animation;\n      raf.batchedUpdates(() => {\n        this._onStart();\n\n        if (!config.decay) {\n          this._set(to, false);\n        }\n\n        this._stop();\n      });\n    }\n\n    return this;\n  }\n\n  update(props) {\n    const queue = this.queue || (this.queue = []);\n    queue.push(props);\n    return this;\n  }\n\n  start(to, arg2) {\n    let queue;\n\n    if (!is.und(to)) {\n      queue = [is.obj(to) ? to : _extends({}, arg2, {\n        to\n      })];\n    } else {\n      queue = this.queue || [];\n      this.queue = [];\n    }\n\n    return Promise.all(queue.map(props => {\n      const up = this._update(props);\n\n      return up;\n    })).then(results => getCombinedResult(this, results));\n  }\n\n  stop(cancel) {\n    const {\n      to\n    } = this.animation;\n\n    this._focus(this.get());\n\n    stopAsync(this._state, cancel && this._lastCallId);\n    raf.batchedUpdates(() => this._stop(to, cancel));\n    return this;\n  }\n\n  reset() {\n    this._update({\n      reset: true\n    });\n  }\n\n  eventObserved(event) {\n    if (event.type == 'change') {\n      this._start();\n    } else if (event.type == 'priority') {\n      this.priority = event.priority + 1;\n    }\n  }\n\n  _prepareNode(props) {\n    const key = this.key || '';\n    let {\n      to,\n      from\n    } = props;\n    to = is.obj(to) ? to[key] : to;\n\n    if (to == null || isAsyncTo(to)) {\n      to = undefined;\n    }\n\n    from = is.obj(from) ? from[key] : from;\n\n    if (from == null) {\n      from = undefined;\n    }\n\n    const range = {\n      to,\n      from\n    };\n\n    if (!hasAnimated(this)) {\n      if (props.reverse) [to, from] = [from, to];\n      from = getFluidValue(from);\n\n      if (!is.und(from)) {\n        this._set(from);\n      } else if (!getAnimated(this)) {\n        this._set(to);\n      }\n    }\n\n    return range;\n  }\n\n  _update(_ref, isLoop) {\n    let props = _extends({}, _ref);\n\n    const {\n      key,\n      defaultProps\n    } = this;\n    if (props.default) Object.assign(defaultProps, getDefaultProps(props, (value, prop) => /^on/.test(prop) ? resolveProp(value, key) : value));\n    mergeActiveFn(this, props, 'onProps');\n    sendEvent(this, 'onProps', props, this);\n\n    const range = this._prepareNode(props);\n\n    if (Object.isFrozen(this)) {\n      throw Error('Cannot animate a `SpringValue` object that is frozen. ' + 'Did you forget to pass your component to `animated(...)` before animating its props?');\n    }\n\n    const state = this._state;\n    return scheduleProps(++this._lastCallId, {\n      key,\n      props,\n      defaultProps,\n      state,\n      actions: {\n        pause: () => {\n          if (!isPaused(this)) {\n            setPausedBit(this, true);\n            flushCalls(state.pauseQueue);\n            sendEvent(this, 'onPause', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n          }\n        },\n        resume: () => {\n          if (isPaused(this)) {\n            setPausedBit(this, false);\n\n            if (isAnimating(this)) {\n              this._resume();\n            }\n\n            flushCalls(state.resumeQueue);\n            sendEvent(this, 'onResume', getFinishedResult(this, checkFinished(this, this.animation.to)), this);\n          }\n        },\n        start: this._merge.bind(this, range)\n      }\n    }).then(result => {\n      if (props.loop && result.finished && !(isLoop && result.noop)) {\n        const nextProps = createLoopUpdate(props);\n\n        if (nextProps) {\n          return this._update(nextProps, true);\n        }\n      }\n\n      return result;\n    });\n  }\n\n  _merge(range, props, resolve) {\n    if (props.cancel) {\n      this.stop(true);\n      return resolve(getCancelledResult(this));\n    }\n\n    const hasToProp = !is.und(range.to);\n    const hasFromProp = !is.und(range.from);\n\n    if (hasToProp || hasFromProp) {\n      if (props.callId > this._lastToId) {\n        this._lastToId = props.callId;\n      } else {\n        return resolve(getCancelledResult(this));\n      }\n    }\n\n    const {\n      key,\n      defaultProps,\n      animation: anim\n    } = this;\n    const {\n      to: prevTo,\n      from: prevFrom\n    } = anim;\n    let {\n      to = prevTo,\n      from = prevFrom\n    } = range;\n\n    if (hasFromProp && !hasToProp && (!props.default || is.und(to))) {\n      to = from;\n    }\n\n    if (props.reverse) [to, from] = [from, to];\n    const hasFromChanged = !isEqual(from, prevFrom);\n\n    if (hasFromChanged) {\n      anim.from = from;\n    }\n\n    from = getFluidValue(from);\n    const hasToChanged = !isEqual(to, prevTo);\n\n    if (hasToChanged) {\n      this._focus(to);\n    }\n\n    const hasAsyncTo = isAsyncTo(props.to);\n    const {\n      config\n    } = anim;\n    const {\n      decay,\n      velocity\n    } = config;\n\n    if (hasToProp || hasFromProp) {\n      config.velocity = 0;\n    }\n\n    if (props.config && !hasAsyncTo) {\n      mergeConfig(config, callProp(props.config, key), props.config !== defaultProps.config ? callProp(defaultProps.config, key) : void 0);\n    }\n\n    let node = getAnimated(this);\n\n    if (!node || is.und(to)) {\n      return resolve(getFinishedResult(this, true));\n    }\n\n    const reset = is.und(props.reset) ? hasFromProp && !props.default : !is.und(from) && matchProp(props.reset, key);\n    const value = reset ? from : this.get();\n    const goal = computeGoal(to);\n    const isAnimatable = is.num(goal) || is.arr(goal) || isAnimatedString(goal);\n    const immediate = !hasAsyncTo && (!isAnimatable || matchProp(defaultProps.immediate || props.immediate, key));\n\n    if (hasToChanged) {\n      const nodeType = getAnimatedType(to);\n\n      if (nodeType !== node.constructor) {\n        if (immediate) {\n          node = this._set(goal);\n        } else throw Error(`Cannot animate between ${node.constructor.name} and ${nodeType.name}, as the \"to\" prop suggests`);\n      }\n    }\n\n    const goalType = node.constructor;\n    let started = hasFluidValue(to);\n    let finished = false;\n\n    if (!started) {\n      const hasValueChanged = reset || !hasAnimated(this) && hasFromChanged;\n\n      if (hasToChanged || hasValueChanged) {\n        finished = isEqual(computeGoal(value), goal);\n        started = !finished;\n      }\n\n      if (!isEqual(anim.immediate, immediate) && !immediate || !isEqual(config.decay, decay) || !isEqual(config.velocity, velocity)) {\n        started = true;\n      }\n    }\n\n    if (finished && isAnimating(this)) {\n      if (anim.changed && !reset) {\n        started = true;\n      } else if (!started) {\n        this._stop(prevTo);\n      }\n    }\n\n    if (!hasAsyncTo) {\n      if (started || hasFluidValue(prevTo)) {\n        anim.values = node.getPayload();\n        anim.toValues = hasFluidValue(to) ? null : goalType == AnimatedString ? [1] : toArray(goal);\n      }\n\n      if (anim.immediate != immediate) {\n        anim.immediate = immediate;\n\n        if (!immediate && !reset) {\n          this._set(prevTo);\n        }\n      }\n\n      if (started) {\n        const {\n          onRest\n        } = anim;\n        each(ACTIVE_EVENTS, type => mergeActiveFn(this, props, type));\n        const result = getFinishedResult(this, checkFinished(this, prevTo));\n        flushCalls(this._pendingCalls, result);\n\n        this._pendingCalls.add(resolve);\n\n        if (anim.changed) raf.batchedUpdates(() => {\n          anim.changed = !reset;\n          onRest == null ? void 0 : onRest(result, this);\n\n          if (reset) {\n            callProp(defaultProps.onRest, result);\n          } else {\n            anim.onStart == null ? void 0 : anim.onStart(result, this);\n          }\n        });\n      }\n    }\n\n    if (reset) {\n      this._set(value);\n    }\n\n    if (hasAsyncTo) {\n      resolve(runAsync(props.to, props, this._state, this));\n    } else if (started) {\n      this._start();\n    } else if (isAnimating(this) && !hasToChanged) {\n      this._pendingCalls.add(resolve);\n    } else {\n      resolve(getNoopResult(value));\n    }\n  }\n\n  _focus(value) {\n    const anim = this.animation;\n\n    if (value !== anim.to) {\n      if (getFluidObservers(this)) {\n        this._detach();\n      }\n\n      anim.to = value;\n\n      if (getFluidObservers(this)) {\n        this._attach();\n      }\n    }\n  }\n\n  _attach() {\n    let priority = 0;\n    const {\n      to\n    } = this.animation;\n\n    if (hasFluidValue(to)) {\n      addFluidObserver(to, this);\n\n      if (isFrameValue(to)) {\n        priority = to.priority + 1;\n      }\n    }\n\n    this.priority = priority;\n  }\n\n  _detach() {\n    const {\n      to\n    } = this.animation;\n\n    if (hasFluidValue(to)) {\n      removeFluidObserver(to, this);\n    }\n  }\n\n  _set(arg, idle = true) {\n    const value = getFluidValue(arg);\n\n    if (!is.und(value)) {\n      const oldNode = getAnimated(this);\n\n      if (!oldNode || !isEqual(value, oldNode.getValue())) {\n        const nodeType = getAnimatedType(value);\n\n        if (!oldNode || oldNode.constructor != nodeType) {\n          setAnimated(this, nodeType.create(value));\n        } else {\n          oldNode.setValue(value);\n        }\n\n        if (oldNode) {\n          raf.batchedUpdates(() => {\n            this._onChange(value, idle);\n          });\n        }\n      }\n    }\n\n    return getAnimated(this);\n  }\n\n  _onStart() {\n    const anim = this.animation;\n\n    if (!anim.changed) {\n      anim.changed = true;\n      sendEvent(this, 'onStart', getFinishedResult(this, checkFinished(this, anim.to)), this);\n    }\n  }\n\n  _onChange(value, idle) {\n    if (!idle) {\n      this._onStart();\n\n      callProp(this.animation.onChange, value, this);\n    }\n\n    callProp(this.defaultProps.onChange, value, this);\n\n    super._onChange(value, idle);\n  }\n\n  _start() {\n    const anim = this.animation;\n    getAnimated(this).reset(getFluidValue(anim.to));\n\n    if (!anim.immediate) {\n      anim.fromValues = anim.values.map(node => node.lastPosition);\n    }\n\n    if (!isAnimating(this)) {\n      setActiveBit(this, true);\n\n      if (!isPaused(this)) {\n        this._resume();\n      }\n    }\n  }\n\n  _resume() {\n    if (Globals.skipAnimation) {\n      this.finish();\n    } else {\n      frameLoop.start(this);\n    }\n  }\n\n  _stop(goal, cancel) {\n    if (isAnimating(this)) {\n      setActiveBit(this, false);\n      const anim = this.animation;\n      each(anim.values, node => {\n        node.done = true;\n      });\n\n      if (anim.toValues) {\n        anim.onChange = anim.onPause = anim.onResume = undefined;\n      }\n\n      callFluidObservers(this, {\n        type: 'idle',\n        parent: this\n      });\n      const result = cancel ? getCancelledResult(this.get()) : getFinishedResult(this.get(), checkFinished(this, goal != null ? goal : anim.to));\n      flushCalls(this._pendingCalls, result);\n\n      if (anim.changed) {\n        anim.changed = false;\n        sendEvent(this, 'onRest', result, this);\n      }\n    }\n  }\n\n}\n\nfunction checkFinished(target, to) {\n  const goal = computeGoal(to);\n  const value = computeGoal(target.get());\n  return isEqual(value, goal);\n}\n\nfunction createLoopUpdate(props, loop = props.loop, to = props.to) {\n  let loopRet = callProp(loop);\n\n  if (loopRet) {\n    const overrides = loopRet !== true && inferTo(loopRet);\n    const reverse = (overrides || props).reverse;\n    const reset = !overrides || overrides.reset;\n    return createUpdate(_extends({}, props, {\n      loop,\n      default: false,\n      pause: undefined,\n      to: !reverse || isAsyncTo(to) ? to : undefined,\n      from: reset ? props.from : undefined,\n      reset\n    }, overrides));\n  }\n}\nfunction createUpdate(props) {\n  const {\n    to,\n    from\n  } = props = inferTo(props);\n  const keys = new Set();\n  if (is.obj(to)) findDefined(to, keys);\n  if (is.obj(from)) findDefined(from, keys);\n  props.keys = keys.size ? Array.from(keys) : null;\n  return props;\n}\nfunction declareUpdate(props) {\n  const update = createUpdate(props);\n\n  if (is.und(update.default)) {\n    update.default = getDefaultProps(update);\n  }\n\n  return update;\n}\n\nfunction findDefined(values, keys) {\n  eachProp(values, (value, key) => value != null && keys.add(key));\n}\n\nconst ACTIVE_EVENTS = ['onStart', 'onRest', 'onChange', 'onPause', 'onResume'];\n\nfunction mergeActiveFn(target, props, type) {\n  target.animation[type] = props[type] !== getDefaultProp(props, type) ? resolveProp(props[type], target.key) : undefined;\n}\n\nfunction sendEvent(target, type, ...args) {\n  var _target$animation$typ, _target$animation, _target$defaultProps$, _target$defaultProps;\n\n  (_target$animation$typ = (_target$animation = target.animation)[type]) == null ? void 0 : _target$animation$typ.call(_target$animation, ...args);\n  (_target$defaultProps$ = (_target$defaultProps = target.defaultProps)[type]) == null ? void 0 : _target$defaultProps$.call(_target$defaultProps, ...args);\n}\n\nconst BATCHED_EVENTS = ['onStart', 'onChange', 'onRest'];\nlet nextId = 1;\nclass Controller {\n  constructor(props, flush) {\n    this.id = nextId++;\n    this.springs = {};\n    this.queue = [];\n    this.ref = void 0;\n    this._flush = void 0;\n    this._initialProps = void 0;\n    this._lastAsyncId = 0;\n    this._active = new Set();\n    this._changed = new Set();\n    this._started = false;\n    this._item = void 0;\n    this._state = {\n      paused: false,\n      pauseQueue: new Set(),\n      resumeQueue: new Set(),\n      timeouts: new Set()\n    };\n    this._events = {\n      onStart: new Map(),\n      onChange: new Map(),\n      onRest: new Map()\n    };\n    this._onFrame = this._onFrame.bind(this);\n\n    if (flush) {\n      this._flush = flush;\n    }\n\n    if (props) {\n      this.start(_extends({\n        default: true\n      }, props));\n    }\n  }\n\n  get idle() {\n    return !this._state.asyncTo && Object.values(this.springs).every(spring => {\n      return spring.idle && !spring.isDelayed && !spring.isPaused;\n    });\n  }\n\n  get item() {\n    return this._item;\n  }\n\n  set item(item) {\n    this._item = item;\n  }\n\n  get() {\n    const values = {};\n    this.each((spring, key) => values[key] = spring.get());\n    return values;\n  }\n\n  set(values) {\n    for (const key in values) {\n      const value = values[key];\n\n      if (!is.und(value)) {\n        this.springs[key].set(value);\n      }\n    }\n  }\n\n  update(props) {\n    if (props) {\n      this.queue.push(createUpdate(props));\n    }\n\n    return this;\n  }\n\n  start(props) {\n    let {\n      queue\n    } = this;\n\n    if (props) {\n      queue = toArray(props).map(createUpdate);\n    } else {\n      this.queue = [];\n    }\n\n    if (this._flush) {\n      return this._flush(this, queue);\n    }\n\n    prepareKeys(this, queue);\n    return flushUpdateQueue(this, queue);\n  }\n\n  stop(arg, keys) {\n    if (arg !== !!arg) {\n      keys = arg;\n    }\n\n    if (keys) {\n      const springs = this.springs;\n      each(toArray(keys), key => springs[key].stop(!!arg));\n    } else {\n      stopAsync(this._state, this._lastAsyncId);\n      this.each(spring => spring.stop(!!arg));\n    }\n\n    return this;\n  }\n\n  pause(keys) {\n    if (is.und(keys)) {\n      this.start({\n        pause: true\n      });\n    } else {\n      const springs = this.springs;\n      each(toArray(keys), key => springs[key].pause());\n    }\n\n    return this;\n  }\n\n  resume(keys) {\n    if (is.und(keys)) {\n      this.start({\n        pause: false\n      });\n    } else {\n      const springs = this.springs;\n      each(toArray(keys), key => springs[key].resume());\n    }\n\n    return this;\n  }\n\n  each(iterator) {\n    eachProp(this.springs, iterator);\n  }\n\n  _onFrame() {\n    const {\n      onStart,\n      onChange,\n      onRest\n    } = this._events;\n    const active = this._active.size > 0;\n    const changed = this._changed.size > 0;\n\n    if (active && !this._started || changed && !this._started) {\n      this._started = true;\n      flush(onStart, ([onStart, result]) => {\n        result.value = this.get();\n        onStart(result, this, this._item);\n      });\n    }\n\n    const idle = !active && this._started;\n    const values = changed || idle && onRest.size ? this.get() : null;\n\n    if (changed && onChange.size) {\n      flush(onChange, ([onChange, result]) => {\n        result.value = values;\n        onChange(result, this, this._item);\n      });\n    }\n\n    if (idle) {\n      this._started = false;\n      flush(onRest, ([onRest, result]) => {\n        result.value = values;\n        onRest(result, this, this._item);\n      });\n    }\n  }\n\n  eventObserved(event) {\n    if (event.type == 'change') {\n      this._changed.add(event.parent);\n\n      if (!event.idle) {\n        this._active.add(event.parent);\n      }\n    } else if (event.type == 'idle') {\n      this._active.delete(event.parent);\n    } else return;\n\n    raf.onFrame(this._onFrame);\n  }\n\n}\nfunction flushUpdateQueue(ctrl, queue) {\n  return Promise.all(queue.map(props => flushUpdate(ctrl, props))).then(results => getCombinedResult(ctrl, results));\n}\nasync function flushUpdate(ctrl, props, isLoop) {\n  const {\n    keys,\n    to,\n    from,\n    loop,\n    onRest,\n    onResolve\n  } = props;\n  const defaults = is.obj(props.default) && props.default;\n\n  if (loop) {\n    props.loop = false;\n  }\n\n  if (to === false) props.to = null;\n  if (from === false) props.from = null;\n  const asyncTo = is.arr(to) || is.fun(to) ? to : undefined;\n\n  if (asyncTo) {\n    props.to = undefined;\n    props.onRest = undefined;\n\n    if (defaults) {\n      defaults.onRest = undefined;\n    }\n  } else {\n    each(BATCHED_EVENTS, key => {\n      const handler = props[key];\n\n      if (is.fun(handler)) {\n        const queue = ctrl['_events'][key];\n\n        props[key] = ({\n          finished,\n          cancelled\n        }) => {\n          const result = queue.get(handler);\n\n          if (result) {\n            if (!finished) result.finished = false;\n            if (cancelled) result.cancelled = true;\n          } else {\n            queue.set(handler, {\n              value: null,\n              finished: finished || false,\n              cancelled: cancelled || false\n            });\n          }\n        };\n\n        if (defaults) {\n          defaults[key] = props[key];\n        }\n      }\n    });\n  }\n\n  const state = ctrl['_state'];\n\n  if (props.pause === !state.paused) {\n    state.paused = props.pause;\n    flushCalls(props.pause ? state.pauseQueue : state.resumeQueue);\n  } else if (state.paused) {\n    props.pause = true;\n  }\n\n  const promises = (keys || Object.keys(ctrl.springs)).map(key => ctrl.springs[key].start(props));\n  const cancel = props.cancel === true || getDefaultProp(props, 'cancel') === true;\n\n  if (asyncTo || cancel && state.asyncId) {\n    promises.push(scheduleProps(++ctrl['_lastAsyncId'], {\n      props,\n      state,\n      actions: {\n        pause: noop,\n        resume: noop,\n\n        start(props, resolve) {\n          if (cancel) {\n            stopAsync(state, ctrl['_lastAsyncId']);\n            resolve(getCancelledResult(ctrl));\n          } else {\n            props.onRest = onRest;\n            resolve(runAsync(asyncTo, props, state, ctrl));\n          }\n        }\n\n      }\n    }));\n  }\n\n  if (state.paused) {\n    await new Promise(resume => {\n      state.resumeQueue.add(resume);\n    });\n  }\n\n  const result = getCombinedResult(ctrl, await Promise.all(promises));\n\n  if (loop && result.finished && !(isLoop && result.noop)) {\n    const nextProps = createLoopUpdate(props, loop, to);\n\n    if (nextProps) {\n      prepareKeys(ctrl, [nextProps]);\n      return flushUpdate(ctrl, nextProps, true);\n    }\n  }\n\n  if (onResolve) {\n    raf.batchedUpdates(() => onResolve(result, ctrl, ctrl.item));\n  }\n\n  return result;\n}\nfunction getSprings(ctrl, props) {\n  const springs = _extends({}, ctrl.springs);\n\n  if (props) {\n    each(toArray(props), props => {\n      if (is.und(props.keys)) {\n        props = createUpdate(props);\n      }\n\n      if (!is.obj(props.to)) {\n        props = _extends({}, props, {\n          to: undefined\n        });\n      }\n\n      prepareSprings(springs, props, key => {\n        return createSpring(key);\n      });\n    });\n  }\n\n  setSprings(ctrl, springs);\n  return springs;\n}\nfunction setSprings(ctrl, springs) {\n  eachProp(springs, (spring, key) => {\n    if (!ctrl.springs[key]) {\n      ctrl.springs[key] = spring;\n      addFluidObserver(spring, ctrl);\n    }\n  });\n}\n\nfunction createSpring(key, observer) {\n  const spring = new SpringValue();\n  spring.key = key;\n\n  if (observer) {\n    addFluidObserver(spring, observer);\n  }\n\n  return spring;\n}\n\nfunction prepareSprings(springs, props, create) {\n  if (props.keys) {\n    each(props.keys, key => {\n      const spring = springs[key] || (springs[key] = create(key));\n      spring['_prepareNode'](props);\n    });\n  }\n}\n\nfunction prepareKeys(ctrl, queue) {\n  each(queue, props => {\n    prepareSprings(ctrl.springs, props, key => {\n      return createSpring(key, ctrl);\n    });\n  });\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nconst _excluded$3 = [\"children\"];\nconst SpringContext = _ref => {\n  let {\n    children\n  } = _ref,\n      props = _objectWithoutPropertiesLoose(_ref, _excluded$3);\n\n  const inherited = useContext(ctx);\n  const pause = props.pause || !!inherited.pause,\n        immediate = props.immediate || !!inherited.immediate;\n  props = useMemoOne(() => ({\n    pause,\n    immediate\n  }), [pause, immediate]);\n  const {\n    Provider\n  } = ctx;\n  return React.createElement(Provider, {\n    value: props\n  }, children);\n};\nconst ctx = makeContext(SpringContext, {});\nSpringContext.Provider = ctx.Provider;\nSpringContext.Consumer = ctx.Consumer;\n\nfunction makeContext(target, init) {\n  Object.assign(target, React.createContext(init));\n  target.Provider._context = target;\n  target.Consumer._context = target;\n  return target;\n}\n\nconst SpringRef = () => {\n  const current = [];\n\n  const SpringRef = function SpringRef(props) {\n    deprecateDirectCall();\n    const results = [];\n    each(current, (ctrl, i) => {\n      if (is.und(props)) {\n        results.push(ctrl.start());\n      } else {\n        const update = _getProps(props, ctrl, i);\n\n        if (update) {\n          results.push(ctrl.start(update));\n        }\n      }\n    });\n    return results;\n  };\n\n  SpringRef.current = current;\n\n  SpringRef.add = function (ctrl) {\n    if (!current.includes(ctrl)) {\n      current.push(ctrl);\n    }\n  };\n\n  SpringRef.delete = function (ctrl) {\n    const i = current.indexOf(ctrl);\n    if (~i) current.splice(i, 1);\n  };\n\n  SpringRef.pause = function () {\n    each(current, ctrl => ctrl.pause(...arguments));\n    return this;\n  };\n\n  SpringRef.resume = function () {\n    each(current, ctrl => ctrl.resume(...arguments));\n    return this;\n  };\n\n  SpringRef.set = function (values) {\n    each(current, ctrl => ctrl.set(values));\n  };\n\n  SpringRef.start = function (props) {\n    const results = [];\n    each(current, (ctrl, i) => {\n      if (is.und(props)) {\n        results.push(ctrl.start());\n      } else {\n        const update = this._getProps(props, ctrl, i);\n\n        if (update) {\n          results.push(ctrl.start(update));\n        }\n      }\n    });\n    return results;\n  };\n\n  SpringRef.stop = function () {\n    each(current, ctrl => ctrl.stop(...arguments));\n    return this;\n  };\n\n  SpringRef.update = function (props) {\n    each(current, (ctrl, i) => ctrl.update(this._getProps(props, ctrl, i)));\n    return this;\n  };\n\n  const _getProps = function _getProps(arg, ctrl, index) {\n    return is.fun(arg) ? arg(index, ctrl) : arg;\n  };\n\n  SpringRef._getProps = _getProps;\n  return SpringRef;\n};\n\nfunction useSprings(length, props, deps) {\n  const propsFn = is.fun(props) && props;\n  if (propsFn && !deps) deps = [];\n  const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n  const layoutId = useRef(0);\n  const forceUpdate = useForceUpdate();\n  const state = useMemo(() => ({\n    ctrls: [],\n    queue: [],\n\n    flush(ctrl, updates) {\n      const springs = getSprings(ctrl, updates);\n      const canFlushSync = layoutId.current > 0 && !state.queue.length && !Object.keys(springs).some(key => !ctrl.springs[key]);\n      return canFlushSync ? flushUpdateQueue(ctrl, updates) : new Promise(resolve => {\n        setSprings(ctrl, springs);\n        state.queue.push(() => {\n          resolve(flushUpdateQueue(ctrl, updates));\n        });\n        forceUpdate();\n      });\n    }\n\n  }), []);\n  const ctrls = useRef([...state.ctrls]);\n  const updates = [];\n  const prevLength = usePrev(length) || 0;\n  useMemo(() => {\n    each(ctrls.current.slice(length, prevLength), ctrl => {\n      detachRefs(ctrl, ref);\n      ctrl.stop(true);\n    });\n    ctrls.current.length = length;\n    declareUpdates(prevLength, length);\n  }, [length]);\n  useMemo(() => {\n    declareUpdates(0, Math.min(prevLength, length));\n  }, deps);\n\n  function declareUpdates(startIndex, endIndex) {\n    for (let i = startIndex; i < endIndex; i++) {\n      const ctrl = ctrls.current[i] || (ctrls.current[i] = new Controller(null, state.flush));\n      const update = propsFn ? propsFn(i, ctrl) : props[i];\n\n      if (update) {\n        updates[i] = declareUpdate(update);\n      }\n    }\n  }\n\n  const springs = ctrls.current.map((ctrl, i) => getSprings(ctrl, updates[i]));\n  const context = useContext(SpringContext);\n  const prevContext = usePrev(context);\n  const hasContext = context !== prevContext && hasProps(context);\n  useIsomorphicLayoutEffect(() => {\n    layoutId.current++;\n    state.ctrls = ctrls.current;\n    const {\n      queue\n    } = state;\n\n    if (queue.length) {\n      state.queue = [];\n      each(queue, cb => cb());\n    }\n\n    each(ctrls.current, (ctrl, i) => {\n      ref == null ? void 0 : ref.add(ctrl);\n\n      if (hasContext) {\n        ctrl.start({\n          default: context\n        });\n      }\n\n      const update = updates[i];\n\n      if (update) {\n        replaceRef(ctrl, update.ref);\n\n        if (ctrl.ref) {\n          ctrl.queue.push(update);\n        } else {\n          ctrl.start(update);\n        }\n      }\n    });\n  });\n  useOnce(() => () => {\n    each(state.ctrls, ctrl => ctrl.stop(true));\n  });\n  const values = springs.map(x => _extends({}, x));\n  return ref ? [values, ref] : values;\n}\n\nfunction useSpring(props, deps) {\n  const isFn = is.fun(props);\n  const [[values], ref] = useSprings(1, isFn ? props : [props], isFn ? deps || [] : deps);\n  return isFn || arguments.length == 2 ? [values, ref] : values;\n}\n\nconst initSpringRef = () => SpringRef();\n\nconst useSpringRef = () => useState(initSpringRef)[0];\n\nfunction useTrail(length, propsArg, deps) {\n  var _passedRef;\n\n  const propsFn = is.fun(propsArg) && propsArg;\n  if (propsFn && !deps) deps = [];\n  let reverse = true;\n  let passedRef = undefined;\n  const result = useSprings(length, (i, ctrl) => {\n    const props = propsFn ? propsFn(i, ctrl) : propsArg;\n    passedRef = props.ref;\n    reverse = reverse && props.reverse;\n    return props;\n  }, deps || [{}]);\n  const ref = (_passedRef = passedRef) != null ? _passedRef : result[1];\n  useIsomorphicLayoutEffect(() => {\n    each(ref.current, (ctrl, i) => {\n      const parent = ref.current[i + (reverse ? 1 : -1)];\n\n      if (parent) {\n        ctrl.start({\n          to: parent.springs\n        });\n      } else {\n        ctrl.start();\n      }\n    });\n  }, deps);\n\n  if (propsFn || arguments.length == 3) {\n    ref['_getProps'] = (propsArg, ctrl, i) => {\n      const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg;\n\n      if (props) {\n        const parent = ref.current[i + (props.reverse ? 1 : -1)];\n        if (parent) props.to = parent.springs;\n        return props;\n      }\n    };\n\n    return result;\n  }\n\n  ref['start'] = propsArg => {\n    const results = [];\n    each(ref.current, (ctrl, i) => {\n      const props = is.fun(propsArg) ? propsArg(i, ctrl) : propsArg;\n      const parent = ref.current[i + (reverse ? 1 : -1)];\n\n      if (parent) {\n        results.push(ctrl.start(_extends({}, props, {\n          to: parent.springs\n        })));\n      } else {\n        results.push(ctrl.start(_extends({}, props)));\n      }\n    });\n    return results;\n  };\n\n  return result[0];\n}\n\nlet TransitionPhase;\n\n(function (TransitionPhase) {\n  TransitionPhase[\"MOUNT\"] = \"mount\";\n  TransitionPhase[\"ENTER\"] = \"enter\";\n  TransitionPhase[\"UPDATE\"] = \"update\";\n  TransitionPhase[\"LEAVE\"] = \"leave\";\n})(TransitionPhase || (TransitionPhase = {}));\n\nfunction useTransition(data, props, deps) {\n  const propsFn = is.fun(props) && props;\n  const {\n    reset,\n    sort,\n    trail = 0,\n    expires = true,\n    exitBeforeEnter = false,\n    onDestroyed,\n    ref: propsRef,\n    config: propsConfig\n  } = propsFn ? propsFn() : props;\n  const ref = useMemo(() => propsFn || arguments.length == 3 ? SpringRef() : void 0, []);\n  const items = toArray(data);\n  const transitions = [];\n  const usedTransitions = useRef(null);\n  const prevTransitions = reset ? null : usedTransitions.current;\n  useIsomorphicLayoutEffect(() => {\n    usedTransitions.current = transitions;\n  });\n  useOnce(() => {\n    each(transitions, t => {\n      ref == null ? void 0 : ref.add(t.ctrl);\n      t.ctrl.ref = ref;\n    });\n    return () => {\n      each(usedTransitions.current, t => {\n        if (t.expired) {\n          clearTimeout(t.expirationId);\n        }\n\n        detachRefs(t.ctrl, ref);\n        t.ctrl.stop(true);\n      });\n    };\n  });\n  const keys = getKeys(items, propsFn ? propsFn() : props, prevTransitions);\n  const expired = reset && usedTransitions.current || [];\n  useIsomorphicLayoutEffect(() => each(expired, ({\n    ctrl,\n    item,\n    key\n  }) => {\n    detachRefs(ctrl, ref);\n    callProp(onDestroyed, item, key);\n  }));\n  const reused = [];\n  if (prevTransitions) each(prevTransitions, (t, i) => {\n    if (t.expired) {\n      clearTimeout(t.expirationId);\n      expired.push(t);\n    } else {\n      i = reused[i] = keys.indexOf(t.key);\n      if (~i) transitions[i] = t;\n    }\n  });\n  each(items, (item, i) => {\n    if (!transitions[i]) {\n      transitions[i] = {\n        key: keys[i],\n        item,\n        phase: TransitionPhase.MOUNT,\n        ctrl: new Controller()\n      };\n      transitions[i].ctrl.item = item;\n    }\n  });\n\n  if (reused.length) {\n    let i = -1;\n    const {\n      leave\n    } = propsFn ? propsFn() : props;\n    each(reused, (keyIndex, prevIndex) => {\n      const t = prevTransitions[prevIndex];\n\n      if (~keyIndex) {\n        i = transitions.indexOf(t);\n        transitions[i] = _extends({}, t, {\n          item: items[keyIndex]\n        });\n      } else if (leave) {\n        transitions.splice(++i, 0, t);\n      }\n    });\n  }\n\n  if (is.fun(sort)) {\n    transitions.sort((a, b) => sort(a.item, b.item));\n  }\n\n  let delay = -trail;\n  const forceUpdate = useForceUpdate();\n  const defaultProps = getDefaultProps(props);\n  const changes = new Map();\n  const exitingTransitions = useRef(new Map());\n  const forceChange = useRef(false);\n  each(transitions, (t, i) => {\n    const key = t.key;\n    const prevPhase = t.phase;\n    const p = propsFn ? propsFn() : props;\n    let to;\n    let phase;\n    let propsDelay = callProp(p.delay || 0, key);\n\n    if (prevPhase == TransitionPhase.MOUNT) {\n      to = p.enter;\n      phase = TransitionPhase.ENTER;\n    } else {\n      const isLeave = keys.indexOf(key) < 0;\n\n      if (prevPhase != TransitionPhase.LEAVE) {\n        if (isLeave) {\n          to = p.leave;\n          phase = TransitionPhase.LEAVE;\n        } else if (to = p.update) {\n          phase = TransitionPhase.UPDATE;\n        } else return;\n      } else if (!isLeave) {\n        to = p.enter;\n        phase = TransitionPhase.ENTER;\n      } else return;\n    }\n\n    to = callProp(to, t.item, i);\n    to = is.obj(to) ? inferTo(to) : {\n      to\n    };\n\n    if (!to.config) {\n      const config = propsConfig || defaultProps.config;\n      to.config = callProp(config, t.item, i, phase);\n    }\n\n    delay += trail;\n\n    const payload = _extends({}, defaultProps, {\n      delay: propsDelay + delay,\n      ref: propsRef,\n      immediate: p.immediate,\n      reset: false\n    }, to);\n\n    if (phase == TransitionPhase.ENTER && is.und(payload.from)) {\n      const _p = propsFn ? propsFn() : props;\n\n      const from = is.und(_p.initial) || prevTransitions ? _p.from : _p.initial;\n      payload.from = callProp(from, t.item, i);\n    }\n\n    const {\n      onResolve\n    } = payload;\n\n    payload.onResolve = result => {\n      callProp(onResolve, result);\n      const transitions = usedTransitions.current;\n      const t = transitions.find(t => t.key === key);\n      if (!t) return;\n\n      if (result.cancelled && t.phase != TransitionPhase.UPDATE) {\n        return;\n      }\n\n      if (t.ctrl.idle) {\n        const idle = transitions.every(t => t.ctrl.idle);\n\n        if (t.phase == TransitionPhase.LEAVE) {\n          const expiry = callProp(expires, t.item);\n\n          if (expiry !== false) {\n            const expiryMs = expiry === true ? 0 : expiry;\n            t.expired = true;\n\n            if (!idle && expiryMs > 0) {\n              if (expiryMs <= 0x7fffffff) t.expirationId = setTimeout(forceUpdate, expiryMs);\n              return;\n            }\n          }\n        }\n\n        if (idle && transitions.some(t => t.expired)) {\n          exitingTransitions.current.delete(t);\n\n          if (exitBeforeEnter) {\n            forceChange.current = true;\n          }\n\n          forceUpdate();\n        }\n      }\n    };\n\n    const springs = getSprings(t.ctrl, payload);\n\n    if (phase === TransitionPhase.LEAVE && exitBeforeEnter) {\n      exitingTransitions.current.set(t, {\n        phase,\n        springs,\n        payload\n      });\n    } else {\n      changes.set(t, {\n        phase,\n        springs,\n        payload\n      });\n    }\n  });\n  const context = useContext(SpringContext);\n  const prevContext = usePrev(context);\n  const hasContext = context !== prevContext && hasProps(context);\n  useIsomorphicLayoutEffect(() => {\n    if (hasContext) {\n      each(transitions, t => {\n        t.ctrl.start({\n          default: context\n        });\n      });\n    }\n  }, [context]);\n  each(changes, (_, t) => {\n    if (exitingTransitions.current.size) {\n      const ind = transitions.findIndex(state => state.key === t.key);\n      transitions.splice(ind, 1);\n    }\n  });\n  useIsomorphicLayoutEffect(() => {\n    each(exitingTransitions.current.size ? exitingTransitions.current : changes, ({\n      phase,\n      payload\n    }, t) => {\n      const {\n        ctrl\n      } = t;\n      t.phase = phase;\n      ref == null ? void 0 : ref.add(ctrl);\n\n      if (hasContext && phase == TransitionPhase.ENTER) {\n        ctrl.start({\n          default: context\n        });\n      }\n\n      if (payload) {\n        replaceRef(ctrl, payload.ref);\n\n        if ((ctrl.ref || ref) && !forceChange.current) {\n          ctrl.update(payload);\n        } else {\n          ctrl.start(payload);\n\n          if (forceChange.current) {\n            forceChange.current = false;\n          }\n        }\n      }\n    });\n  }, reset ? void 0 : deps);\n\n  const renderTransitions = render => React.createElement(React.Fragment, null, transitions.map((t, i) => {\n    const {\n      springs\n    } = changes.get(t) || t.ctrl;\n    const elem = render(_extends({}, springs), t.item, t, i);\n    return elem && elem.type ? React.createElement(elem.type, _extends({}, elem.props, {\n      key: is.str(t.key) || is.num(t.key) ? t.key : t.ctrl.id,\n      ref: elem.ref\n    })) : elem;\n  }));\n\n  return ref ? [renderTransitions, ref] : renderTransitions;\n}\nlet nextKey = 1;\n\nfunction getKeys(items, {\n  key,\n  keys = key\n}, prevTransitions) {\n  if (keys === null) {\n    const reused = new Set();\n    return items.map(item => {\n      const t = prevTransitions && prevTransitions.find(t => t.item === item && t.phase !== TransitionPhase.LEAVE && !reused.has(t));\n\n      if (t) {\n        reused.add(t);\n        return t.key;\n      }\n\n      return nextKey++;\n    });\n  }\n\n  return is.und(keys) ? items : is.fun(keys) ? items.map(keys) : toArray(keys);\n}\n\nconst _excluded$2 = [\"children\"];\nfunction Spring(_ref) {\n  let {\n    children\n  } = _ref,\n      props = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n  return children(useSpring(props));\n}\n\nconst _excluded$1 = [\"items\", \"children\"];\nfunction Trail(_ref) {\n  let {\n    items,\n    children\n  } = _ref,\n      props = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n  const trails = useTrail(items.length, props);\n  return items.map((item, index) => {\n    const result = children(item, index);\n    return is.fun(result) ? result(trails[index]) : result;\n  });\n}\n\nconst _excluded = [\"items\", \"children\"];\nfunction Transition(_ref) {\n  let {\n    items,\n    children\n  } = _ref,\n      props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n  return useTransition(items, props)(children);\n}\n\nclass Interpolation extends FrameValue {\n  constructor(source, args) {\n    super();\n    this.key = void 0;\n    this.idle = true;\n    this.calc = void 0;\n    this._active = new Set();\n    this.source = source;\n    this.calc = createInterpolator(...args);\n\n    const value = this._get();\n\n    const nodeType = getAnimatedType(value);\n    setAnimated(this, nodeType.create(value));\n  }\n\n  advance(_dt) {\n    const value = this._get();\n\n    const oldValue = this.get();\n\n    if (!isEqual(value, oldValue)) {\n      getAnimated(this).setValue(value);\n\n      this._onChange(value, this.idle);\n    }\n\n    if (!this.idle && checkIdle(this._active)) {\n      becomeIdle(this);\n    }\n  }\n\n  _get() {\n    const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray(getFluidValue(this.source));\n    return this.calc(...inputs);\n  }\n\n  _start() {\n    if (this.idle && !checkIdle(this._active)) {\n      this.idle = false;\n      each(getPayload(this), node => {\n        node.done = false;\n      });\n\n      if (Globals.skipAnimation) {\n        raf.batchedUpdates(() => this.advance());\n        becomeIdle(this);\n      } else {\n        frameLoop.start(this);\n      }\n    }\n  }\n\n  _attach() {\n    let priority = 1;\n    each(toArray(this.source), source => {\n      if (hasFluidValue(source)) {\n        addFluidObserver(source, this);\n      }\n\n      if (isFrameValue(source)) {\n        if (!source.idle) {\n          this._active.add(source);\n        }\n\n        priority = Math.max(priority, source.priority + 1);\n      }\n    });\n    this.priority = priority;\n\n    this._start();\n  }\n\n  _detach() {\n    each(toArray(this.source), source => {\n      if (hasFluidValue(source)) {\n        removeFluidObserver(source, this);\n      }\n    });\n\n    this._active.clear();\n\n    becomeIdle(this);\n  }\n\n  eventObserved(event) {\n    if (event.type == 'change') {\n      if (event.idle) {\n        this.advance();\n      } else {\n        this._active.add(event.parent);\n\n        this._start();\n      }\n    } else if (event.type == 'idle') {\n      this._active.delete(event.parent);\n    } else if (event.type == 'priority') {\n      this.priority = toArray(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);\n    }\n  }\n\n}\n\nfunction isIdle(source) {\n  return source.idle !== false;\n}\n\nfunction checkIdle(active) {\n  return !active.size || Array.from(active).every(isIdle);\n}\n\nfunction becomeIdle(self) {\n  if (!self.idle) {\n    self.idle = true;\n    each(getPayload(self), node => {\n      node.done = true;\n    });\n    callFluidObservers(self, {\n      type: 'idle',\n      parent: self\n    });\n  }\n}\n\nconst to = (source, ...args) => new Interpolation(source, args);\nconst interpolate = (source, ...args) => (deprecateInterpolate(), new Interpolation(source, args));\n\nGlobals.assign({\n  createStringInterpolator,\n  to: (source, args) => new Interpolation(source, args)\n});\nconst update = frameLoop.advance;\n\nexport { BailSignal, Controller, FrameValue, Interpolation, Spring, SpringContext, SpringRef, SpringValue, Trail, Transition, config, easings, inferTo, interpolate, to, update, useChain, useSpring, useSpringRef, useSprings, useTrail, useTransition };\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactDOM\"];","import { Globals } from '@react-spring/core';\nexport * from '@react-spring/core';\nimport { unstable_batchedUpdates } from 'react-dom';\nimport { eachProp, is, toArray, FluidValue, each, getFluidValue, hasFluidValue, addFluidObserver, removeFluidObserver, callFluidObservers, createStringInterpolator, colors } from '@react-spring/shared';\nimport { AnimatedObject, createHost } from '@react-spring/animated';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nconst _excluded$2 = [\"style\", \"children\", \"scrollTop\", \"scrollLeft\"];\nconst isCustomPropRE = /^--/;\n\nfunction dangerousStyleValue(name, value) {\n  if (value == null || typeof value === 'boolean' || value === '') return '';\n  if (typeof value === 'number' && value !== 0 && !isCustomPropRE.test(name) && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) return value + 'px';\n  return ('' + value).trim();\n}\n\nconst attributeCache = {};\nfunction applyAnimatedValues(instance, props) {\n  if (!instance.nodeType || !instance.setAttribute) {\n    return false;\n  }\n\n  const isFilterElement = instance.nodeName === 'filter' || instance.parentNode && instance.parentNode.nodeName === 'filter';\n\n  const _ref = props,\n        {\n    style,\n    children,\n    scrollTop,\n    scrollLeft\n  } = _ref,\n        attributes = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n  const values = Object.values(attributes);\n  const names = Object.keys(attributes).map(name => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, n => '-' + n.toLowerCase())));\n\n  if (children !== void 0) {\n    instance.textContent = children;\n  }\n\n  for (let name in style) {\n    if (style.hasOwnProperty(name)) {\n      const value = dangerousStyleValue(name, style[name]);\n\n      if (isCustomPropRE.test(name)) {\n        instance.style.setProperty(name, value);\n      } else {\n        instance.style[name] = value;\n      }\n    }\n  }\n\n  names.forEach((name, i) => {\n    instance.setAttribute(name, values[i]);\n  });\n\n  if (scrollTop !== void 0) {\n    instance.scrollTop = scrollTop;\n  }\n\n  if (scrollLeft !== void 0) {\n    instance.scrollLeft = scrollLeft;\n  }\n}\nlet isUnitlessNumber = {\n  animationIterationCount: true,\n  borderImageOutset: true,\n  borderImageSlice: true,\n  borderImageWidth: true,\n  boxFlex: true,\n  boxFlexGroup: true,\n  boxOrdinalGroup: true,\n  columnCount: true,\n  columns: true,\n  flex: true,\n  flexGrow: true,\n  flexPositive: true,\n  flexShrink: true,\n  flexNegative: true,\n  flexOrder: true,\n  gridRow: true,\n  gridRowEnd: true,\n  gridRowSpan: true,\n  gridRowStart: true,\n  gridColumn: true,\n  gridColumnEnd: true,\n  gridColumnSpan: true,\n  gridColumnStart: true,\n  fontWeight: true,\n  lineClamp: true,\n  lineHeight: true,\n  opacity: true,\n  order: true,\n  orphans: true,\n  tabSize: true,\n  widows: true,\n  zIndex: true,\n  zoom: true,\n  fillOpacity: true,\n  floodOpacity: true,\n  stopOpacity: true,\n  strokeDasharray: true,\n  strokeDashoffset: true,\n  strokeMiterlimit: true,\n  strokeOpacity: true,\n  strokeWidth: true\n};\n\nconst prefixKey = (prefix, key) => prefix + key.charAt(0).toUpperCase() + key.substring(1);\n\nconst prefixes = ['Webkit', 'Ms', 'Moz', 'O'];\nisUnitlessNumber = Object.keys(isUnitlessNumber).reduce((acc, prop) => {\n  prefixes.forEach(prefix => acc[prefixKey(prefix, prop)] = acc[prop]);\n  return acc;\n}, isUnitlessNumber);\n\nconst _excluded$1 = [\"x\", \"y\", \"z\"];\nconst domTransforms = /^(matrix|translate|scale|rotate|skew)/;\nconst pxTransforms = /^(translate)/;\nconst degTransforms = /^(rotate|skew)/;\n\nconst addUnit = (value, unit) => is.num(value) && value !== 0 ? value + unit : value;\n\nconst isValueIdentity = (value, id) => is.arr(value) ? value.every(v => isValueIdentity(v, id)) : is.num(value) ? value === id : parseFloat(value) === id;\n\nclass AnimatedStyle extends AnimatedObject {\n  constructor(_ref) {\n    let {\n      x,\n      y,\n      z\n    } = _ref,\n        style = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n    const inputs = [];\n    const transforms = [];\n\n    if (x || y || z) {\n      inputs.push([x || 0, y || 0, z || 0]);\n      transforms.push(xyz => [`translate3d(${xyz.map(v => addUnit(v, 'px')).join(',')})`, isValueIdentity(xyz, 0)]);\n    }\n\n    eachProp(style, (value, key) => {\n      if (key === 'transform') {\n        inputs.push([value || '']);\n        transforms.push(transform => [transform, transform === '']);\n      } else if (domTransforms.test(key)) {\n        delete style[key];\n        if (is.und(value)) return;\n        const unit = pxTransforms.test(key) ? 'px' : degTransforms.test(key) ? 'deg' : '';\n        inputs.push(toArray(value));\n        transforms.push(key === 'rotate3d' ? ([x, y, z, deg]) => [`rotate3d(${x},${y},${z},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : input => [`${key}(${input.map(v => addUnit(v, unit)).join(',')})`, isValueIdentity(input, key.startsWith('scale') ? 1 : 0)]);\n      }\n    });\n\n    if (inputs.length) {\n      style.transform = new FluidTransform(inputs, transforms);\n    }\n\n    super(style);\n  }\n\n}\n\nclass FluidTransform extends FluidValue {\n  constructor(inputs, transforms) {\n    super();\n    this._value = null;\n    this.inputs = inputs;\n    this.transforms = transforms;\n  }\n\n  get() {\n    return this._value || (this._value = this._get());\n  }\n\n  _get() {\n    let transform = '';\n    let identity = true;\n    each(this.inputs, (input, i) => {\n      const arg1 = getFluidValue(input[0]);\n      const [t, id] = this.transforms[i](is.arr(arg1) ? arg1 : input.map(getFluidValue));\n      transform += ' ' + t;\n      identity = identity && id;\n    });\n    return identity ? 'none' : transform;\n  }\n\n  observerAdded(count) {\n    if (count == 1) each(this.inputs, input => each(input, value => hasFluidValue(value) && addFluidObserver(value, this)));\n  }\n\n  observerRemoved(count) {\n    if (count == 0) each(this.inputs, input => each(input, value => hasFluidValue(value) && removeFluidObserver(value, this)));\n  }\n\n  eventObserved(event) {\n    if (event.type == 'change') {\n      this._value = null;\n    }\n\n    callFluidObservers(this, event);\n  }\n\n}\n\nconst primitives = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nconst _excluded = [\"scrollTop\", \"scrollLeft\"];\nGlobals.assign({\n  batchedUpdates: unstable_batchedUpdates,\n  createStringInterpolator,\n  colors\n});\nconst host = createHost(primitives, {\n  applyAnimatedValues,\n  createAnimatedStyle: style => new AnimatedStyle(style),\n  getComponentProps: _ref => {\n    let props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n    return props;\n  }\n});\nconst animated = host.animated;\n\nexport { animated as a, animated };\n","/**\n * External dependencies\n */\nimport { useSpring } from '@react-spring/web';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseLayoutEffect,\n\tuseReducer,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Simple reducer used to increment a counter.\n *\n * @param {number} state Previous counter value.\n * @return {number} New state value.\n */\nconst counterReducer = ( state ) => state + 1;\n\nconst getAbsolutePosition = ( element ) => {\n\treturn {\n\t\ttop: element.offsetTop,\n\t\tleft: element.offsetLeft,\n\t};\n};\n\n/**\n * Hook used to compute the styles required to move a div into a new position.\n *\n * The way this animation works is the following:\n *  - It first renders the element as if there was no animation.\n *  - It takes a snapshot of the position of the block to use it\n *    as a destination point for the animation.\n *  - It restores the element to the previous position using a CSS transform\n *  - It uses the \"resetAnimation\" flag to reset the animation\n *    from the beginning in order to animate to the new destination point.\n *\n * @param {Object}  $1                          Options\n * @param {boolean} $1.isSelected               Whether it's the current block or not.\n * @param {boolean} $1.adjustScrolling          Adjust the scroll position to the current block.\n * @param {boolean} $1.enableAnimation          Enable/Disable animation.\n * @param {*}       $1.triggerAnimationOnChange Variable used to trigger the animation if it changes.\n */\nfunction useMovingAnimation( {\n\tisSelected,\n\tadjustScrolling,\n\tenableAnimation,\n\ttriggerAnimationOnChange,\n} ) {\n\tconst ref = useRef();\n\tconst prefersReducedMotion = useReducedMotion() || ! enableAnimation;\n\tconst [ triggeredAnimation, triggerAnimation ] = useReducer(\n\t\tcounterReducer,\n\t\t0\n\t);\n\tconst [ finishedAnimation, endAnimation ] = useReducer( counterReducer, 0 );\n\tconst [ transform, setTransform ] = useState( { x: 0, y: 0 } );\n\tconst previous = useMemo(\n\t\t() => ( ref.current ? getAbsolutePosition( ref.current ) : null ),\n\t\t[ triggerAnimationOnChange ]\n\t);\n\n\t// Calculate the previous position of the block relative to the viewport and\n\t// return a function to maintain that position by scrolling.\n\tconst preserveScrollPosition = useMemo( () => {\n\t\tif ( ! adjustScrolling || ! ref.current ) {\n\t\t\treturn () => {};\n\t\t}\n\n\t\tconst scrollContainer = getScrollContainer( ref.current );\n\n\t\tif ( ! scrollContainer ) {\n\t\t\treturn () => {};\n\t\t}\n\n\t\tconst prevRect = ref.current.getBoundingClientRect();\n\t\treturn () => {\n\t\t\tconst blockRect = ref.current.getBoundingClientRect();\n\t\t\tconst diff = blockRect.top - prevRect.top;\n\n\t\t\tif ( diff ) {\n\t\t\t\tscrollContainer.scrollTop += diff;\n\t\t\t}\n\t\t};\n\t}, [ triggerAnimationOnChange, adjustScrolling ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( triggeredAnimation ) {\n\t\t\tendAnimation();\n\t\t}\n\t}, [ triggeredAnimation ] );\n\tuseLayoutEffect( () => {\n\t\tif ( ! previous ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( prefersReducedMotion ) {\n\t\t\t// If the animation is disabled and the scroll needs to be adjusted,\n\t\t\t// just move directly to the final scroll position.\n\t\t\tpreserveScrollPosition();\n\n\t\t\treturn;\n\t\t}\n\n\t\tref.current.style.transform = undefined;\n\t\tconst destination = getAbsolutePosition( ref.current );\n\n\t\ttriggerAnimation();\n\t\tsetTransform( {\n\t\t\tx: Math.round( previous.left - destination.left ),\n\t\t\ty: Math.round( previous.top - destination.top ),\n\t\t} );\n\t}, [ triggerAnimationOnChange ] );\n\n\tfunction onChange( { value } ) {\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\t\tlet { x, y } = value;\n\t\tx = Math.round( x );\n\t\ty = Math.round( y );\n\t\tconst finishedMoving = x === 0 && y === 0;\n\t\tref.current.style.transformOrigin = 'center center';\n\t\tref.current.style.transform = finishedMoving\n\t\t\t? undefined\n\t\t\t: `translate3d(${ x }px,${ y }px,0)`;\n\t\tref.current.style.zIndex = isSelected ? '1' : '';\n\n\t\tpreserveScrollPosition();\n\t}\n\n\tuseSpring( {\n\t\tfrom: {\n\t\t\tx: transform.x,\n\t\t\ty: transform.y,\n\t\t},\n\t\tto: {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t},\n\t\treset: triggeredAnimation !== finishedAnimation,\n\t\tconfig: { mass: 5, tension: 2000, friction: 200 },\n\t\timmediate: prefersReducedMotion,\n\t\tonChange,\n\t} );\n\n\treturn ref;\n}\n\nexport default useMovingAnimation;\n","const BLOCK_SELECTOR = '.block-editor-block-list__block';\nconst APPENDER_SELECTOR = '.block-list-appender';\nconst BLOCK_APPENDER_CLASS = '.block-editor-button-block-appender';\n\n/**\n * Returns true if two elements are contained within the same block.\n *\n * @param {Element} a First element.\n * @param {Element} b Second element.\n *\n * @return {boolean} Whether elements are in the same block.\n */\nexport function isInSameBlock( a, b ) {\n\treturn a.closest( BLOCK_SELECTOR ) === b.closest( BLOCK_SELECTOR );\n}\n\n/**\n * Returns true if an element is considered part of the block and not its inner\n * blocks or appender.\n *\n * @param {Element} blockElement Block container element.\n * @param {Element} element      Element.\n *\n * @return {boolean} Whether an element is considered part of the block and not\n *                   its inner blocks or appender.\n */\nexport function isInsideRootBlock( blockElement, element ) {\n\tconst parentBlock = element.closest(\n\t\t[ BLOCK_SELECTOR, APPENDER_SELECTOR, BLOCK_APPENDER_CLASS ].join( ',' )\n\t);\n\treturn parentBlock === blockElement;\n}\n\n/**\n * Finds the block client ID given any DOM node inside the block.\n *\n * @param {Node?} node DOM node.\n *\n * @return {string|undefined} Client ID or undefined if the node is not part of\n *                            a block.\n */\nexport function getBlockClientId( node ) {\n\twhile ( node && node.nodeType !== node.ELEMENT_NODE ) {\n\t\tnode = node.parentNode;\n\t}\n\n\tif ( ! node ) {\n\t\treturn;\n\t}\n\n\tconst elementNode = /** @type {Element} */ ( node );\n\tconst blockNode = elementNode.closest( BLOCK_SELECTOR );\n\n\tif ( ! blockNode ) {\n\t\treturn;\n\t}\n\n\treturn blockNode.id.slice( 'block-'.length );\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tfocus,\n\tisFormElement,\n\tisTextField,\n\tplaceCaretAtHorizontalEdge,\n} from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\n\n/** @typedef {import('@wordpress/element').RefObject} RefObject */\n\n/**\n * Returns the initial position if the block needs to be focussed, `undefined`\n * otherwise. The initial position is either 0 (start) or -1 (end).\n *\n * @param {string} clientId Block client ID.\n *\n * @return {number} The initial position, either 0 (start) or -1 (end).\n */\nfunction useInitialPosition( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t\tisBlockSelected,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tif ( ! isBlockSelected( clientId ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( __unstableGetEditorMode() !== 'edit' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If there's no initial position, return 0 to focus the start.\n\t\t\treturn getSelectedBlocksInitialCaretPosition();\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n\n/**\n * Transitions focus to the block or inner tabbable when the block becomes\n * selected and an initial position is set.\n *\n * @param {string} clientId Block client ID.\n *\n * @return {RefObject} React ref with the block element.\n */\nexport function useFocusFirstElement( clientId ) {\n\tconst ref = useRef();\n\tconst initialPosition = useInitialPosition( clientId );\n\tconst { isBlockSelected, isMultiSelecting } = useSelect( blockEditorStore );\n\n\tuseEffect( () => {\n\t\t// Check if the block is still selected at the time this effect runs.\n\t\tif ( ! isBlockSelected( clientId ) || isMultiSelecting() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { ownerDocument } = ref.current;\n\n\t\t// Do not focus the block if it already contains the active element.\n\t\tif ( isInsideRootBlock( ref.current, ownerDocument.activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Find all tabbables within node.\n\t\tconst textInputs = focus.tabbable\n\t\t\t.find( ref.current )\n\t\t\t.filter( ( node ) => isTextField( node ) );\n\n\t\t// If reversed (e.g. merge via backspace), use the last in the set of\n\t\t// tabbables.\n\t\tconst isReverse = -1 === initialPosition;\n\t\tconst target =\n\t\t\ttextInputs[ isReverse ? textInputs.length - 1 : 0 ] || ref.current;\n\n\t\tif ( ! isInsideRootBlock( ref.current, target ) ) {\n\t\t\tref.current.focus();\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if element is focussable before a generic caret insert.\n\t\tif ( ! ref.current.getAttribute( 'contenteditable' ) ) {\n\t\t\tconst focusElement = focus.tabbable.findNext( ref.current );\n\t\t\t// Make sure focusElement is valid, contained in the same block, and a form field.\n\t\t\tif (\n\t\t\t\tfocusElement &&\n\t\t\t\tisInsideRootBlock( ref.current, focusElement ) &&\n\t\t\t\tisFormElement( focusElement )\n\t\t\t) {\n\t\t\t\tfocusElement.focus();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tplaceCaretAtHorizontalEdge( target, isReverse );\n\t}, [ initialPosition, clientId ] );\n\n\treturn ref;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\nfunction listener( event ) {\n\tif ( event.defaultPrevented ) {\n\t\treturn;\n\t}\n\n\tconst action = event.type === 'mouseover' ? 'add' : 'remove';\n\n\tevent.preventDefault();\n\tevent.currentTarget.classList[ action ]( 'is-hovered' );\n}\n\n/**\n * Adds `is-hovered` class when the block is hovered and in navigation or\n * outline mode.\n */\nexport function useIsHovered() {\n\tconst isEnabled = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().outlineMode;\n\t}, [] );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isEnabled ) {\n\t\t\t\tnode.addEventListener( 'mouseout', listener );\n\t\t\t\tnode.addEventListener( 'mouseover', listener );\n\n\t\t\t\treturn () => {\n\t\t\t\t\tnode.removeEventListener( 'mouseout', listener );\n\t\t\t\t\tnode.removeEventListener( 'mouseover', listener );\n\n\t\t\t\t\t// Remove class in case it lingers.\n\t\t\t\t\tnode.classList.remove( 'is-hovered' );\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ isEnabled ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { isReusableBlock, getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the class names used for the different states of the block.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The class names.\n */\nexport function useBlockClassNames( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockBeingDragged,\n\t\t\t\tisBlockHighlighted,\n\t\t\t\tisBlockSelected,\n\t\t\t\tisBlockMultiSelected,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetSettings,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\tisTyping,\n\t\t\t\t__unstableIsFullySelected,\n\t\t\t\t__unstableSelectionHasUnmergeableBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { outlineMode } = getSettings();\n\t\t\tconst isDragging = isBlockBeingDragged( clientId );\n\t\t\tconst isSelected = isBlockSelected( clientId );\n\t\t\tconst name = getBlockName( clientId );\n\t\t\tconst checkDeep = true;\n\t\t\t// \"ancestor\" is the more appropriate label due to \"deep\" check.\n\t\t\tconst isAncestorOfSelectedBlock = hasSelectedInnerBlock(\n\t\t\t\tclientId,\n\t\t\t\tcheckDeep\n\t\t\t);\n\t\t\tconst isMultiSelected = isBlockMultiSelected( clientId );\n\t\t\treturn classnames( {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-highlighted': isBlockHighlighted( clientId ),\n\t\t\t\t'is-multi-selected': isMultiSelected,\n\t\t\t\t'is-partially-selected':\n\t\t\t\t\tisMultiSelected &&\n\t\t\t\t\t! __unstableIsFullySelected() &&\n\t\t\t\t\t! __unstableSelectionHasUnmergeableBlock(),\n\t\t\t\t'is-reusable': isReusableBlock( getBlockType( name ) ),\n\t\t\t\t'is-dragging': isDragging,\n\t\t\t\t'has-child-selected': isAncestorOfSelectedBlock,\n\t\t\t\t'remove-outline': isSelected && outlineMode && isTyping(),\n\t\t\t} );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType, getBlockDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the default class name if the block is a light block and it supports\n * `className`.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The class name, e.g. `wp-block-paragraph`.\n */\nexport function useBlockDefaultClassName( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst name = select( blockEditorStore ).getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( name );\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\n\t\t\tif ( ! hasLightBlockWrapper ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn getBlockDefaultClassName( name );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the custom class name if the block is a light block.\n *\n * @param {string} clientId The block client ID.\n *\n * @return {string} The custom class name.\n */\nexport function useBlockCustomClassName( clientId ) {\n\t// It's good for this to be a separate selector because it will be executed\n\t// on every attribute change, while the other selectors are not re-evaluated\n\t// as much.\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\n\t\t\tif ( ! attributes?.className ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blockType = getBlockType( getBlockName( clientId ) );\n\t\t\tconst hasLightBlockWrapper = blockType?.apiVersion > 1;\n\n\t\t\tif ( ! hasLightBlockWrapper ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn attributes.className;\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Returns the class names used for block moving mode.\n *\n * @param {string} clientId The block client ID to insert above.\n *\n * @return {string} The class names.\n */\nexport function useBlockMovingModeClassNames( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tcanInsertBlockType,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockSelected,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\t// The classes are only relevant for the selected block. Avoid\n\t\t\t// re-rendering all blocks!\n\t\t\tif ( ! isBlockSelected( clientId ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst movingClientId = hasBlockMovingClientId();\n\n\t\t\tif ( ! movingClientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn classnames( 'is-block-moving-mode', {\n\t\t\t\t'can-insert-moving-block': canInsertBlockType(\n\t\t\t\t\tgetBlockName( movingClientId ),\n\t\t\t\t\tgetBlockRootClientId( clientId )\n\t\t\t\t),\n\t\t\t} );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { isInsideRootBlock } from '../../../utils/dom';\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Selects the block if it receives focus.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useFocusHandler( clientId ) {\n\tconst { isBlockSelected } = useSelect( blockEditorStore );\n\tconst { selectBlock, selectionChange } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\t/**\n\t\t\t * Marks the block as selected when focused and not already\n\t\t\t * selected. This specifically handles the case where block does not\n\t\t\t * set focus on its own (via `setFocus`), typically if there is no\n\t\t\t * focusable input in the block.\n\t\t\t *\n\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t */\n\t\t\tfunction onFocus( event ) {\n\t\t\t\t// When the whole editor is editable, let writing flow handle\n\t\t\t\t// selection.\n\t\t\t\tif (\n\t\t\t\t\tnode.parentElement.closest( '[contenteditable=\"true\"]' )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check synchronously because a non-selected block might be\n\t\t\t\t// getting data through `useSelect` asynchronously.\n\t\t\t\tif ( isBlockSelected( clientId ) ) {\n\t\t\t\t\t// Potentially change selection away from rich text.\n\t\t\t\t\tif ( ! event.target.isContentEditable ) {\n\t\t\t\t\t\tselectionChange( clientId );\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If an inner block is focussed, that block is resposible for\n\t\t\t\t// setting the selected block.\n\t\t\t\tif ( ! isInsideRootBlock( node, event.target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselectBlock( clientId );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'focusin', onFocus );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'focusin', onFocus );\n\t\t\t};\n\t\t},\n\t\t[ isBlockSelected, selectBlock ]\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","/**\n * WordPress dependencies\n */\nimport { isTextField } from '@wordpress/dom';\nimport { ENTER, BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Adds block behaviour:\n *   - Removes the block on BACKSPACE.\n *   - Inserts a default block on ENTER.\n *   - Disables dragging of block contents.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useEventHandlers( clientId ) {\n\tconst isSelected = useSelect(\n\t\t( select ) => select( blockEditorStore ).isBlockSelected( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { getBlockRootClientId, getBlockIndex } =\n\t\tuseSelect( blockEditorStore );\n\tconst { insertDefaultBlock, removeBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Interprets keydown event intent to remove or insert after block if\n\t\t\t * key event occurs on wrapper node. This can occur when the block has\n\t\t\t * no text fields of its own, particularly after initial insertion, to\n\t\t\t * allow for easy deletion and continuous writing flow to add additional\n\t\t\t * content.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keydown event.\n\t\t\t */\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\tconst { keyCode, target } = event;\n\n\t\t\t\tif (\n\t\t\t\t\tkeyCode !== ENTER &&\n\t\t\t\t\tkeyCode !== BACKSPACE &&\n\t\t\t\t\tkeyCode !== DELETE\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( target !== node || isTextField( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( keyCode === ENTER ) {\n\t\t\t\t\tinsertDefaultBlock(\n\t\t\t\t\t\t{},\n\t\t\t\t\t\tgetBlockRootClientId( clientId ),\n\t\t\t\t\t\tgetBlockIndex( clientId ) + 1\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tremoveBlock( clientId );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Prevents default dragging behavior within a block. To do: we must\n\t\t\t * handle this in the future and clean up the drag target.\n\t\t\t *\n\t\t\t * @param {DragEvent} event Drag event.\n\t\t\t */\n\t\t\tfunction onDragStart( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'dragstart', onDragStart );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'dragstart', onDragStart );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tclientId,\n\t\t\tisSelected,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockIndex,\n\t\t\tinsertDefaultBlock,\n\t\t\tremoveBlock,\n\t\t]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Allows navigation mode to be exited by clicking in the selected block.\n *\n * @param {string} clientId Block client ID.\n */\nexport function useNavModeExit( clientId ) {\n\tconst { isNavigationMode, isBlockSelected } = useSelect( blockEditorStore );\n\tconst { setNavigationMode, selectBlock } = useDispatch( blockEditorStore );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\t// Don't select a block if it's already handled by a child\n\t\t\t\t// block.\n\t\t\t\tif ( isNavigationMode() && ! event.defaultPrevented ) {\n\t\t\t\t\t// Prevent focus from moving to the block.\n\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t// When clicking on a selected block, exit navigation mode.\n\t\t\t\t\tif ( isBlockSelected( clientId ) ) {\n\t\t\t\t\t\tsetNavigationMode( false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectBlock( clientId );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ clientId, isNavigationMode, isBlockSelected, setNavigationMode ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { IntersectionObserver } from '../';\n\nexport function useIntersectionObserver() {\n\tconst observer = useContext( IntersectionObserver );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.observe( node );\n\t\t\t\treturn () => {\n\t\t\t\t\tobserver.unobserve( node );\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\t[ observer ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useBlockOverlayActive( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst { __unstableHasActiveBlockOverlayActive } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn __unstableHasActiveBlockOverlayActive( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__unstableGetBlockProps as getBlockProps,\n\tgetBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMergeRefs, useDisabled } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../../use-moving-animation';\nimport { BlockListBlockContext } from '../block';\nimport { useFocusFirstElement } from './use-focus-first-element';\nimport { useIsHovered } from './use-is-hovered';\nimport { useBlockEditContext } from '../../block-edit/context';\nimport { useBlockClassNames } from './use-block-class-names';\nimport { useBlockDefaultClassName } from './use-block-default-class-name';\nimport { useBlockCustomClassName } from './use-block-custom-class-name';\nimport { useBlockMovingModeClassNames } from './use-block-moving-mode-class-names';\nimport { useFocusHandler } from './use-focus-handler';\nimport { useEventHandlers } from './use-selected-block-event-handlers';\nimport { useNavModeExit } from './use-nav-mode-exit';\nimport { useBlockRefProvider } from './use-block-refs';\nimport { useIntersectionObserver } from './use-intersection-observer';\nimport { store as blockEditorStore } from '../../../store';\nimport useBlockOverlayActive from '../../block-content-overlay';\n\n/**\n * If the block count exceeds the threshold, we disable the reordering animation\n * to avoid laginess.\n */\nconst BLOCK_ANIMATION_THRESHOLD = 200;\n\n/**\n * This hook is used to lightly mark an element as a block element. The element\n * should be the outermost element of a block. Call this hook and pass the\n * returned props to the element to mark as a block. If you define a ref for the\n * element, it is important to pass the ref to this hook, which the hook in turn\n * will pass to the component through the props it returns. Optionally, you can\n * also pass any other props through this hook, and they will be merged and\n * returned.\n *\n * @param {Object}  props                    Optional. Props to pass to the element. Must contain\n *                                           the ref if one is defined.\n * @param {Object}  options                  Options for internal use only.\n * @param {boolean} options.__unstableIsHtml\n *\n * @return {Object} Props to pass to the element to mark as a block.\n */\nexport function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {\n\tconst {\n\t\tclientId,\n\t\tclassName,\n\t\twrapperProps = {},\n\t\tisAligned,\n\t} = useContext( BlockListBlockContext );\n\tconst {\n\t\tindex,\n\t\tmode,\n\t\tname,\n\t\tblockApiVersion,\n\t\tblockTitle,\n\t\tisPartOfSelection,\n\t\tadjustScrolling,\n\t\tenableAnimation,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockAttributes,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockMode,\n\t\t\t\tgetBlockName,\n\t\t\t\tisTyping,\n\t\t\t\tgetGlobalBlockCount,\n\t\t\t\tisBlockSelected,\n\t\t\t\tisBlockMultiSelected,\n\t\t\t\tisAncestorMultiSelected,\n\t\t\t\tisFirstMultiSelectedBlock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getActiveBlockVariation } = select( blocksStore );\n\t\t\tconst isSelected = isBlockSelected( clientId );\n\t\t\tconst isPartOfMultiSelection =\n\t\t\t\tisBlockMultiSelected( clientId ) ||\n\t\t\t\tisAncestorMultiSelected( clientId );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\tconst match = getActiveBlockVariation( blockName, attributes );\n\n\t\t\treturn {\n\t\t\t\tindex: getBlockIndex( clientId ),\n\t\t\t\tmode: getBlockMode( clientId ),\n\t\t\t\tname: blockName,\n\t\t\t\tblockApiVersion: blockType?.apiVersion || 1,\n\t\t\t\tblockTitle: match?.title || blockType?.title,\n\t\t\t\tisPartOfSelection: isSelected || isPartOfMultiSelection,\n\t\t\t\tadjustScrolling:\n\t\t\t\t\tisSelected || isFirstMultiSelectedBlock( clientId ),\n\t\t\t\tenableAnimation:\n\t\t\t\t\t! isTyping() &&\n\t\t\t\t\tgetGlobalBlockCount() <= BLOCK_ANIMATION_THRESHOLD,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst hasOverlay = useBlockOverlayActive( clientId );\n\n\t// translators: %s: Type of block (i.e. Text, Image etc)\n\tconst blockLabel = sprintf( __( 'Block: %s' ), blockTitle );\n\tconst htmlSuffix = mode === 'html' && ! __unstableIsHtml ? '-visual' : '';\n\tconst mergedRefs = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseFocusFirstElement( clientId ),\n\t\tuseBlockRefProvider( clientId ),\n\t\tuseFocusHandler( clientId ),\n\t\tuseEventHandlers( clientId ),\n\t\tuseNavModeExit( clientId ),\n\t\tuseIsHovered(),\n\t\tuseIntersectionObserver(),\n\t\tuseMovingAnimation( {\n\t\t\tisSelected: isPartOfSelection,\n\t\t\tadjustScrolling,\n\t\t\tenableAnimation,\n\t\t\ttriggerAnimationOnChange: index,\n\t\t} ),\n\t\tuseDisabled( { isDisabled: ! hasOverlay } ),\n\t] );\n\n\tconst blockEditContext = useBlockEditContext();\n\t// Ensures it warns only inside the `edit` implementation for the block.\n\tif ( blockApiVersion < 2 && clientId === blockEditContext.clientId ) {\n\t\twarning(\n\t\t\t`Block type \"${ name }\" must support API version 2 or higher to work correctly with \"useBlockProps\" method.`\n\t\t);\n\t}\n\n\treturn {\n\t\ttabIndex: 0,\n\t\t...wrapperProps,\n\t\t...props,\n\t\tref: mergedRefs,\n\t\tid: `block-${ clientId }${ htmlSuffix }`,\n\t\trole: 'document',\n\t\t'aria-label': blockLabel,\n\t\t'data-block': clientId,\n\t\t'data-type': name,\n\t\t'data-title': blockTitle,\n\t\tclassName: classnames(\n\t\t\t// The wp-block className is important for editor styles.\n\t\t\tclassnames( 'block-editor-block-list__block', {\n\t\t\t\t'wp-block': ! isAligned,\n\t\t\t\t'has-block-overlay': hasOverlay,\n\t\t\t} ),\n\t\t\tclassName,\n\t\t\tprops.className,\n\t\t\twrapperProps.className,\n\t\t\tuseBlockClassNames( clientId ),\n\t\t\tuseBlockDefaultClassName( clientId ),\n\t\t\tuseBlockCustomClassName( clientId ),\n\t\t\tuseBlockMovingModeClassNames( clientId )\n\t\t),\n\t\tstyle: { ...wrapperProps.style, ...props.style },\n\t};\n}\n\n/**\n * Call within a save function to get the props for the block wrapper.\n *\n * @param {Object} props Optional. Props to pass to the element.\n */\nuseBlockProps.save = getBlockProps;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseMemo,\n\tuseCallback,\n\tRawHTML,\n} from '@wordpress/element';\nimport {\n\tgetBlockType,\n\tgetSaveContent,\n\tisUnmodifiedDefaultBlock,\n\tserializeRawBlock,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { withFilters } from '@wordpress/components';\nimport {\n\twithDispatch,\n\twithSelect,\n\tuseDispatch,\n\tuseSelect,\n} from '@wordpress/data';\nimport { compose, pure, ifCondition } from '@wordpress/compose';\nimport { safeHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport BlockEdit from '../block-edit';\nimport BlockInvalidWarning from './block-invalid-warning';\nimport BlockCrashWarning from './block-crash-warning';\nimport BlockCrashBoundary from './block-crash-boundary';\nimport BlockHtml from './block-html';\nimport { useBlockProps } from './use-block-props';\nimport { store as blockEditorStore } from '../../store';\n\nexport const BlockListBlockContext = createContext();\n\n/**\n * Merges wrapper props with special handling for classNames and styles.\n *\n * @param {Object} propsA\n * @param {Object} propsB\n *\n * @return {Object} Merged props.\n */\nfunction mergeWrapperProps( propsA, propsB ) {\n\tconst newProps = {\n\t\t...propsA,\n\t\t...propsB,\n\t};\n\n\tif ( propsA?.className && propsB?.className ) {\n\t\tnewProps.className = classnames( propsA.className, propsB.className );\n\t}\n\tif ( propsA?.style && propsB?.style ) {\n\t\tnewProps.style = { ...propsA.style, ...propsB.style };\n\t}\n\n\treturn newProps;\n}\n\nfunction Block( { children, isHtml, ...props } ) {\n\treturn (\n\t\t<div { ...useBlockProps( props, { __unstableIsHtml: isHtml } ) }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nfunction BlockListBlock( {\n\tblock: { __unstableBlockSource },\n\tmode,\n\tisLocked,\n\tcanRemove,\n\tclientId,\n\tisSelected,\n\tisSelectionEnabled,\n\tclassName,\n\tname,\n\tisValid,\n\tattributes,\n\twrapperProps,\n\tsetAttributes,\n\tonReplace,\n\tonInsertBlocksAfter,\n\tonMerge,\n\ttoggleSelection,\n} ) {\n\tconst {\n\t\tthemeSupportsLayout,\n\t\thasContentLockedParent,\n\t\tisContentBlock,\n\t\tisContentLocking,\n\t\tisTemporarilyEditingAsBlocks,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSettings,\n\t\t\t\t__unstableGetContentLockingParent,\n\t\t\t\tgetTemplateLock,\n\t\t\t\t__unstableGetTemporarilyEditingAsBlocks,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst _hasContentLockedParent =\n\t\t\t\t!! __unstableGetContentLockingParent( clientId );\n\t\t\treturn {\n\t\t\t\tthemeSupportsLayout: getSettings().supportsLayout,\n\t\t\t\tisContentBlock:\n\t\t\t\t\tselect( blocksStore ).__experimentalHasContentRoleAttribute(\n\t\t\t\t\t\tname\n\t\t\t\t\t),\n\t\t\t\thasContentLockedParent: _hasContentLockedParent,\n\t\t\t\tisContentLocking:\n\t\t\t\t\tgetTemplateLock( clientId ) === 'contentOnly' &&\n\t\t\t\t\t! _hasContentLockedParent,\n\t\t\t\tisTemporarilyEditingAsBlocks:\n\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks() === clientId,\n\t\t\t};\n\t\t},\n\t\t[ name, clientId ]\n\t);\n\tconst { removeBlock } = useDispatch( blockEditorStore );\n\tconst onRemove = useCallback( () => removeBlock( clientId ), [ clientId ] );\n\n\t// We wrap the BlockEdit component in a div that hides it when editing in\n\t// HTML mode. This allows us to render all of the ancillary pieces\n\t// (InspectorControls, etc.) which are inside `BlockEdit` but not\n\t// `BlockHTML`, even in HTML mode.\n\tlet blockEdit = (\n\t\t<BlockEdit\n\t\t\tname={ name }\n\t\t\tisSelected={ isSelected }\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\tinsertBlocksAfter={ isLocked ? undefined : onInsertBlocksAfter }\n\t\t\tonReplace={ canRemove ? onReplace : undefined }\n\t\t\tonRemove={ canRemove ? onRemove : undefined }\n\t\t\tmergeBlocks={ canRemove ? onMerge : undefined }\n\t\t\tclientId={ clientId }\n\t\t\tisSelectionEnabled={ isSelectionEnabled }\n\t\t\ttoggleSelection={ toggleSelection }\n\t\t/>\n\t);\n\n\tconst blockType = getBlockType( name );\n\n\tif ( hasContentLockedParent && ! isContentBlock ) {\n\t\twrapperProps = {\n\t\t\t...wrapperProps,\n\t\t\ttabIndex: -1,\n\t\t};\n\t}\n\t// Determine whether the block has props to apply to the wrapper.\n\tif ( blockType?.getEditWrapperProps ) {\n\t\twrapperProps = mergeWrapperProps(\n\t\t\twrapperProps,\n\t\t\tblockType.getEditWrapperProps( attributes )\n\t\t);\n\t}\n\n\tconst isAligned =\n\t\twrapperProps &&\n\t\t!! wrapperProps[ 'data-align' ] &&\n\t\t! themeSupportsLayout;\n\n\t// For aligned blocks, provide a wrapper element so the block can be\n\t// positioned relative to the block column.\n\t// This is only kept for classic themes that don't support layout\n\t// Historically we used to rely on extra divs and data-align to\n\t// provide the alignments styles in the editor.\n\t// Due to the differences between frontend and backend, we migrated\n\t// to the layout feature, and we're now aligning the markup of frontend\n\t// and backend.\n\tif ( isAligned ) {\n\t\tblockEdit = (\n\t\t\t<div\n\t\t\t\tclassName=\"wp-block\"\n\t\t\t\tdata-align={ wrapperProps[ 'data-align' ] }\n\t\t\t>\n\t\t\t\t{ blockEdit }\n\t\t\t</div>\n\t\t);\n\t}\n\n\tlet block;\n\n\tif ( ! isValid ) {\n\t\tconst saveContent = __unstableBlockSource\n\t\t\t? serializeRawBlock( __unstableBlockSource )\n\t\t\t: getSaveContent( blockType, attributes );\n\n\t\tblock = (\n\t\t\t<Block className=\"has-warning\">\n\t\t\t\t<BlockInvalidWarning clientId={ clientId } />\n\t\t\t\t<RawHTML>{ safeHTML( saveContent ) }</RawHTML>\n\t\t\t</Block>\n\t\t);\n\t} else if ( mode === 'html' ) {\n\t\t// Render blockEdit so the inspector controls don't disappear.\n\t\t// See #8969.\n\t\tblock = (\n\t\t\t<>\n\t\t\t\t<div style={ { display: 'none' } }>{ blockEdit }</div>\n\t\t\t\t<Block isHtml>\n\t\t\t\t\t<BlockHtml clientId={ clientId } />\n\t\t\t\t</Block>\n\t\t\t</>\n\t\t);\n\t} else if ( blockType?.apiVersion > 1 ) {\n\t\tblock = blockEdit;\n\t} else {\n\t\tblock = <Block { ...wrapperProps }>{ blockEdit }</Block>;\n\t}\n\n\tconst { 'data-align': dataAlign, ...restWrapperProps } = wrapperProps ?? {};\n\n\tconst value = {\n\t\tclientId,\n\t\tclassName: classnames(\n\t\t\t{\n\t\t\t\t'is-content-locked': isContentLocking,\n\t\t\t\t'is-content-locked-temporarily-editing-as-blocks':\n\t\t\t\t\tisTemporarilyEditingAsBlocks,\n\t\t\t\t'is-content-block': hasContentLockedParent && isContentBlock,\n\t\t\t},\n\t\t\tdataAlign && themeSupportsLayout && `align${ dataAlign }`,\n\t\t\tclassName\n\t\t),\n\t\twrapperProps: restWrapperProps,\n\t\tisAligned,\n\t};\n\n\tconst memoizedValue = useMemo( () => value, Object.values( value ) );\n\n\treturn (\n\t\t<BlockListBlockContext.Provider value={ memoizedValue }>\n\t\t\t<BlockCrashBoundary\n\t\t\t\tfallback={\n\t\t\t\t\t<Block className=\"has-warning\">\n\t\t\t\t\t\t<BlockCrashWarning />\n\t\t\t\t\t</Block>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ block }\n\t\t\t</BlockCrashBoundary>\n\t\t</BlockListBlockContext.Provider>\n\t);\n}\n\nconst applyWithSelect = withSelect( ( select, { clientId, rootClientId } ) => {\n\tconst {\n\t\tisBlockSelected,\n\t\tgetBlockMode,\n\t\tisSelectionEnabled,\n\t\tgetTemplateLock,\n\t\t__unstableGetBlockWithoutInnerBlocks,\n\t\tcanRemoveBlock,\n\t\tcanMoveBlock,\n\t} = select( blockEditorStore );\n\tconst block = __unstableGetBlockWithoutInnerBlocks( clientId );\n\tconst isSelected = isBlockSelected( clientId );\n\tconst templateLock = getTemplateLock( rootClientId );\n\tconst canRemove = canRemoveBlock( clientId, rootClientId );\n\tconst canMove = canMoveBlock( clientId, rootClientId );\n\n\t// The fallback to `{}` is a temporary fix.\n\t// This function should never be called when a block is not present in\n\t// the state. It happens now because the order in withSelect rendering\n\t// is not correct.\n\tconst { name, attributes, isValid } = block || {};\n\n\t// Do not add new properties here, use `useSelect` instead to avoid\n\t// leaking new props to the public API (editor.BlockListBlock filter).\n\treturn {\n\t\tmode: getBlockMode( clientId ),\n\t\tisSelectionEnabled: isSelectionEnabled(),\n\t\tisLocked: !! templateLock,\n\t\tcanRemove,\n\t\tcanMove,\n\t\t// Users of the editor.BlockListBlock filter used to be able to\n\t\t// access the block prop.\n\t\t// Ideally these blocks would rely on the clientId prop only.\n\t\t// This is kept for backward compatibility reasons.\n\t\tblock,\n\t\tname,\n\t\tattributes,\n\t\tisValid,\n\t\tisSelected,\n\t};\n} );\n\nconst applyWithDispatch = withDispatch( ( dispatch, ownProps, { select } ) => {\n\tconst {\n\t\tupdateBlockAttributes,\n\t\tinsertBlocks,\n\t\tmergeBlocks,\n\t\treplaceBlocks,\n\t\ttoggleSelection,\n\t\t__unstableMarkLastChangeAsPersistent,\n\t} = dispatch( blockEditorStore );\n\n\t// Do not add new properties here, use `useDispatch` instead to avoid\n\t// leaking new props to the public API (editor.BlockListBlock filter).\n\treturn {\n\t\tsetAttributes( newAttributes ) {\n\t\t\tconst { getMultiSelectedBlockClientIds } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst multiSelectedBlockClientIds =\n\t\t\t\tgetMultiSelectedBlockClientIds();\n\t\t\tconst { clientId } = ownProps;\n\t\t\tconst clientIds = multiSelectedBlockClientIds.length\n\t\t\t\t? multiSelectedBlockClientIds\n\t\t\t\t: [ clientId ];\n\n\t\t\tupdateBlockAttributes( clientIds, newAttributes );\n\t\t},\n\t\tonInsertBlocks( blocks, index ) {\n\t\t\tconst { rootClientId } = ownProps;\n\t\t\tinsertBlocks( blocks, index, rootClientId );\n\t\t},\n\t\tonInsertBlocksAfter( blocks ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst { getBlockIndex } = select( blockEditorStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tinsertBlocks( blocks, index + 1, rootClientId );\n\t\t},\n\t\tonMerge( forward ) {\n\t\t\tconst { clientId, rootClientId } = ownProps;\n\t\t\tconst { getPreviousBlockClientId, getNextBlockClientId, getBlock } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tif ( forward ) {\n\t\t\t\tconst nextBlockClientId = getNextBlockClientId( clientId );\n\t\t\t\tif ( nextBlockClientId ) {\n\t\t\t\t\tmergeBlocks( clientId, nextBlockClientId );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst previousBlockClientId =\n\t\t\t\t\tgetPreviousBlockClientId( clientId );\n\t\t\t\tif ( previousBlockClientId ) {\n\t\t\t\t\tmergeBlocks( previousBlockClientId, clientId );\n\t\t\t\t} else if ( rootClientId ) {\n\t\t\t\t\t// Attempt to \"unwrap\" the block contents when there's no\n\t\t\t\t\t// preceding block to merge with.\n\t\t\t\t\tconst replacement = switchToBlockType(\n\t\t\t\t\t\tgetBlock( rootClientId ),\n\t\t\t\t\t\t'*'\n\t\t\t\t\t);\n\t\t\t\t\tif ( replacement && replacement.length ) {\n\t\t\t\t\t\treplaceBlocks( rootClientId, replacement, 0 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tonReplace( blocks, indexToSelect, initialPosition ) {\n\t\t\tif (\n\t\t\t\tblocks.length &&\n\t\t\t\t! isUnmodifiedDefaultBlock( blocks[ blocks.length - 1 ] )\n\t\t\t) {\n\t\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\t}\n\t\t\treplaceBlocks(\n\t\t\t\t[ ownProps.clientId ],\n\t\t\t\tblocks,\n\t\t\t\tindexToSelect,\n\t\t\t\tinitialPosition\n\t\t\t);\n\t\t},\n\t\ttoggleSelection( selectionEnabled ) {\n\t\t\ttoggleSelection( selectionEnabled );\n\t\t},\n\t};\n} );\n\nexport default compose(\n\tpure,\n\tapplyWithSelect,\n\tapplyWithDispatch,\n\t// Block is sometimes not mounted at the right time, causing it be undefined\n\t// see issue for more info\n\t// https://github.com/WordPress/gutenberg/issues/17013\n\tifCondition( ( { block } ) => !! block ),\n\twithFilters( 'editor.BlockListBlock' )\n)( BlockListBlock );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","/**\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=\"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement, useState } from '@wordpress/element';\nimport { Tip } from '@wordpress/components';\n\nconst globalTips = [\n\tcreateInterpolateElement(\n\t\t__(\n\t\t\t'While writing, you can press <kbd>/</kbd> to quickly insert new blocks.'\n\t\t),\n\t\t{ kbd: <kbd /> }\n\t),\n\tcreateInterpolateElement(\n\t\t__(\n\t\t\t'Indent a list by pressing <kbd>space</kbd> at the beginning of a line.'\n\t\t),\n\t\t{ kbd: <kbd /> }\n\t),\n\tcreateInterpolateElement(\n\t\t__(\n\t\t\t'Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line.'\n\t\t),\n\t\t{ kbd: <kbd /> }\n\t),\n\t__( 'Drag files into the editor to automatically insert media blocks.' ),\n\t__( \"Change a block's type by pressing the block icon on the toolbar.\" ),\n];\n\nfunction Tips() {\n\tconst [ randomIndex ] = useState(\n\t\t// Disable Reason: I'm not generating an HTML id.\n\t\t// eslint-disable-next-line no-restricted-syntax\n\t\tMath.floor( Math.random() * globalTips.length )\n\t);\n\n\treturn <Tip>{ globalTips[ randomIndex ] }</Tip>;\n}\n\nexport default Tips;\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\nimport { blockDefault } from '@wordpress/icons';\nimport { memo } from '@wordpress/element';\n\nfunction BlockIcon( { icon, showColors = false, className } ) {\n\tif ( icon?.src === 'block-default' ) {\n\t\ticon = {\n\t\t\tsrc: blockDefault,\n\t\t};\n\t}\n\n\tconst renderedIcon = <Icon icon={ icon && icon.src ? icon.src : icon } />;\n\tconst style = showColors\n\t\t? {\n\t\t\t\tbackgroundColor: icon && icon.background,\n\t\t\t\tcolor: icon && icon.foreground,\n\t\t  }\n\t\t: {};\n\n\treturn (\n\t\t<span\n\t\t\tstyle={ style }\n\t\t\tclassName={ classnames( 'block-editor-block-icon', className, {\n\t\t\t\t'has-colors': showColors,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ renderedIcon }\n\t\t</span>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-icon/README.md\n */\nexport default memo( BlockIcon );\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nfunction BlockCard( { title, icon, description, blockType } ) {\n\tif ( blockType ) {\n\t\tdeprecated( '`blockType` property in `BlockCard component`', {\n\t\t\tsince: '5.7',\n\t\t\talternative: '`title, icon and description` properties',\n\t\t} );\n\t\t( { title, icon, description } = blockType );\n\t}\n\treturn (\n\t\t<div className=\"block-editor-block-card\">\n\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t<div className=\"block-editor-block-card__content\">\n\t\t\t\t<h2 className=\"block-editor-block-card__title\">{ title }</h2>\n\t\t\t\t<span className=\"block-editor-block-card__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default BlockCard;\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport {\n\twithRegistry,\n\tcreateRegistry,\n\tRegistryProvider,\n} from '@wordpress/data';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { storeConfig } from '../../store';\nimport { STORE_NAME as blockEditorStoreName } from '../../store/constants';\n\nconst withRegistryProvider = createHigherOrderComponent(\n\t( WrappedComponent ) => {\n\t\treturn withRegistry(\n\t\t\t( { useSubRegistry = true, registry, ...props } ) => {\n\t\t\t\tif ( ! useSubRegistry ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent registry={ registry } { ...props } />\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst [ subRegistry, setSubRegistry ] = useState( null );\n\t\t\t\tuseEffect( () => {\n\t\t\t\t\tconst newRegistry = createRegistry( {}, registry );\n\t\t\t\t\tnewRegistry.registerStore(\n\t\t\t\t\t\tblockEditorStoreName,\n\t\t\t\t\t\tstoreConfig\n\t\t\t\t\t);\n\t\t\t\t\tsetSubRegistry( newRegistry );\n\t\t\t\t}, [ registry ] );\n\n\t\t\t\tif ( ! subRegistry ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<RegistryProvider value={ subRegistry }>\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\tregistry={ subRegistry }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</RegistryProvider>\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\t},\n\t'withRegistryProvider'\n);\n\nexport default withRegistryProvider;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useRegistry, useSelect } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\n/**\n * A function to call when the block value has been updated in the block-editor\n * store.\n *\n * @callback onBlockUpdate\n * @param {Object[]} blocks  The updated blocks.\n * @param {Object}   options The updated block options, such as selectionStart\n *                           and selectionEnd.\n */\n\n/**\n * useBlockSync is a side effect which handles bidirectional sync between the\n * block-editor store and a controlling data source which provides blocks. This\n * is most commonly used by the BlockEditorProvider to synchronize the contents\n * of the block-editor store with the root entity, like a post.\n *\n * Another example would be the template part block, which provides blocks from\n * a separate entity data source than a root entity. This hook syncs edits to\n * the template part in the block editor back to the entity and vice-versa.\n *\n * Here are some of its basic functions:\n * - Initalizes the block-editor store for the given clientID to the blocks\n *   given via props.\n * - Adds incoming changes (like undo) to the block-editor store.\n * - Adds outgoing changes (like editing content) to the controlling entity,\n *   determining if a change should be considered persistent or not.\n * - Handles edge cases and race conditions which occur in those operations.\n * - Ignores changes which happen to other entities (like nested inner block\n *   controllers.\n * - Passes selection state from the block-editor store to the controlling entity.\n *\n * @param {Object}        props           Props for the block sync hook\n * @param {string}        props.clientId  The client ID of the inner block controller.\n *                                        If none is passed, then it is assumed to be a\n *                                        root controller rather than an inner block\n *                                        controller.\n * @param {Object[]}      props.value     The control value for the blocks. This value\n *                                        is used to initalize the block-editor store\n *                                        and for resetting the blocks to incoming\n *                                        changes like undo.\n * @param {Object}        props.selection The selection state responsible to restore the selection on undo/redo.\n * @param {onBlockUpdate} props.onChange  Function to call when a persistent\n *                                        change has been made in the block-editor blocks\n *                                        for the given clientId. For example, after\n *                                        this function is called, an entity is marked\n *                                        dirty because it has changes to save.\n * @param {onBlockUpdate} props.onInput   Function to call when a non-persistent\n *                                        change has been made in the block-editor blocks\n *                                        for the given clientId. When this is called,\n *                                        controlling sources do not become dirty.\n */\nexport default function useBlockSync( {\n\tclientId = null,\n\tvalue: controlledBlocks,\n\tselection: controlledSelection,\n\tonChange = noop,\n\tonInput = noop,\n} ) {\n\tconst registry = useRegistry();\n\n\tconst {\n\t\tresetBlocks,\n\t\tresetSelection,\n\t\treplaceInnerBlocks,\n\t\tsetHasControlledInnerBlocks,\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t} = registry.dispatch( blockEditorStore );\n\tconst { getBlockName, getBlocks } = registry.select( blockEditorStore );\n\tconst isControlled = useSelect(\n\t\t( select ) => {\n\t\t\treturn (\n\t\t\t\t! clientId ||\n\t\t\t\tselect( blockEditorStore ).areInnerBlocksControlled( clientId )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst pendingChanges = useRef( { incoming: null, outgoing: [] } );\n\tconst subscribed = useRef( false );\n\n\tconst setControlledBlocks = () => {\n\t\tif ( ! controlledBlocks ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't need to persist this change because we only replace\n\t\t// controlled inner blocks when the change was caused by an entity,\n\t\t// and so it would already be persisted.\n\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\tif ( clientId ) {\n\t\t\t// It is important to batch here because otherwise,\n\t\t\t// as soon as `setHasControlledInnerBlocks` is called\n\t\t\t// the effect to restore might be triggered\n\t\t\t// before the actual blocks get set properly in state.\n\t\t\tregistry.batch( () => {\n\t\t\t\tsetHasControlledInnerBlocks( clientId, true );\n\t\t\t\tconst storeBlocks = controlledBlocks.map( ( block ) =>\n\t\t\t\t\tcloneBlock( block )\n\t\t\t\t);\n\t\t\t\tif ( subscribed.current ) {\n\t\t\t\t\tpendingChanges.current.incoming = storeBlocks;\n\t\t\t\t}\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceInnerBlocks( clientId, storeBlocks );\n\t\t\t} );\n\t\t} else {\n\t\t\tif ( subscribed.current ) {\n\t\t\t\tpendingChanges.current.incoming = controlledBlocks;\n\t\t\t}\n\t\t\tresetBlocks( controlledBlocks );\n\t\t}\n\t};\n\n\t// Add a subscription to the block-editor registry to detect when changes\n\t// have been made. This lets us inform the data source of changes. This\n\t// is an effect so that the subscriber can run synchronously without\n\t// waiting for React renders for changes.\n\tconst onInputRef = useRef( onInput );\n\tconst onChangeRef = useRef( onChange );\n\tuseEffect( () => {\n\t\tonInputRef.current = onInput;\n\t\tonChangeRef.current = onChange;\n\t}, [ onInput, onChange ] );\n\n\t// Determine if blocks need to be reset when they change.\n\tuseEffect( () => {\n\t\tif ( pendingChanges.current.outgoing.includes( controlledBlocks ) ) {\n\t\t\t// Skip block reset if the value matches expected outbound sync\n\t\t\t// triggered by this component by a preceding change detection.\n\t\t\t// Only skip if the value matches expectation, since a reset should\n\t\t\t// still occur if the value is modified (not equal by reference),\n\t\t\t// to allow that the consumer may apply modifications to reflect\n\t\t\t// back on the editor.\n\t\t\tif (\n\t\t\t\tpendingChanges.current.outgoing[\n\t\t\t\t\tpendingChanges.current.outgoing.length - 1\n\t\t\t\t] === controlledBlocks\n\t\t\t) {\n\t\t\t\tpendingChanges.current.outgoing = [];\n\t\t\t}\n\t\t} else if ( getBlocks( clientId ) !== controlledBlocks ) {\n\t\t\t// Reset changing value in all other cases than the sync described\n\t\t\t// above. Since this can be reached in an update following an out-\n\t\t\t// bound sync, unset the outbound value to avoid considering it in\n\t\t\t// subsequent renders.\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tsetControlledBlocks();\n\n\t\t\tif ( controlledSelection ) {\n\t\t\t\tresetSelection(\n\t\t\t\t\tcontrolledSelection.selectionStart,\n\t\t\t\t\tcontrolledSelection.selectionEnd,\n\t\t\t\t\tcontrolledSelection.initialPosition\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}, [ controlledBlocks, clientId ] );\n\n\tuseEffect( () => {\n\t\t// When the block becomes uncontrolled, it means its inner state has been reset\n\t\t// we need to take the blocks again from the external value property.\n\t\tif ( ! isControlled ) {\n\t\t\tpendingChanges.current.outgoing = [];\n\t\t\tsetControlledBlocks();\n\t\t}\n\t}, [ isControlled ] );\n\n\tuseEffect( () => {\n\t\tconst {\n\t\t\tgetSelectionStart,\n\t\t\tgetSelectionEnd,\n\t\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t\tisLastBlockChangePersistent,\n\t\t\t__unstableIsLastBlockChangeIgnored,\n\t\t\tareInnerBlocksControlled,\n\t\t} = registry.select( blockEditorStore );\n\n\t\tlet blocks = getBlocks( clientId );\n\t\tlet isPersistent = isLastBlockChangePersistent();\n\t\tlet previousAreBlocksDifferent = false;\n\n\t\tsubscribed.current = true;\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\t// Sometimes, when changing block lists, lingering subscriptions\n\t\t\t// might trigger before they are cleaned up. If the block for which\n\t\t\t// the subscription runs is no longer in the store, this would clear\n\t\t\t// its parent entity's block list. To avoid this, we bail out if\n\t\t\t// the subscription is triggering for a block (`clientId !== null`)\n\t\t\t// and its block name can't be found because it's not on the list.\n\t\t\t// (`getBlockName( clientId ) === null`).\n\t\t\tif ( clientId !== null && getBlockName( clientId ) === null )\n\t\t\t\treturn;\n\n\t\t\t// When RESET_BLOCKS on parent blocks get called, the controlled blocks\n\t\t\t// can reset to uncontrolled, in these situations, it means we need to populate\n\t\t\t// the blocks again from the external blocks (the value property here)\n\t\t\t// and we should stop triggering onChange\n\t\t\tconst isStillControlled =\n\t\t\t\t! clientId || areInnerBlocksControlled( clientId );\n\t\t\tif ( ! isStillControlled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newIsPersistent = isLastBlockChangePersistent();\n\t\t\tconst newBlocks = getBlocks( clientId );\n\t\t\tconst areBlocksDifferent = newBlocks !== blocks;\n\t\t\tblocks = newBlocks;\n\n\t\t\tif (\n\t\t\t\tareBlocksDifferent &&\n\t\t\t\t( pendingChanges.current.incoming ||\n\t\t\t\t\t__unstableIsLastBlockChangeIgnored() )\n\t\t\t) {\n\t\t\t\tpendingChanges.current.incoming = null;\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Since we often dispatch an action to mark the previous action as\n\t\t\t// persistent, we need to make sure that the blocks changed on the\n\t\t\t// previous action before committing the change.\n\t\t\tconst didPersistenceChange =\n\t\t\t\tpreviousAreBlocksDifferent &&\n\t\t\t\t! areBlocksDifferent &&\n\t\t\t\tnewIsPersistent &&\n\t\t\t\t! isPersistent;\n\n\t\t\tif ( areBlocksDifferent || didPersistenceChange ) {\n\t\t\t\tisPersistent = newIsPersistent;\n\t\t\t\t// We know that onChange/onInput will update controlledBlocks.\n\t\t\t\t// We need to be aware that it was caused by an outgoing change\n\t\t\t\t// so that we do not treat it as an incoming change later on,\n\t\t\t\t// which would cause a block reset.\n\t\t\t\tpendingChanges.current.outgoing.push( blocks );\n\n\t\t\t\t// Inform the controlling entity that changes have been made to\n\t\t\t\t// the block-editor store they should be aware about.\n\t\t\t\tconst updateParent = isPersistent\n\t\t\t\t\t? onChangeRef.current\n\t\t\t\t\t: onInputRef.current;\n\t\t\t\tupdateParent( blocks, {\n\t\t\t\t\tselection: {\n\t\t\t\t\t\tselectionStart: getSelectionStart(),\n\t\t\t\t\t\tselectionEnd: getSelectionEnd(),\n\t\t\t\t\t\tinitialPosition:\n\t\t\t\t\t\t\tgetSelectedBlocksInitialCaretPosition(),\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}\n\t\t\tpreviousAreBlocksDifferent = areBlocksDifferent;\n\t\t} );\n\n\t\treturn () => unsubscribe();\n\t}, [ registry, clientId ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport withRegistryProvider from './with-registry-provider';\nimport useBlockSync from './use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockRefsProvider } from './block-refs-provider';\n\n/** @typedef {import('@wordpress/data').WPDataRegistry} WPDataRegistry */\n\nfunction BlockEditorProvider( props ) {\n\tconst { children, settings } = props;\n\n\tconst { updateSettings } = useDispatch( blockEditorStore );\n\tuseEffect( () => {\n\t\tupdateSettings( settings );\n\t}, [ settings ] );\n\n\t// Syncs the entity provider with changes in the block-editor store.\n\tuseBlockSync( props );\n\n\treturn <BlockRefsProvider>{ children }</BlockRefsProvider>;\n}\n\nexport default withRegistryProvider( BlockEditorProvider );\n","/**\n * WordPress dependencies\n */\nimport { Disabled } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\n\nexport default function LiveBlockPreview( { onClick } ) {\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ 0 }\n\t\t\trole=\"button\"\n\t\t\tonClick={ onClick }\n\t\t\tonKeyPress={ onClick }\n\t\t>\n\t\t\t<Disabled>\n\t\t\t\t<BlockList />\n\t\t\t</Disabled>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Pass the returned ref callback to an element that should clear block\n * selection. Selection will only be cleared if the element is clicked directly,\n * not if a child element is clicked.\n *\n * @return {import('react').RefCallback} Ref callback.\n */\nexport function useBlockSelectionClearer() {\n\tconst { hasSelectedBlock, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\tconst { clearSelectedBlock } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\tif ( ! hasSelectedBlock() && ! hasMultiSelection() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Only handle clicks on the element, not the children.\n\t\t\t\tif ( event.target !== node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearSelectedBlock();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock, hasMultiSelection, clearSelectedBlock ]\n\t);\n}\n\nexport default function BlockSelectionClearer( props ) {\n\treturn <div ref={ useBlockSelectionClearer() } { ...props } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction selector( select ) {\n\tconst {\n\t\tisMultiSelecting,\n\t\tgetMultiSelectedBlockClientIds,\n\t\thasMultiSelection,\n\t\tgetSelectedBlockClientId,\n\t\tgetSelectedBlocksInitialCaretPosition,\n\t\t__unstableIsFullySelected,\n\t} = select( blockEditorStore );\n\n\treturn {\n\t\tisMultiSelecting: isMultiSelecting(),\n\t\tmultiSelectedBlockClientIds: getMultiSelectedBlockClientIds(),\n\t\thasMultiSelection: hasMultiSelection(),\n\t\tselectedBlockClientId: getSelectedBlockClientId(),\n\t\tinitialPosition: getSelectedBlocksInitialCaretPosition(),\n\t\tisFullSelection: __unstableIsFullySelected(),\n\t};\n}\n\nexport default function useMultiSelection() {\n\tconst {\n\t\tinitialPosition,\n\t\tisMultiSelecting,\n\t\tmultiSelectedBlockClientIds,\n\t\thasMultiSelection,\n\t\tselectedBlockClientId,\n\t\tisFullSelection,\n\t} = useSelect( selector, [] );\n\n\t/**\n\t * When the component updates, and there is multi selection, we need to\n\t * select the entire block contents.\n\t */\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t// Allow initialPosition to bypass focus behavior. This is useful\n\t\t\t// for the list view or other areas where we don't want to transfer\n\t\t\t// focus to the editor canvas.\n\t\t\tif ( initialPosition === undefined || initialPosition === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! hasMultiSelection || isMultiSelecting ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { length } = multiSelectedBlockClientIds;\n\n\t\t\tif ( length < 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! isFullSelection ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Allow cross contentEditable selection by temporarily making\n\t\t\t// all content editable. We can't rely on using the store and\n\t\t\t// React because re-rending happens too slowly. We need to be\n\t\t\t// able to select across instances immediately.\n\t\t\tnode.contentEditable = true;\n\n\t\t\t// For some browsers, like Safari, it is important that focus\n\t\t\t// happens BEFORE selection removal.\n\t\t\tnode.focus();\n\n\t\t\tdefaultView.getSelection().removeAllRanges();\n\t\t},\n\t\t[\n\t\t\thasMultiSelection,\n\t\t\tisMultiSelecting,\n\t\t\tmultiSelectedBlockClientIds,\n\t\t\tselectedBlockClientId,\n\t\t\tinitialPosition,\n\t\t\tisFullSelection,\n\t\t]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tcomputeCaretRect,\n\tfocus,\n\tisHorizontalEdge,\n\tisVerticalEdge,\n\tplaceCaretAtHorizontalEdge,\n\tplaceCaretAtVerticalEdge,\n\tisRTL,\n} from '@wordpress/dom';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getBlockClientId, isInSameBlock } from '../../utils/dom';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns true if the element should consider edge navigation upon a keyboard\n * event of the given directional key code, or false otherwise.\n *\n * @param {Element} element     HTML element to test.\n * @param {number}  keyCode     KeyboardEvent keyCode to test.\n * @param {boolean} hasModifier Whether a modifier is pressed.\n *\n * @return {boolean} Whether element should consider edge navigation.\n */\nexport function isNavigationCandidate( element, keyCode, hasModifier ) {\n\tconst isVertical = keyCode === UP || keyCode === DOWN;\n\n\t// Currently, all elements support unmodified vertical navigation.\n\tif ( isVertical && ! hasModifier ) {\n\t\treturn true;\n\t}\n\n\tconst { tagName } = element;\n\n\t// Native inputs should not navigate horizontally, unless they are simple types that don't need left/right arrow keys.\n\tif ( tagName === 'INPUT' ) {\n\t\tconst simpleInputTypes = [\n\t\t\t'button',\n\t\t\t'checkbox',\n\t\t\t'color',\n\t\t\t'file',\n\t\t\t'image',\n\t\t\t'radio',\n\t\t\t'reset',\n\t\t\t'submit',\n\t\t];\n\t\treturn simpleInputTypes.includes( element.getAttribute( 'type' ) );\n\t}\n\n\t// Native textareas should not navigate horizontally.\n\treturn tagName !== 'TEXTAREA';\n}\n\n/**\n * Returns the optimal tab target from the given focused element in the desired\n * direction. A preference is made toward text fields, falling back to the block\n * focus stop if no other candidates exist for the block.\n *\n * @param {Element} target           Currently focused text field.\n * @param {boolean} isReverse        True if considering as the first field.\n * @param {Element} containerElement Element containing all blocks.\n * @param {boolean} onlyVertical     Whether to only consider tabbable elements\n *                                   that are visually above or under the\n *                                   target.\n *\n * @return {?Element} Optimal tab target, if one exists.\n */\nexport function getClosestTabbable(\n\ttarget,\n\tisReverse,\n\tcontainerElement,\n\tonlyVertical\n) {\n\t// Since the current focus target is not guaranteed to be a text field, find\n\t// all focusables. Tabbability is considered later.\n\tlet focusableNodes = focus.focusable.find( containerElement );\n\n\tif ( isReverse ) {\n\t\tfocusableNodes.reverse();\n\t}\n\n\t// Consider as candidates those focusables after the current target. It's\n\t// assumed this can only be reached if the target is focusable (on its\n\t// keydown event), so no need to verify it exists in the set.\n\tfocusableNodes = focusableNodes.slice(\n\t\tfocusableNodes.indexOf( target ) + 1\n\t);\n\n\tlet targetRect;\n\n\tif ( onlyVertical ) {\n\t\ttargetRect = target.getBoundingClientRect();\n\t}\n\n\tfunction isTabCandidate( node ) {\n\t\t// Skip if there's only one child that is content editable (and thus a\n\t\t// better candidate).\n\t\tif (\n\t\t\tnode.children.length === 1 &&\n\t\t\tisInSameBlock( node, node.firstElementChild ) &&\n\t\t\tnode.firstElementChild.getAttribute( 'contenteditable' ) === 'true'\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Not a candidate if the node is not tabbable.\n\t\tif ( ! focus.tabbable.isTabbableIndex( node ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Skip focusable elements such as links within content editable nodes.\n\t\tif ( node.isContentEditable && node.contentEditable !== 'true' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( onlyVertical ) {\n\t\t\tconst nodeRect = node.getBoundingClientRect();\n\n\t\t\tif (\n\t\t\t\tnodeRect.left >= targetRect.right ||\n\t\t\t\tnodeRect.right <= targetRect.left\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn focusableNodes.find( isTabCandidate );\n}\n\nexport default function useArrowNav() {\n\tconst {\n\t\tgetMultiSelectedBlocksStartClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetSettings,\n\t\thasMultiSelection,\n\t\t__unstableIsFullySelected,\n\t} = useSelect( blockEditorStore );\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\treturn useRefEffect( ( node ) => {\n\t\t// Here a DOMRect is stored while moving the caret vertically so\n\t\t// vertical position of the start position can be restored. This is to\n\t\t// recreate browser behaviour across blocks.\n\t\tlet verticalRect;\n\n\t\tfunction onMouseDown() {\n\t\t\tverticalRect = null;\n\t\t}\n\n\t\tfunction isClosestTabbableABlock( target, isReverse ) {\n\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\ttarget,\n\t\t\t\tisReverse,\n\t\t\t\tnode\n\t\t\t);\n\t\t\treturn closestTabbable && getBlockClientId( closestTabbable );\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\t\t\tconst { keyCode, target, shiftKey, ctrlKey, altKey, metaKey } =\n\t\t\t\tevent;\n\t\t\tconst isUp = keyCode === UP;\n\t\t\tconst isDown = keyCode === DOWN;\n\t\t\tconst isLeft = keyCode === LEFT;\n\t\t\tconst isRight = keyCode === RIGHT;\n\t\t\tconst isReverse = isUp || isLeft;\n\t\t\tconst isHorizontal = isLeft || isRight;\n\t\t\tconst isVertical = isUp || isDown;\n\t\t\tconst isNav = isHorizontal || isVertical;\n\t\t\tconst hasModifier = shiftKey || ctrlKey || altKey || metaKey;\n\t\t\tconst isNavEdge = isVertical ? isVerticalEdge : isHorizontalEdge;\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\t// If there is a multi-selection, the arrow keys should collapse the\n\t\t\t// selection to the start or end of the selection.\n\t\t\tif ( hasMultiSelection() ) {\n\t\t\t\t// Only handle if we have a full selection (not a native partial\n\t\t\t\t// selection).\n\t\t\t\tif ( ! __unstableIsFullySelected() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! isNav ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( shiftKey ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\tif ( isReverse ) {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksStartClientId() );\n\t\t\t\t} else {\n\t\t\t\t\tselectBlock( getMultiSelectedBlocksEndClientId(), -1 );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// When presing any key other than up or down, the initial vertical\n\t\t\t// position must ALWAYS be reset. The vertical position is saved so\n\t\t\t// it can be restored as well as possible on sebsequent vertical\n\t\t\t// arrow key presses. It may not always be possible to restore the\n\t\t\t// exact same position (such as at an empty line), so it wouldn't be\n\t\t\t// good to compute the position right before any vertical arrow key\n\t\t\t// press.\n\t\t\tif ( ! isVertical ) {\n\t\t\t\tverticalRect = null;\n\t\t\t} else if ( ! verticalRect ) {\n\t\t\t\tverticalRect = computeCaretRect( defaultView );\n\t\t\t}\n\n\t\t\t// Abort if navigation has already been handled (e.g. RichText\n\t\t\t// inline boundaries).\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! isNav ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Abort if our current target is not a candidate for navigation\n\t\t\t// (e.g. preserve native input behaviors).\n\t\t\tif ( ! isNavigationCandidate( target, keyCode, hasModifier ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In the case of RTL scripts, right means previous and left means\n\t\t\t// next, which is the exact reverse of LTR.\n\t\t\tconst isReverseDir = isRTL( target ) ? ! isReverse : isReverse;\n\t\t\tconst { keepCaretInsideBlock } = getSettings();\n\n\t\t\tif ( shiftKey ) {\n\t\t\t\tif (\n\t\t\t\t\tisClosestTabbableABlock( target, isReverse ) &&\n\t\t\t\t\tisNavEdge( target, isReverse )\n\t\t\t\t) {\n\t\t\t\t\tnode.contentEditable = true;\n\t\t\t\t\t// Firefox doesn't automatically move focus.\n\t\t\t\t\tnode.focus();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisVertical &&\n\t\t\t\tisVerticalEdge( target, isReverse ) &&\n\t\t\t\t// When Alt is pressed, only intercept if the caret is also at\n\t\t\t\t// the horizontal edge.\n\t\t\t\t( altKey ? isHorizontalEdge( target, isReverseDir ) : true ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverse,\n\t\t\t\t\tnode,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tif ( closestTabbable ) {\n\t\t\t\t\tplaceCaretAtVerticalEdge(\n\t\t\t\t\t\tclosestTabbable,\n\t\t\t\t\t\t// When Alt is pressed, place the caret at the furthest\n\t\t\t\t\t\t// horizontal edge and the furthest vertical edge.\n\t\t\t\t\t\taltKey ? ! isReverse : isReverse,\n\t\t\t\t\t\taltKey ? undefined : verticalRect\n\t\t\t\t\t);\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tisHorizontal &&\n\t\t\t\tdefaultView.getSelection().isCollapsed &&\n\t\t\t\tisHorizontalEdge( target, isReverseDir ) &&\n\t\t\t\t! keepCaretInsideBlock\n\t\t\t) {\n\t\t\t\tconst closestTabbable = getClosestTabbable(\n\t\t\t\t\ttarget,\n\t\t\t\t\tisReverseDir,\n\t\t\t\t\tnode\n\t\t\t\t);\n\t\t\t\tplaceCaretAtHorizontalEdge( closestTabbable, isReverse );\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","/**\n * WordPress dependencies\n */\nimport { isEntirelySelected } from '@wordpress/dom';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useSelectAll() {\n\tconst { getBlockOrder, getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { multiSelect, selectBlock } = useDispatch( blockEditorStore );\n\tconst isMatch = useShortcutEventMatch();\n\n\treturn useRefEffect( ( node ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( ! isMatch( 'core/block-editor/select-all', event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedClientIds = getSelectedBlockClientIds();\n\n\t\t\tif (\n\t\t\t\tselectedClientIds.length < 2 &&\n\t\t\t\t! isEntirelySelected( event.target )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\n\t\t\tconst [ firstSelectedClientId ] = selectedClientIds;\n\t\t\tconst rootClientId = getBlockRootClientId( firstSelectedClientId );\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\t// If we have selected all sibling nested blocks, try selecting up a\n\t\t\t// level. See: https://github.com/WordPress/gutenberg/pull/31859/\n\t\t\tif ( selectedClientIds.length === blockClientIds.length ) {\n\t\t\t\tif ( rootClientId ) {\n\t\t\t\t\tnode.ownerDocument.defaultView\n\t\t\t\t\t\t.getSelection()\n\t\t\t\t\t\t.removeAllRanges();\n\t\t\t\t\tselectBlock( rootClientId );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tmultiSelect(\n\t\t\t\tblockClientIds[ 0 ],\n\t\t\t\tblockClientIds[ blockClientIds.length - 1 ]\n\t\t\t);\n\t\t}\n\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Sets the `contenteditable` wrapper element to `value`.\n *\n * @param {HTMLElement} node  Block element.\n * @param {boolean}     value `contentEditable` value (true or false)\n */\nfunction setContentEditableWrapper( node, value ) {\n\tnode.contentEditable = value;\n\t// Firefox doesn't automatically move focus.\n\tif ( value ) node.focus();\n}\n\n/**\n * Sets a multi-selection based on the native selection across blocks.\n */\nexport default function useDragSelection() {\n\tconst { startMultiSelect, stopMultiSelect } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { isSelectionEnabled, hasMultiSelection, isDraggingBlocks } =\n\t\tuseSelect( blockEditorStore );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tlet anchorElement;\n\t\t\tlet rafId;\n\n\t\t\tfunction onMouseUp() {\n\t\t\t\tstopMultiSelect();\n\t\t\t\t// Equivalent to attaching the listener once.\n\t\t\t\tdefaultView.removeEventListener( 'mouseup', onMouseUp );\n\t\t\t\t// The browser selection won't have updated yet at this point,\n\t\t\t\t// so wait until the next animation frame to get the browser\n\t\t\t\t// selection.\n\t\t\t\trafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tif ( hasMultiSelection() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the selection is complete (on mouse up), and no\n\t\t\t\t\t// multiple blocks have been selected, set focus back to the\n\t\t\t\t\t// anchor element. if the anchor element contains the\n\t\t\t\t\t// selection. Additionally, the contentEditable wrapper can\n\t\t\t\t\t// now be disabled again.\n\t\t\t\t\tsetContentEditableWrapper( node, false );\n\n\t\t\t\t\tconst selection = defaultView.getSelection();\n\n\t\t\t\t\tif ( selection.rangeCount ) {\n\t\t\t\t\t\tconst { commonAncestorContainer } =\n\t\t\t\t\t\t\tselection.getRangeAt( 0 );\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tanchorElement.contains( commonAncestorContainer )\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tanchorElement.focus();\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\tfunction onMouseLeave( { buttons, target } ) {\n\t\t\t\t// Avoid triggering a multi-selection if the user is already\n\t\t\t\t// dragging blocks.\n\t\t\t\tif ( isDraggingBlocks() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The primary button must be pressed to initiate selection.\n\t\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons\n\t\t\t\tif ( buttons !== 1 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check the attribute, not the contentEditable attribute. All\n\t\t\t\t// child elements of the content editable wrapper are editable\n\t\t\t\t// and return true for this property. We only want to start\n\t\t\t\t// multi selecting when the mouse leaves the wrapper.\n\t\t\t\tif ( ! target.getAttribute( 'contenteditable' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! isSelectionEnabled() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tanchorElement = ownerDocument.activeElement;\n\t\t\t\tstartMultiSelect();\n\n\t\t\t\t// `onSelectionStart` is called after `mousedown` and\n\t\t\t\t// `mouseleave` (from a block). The selection ends when\n\t\t\t\t// `mouseup` happens anywhere in the window.\n\t\t\t\tdefaultView.addEventListener( 'mouseup', onMouseUp );\n\n\t\t\t\t// Allow cross contentEditable selection by temporarily making\n\t\t\t\t// all content editable. We can't rely on using the store and\n\t\t\t\t// React because re-rending happens too slowly. We need to be\n\t\t\t\t// able to select across instances immediately.\n\t\t\t\tsetContentEditableWrapper( node, true );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mouseout', onMouseLeave );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mouseout', onMouseLeave );\n\t\t\t\tdefaultView.removeEventListener( 'mouseup', onMouseUp );\n\t\t\t\tdefaultView.cancelAnimationFrame( rafId );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tstartMultiSelect,\n\t\t\tstopMultiSelect,\n\t\t\tisSelectionEnabled,\n\t\t\thasMultiSelection,\n\t\t]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { getBlockClientId } from '../../utils/dom';\n\n/**\n * Extract the selection start node from the selection. When the anchor node is\n * not a text node, the selection offset is the index of a child node.\n *\n * @param {Selection} selection The selection.\n *\n * @return {Element} The selection start node.\n */\nfunction extractSelectionStartNode( selection ) {\n\tconst { anchorNode, anchorOffset } = selection;\n\n\tif ( anchorNode.nodeType === anchorNode.TEXT_NODE ) {\n\t\treturn anchorNode;\n\t}\n\n\tif ( anchorOffset === 0 ) {\n\t\treturn anchorNode;\n\t}\n\n\treturn anchorNode.childNodes[ anchorOffset - 1 ];\n}\n\n/**\n * Extract the selection end node from the selection. When the focus node is not\n * a text node, the selection offset is the index of a child node. The selection\n * reaches up to but excluding that child node.\n *\n * @param {Selection} selection The selection.\n *\n * @return {Element} The selection start node.\n */\nfunction extractSelectionEndNode( selection ) {\n\tconst { focusNode, focusOffset } = selection;\n\n\tif ( focusNode.nodeType === focusNode.TEXT_NODE ) {\n\t\treturn focusNode;\n\t}\n\n\tif ( focusOffset === focusNode.childNodes.length ) {\n\t\treturn focusNode;\n\t}\n\n\treturn focusNode.childNodes[ focusOffset ];\n}\n\nfunction findDepth( a, b ) {\n\tlet depth = 0;\n\n\twhile ( a[ depth ] === b[ depth ] ) {\n\t\tdepth++;\n\t}\n\n\treturn depth;\n}\n\n/**\n * Sets the `contenteditable` wrapper element to `value`.\n *\n * @param {HTMLElement} node  Block element.\n * @param {boolean}     value `contentEditable` value (true or false)\n */\nfunction setContentEditableWrapper( node, value ) {\n\tnode.contentEditable = value;\n\t// Firefox doesn't automatically move focus.\n\tif ( value ) node.focus();\n}\n\n/**\n * Sets a multi-selection based on the native selection across blocks.\n */\nexport default function useSelectionObserver() {\n\tconst { multiSelect, selectBlock, selectionChange } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { getBlockParents, getBlockSelectionStart } =\n\t\tuseSelect( blockEditorStore );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tfunction onSelectionChange( event ) {\n\t\t\t\tconst selection = defaultView.getSelection();\n\n\t\t\t\tif ( ! selection.rangeCount ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If selection is collapsed and we haven't used `shift+click`,\n\t\t\t\t// end multi selection and disable the contentEditable wrapper.\n\t\t\t\t// We have to check about `shift+click` case because elements\n\t\t\t\t// that don't support text selection might be involved, and we might\n\t\t\t\t// update the clientIds to multi-select blocks.\n\t\t\t\t// For now we check if the event is a `mouse` event.\n\t\t\t\tconst isClickShift = event.shiftKey && event.type === 'mouseup';\n\t\t\t\tif ( selection.isCollapsed && ! isClickShift ) {\n\t\t\t\t\tsetContentEditableWrapper( node, false );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet startClientId = getBlockClientId(\n\t\t\t\t\textractSelectionStartNode( selection )\n\t\t\t\t);\n\t\t\t\tlet endClientId = getBlockClientId(\n\t\t\t\t\textractSelectionEndNode( selection )\n\t\t\t\t);\n\t\t\t\t// If the selection has changed and we had pressed `shift+click`,\n\t\t\t\t// we need to check if in an element that doesn't support\n\t\t\t\t// text selection has been clicked.\n\t\t\t\tif ( isClickShift ) {\n\t\t\t\t\tconst selectedClientId = getBlockSelectionStart();\n\t\t\t\t\tconst clickedClientId = getBlockClientId( event.target );\n\t\t\t\t\t// `endClientId` is not defined if we end the selection by clicking a non-selectable block.\n\t\t\t\t\t// We need to check if there was already a selection with a non-selectable focusNode.\n\t\t\t\t\tconst focusNodeIsNonSelectable =\n\t\t\t\t\t\tclickedClientId !== endClientId;\n\t\t\t\t\tif (\n\t\t\t\t\t\t( startClientId === endClientId &&\n\t\t\t\t\t\t\tselection.isCollapsed ) ||\n\t\t\t\t\t\t! endClientId ||\n\t\t\t\t\t\tfocusNodeIsNonSelectable\n\t\t\t\t\t) {\n\t\t\t\t\t\tendClientId = clickedClientId;\n\t\t\t\t\t}\n\t\t\t\t\t// Handle the case when we have a non-selectable block\n\t\t\t\t\t// selected and click another one.\n\t\t\t\t\tif ( startClientId !== selectedClientId ) {\n\t\t\t\t\t\tstartClientId = selectedClientId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// If the selection did not involve a block, return.\n\t\t\t\tif (\n\t\t\t\t\tstartClientId === undefined &&\n\t\t\t\t\tendClientId === undefined\n\t\t\t\t) {\n\t\t\t\t\tsetContentEditableWrapper( node, false );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst isSingularSelection = startClientId === endClientId;\n\t\t\t\tif ( isSingularSelection ) {\n\t\t\t\t\tselectBlock( startClientId );\n\t\t\t\t} else {\n\t\t\t\t\tconst startPath = [\n\t\t\t\t\t\t...getBlockParents( startClientId ),\n\t\t\t\t\t\tstartClientId,\n\t\t\t\t\t];\n\t\t\t\t\tconst endPath = [\n\t\t\t\t\t\t...getBlockParents( endClientId ),\n\t\t\t\t\t\tendClientId,\n\t\t\t\t\t];\n\t\t\t\t\tconst depth = findDepth( startPath, endPath );\n\n\t\t\t\t\tmultiSelect( startPath[ depth ], endPath[ depth ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfunction addListeners() {\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tonSelectionChange\n\t\t\t\t);\n\t\t\t\tdefaultView.addEventListener( 'mouseup', onSelectionChange );\n\t\t\t}\n\n\t\t\tfunction removeListeners() {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tonSelectionChange\n\t\t\t\t);\n\t\t\t\tdefaultView.removeEventListener( 'mouseup', onSelectionChange );\n\t\t\t}\n\n\t\t\tfunction resetListeners() {\n\t\t\t\tremoveListeners();\n\t\t\t\taddListeners();\n\t\t\t}\n\n\t\t\taddListeners();\n\t\t\t// We must allow rich text to set selection first. This ensures that\n\t\t\t// our `selectionchange` listener is always reset to be called after\n\t\t\t// the rich text one.\n\t\t\tnode.addEventListener( 'focusin', resetListeners );\n\t\t\treturn () => {\n\t\t\t\tremoveListeners();\n\t\t\t\tnode.removeEventListener( 'focusin', resetListeners );\n\t\t\t};\n\t\t},\n\t\t[ multiSelect, selectBlock, selectionChange, getBlockParents ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { getBlockClientId } from '../../utils/dom';\n\nexport default function useClickSelection() {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst { isSelectionEnabled, getBlockSelectionStart, hasMultiSelection } =\n\t\tuseSelect( blockEditorStore );\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tfunction onMouseDown( event ) {\n\t\t\t\t// The main button.\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n\t\t\t\tif ( ! isSelectionEnabled() || event.button !== 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst startClientId = getBlockSelectionStart();\n\t\t\t\tconst clickedClientId = getBlockClientId( event.target );\n\n\t\t\t\tif ( event.shiftKey ) {\n\t\t\t\t\tif ( startClientId !== clickedClientId ) {\n\t\t\t\t\t\tnode.contentEditable = true;\n\t\t\t\t\t\t// Firefox doesn't automatically move focus.\n\t\t\t\t\t\tnode.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if ( hasMultiSelection() ) {\n\t\t\t\t\t// Allow user to escape out of a multi-selection to a\n\t\t\t\t\t// singular selection of a block via click. This is handled\n\t\t\t\t\t// here since focus handling excludes blocks when there is\n\t\t\t\t\t// multiselection, as focus can be incurred by starting a\n\t\t\t\t\t// multiselection (focus moved to first block's multi-\n\t\t\t\t\t// controls).\n\t\t\t\t\tselectBlock( clickedClientId );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousedown', onMouseDown );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousedown', onMouseDown );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\tselectBlock,\n\t\t\tisSelectionEnabled,\n\t\t\tgetBlockSelectionStart,\n\t\t\thasMultiSelection,\n\t\t]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { ENTER, BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { createBlock, getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Handles input for selections across blocks.\n */\nexport default function useInput() {\n\tconst {\n\t\t__unstableIsFullySelected,\n\t\tgetSelectedBlockClientIds,\n\t\t__unstableIsSelectionMergeable,\n\t\thasMultiSelection,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\treplaceBlocks,\n\t\t__unstableSplitSelection,\n\t\tremoveBlocks,\n\t\t__unstableDeleteSelection,\n\t\t__unstableExpandSelection,\n\t} = useDispatch( blockEditorStore );\n\n\treturn useRefEffect( ( node ) => {\n\t\tfunction onBeforeInput( event ) {\n\t\t\tif ( ! hasMultiSelection() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// Prevent the browser to format something when we have multiselection.\n\t\t\tif ( event.inputType?.startsWith( 'format' ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! hasMultiSelection() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( event.keyCode === ENTER ) {\n\t\t\t\tnode.contentEditable = false;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( __unstableIsFullySelected() ) {\n\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\tgetSelectedBlockClientIds(),\n\t\t\t\t\t\tcreateBlock( getDefaultBlockName() )\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t__unstableSplitSelection();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\tevent.keyCode === BACKSPACE ||\n\t\t\t\tevent.keyCode === DELETE\n\t\t\t) {\n\t\t\t\tnode.contentEditable = false;\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( __unstableIsFullySelected() ) {\n\t\t\t\t\tremoveBlocks( getSelectedBlockClientIds() );\n\t\t\t\t} else if ( __unstableIsSelectionMergeable() ) {\n\t\t\t\t\t__unstableDeleteSelection( event.keyCode === DELETE );\n\t\t\t\t} else {\n\t\t\t\t\t__unstableExpandSelection();\n\t\t\t\t}\n\t\t\t} else if (\n\t\t\t\t// If key.length is longer than 1, it's a control key that doesn't\n\t\t\t\t// input anything.\n\t\t\t\tevent.key.length === 1 &&\n\t\t\t\t! ( event.metaKey || event.ctrlKey )\n\t\t\t) {\n\t\t\t\tnode.contentEditable = false;\n\t\t\t\tif ( __unstableIsSelectionMergeable() ) {\n\t\t\t\t\t__unstableDeleteSelection( event.keyCode === DELETE );\n\t\t\t\t} else {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t// Safari does not stop default behaviour with either\n\t\t\t\t\t// event.preventDefault() or node.contentEditable = false, so\n\t\t\t\t\t// remove the selection to stop browser manipulation.\n\t\t\t\t\tnode.ownerDocument.defaultView\n\t\t\t\t\t\t.getSelection()\n\t\t\t\t\t\t.removeAllRanges();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction onCompositionStart( event ) {\n\t\t\tif ( ! hasMultiSelection() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tnode.contentEditable = false;\n\n\t\t\tif ( __unstableIsSelectionMergeable() ) {\n\t\t\t\t__unstableDeleteSelection();\n\t\t\t} else {\n\t\t\t\tevent.preventDefault();\n\t\t\t\t// Safari does not stop default behaviour with either\n\t\t\t\t// event.preventDefault() or node.contentEditable = false, so\n\t\t\t\t// remove the selection to stop browser manipulation.\n\t\t\t\tnode.ownerDocument.defaultView.getSelection().removeAllRanges();\n\t\t\t}\n\t\t}\n\n\t\tnode.addEventListener( 'beforeinput', onBeforeInput );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\tnode.addEventListener( 'compositionstart', onCompositionStart );\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'beforeinput', onBeforeInput );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\tnode.removeEventListener( 'compositionstart', onCompositionStart );\n\t\t};\n\t}, [] );\n}\n","/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { useMergeRefs, useRefEffect } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useMultiSelection from './use-multi-selection';\nimport useTabNav from './use-tab-nav';\nimport useArrowNav from './use-arrow-nav';\nimport useSelectAll from './use-select-all';\nimport useDragSelection from './use-drag-selection';\nimport useSelectionObserver from './use-selection-observer';\nimport useClickSelection from './use-click-selection';\nimport useInput from './use-input';\nimport { store as blockEditorStore } from '../../store';\n\nexport function useWritingFlow() {\n\tconst [ before, ref, after ] = useTabNav();\n\tconst hasMultiSelection = useSelect(\n\t\t( select ) => select( blockEditorStore ).hasMultiSelection(),\n\t\t[]\n\t);\n\n\treturn [\n\t\tbefore,\n\t\tuseMergeRefs( [\n\t\t\tref,\n\t\t\tuseInput(),\n\t\t\tuseDragSelection(),\n\t\t\tuseSelectionObserver(),\n\t\t\tuseClickSelection(),\n\t\t\tuseMultiSelection(),\n\t\t\tuseSelectAll(),\n\t\t\tuseArrowNav(),\n\t\t\tuseRefEffect(\n\t\t\t\t( node ) => {\n\t\t\t\t\tnode.tabIndex = -1;\n\t\t\t\t\tnode.contentEditable = hasMultiSelection;\n\n\t\t\t\t\tif ( ! hasMultiSelection ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tnode.classList.add( 'has-multi-selection' );\n\t\t\t\t\tnode.setAttribute(\n\t\t\t\t\t\t'aria-label',\n\t\t\t\t\t\t__( 'Multiple selected blocks' )\n\t\t\t\t\t);\n\n\t\t\t\t\treturn () => {\n\t\t\t\t\t\tnode.classList.remove( 'has-multi-selection' );\n\t\t\t\t\t\tnode.removeAttribute( 'aria-label' );\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t[ hasMultiSelection ]\n\t\t\t),\n\t\t] ),\n\t\tafter,\n\t];\n}\n\nfunction WritingFlow( { children, ...props }, forwardedRef ) {\n\tconst [ before, ref, after ] = useWritingFlow();\n\treturn (\n\t\t<>\n\t\t\t{ before }\n\t\t\t<div\n\t\t\t\t{ ...props }\n\t\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\t\tclassName={ classNames(\n\t\t\t\t\tprops.className,\n\t\t\t\t\t'block-editor-writing-flow'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t\t{ after }\n\t\t</>\n\t);\n}\n\n/**\n * Handles selection and navigation across blocks. This component should be\n * wrapped around BlockList.\n *\n * @param {Object}    props          Component properties.\n * @param {WPElement} props.children Children to be rendered.\n */\nexport default forwardRef( WritingFlow );\n","/**\n * WordPress dependencies\n */\nimport { focus, isFormElement } from '@wordpress/dom';\nimport { TAB, ESCAPE } from '@wordpress/keycodes';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useTabNav() {\n\tconst container = useRef();\n\tconst focusCaptureBeforeRef = useRef();\n\tconst focusCaptureAfterRef = useRef();\n\tconst lastFocus = useRef();\n\tconst { hasMultiSelection, getSelectedBlockClientId, getBlockCount } =\n\t\tuseSelect( blockEditorStore );\n\tconst { setNavigationMode } = useDispatch( blockEditorStore );\n\tconst isNavigationMode = useSelect(\n\t\t( select ) => select( blockEditorStore ).isNavigationMode(),\n\t\t[]\n\t);\n\n\t// Don't allow tabbing to this element in Navigation mode.\n\tconst focusCaptureTabIndex = ! isNavigationMode ? '0' : undefined;\n\n\t// Reference that holds the a flag for enabling or disabling\n\t// capturing on the focus capture elements.\n\tconst noCapture = useRef();\n\n\tfunction onFocusCapture( event ) {\n\t\t// Do not capture incoming focus if set by us in WritingFlow.\n\t\tif ( noCapture.current ) {\n\t\t\tnoCapture.current = null;\n\t\t} else if ( hasMultiSelection() ) {\n\t\t\tcontainer.current.focus();\n\t\t} else if ( getSelectedBlockClientId() ) {\n\t\t\tlastFocus.current.focus();\n\t\t} else {\n\t\t\tsetNavigationMode( true );\n\n\t\t\tconst isBefore =\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tevent.target.compareDocumentPosition( container.current ) &\n\t\t\t\tevent.target.DOCUMENT_POSITION_FOLLOWING;\n\t\t\tconst action = isBefore ? 'findNext' : 'findPrevious';\n\n\t\t\tfocus.tabbable[ action ]( event.target ).focus();\n\t\t}\n\t}\n\n\tconst before = (\n\t\t<div\n\t\t\tref={ focusCaptureBeforeRef }\n\t\t\ttabIndex={ focusCaptureTabIndex }\n\t\t\tonFocus={ onFocusCapture }\n\t\t/>\n\t);\n\n\tconst after = (\n\t\t<div\n\t\t\tref={ focusCaptureAfterRef }\n\t\t\ttabIndex={ focusCaptureTabIndex }\n\t\t\tonFocus={ onFocusCapture }\n\t\t/>\n\t);\n\n\tconst ref = useRefEffect( ( node ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( event.keyCode === ESCAPE ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetNavigationMode( true );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// In Edit mode, Tab should focus the first tabbable element after\n\t\t\t// the content, which is normally the sidebar (with block controls)\n\t\t\t// and Shift+Tab should focus the first tabbable element before the\n\t\t\t// content, which is normally the block toolbar.\n\t\t\t// Arrow keys can be used, and Tab and arrow keys can be used in\n\t\t\t// Navigation mode (press Esc), to navigate through blocks.\n\t\t\tif ( event.keyCode !== TAB ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isShift = event.shiftKey;\n\t\t\tconst direction = isShift ? 'findPrevious' : 'findNext';\n\n\t\t\tif ( ! hasMultiSelection() && ! getSelectedBlockClientId() ) {\n\t\t\t\t// Preserve the behaviour of entering navigation mode when\n\t\t\t\t// tabbing into the content without a block selection.\n\t\t\t\t// `onFocusCapture` already did this previously, but we need to\n\t\t\t\t// do it again here because after clearing block selection,\n\t\t\t\t// focus land on the writing flow container and pressing Tab\n\t\t\t\t// will no longer send focus through the focus capture element.\n\t\t\t\tif ( event.target === node ) setNavigationMode( true );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Allow tabbing from the block wrapper to a form element,\n\t\t\t// and between form elements rendered in a block,\n\t\t\t// such as inside a placeholder. Form elements are generally\n\t\t\t// meant to be UI rather than part of the content. Ideally\n\t\t\t// these are not rendered in the content and perhaps in the\n\t\t\t// future they can be rendered in an iframe or shadow DOM.\n\t\t\tif (\n\t\t\t\t( isFormElement( event.target ) ||\n\t\t\t\t\tevent.target.getAttribute( 'data-block' ) ===\n\t\t\t\t\t\tgetSelectedBlockClientId() ) &&\n\t\t\t\tisFormElement( focus.tabbable[ direction ]( event.target ) )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst next = isShift ? focusCaptureBeforeRef : focusCaptureAfterRef;\n\n\t\t\t// Disable focus capturing on the focus capture element, so it\n\t\t\t// doesn't refocus this block and so it allows default behaviour\n\t\t\t// (moving focus to the next tabbable element).\n\t\t\tnoCapture.current = true;\n\n\t\t\t// Focusing the focus capture element, which is located above and\n\t\t\t// below the editor, should not scroll the page all the way up or\n\t\t\t// down.\n\t\t\tnext.current.focus( { preventScroll: true } );\n\t\t}\n\n\t\tfunction onFocusOut( event ) {\n\t\t\tlastFocus.current = event.target;\n\n\t\t\tconst { ownerDocument } = node;\n\n\t\t\t// If focus disappears due to there being no blocks, move focus to\n\t\t\t// the writing flow wrapper.\n\t\t\tif (\n\t\t\t\t! event.relatedTarget &&\n\t\t\t\townerDocument.activeElement === ownerDocument.body &&\n\t\t\t\tgetBlockCount() === 0\n\t\t\t) {\n\t\t\t\tnode.focus();\n\t\t\t}\n\t\t}\n\n\t\t// When tabbing back to an element in block list, this event handler prevents scrolling if the\n\t\t// focus capture divs (before/after) are outside of the viewport. (For example shift+tab back to a paragraph\n\t\t// when focus is on a sidebar element. This prevents the scrollable writing area from jumping either to the\n\t\t// top or bottom of the document.\n\t\t//\n\t\t// Note that it isn't possible to disable scrolling in the onFocus event. We need to intercept this\n\t\t// earlier in the keypress handler, and call focus( { preventScroll: true } ) instead.\n\t\t// https://developer.mozilla.org/en-US/docs/Web/API/HTMLOrForeignElement/focus#parameters\n\t\tfunction preventScrollOnTab( event ) {\n\t\t\tif ( event.keyCode !== TAB ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( event.target?.getAttribute( 'role' ) === 'region' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( container.current === event.target ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isShift = event.shiftKey;\n\t\t\tconst direction = isShift ? 'findPrevious' : 'findNext';\n\t\t\tconst target = focus.tabbable[ direction ]( event.target );\n\t\t\t// Only do something when the next tabbable is a focus capture div (before/after)\n\t\t\tif (\n\t\t\t\ttarget === focusCaptureBeforeRef.current ||\n\t\t\t\ttarget === focusCaptureAfterRef.current\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttarget.focus( { preventScroll: true } );\n\t\t\t}\n\t\t}\n\n\t\tconst { ownerDocument } = node;\n\t\tconst { defaultView } = ownerDocument;\n\t\tdefaultView.addEventListener( 'keydown', preventScrollOnTab );\n\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\tnode.addEventListener( 'focusout', onFocusOut );\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'keydown', preventScrollOnTab );\n\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\tnode.removeEventListener( 'focusout', onFocusOut );\n\t\t};\n\t}, [] );\n\n\tconst mergedRefs = useMergeRefs( [ container, ref ] );\n\n\treturn [ before, mergedRefs, after ];\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tcreatePortal,\n\tforwardRef,\n\tuseMemo,\n\tuseReducer,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tuseResizeObserver,\n\tuseMergeRefs,\n\tuseRefEffect,\n} from '@wordpress/compose';\nimport { __experimentalStyleProvider as StyleProvider } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useBlockSelectionClearer } from '../block-selection-clearer';\nimport { useWritingFlow } from '../writing-flow';\n\nconst BODY_CLASS_NAME = 'editor-styles-wrapper';\nconst BLOCK_PREFIX = 'wp-block';\n\n/**\n * Clones stylesheets targetting the editor canvas to the given document. A\n * stylesheet is considered targetting the editor a canvas if it contains the\n * `editor-styles-wrapper`, `wp-block`, or `wp-block-*` class selectors.\n *\n * Ideally, this hook should be removed in the future and styles should be added\n * explicitly as editor styles.\n */\nfunction useStylesCompatibility() {\n\treturn useRefEffect( ( node ) => {\n\t\t// Search the document for stylesheets targetting the editor canvas.\n\t\tArray.from( document.styleSheets ).forEach( ( styleSheet ) => {\n\t\t\ttry {\n\t\t\t\t// May fail for external styles.\n\t\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\t\tstyleSheet.cssRules;\n\t\t\t} catch ( e ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerNode, cssRules } = styleSheet;\n\n\t\t\tif ( ! cssRules ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Generally, ignore inline styles. We add inline styles belonging to a\n\t\t\t// stylesheet later, which may or may not match the selectors.\n\t\t\tif ( ownerNode.tagName !== 'LINK' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Don't try to add the reset styles, which were removed as a dependency\n\t\t\t// from `edit-blocks` for the iframe since we don't need to reset admin\n\t\t\t// styles.\n\t\t\tif ( ownerNode.id === 'wp-reset-editor-styles-css' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction matchFromRules( _cssRules ) {\n\t\t\t\treturn Array.from( _cssRules ).find(\n\t\t\t\t\t( {\n\t\t\t\t\t\tselectorText,\n\t\t\t\t\t\tconditionText,\n\t\t\t\t\t\tcssRules: __cssRules,\n\t\t\t\t\t} ) => {\n\t\t\t\t\t\t// If the rule is conditional then it will not have selector text.\n\t\t\t\t\t\t// Recurse into child CSS ruleset to determine selector eligibility.\n\t\t\t\t\t\tif ( conditionText ) {\n\t\t\t\t\t\t\treturn matchFromRules( __cssRules );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tselectorText &&\n\t\t\t\t\t\t\t( selectorText.includes(\n\t\t\t\t\t\t\t\t`.${ BODY_CLASS_NAME }`\n\t\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t\tselectorText.includes( `.${ BLOCK_PREFIX }` ) )\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\tconst isMatch = matchFromRules( cssRules );\n\n\t\t\tif (\n\t\t\t\tisMatch &&\n\t\t\t\t! node.ownerDocument.getElementById( ownerNode.id )\n\t\t\t) {\n\t\t\t\t// Display warning once we have a way to add style dependencies to the editor.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/37466.\n\t\t\t\tnode.appendChild( ownerNode.cloneNode( true ) );\n\n\t\t\t\t// Add inline styles belonging to the stylesheet.\n\t\t\t\tconst inlineCssId = ownerNode.id.replace(\n\t\t\t\t\t'-css',\n\t\t\t\t\t'-inline-css'\n\t\t\t\t);\n\t\t\t\tconst inlineCssElement = document.getElementById( inlineCssId );\n\n\t\t\t\tif ( inlineCssElement ) {\n\t\t\t\t\tnode.appendChild( inlineCssElement.cloneNode( true ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}, [] );\n}\n\n/**\n * Bubbles some event types (keydown, keypress, and dragover) to parent document\n * document to ensure that the keyboard shortcuts and drag and drop work.\n *\n * Ideally, we should remove event bubbling in the future. Keyboard shortcuts\n * should be context dependent, e.g. actions on blocks like Cmd+A should not\n * work globally outside the block editor.\n *\n * @param {Document} doc Document to attach listeners to.\n */\nfunction bubbleEvents( doc ) {\n\tconst { defaultView } = doc;\n\tconst { frameElement } = defaultView;\n\n\tfunction bubbleEvent( event ) {\n\t\tconst prototype = Object.getPrototypeOf( event );\n\t\tconst constructorName = prototype.constructor.name;\n\t\tconst Constructor = window[ constructorName ];\n\n\t\tconst init = {};\n\n\t\tfor ( const key in event ) {\n\t\t\tinit[ key ] = event[ key ];\n\t\t}\n\n\t\tif ( event instanceof defaultView.MouseEvent ) {\n\t\t\tconst rect = frameElement.getBoundingClientRect();\n\t\t\tinit.clientX += rect.left;\n\t\t\tinit.clientY += rect.top;\n\t\t}\n\n\t\tconst newEvent = new Constructor( event.type, init );\n\t\tconst cancelled = ! frameElement.dispatchEvent( newEvent );\n\n\t\tif ( cancelled ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tconst eventTypes = [ 'dragover' ];\n\n\tfor ( const name of eventTypes ) {\n\t\tdoc.addEventListener( name, bubbleEvent );\n\t}\n}\n\nfunction useParsedAssets( html ) {\n\treturn useMemo( () => {\n\t\tconst doc = document.implementation.createHTMLDocument( '' );\n\t\tdoc.body.innerHTML = html;\n\t\treturn Array.from( doc.body.children );\n\t}, [ html ] );\n}\n\nasync function loadScript( head, { id, src } ) {\n\treturn new Promise( ( resolve, reject ) => {\n\t\tconst script = head.ownerDocument.createElement( 'script' );\n\t\tscript.id = id;\n\t\tif ( src ) {\n\t\t\tscript.src = src;\n\t\t\tscript.onload = () => resolve();\n\t\t\tscript.onerror = () => reject();\n\t\t} else {\n\t\t\tresolve();\n\t\t}\n\t\thead.appendChild( script );\n\t} );\n}\n\nfunction Iframe(\n\t{ contentRef, children, head, tabIndex = 0, assets, isZoomedOut, ...props },\n\tref\n) {\n\tconst [ , forceRender ] = useReducer( () => ( {} ) );\n\tconst [ iframeDocument, setIframeDocument ] = useState();\n\tconst [ bodyClasses, setBodyClasses ] = useState( [] );\n\tconst styles = useParsedAssets( assets?.styles );\n\tconst scripts = useParsedAssets( assets?.scripts );\n\tconst clearerRef = useBlockSelectionClearer();\n\tconst [ before, writingFlowRef, after ] = useWritingFlow();\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst setRef = useRefEffect( ( node ) => {\n\t\tlet iFrameDocument;\n\t\t// Prevent the default browser action for files dropped outside of dropzones.\n\t\tfunction preventFileDropDefault( event ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tfunction setDocumentIfReady() {\n\t\t\tconst { contentDocument, ownerDocument } = node;\n\t\t\tconst { readyState, documentElement } = contentDocument;\n\t\t\tiFrameDocument = contentDocument;\n\n\t\t\tif ( readyState !== 'interactive' && readyState !== 'complete' ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tbubbleEvents( contentDocument );\n\t\t\tsetIframeDocument( contentDocument );\n\t\t\tclearerRef( documentElement );\n\n\t\t\t// Ideally ALL classes that are added through get_body_class should\n\t\t\t// be added in the editor too, which we'll somehow have to get from\n\t\t\t// the server in the future (which will run the PHP filters).\n\t\t\tsetBodyClasses(\n\t\t\t\tArray.from( ownerDocument.body.classList ).filter(\n\t\t\t\t\t( name ) =>\n\t\t\t\t\t\tname.startsWith( 'admin-color-' ) ||\n\t\t\t\t\t\tname.startsWith( 'post-type-' ) ||\n\t\t\t\t\t\tname === 'wp-embed-responsive'\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tcontentDocument.dir = ownerDocument.dir;\n\t\t\tdocumentElement.removeChild( contentDocument.head );\n\t\t\tdocumentElement.removeChild( contentDocument.body );\n\n\t\t\tiFrameDocument.addEventListener(\n\t\t\t\t'dragover',\n\t\t\t\tpreventFileDropDefault,\n\t\t\t\tfalse\n\t\t\t);\n\t\t\tiFrameDocument.addEventListener(\n\t\t\t\t'drop',\n\t\t\t\tpreventFileDropDefault,\n\t\t\t\tfalse\n\t\t\t);\n\t\t\treturn true;\n\t\t}\n\n\t\t// Document set with srcDoc is not immediately ready.\n\t\tnode.addEventListener( 'load', setDocumentIfReady );\n\n\t\treturn () => {\n\t\t\tnode.removeEventListener( 'load', setDocumentIfReady );\n\t\t\tiFrameDocument?.removeEventListener(\n\t\t\t\t'dragover',\n\t\t\t\tpreventFileDropDefault\n\t\t\t);\n\t\t\tiFrameDocument?.removeEventListener(\n\t\t\t\t'drop',\n\t\t\t\tpreventFileDropDefault\n\t\t\t);\n\t\t};\n\t}, [] );\n\n\tconst headRef = useRefEffect( ( element ) => {\n\t\tscripts\n\t\t\t.reduce(\n\t\t\t\t( promise, script ) =>\n\t\t\t\t\tpromise.then( () => loadScript( element, script ) ),\n\t\t\t\tPromise.resolve()\n\t\t\t)\n\t\t\t.finally( () => {\n\t\t\t\t// When script are loaded, re-render blocks to allow them\n\t\t\t\t// to initialise.\n\t\t\t\tforceRender();\n\t\t\t} );\n\t}, [] );\n\tconst bodyRef = useMergeRefs( [ contentRef, clearerRef, writingFlowRef ] );\n\tconst styleCompatibilityRef = useStylesCompatibility();\n\n\thead = (\n\t\t<>\n\t\t\t<style>{ 'body{margin:0}' }</style>\n\t\t\t{ styles.map(\n\t\t\t\t( { tagName, href, id, rel, media, textContent } ) => {\n\t\t\t\t\tconst TagName = tagName.toLowerCase();\n\n\t\t\t\t\tif ( TagName === 'style' ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<TagName { ...{ id } } key={ id }>\n\t\t\t\t\t\t\t\t{ textContent }\n\t\t\t\t\t\t\t</TagName>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<TagName { ...{ href, id, rel, media } } key={ id } />\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t) }\n\t\t\t{ head }\n\t\t</>\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ tabIndex >= 0 && before }\n\t\t\t<iframe\n\t\t\t\t{ ...props }\n\t\t\t\tref={ useMergeRefs( [ ref, setRef ] ) }\n\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t// Correct doctype is required to enable rendering in standards mode\n\t\t\t\tsrcDoc=\"<!doctype html>\"\n\t\t\t\ttitle={ __( 'Editor canvas' ) }\n\t\t\t>\n\t\t\t\t{ iframeDocument &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<head ref={ headRef }>\n\t\t\t\t\t\t\t\t{ head }\n\t\t\t\t\t\t\t\t<style>\n\t\t\t\t\t\t\t\t\t{ `html { transition: background 5s; ${\n\t\t\t\t\t\t\t\t\t\tisZoomedOut\n\t\t\t\t\t\t\t\t\t\t\t? 'background: #2f2f2f; transition: background 0s;'\n\t\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</style>\n\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t<body\n\t\t\t\t\t\t\t\tref={ bodyRef }\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'block-editor-iframe__body',\n\t\t\t\t\t\t\t\t\tBODY_CLASS_NAME,\n\t\t\t\t\t\t\t\t\t...bodyClasses,\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-zoomed-out': isZoomedOut,\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\tstyle={\n\t\t\t\t\t\t\t\t\tisZoomedOut\n\t\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\t\t// This is the remaining percentage from the scaling down\n\t\t\t\t\t\t\t\t\t\t\t\t// of the iframe body(`scale(0.45)`). We also need to subtract\n\t\t\t\t\t\t\t\t\t\t\t\t// the body's bottom margin.\n\t\t\t\t\t\t\t\t\t\t\t\tmarginBottom: `-${\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontentHeight * 0.55 - 100\n\t\t\t\t\t\t\t\t\t\t\t\t}px`,\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}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ contentResizeListener }\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t * This is a wrapper for the extra styles and scripts\n\t\t\t\t\t\t\t\t * rendered imperatively by cloning the parent,\n\t\t\t\t\t\t\t\t * it's important that this div's content remains uncontrolled.\n\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\t\tstyle={ { display: 'none' } }\n\t\t\t\t\t\t\t\t\tref={ styleCompatibilityRef }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<StyleProvider document={ iframeDocument }>\n\t\t\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t\t\t</StyleProvider>\n\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t</>,\n\t\t\t\t\t\tiframeDocument.documentElement\n\t\t\t\t\t) }\n\t\t\t</iframe>\n\t\t\t{ tabIndex >= 0 && after }\n\t\t</>\n\t);\n}\n\nexport default forwardRef( Iframe );\n","var r={grad:.9,turn:360,rad:360/(2*Math.PI)},t=function(r){return\"string\"==typeof r?r.length>0:\"number\"==typeof r},n=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*r)/n+0},e=function(r,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),r>n?n:r>t?r:t},u=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},a=function(r){return{r:e(r.r,0,255),g:e(r.g,0,255),b:e(r.b,0,255),a:e(r.a)}},o=function(r){return{r:n(r.r),g:n(r.g),b:n(r.b),a:n(r.a,3)}},i=/^#([0-9a-f]{3,8})$/i,s=function(r){var t=r.toString(16);return t.length<2?\"0\"+t:t},h=function(r){var t=r.r,n=r.g,e=r.b,u=r.a,a=Math.max(t,n,e),o=a-Math.min(t,n,e),i=o?a===t?(n-e)/o:a===n?2+(e-t)/o:4+(t-n)/o:0;return{h:60*(i<0?i+6:i),s:a?o/a*100:0,v:a/255*100,a:u}},b=function(r){var t=r.h,n=r.s,e=r.v,u=r.a;t=t/360*6,n/=100,e/=100;var a=Math.floor(t),o=e*(1-n),i=e*(1-(t-a)*n),s=e*(1-(1-t+a)*n),h=a%6;return{r:255*[e,i,o,o,s,e][h],g:255*[s,e,e,i,o,o][h],b:255*[o,o,s,e,e,i][h],a:u}},g=function(r){return{h:u(r.h),s:e(r.s,0,100),l:e(r.l,0,100),a:e(r.a)}},d=function(r){return{h:n(r.h),s:n(r.s),l:n(r.l),a:n(r.a,3)}},f=function(r){return b((n=(t=r).s,{h:t.h,s:(n*=((e=t.l)<50?e:100-e)/100)>0?2*n/(e+n)*100:0,v:e+n,a:t.a}));var t,n,e},c=function(r){return{h:(t=h(r)).h,s:(u=(200-(n=t.s))*(e=t.v)/100)>0&&u<200?n*e/100/(u<=100?u:200-u)*100:0,l:u/2,a:t.a};var t,n,e,u},l=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*,\\s*([+-]?\\d*\\.?\\d+)%\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,p=/^hsla?\\(\\s*([+-]?\\d*\\.?\\d+)(deg|rad|grad|turn)?\\s+([+-]?\\d*\\.?\\d+)%\\s+([+-]?\\d*\\.?\\d+)%\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,v=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*(?:,\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,m=/^rgba?\\(\\s*([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s+([+-]?\\d*\\.?\\d+)(%)?\\s*(?:\\/\\s*([+-]?\\d*\\.?\\d+)(%)?\\s*)?\\)$/i,y={string:[[function(r){var t=i.exec(r);return t?(r=t[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:4===r.length?n(parseInt(r[3]+r[3],16)/255,2):1}:6===r.length||8===r.length?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:8===r.length?n(parseInt(r.substr(6,2),16)/255,2):1}:null:null},\"hex\"],[function(r){var t=v.exec(r)||m.exec(r);return t?t[2]!==t[4]||t[4]!==t[6]?null:a({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},\"rgb\"],[function(t){var n=l.exec(t)||p.exec(t);if(!n)return null;var e,u,a=g({h:(e=n[1],u=n[2],void 0===u&&(u=\"deg\"),Number(e)*(r[u]||1)),s:Number(n[3]),l:Number(n[4]),a:void 0===n[5]?1:Number(n[5])/(n[6]?100:1)});return f(a)},\"hsl\"]],object:[[function(r){var n=r.r,e=r.g,u=r.b,o=r.a,i=void 0===o?1:o;return t(n)&&t(e)&&t(u)?a({r:Number(n),g:Number(e),b:Number(u),a:Number(i)}):null},\"rgb\"],[function(r){var n=r.h,e=r.s,u=r.l,a=r.a,o=void 0===a?1:a;if(!t(n)||!t(e)||!t(u))return null;var i=g({h:Number(n),s:Number(e),l:Number(u),a:Number(o)});return f(i)},\"hsl\"],[function(r){var n=r.h,a=r.s,o=r.v,i=r.a,s=void 0===i?1:i;if(!t(n)||!t(a)||!t(o))return null;var h=function(r){return{h:u(r.h),s:e(r.s,0,100),v:e(r.v,0,100),a:e(r.a)}}({h:Number(n),s:Number(a),v:Number(o),a:Number(s)});return b(h)},\"hsv\"]]},N=function(r,t){for(var n=0;n<t.length;n++){var e=t[n][0](r);if(e)return[e,t[n][1]]}return[null,void 0]},x=function(r){return\"string\"==typeof r?N(r.trim(),y.string):\"object\"==typeof r&&null!==r?N(r,y.object):[null,void 0]},I=function(r){return x(r)[1]},M=function(r,t){var n=c(r);return{h:n.h,s:e(n.s+100*t,0,100),l:n.l,a:n.a}},H=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},$=function(r,t){var n=c(r);return{h:n.h,s:n.s,l:e(n.l+100*t,0,100),a:n.a}},j=function(){function r(r){this.parsed=x(r)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return null!==this.parsed},r.prototype.brightness=function(){return n(H(this.rgba),2)},r.prototype.isDark=function(){return H(this.rgba)<.5},r.prototype.isLight=function(){return H(this.rgba)>=.5},r.prototype.toHex=function(){return r=o(this.rgba),t=r.r,e=r.g,u=r.b,i=(a=r.a)<1?s(n(255*a)):\"\",\"#\"+s(t)+s(e)+s(u)+i;var r,t,e,u,a,i},r.prototype.toRgb=function(){return o(this.rgba)},r.prototype.toRgbString=function(){return r=o(this.rgba),t=r.r,n=r.g,e=r.b,(u=r.a)<1?\"rgba(\"+t+\", \"+n+\", \"+e+\", \"+u+\")\":\"rgb(\"+t+\", \"+n+\", \"+e+\")\";var r,t,n,e,u},r.prototype.toHsl=function(){return d(c(this.rgba))},r.prototype.toHslString=function(){return r=d(c(this.rgba)),t=r.h,n=r.s,e=r.l,(u=r.a)<1?\"hsla(\"+t+\", \"+n+\"%, \"+e+\"%, \"+u+\")\":\"hsl(\"+t+\", \"+n+\"%, \"+e+\"%)\";var r,t,n,e,u},r.prototype.toHsv=function(){return r=h(this.rgba),{h:n(r.h),s:n(r.s),v:n(r.v),a:n(r.a,3)};var r},r.prototype.invert=function(){return w({r:255-(r=this.rgba).r,g:255-r.g,b:255-r.b,a:r.a});var r},r.prototype.saturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,r))},r.prototype.desaturate=function(r){return void 0===r&&(r=.1),w(M(this.rgba,-r))},r.prototype.grayscale=function(){return w(M(this.rgba,-1))},r.prototype.lighten=function(r){return void 0===r&&(r=.1),w($(this.rgba,r))},r.prototype.darken=function(r){return void 0===r&&(r=.1),w($(this.rgba,-r))},r.prototype.rotate=function(r){return void 0===r&&(r=15),this.hue(this.hue()+r)},r.prototype.alpha=function(r){return\"number\"==typeof r?w({r:(t=this.rgba).r,g:t.g,b:t.b,a:r}):n(this.rgba.a,3);var t},r.prototype.hue=function(r){var t=c(this.rgba);return\"number\"==typeof r?w({h:r,s:t.s,l:t.l,a:t.a}):n(t.h)},r.prototype.isEqual=function(r){return this.toHex()===w(r).toHex()},r}(),w=function(r){return r instanceof j?r:new j(r)},S=[],k=function(r){r.forEach(function(r){S.indexOf(r)<0&&(r(j,y),S.push(r))})},E=function(){return new j({r:255*Math.random(),g:255*Math.random(),b:255*Math.random()})};export{j as Colord,w as colord,k as extend,I as getFormat,E as random};\n","export default function(e,f){var a={white:\"#ffffff\",bisque:\"#ffe4c4\",blue:\"#0000ff\",cadetblue:\"#5f9ea0\",chartreuse:\"#7fff00\",chocolate:\"#d2691e\",coral:\"#ff7f50\",antiquewhite:\"#faebd7\",aqua:\"#00ffff\",azure:\"#f0ffff\",whitesmoke:\"#f5f5f5\",papayawhip:\"#ffefd5\",plum:\"#dda0dd\",blanchedalmond:\"#ffebcd\",black:\"#000000\",gold:\"#ffd700\",goldenrod:\"#daa520\",gainsboro:\"#dcdcdc\",cornsilk:\"#fff8dc\",cornflowerblue:\"#6495ed\",burlywood:\"#deb887\",aquamarine:\"#7fffd4\",beige:\"#f5f5dc\",crimson:\"#dc143c\",cyan:\"#00ffff\",darkblue:\"#00008b\",darkcyan:\"#008b8b\",darkgoldenrod:\"#b8860b\",darkkhaki:\"#bdb76b\",darkgray:\"#a9a9a9\",darkgreen:\"#006400\",darkgrey:\"#a9a9a9\",peachpuff:\"#ffdab9\",darkmagenta:\"#8b008b\",darkred:\"#8b0000\",darkorchid:\"#9932cc\",darkorange:\"#ff8c00\",darkslateblue:\"#483d8b\",gray:\"#808080\",darkslategray:\"#2f4f4f\",darkslategrey:\"#2f4f4f\",deeppink:\"#ff1493\",deepskyblue:\"#00bfff\",wheat:\"#f5deb3\",firebrick:\"#b22222\",floralwhite:\"#fffaf0\",ghostwhite:\"#f8f8ff\",darkviolet:\"#9400d3\",magenta:\"#ff00ff\",green:\"#008000\",dodgerblue:\"#1e90ff\",grey:\"#808080\",honeydew:\"#f0fff0\",hotpink:\"#ff69b4\",blueviolet:\"#8a2be2\",forestgreen:\"#228b22\",lawngreen:\"#7cfc00\",indianred:\"#cd5c5c\",indigo:\"#4b0082\",fuchsia:\"#ff00ff\",brown:\"#a52a2a\",maroon:\"#800000\",mediumblue:\"#0000cd\",lightcoral:\"#f08080\",darkturquoise:\"#00ced1\",lightcyan:\"#e0ffff\",ivory:\"#fffff0\",lightyellow:\"#ffffe0\",lightsalmon:\"#ffa07a\",lightseagreen:\"#20b2aa\",linen:\"#faf0e6\",mediumaquamarine:\"#66cdaa\",lemonchiffon:\"#fffacd\",lime:\"#00ff00\",khaki:\"#f0e68c\",mediumseagreen:\"#3cb371\",limegreen:\"#32cd32\",mediumspringgreen:\"#00fa9a\",lightskyblue:\"#87cefa\",lightblue:\"#add8e6\",midnightblue:\"#191970\",lightpink:\"#ffb6c1\",mistyrose:\"#ffe4e1\",moccasin:\"#ffe4b5\",mintcream:\"#f5fffa\",lightslategray:\"#778899\",lightslategrey:\"#778899\",navajowhite:\"#ffdead\",navy:\"#000080\",mediumvioletred:\"#c71585\",powderblue:\"#b0e0e6\",palegoldenrod:\"#eee8aa\",oldlace:\"#fdf5e6\",paleturquoise:\"#afeeee\",mediumturquoise:\"#48d1cc\",mediumorchid:\"#ba55d3\",rebeccapurple:\"#663399\",lightsteelblue:\"#b0c4de\",mediumslateblue:\"#7b68ee\",thistle:\"#d8bfd8\",tan:\"#d2b48c\",orchid:\"#da70d6\",mediumpurple:\"#9370db\",purple:\"#800080\",pink:\"#ffc0cb\",skyblue:\"#87ceeb\",springgreen:\"#00ff7f\",palegreen:\"#98fb98\",red:\"#ff0000\",yellow:\"#ffff00\",slateblue:\"#6a5acd\",lavenderblush:\"#fff0f5\",peru:\"#cd853f\",palevioletred:\"#db7093\",violet:\"#ee82ee\",teal:\"#008080\",slategray:\"#708090\",slategrey:\"#708090\",aliceblue:\"#f0f8ff\",darkseagreen:\"#8fbc8f\",darkolivegreen:\"#556b2f\",greenyellow:\"#adff2f\",seagreen:\"#2e8b57\",seashell:\"#fff5ee\",tomato:\"#ff6347\",silver:\"#c0c0c0\",sienna:\"#a0522d\",lavender:\"#e6e6fa\",lightgreen:\"#90ee90\",orange:\"#ffa500\",orangered:\"#ff4500\",steelblue:\"#4682b4\",royalblue:\"#4169e1\",turquoise:\"#40e0d0\",yellowgreen:\"#9acd32\",salmon:\"#fa8072\",saddlebrown:\"#8b4513\",sandybrown:\"#f4a460\",rosybrown:\"#bc8f8f\",darksalmon:\"#e9967a\",lightgoldenrodyellow:\"#fafad2\",snow:\"#fffafa\",lightgrey:\"#d3d3d3\",lightgray:\"#d3d3d3\",dimgray:\"#696969\",dimgrey:\"#696969\",olivedrab:\"#6b8e23\",olive:\"#808000\"},r={};for(var d in a)r[a[d]]=d;var l={};e.prototype.toName=function(f){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return\"transparent\";var d,i,n=r[this.toHex()];if(n)return n;if(null==f?void 0:f.closest){var o=this.toRgb(),t=1/0,b=\"black\";if(!l.length)for(var c in a)l[c]=new e(a[c]).toRgb();for(var g in a){var u=(d=o,i=l[g],Math.pow(d.r-i.r,2)+Math.pow(d.g-i.g,2)+Math.pow(d.b-i.b,2));u<t&&(t=u,b=g)}return b}};f.string.push([function(f){var r=f.toLowerCase(),d=\"transparent\"===r?\"#0000\":a[r];return d?new e(d).toRgb():null},\"name\"])}\n","var o=function(o){var t=o/255;return t<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},t=function(t){return.2126*o(t.r)+.7152*o(t.g)+.0722*o(t.b)};export default function(o){o.prototype.luminance=function(){return o=t(this.rgba),void 0===(r=2)&&(r=0),void 0===n&&(n=Math.pow(10,r)),Math.round(n*o)/n+0;var o,r,n},o.prototype.contrast=function(r){void 0===r&&(r=\"#FFF\");var n,a,i,e,v,u,d,c=r instanceof o?r:new o(r);return e=this.rgba,v=c.toRgb(),u=t(e),d=t(v),n=u>d?(u+.05)/(d+.05):(d+.05)/(u+.05),void 0===(a=2)&&(a=0),void 0===i&&(i=Math.pow(10,a)),Math.floor(i*n)/i+0},o.prototype.isReadable=function(o,t){return void 0===o&&(o=\"#FFF\"),void 0===t&&(t={}),this.contrast(o)>=(e=void 0===(i=(r=t).size)?\"normal\":i,\"AAA\"===(a=void 0===(n=r.level)?\"AA\":n)&&\"normal\"===e?7:\"AA\"===a&&\"large\"===e?3:4.5);var r,n,a,i,e}}\n","/* eslint-disable @wordpress/no-unused-vars-before-return */\n\n// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n// http://www.w3.org/TR/CSS21/grammar.htm\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\nconst commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\n\nexport default function ( css, options ) {\n\toptions = options || {};\n\n\t/**\n\t * Positional.\n\t */\n\n\tlet lineno = 1;\n\tlet column = 1;\n\n\t/**\n\t * Update lineno and column based on `str`.\n\t */\n\n\tfunction updatePosition( str ) {\n\t\tconst lines = str.match( /\\n/g );\n\t\tif ( lines ) {\n\t\t\tlineno += lines.length;\n\t\t}\n\t\tconst i = str.lastIndexOf( '\\n' );\n\t\t// eslint-disable-next-line no-bitwise\n\t\tcolumn = ~i ? str.length - i : column + str.length;\n\t}\n\n\t/**\n\t * Mark position and patch `node.position`.\n\t */\n\n\tfunction position() {\n\t\tconst start = { line: lineno, column };\n\t\treturn function ( node ) {\n\t\t\tnode.position = new Position( start );\n\t\t\twhitespace();\n\t\t\treturn node;\n\t\t};\n\t}\n\n\t/**\n\t * Store position information for a node\n\t */\n\n\tfunction Position( start ) {\n\t\tthis.start = start;\n\t\tthis.end = { line: lineno, column };\n\t\tthis.source = options.source;\n\t}\n\n\t/**\n\t * Non-enumerable source string\n\t */\n\n\tPosition.prototype.content = css;\n\n\t/**\n\t * Error `msg`.\n\t */\n\n\tconst errorsList = [];\n\n\tfunction error( msg ) {\n\t\tconst err = new Error(\n\t\t\toptions.source + ':' + lineno + ':' + column + ': ' + msg\n\t\t);\n\t\terr.reason = msg;\n\t\terr.filename = options.source;\n\t\terr.line = lineno;\n\t\terr.column = column;\n\t\terr.source = css;\n\n\t\tif ( options.silent ) {\n\t\t\terrorsList.push( err );\n\t\t} else {\n\t\t\tthrow err;\n\t\t}\n\t}\n\n\t/**\n\t * Parse stylesheet.\n\t */\n\n\tfunction stylesheet() {\n\t\tconst rulesList = rules();\n\n\t\treturn {\n\t\t\ttype: 'stylesheet',\n\t\t\tstylesheet: {\n\t\t\t\tsource: options.source,\n\t\t\t\trules: rulesList,\n\t\t\t\tparsingErrors: errorsList,\n\t\t\t},\n\t\t};\n\t}\n\n\t/**\n\t * Opening brace.\n\t */\n\n\tfunction open() {\n\t\treturn match( /^{\\s*/ );\n\t}\n\n\t/**\n\t * Closing brace.\n\t */\n\n\tfunction close() {\n\t\treturn match( /^}/ );\n\t}\n\n\t/**\n\t * Parse ruleset.\n\t */\n\n\tfunction rules() {\n\t\tlet node;\n\t\tconst accumulator = [];\n\t\twhitespace();\n\t\tcomments( accumulator );\n\t\twhile (\n\t\t\tcss.length &&\n\t\t\tcss.charAt( 0 ) !== '}' &&\n\t\t\t( node = atrule() || rule() )\n\t\t) {\n\t\t\tif ( node !== false ) {\n\t\t\t\taccumulator.push( node );\n\t\t\t\tcomments( accumulator );\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Match `re` and return captures.\n\t */\n\n\tfunction match( re ) {\n\t\tconst m = re.exec( css );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst str = m[ 0 ];\n\t\tupdatePosition( str );\n\t\tcss = css.slice( str.length );\n\t\treturn m;\n\t}\n\n\t/**\n\t * Parse whitespace.\n\t */\n\n\tfunction whitespace() {\n\t\tmatch( /^\\s*/ );\n\t}\n\n\t/**\n\t * Parse comments;\n\t */\n\n\tfunction comments( accumulator ) {\n\t\tlet c;\n\t\taccumulator = accumulator || [];\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( c = comment() ) ) {\n\t\t\tif ( c !== false ) {\n\t\t\t\taccumulator.push( c );\n\t\t\t}\n\t\t}\n\t\treturn accumulator;\n\t}\n\n\t/**\n\t * Parse comment.\n\t */\n\n\tfunction comment() {\n\t\tconst pos = position();\n\t\tif ( '/' !== css.charAt( 0 ) || '*' !== css.charAt( 1 ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet i = 2;\n\t\twhile (\n\t\t\t'' !== css.charAt( i ) &&\n\t\t\t( '*' !== css.charAt( i ) || '/' !== css.charAt( i + 1 ) )\n\t\t) {\n\t\t\t++i;\n\t\t}\n\t\ti += 2;\n\n\t\tif ( '' === css.charAt( i - 1 ) ) {\n\t\t\treturn error( 'End of comment missing' );\n\t\t}\n\n\t\tconst str = css.slice( 2, i - 2 );\n\t\tcolumn += 2;\n\t\tupdatePosition( str );\n\t\tcss = css.slice( i );\n\t\tcolumn += 2;\n\n\t\treturn pos( {\n\t\t\ttype: 'comment',\n\t\t\tcomment: str,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse selector.\n\t */\n\n\tfunction selector() {\n\t\tconst m = match( /^([^{]+)/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\t// FIXME: Remove all comments from selectors http://ostermiller.org/findcomment.html\n\t\treturn trim( m[ 0 ] )\n\t\t\t.replace( /\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '' )\n\t\t\t.replace( /\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function ( matched ) {\n\t\t\t\treturn matched.replace( /,/g, '\\u200C' );\n\t\t\t} )\n\t\t\t.split( /\\s*(?![^(]*\\)),\\s*/ )\n\t\t\t.map( function ( s ) {\n\t\t\t\treturn s.replace( /\\u200C/g, ',' );\n\t\t\t} );\n\t}\n\n\t/**\n\t * Parse declaration.\n\t */\n\n\tfunction declaration() {\n\t\tconst pos = position();\n\n\t\t// prop.\n\t\tlet prop = match( /^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/ );\n\t\tif ( ! prop ) {\n\t\t\treturn;\n\t\t}\n\t\tprop = trim( prop[ 0 ] );\n\n\t\t// :\n\t\tif ( ! match( /^:\\s*/ ) ) {\n\t\t\treturn error( \"property missing ':'\" );\n\t\t}\n\n\t\t// val.\n\t\tconst val = match(\n\t\t\t/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/\n\t\t);\n\n\t\tconst ret = pos( {\n\t\t\ttype: 'declaration',\n\t\t\tproperty: prop.replace( commentre, '' ),\n\t\t\tvalue: val ? trim( val[ 0 ] ).replace( commentre, '' ) : '',\n\t\t} );\n\n\t\t// ;\n\t\tmatch( /^[;\\s]*/ );\n\n\t\treturn ret;\n\t}\n\n\t/**\n\t * Parse declarations.\n\t */\n\n\tfunction declarations() {\n\t\tconst decls = [];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"missing '{'\" );\n\t\t}\n\t\tcomments( decls );\n\n\t\t// declarations.\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( decl = declaration() ) ) {\n\t\t\tif ( decl !== false ) {\n\t\t\t\tdecls.push( decl );\n\t\t\t\tcomments( decls );\n\t\t\t}\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"missing '}'\" );\n\t\t}\n\t\treturn decls;\n\t}\n\n\t/**\n\t * Parse keyframe.\n\t */\n\n\tfunction keyframe() {\n\t\tlet m;\n\t\tconst vals = [];\n\t\tconst pos = position();\n\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( m = match( /^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/ ) ) ) {\n\t\t\tvals.push( m[ 1 ] );\n\t\t\tmatch( /^,\\s*/ );\n\t\t}\n\n\t\tif ( ! vals.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'keyframe',\n\t\t\tvalues: vals,\n\t\t\tdeclarations: declarations(),\n\t\t} );\n\t}\n\n\t/**\n\t * Parse keyframes.\n\t */\n\n\tfunction atkeyframes() {\n\t\tconst pos = position();\n\t\tlet m = match( /^@([-\\w]+)?keyframes\\s*/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst vendor = m[ 1 ];\n\n\t\t// identifier\n\t\tm = match( /^([-\\w]+)\\s*/ );\n\t\tif ( ! m ) {\n\t\t\treturn error( '@keyframes missing name' );\n\t\t}\n\t\tconst name = m[ 1 ];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@keyframes missing '{'\" );\n\t\t}\n\n\t\tlet frame;\n\t\tlet frames = comments();\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( frame = keyframe() ) ) {\n\t\t\tframes.push( frame );\n\t\t\tframes = frames.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@keyframes missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'keyframes',\n\t\t\tname,\n\t\t\tvendor,\n\t\t\tkeyframes: frames,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse supports.\n\t */\n\n\tfunction atsupports() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@supports *([^{]+)/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst supports = trim( m[ 1 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@supports missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@supports missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'supports',\n\t\t\tsupports,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse host.\n\t */\n\n\tfunction athost() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@host\\s*/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@host missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@host missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'host',\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse media.\n\t */\n\n\tfunction atmedia() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@media *([^{]+)/ );\n\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\t\tconst media = trim( m[ 1 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@media missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@media missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'media',\n\t\t\tmedia,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse custom-media.\n\t */\n\n\tfunction atcustommedia() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'custom-media',\n\t\t\tname: trim( m[ 1 ] ),\n\t\t\tmedia: trim( m[ 2 ] ),\n\t\t} );\n\t}\n\n\t/**\n\t * Parse paged media.\n\t */\n\n\tfunction atpage() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@page */ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sel = selector() || [];\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@page missing '{'\" );\n\t\t}\n\t\tlet decls = comments();\n\n\t\t// declarations.\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( decl = declaration() ) ) {\n\t\t\tdecls.push( decl );\n\t\t\tdecls = decls.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@page missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'page',\n\t\t\tselectors: sel,\n\t\t\tdeclarations: decls,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse document.\n\t */\n\n\tfunction atdocument() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@([-\\w]+)?document *([^{]+)/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst vendor = trim( m[ 1 ] );\n\t\tconst doc = trim( m[ 2 ] );\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@document missing '{'\" );\n\t\t}\n\n\t\tconst style = comments().concat( rules() );\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@document missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'document',\n\t\t\tdocument: doc,\n\t\t\tvendor,\n\t\t\trules: style,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse font-face.\n\t */\n\n\tfunction atfontface() {\n\t\tconst pos = position();\n\t\tconst m = match( /^@font-face\\s*/ );\n\t\tif ( ! m ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! open() ) {\n\t\t\treturn error( \"@font-face missing '{'\" );\n\t\t}\n\t\tlet decls = comments();\n\n\t\t// declarations.\n\t\tlet decl;\n\t\t// eslint-disable-next-line no-cond-assign\n\t\twhile ( ( decl = declaration() ) ) {\n\t\t\tdecls.push( decl );\n\t\t\tdecls = decls.concat( comments() );\n\t\t}\n\n\t\tif ( ! close() ) {\n\t\t\treturn error( \"@font-face missing '}'\" );\n\t\t}\n\n\t\treturn pos( {\n\t\t\ttype: 'font-face',\n\t\t\tdeclarations: decls,\n\t\t} );\n\t}\n\n\t/**\n\t * Parse import\n\t */\n\n\tconst atimport = _compileAtrule( 'import' );\n\n\t/**\n\t * Parse charset\n\t */\n\n\tconst atcharset = _compileAtrule( 'charset' );\n\n\t/**\n\t * Parse namespace\n\t */\n\n\tconst atnamespace = _compileAtrule( 'namespace' );\n\n\t/**\n\t * Parse non-block at-rules\n\t */\n\n\tfunction _compileAtrule( name ) {\n\t\tconst re = new RegExp( '^@' + name + '\\\\s*([^;]+);' );\n\t\treturn function () {\n\t\t\tconst pos = position();\n\t\t\tconst m = match( re );\n\t\t\tif ( ! m ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst ret = { type: name };\n\t\t\tret[ name ] = m[ 1 ].trim();\n\t\t\treturn pos( ret );\n\t\t};\n\t}\n\n\t/**\n\t * Parse at rule.\n\t */\n\n\tfunction atrule() {\n\t\tif ( css[ 0 ] !== '@' ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn (\n\t\t\tatkeyframes() ||\n\t\t\tatmedia() ||\n\t\t\tatcustommedia() ||\n\t\t\tatsupports() ||\n\t\t\tatimport() ||\n\t\t\tatcharset() ||\n\t\t\tatnamespace() ||\n\t\t\tatdocument() ||\n\t\t\tatpage() ||\n\t\t\tathost() ||\n\t\t\tatfontface()\n\t\t);\n\t}\n\n\t/**\n\t * Parse rule.\n\t */\n\n\tfunction rule() {\n\t\tconst pos = position();\n\t\tconst sel = selector();\n\n\t\tif ( ! sel ) {\n\t\t\treturn error( 'selector missing' );\n\t\t}\n\t\tcomments();\n\n\t\treturn pos( {\n\t\t\ttype: 'rule',\n\t\t\tselectors: sel,\n\t\t\tdeclarations: declarations(),\n\t\t} );\n\t}\n\n\treturn addParent( stylesheet() );\n}\n\n/**\n * Trim `str`.\n */\n\nfunction trim( str ) {\n\treturn str ? str.replace( /^\\s+|\\s+$/g, '' ) : '';\n}\n\n/**\n * Adds non-enumerable parent node reference to each node.\n */\n\nfunction addParent( obj, parent ) {\n\tconst isNode = obj && typeof obj.type === 'string';\n\tconst childParent = isNode ? obj : parent;\n\n\tfor ( const k in obj ) {\n\t\tconst value = obj[ k ];\n\t\tif ( Array.isArray( value ) ) {\n\t\t\tvalue.forEach( function ( v ) {\n\t\t\t\taddParent( v, childParent );\n\t\t\t} );\n\t\t} else if ( value && typeof value === 'object' ) {\n\t\t\taddParent( value, childParent );\n\t\t}\n\t}\n\n\tif ( isNode ) {\n\t\tObject.defineProperty( obj, 'parent', {\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: parent || null,\n\t\t} );\n\t}\n\n\treturn obj;\n}\n\n/* eslint-enable @wordpress/no-unused-vars-before-return */\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * Expose `Compiler`.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a compiler.\n */\n\nfunction Compiler( opts ) {\n\tthis.options = opts || {};\n}\n\n/**\n * Emit `str`\n */\n\nCompiler.prototype.emit = function ( str ) {\n\treturn str;\n};\n\n/**\n * Visit `node`.\n */\n\nCompiler.prototype.visit = function ( node ) {\n\treturn this[ node.type ]( node );\n};\n\n/**\n * Map visit over array of `nodes`, optionally using a `delim`\n */\n\nCompiler.prototype.mapVisit = function ( nodes, delim ) {\n\tlet buf = '';\n\tdelim = delim || '';\n\n\tfor ( let i = 0, length = nodes.length; i < length; i++ ) {\n\t\tbuf += this.visit( nodes[ i ] );\n\t\tif ( delim && i < length - 1 ) {\n\t\t\tbuf += this.emit( delim );\n\t\t}\n\t}\n\n\treturn buf;\n};\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * External dependencies\n */\nimport inherits from 'inherits';\n\n/**\n * Internal dependencies\n */\nimport Base from './compiler';\n\n/**\n * Expose compiler.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a new `Compiler`.\n */\n\nfunction Compiler( options ) {\n\tBase.call( this, options );\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\ninherits( Compiler, Base );\n\n/**\n * Compile `node`.\n */\n\nCompiler.prototype.compile = function ( node ) {\n\treturn node.stylesheet.rules.map( this.visit, this ).join( '' );\n};\n\n/**\n * Visit comment node.\n */\n\nCompiler.prototype.comment = function ( node ) {\n\treturn this.emit( '', node.position );\n};\n\n/**\n * Visit import node.\n */\n\nCompiler.prototype.import = function ( node ) {\n\treturn this.emit( '@import ' + node.import + ';', node.position );\n};\n\n/**\n * Visit media node.\n */\n\nCompiler.prototype.media = function ( node ) {\n\treturn (\n\t\tthis.emit( '@media ' + node.media, node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.rules ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit document node.\n */\n\nCompiler.prototype.document = function ( node ) {\n\tconst doc = '@' + ( node.vendor || '' ) + 'document ' + node.document;\n\n\treturn (\n\t\tthis.emit( doc, node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.rules ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit charset node.\n */\n\nCompiler.prototype.charset = function ( node ) {\n\treturn this.emit( '@charset ' + node.charset + ';', node.position );\n};\n\n/**\n * Visit namespace node.\n */\n\nCompiler.prototype.namespace = function ( node ) {\n\treturn this.emit( '@namespace ' + node.namespace + ';', node.position );\n};\n\n/**\n * Visit supports node.\n */\n\nCompiler.prototype.supports = function ( node ) {\n\treturn (\n\t\tthis.emit( '@supports ' + node.supports, node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.rules ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit keyframes node.\n */\n\nCompiler.prototype.keyframes = function ( node ) {\n\treturn (\n\t\tthis.emit(\n\t\t\t'@' + ( node.vendor || '' ) + 'keyframes ' + node.name,\n\t\t\tnode.position\n\t\t) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.keyframes ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit keyframe node.\n */\n\nCompiler.prototype.keyframe = function ( node ) {\n\tconst decls = node.declarations;\n\n\treturn (\n\t\tthis.emit( node.values.join( ',' ), node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( decls ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit page node.\n */\n\nCompiler.prototype.page = function ( node ) {\n\tconst sel = node.selectors.length ? node.selectors.join( ', ' ) : '';\n\n\treturn (\n\t\tthis.emit( '@page ' + sel, node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.declarations ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit font-face node.\n */\n\nCompiler.prototype[ 'font-face' ] = function ( node ) {\n\treturn (\n\t\tthis.emit( '@font-face', node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.declarations ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit host node.\n */\n\nCompiler.prototype.host = function ( node ) {\n\treturn (\n\t\tthis.emit( '@host', node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( node.rules ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit custom-media node.\n */\n\nCompiler.prototype[ 'custom-media' ] = function ( node ) {\n\treturn this.emit(\n\t\t'@custom-media ' + node.name + ' ' + node.media + ';',\n\t\tnode.position\n\t);\n};\n\n/**\n * Visit rule node.\n */\n\nCompiler.prototype.rule = function ( node ) {\n\tconst decls = node.declarations;\n\tif ( ! decls.length ) {\n\t\treturn '';\n\t}\n\n\treturn (\n\t\tthis.emit( node.selectors.join( ',' ), node.position ) +\n\t\tthis.emit( '{' ) +\n\t\tthis.mapVisit( decls ) +\n\t\tthis.emit( '}' )\n\t);\n};\n\n/**\n * Visit declaration node.\n */\n\nCompiler.prototype.declaration = function ( node ) {\n\treturn (\n\t\tthis.emit( node.property + ':' + node.value, node.position ) +\n\t\tthis.emit( ';' )\n\t);\n};\n","/* eslint-disable @wordpress/no-unused-vars-before-return */\n\n// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * External dependencies\n */\nimport inherits from 'inherits';\n\n/**\n * Internal dependencies\n */\nimport Base from './compiler';\n\n/**\n * Expose compiler.\n */\n\nexport default Compiler;\n\n/**\n * Initialize a new `Compiler`.\n */\n\nfunction Compiler( options ) {\n\toptions = options || {};\n\tBase.call( this, options );\n\tthis.indentation = options.indent;\n}\n\n/**\n * Inherit from `Base.prototype`.\n */\n\ninherits( Compiler, Base );\n\n/**\n * Compile `node`.\n */\n\nCompiler.prototype.compile = function ( node ) {\n\treturn this.stylesheet( node );\n};\n\n/**\n * Visit stylesheet node.\n */\n\nCompiler.prototype.stylesheet = function ( node ) {\n\treturn this.mapVisit( node.stylesheet.rules, '\\n\\n' );\n};\n\n/**\n * Visit comment node.\n */\n\nCompiler.prototype.comment = function ( node ) {\n\treturn this.emit(\n\t\tthis.indent() + '/*' + node.comment + '*/',\n\t\tnode.position\n\t);\n};\n\n/**\n * Visit import node.\n */\n\nCompiler.prototype.import = function ( node ) {\n\treturn this.emit( '@import ' + node.import + ';', node.position );\n};\n\n/**\n * Visit media node.\n */\n\nCompiler.prototype.media = function ( node ) {\n\treturn (\n\t\tthis.emit( '@media ' + node.media, node.position ) +\n\t\tthis.emit( ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '\\n}' )\n\t);\n};\n\n/**\n * Visit document node.\n */\n\nCompiler.prototype.document = function ( node ) {\n\tconst doc = '@' + ( node.vendor || '' ) + 'document ' + node.document;\n\n\treturn (\n\t\tthis.emit( doc, node.position ) +\n\t\tthis.emit( ' ' + ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '\\n}' )\n\t);\n};\n\n/**\n * Visit charset node.\n */\n\nCompiler.prototype.charset = function ( node ) {\n\treturn this.emit( '@charset ' + node.charset + ';', node.position );\n};\n\n/**\n * Visit namespace node.\n */\n\nCompiler.prototype.namespace = function ( node ) {\n\treturn this.emit( '@namespace ' + node.namespace + ';', node.position );\n};\n\n/**\n * Visit supports node.\n */\n\nCompiler.prototype.supports = function ( node ) {\n\treturn (\n\t\tthis.emit( '@supports ' + node.supports, node.position ) +\n\t\tthis.emit( ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '\\n}' )\n\t);\n};\n\n/**\n * Visit keyframes node.\n */\n\nCompiler.prototype.keyframes = function ( node ) {\n\treturn (\n\t\tthis.emit(\n\t\t\t'@' + ( node.vendor || '' ) + 'keyframes ' + node.name,\n\t\t\tnode.position\n\t\t) +\n\t\tthis.emit( ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.keyframes, '\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '}' )\n\t);\n};\n\n/**\n * Visit keyframe node.\n */\n\nCompiler.prototype.keyframe = function ( node ) {\n\tconst decls = node.declarations;\n\n\treturn (\n\t\tthis.emit( this.indent() ) +\n\t\tthis.emit( node.values.join( ', ' ), node.position ) +\n\t\tthis.emit( ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( decls, '\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '\\n' + this.indent() + '}\\n' )\n\t);\n};\n\n/**\n * Visit page node.\n */\n\nCompiler.prototype.page = function ( node ) {\n\tconst sel = node.selectors.length ? node.selectors.join( ', ' ) + ' ' : '';\n\n\treturn (\n\t\tthis.emit( '@page ' + sel, node.position ) +\n\t\tthis.emit( '{\\n' ) +\n\t\tthis.emit( this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.declarations, '\\n' ) +\n\t\tthis.emit( this.indent( -1 ) ) +\n\t\tthis.emit( '\\n}' )\n\t);\n};\n\n/**\n * Visit font-face node.\n */\n\nCompiler.prototype[ 'font-face' ] = function ( node ) {\n\treturn (\n\t\tthis.emit( '@font-face ', node.position ) +\n\t\tthis.emit( '{\\n' ) +\n\t\tthis.emit( this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.declarations, '\\n' ) +\n\t\tthis.emit( this.indent( -1 ) ) +\n\t\tthis.emit( '\\n}' )\n\t);\n};\n\n/**\n * Visit host node.\n */\n\nCompiler.prototype.host = function ( node ) {\n\treturn (\n\t\tthis.emit( '@host', node.position ) +\n\t\tthis.emit( ' {\\n' + this.indent( 1 ) ) +\n\t\tthis.mapVisit( node.rules, '\\n\\n' ) +\n\t\tthis.emit( this.indent( -1 ) + '\\n}' )\n\t);\n};\n\n/**\n * Visit custom-media node.\n */\n\nCompiler.prototype[ 'custom-media' ] = function ( node ) {\n\treturn this.emit(\n\t\t'@custom-media ' + node.name + ' ' + node.media + ';',\n\t\tnode.position\n\t);\n};\n\n/**\n * Visit rule node.\n */\n\nCompiler.prototype.rule = function ( node ) {\n\tconst indent = this.indent();\n\tconst decls = node.declarations;\n\tif ( ! decls.length ) {\n\t\treturn '';\n\t}\n\n\treturn (\n\t\tthis.emit(\n\t\t\tnode.selectors\n\t\t\t\t.map( function ( s ) {\n\t\t\t\t\treturn indent + s;\n\t\t\t\t} )\n\t\t\t\t.join( ',\\n' ),\n\t\t\tnode.position\n\t\t) +\n\t\tthis.emit( ' {\\n' ) +\n\t\tthis.emit( this.indent( 1 ) ) +\n\t\tthis.mapVisit( decls, '\\n' ) +\n\t\tthis.emit( this.indent( -1 ) ) +\n\t\tthis.emit( '\\n' + this.indent() + '}' )\n\t);\n};\n\n/**\n * Visit declaration node.\n */\n\nCompiler.prototype.declaration = function ( node ) {\n\treturn (\n\t\tthis.emit( this.indent() ) +\n\t\tthis.emit( node.property + ': ' + node.value, node.position ) +\n\t\tthis.emit( ';' )\n\t);\n};\n\n/**\n * Increase, decrease or return current indentation.\n */\n\nCompiler.prototype.indent = function ( level ) {\n\tthis.level = this.level || 1;\n\n\tif ( null !== level ) {\n\t\tthis.level += level;\n\t\treturn '';\n\t}\n\n\treturn Array( this.level ).join( this.indentation || '  ' );\n};\n\n/* eslint-enable @wordpress/no-unused-vars-before-return */\n","/**\n * External dependencies\n */\nimport traverse from 'traverse';\n\n/**\n * Internal dependencies\n */\nimport { parse, stringify } from './ast';\n\nfunction traverseCSS( css, callback ) {\n\ttry {\n\t\tconst parsed = parse( css );\n\n\t\tconst updated = traverse.map( parsed, function ( node ) {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn node;\n\t\t\t}\n\t\t\tconst updatedNode = callback( node );\n\t\t\treturn this.update( updatedNode );\n\t\t} );\n\n\t\treturn stringify( updated );\n\t} catch ( err ) {\n\t\t// eslint-disable-next-line no-console\n\t\tconsole.warn( 'Error while traversing the CSS: ' + err );\n\n\t\treturn null;\n\t}\n}\n\nexport default traverseCSS;\n","// Adapted from https://github.com/reworkcss/css\n// because we needed to remove source map support.\n\n/**\n * Internal dependencies\n */\nimport Compressed from './compress';\nimport Identity from './identity';\n\n/**\n * Stringfy the given AST `node`.\n *\n * Options:\n *\n *  - `compress` space-optimized output\n *  - `sourcemap` return an object with `.code` and `.map`\n *\n * @param {Object} node\n * @param {Object} [options]\n * @return {string}\n */\n\nexport default function ( node, options ) {\n\toptions = options || {};\n\n\tconst compiler = options.compress\n\t\t? new Compressed( options )\n\t\t: new Identity( options );\n\n\tconst code = compiler.compile( node );\n\treturn code;\n}\n","/**\n * Return `true` if the given path is http/https.\n *\n * @param {string} filePath path\n *\n * @return {boolean} is remote path.\n */\nfunction isRemotePath( filePath ) {\n\treturn /^(?:https?:)?\\/\\//.test( filePath );\n}\n\n/**\n * Return `true` if the given filePath is an absolute url.\n *\n * @param {string} filePath path\n *\n * @return {boolean} is absolute path.\n */\nfunction isAbsolutePath( filePath ) {\n\treturn /^\\/(?!\\/)/.test( filePath );\n}\n\n/**\n * Whether or not the url should be inluded.\n *\n * @param {Object} meta url meta info\n *\n * @return {boolean} is valid.\n */\nfunction isValidURL( meta ) {\n\t// Ignore hashes or data uris.\n\tif (\n\t\tmeta.value.indexOf( 'data:' ) === 0 ||\n\t\tmeta.value.indexOf( '#' ) === 0\n\t) {\n\t\treturn false;\n\t}\n\n\tif ( isAbsolutePath( meta.value ) ) {\n\t\treturn false;\n\t}\n\n\t// Do not handle the http/https urls if `includeRemote` is false.\n\tif ( isRemotePath( meta.value ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Get the absolute path of the url, relative to the basePath\n *\n * @param {string} str     the url\n * @param {string} baseURL base URL\n *\n * @return {string} the full path to the file\n */\nfunction getResourcePath( str, baseURL ) {\n\treturn new URL( str, baseURL ).toString();\n}\n\n/**\n * Process the single `url()` pattern\n *\n * @param {string} baseURL the base URL for relative URLs.\n *\n * @return {Promise} the Promise.\n */\nfunction processURL( baseURL ) {\n\treturn ( meta ) => ( {\n\t\t...meta,\n\t\tnewUrl:\n\t\t\t'url(' +\n\t\t\tmeta.before +\n\t\t\tmeta.quote +\n\t\t\tgetResourcePath( meta.value, baseURL ) +\n\t\t\tmeta.quote +\n\t\t\tmeta.after +\n\t\t\t')',\n\t} );\n}\n\n/**\n * Get all `url()`s, and return the meta info\n *\n * @param {string} value decl.value.\n *\n * @return {Array} the urls.\n */\nfunction getURLs( value ) {\n\tconst reg = /url\\((\\s*)(['\"]?)(.+?)\\2(\\s*)\\)/g;\n\tlet match;\n\tconst URLs = [];\n\n\twhile ( ( match = reg.exec( value ) ) !== null ) {\n\t\tconst meta = {\n\t\t\tsource: match[ 0 ],\n\t\t\tbefore: match[ 1 ],\n\t\t\tquote: match[ 2 ],\n\t\t\tvalue: match[ 3 ],\n\t\t\tafter: match[ 4 ],\n\t\t};\n\t\tif ( isValidURL( meta ) ) {\n\t\t\tURLs.push( meta );\n\t\t}\n\t}\n\treturn URLs;\n}\n\n/**\n * Replace the raw value's `url()` segment to the new value\n *\n * @param {string} raw  the raw value.\n * @param {Array}  URLs the URLs to replace.\n *\n * @return {string} the new value.\n */\nfunction replaceURLs( raw, URLs ) {\n\tURLs.forEach( ( item ) => {\n\t\traw = raw.replace( item.source, item.newUrl );\n\t} );\n\n\treturn raw;\n}\n\nconst rewrite = ( rootURL ) => ( node ) => {\n\tif ( node.type === 'declaration' ) {\n\t\tconst updatedURLs = getURLs( node.value ).map( processURL( rootURL ) );\n\t\treturn {\n\t\t\t...node,\n\t\t\tvalue: replaceURLs( node.value, updatedURLs ),\n\t\t};\n\t}\n\n\treturn node;\n};\n\nexport default rewrite;\n","/**\n * @constant string IS_ROOT_TAG Regex to check if the selector is a root tag selector.\n */\nconst IS_ROOT_TAG = /^(body|html|:root).*$/;\n\n/**\n * Creates a callback to modify selectors so they only apply within a certain\n * namespace.\n *\n * @param {string}   namespace Namespace to prefix selectors with.\n * @param {string[]} ignore    Selectors to not prefix.\n *\n * @return {(node: Object) => Object} Callback to wrap selectors.\n */\nconst wrap =\n\t( namespace, ignore = [] ) =>\n\t( node ) => {\n\t\t/**\n\t\t * Updates selector if necessary.\n\t\t *\n\t\t * @param {string} selector Selector to modify.\n\t\t *\n\t\t * @return {string} Updated selector.\n\t\t */\n\t\tconst updateSelector = ( selector ) => {\n\t\t\tif ( ignore.includes( selector.trim() ) ) {\n\t\t\t\treturn selector;\n\t\t\t}\n\n\t\t\t// Anything other than a root tag is always prefixed.\n\t\t\t{\n\t\t\t\tif ( ! selector.match( IS_ROOT_TAG ) ) {\n\t\t\t\t\treturn namespace + ' ' + selector;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// HTML and Body elements cannot be contained within our container so lets extract their styles.\n\t\t\treturn selector.replace( /^(body|html|:root)/, namespace );\n\t\t};\n\n\t\tif ( node.type === 'rule' ) {\n\t\t\treturn {\n\t\t\t\t...node,\n\t\t\t\tselectors: node.selectors.map( updateSelector ),\n\t\t\t};\n\t\t}\n\n\t\treturn node;\n\t};\n\nexport default wrap;\n","/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport traverse from './traverse';\nimport urlRewrite from './transforms/url-rewrite';\nimport wrap from './transforms/wrap';\n\n/**\n * Applies a series of CSS rule transforms to wrap selectors inside a given class and/or rewrite URLs depending on the parameters passed.\n *\n * @param {Array}  styles           CSS rules.\n * @param {string} wrapperClassName Wrapper Class Name.\n * @return {Array} converted rules.\n */\nconst transformStyles = ( styles, wrapperClassName = '' ) => {\n\treturn map( styles, ( { css, baseURL } ) => {\n\t\tconst transforms = [];\n\t\tif ( wrapperClassName ) {\n\t\t\ttransforms.push( wrap( wrapperClassName ) );\n\t\t}\n\t\tif ( baseURL ) {\n\t\t\ttransforms.push( urlRewrite( baseURL ) );\n\t\t}\n\t\tif ( transforms.length ) {\n\t\t\treturn traverse( css, compose( transforms ) );\n\t\t}\n\n\t\treturn css;\n\t} );\n};\n\nexport default transformStyles;\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport transformStyles from '../../utils/transform-styles';\n\nconst EDITOR_STYLES_SELECTOR = '.editor-styles-wrapper';\nextend( [ namesPlugin, a11yPlugin ] );\n\nfunction useDarkThemeBodyClassName( styles ) {\n\treturn useCallback(\n\t\t( node ) => {\n\t\t\tif ( ! node ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView, body } = ownerDocument;\n\t\t\tconst canvas = ownerDocument.querySelector(\n\t\t\t\tEDITOR_STYLES_SELECTOR\n\t\t\t);\n\n\t\t\tlet backgroundColor;\n\n\t\t\tif ( ! canvas ) {\n\t\t\t\t// The real .editor-styles-wrapper element might not exist in the\n\t\t\t\t// DOM, so calculate the background color by creating a fake\n\t\t\t\t// wrapper.\n\t\t\t\tconst tempCanvas = ownerDocument.createElement( 'div' );\n\t\t\t\ttempCanvas.classList.add( 'editor-styles-wrapper' );\n\t\t\t\tbody.appendChild( tempCanvas );\n\n\t\t\t\tbackgroundColor = defaultView\n\t\t\t\t\t.getComputedStyle( tempCanvas, null )\n\t\t\t\t\t.getPropertyValue( 'background-color' );\n\n\t\t\t\tbody.removeChild( tempCanvas );\n\t\t\t} else {\n\t\t\t\tbackgroundColor = defaultView\n\t\t\t\t\t.getComputedStyle( canvas, null )\n\t\t\t\t\t.getPropertyValue( 'background-color' );\n\t\t\t}\n\t\t\tconst colordBackgroundColor = colord( backgroundColor );\n\t\t\t// If background is transparent, it should be treated as light color.\n\t\t\tif (\n\t\t\t\tcolordBackgroundColor.luminance() > 0.5 ||\n\t\t\t\tcolordBackgroundColor.alpha() === 0\n\t\t\t) {\n\t\t\t\tbody.classList.remove( 'is-dark-theme' );\n\t\t\t} else {\n\t\t\t\tbody.classList.add( 'is-dark-theme' );\n\t\t\t}\n\t\t},\n\t\t[ styles ]\n\t);\n}\n\nexport default function EditorStyles( { styles } ) {\n\tconst transformedStyles = useMemo(\n\t\t() => transformStyles( styles, EDITOR_STYLES_SELECTOR ),\n\t\t[ styles ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t{ /* Use an empty style element to have a document reference,\n\t\t\t     but this could be any element. */ }\n\t\t\t<style ref={ useDarkThemeBodyClassName( styles ) } />\n\t\t\t{ transformedStyles.map( ( css, index ) => (\n\t\t\t\t<style key={ index }>{ css }</style>\n\t\t\t) ) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { colord } from 'colord';\n\n/**\n * Convert a list of colors to an object of R, G, and B values.\n *\n * @param {string[]} colors Array of RBG color strings.\n *\n * @return {Object} R, G, and B values.\n */\nexport function getValuesFromColors( colors = [] ) {\n\tconst values = { r: [], g: [], b: [], a: [] };\n\n\tcolors.forEach( ( color ) => {\n\t\tconst rgbColor = colord( color ).toRgb();\n\t\tvalues.r.push( rgbColor.r / 255 );\n\t\tvalues.g.push( rgbColor.g / 255 );\n\t\tvalues.b.push( rgbColor.b / 255 );\n\t\tvalues.a.push( rgbColor.a );\n\t} );\n\n\treturn values;\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { __unstableGetValuesFromColors as getValuesFromColors } from './index';\n\n/**\n * SVG and stylesheet needed for rendering the duotone filter.\n *\n * @param {Object} props          Duotone props.\n * @param {string} props.selector Selector to apply the filter to.\n * @param {string} props.id       Unique id for this duotone filter.\n *\n * @return {WPElement} Duotone element.\n */\nexport function DuotoneStylesheet( { selector, id } ) {\n\tconst css = `\n${ selector } {\n\tfilter: url( #${ id } );\n}\n`;\n\treturn <style>{ css }</style>;\n}\n\n/**\n * Stylesheet for disabling a global styles duotone filter.\n *\n * @param {Object} props          Duotone props.\n * @param {string} props.selector Selector to disable the filter for.\n *\n * @return {WPElement} Filter none style element.\n */\nexport function DuotoneUnsetStylesheet( { selector } ) {\n\tconst css = `\n${ selector } {\n\tfilter: none;\n}\n`;\n\treturn <style>{ css }</style>;\n}\n\n/**\n * The SVG part of the duotone filter.\n *\n * @param {Object}   props        Duotone props.\n * @param {string}   props.id     Unique id for this duotone filter.\n * @param {string[]} props.colors Color strings from dark to light.\n *\n * @return {WPElement} Duotone SVG.\n */\nexport function DuotoneFilter( { id, colors } ) {\n\tconst values = getValuesFromColors( colors );\n\treturn (\n\t\t<SVG\n\t\t\txmlnsXlink=\"http://www.w3.org/1999/xlink\"\n\t\t\tviewBox=\"0 0 0 0\"\n\t\t\twidth=\"0\"\n\t\t\theight=\"0\"\n\t\t\tfocusable=\"false\"\n\t\t\trole=\"none\"\n\t\t\tstyle={ {\n\t\t\t\tvisibility: 'hidden',\n\t\t\t\tposition: 'absolute',\n\t\t\t\tleft: '-9999px',\n\t\t\t\toverflow: 'hidden',\n\t\t\t} }\n\t\t>\n\t\t\t<defs>\n\t\t\t\t<filter id={ id }>\n\t\t\t\t\t<feColorMatrix\n\t\t\t\t\t\t// Use sRGB instead of linearRGB so transparency looks correct.\n\t\t\t\t\t\tcolorInterpolationFilters=\"sRGB\"\n\t\t\t\t\t\ttype=\"matrix\"\n\t\t\t\t\t\t// Use perceptual brightness to convert to grayscale.\n\t\t\t\t\t\tvalues=\"\n\t\t\t\t\t\t\t.299 .587 .114 0 0\n\t\t\t\t\t\t\t.299 .587 .114 0 0\n\t\t\t\t\t\t\t.299 .587 .114 0 0\n\t\t\t\t\t\t\t.299 .587 .114 0 0\n\t\t\t\t\t\t\"\n\t\t\t\t\t/>\n\t\t\t\t\t<feComponentTransfer\n\t\t\t\t\t\t// Use sRGB instead of linearRGB to be consistent with how CSS gradients work.\n\t\t\t\t\t\tcolorInterpolationFilters=\"sRGB\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<feFuncR\n\t\t\t\t\t\t\ttype=\"table\"\n\t\t\t\t\t\t\ttableValues={ values.r.join( ' ' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<feFuncG\n\t\t\t\t\t\t\ttype=\"table\"\n\t\t\t\t\t\t\ttableValues={ values.g.join( ' ' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<feFuncB\n\t\t\t\t\t\t\ttype=\"table\"\n\t\t\t\t\t\t\ttableValues={ values.b.join( ' ' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<feFuncA\n\t\t\t\t\t\t\ttype=\"table\"\n\t\t\t\t\t\t\ttableValues={ values.a.join( ' ' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</feComponentTransfer>\n\t\t\t\t\t<feComposite\n\t\t\t\t\t\t// Re-mask the image with the original transparency since the feColorMatrix above loses that information.\n\t\t\t\t\t\tin2=\"SourceGraphic\"\n\t\t\t\t\t\toperator=\"in\"\n\t\t\t\t\t/>\n\t\t\t\t</filter>\n\t\t\t</defs>\n\t\t</SVG>\n\t);\n}\n\n/**\n * SVG from a duotone preset\n *\n * @param {Object} props        Duotone props.\n * @param {Object} props.preset Duotone preset settings.\n *\n * @return {WPElement} Duotone element.\n */\nexport function PresetDuotoneFilter( { preset } ) {\n\treturn (\n\t\t<DuotoneFilter\n\t\t\tid={ `wp-duotone-${ preset.slug }` }\n\t\t\tcolors={ preset.colors }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Disabled } from '@wordpress/components';\nimport { useResizeObserver, pure, useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../block-list';\nimport Iframe from '../iframe';\nimport EditorStyles from '../editor-styles';\nimport { __unstablePresetDuotoneFilter as PresetDuotoneFilter } from '../../components/duotone';\nimport { store } from '../../store';\n\n// This is used to avoid rendering the block list if the sizes change.\nlet MemoizedBlockList;\n\nconst MAX_HEIGHT = 2000;\n\nfunction ScaledBlockPreview( {\n\tviewportWidth,\n\tcontainerWidth,\n\t__experimentalPadding,\n\t__experimentalMinHeight,\n} ) {\n\tconst [ contentResizeListener, { height: contentHeight } ] =\n\t\tuseResizeObserver();\n\tconst { styles, assets, duotone } = useSelect( ( select ) => {\n\t\tconst settings = select( store ).getSettings();\n\t\treturn {\n\t\t\tstyles: settings.styles,\n\t\t\tassets: settings.__unstableResolvedAssets,\n\t\t\tduotone: settings.__experimentalFeatures?.color?.duotone,\n\t\t};\n\t}, [] );\n\n\t// Avoid scrollbars for pattern previews.\n\tconst editorStyles = useMemo( () => {\n\t\tif ( styles ) {\n\t\t\treturn [\n\t\t\t\t...styles,\n\t\t\t\t{\n\t\t\t\t\tcss: 'body{height:auto;overflow:hidden;}',\n\t\t\t\t\t__unstableType: 'presets',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\n\tconst svgFilters = useMemo( () => {\n\t\treturn [ ...( duotone?.default ?? [] ), ...( duotone?.theme ?? [] ) ];\n\t}, [ duotone ] );\n\n\t// Initialize on render instead of module top level, to avoid circular dependency issues.\n\tMemoizedBlockList = MemoizedBlockList || pure( BlockList );\n\n\tconst scale = containerWidth / viewportWidth;\n\treturn (\n\t\t<Disabled\n\t\t\tclassName=\"block-editor-block-preview__content\"\n\t\t\tstyle={ {\n\t\t\t\ttransform: `scale(${ scale })`,\n\t\t\t\theight: contentHeight * scale,\n\t\t\t\tmaxHeight:\n\t\t\t\t\tcontentHeight > MAX_HEIGHT ? MAX_HEIGHT * scale : undefined,\n\t\t\t\tminHeight: __experimentalMinHeight,\n\t\t\t} }\n\t\t>\n\t\t\t<Iframe\n\t\t\t\thead={ <EditorStyles styles={ editorStyles } /> }\n\t\t\t\tassets={ assets }\n\t\t\t\tcontentRef={ useRefEffect( ( bodyElement ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\townerDocument: { documentElement },\n\t\t\t\t\t} = bodyElement;\n\t\t\t\t\tdocumentElement.classList.add(\n\t\t\t\t\t\t'block-editor-block-preview__content-iframe'\n\t\t\t\t\t);\n\t\t\t\t\tdocumentElement.style.position = 'absolute';\n\t\t\t\t\tdocumentElement.style.width = '100%';\n\t\t\t\t\tbodyElement.style.padding = __experimentalPadding + 'px';\n\n\t\t\t\t\t// Necessary for contentResizeListener to work.\n\t\t\t\t\tbodyElement.style.boxSizing = 'border-box';\n\t\t\t\t\tbodyElement.style.position = 'absolute';\n\t\t\t\t\tbodyElement.style.width = '100%';\n\t\t\t\t}, [] ) }\n\t\t\t\taria-hidden\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tstyle={ {\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twidth: viewportWidth,\n\t\t\t\t\theight: contentHeight,\n\t\t\t\t\tpointerEvents: 'none',\n\t\t\t\t\t// This is a catch-all max-height for patterns.\n\t\t\t\t\t// See: https://github.com/WordPress/gutenberg/pull/38175.\n\t\t\t\t\tmaxHeight: MAX_HEIGHT,\n\t\t\t\t\tminHeight:\n\t\t\t\t\t\tscale !== 0 && scale < 1 && __experimentalMinHeight\n\t\t\t\t\t\t\t? __experimentalMinHeight / scale\n\t\t\t\t\t\t\t: __experimentalMinHeight,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ contentResizeListener }\n\t\t\t\t{\n\t\t\t\t\t/* Filters need to be rendered before children to avoid Safari rendering issues. */\n\t\t\t\t\tsvgFilters.map( ( preset ) => (\n\t\t\t\t\t\t<PresetDuotoneFilter\n\t\t\t\t\t\t\tpreset={ preset }\n\t\t\t\t\t\t\tkey={ preset.slug }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) )\n\t\t\t\t}\n\t\t\t\t<MemoizedBlockList renderAppender={ false } />\n\t\t\t</Iframe>\n\t\t</Disabled>\n\t);\n}\n\nexport default function AutoBlockPreview( props ) {\n\tconst [ containerResizeListener, { width: containerWidth } ] =\n\t\tuseResizeObserver();\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative', width: '100%', height: 0 } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-block-preview__container\">\n\t\t\t\t{ !! containerWidth && (\n\t\t\t\t\t<ScaledBlockPreview\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\tcontainerWidth={ containerWidth }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useDisabled, useMergeRefs } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { memo, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockEditorProvider from '../provider';\nimport LiveBlockPreview from './live';\nimport AutoHeightBlockPreview from './auto';\nimport { store as blockEditorStore } from '../../store';\nimport { BlockListItems } from '../block-list';\n\nexport function BlockPreview( {\n\tblocks,\n\t__experimentalPadding = 0,\n\tviewportWidth = 1200,\n\t__experimentalLive = false,\n\t__experimentalOnClick,\n\t__experimentalMinHeight,\n} ) {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo( () => {\n\t\tconst _settings = { ...originalSettings };\n\t\t_settings.__experimentalBlockPatterns = [];\n\t\treturn _settings;\n\t}, [ originalSettings ] );\n\tconst renderedBlocks = useMemo( () => castArray( blocks ), [ blocks ] );\n\tif ( ! blocks || blocks.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<BlockEditorProvider value={ renderedBlocks } settings={ settings }>\n\t\t\t{ __experimentalLive ? (\n\t\t\t\t<LiveBlockPreview onClick={ __experimentalOnClick } />\n\t\t\t) : (\n\t\t\t\t<AutoHeightBlockPreview\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t__experimentalPadding={ __experimentalPadding }\n\t\t\t\t\t__experimentalMinHeight={ __experimentalMinHeight }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockEditorProvider>\n\t);\n}\n\n/**\n * BlockPreview renders a preview of a block or array of blocks.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-preview/README.md\n *\n * @param {Object}       preview               options for how the preview should be shown\n * @param {Array|Object} preview.blocks        A block instance (object) or an array of blocks to be previewed.\n * @param {number}       preview.viewportWidth Width of the preview container in pixels. Controls at what size the blocks will be rendered inside the preview. Default: 700.\n *\n * @return {WPComponent} The component to be rendered.\n */\nexport default memo( BlockPreview );\n\n/**\n * This hook is used to lightly mark an element as a block preview wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * a block preview wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object}    options                      Preview options.\n * @param {WPBlock[]} options.blocks               Block objects.\n * @param {Object}    options.props                Optional. Props to pass to the element. Must contain\n *                                                 the ref if one is defined.\n * @param {Object}    options.__experimentalLayout Layout settings to be used in the preview.\n *\n */\nexport function useBlockPreview( {\n\tblocks,\n\tprops = {},\n\t__experimentalLayout,\n} ) {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst disabledRef = useDisabled();\n\tconst ref = useMergeRefs( [ props.ref, disabledRef ] );\n\tconst settings = useMemo(\n\t\t() => ( { ...originalSettings, __experimentalBlockPatterns: [] } ),\n\t\t[ originalSettings ]\n\t);\n\tconst renderedBlocks = useMemo( () => castArray( blocks ), [ blocks ] );\n\n\tconst children = (\n\t\t<BlockEditorProvider value={ renderedBlocks } settings={ settings }>\n\t\t\t<BlockListItems\n\t\t\t\trenderAppender={ false }\n\t\t\t\t__experimentalLayout={ __experimentalLayout }\n\t\t\t/>\n\t\t</BlockEditorProvider>\n\t);\n\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-preview__live-content',\n\t\t\t'components-disabled'\n\t\t),\n\t\tchildren: blocks?.length ? children : null,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tisReusableBlock,\n\tcreateBlock,\n\tgetBlockFromExample,\n} from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockCard from '../block-card';\nimport BlockPreview from '../block-preview';\n\nfunction InserterPreviewPanel( { item } ) {\n\tconst { name, title, icon, description, initialAttributes, example } = item;\n\tconst isReusable = isReusableBlock( item );\n\treturn (\n\t\t<div className=\"block-editor-inserter__preview-container\">\n\t\t\t<div className=\"block-editor-inserter__preview\">\n\t\t\t\t{ isReusable || example ? (\n\t\t\t\t\t<div className=\"block-editor-inserter__preview-content\">\n\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\t__experimentalPadding={ 16 }\n\t\t\t\t\t\t\tviewportWidth={ example?.viewportWidth ?? 500 }\n\t\t\t\t\t\t\tblocks={\n\t\t\t\t\t\t\t\texample\n\t\t\t\t\t\t\t\t\t? getBlockFromExample( name, {\n\t\t\t\t\t\t\t\t\t\t\tattributes: {\n\t\t\t\t\t\t\t\t\t\t\t\t...example.attributes,\n\t\t\t\t\t\t\t\t\t\t\t\t...initialAttributes,\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\tinnerBlocks: example.innerBlocks,\n\t\t\t\t\t\t\t\t\t  } )\n\t\t\t\t\t\t\t\t\t: createBlock( name, initialAttributes )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<div className=\"block-editor-inserter__preview-content-missing\">\n\t\t\t\t\t\t{ __( 'No Preview Available.' ) }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ ! isReusable && (\n\t\t\t\t<BlockCard\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tdescription={ description }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default InserterPreviewPanel;\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst InserterListboxContext = createContext();\n\nexport default InserterListboxContext;\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InserterListboxContext from './context';\n\nfunction InserterListboxItem(\n\t{ isFirst, as: Component, children, ...props },\n\tref\n) {\n\tconst state = useContext( InserterListboxContext );\n\treturn (\n\t\t<CompositeItem\n\t\t\tref={ ref }\n\t\t\tstate={ state }\n\t\t\trole=\"option\"\n\t\t\t// Use the CompositeItem `focusable` prop over Button's\n\t\t\t// isFocusable. The latter was shown to cause an issue\n\t\t\t// with tab order in the inserter list.\n\t\t\tfocusable\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( htmlProps ) => {\n\t\t\t\tconst propsWithTabIndex = {\n\t\t\t\t\t...htmlProps,\n\t\t\t\t\ttabIndex: isFirst ? 0 : htmlProps.tabIndex,\n\t\t\t\t};\n\t\t\t\tif ( Component ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Component { ...propsWithTabIndex }>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</Component>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tif ( typeof children === 'function' ) {\n\t\t\t\t\treturn children( propsWithTabIndex );\n\t\t\t\t}\n\t\t\t\treturn <Button { ...propsWithTabIndex }>{ children }</Button>;\n\t\t\t} }\n\t\t</CompositeItem>\n\t);\n}\n\nexport default forwardRef( InserterListboxItem );\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst dragHandle = (\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 d=\"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z\" />\n\t</SVG>\n);\n\nexport default dragHandle;\n","/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { Flex, FlexItem } from '@wordpress/components';\nimport { dragHandle } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\n\nexport default function BlockDraggableChip( { count, icon } ) {\n\treturn (\n\t\t<div className=\"block-editor-block-draggable-chip-wrapper\">\n\t\t\t<div\n\t\t\t\tclassName=\"block-editor-block-draggable-chip\"\n\t\t\t\tdata-testid=\"block-draggable-chip\"\n\t\t\t>\n\t\t\t\t<Flex\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tclassName=\"block-editor-block-draggable-chip__content\"\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ icon ? (\n\t\t\t\t\t\t\t<BlockIcon icon={ icon } />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %d: Number of blocks. */\n\t\t\t\t\t\t\t\t_n( '%d block', '%d blocks', count ),\n\t\t\t\t\t\t\t\tcount\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<BlockIcon icon={ dragHandle } />\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Draggable } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport BlockDraggableChip from '../block-draggable/draggable-chip';\n\nconst InserterDraggableBlocks = ( { isEnabled, blocks, icon, children } ) => {\n\tconst transferData = {\n\t\ttype: 'inserter',\n\t\tblocks,\n\t};\n\n\treturn (\n\t\t<Draggable\n\t\t\t__experimentalTransferDataType=\"wp-blocks\"\n\t\t\ttransferData={ transferData }\n\t\t\t__experimentalDragComponent={\n\t\t\t\t<BlockDraggableChip count={ blocks.length } icon={ icon } />\n\t\t\t}\n\t\t>\n\t\t\t{ ( { onDraggableStart, onDraggableEnd } ) => {\n\t\t\t\treturn children( {\n\t\t\t\t\tdraggable: isEnabled,\n\t\t\t\t\tonDragStart: isEnabled ? onDraggableStart : undefined,\n\t\t\t\t\tonDragEnd: isEnabled ? onDraggableEnd : undefined,\n\t\t\t\t} );\n\t\t\t} }\n\t\t</Draggable>\n\t);\n};\n\nexport default InserterDraggableBlocks;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useRef, memo } from '@wordpress/element';\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n} from '@wordpress/blocks';\nimport { __experimentalTruncate as Truncate } from '@wordpress/components';\nimport { ENTER, isAppleOS } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { InserterListboxItem } from '../inserter-listbox';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\n\nfunction InserterListItem( {\n\tclassName,\n\tisFirst,\n\titem,\n\tonSelect,\n\tonHover,\n\tisDraggable,\n\t...props\n} ) {\n\tconst isDragging = useRef( false );\n\tconst itemIconStyle = item.icon\n\t\t? {\n\t\t\t\tbackgroundColor: item.icon.background,\n\t\t\t\tcolor: item.icon.foreground,\n\t\t  }\n\t\t: {};\n\tconst blocks = useMemo( () => {\n\t\treturn [\n\t\t\tcreateBlock(\n\t\t\t\titem.name,\n\t\t\t\titem.initialAttributes,\n\t\t\t\tcreateBlocksFromInnerBlocksTemplate( item.innerBlocks )\n\t\t\t),\n\t\t];\n\t}, [ item.name, item.initialAttributes, item.initialAttributes ] );\n\n\treturn (\n\t\t<InserterDraggableBlocks\n\t\t\tisEnabled={ isDraggable && ! item.disabled }\n\t\t\tblocks={ blocks }\n\t\t\ticon={ item.icon }\n\t\t>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-types-list__list-item\"\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ ( event ) => {\n\t\t\t\t\t\tisDragging.current = true;\n\t\t\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t\t\tonDragStart( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tonDragEnd={ ( event ) => {\n\t\t\t\t\t\tisDragging.current = false;\n\t\t\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\t\t\tonDragEnd( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<InserterListboxItem\n\t\t\t\t\t\tisFirst={ isFirst }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-types-list__item',\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tdisabled={ item.isDisabled }\n\t\t\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tonSelect(\n\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\tisAppleOS() ? event.metaKey : event.ctrlKey\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\tconst { keyCode } = event;\n\t\t\t\t\t\t\tif ( keyCode === ENTER ) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\tonSelect(\n\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\tisAppleOS() ? event.metaKey : event.ctrlKey\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tonHover( null );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonFocus={ () => {\n\t\t\t\t\t\t\tif ( isDragging.current ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonHover( item );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMouseEnter={ () => {\n\t\t\t\t\t\t\tif ( isDragging.current ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonHover( item );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tonMouseLeave={ () => onHover( null ) }\n\t\t\t\t\t\tonBlur={ () => onHover( null ) }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"block-editor-block-types-list__item-icon\"\n\t\t\t\t\t\t\tstyle={ itemIconStyle }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockIcon icon={ item.icon } showColors />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"block-editor-block-types-list__item-title\">\n\t\t\t\t\t\t\t<Truncate numberOfLines={ 3 }>\n\t\t\t\t\t\t\t\t{ item.title }\n\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</InserterListboxItem>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nexport default memo( InserterListItem );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\n\nfunction InserterListboxGroup( props, ref ) {\n\tconst [ shouldSpeak, setShouldSpeak ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( shouldSpeak ) {\n\t\t\tspeak(\n\t\t\t\t__( 'Use left and right arrow keys to move through blocks' )\n\t\t\t);\n\t\t}\n\t}, [ shouldSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\trole=\"listbox\"\n\t\t\taria-orientation=\"horizontal\"\n\t\t\tonFocus={ () => {\n\t\t\t\tsetShouldSpeak( true );\n\t\t\t} }\n\t\t\tonBlur={ ( event ) => {\n\t\t\t\tconst focusingOutsideGroup = ! event.currentTarget.contains(\n\t\t\t\t\tevent.relatedTarget\n\t\t\t\t);\n\t\t\t\tif ( focusingOutsideGroup ) {\n\t\t\t\t\tsetShouldSpeak( false );\n\t\t\t\t}\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( InserterListboxGroup );\n","/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { __unstableCompositeGroup as CompositeGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport InserterListboxContext from './context';\n\nfunction InserterListboxRow( props, ref ) {\n\tconst state = useContext( InserterListboxContext );\n\treturn (\n\t\t<CompositeGroup\n\t\t\tstate={ state }\n\t\t\trole=\"presentation\"\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( InserterListboxRow );\n","/**\n * WordPress dependencies\n */\nimport { getBlockMenuDefaultClassName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport InserterListItem from '../inserter-list-item';\nimport { InserterListboxGroup, InserterListboxRow } from '../inserter-listbox';\n\nfunction chunk( array, size ) {\n\tconst chunks = [];\n\tfor ( let i = 0, j = array.length; i < j; i += size ) {\n\t\tchunks.push( array.slice( i, i + size ) );\n\t}\n\treturn chunks;\n}\n\nfunction BlockTypesList( {\n\titems = [],\n\tonSelect,\n\tonHover = () => {},\n\tchildren,\n\tlabel,\n\tisDraggable = true,\n} ) {\n\treturn (\n\t\t<InserterListboxGroup\n\t\t\tclassName=\"block-editor-block-types-list\"\n\t\t\taria-label={ label }\n\t\t>\n\t\t\t{ chunk( items, 3 ).map( ( row, i ) => (\n\t\t\t\t<InserterListboxRow key={ i }>\n\t\t\t\t\t{ row.map( ( item, j ) => (\n\t\t\t\t\t\t<InserterListItem\n\t\t\t\t\t\t\tkey={ item.id }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tclassName={ getBlockMenuDefaultClassName(\n\t\t\t\t\t\t\t\titem.id\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tisDraggable={ isDraggable && ! item.isDisabled }\n\t\t\t\t\t\t\tisFirst={ i === 0 && j === 0 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</InserterListboxRow>\n\t\t\t) ) }\n\t\t\t{ children }\n\t\t</InserterListboxGroup>\n\t);\n}\n\nexport default BlockTypesList;\n","/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nfunction InserterPanel( { title, icon, children } ) {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"block-editor-inserter__panel-header\">\n\t\t\t\t<h2 className=\"block-editor-inserter__panel-title\">\n\t\t\t\t\t{ title }\n\t\t\t\t</h2>\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t</div>\n\t\t\t<div className=\"block-editor-inserter__panel-content\">\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default InserterPanel;\n","/**\n * WordPress dependencies\n */\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Retrieves the block types inserter state.\n *\n * @param {string=}  rootClientId Insertion's root client ID.\n * @param {Function} onInsert     function called when inserter a list of blocks.\n * @return {Array} Returns the block types state. (block types, categories, collections, onSelect handler)\n */\nconst useBlockTypesState = ( rootClientId, onInsert ) => {\n\tconst { categories, collections, items } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getInserterItems } = select( blockEditorStore );\n\t\t\tconst { getCategories, getCollections } = select( blocksStore );\n\n\t\t\treturn {\n\t\t\t\tcategories: getCategories(),\n\t\t\t\tcollections: getCollections(),\n\t\t\t\titems: getInserterItems( rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\tconst onSelectItem = useCallback(\n\t\t( { name, initialAttributes, innerBlocks }, shouldFocusBlock ) => {\n\t\t\tconst insertedBlock = createBlock(\n\t\t\t\tname,\n\t\t\t\tinitialAttributes,\n\t\t\t\tcreateBlocksFromInnerBlocksTemplate( innerBlocks )\n\t\t\t);\n\n\t\t\tonInsert( insertedBlock, undefined, shouldFocusBlock );\n\t\t},\n\t\t[ onInsert ]\n\t);\n\n\treturn [ items, categories, collections, onSelectItem ];\n};\n\nexport default useBlockTypesState;\n","/**\n * WordPress dependencies\n */\nimport { __unstableUseCompositeState as useCompositeState } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport InserterListboxContext from './context';\n\nexport { default as InserterListboxGroup } from './group';\nexport { default as InserterListboxRow } from './row';\nexport { default as InserterListboxItem } from './item';\n\nfunction InserterListbox( { children } ) {\n\tconst compositeState = useCompositeState( {\n\t\tshift: true,\n\t\twrap: 'horizontal',\n\t} );\n\treturn (\n\t\t<InserterListboxContext.Provider value={ compositeState }>\n\t\t\t{ children }\n\t\t</InserterListboxContext.Provider>\n\t);\n}\n\nexport default InserterListbox;\n","/**\n * External dependencies\n */\nimport { map, groupBy, orderBy } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { pipe, useAsyncList } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport InserterPanel from './panel';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport InserterListbox from '../inserter-listbox';\n\nconst getBlockNamespace = ( item ) => item.name.split( '/' )[ 0 ];\n\nconst MAX_SUGGESTED_ITEMS = 6;\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 and rerendering the component.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\nexport function BlockTypesTab( {\n\trootClientId,\n\tonInsert,\n\tonHover,\n\tshowMostUsedBlocks,\n} ) {\n\tconst [ items, categories, collections, onSelectItem ] = useBlockTypesState(\n\t\trootClientId,\n\t\tonInsert\n\t);\n\n\tconst suggestedItems = useMemo( () => {\n\t\treturn orderBy( items, [ 'frecency' ], [ 'desc' ] ).slice(\n\t\t\t0,\n\t\t\tMAX_SUGGESTED_ITEMS\n\t\t);\n\t}, [ items ] );\n\n\tconst uncategorizedItems = useMemo( () => {\n\t\treturn items.filter( ( item ) => ! item.category );\n\t}, [ items ] );\n\n\tconst itemsPerCategory = useMemo( () => {\n\t\treturn pipe(\n\t\t\t( itemList ) =>\n\t\t\t\titemList.filter(\n\t\t\t\t\t( item ) => item.category && item.category !== 'reusable'\n\t\t\t\t),\n\t\t\t( itemList ) => groupBy( itemList, 'category' )\n\t\t)( items );\n\t}, [ items ] );\n\n\tconst itemsPerCollection = useMemo( () => {\n\t\t// Create a new Object to avoid mutating collection.\n\t\tconst result = { ...collections };\n\t\tObject.keys( collections ).forEach( ( namespace ) => {\n\t\t\tresult[ namespace ] = items.filter(\n\t\t\t\t( item ) => getBlockNamespace( item ) === namespace\n\t\t\t);\n\t\t\tif ( result[ namespace ].length === 0 ) {\n\t\t\t\tdelete result[ namespace ];\n\t\t\t}\n\t\t} );\n\n\t\treturn result;\n\t}, [ items, collections ] );\n\n\t// Hide block preview on unmount.\n\tuseEffect( () => () => onHover( null ), [] );\n\n\t/**\n\t * The inserter contains a big number of blocks and opening it is a costful operation.\n\t * The rendering is the most costful part of it, in order to improve the responsiveness\n\t * of the \"opening\" action, these lazy lists allow us to render the inserter category per category,\n\t * once all the categories are rendered, we start rendering the collections and the uncategorized block types.\n\t */\n\tconst currentlyRenderedCategories = useAsyncList( categories );\n\tconst didRenderAllCategories =\n\t\tcategories.length === currentlyRenderedCategories.length;\n\n\t// Async List requires an array.\n\tconst collectionEntries = useMemo( () => {\n\t\treturn Object.entries( collections );\n\t}, [ collections ] );\n\tconst currentlyRenderedCollections = useAsyncList(\n\t\tdidRenderAllCategories ? collectionEntries : EMPTY_ARRAY\n\t);\n\n\treturn (\n\t\t<InserterListbox>\n\t\t\t<div>\n\t\t\t\t{ showMostUsedBlocks && !! suggestedItems.length && (\n\t\t\t\t\t<InserterPanel title={ _x( 'Most used', 'blocks' ) }>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ suggestedItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ _x( 'Most used', 'blocks' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t) }\n\n\t\t\t\t{ map( currentlyRenderedCategories, ( category ) => {\n\t\t\t\t\tconst categoryItems = itemsPerCategory[ category.slug ];\n\t\t\t\t\tif ( ! categoryItems || ! categoryItems.length ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\t\ttitle={ category.title }\n\t\t\t\t\t\t\ticon={ category.icon }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\titems={ categoryItems }\n\t\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\t\tlabel={ category.title }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</InserterPanel>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\n\t\t\t\t{ didRenderAllCategories && uncategorizedItems.length > 0 && (\n\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\tclassName=\"block-editor-inserter__uncategorized-blocks-panel\"\n\t\t\t\t\t\ttitle={ __( 'Uncategorized' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\titems={ uncategorizedItems }\n\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\tlabel={ __( 'Uncategorized' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</InserterPanel>\n\t\t\t\t) }\n\n\t\t\t\t{ map(\n\t\t\t\t\tcurrentlyRenderedCollections,\n\t\t\t\t\t( [ namespace, collection ] ) => {\n\t\t\t\t\t\tconst collectionItems = itemsPerCollection[ namespace ];\n\t\t\t\t\t\tif ( ! collectionItems || ! collectionItems.length ) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<InserterPanel\n\t\t\t\t\t\t\t\tkey={ namespace }\n\t\t\t\t\t\t\t\ttitle={ collection.title }\n\t\t\t\t\t\t\t\ticon={ collection.icon }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockTypesList\n\t\t\t\t\t\t\t\t\titems={ collectionItems }\n\t\t\t\t\t\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\t\t\tlabel={ collection.title }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</InserterPanel>\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</InserterListbox>\n\t);\n}\n\nexport default BlockTypesTab;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Flex, FlexItem, SelectControl, Button } from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\n\nfunction PatternInserterPanel( {\n\tselectedCategory,\n\tpatternCategories,\n\tonClickCategory,\n\topenPatternExplorer,\n} ) {\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\tconst categoryOptions = () => {\n\t\tconst options = [];\n\n\t\tpatternCategories.map( ( patternCategory ) => {\n\t\t\treturn options.push( {\n\t\t\t\tvalue: patternCategory.name,\n\t\t\t\tlabel: patternCategory.label,\n\t\t\t} );\n\t\t} );\n\n\t\treturn options;\n\t};\n\n\tconst onChangeSelect = ( selected ) => {\n\t\tonClickCategory(\n\t\t\tpatternCategories.find(\n\t\t\t\t( patternCategory ) => selected === patternCategory.name\n\t\t\t)\n\t\t);\n\t};\n\n\tconst className = classnames(\n\t\t'block-editor-inserter__panel-header',\n\t\t'block-editor-inserter__panel-header-patterns'\n\t);\n\n\t// In iOS-based mobile devices, the onBlur will fire when selecting an option\n\t// from a Select element. To prevent closing the useDialog on iOS devices, we\n\t// stop propagating the onBlur event if there is no relatedTarget, which means\n\t// that the user most likely did not click on an element within the editor canvas.\n\tconst onBlur = ( event ) => {\n\t\tif ( ! event?.relatedTarget ) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\t};\n\n\treturn (\n\t\t<Flex\n\t\t\tjustify=\"space-between\"\n\t\t\talign=\"start\"\n\t\t\tgap=\"4\"\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<FlexItem isBlock>\n\t\t\t\t<SelectControl\n\t\t\t\t\tclassName=\"block-editor-inserter__panel-dropdown\"\n\t\t\t\t\tlabel={ __( 'Filter patterns' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\tvalue={ selectedCategory.name }\n\t\t\t\t\tonChange={ onChangeSelect }\n\t\t\t\t\tonBlur={ onBlur }\n\t\t\t\t\toptions={ categoryOptions() }\n\t\t\t\t/>\n\t\t\t</FlexItem>\n\t\t\t{ ! isMobile && (\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\tclassName=\"block-editor-inserter__patterns-explorer-expand\"\n\t\t\t\t\t\tlabel={ __( 'Explore all patterns' ) }\n\t\t\t\t\t\tonClick={ () => openPatternExplorer() }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ _x(\n\t\t\t\t\t\t\t'Explore',\n\t\t\t\t\t\t\t'Label for showing all block patterns'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t) }\n\t\t</Flex>\n\t);\n}\n\nexport default PatternInserterPanel;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { cloneBlock } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * Retrieves the block patterns inserter state.\n *\n * @param {Function} onInsert     function called when inserter a list of blocks.\n * @param {string=}  rootClientId Insertion's root client ID.\n *\n * @return {Array} Returns the patterns state. (patterns, categories, onSelect handler)\n */\nconst usePatternsState = ( onInsert, rootClientId ) => {\n\tconst { patternCategories, patterns } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __experimentalGetAllowedPatterns, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tpatterns: __experimentalGetAllowedPatterns( rootClientId ),\n\t\t\t\tpatternCategories:\n\t\t\t\t\tgetSettings().__experimentalBlockPatternCategories,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst onClickPattern = useCallback( ( pattern, blocks ) => {\n\t\tonInsert(\n\t\t\tmap( blocks, ( block ) => cloneBlock( block ) ),\n\t\t\tpattern.name\n\t\t);\n\t\tcreateSuccessNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: block pattern title. */\n\t\t\t\t__( 'Block pattern \"%s\" inserted.' ),\n\t\t\t\tpattern.title\n\t\t\t),\n\t\t\t{\n\t\t\t\ttype: 'snackbar',\n\t\t\t}\n\t\t);\n\t}, [] );\n\n\treturn [ patterns, patternCategories, onClickPattern ];\n};\n\nexport default usePatternsState;\n","/**\n * WordPress dependencies\n */\nimport {\n\tVisuallyHidden,\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\nimport InserterDraggableBlocks from '../inserter-draggable-blocks';\n\nfunction BlockPattern( { isDraggable, pattern, onClick, composite } ) {\n\tconst { blocks, viewportWidth } = pattern;\n\tconst instanceId = useInstanceId( BlockPattern );\n\tconst descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`;\n\n\treturn (\n\t\t<InserterDraggableBlocks isEnabled={ isDraggable } blocks={ blocks }>\n\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"block-editor-block-patterns-list__list-item\"\n\t\t\t\t\taria-label={ pattern.title }\n\t\t\t\t\taria-describedby={\n\t\t\t\t\t\tpattern.description ? descriptionId : undefined\n\t\t\t\t\t}\n\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\tonDragStart={ onDragStart }\n\t\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\t>\n\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\tas=\"div\"\n\t\t\t\t\t\t{ ...composite }\n\t\t\t\t\t\tclassName=\"block-editor-block-patterns-list__item\"\n\t\t\t\t\t\tonClick={ () => onClick( pattern, blocks ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockPreview\n\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div className=\"block-editor-block-patterns-list__item-title\">\n\t\t\t\t\t\t\t{ pattern.title }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{ !! pattern.description && (\n\t\t\t\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t\t\t\t{ pattern.description }\n\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</CompositeItem>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</InserterDraggableBlocks>\n\t);\n}\n\nfunction BlockPatternPlaceholder() {\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-list__item is-placeholder\" />\n\t);\n}\n\nfunction BlockPatternList( {\n\tisDraggable,\n\tblockPatterns,\n\tshownPatterns,\n\tonClickPattern,\n\torientation,\n\tlabel = __( 'Block Patterns' ),\n} ) {\n\tconst composite = useCompositeState( { orientation } );\n\treturn (\n\t\t<Composite\n\t\t\t{ ...composite }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-patterns-list\"\n\t\t\taria-label={ label }\n\t\t>\n\t\t\t{ blockPatterns.map( ( pattern ) => {\n\t\t\t\tconst isShown = shownPatterns.includes( pattern );\n\t\t\t\treturn isShown ? (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonClick={ onClickPattern }\n\t\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t\t\tcomposite={ composite }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<BlockPatternPlaceholder key={ pattern.name } />\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Composite>\n\t);\n}\n\nexport default BlockPatternList;\n","/**\n * WordPress dependencies\n */\nimport { Button, SearchControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nfunction PatternCategoriesList( {\n\tselectedCategory,\n\tpatternCategories,\n\tonClickCategory,\n} ) {\n\tconst baseClassName = 'block-editor-block-patterns-explorer__sidebar';\n\treturn (\n\t\t<div className={ `${ baseClassName }__categories-list` }>\n\t\t\t{ patternCategories.map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tclassName={ `${ baseClassName }__categories-list__item` }\n\t\t\t\t\t\tisPressed={ selectedCategory === name }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonClickCategory( name );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n\nfunction PatternsExplorerSearch( { filterValue, setFilterValue } ) {\n\tconst baseClassName = 'block-editor-block-patterns-explorer__search';\n\treturn (\n\t\t<div className={ baseClassName }>\n\t\t\t<SearchControl\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for patterns' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction PatternExplorerSidebar( {\n\tselectedCategory,\n\tpatternCategories,\n\tonClickCategory,\n\tfilterValue,\n\tsetFilterValue,\n} ) {\n\tconst baseClassName = 'block-editor-block-patterns-explorer__sidebar';\n\treturn (\n\t\t<div className={ baseClassName }>\n\t\t\t<PatternsExplorerSearch\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tsetFilterValue={ setFilterValue }\n\t\t\t/>\n\t\t\t{ ! filterValue && (\n\t\t\t\t<PatternCategoriesList\n\t\t\t\t\tselectedCategory={ selectedCategory }\n\t\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t\t\tonClickCategory={ onClickCategory }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default PatternExplorerSidebar;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Icon, blockDefault } from '@wordpress/icons';\n\nfunction InserterNoResults() {\n\treturn (\n\t\t<div className=\"block-editor-inserter__no-results\">\n\t\t\t<Icon\n\t\t\t\tclassName=\"block-editor-inserter__no-results-icon\"\n\t\t\t\ticon={ blockDefault }\n\t\t\t/>\n\t\t\t<p>{ __( 'No results found.' ) }</p>\n\t\t</div>\n\t);\n}\n\nexport default InserterNoResults;\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../../store';\n\n/**\n * @typedef WPInserterConfig\n *\n * @property {string=}   rootClientId   If set, insertion will be into the\n *                                      block with this ID.\n * @property {number=}   insertionIndex If set, insertion will be into this\n *                                      explicit position.\n * @property {string=}   clientId       If set, insertion will be after the\n *                                      block with this ID.\n * @property {boolean=}  isAppender     Whether the inserter is an appender\n *                                      or not.\n * @property {Function=} onSelect       Called after insertion.\n */\n\n/**\n * Returns the insertion point state given the inserter config.\n *\n * @param {WPInserterConfig} config Inserter Config.\n * @return {Array} Insertion Point State (rootClientID, onInsertBlocks and onToggle).\n */\nfunction useInsertionPoint( {\n\trootClientId = '',\n\tinsertionIndex,\n\tclientId,\n\tisAppender,\n\tonSelect,\n\tshouldFocusBlock = true,\n} ) {\n\tconst { getSelectedBlock } = useSelect( blockEditorStore );\n\tconst { destinationRootClientId, destinationIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\n\t\t\tlet _destinationRootClientId = rootClientId;\n\t\t\tlet _destinationIndex;\n\n\t\t\tif ( insertionIndex !== undefined ) {\n\t\t\t\t// Insert into a specific index.\n\t\t\t\t_destinationIndex = insertionIndex;\n\t\t\t} else if ( clientId ) {\n\t\t\t\t// Insert after a specific client ID.\n\t\t\t\t_destinationIndex = getBlockIndex( clientId );\n\t\t\t} else if ( ! isAppender && selectedBlockClientId ) {\n\t\t\t\t_destinationRootClientId = getBlockRootClientId(\n\t\t\t\t\tselectedBlockClientId\n\t\t\t\t);\n\t\t\t\t_destinationIndex = getBlockIndex( selectedBlockClientId ) + 1;\n\t\t\t} else {\n\t\t\t\t// Insert at the end of the list.\n\t\t\t\t_destinationIndex = getBlockOrder(\n\t\t\t\t\t_destinationRootClientId\n\t\t\t\t).length;\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tdestinationRootClientId: _destinationRootClientId,\n\t\t\t\tdestinationIndex: _destinationIndex,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId, insertionIndex, clientId, isAppender ]\n\t);\n\n\tconst {\n\t\treplaceBlocks,\n\t\tinsertBlocks,\n\t\tshowInsertionPoint,\n\t\thideInsertionPoint,\n\t} = useDispatch( blockEditorStore );\n\n\tconst onInsertBlocks = useCallback(\n\t\t( blocks, meta, shouldForceFocusBlock = false ) => {\n\t\t\tconst selectedBlock = getSelectedBlock();\n\n\t\t\tif (\n\t\t\t\t! isAppender &&\n\t\t\t\tselectedBlock &&\n\t\t\t\tisUnmodifiedDefaultBlock( selectedBlock )\n\t\t\t) {\n\t\t\t\treplaceBlocks(\n\t\t\t\t\tselectedBlock.clientId,\n\t\t\t\t\tblocks,\n\t\t\t\t\tnull,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tinsertBlocks(\n\t\t\t\t\tblocks,\n\t\t\t\t\tdestinationIndex,\n\t\t\t\t\tdestinationRootClientId,\n\t\t\t\t\ttrue,\n\t\t\t\t\tshouldFocusBlock || shouldForceFocusBlock ? 0 : null,\n\t\t\t\t\tmeta\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst message = sprintf(\n\t\t\t\t// translators: %d: the name of the block that has been added\n\t\t\t\t_n(\n\t\t\t\t\t'%d block added.',\n\t\t\t\t\t'%d blocks added.',\n\t\t\t\t\tcastArray( blocks ).length\n\t\t\t\t),\n\t\t\t\tcastArray( blocks ).length\n\t\t\t);\n\t\t\tspeak( message );\n\n\t\t\tif ( onSelect ) {\n\t\t\t\tonSelect();\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tisAppender,\n\t\t\tgetSelectedBlock,\n\t\t\treplaceBlocks,\n\t\t\tinsertBlocks,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t\tonSelect,\n\t\t\tshouldFocusBlock,\n\t\t]\n\t);\n\n\tconst onToggleInsertionPoint = useCallback(\n\t\t( show ) => {\n\t\t\tif ( show ) {\n\t\t\t\tshowInsertionPoint( destinationRootClientId, destinationIndex );\n\t\t\t} else {\n\t\t\t\thideInsertionPoint();\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tdestinationRootClientId,\n\t\t\tdestinationIndex,\n\t\t]\n\t);\n\n\treturn [ destinationRootClientId, onInsertBlocks, onToggleInsertionPoint ];\n}\n\nexport default useInsertionPoint;\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\nimport { find, words } from 'lodash';\n\n// Default search helpers.\nconst defaultGetName = ( item ) => item.name || '';\nconst defaultGetTitle = ( item ) => item.title;\nconst defaultGetDescription = ( item ) => item.description || '';\nconst defaultGetKeywords = ( item ) => item.keywords || [];\nconst defaultGetCategory = ( item ) => item.category;\nconst defaultGetCollection = () => null;\n\n/**\n * Sanitizes the search input string.\n *\n * @param {string} input The search input to normalize.\n *\n * @return {string} The normalized search input.\n */\nfunction normalizeSearchInput( input = '' ) {\n\t// Disregard diacritics.\n\t//  Input: \"média\"\n\tinput = removeAccents( input );\n\n\t// Accommodate leading slash, matching autocomplete expectations.\n\t//  Input: \"/media\"\n\tinput = input.replace( /^\\//, '' );\n\n\t// Lowercase.\n\t//  Input: \"MEDIA\"\n\tinput = input.toLowerCase();\n\n\treturn input;\n}\n\n/**\n * Converts the search term into a list of normalized terms.\n *\n * @param {string} input The search term to normalize.\n *\n * @return {string[]} The normalized list of search terms.\n */\nexport const getNormalizedSearchTerms = ( input = '' ) => {\n\treturn words( normalizeSearchInput( input ) );\n};\n\nconst removeMatchingTerms = ( unmatchedTerms, unprocessedTerms ) => {\n\treturn unmatchedTerms.filter(\n\t\t( term ) =>\n\t\t\t! getNormalizedSearchTerms( unprocessedTerms ).some(\n\t\t\t\t( unprocessedTerm ) => unprocessedTerm.includes( term )\n\t\t\t)\n\t);\n};\n\nexport const searchBlockItems = (\n\titems,\n\tcategories,\n\tcollections,\n\tsearchInput\n) => {\n\tconst normalizedSearchTerms = getNormalizedSearchTerms( searchInput );\n\tif ( normalizedSearchTerms.length === 0 ) {\n\t\treturn items;\n\t}\n\n\tconst config = {\n\t\tgetCategory: ( item ) =>\n\t\t\tfind( categories, { slug: item.category } )?.title,\n\t\tgetCollection: ( item ) =>\n\t\t\tcollections[ item.name.split( '/' )[ 0 ] ]?.title,\n\t};\n\n\treturn searchItems( items, searchInput, config );\n};\n\n/**\n * Filters an item list given a search term.\n *\n * @param {Array}  items       Item list\n * @param {string} searchInput Search input.\n * @param {Object} config      Search Config.\n *\n * @return {Array} Filtered item list.\n */\nexport const searchItems = ( items = [], searchInput = '', config = {} ) => {\n\tconst normalizedSearchTerms = getNormalizedSearchTerms( searchInput );\n\tif ( normalizedSearchTerms.length === 0 ) {\n\t\treturn items;\n\t}\n\n\tconst rankedItems = items\n\t\t.map( ( item ) => {\n\t\t\treturn [ item, getItemSearchRank( item, searchInput, config ) ];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > 0 );\n\n\trankedItems.sort( ( [ , rank1 ], [ , rank2 ] ) => rank2 - rank1 );\n\treturn rankedItems.map( ( [ item ] ) => item );\n};\n\n/**\n * Get the search rank for a given item and a specific search term.\n * The better the match, the higher the rank.\n * If the rank equals 0, it should be excluded from the results.\n *\n * @param {Object} item       Item to filter.\n * @param {string} searchTerm Search term.\n * @param {Object} config     Search Config.\n *\n * @return {number} Search Rank.\n */\nexport function getItemSearchRank( item, searchTerm, config = {} ) {\n\tconst {\n\t\tgetName = defaultGetName,\n\t\tgetTitle = defaultGetTitle,\n\t\tgetDescription = defaultGetDescription,\n\t\tgetKeywords = defaultGetKeywords,\n\t\tgetCategory = defaultGetCategory,\n\t\tgetCollection = defaultGetCollection,\n\t} = config;\n\n\tconst name = getName( item );\n\tconst title = getTitle( item );\n\tconst description = getDescription( item );\n\tconst keywords = getKeywords( item );\n\tconst category = getCategory( item );\n\tconst collection = getCollection( item );\n\n\tconst normalizedSearchInput = normalizeSearchInput( searchTerm );\n\tconst normalizedTitle = normalizeSearchInput( title );\n\n\tlet rank = 0;\n\n\t// Prefers exact matches\n\t// Then prefers if the beginning of the title matches the search term\n\t// name, keywords, categories, collection, variations match come later.\n\tif ( normalizedSearchInput === normalizedTitle ) {\n\t\trank += 30;\n\t} else if ( normalizedTitle.startsWith( normalizedSearchInput ) ) {\n\t\trank += 20;\n\t} else {\n\t\tconst terms = [\n\t\t\tname,\n\t\t\ttitle,\n\t\t\tdescription,\n\t\t\t...keywords,\n\t\t\tcategory,\n\t\t\tcollection,\n\t\t].join( ' ' );\n\t\tconst normalizedSearchTerms = words( normalizedSearchInput );\n\t\tconst unmatchedTerms = removeMatchingTerms(\n\t\t\tnormalizedSearchTerms,\n\t\t\tterms\n\t\t);\n\n\t\tif ( unmatchedTerms.length === 0 ) {\n\t\t\trank += 10;\n\t\t}\n\t}\n\n\t// Give a better rank to \"core\" namespaced items.\n\tif ( rank !== 0 && name.startsWith( 'core/' ) ) {\n\t\tconst isCoreBlockVariation = name !== item.id;\n\t\t// Give a bit better rank to \"core\" blocks over \"core\" block variations.\n\t\trank += isCoreBlockVariation ? 1 : 2;\n\t}\n\n\treturn rank;\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { _n, sprintf } from '@wordpress/i18n';\nimport { useDebounce, useAsyncList } from '@wordpress/compose';\nimport { __experimentalHeading as Heading } from '@wordpress/components';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport BlockPatternsList from '../../block-patterns-list';\nimport InserterNoResults from '../no-results';\nimport useInsertionPoint from '../hooks/use-insertion-point';\nimport usePatternsState from '../hooks/use-patterns-state';\nimport InserterListbox from '../../inserter-listbox';\nimport { searchItems } from '../search-items';\n\nconst INITIAL_INSERTER_RESULTS = 2;\n\nfunction PatternsListHeader( { filterValue, filteredBlockPatternsLength } ) {\n\tif ( ! filterValue ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<Heading\n\t\t\tlevel={ 2 }\n\t\t\tlineHeight={ '48px' }\n\t\t\tclassName=\"block-editor-block-patterns-explorer__search-results-count\"\n\t\t>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %d: number of patterns. %s: block pattern search query */\n\t\t\t\t_n(\n\t\t\t\t\t'%1$d pattern found for \"%2$s\"',\n\t\t\t\t\t'%1$d patterns found for \"%2$s\"',\n\t\t\t\t\tfilteredBlockPatternsLength\n\t\t\t\t),\n\t\t\t\tfilteredBlockPatternsLength,\n\t\t\t\tfilterValue\n\t\t\t) }\n\t\t</Heading>\n\t);\n}\n\nfunction PatternList( { filterValue, selectedCategory, patternCategories } ) {\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tshouldFocusBlock: true,\n\t} );\n\tconst [ allPatterns, , onSelectBlockPattern ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\tconst registeredPatternCategories = useMemo(\n\t\t() =>\n\t\t\tpatternCategories.map(\n\t\t\t\t( patternCategory ) => patternCategory.name\n\t\t\t),\n\t\t[ patternCategories ]\n\t);\n\n\tconst filteredBlockPatterns = useMemo( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn allPatterns.filter( ( pattern ) =>\n\t\t\t\tselectedCategory === 'uncategorized'\n\t\t\t\t\t? ! pattern.categories?.length ||\n\t\t\t\t\t  pattern.categories.every(\n\t\t\t\t\t\t\t( category ) =>\n\t\t\t\t\t\t\t\t! registeredPatternCategories.includes(\n\t\t\t\t\t\t\t\t\tcategory\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t  )\n\t\t\t\t\t: pattern.categories?.includes( selectedCategory )\n\t\t\t);\n\t\t}\n\t\treturn searchItems( allPatterns, filterValue );\n\t}, [ filterValue, selectedCategory, allPatterns ] );\n\n\t// Announce search results on change.\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\tconst count = filteredBlockPatterns.length;\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.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\tconst currentShownPatterns = useAsyncList( filteredBlockPatterns, {\n\t\tstep: INITIAL_INSERTER_RESULTS,\n\t} );\n\n\tconst hasItems = !! filteredBlockPatterns?.length;\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-explorer__list\">\n\t\t\t{ hasItems && (\n\t\t\t\t<PatternsListHeader\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tfilteredBlockPatternsLength={ filteredBlockPatterns.length }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<InserterListbox>\n\t\t\t\t{ ! hasItems && <InserterNoResults /> }\n\t\t\t\t{ hasItems && (\n\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\tshownPatterns={ currentShownPatterns }\n\t\t\t\t\t\tblockPatterns={ filteredBlockPatterns }\n\t\t\t\t\t\tonClickPattern={ onSelectBlockPattern }\n\t\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InserterListbox>\n\t\t</div>\n\t);\n}\n\nexport default PatternList;\n","/**\n * WordPress dependencies\n */\nimport { Modal } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport PatternExplorerSidebar from './sidebar';\nimport PatternList from './patterns-list';\n\nfunction PatternsExplorer( { initialCategory, patternCategories } ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ selectedCategory, setSelectedCategory ] = useState(\n\t\tinitialCategory?.name\n\t);\n\treturn (\n\t\t<div className=\"block-editor-block-patterns-explorer\">\n\t\t\t<PatternExplorerSidebar\n\t\t\t\tselectedCategory={ selectedCategory }\n\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t\tonClickCategory={ setSelectedCategory }\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tsetFilterValue={ setFilterValue }\n\t\t\t/>\n\t\t\t<PatternList\n\t\t\t\tfilterValue={ filterValue }\n\t\t\t\tselectedCategory={ selectedCategory }\n\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction PatternsExplorerModal( { onModalClose, ...restProps } ) {\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tcloseLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ onModalClose }\n\t\t\tisFullScreen\n\t\t>\n\t\t\t<PatternsExplorer { ...restProps } />\n\t\t</Modal>\n\t);\n}\n\nexport default PatternsExplorerModal;\n","/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\nimport { _x } from '@wordpress/i18n';\nimport { useAsyncList } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PatternInserterPanel from './pattern-panel';\nimport usePatternsState from './hooks/use-patterns-state';\nimport BlockPatternList from '../block-patterns-list';\nimport PatternsExplorerModal from './block-patterns-explorer/explorer';\n\nfunction BlockPatternsCategory( {\n\trootClientId,\n\tonInsert,\n\tselectedCategory,\n\tpopulatedCategories,\n} ) {\n\tconst [ allPatterns, , onClick ] = usePatternsState(\n\t\tonInsert,\n\t\trootClientId\n\t);\n\n\tconst getPatternIndex = useCallback(\n\t\t( pattern ) => {\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\treturn Infinity;\n\t\t\t}\n\t\t\tconst indexedCategories = populatedCategories.reduce(\n\t\t\t\t( accumulator, { name }, index ) => {\n\t\t\t\t\taccumulator[ name ] = index;\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t\treturn Math.min(\n\t\t\t\t...pattern.categories.map( ( cat ) =>\n\t\t\t\t\tindexedCategories[ cat ] !== undefined\n\t\t\t\t\t\t? indexedCategories[ cat ]\n\t\t\t\t\t\t: Infinity\n\t\t\t\t)\n\t\t\t);\n\t\t},\n\t\t[ populatedCategories ]\n\t);\n\n\tconst currentCategoryPatterns = useMemo(\n\t\t() =>\n\t\t\tallPatterns.filter( ( pattern ) =>\n\t\t\t\tselectedCategory.name === 'uncategorized'\n\t\t\t\t\t? getPatternIndex( pattern ) === Infinity\n\t\t\t\t\t: pattern.categories?.includes( selectedCategory.name )\n\t\t\t),\n\t\t[ allPatterns, selectedCategory ]\n\t);\n\n\t// Ordering the patterns is important for the async rendering.\n\tconst orderedPatterns = useMemo( () => {\n\t\treturn currentCategoryPatterns.sort( ( a, b ) => {\n\t\t\treturn getPatternIndex( a ) - getPatternIndex( b );\n\t\t} );\n\t}, [ currentCategoryPatterns, getPatternIndex ] );\n\n\tconst currentShownPatterns = useAsyncList( orderedPatterns );\n\n\tif ( ! currentCategoryPatterns.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"block-editor-inserter__panel-content\">\n\t\t\t<BlockPatternList\n\t\t\t\tshownPatterns={ currentShownPatterns }\n\t\t\t\tblockPatterns={ currentCategoryPatterns }\n\t\t\t\tonClickPattern={ onClick }\n\t\t\t\tlabel={ selectedCategory.label }\n\t\t\t\torientation=\"vertical\"\n\t\t\t\tisDraggable\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nfunction BlockPatternsTabs( {\n\trootClientId,\n\tonInsert,\n\tonClickCategory,\n\tselectedCategory,\n} ) {\n\tconst [ showPatternsExplorer, setShowPatternsExplorer ] = useState( false );\n\tconst [ allPatterns, allCategories ] = usePatternsState();\n\n\tconst hasRegisteredCategory = useCallback(\n\t\t( pattern ) => {\n\t\t\tif ( ! pattern.categories || ! pattern.categories.length ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn pattern.categories.some( ( cat ) =>\n\t\t\t\tallCategories.some( ( category ) => category.name === cat )\n\t\t\t);\n\t\t},\n\t\t[ allCategories ]\n\t);\n\n\t// Remove any empty categories.\n\tconst populatedCategories = useMemo( () => {\n\t\tconst categories = allCategories\n\t\t\t.filter( ( category ) =>\n\t\t\t\tallPatterns.some( ( pattern ) =>\n\t\t\t\t\tpattern.categories?.includes( category.name )\n\t\t\t\t)\n\t\t\t)\n\t\t\t.sort( ( { name: currentName }, { name: nextName } ) => {\n\t\t\t\tif ( ! [ currentName, nextName ].includes( 'featured' ) ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\treturn currentName === 'featured' ? -1 : 1;\n\t\t\t} );\n\n\t\tif (\n\t\t\tallPatterns.some(\n\t\t\t\t( pattern ) => ! hasRegisteredCategory( pattern )\n\t\t\t) &&\n\t\t\t! categories.find(\n\t\t\t\t( category ) => category.name === 'uncategorized'\n\t\t\t)\n\t\t) {\n\t\t\tcategories.push( {\n\t\t\t\tname: 'uncategorized',\n\t\t\t\tlabel: _x( 'Uncategorized' ),\n\t\t\t} );\n\t\t}\n\n\t\treturn categories;\n\t}, [ allPatterns, allCategories ] );\n\n\tconst patternCategory = selectedCategory\n\t\t? selectedCategory\n\t\t: populatedCategories[ 0 ];\n\n\treturn (\n\t\t<>\n\t\t\t<PatternInserterPanel\n\t\t\t\tselectedCategory={ patternCategory }\n\t\t\t\tpatternCategories={ populatedCategories }\n\t\t\t\tonClickCategory={ onClickCategory }\n\t\t\t\topenPatternExplorer={ () => setShowPatternsExplorer( true ) }\n\t\t\t/>\n\t\t\t{ ! showPatternsExplorer && (\n\t\t\t\t<BlockPatternsCategory\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tonInsert={ onInsert }\n\t\t\t\t\tselectedCategory={ patternCategory }\n\t\t\t\t\tpopulatedCategories={ populatedCategories }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showPatternsExplorer && (\n\t\t\t\t<PatternsExplorerModal\n\t\t\t\t\tinitialCategory={ patternCategory }\n\t\t\t\t\tpatternCategories={ populatedCategories }\n\t\t\t\t\tonModalClose={ () => setShowPatternsExplorer( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default BlockPatternsTabs;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { addQueryArgs } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport InserterPanel from './panel';\nimport InserterNoResults from './no-results';\nimport useBlockTypesState from './hooks/use-block-types-state';\n\nfunction ReusableBlocksList( { onHover, onInsert, rootClientId } ) {\n\tconst [ items, , , onSelectItem ] = useBlockTypesState(\n\t\trootClientId,\n\t\tonInsert\n\t);\n\n\tconst filteredItems = useMemo( () => {\n\t\treturn items.filter( ( { category } ) => category === 'reusable' );\n\t}, [ items ] );\n\n\tif ( filteredItems.length === 0 ) {\n\t\treturn <InserterNoResults />;\n\t}\n\n\treturn (\n\t\t<InserterPanel title={ __( 'Reusable blocks' ) }>\n\t\t\t<BlockTypesList\n\t\t\t\titems={ filteredItems }\n\t\t\t\tonSelect={ onSelectItem }\n\t\t\t\tonHover={ onHover }\n\t\t\t\tlabel={ __( 'Reusable blocks' ) }\n\t\t\t/>\n\t\t</InserterPanel>\n\t);\n}\n\n// The unwrapped component is only exported for use by unit tests.\n/**\n * List of reusable blocks shown in the \"Reusable\" tab of the inserter.\n *\n * @param {Object}   props              Component props.\n * @param {?string}  props.rootClientId Client id of block to insert into.\n * @param {Function} props.onInsert     Callback to run when item is inserted.\n * @param {Function} props.onHover      Callback to run when item is hovered.\n *\n * @return {WPComponent} The component.\n */\nexport function ReusableBlocksTab( { rootClientId, onInsert, onHover } ) {\n\treturn (\n\t\t<>\n\t\t\t<ReusableBlocksList\n\t\t\t\tonHover={ onHover }\n\t\t\t\tonInsert={ onInsert }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t/>\n\t\t\t<div className=\"block-editor-inserter__manage-reusable-blocks-container\">\n\t\t\t\t<a\n\t\t\t\t\tclassName=\"block-editor-inserter__manage-reusable-blocks\"\n\t\t\t\t\thref={ addQueryArgs( 'edit.php', {\n\t\t\t\t\t\tpost_type: 'wp_block',\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Manage Reusable blocks' ) }\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ReusableBlocksTab;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: __unstableInserterMenuExtension, Slot } = createSlotFill(\n\t'__unstableInserterMenuExtension'\n);\n\n__unstableInserterMenuExtension.Slot = Slot;\n\nexport default __unstableInserterMenuExtension;\n","/**\n * External dependencies\n */\nimport { orderBy, isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, useEffect } from '@wordpress/element';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { useDebounce, useAsyncList } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport BlockTypesList from '../block-types-list';\nimport BlockPatternsList from '../block-patterns-list';\nimport __unstableInserterMenuExtension from '../inserter-menu-extension';\nimport InserterPanel from './panel';\nimport InserterNoResults from './no-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { searchBlockItems, searchItems } from './search-items';\nimport InserterListbox from '../inserter-listbox';\n\nconst INITIAL_INSERTER_RESULTS = 9;\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 and rerendering the component.\n *\n * @type {Array}\n */\nconst EMPTY_ARRAY = [];\n\nfunction InserterSearchResults( {\n\tfilterValue,\n\tonSelect,\n\tonHover,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\t__experimentalInsertionIndex,\n\tmaxBlockPatterns,\n\tmaxBlockTypes,\n\tshowBlockDirectory = false,\n\tisDraggable = true,\n\tshouldFocusBlock = true,\n\tprioritizePatterns,\n} ) {\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tinsertionIndex: __experimentalInsertionIndex,\n\t\tshouldFocusBlock,\n\t} );\n\tconst [\n\t\tblockTypes,\n\t\tblockTypeCategories,\n\t\tblockTypeCollections,\n\t\tonSelectBlockType,\n\t] = useBlockTypesState( destinationRootClientId, onInsertBlocks );\n\tconst [ patterns, , onSelectBlockPattern ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\n\tconst filteredBlockPatterns = useMemo( () => {\n\t\tif ( maxBlockPatterns === 0 ) {\n\t\t\treturn [];\n\t\t}\n\t\tconst results = searchItems( patterns, filterValue );\n\t\treturn maxBlockPatterns !== undefined\n\t\t\t? results.slice( 0, maxBlockPatterns )\n\t\t\t: results;\n\t}, [ filterValue, patterns, maxBlockPatterns ] );\n\n\tlet maxBlockTypesToShow = maxBlockTypes;\n\tif ( prioritizePatterns && filteredBlockPatterns.length > 2 ) {\n\t\tmaxBlockTypesToShow = 0;\n\t}\n\n\tconst filteredBlockTypes = useMemo( () => {\n\t\tif ( maxBlockTypesToShow === 0 ) {\n\t\t\treturn [];\n\t\t}\n\t\tconst results = searchBlockItems(\n\t\t\torderBy( blockTypes, [ 'frecency' ], [ 'desc' ] ),\n\t\t\tblockTypeCategories,\n\t\t\tblockTypeCollections,\n\t\t\tfilterValue\n\t\t);\n\n\t\treturn maxBlockTypesToShow !== undefined\n\t\t\t? results.slice( 0, maxBlockTypesToShow )\n\t\t\t: results;\n\t}, [\n\t\tfilterValue,\n\t\tblockTypes,\n\t\tblockTypeCategories,\n\t\tblockTypeCollections,\n\t\tmaxBlockTypes,\n\t] );\n\n\t// Announce search results on change.\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\tconst count = filteredBlockTypes.length + filteredBlockPatterns.length;\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.', count ),\n\t\t\tcount\n\t\t);\n\t\tdebouncedSpeak( resultsFoundMessage );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\tconst currentShownBlockTypes = useAsyncList( filteredBlockTypes, {\n\t\tstep: INITIAL_INSERTER_RESULTS,\n\t} );\n\tconst currentShownPatterns = useAsyncList(\n\t\tcurrentShownBlockTypes.length === filteredBlockTypes.length\n\t\t\t? filteredBlockPatterns\n\t\t\t: EMPTY_ARRAY\n\t);\n\n\tconst hasItems =\n\t\t! isEmpty( filteredBlockTypes ) || ! isEmpty( filteredBlockPatterns );\n\n\tconst blocksUI = !! filteredBlockTypes.length && (\n\t\t<InserterPanel\n\t\t\ttitle={ <VisuallyHidden>{ __( 'Blocks' ) }</VisuallyHidden> }\n\t\t>\n\t\t\t<BlockTypesList\n\t\t\t\titems={ currentShownBlockTypes }\n\t\t\t\tonSelect={ onSelectBlockType }\n\t\t\t\tonHover={ onHover }\n\t\t\t\tlabel={ __( 'Blocks' ) }\n\t\t\t\tisDraggable={ isDraggable }\n\t\t\t/>\n\t\t</InserterPanel>\n\t);\n\n\tconst patternsUI = !! filteredBlockPatterns.length && (\n\t\t<InserterPanel\n\t\t\ttitle={\n\t\t\t\t<VisuallyHidden>{ __( 'Block Patterns' ) }</VisuallyHidden>\n\t\t\t}\n\t\t>\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-patterns\">\n\t\t\t\t<BlockPatternsList\n\t\t\t\t\tshownPatterns={ currentShownPatterns }\n\t\t\t\t\tblockPatterns={ filteredBlockPatterns }\n\t\t\t\t\tonClickPattern={ onSelectBlockPattern }\n\t\t\t\t\tisDraggable={ isDraggable }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</InserterPanel>\n\t);\n\n\treturn (\n\t\t<InserterListbox>\n\t\t\t{ ! showBlockDirectory && ! hasItems && <InserterNoResults /> }\n\n\t\t\t{ prioritizePatterns ? patternsUI : blocksUI }\n\n\t\t\t{ !! filteredBlockTypes.length &&\n\t\t\t\t!! filteredBlockPatterns.length && (\n\t\t\t\t\t<div className=\"block-editor-inserter__quick-inserter-separator\" />\n\t\t\t\t) }\n\n\t\t\t{ prioritizePatterns ? blocksUI : patternsUI }\n\n\t\t\t{ showBlockDirectory && (\n\t\t\t\t<__unstableInserterMenuExtension.Slot\n\t\t\t\t\tfillProps={ {\n\t\t\t\t\t\tonSelect: onSelectBlockType,\n\t\t\t\t\t\tonHover,\n\t\t\t\t\t\tfilterValue,\n\t\t\t\t\t\thasItems,\n\t\t\t\t\t\trootClientId: destinationRootClientId,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ ( fills ) => {\n\t\t\t\t\t\tif ( fills.length ) {\n\t\t\t\t\t\t\treturn fills;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( ! hasItems ) {\n\t\t\t\t\t\t\treturn <InserterNoResults />;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t} }\n\t\t\t\t</__unstableInserterMenuExtension.Slot>\n\t\t\t) }\n\t\t</InserterListbox>\n\t);\n}\n\nexport default InserterSearchResults;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { TabPanel } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst blocksTab = {\n\tname: 'blocks',\n\t/* translators: Blocks tab title in the block inserter. */\n\ttitle: __( 'Blocks' ),\n};\nconst patternsTab = {\n\tname: 'patterns',\n\t/* translators: Patterns tab title in the block inserter. */\n\ttitle: __( 'Patterns' ),\n};\nconst reusableBlocksTab = {\n\tname: 'reusable',\n\t/* translators: Reusable blocks tab title in the block inserter. */\n\ttitle: __( 'Reusable' ),\n};\n\nfunction InserterTabs( {\n\tchildren,\n\tshowPatterns = false,\n\tshowReusableBlocks = false,\n\tonSelect,\n\tprioritizePatterns,\n} ) {\n\tconst tabs = useMemo( () => {\n\t\tconst tempTabs = [];\n\t\tif ( prioritizePatterns && showPatterns ) {\n\t\t\ttempTabs.push( patternsTab );\n\t\t}\n\t\ttempTabs.push( blocksTab );\n\t\tif ( ! prioritizePatterns && showPatterns ) {\n\t\t\ttempTabs.push( patternsTab );\n\t\t}\n\t\tif ( showReusableBlocks ) {\n\t\t\ttempTabs.push( reusableBlocksTab );\n\t\t}\n\n\t\treturn tempTabs;\n\t}, [\n\t\tprioritizePatterns,\n\t\tblocksTab,\n\t\tshowPatterns,\n\t\tpatternsTab,\n\t\tshowReusableBlocks,\n\t\treusableBlocksTab,\n\t] );\n\n\treturn (\n\t\t<TabPanel\n\t\t\tclassName=\"block-editor-inserter__tabs\"\n\t\t\ttabs={ tabs }\n\t\t\tonSelect={ onSelect }\n\t\t>\n\t\t\t{ children }\n\t\t</TabPanel>\n\t);\n}\n\nexport default InserterTabs;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseState,\n\tuseCallback,\n\tuseMemo,\n\tuseImperativeHandle,\n\tuseRef,\n} from '@wordpress/element';\nimport { VisuallyHidden, SearchControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport Tips from './tips';\nimport InserterPreviewPanel from './preview-panel';\nimport BlockTypesTab from './block-types-tab';\nimport BlockPatternsTabs from './block-patterns-tab';\nimport ReusableBlocksTab from './reusable-blocks-tab';\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport InserterTabs from './tabs';\nimport { store as blockEditorStore } from '../../store';\n\nfunction InserterMenu(\n\t{\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\t__experimentalInsertionIndex,\n\t\tonSelect,\n\t\tshowInserterHelpPanel,\n\t\tshowMostUsedBlocks,\n\t\t__experimentalFilterValue = '',\n\t\tshouldFocusBlock = true,\n\t\tprioritizePatterns,\n\t},\n\tref\n) {\n\tconst [ filterValue, setFilterValue ] = useState(\n\t\t__experimentalFilterValue\n\t);\n\tconst [ hoveredItem, setHoveredItem ] = useState( null );\n\tconst [ selectedPatternCategory, setSelectedPatternCategory ] =\n\t\tuseState( null );\n\n\tconst [ destinationRootClientId, onInsertBlocks, onToggleInsertionPoint ] =\n\t\tuseInsertionPoint( {\n\t\t\trootClientId,\n\t\t\tclientId,\n\t\t\tisAppender,\n\t\t\tinsertionIndex: __experimentalInsertionIndex,\n\t\t\tshouldFocusBlock,\n\t\t} );\n\tconst { showPatterns, hasReusableBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { __experimentalGetAllowedPatterns, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tshowPatterns: !! __experimentalGetAllowedPatterns(\n\t\t\t\t\tdestinationRootClientId\n\t\t\t\t).length,\n\t\t\t\thasReusableBlocks:\n\t\t\t\t\t!! getSettings().__experimentalReusableBlocks?.length,\n\t\t\t};\n\t\t},\n\t\t[ destinationRootClientId ]\n\t);\n\n\tconst onInsert = useCallback(\n\t\t( blocks, meta, shouldForceFocusBlock ) => {\n\t\t\tonInsertBlocks( blocks, meta, shouldForceFocusBlock );\n\t\t\tonSelect();\n\t\t},\n\t\t[ onInsertBlocks, onSelect ]\n\t);\n\n\tconst onInsertPattern = useCallback(\n\t\t( blocks, patternName ) => {\n\t\t\tonInsertBlocks( blocks, { patternName } );\n\t\t\tonSelect();\n\t\t},\n\t\t[ onInsertBlocks, onSelect ]\n\t);\n\n\tconst onHover = useCallback(\n\t\t( item ) => {\n\t\t\tonToggleInsertionPoint( !! item );\n\t\t\tsetHoveredItem( item );\n\t\t},\n\t\t[ onToggleInsertionPoint, setHoveredItem ]\n\t);\n\n\tconst onClickPatternCategory = useCallback(\n\t\t( patternCategory ) => {\n\t\t\tsetSelectedPatternCategory( patternCategory );\n\t\t},\n\t\t[ setSelectedPatternCategory ]\n\t);\n\n\tconst blocksTab = useMemo(\n\t\t() => (\n\t\t\t<>\n\t\t\t\t<div className=\"block-editor-inserter__block-list\">\n\t\t\t\t\t<BlockTypesTab\n\t\t\t\t\t\trootClientId={ destinationRootClientId }\n\t\t\t\t\t\tonInsert={ onInsert }\n\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t{ showInserterHelpPanel && (\n\t\t\t\t\t<div className=\"block-editor-inserter__tips\">\n\t\t\t\t\t\t<VisuallyHidden as=\"h2\">\n\t\t\t\t\t\t\t{ __( 'A tip for using the block editor' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t<Tips />\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</>\n\t\t),\n\t\t[\n\t\t\tdestinationRootClientId,\n\t\t\tonInsert,\n\t\t\tonHover,\n\t\t\tfilterValue,\n\t\t\tshowMostUsedBlocks,\n\t\t\tshowInserterHelpPanel,\n\t\t]\n\t);\n\n\tconst patternsTab = useMemo(\n\t\t() => (\n\t\t\t<BlockPatternsTabs\n\t\t\t\trootClientId={ destinationRootClientId }\n\t\t\t\tonInsert={ onInsertPattern }\n\t\t\t\tonClickCategory={ onClickPatternCategory }\n\t\t\t\tselectedCategory={ selectedPatternCategory }\n\t\t\t/>\n\t\t),\n\t\t[\n\t\t\tdestinationRootClientId,\n\t\t\tonInsertPattern,\n\t\t\tonClickPatternCategory,\n\t\t\tselectedPatternCategory,\n\t\t]\n\t);\n\n\tconst reusableBlocksTab = useMemo(\n\t\t() => (\n\t\t\t<ReusableBlocksTab\n\t\t\t\trootClientId={ destinationRootClientId }\n\t\t\t\tonInsert={ onInsert }\n\t\t\t\tonHover={ onHover }\n\t\t\t/>\n\t\t),\n\t\t[ destinationRootClientId, onInsert, onHover ]\n\t);\n\n\tconst getCurrentTab = useCallback(\n\t\t( tab ) => {\n\t\t\tif ( tab.name === 'blocks' ) {\n\t\t\t\treturn blocksTab;\n\t\t\t} else if ( tab.name === 'patterns' ) {\n\t\t\t\treturn patternsTab;\n\t\t\t}\n\t\t\treturn reusableBlocksTab;\n\t\t},\n\t\t[ blocksTab, patternsTab, reusableBlocksTab ]\n\t);\n\n\tconst searchRef = useRef();\n\tuseImperativeHandle( ref, () => ( {\n\t\tfocusSearch: () => {\n\t\t\tsearchRef.current.focus();\n\t\t},\n\t} ) );\n\n\tconst showAsTabs = ! filterValue && ( showPatterns || hasReusableBlocks );\n\n\treturn (\n\t\t<div className=\"block-editor-inserter__menu\">\n\t\t\t<div\n\t\t\t\tclassName={ classnames( 'block-editor-inserter__main-area', {\n\t\t\t\t\t'show-as-tabs': showAsTabs,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<SearchControl\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tif ( hoveredItem ) setHoveredItem( null );\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t\tref={ searchRef }\n\t\t\t\t/>\n\t\t\t\t{ !! filterValue && (\n\t\t\t\t\t<div className=\"block-editor-inserter__no-tab-container\">\n\t\t\t\t\t\t<InserterSearchResults\n\t\t\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tonHover={ onHover }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\t\t\t__experimentalInsertionIndex={\n\t\t\t\t\t\t\t\t__experimentalInsertionIndex\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tshowBlockDirectory\n\t\t\t\t\t\t\tshouldFocusBlock={ shouldFocusBlock }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t\t{ showAsTabs && (\n\t\t\t\t\t<InserterTabs\n\t\t\t\t\t\tshowPatterns={ showPatterns }\n\t\t\t\t\t\tshowReusableBlocks={ hasReusableBlocks }\n\t\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ getCurrentTab }\n\t\t\t\t\t</InserterTabs>\n\t\t\t\t) }\n\t\t\t\t{ ! filterValue && ! showAsTabs && (\n\t\t\t\t\t<div className=\"block-editor-inserter__no-tab-container\">\n\t\t\t\t\t\t{ blocksTab }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ showInserterHelpPanel && hoveredItem && (\n\t\t\t\t<InserterPreviewPanel item={ hoveredItem } />\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( InserterMenu );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button, SearchControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport InserterSearchResults from './search-results';\nimport useInsertionPoint from './hooks/use-insertion-point';\nimport usePatternsState from './hooks/use-patterns-state';\nimport useBlockTypesState from './hooks/use-block-types-state';\nimport { store as blockEditorStore } from '../../store';\n\nconst SEARCH_THRESHOLD = 6;\nconst SHOWN_BLOCK_TYPES = 6;\nconst SHOWN_BLOCK_PATTERNS = 2;\nconst SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION = 4;\n\nexport default function QuickInserter( {\n\tonSelect,\n\trootClientId,\n\tclientId,\n\tisAppender,\n\tprioritizePatterns,\n} ) {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {\n\t\tonSelect,\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t} );\n\tconst [ blockTypes ] = useBlockTypesState(\n\t\tdestinationRootClientId,\n\t\tonInsertBlocks\n\t);\n\n\tconst [ patterns ] = usePatternsState(\n\t\tonInsertBlocks,\n\t\tdestinationRootClientId\n\t);\n\n\tconst { setInserterIsOpened, insertionIndex } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, getBlockIndex, getBlockCount } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst settings = getSettings();\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst blockCount = getBlockCount();\n\n\t\t\treturn {\n\t\t\t\tsetInserterIsOpened: settings.__experimentalSetIsInserterOpened,\n\t\t\t\tinsertionIndex: index === -1 ? blockCount : index,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst showPatterns =\n\t\tpatterns.length && ( !! filterValue || prioritizePatterns );\n\tconst showSearch =\n\t\t( showPatterns && patterns.length > SEARCH_THRESHOLD ) ||\n\t\tblockTypes.length > SEARCH_THRESHOLD;\n\n\tuseEffect( () => {\n\t\tif ( setInserterIsOpened ) {\n\t\t\tsetInserterIsOpened( false );\n\t\t}\n\t}, [ setInserterIsOpened ] );\n\n\t// When clicking Browse All select the appropriate block so as\n\t// the insertion point can work as expected.\n\tconst onBrowseAll = () => {\n\t\tsetInserterIsOpened( { rootClientId, insertionIndex, filterValue } );\n\t};\n\n\tlet maxBlockPatterns = 0;\n\tif ( showPatterns ) {\n\t\tmaxBlockPatterns = prioritizePatterns\n\t\t\t? SHOWN_BLOCK_PATTERNS_WITH_PRIORITIZATION\n\t\t\t: SHOWN_BLOCK_PATTERNS;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames( 'block-editor-inserter__quick-inserter', {\n\t\t\t\t'has-search': showSearch,\n\t\t\t\t'has-expand': setInserterIsOpened,\n\t\t\t} ) }\n\t\t>\n\t\t\t{ showSearch && (\n\t\t\t\t<SearchControl\n\t\t\t\t\tclassName=\"block-editor-inserter__search\"\n\t\t\t\t\tvalue={ filterValue }\n\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\tsetFilterValue( value );\n\t\t\t\t\t} }\n\t\t\t\t\tlabel={ __( 'Search for blocks and patterns' ) }\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<div className=\"block-editor-inserter__quick-inserter-results\">\n\t\t\t\t<InserterSearchResults\n\t\t\t\t\tfilterValue={ filterValue }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tmaxBlockPatterns={ maxBlockPatterns }\n\t\t\t\t\tmaxBlockTypes={ SHOWN_BLOCK_TYPES }\n\t\t\t\t\tisDraggable={ false }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t/>\n\t\t\t</div>\n\n\t\t\t{ setInserterIsOpened && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"block-editor-inserter__quick-inserter-expand\"\n\t\t\t\t\tonClick={ onBrowseAll }\n\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t'Browse all. This will open the main inserter panel in the editor toolbar.'\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Browse all' ) }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { Dropdown, Button } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose, ifCondition } from '@wordpress/compose';\nimport { createBlock, store as blocksStore } from '@wordpress/blocks';\nimport { plus } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport InserterMenu from './menu';\nimport QuickInserter from './quick-inserter';\nimport { store as blockEditorStore } from '../../store';\n\nconst defaultRenderToggle = ( {\n\tonToggle,\n\tdisabled,\n\tisOpen,\n\tblockTitle,\n\thasSingleBlockType,\n\ttoggleProps = {},\n\tprioritizePatterns,\n} ) => {\n\tlet label;\n\tif ( hasSingleBlockType ) {\n\t\tlabel = sprintf(\n\t\t\t// translators: %s: the name of the block when there is only one\n\t\t\t_x( 'Add %s', 'directly add the only allowed block' ),\n\t\t\tblockTitle\n\t\t);\n\t} else if ( prioritizePatterns ) {\n\t\tlabel = __( 'Add pattern' );\n\t} else {\n\t\tlabel = _x( 'Add block', 'Generic label for block inserter button' );\n\t}\n\n\tconst { onClick, ...rest } = toggleProps;\n\n\t// Handle both onClick functions from the toggle and the parent component.\n\tfunction handleClick( event ) {\n\t\tif ( onToggle ) {\n\t\t\tonToggle( event );\n\t\t}\n\t\tif ( onClick ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\ticon={ plus }\n\t\t\tlabel={ label }\n\t\t\ttooltipPosition=\"bottom\"\n\t\t\tonClick={ handleClick }\n\t\t\tclassName=\"block-editor-inserter__toggle\"\n\t\t\taria-haspopup={ ! hasSingleBlockType ? 'true' : false }\n\t\t\taria-expanded={ ! hasSingleBlockType ? isOpen : false }\n\t\t\tdisabled={ disabled }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n};\n\nclass Inserter extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.onToggle = this.onToggle.bind( this );\n\t\tthis.renderToggle = this.renderToggle.bind( this );\n\t\tthis.renderContent = this.renderContent.bind( this );\n\t}\n\n\tonToggle( isOpen ) {\n\t\tconst { onToggle } = this.props;\n\n\t\t// Surface toggle callback to parent component.\n\t\tif ( onToggle ) {\n\t\t\tonToggle( isOpen );\n\t\t}\n\t}\n\n\t/**\n\t * Render callback to display Dropdown toggle element.\n\t *\n\t * @param {Object}   options\n\t * @param {Function} options.onToggle Callback to invoke when toggle is\n\t *                                    pressed.\n\t * @param {boolean}  options.isOpen   Whether dropdown is currently open.\n\t *\n\t * @return {WPElement} Dropdown toggle element.\n\t */\n\trenderToggle( { onToggle, isOpen } ) {\n\t\tconst {\n\t\t\tdisabled,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\thasItems,\n\t\t\trenderToggle = defaultRenderToggle,\n\t\t\tprioritizePatterns,\n\t\t} = this.props;\n\n\t\treturn renderToggle( {\n\t\t\tonToggle,\n\t\t\tisOpen,\n\t\t\tdisabled: disabled || ! hasItems,\n\t\t\tblockTitle,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\ttoggleProps,\n\t\t\tprioritizePatterns,\n\t\t} );\n\t}\n\n\t/**\n\t * Render callback to display Dropdown content element.\n\t *\n\t * @param {Object}   options\n\t * @param {Function} options.onClose Callback to invoke when dropdown is\n\t *                                   closed.\n\t *\n\t * @return {WPElement} Dropdown content element.\n\t */\n\trenderContent( { onClose } ) {\n\t\tconst {\n\t\t\trootClientId,\n\t\t\tclientId,\n\t\t\tisAppender,\n\t\t\tshowInserterHelpPanel,\n\n\t\t\t// This prop is experimental to give some time for the quick inserter to mature\n\t\t\t// Feel free to make them stable after a few releases.\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tprioritizePatterns,\n\t\t} = this.props;\n\n\t\tif ( isQuick ) {\n\t\t\treturn (\n\t\t\t\t<QuickInserter\n\t\t\t\t\tonSelect={ () => {\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\tisAppender={ isAppender }\n\t\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InserterMenu\n\t\t\t\tonSelect={ () => {\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tclientId={ clientId }\n\t\t\t\tisAppender={ isAppender }\n\t\t\t\tshowInserterHelpPanel={ showInserterHelpPanel }\n\t\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tposition,\n\t\t\thasSingleBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\tinsertOnlyAllowedBlock,\n\t\t\t__experimentalIsQuick: isQuick,\n\t\t\tonSelectOrClose,\n\t\t} = this.props;\n\n\t\tif ( hasSingleBlockType || directInsertBlock ) {\n\t\t\treturn this.renderToggle( { onToggle: insertOnlyAllowedBlock } );\n\t\t}\n\n\t\treturn (\n\t\t\t<Dropdown\n\t\t\t\tclassName=\"block-editor-inserter\"\n\t\t\t\tcontentClassName={ classnames(\n\t\t\t\t\t'block-editor-inserter__popover',\n\t\t\t\t\t{ 'is-quick': isQuick }\n\t\t\t\t) }\n\t\t\t\tposition={ position }\n\t\t\t\tonToggle={ this.onToggle }\n\t\t\t\texpandOnMobile\n\t\t\t\theaderTitle={ __( 'Add a block' ) }\n\t\t\t\trenderToggle={ this.renderToggle }\n\t\t\t\trenderContent={ this.renderContent }\n\t\t\t\tonClose={ onSelectOrClose }\n\t\t\t/>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId, rootClientId } ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\thasInserterItems,\n\t\t\t__experimentalGetAllowedBlocks,\n\t\t\t__experimentalGetDirectInsertBlock,\n\t\t\tgetSettings,\n\t\t} = select( blockEditorStore );\n\n\t\tconst { getBlockVariations } = select( blocksStore );\n\n\t\trootClientId =\n\t\t\trootClientId || getBlockRootClientId( clientId ) || undefined;\n\n\t\tconst allowedBlocks = __experimentalGetAllowedBlocks( rootClientId );\n\n\t\tconst directInsertBlock =\n\t\t\t__experimentalGetDirectInsertBlock( rootClientId );\n\n\t\tconst settings = getSettings();\n\n\t\tconst hasSingleBlockType =\n\t\t\tallowedBlocks?.length === 1 &&\n\t\t\tgetBlockVariations( allowedBlocks[ 0 ].name, 'inserter' )\n\t\t\t\t?.length === 0;\n\n\t\tlet allowedBlockType = false;\n\t\tif ( hasSingleBlockType ) {\n\t\t\tallowedBlockType = allowedBlocks[ 0 ];\n\t\t}\n\n\t\treturn {\n\t\t\thasItems: hasInserterItems( rootClientId ),\n\t\t\thasSingleBlockType,\n\t\t\tblockTitle: allowedBlockType ? allowedBlockType.title : '',\n\t\t\tallowedBlockType,\n\t\t\tdirectInsertBlock,\n\t\t\trootClientId,\n\t\t\tprioritizePatterns:\n\t\t\t\tsettings.__experimentalPreferPatternsOnRoot && ! rootClientId,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps, { select } ) => {\n\t\treturn {\n\t\t\tinsertOnlyAllowedBlock() {\n\t\t\t\tconst {\n\t\t\t\t\trootClientId,\n\t\t\t\t\tclientId,\n\t\t\t\t\tisAppender,\n\t\t\t\t\thasSingleBlockType,\n\t\t\t\t\tallowedBlockType,\n\t\t\t\t\tdirectInsertBlock,\n\t\t\t\t\tonSelectOrClose,\n\t\t\t\t} = ownProps;\n\n\t\t\t\tif ( ! hasSingleBlockType && ! directInsertBlock ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfunction getAdjacentBlockAttributes( attributesToCopy ) {\n\t\t\t\t\tconst { getBlock, getPreviousBlockClientId } =\n\t\t\t\t\t\tselect( blockEditorStore );\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! attributesToCopy ||\n\t\t\t\t\t\t( ! clientId && ! rootClientId )\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn {};\n\t\t\t\t\t}\n\n\t\t\t\t\tconst result = {};\n\t\t\t\t\tlet adjacentAttributes = {};\n\n\t\t\t\t\t// If there is no clientId, then attempt to get attributes\n\t\t\t\t\t// from the last block within innerBlocks of the root block.\n\t\t\t\t\tif ( ! clientId ) {\n\t\t\t\t\t\tconst parentBlock = getBlock( rootClientId );\n\n\t\t\t\t\t\tif ( parentBlock?.innerBlocks?.length ) {\n\t\t\t\t\t\t\tconst lastInnerBlock =\n\t\t\t\t\t\t\t\tparentBlock.innerBlocks[\n\t\t\t\t\t\t\t\t\tparentBlock.innerBlocks.length - 1\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tdirectInsertBlock &&\n\t\t\t\t\t\t\t\tdirectInsertBlock?.name === lastInnerBlock.name\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tadjacentAttributes = lastInnerBlock.attributes;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Otherwise, attempt to get attributes from the\n\t\t\t\t\t\t// previous block relative to the current clientId.\n\t\t\t\t\t\tconst currentBlock = getBlock( clientId );\n\t\t\t\t\t\tconst previousBlock = getBlock(\n\t\t\t\t\t\t\tgetPreviousBlockClientId( clientId )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif ( currentBlock?.name === previousBlock?.name ) {\n\t\t\t\t\t\t\tadjacentAttributes =\n\t\t\t\t\t\t\t\tpreviousBlock?.attributes || {};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Copy over only those attributes flagged to be copied.\n\t\t\t\t\tattributesToCopy.forEach( ( attribute ) => {\n\t\t\t\t\t\tif ( adjacentAttributes.hasOwnProperty( attribute ) ) {\n\t\t\t\t\t\t\tresult[ attribute ] =\n\t\t\t\t\t\t\t\tadjacentAttributes[ attribute ];\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tfunction getInsertionIndex() {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\t\tgetBlockSelectionEnd,\n\t\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\t\t// If the clientId is defined, we insert at the position of the block.\n\t\t\t\t\tif ( clientId ) {\n\t\t\t\t\t\treturn getBlockIndex( clientId );\n\t\t\t\t\t}\n\n\t\t\t\t\t// If there a selected block, we insert after the selected block.\n\t\t\t\t\tconst end = getBlockSelectionEnd();\n\t\t\t\t\tif (\n\t\t\t\t\t\t! isAppender &&\n\t\t\t\t\t\tend &&\n\t\t\t\t\t\tgetBlockRootClientId( end ) === rootClientId\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn getBlockIndex( end ) + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Otherwise, we insert at the end of the current rootClientId.\n\t\t\t\t\treturn getBlockOrder( rootClientId ).length;\n\t\t\t\t}\n\n\t\t\t\tconst { insertBlock } = dispatch( blockEditorStore );\n\n\t\t\t\tlet blockToInsert;\n\n\t\t\t\t// Attempt to augment the directInsertBlock with attributes from an adjacent block.\n\t\t\t\t// This ensures styling from nearby blocks is preserved in the newly inserted block.\n\t\t\t\t// See: https://github.com/WordPress/gutenberg/issues/37904\n\t\t\t\tif ( directInsertBlock ) {\n\t\t\t\t\tconst newAttributes = getAdjacentBlockAttributes(\n\t\t\t\t\t\tdirectInsertBlock.attributesToCopy\n\t\t\t\t\t);\n\n\t\t\t\t\tblockToInsert = createBlock( directInsertBlock.name, {\n\t\t\t\t\t\t...( directInsertBlock.attributes || {} ),\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tblockToInsert = createBlock( allowedBlockType.name );\n\t\t\t\t}\n\n\t\t\t\tinsertBlock( blockToInsert, getInsertionIndex(), rootClientId );\n\n\t\t\t\tif ( onSelectOrClose ) {\n\t\t\t\t\tonSelectOrClose();\n\t\t\t\t}\n\n\t\t\t\tconst message = sprintf(\n\t\t\t\t\t// translators: %s: the name of the block that has been added\n\t\t\t\t\t__( '%s block added' ),\n\t\t\t\t\tallowedBlockType.title\n\t\t\t\t);\n\t\t\t\tspeak( message );\n\t\t\t},\n\t\t};\n\t} ),\n\t// The global inserter should always be visible, we are using ( ! isAppender && ! rootClientId && ! clientId ) as\n\t// a way to detect the global Inserter.\n\tifCondition(\n\t\t( { hasItems, isAppender, rootClientId, clientId } ) =>\n\t\t\thasItems || ( ! isAppender && ! rootClientId && ! clientId )\n\t),\n] )( Inserter );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { compose } from '@wordpress/compose';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Zero width non-breaking space, used as padding for the paragraph when it is\n * empty.\n */\nexport const ZWNBSP = '\\ufeff';\n\nexport function DefaultBlockAppender( {\n\tisLocked,\n\tonAppend,\n\tshowPrompt,\n\tplaceholder,\n\trootClientId,\n} ) {\n\tif ( isLocked ) {\n\t\treturn null;\n\t}\n\n\tconst value =\n\t\tdecodeEntities( placeholder ) || __( 'Type / to choose a block' );\n\n\treturn (\n\t\t<div\n\t\t\tdata-root-client-id={ rootClientId || '' }\n\t\t\tclassName={ classnames( 'block-editor-default-block-appender', {\n\t\t\t\t'has-visible-prompt': showPrompt,\n\t\t\t} ) }\n\t\t>\n\t\t\t<p\n\t\t\t\ttabIndex=\"0\"\n\t\t\t\t// We want this element to be styled as a paragraph by themes.\n\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role\n\t\t\t\trole=\"button\"\n\t\t\t\taria-label={ __( 'Add default block' ) }\n\t\t\t\t// A wrapping container for this one already has the wp-block className.\n\t\t\t\tclassName=\"block-editor-default-block-appender__content\"\n\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\tif ( ENTER === event.keyCode || SPACE === event.keyCode ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t\tonClick={ () => onAppend() }\n\t\t\t\tonFocus={ () => {\n\t\t\t\t\tif ( showPrompt ) {\n\t\t\t\t\t\tonAppend();\n\t\t\t\t\t}\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ showPrompt ? value : ZWNBSP }\n\t\t\t</p>\n\t\t\t<Inserter\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\tposition=\"bottom right\"\n\t\t\t\tisAppender\n\t\t\t\t__experimentalIsQuick\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default compose(\n\twithSelect( ( select, ownProps ) => {\n\t\tconst { getBlockCount, getSettings, getTemplateLock } =\n\t\t\tselect( blockEditorStore );\n\n\t\tconst isEmpty = ! getBlockCount( ownProps.rootClientId );\n\t\tconst { bodyPlaceholder } = getSettings();\n\n\t\treturn {\n\t\t\tshowPrompt: isEmpty,\n\t\t\tisLocked: !! getTemplateLock( ownProps.rootClientId ),\n\t\t\tplaceholder: bodyPlaceholder,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, ownProps ) => {\n\t\tconst { insertDefaultBlock, startTyping } =\n\t\t\tdispatch( blockEditorStore );\n\n\t\treturn {\n\t\t\tonAppend() {\n\t\t\t\tconst { rootClientId } = ownProps;\n\n\t\t\t\tinsertDefaultBlock( undefined, rootClientId );\n\t\t\t\tstartTyping();\n\t\t\t},\n\t\t};\n\t} )\n)( DefaultBlockAppender );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Tooltip, VisuallyHidden } from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { Icon, plus } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\n\nfunction ButtonBlockAppender(\n\t{ rootClientId, className, onFocus, tabIndex },\n\tref\n) {\n\treturn (\n\t\t<Inserter\n\t\t\tposition=\"bottom center\"\n\t\t\trootClientId={ rootClientId }\n\t\t\t__experimentalIsQuick\n\t\t\trenderToggle={ ( {\n\t\t\t\tonToggle,\n\t\t\t\tdisabled,\n\t\t\t\tisOpen,\n\t\t\t\tblockTitle,\n\t\t\t\thasSingleBlockType,\n\t\t\t} ) => {\n\t\t\t\tlet label;\n\t\t\t\tif ( hasSingleBlockType ) {\n\t\t\t\t\tlabel = sprintf(\n\t\t\t\t\t\t// translators: %s: the name of the block when there is only one\n\t\t\t\t\t\t_x( 'Add %s', 'directly add the only allowed block' ),\n\t\t\t\t\t\tblockTitle\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tlabel = _x(\n\t\t\t\t\t\t'Add block',\n\t\t\t\t\t\t'Generic label for block inserter button'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst isToggleButton = ! hasSingleBlockType;\n\n\t\t\t\tlet inserterButton = (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\tclassName,\n\t\t\t\t\t\t\t'block-editor-button-block-appender'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\taria-haspopup={ isToggleButton ? 'true' : undefined }\n\t\t\t\t\t\taria-expanded={ isToggleButton ? isOpen : undefined }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! hasSingleBlockType && (\n\t\t\t\t\t\t\t<VisuallyHidden as=\"span\">{ label }</VisuallyHidden>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Icon icon={ plus } />\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\n\t\t\t\tif ( isToggleButton || hasSingleBlockType ) {\n\t\t\t\t\tinserterButton = (\n\t\t\t\t\t\t<Tooltip text={ label }>{ inserterButton }</Tooltip>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn inserterButton;\n\t\t\t} }\n\t\t\tisAppender\n\t\t/>\n\t);\n}\n\n/**\n * Use `ButtonBlockAppender` instead.\n *\n * @deprecated\n */\nexport const ButtonBlockerAppender = forwardRef( ( props, ref ) => {\n\tdeprecated( `wp.blockEditor.ButtonBlockerAppender`, {\n\t\talternative: 'wp.blockEditor.ButtonBlockAppender',\n\t\tsince: '5.9',\n\t} );\n\n\treturn ButtonBlockAppender( props, ref );\n} );\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/button-block-appender/README.md\n */\nexport default forwardRef( ButtonBlockAppender );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { getDefaultBlockName } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport DefaultBlockAppender from '../default-block-appender';\nimport ButtonBlockAppender from '../button-block-appender';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockListAppender( {\n\trootClientId,\n\trenderAppender: CustomAppender,\n\tclassName,\n\ttagName: TagName = 'div',\n} ) {\n\tconst { hideInserter, canInsertDefaultBlock, selectedBlockClientId } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tcanInsertBlockType,\n\t\t\t\t\tgetTemplateLock,\n\t\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\t\t__unstableGetEditorMode,\n\t\t\t\t} = select( blockEditorStore );\n\n\t\t\t\treturn {\n\t\t\t\t\thideInserter:\n\t\t\t\t\t\t!! getTemplateLock( rootClientId ) ||\n\t\t\t\t\t\t__unstableGetEditorMode() === 'zoom-out',\n\t\t\t\t\tcanInsertDefaultBlock: canInsertBlockType(\n\t\t\t\t\t\tgetDefaultBlockName(),\n\t\t\t\t\t\trootClientId\n\t\t\t\t\t),\n\t\t\t\t\tselectedBlockClientId: getSelectedBlockClientId(),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ rootClientId ]\n\t\t);\n\n\tif ( hideInserter || CustomAppender === false ) {\n\t\treturn null;\n\t}\n\n\tlet appender;\n\tif ( CustomAppender ) {\n\t\t// Prefer custom render prop if provided.\n\t\tappender = <CustomAppender />;\n\t} else {\n\t\tconst isParentSelected =\n\t\t\tselectedBlockClientId === rootClientId ||\n\t\t\t( ! rootClientId && ! selectedBlockClientId );\n\n\t\tif ( ! isParentSelected ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif ( canInsertDefaultBlock ) {\n\t\t\t// Render the default block appender when renderAppender has not been\n\t\t\t// provided and the context supports use of the default appender.\n\t\t\tappender = <DefaultBlockAppender rootClientId={ rootClientId } />;\n\t\t} else {\n\t\t\t// Fallback in the case no renderAppender has been provided and the\n\t\t\t// default block can't be inserted.\n\t\t\tappender = (\n\t\t\t\t<ButtonBlockAppender\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\tclassName=\"block-list-appender__toggle\"\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t}\n\n\treturn (\n\t\t<TagName\n\t\t\t// A `tabIndex` is used on the wrapping `div` element in order to\n\t\t\t// force a focus event to occur when an appender `button` element\n\t\t\t// is clicked. In some browsers (Firefox, Safari), button clicks do\n\t\t\t// not emit a focus event, which could cause this event to propagate\n\t\t\t// unexpectedly. The `tabIndex` ensures that the interaction is\n\t\t\t// captured as a focus, without also adding an extra tab stop.\n\t\t\t//\n\t\t\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\t\t\ttabIndex={ -1 }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-list-appender wp-block',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t// Needed in case the whole editor is content editable (for multi\n\t\t\t// selection). It fixes an edge case where ArrowDown and ArrowRight\n\t\t\t// should collapse the selection to the end of that selection and\n\t\t\t// not into the appender.\n\t\t\tcontentEditable={ false }\n\t\t\t// The appender exists to let you add the first Paragraph before\n\t\t\t// any is inserted. To that end, this appender should visually be\n\t\t\t// presented as a block. That means theme CSS should style it as if\n\t\t\t// it were an empty paragraph block. That means a `wp-block` class to\n\t\t\t// ensure the width is correct, and a [data-block] attribute to ensure\n\t\t\t// the correct margin is applied, especially for classic themes which\n\t\t\t// have commonly targeted that attribute for margins.\n\t\t\tdata-block\n\t\t>\n\t\t\t{ appender }\n\t\t</TagName>\n\t);\n}\n\nexport default BlockListAppender;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseMemo,\n\tcreateContext,\n\tuseReducer,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { Popover } from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport usePopoverScroll from './use-popover-scroll';\n\nconst MAX_POPOVER_RECOMPUTE_COUNTER = Number.MAX_SAFE_INTEGER;\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction BlockPopoverInbetween( {\n\tpreviousClientId,\n\tnextClientId,\n\tchildren,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n\t...props\n} ) {\n\t// This is a temporary hack to get the inbetween inserter to recompute properly.\n\tconst [ popoverRecomputeCounter, forcePopoverRecompute ] = useReducer(\n\t\t// Module is there to make sure that the counter doesn't overflow.\n\t\t( s ) => ( s + 1 ) % MAX_POPOVER_RECOMPUTE_COUNTER,\n\t\t0\n\t);\n\n\tconst { orientation, rootClientId, isVisible } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tisBlockVisible,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst _rootClientId = getBlockRootClientId(\n\t\t\t\tpreviousClientId ?? nextClientId\n\t\t\t);\n\t\t\treturn {\n\t\t\t\torientation:\n\t\t\t\t\tgetBlockListSettings( _rootClientId )?.orientation ||\n\t\t\t\t\t'vertical',\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisVisible:\n\t\t\t\t\tisBlockVisible( previousClientId ) &&\n\t\t\t\t\tisBlockVisible( nextClientId ),\n\t\t\t};\n\t\t},\n\t\t[ previousClientId, nextClientId ]\n\t);\n\tconst previousElement = useBlockElement( previousClientId );\n\tconst nextElement = useBlockElement( nextClientId );\n\tconst isVertical = orientation === 'vertical';\n\tconst style = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst previousRect = previousElement\n\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t: null;\n\t\tconst nextRect = nextElement\n\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t: null;\n\n\t\tif ( isVertical ) {\n\t\t\treturn {\n\t\t\t\twidth: previousRect ? previousRect.width : nextRect.width,\n\t\t\t\theight:\n\t\t\t\t\tnextRect && previousRect\n\t\t\t\t\t\t? nextRect.top - previousRect.bottom\n\t\t\t\t\t\t: 0,\n\t\t\t};\n\t\t}\n\n\t\tlet width = 0;\n\t\tif ( previousRect && nextRect ) {\n\t\t\twidth = isRTL()\n\t\t\t\t? previousRect.left - nextRect.right\n\t\t\t\t: nextRect.left - previousRect.right;\n\t\t}\n\n\t\treturn {\n\t\t\twidth,\n\t\t\theight: previousRect ? previousRect.height : nextRect.height,\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tisVertical,\n\t\tpopoverRecomputeCounter,\n\t\tisVisible,\n\t] );\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tif (\n\t\t\t// popoverRecomputeCounter is by definition always equal or greater than 0.\n\t\t\t// This check is only there to satisfy the correctness of the\n\t\t\t// exhaustive-deps rule for the `useMemo` hook.\n\t\t\tpopoverRecomputeCounter < 0 ||\n\t\t\t( ! previousElement && ! nextElement ) ||\n\t\t\t! isVisible\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst { ownerDocument } = previousElement || nextElement;\n\n\t\treturn {\n\t\t\townerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst previousRect = previousElement\n\t\t\t\t\t? previousElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\t\t\t\tconst nextRect = nextElement\n\t\t\t\t\t? nextElement.getBoundingClientRect()\n\t\t\t\t\t: null;\n\n\t\t\t\tlet left = 0;\n\t\t\t\tlet top = 0;\n\n\t\t\t\tif ( isVertical ) {\n\t\t\t\t\t// vertical\n\t\t\t\t\ttop = previousRect ? previousRect.bottom : nextRect.top;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// vertical, rtl\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.right;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// vertical, ltr\n\t\t\t\t\t\tleft = previousRect ? previousRect.left : nextRect.left;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttop = previousRect ? previousRect.top : nextRect.top;\n\n\t\t\t\t\tif ( isRTL() ) {\n\t\t\t\t\t\t// non vertical, rtl\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.left\n\t\t\t\t\t\t\t: nextRect.right;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// non vertical, ltr\n\t\t\t\t\t\tleft = previousRect\n\t\t\t\t\t\t\t? previousRect.right\n\t\t\t\t\t\t\t: nextRect.left;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn new window.DOMRect( left, top, 0, 0 );\n\t\t\t},\n\t\t};\n\t}, [\n\t\tpreviousElement,\n\t\tnextElement,\n\t\tpopoverRecomputeCounter,\n\t\tisVertical,\n\t\tisVisible,\n\t] );\n\n\tconst popoverScrollRef = usePopoverScroll( __unstableContentRef );\n\n\t// This is only needed for a smooth transition when moving blocks.\n\t// When blocks are moved up/down, their position can be set by\n\t// updating the `transform` property manually (i.e. without using CSS\n\t// transitions or animations). The animation, which can also scroll the block\n\t// editor, can sometimes cause the position of the Popover to get out of sync.\n\t// A MutationObserver is therefore used to make sure that changes to the\n\t// selectedElement's attribute (i.e. `transform`) can be tracked and used to\n\t// trigger the Popover to rerender.\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( previousElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ previousElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! nextElement ) {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new window.MutationObserver( forcePopoverRecompute );\n\t\tobserver.observe( nextElement, { attributes: true } );\n\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, [ nextElement ] );\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previousElement ) {\n\t\t\treturn;\n\t\t}\n\t\tpreviousElement.ownerDocument.defaultView.addEventListener(\n\t\t\t'resize',\n\t\t\tforcePopoverRecompute\n\t\t);\n\t\treturn () => {\n\t\t\tpreviousElement.ownerDocument.defaultView?.removeEventListener(\n\t\t\t\t'resize',\n\t\t\t\tforcePopoverRecompute\n\t\t\t);\n\t\t};\n\t}, [ previousElement ] );\n\n\t// If there's either a previous or a next element, show the inbetween popover.\n\t// Note that drag and drop uses the inbetween popover to show the drop indicator\n\t// before the first block and after the last block.\n\tif ( ( ! previousElement && ! nextElement ) || ! isVisible ) {\n\t\treturn null;\n\t}\n\n\t/* eslint-disable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n\t// While ideally it would be enough to capture the\n\t// bubbling focus event from the Inserter, due to the\n\t// characteristics of click focusing of `button`s in\n\t// Firefox and Safari, it is not reliable.\n\t//\n\t// See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus\n\treturn (\n\t\t<Popover\n\t\t\tref={ popoverScrollRef }\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\t// Render in the old slot if needed for backward compatibility,\n\t\t\t// otherwise render in place (not in the default popover slot).\n\t\t\t__unstableSlotName={ __unstablePopoverSlot || null }\n\t\t\t// Forces a remount of the popover when its position changes\n\t\t\t// This makes sure the popover doesn't animate from its previous position.\n\t\t\tkey={ nextClientId + '--' + rootClientId }\n\t\t\t{ ...props }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-block-popover',\n\t\t\t\t'block-editor-block-popover__inbetween',\n\t\t\t\tprops.className\n\t\t\t) }\n\t\t\tresize={ false }\n\t\t\tflip={ false }\n\t\t\tplacement=\"bottom-start\"\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"block-editor-block-popover__inbetween-container\"\n\t\t\t\tstyle={ style }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</Popover>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */\n}\n\nexport default BlockPopoverInbetween;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef, createContext, useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { useReducedMotion } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport Inserter from '../inserter';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopoverInbetween from '../block-popover/inbetween';\n\nexport const InsertionPointOpenRef = createContext();\n\nfunction InsertionPointPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst { selectBlock, hideInsertionPoint } = useDispatch( blockEditorStore );\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst ref = useRef();\n\tconst {\n\t\torientation,\n\t\tpreviousClientId,\n\t\tnextClientId,\n\t\trootClientId,\n\t\tisInserterShown,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockOrder,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockInsertionPoint,\n\t\t\tisBlockBeingDragged,\n\t\t\tgetPreviousBlockClientId,\n\t\t\tgetNextBlockClientId,\n\t\t} = select( blockEditorStore );\n\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\n\t\tif ( ! order.length ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tlet _previousClientId = order[ insertionPoint.index - 1 ];\n\t\tlet _nextClientId = order[ insertionPoint.index ];\n\n\t\twhile ( isBlockBeingDragged( _previousClientId ) ) {\n\t\t\t_previousClientId = getPreviousBlockClientId( _previousClientId );\n\t\t}\n\n\t\twhile ( isBlockBeingDragged( _nextClientId ) ) {\n\t\t\t_nextClientId = getNextBlockClientId( _nextClientId );\n\t\t}\n\n\t\treturn {\n\t\t\tpreviousClientId: _previousClientId,\n\t\t\tnextClientId: _nextClientId,\n\t\t\torientation:\n\t\t\t\tgetBlockListSettings( insertionPoint.rootClientId )\n\t\t\t\t\t?.orientation || 'vertical',\n\t\t\trootClientId: insertionPoint.rootClientId,\n\t\t\tisInserterShown: insertionPoint?.__unstableWithInserter,\n\t\t};\n\t}, [] );\n\tconst isVertical = orientation === 'vertical';\n\n\tconst disableMotion = useReducedMotion();\n\n\tfunction onClick( event ) {\n\t\tif ( event.target === ref.current && nextClientId ) {\n\t\t\tselectBlock( nextClientId, -1 );\n\t\t}\n\t}\n\n\tfunction onFocus( event ) {\n\t\t// Only handle click on the wrapper specifically, and not an event\n\t\t// bubbled from the inserter itself.\n\t\tif ( event.target !== ref.current ) {\n\t\t\topenRef.current = true;\n\t\t}\n\t}\n\n\tfunction maybeHideInserterPoint( event ) {\n\t\t// Only hide the inserter if it's triggered on the wrapper,\n\t\t// and the inserter is not open.\n\t\tif ( event.target === ref.current && ! openRef.current ) {\n\t\t\thideInsertionPoint();\n\t\t}\n\t}\n\n\t// Define animation variants for the line element.\n\tconst horizontalLine = {\n\t\tstart: {\n\t\t\twidth: 0,\n\t\t\ttop: '50%',\n\t\t\tbottom: '50%',\n\t\t\tx: 0,\n\t\t},\n\t\trest: {\n\t\t\twidth: 4,\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tx: -2,\n\t\t},\n\t\thover: {\n\t\t\twidth: 4,\n\t\t\ttop: 0,\n\t\t\tbottom: 0,\n\t\t\tx: -2,\n\t\t},\n\t};\n\tconst verticalLine = {\n\t\tstart: {\n\t\t\theight: 0,\n\t\t\tleft: '50%',\n\t\t\tright: '50%',\n\t\t\ty: 0,\n\t\t},\n\t\trest: {\n\t\t\theight: 4,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\ty: -2,\n\t\t},\n\t\thover: {\n\t\t\theight: 4,\n\t\t\tleft: 0,\n\t\t\tright: 0,\n\t\t\ty: -2,\n\t\t},\n\t};\n\tconst lineVariants = {\n\t\t// Initial position starts from the center and invisible.\n\t\tstart: {\n\t\t\t...( ! isVertical ? horizontalLine.start : verticalLine.start ),\n\t\t\topacity: 0,\n\t\t},\n\t\t// The line expands to fill the container. If the inserter is visible it\n\t\t// is delayed so it appears orchestrated.\n\t\trest: {\n\t\t\t...( ! isVertical ? horizontalLine.rest : verticalLine.rest ),\n\t\t\topacity: 1,\n\t\t\tborderRadius: '2px',\n\t\t\ttransition: { delay: isInserterShown ? 0.1 : 0, type: 'tween' },\n\t\t},\n\t\thover: {\n\t\t\t...( ! isVertical ? horizontalLine.hover : verticalLine.hover ),\n\t\t\topacity: 1,\n\t\t\tborderRadius: '2px',\n\t\t\ttransition: { delay: 0.1, type: 'tween' },\n\t\t},\n\t};\n\n\tconst inserterVariants = {\n\t\tstart: {\n\t\t\tscale: disableMotion ? 1 : 0,\n\t\t},\n\t\trest: {\n\t\t\tscale: 1,\n\t\t\ttransition: { type: 'tween' },\n\t\t},\n\t};\n\n\tconst className = classnames(\n\t\t'block-editor-block-list__insertion-point',\n\t\t'is-' + orientation\n\t);\n\n\treturn (\n\t\t<BlockPopoverInbetween\n\t\t\tpreviousClientId={ previousClientId }\n\t\t\tnextClientId={ nextClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! disableMotion }\n\t\t\t\tinitial={ disableMotion ? 'rest' : 'start' }\n\t\t\t\tanimate=\"rest\"\n\t\t\t\twhileHover=\"hover\"\n\t\t\t\twhileTap=\"pressed\"\n\t\t\t\texit=\"start\"\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ -1 }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tclassName={ classnames( className, {\n\t\t\t\t\t'is-with-inserter': isInserterShown,\n\t\t\t\t} ) }\n\t\t\t\tonHoverEnd={ maybeHideInserterPoint }\n\t\t\t>\n\t\t\t\t<motion.div\n\t\t\t\t\tvariants={ lineVariants }\n\t\t\t\t\tclassName=\"block-editor-block-list__insertion-point-indicator\"\n\t\t\t\t\tdata-testid=\"block-list-insertion-point-indicator\"\n\t\t\t\t/>\n\t\t\t\t{ isInserterShown && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tvariants={ inserterVariants }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-block-list__insertion-point-inserter'\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Inserter\n\t\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\t\tclientId={ nextClientId }\n\t\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t\t\tonToggle={ ( isOpen ) => {\n\t\t\t\t\t\t\t\topenRef.current = isOpen;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonSelectOrClose={ () => {\n\t\t\t\t\t\t\t\topenRef.current = false;\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\t\t\t\t) }\n\t\t\t</motion.div>\n\t\t</BlockPopoverInbetween>\n\t);\n}\n\nexport default function InsertionPoint( props ) {\n\tconst isVisible = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).isBlockInsertionPointVisible();\n\t}, [] );\n\n\treturn isVisible && <InsertionPointPopover { ...props } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect, useDebounce } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { InsertionPointOpenRef } from '../block-tools/insertion-point';\n\nexport function useInBetweenInserter() {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isInBetweenInserterDisabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getSettings().hasReducedUI ||\n\t\t\tselect( blockEditorStore ).__unstableGetEditorMode() === 'zoom-out',\n\t\t[]\n\t);\n\tconst {\n\t\tgetBlockListSettings,\n\t\tgetBlockRootClientId,\n\t\tgetBlockIndex,\n\t\tisBlockInsertionPointVisible,\n\t\tisMultiSelecting,\n\t\tgetSelectedBlockClientIds,\n\t\tgetTemplateLock,\n\t\t__unstableIsWithinBlockOverlay,\n\t} = useSelect( blockEditorStore );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst delayedShowInsertionPoint = useDebounce( showInsertionPoint, 500, {\n\t\ttrailing: true,\n\t} );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( isInBetweenInserterDisabled ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfunction onMouseMove( event ) {\n\t\t\t\tif ( openRef.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( isMultiSelecting() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains(\n\t\t\t\t\t\t'block-editor-block-list__layout'\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tdelayedShowInsertionPoint.cancel();\n\t\t\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet rootClientId;\n\t\t\t\tif (\n\t\t\t\t\t! event.target.classList.contains( 'is-root-container' )\n\t\t\t\t) {\n\t\t\t\t\tconst blockElement = !! event.target.getAttribute(\n\t\t\t\t\t\t'data-block'\n\t\t\t\t\t)\n\t\t\t\t\t\t? event.target\n\t\t\t\t\t\t: event.target.closest( '[data-block]' );\n\t\t\t\t\trootClientId = blockElement.getAttribute( 'data-block' );\n\t\t\t\t}\n\n\t\t\t\t// Don't set the insertion point if the template is locked.\n\t\t\t\tif ( getTemplateLock( rootClientId ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst orientation =\n\t\t\t\t\tgetBlockListSettings( rootClientId )?.orientation ||\n\t\t\t\t\t'vertical';\n\t\t\t\tconst offsetTop = event.clientY;\n\t\t\t\tconst offsetLeft = event.clientX;\n\n\t\t\t\tconst children = Array.from( event.target.children );\n\t\t\t\tlet element = children.find( ( blockEl ) => {\n\t\t\t\t\tconst blockElRect = blockEl.getBoundingClientRect();\n\t\t\t\t\treturn (\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'vertical' &&\n\t\t\t\t\t\t\tblockElRect.top > offsetTop ) ||\n\t\t\t\t\t\t( blockEl.classList.contains( 'wp-block' ) &&\n\t\t\t\t\t\t\torientation === 'horizontal' &&\n\t\t\t\t\t\t\tblockElRect.left > offsetLeft )\n\t\t\t\t\t);\n\t\t\t\t} );\n\n\t\t\t\tif ( ! element ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// The block may be in an alignment wrapper, so check the first direct\n\t\t\t\t// child if the element has no ID.\n\t\t\t\tif ( ! element.id ) {\n\t\t\t\t\telement = element.firstElementChild;\n\n\t\t\t\t\tif ( ! element ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Don't show the insertion point if a parent block has an \"overlay\"\n\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/34012#pullrequestreview-727762337\n\t\t\t\tconst clientId = element.id.slice( 'block-'.length );\n\t\t\t\tif (\n\t\t\t\t\t! clientId ||\n\t\t\t\t\t__unstableIsWithinBlockOverlay( clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Don't show the inserter when hovering above (conflicts with\n\t\t\t\t// block toolbar) or inside selected block(s).\n\t\t\t\tif ( getSelectedBlockClientIds().includes( clientId ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst elementRect = element.getBoundingClientRect();\n\n\t\t\t\tif (\n\t\t\t\t\t( orientation === 'horizontal' &&\n\t\t\t\t\t\t( event.clientY > elementRect.bottom ||\n\t\t\t\t\t\t\tevent.clientY < elementRect.top ) ) ||\n\t\t\t\t\t( orientation === 'vertical' &&\n\t\t\t\t\t\t( event.clientX > elementRect.right ||\n\t\t\t\t\t\t\tevent.clientX < elementRect.left ) )\n\t\t\t\t) {\n\t\t\t\t\tdelayedShowInsertionPoint.cancel();\n\t\t\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = getBlockIndex( clientId );\n\n\t\t\t\t// Don't show the in-between inserter before the first block in\n\t\t\t\t// the list (preserves the original behaviour).\n\t\t\t\tif ( index === 0 ) {\n\t\t\t\t\tdelayedShowInsertionPoint.cancel();\n\t\t\t\t\tif ( isBlockInsertionPointVisible() ) {\n\t\t\t\t\t\thideInsertionPoint();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tdelayedShowInsertionPoint( rootClientId, index, {\n\t\t\t\t\t__unstableWithInserter: true,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'mousemove', onMouseMove );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'mousemove', onMouseMove );\n\t\t\t};\n\t\t},\n\t\t[\n\t\t\topenRef,\n\t\t\tgetBlockListSettings,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlockIndex,\n\t\t\tisBlockInsertionPointVisible,\n\t\t\tisMultiSelecting,\n\t\t\tshowInsertionPoint,\n\t\t\thideInsertionPoint,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisInBetweenInserterDisabled,\n\t\t]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, select } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\n\nconst requestIdleCallback = ( () => {\n\tif ( typeof window === 'undefined' ) {\n\t\treturn ( callback ) => {\n\t\t\tsetTimeout( () => callback( Date.now() ), 0 );\n\t\t};\n\t}\n\n\treturn window.requestIdleCallback || window.requestAnimationFrame;\n} )();\n\nconst cancelIdleCallback = ( () => {\n\tif ( typeof window === 'undefined' ) {\n\t\treturn clearTimeout;\n\t}\n\n\treturn window.cancelIdleCallback || window.cancelAnimationFrame;\n} )();\n\nexport function usePreParsePatterns() {\n\tconst patterns = useSelect(\n\t\t( _select ) =>\n\t\t\t_select( blockEditorStore ).getSettings()\n\t\t\t\t.__experimentalBlockPatterns,\n\t\t[]\n\t);\n\n\tuseEffect( () => {\n\t\tif ( ! patterns?.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet handle;\n\t\tlet index = -1;\n\n\t\tconst callback = () => {\n\t\t\tindex++;\n\t\t\tif ( index >= patterns.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tselect( blockEditorStore ).__experimentalGetParsedPattern(\n\t\t\t\tpatterns[ index ].name\n\t\t\t);\n\n\t\t\thandle = requestIdleCallback( callback );\n\t\t};\n\n\t\thandle = requestIdleCallback( callback );\n\t\treturn () => cancelIdleCallback( handle );\n\t}, [ patterns ] );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/** @typedef {import('@wordpress/blocks').WPIcon} WPIcon */\n\n/**\n * Contains basic block's information for display reasons.\n *\n * @typedef {Object} WPBlockDisplayInformation\n *\n * @property {string} title       Human-readable block type label.\n * @property {WPIcon} icon        Block type icon.\n * @property {string} description A detailed block type description.\n * @property {string} anchor      HTML anchor.\n */\n\n/**\n * Hook used to try to find a matching block variation and return\n * the appropriate information for display reasons. In order to\n * to try to find a match we need to things:\n * 1. Block's client id to extract it's current attributes.\n * 2. A block variation should have set `isActive` prop to a proper function.\n *\n * If for any reason a block variaton match cannot be found,\n * the returned information come from the Block Type.\n * If no blockType is found with the provided clientId, returns null.\n *\n * @param {string} clientId Block's client id.\n * @return {?WPBlockDisplayInformation} Block's display information, or `null` when the block or its type not found.\n */\n\nexport default function useBlockDisplayInformation( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId ) return null;\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { getBlockType, getActiveBlockVariation } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\t\t\tif ( ! blockType ) return null;\n\t\t\tconst attributes = getBlockAttributes( clientId );\n\t\t\tconst match = getActiveBlockVariation( blockName, attributes );\n\t\t\tconst blockTypeInfo = {\n\t\t\t\ttitle: blockType.title,\n\t\t\t\ticon: blockType.icon,\n\t\t\t\tdescription: blockType.description,\n\t\t\t\tanchor: attributes?.anchor,\n\t\t\t};\n\t\t\tif ( ! match ) return blockTypeInfo;\n\n\t\t\treturn {\n\t\t\t\ttitle: match.title || blockType.title,\n\t\t\t\ticon: match.icon || blockType.icon,\n\t\t\t\tdescription: match.description || blockType.description,\n\t\t\t\tanchor: attributes?.anchor,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockType,\n\t__experimentalGetBlockLabel as getBlockLabel,\n\tisReusableBlock,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Returns the block's configured title as a string, or empty if the title\n * cannot be determined.\n *\n * @example\n *\n * ```js\n * useBlockDisplayTitle( { clientId: 'afd1cb17-2c08-4e7a-91be-007ba7ddc3a1', maximumLength: 17 } );\n * ```\n *\n * @param {Object}           props\n * @param {string}           props.clientId      Client ID of block.\n * @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.\n * @param {string|undefined} props.context       The context to pass to `getBlockLabel`.\n * @return {?string} Block title.\n */\nexport default function useBlockDisplayTitle( {\n\tclientId,\n\tmaximumLength,\n\tcontext,\n} ) {\n\tconst { attributes, name, reusableBlockTitle } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockAttributes,\n\t\t\t\t__experimentalGetReusableBlockTitle,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tif ( ! blockName ) {\n\t\t\t\treturn {};\n\t\t\t}\n\t\t\tconst isReusable = isReusableBlock( getBlockType( blockName ) );\n\t\t\treturn {\n\t\t\t\tattributes: getBlockAttributes( clientId ),\n\t\t\t\tname: blockName,\n\t\t\t\treusableBlockTitle:\n\t\t\t\t\tisReusable &&\n\t\t\t\t\t__experimentalGetReusableBlockTitle(\n\t\t\t\t\t\tgetBlockAttributes( clientId ).ref\n\t\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tif ( ! name || ! blockInformation ) {\n\t\treturn null;\n\t}\n\tconst blockType = getBlockType( name );\n\tconst blockLabel = blockType\n\t\t? getBlockLabel( blockType, attributes, context )\n\t\t: null;\n\n\tconst label = reusableBlockTitle || blockLabel;\n\t// Label will fallback to the title if no label is defined for the current\n\t// label context. If the label is defined we prioritize it over a\n\t// possible block variation title match.\n\tconst blockTitle =\n\t\tlabel && label !== blockType.title ? label : blockInformation.title;\n\n\tif (\n\t\tmaximumLength &&\n\t\tmaximumLength > 0 &&\n\t\tblockTitle.length > maximumLength\n\t) {\n\t\tconst omission = '...';\n\t\treturn (\n\t\t\tblockTitle.slice( 0, maximumLength - omission.length ) + omission\n\t\t);\n\t}\n\n\treturn blockTitle;\n}\n","/**\n * Internal dependencies\n */\n\nimport useBlockDisplayTitle from './use-block-display-title';\n\n/**\n * Renders the block's configured title as a string, or empty if the title\n * cannot be determined.\n *\n * @example\n *\n * ```jsx\n * <BlockTitle clientId=\"afd1cb17-2c08-4e7a-91be-007ba7ddc3a1\" maximumLength={ 17 }/>\n * ```\n *\n * @param {Object}           props\n * @param {string}           props.clientId      Client ID of block.\n * @param {number|undefined} props.maximumLength The maximum length that the block title string may be before truncated.\n * @param {string|undefined} props.context       The context to pass to `getBlockLabel`.\n *\n * @return {JSX.Element} Block title.\n */\nexport default function BlockTitle( { clientId, maximumLength, context } ) {\n\treturn useBlockDisplayTitle( { clientId, maximumLength, context } );\n}\n","/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Draggable } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockDraggableChip from './draggable-chip';\nimport useScrollWhenDragging from './use-scroll-when-dragging';\nimport { store as blockEditorStore } from '../../store';\n\nconst BlockDraggable = ( {\n\tchildren,\n\tclientIds,\n\tcloneClassname,\n\tonDragStart,\n\tonDragEnd,\n} ) => {\n\tconst { srcRootClientId, isDraggable, icon } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canMoveBlocks, getBlockRootClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\tconst blockName = getBlockName( clientIds[ 0 ] );\n\n\t\t\treturn {\n\t\t\t\tsrcRootClientId: rootClientId,\n\t\t\t\tisDraggable: canMoveBlocks( clientIds, rootClientId ),\n\t\t\t\ticon: getBlockType( blockName )?.icon,\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\tconst isDragging = useRef( false );\n\tconst [ startScrolling, scrollOnDragOver, stopScrolling ] =\n\t\tuseScrollWhenDragging();\n\n\tconst { startDraggingBlocks, stopDraggingBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Stop dragging blocks if the block draggable is unmounted.\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\tif ( isDragging.current ) {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\tif ( ! isDraggable ) {\n\t\treturn children( { draggable: false } );\n\t}\n\n\tconst transferData = {\n\t\ttype: 'block',\n\t\tsrcClientIds: clientIds,\n\t\tsrcRootClientId,\n\t};\n\n\treturn (\n\t\t<Draggable\n\t\t\tcloneClassname={ cloneClassname }\n\t\t\t__experimentalTransferDataType=\"wp-blocks\"\n\t\t\ttransferData={ transferData }\n\t\t\tonDragStart={ ( event ) => {\n\t\t\t\tstartDraggingBlocks( clientIds );\n\t\t\t\tisDragging.current = true;\n\n\t\t\t\tstartScrolling( event );\n\n\t\t\t\tif ( onDragStart ) {\n\t\t\t\t\tonDragStart();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tonDragOver={ scrollOnDragOver }\n\t\t\tonDragEnd={ () => {\n\t\t\t\tstopDraggingBlocks();\n\t\t\t\tisDragging.current = false;\n\n\t\t\t\tstopScrolling();\n\n\t\t\t\tif ( onDragEnd ) {\n\t\t\t\t\tonDragEnd();\n\t\t\t\t}\n\t\t\t} }\n\t\t\t__experimentalDragComponent={\n\t\t\t\t<BlockDraggableChip count={ clientIds.length } icon={ icon } />\n\t\t\t}\n\t\t>\n\t\t\t{ ( { onDraggableStart, onDraggableEnd } ) => {\n\t\t\t\treturn children( {\n\t\t\t\t\tdraggable: true,\n\t\t\t\t\tonDragStart: onDraggableStart,\n\t\t\t\t\tonDragEnd: onDraggableEnd,\n\t\t\t\t} );\n\t\t\t} }\n\t\t</Draggable>\n\t);\n};\n\nexport default BlockDraggable;\n","/**\n * WordPress dependencies\n */\nimport { getScrollContainer } from '@wordpress/dom';\nimport { useCallback, useEffect, useRef } from '@wordpress/element';\n\nconst SCROLL_INACTIVE_DISTANCE_PX = 50;\nconst SCROLL_INTERVAL_MS = 25;\nconst PIXELS_PER_SECOND_PER_PERCENTAGE = 1000;\nconst VELOCITY_MULTIPLIER =\n\tPIXELS_PER_SECOND_PER_PERCENTAGE * ( SCROLL_INTERVAL_MS / 1000 );\n\n/**\n * React hook that scrolls the scroll container when a block is being dragged.\n *\n * @return {Function[]} `startScrolling`, `scrollOnDragOver`, `stopScrolling`\n *                      functions to be called in `onDragStart`, `onDragOver`\n *                      and `onDragEnd` events respectively.\n */\nexport default function useScrollWhenDragging() {\n\tconst dragStartY = useRef( null );\n\tconst velocityY = useRef( null );\n\tconst scrollParentY = useRef( null );\n\tconst scrollEditorInterval = useRef( null );\n\n\t// Clear interval when unmounting.\n\tuseEffect(\n\t\t() => () => {\n\t\t\tif ( scrollEditorInterval.current ) {\n\t\t\t\tclearInterval( scrollEditorInterval.current );\n\t\t\t\tscrollEditorInterval.current = null;\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\tconst startScrolling = useCallback( ( event ) => {\n\t\tdragStartY.current = event.clientY;\n\n\t\t// Find nearest parent(s) to scroll.\n\t\tscrollParentY.current = getScrollContainer( event.target );\n\n\t\tscrollEditorInterval.current = setInterval( () => {\n\t\t\tif ( scrollParentY.current && velocityY.current ) {\n\t\t\t\tconst newTop =\n\t\t\t\t\tscrollParentY.current.scrollTop + velocityY.current;\n\n\t\t\t\t// Setting `behavior: 'smooth'` as a scroll property seems to hurt performance.\n\t\t\t\t// Better to use a small scroll interval.\n\t\t\t\tscrollParentY.current.scroll( {\n\t\t\t\t\ttop: newTop,\n\t\t\t\t} );\n\t\t\t}\n\t\t}, SCROLL_INTERVAL_MS );\n\t}, [] );\n\n\tconst scrollOnDragOver = useCallback( ( event ) => {\n\t\tif ( ! scrollParentY.current ) {\n\t\t\treturn;\n\t\t}\n\t\tconst scrollParentHeight = scrollParentY.current.offsetHeight;\n\t\tconst offsetDragStartPosition =\n\t\t\tdragStartY.current - scrollParentY.current.offsetTop;\n\t\tconst offsetDragPosition =\n\t\t\tevent.clientY - scrollParentY.current.offsetTop;\n\n\t\tif ( event.clientY > offsetDragStartPosition ) {\n\t\t\t// User is dragging downwards.\n\t\t\tconst moveableDistance = Math.max(\n\t\t\t\tscrollParentHeight -\n\t\t\t\t\toffsetDragStartPosition -\n\t\t\t\t\tSCROLL_INACTIVE_DISTANCE_PX,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst dragDistance = Math.max(\n\t\t\t\toffsetDragPosition -\n\t\t\t\t\toffsetDragStartPosition -\n\t\t\t\t\tSCROLL_INACTIVE_DISTANCE_PX,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst distancePercentage = dragDistance / moveableDistance;\n\t\t\tvelocityY.current = VELOCITY_MULTIPLIER * distancePercentage;\n\t\t} else if ( event.clientY < offsetDragStartPosition ) {\n\t\t\t// User is dragging upwards.\n\t\t\tconst moveableDistance = Math.max(\n\t\t\t\toffsetDragStartPosition - SCROLL_INACTIVE_DISTANCE_PX,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst dragDistance = Math.max(\n\t\t\t\toffsetDragStartPosition -\n\t\t\t\t\toffsetDragPosition -\n\t\t\t\t\tSCROLL_INACTIVE_DISTANCE_PX,\n\t\t\t\t0\n\t\t\t);\n\t\t\tconst distancePercentage = dragDistance / moveableDistance;\n\t\t\tvelocityY.current = -VELOCITY_MULTIPLIER * distancePercentage;\n\t\t} else {\n\t\t\tvelocityY.current = 0;\n\t\t}\n\t}, [] );\n\n\tconst stopScrolling = () => {\n\t\tdragStartY.current = null;\n\t\tscrollParentY.current = null;\n\n\t\tif ( scrollEditorInterval.current ) {\n\t\t\tclearInterval( scrollEditorInterval.current );\n\t\t\tscrollEditorInterval.current = null;\n\t\t}\n\t};\n\n\treturn [ startScrolling, scrollOnDragOver, stopScrolling ];\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z\" />\n\t</SVG>\n);\n\nexport default chevronRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z\" />\n\t</SVG>\n);\n\nexport default chevronLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronUp = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z\" />\n\t</SVG>\n);\n\nexport default chevronUp;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst chevronDown = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z\" />\n\t</SVG>\n);\n\nexport default chevronDown;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\n\nconst getMovementDirection = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'right' : 'left';\n\t\t}\n\t\treturn 'up';\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? 'left' : 'right';\n\t\t}\n\t\treturn 'down';\n\t}\n\treturn null;\n};\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number}  selectedCount Number of blocks selected.\n * @param {string}  type          Block type - in the case of a single block, should\n *                                define its 'type'. I.e. 'Text', 'Heading', 'Image' etc.\n * @param {number}  firstIndex    The index (position - 1) of the first block selected.\n * @param {boolean} isFirst       This is the first block.\n * @param {boolean} isLast        This is the last block.\n * @param {number}  dir           Direction of movement (> 0 is considered to be going\n *                                down, < 0 is up).\n * @param {string}  orientation   The orientation of the block movers, vertical or\n *                                horizontal.\n *\n * @return {string} Label for the block movement controls.\n */\nexport function getBlockMoverDescription(\n\tselectedCount,\n\ttype,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( selectedCount > 1 ) {\n\t\treturn getMultiBlockMoverDescription(\n\t\t\tselectedCount,\n\t\t\tfirstIndex,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tdir,\n\t\t\torientation\n\t\t);\n\t}\n\n\tif ( isFirst && isLast ) {\n\t\treturn sprintf(\n\t\t\t// translators: %s: Type of block (i.e. Text, Image etc)\n\t\t\t__( 'Block %s is the only block, and cannot be moved' ),\n\t\t\ttype\n\t\t);\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// Moving down.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d down to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition + 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// Moving down, and is the last item.\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved down'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the end of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// Moving up.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__( 'Move %1$s block from position %2$d up to position %3$d' ),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d left to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc), 2: Position of selected block, 3: New position\n\t\t\t\t__(\n\t\t\t\t\t'Move %1$s block from position %2$d right to position %3$d'\n\t\t\t\t),\n\t\t\t\ttype,\n\t\t\t\tposition,\n\t\t\t\tposition - 1\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// Moving up, and is the first item.\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved up'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved left'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Type of block (i.e. Text, Image etc)\n\t\t\t\t__(\n\t\t\t\t\t'Block %1$s is at the beginning of the content and can’t be moved right'\n\t\t\t\t),\n\t\t\t\ttype\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Return a label for the block movement controls depending on block position.\n *\n * @param {number}  selectedCount Number of blocks selected.\n * @param {number}  firstIndex    The index (position - 1) of the first block selected.\n * @param {boolean} isFirst       This is the first block.\n * @param {boolean} isLast        This is the last block.\n * @param {number}  dir           Direction of movement (> 0 is considered to be going\n *                                down, < 0 is up).\n * @param {string}  orientation   The orientation of the block movers, vertical or\n *                                horizontal.\n *\n * @return {string} Label for the block movement controls.\n */\nexport function getMultiBlockMoverDescription(\n\tselectedCount,\n\tfirstIndex,\n\tisFirst,\n\tisLast,\n\tdir,\n\torientation\n) {\n\tconst position = firstIndex + 1;\n\n\tif ( isFirst && isLast ) {\n\t\t// All blocks are selected\n\t\treturn __( 'All blocks are selected, and cannot be moved' );\n\t}\n\n\tif ( dir > 0 && ! isLast ) {\n\t\t// moving down\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d down by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir > 0 && isLast ) {\n\t\t// moving down, and the selected blocks are the last item\n\t\tconst movementDirection = getMovementDirection( 'down', orientation );\n\n\t\tif ( movementDirection === 'down' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved down as they are already at the bottom'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && ! isFirst ) {\n\t\t// moving up\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d up by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d left by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: 1: Number of selected blocks, 2: Position of selected blocks\n\t\t\t\t__( 'Move %1$d blocks from position %2$d right by one place' ),\n\t\t\t\tselectedCount,\n\t\t\t\tposition\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( dir < 0 && isFirst ) {\n\t\t// moving up, and the selected blocks are the first item\n\t\tconst movementDirection = getMovementDirection( 'up', orientation );\n\n\t\tif ( movementDirection === 'up' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved up as they are already at the top'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'left' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved left as they are already are at the leftmost position'\n\t\t\t);\n\t\t}\n\n\t\tif ( movementDirection === 'right' ) {\n\t\t\treturn __(\n\t\t\t\t'Blocks cannot be moved right as they are already are at the rightmost position'\n\t\t\t);\n\t\t}\n\t}\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { Button, VisuallyHidden } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tchevronLeft,\n\tchevronRight,\n\tchevronUp,\n\tchevronDown,\n} from '@wordpress/icons';\nimport { getBlockMoverDescription } from './mover-description';\nimport { store as blockEditorStore } from '../../store';\n\nconst getArrowIcon = ( direction, orientation ) => {\n\tif ( direction === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? chevronRight : chevronLeft;\n\t\t}\n\t\treturn chevronUp;\n\t} else if ( direction === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? chevronLeft : chevronRight;\n\t\t}\n\t\treturn chevronDown;\n\t}\n\treturn null;\n};\n\nconst getMovementDirectionLabel = ( moveDirection, orientation ) => {\n\tif ( moveDirection === 'up' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? __( 'Move right' ) : __( 'Move left' );\n\t\t}\n\t\treturn __( 'Move up' );\n\t} else if ( moveDirection === 'down' ) {\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\treturn isRTL() ? __( 'Move left' ) : __( 'Move right' );\n\t\t}\n\t\treturn __( 'Move down' );\n\t}\n\treturn null;\n};\n\nconst BlockMoverButton = forwardRef(\n\t(\n\t\t{ clientIds, direction, orientation: moverOrientation, ...props },\n\t\tref\n\t) => {\n\t\tconst instanceId = useInstanceId( BlockMoverButton );\n\t\tconst normalizedClientIds = Array.isArray( clientIds )\n\t\t\t? clientIds\n\t\t\t: [ clientIds ];\n\t\tconst blocksCount = normalizedClientIds.length;\n\n\t\tconst {\n\t\t\tblockType,\n\t\t\tisDisabled,\n\t\t\trootClientId,\n\t\t\tisFirst,\n\t\t\tisLast,\n\t\t\tfirstIndex,\n\t\t\torientation = 'vertical',\n\t\t} = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\tgetBlockIndex,\n\t\t\t\t\tgetBlockRootClientId,\n\t\t\t\t\tgetBlockOrder,\n\t\t\t\t\tgetBlock,\n\t\t\t\t\tgetBlockListSettings,\n\t\t\t\t} = select( blockEditorStore );\n\t\t\t\tconst firstClientId = normalizedClientIds[ 0 ];\n\t\t\t\tconst blockRootClientId = getBlockRootClientId( firstClientId );\n\t\t\t\tconst firstBlockIndex = getBlockIndex( firstClientId );\n\t\t\t\tconst lastBlockIndex = getBlockIndex(\n\t\t\t\t\tnormalizedClientIds[ normalizedClientIds.length - 1 ]\n\t\t\t\t);\n\t\t\t\tconst blockOrder = getBlockOrder( blockRootClientId );\n\t\t\t\tconst block = getBlock( firstClientId );\n\t\t\t\tconst isFirstBlock = firstBlockIndex === 0;\n\t\t\t\tconst isLastBlock = lastBlockIndex === blockOrder.length - 1;\n\t\t\t\tconst { orientation: blockListOrientation } =\n\t\t\t\t\tgetBlockListSettings( blockRootClientId ) || {};\n\n\t\t\t\treturn {\n\t\t\t\t\tblockType: block ? getBlockType( block.name ) : null,\n\t\t\t\t\tisDisabled: direction === 'up' ? isFirstBlock : isLastBlock,\n\t\t\t\t\trootClientId: blockRootClientId,\n\t\t\t\t\tfirstIndex: firstBlockIndex,\n\t\t\t\t\tisFirst: isFirstBlock,\n\t\t\t\t\tisLast: isLastBlock,\n\t\t\t\t\torientation: moverOrientation || blockListOrientation,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientIds, direction ]\n\t\t);\n\n\t\tconst { moveBlocksDown, moveBlocksUp } =\n\t\t\tuseDispatch( blockEditorStore );\n\t\tconst moverFunction =\n\t\t\tdirection === 'up' ? moveBlocksUp : moveBlocksDown;\n\n\t\tconst onClick = ( event ) => {\n\t\t\tmoverFunction( clientIds, rootClientId );\n\t\t\tif ( props.onClick ) {\n\t\t\t\tprops.onClick( event );\n\t\t\t}\n\t\t};\n\n\t\tconst descriptionId = `block-editor-block-mover-button__description-${ instanceId }`;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'block-editor-block-mover-button',\n\t\t\t\t\t\t`is-${ direction }-button`\n\t\t\t\t\t) }\n\t\t\t\t\ticon={ getArrowIcon( direction, orientation ) }\n\t\t\t\t\tlabel={ getMovementDirectionLabel(\n\t\t\t\t\t\tdirection,\n\t\t\t\t\t\torientation\n\t\t\t\t\t) }\n\t\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tonClick={ isDisabled ? null : onClick }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t__experimentalIsFocusable\n\t\t\t\t/>\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ getBlockMoverDescription(\n\t\t\t\t\t\tblocksCount,\n\t\t\t\t\t\tblockType && blockType.title,\n\t\t\t\t\t\tfirstIndex,\n\t\t\t\t\t\tisFirst,\n\t\t\t\t\t\tisLast,\n\t\t\t\t\t\tdirection === 'up' ? -1 : 1,\n\t\t\t\t\t\torientation\n\t\t\t\t\t) }\n\t\t\t\t</VisuallyHidden>\n\t\t\t</>\n\t\t);\n\t}\n);\n\nexport const BlockMoverUpButton = forwardRef( ( props, ref ) => {\n\treturn <BlockMoverButton direction=\"up\" ref={ ref } { ...props } />;\n} );\n\nexport const BlockMoverDownButton = forwardRef( ( props, ref ) => {\n\treturn <BlockMoverButton direction=\"down\" ref={ ref } { ...props } />;\n} );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\n\nimport { dragHandle } from '@wordpress/icons';\nimport { ToolbarGroup, ToolbarItem, Button } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockDraggable from '../block-draggable';\nimport { BlockMoverUpButton, BlockMoverDownButton } from './button';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockMover( { clientIds, hideDragHandle } ) {\n\tconst { canMove, rootClientId, isFirst, isLast, orientation } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockIndex,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\tcanMoveBlocks,\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst normalizedClientIds = Array.isArray( clientIds )\n\t\t\t\t? clientIds\n\t\t\t\t: [ clientIds ];\n\t\t\tconst firstClientId = normalizedClientIds[ 0 ];\n\t\t\tconst _rootClientId = getBlockRootClientId( firstClientId );\n\t\t\tconst firstIndex = getBlockIndex( firstClientId );\n\t\t\tconst lastIndex = getBlockIndex(\n\t\t\t\tnormalizedClientIds[ normalizedClientIds.length - 1 ]\n\t\t\t);\n\t\t\tconst blockOrder = getBlockOrder( _rootClientId );\n\n\t\t\treturn {\n\t\t\t\tcanMove: canMoveBlocks( clientIds, _rootClientId ),\n\t\t\t\trootClientId: _rootClientId,\n\t\t\t\tisFirst: firstIndex === 0,\n\t\t\t\tisLast: lastIndex === blockOrder.length - 1,\n\t\t\t\torientation: getBlockListSettings( _rootClientId )?.orientation,\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tif ( ! canMove || ( isFirst && isLast && ! rootClientId ) ) {\n\t\treturn null;\n\t}\n\n\tconst dragHandleLabel = __( 'Drag' );\n\n\treturn (\n\t\t<ToolbarGroup\n\t\t\tclassName={ classnames( 'block-editor-block-mover', {\n\t\t\t\t'is-horizontal': orientation === 'horizontal',\n\t\t\t} ) }\n\t\t>\n\t\t\t{ ! hideDragHandle && (\n\t\t\t\t<BlockDraggable clientIds={ clientIds }>\n\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-mover__drag-handle\"\n\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\tlabel={ dragHandleLabel }\n\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</BlockDraggable>\n\t\t\t) }\n\t\t\t<div className=\"block-editor-block-mover__move-button-container\">\n\t\t\t\t<ToolbarItem>\n\t\t\t\t\t{ ( itemProps ) => (\n\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t{ ...itemProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarItem>\n\t\t\t\t<ToolbarItem>\n\t\t\t\t\t{ ( itemProps ) => (\n\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t{ ...itemProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</ToolbarItem>\n\t\t\t</div>\n\t\t</ToolbarGroup>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-mover/README.md\n */\nexport default BlockMover;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { dragHandle } from '@wordpress/icons';\nimport { Button, Flex, FlexItem } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect, useRef } from '@wordpress/element';\nimport {\n\tBACKSPACE,\n\tDELETE,\n\tUP,\n\tDOWN,\n\tLEFT,\n\tRIGHT,\n\tTAB,\n\tESCAPE,\n\tENTER,\n\tSPACE,\n} from '@wordpress/keycodes';\nimport {\n\tgetBlockType,\n\t__experimentalGetAccessibleBlockLabel as getAccessibleBlockLabel,\n} from '@wordpress/blocks';\nimport { speak } from '@wordpress/a11y';\nimport { focus } from '@wordpress/dom';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\nimport BlockDraggable from '../block-draggable';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\nimport BlockMover from '../block-mover';\n\n/**\n * Block selection button component, displaying the label of the block. If the block\n * descends from a root block, a button is displayed enabling the user to select\n * the root block.\n *\n * @param {string} props          Component props.\n * @param {string} props.clientId Client ID of block.\n *\n * @return {WPComponent} The component to be rendered.\n */\nfunction BlockSelectionButton( { clientId, rootClientId } ) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst selected = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlock,\n\t\t\t\tgetBlockIndex,\n\t\t\t\thasBlockMovingClientId,\n\t\t\t\tgetBlockListSettings,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst index = getBlockIndex( clientId );\n\t\t\tconst { name, attributes } = getBlock( clientId );\n\t\t\tconst blockMovingMode = hasBlockMovingClientId();\n\t\t\treturn {\n\t\t\t\tindex,\n\t\t\t\tname,\n\t\t\t\tattributes,\n\t\t\t\tblockMovingMode,\n\t\t\t\torientation: getBlockListSettings( rootClientId )?.orientation,\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\tconst {\n\t\tindex,\n\t\tname,\n\t\tattributes,\n\t\tblockMovingMode,\n\t\torientation,\n\t\teditorMode,\n\t} = selected;\n\tconst { setNavigationMode, removeBlock } = useDispatch( blockEditorStore );\n\tconst ref = useRef();\n\n\tconst blockType = getBlockType( name );\n\tconst label = getAccessibleBlockLabel(\n\t\tblockType,\n\t\tattributes,\n\t\tindex + 1,\n\t\torientation\n\t);\n\n\t// Focus the breadcrumb in navigation mode.\n\tuseEffect( () => {\n\t\tref.current.focus();\n\n\t\tspeak( label );\n\t}, [ label ] );\n\tconst blockElement = useBlockElement( clientId );\n\n\tconst {\n\t\thasBlockMovingClientId,\n\t\tgetBlockIndex,\n\t\tgetBlockRootClientId,\n\t\tgetClientIdsOfDescendants,\n\t\tgetSelectedBlockClientId,\n\t\tgetMultiSelectedBlocksEndClientId,\n\t\tgetPreviousBlockClientId,\n\t\tgetNextBlockClientId,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\tselectBlock,\n\t\tclearSelectedBlock,\n\t\tsetBlockMovingClientId,\n\t\tmoveBlockToPosition,\n\t} = useDispatch( blockEditorStore );\n\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\t\tconst isUp = keyCode === UP;\n\t\tconst isDown = keyCode === DOWN;\n\t\tconst isLeft = keyCode === LEFT;\n\t\tconst isRight = keyCode === RIGHT;\n\t\tconst isTab = keyCode === TAB;\n\t\tconst isEscape = keyCode === ESCAPE;\n\t\tconst isEnter = keyCode === ENTER;\n\t\tconst isSpace = keyCode === SPACE;\n\t\tconst isShift = event.shiftKey;\n\n\t\tif ( keyCode === BACKSPACE || keyCode === DELETE ) {\n\t\t\tremoveBlock( clientId );\n\t\t\tevent.preventDefault();\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst selectionEndClientId = getMultiSelectedBlocksEndClientId();\n\t\tconst selectionBeforeEndClientId = getPreviousBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\t\tconst selectionAfterEndClientId = getNextBlockClientId(\n\t\t\tselectionEndClientId || selectedBlockClientId\n\t\t);\n\n\t\tconst navigateUp = ( isTab && isShift ) || isUp;\n\t\tconst navigateDown = ( isTab && ! isShift ) || isDown;\n\t\t// Move out of current nesting level (no effect if at root level).\n\t\tconst navigateOut = isLeft;\n\t\t// Move into next nesting level (no effect if the current block has no innerBlocks).\n\t\tconst navigateIn = isRight;\n\n\t\tlet focusedBlockUid;\n\t\tif ( navigateUp ) {\n\t\t\tfocusedBlockUid = selectionBeforeEndClientId;\n\t\t} else if ( navigateDown ) {\n\t\t\tfocusedBlockUid = selectionAfterEndClientId;\n\t\t} else if ( navigateOut ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetBlockRootClientId( selectedBlockClientId ) ??\n\t\t\t\tselectedBlockClientId;\n\t\t} else if ( navigateIn ) {\n\t\t\tfocusedBlockUid =\n\t\t\t\tgetClientIdsOfDescendants( [ selectedBlockClientId ] )[ 0 ] ??\n\t\t\t\tselectedBlockClientId;\n\t\t}\n\t\tconst startingBlockClientId = hasBlockMovingClientId();\n\t\tif ( isEscape && startingBlockClientId && ! event.defaultPrevented ) {\n\t\t\tsetBlockMovingClientId( null );\n\t\t\tevent.preventDefault();\n\t\t}\n\t\tif ( ( isEnter || isSpace ) && startingBlockClientId ) {\n\t\t\tconst sourceRoot = getBlockRootClientId( startingBlockClientId );\n\t\t\tconst destRoot = getBlockRootClientId( selectedBlockClientId );\n\t\t\tconst sourceBlockIndex = getBlockIndex( startingBlockClientId );\n\t\t\tlet destinationBlockIndex = getBlockIndex( selectedBlockClientId );\n\t\t\tif (\n\t\t\t\tsourceBlockIndex < destinationBlockIndex &&\n\t\t\t\tsourceRoot === destRoot\n\t\t\t) {\n\t\t\t\tdestinationBlockIndex -= 1;\n\t\t\t}\n\t\t\tmoveBlockToPosition(\n\t\t\t\tstartingBlockClientId,\n\t\t\t\tsourceRoot,\n\t\t\t\tdestRoot,\n\t\t\t\tdestinationBlockIndex\n\t\t\t);\n\t\t\tselectBlock( startingBlockClientId );\n\t\t\tsetBlockMovingClientId( null );\n\t\t}\n\t\tif ( navigateDown || navigateUp || navigateOut || navigateIn ) {\n\t\t\tif ( focusedBlockUid ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tselectBlock( focusedBlockUid );\n\t\t\t} else if ( isTab && selectedBlockClientId ) {\n\t\t\t\tlet nextTabbable;\n\n\t\t\t\tif ( navigateDown ) {\n\t\t\t\t\tnextTabbable = blockElement;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t} while (\n\t\t\t\t\t\tnextTabbable &&\n\t\t\t\t\t\tblockElement.contains( nextTabbable )\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( ! nextTabbable ) {\n\t\t\t\t\t\tnextTabbable =\n\t\t\t\t\t\t\tblockElement.ownerDocument.defaultView.frameElement;\n\t\t\t\t\t\tnextTabbable = focus.tabbable.findNext( nextTabbable );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnextTabbable = focus.tabbable.findPrevious( blockElement );\n\t\t\t\t}\n\n\t\t\t\tif ( nextTabbable ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tnextTabbable.focus();\n\t\t\t\t\tclearSelectedBlock();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst classNames = classnames(\n\t\t'block-editor-block-list__block-selection-button',\n\t\t{\n\t\t\t'is-block-moving-mode': !! blockMovingMode,\n\t\t}\n\t);\n\n\tconst dragHandleLabel = __( 'Drag' );\n\n\treturn (\n\t\t<div className={ classNames }>\n\t\t\t<Flex\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"block-editor-block-list__block-selection-button__content\"\n\t\t\t>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<BlockIcon icon={ blockInformation?.icon } showColors />\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t{ editorMode === 'zoom-out' && (\n\t\t\t\t\t\t<BlockMover clientIds={ [ clientId ] } hideDragHandle />\n\t\t\t\t\t) }\n\t\t\t\t\t{ editorMode === 'navigation' && (\n\t\t\t\t\t\t<BlockDraggable clientIds={ [ clientId ] }>\n\t\t\t\t\t\t\t{ ( draggableProps ) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ dragHandle }\n\t\t\t\t\t\t\t\t\tclassName=\"block-selection-button_drag-handle\"\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\tlabel={ dragHandleLabel }\n\t\t\t\t\t\t\t\t\t// Should not be able to tab to drag handle as this\n\t\t\t\t\t\t\t\t\t// button can only be used with a pointer device.\n\t\t\t\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t\t\t\t\t{ ...draggableProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BlockDraggable>\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\teditorMode === 'navigation'\n\t\t\t\t\t\t\t\t? () => setNavigationMode( false )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\tclassName=\"block-selection-button_select-button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default BlockSelectionButton;\n","/**\n * WordPress dependencies\n */\nimport { NavigableMenu, Toolbar } from '@wordpress/components';\nimport {\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n\tuseEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { focus } from '@wordpress/dom';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\n\nfunction hasOnlyToolbarItem( elements ) {\n\tconst dataProp = 'toolbarItem';\n\treturn ! elements.some( ( element ) => ! ( dataProp in element.dataset ) );\n}\n\nfunction getAllToolbarItemsIn( container ) {\n\treturn Array.from( container.querySelectorAll( '[data-toolbar-item]' ) );\n}\n\nfunction hasFocusWithin( container ) {\n\treturn container.contains( container.ownerDocument.activeElement );\n}\n\nfunction focusFirstTabbableIn( container ) {\n\tconst [ firstTabbable ] = focus.tabbable.find( container );\n\tif ( firstTabbable ) {\n\t\tfirstTabbable.focus( {\n\t\t\t// When focusing newly mounted toolbars,\n\t\t\t// the position of the popover is often not right on the first render\n\t\t\t// This prevents the layout shifts when focusing the dialogs.\n\t\t\tpreventScroll: true,\n\t\t} );\n\t}\n}\n\nfunction useIsAccessibleToolbar( ref ) {\n\t/*\n\t * By default, we'll assume the starting accessible state of the Toolbar\n\t * is true, as it seems to be the most common case.\n\t *\n\t * Transitioning from an (initial) false to true state causes the\n\t * <Toolbar /> component to mount twice, which is causing undesired\n\t * side-effects. These side-effects appear to only affect certain\n\t * E2E tests.\n\t *\n\t * This was initial discovered in this pull-request:\n\t * https://github.com/WordPress/gutenberg/pull/23425\n\t */\n\tconst initialAccessibleToolbarState = true;\n\n\t// By default, it's gonna render NavigableMenu. If all the tabbable elements\n\t// inside the toolbar are ToolbarItem components (or derived components like\n\t// ToolbarButton), then we can wrap them with the accessible Toolbar\n\t// component.\n\tconst [ isAccessibleToolbar, setIsAccessibleToolbar ] = useState(\n\t\tinitialAccessibleToolbarState\n\t);\n\n\tconst determineIsAccessibleToolbar = useCallback( () => {\n\t\tconst tabbables = focus.tabbable.find( ref.current );\n\t\tconst onlyToolbarItem = hasOnlyToolbarItem( tabbables );\n\t\tif ( ! onlyToolbarItem ) {\n\t\t\tdeprecated( 'Using custom components as toolbar controls', {\n\t\t\t\tsince: '5.6',\n\t\t\t\talternative:\n\t\t\t\t\t'ToolbarItem, ToolbarButton or ToolbarDropdownMenu components',\n\t\t\t\tlink: 'https://developer.wordpress.org/block-editor/components/toolbar-button/#inside-blockcontrols',\n\t\t\t} );\n\t\t}\n\t\tsetIsAccessibleToolbar( onlyToolbarItem );\n\t}, [] );\n\n\tuseLayoutEffect( () => {\n\t\t// Toolbar buttons may be rendered asynchronously, so we use\n\t\t// MutationObserver to check if the toolbar subtree has been modified.\n\t\tconst observer = new window.MutationObserver(\n\t\t\tdetermineIsAccessibleToolbar\n\t\t);\n\t\tobserver.observe( ref.current, { childList: true, subtree: true } );\n\t\treturn () => observer.disconnect();\n\t}, [ isAccessibleToolbar ] );\n\n\treturn isAccessibleToolbar;\n}\n\nfunction useToolbarFocus(\n\tref,\n\tfocusOnMount,\n\tisAccessibleToolbar,\n\tdefaultIndex,\n\tonIndexChange\n) {\n\t// Make sure we don't use modified versions of this prop.\n\tconst [ initialFocusOnMount ] = useState( focusOnMount );\n\tconst [ initialIndex ] = useState( defaultIndex );\n\n\tconst focusToolbar = useCallback( () => {\n\t\tfocusFirstTabbableIn( ref.current );\n\t}, [] );\n\n\t// Focus on toolbar when pressing alt+F10 when the toolbar is visible.\n\tuseShortcut( 'core/block-editor/focus-toolbar', focusToolbar );\n\n\tuseEffect( () => {\n\t\tif ( initialFocusOnMount ) {\n\t\t\tfocusToolbar();\n\t\t}\n\t}, [ isAccessibleToolbar, initialFocusOnMount, focusToolbar ] );\n\n\tuseEffect( () => {\n\t\t// If initialIndex is passed, we focus on that toolbar item when the\n\t\t// toolbar gets mounted and initial focus is not forced.\n\t\t// We have to wait for the next browser paint because block controls aren't\n\t\t// rendered right away when the toolbar gets mounted.\n\t\tlet raf = 0;\n\t\tif ( initialIndex && ! initialFocusOnMount ) {\n\t\t\traf = window.requestAnimationFrame( () => {\n\t\t\t\tconst items = getAllToolbarItemsIn( ref.current );\n\t\t\t\tconst index = initialIndex || 0;\n\t\t\t\tif ( items[ index ] && hasFocusWithin( ref.current ) ) {\n\t\t\t\t\titems[ index ].focus( {\n\t\t\t\t\t\t// When focusing newly mounted toolbars,\n\t\t\t\t\t\t// the position of the popover is often not right on the first render\n\t\t\t\t\t\t// This prevents the layout shifts when focusing the dialogs.\n\t\t\t\t\t\tpreventScroll: true,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\treturn () => {\n\t\t\twindow.cancelAnimationFrame( raf );\n\t\t\tif ( ! onIndexChange || ! ref.current ) return;\n\t\t\t// When the toolbar element is unmounted and onIndexChange is passed, we\n\t\t\t// pass the focused toolbar item index so it can be hydrated later.\n\t\t\tconst items = getAllToolbarItemsIn( ref.current );\n\t\t\tconst index = items.findIndex( ( item ) => item.tabIndex === 0 );\n\t\t\tonIndexChange( index );\n\t\t};\n\t}, [ initialIndex, initialFocusOnMount ] );\n}\n\nfunction NavigableToolbar( {\n\tchildren,\n\tfocusOnMount,\n\t__experimentalInitialIndex: initialIndex,\n\t__experimentalOnIndexChange: onIndexChange,\n\t...props\n} ) {\n\tconst ref = useRef();\n\tconst isAccessibleToolbar = useIsAccessibleToolbar( ref );\n\n\tuseToolbarFocus(\n\t\tref,\n\t\tfocusOnMount,\n\t\tisAccessibleToolbar,\n\t\tinitialIndex,\n\t\tonIndexChange\n\t);\n\n\tif ( isAccessibleToolbar ) {\n\t\treturn (\n\t\t\t<Toolbar label={ props[ 'aria-label' ] } ref={ ref } { ...props }>\n\t\t\t\t{ children }\n\t\t\t</Toolbar>\n\t\t);\n\t}\n\n\treturn (\n\t\t<NavigableMenu\n\t\t\torientation=\"horizontal\"\n\t\t\trole=\"toolbar\"\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</NavigableMenu>\n\t);\n}\n\nexport default NavigableToolbar;\n","/**\n * WordPress dependencies\n */\nimport { useState, useRef, useEffect } from '@wordpress/element';\n\nconst { clearTimeout, setTimeout } = window;\nconst noop = () => {};\nconst DEBOUNCE_TIMEOUT = 200;\n\n/**\n * Hook that creates a showMover state, as well as debounced show/hide callbacks.\n *\n * @param {Object}   props                       Component props.\n * @param {Object}   props.ref                   Element reference.\n * @param {boolean}  props.isFocused             Whether the component has current focus.\n * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.\n * @param {Function} [props.onChange=noop]       Callback function.\n */\nexport function useDebouncedShowMovers( {\n\tref,\n\tisFocused,\n\tdebounceTimeout = DEBOUNCE_TIMEOUT,\n\tonChange = noop,\n} ) {\n\tconst [ showMovers, setShowMovers ] = useState( false );\n\tconst timeoutRef = useRef();\n\n\tconst handleOnChange = ( nextIsFocused ) => {\n\t\tif ( ref?.current ) {\n\t\t\tsetShowMovers( nextIsFocused );\n\t\t}\n\n\t\tonChange( nextIsFocused );\n\t};\n\n\tconst getIsHovered = () => {\n\t\treturn ref?.current && ref.current.matches( ':hover' );\n\t};\n\n\tconst shouldHideMovers = () => {\n\t\tconst isHovered = getIsHovered();\n\t\treturn ! isFocused && ! isHovered;\n\t};\n\n\tconst clearTimeoutRef = () => {\n\t\tconst timeout = timeoutRef.current;\n\n\t\tif ( timeout && clearTimeout ) {\n\t\t\tclearTimeout( timeout );\n\t\t}\n\t};\n\n\tconst debouncedShowMovers = ( event ) => {\n\t\tif ( event ) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\n\t\tclearTimeoutRef();\n\n\t\tif ( ! showMovers ) {\n\t\t\thandleOnChange( true );\n\t\t}\n\t};\n\n\tconst debouncedHideMovers = ( event ) => {\n\t\tif ( event ) {\n\t\t\tevent.stopPropagation();\n\t\t}\n\n\t\tclearTimeoutRef();\n\n\t\ttimeoutRef.current = setTimeout( () => {\n\t\t\tif ( shouldHideMovers() ) {\n\t\t\t\thandleOnChange( false );\n\t\t\t}\n\t\t}, debounceTimeout );\n\t};\n\n\tuseEffect(\n\t\t() => () => {\n\t\t\t/**\n\t\t\t * We need to call the change handler with `isFocused`\n\t\t\t * set to false on unmount because we also clear the\n\t\t\t * timeout that would handle that.\n\t\t\t */\n\t\t\thandleOnChange( false );\n\t\t\tclearTimeoutRef();\n\t\t},\n\t\t[]\n\t);\n\n\treturn {\n\t\tshowMovers,\n\t\tdebouncedShowMovers,\n\t\tdebouncedHideMovers,\n\t};\n}\n\n/**\n * Hook that provides a showMovers state and gesture events for DOM elements\n * that interact with the showMovers state.\n *\n * @param {Object}   props                       Component props.\n * @param {Object}   props.ref                   Element reference.\n * @param {number}   [props.debounceTimeout=250] Debounce timeout in milliseconds.\n * @param {Function} [props.onChange=noop]       Callback function.\n */\nexport function useShowMoversGestures( {\n\tref,\n\tdebounceTimeout = DEBOUNCE_TIMEOUT,\n\tonChange = noop,\n} ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { showMovers, debouncedShowMovers, debouncedHideMovers } =\n\t\tuseDebouncedShowMovers( { ref, debounceTimeout, isFocused, onChange } );\n\n\tconst registerRef = useRef( false );\n\n\tconst isFocusedWithin = () => {\n\t\treturn (\n\t\t\tref?.current &&\n\t\t\tref.current.contains( ref.current.ownerDocument.activeElement )\n\t\t);\n\t};\n\n\tuseEffect( () => {\n\t\tconst node = ref.current;\n\n\t\tconst handleOnFocus = () => {\n\t\t\tif ( isFocusedWithin() ) {\n\t\t\t\tsetIsFocused( true );\n\t\t\t\tdebouncedShowMovers();\n\t\t\t}\n\t\t};\n\n\t\tconst handleOnBlur = () => {\n\t\t\tif ( ! isFocusedWithin() ) {\n\t\t\t\tsetIsFocused( false );\n\t\t\t\tdebouncedHideMovers();\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Events are added via DOM events (vs. React synthetic events),\n\t\t * as the child React components swallow mouse events.\n\t\t */\n\t\tif ( node && ! registerRef.current ) {\n\t\t\tnode.addEventListener( 'focus', handleOnFocus, true );\n\t\t\tnode.addEventListener( 'blur', handleOnBlur, true );\n\t\t\tregisterRef.current = true;\n\t\t}\n\n\t\treturn () => {\n\t\t\tif ( node ) {\n\t\t\t\tnode.removeEventListener( 'focus', handleOnFocus );\n\t\t\t\tnode.removeEventListener( 'blur', handleOnBlur );\n\t\t\t}\n\t\t};\n\t}, [\n\t\tref,\n\t\tregisterRef,\n\t\tsetIsFocused,\n\t\tdebouncedShowMovers,\n\t\tdebouncedHideMovers,\n\t] );\n\n\treturn {\n\t\tshowMovers,\n\t\tgestures: {\n\t\t\tonMouseMove: debouncedShowMovers,\n\t\t\tonMouseLeave: debouncedHideMovers,\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { getBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarButton } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport BlockIcon from '../block-icon';\nimport { useShowMoversGestures } from '../block-toolbar/utils';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Block parent selector component, displaying the hierarchy of the\n * current block selection as a single icon to \"go up\" a level.\n *\n * @return {WPComponent} Parent block selector.\n */\nexport default function BlockParentSelector() {\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { firstParentClientId, shouldHide, hasReducedUI } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockParents,\n\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { hasBlockSupport } = select( blocksStore );\n\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\t\tconst parents = getBlockParents( selectedBlockClientId );\n\t\t\tconst _firstParentClientId = parents[ parents.length - 1 ];\n\t\t\tconst parentBlockName = getBlockName( _firstParentClientId );\n\t\t\tconst _parentBlockType = getBlockType( parentBlockName );\n\t\t\tconst settings = getSettings();\n\t\t\treturn {\n\t\t\t\tfirstParentClientId: _firstParentClientId,\n\t\t\t\tshouldHide: ! hasBlockSupport(\n\t\t\t\t\t_parentBlockType,\n\t\t\t\t\t'__experimentalParentSelector',\n\t\t\t\t\ttrue\n\t\t\t\t),\n\t\t\t\thasReducedUI: settings.hasReducedUI,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockInformation = useBlockDisplayInformation( firstParentClientId );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst nodeRef = useRef();\n\tconst { gestures: showMoversGestures } = useShowMoversGestures( {\n\t\tref: nodeRef,\n\t\tonChange( isFocused ) {\n\t\t\tif ( isFocused && hasReducedUI ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttoggleBlockHighlight( firstParentClientId, isFocused );\n\t\t},\n\t} );\n\n\tif ( shouldHide || firstParentClientId === undefined ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-block-parent-selector\"\n\t\t\tkey={ firstParentClientId }\n\t\t\tref={ nodeRef }\n\t\t\t{ ...showMoversGestures }\n\t\t>\n\t\t\t<ToolbarButton\n\t\t\t\tclassName=\"block-editor-block-parent-selector__button\"\n\t\t\t\tonClick={ () => selectBlock( firstParentClientId ) }\n\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t\t__( 'Select %s' ),\n\t\t\t\t\tblockInformation?.title\n\t\t\t\t) }\n\t\t\t\tshowTooltip\n\t\t\t\ticon={ <BlockIcon icon={ blockInformation?.icon } /> }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst copy = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z\" />\n\t</SVG>\n);\n\nexport default copy;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Popover } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\n\nexport default function PreviewBlockPopover( { blocks } ) {\n\treturn (\n\t\t<div className=\"block-editor-block-switcher__popover__preview__parent\">\n\t\t\t<div className=\"block-editor-block-switcher__popover__preview__container\">\n\t\t\t\t<Popover\n\t\t\t\t\tclassName=\"block-editor-block-switcher__preview__popover\"\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t\tfocusOnMount={ false }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"block-editor-block-switcher__preview\">\n\t\t\t\t\t\t<div className=\"block-editor-block-switcher__preview-title\">\n\t\t\t\t\t\t\t{ __( 'Preview' ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<BlockPreview viewportWidth={ 500 } blocks={ blocks } />\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup, MenuItem } from '@wordpress/components';\nimport {\n\tgetBlockMenuDefaultClassName,\n\tswitchToBlockType,\n} from '@wordpress/blocks';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport PreviewBlockPopover from './preview-block-popover';\n\n/**\n * Helper hook to group transformations to display them in a specific order in the UI.\n * For now we group only priority content driven transformations(ex. paragraph -> heading).\n *\n * Later on we could also group 'layout' transformations(ex. paragraph -> group) and\n * display them in different sections.\n *\n * @param {Object[]} possibleBlockTransformations The available block transformations.\n * @return {Record<string, Object[]>} The grouped block transformations.\n */\nfunction useGroupedTransforms( possibleBlockTransformations ) {\n\tconst priorityContentTranformationBlocks = {\n\t\t'core/paragraph': 1,\n\t\t'core/heading': 2,\n\t\t'core/list': 3,\n\t\t'core/quote': 4,\n\t};\n\tconst transformations = useMemo( () => {\n\t\tconst priorityTextTranformsNames = Object.keys(\n\t\t\tpriorityContentTranformationBlocks\n\t\t);\n\t\treturn possibleBlockTransformations.reduce(\n\t\t\t( accumulator, item ) => {\n\t\t\t\tconst { name } = item;\n\t\t\t\tif ( priorityTextTranformsNames.includes( name ) ) {\n\t\t\t\t\taccumulator.priorityTextTransformations.push( item );\n\t\t\t\t} else {\n\t\t\t\t\taccumulator.restTransformations.push( item );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{ priorityTextTransformations: [], restTransformations: [] }\n\t\t);\n\t}, [ possibleBlockTransformations ] );\n\n\t// Order the priority text transformations.\n\ttransformations.priorityTextTransformations.sort(\n\t\t( { name: currentName }, { name: nextName } ) => {\n\t\t\treturn priorityContentTranformationBlocks[ currentName ] <\n\t\t\t\tpriorityContentTranformationBlocks[ nextName ]\n\t\t\t\t? -1\n\t\t\t\t: 1;\n\t\t}\n\t);\n\treturn transformations;\n}\n\nconst BlockTransformationsMenu = ( {\n\tclassName,\n\tpossibleBlockTransformations,\n\tonSelect,\n\tblocks,\n} ) => {\n\tconst [ hoveredTransformItemName, setHoveredTransformItemName ] =\n\t\tuseState();\n\n\tconst { priorityTextTransformations, restTransformations } =\n\t\tuseGroupedTransforms( possibleBlockTransformations );\n\t// We have to check if both content transformations(priority and rest) are set\n\t// in order to create a separate MenuGroup for them.\n\tconst hasBothContentTransformations =\n\t\tpriorityTextTransformations.length && restTransformations.length;\n\tconst restTransformItems = !! restTransformations.length && (\n\t\t<RestTransformationItems\n\t\t\trestTransformations={ restTransformations }\n\t\t\tonSelect={ onSelect }\n\t\t\tsetHoveredTransformItemName={ setHoveredTransformItemName }\n\t\t/>\n\t);\n\treturn (\n\t\t<>\n\t\t\t<MenuGroup label={ __( 'Transform to' ) } className={ className }>\n\t\t\t\t{ hoveredTransformItemName && (\n\t\t\t\t\t<PreviewBlockPopover\n\t\t\t\t\t\tblocks={ switchToBlockType(\n\t\t\t\t\t\t\tblocks,\n\t\t\t\t\t\t\thoveredTransformItemName\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ priorityTextTransformations.map( ( item ) => (\n\t\t\t\t\t<BlockTranformationItem\n\t\t\t\t\t\tkey={ item.name }\n\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsetHoveredTransformItemName={\n\t\t\t\t\t\t\tsetHoveredTransformItemName\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t\t{ ! hasBothContentTransformations && restTransformItems }\n\t\t\t</MenuGroup>\n\t\t\t{ !! hasBothContentTransformations && (\n\t\t\t\t<MenuGroup className={ className }>\n\t\t\t\t\t{ restTransformItems }\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nfunction RestTransformationItems( {\n\trestTransformations,\n\tonSelect,\n\tsetHoveredTransformItemName,\n} ) {\n\treturn restTransformations.map( ( item ) => (\n\t\t<BlockTranformationItem\n\t\t\tkey={ item.name }\n\t\t\titem={ item }\n\t\t\tonSelect={ onSelect }\n\t\t\tsetHoveredTransformItemName={ setHoveredTransformItemName }\n\t\t/>\n\t) );\n}\n\nfunction BlockTranformationItem( {\n\titem,\n\tonSelect,\n\tsetHoveredTransformItemName,\n} ) {\n\tconst { name, icon, title, isDisabled } = item;\n\treturn (\n\t\t<MenuItem\n\t\t\tclassName={ getBlockMenuDefaultClassName( name ) }\n\t\t\tonClick={ ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonSelect( name );\n\t\t\t} }\n\t\t\tdisabled={ isDisabled }\n\t\t\tonMouseLeave={ () => setHoveredTransformItemName( null ) }\n\t\t\tonMouseEnter={ () => setHoveredTransformItemName( name ) }\n\t\t>\n\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t{ title }\n\t\t</MenuItem>\n\t);\n}\n\nexport default BlockTransformationsMenu;\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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"tokenList\"];","/**\n * External dependencies\n */\nimport { find } from 'lodash';\n/**\n * WordPress dependencies\n */\nimport TokenList from '@wordpress/token-list';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Returns the active style from the given className.\n *\n * @param {Array}  styles    Block style variations.\n * @param {string} className Class name\n *\n * @return {Object?} The active style.\n */\nexport function getActiveStyle( styles, className ) {\n\tfor ( const style of new TokenList( className ).values() ) {\n\t\tif ( style.indexOf( 'is-style-' ) === -1 ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst potentialStyleName = style.substring( 9 );\n\t\tconst activeStyle = find( styles, { name: potentialStyleName } );\n\t\tif ( activeStyle ) {\n\t\t\treturn activeStyle;\n\t\t}\n\t}\n\n\treturn find( styles, 'isDefault' );\n}\n\n/**\n * Replaces the active style in the block's className.\n *\n * @param {string}  className   Class name.\n * @param {Object?} activeStyle The replaced style.\n * @param {Object}  newStyle    The replacing style.\n *\n * @return {string} The updated className.\n */\nexport function replaceActiveStyle( className, activeStyle, newStyle ) {\n\tconst list = new TokenList( className );\n\n\tif ( activeStyle ) {\n\t\tlist.remove( 'is-style-' + activeStyle.name );\n\t}\n\n\tlist.add( 'is-style-' + newStyle.name );\n\n\treturn list.value;\n}\n\n/**\n * Returns a collection of styles that can be represented on the frontend.\n * The function checks a style collection for a default style. If none is found, it adds one to\n * act as a fallback for when there is no active style applied to a block. The default item also serves\n * as a switch on the frontend to deactivate non-default styles.\n *\n * @param {Array} styles Block style variations.\n *\n * @return {Array<Object?>}        The style collection.\n */\nexport function getRenderedStyles( styles ) {\n\tif ( ! styles || styles.length === 0 ) {\n\t\treturn [];\n\t}\n\n\treturn getDefaultStyle( styles )\n\t\t? styles\n\t\t: [\n\t\t\t\t{\n\t\t\t\t\tname: 'default',\n\t\t\t\t\tlabel: _x( 'Default', 'block style' ),\n\t\t\t\t\tisDefault: true,\n\t\t\t\t},\n\t\t\t\t...styles,\n\t\t  ];\n}\n\n/**\n * Returns a style object from a collection of styles where that style object is the default block style.\n *\n * @param {Array} styles Block style variations.\n *\n * @return {Object?}        The default style object, if found.\n */\nexport function getDefaultStyle( styles ) {\n\treturn find( styles, 'isDefault' );\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\tcloneBlock,\n\tgetBlockType,\n\tgetBlockFromExample,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getActiveStyle, getRenderedStyles, replaceActiveStyle } from './utils';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n *\n * @param {WPBlock}     block Block object.\n * @param {WPBlockType} type  Block type settings.\n * @return {WPBlock}          A generic block ready for styles preview.\n */\nfunction useGenericPreviewBlock( block, type ) {\n\treturn useMemo( () => {\n\t\tconst example = type?.example;\n\t\tconst blockName = type?.name;\n\n\t\tif ( example && blockName ) {\n\t\t\treturn getBlockFromExample( blockName, {\n\t\t\t\tattributes: example.attributes,\n\t\t\t\tinnerBlocks: example.innerBlocks,\n\t\t\t} );\n\t\t}\n\n\t\tif ( block ) {\n\t\t\treturn cloneBlock( block );\n\t\t}\n\t}, [ type?.example ? block?.name : block, type ] );\n}\n\n/**\n * @typedef useStylesForBlocksArguments\n * @property {string}     clientId Block client ID.\n * @property {() => void} onSwitch Block style switch callback function.\n */\n\n/**\n *\n * @param {useStylesForBlocksArguments} useStylesForBlocks arguments.\n * @return {Object}                                         Results of the select methods.\n */\nexport default function useStylesForBlocks( { clientId, onSwitch } ) {\n\tconst selector = ( select ) => {\n\t\tconst { getBlock } = select( blockEditorStore );\n\t\tconst block = getBlock( clientId );\n\n\t\tif ( ! block ) {\n\t\t\treturn {};\n\t\t}\n\t\tconst blockType = getBlockType( block.name );\n\t\tconst { getBlockStyles } = select( blocksStore );\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tblockType,\n\t\t\tstyles: getBlockStyles( block.name ),\n\t\t\tclassName: block.attributes.className || '',\n\t\t};\n\t};\n\tconst { styles, block, blockType, className } = useSelect( selector, [\n\t\tclientId,\n\t] );\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst stylesToRender = getRenderedStyles( styles );\n\tconst activeStyle = getActiveStyle( stylesToRender, className );\n\tconst genericPreviewBlock = useGenericPreviewBlock( block, blockType );\n\n\tconst onSelect = ( style ) => {\n\t\tconst styleClassName = replaceActiveStyle(\n\t\t\tclassName,\n\t\t\tactiveStyle,\n\t\t\tstyle\n\t\t);\n\t\tupdateBlockAttributes( clientId, {\n\t\t\tclassName: styleClassName,\n\t\t} );\n\t\tonSwitch();\n\t};\n\n\treturn {\n\t\tonSelect,\n\t\tstylesToRender,\n\t\tactiveStyle,\n\t\tgenericPreviewBlock,\n\t\tclassName,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { MenuItem, __experimentalText as Text } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport useStylesForBlocks from './use-styles-for-block';\n\nconst noop = () => {};\n\nexport default function BlockStylesMenuItems( { clientId, onSwitch = noop } ) {\n\tconst { onSelect, stylesToRender, activeStyle } = useStylesForBlocks( {\n\t\tclientId,\n\t\tonSwitch,\n\t} );\n\n\tif ( ! stylesToRender || stylesToRender.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ stylesToRender.map( ( style ) => {\n\t\t\t\tconst menuItemText = style.label || style.name;\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ style.name }\n\t\t\t\t\t\ticon={ activeStyle.name === style.name ? check : null }\n\t\t\t\t\t\tonClick={ () => onSelect( style ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\tlimit={ 18 }\n\t\t\t\t\t\t\tellipsizeMode=\"tail\"\n\t\t\t\t\t\t\ttruncate\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ menuItemText }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockStylesMenuItems from '../block-styles/menu-items';\n\nexport default function BlockStylesMenu( { hoveredBlock, onSwitch } ) {\n\tconst { clientId } = hoveredBlock;\n\n\treturn (\n\t\t<MenuGroup\n\t\t\tlabel={ __( 'Styles' ) }\n\t\t\tclassName=\"block-editor-block-switcher__styles__menugroup\"\n\t\t>\n\t\t\t<BlockStylesMenuItems clientId={ clientId } onSwitch={ onSwitch } />\n\t\t</MenuGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalGetBlockAttributesNamesByRole as getBlockAttributesNamesByRole } from '@wordpress/blocks';\n\n/**\n * Try to find a matching block by a block's name in a provided\n * block. We recurse through InnerBlocks and return the reference\n * of the matched block (it could be an InnerBlock).\n * If no match is found return nothing.\n *\n * @param {WPBlock} block             The block to try to find a match.\n * @param {string}  selectedBlockName The block's name to use for matching condition.\n * @param {Set}     consumedBlocks    A set holding the previously matched/consumed blocks.\n *\n * @return {WPBlock?} The matched block if found or nothing(`undefined`).\n */\nexport const getMatchingBlockByName = (\n\tblock,\n\tselectedBlockName,\n\tconsumedBlocks = new Set()\n) => {\n\tconst { clientId, name, innerBlocks = [] } = block;\n\t// Check if block has been consumed already.\n\tif ( consumedBlocks.has( clientId ) ) return;\n\tif ( name === selectedBlockName ) return block;\n\t// Try to find a matching block from InnerBlocks recursively.\n\tfor ( const innerBlock of innerBlocks ) {\n\t\tconst match = getMatchingBlockByName(\n\t\t\tinnerBlock,\n\t\t\tselectedBlockName,\n\t\t\tconsumedBlocks\n\t\t);\n\t\tif ( match ) return match;\n\t}\n};\n\n/**\n * Find and return the block attributes to retain through\n * the transformation, based on Block Type's `role:content`\n * attributes. If no `role:content` attributes exist,\n * return selected block's attributes.\n *\n * @param {string} name       Block type's namespaced name.\n * @param {Object} attributes Selected block's attributes.\n * @return {Object} The block's attributes to retain.\n */\nexport const getRetainedBlockAttributes = ( name, attributes ) => {\n\tconst contentAttributes = getBlockAttributesNamesByRole( name, 'content' );\n\tif ( ! contentAttributes?.length ) return attributes;\n\n\treturn contentAttributes.reduce( ( _accumulator, attribute ) => {\n\t\tif ( attributes[ attribute ] )\n\t\t\t_accumulator[ attribute ] = attributes[ attribute ];\n\t\treturn _accumulator;\n\t}, {} );\n};\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { cloneBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { getMatchingBlockByName, getRetainedBlockAttributes } from './utils';\n\n/**\n * Mutate the matched block's attributes by getting\n * which block type's attributes to retain and prioritize\n * them in the merging of the attributes.\n *\n * @param {WPBlock} match         The matched block.\n * @param {WPBlock} selectedBlock The selected block.\n * @return {void}\n */\nexport const transformMatchingBlock = ( match, selectedBlock ) => {\n\t// Get the block attributes to retain through the transformation.\n\tconst retainedBlockAttributes = getRetainedBlockAttributes(\n\t\tselectedBlock.name,\n\t\tselectedBlock.attributes\n\t);\n\tmatch.attributes = {\n\t\t...match.attributes,\n\t\t...retainedBlockAttributes,\n\t};\n};\n\n/**\n * By providing the selected blocks and pattern's blocks\n * find the matching blocks, transform them and return them.\n * If not all selected blocks are matched, return nothing.\n *\n * @param {WPBlock[]} selectedBlocks The selected blocks.\n * @param {WPBlock[]} patternBlocks  The pattern's blocks.\n * @return {WPBlock[]|void} The transformed pattern's blocks or undefined if not all selected blocks have been matched.\n */\nexport const getPatternTransformedBlocks = (\n\tselectedBlocks,\n\tpatternBlocks\n) => {\n\t// Clone Pattern's blocks to produce new clientIds and be able to mutate the matches.\n\tconst _patternBlocks = patternBlocks.map( ( block ) =>\n\t\tcloneBlock( block )\n\t);\n\t/**\n\t * Keep track of the consumed pattern blocks.\n\t * This is needed because we loop the selected blocks\n\t * and for example we may have selected two paragraphs and\n\t * the pattern's blocks could have more `paragraphs`.\n\t */\n\tconst consumedBlocks = new Set();\n\tfor ( const selectedBlock of selectedBlocks ) {\n\t\tlet isMatch = false;\n\t\tfor ( const patternBlock of _patternBlocks ) {\n\t\t\tconst match = getMatchingBlockByName(\n\t\t\t\tpatternBlock,\n\t\t\t\tselectedBlock.name,\n\t\t\t\tconsumedBlocks\n\t\t\t);\n\t\t\tif ( ! match ) continue;\n\t\t\tisMatch = true;\n\t\t\tconsumedBlocks.add( match.clientId );\n\t\t\t// We update (mutate) the matching pattern block.\n\t\t\ttransformMatchingBlock( match, selectedBlock );\n\t\t\t// No need to loop through other pattern's blocks.\n\t\t\tbreak;\n\t\t}\n\t\t// Bail eary if a selected block has not been matched.\n\t\tif ( ! isMatch ) return;\n\t}\n\treturn _patternBlocks;\n};\n\n/**\n * @typedef {WPBlockPattern & {transformedBlocks: WPBlock[]}} TransformedBlockPattern\n */\n\n/**\n * Custom hook that accepts patterns from state and the selected\n * blocks and tries to match these with the pattern's blocks.\n * If all selected blocks are matched with a Pattern's block,\n * we transform them by retaining block's attributes with `role:content`.\n * The transformed pattern's blocks are set to a new pattern\n * property `transformedBlocks`.\n *\n * @param {WPBlockPattern[]} patterns       Patterns from state.\n * @param {WPBlock[]}        selectedBlocks The currently selected blocks.\n * @return {TransformedBlockPattern[]} Returns the eligible matched patterns with all the selected blocks.\n */\nconst useTransformedPatterns = ( patterns, selectedBlocks ) => {\n\treturn useMemo(\n\t\t() =>\n\t\t\tpatterns.reduce( ( accumulator, _pattern ) => {\n\t\t\t\tconst transformedBlocks = getPatternTransformedBlocks(\n\t\t\t\t\tselectedBlocks,\n\t\t\t\t\t_pattern.blocks\n\t\t\t\t);\n\t\t\t\tif ( transformedBlocks ) {\n\t\t\t\t\taccumulator.push( {\n\t\t\t\t\t\t..._pattern,\n\t\t\t\t\t\ttransformedBlocks,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t}, [] ),\n\t\t[ patterns, selectedBlocks ]\n\t);\n};\n\nexport default useTransformedPatterns;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { chevronRight } from '@wordpress/icons';\n\nimport {\n\tMenuGroup,\n\tMenuItem,\n\tPopover,\n\tVisuallyHidden,\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockPreview from '../block-preview';\nimport useTransformedPatterns from './use-transformed-patterns';\n\nfunction PatternTransformationsMenu( {\n\tblocks,\n\tpatterns: statePatterns,\n\tonSelect,\n} ) {\n\tconst [ showTransforms, setShowTransforms ] = useState( false );\n\tconst patterns = useTransformedPatterns( statePatterns, blocks );\n\tif ( ! patterns.length ) return null;\n\n\treturn (\n\t\t<MenuGroup className=\"block-editor-block-switcher__pattern__transforms__menugroup\">\n\t\t\t{ showTransforms && (\n\t\t\t\t<PreviewPatternsPopover\n\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<MenuItem\n\t\t\t\tonClick={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tsetShowTransforms( ! showTransforms );\n\t\t\t\t} }\n\t\t\t\ticon={ chevronRight }\n\t\t\t>\n\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t</MenuItem>\n\t\t</MenuGroup>\n\t);\n}\n\nfunction PreviewPatternsPopover( { patterns, onSelect } ) {\n\treturn (\n\t\t<div className=\"block-editor-block-switcher__popover__preview__parent\">\n\t\t\t<div className=\"block-editor-block-switcher__popover__preview__container\">\n\t\t\t\t<Popover\n\t\t\t\t\tclassName=\"block-editor-block-switcher__preview__popover\"\n\t\t\t\t\tposition=\"bottom right\"\n\t\t\t\t>\n\t\t\t\t\t<div className=\"block-editor-block-switcher__preview\">\n\t\t\t\t\t\t<div className=\"block-editor-block-switcher__preview-title\">\n\t\t\t\t\t\t\t{ __( 'Preview' ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<BlockPatternsList\n\t\t\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nfunction BlockPatternsList( { patterns, onSelect } ) {\n\tconst composite = useCompositeState();\n\treturn (\n\t\t<Composite\n\t\t\t{ ...composite }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"block-editor-block-switcher__preview-patterns-container\"\n\t\t\taria-label={ __( 'Patterns list' ) }\n\t\t>\n\t\t\t{ patterns.map( ( pattern ) => (\n\t\t\t\t<BlockPattern\n\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\tcomposite={ composite }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\nfunction BlockPattern( { pattern, onSelect, composite } ) {\n\t// TODO check pattern/preview width...\n\tconst baseClassName =\n\t\t'block-editor-block-switcher__preview-patterns-container';\n\tconst descriptionId = useInstanceId(\n\t\tBlockPattern,\n\t\t`${ baseClassName }-list__item-description`\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={ `${ baseClassName }-list__list-item` }\n\t\t\taria-label={ pattern.title }\n\t\t\taria-describedby={ pattern.description ? descriptionId : undefined }\n\t\t>\n\t\t\t<CompositeItem\n\t\t\t\trole=\"option\"\n\t\t\t\tas=\"div\"\n\t\t\t\t{ ...composite }\n\t\t\t\tclassName={ `${ baseClassName }-list__item` }\n\t\t\t\tonClick={ () => onSelect( pattern.transformedBlocks ) }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ pattern.transformedBlocks }\n\t\t\t\t\tviewportWidth={ pattern.viewportWidth || 500 }\n\t\t\t\t/>\n\t\t\t\t<div className={ `${ baseClassName }-list__item-title` }>\n\t\t\t\t\t{ pattern.title }\n\t\t\t\t</div>\n\t\t\t</CompositeItem>\n\t\t\t{ !! pattern.description && (\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ pattern.description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default PatternTransformationsMenu;\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport {\n\tDropdownMenu,\n\tToolbarButton,\n\tToolbarGroup,\n\tToolbarItem,\n} from '@wordpress/components';\nimport {\n\tswitchToBlockType,\n\tstore as blocksStore,\n\tisReusableBlock,\n\tisTemplatePart,\n} from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { copy } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport BlockIcon from '../block-icon';\nimport BlockTransformationsMenu from './block-transformations-menu';\nimport BlockStylesMenu from './block-styles-menu';\nimport PatternTransformationsMenu from './pattern-transformations-menu';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\n\nexport const BlockSwitcherDropdownMenu = ( { clientIds, blocks } ) => {\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( blocks[ 0 ].clientId );\n\tconst {\n\t\tpossibleBlockTransformations,\n\t\tcanRemove,\n\t\thasBlockStyles,\n\t\ticon,\n\t\tpatterns,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetBlockTransformItems,\n\t\t\t\t__experimentalGetPatternTransformItems,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockStyles, getBlockType } = select( blocksStore );\n\t\t\tconst { canRemoveBlocks } = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId(\n\t\t\t\tcastArray( clientIds )[ 0 ]\n\t\t\t);\n\t\t\tconst [ { name: firstBlockName } ] = blocks;\n\t\t\tconst _isSingleBlockSelected = blocks.length === 1;\n\t\t\tconst styles =\n\t\t\t\t_isSingleBlockSelected && getBlockStyles( firstBlockName );\n\t\t\tlet _icon;\n\t\t\tif ( _isSingleBlockSelected ) {\n\t\t\t\t_icon = blockInformation?.icon; // Take into account active block variations.\n\t\t\t} else {\n\t\t\t\tconst isSelectionOfSameType =\n\t\t\t\t\tnew Set( blocks.map( ( { name } ) => name ) ).size === 1;\n\t\t\t\t// When selection consists of blocks of multiple types, display an\n\t\t\t\t// appropriate icon to communicate the non-uniformity.\n\t\t\t\t_icon = isSelectionOfSameType\n\t\t\t\t\t? getBlockType( firstBlockName )?.icon\n\t\t\t\t\t: copy;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tpossibleBlockTransformations: getBlockTransformItems(\n\t\t\t\t\tblocks,\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t\tcanRemove: canRemoveBlocks( clientIds, rootClientId ),\n\t\t\t\thasBlockStyles: !! styles?.length,\n\t\t\t\ticon: _icon,\n\t\t\t\tpatterns: __experimentalGetPatternTransformItems(\n\t\t\t\t\tblocks,\n\t\t\t\t\trootClientId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientIds, blocks, blockInformation?.icon ]\n\t);\n\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId: Array.isArray( clientIds ) ? clientIds[ 0 ] : clientIds,\n\t\tmaximumLength: 35,\n\t} );\n\tconst isReusable = blocks.length === 1 && isReusableBlock( blocks[ 0 ] );\n\tconst isTemplate = blocks.length === 1 && isTemplatePart( blocks[ 0 ] );\n\n\t// Simple block tranformation based on the `Block Transforms` API.\n\tconst onBlockTransform = ( name ) =>\n\t\treplaceBlocks( clientIds, switchToBlockType( blocks, name ) );\n\t// Pattern transformation through the `Patterns` API.\n\tconst onPatternTransform = ( transformedBlocks ) =>\n\t\treplaceBlocks( clientIds, transformedBlocks );\n\n\t/**\n\t * The `isTemplate` check is a stopgap solution here.\n\t * Ideally, the Transforms API should handle this\n\t * by allowing to exclude blocks from wildcard transformations.\n\t */\n\tconst hasPossibleBlockTransformations =\n\t\t!! possibleBlockTransformations.length && canRemove && ! isTemplate;\n\tconst hasPatternTransformation = !! patterns?.length && canRemove;\n\tif ( ! hasBlockStyles && ! hasPossibleBlockTransformations ) {\n\t\treturn (\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tdisabled\n\t\t\t\t\tclassName=\"block-editor-block-switcher__no-switcher-icon\"\n\t\t\t\t\ttitle={ blockTitle }\n\t\t\t\t\ticon={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<BlockIcon icon={ icon } showColors />\n\t\t\t\t\t\t\t{ ( isReusable || isTemplate ) && (\n\t\t\t\t\t\t\t\t<span className=\"block-editor-block-switcher__toggle-text\">\n\t\t\t\t\t\t\t\t\t{ blockTitle }\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</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t);\n\t}\n\n\tconst blockSwitcherLabel = blockTitle;\n\n\tconst blockSwitcherDescription =\n\t\t1 === blocks.length\n\t\t\t? sprintf(\n\t\t\t\t\t/* translators: %s: block title. */\n\t\t\t\t\t__( '%s: Change block type or style' ),\n\t\t\t\t\tblockTitle\n\t\t\t  )\n\t\t\t: sprintf(\n\t\t\t\t\t/* translators: %d: number of blocks. */\n\t\t\t\t\t_n(\n\t\t\t\t\t\t'Change type of %d block',\n\t\t\t\t\t\t'Change type of %d blocks',\n\t\t\t\t\t\tblocks.length\n\t\t\t\t\t),\n\t\t\t\t\tblocks.length\n\t\t\t  );\n\n\tconst showDropDown =\n\t\thasBlockStyles ||\n\t\thasPossibleBlockTransformations ||\n\t\thasPatternTransformation;\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarItem>\n\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\tclassName=\"block-editor-block-switcher\"\n\t\t\t\t\t\tlabel={ blockSwitcherLabel }\n\t\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t\tposition: 'bottom right',\n\t\t\t\t\t\t\tisAlternate: true,\n\t\t\t\t\t\t\tclassName: 'block-editor-block-switcher__popover',\n\t\t\t\t\t\t} }\n\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<BlockIcon\n\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-switcher__toggle\"\n\t\t\t\t\t\t\t\t\tshowColors\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ ( isReusable || isTemplate ) && (\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-block-switcher__toggle-text\">\n\t\t\t\t\t\t\t\t\t\t{ blockTitle }\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\t</>\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tdescribedBy: blockSwitcherDescription,\n\t\t\t\t\t\t\t...toggleProps,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tmenuProps={ { orientation: 'both' } }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) =>\n\t\t\t\t\t\t\tshowDropDown && (\n\t\t\t\t\t\t\t\t<div className=\"block-editor-block-switcher__container\">\n\t\t\t\t\t\t\t\t\t{ hasPatternTransformation && (\n\t\t\t\t\t\t\t\t\t\t<PatternTransformationsMenu\n\t\t\t\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\t\t\t\t\t\t\tonSelect={ (\n\t\t\t\t\t\t\t\t\t\t\t\ttransformedBlocks\n\t\t\t\t\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\t\t\t\t\tonPatternTransform(\n\t\t\t\t\t\t\t\t\t\t\t\t\ttransformedBlocks\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\tonClose();\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{ hasPossibleBlockTransformations && (\n\t\t\t\t\t\t\t\t\t\t<BlockTransformationsMenu\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"block-editor-block-switcher__transforms__menugroup\"\n\t\t\t\t\t\t\t\t\t\t\tpossibleBlockTransformations={\n\t\t\t\t\t\t\t\t\t\t\t\tpossibleBlockTransformations\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\t\t\t\tonSelect={ ( name ) => {\n\t\t\t\t\t\t\t\t\t\t\t\tonBlockTransform( name );\n\t\t\t\t\t\t\t\t\t\t\t\tonClose();\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{ hasBlockStyles && (\n\t\t\t\t\t\t\t\t\t\t<BlockStylesMenu\n\t\t\t\t\t\t\t\t\t\t\thoveredBlock={ blocks[ 0 ] }\n\t\t\t\t\t\t\t\t\t\t\tonSwitch={ onClose }\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</div>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t) }\n\t\t\t</ToolbarItem>\n\t\t</ToolbarGroup>\n\t);\n};\n\nexport const BlockSwitcher = ( { clientIds } ) => {\n\tconst blocks = useSelect(\n\t\t( select ) =>\n\t\t\tselect( blockEditorStore ).getBlocksByClientId( clientIds ),\n\t\t[ clientIds ]\n\t);\n\n\tif ( ! blocks.length || blocks.some( ( block ) => ! block ) ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockSwitcherDropdownMenu clientIds={ clientIds } blocks={ blocks } />\n\t);\n};\n\nexport default BlockSwitcher;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: __unstableBlockToolbarLastItem, Slot } = createSlotFill(\n\t'__unstableBlockToolbarLastItem'\n);\n\n__unstableBlockToolbarLastItem.Slot = Slot;\n\nexport default __unstableBlockToolbarLastItem;\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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blob\"];","/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\nexport function getPasteEventData( { clipboardData } ) {\n\tlet plainText = '';\n\tlet html = '';\n\n\t// IE11 only supports `Text` as an argument for `getData` and will\n\t// otherwise throw an invalid argument error, so we try the standard\n\t// arguments first, then fallback to `Text` if they fail.\n\ttry {\n\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\thtml = clipboardData.getData( 'text/html' );\n\t} catch ( error1 ) {\n\t\ttry {\n\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t} catch ( error2 ) {\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\t}\n\n\tconst files = getFilesFromDataTransfer( clipboardData ).filter(\n\t\t( { type } ) => /^image\\/(?:jpe?g|png|gif|webp)$/.test( type )\n\t);\n\n\tif (\n\t\tfiles.length &&\n\t\t! shouldDismissPastedFiles( files, html, plainText )\n\t) {\n\t\thtml = files\n\t\t\t.map( ( file ) => `<img src=\"${ createBlobURL( file ) }\">` )\n\t\t\t.join( '' );\n\t\tplainText = '';\n\t}\n\n\treturn { html, plainText };\n}\n\n/**\n * Given a collection of DataTransfer files and HTML and plain text strings,\n * determine whether the files are to be dismissed in favor of the HTML.\n *\n * Certain office-type programs, like Microsoft Word or Apple Numbers,\n * will, upon copy, generate a screenshot of the content being copied and\n * attach it to the clipboard alongside the actual rich text that the user\n * sought to copy. In those cases, we should let Gutenberg handle the rich text\n * content and not the screenshot, since this allows Gutenberg to insert\n * meaningful blocks, like paragraphs, lists or even tables.\n *\n * @param {File[]} files File objects obtained from a paste event\n * @param {string} html  HTML content obtained from a paste event\n * @return {boolean}     True if the files should be dismissed\n */\nexport function shouldDismissPastedFiles( files, html /*, plainText */ ) {\n\t// The question is only relevant when there is actual HTML content and when\n\t// there is exactly one image file.\n\tif (\n\t\thtml &&\n\t\tfiles?.length === 1 &&\n\t\tfiles[ 0 ].type.indexOf( 'image/' ) === 0\n\t) {\n\t\t// A single <img> tag found in the HTML source suggests that the\n\t\t// content being pasted revolves around an image. Sometimes there are\n\t\t// other elements found, like <figure>, but we assume that the user's\n\t\t// intention is to paste the actual image file.\n\t\tconst IMAGE_TAG = /<\\s*img\\b/gi;\n\t\tif ( html.match( IMAGE_TAG )?.length !== 1 ) return true;\n\n\t\t// Even when there is exactly one <img> tag in the HTML payload, we\n\t\t// choose to weed out local images, i.e. those whose source starts with\n\t\t// \"file://\". These payloads occur in specific configurations, such as\n\t\t// when copying an entire document from Microsoft Word, that contains\n\t\t// text and exactly one image, and pasting that content using Google\n\t\t// Chrome.\n\t\tconst IMG_WITH_LOCAL_SRC = /<\\s*img\\b[^>]*\\bsrc=\"file:\\/\\//i;\n\t\tif ( html.match( IMG_WITH_LOCAL_SRC ) ) return true;\n\t}\n\n\treturn false;\n}\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport {\n\tserialize,\n\tpasteHandler,\n\tstore as blocksStore,\n\tcreateBlock,\n} from '@wordpress/blocks';\nimport {\n\tdocumentHasSelection,\n\tdocumentHasUncollapsedSelection,\n\t__unstableStripHTML as stripHTML,\n} from '@wordpress/dom';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useRefEffect } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getPasteEventData } from '../../utils/pasting';\nimport { store as blockEditorStore } from '../../store';\n\nexport function useNotifyCopy() {\n\tconst { getBlockName } = useSelect( blockEditorStore );\n\tconst { getBlockType } = useSelect( blocksStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\treturn useCallback( ( eventType, selectedBlockClientIds ) => {\n\t\tlet notice = '';\n\t\tif ( selectedBlockClientIds.length === 1 ) {\n\t\t\tconst clientId = selectedBlockClientIds[ 0 ];\n\t\t\tconst title = getBlockType( getBlockName( clientId ) )?.title;\n\t\t\tnotice =\n\t\t\t\teventType === 'copy'\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// Translators: Name of the block being copied, e.g. \"Paragraph\".\n\t\t\t\t\t\t\t__( 'Copied \"%s\" to clipboard.' ),\n\t\t\t\t\t\t\ttitle\n\t\t\t\t\t  )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// Translators: Name of the block being cut, e.g. \"Paragraph\".\n\t\t\t\t\t\t\t__( 'Moved \"%s\" to clipboard.' ),\n\t\t\t\t\t\t\ttitle\n\t\t\t\t\t  );\n\t\t} else {\n\t\t\tnotice =\n\t\t\t\teventType === 'copy'\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// Translators: %d: Number of blocks being copied.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Copied %d block to clipboard.',\n\t\t\t\t\t\t\t\t'Copied %d blocks to clipboard.',\n\t\t\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t  )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// Translators: %d: Number of blocks being cut.\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'Moved %d block to clipboard.',\n\t\t\t\t\t\t\t\t'Moved %d blocks to clipboard.',\n\t\t\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tselectedBlockClientIds.length\n\t\t\t\t\t  );\n\t\t}\n\t\tcreateSuccessNotice( notice, {\n\t\t\ttype: 'snackbar',\n\t\t} );\n\t}, [] );\n}\n\nexport function useClipboardHandler() {\n\tconst {\n\t\tgetBlocksByClientId,\n\t\tgetSelectedBlockClientIds,\n\t\thasMultiSelection,\n\t\tgetSettings,\n\t\t__unstableIsFullySelected,\n\t\t__unstableIsSelectionCollapsed,\n\t\t__unstableIsSelectionMergeable,\n\t\t__unstableGetSelectedBlocksWithPartialSelection,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\tflashBlock,\n\t\tremoveBlocks,\n\t\treplaceBlocks,\n\t\t__unstableDeleteSelection,\n\t\t__unstableExpandSelection,\n\t} = useDispatch( blockEditorStore );\n\tconst notifyCopy = useNotifyCopy();\n\n\treturn useRefEffect( ( node ) => {\n\t\tfunction handler( event ) {\n\t\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\n\t\t\tif ( selectedBlockClientIds.length === 0 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Always handle multiple selected blocks.\n\t\t\tif ( ! hasMultiSelection() ) {\n\t\t\t\tconst { target } = event;\n\t\t\t\tconst { ownerDocument } = target;\n\t\t\t\t// If copying, only consider actual text selection as selection.\n\t\t\t\t// Otherwise, any focus on an input field is considered.\n\t\t\t\tconst hasSelection =\n\t\t\t\t\tevent.type === 'copy' || event.type === 'cut'\n\t\t\t\t\t\t? documentHasUncollapsedSelection( ownerDocument )\n\t\t\t\t\t\t: documentHasSelection( ownerDocument );\n\n\t\t\t\t// Let native copy behaviour take over in input fields.\n\t\t\t\tif ( hasSelection ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! node.contains( event.target.ownerDocument.activeElement ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst eventDefaultPrevented = event.defaultPrevented;\n\t\t\tevent.preventDefault();\n\n\t\t\tconst isSelectionMergeable = __unstableIsSelectionMergeable();\n\t\t\tconst shouldHandleWholeBlocks =\n\t\t\t\t__unstableIsSelectionCollapsed() || __unstableIsFullySelected();\n\t\t\tconst expandSelectionIsNeeded =\n\t\t\t\t! shouldHandleWholeBlocks && ! isSelectionMergeable;\n\t\t\tif ( event.type === 'copy' || event.type === 'cut' ) {\n\t\t\t\tif ( selectedBlockClientIds.length === 1 ) {\n\t\t\t\t\tflashBlock( selectedBlockClientIds[ 0 ] );\n\t\t\t\t}\n\t\t\t\t// If we have a partial selection that is not mergeable, just\n\t\t\t\t// expand the selection to the whole blocks.\n\t\t\t\tif ( expandSelectionIsNeeded ) {\n\t\t\t\t\t__unstableExpandSelection();\n\t\t\t\t} else {\n\t\t\t\t\tnotifyCopy( event.type, selectedBlockClientIds );\n\t\t\t\t\tlet blocks;\n\t\t\t\t\t// Check if we have partial selection.\n\t\t\t\t\tif ( shouldHandleWholeBlocks ) {\n\t\t\t\t\t\tblocks = getBlocksByClientId( selectedBlockClientIds );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst [ head, tail ] =\n\t\t\t\t\t\t\t__unstableGetSelectedBlocksWithPartialSelection();\n\t\t\t\t\t\tconst inBetweenBlocks = getBlocksByClientId(\n\t\t\t\t\t\t\tselectedBlockClientIds.slice(\n\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\tselectedBlockClientIds.length - 1\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tblocks = [ head, ...inBetweenBlocks, tail ];\n\t\t\t\t\t}\n\n\t\t\t\t\tconst wrapperBlockName = event.clipboardData.getData(\n\t\t\t\t\t\t'__unstableWrapperBlockName'\n\t\t\t\t\t);\n\n\t\t\t\t\tif ( wrapperBlockName ) {\n\t\t\t\t\t\tblocks = createBlock(\n\t\t\t\t\t\t\twrapperBlockName,\n\t\t\t\t\t\t\tJSON.parse(\n\t\t\t\t\t\t\t\tevent.clipboardData.getData(\n\t\t\t\t\t\t\t\t\t'__unstableWrapperBlockAttributes'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblocks\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst serialized = serialize( blocks );\n\n\t\t\t\t\tevent.clipboardData.setData(\n\t\t\t\t\t\t'text/plain',\n\t\t\t\t\t\ttoPlainText( serialized )\n\t\t\t\t\t);\n\t\t\t\t\tevent.clipboardData.setData( 'text/html', serialized );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( event.type === 'cut' ) {\n\t\t\t\t// We need to also check if at the start we needed to\n\t\t\t\t// expand the selection, as in this point we might have\n\t\t\t\t// programmatically fully selected the blocks above.\n\t\t\t\tif ( shouldHandleWholeBlocks && ! expandSelectionIsNeeded ) {\n\t\t\t\t\tremoveBlocks( selectedBlockClientIds );\n\t\t\t\t} else {\n\t\t\t\t\t__unstableDeleteSelection();\n\t\t\t\t}\n\t\t\t} else if ( event.type === 'paste' ) {\n\t\t\t\tif ( eventDefaultPrevented ) {\n\t\t\t\t\t// This was likely already handled in rich-text/use-paste-handler.js.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst {\n\t\t\t\t\t__experimentalCanUserUseUnfilteredHTML:\n\t\t\t\t\t\tcanUserUseUnfilteredHTML,\n\t\t\t\t} = getSettings();\n\t\t\t\tconst { plainText, html } = getPasteEventData( event );\n\t\t\t\tconst blocks = pasteHandler( {\n\t\t\t\t\tHTML: html,\n\t\t\t\t\tplainText,\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\tcanUserUseUnfilteredHTML,\n\t\t\t\t} );\n\n\t\t\t\treplaceBlocks(\n\t\t\t\t\tselectedBlockClientIds,\n\t\t\t\t\tblocks,\n\t\t\t\t\tblocks.length - 1,\n\t\t\t\t\t-1\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tnode.ownerDocument.addEventListener( 'copy', handler );\n\t\tnode.ownerDocument.addEventListener( 'cut', handler );\n\t\tnode.ownerDocument.addEventListener( 'paste', handler );\n\n\t\treturn () => {\n\t\t\tnode.ownerDocument.removeEventListener( 'copy', handler );\n\t\t\tnode.ownerDocument.removeEventListener( 'cut', handler );\n\t\t\tnode.ownerDocument.removeEventListener( 'paste', handler );\n\t\t};\n\t}, [] );\n}\n\nfunction CopyHandler( { children } ) {\n\treturn <div ref={ useClipboardHandler() }>{ children }</div>;\n}\n\n/**\n * Given a string of HTML representing serialized blocks, returns the plain\n * text extracted after stripping the HTML of any tags and fixing line breaks.\n *\n * @param {string} html Serialized blocks.\n * @return {string} The plain-text content with any html removed.\n */\nfunction toPlainText( html ) {\n\t// Manually handle BR tags as line breaks prior to `stripHTML` call\n\thtml = html.replace( /<br>/g, '\\n' );\n\n\tconst plainText = stripHTML( html ).trim();\n\n\t// Merge any consecutive line breaks\n\treturn plainText.replace( /\\n\\n+/g, '\\n\\n' );\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/copy-handler/README.md\n */\nexport default CopyHandler;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport {\n\thasBlockSupport,\n\tswitchToBlockType,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useNotifyCopy } from '../copy-handler';\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockActions( {\n\tclientIds,\n\tchildren,\n\t__experimentalUpdateSelection: updateSelection,\n} ) {\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetBlockRootClientId,\n\t\tgetBlocksByClientId,\n\t\tcanMoveBlocks,\n\t\tcanRemoveBlocks,\n\t} = useSelect( blockEditorStore );\n\tconst { getDefaultBlockName, getGroupingBlockName } =\n\t\tuseSelect( blocksStore );\n\n\tconst blocks = getBlocksByClientId( clientIds );\n\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\tconst canDuplicate = blocks.every( ( block ) => {\n\t\treturn (\n\t\t\t!! block &&\n\t\t\thasBlockSupport( block.name, 'multiple', true ) &&\n\t\t\tcanInsertBlockType( block.name, rootClientId )\n\t\t);\n\t} );\n\n\tconst canInsertDefaultBlock = canInsertBlockType(\n\t\tgetDefaultBlockName(),\n\t\trootClientId\n\t);\n\n\tconst canMove = canMoveBlocks( clientIds, rootClientId );\n\tconst canRemove = canRemoveBlocks( clientIds, rootClientId );\n\n\tconst {\n\t\tremoveBlocks,\n\t\treplaceBlocks,\n\t\tduplicateBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tflashBlock,\n\t\tsetBlockMovingClientId,\n\t\tsetNavigationMode,\n\t\tselectBlock,\n\t} = useDispatch( blockEditorStore );\n\n\tconst notifyCopy = useNotifyCopy();\n\n\treturn children( {\n\t\tcanDuplicate,\n\t\tcanInsertDefaultBlock,\n\t\tcanMove,\n\t\tcanRemove,\n\t\trootClientId,\n\t\tblocks,\n\t\tonDuplicate() {\n\t\t\treturn duplicateBlocks( clientIds, updateSelection );\n\t\t},\n\t\tonRemove() {\n\t\t\treturn removeBlocks( clientIds, updateSelection );\n\t\t},\n\t\tonInsertBefore() {\n\t\t\tconst clientId = Array.isArray( clientIds )\n\t\t\t\t? clientIds[ 0 ]\n\t\t\t\t: clientId;\n\t\t\tinsertBeforeBlock( clientId );\n\t\t},\n\t\tonInsertAfter() {\n\t\t\tconst clientId = Array.isArray( clientIds )\n\t\t\t\t? clientIds[ clientIds.length - 1 ]\n\t\t\t\t: clientId;\n\t\t\tinsertAfterBlock( clientId );\n\t\t},\n\t\tonMoveTo() {\n\t\t\tsetNavigationMode( true );\n\t\t\tselectBlock( clientIds[ 0 ] );\n\t\t\tsetBlockMovingClientId( clientIds[ 0 ] );\n\t\t},\n\t\tonGroup() {\n\t\t\tif ( ! blocks.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst groupingBlockName = getGroupingBlockName();\n\n\t\t\t// Activate the `transform` on `core/group` which does the conversion.\n\t\t\tconst newBlocks = switchToBlockType( blocks, groupingBlockName );\n\n\t\t\tif ( ! newBlocks ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treplaceBlocks( clientIds, newBlocks );\n\t\t},\n\t\tonUngroup() {\n\t\t\tif ( ! blocks.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst innerBlocks = blocks[ 0 ].innerBlocks;\n\n\t\t\tif ( ! innerBlocks.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treplaceBlocks( clientIds, innerBlocks );\n\t\t},\n\t\tonCopy() {\n\t\t\tconst selectedBlockClientIds = blocks.map(\n\t\t\t\t( { clientId } ) => clientId\n\t\t\t);\n\t\t\tif ( blocks.length === 1 ) {\n\t\t\t\tflashBlock( selectedBlockClientIds[ 0 ] );\n\t\t\t}\n\t\t\tnotifyCopy( 'copy', selectedBlockClientIds );\n\t\t},\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\nexport function BlockModeToggle( {\n\tblockType,\n\tmode,\n\tonToggleMode,\n\tsmall = false,\n\tisCodeEditingEnabled = true,\n} ) {\n\tif (\n\t\t! blockType ||\n\t\t! hasBlockSupport( blockType, 'html', true ) ||\n\t\t! isCodeEditingEnabled\n\t) {\n\t\treturn null;\n\t}\n\n\tconst label =\n\t\tmode === 'visual' ? __( 'Edit as HTML' ) : __( 'Edit visually' );\n\n\treturn <MenuItem onClick={ onToggleMode }>{ ! small && label }</MenuItem>;\n}\n\nexport default compose( [\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlock, getBlockMode, getSettings } =\n\t\t\tselect( blockEditorStore );\n\t\tconst block = getBlock( clientId );\n\t\tconst isCodeEditingEnabled = getSettings().codeEditingEnabled;\n\n\t\treturn {\n\t\t\tmode: getBlockMode( clientId ),\n\t\t\tblockType: block ? getBlockType( block.name ) : null,\n\t\t\tisCodeEditingEnabled,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { onToggle = noop, clientId } ) => ( {\n\t\tonToggleMode() {\n\t\t\tdispatch( blockEditorStore ).toggleBlockMode( clientId );\n\t\t\tonToggle();\n\t\t},\n\t} ) ),\n] )( BlockModeToggle );\n","/**\n * WordPress dependencies\n */\nimport { rawHandler, getBlockContent } from '@wordpress/blocks';\nimport { compose } from '@wordpress/compose';\nimport { withSelect, withDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BlockConvertButton from './block-convert-button';\nimport { store as blockEditorStore } from '../../store';\n\nexport default compose(\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst block = select( blockEditorStore ).getBlock( clientId );\n\n\t\treturn {\n\t\t\tblock,\n\t\t\tshouldRender: block && block.name === 'core/html',\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { block } ) => ( {\n\t\tonClick: () =>\n\t\t\tdispatch( blockEditorStore ).replaceBlocks(\n\t\t\t\tblock.clientId,\n\t\t\t\trawHandler( { HTML: getBlockContent( block ) } )\n\t\t\t),\n\t} ) )\n)( BlockConvertButton );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\n\nexport default function BlockConvertButton( { shouldRender, onClick, small } ) {\n\tif ( ! shouldRender ) {\n\t\treturn null;\n\t}\n\n\tconst label = __( 'Convert to Blocks' );\n\treturn <MenuItem onClick={ onClick }>{ ! small && label }</MenuItem>;\n}\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Fill: __unstableBlockSettingsMenuFirstItem, Slot } = createSlotFill(\n\t'__unstableBlockSettingsMenuFirstItem'\n);\n\n__unstableBlockSettingsMenuFirstItem.Slot = Slot;\n\nexport default __unstableBlockSettingsMenuFirstItem;\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { switchToBlockType } from '@wordpress/blocks';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport useConvertToGroupButtonProps from './use-convert-to-group-button-props';\nimport BlockGroupToolbar from './toolbar';\n\nfunction ConvertToGroupButton( {\n\tclientIds,\n\tisGroupable,\n\tisUngroupable,\n\tblocksSelection,\n\tgroupingBlockName,\n\tonClose = () => {},\n} ) {\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\tconst onConvertToGroup = () => {\n\t\t// Activate the `transform` on the Grouping Block which does the conversion.\n\t\tconst newBlocks = switchToBlockType(\n\t\t\tblocksSelection,\n\t\t\tgroupingBlockName\n\t\t);\n\t\tif ( newBlocks ) {\n\t\t\treplaceBlocks( clientIds, newBlocks );\n\t\t}\n\t};\n\n\tconst onConvertFromGroup = () => {\n\t\tconst innerBlocks = blocksSelection[ 0 ].innerBlocks;\n\t\tif ( ! innerBlocks.length ) {\n\t\t\treturn;\n\t\t}\n\t\treplaceBlocks( clientIds, innerBlocks );\n\t};\n\n\tif ( ! isGroupable && ! isUngroupable ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ isGroupable && (\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonConvertToGroup();\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( 'Group', 'verb' ) }\n\t\t\t\t</MenuItem>\n\t\t\t) }\n\t\t\t{ isUngroupable && (\n\t\t\t\t<MenuItem\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonConvertFromGroup();\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(\n\t\t\t\t\t\t'Ungroup',\n\t\t\t\t\t\t'Ungrouping blocks from within a Group block back into individual blocks within the Editor '\n\t\t\t\t\t) }\n\t\t\t\t</MenuItem>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport {\n\tBlockGroupToolbar,\n\tConvertToGroupButton,\n\tuseConvertToGroupButtonProps,\n};\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Contains the properties `ConvertToGroupButton` component needs.\n *\n * @typedef {Object} ConvertToGroupButtonProps\n * @property {string[]}  clientIds         An array of the selected client ids.\n * @property {boolean}   isGroupable       Indicates if the selected blocks can be grouped.\n * @property {boolean}   isUngroupable     Indicates if the selected blocks can be ungrouped.\n * @property {WPBlock[]} blocksSelection   An array of the selected blocks.\n * @property {string}    groupingBlockName The name of block used for handling grouping interactions.\n */\n\n/**\n * Returns the properties `ConvertToGroupButton` component needs to work properly.\n * It is used in `BlockSettingsMenuControls` to know if `ConvertToGroupButton`\n * should be rendered, to avoid ending up with an empty MenuGroup.\n *\n * @return {ConvertToGroupButtonProps} Returns the properties needed by `ConvertToGroupButton`.\n */\nexport default function useConvertToGroupButtonProps() {\n\tconst {\n\t\tclientIds,\n\t\tisGroupable,\n\t\tisUngroupable,\n\t\tblocksSelection,\n\t\tgroupingBlockName,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockRootClientId,\n\t\t\tgetBlocksByClientId,\n\t\t\tcanInsertBlockType,\n\t\t\tgetSelectedBlockClientIds,\n\t\t} = select( blockEditorStore );\n\t\tconst { getGroupingBlockName } = select( blocksStore );\n\n\t\tconst _clientIds = getSelectedBlockClientIds();\n\t\tconst _groupingBlockName = getGroupingBlockName();\n\n\t\tconst rootClientId = !! _clientIds?.length\n\t\t\t? getBlockRootClientId( _clientIds[ 0 ] )\n\t\t\t: undefined;\n\n\t\tconst groupingBlockAvailable = canInsertBlockType(\n\t\t\t_groupingBlockName,\n\t\t\trootClientId\n\t\t);\n\n\t\tconst _blocksSelection = getBlocksByClientId( _clientIds );\n\n\t\tconst isSingleGroupingBlock =\n\t\t\t_blocksSelection.length === 1 &&\n\t\t\t_blocksSelection[ 0 ]?.name === _groupingBlockName;\n\n\t\t// Do we have\n\t\t// 1. Grouping block available to be inserted?\n\t\t// 2. One or more blocks selected\n\t\tconst _isGroupable = groupingBlockAvailable && _blocksSelection.length;\n\n\t\t// Do we have a single Group Block selected and does that group have inner blocks?\n\t\tconst _isUngroupable =\n\t\t\tisSingleGroupingBlock &&\n\t\t\t!! _blocksSelection[ 0 ].innerBlocks.length;\n\t\treturn {\n\t\t\tclientIds: _clientIds,\n\t\t\tisGroupable: _isGroupable,\n\t\t\tisUngroupable: _isUngroupable,\n\t\t\tblocksSelection: _blocksSelection,\n\t\t\tgroupingBlockName: _groupingBlockName,\n\t\t};\n\t}, [] );\n\treturn {\n\t\tclientIds,\n\t\tisGroupable,\n\t\tisUngroupable,\n\t\tblocksSelection,\n\t\tgroupingBlockName,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Return details about the block lock status.\n *\n * @param {string} clientId The block client Id.\n *\n * @return {Object} Block lock status\n */\nexport default function useBlockLock( clientId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tcanEditBlock,\n\t\t\t\tcanMoveBlock,\n\t\t\t\tcanRemoveBlock,\n\t\t\t\tcanLockBlockType,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\tgetTemplateLock,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\tconst canEdit = canEditBlock( clientId );\n\t\t\tconst canMove = canMoveBlock( clientId, rootClientId );\n\t\t\tconst canRemove = canRemoveBlock( clientId, rootClientId );\n\n\t\t\treturn {\n\t\t\t\tcanEdit,\n\t\t\t\tcanMove,\n\t\t\t\tcanRemove,\n\t\t\t\tcanLock: canLockBlockType( getBlockName( clientId ) ),\n\t\t\t\tisContentLocked: getTemplateLock( clientId ) === 'contentOnly',\n\t\t\t\tisLocked: ! canEdit || ! canMove || ! canRemove,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst unlock = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8h1.5c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1z\" />\n\t</SVG>\n);\n\nexport default unlock;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst lock = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17 10h-1.2V7c0-2.1-1.7-3.8-3.8-3.8-2.1 0-3.8 1.7-3.8 3.8v3H7c-.6 0-1 .4-1 1v8c0 .6.4 1 1 1h10c.6 0 1-.4 1-1v-8c0-.6-.4-1-1-1zm-2.8 0H9.8V7c0-1.2 1-2.2 2.2-2.2s2.2 1 2.2 2.2v3z\" />\n\t</SVG>\n);\n\nexport default lock;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEffect, useState } from '@wordpress/element';\nimport {\n\tButton,\n\tCheckboxControl,\n\tFlex,\n\tFlexItem,\n\tIcon,\n\tModal,\n\tToggleControl,\n} from '@wordpress/components';\nimport { lock as lockIcon, unlock as unlockIcon } from '@wordpress/icons';\nimport { useInstanceId } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { isReusableBlock, getBlockType } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\n\nfunction getTemplateLockValue( lock ) {\n\t// Prevents all operations.\n\tif ( lock.remove && lock.move ) {\n\t\treturn 'all';\n\t}\n\n\t// Prevents inserting or removing blocks, but allows moving existing blocks.\n\tif ( lock.remove && ! lock.move ) {\n\t\treturn 'insert';\n\t}\n\n\treturn false;\n}\n\nexport default function BlockLockModal( { clientId, onClose } ) {\n\tconst [ lock, setLock ] = useState( { move: false, remove: false } );\n\tconst { canEdit, canMove, canRemove } = useBlockLock( clientId );\n\tconst { isReusable, templateLock, hasTemplateLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst blockType = getBlockType( blockName );\n\n\t\t\treturn {\n\t\t\t\tisReusable: isReusableBlock( blockType ),\n\t\t\t\ttemplateLock: getBlockAttributes( clientId )?.templateLock,\n\t\t\t\thasTemplateLock: !! blockType?.attributes?.templateLock,\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst [ applyTemplateLock, setApplyTemplateLock ] = useState(\n\t\t!! templateLock\n\t);\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst instanceId = useInstanceId(\n\t\tBlockLockModal,\n\t\t'block-editor-block-lock-modal__options-title'\n\t);\n\n\tuseEffect( () => {\n\t\tsetLock( {\n\t\t\tmove: ! canMove,\n\t\t\tremove: ! canRemove,\n\t\t\t...( isReusable ? { edit: ! canEdit } : {} ),\n\t\t} );\n\t}, [ canEdit, canMove, canRemove, isReusable ] );\n\n\tconst isAllChecked = Object.values( lock ).every( Boolean );\n\tconst isMixed = Object.values( lock ).some( Boolean ) && ! isAllChecked;\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ sprintf(\n\t\t\t\t/* translators: %s: Name of the block. */\n\t\t\t\t__( 'Lock %s' ),\n\t\t\t\tblockInformation.title\n\t\t\t) }\n\t\t\toverlayClassName=\"block-editor-block-lock-modal\"\n\t\t\tcloseLabel={ __( 'Close' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t>\n\t\t\t<p>\n\t\t\t\t{ __(\n\t\t\t\t\t'Choose specific attributes to restrict or lock all available options.'\n\t\t\t\t) }\n\t\t\t</p>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tupdateBlockAttributes( [ clientId ], {\n\t\t\t\t\t\tlock,\n\t\t\t\t\t\ttemplateLock: applyTemplateLock\n\t\t\t\t\t\t\t? getTemplateLockValue( lock )\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t} );\n\t\t\t\t\tonClose();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\trole=\"group\"\n\t\t\t\t\taria-labelledby={ instanceId }\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options\"\n\t\t\t\t>\n\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__options-title\"\n\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t<span id={ instanceId }>{ __( 'Lock all' ) }</span>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchecked={ isAllChecked }\n\t\t\t\t\t\tindeterminate={ isMixed }\n\t\t\t\t\t\tonChange={ ( newValue ) =>\n\t\t\t\t\t\t\tsetLock( {\n\t\t\t\t\t\t\t\tmove: newValue,\n\t\t\t\t\t\t\t\tremove: newValue,\n\t\t\t\t\t\t\t\t...( isReusable ? { edit: newValue } : {} ),\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<ul className=\"block-editor-block-lock-modal__checklist\">\n\t\t\t\t\t\t{ isReusable && (\n\t\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Restrict editing' ) }\n\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\t\tlock.edit\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\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\tchecked={ !! lock.edit }\n\t\t\t\t\t\t\t\t\tonChange={ ( edit ) =>\n\t\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\t\tedit,\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</li>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Disable movement' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tlock.move\n\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\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\tchecked={ lock.move }\n\t\t\t\t\t\t\t\tonChange={ ( move ) =>\n\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\tmove,\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</li>\n\t\t\t\t\t\t<li className=\"block-editor-block-lock-modal__checklist-item\">\n\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Prevent removal' ) }\n\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t\tlock.remove\n\t\t\t\t\t\t\t\t\t\t\t\t\t? lockIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t: unlockIcon\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\tchecked={ lock.remove }\n\t\t\t\t\t\t\t\tonChange={ ( remove ) =>\n\t\t\t\t\t\t\t\t\tsetLock( ( prevLock ) => ( {\n\t\t\t\t\t\t\t\t\t\t...prevLock,\n\t\t\t\t\t\t\t\t\t\tremove,\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</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t{ hasTemplateLock && (\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tclassName=\"block-editor-block-lock-modal__template-lock\"\n\t\t\t\t\t\t\tlabel={ __( 'Apply to all blocks inside' ) }\n\t\t\t\t\t\t\tchecked={ applyTemplateLock }\n\t\t\t\t\t\t\tdisabled={ lock.move && ! lock.remove }\n\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\tsetApplyTemplateLock( ! applyTemplateLock )\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</div>\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"block-editor-block-lock-modal__actions\"\n\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"tertiary\" onClick={ onClose }>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t{ __( 'Apply' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useReducer } from '@wordpress/element';\nimport { MenuItem } from '@wordpress/components';\nimport { lock, unlock } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport useBlockLock from './use-block-lock';\nimport BlockLockModal from './modal';\n\nexport default function BlockLockMenuItem( { clientId } ) {\n\tconst { canLock, isLocked } = useBlockLock( clientId );\n\n\tconst [ isModalOpen, toggleModal ] = useReducer(\n\t\t( isActive ) => ! isActive,\n\t\tfalse\n\t);\n\n\tif ( ! canLock ) {\n\t\treturn null;\n\t}\n\n\tconst label = isLocked ? __( 'Unlock' ) : __( 'Lock' );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem icon={ isLocked ? unlock : lock } onClick={ toggleModal }>\n\t\t\t\t{ label }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<BlockLockModal clientId={ clientId } onClose={ toggleModal } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateSlotFill,\n\tMenuGroup,\n\t__experimentalStyleProvider as StyleProvider,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tuseConvertToGroupButtonProps,\n\tConvertToGroupButton,\n} from '../convert-to-group-buttons';\nimport { BlockLockMenuItem, useBlockLock } from '../block-lock';\nimport { store as blockEditorStore } from '../../store';\n\nconst { Fill, Slot } = createSlotFill( 'BlockSettingsMenuControls' );\n\nconst BlockSettingsMenuControlsSlot = ( {\n\tfillProps,\n\tclientIds = null,\n\t__unstableDisplayLocation,\n} ) => {\n\tconst { selectedBlocks, selectedClientIds, canRemove } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlocksByClientId,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\tcanRemoveBlocks,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst ids =\n\t\t\t\tclientIds !== null ? clientIds : getSelectedBlockClientIds();\n\t\t\treturn {\n\t\t\t\tselectedBlocks: map(\n\t\t\t\t\tgetBlocksByClientId( ids ).filter( Boolean ),\n\t\t\t\t\t( block ) => block.name\n\t\t\t\t),\n\t\t\t\tselectedClientIds: ids,\n\t\t\t\tcanRemove: canRemoveBlocks( ids ),\n\t\t\t};\n\t\t},\n\t\t[ clientIds ]\n\t);\n\n\tconst { canLock } = useBlockLock( selectedClientIds[ 0 ] );\n\tconst showLockButton = selectedClientIds.length === 1 && canLock;\n\n\t// Check if current selection of blocks is Groupable or Ungroupable\n\t// and pass this props down to ConvertToGroupButton.\n\tconst convertToGroupButtonProps = useConvertToGroupButtonProps();\n\tconst { isGroupable, isUngroupable } = convertToGroupButtonProps;\n\tconst showConvertToGroupButton =\n\t\t( isGroupable || isUngroupable ) && canRemove;\n\n\treturn (\n\t\t<Slot\n\t\t\tfillProps={ {\n\t\t\t\t...fillProps,\n\t\t\t\t__unstableDisplayLocation,\n\t\t\t\tselectedBlocks,\n\t\t\t\tselectedClientIds,\n\t\t\t} }\n\t\t>\n\t\t\t{ ( fills ) => {\n\t\t\t\tif (\n\t\t\t\t\t! fills?.length > 0 &&\n\t\t\t\t\t! showConvertToGroupButton &&\n\t\t\t\t\t! showLockButton\n\t\t\t\t) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t{ showLockButton && (\n\t\t\t\t\t\t\t<BlockLockMenuItem\n\t\t\t\t\t\t\t\tclientId={ selectedClientIds[ 0 ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ fills }\n\t\t\t\t\t\t{ showConvertToGroupButton && (\n\t\t\t\t\t\t\t<ConvertToGroupButton\n\t\t\t\t\t\t\t\t{ ...convertToGroupButtonProps }\n\t\t\t\t\t\t\t\tonClose={ fillProps?.onClose }\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</Slot>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-settings-menu-controls/README.md\n *\n * @param {Object} props Fill props.\n * @return {WPElement} Element.\n */\nfunction BlockSettingsMenuControls( { ...props } ) {\n\treturn (\n\t\t<StyleProvider document={ document }>\n\t\t\t<Fill { ...props } />\n\t\t</StyleProvider>\n\t);\n}\n\nBlockSettingsMenuControls.Slot = BlockSettingsMenuControlsSlot;\n\nexport default BlockSettingsMenuControls;\n","/**\n * External dependencies\n */\nimport { castArray } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockType, serialize } from '@wordpress/blocks';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tChildren,\n\tcloneElement,\n\tuseCallback,\n\tuseRef,\n} from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { pipe, useCopyToClipboard } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockActions from '../block-actions';\nimport BlockIcon from '../block-icon';\nimport BlockModeToggle from './block-mode-toggle';\nimport BlockHTMLConvertButton from './block-html-convert-button';\nimport __unstableBlockSettingsMenuFirstItem from './block-settings-menu-first-item';\nimport BlockSettingsMenuControls from '../block-settings-menu-controls';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport { useShowMoversGestures } from '../block-toolbar/utils';\n\nconst noop = () => {};\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tposition: 'bottom right',\n\tisAlternate: true,\n};\n\nfunction CopyMenuItem( { blocks, onCopy } ) {\n\tconst ref = useCopyToClipboard( () => serialize( blocks ), onCopy );\n\tconst copyMenuItemLabel =\n\t\tblocks.length > 1 ? __( 'Copy blocks' ) : __( 'Copy block' );\n\treturn <MenuItem ref={ ref }>{ copyMenuItemLabel }</MenuItem>;\n}\n\nexport function BlockSettingsDropdown( {\n\tclientIds,\n\t__experimentalSelectBlock,\n\tchildren,\n\t__unstableDisplayLocation,\n\t...props\n} ) {\n\tconst blockClientIds = castArray( clientIds );\n\tconst count = blockClientIds.length;\n\tconst firstBlockClientId = blockClientIds[ 0 ];\n\tconst {\n\t\tfirstParentClientId,\n\t\thasReducedUI,\n\t\tonlyBlock,\n\t\tparentBlockType,\n\t\tpreviousBlockClientId,\n\t\tnextBlockClientId,\n\t\tselectedBlockClientIds,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockParents,\n\t\t\t\tgetPreviousBlockClientId,\n\t\t\t\tgetNextBlockClientId,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\tgetSettings,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tconst parents = getBlockParents( firstBlockClientId );\n\t\t\tconst _firstParentClientId = parents[ parents.length - 1 ];\n\t\t\tconst parentBlockName = getBlockName( _firstParentClientId );\n\n\t\t\treturn {\n\t\t\t\tfirstParentClientId: _firstParentClientId,\n\t\t\t\thasReducedUI: getSettings().hasReducedUI,\n\t\t\t\tonlyBlock: 1 === getBlockCount(),\n\t\t\t\tparentBlockType: getBlockType( parentBlockName ),\n\t\t\t\tpreviousBlockClientId:\n\t\t\t\t\tgetPreviousBlockClientId( firstBlockClientId ),\n\t\t\t\tnextBlockClientId: getNextBlockClientId( firstBlockClientId ),\n\t\t\t\tselectedBlockClientIds: getSelectedBlockClientIds(),\n\t\t\t};\n\t\t},\n\t\t[ firstBlockClientId ]\n\t);\n\n\tconst shortcuts = useSelect( ( select ) => {\n\t\tconst { getShortcutRepresentation } = select( keyboardShortcutsStore );\n\t\treturn {\n\t\t\tduplicate: getShortcutRepresentation(\n\t\t\t\t'core/block-editor/duplicate'\n\t\t\t),\n\t\t\tremove: getShortcutRepresentation( 'core/block-editor/remove' ),\n\t\t\tinsertAfter: getShortcutRepresentation(\n\t\t\t\t'core/block-editor/insert-after'\n\t\t\t),\n\t\t\tinsertBefore: getShortcutRepresentation(\n\t\t\t\t'core/block-editor/insert-before'\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tconst { selectBlock, toggleBlockHighlight } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst updateSelectionAfterDuplicate = useCallback(\n\t\t__experimentalSelectBlock\n\t\t\t? async ( clientIdsPromise ) => {\n\t\t\t\t\tconst ids = await clientIdsPromise;\n\t\t\t\t\tif ( ids && ids[ 0 ] ) {\n\t\t\t\t\t\t__experimentalSelectBlock( ids[ 0 ] );\n\t\t\t\t\t}\n\t\t\t  }\n\t\t\t: noop,\n\t\t[ __experimentalSelectBlock ]\n\t);\n\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId: firstBlockClientId,\n\t\tmaximumLength: 25,\n\t} );\n\n\tconst updateSelectionAfterRemove = useCallback(\n\t\t__experimentalSelectBlock\n\t\t\t? () => {\n\t\t\t\t\tconst blockToSelect =\n\t\t\t\t\t\tpreviousBlockClientId || nextBlockClientId;\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tblockToSelect &&\n\t\t\t\t\t\t// From the block options dropdown, it's possible to remove a block that is not selected,\n\t\t\t\t\t\t// in this case, it's not necessary to update the selection since the selected block wasn't removed.\n\t\t\t\t\t\tselectedBlockClientIds.includes( firstBlockClientId ) &&\n\t\t\t\t\t\t// Don't update selection when next/prev block also is in the selection ( and gets removed ),\n\t\t\t\t\t\t// In case someone selects all blocks and removes them at once.\n\t\t\t\t\t\t! selectedBlockClientIds.includes( blockToSelect )\n\t\t\t\t\t) {\n\t\t\t\t\t\t__experimentalSelectBlock( blockToSelect );\n\t\t\t\t\t}\n\t\t\t  }\n\t\t\t: noop,\n\t\t[\n\t\t\t__experimentalSelectBlock,\n\t\t\tpreviousBlockClientId,\n\t\t\tnextBlockClientId,\n\t\t\tselectedBlockClientIds,\n\t\t]\n\t);\n\n\tconst label = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tblockTitle\n\t);\n\tconst removeBlockLabel = count === 1 ? label : __( 'Remove blocks' );\n\n\t// Allows highlighting the parent block outline when focusing or hovering\n\t// the parent block selector within the child.\n\tconst selectParentButtonRef = useRef();\n\tconst { gestures: showParentOutlineGestures } = useShowMoversGestures( {\n\t\tref: selectParentButtonRef,\n\t\tonChange( isFocused ) {\n\t\t\tif ( isFocused && hasReducedUI ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttoggleBlockHighlight( firstParentClientId, isFocused );\n\t\t},\n\t} );\n\n\treturn (\n\t\t<BlockActions\n\t\t\tclientIds={ clientIds }\n\t\t\t__experimentalUpdateSelection={ ! __experimentalSelectBlock }\n\t\t>\n\t\t\t{ ( {\n\t\t\t\tcanDuplicate,\n\t\t\t\tcanInsertDefaultBlock,\n\t\t\t\tcanMove,\n\t\t\t\tcanRemove,\n\t\t\t\tonDuplicate,\n\t\t\t\tonInsertAfter,\n\t\t\t\tonInsertBefore,\n\t\t\t\tonRemove,\n\t\t\t\tonCopy,\n\t\t\t\tonMoveTo,\n\t\t\t\tblocks,\n\t\t\t} ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\tlabel={ __( 'Options' ) }\n\t\t\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t\t\tnoIcons\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<__unstableBlockSettingsMenuFirstItem.Slot\n\t\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ firstParentClientId !== undefined && (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t{ ...showParentOutlineGestures }\n\t\t\t\t\t\t\t\t\t\tref={ selectParentButtonRef }\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\t<BlockIcon\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ parentBlockType.icon }\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\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tselectBlock( firstParentClientId )\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{ sprintf(\n\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block's parent. */\n\t\t\t\t\t\t\t\t\t\t\t__( 'Select parent block (%s)' ),\n\t\t\t\t\t\t\t\t\t\t\tparentBlockType.title\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t\t<BlockHTMLConvertButton\n\t\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\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<CopyMenuItem\n\t\t\t\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\t\t\t\tonCopy={ onCopy }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ canDuplicate && (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ pipe(\n\t\t\t\t\t\t\t\t\t\t\tonClose,\n\t\t\t\t\t\t\t\t\t\t\tonDuplicate,\n\t\t\t\t\t\t\t\t\t\t\tupdateSelectionAfterDuplicate\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.duplicate }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ canInsertDefaultBlock && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\tonClick={ pipe(\n\t\t\t\t\t\t\t\t\t\t\t\tonClose,\n\t\t\t\t\t\t\t\t\t\t\t\tonInsertBefore\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.insertBefore }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Insert before' ) }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\tonClick={ pipe(\n\t\t\t\t\t\t\t\t\t\t\t\tonClose,\n\t\t\t\t\t\t\t\t\t\t\t\tonInsertAfter\n\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.insertAfter }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Insert after' ) }\n\t\t\t\t\t\t\t\t\t\t</MenuItem>\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{ canMove && ! onlyBlock && (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ pipe( onClose, onMoveTo ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Move to' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ count === 1 && (\n\t\t\t\t\t\t\t\t\t<BlockModeToggle\n\t\t\t\t\t\t\t\t\t\tclientId={ firstBlockClientId }\n\t\t\t\t\t\t\t\t\t\tonToggle={ onClose }\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</MenuGroup>\n\t\t\t\t\t\t\t<BlockSettingsMenuControls.Slot\n\t\t\t\t\t\t\t\tfillProps={ { onClose } }\n\t\t\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\t\t\t__unstableDisplayLocation={\n\t\t\t\t\t\t\t\t\t__unstableDisplayLocation\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{ typeof children === 'function'\n\t\t\t\t\t\t\t\t? children( { onClose } )\n\t\t\t\t\t\t\t\t: Children.map( ( child ) =>\n\t\t\t\t\t\t\t\t\t\tcloneElement( child, { onClose } )\n\t\t\t\t\t\t\t\t  ) }\n\t\t\t\t\t\t\t{ canRemove && (\n\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ pipe(\n\t\t\t\t\t\t\t\t\t\t\tonClose,\n\t\t\t\t\t\t\t\t\t\t\tonRemove,\n\t\t\t\t\t\t\t\t\t\t\tupdateSelectionAfterRemove\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tshortcut={ shortcuts.remove }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ removeBlockLabel }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t</MenuGroup>\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</DropdownMenu>\n\t\t\t) }\n\t\t</BlockActions>\n\t);\n}\n\nexport default BlockSettingsDropdown;\n","/**\n * WordPress dependencies\n */\nimport { ToolbarGroup, ToolbarItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockSettingsDropdown from './block-settings-dropdown';\n\nexport function BlockSettingsMenu( { clientIds, ...props } ) {\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarItem>\n\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t<BlockSettingsDropdown\n\t\t\t\t\t\tclientIds={ clientIds }\n\t\t\t\t\t\ttoggleProps={ toggleProps }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</ToolbarItem>\n\t\t</ToolbarGroup>\n\t);\n}\n\nexport default BlockSettingsMenu;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { useReducer } from '@wordpress/element';\nimport { lock } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockLockModal from './modal';\nimport useBlockLock from './use-block-lock';\nimport useBlockDisplayInformation from '../use-block-display-information';\n\nexport default function BlockLockToolbar( { clientId } ) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst { canEdit, canMove, canRemove, canLock } = useBlockLock( clientId );\n\n\tconst [ isModalOpen, toggleModal ] = useReducer(\n\t\t( isActive ) => ! isActive,\n\t\tfalse\n\t);\n\n\tif ( ! canLock ) {\n\t\treturn null;\n\t}\n\n\tif ( canEdit && canMove && canRemove ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarGroup className=\"block-editor-block-lock-toolbar\">\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={ lock }\n\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t/* translators: %s: block name */\n\t\t\t\t\t\t__( 'Unlock %s' ),\n\t\t\t\t\t\tblockInformation.title\n\t\t\t\t\t) }\n\t\t\t\t\tonClick={ toggleModal }\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<BlockLockModal clientId={ clientId } onClose={ toggleModal } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst group = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M18 4h-7c-1.1 0-2 .9-2 2v3H6c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2v-3h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h3V13c0 1.1.9 2 2 2h2.5v3zm0-4.5H11c-.3 0-.5-.2-.5-.5v-2.5H13c.3 0 .5.2.5.5v2.5zm5-.5c0 .3-.2.5-.5.5h-3V11c0-1.1-.9-2-2-2h-2.5V6c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5v7z\" />\n\t</SVG>\n);\n\nexport default group;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst row = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9.2 6.5H4V8h5.2c.3 0 .5.2.5.5v7c0 .3-.2.5-.5.5H4v1.5h5.2c1.1 0 2-.9 2-2v-7c0-1.1-.8-2-2-2zM14.8 8H20V6.5h-5.2c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2H20V16h-5.2c-.3 0-.5-.2-.5-.5v-7c-.1-.3.2-.5.5-.5z\" />\n\t</SVG>\n);\n\nexport default row;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst stack = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16 4v5.2c0 .3-.2.5-.5.5h-7c-.3.1-.5-.2-.5-.5V4H6.5v5.2c0 1.1.9 2 2 2h7c1.1 0 2-.9 2-2V4H16zm-.5 8.8h-7c-1.1 0-2 .9-2 2V20H8v-5.2c0-.3.2-.5.5-.5h7c.3 0 .5.2.5.5V20h1.5v-5.2c0-1.2-.9-2-2-2z\" />\n\t</SVG>\n);\n\nexport default stack;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { switchToBlockType, store as blocksStore } from '@wordpress/blocks';\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { group, row, stack } from '@wordpress/icons';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useConvertToGroupButtonProps } from '../convert-to-group-buttons';\nimport { store as blockEditorStore } from '../../store';\n\nconst layouts = {\n\tgroup: { type: 'constrained' },\n\trow: { type: 'flex', flexWrap: 'nowrap' },\n\tstack: { type: 'flex', orientation: 'vertical' },\n};\n\nfunction BlockGroupToolbar() {\n\tconst { blocksSelection, clientIds, groupingBlockName, isGroupable } =\n\t\tuseConvertToGroupButtonProps();\n\tconst { replaceBlocks } = useDispatch( blockEditorStore );\n\n\tconst { canRemove, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canRemoveBlocks } = select( blockEditorStore );\n\t\t\tconst { getBlockVariations } = select( blocksStore );\n\n\t\t\treturn {\n\t\t\t\tcanRemove: canRemoveBlocks( clientIds ),\n\t\t\t\tvariations: getBlockVariations(\n\t\t\t\t\tgroupingBlockName,\n\t\t\t\t\t'transform'\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ clientIds, groupingBlockName ]\n\t);\n\n\tconst onConvertToGroup = ( layout ) => {\n\t\tconst newBlocks = switchToBlockType(\n\t\t\tblocksSelection,\n\t\t\tgroupingBlockName\n\t\t);\n\n\t\tif ( typeof layout !== 'string' ) {\n\t\t\tlayout = 'group';\n\t\t}\n\n\t\tif ( newBlocks && newBlocks.length > 0 ) {\n\t\t\t// Because the block is not in the store yet we can't use\n\t\t\t// updateBlockAttributes so need to manually update attributes.\n\t\t\tnewBlocks[ 0 ].attributes.layout = layouts[ layout ];\n\t\t\treplaceBlocks( clientIds, newBlocks );\n\t\t}\n\t};\n\n\tconst onConvertToRow = () => onConvertToGroup( 'row' );\n\tconst onConvertToStack = () => onConvertToGroup( 'stack' );\n\n\t// Don't render the button if the current selection cannot be grouped.\n\t// A good example is selecting multiple button blocks within a Buttons block:\n\t// The group block is not a valid child of Buttons, so we should not show the button.\n\t// Any blocks that are locked against removal also cannot be grouped.\n\tif ( ! isGroupable || ! canRemove ) {\n\t\treturn null;\n\t}\n\n\tconst canInsertRow = !! variations.find(\n\t\t( { name } ) => name === 'group-row'\n\t);\n\tconst canInsertStack = !! variations.find(\n\t\t( { name } ) => name === 'group-stack'\n\t);\n\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ group }\n\t\t\t\tlabel={ _x( 'Group', 'verb' ) }\n\t\t\t\tonClick={ onConvertToGroup }\n\t\t\t/>\n\t\t\t{ canInsertRow && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={ row }\n\t\t\t\t\tlabel={ _x( 'Row', 'single horizontal line' ) }\n\t\t\t\t\tonClick={ onConvertToRow }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ canInsertStack && (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={ stack }\n\t\t\t\t\tlabel={ _x( 'Stack', 'verb' ) }\n\t\t\t\t\tonClick={ onConvertToStack }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarGroup>\n\t);\n}\n\nexport default BlockGroupToolbar;\n","/**\n * WordPress dependencies\n */\nimport { ToolbarButton, ToolbarGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function BlockEditVisuallyButton( { clientIds } ) {\n\t// Edit visually only works for single block selection.\n\tconst clientId = clientIds.length === 1 ? clientIds[ 0 ] : undefined;\n\tconst canEditVisually = useSelect(\n\t\t( select ) =>\n\t\t\t!! clientId &&\n\t\t\tselect( blockEditorStore ).getBlockMode( clientId ) === 'html',\n\t\t[ clientId ]\n\t);\n\tconst { toggleBlockMode } = useDispatch( blockEditorStore );\n\n\tif ( ! canEditVisually ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ToolbarGroup>\n\t\t\t<ToolbarButton\n\t\t\t\tonClick={ () => {\n\t\t\t\t\ttoggleBlockMode( clientId );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ __( 'Edit visually' ) }\n\t\t\t</ToolbarButton>\n\t\t</ToolbarGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst __unstableBlockNameContext = createContext( '' );\n\nexport default __unstableBlockNameContext;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useRef } from '@wordpress/element';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { getBlockType, hasBlockSupport } from '@wordpress/blocks';\nimport { ToolbarGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockMover from '../block-mover';\nimport BlockParentSelector from '../block-parent-selector';\nimport BlockSwitcher from '../block-switcher';\nimport BlockControls from '../block-controls';\nimport __unstableBlockToolbarLastItem from './block-toolbar-last-item';\nimport BlockSettingsMenu from '../block-settings-menu';\nimport { BlockLockToolbar } from '../block-lock';\nimport { BlockGroupToolbar } from '../convert-to-group-buttons';\nimport BlockEditVisuallyButton from '../block-edit-visually-button';\nimport { useShowMoversGestures } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport __unstableBlockNameContext from './block-name-context';\n\nconst BlockToolbar = ( { hideDragHandle } ) => {\n\tconst {\n\t\tblockClientIds,\n\t\tblockClientId,\n\t\tblockType,\n\t\thasFixedToolbar,\n\t\thasReducedUI,\n\t\tisValid,\n\t\tisVisual,\n\t\tisContentLocked,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetBlockName,\n\t\t\tgetBlockMode,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\tisBlockValid,\n\t\t\tgetBlockRootClientId,\n\t\t\tgetSettings,\n\t\t\t__unstableGetContentLockingParent,\n\t\t} = select( blockEditorStore );\n\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\tconst selectedBlockClientId = selectedBlockClientIds[ 0 ];\n\t\tconst blockRootClientId = getBlockRootClientId( selectedBlockClientId );\n\t\tconst settings = getSettings();\n\n\t\treturn {\n\t\t\tblockClientIds: selectedBlockClientIds,\n\t\t\tblockClientId: selectedBlockClientId,\n\t\t\tblockType:\n\t\t\t\tselectedBlockClientId &&\n\t\t\t\tgetBlockType( getBlockName( selectedBlockClientId ) ),\n\t\t\thasFixedToolbar: settings.hasFixedToolbar,\n\t\t\thasReducedUI: settings.hasReducedUI,\n\t\t\trootClientId: blockRootClientId,\n\t\t\tisValid: selectedBlockClientIds.every( ( id ) =>\n\t\t\t\tisBlockValid( id )\n\t\t\t),\n\t\t\tisVisual: selectedBlockClientIds.every(\n\t\t\t\t( id ) => getBlockMode( id ) === 'visual'\n\t\t\t),\n\t\t\tisContentLocked: !! __unstableGetContentLockingParent(\n\t\t\t\tselectedBlockClientId\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\t// Handles highlighting the current block outline on hover or focus of the\n\t// block type toolbar area.\n\tconst { toggleBlockHighlight } = useDispatch( blockEditorStore );\n\tconst nodeRef = useRef();\n\tconst { showMovers, gestures: showMoversGestures } = useShowMoversGestures(\n\t\t{\n\t\t\tref: nodeRef,\n\t\t\tonChange( isFocused ) {\n\t\t\t\tif ( isFocused && hasReducedUI ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttoggleBlockHighlight( blockClientId, isFocused );\n\t\t\t},\n\t\t}\n\t);\n\n\t// Account for the cases where the block toolbar is rendered within the\n\t// header area and not contextually to the block.\n\tconst displayHeaderToolbar =\n\t\tuseViewportMatch( 'medium', '<' ) || hasFixedToolbar;\n\n\tif ( blockType ) {\n\t\tif ( ! hasBlockSupport( blockType, '__experimentalToolbar', true ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\tconst shouldShowMovers = displayHeaderToolbar || showMovers;\n\n\tif ( blockClientIds.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tconst shouldShowVisualToolbar = isValid && isVisual;\n\tconst isMultiToolbar = blockClientIds.length > 1;\n\n\tconst classes = classnames(\n\t\t'block-editor-block-toolbar',\n\t\tshouldShowMovers && 'is-showing-movers'\n\t);\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t{ ! isMultiToolbar &&\n\t\t\t\t! displayHeaderToolbar &&\n\t\t\t\t! isContentLocked && <BlockParentSelector /> }\n\t\t\t<div ref={ nodeRef } { ...showMoversGestures }>\n\t\t\t\t{ ( shouldShowVisualToolbar || isMultiToolbar ) &&\n\t\t\t\t\t! isContentLocked && (\n\t\t\t\t\t\t<ToolbarGroup className=\"block-editor-block-toolbar__block-controls\">\n\t\t\t\t\t\t\t<BlockSwitcher clientIds={ blockClientIds } />\n\t\t\t\t\t\t\t{ ! isMultiToolbar && (\n\t\t\t\t\t\t\t\t<BlockLockToolbar\n\t\t\t\t\t\t\t\t\tclientId={ blockClientIds[ 0 ] }\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<BlockMover\n\t\t\t\t\t\t\t\tclientIds={ blockClientIds }\n\t\t\t\t\t\t\t\thideDragHandle={\n\t\t\t\t\t\t\t\t\thideDragHandle || hasReducedUI\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</ToolbarGroup>\n\t\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ shouldShowVisualToolbar && isMultiToolbar && (\n\t\t\t\t<BlockGroupToolbar />\n\t\t\t) }\n\t\t\t{ shouldShowVisualToolbar && (\n\t\t\t\t<>\n\t\t\t\t\t<BlockControls.Slot\n\t\t\t\t\t\tgroup=\"parent\"\n\t\t\t\t\t\tclassName=\"block-editor-block-toolbar__slot\"\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockControls.Slot\n\t\t\t\t\t\tgroup=\"block\"\n\t\t\t\t\t\tclassName=\"block-editor-block-toolbar__slot\"\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockControls.Slot className=\"block-editor-block-toolbar__slot\" />\n\t\t\t\t\t<BlockControls.Slot\n\t\t\t\t\t\tgroup=\"inline\"\n\t\t\t\t\t\tclassName=\"block-editor-block-toolbar__slot\"\n\t\t\t\t\t/>\n\t\t\t\t\t<BlockControls.Slot\n\t\t\t\t\t\tgroup=\"other\"\n\t\t\t\t\t\tclassName=\"block-editor-block-toolbar__slot\"\n\t\t\t\t\t/>\n\t\t\t\t\t<__unstableBlockNameContext.Provider\n\t\t\t\t\t\tvalue={ blockType?.name }\n\t\t\t\t\t>\n\t\t\t\t\t\t<__unstableBlockToolbarLastItem.Slot />\n\t\t\t\t\t</__unstableBlockNameContext.Provider>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<BlockEditVisuallyButton clientIds={ blockClientIds } />\n\t\t\t{ ! isContentLocked && (\n\t\t\t\t<BlockSettingsMenu clientIds={ blockClientIds } />\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-toolbar/README.md\n */\nexport default BlockToolbar;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { hasBlockSupport, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport NavigableToolbar from '../navigable-toolbar';\nimport BlockToolbar from '../block-toolbar';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockContextualToolbar( { focusOnMount, isFixed, ...props } ) {\n\tconst { blockType, hasParents, showParentSelector } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockParents,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\t__unstableGetContentLockingParent,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { getBlockType } = select( blocksStore );\n\t\t\tconst selectedBlockClientIds = getSelectedBlockClientIds();\n\t\t\tconst selectedBlockClientId = selectedBlockClientIds[ 0 ];\n\t\t\tconst parents = getBlockParents( selectedBlockClientId );\n\t\t\tconst firstParentClientId = parents[ parents.length - 1 ];\n\t\t\tconst parentBlockName = getBlockName( firstParentClientId );\n\t\t\tconst parentBlockType = getBlockType( parentBlockName );\n\n\t\t\treturn {\n\t\t\t\tblockType:\n\t\t\t\t\tselectedBlockClientId &&\n\t\t\t\t\tgetBlockType( getBlockName( selectedBlockClientId ) ),\n\t\t\t\thasParents: parents.length,\n\t\t\t\tshowParentSelector:\n\t\t\t\t\tparentBlockType &&\n\t\t\t\t\thasBlockSupport(\n\t\t\t\t\t\tparentBlockType,\n\t\t\t\t\t\t'__experimentalParentSelector',\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) &&\n\t\t\t\t\tselectedBlockClientIds.length <= 1 &&\n\t\t\t\t\t! __unstableGetContentLockingParent(\n\t\t\t\t\t\tselectedBlockClientId\n\t\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tif ( blockType ) {\n\t\tif ( ! hasBlockSupport( blockType, '__experimentalToolbar', true ) ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\t// Shifts the toolbar to make room for the parent block selector.\n\tconst classes = classnames( 'block-editor-block-contextual-toolbar', {\n\t\t'has-parent': hasParents && showParentSelector,\n\t\t'is-fixed': isFixed,\n\t} );\n\n\treturn (\n\t\t<NavigableToolbar\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tclassName={ classes }\n\t\t\t/* translators: accessibility text for the block toolbar */\n\t\t\taria-label={ __( 'Block tools' ) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<BlockToolbar hideDragHandle={ isFixed } />\n\t\t</NavigableToolbar>\n\t);\n}\n\nexport default BlockContextualToolbar;\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\nimport { useCallback, useLayoutEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockElement as useBlockElement } from '../block-list/use-block-props/use-block-refs';\n\nconst COMMON_PROPS = {\n\tplacement: 'top-start',\n};\n\n// By default the toolbar sets the `shift` prop. If the user scrolls the page\n// down the toolbar will stay on screen by adopting a sticky position at the\n// top of the viewport.\nconst DEFAULT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: false,\n\tshift: true,\n};\n\n// When there isn't enough height between the top of the block and the editor\n// canvas, the `shift` prop is set to `false`, as it will cause the block to be\n// obscured. The `flip` behavior is enabled, which positions the toolbar below\n// the block. This only happens if the block is smaller than the viewport, as\n// otherwise the toolbar will be off-screen.\nconst RESTRICTED_HEIGHT_PROPS = {\n\t...COMMON_PROPS,\n\tflip: true,\n\tshift: false,\n};\n\n/**\n * Get the popover props for the block toolbar, determined by the space at the top of the canvas and the toolbar height.\n *\n * @param {Element} contentElement       The DOM element that represents the editor content or canvas.\n * @param {Element} selectedBlockElement The outer DOM element of the first selected block.\n * @param {number}  toolbarHeight        The height of the toolbar in pixels.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nfunction getProps( contentElement, selectedBlockElement, toolbarHeight ) {\n\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\tconst blockRect = selectedBlockElement.getBoundingClientRect();\n\tconst contentRect = contentElement.getBoundingClientRect();\n\n\t// The document element's clientHeight represents the viewport height.\n\tconst viewportHeight =\n\t\tcontentElement.ownerDocument.documentElement.clientHeight;\n\n\tconst hasSpaceForToolbarAbove =\n\t\tblockRect.top - contentRect.top > toolbarHeight;\n\tconst isBlockTallerThanViewport =\n\t\tblockRect.height > viewportHeight - toolbarHeight;\n\n\tif ( hasSpaceForToolbarAbove || isBlockTallerThanViewport ) {\n\t\treturn DEFAULT_PROPS;\n\t}\n\n\treturn RESTRICTED_HEIGHT_PROPS;\n}\n\n/**\n * Determines the desired popover positioning behavior, returning a set of appropriate props.\n *\n * @param {Object}  elements\n * @param {Element} elements.contentElement The DOM element that represents the editor content or canvas.\n * @param {string}  elements.clientId       The clientId of the first selected block.\n *\n * @return {Object} The popover props used to determine the position of the toolbar.\n */\nexport default function useBlockToolbarPopoverProps( {\n\tcontentElement,\n\tclientId,\n} ) {\n\tconst selectedBlockElement = useBlockElement( clientId );\n\tconst [ toolbarHeight, setToolbarHeight ] = useState( 0 );\n\tconst [ props, setProps ] = useState( () =>\n\t\tgetProps( contentElement, selectedBlockElement, toolbarHeight )\n\t);\n\tconst blockIndex = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockIndex( clientId ),\n\t\t[ clientId ]\n\t);\n\n\tconst popoverRef = useRefEffect( ( popoverNode ) => {\n\t\tsetToolbarHeight( popoverNode.offsetHeight );\n\t}, [] );\n\n\tconst updateProps = useCallback(\n\t\t() =>\n\t\t\tsetProps(\n\t\t\t\tgetProps( contentElement, selectedBlockElement, toolbarHeight )\n\t\t\t),\n\t\t[ contentElement, selectedBlockElement, toolbarHeight ]\n\t);\n\n\t// Update props when the block is moved. This also ensures the props are\n\t// correct on initial mount, and when the selected block or content element\n\t// changes (since the callback ref will update).\n\tuseLayoutEffect( updateProps, [ blockIndex, updateProps ] );\n\n\t// Update props when the viewport is resized or the block is resized.\n\tuseLayoutEffect( () => {\n\t\tif ( ! contentElement || ! selectedBlockElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the toolbar props on viewport resize.\n\t\tconst contentView = contentElement?.ownerDocument?.defaultView;\n\t\tcontentView?.addEventHandler?.( 'resize', updateProps );\n\n\t\t// Update the toolbar props on block resize.\n\t\tlet resizeObserver;\n\t\tconst blockView = selectedBlockElement?.ownerDocument?.defaultView;\n\t\tif ( blockView.ResizeObserver ) {\n\t\t\tresizeObserver = new blockView.ResizeObserver( updateProps );\n\t\t\tresizeObserver.observe( selectedBlockElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\tcontentView?.removeEventHandler?.( 'resize', updateProps );\n\n\t\t\tif ( resizeObserver ) {\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [ updateProps, contentElement, selectedBlockElement ] );\n\n\treturn {\n\t\t...props,\n\t\tref: popoverRef,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { find } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { isUnmodifiedDefaultBlock } from '@wordpress/blocks';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useViewportMatch } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BlockSelectionButton from './block-selection-button';\nimport BlockContextualToolbar from './block-contextual-toolbar';\nimport { store as blockEditorStore } from '../../store';\nimport BlockPopover from '../block-popover';\nimport useBlockToolbarPopoverProps from './use-block-toolbar-popover-props';\n\nfunction selector( select ) {\n\tconst {\n\t\t__unstableGetEditorMode,\n\t\tisMultiSelecting,\n\t\thasMultiSelection,\n\t\tisTyping,\n\t\tgetSettings,\n\t\tgetLastMultiSelectedBlockClientId,\n\t} = select( blockEditorStore );\n\treturn {\n\t\teditorMode: __unstableGetEditorMode(),\n\t\tisMultiSelecting: isMultiSelecting(),\n\t\tisTyping: isTyping(),\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tlastClientId: hasMultiSelection()\n\t\t\t? getLastMultiSelectedBlockClientId()\n\t\t\t: null,\n\t};\n}\n\nfunction SelectedBlockPopover( {\n\tclientId,\n\trootClientId,\n\tisEmptyDefaultBlock,\n\tcapturingClientId,\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst {\n\t\teditorMode,\n\t\tisMultiSelecting,\n\t\tisTyping,\n\t\thasFixedToolbar,\n\t\tlastClientId,\n\t} = useSelect( selector, [] );\n\tconst isInsertionPointVisible = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tisBlockInsertionPointVisible,\n\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\tif ( ! isBlockInsertionPointVisible() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tconst insertionPoint = getBlockInsertionPoint();\n\t\t\tconst order = getBlockOrder( insertionPoint.rootClientId );\n\t\t\treturn order[ insertionPoint.index ] === clientId;\n\t\t},\n\t\t[ clientId ]\n\t);\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst isToolbarForced = useRef( false );\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\n\tconst showEmptyBlockSideInserter =\n\t\t! isTyping && editorMode === 'edit' && isEmptyDefaultBlock;\n\tconst shouldShowBreadcrumb =\n\t\teditorMode === 'navigation' || editorMode === 'zoom-out';\n\tconst shouldShowContextualToolbar =\n\t\teditorMode === 'edit' &&\n\t\t! hasFixedToolbar &&\n\t\tisLargeViewport &&\n\t\t! isMultiSelecting &&\n\t\t! showEmptyBlockSideInserter &&\n\t\t! isTyping;\n\tconst canFocusHiddenToolbar =\n\t\teditorMode === 'edit' &&\n\t\t! shouldShowContextualToolbar &&\n\t\t! hasFixedToolbar &&\n\t\t! isEmptyDefaultBlock;\n\n\tuseShortcut(\n\t\t'core/block-editor/focus-toolbar',\n\t\t() => {\n\t\t\tisToolbarForced.current = true;\n\t\t\tstopTyping( true );\n\t\t},\n\t\t{\n\t\t\tisDisabled: ! canFocusHiddenToolbar,\n\t\t}\n\t);\n\n\tuseEffect( () => {\n\t\tisToolbarForced.current = false;\n\t} );\n\n\t// Stores the active toolbar item index so the block toolbar can return focus\n\t// to it when re-mounting.\n\tconst initialToolbarItemIndexRef = useRef();\n\n\tconst popoverProps = useBlockToolbarPopoverProps( {\n\t\tcontentElement: __unstableContentRef?.current,\n\t\tclientId,\n\t} );\n\n\tif ( ! shouldShowBreadcrumb && ! shouldShowContextualToolbar ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockPopover\n\t\t\tclientId={ capturingClientId || clientId }\n\t\t\tbottomClientId={ lastClientId }\n\t\t\tclassName={ classnames( 'block-editor-block-list__block-popover', {\n\t\t\t\t'is-insertion-point-visible': isInsertionPointVisible,\n\t\t\t} ) }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\tresize={ false }\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t{ shouldShowContextualToolbar && (\n\t\t\t\t<BlockContextualToolbar\n\t\t\t\t\t// If the toolbar is being shown because of being forced\n\t\t\t\t\t// it should focus the toolbar right after the mount.\n\t\t\t\t\tfocusOnMount={ isToolbarForced.current }\n\t\t\t\t\t__experimentalInitialIndex={\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalOnIndexChange={ ( index ) => {\n\t\t\t\t\t\tinitialToolbarItemIndexRef.current = index;\n\t\t\t\t\t} }\n\t\t\t\t\t// Resets the index whenever the active block changes so\n\t\t\t\t\t// this is not persisted. See https://github.com/WordPress/gutenberg/pull/25760#issuecomment-717906169\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ shouldShowBreadcrumb && (\n\t\t\t\t<BlockSelectionButton\n\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</BlockPopover>\n\t);\n}\n\nfunction wrapperSelector( select ) {\n\tconst {\n\t\tgetSelectedBlockClientId,\n\t\tgetFirstMultiSelectedBlockClientId,\n\t\tgetBlockRootClientId,\n\t\tgetBlock,\n\t\tgetBlockParents,\n\t\t__experimentalGetBlockListSettingsForBlocks,\n\t} = select( blockEditorStore );\n\n\tconst clientId =\n\t\tgetSelectedBlockClientId() || getFirstMultiSelectedBlockClientId();\n\n\tif ( ! clientId ) {\n\t\treturn;\n\t}\n\n\tconst { name, attributes = {} } = getBlock( clientId ) || {};\n\tconst blockParentsClientIds = getBlockParents( clientId );\n\n\t// Get Block List Settings for all ancestors of the current Block clientId.\n\tconst parentBlockListSettings = __experimentalGetBlockListSettingsForBlocks(\n\t\tblockParentsClientIds\n\t);\n\n\t// Get the clientId of the topmost parent with the capture toolbars setting.\n\tconst capturingClientId = find(\n\t\tblockParentsClientIds,\n\t\t( parentClientId ) =>\n\t\t\tparentBlockListSettings[ parentClientId ]\n\t\t\t\t?.__experimentalCaptureToolbars\n\t);\n\n\treturn {\n\t\tclientId,\n\t\trootClientId: getBlockRootClientId( clientId ),\n\t\tname,\n\t\tisEmptyDefaultBlock:\n\t\t\tname && isUnmodifiedDefaultBlock( { name, attributes } ),\n\t\tcapturingClientId,\n\t};\n}\n\nexport default function WrappedBlockPopover( {\n\t__unstablePopoverSlot,\n\t__unstableContentRef,\n} ) {\n\tconst selected = useSelect( wrapperSelector, [] );\n\n\tif ( ! selected ) {\n\t\treturn null;\n\t}\n\n\tconst {\n\t\tclientId,\n\t\trootClientId,\n\t\tname,\n\t\tisEmptyDefaultBlock,\n\t\tcapturingClientId,\n\t} = selected;\n\n\tif ( ! name ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<SelectedBlockPopover\n\t\t\tclientId={ clientId }\n\t\t\trootClientId={ rootClientId }\n\t\t\tisEmptyDefaultBlock={ isEmptyDefaultBlock }\n\t\t\tcapturingClientId={ capturingClientId }\n\t\t\t__unstablePopoverSlot={ __unstablePopoverSlot }\n\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { Disabled } from '@wordpress/components';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport InsertionPoint, { InsertionPointOpenRef } from './insertion-point';\nimport BlockPopover from './selected-block-popover';\n\nexport default function BlockToolsBackCompat( { children } ) {\n\tconst openRef = useContext( InsertionPointOpenRef );\n\tconst isDisabled = useContext( Disabled.Context );\n\n\t// If context is set, `BlockTools` is a parent component.\n\tif ( openRef || isDisabled ) {\n\t\treturn children;\n\t}\n\n\tdeprecated( 'wp.components.Popover.Slot name=\"block-toolbar\"', {\n\t\talternative: 'wp.blockEditor.BlockTools',\n\t\tsince: '5.8',\n\t} );\n\n\treturn (\n\t\t<InsertionPoint __unstablePopoverSlot=\"block-toolbar\">\n\t\t\t<BlockPopover __unstablePopoverSlot=\"block-toolbar\" />\n\t\t\t{ children }\n\t\t</InsertionPoint>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst withClientId = createHigherOrderComponent(\n\t( WrappedComponent ) => ( props ) => {\n\t\tconst { clientId } = useBlockEditContext();\n\t\treturn <WrappedComponent { ...props } clientId={ clientId } />;\n\t},\n\t'withClientId'\n);\n\nexport default withClientId;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport BaseButtonBlockAppender from '../button-block-appender';\nimport withClientId from './with-client-id';\n\nexport const ButtonBlockAppender = ( {\n\tclientId,\n\tshowSeparator,\n\tisFloating,\n\tonAddBlock,\n\tisToggle,\n} ) => {\n\treturn (\n\t\t<BaseButtonBlockAppender\n\t\t\tclassName={ classnames( {\n\t\t\t\t'block-list-appender__toggle': isToggle,\n\t\t\t} ) }\n\t\t\trootClientId={ clientId }\n\t\t\tshowSeparator={ showSeparator }\n\t\t\tisFloating={ isFloating }\n\t\t\tonAddBlock={ onAddBlock }\n\t\t/>\n\t);\n};\n\nexport default withClientId( ButtonBlockAppender );\n","/**\n * WordPress dependencies\n */\nimport { compose } from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport BaseDefaultBlockAppender from '../default-block-appender';\nimport withClientId from './with-client-id';\nimport { store as blockEditorStore } from '../../store';\n\nexport const DefaultBlockAppender = ( { clientId } ) => {\n\treturn <BaseDefaultBlockAppender rootClientId={ clientId } />;\n};\n\nexport default compose( [\n\twithClientId,\n\twithSelect( ( select, { clientId } ) => {\n\t\tconst { getBlockOrder } = select( blockEditorStore );\n\n\t\tconst blockClientIds = getBlockOrder( clientId );\n\n\t\treturn {\n\t\t\tlastBlockClientId: blockClientIds[ blockClientIds.length - 1 ],\n\t\t};\n\t} ),\n] )( DefaultBlockAppender );\n","/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch, useRegistry } from '@wordpress/data';\nimport isShallowEqual from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { getLayoutType } from '../../layouts';\n\n/** @typedef {import('../../selectors').WPDirectInsertBlock } WPDirectInsertBlock */\n\nconst pendingSettingsUpdates = new WeakMap();\n\n/**\n * This hook is a side effect which updates the block-editor store when changes\n * happen to inner block settings. The given props are transformed into a\n * settings object, and if that is different from the current settings object in\n * the block-editor store, then the store is updated with the new settings which\n * came from props.\n *\n * @param {string}               clientId                   The client ID of the block to update.\n * @param {string[]}             allowedBlocks              An array of block names which are permitted\n *                                                          in inner blocks.\n * @param {?WPDirectInsertBlock} __experimentalDefaultBlock The default block to insert: [ blockName, { blockAttributes } ].\n * @param {?Function|boolean}    __experimentalDirectInsert If a default block should be inserted directly by the\n *                                                          appender.\n * @param {string}               [templateLock]             The template lock specified for the inner\n *                                                          blocks component. (e.g. \"all\")\n * @param {boolean}              captureToolbars            Whether or children toolbars should be shown\n *                                                          in the inner blocks component rather than on\n *                                                          the child block.\n * @param {string}               orientation                The direction in which the block\n *                                                          should face.\n * @param {Object}               layout                     The layout object for the block container.\n */\nexport default function useNestedSettingsUpdate(\n\tclientId,\n\tallowedBlocks,\n\t__experimentalDefaultBlock,\n\t__experimentalDirectInsert,\n\ttemplateLock,\n\tcaptureToolbars,\n\torientation,\n\tlayout\n) {\n\tconst { updateBlockListSettings } = useDispatch( blockEditorStore );\n\tconst registry = useRegistry();\n\n\tconst { blockListSettings, parentLock } = useSelect(\n\t\t( select ) => {\n\t\t\tconst rootClientId =\n\t\t\t\tselect( blockEditorStore ).getBlockRootClientId( clientId );\n\t\t\treturn {\n\t\t\t\tblockListSettings:\n\t\t\t\t\tselect( blockEditorStore ).getBlockListSettings( clientId ),\n\t\t\t\tparentLock:\n\t\t\t\t\tselect( blockEditorStore ).getTemplateLock( rootClientId ),\n\t\t\t};\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\t// Memoize as inner blocks implementors often pass a new array on every\n\t// render.\n\tconst _allowedBlocks = useMemo( () => allowedBlocks, allowedBlocks );\n\n\tuseLayoutEffect( () => {\n\t\tconst newSettings = {\n\t\t\tallowedBlocks: _allowedBlocks,\n\t\t\ttemplateLock:\n\t\t\t\ttemplateLock === undefined || parentLock === 'contentOnly'\n\t\t\t\t\t? parentLock\n\t\t\t\t\t: templateLock,\n\t\t};\n\n\t\t// These values are not defined for RN, so only include them if they\n\t\t// are defined.\n\t\tif ( captureToolbars !== undefined ) {\n\t\t\tnewSettings.__experimentalCaptureToolbars = captureToolbars;\n\t\t}\n\n\t\t// Orientation depends on layout,\n\t\t// ideally the separate orientation prop should be deprecated.\n\t\tif ( orientation !== undefined ) {\n\t\t\tnewSettings.orientation = orientation;\n\t\t} else {\n\t\t\tconst layoutType = getLayoutType( layout?.type );\n\t\t\tnewSettings.orientation = layoutType.getOrientation( layout );\n\t\t}\n\n\t\tif ( __experimentalDefaultBlock !== undefined ) {\n\t\t\tnewSettings.__experimentalDefaultBlock = __experimentalDefaultBlock;\n\t\t}\n\n\t\tif ( __experimentalDirectInsert !== undefined ) {\n\t\t\tnewSettings.__experimentalDirectInsert = __experimentalDirectInsert;\n\t\t}\n\n\t\tif ( ! isShallowEqual( blockListSettings, newSettings ) ) {\n\t\t\t// Batch updates to block list settings to avoid triggering cascading renders\n\t\t\t// for each container block included in a tree and optimize initial render.\n\t\t\t// To avoid triggering updateBlockListSettings for each container block\n\t\t\t// causing X re-renderings for X container blocks,\n\t\t\t// we batch all the updatedBlockListSettings in a single \"data\" batch\n\t\t\t// which results in a single re-render.\n\t\t\tif ( ! pendingSettingsUpdates.get( registry ) ) {\n\t\t\t\tpendingSettingsUpdates.set( registry, [] );\n\t\t\t}\n\t\t\tpendingSettingsUpdates\n\t\t\t\t.get( registry )\n\t\t\t\t.push( [ clientId, newSettings ] );\n\t\t\twindow.queueMicrotask( () => {\n\t\t\t\tif ( pendingSettingsUpdates.get( registry )?.length ) {\n\t\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t\tpendingSettingsUpdates\n\t\t\t\t\t\t\t.get( registry )\n\t\t\t\t\t\t\t.forEach( ( args ) => {\n\t\t\t\t\t\t\t\tupdateBlockListSettings( ...args );\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\tpendingSettingsUpdates.set( registry, [] );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}, [\n\t\tclientId,\n\t\tblockListSettings,\n\t\t_allowedBlocks,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tparentLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\tupdateBlockListSettings,\n\t\tlayout,\n\t\tregistry,\n\t] );\n}\n","/**\n * External dependencies\n */\nimport { mapValues } from 'lodash';\n\n/**\n * Block context cache, implemented as a WeakMap mapping block types to a\n * WeakMap mapping attributes object to context value.\n *\n * @type {WeakMap<string,WeakMap<string,*>>}\n */\nconst BLOCK_CONTEXT_CACHE = new WeakMap();\n\n/**\n * Returns a cached context object value for a given set of attributes for the\n * block type.\n *\n * @param {Record<string,*>} attributes Block attributes object.\n * @param {WPBlockType}      blockType  Block type settings.\n *\n * @return {Record<string,*>} Context value.\n */\nexport default function getBlockContext( attributes, blockType ) {\n\tif ( ! BLOCK_CONTEXT_CACHE.has( blockType ) ) {\n\t\tBLOCK_CONTEXT_CACHE.set( blockType, new WeakMap() );\n\t}\n\n\tconst blockTypeCache = BLOCK_CONTEXT_CACHE.get( blockType );\n\tif ( ! blockTypeCache.has( attributes ) ) {\n\t\tconst context = mapValues(\n\t\t\tblockType.providesContext,\n\t\t\t( attributeName ) => attributes[ attributeName ]\n\t\t);\n\n\t\tblockTypeCache.set( attributes, context );\n\t}\n\n\treturn blockTypeCache.get( attributes );\n}\n","/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport {\n\tcloneBlock,\n\tfindTransform,\n\tgetBlockTransforms,\n\tpasteHandler,\n} from '@wordpress/blocks';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/** @typedef {import('@wordpress/element').WPSyntheticEvent} WPSyntheticEvent */\n\n/**\n * Retrieve the data for a block drop event.\n *\n * @param {WPSyntheticEvent} event The drop event.\n *\n * @return {Object} An object with block drag and drop data.\n */\nexport function parseDropEvent( event ) {\n\tlet result = {\n\t\tsrcRootClientId: null,\n\t\tsrcClientIds: null,\n\t\tsrcIndex: null,\n\t\ttype: null,\n\t\tblocks: null,\n\t};\n\n\tif ( ! event.dataTransfer ) {\n\t\treturn result;\n\t}\n\n\ttry {\n\t\tresult = Object.assign(\n\t\t\tresult,\n\t\t\tJSON.parse( event.dataTransfer.getData( 'wp-blocks' ) )\n\t\t);\n\t} catch ( err ) {\n\t\treturn result;\n\t}\n\n\treturn result;\n}\n\n/**\n * A function that returns an event handler function for block drop events.\n *\n * @param {string}   targetRootClientId        The root client id where the block(s) will be inserted.\n * @param {number}   targetBlockIndex          The index where the block(s) will be inserted.\n * @param {Function} getBlockIndex             A function that gets the index of a block.\n * @param {Function} getClientIdsOfDescendants A function that gets the client ids of descendant blocks.\n * @param {Function} moveBlocks                A function that moves blocks.\n * @param {Function} insertOrReplaceBlocks     A function that inserts or replaces blocks.\n * @param {Function} clearSelectedBlock        A function that clears block selection.\n * @return {Function} The event handler for a block drop event.\n */\nexport function onBlockDrop(\n\ttargetRootClientId,\n\ttargetBlockIndex,\n\tgetBlockIndex,\n\tgetClientIdsOfDescendants,\n\tmoveBlocks,\n\tinsertOrReplaceBlocks,\n\tclearSelectedBlock\n) {\n\treturn ( event ) => {\n\t\tconst {\n\t\t\tsrcRootClientId: sourceRootClientId,\n\t\t\tsrcClientIds: sourceClientIds,\n\t\t\ttype: dropType,\n\t\t\tblocks,\n\t\t} = parseDropEvent( event );\n\n\t\t// If the user is inserting a block.\n\t\tif ( dropType === 'inserter' ) {\n\t\t\tclearSelectedBlock();\n\t\t\tconst blocksToInsert = blocks.map( ( block ) =>\n\t\t\t\tcloneBlock( block )\n\t\t\t);\n\t\t\tinsertOrReplaceBlocks( blocksToInsert, true, null );\n\t\t}\n\n\t\t// If the user is moving a block.\n\t\tif ( dropType === 'block' ) {\n\t\t\tconst sourceBlockIndex = getBlockIndex( sourceClientIds[ 0 ] );\n\n\t\t\t// If the user is dropping to the same position, return early.\n\t\t\tif (\n\t\t\t\tsourceRootClientId === targetRootClientId &&\n\t\t\t\tsourceBlockIndex === targetBlockIndex\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If the user is attempting to drop a block within its own\n\t\t\t// nested blocks, return early as this would create infinite\n\t\t\t// recursion.\n\t\t\tif (\n\t\t\t\tsourceClientIds.includes( targetRootClientId ) ||\n\t\t\t\tgetClientIdsOfDescendants( sourceClientIds ).some(\n\t\t\t\t\t( id ) => id === targetRootClientId\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst isAtSameLevel = sourceRootClientId === targetRootClientId;\n\t\t\tconst draggedBlockCount = sourceClientIds.length;\n\n\t\t\t// If the block is kept at the same level and moved downwards,\n\t\t\t// subtract to take into account that the blocks being dragged\n\t\t\t// were removed from the block list above the insertion point.\n\t\t\tconst insertIndex =\n\t\t\t\tisAtSameLevel && sourceBlockIndex < targetBlockIndex\n\t\t\t\t\t? targetBlockIndex - draggedBlockCount\n\t\t\t\t\t: targetBlockIndex;\n\n\t\t\tmoveBlocks( sourceClientIds, sourceRootClientId, insertIndex );\n\t\t}\n\t};\n}\n\n/**\n * A function that returns an event handler function for block-related file drop events.\n *\n * @param {string}   targetRootClientId    The root client id where the block(s) will be inserted.\n * @param {number}   targetBlockIndex      The index where the block(s) will be inserted.\n * @param {boolean}  hasUploadPermissions  Whether the user has upload permissions.\n * @param {Function} updateBlockAttributes A function that updates a block's attributes.\n * @param {Function} canInsertBlockType    A function that returns checks whether a block type can be inserted.\n * @param {Function} insertOrReplaceBlocks A function that inserts or replaces blocks.\n *\n * @return {Function} The event handler for a block-related file drop event.\n */\nexport function onFilesDrop(\n\ttargetRootClientId,\n\ttargetBlockIndex,\n\thasUploadPermissions,\n\tupdateBlockAttributes,\n\tcanInsertBlockType,\n\tinsertOrReplaceBlocks\n) {\n\treturn ( files ) => {\n\t\tif ( ! hasUploadPermissions ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst transformation = findTransform(\n\t\t\tgetBlockTransforms( 'from' ),\n\t\t\t( transform ) =>\n\t\t\t\ttransform.type === 'files' &&\n\t\t\t\tcanInsertBlockType( transform.blockName, targetRootClientId ) &&\n\t\t\t\ttransform.isMatch( files )\n\t\t);\n\n\t\tif ( transformation ) {\n\t\t\tconst blocks = transformation.transform(\n\t\t\t\tfiles,\n\t\t\t\tupdateBlockAttributes\n\t\t\t);\n\t\t\tinsertOrReplaceBlocks( blocks );\n\t\t}\n\t};\n}\n\n/**\n * A function that returns an event handler function for block-related HTML drop events.\n *\n * @param {string}   targetRootClientId    The root client id where the block(s) will be inserted.\n * @param {number}   targetBlockIndex      The index where the block(s) will be inserted.\n * @param {Function} insertOrReplaceBlocks A function that inserts or replaces blocks.\n *\n * @return {Function} The event handler for a block-related HTML drop event.\n */\nexport function onHTMLDrop(\n\ttargetRootClientId,\n\ttargetBlockIndex,\n\tinsertOrReplaceBlocks\n) {\n\treturn ( HTML ) => {\n\t\tconst blocks = pasteHandler( { HTML, mode: 'BLOCKS' } );\n\n\t\tif ( blocks.length ) {\n\t\t\tinsertOrReplaceBlocks( blocks );\n\t\t}\n\t};\n}\n\n/**\n * A React hook for handling block drop events.\n *\n * @typedef {'insert'|'replace'} DropAction The type of action to perform on drop.\n *\n * @param {string}     targetRootClientId The root client id where the block(s) will be inserted.\n * @param {number}     targetBlockIndex   The index where the block(s) will be inserted.\n * @param {Object}     options            The optional options.\n * @param {DropAction} options.action     The type of action to perform on drop. Could be `insert` or `replace` for now.\n *\n * @return {Object} An object that contains the event handlers `onDrop`, `onFilesDrop` and `onHTMLDrop`.\n */\nexport default function useOnBlockDrop(\n\ttargetRootClientId,\n\ttargetBlockIndex,\n\toptions = {}\n) {\n\tconst { action = 'insert' } = options;\n\tconst hasUploadPermissions = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().mediaUpload,\n\t\t[]\n\t);\n\tconst {\n\t\tcanInsertBlockType,\n\t\tgetBlockIndex,\n\t\tgetClientIdsOfDescendants,\n\t\tgetBlockOrder,\n\t\tgetBlocksByClientId,\n\t} = useSelect( blockEditorStore );\n\tconst {\n\t\tinsertBlocks,\n\t\tmoveBlocksToPosition,\n\t\tupdateBlockAttributes,\n\t\tclearSelectedBlock,\n\t\treplaceBlocks,\n\t\tremoveBlocks,\n\t} = useDispatch( blockEditorStore );\n\tconst registry = useRegistry();\n\n\tconst insertOrReplaceBlocks = useCallback(\n\t\t( blocks, updateSelection = true, initialPosition = 0 ) => {\n\t\t\tif ( action === 'replace' ) {\n\t\t\t\tconst clientIds = getBlockOrder( targetRootClientId );\n\t\t\t\tconst clientId = clientIds[ targetBlockIndex ];\n\n\t\t\t\treplaceBlocks( clientId, blocks, undefined, initialPosition );\n\t\t\t} else {\n\t\t\t\tinsertBlocks(\n\t\t\t\t\tblocks,\n\t\t\t\t\ttargetBlockIndex,\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\tupdateSelection,\n\t\t\t\t\tinitialPosition\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\taction,\n\t\t\tgetBlockOrder,\n\t\t\tinsertBlocks,\n\t\t\treplaceBlocks,\n\t\t\ttargetBlockIndex,\n\t\t\ttargetRootClientId,\n\t\t]\n\t);\n\n\tconst moveBlocks = useCallback(\n\t\t( sourceClientIds, sourceRootClientId, insertIndex ) => {\n\t\t\tif ( action === 'replace' ) {\n\t\t\t\tconst sourceBlocks = getBlocksByClientId( sourceClientIds );\n\t\t\t\tconst targetBlockClientIds =\n\t\t\t\t\tgetBlockOrder( targetRootClientId );\n\t\t\t\tconst targetBlockClientId =\n\t\t\t\t\ttargetBlockClientIds[ targetBlockIndex ];\n\n\t\t\t\tregistry.batch( () => {\n\t\t\t\t\t// Remove the source blocks.\n\t\t\t\t\tremoveBlocks( sourceClientIds, false );\n\t\t\t\t\t// Replace the target block with the source blocks.\n\t\t\t\t\treplaceBlocks(\n\t\t\t\t\t\ttargetBlockClientId,\n\t\t\t\t\t\tsourceBlocks,\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t0\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t} else {\n\t\t\t\tmoveBlocksToPosition(\n\t\t\t\t\tsourceClientIds,\n\t\t\t\t\tsourceRootClientId,\n\t\t\t\t\ttargetRootClientId,\n\t\t\t\t\tinsertIndex\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\taction,\n\t\t\tgetBlockOrder,\n\t\t\tgetBlocksByClientId,\n\t\t\tinsertBlocks,\n\t\t\tmoveBlocksToPosition,\n\t\t\tremoveBlocks,\n\t\t\ttargetBlockIndex,\n\t\t\ttargetRootClientId,\n\t\t]\n\t);\n\n\tconst _onDrop = onBlockDrop(\n\t\ttargetRootClientId,\n\t\ttargetBlockIndex,\n\t\tgetBlockIndex,\n\t\tgetClientIdsOfDescendants,\n\t\tmoveBlocks,\n\t\tinsertOrReplaceBlocks,\n\t\tclearSelectedBlock\n\t);\n\tconst _onFilesDrop = onFilesDrop(\n\t\ttargetRootClientId,\n\t\ttargetBlockIndex,\n\t\thasUploadPermissions,\n\t\tupdateBlockAttributes,\n\t\tcanInsertBlockType,\n\t\tinsertOrReplaceBlocks\n\t);\n\tconst _onHTMLDrop = onHTMLDrop(\n\t\ttargetRootClientId,\n\t\ttargetBlockIndex,\n\t\tinsertOrReplaceBlocks\n\t);\n\n\treturn ( event ) => {\n\t\tconst files = getFilesFromDataTransfer( event.dataTransfer );\n\t\tconst html = event.dataTransfer.getData( 'text/html' );\n\n\t\t/**\n\t\t * From Windows Chrome 96, the `event.dataTransfer` returns both file object and HTML.\n\t\t * The order of the checks is important to recognise the HTML drop.\n\t\t */\n\t\tif ( html ) {\n\t\t\t_onHTMLDrop( html );\n\t\t} else if ( files.length ) {\n\t\t\t_onFilesDrop( files );\n\t\t} else {\n\t\t\t_onDrop( event );\n\t\t}\n\t};\n}\n","/**\n * A string representing the name of an edge.\n *\n * @typedef {'top'|'right'|'bottom'|'left'} WPEdgeName\n */\n\n/**\n * @typedef  {Object} WPPoint\n * @property {number} x The horizontal position.\n * @property {number} y The vertical position.\n */\n\n/**\n * Given a point, a DOMRect and the name of an edge, returns the distance to\n * that edge of the rect.\n *\n * This function works for edges that are horizontal or vertical (e.g. not\n * rotated), the following terms are used so that the function works in both\n * orientations:\n *\n * - Forward, meaning the axis running horizontally when an edge is vertical\n *   and vertically when an edge is horizontal.\n * - Lateral, meaning the axis running vertically when an edge is vertical\n *   and horizontally when an edge is horizontal.\n *\n * @param {WPPoint}    point The point to measure distance from.\n * @param {DOMRect}    rect  A DOM Rect containing edge positions.\n * @param {WPEdgeName} edge  The edge to measure to.\n */\nexport function getDistanceFromPointToEdge( point, rect, edge ) {\n\tconst isHorizontal = edge === 'top' || edge === 'bottom';\n\tconst { x, y } = point;\n\tconst pointLateralPosition = isHorizontal ? x : y;\n\tconst pointForwardPosition = isHorizontal ? y : x;\n\tconst edgeStart = isHorizontal ? rect.left : rect.top;\n\tconst edgeEnd = isHorizontal ? rect.right : rect.bottom;\n\tconst edgeForwardPosition = rect[ edge ];\n\n\t// Measure the straight line distance to the edge of the rect, when the\n\t// point is adjacent to the edge.\n\t// Else, if the point is positioned diagonally to the edge of the rect,\n\t// measure diagonally to the nearest corner that the edge meets.\n\tlet edgeLateralPosition;\n\tif (\n\t\tpointLateralPosition >= edgeStart &&\n\t\tpointLateralPosition <= edgeEnd\n\t) {\n\t\tedgeLateralPosition = pointLateralPosition;\n\t} else if ( pointLateralPosition < edgeEnd ) {\n\t\tedgeLateralPosition = edgeStart;\n\t} else {\n\t\tedgeLateralPosition = edgeEnd;\n\t}\n\n\treturn Math.sqrt(\n\t\t( pointLateralPosition - edgeLateralPosition ) ** 2 +\n\t\t\t( pointForwardPosition - edgeForwardPosition ) ** 2\n\t);\n}\n\n/**\n * Given a point, a DOMRect and a list of allowed edges returns the name of and\n * distance to the nearest edge.\n *\n * @param {WPPoint}      point        The point to measure distance from.\n * @param {DOMRect}      rect         A DOM Rect containing edge positions.\n * @param {WPEdgeName[]} allowedEdges A list of the edges included in the\n *                                    calculation. Defaults to all edges.\n *\n * @return {[number, string]} An array where the first value is the distance\n *                              and a second is the edge name.\n */\nexport function getDistanceToNearestEdge(\n\tpoint,\n\trect,\n\tallowedEdges = [ 'top', 'bottom', 'left', 'right' ]\n) {\n\tlet candidateDistance;\n\tlet candidateEdge;\n\n\tallowedEdges.forEach( ( edge ) => {\n\t\tconst distance = getDistanceFromPointToEdge( point, rect, edge );\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateEdge = edge;\n\t\t}\n\t} );\n\n\treturn [ candidateDistance, candidateEdge ];\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tuseThrottle,\n\t__experimentalUseDropZone as useDropZone,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useOnBlockDrop from '../use-on-block-drop';\nimport { getDistanceToNearestEdge } from '../../utils/math';\nimport { store as blockEditorStore } from '../../store';\n\n/** @typedef {import('../../utils/math').WPPoint} WPPoint */\n\n/**\n * The orientation of a block list.\n *\n * @typedef {'horizontal'|'vertical'|undefined} WPBlockListOrientation\n */\n\n/**\n * Given a list of block DOM elements finds the index that a block should be dropped\n * at.\n *\n * @param {Element[]}              elements    Array of DOM elements that represent each block in a block list.\n * @param {WPPoint}                position    The position of the item being dragged.\n * @param {WPBlockListOrientation} orientation The orientation of a block list.\n *\n * @return {number|undefined} The block index that's closest to the drag position.\n */\nexport function getNearestBlockIndex( elements, position, orientation ) {\n\tconst allowedEdges =\n\t\torientation === 'horizontal'\n\t\t\t? [ 'left', 'right' ]\n\t\t\t: [ 'top', 'bottom' ];\n\n\tconst isRightToLeft = isRTL();\n\n\tlet candidateIndex;\n\tlet candidateDistance;\n\n\telements.forEach( ( element, index ) => {\n\t\tconst rect = element.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge(\n\t\t\tposition,\n\t\t\trect,\n\t\t\tallowedEdges\n\t\t);\n\n\t\tif ( candidateDistance === undefined || distance < candidateDistance ) {\n\t\t\t// If the user is dropping to the trailing edge of the block\n\t\t\t// add 1 to the index to represent dragging after.\n\t\t\t// Take RTL languages into account where the left edge is\n\t\t\t// the trailing edge.\n\t\t\tconst isTrailingEdge =\n\t\t\t\tedge === 'bottom' ||\n\t\t\t\t( ! isRightToLeft && edge === 'right' ) ||\n\t\t\t\t( isRightToLeft && edge === 'left' );\n\t\t\tconst offset = isTrailingEdge ? 1 : 0;\n\n\t\t\t// Update the currently known best candidate.\n\t\t\tcandidateDistance = distance;\n\t\t\tcandidateIndex = index + offset;\n\t\t}\n\t} );\n\n\treturn candidateIndex;\n}\n\n/**\n * Determine if the element is an empty paragraph block.\n *\n * @param {?HTMLElement} element The element being tested.\n * @return {boolean} True or False.\n */\nfunction isEmptyParagraph( element ) {\n\treturn (\n\t\t!! element &&\n\t\telement.dataset.type === 'core/paragraph' &&\n\t\telement.dataset.empty === 'true'\n\t);\n}\n\n/**\n * @typedef  {Object} WPBlockDropZoneConfig\n * @property {string} rootClientId The root client id for the block list.\n */\n\n/**\n * A React hook that can be used to make a block list handle drag and drop.\n *\n * @param {WPBlockDropZoneConfig} dropZoneConfig configuration data for the drop zone.\n */\nexport default function useBlockDropZone( {\n\t// An undefined value represents a top-level block. Default to an empty\n\t// string for this so that `targetRootClientId` can be easily compared to\n\t// values returned by the `getRootBlockClientId` selector, which also uses\n\t// an empty string to represent top-level blocks.\n\trootClientId: targetRootClientId = '',\n} = {} ) {\n\tconst [ targetBlockIndex, setTargetBlockIndex ] = useState( null );\n\n\tconst isDisabled = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetTemplateLock,\n\t\t\t\t__unstableIsWithinBlockOverlay,\n\t\t\t\t__unstableHasActiveBlockOverlayActive,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst templateLock = getTemplateLock( targetRootClientId );\n\t\t\treturn (\n\t\t\t\t[ 'all', 'contentOnly' ].some(\n\t\t\t\t\t( lock ) => lock === templateLock\n\t\t\t\t) ||\n\t\t\t\t__unstableHasActiveBlockOverlayActive( targetRootClientId ) ||\n\t\t\t\t__unstableIsWithinBlockOverlay( targetRootClientId )\n\t\t\t);\n\t\t},\n\t\t[ targetRootClientId ]\n\t);\n\n\tconst { getBlockListSettings } = useSelect( blockEditorStore );\n\tconst { showInsertionPoint, hideInsertionPoint } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst onBlockDrop = useOnBlockDrop( targetRootClientId, targetBlockIndex );\n\tconst throttled = useThrottle(\n\t\tuseCallback( ( event, currentTarget ) => {\n\t\t\tconst blockElements = Array.from( currentTarget.children ).filter(\n\t\t\t\t// Ensure the element is a block. It should have the `wp-block` class.\n\t\t\t\t( element ) => element.classList.contains( 'wp-block' )\n\t\t\t);\n\t\t\tconst targetIndex = getNearestBlockIndex(\n\t\t\t\tblockElements,\n\t\t\t\t{ x: event.clientX, y: event.clientY },\n\t\t\t\tgetBlockListSettings( targetRootClientId )?.orientation\n\t\t\t);\n\n\t\t\tsetTargetBlockIndex( targetIndex === undefined ? 0 : targetIndex );\n\n\t\t\tif ( targetIndex !== undefined ) {\n\t\t\t\tconst nextBlock = blockElements[ targetIndex ];\n\t\t\t\tconst previousBlock = blockElements[ targetIndex - 1 ];\n\n\t\t\t\t// Don't show the insertion point when it's near an empty paragraph block.\n\t\t\t\tif (\n\t\t\t\t\tisEmptyParagraph( nextBlock ) ||\n\t\t\t\t\tisEmptyParagraph( previousBlock )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tshowInsertionPoint( targetRootClientId, targetIndex );\n\t\t\t}\n\t\t}, [] ),\n\t\t200\n\t);\n\n\treturn useDropZone( {\n\t\tisDisabled,\n\t\tonDrop: onBlockDrop,\n\t\tonDragOver( event ) {\n\t\t\t// `currentTarget` is only available while the event is being\n\t\t\t// handled, so get it now and pass it to the thottled function.\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n\t\t\tthrottled( event, event.currentTarget );\n\t\t},\n\t\tonDragLeave() {\n\t\t\tthrottled.cancel();\n\t\t\thideInsertionPoint();\n\t\t\tsetTargetBlockIndex( null );\n\t\t},\n\t\tonDragEnd() {\n\t\t\tthrottled.cancel();\n\t\t\thideInsertionPoint();\n\t\t\tsetTargetBlockIndex( null );\n\t\t},\n\t} );\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tgetBlockType,\n\tstore as blocksStore,\n\t__unstableGetInnerBlocksProps as getInnerBlocksProps,\n} from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport ButtonBlockAppender from './button-block-appender';\nimport DefaultBlockAppender from './default-block-appender';\nimport useNestedSettingsUpdate from './use-nested-settings-update';\nimport useInnerBlockTemplateSync from './use-inner-block-template-sync';\nimport getBlockContext from './get-block-context';\nimport { BlockListItems } from '../block-list';\nimport { BlockContextProvider } from '../block-context';\nimport { useBlockEditContext } from '../block-edit/context';\nimport useBlockSync from '../provider/use-block-sync';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDropZone from '../use-block-drop-zone';\n\n/**\n * InnerBlocks is a component which allows a single block to have multiple blocks\n * as children. The UncontrolledInnerBlocks component is used whenever the inner\n * blocks are not controlled by another entity. In other words, it is normally\n * used for inner blocks in the post editor\n *\n * @param {Object} props The component props.\n */\nfunction UncontrolledInnerBlocks( props ) {\n\tconst {\n\t\tclientId,\n\t\tallowedBlocks,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\twrapperRef,\n\t\ttemplateInsertUpdatesSelection,\n\t\t__experimentalCaptureToolbars: captureToolbars,\n\t\t__experimentalAppenderTagName,\n\t\trenderAppender,\n\t\torientation,\n\t\tplaceholder,\n\t\t__experimentalLayout,\n\t} = props;\n\n\tuseNestedSettingsUpdate(\n\t\tclientId,\n\t\tallowedBlocks,\n\t\t__experimentalDefaultBlock,\n\t\t__experimentalDirectInsert,\n\t\ttemplateLock,\n\t\tcaptureToolbars,\n\t\torientation,\n\t\t__experimentalLayout\n\t);\n\n\tuseInnerBlockTemplateSync(\n\t\tclientId,\n\t\ttemplate,\n\t\ttemplateLock,\n\t\ttemplateInsertUpdatesSelection\n\t);\n\n\tconst context = useSelect(\n\t\t( select ) => {\n\t\t\tconst block = select( blockEditorStore ).getBlock( clientId );\n\n\t\t\t// This check is here to avoid the Redux zombie bug where a child subscription\n\t\t\t// is called before a parent, causing potential JS errors when the child has been removed.\n\t\t\tif ( ! block ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst blockType = getBlockType( block.name );\n\n\t\t\tif ( ! blockType || ! blockType.providesContext ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\treturn getBlockContext( block.attributes, blockType );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\t// This component needs to always be synchronous as it's the one changing\n\t// the async mode depending on the block selection.\n\treturn (\n\t\t<BlockContextProvider value={ context }>\n\t\t\t<BlockListItems\n\t\t\t\trootClientId={ clientId }\n\t\t\t\trenderAppender={ renderAppender }\n\t\t\t\t__experimentalAppenderTagName={ __experimentalAppenderTagName }\n\t\t\t\t__experimentalLayout={ __experimentalLayout }\n\t\t\t\twrapperRef={ wrapperRef }\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t/>\n\t\t</BlockContextProvider>\n\t);\n}\n\n/**\n * The controlled inner blocks component wraps the uncontrolled inner blocks\n * component with the blockSync hook. This keeps the innerBlocks of the block in\n * the block-editor store in sync with the blocks of the controlling entity. An\n * example of an inner block controller is a template part block, which provides\n * its own blocks from the template part entity data source.\n *\n * @param {Object} props The component props.\n */\nfunction ControlledInnerBlocks( props ) {\n\tuseBlockSync( props );\n\treturn <UncontrolledInnerBlocks { ...props } />;\n}\n\nconst ForwardedInnerBlocks = forwardRef( ( props, ref ) => {\n\tconst innerBlocksProps = useInnerBlocksProps( { ref }, props );\n\treturn (\n\t\t<div className=\"block-editor-inner-blocks\">\n\t\t\t<div { ...innerBlocksProps } />\n\t\t</div>\n\t);\n} );\n\n/**\n * This hook is used to lightly mark an element as an inner blocks wrapper\n * element. Call this hook and pass the returned props to the element to mark as\n * an inner blocks wrapper, automatically rendering inner blocks as children. If\n * you define a ref for the element, it is important to pass the ref to this\n * hook, which the hook in turn will pass to the component through the props it\n * returns. Optionally, you can also pass any other props through this hook, and\n * they will be merged and returned.\n *\n * @param {Object} props   Optional. Props to pass to the element. Must contain\n *                         the ref if one is defined.\n * @param {Object} options Optional. Inner blocks options.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport function useInnerBlocksProps( props = {}, options = {} ) {\n\tconst { clientId } = useBlockEditContext();\n\tconst isSmallScreen = useViewportMatch( 'medium', '<' );\n\tconst { __experimentalCaptureToolbars, hasOverlay } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn {};\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetBlockName,\n\t\t\t\tisBlockSelected,\n\t\t\t\thasSelectedInnerBlock,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst blockName = getBlockName( clientId );\n\t\t\tconst enableClickThrough =\n\t\t\t\t__unstableGetEditorMode() === 'navigation' || isSmallScreen;\n\t\t\treturn {\n\t\t\t\t__experimentalCaptureToolbars: select(\n\t\t\t\t\tblocksStore\n\t\t\t\t).hasBlockSupport(\n\t\t\t\t\tblockName,\n\t\t\t\t\t'__experimentalExposeControlsToChildren',\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t\thasOverlay:\n\t\t\t\t\tblockName !== 'core/template' &&\n\t\t\t\t\t! isBlockSelected( clientId ) &&\n\t\t\t\t\t! hasSelectedInnerBlock( clientId, true ) &&\n\t\t\t\t\tenableClickThrough,\n\t\t\t};\n\t\t},\n\t\t[ clientId, isSmallScreen ]\n\t);\n\n\tconst ref = useMergeRefs( [\n\t\tprops.ref,\n\t\tuseBlockDropZone( {\n\t\t\trootClientId: clientId,\n\t\t} ),\n\t] );\n\n\tconst innerBlocksProps = {\n\t\t__experimentalCaptureToolbars,\n\t\t...options,\n\t};\n\tconst InnerBlocks =\n\t\tinnerBlocksProps.value && innerBlocksProps.onChange\n\t\t\t? ControlledInnerBlocks\n\t\t\t: UncontrolledInnerBlocks;\n\treturn {\n\t\t...props,\n\t\tref,\n\t\tclassName: classnames(\n\t\t\tprops.className,\n\t\t\t'block-editor-block-list__layout',\n\t\t\t{\n\t\t\t\t'has-overlay': hasOverlay,\n\t\t\t}\n\t\t),\n\t\tchildren: clientId ? (\n\t\t\t<InnerBlocks { ...innerBlocksProps } clientId={ clientId } />\n\t\t) : (\n\t\t\t<BlockListItems { ...options } />\n\t\t),\n\t};\n}\n\nuseInnerBlocksProps.save = getInnerBlocksProps;\n\n// Expose default appender placeholders as components.\nForwardedInnerBlocks.DefaultBlockAppender = DefaultBlockAppender;\nForwardedInnerBlocks.ButtonBlockAppender = ButtonBlockAppender;\n\nForwardedInnerBlocks.Content = () => useInnerBlocksProps.save().children;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/inner-blocks/README.md\n */\nexport default ForwardedInnerBlocks;\n","/**\n * External dependencies\n */\nimport { isEqual } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { synchronizeBlocksWithTemplate } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * This hook makes sure that a block's inner blocks stay in sync with the given\n * block \"template\". The template is a block hierarchy to which inner blocks must\n * conform. If the blocks get \"out of sync\" with the template and the template\n * is meant to be locked (e.g. templateLock = \"all\" or templateLock = \"contentOnly\"),\n * then we replace the inner blocks with the correct value after synchronizing it with the template.\n *\n * @param {string}  clientId                       The block client ID.\n * @param {Object}  template                       The template to match.\n * @param {string}  templateLock                   The template lock state for the inner blocks. For\n *                                                 example, if the template lock is set to \"all\",\n *                                                 then the inner blocks will stay in sync with the\n *                                                 template. If not defined or set to false, then\n *                                                 the inner blocks will not be synchronized with\n *                                                 the given template.\n * @param {boolean} templateInsertUpdatesSelection Whether or not to update the\n *                                                 block-editor selection state when inner blocks\n *                                                 are replaced after template synchronization.\n */\nexport default function useInnerBlockTemplateSync(\n\tclientId,\n\ttemplate,\n\ttemplateLock,\n\ttemplateInsertUpdatesSelection\n) {\n\tconst { getSelectedBlocksInitialCaretPosition } =\n\t\tuseSelect( blockEditorStore );\n\tconst { replaceInnerBlocks } = useDispatch( blockEditorStore );\n\tconst innerBlocks = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlocks( clientId ),\n\t\t[ clientId ]\n\t);\n\tconst { getBlocks } = useSelect( blockEditorStore );\n\n\t// Maintain a reference to the previous value so we can do a deep equality check.\n\tconst existingTemplate = useRef( null );\n\tuseLayoutEffect( () => {\n\t\t// There's an implicit dependency between useInnerBlockTemplateSync and useNestedSettingsUpdate\n\t\t// The former needs to happen after the latter and since the latter is using microtasks to batch updates (performance optimization),\n\t\t// we need to schedule this one in a microtask as well.\n\t\t// Exemple: If you remove queueMicrotask here, ctrl + click to insert quote block won't close the inserter.\n\t\twindow.queueMicrotask( () => {\n\t\t\t// Only synchronize innerBlocks with template if innerBlocks are empty\n\t\t\t// or a locking \"all\" or \"contentOnly\" exists directly on the block.\n\t\t\tconst currentInnerBlocks = getBlocks( clientId );\n\t\t\tconst shouldApplyTemplate =\n\t\t\t\tcurrentInnerBlocks.length === 0 ||\n\t\t\t\ttemplateLock === 'all' ||\n\t\t\t\ttemplateLock === 'contentOnly';\n\n\t\t\tconst hasTemplateChanged = ! isEqual(\n\t\t\t\ttemplate,\n\t\t\t\texistingTemplate.current\n\t\t\t);\n\n\t\t\tif ( ! shouldApplyTemplate || ! hasTemplateChanged ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\texistingTemplate.current = template;\n\t\t\tconst nextBlocks = synchronizeBlocksWithTemplate(\n\t\t\t\tcurrentInnerBlocks,\n\t\t\t\ttemplate\n\t\t\t);\n\n\t\t\tif ( ! isEqual( nextBlocks, currentInnerBlocks ) ) {\n\t\t\t\treplaceInnerBlocks(\n\t\t\t\t\tclientId,\n\t\t\t\t\tnextBlocks,\n\t\t\t\t\tcurrentInnerBlocks.length === 0 &&\n\t\t\t\t\t\ttemplateInsertUpdatesSelection &&\n\t\t\t\t\t\tnextBlocks.length !== 0,\n\t\t\t\t\t// This ensures the \"initialPosition\" doesn't change when applying the template\n\t\t\t\t\t// If we're supposed to focus the block, we'll focus the first inner block\n\t\t\t\t\t// otherwise, we won't apply any auto-focus.\n\t\t\t\t\t// This ensures for instance that the focus stays in the inserter when inserting the \"buttons\" block.\n\t\t\t\t\tgetSelectedBlocksInitialCaretPosition()\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\t}, [ innerBlocks, template, templateLock, clientId ] );\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tAsyncModeProvider,\n\tuseSelect,\n\tuseDispatch,\n\tuseRegistry,\n} from '@wordpress/data';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\tuseDebounce,\n} from '@wordpress/compose';\nimport {\n\tcreateContext,\n\tuseState,\n\tuseMemo,\n\tuseCallback,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockListBlock from './block';\nimport BlockListAppender from '../block-list-appender';\nimport { useInBetweenInserter } from './use-in-between-inserter';\nimport { store as blockEditorStore } from '../../store';\nimport { usePreParsePatterns } from '../../utils/pre-parse-patterns';\nimport { LayoutProvider, defaultLayout } from './layout';\nimport BlockToolsBackCompat from '../block-tools/back-compat';\nimport { useBlockSelectionClearer } from '../block-selection-clearer';\nimport { useInnerBlocksProps } from '../inner-blocks';\nimport {\n\tBlockEditContextProvider,\n\tDEFAULT_BLOCK_EDIT_CONTEXT,\n} from '../block-edit/context';\n\nconst elementContext = createContext();\n\nexport const IntersectionObserver = createContext();\nconst pendingBlockVisibilityUpdatesPerRegistry = new WeakMap();\n\nfunction Root( { className, ...settings } ) {\n\tconst [ element, setElement ] = useState();\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { isOutlineMode, isFocusMode, editorMode } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings, __unstableGetEditorMode } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst { outlineMode, focusMode } = getSettings();\n\t\t\treturn {\n\t\t\t\tisOutlineMode: outlineMode,\n\t\t\t\tisFocusMode: focusMode,\n\t\t\t\teditorMode: __unstableGetEditorMode(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst registry = useRegistry();\n\tconst { setBlockVisibility } = useDispatch( blockEditorStore );\n\n\tconst delayedBlockVisibilityUpdates = useDebounce(\n\t\tuseCallback( () => {\n\t\t\tconst updates = {};\n\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t.get( registry )\n\t\t\t\t.forEach( ( [ id, isIntersecting ] ) => {\n\t\t\t\t\tupdates[ id ] = isIntersecting;\n\t\t\t\t} );\n\t\t\tsetBlockVisibility( updates );\n\t\t}, [ registry ] ),\n\t\t300,\n\t\t{\n\t\t\ttrailing: true,\n\t\t}\n\t);\n\tconst intersectionObserver = useMemo( () => {\n\t\tconst { IntersectionObserver: Observer } = window;\n\n\t\tif ( ! Observer ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn new Observer( ( entries ) => {\n\t\t\tif ( ! pendingBlockVisibilityUpdatesPerRegistry.get( registry ) ) {\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry.set( registry, [] );\n\t\t\t}\n\t\t\tfor ( const entry of entries ) {\n\t\t\t\tconst clientId = entry.target.getAttribute( 'data-block' );\n\t\t\t\tpendingBlockVisibilityUpdatesPerRegistry\n\t\t\t\t\t.get( registry )\n\t\t\t\t\t.push( [ clientId, entry.isIntersecting ] );\n\t\t\t}\n\t\t\tdelayedBlockVisibilityUpdates();\n\t\t} );\n\t}, [] );\n\tconst innerBlocksProps = useInnerBlocksProps(\n\t\t{\n\t\t\tref: useMergeRefs( [\n\t\t\t\tuseBlockSelectionClearer(),\n\t\t\t\tuseInBetweenInserter(),\n\t\t\t\tsetElement,\n\t\t\t] ),\n\t\t\tclassName: classnames( 'is-root-container', className, {\n\t\t\t\t'is-outline-mode': isOutlineMode,\n\t\t\t\t'is-focus-mode': isFocusMode && isLargeViewport,\n\t\t\t\t'is-navigate-mode': editorMode === 'navigation',\n\t\t\t} ),\n\t\t},\n\t\tsettings\n\t);\n\treturn (\n\t\t<elementContext.Provider value={ element }>\n\t\t\t<IntersectionObserver.Provider value={ intersectionObserver }>\n\t\t\t\t<div { ...innerBlocksProps } />\n\t\t\t</IntersectionObserver.Provider>\n\t\t</elementContext.Provider>\n\t);\n}\n\nexport default function BlockList( settings ) {\n\tusePreParsePatterns();\n\treturn (\n\t\t<BlockToolsBackCompat>\n\t\t\t<BlockEditContextProvider value={ DEFAULT_BLOCK_EDIT_CONTEXT }>\n\t\t\t\t<Root { ...settings } />\n\t\t\t</BlockEditContextProvider>\n\t\t</BlockToolsBackCompat>\n\t);\n}\n\nBlockList.__unstableElementContext = elementContext;\n\nfunction Items( {\n\tplaceholder,\n\trootClientId,\n\trenderAppender,\n\t__experimentalAppenderTagName,\n\t__experimentalLayout: layout = defaultLayout,\n} ) {\n\tconst { order, selectedBlocks, visibleBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockOrder,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\t__unstableGetVisibleBlocks,\n\t\t\t} = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\torder: getBlockOrder( rootClientId ),\n\t\t\t\tselectedBlocks: getSelectedBlockClientIds(),\n\t\t\t\tvisibleBlocks: __unstableGetVisibleBlocks(),\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\n\treturn (\n\t\t<LayoutProvider value={ layout }>\n\t\t\t{ order.map( ( clientId ) => (\n\t\t\t\t<AsyncModeProvider\n\t\t\t\t\tkey={ clientId }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\t// Only provide data asynchronously if the block is\n\t\t\t\t\t\t// not visible and not selected.\n\t\t\t\t\t\t! visibleBlocks.has( clientId ) &&\n\t\t\t\t\t\t! selectedBlocks.includes( clientId )\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<BlockListBlock\n\t\t\t\t\t\trootClientId={ rootClientId }\n\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t/>\n\t\t\t\t</AsyncModeProvider>\n\t\t\t) ) }\n\t\t\t{ order.length < 1 && placeholder }\n\t\t\t<BlockListAppender\n\t\t\t\ttagName={ __experimentalAppenderTagName }\n\t\t\t\trootClientId={ rootClientId }\n\t\t\t\trenderAppender={ renderAppender }\n\t\t\t/>\n\t\t</LayoutProvider>\n\t);\n}\n\nexport function BlockListItems( props ) {\n\t// This component needs to always be synchronous as it's the one changing\n\t// the async mode depending on the block selection.\n\treturn (\n\t\t<AsyncModeProvider value={ false }>\n\t\t\t<Items { ...props } />\n\t\t</AsyncModeProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue } from '@wordpress/components';\n\n/**\n * Gets the (non-undefined) item with the highest occurrence within an array\n * Based in part on: https://stackoverflow.com/a/20762713\n *\n * Undefined values are always sorted to the end by `sort`, so this function\n * returns the first element, to always prioritize real values over undefined\n * values.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#description\n *\n * @param {Array<any>} inputArray Array of items to check.\n * @return {any}                  The item with the most occurrences.\n */\nexport function mode( inputArray ) {\n\tconst arr = [ ...inputArray ];\n\treturn arr\n\t\t.sort(\n\t\t\t( a, b ) =>\n\t\t\t\tinputArray.filter( ( v ) => v === b ).length -\n\t\t\t\tinputArray.filter( ( v ) => v === a ).length\n\t\t)\n\t\t.shift();\n}\n\n/**\n * Returns the most common CSS unit from the current CSS unit selections.\n *\n * - If a single flat border radius is set, its unit will be used\n * - If individual corner selections, the most common of those will be used\n * - Failing any unit selections a default of 'px' is returned.\n *\n * @param {Object} selectedUnits Unit selections for flat radius & each corner.\n * @return {string} Most common CSS unit from current selections. Default: `px`.\n */\nexport function getAllUnit( selectedUnits = {} ) {\n\tconst { flat, ...cornerUnits } = selectedUnits;\n\treturn (\n\t\tflat || mode( Object.values( cornerUnits ).filter( Boolean ) ) || 'px'\n\t);\n}\n\n/**\n * Gets the 'all' input value and unit from values data.\n *\n * @param {Object|string} values Radius values.\n * @return {string}              A value + unit for the 'all' input.\n */\nexport function getAllValue( values = {} ) {\n\t/**\n\t * Border radius support was originally a single pixel value.\n\t *\n\t * To maintain backwards compatibility treat this case as the all value.\n\t */\n\tif ( typeof values === 'string' ) {\n\t\treturn values;\n\t}\n\n\tconst parsedQuantitiesAndUnits = Object.values( values ).map( ( value ) =>\n\t\tparseQuantityAndUnitFromRawValue( value )\n\t);\n\n\tconst allValues = parsedQuantitiesAndUnits.map(\n\t\t( value ) => value[ 0 ] ?? ''\n\t);\n\tconst allUnits = parsedQuantitiesAndUnits.map( ( value ) => value[ 1 ] );\n\n\tconst value = allValues.every( ( v ) => v === allValues[ 0 ] )\n\t\t? allValues[ 0 ]\n\t\t: '';\n\tconst unit = mode( allUnits );\n\n\tconst allValue = value === 0 || value ? `${ value }${ unit }` : undefined;\n\n\treturn allValue;\n}\n\n/**\n * Checks to determine if values are mixed.\n *\n * @param {Object} values Radius values.\n * @return {boolean}      Whether values are mixed.\n */\nexport function hasMixedValues( values = {} ) {\n\tconst allValue = getAllValue( values );\n\tconst isMixed =\n\t\ttypeof values === 'string' ? false : isNaN( parseFloat( allValue ) );\n\n\treturn isMixed;\n}\n\n/**\n * Checks to determine if values are defined.\n *\n * @param {Object} values Radius values.\n * @return {boolean}      Whether values are mixed.\n */\nexport function hasDefinedValues( values ) {\n\tif ( ! values ) {\n\t\treturn false;\n\t}\n\n\t// A string value represents a shorthand value.\n\tif ( typeof values === 'string' ) {\n\t\treturn true;\n\t}\n\n\t// An object represents longhand border radius values, if any are set\n\t// flag values as being defined.\n\tconst filteredValues = Object.values( values ).filter( ( value ) => {\n\t\treturn !! value || value === 0;\n\t} );\n\n\treturn !! filteredValues.length;\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalUnitControl as UnitControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasMixedValues,\n\thasDefinedValues,\n} from './utils';\n\nexport default function AllInputControl( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues,\n\t...props\n} ) {\n\tlet allValue = getAllValue( values );\n\n\tif ( allValue === undefined ) {\n\t\t// If we don't have any value set the unit to any current selection\n\t\t// or the most common unit from the individual radii values.\n\t\tallValue = getAllUnit( selectedUnits );\n\t}\n\n\tconst hasValues = hasDefinedValues( values );\n\tconst isMixed = hasValues && hasMixedValues( values );\n\tconst allPlaceholder = isMixed ? __( 'Mixed' ) : null;\n\n\t// Filter out CSS-unit-only values to prevent invalid styles.\n\tconst handleOnChange = ( next ) => {\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\t\tonChange( nextValue );\n\t};\n\n\t// Store current unit selection for use as fallback for individual\n\t// radii controls.\n\tconst handleOnUnitChange = ( unit ) => {\n\t\tsetSelectedUnits( {\n\t\t\ttopLeft: unit,\n\t\t\ttopRight: unit,\n\t\t\tbottomLeft: unit,\n\t\t\tbottomRight: unit,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...props }\n\t\t\taria-label={ __( 'Border radius' ) }\n\t\t\tdisableUnits={ isMixed }\n\t\t\tisOnly\n\t\t\tvalue={ allValue }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonUnitChange={ handleOnUnitChange }\n\t\t\tplaceholder={ allPlaceholder }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\tTooltip,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nconst CORNERS = {\n\ttopLeft: __( 'Top left' ),\n\ttopRight: __( 'Top right' ),\n\tbottomLeft: __( 'Bottom left' ),\n\tbottomRight: __( 'Bottom right' ),\n};\n\nexport default function BoxInputControls( {\n\tonChange,\n\tselectedUnits,\n\tsetSelectedUnits,\n\tvalues: valuesProp,\n\t...props\n} ) {\n\tconst createHandleOnChange = ( corner ) => ( next ) => {\n\t\tif ( ! onChange ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Filter out CSS-unit-only values to prevent invalid styles.\n\t\tconst isNumeric = ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : undefined;\n\n\t\tonChange( {\n\t\t\t...values,\n\t\t\t[ corner ]: nextValue,\n\t\t} );\n\t};\n\n\tconst createHandleOnUnitChange = ( side ) => ( next ) => {\n\t\tconst newUnits = { ...selectedUnits };\n\t\tnewUnits[ side ] = next;\n\t\tsetSelectedUnits( newUnits );\n\t};\n\n\t// For shorthand style & backwards compatibility, handle flat string value.\n\tconst values =\n\t\ttypeof valuesProp !== 'string'\n\t\t\t? valuesProp\n\t\t\t: {\n\t\t\t\t\ttopLeft: valuesProp,\n\t\t\t\t\ttopRight: valuesProp,\n\t\t\t\t\tbottomLeft: valuesProp,\n\t\t\t\t\tbottomRight: valuesProp,\n\t\t\t  };\n\n\t// Controls are wrapped in tooltips as visible labels aren't desired here.\n\t// Tooltip rendering also requires the UnitControl to be wrapped. See:\n\t// https://github.com/WordPress/gutenberg/pull/24966#issuecomment-685875026\n\treturn (\n\t\t<div className=\"components-border-radius-control__input-controls-wrapper\">\n\t\t\t{ Object.entries( CORNERS ).map( ( [ corner, label ] ) => {\n\t\t\t\tconst [ parsedQuantity, parsedUnit ] =\n\t\t\t\t\tparseQuantityAndUnitFromRawValue( values[ corner ] );\n\n\t\t\t\tconst computedUnit = values[ corner ]\n\t\t\t\t\t? parsedUnit\n\t\t\t\t\t: selectedUnits[ corner ] || selectedUnits.flat;\n\n\t\t\t\treturn (\n\t\t\t\t\t<Tooltip text={ label } position=\"top\" key={ corner }>\n\t\t\t\t\t\t<div className=\"components-border-radius-control__tooltip-wrapper\">\n\t\t\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\t\t\tvalue={ [ parsedQuantity, computedUnit ].join(\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\tonChange={ createHandleOnChange( corner ) }\n\t\t\t\t\t\t\t\tonUnitChange={ createHandleOnUnitChange(\n\t\t\t\t\t\t\t\t\tcorner\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Button, Tooltip } from '@wordpress/components';\nimport { link, linkOff } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function LinkedButton( { isLinked, ...props } ) {\n\tconst label = isLinked ? __( 'Unlink radii' ) : __( 'Link radii' );\n\n\t// TODO: Remove span after merging https://github.com/WordPress/gutenberg/pull/44198\n\treturn (\n\t\t<Tooltip text={ label }>\n\t\t\t<span>\n\t\t\t\t<Button\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tclassName=\"component-border-radius-control__linked-button\"\n\t\t\t\t\tisSmall\n\t\t\t\t\ticon={ isLinked ? link : linkOff }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\taria-label={ label }\n\t\t\t\t/>\n\t\t\t</span>\n\t\t</Tooltip>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AllInputControl from './all-input-control';\nimport InputControls from './input-controls';\nimport LinkedButton from './linked-button';\nimport useSetting from '../use-setting';\nimport {\n\tgetAllValue,\n\tgetAllUnit,\n\thasDefinedValues,\n\thasMixedValues,\n} from './utils';\n\nconst DEFAULT_VALUES = {\n\ttopLeft: undefined,\n\ttopRight: undefined,\n\tbottomLeft: undefined,\n\tbottomRight: undefined,\n};\nconst MIN_BORDER_RADIUS_VALUE = 0;\nconst MAX_BORDER_RADIUS_VALUES = {\n\tpx: 100,\n\tem: 20,\n\trem: 20,\n};\n\n/**\n * Control to display border radius options.\n *\n * @param {Object}   props          Component props.\n * @param {Function} props.onChange Callback to handle onChange.\n * @param {Object}   props.values   Border radius values.\n *\n * @return {WPElement}              Custom border radius control.\n */\nexport default function BorderRadiusControl( { onChange, values } ) {\n\tconst [ isLinked, setIsLinked ] = useState(\n\t\t! hasDefinedValues( values ) || ! hasMixedValues( values )\n\t);\n\n\t// Tracking selected units via internal state allows filtering of CSS unit\n\t// only values from being saved while maintaining preexisting unit selection\n\t// behaviour. Filtering CSS unit only values prevents invalid style values.\n\tconst [ selectedUnits, setSelectedUnits ] = useState( {\n\t\tflat:\n\t\t\ttypeof values === 'string'\n\t\t\t\t? parseQuantityAndUnitFromRawValue( values )[ 1 ]\n\t\t\t\t: undefined,\n\t\ttopLeft: parseQuantityAndUnitFromRawValue( values?.topLeft )[ 1 ],\n\t\ttopRight: parseQuantityAndUnitFromRawValue( values?.topRight )[ 1 ],\n\t\tbottomLeft: parseQuantityAndUnitFromRawValue( values?.bottomLeft )[ 1 ],\n\t\tbottomRight: parseQuantityAndUnitFromRawValue(\n\t\t\tvalues?.bottomRight\n\t\t)[ 1 ],\n\t} );\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [ 'px', 'em', 'rem' ],\n\t} );\n\n\tconst unit = getAllUnit( selectedUnits );\n\tconst unitConfig = units && units.find( ( item ) => item.value === unit );\n\tconst step = unitConfig?.step || 1;\n\n\tconst [ allValue ] = parseQuantityAndUnitFromRawValue(\n\t\tgetAllValue( values )\n\t);\n\n\tconst toggleLinked = () => setIsLinked( ! isLinked );\n\n\tconst handleSliderChange = ( next ) => {\n\t\tonChange( next !== undefined ? `${ next }${ unit }` : undefined );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"components-border-radius-control\">\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Radius' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"components-border-radius-control__wrapper\">\n\t\t\t\t{ isLinked ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<AllInputControl\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__unit-control\"\n\t\t\t\t\t\t\tvalues={ values }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\tlabel={ __( 'Border radius' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tclassName=\"components-border-radius-control__range-control\"\n\t\t\t\t\t\t\tvalue={ allValue ?? '' }\n\t\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\t\tmax={ MAX_BORDER_RADIUS_VALUES[ unit ] }\n\t\t\t\t\t\t\tinitialPosition={ 0 }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleSliderChange }\n\t\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\t<InputControls\n\t\t\t\t\t\tmin={ MIN_BORDER_RADIUS_VALUE }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tselectedUnits={ selectedUnits }\n\t\t\t\t\t\tsetSelectedUnits={ setSelectedUnits }\n\t\t\t\t\t\tvalues={ values || DEFAULT_VALUES }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<LinkedButton onClick={ toggleLinked } isLinked={ isLinked } />\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport BorderRadiusControl from '../components/border-radius-control';\nimport { cleanEmptyObject } from './utils';\nimport { removeBorderAttribute } from './border';\n\n/**\n * Inspector control panel containing the border radius related configuration.\n *\n * @param {Object} props Block properties.\n *\n * @return {WPElement} Border radius edit element.\n */\nexport function BorderRadiusEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst onChange = ( newRadius ) => {\n\t\tconst newStyle = cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tborder: {\n\t\t\t\t...style?.border,\n\t\t\t\tradius: newRadius,\n\t\t\t},\n\t\t} );\n\n\t\tsetAttributes( { style: newStyle } );\n\t};\n\n\treturn (\n\t\t<BorderRadiusControl\n\t\t\tvalues={ style?.border?.radius }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\n/**\n * Checks if there is a current value in the border radius block support\n * attributes.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a border radius value set.\n */\nexport function hasBorderRadiusValue( props ) {\n\tconst borderRadius = props.attributes.style?.border?.radius;\n\n\tif ( typeof borderRadius === 'object' ) {\n\t\treturn Object.entries( borderRadius ).some( Boolean );\n\t}\n\n\treturn !! borderRadius;\n}\n\n/**\n * Resets the border radius block support attributes. This can be used when\n * disabling the border radius support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetBorderRadius( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\tsetAttributes( { style: removeBorderAttribute( style, 'radius' ) } );\n}\n","/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults,\n * and the values of the defined color or custom color returns a color object describing the color.\n *\n * @param {Array}   colors       Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} definedColor A string containing the color slug.\n * @param {?string} customColor  A string containing the customColor value.\n *\n * @return {?Object} If definedColor is passed and the name is found in colors,\n *                   the color object exactly as set by the theme or editor defaults is returned.\n *                   Otherwise, an object that just sets the color is defined.\n */\nexport const getColorObjectByAttributeValues = (\n\tcolors,\n\tdefinedColor,\n\tcustomColor\n) => {\n\tif ( definedColor ) {\n\t\tconst colorObj = find( colors, { slug: definedColor } );\n\n\t\tif ( colorObj ) {\n\t\t\treturn colorObj;\n\t\t}\n\t}\n\treturn {\n\t\tcolor: customColor,\n\t};\n};\n\n/**\n * Provided an array of color objects as set by the theme or by the editor defaults, and a color value returns the color object matching that value or undefined.\n *\n * @param {Array}   colors     Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {?Object} Color object included in the colors array whose color property equals colorValue.\n *                   Returns undefined if no color object matches this requirement.\n */\nexport const getColorObjectByColorValue = ( colors, colorValue ) => {\n\treturn find( colors, { color: colorValue } );\n};\n\n/**\n * Returns a class based on the context a color is being used and its slug.\n *\n * @param {string} colorContextName Context/place where color is being used e.g: background, text etc...\n * @param {string} colorSlug        Slug of the color.\n *\n * @return {?string} String with the class corresponding to the color in the provided context.\n *                   Returns undefined if either colorContextName or colorSlug are not provided.\n */\nexport function getColorClassName( colorContextName, colorSlug ) {\n\tif ( ! colorContextName || ! colorSlug ) {\n\t\treturn undefined;\n\t}\n\n\treturn `has-${ kebabCase( colorSlug ) }-${ colorContextName }`;\n}\n\n/**\n * Given an array of color objects and a color value returns the color value of the most readable color in the array.\n *\n * @param {Array}   colors     Array of color objects as set by the theme or by the editor defaults.\n * @param {?string} colorValue A string containing the color value.\n *\n * @return {string} String with the color value of the most readable color.\n */\nexport function getMostReadableColor( colors, colorValue ) {\n\tconst colordColor = colord( colorValue );\n\tconst getColorContrast = ( { color } ) => colordColor.contrast( color );\n\n\tconst maxContrast = Math.max( ...colors.map( getColorContrast ) );\n\treturn colors.find( ( color ) => getColorContrast( color ) === maxContrast )\n\t\t.color;\n}\n","/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default function useCommonSingleMultipleSelects() {\n\treturn {\n\t\tdisableCustomColors: ! useSetting( 'color.custom' ),\n\t\tdisableCustomGradients: ! useSetting( 'color.customGradient' ),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\nimport useCommonSingleMultipleSelects from './use-common-single-multiple-selects';\n\n/**\n * Retrieves color and gradient related settings.\n *\n * The arrays for colors and gradients are made up of color palettes from each\n * origin i.e. \"Core\", \"Theme\", and \"User\".\n *\n * @return {Object} Color and gradient related settings.\n */\nexport default function useMultipleOriginColorsAndGradients() {\n\tconst colorGradientSettings = useCommonSingleMultipleSelects();\n\tconst customColors = useSetting( 'color.palette.custom' );\n\tconst themeColors = useSetting( 'color.palette.theme' );\n\tconst defaultColors = useSetting( 'color.palette.default' );\n\tconst shouldDisplayDefaultColors = useSetting( 'color.defaultPalette' );\n\n\tcolorGradientSettings.colors = useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeColors && themeColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: themeColors,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultColors &&\n\t\t\tdefaultColors &&\n\t\t\tdefaultColors.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tcolors: defaultColors,\n\t\t\t} );\n\t\t}\n\t\tif ( customColors && customColors.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tcolors: customColors,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [ defaultColors, themeColors, customColors ] );\n\n\tconst customGradients = useSetting( 'color.gradients.custom' );\n\tconst themeGradients = useSetting( 'color.gradients.theme' );\n\tconst defaultGradients = useSetting( 'color.gradients.default' );\n\tconst shouldDisplayDefaultGradients = useSetting(\n\t\t'color.defaultGradients'\n\t);\n\tcolorGradientSettings.gradients = useMemo( () => {\n\t\tconst result = [];\n\t\tif ( themeGradients && themeGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Theme',\n\t\t\t\t\t'Indicates this palette comes from the theme.'\n\t\t\t\t),\n\t\t\t\tgradients: themeGradients,\n\t\t\t} );\n\t\t}\n\t\tif (\n\t\t\tshouldDisplayDefaultGradients &&\n\t\t\tdefaultGradients &&\n\t\t\tdefaultGradients.length\n\t\t) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Default',\n\t\t\t\t\t'Indicates this palette comes from WordPress.'\n\t\t\t\t),\n\t\t\t\tgradients: defaultGradients,\n\t\t\t} );\n\t\t}\n\t\tif ( customGradients && customGradients.length ) {\n\t\t\tresult.push( {\n\t\t\t\tname: _x(\n\t\t\t\t\t'Custom',\n\t\t\t\t\t'Indicates this palette is created by the user.'\n\t\t\t\t),\n\t\t\t\tgradients: customGradients,\n\t\t\t} );\n\t\t}\n\t\treturn result;\n\t}, [ customGradients, themeGradients, defaultGradients ] );\n\n\treturn colorGradientSettings;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockSupport } from '@wordpress/blocks';\nimport {\n\t__experimentalBorderBoxControl as BorderBoxControl,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n\t__experimentalIsDefinedBorder as isDefinedBorder,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { Platform } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBorderRadiusEdit,\n\thasBorderRadiusValue,\n\tresetBorderRadius,\n} from './border-radius';\nimport { getColorClassName } from '../components/colors';\nimport InspectorControls from '../components/inspector-controls';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\nimport useSetting from '../components/use-setting';\nimport { cleanEmptyObject, shouldSkipSerialization } from './utils';\n\nexport const BORDER_SUPPORT_KEY = '__experimentalBorder';\n\nconst borderSides = [ 'top', 'right', 'bottom', 'left' ];\n\nconst hasBorderValue = ( props ) => {\n\tconst { borderColor, style } = props.attributes;\n\treturn isDefinedBorder( style?.border ) || !! borderColor;\n};\n\n// The border color, style, and width are omitted so they get undefined. The\n// border radius is separate and must retain its selection.\nconst resetBorder = ( { attributes = {}, setAttributes } ) => {\n\tconst { style } = attributes;\n\tsetAttributes( {\n\t\tborderColor: undefined,\n\t\tstyle: {\n\t\t\t...style,\n\t\t\tborder: cleanEmptyObject( {\n\t\t\t\tradius: style?.border?.radius,\n\t\t\t} ),\n\t\t},\n\t} );\n};\n\nconst resetBorderFilter = ( newAttributes ) => ( {\n\t...newAttributes,\n\tborderColor: undefined,\n\tstyle: {\n\t\t...newAttributes.style,\n\t\tborder: {\n\t\t\tradius: newAttributes.style?.border?.radius,\n\t\t},\n\t},\n} );\n\nconst getColorByProperty = ( colors, property, value ) => {\n\tlet matchedColor;\n\n\tcolors.some( ( origin ) =>\n\t\torigin.colors.some( ( color ) => {\n\t\t\tif ( color[ property ] === value ) {\n\t\t\t\tmatchedColor = color;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t} )\n\t);\n\n\treturn matchedColor;\n};\n\nexport const getMultiOriginColor = ( { colors, namedColor, customColor } ) => {\n\t// Search each origin (default, theme, or user) for matching color by name.\n\tif ( namedColor ) {\n\t\tconst colorObject = getColorByProperty( colors, 'slug', namedColor );\n\t\tif ( colorObject ) {\n\t\t\treturn colorObject;\n\t\t}\n\t}\n\n\t// Skip if no custom color or matching named color.\n\tif ( ! customColor ) {\n\t\treturn { color: undefined };\n\t}\n\n\t// Attempt to find color via custom color value or build new object.\n\tconst colorObject = getColorByProperty( colors, 'color', customColor );\n\treturn colorObject ? colorObject : { color: customColor };\n};\n\nconst getBorderObject = ( attributes, colors ) => {\n\tconst { borderColor, style } = attributes;\n\tconst { border: borderStyles } = style || {};\n\n\t// If we have a named color for a flat border. Fetch that color object and\n\t// apply that color's value to the color property within the style object.\n\tif ( borderColor ) {\n\t\tconst { color } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\treturn color ? { ...borderStyles, color } : borderStyles;\n\t}\n\n\t// Individual side border color slugs are stored within the border style\n\t// object. If we don't have a border styles object we have nothing further\n\t// to hydrate.\n\tif ( ! borderStyles ) {\n\t\treturn borderStyles;\n\t}\n\n\t// If we have named colors for the individual side borders, retrieve their\n\t// related color objects and apply the real color values to the split\n\t// border objects.\n\tconst hydratedBorderStyles = { ...borderStyles };\n\tborderSides.forEach( ( side ) => {\n\t\tconst colorSlug = getColorSlugFromVariable(\n\t\t\thydratedBorderStyles[ side ]?.color\n\t\t);\n\t\tif ( colorSlug ) {\n\t\t\tconst { color } = getMultiOriginColor( {\n\t\t\t\tcolors,\n\t\t\t\tnamedColor: colorSlug,\n\t\t\t} );\n\t\t\thydratedBorderStyles[ side ] = {\n\t\t\t\t...hydratedBorderStyles[ side ],\n\t\t\t\tcolor,\n\t\t\t};\n\t\t}\n\t} );\n\n\treturn hydratedBorderStyles;\n};\n\nfunction getColorSlugFromVariable( value ) {\n\tconst namedColor = /var:preset\\|color\\|(.+)/.exec( value );\n\tif ( namedColor && namedColor[ 1 ] ) {\n\t\treturn namedColor[ 1 ];\n\t}\n\treturn null;\n}\n\nexport function BorderPanel( props ) {\n\tconst { attributes, clientId, setAttributes } = props;\n\tconst { style } = attributes;\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\n\tconst isSupported = hasBorderSupport( props.name );\n\tconst isColorSupported =\n\t\tuseSetting( 'border.color' ) && hasBorderSupport( props.name, 'color' );\n\tconst isRadiusSupported =\n\t\tuseSetting( 'border.radius' ) &&\n\t\thasBorderSupport( props.name, 'radius' );\n\tconst isStyleSupported =\n\t\tuseSetting( 'border.style' ) && hasBorderSupport( props.name, 'style' );\n\tconst isWidthSupported =\n\t\tuseSetting( 'border.width' ) && hasBorderSupport( props.name, 'width' );\n\n\tconst isDisabled = [\n\t\t! isColorSupported,\n\t\t! isRadiusSupported,\n\t\t! isStyleSupported,\n\t\t! isWidthSupported,\n\t].every( Boolean );\n\n\tif ( isDisabled || ! isSupported ) {\n\t\treturn null;\n\t}\n\n\tconst defaultBorderControls = getBlockSupport( props.name, [\n\t\tBORDER_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\tconst showBorderByDefault =\n\t\tdefaultBorderControls?.color || defaultBorderControls?.width;\n\n\tconst onBorderChange = ( newBorder ) => {\n\t\t// Filter out named colors and apply them to appropriate block\n\t\t// attributes so that CSS classes can be used to apply those colors.\n\t\t// e.g. has-primary-border-top-color.\n\n\t\tlet newBorderStyles = { ...newBorder };\n\t\tlet newBorderColor;\n\n\t\tif ( hasSplitBorders( newBorder ) ) {\n\t\t\t// For each side check if the side has a color value set\n\t\t\t// If so, determine if it belongs to a named color, in which case\n\t\t\t// we update the color property.\n\t\t\t//\n\t\t\t// This deliberately overwrites `newBorderStyles` to avoid mutating\n\t\t\t// the passed object which causes problems otherwise.\n\t\t\tnewBorderStyles = {\n\t\t\t\ttop: { ...newBorder.top },\n\t\t\t\tright: { ...newBorder.right },\n\t\t\t\tbottom: { ...newBorder.bottom },\n\t\t\t\tleft: { ...newBorder.left },\n\t\t\t};\n\n\t\t\tborderSides.forEach( ( side ) => {\n\t\t\t\tif ( newBorder[ side ]?.color ) {\n\t\t\t\t\tconst colorObject = getMultiOriginColor( {\n\t\t\t\t\t\tcolors,\n\t\t\t\t\t\tcustomColor: newBorder[ side ]?.color,\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( colorObject.slug ) {\n\t\t\t\t\t\tnewBorderStyles[\n\t\t\t\t\t\t\tside\n\t\t\t\t\t\t].color = `var:preset|color|${ colorObject.slug }`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t} else if ( newBorder?.color ) {\n\t\t\t// We have a flat border configuration. Apply named color slug to\n\t\t\t// `borderColor` attribute and clear color style property if found.\n\t\t\tconst customColor = newBorder?.color;\n\t\t\tconst colorObject = getMultiOriginColor( { colors, customColor } );\n\n\t\t\tif ( colorObject.slug ) {\n\t\t\t\tnewBorderColor = colorObject.slug;\n\t\t\t\tnewBorderStyles.color = undefined;\n\t\t\t}\n\t\t}\n\n\t\t// Ensure previous border radius styles are maintained and clean\n\t\t// overall result for empty objects or properties.\n\t\tconst newStyle = cleanEmptyObject( {\n\t\t\t...style,\n\t\t\tborder: { radius: style?.border?.radius, ...newBorderStyles },\n\t\t} );\n\n\t\tsetAttributes( {\n\t\t\tstyle: newStyle,\n\t\t\tborderColor: newBorderColor,\n\t\t} );\n\t};\n\n\tconst hydratedBorder = getBorderObject( attributes, colors );\n\n\treturn (\n\t\t<InspectorControls __experimentalGroup=\"border\">\n\t\t\t{ ( isWidthSupported || isColorSupported ) && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => hasBorderValue( props ) }\n\t\t\t\t\tlabel={ __( 'Border' ) }\n\t\t\t\t\tonDeselect={ () => resetBorder( props ) }\n\t\t\t\t\tisShownByDefault={ showBorderByDefault }\n\t\t\t\t\tresetAllFilter={ resetBorderFilter }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<BorderBoxControl\n\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\tenableAlpha={ true }\n\t\t\t\t\t\tenableStyle={ isStyleSupported }\n\t\t\t\t\t\tonChange={ onBorderChange }\n\t\t\t\t\t\tpopoverOffset={ 40 }\n\t\t\t\t\t\tpopoverPlacement=\"left-start\"\n\t\t\t\t\t\tvalue={ hydratedBorder }\n\t\t\t\t\t\t__experimentalHasMultipleOrigins={ true }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={ true }\n\t\t\t\t\t/>\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ isRadiusSupported && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => hasBorderRadiusValue( props ) }\n\t\t\t\t\tlabel={ __( 'Radius' ) }\n\t\t\t\t\tonDeselect={ () => resetBorderRadius( props ) }\n\t\t\t\t\tisShownByDefault={ defaultBorderControls?.radius }\n\t\t\t\t\tresetAllFilter={ ( newAttributes ) => ( {\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...newAttributes.style,\n\t\t\t\t\t\t\tborder: {\n\t\t\t\t\t\t\t\t...newAttributes.style?.border,\n\t\t\t\t\t\t\t\tradius: undefined,\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\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<BorderRadiusEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t</InspectorControls>\n\t);\n}\n\n/**\n * Determine whether there is block support for border properties.\n *\n * @param {string} blockName Block name.\n * @param {string} feature   Border feature to check support for.\n *\n * @return {boolean} Whether there is support.\n */\nexport function hasBorderSupport( blockName, feature = 'any' ) {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst support = getBlockSupport( blockName, BORDER_SUPPORT_KEY );\n\n\tif ( support === true ) {\n\t\treturn true;\n\t}\n\n\tif ( feature === 'any' ) {\n\t\treturn !! (\n\t\t\tsupport?.color ||\n\t\t\tsupport?.radius ||\n\t\t\tsupport?.width ||\n\t\t\tsupport?.style\n\t\t);\n\t}\n\n\treturn !! support?.[ feature ];\n}\n\n/**\n * Returns a new style object where the specified border attribute has been\n * removed.\n *\n * @param {Object} style     Styles from block attributes.\n * @param {string} attribute The border style attribute to clear.\n *\n * @return {Object} Style object with the specified attribute removed.\n */\nexport function removeBorderAttribute( style, attribute ) {\n\treturn cleanEmptyObject( {\n\t\t...style,\n\t\tborder: {\n\t\t\t...style?.border,\n\t\t\t[ attribute ]: undefined,\n\t\t},\n\t} );\n}\n\n/**\n * Filters registered block settings, extending attributes to include\n * `borderColor` if needed.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Updated block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBorderSupport( settings, 'color' ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify default value if needed.\n\tif ( settings.attributes.borderColor ) {\n\t\treturn settings;\n\t}\n\n\t// Add new borderColor attribute to block settings.\n\treturn {\n\t\t...settings,\n\t\tattributes: {\n\t\t\t...settings.attributes,\n\t\t\tborderColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t},\n\t};\n}\n\n/**\n * Override props assigned to save component to inject border color.\n *\n * @param {Object} props      Additional props applied to save element.\n * @param {Object} blockType  Block type definition.\n * @param {Object} attributes Block's attributes.\n *\n * @return {Object} Filtered props to apply to save element.\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif (\n\t\t! hasBorderSupport( blockType, 'color' ) ||\n\t\tshouldSkipSerialization( blockType, BORDER_SUPPORT_KEY, 'color' )\n\t) {\n\t\treturn props;\n\t}\n\n\tconst borderClasses = getBorderClasses( attributes );\n\tconst newClassName = classnames( props.className, borderClasses );\n\n\t// If we are clearing the last of the previous classes in `className`\n\t// set it to `undefined` to avoid rendering empty DOM attributes.\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Generates a CSS class name consisting of all the applicable border color\n * classes given the current block attributes.\n *\n * @param {Object} attributes Block's attributes.\n *\n * @return {string} CSS class name.\n */\nexport function getBorderClasses( attributes ) {\n\tconst { borderColor, style } = attributes;\n\tconst borderColorClass = getColorClassName( 'border-color', borderColor );\n\n\treturn classnames( {\n\t\t'has-border-color': borderColor || style?.border?.color,\n\t\t[ borderColorClass ]: !! borderColorClass,\n\t} );\n}\n\n/**\n * Filters the registered block settings to apply border color styles and\n * classnames to the block edit wrapper.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addEditProps( settings ) {\n\tif (\n\t\t! hasBorderSupport( settings, 'color' ) ||\n\t\tshouldSkipSerialization( settings, BORDER_SUPPORT_KEY, 'color' )\n\t) {\n\t\treturn settings;\n\t}\n\n\tconst existingGetEditWrapperProps = settings.getEditWrapperProps;\n\tsettings.getEditWrapperProps = ( attributes ) => {\n\t\tlet props = {};\n\n\t\tif ( existingGetEditWrapperProps ) {\n\t\t\tprops = existingGetEditWrapperProps( attributes );\n\t\t}\n\n\t\treturn addSaveProps( props, settings, attributes );\n\t};\n\n\treturn settings;\n}\n\n/**\n * This adds inline styles for color palette colors.\n * Ideally, this is not needed and themes should load their palettes on the editor.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withBorderColorPaletteStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { name, attributes } = props;\n\t\tconst { borderColor, style } = attributes;\n\t\tconst { colors } = useMultipleOriginColorsAndGradients();\n\n\t\tif (\n\t\t\t! hasBorderSupport( name, 'color' ) ||\n\t\t\tshouldSkipSerialization( name, BORDER_SUPPORT_KEY, 'color' )\n\t\t) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\n\t\tconst { color: borderColorValue } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\t\tconst { color: borderTopColor } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: getColorSlugFromVariable( style?.border?.top?.color ),\n\t\t} );\n\t\tconst { color: borderRightColor } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: getColorSlugFromVariable( style?.border?.right?.color ),\n\t\t} );\n\n\t\tconst { color: borderBottomColor } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: getColorSlugFromVariable(\n\t\t\t\tstyle?.border?.bottom?.color\n\t\t\t),\n\t\t} );\n\t\tconst { color: borderLeftColor } = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: getColorSlugFromVariable( style?.border?.left?.color ),\n\t\t} );\n\n\t\tconst extraStyles = {\n\t\t\tborderTopColor: borderTopColor || borderColorValue,\n\t\t\tborderRightColor: borderRightColor || borderColorValue,\n\t\t\tborderBottomColor: borderBottomColor || borderColorValue,\n\t\t\tborderLeftColor: borderLeftColor || borderColorValue,\n\t\t};\n\n\t\tlet wrapperProps = props.wrapperProps;\n\t\twrapperProps = {\n\t\t\t...props.wrapperProps,\n\t\t\tstyle: {\n\t\t\t\t...props.wrapperProps?.style,\n\t\t\t\t...extraStyles,\n\t\t\t},\n\t\t};\n\n\t\treturn <BlockListBlock { ...props } wrapperProps={ wrapperProps } />;\n\t}\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/border/addAttributes',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/border/addSaveProps',\n\taddSaveProps\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/border/addEditProps',\n\taddEditProps\n);\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/border/with-border-color-palette-styles',\n\twithBorderColorPaletteStyles\n);\n","/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit';\nimport useSetting from '../use-setting';\nimport { store as blockEditorStore } from '../../store';\n\nexport function __experimentalGetGradientClass( gradientSlug ) {\n\tif ( ! gradientSlug ) {\n\t\treturn undefined;\n\t}\n\treturn `has-${ gradientSlug }-gradient-background`;\n}\n\n/**\n * Retrieves the gradient value per slug.\n *\n * @param {Array}  gradients Gradient Palette\n * @param {string} slug      Gradient slug\n *\n * @return {string} Gradient value.\n */\nexport function getGradientValueBySlug( gradients, slug ) {\n\tconst gradient = find( gradients, [ 'slug', slug ] );\n\treturn gradient && gradient.gradient;\n}\n\nexport function __experimentalGetGradientObjectByGradientValue(\n\tgradients,\n\tvalue\n) {\n\tconst gradient = find( gradients, [ 'gradient', value ] );\n\treturn gradient;\n}\n\n/**\n * Retrieves the gradient slug per slug.\n *\n * @param {Array}  gradients Gradient Palette\n * @param {string} value     Gradient value\n * @return {string} Gradient slug.\n */\nexport function getGradientSlugByValue( gradients, value ) {\n\tconst gradient = __experimentalGetGradientObjectByGradientValue(\n\t\tgradients,\n\t\tvalue\n\t);\n\treturn gradient && gradient.slug;\n}\n\nexport function __experimentalUseGradient( {\n\tgradientAttribute = 'gradient',\n\tcustomGradientAttribute = 'customGradient',\n} = {} ) {\n\tconst { clientId } = useBlockEditContext();\n\n\tconst userGradientPalette = useSetting( 'color.gradients.custom' );\n\tconst themeGradientPalette = useSetting( 'color.gradients.theme' );\n\tconst defaultGradientPalette = useSetting( 'color.gradients.default' );\n\tconst allGradients = useMemo(\n\t\t() => [\n\t\t\t...( userGradientPalette || [] ),\n\t\t\t...( themeGradientPalette || [] ),\n\t\t\t...( defaultGradientPalette || [] ),\n\t\t],\n\t\t[ userGradientPalette, themeGradientPalette, defaultGradientPalette ]\n\t);\n\tconst { gradient, customGradient } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockAttributes } = select( blockEditorStore );\n\t\t\tconst attributes = getBlockAttributes( clientId ) || {};\n\t\t\treturn {\n\t\t\t\tcustomGradient: attributes[ customGradientAttribute ],\n\t\t\t\tgradient: attributes[ gradientAttribute ],\n\t\t\t};\n\t\t},\n\t\t[ clientId, gradientAttribute, customGradientAttribute ]\n\t);\n\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst setGradient = useCallback(\n\t\t( newGradientValue ) => {\n\t\t\tconst slug = getGradientSlugByValue(\n\t\t\t\tallGradients,\n\t\t\t\tnewGradientValue\n\t\t\t);\n\t\t\tif ( slug ) {\n\t\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t\t[ gradientAttribute ]: slug,\n\t\t\t\t\t[ customGradientAttribute ]: undefined,\n\t\t\t\t} );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tupdateBlockAttributes( clientId, {\n\t\t\t\t[ gradientAttribute ]: undefined,\n\t\t\t\t[ customGradientAttribute ]: newGradientValue,\n\t\t\t} );\n\t\t},\n\t\t[ allGradients, clientId, updateBlockAttributes ]\n\t);\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tlet gradientValue;\n\tif ( gradient ) {\n\t\tgradientValue = getGradientValueBySlug( allGradients, gradient );\n\t} else {\n\t\tgradientValue = customGradient;\n\t}\n\treturn { gradientClass, gradientValue, setGradient };\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { every, isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tBaseControl,\n\t__experimentalVStack as VStack,\n\tTabPanel,\n\tColorPalette,\n\tGradientPicker,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nconst colorsAndGradientKeys = [\n\t'colors',\n\t'disableCustomColors',\n\t'gradients',\n\t'disableCustomGradients',\n];\n\nconst TAB_COLOR = {\n\tname: 'color',\n\ttitle: 'Solid',\n\tvalue: 'color',\n};\nconst TAB_GRADIENT = {\n\tname: 'gradient',\n\ttitle: 'Gradient',\n\tvalue: 'gradient',\n};\n\nconst TABS_SETTINGS = [ TAB_COLOR, TAB_GRADIENT ];\n\nfunction ColorGradientControlInner( {\n\tcolors,\n\tgradients,\n\tdisableCustomColors,\n\tdisableCustomGradients,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n\tclassName,\n\tlabel,\n\tonColorChange,\n\tonGradientChange,\n\tcolorValue,\n\tgradientValue,\n\tclearable,\n\tshowTitle = true,\n\tenableAlpha,\n} ) {\n\tconst canChooseAColor =\n\t\tonColorChange && ( ! isEmpty( colors ) || ! disableCustomColors );\n\tconst canChooseAGradient =\n\t\tonGradientChange &&\n\t\t( ! isEmpty( gradients ) || ! disableCustomGradients );\n\n\tif ( ! canChooseAColor && ! canChooseAGradient ) {\n\t\treturn null;\n\t}\n\n\tconst tabPanels = {\n\t\t[ TAB_COLOR.value ]: (\n\t\t\t<ColorPalette\n\t\t\t\tvalue={ colorValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAGradient\n\t\t\t\t\t\t? ( newColor ) => {\n\t\t\t\t\t\t\t\tonColorChange( newColor );\n\t\t\t\t\t\t\t\tonGradientChange();\n\t\t\t\t\t\t  }\n\t\t\t\t\t\t: onColorChange\n\t\t\t\t}\n\t\t\t\t{ ...{ colors, disableCustomColors } }\n\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t}\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t/>\n\t\t),\n\t\t[ TAB_GRADIENT.value ]: (\n\t\t\t<GradientPicker\n\t\t\t\t__nextHasNoMargin\n\t\t\t\tvalue={ gradientValue }\n\t\t\t\tonChange={\n\t\t\t\t\tcanChooseAColor\n\t\t\t\t\t\t? ( newGradient ) => {\n\t\t\t\t\t\t\t\tonGradientChange( newGradient );\n\t\t\t\t\t\t\t\tonColorChange();\n\t\t\t\t\t\t  }\n\t\t\t\t\t\t: onGradientChange\n\t\t\t\t}\n\t\t\t\t{ ...{ gradients, disableCustomGradients } }\n\t\t\t\t__experimentalHasMultipleOrigins={\n\t\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t}\n\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t}\n\t\t\t\tclearable={ clearable }\n\t\t\t/>\n\t\t),\n\t};\n\n\tconst renderPanelType = ( type ) => (\n\t\t<div className=\"block-editor-color-gradient-control__panel\">\n\t\t\t{ tabPanels[ type ] }\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-color-gradient-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<fieldset className=\"block-editor-color-gradient-control__fieldset\">\n\t\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t\t{ showTitle && (\n\t\t\t\t\t\t<legend>\n\t\t\t\t\t\t\t<div className=\"block-editor-color-gradient-control__color-indicator\">\n\t\t\t\t\t\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</legend>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canChooseAColor && canChooseAGradient && (\n\t\t\t\t\t\t<TabPanel\n\t\t\t\t\t\t\tclassName=\"block-editor-color-gradient-control__tabs\"\n\t\t\t\t\t\t\ttabs={ TABS_SETTINGS }\n\t\t\t\t\t\t\tinitialTabName={\n\t\t\t\t\t\t\t\tgradientValue\n\t\t\t\t\t\t\t\t\t? TAB_GRADIENT.value\n\t\t\t\t\t\t\t\t\t: !! canChooseAColor && TAB_COLOR.value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( tab ) => renderPanelType( tab.value ) }\n\t\t\t\t\t\t</TabPanel>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canChooseAGradient &&\n\t\t\t\t\t\trenderPanelType( TAB_COLOR.value ) }\n\t\t\t\t\t{ ! canChooseAColor &&\n\t\t\t\t\t\trenderPanelType( TAB_GRADIENT.value ) }\n\t\t\t\t</VStack>\n\t\t\t</fieldset>\n\t\t</BaseControl>\n\t);\n}\n\nfunction ColorGradientControlSelect( props ) {\n\tconst colorGradientSettings = {};\n\tcolorGradientSettings.colors = useSetting( 'color.palette' );\n\tcolorGradientSettings.gradients = useSetting( 'color.gradients' );\n\tcolorGradientSettings.disableCustomColors = ! useSetting( 'color.custom' );\n\tcolorGradientSettings.disableCustomGradients = ! useSetting(\n\t\t'color.customGradient'\n\t);\n\n\treturn (\n\t\t<ColorGradientControlInner\n\t\t\t{ ...{ ...colorGradientSettings, ...props } }\n\t\t/>\n\t);\n}\n\nfunction ColorGradientControl( props ) {\n\tif (\n\t\tevery( colorsAndGradientKeys, ( key ) => props.hasOwnProperty( key ) )\n\t) {\n\t\treturn <ColorGradientControlInner { ...props } />;\n\t}\n\treturn <ColorGradientControlSelect { ...props } />;\n}\n\nexport default ColorGradientControl;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tColorIndicator,\n\tDropdown,\n\tFlexItem,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\t__experimentalHStack as HStack,\n\t__experimentalToolsPanelItem as ToolsPanelItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientControl from './control';\n\n// When the `ColorGradientSettingsDropdown` controls are being rendered to a\n// `ToolsPanel` they must be wrapped in a `ToolsPanelItem`.\nconst WithToolsPanelItem = ( { setting, children, panelId, ...props } ) => {\n\tconst clearValue = () => {\n\t\tif ( setting.colorValue ) {\n\t\t\tsetting.onColorChange();\n\t\t} else if ( setting.gradientValue ) {\n\t\t\tsetting.onGradientChange();\n\t\t}\n\t};\n\treturn (\n\t\t<ToolsPanelItem\n\t\t\thasValue={ () => {\n\t\t\t\treturn !! setting.colorValue || !! setting.gradientValue;\n\t\t\t} }\n\t\t\tlabel={ setting.label }\n\t\t\tonDeselect={ clearValue }\n\t\t\tisShownByDefault={\n\t\t\t\tsetting.isShownByDefault !== undefined\n\t\t\t\t\t? setting.isShownByDefault\n\t\t\t\t\t: true\n\t\t\t}\n\t\t\t{ ...props }\n\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__item\"\n\t\t\tpanelId={ panelId }\n\t\t\t// Pass resetAllFilter if supplied due to rendering via SlotFill\n\t\t\t// into parent ToolsPanel.\n\t\t\tresetAllFilter={ setting.resetAllFilter }\n\t\t>\n\t\t\t{ children }\n\t\t</ToolsPanelItem>\n\t);\n};\n\nconst LabeledColorIndicator = ( { colorValue, label } ) => (\n\t<HStack justify=\"flex-start\">\n\t\t<ColorIndicator\n\t\t\tclassName=\"block-editor-panel-color-gradient-settings__color-indicator\"\n\t\t\tcolorValue={ colorValue }\n\t\t/>\n\t\t<FlexItem\n\t\t\tclassName=\"block-editor-panel-color-gradient-settings__color-name\"\n\t\t\ttitle={ label }\n\t\t>\n\t\t\t{ label }\n\t\t</FlexItem>\n\t</HStack>\n);\n\n// Renders a color dropdown's toggle as an `Item` if it is within an `ItemGroup`\n// or as a `Button` if it isn't e.g. the controls are being rendered in\n// a `ToolsPanel`.\nconst renderToggle =\n\t( settings ) =>\n\t( { onToggle, isOpen } ) => {\n\t\tconst { colorValue, label } = settings;\n\n\t\tconst toggleProps = {\n\t\t\tonClick: onToggle,\n\t\t\tclassName: classnames(\n\t\t\t\t'block-editor-panel-color-gradient-settings__dropdown',\n\t\t\t\t{ 'is-open': isOpen }\n\t\t\t),\n\t\t\t'aria-expanded': isOpen,\n\t\t};\n\n\t\treturn (\n\t\t\t<Button { ...toggleProps }>\n\t\t\t\t<LabeledColorIndicator\n\t\t\t\t\tcolorValue={ colorValue }\n\t\t\t\t\tlabel={ label }\n\t\t\t\t/>\n\t\t\t</Button>\n\t\t);\n\t};\n\n// Renders a collection of color controls as dropdowns. Depending upon the\n// context in which these dropdowns are being rendered, they may be wrapped\n// in an `ItemGroup` with each dropdown's toggle as an `Item`, or alternatively,\n// the may be individually wrapped in a `ToolsPanelItem` with the toggle as\n// a regular `Button`.\n//\n// For more context see: https://github.com/WordPress/gutenberg/pull/40084\nexport default function ColorGradientSettingsDropdown( {\n\tcolors,\n\tdisableCustomColors,\n\tdisableCustomGradients,\n\tenableAlpha,\n\tgradients,\n\tsettings,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n\t...props\n} ) {\n\tlet popoverProps;\n\tif ( __experimentalIsRenderedInSidebar ) {\n\t\tpopoverProps = {\n\t\t\tplacement: 'left-start',\n\t\t\toffset: 36,\n\t\t\tshift: true,\n\t\t};\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{ settings.map( ( setting, index ) => {\n\t\t\t\tconst controlProps = {\n\t\t\t\t\tclearable: false,\n\t\t\t\t\tcolorValue: setting.colorValue,\n\t\t\t\t\tcolors,\n\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\tdisableCustomGradients,\n\t\t\t\t\tenableAlpha,\n\t\t\t\t\tgradientValue: setting.gradientValue,\n\t\t\t\t\tgradients,\n\t\t\t\t\tlabel: setting.label,\n\t\t\t\t\tonColorChange: setting.onColorChange,\n\t\t\t\t\tonGradientChange: setting.onGradientChange,\n\t\t\t\t\tshowTitle: false,\n\t\t\t\t\t__experimentalHasMultipleOrigins,\n\t\t\t\t\t__experimentalIsRenderedInSidebar,\n\t\t\t\t\t...setting,\n\t\t\t\t};\n\t\t\t\tconst toggleSettings = {\n\t\t\t\t\tcolorValue: setting.gradientValue ?? setting.colorValue,\n\t\t\t\t\tlabel: setting.label,\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\tsetting && (\n\t\t\t\t\t\t// If not in an `ItemGroup` wrap the dropdown in a\n\t\t\t\t\t\t// `ToolsPanelItem`\n\t\t\t\t\t\t<WithToolsPanelItem\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tsetting={ setting }\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Dropdown\n\t\t\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-tools-panel-color-gradient-settings__dropdown\"\n\t\t\t\t\t\t\t\trenderToggle={ renderToggle( toggleSettings ) }\n\t\t\t\t\t\t\t\trenderContent={ () => (\n\t\t\t\t\t\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"block-editor-panel-color-gradient-settings__dropdown-content\">\n\t\t\t\t\t\t\t\t\t\t\t<ColorGradientControl\n\t\t\t\t\t\t\t\t\t\t\t\t{ ...controlProps }\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</DropdownContentWrapper>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</WithToolsPanelItem>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport a11yPlugin from 'colord/plugins/a11y';\nimport namesPlugin from 'colord/plugins/names';\nimport { colord, extend } from 'colord';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Notice } from '@wordpress/components';\nimport { speak } from '@wordpress/a11y';\n\nextend( [ namesPlugin, a11yPlugin ] );\n\nfunction ContrastChecker( {\n\tbackgroundColor,\n\tfallbackBackgroundColor,\n\tfallbackTextColor,\n\tfallbackLinkColor,\n\tfontSize, // Font size value in pixels.\n\tisLargeText,\n\ttextColor,\n\tlinkColor,\n\tenableAlphaChecker = false,\n} ) {\n\tconst currentBackgroundColor = backgroundColor || fallbackBackgroundColor;\n\n\t// Must have a background color.\n\tif ( ! currentBackgroundColor ) {\n\t\treturn null;\n\t}\n\n\tconst currentTextColor = textColor || fallbackTextColor;\n\tconst currentLinkColor = linkColor || fallbackLinkColor;\n\n\t// Must have at least one text color.\n\tif ( ! currentTextColor && ! currentLinkColor ) {\n\t\treturn null;\n\t}\n\n\tconst textColors = [\n\t\t{\n\t\t\tcolor: currentTextColor,\n\t\t\tdescription: __( 'text color' ),\n\t\t},\n\t\t{\n\t\t\tcolor: currentLinkColor,\n\t\t\tdescription: __( 'link color' ),\n\t\t},\n\t];\n\tconst colordBackgroundColor = colord( currentBackgroundColor );\n\tconst backgroundColorHasTransparency = colordBackgroundColor.alpha() < 1;\n\tconst backgroundColorBrightness = colordBackgroundColor.brightness();\n\tconst isReadableOptions = {\n\t\tlevel: 'AA',\n\t\tsize:\n\t\t\tisLargeText || ( isLargeText !== false && fontSize >= 24 )\n\t\t\t\t? 'large'\n\t\t\t\t: 'small',\n\t};\n\n\tlet message = '';\n\tlet speakMessage = '';\n\tfor ( const item of textColors ) {\n\t\t// If there is no color, go no further.\n\t\tif ( ! item.color ) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst colordTextColor = colord( item.color );\n\t\tconst isColordTextReadable = colordTextColor.isReadable(\n\t\t\tcolordBackgroundColor,\n\t\t\tisReadableOptions\n\t\t);\n\t\tconst textHasTransparency = colordTextColor.alpha() < 1;\n\n\t\t// If the contrast is not readable.\n\t\tif ( ! isColordTextReadable ) {\n\t\t\t// Don't show the message if the background or text is transparent.\n\t\t\tif ( backgroundColorHasTransparency || textHasTransparency ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tmessage =\n\t\t\t\tbackgroundColorBrightness < colordTextColor.brightness()\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s is a type of text color, e.g., \"text color\" or \"link color\".\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'This color combination may be hard for people to read. Try using a darker background color and/or a brighter %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\titem.description\n\t\t\t\t\t  )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s is a type of text color, e.g., \"text color\" or \"link color\".\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'This color combination may be hard for people to read. Try using a brighter background color and/or a darker %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\titem.description\n\t\t\t\t\t  );\n\t\t\tspeakMessage = __(\n\t\t\t\t'This color combination may be hard for people to read.'\n\t\t\t);\n\t\t\t// Break from the loop when we have a contrast warning.\n\t\t\t// These messages take priority over the transparency warning.\n\t\t\tbreak;\n\t\t}\n\n\t\t// If there is no contrast warning and the text is transparent,\n\t\t// show the transparent warning if alpha check is enabled.\n\t\tif ( textHasTransparency && enableAlphaChecker ) {\n\t\t\tmessage = __( 'Transparent text may be hard for people to read.' );\n\t\t\tspeakMessage = __(\n\t\t\t\t'Transparent text may be hard for people to read.'\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( ! message ) {\n\t\treturn null;\n\t}\n\n\t// Note: The `Notice` component can speak messages via its `spokenMessage`\n\t// prop, but the contrast checker requires granular control over when the\n\t// announcements are made. Notably, the message will be re-announced if a\n\t// new color combination is selected and the contrast is still insufficient.\n\tspeak( speakMessage );\n\n\treturn (\n\t\t<div className=\"block-editor-contrast-checker\">\n\t\t\t<Notice\n\t\t\t\tspokenMessage={ null }\n\t\t\t\tstatus=\"warning\"\n\t\t\t\tisDismissible={ false }\n\t\t\t>\n\t\t\t\t{ message }\n\t\t\t</Notice>\n\t\t</div>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/contrast-checker/README.md\n */\nexport default ContrastChecker;\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientSettingsDropdown from '../components/colors-gradients/dropdown';\nimport ContrastChecker from '../components/contrast-checker';\nimport InspectorControls from '../components/inspector-controls';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\nimport { __unstableUseBlockRef as useBlockRef } from '../components/block-list/use-block-props/use-block-refs';\n\nfunction getComputedStyle( node ) {\n\treturn node.ownerDocument.defaultView.getComputedStyle( node );\n}\n\nexport default function ColorPanel( {\n\tenableAlpha = false,\n\tsettings,\n\tclientId,\n\tenableContrastChecking = true,\n} ) {\n\tconst [ detectedBackgroundColor, setDetectedBackgroundColor ] = useState();\n\tconst [ detectedColor, setDetectedColor ] = useState();\n\tconst [ detectedLinkColor, setDetectedLinkColor ] = useState();\n\tconst ref = useBlockRef( clientId );\n\tconst definedColors = settings.filter( ( setting ) => setting?.colorValue );\n\n\tuseEffect( () => {\n\t\tif ( ! enableContrastChecking || ! definedColors.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\t\tsetDetectedColor( getComputedStyle( ref.current ).color );\n\n\t\tconst firstLinkElement = ref.current?.querySelector( 'a' );\n\t\tif ( firstLinkElement && !! firstLinkElement.innerText ) {\n\t\t\tsetDetectedLinkColor( getComputedStyle( firstLinkElement ).color );\n\t\t}\n\n\t\tlet backgroundColorNode = ref.current;\n\t\tlet backgroundColor =\n\t\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\t\twhile (\n\t\t\tbackgroundColor === 'rgba(0, 0, 0, 0)' &&\n\t\t\tbackgroundColorNode.parentNode &&\n\t\t\tbackgroundColorNode.parentNode.nodeType ===\n\t\t\t\tbackgroundColorNode.parentNode.ELEMENT_NODE\n\t\t) {\n\t\t\tbackgroundColorNode = backgroundColorNode.parentNode;\n\t\t\tbackgroundColor =\n\t\t\t\tgetComputedStyle( backgroundColorNode ).backgroundColor;\n\t\t}\n\n\t\tsetDetectedBackgroundColor( backgroundColor );\n\t} );\n\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\n\treturn (\n\t\t<InspectorControls __experimentalGroup=\"color\">\n\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\tpanelId={ clientId }\n\t\t\t\tsettings={ settings }\n\t\t\t\t__experimentalIsItemGroup={ false }\n\t\t\t\t__experimentalHasMultipleOrigins\n\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t{ ...colorGradientSettings }\n\t\t\t/>\n\t\t\t{ enableContrastChecking && (\n\t\t\t\t<ContrastChecker\n\t\t\t\t\tbackgroundColor={ detectedBackgroundColor }\n\t\t\t\t\ttextColor={ detectedColor }\n\t\t\t\t\tenableAlphaChecker={ enableAlpha }\n\t\t\t\t\tlinkColor={ detectedLinkColor }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</InspectorControls>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useEffect, useMemo, Platform } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n\tgetGradientSlugByValue,\n} from '../components/gradients';\nimport {\n\tcleanEmptyObject,\n\ttransformStyles,\n\timmutableSet,\n\tshouldSkipSerialization,\n} from './utils';\nimport ColorPanel from './color-panel';\nimport useSetting from '../components/use-setting';\n\nexport const COLOR_SUPPORT_KEY = 'color';\n\nconst hasColorSupport = ( blockType ) => {\n\tconst colorSupport = getBlockSupport( blockType, COLOR_SUPPORT_KEY );\n\treturn (\n\t\tcolorSupport &&\n\t\t( colorSupport.link === true ||\n\t\t\tcolorSupport.gradient === true ||\n\t\t\tcolorSupport.background !== false ||\n\t\t\tcolorSupport.text !== false )\n\t);\n};\n\nconst hasLinkColorSupport = ( blockType ) => {\n\tif ( Platform.OS !== 'web' ) {\n\t\treturn false;\n\t}\n\n\tconst colorSupport = getBlockSupport( blockType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.link\n\t);\n};\n\nconst hasGradientSupport = ( blockType ) => {\n\tconst colorSupport = getBlockSupport( blockType, COLOR_SUPPORT_KEY );\n\n\treturn (\n\t\tcolorSupport !== null &&\n\t\ttypeof colorSupport === 'object' &&\n\t\t!! colorSupport.gradients\n\t);\n};\n\nconst hasBackgroundColorSupport = ( blockType ) => {\n\tconst colorSupport = getBlockSupport( blockType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.background !== false;\n};\n\nconst hasTextColorSupport = ( blockType ) => {\n\tconst colorSupport = getBlockSupport( blockType, COLOR_SUPPORT_KEY );\n\n\treturn colorSupport && colorSupport.text !== false;\n};\n\n/**\n * Clears a single color property from a style object.\n *\n * @param {Array}  path  Path to color property to clear within styles object.\n * @param {Object} style Block attributes style object.\n * @return {Object} Styles with the color property omitted.\n */\nconst clearColorFromStyles = ( path, style ) =>\n\tcleanEmptyObject( immutableSet( style, path, undefined ) );\n\n/**\n * Clears text color related properties from supplied attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Update block attributes with text color properties omitted.\n */\nconst resetAllTextFilter = ( attributes ) => ( {\n\ttextColor: undefined,\n\tstyle: clearColorFromStyles( [ 'color', 'text' ], attributes.style ),\n} );\n\n/**\n * Clears link color related properties from supplied attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Update block attributes with link color properties omitted.\n */\nconst resetAllLinkFilter = ( attributes ) => ( {\n\tstyle: clearColorFromStyles(\n\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\tattributes.style\n\t),\n} );\n\n/**\n * Clears all background color related properties including gradients from\n * supplied block attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Block attributes with background and gradient omitted.\n */\nconst clearBackgroundAndGradient = ( attributes ) => ( {\n\tbackgroundColor: undefined,\n\tgradient: undefined,\n\tstyle: {\n\t\t...attributes.style,\n\t\tcolor: {\n\t\t\t...attributes.style?.color,\n\t\t\tbackground: undefined,\n\t\t\tgradient: undefined,\n\t\t},\n\t},\n} );\n\n/**\n * Filters registered block settings, extending attributes to include\n * `backgroundColor` and `textColor` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasColorSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.backgroundColor ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tbackgroundColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\tif ( ! settings.attributes.textColor ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\ttextColor: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( hasGradientSupport( settings ) && ! settings.attributes.gradient ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tgradient: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject colors classnames.\n *\n * @param {Object} props      Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps( props, blockType, attributes ) {\n\tif (\n\t\t! hasColorSupport( blockType ) ||\n\t\tshouldSkipSerialization( blockType, COLOR_SUPPORT_KEY )\n\t) {\n\t\treturn props;\n\t}\n\n\tconst hasGradient = hasGradientSupport( blockType );\n\n\t// I'd have preferred to avoid the \"style\" attribute usage here\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\tconst shouldSerialize = ( feature ) =>\n\t\t! shouldSkipSerialization( blockType, COLOR_SUPPORT_KEY, feature );\n\n\t// Primary color classes must come before the `has-text-color`,\n\t// `has-background` and `has-link-color` classes to maintain backwards\n\t// compatibility and avoid block invalidations.\n\tconst textClass = shouldSerialize( 'text' )\n\t\t? getColorClassName( 'color', textColor )\n\t\t: undefined;\n\n\tconst gradientClass = shouldSerialize( 'gradients' )\n\t\t? __experimentalGetGradientClass( gradient )\n\t\t: undefined;\n\n\tconst backgroundClass = shouldSerialize( 'background' )\n\t\t? getColorClassName( 'background-color', backgroundColor )\n\t\t: undefined;\n\n\tconst serializeHasBackground =\n\t\tshouldSerialize( 'background' ) || shouldSerialize( 'gradients' );\n\tconst hasBackground =\n\t\tbackgroundColor ||\n\t\tstyle?.color?.background ||\n\t\t( hasGradient && ( gradient || style?.color?.gradient ) );\n\n\tconst newClassName = classnames(\n\t\tprops.className,\n\t\ttextClass,\n\t\tgradientClass,\n\t\t{\n\t\t\t// Don't apply the background class if there's a custom gradient.\n\t\t\t[ backgroundClass ]:\n\t\t\t\t( ! hasGradient || ! style?.color?.gradient ) &&\n\t\t\t\t!! backgroundClass,\n\t\t\t'has-text-color':\n\t\t\t\tshouldSerialize( 'text' ) &&\n\t\t\t\t( textColor || style?.color?.text ),\n\t\t\t'has-background': serializeHasBackground && hasBackground,\n\t\t\t'has-link-color':\n\t\t\t\tshouldSerialize( 'link' ) && style?.elements?.link?.color,\n\t\t}\n\t);\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Filters registered block settings to extend the block edit wrapper\n * to apply the desired styles and classnames properly.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addEditProps( settings ) {\n\tif (\n\t\t! hasColorSupport( settings ) ||\n\t\tshouldSkipSerialization( settings, COLOR_SUPPORT_KEY )\n\t) {\n\t\treturn settings;\n\t}\n\tconst existingGetEditWrapperProps = settings.getEditWrapperProps;\n\tsettings.getEditWrapperProps = ( attributes ) => {\n\t\tlet props = {};\n\t\tif ( existingGetEditWrapperProps ) {\n\t\t\tprops = existingGetEditWrapperProps( attributes );\n\t\t}\n\t\treturn addSaveProps( props, settings, attributes );\n\t};\n\n\treturn settings;\n}\n\nconst getLinkColorFromAttributeValue = ( colors, value ) => {\n\tconst attributeParsed = /var:preset\\|color\\|(.+)/.exec( value );\n\tif ( attributeParsed && attributeParsed[ 1 ] ) {\n\t\treturn getColorObjectByAttributeValues( colors, attributeParsed[ 1 ] )\n\t\t\t.color;\n\t}\n\treturn value;\n};\n\n/**\n * Inspector control panel containing the color related configuration\n *\n * @param {Object} props\n *\n * @return {WPElement} Color edit element.\n */\nexport function ColorEdit( props ) {\n\tconst { name: blockName, attributes } = props;\n\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\tconst userPalette = useSetting( 'color.palette.custom' );\n\tconst themePalette = useSetting( 'color.palette.theme' );\n\tconst defaultPalette = useSetting( 'color.palette.default' );\n\tconst allSolids = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst userGradientPalette = useSetting( 'color.gradients.custom' );\n\tconst themeGradientPalette = useSetting( 'color.gradients.theme' );\n\tconst defaultGradientPalette = useSetting( 'color.gradients.default' );\n\tconst allGradients = useMemo(\n\t\t() => [\n\t\t\t...( userGradientPalette || [] ),\n\t\t\t...( themeGradientPalette || [] ),\n\t\t\t...( defaultGradientPalette || [] ),\n\t\t],\n\t\t[ userGradientPalette, themeGradientPalette, defaultGradientPalette ]\n\t);\n\tconst areCustomSolidsEnabled = useSetting( 'color.custom' );\n\tconst areCustomGradientsEnabled = useSetting( 'color.customGradient' );\n\tconst isBackgroundEnabled = useSetting( 'color.background' );\n\tconst isLinkEnabled = useSetting( 'color.link' );\n\tconst isTextEnabled = useSetting( 'color.text' );\n\n\tconst solidsEnabled =\n\t\tareCustomSolidsEnabled || ! themePalette || themePalette?.length > 0;\n\n\tconst gradientsEnabled =\n\t\tareCustomGradientsEnabled ||\n\t\t! themeGradientPalette ||\n\t\tthemeGradientPalette?.length > 0;\n\n\t// Shouldn't be needed but right now the ColorGradientsPanel\n\t// can trigger both onChangeColor and onChangeBackground\n\t// synchronously causing our two callbacks to override changes\n\t// from each other.\n\tconst localAttributes = useRef( attributes );\n\tuseEffect( () => {\n\t\tlocalAttributes.current = attributes;\n\t}, [ attributes ] );\n\n\tif ( ! hasColorSupport( blockName ) ) {\n\t\treturn null;\n\t}\n\n\tconst hasLinkColor =\n\t\thasLinkColorSupport( blockName ) && isLinkEnabled && solidsEnabled;\n\tconst hasTextColor =\n\t\thasTextColorSupport( blockName ) && isTextEnabled && solidsEnabled;\n\tconst hasBackgroundColor =\n\t\thasBackgroundColorSupport( blockName ) &&\n\t\tisBackgroundEnabled &&\n\t\tsolidsEnabled;\n\tconst hasGradientColor =\n\t\thasGradientSupport( blockName ) && gradientsEnabled;\n\n\tif (\n\t\t! hasLinkColor &&\n\t\t! hasTextColor &&\n\t\t! hasBackgroundColor &&\n\t\t! hasGradientColor\n\t) {\n\t\treturn null;\n\t}\n\n\tconst { style, textColor, backgroundColor, gradient } = attributes;\n\tlet gradientValue;\n\tif ( hasGradientColor && gradient ) {\n\t\tgradientValue = getGradientValueBySlug( allGradients, gradient );\n\t} else if ( hasGradientColor ) {\n\t\tgradientValue = style?.color?.gradient;\n\t}\n\n\tconst onChangeColor = ( name ) => ( value ) => {\n\t\tconst colorObject = getColorObjectByColorValue( allSolids, value );\n\t\tconst attributeName = name + 'Color';\n\t\tconst newStyle = {\n\t\t\t...localAttributes.current.style,\n\t\t\tcolor: {\n\t\t\t\t...localAttributes.current?.style?.color,\n\t\t\t\t[ name ]: colorObject?.slug ? undefined : value,\n\t\t\t},\n\t\t};\n\n\t\tconst newNamedColor = colorObject?.slug ? colorObject.slug : undefined;\n\t\tconst newAttributes = {\n\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t[ attributeName ]: newNamedColor,\n\t\t};\n\n\t\tprops.setAttributes( newAttributes );\n\t\tlocalAttributes.current = {\n\t\t\t...localAttributes.current,\n\t\t\t...newAttributes,\n\t\t};\n\t};\n\n\tconst onChangeGradient = ( value ) => {\n\t\tconst slug = getGradientSlugByValue( allGradients, value );\n\t\tlet newAttributes;\n\t\tif ( slug ) {\n\t\t\tconst newStyle = {\n\t\t\t\t...localAttributes.current?.style,\n\t\t\t\tcolor: {\n\t\t\t\t\t...localAttributes.current?.style?.color,\n\t\t\t\t\tgradient: undefined,\n\t\t\t\t},\n\t\t\t};\n\t\t\tnewAttributes = {\n\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\tgradient: slug,\n\t\t\t};\n\t\t} else {\n\t\t\tconst newStyle = {\n\t\t\t\t...localAttributes.current?.style,\n\t\t\t\tcolor: {\n\t\t\t\t\t...localAttributes.current?.style?.color,\n\t\t\t\t\tgradient: value,\n\t\t\t\t},\n\t\t\t};\n\t\t\tnewAttributes = {\n\t\t\t\tstyle: cleanEmptyObject( newStyle ),\n\t\t\t\tgradient: undefined,\n\t\t\t};\n\t\t}\n\t\tprops.setAttributes( newAttributes );\n\t\tlocalAttributes.current = {\n\t\t\t...localAttributes.current,\n\t\t\t...newAttributes,\n\t\t};\n\t};\n\n\tconst onChangeLinkColor = ( value ) => {\n\t\tconst colorObject = getColorObjectByColorValue( allSolids, value );\n\t\tconst newLinkColorValue = colorObject?.slug\n\t\t\t? `var:preset|color|${ colorObject.slug }`\n\t\t\t: value;\n\n\t\tconst newStyle = cleanEmptyObject(\n\t\t\timmutableSet(\n\t\t\t\tlocalAttributes.current?.style,\n\t\t\t\t[ 'elements', 'link', 'color', 'text' ],\n\t\t\t\tnewLinkColorValue\n\t\t\t)\n\t\t);\n\t\tprops.setAttributes( { style: newStyle } );\n\t\tlocalAttributes.current = {\n\t\t\t...localAttributes.current,\n\t\t\t...{ style: newStyle },\n\t\t};\n\t};\n\n\tconst defaultColorControls = getBlockSupport( props.name, [\n\t\tCOLOR_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\tconst enableContrastChecking =\n\t\tPlatform.OS === 'web' &&\n\t\t! gradient &&\n\t\t! style?.color?.gradient &&\n\t\t// Contrast checking is enabled by default.\n\t\t// Deactivating it requires `enableContrastChecker` to have\n\t\t// an explicit value of `false`.\n\t\tfalse !==\n\t\t\tgetBlockSupport( props.name, [\n\t\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t\t'enableContrastChecker',\n\t\t\t] );\n\n\treturn (\n\t\t<ColorPanel\n\t\t\tenableContrastChecking={ enableContrastChecking }\n\t\t\tclientId={ props.clientId }\n\t\t\tenableAlpha={ true }\n\t\t\tsettings={ [\n\t\t\t\t...( hasTextColor\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Text' ),\n\t\t\t\t\t\t\t\tonColorChange: onChangeColor( 'text' ),\n\t\t\t\t\t\t\t\tcolorValue: getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\t\tallSolids,\n\t\t\t\t\t\t\t\t\ttextColor,\n\t\t\t\t\t\t\t\t\tstyle?.color?.text\n\t\t\t\t\t\t\t\t).color,\n\t\t\t\t\t\t\t\tisShownByDefault: defaultColorControls?.text,\n\t\t\t\t\t\t\t\tresetAllFilter: resetAllTextFilter,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t  ]\n\t\t\t\t\t: [] ),\n\t\t\t\t...( hasBackgroundColor || hasGradientColor\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Background' ),\n\t\t\t\t\t\t\t\tonColorChange: hasBackgroundColor\n\t\t\t\t\t\t\t\t\t? onChangeColor( 'background' )\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\tcolorValue: getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\t\tallSolids,\n\t\t\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t\t\t\tstyle?.color?.background\n\t\t\t\t\t\t\t\t).color,\n\t\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\t\tonGradientChange: hasGradientColor\n\t\t\t\t\t\t\t\t\t? onChangeGradient\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\tisShownByDefault:\n\t\t\t\t\t\t\t\t\tdefaultColorControls?.background,\n\t\t\t\t\t\t\t\tresetAllFilter: clearBackgroundAndGradient,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t  ]\n\t\t\t\t\t: [] ),\n\t\t\t\t...( hasLinkColor\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Link' ),\n\t\t\t\t\t\t\t\tonColorChange: onChangeLinkColor,\n\t\t\t\t\t\t\t\tcolorValue: getLinkColorFromAttributeValue(\n\t\t\t\t\t\t\t\t\tallSolids,\n\t\t\t\t\t\t\t\t\tstyle?.elements?.link?.color?.text\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tclearable:\n\t\t\t\t\t\t\t\t\t!! style?.elements?.link?.color?.text,\n\t\t\t\t\t\t\t\tisShownByDefault: defaultColorControls?.link,\n\t\t\t\t\t\t\t\tresetAllFilter: resetAllLinkFilter,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t  ]\n\t\t\t\t\t: [] ),\n\t\t\t] }\n\t\t/>\n\t);\n}\n\n/**\n * This adds inline styles for color palette colors.\n * Ideally, this is not needed and themes should load their palettes on the editor.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withColorPaletteStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { name, attributes } = props;\n\t\tconst { backgroundColor, textColor } = attributes;\n\t\tconst userPalette = useSetting( 'color.palette.custom' ) || [];\n\t\tconst themePalette = useSetting( 'color.palette.theme' ) || [];\n\t\tconst defaultPalette = useSetting( 'color.palette.default' ) || [];\n\t\tconst colors = useMemo(\n\t\t\t() => [\n\t\t\t\t...( userPalette || [] ),\n\t\t\t\t...( themePalette || [] ),\n\t\t\t\t...( defaultPalette || [] ),\n\t\t\t],\n\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t);\n\t\tif (\n\t\t\t! hasColorSupport( name ) ||\n\t\t\tshouldSkipSerialization( name, COLOR_SUPPORT_KEY )\n\t\t) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\t\tconst extraStyles = {};\n\n\t\tif (\n\t\t\ttextColor &&\n\t\t\t! shouldSkipSerialization( name, COLOR_SUPPORT_KEY, 'text' )\n\t\t) {\n\t\t\textraStyles.color = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\ttextColor\n\t\t\t)?.color;\n\t\t}\n\t\tif (\n\t\t\tbackgroundColor &&\n\t\t\t! shouldSkipSerialization( name, COLOR_SUPPORT_KEY, 'background' )\n\t\t) {\n\t\t\textraStyles.backgroundColor = getColorObjectByAttributeValues(\n\t\t\t\tcolors,\n\t\t\t\tbackgroundColor\n\t\t\t)?.color;\n\t\t}\n\n\t\tlet wrapperProps = props.wrapperProps;\n\t\twrapperProps = {\n\t\t\t...props.wrapperProps,\n\t\t\tstyle: {\n\t\t\t\t...extraStyles,\n\t\t\t\t...props.wrapperProps?.style,\n\t\t\t},\n\t\t};\n\n\t\treturn <BlockListBlock { ...props } wrapperProps={ wrapperProps } />;\n\t}\n);\n\nconst MIGRATION_PATHS = {\n\tlinkColor: [ [ 'style', 'elements', 'link', 'color', 'text' ] ],\n\ttextColor: [ [ 'textColor' ], [ 'style', 'color', 'text' ] ],\n\tbackgroundColor: [\n\t\t[ 'backgroundColor' ],\n\t\t[ 'style', 'color', 'background' ],\n\t],\n\tgradient: [ [ 'gradient' ], [ 'style', 'color', 'gradient' ] ],\n};\n\nexport function addTransforms( result, source, index, results ) {\n\tconst destinationBlockType = result.name;\n\tconst activeSupports = {\n\t\tlinkColor: hasLinkColorSupport( destinationBlockType ),\n\t\ttextColor: hasTextColorSupport( destinationBlockType ),\n\t\tbackgroundColor: hasBackgroundColorSupport( destinationBlockType ),\n\t\tgradient: hasGradientSupport( destinationBlockType ),\n\t};\n\treturn transformStyles(\n\t\tactiveSupports,\n\t\tMIGRATION_PATHS,\n\t\tresult,\n\t\tsource,\n\t\tindex,\n\t\tresults\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/color/addAttribute',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/color/addSaveProps',\n\taddSaveProps\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/color/addEditProps',\n\taddEditProps\n);\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/color/with-color-palette-styles',\n\twithColorPaletteStyles\n);\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/color/addTransforms',\n\taddTransforms\n);\n","/**\n * WordPress dependencies\n */\nimport { CustomSelectControl } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\n\nconst FONT_STYLES = [\n\t{\n\t\tname: _x( 'Regular', 'font style' ),\n\t\tvalue: 'normal',\n\t},\n\t{\n\t\tname: _x( 'Italic', 'font style' ),\n\t\tvalue: 'italic',\n\t},\n];\n\nconst FONT_WEIGHTS = [\n\t{\n\t\tname: _x( 'Thin', 'font weight' ),\n\t\tvalue: '100',\n\t},\n\t{\n\t\tname: _x( 'Extra Light', 'font weight' ),\n\t\tvalue: '200',\n\t},\n\t{\n\t\tname: _x( 'Light', 'font weight' ),\n\t\tvalue: '300',\n\t},\n\t{\n\t\tname: _x( 'Regular', 'font weight' ),\n\t\tvalue: '400',\n\t},\n\t{\n\t\tname: _x( 'Medium', 'font weight' ),\n\t\tvalue: '500',\n\t},\n\t{\n\t\tname: _x( 'Semi Bold', 'font weight' ),\n\t\tvalue: '600',\n\t},\n\t{\n\t\tname: _x( 'Bold', 'font weight' ),\n\t\tvalue: '700',\n\t},\n\t{\n\t\tname: _x( 'Extra Bold', 'font weight' ),\n\t\tvalue: '800',\n\t},\n\t{\n\t\tname: _x( 'Black', 'font weight' ),\n\t\tvalue: '900',\n\t},\n];\n\n/**\n * Adjusts font appearance field label in case either font styles or weights\n * are disabled.\n *\n * @param {boolean} hasFontStyles  Whether font styles are enabled and present.\n * @param {boolean} hasFontWeights Whether font weights are enabled and present.\n * @return {string} A label representing what font appearance is being edited.\n */\nexport const getFontAppearanceLabel = ( hasFontStyles, hasFontWeights ) => {\n\tif ( ! hasFontStyles ) {\n\t\treturn __( 'Font weight' );\n\t}\n\n\tif ( ! hasFontWeights ) {\n\t\treturn __( 'Font style' );\n\t}\n\n\treturn __( 'Appearance' );\n};\n\n/**\n * Control to display unified font style and weight options.\n *\n * @param {Object} props Component props.\n *\n * @return {WPElement} Font appearance control.\n */\nexport default function FontAppearanceControl( props ) {\n\tconst {\n\t\tonChange,\n\t\thasFontStyles = true,\n\t\thasFontWeights = true,\n\t\tvalue: { fontStyle, fontWeight },\n\t\t...otherProps\n\t} = props;\n\tconst hasStylesOrWeights = hasFontStyles || hasFontWeights;\n\tconst label = getFontAppearanceLabel( hasFontStyles, hasFontWeights );\n\tconst defaultOption = {\n\t\tkey: 'default',\n\t\tname: __( 'Default' ),\n\t\tstyle: { fontStyle: undefined, fontWeight: undefined },\n\t};\n\n\t// Combines both font style and weight options into a single dropdown.\n\tconst combineOptions = () => {\n\t\tconst combinedOptions = [ defaultOption ];\n\n\t\tFONT_STYLES.forEach( ( { name: styleName, value: styleValue } ) => {\n\t\t\tFONT_WEIGHTS.forEach(\n\t\t\t\t( { name: weightName, value: weightValue } ) => {\n\t\t\t\t\tconst optionName =\n\t\t\t\t\t\tstyleValue === 'normal'\n\t\t\t\t\t\t\t? weightName\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: 1: Font weight name. 2: Font style name. */\n\t\t\t\t\t\t\t\t\t__( '%1$s %2$s' ),\n\t\t\t\t\t\t\t\t\tweightName,\n\t\t\t\t\t\t\t\t\tstyleName\n\t\t\t\t\t\t\t  );\n\n\t\t\t\t\tcombinedOptions.push( {\n\t\t\t\t\t\tkey: `${ styleValue }-${ weightValue }`,\n\t\t\t\t\t\tname: optionName,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontStyle: styleValue,\n\t\t\t\t\t\t\tfontWeight: weightValue,\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 combinedOptions;\n\t};\n\n\t// Generates select options for font styles only.\n\tconst styleOptions = () => {\n\t\tconst combinedOptions = [ defaultOption ];\n\t\tFONT_STYLES.forEach( ( { name, value } ) => {\n\t\t\tcombinedOptions.push( {\n\t\t\t\tkey: value,\n\t\t\t\tname,\n\t\t\t\tstyle: { fontStyle: value, fontWeight: undefined },\n\t\t\t} );\n\t\t} );\n\t\treturn combinedOptions;\n\t};\n\n\t// Generates select options for font weights only.\n\tconst weightOptions = () => {\n\t\tconst combinedOptions = [ defaultOption ];\n\t\tFONT_WEIGHTS.forEach( ( { name, value } ) => {\n\t\t\tcombinedOptions.push( {\n\t\t\t\tkey: value,\n\t\t\t\tname,\n\t\t\t\tstyle: { fontStyle: undefined, fontWeight: value },\n\t\t\t} );\n\t\t} );\n\t\treturn combinedOptions;\n\t};\n\n\t// Map font styles and weights to select options.\n\tconst selectOptions = useMemo( () => {\n\t\tif ( hasFontStyles && hasFontWeights ) {\n\t\t\treturn combineOptions();\n\t\t}\n\n\t\treturn hasFontStyles ? styleOptions() : weightOptions();\n\t}, [ props.options ] );\n\n\t// Find current selection by comparing font style & weight against options,\n\t// and fall back to the Default option if there is no matching option.\n\tconst currentSelection =\n\t\tselectOptions.find(\n\t\t\t( option ) =>\n\t\t\t\toption.style.fontStyle === fontStyle &&\n\t\t\t\toption.style.fontWeight === fontWeight\n\t\t) || selectOptions[ 0 ];\n\n\t// Adjusts screen reader description based on styles or weights.\n\tconst getDescribedBy = () => {\n\t\tif ( ! currentSelection ) {\n\t\t\treturn __( 'No selected font appearance' );\n\t\t}\n\n\t\tif ( ! hasFontStyles ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: %s: Currently selected font weight.\n\t\t\t\t__( 'Currently selected font weight: %s' ),\n\t\t\t\tcurrentSelection.name\n\t\t\t);\n\t\t}\n\n\t\tif ( ! hasFontWeights ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: %s: Currently selected font style.\n\t\t\t\t__( 'Currently selected font style: %s' ),\n\t\t\t\tcurrentSelection.name\n\t\t\t);\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t// translators: %s: Currently selected font appearance.\n\t\t\t__( 'Currently selected font appearance: %s' ),\n\t\t\tcurrentSelection.name\n\t\t);\n\t};\n\n\treturn (\n\t\thasStylesOrWeights && (\n\t\t\t<CustomSelectControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\tclassName=\"components-font-appearance-control\"\n\t\t\t\tlabel={ label }\n\t\t\t\tdescribedBy={ getDescribedBy() }\n\t\t\t\toptions={ selectOptions }\n\t\t\t\tvalue={ currentSelection }\n\t\t\t\tonChange={ ( { selectedItem } ) =>\n\t\t\t\t\tonChange( selectedItem.style )\n\t\t\t\t}\n\t\t\t\t__nextUnconstrainedWidth\n\t\t\t/>\n\t\t)\n\t);\n}\n","export const BASE_DEFAULT_VALUE = 1.5;\nexport const STEP = 0.1;\n/**\n * There are varying value types within LineHeightControl:\n *\n * {undefined} Initial value. No changes from the user.\n * {string} Input value. Value consumed/outputted by the input. Empty would be ''.\n * {number} Block attribute type. Input value needs to be converted for attribute setting.\n *\n * Note: If the value is undefined, the input requires it to be an empty string ('')\n * in order to be considered \"controlled\" by props (rather than internal state).\n */\nexport const RESET_VALUE = '';\n\n/**\n * Determines if the lineHeight attribute has been properly defined.\n *\n * @param {any} lineHeight The value to check.\n *\n * @return {boolean} Whether the lineHeight attribute is valid.\n */\nexport function isLineHeightDefined( lineHeight ) {\n\treturn lineHeight !== undefined && lineHeight !== RESET_VALUE;\n}\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalNumberControl as NumberControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBASE_DEFAULT_VALUE,\n\tRESET_VALUE,\n\tSTEP,\n\tisLineHeightDefined,\n} from './utils';\n\nconst LineHeightControl = ( {\n\tvalue: lineHeight,\n\tonChange,\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMarginBottom = false,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) => {\n\tconst isDefined = isLineHeightDefined( lineHeight );\n\n\tconst adjustNextValue = ( nextValue, wasTypedOrPasted ) => {\n\t\t// Set the next value without modification if lineHeight has been defined.\n\t\tif ( isDefined ) return nextValue;\n\n\t\t/**\n\t\t * The following logic handles the initial step up/down action\n\t\t * (from an undefined value state) so that the next values are better suited for\n\t\t * line-height rendering. For example, the first step up should immediately\n\t\t * go to 1.6, rather than the normally expected 0.1.\n\t\t *\n\t\t * Step up/down actions can be triggered by keydowns of the up/down arrow keys,\n\t\t * or by clicking the spin buttons.\n\t\t */\n\t\tswitch ( `${ nextValue }` ) {\n\t\t\tcase `${ STEP }`:\n\t\t\t\t// Increment by step value.\n\t\t\t\treturn BASE_DEFAULT_VALUE + STEP;\n\t\t\tcase '0': {\n\t\t\t\t// This means the user explicitly input '0', rather than stepped down\n\t\t\t\t// from an undefined value state.\n\t\t\t\tif ( wasTypedOrPasted ) return nextValue;\n\t\t\t\t// Decrement by step value.\n\t\t\t\treturn BASE_DEFAULT_VALUE - STEP;\n\t\t\t}\n\t\t\tcase '':\n\t\t\t\treturn BASE_DEFAULT_VALUE;\n\t\t\tdefault:\n\t\t\t\treturn nextValue;\n\t\t}\n\t};\n\n\tconst stateReducer = ( state, action ) => {\n\t\t// Be careful when changing this — cross-browser behavior of the\n\t\t// `inputType` field in `input` events are inconsistent.\n\t\t// For example, Firefox emits an input event with inputType=\"insertReplacementText\"\n\t\t// on spin button clicks, while other browsers do not even emit an input event.\n\t\tconst wasTypedOrPasted = [ 'insertText', 'insertFromPaste' ].includes(\n\t\t\taction.payload.event.nativeEvent?.inputType\n\t\t);\n\t\tconst value = adjustNextValue( state.value, wasTypedOrPasted );\n\t\treturn { ...state, value };\n\t};\n\n\tconst value = isDefined ? lineHeight : RESET_VALUE;\n\n\tif ( ! __nextHasNoMarginBottom ) {\n\t\tdeprecated(\n\t\t\t'Bottom margin styles for wp.blockEditor.LineHeightControl',\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\tversion: '6.4',\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\tconst deprecatedStyles = __nextHasNoMarginBottom\n\t\t? undefined\n\t\t: { marginBottom: 24 };\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"block-editor-line-height-control\"\n\t\t\tstyle={ deprecatedStyles }\n\t\t>\n\t\t\t<NumberControl\n\t\t\t\t{ ...otherProps }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\t__unstableStateReducer={ stateReducer }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tlabel={ __( 'Line height' ) }\n\t\t\t\tplaceholder={ BASE_DEFAULT_VALUE }\n\t\t\t\tstep={ STEP }\n\t\t\t\tvalue={ value }\n\t\t\t\tmin={ 0 }\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/line-height-control/README.md\n */\nexport default LineHeightControl;\n","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport LineHeightControl from '../components/line-height-control';\nimport { cleanEmptyObject } from './utils';\nimport useSetting from '../components/use-setting';\n\nexport const LINE_HEIGHT_SUPPORT_KEY = 'typography.lineHeight';\n\n/**\n * Inspector control panel containing the line height related configuration\n *\n * @param {Object} props\n *\n * @return {WPElement} Line height edit element.\n */\nexport function LineHeightEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst onChange = ( newLineHeightValue ) => {\n\t\tconst newStyle = {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tlineHeight: newLineHeightValue,\n\t\t\t},\n\t\t};\n\n\t\tsetAttributes( { style: cleanEmptyObject( newStyle ) } );\n\t};\n\treturn (\n\t\t<LineHeightControl\n\t\t\t__unstableInputWidth=\"100%\"\n\t\t\t__nextHasNoMarginBottom={ true }\n\t\t\tvalue={ style?.typography?.lineHeight }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if line-height settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsLineHeightDisabled( { name: blockName } = {} ) {\n\tconst isDisabled = ! useSetting( 'typography.lineHeight' );\n\n\treturn (\n\t\t! hasBlockSupport( blockName, LINE_HEIGHT_SUPPORT_KEY ) || isDisabled\n\t);\n}\n\n/**\n * Checks if there is a current value set for the line height block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a line height value set.\n */\nexport function hasLineHeightValue( props ) {\n\treturn !! props.attributes.style?.typography?.lineHeight;\n}\n\n/**\n * Resets the line height block support attribute. This can be used when\n * disabling the line height support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetLineHeight( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tlineHeight: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport FontAppearanceControl from '../components/font-appearance-control';\nimport useSetting from '../components/use-setting';\nimport { cleanEmptyObject } from './utils';\n\n/**\n * Key within block settings' support array indicating support for font style.\n */\nexport const FONT_STYLE_SUPPORT_KEY = 'typography.__experimentalFontStyle';\n\n/**\n * Key within block settings' support array indicating support for font weight.\n */\nexport const FONT_WEIGHT_SUPPORT_KEY = 'typography.__experimentalFontWeight';\n\n/**\n * Inspector control panel containing the font appearance options.\n *\n * @param {Object} props Block properties.\n *\n * @return {WPElement} Font appearance edit element.\n */\nexport function FontAppearanceEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tconst hasFontStyles = ! useIsFontStyleDisabled( props );\n\tconst hasFontWeights = ! useIsFontWeightDisabled( props );\n\n\tconst onChange = ( newStyles ) => {\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\tfontStyle: newStyles.fontStyle,\n\t\t\t\t\tfontWeight: newStyles.fontWeight,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} );\n\t};\n\n\tconst fontStyle = style?.typography?.fontStyle;\n\tconst fontWeight = style?.typography?.fontWeight;\n\n\treturn (\n\t\t<FontAppearanceControl\n\t\t\tonChange={ onChange }\n\t\t\thasFontStyles={ hasFontStyles }\n\t\t\thasFontWeights={ hasFontWeights }\n\t\t\tvalue={ { fontStyle, fontWeight } }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Checks if font style support has been disabled either by not opting in for\n * support or by failing to provide preset styles.\n *\n * @param {Object} props      Block properties.\n * @param {string} props.name Name for the block type.\n *\n * @return {boolean} Whether font style support has been disabled.\n */\nexport function useIsFontStyleDisabled( { name: blockName } = {} ) {\n\tconst styleSupport = hasBlockSupport( blockName, FONT_STYLE_SUPPORT_KEY );\n\tconst hasFontStyles = useSetting( 'typography.fontStyle' );\n\n\treturn ! styleSupport || ! hasFontStyles;\n}\n\n/**\n * Checks if font weight support has been disabled either by not opting in for\n * support or by failing to provide preset weights.\n *\n * @param {Object} props      Block properties.\n * @param {string} props.name Name for the block type.\n *\n * @return {boolean} Whether font weight support has been disabled.\n */\nexport function useIsFontWeightDisabled( { name: blockName } = {} ) {\n\tconst weightSupport = hasBlockSupport( blockName, FONT_WEIGHT_SUPPORT_KEY );\n\tconst hasFontWeights = useSetting( 'typography.fontWeight' );\n\n\treturn ! weightSupport || ! hasFontWeights;\n}\n\n/**\n * Checks if font appearance support has been disabled.\n *\n * @param {Object} props Block properties.\n *\n * @return {boolean} Whether font appearance support has been disabled.\n */\nexport function useIsFontAppearanceDisabled( props ) {\n\tconst stylesDisabled = useIsFontStyleDisabled( props );\n\tconst weightsDisabled = useIsFontWeightDisabled( props );\n\n\treturn stylesDisabled && weightsDisabled;\n}\n\n/**\n * Checks if there is either a font style or weight value set within the\n * typography styles.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a font style or weight.\n */\nexport function hasFontAppearanceValue( props ) {\n\tconst { fontStyle, fontWeight } = props.attributes.style?.typography || {};\n\treturn !! fontStyle || !! fontWeight;\n}\n\n/**\n * Resets the font style and weight block support attributes. This can be used\n * when disabling the font appearance support controls for a block via a\n * progressive discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetFontAppearance( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tfontStyle: undefined,\n\t\t\t\tfontWeight: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default function FontFamilyControl( {\n\tvalue = '',\n\tonChange,\n\tfontFamilies,\n\t...props\n} ) {\n\tconst blockLevelFontFamilies = useSetting( 'typography.fontFamilies' );\n\tif ( ! fontFamilies ) {\n\t\tfontFamilies = blockLevelFontFamilies;\n\t}\n\n\tif ( isEmpty( fontFamilies ) ) {\n\t\treturn null;\n\t}\n\n\tconst options = [\n\t\t{ value: '', label: __( 'Default' ) },\n\t\t...fontFamilies.map( ( { fontFamily, name } ) => {\n\t\t\treturn {\n\t\t\t\tvalue: fontFamily,\n\t\t\t\tlabel: name || fontFamily,\n\t\t\t};\n\t\t} ),\n\t];\n\treturn (\n\t\t<SelectControl\n\t\t\tlabel={ __( 'Font' ) }\n\t\t\toptions={ options }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tlabelPosition=\"top\"\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../components/use-setting';\nimport FontFamilyControl from '../components/font-family';\nimport { shouldSkipSerialization } from './utils';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\n\nexport const FONT_FAMILY_SUPPORT_KEY = 'typography.__experimentalFontFamily';\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `fontFamily` attribute.\n *\n * @param {Object} settings Original block settings\n * @return {Object}         Filtered block settings\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontFamily ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontFamily: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font family.\n *\n * @param {Object} props      Additional props applied to save element\n * @param {Object} blockType  Block type\n * @param {Object} attributes Block attributes\n * @return {Object}           Filtered props applied to save element\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization(\n\t\t\tblockType,\n\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t'fontFamily'\n\t\t)\n\t) {\n\t\treturn props;\n\t}\n\n\tif ( ! attributes?.fontFamily ) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( `has-${ kebabCase( attributes?.fontFamily ) }-font-family` );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Filters registered block settings to expand the block edit wrapper\n * by applying the desired styles and classnames.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addEditProps( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_FAMILY_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\tconst existingGetEditWrapperProps = settings.getEditWrapperProps;\n\tsettings.getEditWrapperProps = ( attributes ) => {\n\t\tlet props = {};\n\t\tif ( existingGetEditWrapperProps ) {\n\t\t\tprops = existingGetEditWrapperProps( attributes );\n\t\t}\n\t\treturn addSaveProps( props, settings, attributes );\n\t};\n\n\treturn settings;\n}\n\nexport function FontFamilyEdit( {\n\tsetAttributes,\n\tattributes: { fontFamily },\n} ) {\n\tconst fontFamilies = useSetting( 'typography.fontFamilies' );\n\n\tconst value = find(\n\t\tfontFamilies,\n\t\t( { slug } ) => fontFamily === slug\n\t)?.fontFamily;\n\n\tfunction onChange( newValue ) {\n\t\tconst predefinedFontFamily = find(\n\t\t\tfontFamilies,\n\t\t\t( { fontFamily: f } ) => f === newValue\n\t\t);\n\t\tsetAttributes( {\n\t\t\tfontFamily: predefinedFontFamily?.slug,\n\t\t} );\n\t}\n\n\treturn (\n\t\t<FontFamilyControl\n\t\t\tclassName=\"block-editor-hooks-font-family-control\"\n\t\t\tfontFamilies={ fontFamilies }\n\t\t\tvalue={ value }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\n/**\n * Custom hook that checks if font-family functionality is disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsFontFamilyDisabled( { name } ) {\n\tconst fontFamilies = useSetting( 'typography.fontFamilies' );\n\treturn (\n\t\t! fontFamilies ||\n\t\tfontFamilies.length === 0 ||\n\t\t! hasBlockSupport( name, FONT_FAMILY_SUPPORT_KEY )\n\t);\n}\n\n/**\n * Checks if there is a current value set for the font family block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a font family value set.\n */\nexport function hasFontFamilyValue( props ) {\n\treturn !! props.attributes.fontFamily;\n}\n\n/**\n * Resets the font family block support attribute. This can be used when\n * disabling the font family support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetFontFamily( { setAttributes } ) {\n\tsetAttributes( { fontFamily: undefined } );\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fontFamily/addAttribute',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/fontFamily/addSaveProps',\n\taddSaveProps\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/fontFamily/addEditProps',\n\taddEditProps\n);\n","/**\n * External dependencies\n */\nimport { find, kebabCase } from 'lodash';\n\n/**\n *  Returns the font size object based on an array of named font sizes and the namedFontSize and customFontSize values.\n * \tIf namedFontSize is undefined or not found in fontSizes an object with just the size value based on customFontSize is returned.\n *\n * @param {Array}   fontSizes               Array of font size objects containing at least the \"name\" and \"size\" values as properties.\n * @param {?string} fontSizeAttribute       Content of the font size attribute (slug).\n * @param {?number} customFontSizeAttribute Contents of the custom font size attribute (value).\n *\n * @return {?Object} If fontSizeAttribute is set and an equal slug is found in fontSizes it returns the font size object for that slug.\n * \t\t\t\t\t Otherwise, an object with just the size value based on customFontSize is returned.\n */\nexport const getFontSize = (\n\tfontSizes,\n\tfontSizeAttribute,\n\tcustomFontSizeAttribute\n) => {\n\tif ( fontSizeAttribute ) {\n\t\tconst fontSizeObject = find( fontSizes, { slug: fontSizeAttribute } );\n\t\tif ( fontSizeObject ) {\n\t\t\treturn fontSizeObject;\n\t\t}\n\t}\n\treturn {\n\t\tsize: customFontSizeAttribute,\n\t};\n};\n\n/**\n * Returns the corresponding font size object for a given value.\n *\n * @param {Array}  fontSizes Array of font size objects.\n * @param {number} value     Font size value.\n *\n * @return {Object} Font size object.\n */\nexport function getFontSizeObjectByValue( fontSizes, value ) {\n\tconst fontSizeObject = find( fontSizes, { size: value } );\n\tif ( fontSizeObject ) {\n\t\treturn fontSizeObject;\n\t}\n\n\treturn {\n\t\tsize: value,\n\t};\n}\n\n/**\n * Returns a class based on fontSizeName.\n *\n * @param {string} fontSizeSlug Slug of the fontSize.\n *\n * @return {string} String with the class corresponding to the fontSize passed.\n *                  The class is generated by appending 'has-' followed by fontSizeSlug in kebabCase and ending with '-font-size'.\n */\nexport function getFontSizeClass( fontSizeSlug ) {\n\tif ( ! fontSizeSlug ) {\n\t\treturn;\n\t}\n\n\treturn `has-${ kebabCase( fontSizeSlug ) }-font-size`;\n}\n","/**\n * WordPress dependencies\n */\nimport { FontSizePicker as BaseFontSizePicker } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nfunction FontSizePicker( props ) {\n\tconst fontSizes = useSetting( 'typography.fontSizes' );\n\tconst disableCustomFontSizes = ! useSetting( 'typography.customFontSize' );\n\n\treturn (\n\t\t<BaseFontSizePicker\n\t\t\t{ ...props }\n\t\t\tfontSizes={ fontSizes }\n\t\t\tdisableCustomFontSizes={ disableCustomFontSizes }\n\t\t/>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/font-sizes/README.md\n */\nexport default FontSizePicker;\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport TokenList from '@wordpress/token-list';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetFontSize,\n\tgetFontSizeClass,\n\tgetFontSizeObjectByValue,\n\tFontSizePicker,\n} from '../components/font-sizes';\nimport { TYPOGRAPHY_SUPPORT_KEY } from './typography';\nimport {\n\tcleanEmptyObject,\n\ttransformStyles,\n\tshouldSkipSerialization,\n} from './utils';\nimport useSetting from '../components/use-setting';\n\nexport const FONT_SIZE_SUPPORT_KEY = 'typography.fontSize';\n\n/**\n * Filters registered block settings, extending attributes to include\n * `fontSize` and `fontWeight` attributes.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify a default value if needed.\n\tif ( ! settings.attributes.fontSize ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tfontSize: {\n\t\t\t\ttype: 'string',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override props assigned to save component to inject font size.\n *\n * @param {Object} props      Additional props applied to save element.\n * @param {Object} blockType  Block type.\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Filtered props applied to save element.\n */\nfunction addSaveProps( props, blockType, attributes ) {\n\tif ( ! hasBlockSupport( blockType, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn props;\n\t}\n\n\tif (\n\t\tshouldSkipSerialization( blockType, TYPOGRAPHY_SUPPORT_KEY, 'fontSize' )\n\t) {\n\t\treturn props;\n\t}\n\n\t// Use TokenList to dedupe classes.\n\tconst classes = new TokenList( props.className );\n\tclasses.add( getFontSizeClass( attributes.fontSize ) );\n\tconst newClassName = classes.value;\n\tprops.className = newClassName ? newClassName : undefined;\n\n\treturn props;\n}\n\n/**\n * Filters registered block settings to expand the block edit wrapper\n * by applying the desired styles and classnames.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addEditProps( settings ) {\n\tif ( ! hasBlockSupport( settings, FONT_SIZE_SUPPORT_KEY ) ) {\n\t\treturn settings;\n\t}\n\n\tconst existingGetEditWrapperProps = settings.getEditWrapperProps;\n\tsettings.getEditWrapperProps = ( attributes ) => {\n\t\tlet props = {};\n\t\tif ( existingGetEditWrapperProps ) {\n\t\t\tprops = existingGetEditWrapperProps( attributes );\n\t\t}\n\t\treturn addSaveProps( props, settings, attributes );\n\t};\n\n\treturn settings;\n}\n\n/**\n * Inspector control panel containing the font size related configuration\n *\n * @param {Object} props\n *\n * @return {WPElement} Font size edit element.\n */\nexport function FontSizeEdit( props ) {\n\tconst {\n\t\tattributes: { fontSize, style },\n\t\tsetAttributes,\n\t} = props;\n\tconst fontSizes = useSetting( 'typography.fontSizes' );\n\n\tconst onChange = ( value ) => {\n\t\tconst fontSizeSlug = getFontSizeObjectByValue( fontSizes, value ).slug;\n\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\tfontSize: fontSizeSlug ? undefined : value,\n\t\t\t\t},\n\t\t\t} ),\n\t\t\tfontSize: fontSizeSlug,\n\t\t} );\n\t};\n\n\tconst fontSizeObject = getFontSize(\n\t\tfontSizes,\n\t\tfontSize,\n\t\tstyle?.typography?.fontSize\n\t);\n\n\tconst fontSizeValue =\n\t\tfontSizeObject?.size || style?.typography?.fontSize || fontSize;\n\n\treturn (\n\t\t<FontSizePicker\n\t\t\tonChange={ onChange }\n\t\t\tvalue={ fontSizeValue }\n\t\t\twithReset={ false }\n\t\t\tsize=\"__unstable-large\"\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n\n/**\n * Checks if there is a current value set for the font size block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a font size value set.\n */\nexport function hasFontSizeValue( props ) {\n\tconst { fontSize, style } = props.attributes;\n\treturn !! fontSize || !! style?.typography?.fontSize;\n}\n\n/**\n * Resets the font size block support attribute. This can be used when\n * disabling the font size support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetFontSize( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tfontSize: undefined,\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tfontSize: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n\n/**\n * Custom hook that checks if font-size settings have been disabled.\n *\n * @param {string} name The name of the block.\n * @return {boolean} Whether setting is disabled.\n */\nexport function useIsFontSizeDisabled( { name: blockName } = {} ) {\n\tconst fontSizes = useSetting( 'typography.fontSizes' );\n\tconst hasFontSizes = !! fontSizes?.length;\n\n\treturn (\n\t\t! hasBlockSupport( blockName, FONT_SIZE_SUPPORT_KEY ) || ! hasFontSizes\n\t);\n}\n\n/**\n * Add inline styles for font sizes.\n * Ideally, this is not needed and themes load the font-size classes on the\n * editor.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nconst withFontSizeInlineStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst fontSizes = useSetting( 'typography.fontSizes' );\n\t\tconst {\n\t\t\tname: blockName,\n\t\t\tattributes: { fontSize, style },\n\t\t\twrapperProps,\n\t\t} = props;\n\n\t\t// Only add inline styles if the block supports font sizes,\n\t\t// doesn't skip serialization of font sizes,\n\t\t// doesn't already have an inline font size,\n\t\t// and does have a class to extract the font size from.\n\t\tif (\n\t\t\t! hasBlockSupport( blockName, FONT_SIZE_SUPPORT_KEY ) ||\n\t\t\tshouldSkipSerialization(\n\t\t\t\tblockName,\n\t\t\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t\t\t'fontSize'\n\t\t\t) ||\n\t\t\t! fontSize ||\n\t\t\tstyle?.typography?.fontSize\n\t\t) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\n\t\tconst fontSizeValue = getFontSize(\n\t\t\tfontSizes,\n\t\t\tfontSize,\n\t\t\tstyle?.typography?.fontSize\n\t\t).size;\n\n\t\tconst newProps = {\n\t\t\t...props,\n\t\t\twrapperProps: {\n\t\t\t\t...wrapperProps,\n\t\t\t\tstyle: {\n\t\t\t\t\tfontSize: fontSizeValue,\n\t\t\t\t\t...wrapperProps?.style,\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\n\t\treturn <BlockListBlock { ...newProps } />;\n\t},\n\t'withFontSizeInlineStyles'\n);\n\nconst MIGRATION_PATHS = {\n\tfontSize: [ [ 'fontSize' ], [ 'style', 'typography', 'fontSize' ] ],\n};\n\nexport function addTransforms( result, source, index, results ) {\n\tconst destinationBlockType = result.name;\n\tconst activeSupports = {\n\t\tfontSize: hasBlockSupport(\n\t\t\tdestinationBlockType,\n\t\t\tFONT_SIZE_SUPPORT_KEY\n\t\t),\n\t};\n\treturn transformStyles(\n\t\tactiveSupports,\n\t\tMIGRATION_PATHS,\n\t\tresult,\n\t\tsource,\n\t\tindex,\n\t\tresults\n\t);\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/font/addAttribute',\n\taddAttributes\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/font/addSaveProps',\n\taddSaveProps\n);\n\naddFilter( 'blocks.registerBlockType', 'core/font/addEditProps', addEditProps );\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/font-size/with-font-size-inline-styles',\n\twithFontSizeInlineStyles\n);\n\naddFilter(\n\t'blocks.switchToBlockType.transformedBlock',\n\t'core/font-size/addTransforms',\n\taddTransforms\n);\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst reset = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 11.5h10V13H7z\" />\n\t</SVG>\n);\n\nexport default reset;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatUnderline = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7 18v1h10v-1H7zm5-2c1.5 0 2.6-.4 3.4-1.2.8-.8 1.1-2 1.1-3.5V5H15v5.8c0 1.2-.2 2.1-.6 2.8-.4.7-1.2 1-2.4 1s-2-.3-2.4-1c-.4-.7-.6-1.6-.6-2.8V5H7.5v6.2c0 1.5.4 2.7 1.1 3.5.8.9 1.9 1.3 3.4 1.3z\" />\n\t</SVG>\n);\n\nexport default formatUnderline;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatStrikethrough = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M9.1 9v-.5c0-.6.2-1.1.7-1.4.5-.3 1.2-.5 2-.5.7 0 1.4.1 2.1.3.7.2 1.4.5 2.1.9l.2-1.9c-.6-.3-1.2-.5-1.9-.7-.8-.1-1.6-.2-2.4-.2-1.5 0-2.7.3-3.6 1-.8.7-1.2 1.5-1.2 2.6V9h2zM20 12H4v1h8.3c.3.1.6.2.8.3.5.2.9.5 1.1.8.3.3.4.7.4 1.2 0 .7-.2 1.1-.8 1.5-.5.3-1.2.5-2.1.5-.8 0-1.6-.1-2.4-.3-.8-.2-1.5-.5-2.2-.8L7 18.1c.5.2 1.2.4 2 .6.8.2 1.6.3 2.4.3 1.7 0 3-.3 3.9-1 .9-.7 1.3-1.6 1.3-2.8 0-.9-.2-1.7-.7-2.2H20v-1z\" />\n\t</SVG>\n);\n\nexport default formatStrikethrough;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { reset, formatStrikethrough, formatUnderline } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nconst TEXT_DECORATIONS = [\n\t{\n\t\tname: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tname: __( 'Underline' ),\n\t\tvalue: 'underline',\n\t\ticon: formatUnderline,\n\t},\n\t{\n\t\tname: __( 'Strikethrough' ),\n\t\tvalue: 'line-through',\n\t\ticon: formatStrikethrough,\n\t},\n];\n\n/**\n * Control to facilitate text decoration selections.\n *\n * @param {Object}   props             Component props.\n * @param {string}   props.value       Currently selected text decoration.\n * @param {Function} props.onChange    Handles change in text decoration selection.\n * @param {string}   [props.className] Additional class name to apply.\n *\n * @return {WPElement} Text decoration control.\n */\nexport default function TextDecorationControl( {\n\tvalue,\n\tonChange,\n\tclassName,\n} ) {\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-decoration-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Decoration' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"block-editor-text-decoration-control__buttons\">\n\t\t\t\t{ TEXT_DECORATIONS.map( ( textDecoration ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ textDecoration.value }\n\t\t\t\t\t\t\ticon={ textDecoration.icon }\n\t\t\t\t\t\t\tlabel={ textDecoration.name }\n\t\t\t\t\t\t\tisPressed={ textDecoration.value === value }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttextDecoration.value === value\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: textDecoration.value\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</div>\n\t\t</fieldset>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport TextDecorationControl from '../components/text-decoration-control';\nimport useSetting from '../components/use-setting';\nimport { cleanEmptyObject } from './utils';\n\n/**\n * Key within block settings' supports array indicating support for text\n * decorations e.g. settings found in `block.json`.\n */\nexport const TEXT_DECORATION_SUPPORT_KEY =\n\t'typography.__experimentalTextDecoration';\n\n/**\n * Inspector control panel containing the text decoration options.\n *\n * @param {Object} props Block properties.\n *\n * @return {WPElement} Text decoration edit element.\n */\nexport function TextDecorationEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tfunction onChange( newDecoration ) {\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\ttextDecoration: newDecoration,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<TextDecorationControl\n\t\t\tvalue={ style?.typography?.textDecoration }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Checks if text-decoration settings have been disabled.\n *\n * @param {string} name Name of the block.\n *\n * @return {boolean} Whether or not the setting is disabled.\n */\nexport function useIsTextDecorationDisabled( { name: blockName } = {} ) {\n\tconst notSupported = ! hasBlockSupport(\n\t\tblockName,\n\t\tTEXT_DECORATION_SUPPORT_KEY\n\t);\n\tconst hasTextDecoration = useSetting( 'typography.textDecoration' );\n\n\treturn notSupported || ! hasTextDecoration;\n}\n\n/**\n * Checks if there is a current value set for the text decoration block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a text decoration set.\n */\nexport function hasTextDecorationValue( props ) {\n\treturn !! props.attributes.style?.typography?.textDecoration;\n}\n\n/**\n * Resets the text decoration block support attribute. This can be used when\n * disabling the text decoration support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetTextDecoration( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextDecoration: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatUppercase = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6.1 6.8L2.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H6.1zm-.8 6.8L7 8.9l1.7 4.7H5.3zm15.1-.7c-.4-.5-.9-.8-1.6-1 .4-.2.7-.5.8-.9.2-.4.3-.9.3-1.4 0-.9-.3-1.6-.8-2-.6-.5-1.3-.7-2.4-.7h-3.5V18h4.2c1.1 0 2-.3 2.6-.8.6-.6 1-1.4 1-2.4-.1-.8-.3-1.4-.6-1.9zm-5.7-4.7h1.8c.6 0 1.1.1 1.4.4.3.2.5.7.5 1.3 0 .6-.2 1.1-.5 1.3-.3.2-.8.4-1.4.4h-1.8V8.2zm4 8c-.4.3-.9.5-1.5.5h-2.6v-3.8h2.6c1.4 0 2 .6 2 1.9.1.6-.1 1-.5 1.4z\" />\n\t</SVG>\n);\n\nexport default formatUppercase;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatLowercase = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 16.8c-.1-.1-.2-.3-.3-.5v-2.6c0-.9-.1-1.7-.3-2.2-.2-.5-.5-.9-.9-1.2-.4-.2-.9-.3-1.6-.3-.5 0-1 .1-1.5.2s-.9.3-1.2.6l.2 1.2c.4-.3.7-.4 1.1-.5.3-.1.7-.2 1-.2.6 0 1 .1 1.3.4.3.2.4.7.4 1.4-1.2 0-2.3.2-3.3.7s-1.4 1.1-1.4 2.1c0 .7.2 1.2.7 1.6.4.4 1 .6 1.8.6.9 0 1.7-.4 2.4-1.2.1.3.2.5.4.7.1.2.3.3.6.4.3.1.6.1 1.1.1h.1l.2-1.2h-.1c-.4.1-.6 0-.7-.1zM9.2 16c-.2.3-.5.6-.9.8-.3.1-.7.2-1.1.2-.4 0-.7-.1-.9-.3-.2-.2-.3-.5-.3-.9 0-.6.2-1 .7-1.3.5-.3 1.3-.4 2.5-.5v2zm10.6-3.9c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2s-.2 1.4-.6 2z\" />\n\t</SVG>\n);\n\nexport default formatLowercase;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatCapitalize = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M7.1 6.8L3.1 18h1.6l1.1-3h4.3l1.1 3h1.6l-4-11.2H7.1zm-.8 6.8L8 8.9l1.7 4.7H6.3zm14.5-1.5c-.3-.6-.7-1.1-1.2-1.5-.6-.4-1.2-.6-1.9-.6-.5 0-.9.1-1.4.3-.4.2-.8.5-1.1.8V6h-1.4v12h1.3l.2-1c.2.4.6.6 1 .8.4.2.9.3 1.4.3.7 0 1.2-.2 1.8-.5.5-.4 1-.9 1.3-1.5.3-.6.5-1.3.5-2.1-.1-.6-.2-1.3-.5-1.9zm-1.7 4c-.4.5-.9.8-1.6.8s-1.2-.2-1.7-.7c-.4-.5-.7-1.2-.7-2.1 0-.9.2-1.6.7-2.1.4-.5 1-.7 1.7-.7s1.2.3 1.6.8c.4.5.6 1.2.6 2 .1.8-.2 1.4-.6 2z\" />\n\t</SVG>\n);\n\nexport default formatCapitalize;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\treset,\n\tformatCapitalize,\n\tformatLowercase,\n\tformatUppercase,\n} from '@wordpress/icons';\n\nconst TEXT_TRANSFORMS = [\n\t{\n\t\tname: __( 'None' ),\n\t\tvalue: 'none',\n\t\ticon: reset,\n\t},\n\t{\n\t\tname: __( 'Uppercase' ),\n\t\tvalue: 'uppercase',\n\t\ticon: formatUppercase,\n\t},\n\t{\n\t\tname: __( 'Lowercase' ),\n\t\tvalue: 'lowercase',\n\t\ticon: formatLowercase,\n\t},\n\t{\n\t\tname: __( 'Capitalize' ),\n\t\tvalue: 'capitalize',\n\t\ticon: formatCapitalize,\n\t},\n];\n\n/**\n * Control to facilitate text transform selections.\n *\n * @param {Object}   props           Component props.\n * @param {string}   props.className Class name to add to the control.\n * @param {string}   props.value     Currently selected text transform.\n * @param {Function} props.onChange  Handles change in text transform selection.\n *\n * @return {WPElement} Text transform control.\n */\nexport default function TextTransformControl( { className, value, onChange } ) {\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-text-transform-control',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t{ __( 'Letter case' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<div className=\"block-editor-text-transform-control__buttons\">\n\t\t\t\t{ TEXT_TRANSFORMS.map( ( textTransform ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tkey={ textTransform.value }\n\t\t\t\t\t\t\ticon={ textTransform.icon }\n\t\t\t\t\t\t\tlabel={ textTransform.name }\n\t\t\t\t\t\t\tisPressed={ textTransform.value === value }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange(\n\t\t\t\t\t\t\t\t\ttextTransform.value === value\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: textTransform.value\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</div>\n\t\t</fieldset>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport TextTransformControl from '../components/text-transform-control';\nimport useSetting from '../components/use-setting';\nimport { cleanEmptyObject } from './utils';\n\n/**\n * Key within block settings' supports array indicating support for text\n * transforms e.g. settings found in `block.json`.\n */\nexport const TEXT_TRANSFORM_SUPPORT_KEY =\n\t'typography.__experimentalTextTransform';\n\n/**\n * Inspector control panel containing the text transform options.\n *\n * @param {Object} props Block properties.\n *\n * @return {WPElement} Text transform edit element.\n */\nexport function TextTransformEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tfunction onChange( newTransform ) {\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\ttextTransform: newTransform,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<TextTransformControl\n\t\t\tvalue={ style?.typography?.textTransform }\n\t\t\tonChange={ onChange }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Checks if text-transform settings have been disabled.\n *\n * @param {string} name Name of the block.\n *\n * @return {boolean} Whether or not the setting is disabled.\n */\nexport function useIsTextTransformDisabled( { name: blockName } = {} ) {\n\tconst notSupported = ! hasBlockSupport(\n\t\tblockName,\n\t\tTEXT_TRANSFORM_SUPPORT_KEY\n\t);\n\tconst hasTextTransforms = useSetting( 'typography.textTransform' );\n\treturn notSupported || ! hasTextTransforms;\n}\n\n/**\n * Checks if there is a current value set for the text transform block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a text transform set.\n */\nexport function hasTextTransformValue( props ) {\n\treturn !! props.attributes.style?.typography?.textTransform;\n}\n\n/**\n * Resets the text transform block support attribute. This can be used when\n * disabling the text transform support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetTextTransform( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\ttextTransform: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalUseCustomUnits as useCustomUnits,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../../components/use-setting';\n\n/**\n * Control for letter-spacing.\n *\n * @param {Object}                  props                      Component props.\n * @param {string}                  props.value                Currently selected letter-spacing.\n * @param {Function}                props.onChange             Handles change in letter-spacing selection.\n * @param {string|number|undefined} props.__unstableInputWidth Input width to pass through to inner UnitControl. Should be a valid CSS value.\n *\n * @return {WPElement} Letter-spacing control.\n */\nexport default function LetterSpacingControl( {\n\tvalue,\n\tonChange,\n\t__unstableInputWidth = '60px',\n\t...otherProps\n} ) {\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [ 'px', 'em', 'rem' ],\n\t\tdefaultValues: { px: 2, em: 0.2, rem: 0.2 },\n\t} );\n\treturn (\n\t\t<UnitControl\n\t\t\t{ ...otherProps }\n\t\t\tlabel={ __( 'Letter spacing' ) }\n\t\t\tvalue={ value }\n\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\tunits={ units }\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport LetterSpacingControl from '../components/letter-spacing-control';\nimport useSetting from '../components/use-setting';\nimport { cleanEmptyObject } from './utils';\n\n/**\n * Key within block settings' supports array indicating support for letter-spacing\n * e.g. settings found in `block.json`.\n */\nexport const LETTER_SPACING_SUPPORT_KEY =\n\t'typography.__experimentalLetterSpacing';\n\n/**\n * Inspector control panel containing the letter-spacing options.\n *\n * @param {Object} props Block properties.\n * @return {WPElement}    Letter-spacing edit element.\n */\nexport function LetterSpacingEdit( props ) {\n\tconst {\n\t\tattributes: { style },\n\t\tsetAttributes,\n\t} = props;\n\n\tfunction onChange( newSpacing ) {\n\t\tsetAttributes( {\n\t\t\tstyle: cleanEmptyObject( {\n\t\t\t\t...style,\n\t\t\t\ttypography: {\n\t\t\t\t\t...style?.typography,\n\t\t\t\t\tletterSpacing: newSpacing,\n\t\t\t\t},\n\t\t\t} ),\n\t\t} );\n\t}\n\n\treturn (\n\t\t<LetterSpacingControl\n\t\t\tvalue={ style?.typography?.letterSpacing }\n\t\t\tonChange={ onChange }\n\t\t\t__unstableInputWidth={ '100%' }\n\t\t\tsize=\"__unstable-large\"\n\t\t/>\n\t);\n}\n\n/**\n * Checks if letter-spacing settings have been disabled.\n *\n * @param {string} name Name of the block.\n * @return {boolean}     Whether or not the setting is disabled.\n */\nexport function useIsLetterSpacingDisabled( { name: blockName } = {} ) {\n\tconst notSupported = ! hasBlockSupport(\n\t\tblockName,\n\t\tLETTER_SPACING_SUPPORT_KEY\n\t);\n\tconst hasLetterSpacing = useSetting( 'typography.letterSpacing' );\n\n\treturn notSupported || ! hasLetterSpacing;\n}\n\n/**\n * Checks if there is a current value set for the letter spacing block support.\n *\n * @param {Object} props Block props.\n * @return {boolean}     Whether or not the block has a letter spacing set.\n */\nexport function hasLetterSpacingValue( props ) {\n\treturn !! props.attributes.style?.typography?.letterSpacing;\n}\n\n/**\n * Resets the letter spacing block support attribute. This can be used when\n * disabling the letter spacing support controls for a block via a progressive\n * discovery panel.\n *\n * @param {Object} props               Block props.\n * @param {Object} props.attributes    Block's attributes.\n * @param {Object} props.setAttributes Function to set block's attributes.\n */\nexport function resetLetterSpacing( { attributes = {}, setAttributes } ) {\n\tconst { style } = attributes;\n\n\tsetAttributes( {\n\t\tstyle: cleanEmptyObject( {\n\t\t\t...style,\n\t\t\ttypography: {\n\t\t\t\t...style?.typography,\n\t\t\t\tletterSpacing: undefined,\n\t\t\t},\n\t\t} ),\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { __experimentalToolsPanelItem as ToolsPanelItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport InspectorControls from '../components/inspector-controls';\nimport { getFontAppearanceLabel } from '../components/font-appearance-control';\n\nimport {\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tLineHeightEdit,\n\thasLineHeightValue,\n\tresetLineHeight,\n\tuseIsLineHeightDisabled,\n} from './line-height';\nimport {\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFontAppearanceEdit,\n\thasFontAppearanceValue,\n\tresetFontAppearance,\n\tuseIsFontAppearanceDisabled,\n\tuseIsFontStyleDisabled,\n\tuseIsFontWeightDisabled,\n} from './font-appearance';\nimport {\n\tFONT_FAMILY_SUPPORT_KEY,\n\tFontFamilyEdit,\n\thasFontFamilyValue,\n\tresetFontFamily,\n\tuseIsFontFamilyDisabled,\n} from './font-family';\nimport {\n\tFONT_SIZE_SUPPORT_KEY,\n\tFontSizeEdit,\n\thasFontSizeValue,\n\tresetFontSize,\n\tuseIsFontSizeDisabled,\n} from './font-size';\nimport {\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTextDecorationEdit,\n\thasTextDecorationValue,\n\tresetTextDecoration,\n\tuseIsTextDecorationDisabled,\n} from './text-decoration';\nimport {\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tTextTransformEdit,\n\thasTextTransformValue,\n\tresetTextTransform,\n\tuseIsTextTransformDisabled,\n} from './text-transform';\nimport {\n\tLETTER_SPACING_SUPPORT_KEY,\n\tLetterSpacingEdit,\n\thasLetterSpacingValue,\n\tresetLetterSpacing,\n\tuseIsLetterSpacingDisabled,\n} from './letter-spacing';\n\nexport const TYPOGRAPHY_SUPPORT_KEY = 'typography';\nexport const TYPOGRAPHY_SUPPORT_KEYS = [\n\tLINE_HEIGHT_SUPPORT_KEY,\n\tFONT_SIZE_SUPPORT_KEY,\n\tFONT_STYLE_SUPPORT_KEY,\n\tFONT_WEIGHT_SUPPORT_KEY,\n\tFONT_FAMILY_SUPPORT_KEY,\n\tTEXT_DECORATION_SUPPORT_KEY,\n\tTEXT_TRANSFORM_SUPPORT_KEY,\n\tLETTER_SPACING_SUPPORT_KEY,\n];\n\nexport function TypographyPanel( props ) {\n\tconst { clientId } = props;\n\tconst isFontFamilyDisabled = useIsFontFamilyDisabled( props );\n\tconst isFontSizeDisabled = useIsFontSizeDisabled( props );\n\tconst isFontAppearanceDisabled = useIsFontAppearanceDisabled( props );\n\tconst isLineHeightDisabled = useIsLineHeightDisabled( props );\n\tconst isTextDecorationDisabled = useIsTextDecorationDisabled( props );\n\tconst isTextTransformDisabled = useIsTextTransformDisabled( props );\n\tconst isLetterSpacingDisabled = useIsLetterSpacingDisabled( props );\n\n\tconst hasFontStyles = ! useIsFontStyleDisabled( props );\n\tconst hasFontWeights = ! useIsFontWeightDisabled( props );\n\n\tconst isDisabled = useIsTypographyDisabled( props );\n\tconst isSupported = hasTypographySupport( props.name );\n\n\tif ( isDisabled || ! isSupported ) return null;\n\n\tconst defaultControls = getBlockSupport( props.name, [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t\t'__experimentalDefaultControls',\n\t] );\n\n\tconst createResetAllFilter = ( attribute ) => ( newAttributes ) => ( {\n\t\t...newAttributes,\n\t\tstyle: {\n\t\t\t...newAttributes.style,\n\t\t\ttypography: {\n\t\t\t\t...newAttributes.style?.typography,\n\t\t\t\t[ attribute ]: undefined,\n\t\t\t},\n\t\t},\n\t} );\n\n\treturn (\n\t\t<InspectorControls __experimentalGroup=\"typography\">\n\t\t\t{ ! isFontFamilyDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => hasFontFamilyValue( props ) }\n\t\t\t\t\tlabel={ __( 'Font family' ) }\n\t\t\t\t\tonDeselect={ () => resetFontFamily( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.fontFamily }\n\t\t\t\t\tresetAllFilter={ ( newAttributes ) => ( {\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t\tfontFamily: undefined,\n\t\t\t\t\t} ) }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<FontFamilyEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isFontSizeDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => hasFontSizeValue( props ) }\n\t\t\t\t\t/* translators: Ensure translation is distinct from \"Letter case\" */\n\t\t\t\t\tlabel={ __( 'Font size' ) }\n\t\t\t\t\tonDeselect={ () => resetFontSize( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.fontSize }\n\t\t\t\t\tresetAllFilter={ ( newAttributes ) => ( {\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t\tfontSize: undefined,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...newAttributes.style,\n\t\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\t\t...newAttributes.style?.typography,\n\t\t\t\t\t\t\t\tfontSize: undefined,\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\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<FontSizeEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isFontAppearanceDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => hasFontAppearanceValue( props ) }\n\t\t\t\t\tlabel={ getFontAppearanceLabel(\n\t\t\t\t\t\thasFontStyles,\n\t\t\t\t\t\thasFontWeights\n\t\t\t\t\t) }\n\t\t\t\t\tonDeselect={ () => resetFontAppearance( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.fontAppearance }\n\t\t\t\t\tresetAllFilter={ ( newAttributes ) => ( {\n\t\t\t\t\t\t...newAttributes,\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...newAttributes.style,\n\t\t\t\t\t\t\ttypography: {\n\t\t\t\t\t\t\t\t...newAttributes.style?.typography,\n\t\t\t\t\t\t\t\tfontStyle: undefined,\n\t\t\t\t\t\t\t\tfontWeight: undefined,\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\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<FontAppearanceEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isLineHeightDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => hasLineHeightValue( props ) }\n\t\t\t\t\tlabel={ __( 'Line height' ) }\n\t\t\t\t\tonDeselect={ () => resetLineHeight( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.lineHeight }\n\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'lineHeight' ) }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<LineHeightEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isLetterSpacingDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => hasLetterSpacingValue( props ) }\n\t\t\t\t\tlabel={ __( 'Letter spacing' ) }\n\t\t\t\t\tonDeselect={ () => resetLetterSpacing( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.letterSpacing }\n\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'letterSpacing' ) }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<LetterSpacingEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isTextDecorationDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\tclassName=\"single-column\"\n\t\t\t\t\thasValue={ () => hasTextDecorationValue( props ) }\n\t\t\t\t\tlabel={ __( 'Decoration' ) }\n\t\t\t\t\tonDeselect={ () => resetTextDecoration( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.textDecoration }\n\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'textDecoration' ) }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<TextDecorationEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t\t{ ! isTextTransformDisabled && (\n\t\t\t\t<ToolsPanelItem\n\t\t\t\t\thasValue={ () => hasTextTransformValue( props ) }\n\t\t\t\t\t/* translators: Ensure translation is distinct from \"Font size\" */\n\t\t\t\t\tlabel={ __( 'Letter case' ) }\n\t\t\t\t\tonDeselect={ () => resetTextTransform( props ) }\n\t\t\t\t\tisShownByDefault={ defaultControls?.textTransform }\n\t\t\t\t\tresetAllFilter={ createResetAllFilter( 'textTransform' ) }\n\t\t\t\t\tpanelId={ clientId }\n\t\t\t\t>\n\t\t\t\t\t<TextTransformEdit { ...props } />\n\t\t\t\t</ToolsPanelItem>\n\t\t\t) }\n\t\t</InspectorControls>\n\t);\n}\n\nexport const hasTypographySupport = ( blockName ) => {\n\treturn TYPOGRAPHY_SUPPORT_KEYS.some( ( key ) =>\n\t\thasBlockSupport( blockName, key )\n\t);\n};\n\nfunction useIsTypographyDisabled( props = {} ) {\n\tconst configs = [\n\t\tuseIsFontAppearanceDisabled( props ),\n\t\tuseIsFontSizeDisabled( props ),\n\t\tuseIsLineHeightDisabled( props ),\n\t\tuseIsFontFamilyDisabled( props ),\n\t\tuseIsTextDecorationDisabled( props ),\n\t\tuseIsTextTransformDisabled( props ),\n\t\tuseIsLetterSpacingDisabled( props ),\n\t];\n\n\treturn configs.filter( Boolean ).length === configs.length;\n}\n","/**\n * External dependencies\n */\nimport { omit } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo, createPortal } from '@wordpress/element';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockSupport,\n\thasBlockSupport,\n\t__EXPERIMENTAL_ELEMENTS as ELEMENTS,\n} from '@wordpress/blocks';\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { getCSSRules, compileCSS } from '@wordpress/style-engine';\n\n/**\n * Internal dependencies\n */\nimport BlockList from '../components/block-list';\nimport { BORDER_SUPPORT_KEY, BorderPanel } from './border';\nimport { COLOR_SUPPORT_KEY, ColorEdit } from './color';\nimport {\n\tTypographyPanel,\n\tTYPOGRAPHY_SUPPORT_KEY,\n\tTYPOGRAPHY_SUPPORT_KEYS,\n} from './typography';\nimport { SPACING_SUPPORT_KEY, DimensionsPanel } from './dimensions';\nimport useDisplayBlockControls from '../components/use-display-block-controls';\nimport { shouldSkipSerialization } from './utils';\n\nconst styleSupportKeys = [\n\t...TYPOGRAPHY_SUPPORT_KEYS,\n\tBORDER_SUPPORT_KEY,\n\tCOLOR_SUPPORT_KEY,\n\tSPACING_SUPPORT_KEY,\n];\n\nconst hasStyleSupport = ( blockType ) =>\n\tstyleSupportKeys.some( ( key ) => hasBlockSupport( blockType, key ) );\n\n/**\n * Returns the inline styles to add depending on the style object\n *\n * @param {Object} styles Styles configuration.\n *\n * @return {Object} Flattened CSS variables declaration.\n */\nexport function getInlineStyles( styles = {} ) {\n\tconst output = {};\n\t// The goal is to move everything to server side generated engine styles\n\t// This is temporary as we absorb more and more styles into the engine.\n\tgetCSSRules( styles ).forEach( ( rule ) => {\n\t\toutput[ rule.key ] = rule.value;\n\t} );\n\n\treturn output;\n}\n\n/**\n * Filters registered block settings, extending attributes to include `style` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addAttribute( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsEdit = {\n\t[ `${ BORDER_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [ 'border' ],\n\t[ `${ COLOR_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tCOLOR_SUPPORT_KEY,\n\t],\n\t[ `${ TYPOGRAPHY_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\tTYPOGRAPHY_SUPPORT_KEY,\n\t],\n\t[ `${ SPACING_SUPPORT_KEY }.__experimentalSkipSerialization` ]: [\n\t\t'spacing',\n\t],\n};\n\n/**\n * A dictionary of paths to flag skipping block support serialization as the key,\n * with values providing the style paths to be omitted from serialization.\n *\n * Extends the Edit skip paths to enable skipping additional paths in just\n * the Save component. This allows a block support to be serialized within the\n * editor, while using an alternate approach, such as server-side rendering, when\n * the support is saved.\n *\n * @constant\n * @type {Record<string, string[]>}\n */\nconst skipSerializationPathsSave = {\n\t...skipSerializationPathsEdit,\n\t[ `${ SPACING_SUPPORT_KEY }` ]: [ 'spacing.blockGap' ],\n};\n\n/**\n * A dictionary used to normalize feature names between support flags, style\n * object properties and __experimentSkipSerialization configuration arrays.\n *\n * This allows not having to provide a migration for a support flag and possible\n * backwards compatibility bridges, while still achieving consistency between\n * the support flag and the skip serialization array.\n *\n * @constant\n * @type {Record<string, string>}\n */\nconst renamedFeatures = { gradients: 'gradient' };\n\n/**\n * Override props assigned to save component to inject the CSS variables definition.\n *\n * @param {Object}                    props      Additional props applied to save element.\n * @param {Object}                    blockType  Block type.\n * @param {Object}                    attributes Block attributes.\n * @param {?Record<string, string[]>} skipPaths  An object of keys and paths to skip serialization.\n *\n * @return {Object} Filtered props applied to save element.\n */\nexport function addSaveProps(\n\tprops,\n\tblockType,\n\tattributes,\n\tskipPaths = skipSerializationPathsSave\n) {\n\tif ( ! hasStyleSupport( blockType ) ) {\n\t\treturn props;\n\t}\n\n\tlet { style } = attributes;\n\tObject.entries( skipPaths ).forEach( ( [ indicator, path ] ) => {\n\t\tconst skipSerialization = getBlockSupport( blockType, indicator );\n\n\t\tif ( skipSerialization === true ) {\n\t\t\tstyle = omit( style, path );\n\t\t}\n\n\t\tif ( Array.isArray( skipSerialization ) ) {\n\t\t\tskipSerialization.forEach( ( featureName ) => {\n\t\t\t\tconst feature = renamedFeatures[ featureName ] || featureName;\n\t\t\t\tstyle = omit( style, [ [ ...path, feature ] ] );\n\t\t\t} );\n\t\t}\n\t} );\n\n\tprops.style = {\n\t\t...getInlineStyles( style ),\n\t\t...props.style,\n\t};\n\n\treturn props;\n}\n\n/**\n * Filters registered block settings to extend the block edit wrapper\n * to apply the desired styles and classnames properly.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object}.Filtered block settings.\n */\nexport function addEditProps( settings ) {\n\tif ( ! hasStyleSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\tconst existingGetEditWrapperProps = settings.getEditWrapperProps;\n\tsettings.getEditWrapperProps = ( attributes ) => {\n\t\tlet props = {};\n\t\tif ( existingGetEditWrapperProps ) {\n\t\t\tprops = existingGetEditWrapperProps( attributes );\n\t\t}\n\n\t\treturn addSaveProps(\n\t\t\tprops,\n\t\t\tsettings,\n\t\t\tattributes,\n\t\t\tskipSerializationPathsEdit\n\t\t);\n\t};\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include new inspector controls for\n * all the custom styles configs.\n *\n * @param {Function} BlockEdit Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withBlockControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst shouldDisplayControls = useDisplayBlockControls();\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ shouldDisplayControls && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<ColorEdit { ...props } />\n\t\t\t\t\t\t<TypographyPanel { ...props } />\n\t\t\t\t\t\t<BorderPanel { ...props } />\n\t\t\t\t\t\t<DimensionsPanel { ...props } />\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t</>\n\t\t);\n\t},\n\t'withToolbarControls'\n);\n\n/**\n * Override the default block element to include elements styles.\n *\n * @param {Function} BlockListBlock Original component\n * @return {Function}                Wrapped component\n */\nconst withElementsStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst blockElementsContainerIdentifier = `wp-elements-${ useInstanceId(\n\t\t\tBlockListBlock\n\t\t) }`;\n\n\t\tconst skipLinkColorSerialization = shouldSkipSerialization(\n\t\t\tprops.name,\n\t\t\tCOLOR_SUPPORT_KEY,\n\t\t\t'link'\n\t\t);\n\n\t\tconst styles = useMemo( () => {\n\t\t\tconst rawElementsStyles = props.attributes.style?.elements;\n\t\t\tconst elementCssRules = [];\n\t\t\tif (\n\t\t\t\trawElementsStyles &&\n\t\t\t\tObject.keys( rawElementsStyles ).length > 0\n\t\t\t) {\n\t\t\t\t// Remove values based on whether serialization has been skipped for a specific style.\n\t\t\t\tconst filteredElementsStyles = {\n\t\t\t\t\t...rawElementsStyles,\n\t\t\t\t\tlink: {\n\t\t\t\t\t\t...rawElementsStyles.link,\n\t\t\t\t\t\tcolor: ! skipLinkColorSerialization\n\t\t\t\t\t\t\t? rawElementsStyles.link?.color\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tfor ( const [ elementName, elementStyles ] of Object.entries(\n\t\t\t\t\tfilteredElementsStyles\n\t\t\t\t) ) {\n\t\t\t\t\tconst cssRule = compileCSS( elementStyles, {\n\t\t\t\t\t\t// The .editor-styles-wrapper selector is required on elements styles. As it is\n\t\t\t\t\t\t// added to all other editor styles, not providing it causes reset and global\n\t\t\t\t\t\t// styles to override element styles because of higher specificity.\n\t\t\t\t\t\tselector: `.editor-styles-wrapper .${ blockElementsContainerIdentifier } ${ ELEMENTS[ elementName ] }`,\n\t\t\t\t\t} );\n\t\t\t\t\tif ( !! cssRule ) {\n\t\t\t\t\t\telementCssRules.push( cssRule );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn elementCssRules.length > 0 ? elementCssRules : undefined;\n\t\t}, [ props.attributes.style?.elements ] );\n\n\t\tconst element = useContext( BlockList.__unstableElementContext );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ styles &&\n\t\t\t\t\telement &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t\t__html: styles,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\telement\n\t\t\t\t\t) }\n\n\t\t\t\t<BlockListBlock\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tclassName={\n\t\t\t\t\t\tprops.attributes.style?.elements\n\t\t\t\t\t\t\t? classnames(\n\t\t\t\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\t\t\t\tblockElementsContainerIdentifier\n\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t: props.className\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t}\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addAttribute',\n\taddAttribute\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/style/addSaveProps',\n\taddSaveProps\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/style/addEditProps',\n\taddEditProps\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/style/with-block-controls',\n\twithBlockControls\n);\n\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/with-elements-styles',\n\twithElementsStyles\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { hasBlockSupport } from '@wordpress/blocks';\n\nconst hasSettingsSupport = ( blockType ) =>\n\thasBlockSupport( blockType, '__experimentalSettings', false );\n\nfunction addAttribute( settings ) {\n\tif ( ! hasSettingsSupport( settings ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( ! settings?.attributes?.settings ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tsettings: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/settings/addAttribute',\n\taddAttribute\n);\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst filter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4 4 19h16L12 4zm0 3.2 5.5 10.3H12V7.2z\" />\n\t</SVG>\n);\n\nexport default filter;\n","/**\n * WordPress dependencies\n */\nimport {\n\tColorIndicator,\n\tDropdown,\n\tDuotonePicker,\n\tDuotoneSwatch,\n\tMenuGroup,\n\tToolbarButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport { Icon, filter } from '@wordpress/icons';\n\nfunction DuotoneControl( {\n\tcolorPalette,\n\tduotonePalette,\n\tdisableCustomColors,\n\tdisableCustomDuotone,\n\tvalue,\n\tonChange,\n} ) {\n\tlet toolbarIcon;\n\tif ( value === 'unset' ) {\n\t\ttoolbarIcon = (\n\t\t\t<ColorIndicator className=\"block-editor-duotone-control__unset-indicator\" />\n\t\t);\n\t} else if ( value ) {\n\t\ttoolbarIcon = <DuotoneSwatch values={ value } />;\n\t} else {\n\t\ttoolbarIcon = <Icon icon={ filter } />;\n\t}\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ {\n\t\t\t\tclassName: 'block-editor-duotone-control__popover',\n\t\t\t\theaderTitle: __( 'Duotone' ),\n\t\t\t\tisAlternate: true,\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => {\n\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\t\tlabel={ __( 'Apply duotone filter' ) }\n\t\t\t\t\t\ticon={ toolbarIcon }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<MenuGroup label={ __( 'Duotone' ) }>\n\t\t\t\t\t<div className=\"block-editor-duotone-control__description\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Create a two-tone color effect without losing your original image.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\t\t\tdisableCustomDuotone={ disableCustomDuotone }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</MenuGroup>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default DuotoneControl;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\n\n/**\n * WordPress dependencies\n */\nimport { getBlockSupport, hasBlockSupport } from '@wordpress/blocks';\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport { useMemo, useContext, createPortal } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBlockControls,\n\t__experimentalDuotoneControl as DuotoneControl,\n\tuseSetting,\n} from '../components';\nimport BlockList from '../components/block-list';\nimport {\n\t__unstableDuotoneFilter as DuotoneFilter,\n\t__unstableDuotoneStylesheet as DuotoneStylesheet,\n\t__unstableDuotoneUnsetStylesheet as DuotoneUnsetStylesheet,\n} from '../components/duotone';\nimport { store as blockEditorStore } from '../store';\n\nconst EMPTY_ARRAY = [];\n\nextend( [ namesPlugin ] );\n\n/**\n * SVG and stylesheet needed for rendering the duotone filter.\n *\n * @param {Object}           props          Duotone props.\n * @param {string}           props.selector Selector to apply the filter to.\n * @param {string}           props.id       Unique id for this duotone filter.\n * @param {string[]|\"unset\"} props.colors   Array of RGB color strings ordered from dark to light.\n *\n * @return {WPElement} Duotone element.\n */\nfunction InlineDuotone( { selector, id, colors } ) {\n\tif ( colors === 'unset' ) {\n\t\treturn <DuotoneUnsetStylesheet selector={ selector } />;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<DuotoneFilter id={ id } colors={ colors } />\n\t\t\t<DuotoneStylesheet id={ id } selector={ selector } />\n\t\t</>\n\t);\n}\n\nfunction useMultiOriginPresets( { presetSetting, defaultSetting } ) {\n\tconst disableDefault = ! useSetting( defaultSetting );\n\tconst userPresets =\n\t\tuseSetting( `${ presetSetting }.custom` ) || EMPTY_ARRAY;\n\tconst themePresets =\n\t\tuseSetting( `${ presetSetting }.theme` ) || EMPTY_ARRAY;\n\tconst defaultPresets =\n\t\tuseSetting( `${ presetSetting }.default` ) || EMPTY_ARRAY;\n\treturn useMemo(\n\t\t() => [\n\t\t\t...userPresets,\n\t\t\t...themePresets,\n\t\t\t...( disableDefault ? EMPTY_ARRAY : defaultPresets ),\n\t\t],\n\t\t[ disableDefault, userPresets, themePresets, defaultPresets ]\n\t);\n}\n\nfunction DuotonePanel( { attributes, setAttributes } ) {\n\tconst style = attributes?.style;\n\tconst duotone = style?.color?.duotone;\n\n\tconst duotonePalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.duotone',\n\t\tdefaultSetting: 'color.defaultDuotone',\n\t} );\n\tconst colorPalette = useMultiOriginPresets( {\n\t\tpresetSetting: 'color.palette',\n\t\tdefaultSetting: 'color.defaultPalette',\n\t} );\n\tconst disableCustomColors = ! useSetting( 'color.custom' );\n\tconst disableCustomDuotone =\n\t\t! useSetting( 'color.customDuotone' ) ||\n\t\t( colorPalette?.length === 0 && disableCustomColors );\n\n\tif ( duotonePalette?.length === 0 && disableCustomDuotone ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockControls group=\"block\" __experimentalShareWithChildBlocks>\n\t\t\t<DuotoneControl\n\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\tcolorPalette={ colorPalette }\n\t\t\t\tdisableCustomDuotone={ disableCustomDuotone }\n\t\t\t\tdisableCustomColors={ disableCustomColors }\n\t\t\t\tvalue={ duotone }\n\t\t\t\tonChange={ ( newDuotone ) => {\n\t\t\t\t\tconst newStyle = {\n\t\t\t\t\t\t...style,\n\t\t\t\t\t\tcolor: {\n\t\t\t\t\t\t\t...style?.color,\n\t\t\t\t\t\t\tduotone: newDuotone,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\tsetAttributes( { style: newStyle } );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</BlockControls>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include\n * the `duotone` attribute.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nfunction addDuotoneAttributes( settings ) {\n\tif ( ! hasBlockSupport( settings, 'color.__experimentalDuotone' ) ) {\n\t\treturn settings;\n\t}\n\n\t// Allow blocks to specify their own attribute definition with default\n\t// values if needed.\n\tif ( ! settings.attributes.style ) {\n\t\tObject.assign( settings.attributes, {\n\t\t\tstyle: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include toolbar controls for duotone if the\n * block supports duotone.\n *\n * @param {Function} BlockEdit Original component.\n *\n * @return {Function} Wrapped component.\n */\nconst withDuotoneControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst hasDuotoneSupport = hasBlockSupport(\n\t\t\tprops.name,\n\t\t\t'color.__experimentalDuotone'\n\t\t);\n\t\tconst isContentLocked = useSelect(\n\t\t\t( select ) => {\n\t\t\t\treturn select(\n\t\t\t\t\tblockEditorStore\n\t\t\t\t).__unstableGetContentLockingParent( props.clientId );\n\t\t\t},\n\t\t\t[ props.clientId ]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ hasDuotoneSupport && ! isContentLocked && (\n\t\t\t\t\t<DuotonePanel { ...props } />\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t},\n\t'withDuotoneControls'\n);\n\n/**\n * Function that scopes a selector with another one. This works a bit like\n * SCSS nesting except the `&` operator isn't supported.\n *\n * @example\n * ```js\n * const scope = '.a, .b .c';\n * const selector = '> .x, .y';\n * const merged = scopeSelector( scope, selector );\n * // merged is '.a > .x, .a .y, .b .c > .x, .b .c .y'\n * ```\n *\n * @param {string} scope    Selector to scope to.\n * @param {string} selector Original selector.\n *\n * @return {string} Scoped selector.\n */\nfunction scopeSelector( scope, selector ) {\n\tconst scopes = scope.split( ',' );\n\tconst selectors = selector.split( ',' );\n\n\tconst selectorsScoped = [];\n\tscopes.forEach( ( outer ) => {\n\t\tselectors.forEach( ( inner ) => {\n\t\t\tselectorsScoped.push( `${ outer.trim() } ${ inner.trim() }` );\n\t\t} );\n\t} );\n\n\treturn selectorsScoped.join( ', ' );\n}\n\n/**\n * Override the default block element to include duotone styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nconst withDuotoneStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst duotoneSupport = getBlockSupport(\n\t\t\tprops.name,\n\t\t\t'color.__experimentalDuotone'\n\t\t);\n\t\tconst colors = props?.attributes?.style?.color?.duotone;\n\n\t\tif ( ! duotoneSupport || ! colors ) {\n\t\t\treturn <BlockListBlock { ...props } />;\n\t\t}\n\n\t\tconst id = `wp-duotone-${ useInstanceId( BlockListBlock ) }`;\n\n\t\t// Extra .editor-styles-wrapper specificity is needed in the editor\n\t\t// since we're not using inline styles to apply the filter. We need to\n\t\t// override duotone applied by global styles and theme.json.\n\t\tconst selectorsGroup = scopeSelector(\n\t\t\t`.editor-styles-wrapper .${ id }`,\n\t\t\tduotoneSupport\n\t\t);\n\n\t\tconst className = classnames( props?.className, id );\n\n\t\tconst element = useContext( BlockList.__unstableElementContext );\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ element &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<InlineDuotone\n\t\t\t\t\t\t\tselector={ selectorsGroup }\n\t\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\t\tcolors={ colors }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\telement\n\t\t\t\t\t) }\n\t\t\t\t<BlockListBlock { ...props } className={ className } />\n\t\t\t</>\n\t\t);\n\t},\n\t'withDuotoneStyles'\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/editor/duotone/add-attributes',\n\taddDuotoneAttributes\n);\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/duotone/with-editor-controls',\n\twithDuotoneControls\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/duotone/with-styles',\n\twithDuotoneStyles\n);\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { kebabCase } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useInstanceId } from '@wordpress/compose';\nimport { addFilter } from '@wordpress/hooks';\nimport {\n\tgetBlockDefaultClassName,\n\tgetBlockSupport,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tButton,\n\tButtonGroup,\n\tToggleControl,\n\tPanelBody,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useContext, createPortal } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { InspectorControls } from '../components';\nimport useSetting from '../components/use-setting';\nimport { LayoutStyle } from '../components/block-list/layout';\nimport BlockList from '../components/block-list';\nimport { getLayoutType, getLayoutTypes } from '../layouts';\n\nconst layoutBlockSupportKey = '__experimentalLayout';\n\n/**\n * Generates the utility classnames for the given block's layout attributes.\n *\n * @param { Object } block Block object.\n *\n * @return { Array } Array of CSS classname strings.\n */\nexport function useLayoutClasses( block = {} ) {\n\tconst rootPaddingAlignment = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().__experimentalFeatures\n\t\t\t?.useRootPaddingAwareAlignments;\n\t}, [] );\n\tconst globalLayoutSettings = useSetting( 'layout' ) || {};\n\n\tconst { attributes = {}, name } = block;\n\tconst { layout } = attributes;\n\n\tconst { default: defaultBlockLayout } =\n\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || defaultBlockLayout || {};\n\n\tconst layoutClassnames = [];\n\n\tif (\n\t\tglobalLayoutSettings?.definitions?.[ usedLayout?.type || 'default' ]\n\t\t\t?.className\n\t) {\n\t\tlayoutClassnames.push(\n\t\t\tglobalLayoutSettings?.definitions?.[ usedLayout?.type || 'default' ]\n\t\t\t\t?.className\n\t\t);\n\t}\n\n\tif (\n\t\t( usedLayout?.inherit ||\n\t\t\tusedLayout?.contentSize ||\n\t\t\tusedLayout?.type === 'constrained' ) &&\n\t\trootPaddingAlignment\n\t) {\n\t\tlayoutClassnames.push( 'has-global-padding' );\n\t}\n\n\tif ( usedLayout?.orientation ) {\n\t\tlayoutClassnames.push( `is-${ kebabCase( usedLayout.orientation ) }` );\n\t}\n\n\tif ( usedLayout?.justifyContent ) {\n\t\tlayoutClassnames.push(\n\t\t\t`is-content-justification-${ kebabCase(\n\t\t\t\tusedLayout.justifyContent\n\t\t\t) }`\n\t\t);\n\t}\n\n\tif ( usedLayout?.flexWrap && usedLayout.flexWrap === 'nowrap' ) {\n\t\tlayoutClassnames.push( 'is-nowrap' );\n\t}\n\n\treturn layoutClassnames;\n}\n\n/**\n * Generates a CSS rule with the given block's layout styles.\n *\n * @param { Object } block    Block object.\n * @param { string } selector A selector to use in generating the CSS rule.\n *\n * @return { string } CSS rule.\n */\nexport function useLayoutStyles( block = {}, selector ) {\n\tconst { attributes = {}, name } = block;\n\tconst { layout = {}, style = {} } = attributes;\n\t// Update type for blocks using legacy layouts.\n\tconst usedLayout =\n\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t: layout || {};\n\tconst fullLayoutType = getLayoutType( usedLayout?.type || 'default' );\n\tconst globalLayoutSettings = useSetting( 'layout' ) || {};\n\tconst blockGapSupport = useSetting( 'spacing.blockGap' );\n\tconst hasBlockGapSupport = blockGapSupport !== null;\n\tconst css = fullLayoutType?.getLayoutStyle?.( {\n\t\tblockName: name,\n\t\tselector,\n\t\tlayout,\n\t\tlayoutDefinitions: globalLayoutSettings?.definitions,\n\t\tstyle,\n\t\thasBlockGapSupport,\n\t} );\n\treturn css;\n}\n\nfunction LayoutPanel( { setAttributes, attributes, name: blockName } ) {\n\tconst { layout } = attributes;\n\tconst defaultThemeLayout = useSetting( 'layout' );\n\tconst themeSupportsLayout = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().supportsLayout;\n\t}, [] );\n\n\tconst layoutBlockSupport = getBlockSupport(\n\t\tblockName,\n\t\tlayoutBlockSupportKey,\n\t\t{}\n\t);\n\tconst {\n\t\tallowSwitching,\n\t\tallowEditing = true,\n\t\tallowInheriting = true,\n\t\tdefault: defaultBlockLayout,\n\t} = layoutBlockSupport;\n\n\tif ( ! allowEditing ) {\n\t\treturn null;\n\t}\n\n\t// Only show the inherit toggle if it's supported,\n\t// a default theme layout is set (e.g. one that provides `contentSize` and/or `wideSize` values),\n\t// and either the default / flow or the constrained layout type is in use, as the toggle switches from one to the other.\n\tconst showInheritToggle = !! (\n\t\tallowInheriting &&\n\t\t!! defaultThemeLayout &&\n\t\t( ! layout?.type ||\n\t\t\tlayout?.type === 'default' ||\n\t\t\tlayout?.type === 'constrained' ||\n\t\t\tlayout?.inherit )\n\t);\n\n\tconst usedLayout = layout || defaultBlockLayout || {};\n\tconst {\n\t\tinherit = false,\n\t\ttype = 'default',\n\t\tcontentSize = null,\n\t} = usedLayout;\n\t/**\n\t * `themeSupportsLayout` is only relevant to the `default/flow` or\n\t * `constrained` layouts and it should not be taken into account when other\n\t * `layout` types are used.\n\t */\n\tif (\n\t\t( type === 'default' || type === 'constrained' ) &&\n\t\t! themeSupportsLayout\n\t) {\n\t\treturn null;\n\t}\n\tconst layoutType = getLayoutType( type );\n\tconst constrainedType = getLayoutType( 'constrained' );\n\tconst displayControlsForLegacyLayouts =\n\t\t! usedLayout.type && ( contentSize || inherit );\n\tconst hasContentSizeOrLegacySettings = !! inherit || !! contentSize;\n\n\tconst onChangeType = ( newType ) =>\n\t\tsetAttributes( { layout: { type: newType } } );\n\tconst onChangeLayout = ( newLayout ) =>\n\t\tsetAttributes( { layout: newLayout } );\n\n\treturn (\n\t\t<>\n\t\t\t<InspectorControls>\n\t\t\t\t<PanelBody title={ __( 'Layout' ) }>\n\t\t\t\t\t{ showInheritToggle && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tclassName=\"block-editor-hooks__toggle-control\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Inner blocks use content width' ) }\n\t\t\t\t\t\t\t\tchecked={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={ () =>\n\t\t\t\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\t\t\t\tlayout: {\n\t\t\t\t\t\t\t\t\t\t\ttype:\n\t\t\t\t\t\t\t\t\t\t\t\tlayoutType?.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t'constrained' ||\n\t\t\t\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 'default'\n\t\t\t\t\t\t\t\t\t\t\t\t\t: 'constrained',\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\thelp={\n\t\t\t\t\t\t\t\t\tlayoutType?.name === 'constrained' ||\n\t\t\t\t\t\t\t\t\thasContentSizeOrLegacySettings\n\t\t\t\t\t\t\t\t\t\t? __(\n\t\t\t\t\t\t\t\t\t\t\t\t'Nested blocks use content width with options for full and wide widths.'\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'Nested blocks will fill the width of this container. Toggle to constrain.'\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/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! inherit && allowSwitching && (\n\t\t\t\t\t\t<LayoutTypeSwitcher\n\t\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\t\tonChange={ onChangeType }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ layoutType && layoutType.name !== 'default' && (\n\t\t\t\t\t\t<layoutType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ constrainedType && displayControlsForLegacyLayouts && (\n\t\t\t\t\t\t<constrainedType.inspectorControls\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</PanelBody>\n\t\t\t</InspectorControls>\n\t\t\t{ ! inherit && layoutType && (\n\t\t\t\t<layoutType.toolBarControls\n\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\tonChange={ onChangeLayout }\n\t\t\t\t\tlayoutBlockSupport={ layoutBlockSupport }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction LayoutTypeSwitcher( { type, onChange } ) {\n\treturn (\n\t\t<ButtonGroup>\n\t\t\t{ getLayoutTypes().map( ( { name, label } ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ name }\n\t\t\t\t\t\tisPressed={ type === name }\n\t\t\t\t\t\tonClick={ () => onChange( name ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</Button>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ButtonGroup>\n\t);\n}\n\n/**\n * Filters registered block settings, extending attributes to include `layout`.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addAttribute( settings ) {\n\tif ( 'type' in ( settings.attributes?.layout ?? {} ) ) {\n\t\treturn settings;\n\t}\n\tif ( hasBlockSupport( settings, layoutBlockSupportKey ) ) {\n\t\tsettings.attributes = {\n\t\t\t...settings.attributes,\n\t\t\tlayout: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn settings;\n}\n\n/**\n * Override the default edit UI to include layout controls\n *\n * @param {Function} BlockEdit Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withInspectorControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { name: blockName } = props;\n\t\tconst supportLayout = hasBlockSupport(\n\t\t\tblockName,\n\t\t\tlayoutBlockSupportKey\n\t\t);\n\n\t\treturn [\n\t\t\tsupportLayout && <LayoutPanel key=\"layout\" { ...props } />,\n\t\t\t<BlockEdit key=\"edit\" { ...props } />,\n\t\t];\n\t},\n\t'withInspectorControls'\n);\n\n/**\n * Override the default block element to add the layout styles.\n *\n * @param {Function} BlockListBlock Original component.\n *\n * @return {Function} Wrapped component.\n */\nexport const withLayoutStyles = createHigherOrderComponent(\n\t( BlockListBlock ) => ( props ) => {\n\t\tconst { name, attributes, block } = props;\n\t\tconst hasLayoutBlockSupport = hasBlockSupport(\n\t\t\tname,\n\t\t\tlayoutBlockSupportKey\n\t\t);\n\t\tconst disableLayoutStyles = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = select( blockEditorStore );\n\t\t\treturn !! getSettings().disableLayoutStyles;\n\t\t} );\n\t\tconst shouldRenderLayoutStyles =\n\t\t\thasLayoutBlockSupport && ! disableLayoutStyles;\n\t\tconst id = useInstanceId( BlockListBlock );\n\t\tconst defaultThemeLayout = useSetting( 'layout' ) || {};\n\t\tconst element = useContext( BlockList.__unstableElementContext );\n\t\tconst { layout } = attributes;\n\t\tconst { default: defaultBlockLayout } =\n\t\t\tgetBlockSupport( name, layoutBlockSupportKey ) || {};\n\t\tconst usedLayout =\n\t\t\tlayout?.inherit || layout?.contentSize || layout?.wideSize\n\t\t\t\t? { ...layout, type: 'constrained' }\n\t\t\t\t: layout || defaultBlockLayout || {};\n\t\tconst layoutClasses = hasLayoutBlockSupport\n\t\t\t? useLayoutClasses( block )\n\t\t\t: null;\n\t\tconst selector = `.${ getBlockDefaultClassName(\n\t\t\tname\n\t\t) }.wp-container-${ id }`;\n\t\tconst blockGapSupport = useSetting( 'spacing.blockGap' );\n\t\tconst hasBlockGapSupport = blockGapSupport !== null;\n\n\t\t// Get CSS string for the current layout type.\n\t\t// The CSS and `style` element is only output if it is not empty.\n\t\tlet css;\n\t\tif ( shouldRenderLayoutStyles ) {\n\t\t\tconst fullLayoutType = getLayoutType(\n\t\t\t\tusedLayout?.type || 'default'\n\t\t\t);\n\t\t\tcss = fullLayoutType?.getLayoutStyle?.( {\n\t\t\t\tblockName: name,\n\t\t\t\tselector,\n\t\t\t\tlayout: usedLayout,\n\t\t\t\tlayoutDefinitions: defaultThemeLayout?.definitions,\n\t\t\t\tstyle: attributes?.style,\n\t\t\t\thasBlockGapSupport,\n\t\t\t} );\n\t\t}\n\n\t\t// Attach a `wp-container-` id-based class name as well as a layout class name such as `is-layout-flex`.\n\t\tconst className = classnames(\n\t\t\tprops?.className,\n\t\t\t{\n\t\t\t\t[ `wp-container-${ id }` ]: shouldRenderLayoutStyles && !! css, // Only attach a container class if there is generated CSS to be attached.\n\t\t\t},\n\t\t\tlayoutClasses\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ shouldRenderLayoutStyles &&\n\t\t\t\t\telement &&\n\t\t\t\t\t!! css &&\n\t\t\t\t\tcreatePortal(\n\t\t\t\t\t\t<LayoutStyle\n\t\t\t\t\t\t\tblockName={ name }\n\t\t\t\t\t\t\tselector={ selector }\n\t\t\t\t\t\t\tcss={ css }\n\t\t\t\t\t\t\tlayout={ usedLayout }\n\t\t\t\t\t\t\tstyle={ attributes?.style }\n\t\t\t\t\t\t/>,\n\t\t\t\t\t\telement\n\t\t\t\t\t) }\n\t\t\t\t<BlockListBlock { ...props } className={ className } />\n\t\t\t</>\n\t\t);\n\t}\n);\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/layout/addAttribute',\n\taddAttribute\n);\naddFilter(\n\t'editor.BlockListBlock',\n\t'core/editor/layout/with-layout-styles',\n\twithLayoutStyles\n);\naddFilter(\n\t'editor.BlockEdit',\n\t'core/editor/layout/with-inspector-controls',\n\twithInspectorControls\n);\n","/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { addFilter } from '@wordpress/hooks';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../store';\nimport { BlockControls } from '../components';\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nfunction StopEditingAsBlocksOnOutsideSelect( {\n\tclientId,\n\tstopEditingAsBlock,\n} ) {\n\tconst isBlockOrDescendantSelected = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isBlockSelected, hasSelectedInnerBlock } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\treturn (\n\t\t\t\tisBlockSelected( clientId ) ||\n\t\t\t\thasSelectedInnerBlock( clientId, true )\n\t\t\t);\n\t\t},\n\t\t[ clientId ]\n\t);\n\tuseEffect( () => {\n\t\tif ( ! isBlockOrDescendantSelected ) {\n\t\t\tstopEditingAsBlock();\n\t\t}\n\t}, [ isBlockOrDescendantSelected ] );\n\treturn null;\n}\n\nexport const withBlockControls = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => {\n\t\tconst { getBlockListSettings, getSettings } =\n\t\t\tuseSelect( blockEditorStore );\n\t\tconst focusModeToRevert = useRef();\n\t\tconst { templateLock, isLockedByParent, isEditingAsBlocks } = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst {\n\t\t\t\t\t__unstableGetContentLockingParent,\n\t\t\t\t\tgetTemplateLock,\n\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks,\n\t\t\t\t} = select( blockEditorStore );\n\t\t\t\treturn {\n\t\t\t\t\ttemplateLock: getTemplateLock( props.clientId ),\n\t\t\t\t\tisLockedByParent: !! __unstableGetContentLockingParent(\n\t\t\t\t\t\tprops.clientId\n\t\t\t\t\t),\n\t\t\t\t\tisEditingAsBlocks:\n\t\t\t\t\t\t__unstableGetTemporarilyEditingAsBlocks() ===\n\t\t\t\t\t\tprops.clientId,\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ props.clientId ]\n\t\t);\n\n\t\tconst {\n\t\t\tupdateSettings,\n\t\t\tupdateBlockListSettings,\n\t\t\t__unstableSetTemporarilyEditingAsBlocks,\n\t\t} = useDispatch( blockEditorStore );\n\t\tconst isContentLocked =\n\t\t\t! isLockedByParent && templateLock === 'contentOnly';\n\t\tconst {\n\t\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\t\tupdateBlockAttributes,\n\t\t} = useDispatch( blockEditorStore );\n\n\t\tconst stopEditingAsBlock = useCallback( () => {\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tupdateBlockAttributes( props.clientId, {\n\t\t\t\ttemplateLock: 'contentOnly',\n\t\t\t} );\n\t\t\tupdateBlockListSettings( props.clientId, {\n\t\t\t\t...getBlockListSettings( props.clientId ),\n\t\t\t\ttemplateLock: 'contentOnly',\n\t\t\t} );\n\t\t\tupdateSettings( { focusMode: focusModeToRevert.current } );\n\t\t\t__unstableSetTemporarilyEditingAsBlocks();\n\t\t}, [\n\t\t\tprops.clientId,\n\t\t\tfocusModeToRevert,\n\t\t\tupdateSettings,\n\t\t\tupdateBlockListSettings,\n\t\t\tgetBlockListSettings,\n\t\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\t\tupdateBlockAttributes,\n\t\t\t__unstableSetTemporarilyEditingAsBlocks,\n\t\t] );\n\n\t\tif ( ! isContentLocked && ! isEditingAsBlocks ) {\n\t\t\treturn <BlockEdit { ...props } />;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ isEditingAsBlocks && ! isContentLocked && (\n\t\t\t\t\t<StopEditingAsBlocksOnOutsideSelect\n\t\t\t\t\t\tclientId={ props.clientId }\n\t\t\t\t\t\tstopEditingAsBlock={ stopEditingAsBlock }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<BlockControls group=\"other\">\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( isEditingAsBlocks && ! isContentLocked ) {\n\t\t\t\t\t\t\t\tstopEditingAsBlock();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\t\tupdateBlockAttributes( props.clientId, {\n\t\t\t\t\t\t\t\t\ttemplateLock: undefined,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tupdateBlockListSettings( props.clientId, {\n\t\t\t\t\t\t\t\t\t...getBlockListSettings( props.clientId ),\n\t\t\t\t\t\t\t\t\ttemplateLock: false,\n\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\tfocusModeToRevert.current =\n\t\t\t\t\t\t\t\t\tgetSettings().focusMode;\n\t\t\t\t\t\t\t\tupdateSettings( { focusMode: true } );\n\t\t\t\t\t\t\t\t__unstableSetTemporarilyEditingAsBlocks(\n\t\t\t\t\t\t\t\t\tprops.clientId\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{ isEditingAsBlocks && ! isContentLocked\n\t\t\t\t\t\t\t? __( 'Done' )\n\t\t\t\t\t\t\t: __( 'Modify' ) }\n\t\t\t\t\t</ToolbarButton>\n\t\t\t\t</BlockControls>\n\t\t\t\t<BlockEdit\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\tprops.className,\n\t\t\t\t\t\tisEditingAsBlocks &&\n\t\t\t\t\t\t\t'is-content-locked-editing-as-blocks'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t</>\n\t\t);\n\t},\n\t'withToolbarControls'\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/style/with-block-controls',\n\twithBlockControls\n);\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { getBlockSupport } from '@wordpress/blocks';\n\nconst META_ATTRIBUTE_NAME = 'metadata';\n\nexport function hasBlockMetadataSupport( blockType, feature = '' ) {\n\tconst support = getBlockSupport( blockType, '__experimentalMetadata' );\n\treturn !! ( true === support || support?.[ feature ] );\n}\n\n/**\n * Filters registered block settings, extending attributes to include `metadata`.\n *\n * see: https://github.com/WordPress/gutenberg/pull/40393/files#r864632012\n *\n * @param {Object} blockTypeSettings Original block settings.\n * @return {Object} Filtered block settings.\n */\nexport function addMetaAttribute( blockTypeSettings ) {\n\t// Allow blocks to specify their own attribute definition with default values if needed.\n\tif ( blockTypeSettings?.attributes?.[ META_ATTRIBUTE_NAME ]?.type ) {\n\t\treturn blockTypeSettings;\n\t}\n\n\tconst supportsBlockNaming = hasBlockMetadataSupport(\n\t\tblockTypeSettings,\n\t\t'name',\n\t\tfalse\n\t);\n\n\tif ( supportsBlockNaming ) {\n\t\tblockTypeSettings.attributes = {\n\t\t\t...blockTypeSettings.attributes,\n\t\t\t[ META_ATTRIBUTE_NAME ]: {\n\t\t\t\ttype: 'object',\n\t\t\t},\n\t\t};\n\t}\n\n\treturn blockTypeSettings;\n}\n\nexport function addSaveProps( extraProps, blockType, attributes ) {\n\tif ( hasBlockMetadataSupport( blockType ) ) {\n\t\textraProps[ META_ATTRIBUTE_NAME ] = attributes[ META_ATTRIBUTE_NAME ];\n\t}\n\n\treturn extraProps;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/metadata/addMetaAttribute',\n\taddMetaAttribute\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'core/metadata/save-props',\n\taddSaveProps\n);\n","/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getBorderClasses, getMultiOriginColor } from './border';\nimport useMultipleOriginColorsAndGradients from '../components/colors-gradients/use-multiple-origin-colors-and-gradients';\n\n// This utility is intended to assist where the serialization of the border\n// block support is being skipped for a block but the border related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's border support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n * @return {Object} Border block support derived CSS classes & styles.\n */\nexport function getBorderClassesAndStyles( attributes ) {\n\tconst border = attributes.style?.border || {};\n\tconst className = getBorderClasses( attributes );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: getInlineStyles( { border } ),\n\t};\n}\n\n/**\n * Derives the border related props for a block from its border block support\n * attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from border block support.\n */\nexport function useBorderProps( attributes ) {\n\tconst { colors } = useMultipleOriginColorsAndGradients();\n\tconst borderProps = getBorderClassesAndStyles( attributes );\n\tconst { borderColor } = attributes;\n\n\t// Force inline styles to apply named border colors when themes do not load\n\t// their color stylesheets in the editor.\n\tif ( borderColor ) {\n\t\tconst borderColorObject = getMultiOriginColor( {\n\t\t\tcolors,\n\t\t\tnamedColor: borderColor,\n\t\t} );\n\n\t\tborderProps.style.borderColor = borderColorObject.color;\n\t}\n\n\treturn borderProps;\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport {\n\tgetColorClassName,\n\tgetColorObjectByAttributeValues,\n} from '../components/colors';\nimport {\n\t__experimentalGetGradientClass,\n\tgetGradientValueBySlug,\n} from '../components/gradients';\nimport useSetting from '../components/use-setting';\n\n// The code in this file has largely been lifted from the color block support\n// hook.\n//\n// This utility is intended to assist where the serialization of the colors\n// block support is being skipped for a block but the color related CSS classes\n// & styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's color support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Color block support derived CSS classes & styles.\n */\nexport function getColorClassesAndStyles( attributes ) {\n\tconst { backgroundColor, textColor, gradient, style } = attributes;\n\n\t// Collect color CSS classes.\n\tconst backgroundClass = getColorClassName(\n\t\t'background-color',\n\t\tbackgroundColor\n\t);\n\tconst textClass = getColorClassName( 'color', textColor );\n\n\tconst gradientClass = __experimentalGetGradientClass( gradient );\n\tconst hasGradient = gradientClass || style?.color?.gradient;\n\n\t// Determine color CSS class name list.\n\tconst className = classnames( textClass, gradientClass, {\n\t\t// Don't apply the background class if there's a gradient.\n\t\t[ backgroundClass ]: ! hasGradient && !! backgroundClass,\n\t\t'has-text-color': textColor || style?.color?.text,\n\t\t'has-background':\n\t\t\tbackgroundColor ||\n\t\t\tstyle?.color?.background ||\n\t\t\tgradient ||\n\t\t\tstyle?.color?.gradient,\n\t\t'has-link-color': style?.elements?.link?.color,\n\t} );\n\n\t// Collect inline styles for colors.\n\tconst colorStyles = style?.color || {};\n\tconst styleProp = getInlineStyles( { color: colorStyles } );\n\n\treturn {\n\t\tclassName: className || undefined,\n\t\tstyle: styleProp,\n\t};\n}\n\nconst EMPTY_OBJECT = {};\n\n/**\n * Determines the color related props for a block derived from its color block\n * support attributes.\n *\n * Inline styles are forced for named colors to ensure these selections are\n * reflected when themes do not load their color stylesheets in the editor.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} ClassName & style props from colors block support.\n */\nexport function useColorProps( attributes ) {\n\tconst { backgroundColor, textColor, gradient } = attributes;\n\n\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\tconst userPalette = useSetting( 'color.palette.custom' ) || [];\n\tconst themePalette = useSetting( 'color.palette.theme' ) || [];\n\tconst defaultPalette = useSetting( 'color.palette.default' ) || [];\n\tconst gradientsPerOrigin = useSetting( 'color.gradients' ) || EMPTY_OBJECT;\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( userPalette || [] ),\n\t\t\t...( themePalette || [] ),\n\t\t\t...( defaultPalette || [] ),\n\t\t],\n\t\t[ userPalette, themePalette, defaultPalette ]\n\t);\n\tconst gradients = useMemo(\n\t\t() => [\n\t\t\t...( gradientsPerOrigin?.custom || [] ),\n\t\t\t...( gradientsPerOrigin?.theme || [] ),\n\t\t\t...( gradientsPerOrigin?.default || [] ),\n\t\t],\n\t\t[ gradientsPerOrigin ]\n\t);\n\n\tconst colorProps = getColorClassesAndStyles( attributes );\n\n\t// Force inline styles to apply colors when themes do not load their color\n\t// stylesheets in the editor.\n\tif ( backgroundColor ) {\n\t\tconst backgroundColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\tbackgroundColor\n\t\t);\n\n\t\tcolorProps.style.backgroundColor = backgroundColorObject.color;\n\t}\n\n\tif ( gradient ) {\n\t\tcolorProps.style.background = getGradientValueBySlug(\n\t\t\tgradients,\n\t\t\tgradient\n\t\t);\n\t}\n\n\tif ( textColor ) {\n\t\tconst textColorObject = getColorObjectByAttributeValues(\n\t\t\tcolors,\n\t\t\ttextColor\n\t\t);\n\n\t\tcolorProps.style.color = textColorObject.color;\n\t}\n\n\treturn colorProps;\n}\n","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\n/**\n * Internal dependencies\n */\nimport { hasBlockMetadataSupport } from './metadata';\n\n/**\n * Filters registered block settings, adding an `__experimentalLabel` callback if one does not already exist.\n *\n * @param {Object} settings Original block settings.\n *\n * @return {Object} Filtered block settings.\n */\nexport function addLabelCallback( settings ) {\n\t// If blocks provide their own label callback, do not override it.\n\tif ( settings.__experimentalLabel ) {\n\t\treturn settings;\n\t}\n\n\tconst supportsBlockNaming = hasBlockMetadataSupport(\n\t\tsettings,\n\t\t'name',\n\t\tfalse // default value\n\t);\n\n\t// Check whether block metadata is supported before using it.\n\tif ( supportsBlockNaming ) {\n\t\tsettings.__experimentalLabel = ( attributes, { context } ) => {\n\t\t\tconst { metadata } = attributes;\n\n\t\t\t// In the list view, use the block's name attribute as the label.\n\t\t\tif ( context === 'list-view' && metadata?.name ) {\n\t\t\t\treturn metadata.name;\n\t\t\t}\n\t\t};\n\t}\n\n\treturn settings;\n}\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'core/metadata/addLabelCallback',\n\taddLabelCallback\n);\n","/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\n\n// This utility is intended to assist where the serialization of the spacing\n// block support is being skipped for a block but the spacing related CSS\n// styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's spacing support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Spacing block support derived CSS classes & styles.\n */\nexport function getSpacingClassesAndStyles( attributes ) {\n\tconst { style } = attributes;\n\n\t// Collect inline styles for spacing.\n\tconst spacingStyles = style?.spacing || {};\n\tconst styleProp = getInlineStyles( { spacing: spacingStyles } );\n\n\treturn {\n\t\tstyle: styleProp,\n\t};\n}\n","/**\n * External dependencies\n */\nimport { kebabCase } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport { getInlineStyles } from './style';\nimport { getFontSizeClass } from '../components/font-sizes';\n\n// This utility is intended to assist where the serialization of the typography\n// block support is being skipped for a block but the typography related CSS\n// styles still need to be generated so they can be applied to inner elements.\n\n/**\n * Provides the CSS class names and inline styles for a block's typography support\n * attributes.\n *\n * @param {Object} attributes Block attributes.\n *\n * @return {Object} Typography block support derived CSS classes & styles.\n */\nexport function getTypographyClassesAndStyles( attributes ) {\n\tconst typographyStyles = attributes?.style?.typography || {};\n\tconst style = getInlineStyles( { typography: typographyStyles } );\n\tconst fontFamilyClassName = !! attributes?.fontFamily\n\t\t? `has-${ kebabCase( attributes.fontFamily ) }-font-family`\n\t\t: '';\n\n\tconst className = classnames(\n\t\tfontFamilyClassName,\n\t\tgetFontSizeClass( attributes?.fontSize )\n\t);\n\n\treturn {\n\t\tclassName,\n\t\tstyle,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\n\n/**\n * Keeps an up-to-date copy of the passed value and returns it. If value becomes falsy, it will return the last truthy copy.\n *\n * @param {any} value\n * @return {any} value\n */\nexport function useCachedTruthy( value ) {\n\tconst [ cachedValue, setCachedValue ] = useState( value );\n\tuseEffect( () => {\n\t\tif ( value ) {\n\t\t\tsetCachedValue( value );\n\t\t}\n\t}, [ value ] );\n\treturn cachedValue;\n}\n","/**\n * External dependencies\n */\nimport { kebabCase, reduce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo, Component } from '@wordpress/element';\nimport { compose, createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport {\n\tgetColorClassName,\n\tgetColorObjectByColorValue,\n\tgetColorObjectByAttributeValues,\n\tgetMostReadableColor,\n} from './utils';\nimport useSetting from '../use-setting';\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher order component factory for injecting the `colorsArray` argument as\n * the colors prop in the `withCustomColors` HOC.\n *\n * @param {Array} colorsArray An array of color objects.\n *\n * @return {Function} The higher order component.\n */\nconst withCustomColorPalette = ( colorsArray ) =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) =>\n\t\t\t<WrappedComponent { ...props } colors={ colorsArray } />,\n\t\t'withCustomColorPalette'\n\t);\n\n/**\n * Higher order component factory for injecting the editor colors as the\n * `colors` prop in the `withColors` HOC.\n *\n * @return {Function} The higher order component.\n */\nconst withEditorColorPalette = () =>\n\tcreateHigherOrderComponent(\n\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t// Some color settings have a special handling for deprecated flags in `useSetting`,\n\t\t\t// so we can't unwrap them by doing const { ... } = useSetting('color')\n\t\t\t// until https://github.com/WordPress/gutenberg/issues/37094 is fixed.\n\t\t\tconst userPalette = useSetting( 'color.palette.custom' );\n\t\t\tconst themePalette = useSetting( 'color.palette.theme' );\n\t\t\tconst defaultPalette = useSetting( 'color.palette.default' );\n\t\t\tconst allColors = useMemo(\n\t\t\t\t() => [\n\t\t\t\t\t...( userPalette || [] ),\n\t\t\t\t\t...( themePalette || [] ),\n\t\t\t\t\t...( defaultPalette || [] ),\n\t\t\t\t],\n\t\t\t\t[ userPalette, themePalette, defaultPalette ]\n\t\t\t);\n\t\t\treturn <WrappedComponent { ...props } colors={ allColors } />;\n\t\t},\n\t\t'withEditorColorPalette'\n\t);\n\n/**\n * Helper function used with `createHigherOrderComponent` to create\n * higher order components for managing color logic.\n *\n * @param {Array}    colorTypes       An array of color types (e.g. 'backgroundColor, borderColor).\n * @param {Function} withColorPalette A HOC for injecting the 'colors' prop into the WrappedComponent.\n *\n * @return {WPComponent} The component that can be used as a HOC.\n */\nfunction createColorHOC( colorTypes, withColorPalette ) {\n\tconst colorMap = reduce(\n\t\tcolorTypes,\n\t\t( colorObject, colorType ) => {\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\t...( typeof colorType === 'string'\n\t\t\t\t\t? { [ colorType ]: kebabCase( colorType ) }\n\t\t\t\t\t: colorType ),\n\t\t\t};\n\t\t},\n\t\t{}\n\t);\n\n\treturn compose( [\n\t\twithColorPalette,\n\t\t( WrappedComponent ) => {\n\t\t\treturn class extends Component {\n\t\t\t\tconstructor( props ) {\n\t\t\t\t\tsuper( props );\n\n\t\t\t\t\tthis.setters = this.createSetters();\n\t\t\t\t\tthis.colorUtils = {\n\t\t\t\t\t\tgetMostReadableColor:\n\t\t\t\t\t\t\tthis.getMostReadableColor.bind( this ),\n\t\t\t\t\t};\n\n\t\t\t\t\tthis.state = {};\n\t\t\t\t}\n\n\t\t\t\tgetMostReadableColor( colorValue ) {\n\t\t\t\t\tconst { colors } = this.props;\n\t\t\t\t\treturn getMostReadableColor( colors, colorValue );\n\t\t\t\t}\n\n\t\t\t\tcreateSetters() {\n\t\t\t\t\treturn reduce(\n\t\t\t\t\t\tcolorMap,\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tsettersAccumulator,\n\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\tcolorAttributeName\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tconst upperFirstColorAttributeName =\n\t\t\t\t\t\t\t\tupperFirst( colorAttributeName );\n\t\t\t\t\t\t\tconst customColorAttributeName = `custom${ upperFirstColorAttributeName }`;\n\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t`set${ upperFirstColorAttributeName }`\n\t\t\t\t\t\t\t] = this.createSetColor(\n\t\t\t\t\t\t\t\tcolorAttributeName,\n\t\t\t\t\t\t\t\tcustomColorAttributeName\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn settersAccumulator;\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\n\t\t\t\tcreateSetColor( colorAttributeName, customColorAttributeName ) {\n\t\t\t\t\treturn ( colorValue ) => {\n\t\t\t\t\t\tconst colorObject = getColorObjectByColorValue(\n\t\t\t\t\t\t\tthis.props.colors,\n\t\t\t\t\t\t\tcolorValue\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t[ colorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? colorObject.slug\n\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t[ customColorAttributeName ]:\n\t\t\t\t\t\t\t\tcolorObject && colorObject.slug\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: colorValue,\n\t\t\t\t\t\t} );\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t{ attributes, colors },\n\t\t\t\t\tpreviousState\n\t\t\t\t) {\n\t\t\t\t\treturn reduce(\n\t\t\t\t\t\tcolorMap,\n\t\t\t\t\t\t( newState, colorContext, colorAttributeName ) => {\n\t\t\t\t\t\t\tconst colorObject = getColorObjectByAttributeValues(\n\t\t\t\t\t\t\t\tcolors,\n\t\t\t\t\t\t\t\tattributes[ colorAttributeName ],\n\t\t\t\t\t\t\t\tattributes[\n\t\t\t\t\t\t\t\t\t`custom${ upperFirst(\n\t\t\t\t\t\t\t\t\t\tcolorAttributeName\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\tconst previousColorObject =\n\t\t\t\t\t\t\t\tpreviousState[ colorAttributeName ];\n\t\t\t\t\t\t\tconst previousColor = previousColorObject?.color;\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * The \"and previousColorObject\" condition checks that a previous color object was already computed.\n\t\t\t\t\t\t\t * At the start previousColorObject and colorValue are both equal to undefined\n\t\t\t\t\t\t\t * bus as previousColorObject does not exist we should compute the object.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tpreviousColor === colorObject.color &&\n\t\t\t\t\t\t\t\tpreviousColorObject\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] =\n\t\t\t\t\t\t\t\t\tpreviousColorObject;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewState[ colorAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...colorObject,\n\t\t\t\t\t\t\t\t\tclass: getColorClassName(\n\t\t\t\t\t\t\t\t\t\tcolorContext,\n\t\t\t\t\t\t\t\t\t\tcolorObject.slug\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\treturn newState;\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\n\t\t\t\trender() {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\tcolors: undefined,\n\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\tcolorUtils: this.colorUtils,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t] );\n}\n\n/**\n * A higher-order component factory for creating a 'withCustomColors' HOC, which handles color logic\n * for class generation color value, retrieval and color attribute setting.\n *\n * Use this higher-order component to work with a custom set of colors.\n *\n * @example\n *\n * ```jsx\n * const CUSTOM_COLORS = [ { name: 'Red', slug: 'red', color: '#ff0000' }, { name: 'Blue', slug: 'blue', color: '#0000ff' } ];\n * const withCustomColors = createCustomColorsHOC( CUSTOM_COLORS );\n * // ...\n * export default compose(\n *     withCustomColors( 'backgroundColor', 'borderColor' ),\n *     MyColorfulComponent,\n * );\n * ```\n *\n * @param {Array} colorsArray The array of color objects (name, slug, color, etc... ).\n *\n * @return {Function} Higher-order component.\n */\nexport function createCustomColorsHOC( colorsArray ) {\n\treturn ( ...colorTypes ) => {\n\t\tconst withColorPalette = withCustomColorPalette( colorsArray );\n\t\treturn createHigherOrderComponent(\n\t\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t\t'withCustomColors'\n\t\t);\n\t};\n}\n\n/**\n * A higher-order component, which handles color logic for class generation color value, retrieval and color attribute setting.\n *\n * For use with the default editor/theme color palette.\n *\n * @example\n *\n * ```jsx\n * export default compose(\n *     withColors( 'backgroundColor', { textColor: 'color' } ),\n *     MyColorfulComponent,\n * );\n * ```\n *\n * @param {...(Object|string)} colorTypes The arguments can be strings or objects. If the argument is an object,\n *                                        it should contain the color attribute name as key and the color context as value.\n *                                        If the argument is a string the value should be the color attribute name,\n *                                        the color context is computed by applying a kebab case transform to the value.\n *                                        Color context represents the context/place where the color is going to be used.\n *                                        The class name of the color is generated using 'has' followed by the color name\n *                                        and ending with the color context all in kebab case e.g: has-green-background-color.\n *\n * @return {Function} Higher-order component.\n */\nexport default function withColors( ...colorTypes ) {\n\tconst withColorPalette = withEditorColorPalette();\n\treturn createHigherOrderComponent(\n\t\tcreateColorHOC( colorTypes, withColorPalette ),\n\t\t'withColors'\n\t);\n}\n","/**\n * External dependencies\n */\nimport { find, pickBy, reduce, some } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, compose } from '@wordpress/compose';\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getFontSize, getFontSizeClass } from './utils';\nimport useSetting from '../use-setting';\n\nconst DEFAULT_FONT_SIZES = [];\n\n/**\n * Capitalizes the first letter in a string.\n *\n * @param {string} str The string whose first letter the function will capitalize.\n *\n * @return {string} Capitalized string.\n */\nconst upperFirst = ( [ firstLetter, ...rest ] ) =>\n\tfirstLetter.toUpperCase() + rest.join( '' );\n\n/**\n * Higher-order component, which handles font size logic for class generation,\n * font size value retrieval, and font size change handling.\n *\n * @param {...(Object|string)} fontSizeNames The arguments should all be strings.\n *                                           Each string contains the font size\n *                                           attribute name e.g: 'fontSize'.\n *\n * @return {Function} Higher-order component.\n */\nexport default ( ...fontSizeNames ) => {\n\t/*\n\t * Computes an object whose key is the font size attribute name as passed in the array,\n\t * and the value is the custom font size attribute name.\n\t * Custom font size is automatically compted by appending custom followed by the font size attribute name in with the first letter capitalized.\n\t */\n\tconst fontSizeAttributeNames = reduce(\n\t\tfontSizeNames,\n\t\t( fontSizeAttributeNamesAccumulator, fontSizeAttributeName ) => {\n\t\t\tfontSizeAttributeNamesAccumulator[\n\t\t\t\tfontSizeAttributeName\n\t\t\t] = `custom${ upperFirst( fontSizeAttributeName ) }`;\n\t\t\treturn fontSizeAttributeNamesAccumulator;\n\t\t},\n\t\t{}\n\t);\n\n\treturn createHigherOrderComponent(\n\t\tcompose( [\n\t\t\tcreateHigherOrderComponent(\n\t\t\t\t( WrappedComponent ) => ( props ) => {\n\t\t\t\t\tconst fontSizes =\n\t\t\t\t\t\tuseSetting( 'typography.fontSizes' ) ||\n\t\t\t\t\t\tDEFAULT_FONT_SIZES;\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\tfontSizes={ fontSizes }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\t'withFontSizes'\n\t\t\t),\n\t\t\t( WrappedComponent ) => {\n\t\t\t\treturn class extends Component {\n\t\t\t\t\tconstructor( props ) {\n\t\t\t\t\t\tsuper( props );\n\n\t\t\t\t\t\tthis.setters = this.createSetters();\n\n\t\t\t\t\t\tthis.state = {};\n\t\t\t\t\t}\n\n\t\t\t\t\tcreateSetters() {\n\t\t\t\t\t\treturn reduce(\n\t\t\t\t\t\t\tfontSizeAttributeNames,\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tsettersAccumulator,\n\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tconst upperFirstFontSizeAttributeName =\n\t\t\t\t\t\t\t\t\tupperFirst( fontSizeAttributeName );\n\t\t\t\t\t\t\t\tsettersAccumulator[\n\t\t\t\t\t\t\t\t\t`set${ upperFirstFontSizeAttributeName }`\n\t\t\t\t\t\t\t\t] = this.createSetFontSize(\n\t\t\t\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn settersAccumulator;\n\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\n\t\t\t\t\tcreateSetFontSize(\n\t\t\t\t\t\tfontSizeAttributeName,\n\t\t\t\t\t\tcustomFontSizeAttributeName\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn ( fontSizeValue ) => {\n\t\t\t\t\t\t\tconst fontSizeObject = find( this.props.fontSizes, {\n\t\t\t\t\t\t\t\tsize: Number( fontSizeValue ),\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\tthis.props.setAttributes( {\n\t\t\t\t\t\t\t\t[ fontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\t\t\t[ customFontSizeAttributeName ]:\n\t\t\t\t\t\t\t\t\tfontSizeObject && fontSizeObject.slug\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: fontSizeValue,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tstatic getDerivedStateFromProps(\n\t\t\t\t\t\t{ attributes, fontSizes },\n\t\t\t\t\t\tpreviousState\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst didAttributesChange = (\n\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tif ( previousState[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t// If new font size is name compare with the previous slug.\n\t\t\t\t\t\t\t\tif ( attributes[ fontSizeAttributeName ] ) {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ] !==\n\t\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t\t.slug\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// If font size is not named, update when the font size value changes.\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\tpreviousState[ fontSizeAttributeName ]\n\t\t\t\t\t\t\t\t\t\t.size !==\n\t\t\t\t\t\t\t\t\tattributes[ customFontSizeAttributeName ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// In this case we need to build the font size object.\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! some(\n\t\t\t\t\t\t\t\tfontSizeAttributeNames,\n\t\t\t\t\t\t\t\tdidAttributesChange\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst newState = reduce(\n\t\t\t\t\t\t\tpickBy(\n\t\t\t\t\t\t\t\tfontSizeAttributeNames,\n\t\t\t\t\t\t\t\tdidAttributesChange\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tnewStateAccumulator,\n\t\t\t\t\t\t\t\tcustomFontSizeAttributeName,\n\t\t\t\t\t\t\t\tfontSizeAttributeName\n\t\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\t\tconst fontSizeAttributeValue =\n\t\t\t\t\t\t\t\t\tattributes[ fontSizeAttributeName ];\n\t\t\t\t\t\t\t\tconst fontSizeObject = getFontSize(\n\t\t\t\t\t\t\t\t\tfontSizes,\n\t\t\t\t\t\t\t\t\tfontSizeAttributeValue,\n\t\t\t\t\t\t\t\t\tattributes[ customFontSizeAttributeName ]\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tnewStateAccumulator[ fontSizeAttributeName ] = {\n\t\t\t\t\t\t\t\t\t...fontSizeObject,\n\t\t\t\t\t\t\t\t\tclass: getFontSizeClass(\n\t\t\t\t\t\t\t\t\t\tfontSizeAttributeValue\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\treturn newStateAccumulator;\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...previousState,\n\t\t\t\t\t\t\t...newState,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\trender() {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t\t\t{ ...{\n\t\t\t\t\t\t\t\t\t...this.props,\n\t\t\t\t\t\t\t\t\tfontSizes: undefined,\n\t\t\t\t\t\t\t\t\t...this.state,\n\t\t\t\t\t\t\t\t\t...this.setters,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\t\t] ),\n\t\t'withFontSizes'\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst alignLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport default alignLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst alignCenter = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z\" />\n\t</SVG>\n);\n\nexport default alignCenter;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst alignRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z\" />\n\t</SVG>\n);\n\nexport default alignRight;\n","/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { ToolbarDropdownMenu, ToolbarGroup } from '@wordpress/components';\nimport { alignLeft, alignRight, alignCenter } from '@wordpress/icons';\n\nconst DEFAULT_ALIGNMENT_CONTROLS = [\n\t{\n\t\ticon: alignLeft,\n\t\ttitle: __( 'Align text left' ),\n\t\talign: 'left',\n\t},\n\t{\n\t\ticon: alignCenter,\n\t\ttitle: __( 'Align text center' ),\n\t\talign: 'center',\n\t},\n\t{\n\t\ticon: alignRight,\n\t\ttitle: __( 'Align text right' ),\n\t\talign: 'right',\n\t},\n];\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n\tisAlternate: true,\n};\n\nfunction AlignmentUI( {\n\tvalue,\n\tonChange,\n\talignmentControls = DEFAULT_ALIGNMENT_CONTROLS,\n\tlabel = __( 'Align' ),\n\tdescribedBy = __( 'Change text alignment' ),\n\tisCollapsed = true,\n\tisToolbar,\n} ) {\n\tfunction applyOrUnset( align ) {\n\t\treturn () => onChange( value === align ? undefined : align );\n\t}\n\n\tconst activeAlignment = find(\n\t\talignmentControls,\n\t\t( control ) => control.align === value\n\t);\n\n\tfunction setIcon() {\n\t\tif ( activeAlignment ) return activeAlignment.icon;\n\t\treturn isRTL() ? alignRight : alignLeft;\n\t}\n\n\tconst UIComponent = isToolbar ? ToolbarGroup : ToolbarDropdownMenu;\n\tconst extraProps = isToolbar\n\t\t? { isCollapsed }\n\t\t: {\n\t\t\t\ttoggleProps: {\n\t\t\t\t\tdescribedBy,\n\t\t\t\t},\n\t\t\t\tpopoverProps: POPOVER_PROPS,\n\t\t  };\n\n\treturn (\n\t\t<UIComponent\n\t\t\ticon={ setIcon() }\n\t\t\tlabel={ label }\n\t\t\tcontrols={ alignmentControls.map( ( control ) => {\n\t\t\t\tconst { align } = control;\n\t\t\t\tconst isActive = value === align;\n\n\t\t\t\treturn {\n\t\t\t\t\t...control,\n\t\t\t\t\tisActive,\n\t\t\t\t\trole: isCollapsed ? 'menuitemradio' : undefined,\n\t\t\t\t\tonClick: applyOrUnset( align ),\n\t\t\t\t};\n\t\t\t} ) }\n\t\t\t{ ...extraProps }\n\t\t/>\n\t);\n}\n\nexport default AlignmentUI;\n","/**\n * Internal dependencies\n */\nimport AlignmentUI from './ui';\n\nconst AlignmentControl = ( props ) => {\n\treturn <AlignmentUI { ...props } isToolbar={ false } />;\n};\n\nconst AlignmentToolbar = ( props ) => {\n\treturn <AlignmentUI { ...props } isToolbar />;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/alignment-control/README.md\n */\nexport { AlignmentControl, AlignmentToolbar };\n","/**\n * External dependencies\n */\nimport { orderBy } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcreateBlock,\n\tcreateBlocksFromInnerBlocksTemplate,\n} from '@wordpress/blocks';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { searchBlockItems } from '../components/inserter/search-items';\nimport useBlockTypesState from '../components/inserter/hooks/use-block-types-state';\nimport BlockIcon from '../components/block-icon';\nimport { store as blockEditorStore } from '../store';\n\nconst noop = () => {};\nconst SHOWN_BLOCK_TYPES = 9;\n\n/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */\n\n/**\n * Creates a blocks repeater for replacing the current block with a selected block type.\n *\n * @return {WPCompleter} A blocks completer.\n */\nfunction createBlockCompleter() {\n\treturn {\n\t\tname: 'blocks',\n\t\tclassName: 'block-editor-autocompleters__block',\n\t\ttriggerPrefix: '/',\n\n\t\tuseItems( filterValue ) {\n\t\t\tconst { rootClientId, selectedBlockName } = useSelect(\n\t\t\t\t( select ) => {\n\t\t\t\t\tconst {\n\t\t\t\t\t\tgetSelectedBlockClientId,\n\t\t\t\t\t\tgetBlockName,\n\t\t\t\t\t\tgetBlockInsertionPoint,\n\t\t\t\t\t} = select( blockEditorStore );\n\t\t\t\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\t\t\t\treturn {\n\t\t\t\t\t\tselectedBlockName: selectedBlockClientId\n\t\t\t\t\t\t\t? getBlockName( selectedBlockClientId )\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\trootClientId: getBlockInsertionPoint().rootClientId,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\t[]\n\t\t\t);\n\t\t\tconst [ items, categories, collections ] = useBlockTypesState(\n\t\t\t\trootClientId,\n\t\t\t\tnoop\n\t\t\t);\n\n\t\t\tconst filteredItems = useMemo( () => {\n\t\t\t\tconst initialFilteredItems = !! filterValue.trim()\n\t\t\t\t\t? searchBlockItems(\n\t\t\t\t\t\t\titems,\n\t\t\t\t\t\t\tcategories,\n\t\t\t\t\t\t\tcollections,\n\t\t\t\t\t\t\tfilterValue\n\t\t\t\t\t  )\n\t\t\t\t\t: orderBy( items, [ 'frecency' ], [ 'desc' ] );\n\n\t\t\t\treturn initialFilteredItems\n\t\t\t\t\t.filter( ( item ) => item.name !== selectedBlockName )\n\t\t\t\t\t.slice( 0, SHOWN_BLOCK_TYPES );\n\t\t\t}, [\n\t\t\t\tfilterValue,\n\t\t\t\tselectedBlockName,\n\t\t\t\titems,\n\t\t\t\tcategories,\n\t\t\t\tcollections,\n\t\t\t] );\n\n\t\t\tconst options = useMemo(\n\t\t\t\t() =>\n\t\t\t\t\tfilteredItems.map( ( blockItem ) => {\n\t\t\t\t\t\tconst { title, icon, isDisabled } = blockItem;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tkey: `block-${ blockItem.id }`,\n\t\t\t\t\t\t\tvalue: blockItem,\n\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<BlockIcon\n\t\t\t\t\t\t\t\t\t\tkey=\"icon\"\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tshowColors\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tisDisabled,\n\t\t\t\t\t\t};\n\t\t\t\t\t} ),\n\t\t\t\t[ filteredItems ]\n\t\t\t);\n\n\t\t\treturn [ options ];\n\t\t},\n\t\tallowContext( before, after ) {\n\t\t\treturn ! ( /\\S/.test( before ) || /\\S/.test( after ) );\n\t\t},\n\t\tgetOptionCompletion( inserterItem ) {\n\t\t\tconst { name, initialAttributes, innerBlocks } = inserterItem;\n\t\t\treturn {\n\t\t\t\taction: 'replace',\n\t\t\t\tvalue: createBlock(\n\t\t\t\t\tname,\n\t\t\t\t\tinitialAttributes,\n\t\t\t\t\tcreateBlocksFromInnerBlocksTemplate( innerBlocks )\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t};\n}\n\n/**\n * Creates a blocks repeater for replacing the current block with a selected block type.\n *\n * @return {WPCompleter} A blocks completer.\n */\nexport default createBlockCompleter();\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","/**\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=\"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z\" />\n\t</SVG>\n);\n\nexport default page;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst post = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m7.3 9.7 1.4 1.4c.2-.2.3-.3.4-.5 0 0 0-.1.1-.1.3-.5.4-1.1.3-1.6L12 7 9 4 7.2 6.5c-.6-.1-1.1 0-1.6.3 0 0-.1 0-.1.1-.3.1-.4.2-.6.4l1.4 1.4L4 11v1h1l2.3-2.3zM4 20h9v-1.5H4V20zm0-5.5V16h16v-1.5H4z\" />\n\t</SVG>\n);\n\nexport default post;\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { addQueryArgs } from '@wordpress/url';\nimport { Icon, page, post } from '@wordpress/icons';\n\nconst SHOWN_SUGGESTIONS = 10;\n\n/** @typedef {import('@wordpress/components').WPCompleter} WPCompleter */\n\n/**\n * Creates a suggestion list for links to posts or pages.\n *\n * @return {WPCompleter} A links completer.\n */\nfunction createLinkCompleter() {\n\treturn {\n\t\tname: 'links',\n\t\tclassName: 'block-editor-autocompleters__link',\n\t\ttriggerPrefix: '[[',\n\t\toptions: async ( letters ) => {\n\t\t\tlet options = await apiFetch( {\n\t\t\t\tpath: addQueryArgs( '/wp/v2/search', {\n\t\t\t\t\tper_page: SHOWN_SUGGESTIONS,\n\t\t\t\t\tsearch: letters,\n\t\t\t\t\ttype: 'post',\n\t\t\t\t\torder_by: 'menu_order',\n\t\t\t\t} ),\n\t\t\t} );\n\n\t\t\toptions = options.filter( ( option ) => option.title !== '' );\n\n\t\t\treturn options;\n\t\t},\n\t\tgetOptionKeywords( item ) {\n\t\t\tconst expansionWords = item.title.split( /\\s+/ );\n\t\t\treturn [ ...expansionWords ];\n\t\t},\n\t\tgetOptionLabel( item ) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tkey=\"icon\"\n\t\t\t\t\t\ticon={ item.subtype === 'page' ? page : post }\n\t\t\t\t\t/>\n\t\t\t\t\t{ item.title }\n\t\t\t\t</>\n\t\t\t);\n\t\t},\n\t\tgetOptionCompletion( item ) {\n\t\t\treturn <a href={ item.url }>{ item.title }</a>;\n\t\t},\n\t};\n}\n\n/**\n * Creates a suggestion list for links to posts or pages..\n *\n * @return {WPCompleter} A link completer.\n */\nexport default createLinkCompleter();\n","/**\n * External dependencies\n */\nimport { clone } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { applyFilters, hasFilter } from '@wordpress/hooks';\nimport {\n\tAutocomplete,\n\t__unstableUseAutocompleteProps as useAutocompleteProps,\n} from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\nimport { getDefaultBlockName, getBlockSupport } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\nimport blockAutocompleter from '../../autocompleters/block';\nimport linkAutocompleter from '../../autocompleters/link';\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}\n */\nconst EMPTY_ARRAY = [];\n\nfunction useCompleters( { completers = EMPTY_ARRAY } ) {\n\tconst { name } = useBlockEditContext();\n\treturn useMemo( () => {\n\t\tlet filteredCompleters = [ ...completers, linkAutocompleter ];\n\n\t\tif (\n\t\t\tname === getDefaultBlockName() ||\n\t\t\tgetBlockSupport( name, '__experimentalSlashInserter', false )\n\t\t) {\n\t\t\tfilteredCompleters = [ ...filteredCompleters, blockAutocompleter ];\n\t\t}\n\n\t\tif ( hasFilter( 'editor.Autocomplete.completers' ) ) {\n\t\t\t// Provide copies so filters may directly modify them.\n\t\t\tif ( filteredCompleters === completers ) {\n\t\t\t\tfilteredCompleters = filteredCompleters.map( clone );\n\t\t\t}\n\n\t\t\tfilteredCompleters = applyFilters(\n\t\t\t\t'editor.Autocomplete.completers',\n\t\t\t\tfilteredCompleters,\n\t\t\t\tname\n\t\t\t);\n\t\t}\n\n\t\treturn filteredCompleters;\n\t}, [ completers, name ] );\n}\n\nexport function useBlockEditorAutocompleteProps( props ) {\n\treturn useAutocompleteProps( {\n\t\t...props,\n\t\tcompleters: useCompleters( props ),\n\t} );\n}\n\n/**\n * Wrap the default Autocomplete component with one that supports a filter hook\n * for customizing its list of autocompleters.\n *\n * @type {import('react').FC}\n */\nfunction BlockEditorAutocomplete( props ) {\n\treturn <Autocomplete { ...props } completers={ useCompleters( props ) } />;\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/autocomplete/README.md\n */\nexport default BlockEditorAutocomplete;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst fullscreen = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4.2 9h1.5V5.8H9V4.2H4.2V9zm14 9.2H15v1.5h4.8V15h-1.5v3.2zM15 4.2v1.5h3.2V9h1.5V4.2H15zM5.8 15H4.2v4.8H9v-1.5H5.8V15z\" />\n\t</SVG>\n);\n\nexport default fullscreen;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ToolbarButton } from '@wordpress/components';\nimport { fullscreen } from '@wordpress/icons';\n\nfunction BlockFullHeightAlignmentControl( {\n\tisActive,\n\tlabel = __( 'Toggle full height' ),\n\tonToggle,\n\tisDisabled,\n} ) {\n\treturn (\n\t\t<ToolbarButton\n\t\t\tisActive={ isActive }\n\t\t\ticon={ fullscreen }\n\t\t\tlabel={ label }\n\t\t\tonClick={ () => onToggle( ! isActive ) }\n\t\t\tdisabled={ isDisabled }\n\t\t/>\n\t);\n}\n\nexport default BlockFullHeightAlignmentControl;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport {\n\tToolbarButton,\n\tDropdown,\n\t__experimentalAlignmentMatrixControl as AlignmentMatrixControl,\n} from '@wordpress/components';\n\nconst noop = () => {};\n\nfunction BlockAlignmentMatrixControl( props ) {\n\tconst {\n\t\tlabel = __( 'Change matrix alignment' ),\n\t\tonChange = noop,\n\t\tvalue = 'center',\n\t\tisDisabled,\n\t} = props;\n\n\tconst icon = <AlignmentMatrixControl.Icon value={ value } />;\n\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tpopoverProps={ { isAlternate: true } }\n\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\tconst openOnArrowDown = ( event ) => {\n\t\t\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tonToggle();\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<AlignmentMatrixControl\n\t\t\t\t\thasFocusBorder={ false }\n\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default BlockAlignmentMatrixControl;\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 { Button } from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { chevronRightSmall, Icon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockTitle from '../block-title';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Block breadcrumb component, displaying the hierarchy of the current block selection as a breadcrumb.\n *\n * @param {Object} props               Component props.\n * @param {string} props.rootLabelText Translated label for the root element of the breadcrumb trail.\n * @return {WPElement}                 Block Breadcrumb.\n */\nfunction BlockBreadcrumb( { rootLabelText } ) {\n\tconst { selectBlock, clearSelectedBlock } = useDispatch( blockEditorStore );\n\tconst { clientId, parents, hasSelection } = useSelect( ( select ) => {\n\t\tconst { getSelectionStart, getSelectedBlockClientId, getBlockParents } =\n\t\t\tselect( blockEditorStore );\n\t\tconst selectedBlockClientId = getSelectedBlockClientId();\n\t\treturn {\n\t\t\tparents: getBlockParents( selectedBlockClientId ),\n\t\t\tclientId: selectedBlockClientId,\n\t\t\thasSelection: !! getSelectionStart().clientId,\n\t\t};\n\t}, [] );\n\tconst rootLabel = rootLabelText || __( 'Document' );\n\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\treturn (\n\t\t<ul\n\t\t\tclassName=\"block-editor-block-breadcrumb\"\n\t\t\trole=\"list\"\n\t\t\taria-label={ __( 'Block breadcrumb' ) }\n\t\t>\n\t\t\t<li\n\t\t\t\tclassName={\n\t\t\t\t\t! hasSelection\n\t\t\t\t\t\t? 'block-editor-block-breadcrumb__current'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\taria-current={ ! hasSelection ? 'true' : undefined }\n\t\t\t>\n\t\t\t\t{ hasSelection && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ clearSelectedBlock }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ rootLabel }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t\t{ ! hasSelection && rootLabel }\n\t\t\t\t{ !! clientId && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</li>\n\n\t\t\t{ parents.map( ( parentClientId ) => (\n\t\t\t\t<li key={ parentClientId }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__button\"\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => selectBlock( parentClientId ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockTitle\n\t\t\t\t\t\t\tclientId={ parentClientId }\n\t\t\t\t\t\t\tmaximumLength={ 35 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronRightSmall }\n\t\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__separator\"\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t\t{ !! clientId && (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"block-editor-block-breadcrumb__current\"\n\t\t\t\t\taria-current=\"true\"\n\t\t\t\t>\n\t\t\t\t\t<BlockTitle clientId={ clientId } maximumLength={ 35 } />\n\t\t\t\t</li>\n\t\t\t) }\n\t\t</ul>\n\t\t/* eslint-enable jsx-a11y/no-redundant-roles */\n\t);\n}\n\nexport default BlockBreadcrumb;\n","/**\n * WordPress dependencies\n */\nimport {\n\tToolbarButton,\n\tDropdown,\n\tToolbarGroup,\n\tSVG,\n\tPath,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { DOWN } from '@wordpress/keycodes';\nimport deprecated from '@wordpress/deprecated';\n\nconst ColorSelectorSVGIcon = () => (\n\t<SVG xmlns=\"https://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n\t\t<Path d=\"M7.434 5l3.18 9.16H8.538l-.692-2.184H4.628l-.705 2.184H2L5.18 5h2.254zm-1.13 1.904h-.115l-1.148 3.593H7.44L6.304 6.904zM14.348 7.006c1.853 0 2.9.876 2.9 2.374v4.78h-1.79v-.914h-.114c-.362.64-1.123 1.022-2.031 1.022-1.346 0-2.292-.826-2.292-2.108 0-1.27.972-2.006 2.71-2.107l1.696-.102V9.38c0-.584-.42-.914-1.18-.914-.667 0-1.112.228-1.264.647h-1.701c.12-1.295 1.307-2.107 3.066-2.107zm1.079 4.1l-1.416.09c-.793.056-1.18.342-1.18.844 0 .52.45.837 1.091.837.857 0 1.505-.545 1.505-1.256v-.515z\" />\n\t</SVG>\n);\n\n/**\n * Color Selector Icon component.\n *\n * @param {Object} props           Component properties.\n * @param {Object} props.style     Style object.\n * @param {string} props.className Class name for component.\n *\n * @return {*} React Icon component.\n */\nconst ColorSelectorIcon = ( { style, className } ) => {\n\treturn (\n\t\t<div className=\"block-library-colors-selector__icon-container\">\n\t\t\t<div\n\t\t\t\tclassName={ `${ className } block-library-colors-selector__state-selection` }\n\t\t\t\tstyle={ style }\n\t\t\t>\n\t\t\t\t<ColorSelectorSVGIcon />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\n/**\n * Renders the Colors Selector Toolbar with the icon button.\n *\n * @param {Object} props                 Component properties.\n * @param {Object} props.TextColor       Text color component that wraps icon.\n * @param {Object} props.BackgroundColor Background color component that wraps icon.\n *\n * @return {*} React toggle button component.\n */\nconst renderToggleComponent =\n\t( { TextColor, BackgroundColor } ) =>\n\t( { onToggle, isOpen } ) => {\n\t\tconst openOnArrowDown = ( event ) => {\n\t\t\tif ( ! isOpen && event.keyCode === DOWN ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonToggle();\n\t\t\t}\n\t\t};\n\n\t\treturn (\n\t\t\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tclassName=\"components-toolbar__control block-library-colors-selector__toggle\"\n\t\t\t\t\tlabel={ __( 'Open Colors Selector' ) }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t\ticon={\n\t\t\t\t\t\t<BackgroundColor>\n\t\t\t\t\t\t\t<TextColor>\n\t\t\t\t\t\t\t\t<ColorSelectorIcon />\n\t\t\t\t\t\t\t</TextColor>\n\t\t\t\t\t\t</BackgroundColor>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t);\n\t};\n\nconst BlockColorsStyleSelector = ( { children, ...other } ) => {\n\tdeprecated( `wp.blockEditor.BlockColorsStyleSelector`, {\n\t\talternative: 'block supports API',\n\t\tsince: '6.1',\n\t\tversion: '6.3',\n\t} );\n\n\treturn (\n\t\t<Dropdown\n\t\t\tposition=\"bottom right\"\n\t\t\tclassName=\"block-library-colors-selector\"\n\t\t\tcontentClassName=\"block-library-colors-selector__popover\"\n\t\t\trenderToggle={ renderToggleComponent( other ) }\n\t\t\trenderContent={ () => children }\n\t\t/>\n\t);\n};\n\nexport default BlockColorsStyleSelector;\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=\"M13.8 5.2H3v1.5h10.8V5.2zm-3.6 12v1.5H21v-1.5H10.2zm7.2-6H6.6v1.5h10.8v-1.5z\" />\n\t</SVG>\n);\n\nexport default listView;\n","/**\n * External dependencies\n */\nimport { animated } from '@react-spring/web';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalTreeGridRow as TreeGridRow } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useMovingAnimation from '../use-moving-animation';\n\nconst AnimatedTreeGridRow = animated( TreeGridRow );\n\nexport default function ListViewLeaf( {\n\tisSelected,\n\tposition,\n\tlevel,\n\trowCount,\n\tchildren,\n\tclassName,\n\tpath,\n\t...props\n} ) {\n\tconst ref = useMovingAnimation( {\n\t\tisSelected,\n\t\tadjustScrolling: false,\n\t\tenableAnimation: true,\n\t\ttriggerAnimationOnChange: path,\n\t} );\n\n\treturn (\n\t\t<AnimatedTreeGridRow\n\t\t\tref={ ref }\n\t\t\tclassName={ classnames( 'block-editor-list-view-leaf', className ) }\n\t\t\tlevel={ level }\n\t\t\tpositionInSet={ position }\n\t\t\tsetSize={ rowCount }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t</AnimatedTreeGridRow>\n\t);\n}\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","/**\n * WordPress dependencies\n */\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\nimport { isRTL } from '@wordpress/i18n';\n\nexport default function ListViewExpander( { onClick } ) {\n\treturn (\n\t\t// Keyboard events are handled by TreeGrid see: components/src/tree-grid/index.js\n\t\t//\n\t\t// The expander component is implemented as a pseudo element in the w3 example\n\t\t// https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html\n\t\t//\n\t\t// We've mimicked this by adding an icon with aria-hidden set to true to hide this from the accessibility tree.\n\t\t// For the current tree grid implementation, please do not try to make this a button.\n\t\t//\n\t\t// eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n\t\t<span\n\t\t\tclassName=\"block-editor-list-view__expander\"\n\t\t\tonClick={ ( event ) => onClick( event, { forceToggle: true } ) }\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<Icon icon={ isRTL() ? chevronLeftSmall : chevronRightSmall } />\n\t\t</span>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\t__experimentalTruncate as Truncate,\n} from '@wordpress/components';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, lock } from '@wordpress/icons';\nimport { SPACE, ENTER } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport useBlockDisplayTitle from '../block-title/use-block-display-title';\nimport ListViewExpander from './expander';\nimport { useBlockLock } from '../block-lock';\n\nfunction ListViewBlockSelectButton(\n\t{\n\t\tclassName,\n\t\tblock: { clientId },\n\t\tonClick,\n\t\tonToggleExpanded,\n\t\ttabIndex,\n\t\tonFocus,\n\t\tonDragStart,\n\t\tonDragEnd,\n\t\tdraggable,\n\t},\n\tref\n) {\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockTitle = useBlockDisplayTitle( {\n\t\tclientId,\n\t\tcontext: 'list-view',\n\t} );\n\tconst { isLocked } = useBlockLock( clientId );\n\n\t// The `href` attribute triggers the browser's native HTML drag operations.\n\t// When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html.\n\t// We need to clear any HTML drag data to prevent `pasteHandler` from firing\n\t// inside the `useOnBlockDrop` hook.\n\tconst onDragStartHandler = ( event ) => {\n\t\tevent.dataTransfer.clearData();\n\t\tonDragStart?.( event );\n\t};\n\n\tfunction onKeyDownHandler( event ) {\n\t\tif ( event.keyCode === ENTER || event.keyCode === SPACE ) {\n\t\t\tonClick( event );\n\t\t}\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'block-editor-list-view-block-select-button',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tonKeyDown={ onKeyDownHandler }\n\t\t\t\tref={ ref }\n\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tonDragStart={ onDragStartHandler }\n\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\tdraggable={ draggable }\n\t\t\t\thref={ `#block-${ clientId }` }\n\t\t\t\taria-hidden={ true }\n\t\t\t>\n\t\t\t\t<ListViewExpander onClick={ onToggleExpanded } />\n\t\t\t\t<BlockIcon icon={ blockInformation?.icon } showColors />\n\t\t\t\t<HStack\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__label-wrapper\"\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\tspacing={ 1 }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__title\">\n\t\t\t\t\t\t<Truncate ellipsizeMode=\"auto\">{ blockTitle }</Truncate>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ blockInformation?.anchor && (\n\t\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__anchor-wrapper\">\n\t\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__anchor\"\n\t\t\t\t\t\t\t\tellipsizeMode=\"auto\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ blockInformation.anchor }\n\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isLocked && (\n\t\t\t\t\t\t<span className=\"block-editor-list-view-block-select-button__lock\">\n\t\t\t\t\t\t\t<Icon icon={ lock } />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t</Button>\n\t\t</>\n\t);\n}\n\nexport default forwardRef( ListViewBlockSelectButton );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ListViewBlockSelectButton from './block-select-button';\nimport BlockDraggable from '../block-draggable';\nimport { store as blockEditorStore } from '../../store';\n\nconst ListViewBlockContents = forwardRef(\n\t(\n\t\t{\n\t\t\tonClick,\n\t\t\tonToggleExpanded,\n\t\t\tblock,\n\t\t\tisSelected,\n\t\t\tposition,\n\t\t\tsiblingBlockCount,\n\t\t\tlevel,\n\t\t\tisExpanded,\n\t\t\tselectedClientIds,\n\t\t\t...props\n\t\t},\n\t\tref\n\t) => {\n\t\tconst { clientId } = block;\n\n\t\tconst { blockMovingClientId, selectedBlockInBlockEditor } = useSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst { hasBlockMovingClientId, getSelectedBlockClientId } =\n\t\t\t\t\tselect( blockEditorStore );\n\t\t\t\treturn {\n\t\t\t\t\tblockMovingClientId: hasBlockMovingClientId(),\n\t\t\t\t\tselectedBlockInBlockEditor: getSelectedBlockClientId(),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ clientId ]\n\t\t);\n\n\t\tconst isBlockMoveTarget =\n\t\t\tblockMovingClientId && selectedBlockInBlockEditor === clientId;\n\n\t\tconst className = classnames( 'block-editor-list-view-block-contents', {\n\t\t\t'is-dropping-before': isBlockMoveTarget,\n\t\t} );\n\n\t\t// Only include all selected blocks if the currently clicked on block\n\t\t// is one of the selected blocks. This ensures that if a user attempts\n\t\t// to drag a block that isn't part of the selection, they're still able\n\t\t// to drag it and rearrange its position.\n\t\tconst draggableClientIds = selectedClientIds.includes( clientId )\n\t\t\t? selectedClientIds\n\t\t\t: [ clientId ];\n\n\t\treturn (\n\t\t\t<BlockDraggable clientIds={ draggableClientIds }>\n\t\t\t\t{ ( { draggable, onDragStart, onDragEnd } ) => (\n\t\t\t\t\t<ListViewBlockSelectButton\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonToggleExpanded={ onToggleExpanded }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\tdraggable={ draggable }\n\t\t\t\t\t\tonDragStart={ onDragStart }\n\t\t\t\t\t\tonDragEnd={ onDragEnd }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</BlockDraggable>\n\t\t);\n\t}\n);\n\nexport default ListViewBlockContents;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\nexport const ListViewContext = createContext( {} );\n\nexport const useListViewContext = () => useContext( ListViewContext );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { hasBlockSupport } from '@wordpress/blocks';\nimport {\n\t__experimentalTreeGridCell as TreeGridCell,\n\t__experimentalTreeGridItem as TreeGridItem,\n} from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport { moreVertical } from '@wordpress/icons';\nimport {\n\tuseState,\n\tuseRef,\n\tuseEffect,\n\tuseCallback,\n\tmemo,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { sprintf, __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewLeaf from './leaf';\nimport {\n\tBlockMoverUpButton,\n\tBlockMoverDownButton,\n} from '../block-mover/button';\nimport ListViewBlockContents from './block-contents';\nimport BlockSettingsDropdown from '../block-settings-menu/block-settings-dropdown';\nimport { useListViewContext } from './context';\nimport { getBlockPositionDescription } from './utils';\nimport { store as blockEditorStore } from '../../store';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { useBlockLock } from '../block-lock';\n\nfunction ListViewBlock( {\n\tblock,\n\tisDragged,\n\tisSelected,\n\tisBranchSelected,\n\tselectBlock,\n\tposition,\n\tlevel,\n\trowCount,\n\tsiblingBlockCount,\n\tshowBlockMovers,\n\tpath,\n\tisExpanded,\n\tselectedClientIds,\n\tpreventAnnouncement,\n} ) {\n\tconst cellRef = useRef( null );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst { clientId } = block;\n\n\tconst { isLocked, isContentLocked } = useBlockLock( clientId );\n\tconst forceSelectionContentLock = useSelect(\n\t\t( select ) => {\n\t\t\tif ( isSelected ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ( ! isContentLocked ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn select( blockEditorStore ).hasSelectedInnerBlock(\n\t\t\t\tclientId,\n\t\t\t\ttrue\n\t\t\t);\n\t\t},\n\t\t[ isContentLocked, clientId, isSelected ]\n\t);\n\n\tconst isFirstSelectedBlock =\n\t\tforceSelectionContentLock ||\n\t\t( isSelected && selectedClientIds[ 0 ] === clientId );\n\tconst isLastSelectedBlock =\n\t\tforceSelectionContentLock ||\n\t\t( isSelected &&\n\t\t\tselectedClientIds[ selectedClientIds.length - 1 ] === clientId );\n\n\tconst { toggleBlockHighlight } = useDispatch( blockEditorStore );\n\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\tconst blockName = useSelect(\n\t\t( select ) => select( blockEditorStore ).getBlockName( clientId ),\n\t\t[ clientId ]\n\t);\n\n\t// When a block hides its toolbar it also hides the block settings menu,\n\t// since that menu is part of the toolbar in the editor canvas.\n\t// List View respects this by also hiding the block settings menu.\n\tconst showBlockActions = hasBlockSupport(\n\t\tblockName,\n\t\t'__experimentalToolbar',\n\t\ttrue\n\t);\n\tconst instanceId = useInstanceId( ListViewBlock );\n\tconst descriptionId = `list-view-block-select-button__${ instanceId }`;\n\tconst blockPositionDescription = getBlockPositionDescription(\n\t\tposition,\n\t\tsiblingBlockCount,\n\t\tlevel\n\t);\n\n\tlet blockAriaLabel = __( 'Link' );\n\tif ( blockInformation ) {\n\t\tblockAriaLabel = isLocked\n\t\t\t? sprintf(\n\t\t\t\t\t// translators: %s: The title of the block. This string indicates a link to select the locked block.\n\t\t\t\t\t__( '%s link (locked)' ),\n\t\t\t\t\tblockInformation.title\n\t\t\t  )\n\t\t\t: sprintf(\n\t\t\t\t\t// translators: %s: The title of the block. This string indicates a link to select the block.\n\t\t\t\t\t__( '%s link' ),\n\t\t\t\t\tblockInformation.title\n\t\t\t  );\n\t}\n\n\tconst settingsAriaLabel = blockInformation\n\t\t? sprintf(\n\t\t\t\t// translators: %s: The title of the block.\n\t\t\t\t__( 'Options for %s block' ),\n\t\t\t\tblockInformation.title\n\t\t  )\n\t\t: __( 'Options' );\n\n\tconst { isTreeGridMounted, expand, collapse } = useListViewContext();\n\n\tconst hasSiblings = siblingBlockCount > 0;\n\tconst hasRenderedMovers = showBlockMovers && hasSiblings;\n\tconst moverCellClassName = classnames(\n\t\t'block-editor-list-view-block__mover-cell',\n\t\t{ 'is-visible': isHovered || isSelected }\n\t);\n\n\tconst listViewBlockSettingsClassName = classnames(\n\t\t'block-editor-list-view-block__menu-cell',\n\t\t{ 'is-visible': isHovered || isFirstSelectedBlock }\n\t);\n\n\t// If ListView has experimental features related to the Persistent List View,\n\t// only focus the selected list item on mount; otherwise the list would always\n\t// try to steal the focus from the editor canvas.\n\tuseEffect( () => {\n\t\tif ( ! isTreeGridMounted && isSelected ) {\n\t\t\tcellRef.current.focus();\n\t\t}\n\t}, [] );\n\n\tconst onMouseEnter = useCallback( () => {\n\t\tsetIsHovered( true );\n\t\ttoggleBlockHighlight( clientId, true );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\tconst onMouseLeave = useCallback( () => {\n\t\tsetIsHovered( false );\n\t\ttoggleBlockHighlight( clientId, false );\n\t}, [ clientId, setIsHovered, toggleBlockHighlight ] );\n\n\tconst selectEditorBlock = useCallback(\n\t\t( event ) => {\n\t\t\tselectBlock( event, clientId );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t[ clientId, selectBlock ]\n\t);\n\n\tconst updateSelection = useCallback(\n\t\t( newClientId ) => {\n\t\t\tselectBlock( undefined, newClientId );\n\t\t},\n\t\t[ selectBlock ]\n\t);\n\n\tconst toggleExpanded = useCallback(\n\t\t( event ) => {\n\t\t\t// Prevent shift+click from opening link in a new window when toggling.\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tif ( isExpanded === true ) {\n\t\t\t\tcollapse( clientId );\n\t\t\t} else if ( isExpanded === false ) {\n\t\t\t\texpand( clientId );\n\t\t\t}\n\t\t},\n\t\t[ clientId, expand, collapse, isExpanded ]\n\t);\n\n\tlet colSpan;\n\tif ( hasRenderedMovers ) {\n\t\tcolSpan = 2;\n\t} else if ( ! showBlockActions ) {\n\t\tcolSpan = 3;\n\t}\n\n\tconst classes = classnames( {\n\t\t'is-selected': isSelected || forceSelectionContentLock,\n\t\t'is-first-selected': isFirstSelectedBlock,\n\t\t'is-last-selected': isLastSelectedBlock,\n\t\t'is-branch-selected': isBranchSelected,\n\t\t'is-dragging': isDragged,\n\t\t'has-single-cell': ! showBlockActions,\n\t} );\n\n\t// Only include all selected blocks if the currently clicked on block\n\t// is one of the selected blocks. This ensures that if a user attempts\n\t// to alter a block that isn't part of the selection, they're still able\n\t// to do so.\n\tconst dropdownClientIds = selectedClientIds.includes( clientId )\n\t\t? selectedClientIds\n\t\t: [ clientId ];\n\n\treturn (\n\t\t<ListViewLeaf\n\t\t\tclassName={ classes }\n\t\t\tonMouseEnter={ onMouseEnter }\n\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\tonFocus={ onMouseEnter }\n\t\t\tonBlur={ onMouseLeave }\n\t\t\tlevel={ level }\n\t\t\tposition={ position }\n\t\t\trowCount={ rowCount }\n\t\t\tpath={ path }\n\t\t\tid={ `list-view-block-${ clientId }` }\n\t\t\tdata-block={ clientId }\n\t\t\tisExpanded={ isContentLocked ? undefined : isExpanded }\n\t\t\taria-selected={ !! isSelected || forceSelectionContentLock }\n\t\t>\n\t\t\t<TreeGridCell\n\t\t\t\tclassName=\"block-editor-list-view-block__contents-cell\"\n\t\t\t\tcolSpan={ colSpan }\n\t\t\t\tref={ cellRef }\n\t\t\t\taria-label={ blockAriaLabel }\n\t\t\t\taria-selected={ !! isSelected || forceSelectionContentLock }\n\t\t\t\taria-expanded={ isContentLocked ? undefined : isExpanded }\n\t\t\t\taria-describedby={ descriptionId }\n\t\t\t>\n\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t<div className=\"block-editor-list-view-block__contents-container\">\n\t\t\t\t\t\t<ListViewBlockContents\n\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\tonClick={ selectEditorBlock }\n\t\t\t\t\t\t\tonToggleExpanded={ toggleExpanded }\n\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\tsiblingBlockCount={ siblingBlockCount }\n\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\tpreventAnnouncement={ preventAnnouncement }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"block-editor-list-view-block-select-button__description\"\n\t\t\t\t\t\t\tid={ descriptionId }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ blockPositionDescription }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</TreeGridCell>\n\t\t\t{ hasRenderedMovers && (\n\t\t\t\t<>\n\t\t\t\t\t<TreeGridCell\n\t\t\t\t\t\tclassName={ moverCellClassName }\n\t\t\t\t\t\twithoutGridItem\n\t\t\t\t\t>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverUpButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t\t<TreeGridItem>\n\t\t\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t\t\t<BlockMoverDownButton\n\t\t\t\t\t\t\t\t\torientation=\"vertical\"\n\t\t\t\t\t\t\t\t\tclientIds={ [ clientId ] }\n\t\t\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\t\t\ttabIndex={ tabIndex }\n\t\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</TreeGridItem>\n\t\t\t\t\t</TreeGridCell>\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ showBlockActions && (\n\t\t\t\t<TreeGridCell\n\t\t\t\t\tclassName={ listViewBlockSettingsClassName }\n\t\t\t\t\taria-selected={ !! isSelected || forceSelectionContentLock }\n\t\t\t\t>\n\t\t\t\t\t{ ( { ref, tabIndex, onFocus } ) => (\n\t\t\t\t\t\t<BlockSettingsDropdown\n\t\t\t\t\t\t\tclientIds={ dropdownClientIds }\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ settingsAriaLabel }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tref,\n\t\t\t\t\t\t\t\tclassName: 'block-editor-list-view-block__menu',\n\t\t\t\t\t\t\t\ttabIndex,\n\t\t\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisableOpenOnArrowDown\n\t\t\t\t\t\t\t__experimentalSelectBlock={ updateSelection }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</TreeGridCell>\n\t\t\t) }\n\t\t</ListViewLeaf>\n\t);\n}\n\nexport default memo( ListViewBlock );\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\nexport const getBlockPositionDescription = ( position, siblingCount, level ) =>\n\tsprintf(\n\t\t/* translators: 1: The numerical position of the block. 2: The total number of blocks. 3. The level of nesting for the block. */\n\t\t__( 'Block %1$d of %2$d, Level %3$d' ),\n\t\tposition,\n\t\tsiblingCount,\n\t\tlevel\n\t);\n\n/**\n * Returns true if the client ID occurs within the block selection or multi-selection,\n * or false otherwise.\n *\n * @param {string}          clientId               Block client ID.\n * @param {string|string[]} selectedBlockClientIds Selected block client ID, or an array of multi-selected blocks client IDs.\n *\n * @return {boolean} Whether the block is in multi-selection set.\n */\nexport const isClientIdSelected = ( clientId, selectedBlockClientIds ) =>\n\tArray.isArray( selectedBlockClientIds ) && selectedBlockClientIds.length\n\t\t? selectedBlockClientIds.indexOf( clientId ) !== -1\n\t\t: selectedBlockClientIds === clientId;\n\n/**\n * From a start and end clientId of potentially different nesting levels,\n * return the nearest-depth ids that have a common level of depth in the\n * nesting hierarchy. For multiple block selection, this ensure that the\n * selection is always at the same nesting level, and not split across\n * separate levels.\n *\n * @param {string}   startId      The first id of a selection.\n * @param {string}   endId        The end id of a selection, usually one that has been clicked on.\n * @param {string[]} startParents An array of ancestor ids for the start id, in descending order.\n * @param {string[]} endParents   An array of ancestor ids for the end id, in descending order.\n * @return {Object} An object containing the start and end ids.\n */\nexport function getCommonDepthClientIds(\n\tstartId,\n\tendId,\n\tstartParents,\n\tendParents\n) {\n\tconst startPath = [ ...startParents, startId ];\n\tconst endPath = [ ...endParents, endId ];\n\tconst depth = Math.min( startPath.length, endPath.length ) - 1;\n\tconst start = startPath[ depth ];\n\tconst end = endPath[ depth ];\n\n\treturn {\n\t\tstart,\n\t\tend,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\n/**\n * Internal dependencies\n */\nimport ListViewBlock from './block';\nimport { useListViewContext } from './context';\nimport { isClientIdSelected } from './utils';\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Given a block, returns the total number of blocks in that subtree. This is used to help determine\n * the list position of a block.\n *\n * When a block is collapsed, we do not count their children as part of that total. In the current drag\n * implementation dragged blocks and their children are not counted.\n *\n * @param {Object}  block               block tree\n * @param {Object}  expandedState       state that notes which branches are collapsed\n * @param {Array}   draggedClientIds    a list of dragged client ids\n * @param {boolean} isExpandedByDefault flag to determine the default fallback expanded state.\n * @return {number} block count\n */\nfunction countBlocks(\n\tblock,\n\texpandedState,\n\tdraggedClientIds,\n\tisExpandedByDefault\n) {\n\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\tif ( isDragged ) {\n\t\treturn 0;\n\t}\n\tconst isExpanded = expandedState[ block.clientId ] ?? isExpandedByDefault;\n\n\tif ( isExpanded ) {\n\t\treturn (\n\t\t\t1 +\n\t\t\tblock.innerBlocks.reduce(\n\t\t\t\tcountReducer(\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t),\n\t\t\t\t0\n\t\t\t)\n\t\t);\n\t}\n\treturn 1;\n}\nconst countReducer =\n\t( expandedState, draggedClientIds, isExpandedByDefault ) =>\n\t( count, block ) => {\n\t\tconst isDragged = draggedClientIds?.includes( block.clientId );\n\t\tif ( isDragged ) {\n\t\t\treturn count;\n\t\t}\n\t\tconst isExpanded =\n\t\t\texpandedState[ block.clientId ] ?? isExpandedByDefault;\n\t\tif ( isExpanded && block.innerBlocks.length > 0 ) {\n\t\t\treturn (\n\t\t\t\tcount +\n\t\t\t\tcountBlocks(\n\t\t\t\t\tblock,\n\t\t\t\t\texpandedState,\n\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\tisExpandedByDefault\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn count + 1;\n\t};\n\nfunction ListViewBranch( props ) {\n\tconst {\n\t\tblocks,\n\t\tselectBlock,\n\t\tshowBlockMovers,\n\t\tselectedClientIds,\n\t\tlevel = 1,\n\t\tpath = '',\n\t\tisBranchSelected = false,\n\t\tlistPosition = 0,\n\t\tfixedListWindow,\n\t\tisExpanded,\n\t\tparentId,\n\t\tshouldShowInnerBlocks = true,\n\t} = props;\n\n\tconst isContentLocked = useSelect(\n\t\t( select ) => {\n\t\t\treturn !! (\n\t\t\t\tparentId &&\n\t\t\t\tselect( blockEditorStore ).getTemplateLock( parentId ) ===\n\t\t\t\t\t'contentOnly'\n\t\t\t);\n\t\t},\n\t\t[ parentId ]\n\t);\n\n\tconst { expandedState, draggedClientIds } = useListViewContext();\n\n\tif ( isContentLocked ) {\n\t\treturn null;\n\t}\n\n\tconst filteredBlocks = blocks.filter( Boolean );\n\tconst blockCount = filteredBlocks.length;\n\tlet nextPosition = listPosition;\n\n\treturn (\n\t\t<>\n\t\t\t{ filteredBlocks.map( ( block, index ) => {\n\t\t\t\tconst { clientId, innerBlocks } = block;\n\n\t\t\t\tif ( index > 0 ) {\n\t\t\t\t\tnextPosition += countBlocks(\n\t\t\t\t\t\tfilteredBlocks[ index - 1 ],\n\t\t\t\t\t\texpandedState,\n\t\t\t\t\t\tdraggedClientIds,\n\t\t\t\t\t\tisExpanded\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst { itemInView } = fixedListWindow;\n\t\t\t\tconst blockInView = itemInView( nextPosition );\n\n\t\t\t\tconst position = index + 1;\n\t\t\t\tconst updatedPath =\n\t\t\t\t\tpath.length > 0\n\t\t\t\t\t\t? `${ path }_${ position }`\n\t\t\t\t\t\t: `${ position }`;\n\t\t\t\tconst hasNestedBlocks = !! innerBlocks?.length;\n\n\t\t\t\tconst shouldExpand =\n\t\t\t\t\thasNestedBlocks && shouldShowInnerBlocks\n\t\t\t\t\t\t? expandedState[ clientId ] ?? isExpanded\n\t\t\t\t\t\t: undefined;\n\n\t\t\t\tconst isDragged = !! draggedClientIds?.includes( clientId );\n\n\t\t\t\tconst showBlock = isDragged || blockInView;\n\n\t\t\t\t// Make updates to the selected or dragged blocks synchronous,\n\t\t\t\t// but asynchronous for any other block.\n\t\t\t\tconst isSelected = isClientIdSelected(\n\t\t\t\t\tclientId,\n\t\t\t\t\tselectedClientIds\n\t\t\t\t);\n\t\t\t\tconst isSelectedBranch =\n\t\t\t\t\tisBranchSelected || ( isSelected && hasNestedBlocks );\n\t\t\t\treturn (\n\t\t\t\t\t<AsyncModeProvider key={ clientId } value={ ! isSelected }>\n\t\t\t\t\t\t{ showBlock && (\n\t\t\t\t\t\t\t<ListViewBlock\n\t\t\t\t\t\t\t\tblock={ block }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tisDragged={ isDragged }\n\t\t\t\t\t\t\t\tlevel={ level }\n\t\t\t\t\t\t\t\tposition={ position }\n\t\t\t\t\t\t\t\trowCount={ blockCount }\n\t\t\t\t\t\t\t\tsiblingBlockCount={ blockCount }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tisExpanded={ shouldExpand }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! showBlock && (\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td className=\"block-editor-list-view-placeholder\" />\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ hasNestedBlocks && shouldExpand && ! isDragged && (\n\t\t\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\t\t\tparentId={ clientId }\n\t\t\t\t\t\t\t\tblocks={ innerBlocks }\n\t\t\t\t\t\t\t\tselectBlock={ selectBlock }\n\t\t\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\t\t\tlevel={ level + 1 }\n\t\t\t\t\t\t\t\tpath={ updatedPath }\n\t\t\t\t\t\t\t\tlistPosition={ nextPosition + 1 }\n\t\t\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\t\t\tisBranchSelected={ isSelectedBranch }\n\t\t\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</AsyncModeProvider>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nListViewBranch.defaultProps = {\n\tselectBlock: () => {},\n};\n\nexport default memo( ListViewBranch );\n","/**\n * WordPress dependencies\n */\nimport { Popover } from '@wordpress/components';\nimport { useCallback, useMemo } from '@wordpress/element';\n\nexport default function ListViewDropIndicator( {\n\tlistViewRef,\n\tblockDropTarget,\n} ) {\n\tconst { rootClientId, clientId, dropPosition } = blockDropTarget || {};\n\n\tconst [ rootBlockElement, blockElement ] = useMemo( () => {\n\t\tif ( ! listViewRef.current ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// The rootClientId will be defined whenever dropping into inner\n\t\t// block lists, but is undefined when dropping at the root level.\n\t\tconst _rootBlockElement = rootClientId\n\t\t\t? listViewRef.current.querySelector(\n\t\t\t\t\t`[data-block=\"${ rootClientId }\"]`\n\t\t\t  )\n\t\t\t: undefined;\n\n\t\t// The clientId represents the sibling block, the dragged block will\n\t\t// usually be inserted adjacent to it. It will be undefined when\n\t\t// dropping a block into an empty block list.\n\t\tconst _blockElement = clientId\n\t\t\t? listViewRef.current.querySelector(\n\t\t\t\t\t`[data-block=\"${ clientId }\"]`\n\t\t\t  )\n\t\t\t: undefined;\n\n\t\treturn [ _rootBlockElement, _blockElement ];\n\t}, [ rootClientId, clientId ] );\n\n\t// The targetElement is the element that the drop indicator will appear\n\t// before or after. When dropping into an empty block list, blockElement\n\t// is undefined, so the indicator will appear after the rootBlockElement.\n\tconst targetElement = blockElement || rootBlockElement;\n\n\tconst getDropIndicatorIndent = useCallback( () => {\n\t\tif ( ! rootBlockElement ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Calculate the indent using the block icon of the root block.\n\t\t// Using a classname selector here might be flaky and could be\n\t\t// improved.\n\t\tconst targetElementRect = targetElement.getBoundingClientRect();\n\t\tconst rootBlockIconElement = rootBlockElement.querySelector(\n\t\t\t'.block-editor-block-icon'\n\t\t);\n\t\tconst rootBlockIconRect = rootBlockIconElement.getBoundingClientRect();\n\t\treturn rootBlockIconRect.right - targetElementRect.left;\n\t}, [ rootBlockElement, targetElement ] );\n\n\tconst style = useMemo( () => {\n\t\tif ( ! targetElement ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tconst indent = getDropIndicatorIndent();\n\n\t\treturn {\n\t\t\twidth: targetElement.offsetWidth - indent,\n\t\t};\n\t}, [ getDropIndicatorIndent, targetElement ] );\n\n\tconst popoverAnchor = useMemo( () => {\n\t\tconst isValidDropPosition =\n\t\t\tdropPosition === 'top' ||\n\t\t\tdropPosition === 'bottom' ||\n\t\t\tdropPosition === 'inside';\n\t\tif ( ! targetElement || ! isValidDropPosition ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn {\n\t\t\townerDocument: targetElement.ownerDocument,\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = targetElement.getBoundingClientRect();\n\t\t\t\tconst indent = getDropIndicatorIndent();\n\n\t\t\t\tconst left = rect.left + indent;\n\t\t\t\tconst right = rect.right;\n\t\t\t\tlet top = 0;\n\t\t\t\tlet bottom = 0;\n\n\t\t\t\tif ( dropPosition === 'top' ) {\n\t\t\t\t\ttop = rect.top;\n\t\t\t\t\tbottom = rect.top;\n\t\t\t\t} else {\n\t\t\t\t\t// `dropPosition` is either `bottom` or `inside`\n\t\t\t\t\ttop = rect.bottom;\n\t\t\t\t\tbottom = rect.bottom;\n\t\t\t\t}\n\n\t\t\t\tconst width = right - left;\n\t\t\t\tconst height = bottom - top;\n\n\t\t\t\treturn new window.DOMRect( left, top, width, height );\n\t\t\t},\n\t\t};\n\t}, [ targetElement, dropPosition, getDropIndicatorIndent ] );\n\n\tif ( ! targetElement ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Popover\n\t\t\tanimate={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tfocusOnMount={ false }\n\t\t\tclassName=\"block-editor-list-view-drop-indicator\"\n\t\t>\n\t\t\t<div\n\t\t\t\tstyle={ style }\n\t\t\t\tclassName=\"block-editor-list-view-drop-indicator__line\"\n\t\t\t/>\n\t\t</Popover>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useState, useCallback } from '@wordpress/element';\nimport {\n\tuseThrottle,\n\t__experimentalUseDropZone as useDropZone,\n} from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { getDistanceToNearestEdge } from '../../utils/math';\nimport useOnBlockDrop from '../use-on-block-drop';\nimport { store as blockEditorStore } from '../../store';\n\n/** @typedef {import('../../utils/math').WPPoint} WPPoint */\n\n/**\n * The type of a drag event.\n *\n * @typedef {'default'|'file'|'html'} WPDragEventType\n */\n\n/**\n * An array representing data for blocks in the DOM used by drag and drop.\n *\n * @typedef {Object} WPListViewDropZoneBlocks\n * @property {string}  clientId                        The client id for the block.\n * @property {string}  rootClientId                    The root client id for the block.\n * @property {number}  blockIndex                      The block's index.\n * @property {Element} element                         The DOM element representing the block.\n * @property {number}  innerBlockCount                 The number of inner blocks the block has.\n * @property {boolean} isDraggedBlock                  Whether the block is currently being dragged.\n * @property {boolean} canInsertDraggedBlocksAsSibling Whether the dragged block can be a sibling of this block.\n * @property {boolean} canInsertDraggedBlocksAsChild   Whether the dragged block can be a child of this block.\n */\n\n/**\n * An object containing details of a drop target.\n *\n * @typedef {Object} WPListViewDropZoneTarget\n * @property {string}                  blockIndex   The insertion index.\n * @property {string}                  rootClientId The root client id for the block.\n * @property {string|undefined}        clientId     The client id for the block.\n * @property {'top'|'bottom'|'inside'} dropPosition The position relative to the block that the user is dropping to.\n *                                                  'inside' refers to nesting as an inner block.\n */\n\n/**\n * Is the point contained by the rectangle.\n *\n * @param {WPPoint} point The point.\n * @param {DOMRect} rect  The rectangle.\n *\n * @return {boolean} True if the point is contained by the rectangle, false otherwise.\n */\nfunction isPointContainedByRect( point, rect ) {\n\treturn (\n\t\trect.left <= point.x &&\n\t\trect.right >= point.x &&\n\t\trect.top <= point.y &&\n\t\trect.bottom >= point.y\n\t);\n}\n\n/**\n * Determines whether the user positioning the dragged block to nest as an\n * inner block.\n *\n * Presently this is determined by whether the cursor is on the right hand side\n * of the block.\n *\n * @param {WPPoint} point The point representing the cursor position when dragging.\n * @param {DOMRect} rect  The rectangle.\n */\nfunction isNestingGesture( point, rect ) {\n\tconst blockCenterX = rect.left + rect.width / 2;\n\treturn point.x > blockCenterX;\n}\n\n// Block navigation is always a vertical list, so only allow dropping\n// to the above or below a block.\nconst ALLOWED_DROP_EDGES = [ 'top', 'bottom' ];\n\n/**\n * Given blocks data and the cursor position, compute the drop target.\n *\n * @param {WPListViewDropZoneBlocks} blocksData Data about the blocks in list view.\n * @param {WPPoint}                  position   The point representing the cursor position when dragging.\n *\n * @return {WPListViewDropZoneTarget} An object containing data about the drop target.\n */\nfunction getListViewDropTarget( blocksData, position ) {\n\tlet candidateEdge;\n\tlet candidateBlockData;\n\tlet candidateDistance;\n\tlet candidateRect;\n\n\tfor ( const blockData of blocksData ) {\n\t\tif ( blockData.isDraggedBlock ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst rect = blockData.element.getBoundingClientRect();\n\t\tconst [ distance, edge ] = getDistanceToNearestEdge(\n\t\t\tposition,\n\t\t\trect,\n\t\t\tALLOWED_DROP_EDGES\n\t\t);\n\n\t\tconst isCursorWithinBlock = isPointContainedByRect( position, rect );\n\t\tif (\n\t\t\tcandidateDistance === undefined ||\n\t\t\tdistance < candidateDistance ||\n\t\t\tisCursorWithinBlock\n\t\t) {\n\t\t\tcandidateDistance = distance;\n\n\t\t\tconst index = blocksData.indexOf( blockData );\n\t\t\tconst previousBlockData = blocksData[ index - 1 ];\n\n\t\t\t// If dragging near the top of a block and the preceding block\n\t\t\t// is at the same level, use the preceding block as the candidate\n\t\t\t// instead, as later it makes determining a nesting drop easier.\n\t\t\tif (\n\t\t\t\tedge === 'top' &&\n\t\t\t\tpreviousBlockData &&\n\t\t\t\tpreviousBlockData.rootClientId === blockData.rootClientId &&\n\t\t\t\t! previousBlockData.isDraggedBlock\n\t\t\t) {\n\t\t\t\tcandidateBlockData = previousBlockData;\n\t\t\t\tcandidateEdge = 'bottom';\n\t\t\t\tcandidateRect =\n\t\t\t\t\tpreviousBlockData.element.getBoundingClientRect();\n\t\t\t} else {\n\t\t\t\tcandidateBlockData = blockData;\n\t\t\t\tcandidateEdge = edge;\n\t\t\t\tcandidateRect = rect;\n\t\t\t}\n\n\t\t\t// If the mouse position is within the block, break early\n\t\t\t// as the user would intend to drop either before or after\n\t\t\t// this block.\n\t\t\t//\n\t\t\t// This solves an issue where some rows in the list view\n\t\t\t// tree overlap slightly due to sub-pixel rendering.\n\t\t\tif ( isCursorWithinBlock ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( ! candidateBlockData ) {\n\t\treturn;\n\t}\n\n\tconst isDraggingBelow = candidateEdge === 'bottom';\n\n\t// If the user is dragging towards the bottom of the block check whether\n\t// they might be trying to nest the block as a child.\n\t// If the block already has inner blocks, this should always be treated\n\t// as nesting since the next block in the tree will be the first child.\n\tif (\n\t\tisDraggingBelow &&\n\t\tcandidateBlockData.canInsertDraggedBlocksAsChild &&\n\t\t( candidateBlockData.innerBlockCount > 0 ||\n\t\t\tisNestingGesture( position, candidateRect ) )\n\t) {\n\t\treturn {\n\t\t\trootClientId: candidateBlockData.clientId,\n\t\t\tblockIndex: 0,\n\t\t\tdropPosition: 'inside',\n\t\t};\n\t}\n\n\t// If dropping as a sibling, but block cannot be inserted in\n\t// this context, return early.\n\tif ( ! candidateBlockData.canInsertDraggedBlocksAsSibling ) {\n\t\treturn;\n\t}\n\n\tconst offset = isDraggingBelow ? 1 : 0;\n\treturn {\n\t\trootClientId: candidateBlockData.rootClientId,\n\t\tclientId: candidateBlockData.clientId,\n\t\tblockIndex: candidateBlockData.blockIndex + offset,\n\t\tdropPosition: candidateEdge,\n\t};\n}\n\n/**\n * A react hook for implementing a drop zone in list view.\n *\n * @return {WPListViewDropZoneTarget} The drop target.\n */\nexport default function useListViewDropZone() {\n\tconst {\n\t\tgetBlockRootClientId,\n\t\tgetBlockIndex,\n\t\tgetBlockCount,\n\t\tgetDraggedBlockClientIds,\n\t\tcanInsertBlocks,\n\t} = useSelect( blockEditorStore );\n\tconst [ target, setTarget ] = useState();\n\tconst { rootClientId: targetRootClientId, blockIndex: targetBlockIndex } =\n\t\ttarget || {};\n\n\tconst onBlockDrop = useOnBlockDrop( targetRootClientId, targetBlockIndex );\n\n\tconst draggedBlockClientIds = getDraggedBlockClientIds();\n\tconst throttled = useThrottle(\n\t\tuseCallback(\n\t\t\t( event, currentTarget ) => {\n\t\t\t\tconst position = { x: event.clientX, y: event.clientY };\n\t\t\t\tconst isBlockDrag = !! draggedBlockClientIds?.length;\n\n\t\t\t\tconst blockElements = Array.from(\n\t\t\t\t\tcurrentTarget.querySelectorAll( '[data-block]' )\n\t\t\t\t);\n\n\t\t\t\tconst blocksData = blockElements.map( ( blockElement ) => {\n\t\t\t\t\tconst clientId = blockElement.dataset.block;\n\t\t\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tclientId,\n\t\t\t\t\t\trootClientId,\n\t\t\t\t\t\tblockIndex: getBlockIndex( clientId ),\n\t\t\t\t\t\telement: blockElement,\n\t\t\t\t\t\tisDraggedBlock: isBlockDrag\n\t\t\t\t\t\t\t? draggedBlockClientIds.includes( clientId )\n\t\t\t\t\t\t\t: false,\n\t\t\t\t\t\tinnerBlockCount: getBlockCount( clientId ),\n\t\t\t\t\t\tcanInsertDraggedBlocksAsSibling: isBlockDrag\n\t\t\t\t\t\t\t? canInsertBlocks(\n\t\t\t\t\t\t\t\t\tdraggedBlockClientIds,\n\t\t\t\t\t\t\t\t\trootClientId\n\t\t\t\t\t\t\t  )\n\t\t\t\t\t\t\t: true,\n\t\t\t\t\t\tcanInsertDraggedBlocksAsChild: isBlockDrag\n\t\t\t\t\t\t\t? canInsertBlocks( draggedBlockClientIds, clientId )\n\t\t\t\t\t\t\t: true,\n\t\t\t\t\t};\n\t\t\t\t} );\n\n\t\t\t\tconst newTarget = getListViewDropTarget( blocksData, position );\n\n\t\t\t\tif ( newTarget ) {\n\t\t\t\t\tsetTarget( newTarget );\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ draggedBlockClientIds ]\n\t\t),\n\t\t200\n\t);\n\n\tconst ref = useDropZone( {\n\t\tonDrop: onBlockDrop,\n\t\tonDragOver( event ) {\n\t\t\t// `currentTarget` is only available while the event is being\n\t\t\t// handled, so get it now and pass it to the thottled function.\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Event/currentTarget\n\t\t\tthrottled( event, event.currentTarget );\n\t\t},\n\t\tonDragEnd() {\n\t\t\tthrottled.cancel();\n\t\t\tsetTarget( null );\n\t\t},\n\t} );\n\n\treturn { ref, target };\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseMergeRefs,\n\t__experimentalUseFixedWindowList as useFixedWindowList,\n} from '@wordpress/compose';\nimport { __experimentalTreeGrid as TreeGrid } from '@wordpress/components';\nimport { AsyncModeProvider, useSelect } from '@wordpress/data';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseReducer,\n\tforwardRef,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ListViewBranch from './branch';\nimport { ListViewContext } from './context';\nimport ListViewDropIndicator from './drop-indicator';\nimport useBlockSelection from './use-block-selection';\nimport useListViewClientIds from './use-list-view-client-ids';\nimport useListViewDropZone from './use-list-view-drop-zone';\nimport useListViewExpandSelectedItem from './use-list-view-expand-selected-item';\nimport { store as blockEditorStore } from '../../store';\n\nconst expanded = ( state, action ) => {\n\tif ( Array.isArray( action.clientIds ) ) {\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.clientIds.reduce(\n\t\t\t\t( newState, id ) => ( {\n\t\t\t\t\t...newState,\n\t\t\t\t\t[ id ]: action.type === 'expand',\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const BLOCK_LIST_ITEM_HEIGHT = 36;\n\n/**\n * Show a hierarchical list of blocks.\n *\n * @param {Object}  props                 Components props.\n * @param {string}  props.id              An HTML element id for the root element of ListView.\n * @param {Array}   props.blocks          Custom subset of block client IDs to be used instead of the default hierarchy.\n * @param {boolean} props.showBlockMovers Flag to enable block movers\n * @param {boolean} props.isExpanded      Flag to determine whether nested levels are expanded by default.\n * @param {Object}  ref                   Forwarded ref\n */\nfunction ListView(\n\t{ id, blocks, showBlockMovers = false, isExpanded = false },\n\tref\n) {\n\tconst { clientIdsTree, draggedClientIds, selectedClientIds } =\n\t\tuseListViewClientIds( blocks );\n\n\tconst { visibleBlockCount, shouldShowInnerBlocks } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetGlobalBlockCount,\n\t\t\t\tgetClientIdsOfDescendants,\n\t\t\t\t__unstableGetEditorMode,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst draggedBlockCount =\n\t\t\t\tdraggedClientIds?.length > 0\n\t\t\t\t\t? getClientIdsOfDescendants( draggedClientIds ).length + 1\n\t\t\t\t\t: 0;\n\t\t\treturn {\n\t\t\t\tvisibleBlockCount: getGlobalBlockCount() - draggedBlockCount,\n\t\t\t\tshouldShowInnerBlocks: __unstableGetEditorMode() !== 'zoom-out',\n\t\t\t};\n\t\t},\n\t\t[ draggedClientIds ]\n\t);\n\n\tconst { updateBlockSelection } = useBlockSelection();\n\n\tconst [ expandedState, setExpandedState ] = useReducer( expanded, {} );\n\n\tconst { ref: dropZoneRef, target: blockDropTarget } = useListViewDropZone();\n\tconst elementRef = useRef();\n\tconst treeGridRef = useMergeRefs( [ elementRef, dropZoneRef, ref ] );\n\n\tconst isMounted = useRef( false );\n\tconst { setSelectedTreeId } = useListViewExpandSelectedItem( {\n\t\tfirstSelectedBlockClientId: selectedClientIds[ 0 ],\n\t\tsetExpandedState,\n\t} );\n\tconst selectEditorBlock = useCallback(\n\t\t( event, clientId ) => {\n\t\t\tupdateBlockSelection( event, clientId );\n\t\t\tsetSelectedTreeId( clientId );\n\t\t},\n\t\t[ setSelectedTreeId, updateBlockSelection ]\n\t);\n\tuseEffect( () => {\n\t\tisMounted.current = true;\n\t}, [] );\n\n\t// List View renders a fixed number of items and relies on each having a fixed item height of 36px.\n\t// If this value changes, we should also change the itemHeight value set in useFixedWindowList.\n\t// See: https://github.com/WordPress/gutenberg/pull/35230 for additional context.\n\tconst [ fixedListWindow ] = useFixedWindowList(\n\t\telementRef,\n\t\tBLOCK_LIST_ITEM_HEIGHT,\n\t\tvisibleBlockCount,\n\t\t{\n\t\t\tuseWindowing: true,\n\t\t\twindowOverscan: 40,\n\t\t}\n\t);\n\n\tconst expand = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'expand', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst collapse = useCallback(\n\t\t( clientId ) => {\n\t\t\tif ( ! clientId ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetExpandedState( { type: 'collapse', clientIds: [ clientId ] } );\n\t\t},\n\t\t[ setExpandedState ]\n\t);\n\tconst expandRow = useCallback(\n\t\t( row ) => {\n\t\t\texpand( row?.dataset?.block );\n\t\t},\n\t\t[ expand ]\n\t);\n\tconst collapseRow = useCallback(\n\t\t( row ) => {\n\t\t\tcollapse( row?.dataset?.block );\n\t\t},\n\t\t[ collapse ]\n\t);\n\tconst focusRow = useCallback(\n\t\t( event, startRow, endRow ) => {\n\t\t\tif ( event.shiftKey ) {\n\t\t\t\tupdateBlockSelection(\n\t\t\t\t\tevent,\n\t\t\t\t\tstartRow?.dataset?.block,\n\t\t\t\t\tendRow?.dataset?.block\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ updateBlockSelection ]\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tisTreeGridMounted: isMounted.current,\n\t\t\tdraggedClientIds,\n\t\t\texpandedState,\n\t\t\texpand,\n\t\t\tcollapse,\n\t\t} ),\n\t\t[ isMounted.current, draggedClientIds, expandedState, expand, collapse ]\n\t);\n\n\treturn (\n\t\t<AsyncModeProvider value={ true }>\n\t\t\t<ListViewDropIndicator\n\t\t\t\tlistViewRef={ elementRef }\n\t\t\t\tblockDropTarget={ blockDropTarget }\n\t\t\t/>\n\t\t\t<TreeGrid\n\t\t\t\tid={ id }\n\t\t\t\tclassName=\"block-editor-list-view-tree\"\n\t\t\t\taria-label={ __( 'Block navigation structure' ) }\n\t\t\t\tref={ treeGridRef }\n\t\t\t\tonCollapseRow={ collapseRow }\n\t\t\t\tonExpandRow={ expandRow }\n\t\t\t\tonFocusRow={ focusRow }\n\t\t\t\tapplicationAriaLabel={ __( 'Block navigation structure' ) }\n\t\t\t>\n\t\t\t\t<ListViewContext.Provider value={ contextValue }>\n\t\t\t\t\t<ListViewBranch\n\t\t\t\t\t\tblocks={ clientIdsTree }\n\t\t\t\t\t\tselectBlock={ selectEditorBlock }\n\t\t\t\t\t\tshowBlockMovers={ showBlockMovers }\n\t\t\t\t\t\tfixedListWindow={ fixedListWindow }\n\t\t\t\t\t\tselectedClientIds={ selectedClientIds }\n\t\t\t\t\t\tisExpanded={ isExpanded }\n\t\t\t\t\t\tshouldShowInnerBlocks={ shouldShowInnerBlocks }\n\t\t\t\t\t/>\n\t\t\t\t</ListViewContext.Provider>\n\t\t\t</TreeGrid>\n\t\t</AsyncModeProvider>\n\t);\n}\nexport default forwardRef( ListView );\n","/**\n * WordPress dependencies\n */\n\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useListViewClientIds( blocks ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetDraggedBlockClientIds,\n\t\t\t\tgetSelectedBlockClientIds,\n\t\t\t\t__unstableGetClientIdsTree,\n\t\t\t} = select( blockEditorStore );\n\n\t\t\treturn {\n\t\t\t\tselectedClientIds: getSelectedBlockClientIds(),\n\t\t\t\tdraggedClientIds: getDraggedBlockClientIds(),\n\t\t\t\tclientIdsTree: blocks ? blocks : __unstableGetClientIdsTree(),\n\t\t\t};\n\t\t},\n\t\t[ blocks ]\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { UP, DOWN, HOME, END } from '@wordpress/keycodes';\nimport { store as blocksStore } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { getCommonDepthClientIds } from './utils';\n\nexport default function useBlockSelection() {\n\tconst { clearSelectedBlock, multiSelect, selectBlock } =\n\t\tuseDispatch( blockEditorStore );\n\tconst {\n\t\tgetBlockName,\n\t\tgetBlockParents,\n\t\tgetBlockSelectionStart,\n\t\tgetBlockSelectionEnd,\n\t\tgetSelectedBlockClientIds,\n\t\thasMultiSelection,\n\t\thasSelectedBlock,\n\t} = useSelect( blockEditorStore );\n\n\tconst { getBlockType } = useSelect( blocksStore );\n\n\tconst updateBlockSelection = useCallback(\n\t\tasync ( event, clientId, destinationClientId ) => {\n\t\t\tif ( ! event?.shiftKey ) {\n\t\t\t\tselectBlock( clientId );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// To handle multiple block selection via the `SHIFT` key, prevent\n\t\t\t// the browser default behavior of opening the link in a new window.\n\t\t\tevent.preventDefault();\n\n\t\t\tconst isKeyPress =\n\t\t\t\tevent.type === 'keydown' &&\n\t\t\t\t( event.keyCode === UP ||\n\t\t\t\t\tevent.keyCode === DOWN ||\n\t\t\t\t\tevent.keyCode === HOME ||\n\t\t\t\t\tevent.keyCode === END );\n\n\t\t\t// Handle clicking on a block when no blocks are selected, and return early.\n\t\t\tif (\n\t\t\t\t! isKeyPress &&\n\t\t\t\t! hasSelectedBlock() &&\n\t\t\t\t! hasMultiSelection()\n\t\t\t) {\n\t\t\t\tselectBlock( clientId, null );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectedBlocks = getSelectedBlockClientIds();\n\t\t\tconst clientIdWithParents = [\n\t\t\t\t...getBlockParents( clientId ),\n\t\t\t\tclientId,\n\t\t\t];\n\n\t\t\tif (\n\t\t\t\tisKeyPress &&\n\t\t\t\t! selectedBlocks.some( ( blockId ) =>\n\t\t\t\t\tclientIdWithParents.includes( blockId )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// Ensure that shift-selecting blocks via the keyboard only\n\t\t\t\t// expands the current selection if focusing over already\n\t\t\t\t// selected blocks. Otherwise, clear the selection so that\n\t\t\t\t// a user can create a new selection entirely by keyboard.\n\t\t\t\tawait clearSelectedBlock();\n\t\t\t}\n\n\t\t\tlet startTarget = getBlockSelectionStart();\n\t\t\tlet endTarget = clientId;\n\n\t\t\t// Handle keyboard behavior for selecting multiple blocks.\n\t\t\tif ( isKeyPress ) {\n\t\t\t\tif ( ! hasSelectedBlock() && ! hasMultiSelection() ) {\n\t\t\t\t\t// Set the starting point of the selection to the currently\n\t\t\t\t\t// focused block, if there are no blocks currently selected.\n\t\t\t\t\t// This ensures that as the selection is expanded or contracted,\n\t\t\t\t\t// the starting point of the selection is anchored to that block.\n\t\t\t\t\tstartTarget = clientId;\n\t\t\t\t}\n\t\t\t\tif ( destinationClientId ) {\n\t\t\t\t\t// If the user presses UP or DOWN, we want to ensure that the block they're\n\t\t\t\t\t// moving to is the target for selection, and not the currently focused one.\n\t\t\t\t\tendTarget = destinationClientId;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst startParents = getBlockParents( startTarget );\n\t\t\tconst endParents = getBlockParents( endTarget );\n\n\t\t\tconst { start, end } = getCommonDepthClientIds(\n\t\t\t\tstartTarget,\n\t\t\t\tendTarget,\n\t\t\t\tstartParents,\n\t\t\t\tendParents\n\t\t\t);\n\t\t\tawait multiSelect( start, end, null );\n\n\t\t\t// Announce deselected block, or number of deselected blocks if\n\t\t\t// the total number of blocks deselected is greater than one.\n\t\t\tconst updatedSelectedBlocks = getSelectedBlockClientIds();\n\n\t\t\t// If the selection is greater than 1 and the Home or End keys\n\t\t\t// were used to generate the selection, then skip announcing the\n\t\t\t// deselected blocks.\n\t\t\tif (\n\t\t\t\t( event.keyCode === HOME || event.keyCode === END ) &&\n\t\t\t\tupdatedSelectedBlocks.length > 1\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst selectionDiff = selectedBlocks.filter(\n\t\t\t\t( blockId ) => ! updatedSelectedBlocks.includes( blockId )\n\t\t\t);\n\n\t\t\tlet label;\n\t\t\tif ( selectionDiff.length === 1 ) {\n\t\t\t\tconst title = getBlockType(\n\t\t\t\t\tgetBlockName( selectionDiff[ 0 ] )\n\t\t\t\t)?.title;\n\t\t\t\tif ( title ) {\n\t\t\t\t\tlabel = sprintf(\n\t\t\t\t\t\t/* translators: %s: block name */\n\t\t\t\t\t\t__( '%s deselected.' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} else if ( selectionDiff.length > 1 ) {\n\t\t\t\tlabel = sprintf(\n\t\t\t\t\t/* translators: %s: number of deselected blocks */\n\t\t\t\t\t__( '%s blocks deselected.' ),\n\t\t\t\t\tselectionDiff.length\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( label ) {\n\t\t\t\tspeak( label );\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tclearSelectedBlock,\n\t\t\tgetBlockName,\n\t\t\tgetBlockType,\n\t\t\tgetBlockParents,\n\t\t\tgetBlockSelectionStart,\n\t\t\tgetBlockSelectionEnd,\n\t\t\tgetSelectedBlockClientIds,\n\t\t\thasMultiSelection,\n\t\t\thasSelectedBlock,\n\t\t\tmultiSelect,\n\t\t\tselectBlock,\n\t\t]\n\t);\n\n\treturn {\n\t\tupdateBlockSelection,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport default function useListViewExpandSelectedItem( {\n\tfirstSelectedBlockClientId,\n\tsetExpandedState,\n} ) {\n\tconst [ selectedTreeId, setSelectedTreeId ] = useState( null );\n\tconst { selectedBlockParentClientIds } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockParents } = select( blockEditorStore );\n\t\t\treturn {\n\t\t\t\tselectedBlockParentClientIds: getBlockParents(\n\t\t\t\t\tfirstSelectedBlockClientId,\n\t\t\t\t\tfalse\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ firstSelectedBlockClientId ]\n\t);\n\n\tconst parentClientIds =\n\t\tArray.isArray( selectedBlockParentClientIds ) &&\n\t\tselectedBlockParentClientIds.length\n\t\t\t? selectedBlockParentClientIds\n\t\t\t: null;\n\n\t// Expand tree when a block is selected.\n\tuseEffect( () => {\n\t\t// If the selectedTreeId is the same as the selected block,\n\t\t// it means that the block was selected using the block list tree.\n\t\tif ( selectedTreeId === firstSelectedBlockClientId ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the selected block has parents, get the top-level parent.\n\t\tif ( parentClientIds ) {\n\t\t\t// If the selected block has parents,\n\t\t\t// expand the tree branch.\n\t\t\tsetExpandedState( {\n\t\t\t\ttype: 'expand',\n\t\t\t\tclientIds: selectedBlockParentClientIds,\n\t\t\t} );\n\t\t}\n\t}, [ firstSelectedBlockClientId ] );\n\n\treturn {\n\t\tsetSelectedTreeId,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Dropdown } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { listView } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ListView from '../list-view';\nimport { store as blockEditorStore } from '../../store';\n\nfunction BlockNavigationDropdownToggle( {\n\tisEnabled,\n\tonToggle,\n\tisOpen,\n\tinnerRef,\n\t...props\n} ) {\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tref={ innerRef }\n\t\t\ticon={ listView }\n\t\t\taria-expanded={ isOpen }\n\t\t\taria-haspopup=\"true\"\n\t\t\tonClick={ isEnabled ? onToggle : undefined }\n\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\tlabel={ __( 'List view' ) }\n\t\t\tclassName=\"block-editor-block-navigation\"\n\t\t\taria-disabled={ ! isEnabled }\n\t\t/>\n\t);\n}\n\nfunction BlockNavigationDropdown( { isDisabled, ...props }, ref ) {\n\tdeprecated( 'wp.blockEditor.BlockNavigationDropdown', {\n\t\tsince: '6.1',\n\t\talternative: 'wp.components.Dropdown and wp.blockEditor.ListView',\n\t} );\n\n\tconst hasBlocks = useSelect(\n\t\t( select ) => !! select( blockEditorStore ).getBlockCount(),\n\t\t[]\n\t);\n\tconst isEnabled = hasBlocks && ! isDisabled;\n\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"block-editor-block-navigation__popover\"\n\t\t\tposition=\"bottom right\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<BlockNavigationDropdownToggle\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tinnerRef={ ref }\n\t\t\t\t\tisOpen={ isOpen }\n\t\t\t\t\tonToggle={ onToggle }\n\t\t\t\t\tisEnabled={ isEnabled }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<div className=\"block-editor-block-navigation__container\">\n\t\t\t\t\t<p className=\"block-editor-block-navigation__label\">\n\t\t\t\t\t\t{ __( 'List view' ) }\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<ListView />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( BlockNavigationDropdown );\n","/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InserterPreviewPanel from '../inserter/preview-panel';\nimport { replaceActiveStyle } from './utils';\n\nexport default function BlockStylesPreviewPanel( {\n\tgenericPreviewBlock,\n\tstyle,\n\tclassName,\n\tactiveStyle,\n} ) {\n\tconst example = getBlockType( genericPreviewBlock.name )?.example;\n\tconst styleClassName = replaceActiveStyle( className, activeStyle, style );\n\tconst previewBlocks = useMemo( () => {\n\t\treturn {\n\t\t\t...genericPreviewBlock,\n\t\t\ttitle: style.label || style.name,\n\t\t\tdescription: style.description,\n\t\t\tinitialAttributes: {\n\t\t\t\t...genericPreviewBlock.attributes,\n\t\t\t\tclassName:\n\t\t\t\t\tstyleClassName +\n\t\t\t\t\t' block-editor-block-styles__block-preview-container',\n\t\t\t},\n\t\t\texample,\n\t\t};\n\t}, [ genericPreviewBlock, styleClassName ] );\n\n\treturn (\n\t\t<InserterPreviewPanel item={ previewBlocks } isStylePreview={ true } />\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useLayoutEffect } from '@wordpress/element';\nimport { debounce, useViewportMatch } from '@wordpress/compose';\nimport {\n\tButton,\n\t__experimentalTruncate as Truncate,\n\tSlot,\n\tFill,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockStylesPreviewPanel from './preview-panel';\nimport useStylesForBlocks from './use-styles-for-block';\n\nfunction BlockStylesPreviewPanelSlot( { scope } ) {\n\treturn <Slot name={ `BlockStylesPreviewPanel/${ scope }` } />;\n}\n\nfunction BlockStylesPreviewPanelFill( { children, scope, ...props } ) {\n\treturn (\n\t\t<Fill name={ `BlockStylesPreviewPanel/${ scope }` }>\n\t\t\t<div { ...props }>{ children }</div>\n\t\t</Fill>\n\t);\n}\n\n// Top position (in px) of the Block Styles container\n// relative to the editor pane.\n// The value is the equivalent of the container's right position.\nconst DEFAULT_POSITION_TOP = 16;\n\nconst noop = () => {};\n\n// Block Styles component for the Settings Sidebar.\nfunction BlockStyles( {\n\tclientId,\n\tonSwitch = noop,\n\tonHoverClassName = noop,\n\tscope,\n} ) {\n\tconst {\n\t\tonSelect,\n\t\tstylesToRender,\n\t\tactiveStyle,\n\t\tgenericPreviewBlock,\n\t\tclassName: previewClassName,\n\t} = useStylesForBlocks( {\n\t\tclientId,\n\t\tonSwitch,\n\t} );\n\tconst [ hoveredStyle, setHoveredStyle ] = useState( null );\n\tconst [ containerScrollTop, setContainerScrollTop ] = useState( 0 );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\n\tuseLayoutEffect( () => {\n\t\tconst scrollContainer = document.querySelector(\n\t\t\t'.interface-interface-skeleton__content'\n\t\t);\n\t\tconst scrollTop = scrollContainer?.scrollTop || 0;\n\t\tsetContainerScrollTop( scrollTop + DEFAULT_POSITION_TOP );\n\t}, [ hoveredStyle ] );\n\n\tif ( ! stylesToRender || stylesToRender.length === 0 ) {\n\t\treturn null;\n\t}\n\n\tconst debouncedSetHoveredStyle = debounce( setHoveredStyle, 250 );\n\n\tconst onSelectStylePreview = ( style ) => {\n\t\tonSelect( style );\n\t\tonHoverClassName( null );\n\t\tsetHoveredStyle( null );\n\t\tdebouncedSetHoveredStyle.cancel();\n\t};\n\n\tconst styleItemHandler = ( item ) => {\n\t\tif ( hoveredStyle === item ) {\n\t\t\tdebouncedSetHoveredStyle.cancel();\n\t\t\treturn;\n\t\t}\n\t\tdebouncedSetHoveredStyle( item );\n\t\tonHoverClassName( item?.name ?? null );\n\t};\n\n\treturn (\n\t\t<div className=\"block-editor-block-styles\">\n\t\t\t<div className=\"block-editor-block-styles__variants\">\n\t\t\t\t{ stylesToRender.map( ( style ) => {\n\t\t\t\t\tconst buttonText = style.label || style.name;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'block-editor-block-styles__item',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-active':\n\t\t\t\t\t\t\t\t\t\tactiveStyle.name === style.name,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tkey={ style.name }\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tlabel={ buttonText }\n\t\t\t\t\t\t\tonMouseEnter={ () => styleItemHandler( style ) }\n\t\t\t\t\t\t\tonFocus={ () => styleItemHandler( style ) }\n\t\t\t\t\t\t\tonMouseLeave={ () => styleItemHandler( null ) }\n\t\t\t\t\t\t\tonBlur={ () => styleItemHandler( null ) }\n\t\t\t\t\t\t\tonClick={ () => onSelectStylePreview( style ) }\n\t\t\t\t\t\t\taria-current={ activeStyle.name === style.name }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Truncate\n\t\t\t\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-block-styles__item-text\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ buttonText }\n\t\t\t\t\t\t\t</Truncate>\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t\t{ hoveredStyle && ! isMobileViewport && (\n\t\t\t\t<BlockStylesPreviewPanelFill\n\t\t\t\t\tscope={ scope }\n\t\t\t\t\tclassName=\"block-editor-block-styles__preview-panel\"\n\t\t\t\t\tstyle={ { top: containerScrollTop } }\n\t\t\t\t\tonMouseLeave={ () => styleItemHandler( null ) }\n\t\t\t\t>\n\t\t\t\t\t<BlockStylesPreviewPanel\n\t\t\t\t\t\tactiveStyle={ activeStyle }\n\t\t\t\t\t\tclassName={ previewClassName }\n\t\t\t\t\t\tgenericPreviewBlock={ genericPreviewBlock }\n\t\t\t\t\t\tstyle={ hoveredStyle }\n\t\t\t\t\t/>\n\t\t\t\t</BlockStylesPreviewPanelFill>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nBlockStyles.Slot = BlockStylesPreviewPanelSlot;\nexport default BlockStyles;\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 * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button, Placeholder } from '@wordpress/components';\nimport { layout } from '@wordpress/icons';\n\nfunction BlockVariationPicker( {\n\ticon = layout,\n\tlabel = __( 'Choose variation' ),\n\tinstructions = __( 'Select a variation to start with.' ),\n\tvariations,\n\tonSelect,\n\tallowSkip,\n} ) {\n\tconst classes = classnames( 'block-editor-block-variation-picker', {\n\t\t'has-many-variations': variations.length > 4,\n\t} );\n\n\treturn (\n\t\t<Placeholder\n\t\t\ticon={ icon }\n\t\t\tlabel={ label }\n\t\t\tinstructions={ instructions }\n\t\t\tclassName={ classes }\n\t\t>\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\tclassName=\"block-editor-block-variation-picker__variations\"\n\t\t\t\trole=\"list\"\n\t\t\t\taria-label={ __( 'Block variations' ) }\n\t\t\t>\n\t\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t\t<li key={ variation.name }>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\ticon={ variation.icon }\n\t\t\t\t\t\t\ticonSize={ 48 }\n\t\t\t\t\t\t\tonClick={ () => onSelect( variation ) }\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation\"\n\t\t\t\t\t\t\tlabel={ variation.description || variation.title }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName=\"block-editor-block-variation-picker__variation-label\"\n\t\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ variation.title }\n\t\t\t\t\t\t</span>\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\t{ allowSkip && (\n\t\t\t\t<div className=\"block-editor-block-variation-picker__skip\">\n\t\t\t\t\t<Button variant=\"link\" onClick={ () => onSelect() }>\n\t\t\t\t\t\t{ __( 'Skip' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Placeholder>\n\t);\n}\n\nexport default BlockVariationPicker;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst grid = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\td=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7.8 16.5H5c-.3 0-.5-.2-.5-.5v-6.2h6.8v6.7zm0-8.3H4.5V5c0-.3.2-.5.5-.5h6.2v6.7zm8.3 7.8c0 .3-.2.5-.5.5h-6.2v-6.8h6.8V19zm0-7.8h-6.8V4.5H19c.3 0 .5.2.5.5v6.2z\"\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default grid;\n","export const VIEWMODES = {\n\tcarousel: 'carousel',\n\tgrid: 'grid',\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport {\n\tchevronRight,\n\tchevronLeft,\n\tgrid,\n\tstretchFullWidth,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { VIEWMODES } from './constants';\n\nconst Actions = ( { onBlockPatternSelect } ) => (\n\t<div className=\"block-editor-block-pattern-setup__actions\">\n\t\t<Button variant=\"primary\" onClick={ onBlockPatternSelect }>\n\t\t\t{ __( 'Choose' ) }\n\t\t</Button>\n\t</div>\n);\n\nconst CarouselNavigation = ( {\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n} ) => (\n\t<div className=\"block-editor-block-pattern-setup__navigation\">\n\t\t<Button\n\t\t\ticon={ chevronLeft }\n\t\t\tlabel={ __( 'Previous pattern' ) }\n\t\t\tonClick={ handlePrevious }\n\t\t\tdisabled={ activeSlide === 0 }\n\t\t/>\n\t\t<Button\n\t\t\ticon={ chevronRight }\n\t\t\tlabel={ __( 'Next pattern' ) }\n\t\t\tonClick={ handleNext }\n\t\t\tdisabled={ activeSlide === totalSlides - 1 }\n\t\t/>\n\t</div>\n);\n\nconst SetupToolbar = ( {\n\tviewMode,\n\tsetViewMode,\n\thandlePrevious,\n\thandleNext,\n\tactiveSlide,\n\ttotalSlides,\n\tonBlockPatternSelect,\n} ) => {\n\tconst isCarouselView = viewMode === VIEWMODES.carousel;\n\tconst displayControls = (\n\t\t<div className=\"block-editor-block-pattern-setup__display-controls\">\n\t\t\t<Button\n\t\t\t\ticon={ stretchFullWidth }\n\t\t\t\tlabel={ __( 'Carousel view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.carousel ) }\n\t\t\t\tisPressed={ isCarouselView }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ grid }\n\t\t\t\tlabel={ __( 'Grid view' ) }\n\t\t\t\tonClick={ () => setViewMode( VIEWMODES.grid ) }\n\t\t\t\tisPressed={ viewMode === VIEWMODES.grid }\n\t\t\t/>\n\t\t</div>\n\t);\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__toolbar\">\n\t\t\t{ isCarouselView && (\n\t\t\t\t<CarouselNavigation\n\t\t\t\t\thandlePrevious={ handlePrevious }\n\t\t\t\t\thandleNext={ handleNext }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ totalSlides }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ displayControls }\n\t\t\t{ isCarouselView && (\n\t\t\t\t<Actions onBlockPatternSelect={ onBlockPatternSelect } />\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport default SetupToolbar;\n","/**\n * WordPress dependencies\n */\nimport { useDispatch } from '@wordpress/data';\nimport { cloneBlock } from '@wordpress/blocks';\nimport {\n\tVisuallyHidden,\n\t__unstableComposite as Composite,\n\t__unstableUseCompositeState as useCompositeState,\n\t__unstableCompositeItem as CompositeItem,\n} from '@wordpress/components';\n\nimport { useState } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport BlockPreview from '../block-preview';\nimport SetupToolbar from './setup-toolbar';\nimport usePatternsSetup from './use-patterns-setup';\nimport { VIEWMODES } from './constants';\n\nconst SetupContent = ( {\n\tviewMode,\n\tactiveSlide,\n\tpatterns,\n\tonBlockPatternSelect,\n} ) => {\n\tconst composite = useCompositeState();\n\tconst containerClass = 'block-editor-block-pattern-setup__container';\n\tif ( viewMode === VIEWMODES.carousel ) {\n\t\tconst slideClass = new Map( [\n\t\t\t[ activeSlide, 'active-slide' ],\n\t\t\t[ activeSlide - 1, 'previous-slide' ],\n\t\t\t[ activeSlide + 1, 'next-slide' ],\n\t\t] );\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-pattern-setup__carousel\">\n\t\t\t\t<div className={ containerClass }>\n\t\t\t\t\t<ul className=\"carousel-container\">\n\t\t\t\t\t\t{ patterns.map( ( pattern, index ) => (\n\t\t\t\t\t\t\t<BlockPatternSlide\n\t\t\t\t\t\t\t\tclassName={ slideClass.get( index ) || '' }\n\t\t\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\treturn (\n\t\t<div className=\"block-editor-block-pattern-setup__grid\">\n\t\t\t<Composite\n\t\t\t\t{ ...composite }\n\t\t\t\trole=\"listbox\"\n\t\t\t\tclassName={ containerClass }\n\t\t\t\taria-label={ __( 'Patterns list' ) }\n\t\t\t>\n\t\t\t\t{ patterns.map( ( pattern ) => (\n\t\t\t\t\t<BlockPattern\n\t\t\t\t\t\tkey={ pattern.name }\n\t\t\t\t\t\tpattern={ pattern }\n\t\t\t\t\t\tonSelect={ onBlockPatternSelect }\n\t\t\t\t\t\tcomposite={ composite }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</Composite>\n\t\t</div>\n\t);\n};\n\nfunction BlockPattern( { pattern, onSelect, composite } ) {\n\tconst baseClassName = 'block-editor-block-pattern-setup-list';\n\tconst { blocks, description, viewportWidth = 700 } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPattern,\n\t\t`${ baseClassName }__item-description`\n\t);\n\treturn (\n\t\t<div\n\t\t\tclassName={ `${ baseClassName }__list-item` }\n\t\t\taria-label={ pattern.title }\n\t\t\taria-describedby={ pattern.description ? descriptionId : undefined }\n\t\t>\n\t\t\t<CompositeItem\n\t\t\t\trole=\"option\"\n\t\t\t\tas=\"div\"\n\t\t\t\t{ ...composite }\n\t\t\t\tclassName={ `${ baseClassName }__item` }\n\t\t\t\tonClick={ () => onSelect( blocks ) }\n\t\t\t>\n\t\t\t\t<BlockPreview\n\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\tviewportWidth={ viewportWidth }\n\t\t\t\t/>\n\t\t\t</CompositeItem>\n\t\t\t{ !! description && (\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction BlockPatternSlide( { className, pattern, minHeight } ) {\n\tconst { blocks, title, description } = pattern;\n\tconst descriptionId = useInstanceId(\n\t\tBlockPatternSlide,\n\t\t'block-editor-block-pattern-setup-list__item-description'\n\t);\n\treturn (\n\t\t<li\n\t\t\tclassName={ `pattern-slide ${ className }` }\n\t\t\taria-label={ title }\n\t\t\taria-describedby={ description ? descriptionId : undefined }\n\t\t>\n\t\t\t<BlockPreview\n\t\t\t\tblocks={ blocks }\n\t\t\t\t__experimentalMinHeight={ minHeight }\n\t\t\t/>\n\t\t\t{ !! description && (\n\t\t\t\t<VisuallyHidden id={ descriptionId }>\n\t\t\t\t\t{ description }\n\t\t\t\t</VisuallyHidden>\n\t\t\t) }\n\t\t</li>\n\t);\n}\n\nconst BlockPatternSetup = ( {\n\tclientId,\n\tblockName,\n\tfilterPatternsFn,\n\tonBlockPatternSelect,\n} ) => {\n\tconst [ viewMode, setViewMode ] = useState( VIEWMODES.carousel );\n\tconst [ activeSlide, setActiveSlide ] = useState( 0 );\n\tconst { replaceBlock } = useDispatch( blockEditorStore );\n\tconst patterns = usePatternsSetup( clientId, blockName, filterPatternsFn );\n\n\tif ( ! patterns?.length ) {\n\t\treturn null;\n\t}\n\n\tconst onBlockPatternSelectDefault = ( blocks ) => {\n\t\tconst clonedBlocks = blocks.map( ( block ) => cloneBlock( block ) );\n\t\treplaceBlock( clientId, clonedBlocks );\n\t};\n\tconst onPatternSelectCallback =\n\t\tonBlockPatternSelect || onBlockPatternSelectDefault;\n\treturn (\n\t\t<>\n\t\t\t<div\n\t\t\t\tclassName={ `block-editor-block-pattern-setup view-mode-${ viewMode }` }\n\t\t\t>\n\t\t\t\t<SetupContent\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\tpatterns={ patterns }\n\t\t\t\t\tonBlockPatternSelect={ onPatternSelectCallback }\n\t\t\t\t/>\n\t\t\t\t<SetupToolbar\n\t\t\t\t\tviewMode={ viewMode }\n\t\t\t\t\tsetViewMode={ setViewMode }\n\t\t\t\t\tactiveSlide={ activeSlide }\n\t\t\t\t\ttotalSlides={ patterns.length }\n\t\t\t\t\thandleNext={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) => active + 1 );\n\t\t\t\t\t} }\n\t\t\t\t\thandlePrevious={ () => {\n\t\t\t\t\t\tsetActiveSlide( ( active ) => active - 1 );\n\t\t\t\t\t} }\n\t\t\t\t\tonBlockPatternSelect={ () => {\n\t\t\t\t\t\tonPatternSelectCallback(\n\t\t\t\t\t\t\tpatterns[ activeSlide ].blocks\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</>\n\t);\n};\n\nexport default BlockPatternSetup;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nfunction usePatternsSetup( clientId, blockName, filterPatternsFn ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetBlockRootClientId,\n\t\t\t\t__experimentalGetPatternsByBlockTypes,\n\t\t\t\t__experimentalGetAllowedPatterns,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst rootClientId = getBlockRootClientId( clientId );\n\t\t\tif ( filterPatternsFn ) {\n\t\t\t\treturn __experimentalGetAllowedPatterns( rootClientId ).filter(\n\t\t\t\t\tfilterPatternsFn\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn __experimentalGetPatternsByBlockTypes(\n\t\t\t\tblockName,\n\t\t\t\trootClientId\n\t\t\t);\n\t\t},\n\t\t[ clientId, blockName, filterPatternsFn ]\n\t);\n}\n\nexport default usePatternsSetup;\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tButton,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItemsChoice,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction VariationsButtons( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\treturn (\n\t\t<fieldset className={ className }>\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Transform to variation' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ variations.map( ( variation ) => (\n\t\t\t\t<Button\n\t\t\t\t\tkey={ variation.name }\n\t\t\t\t\ticon={ <BlockIcon icon={ variation.icon } showColors /> }\n\t\t\t\t\tisPressed={ selectedValue === variation.name }\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tselectedValue === variation.name\n\t\t\t\t\t\t\t? variation.title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: Name of the block variation */\n\t\t\t\t\t\t\t\t\t__( 'Transform to %s' ),\n\t\t\t\t\t\t\t\t\tvariation.title\n\t\t\t\t\t\t\t  )\n\t\t\t\t\t}\n\t\t\t\t\tonClick={ () => onSelectVariation( variation.name ) }\n\t\t\t\t\taria-label={ variation.title }\n\t\t\t\t\tshowTooltip\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</fieldset>\n\t);\n}\n\nfunction VariationsDropdown( {\n\tclassName,\n\tonSelectVariation,\n\tselectedValue,\n\tvariations,\n} ) {\n\tconst selectOptions = variations.map(\n\t\t( { name, title, description } ) => ( {\n\t\t\tvalue: name,\n\t\t\tlabel: title,\n\t\t\tinfo: description,\n\t\t} )\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName={ className }\n\t\t\tlabel={ __( 'Transform to variation' ) }\n\t\t\ttext={ __( 'Transform to variation' ) }\n\t\t\tpopoverProps={ {\n\t\t\t\tposition: 'bottom center',\n\t\t\t\tclassName: `${ className }__popover`,\n\t\t\t} }\n\t\t\ticon={ chevronDown }\n\t\t\ttoggleProps={ { iconPosition: 'right' } }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<div className={ `${ className }__container` }>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tchoices={ selectOptions }\n\t\t\t\t\t\t\tvalue={ selectedValue }\n\t\t\t\t\t\t\tonSelect={ onSelectVariation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction __experimentalBlockVariationTransforms( { blockClientId } ) {\n\tconst { updateBlockAttributes } = useDispatch( blockEditorStore );\n\tconst { activeBlockVariation, variations } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getActiveBlockVariation, getBlockVariations } =\n\t\t\t\tselect( blocksStore );\n\t\t\tconst { getBlockName, getBlockAttributes } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst name = blockClientId && getBlockName( blockClientId );\n\t\t\treturn {\n\t\t\t\tactiveBlockVariation: getActiveBlockVariation(\n\t\t\t\t\tname,\n\t\t\t\t\tgetBlockAttributes( blockClientId )\n\t\t\t\t),\n\t\t\t\tvariations: name && getBlockVariations( name, 'transform' ),\n\t\t\t};\n\t\t},\n\t\t[ blockClientId ]\n\t);\n\n\tconst selectedValue = activeBlockVariation?.name;\n\n\t// Check if each variation has a unique icon.\n\tconst hasUniqueIcons = useMemo( () => {\n\t\tconst variationIcons = new Set();\n\t\tif ( ! variations ) {\n\t\t\treturn false;\n\t\t}\n\t\tvariations.forEach( ( variation ) => {\n\t\t\tif ( variation.icon ) {\n\t\t\t\tvariationIcons.add( variation.icon?.src || variation.icon );\n\t\t\t}\n\t\t} );\n\t\treturn variationIcons.size === variations.length;\n\t}, [ variations ] );\n\n\tconst onSelectVariation = ( variationName ) => {\n\t\tupdateBlockAttributes( blockClientId, {\n\t\t\t...variations.find( ( { name } ) => name === variationName )\n\t\t\t\t.attributes,\n\t\t} );\n\t};\n\n\tconst baseClass = 'block-editor-block-variation-transforms';\n\n\t// Skip rendering if there are no variations\n\tif ( ! variations?.length ) return null;\n\n\tconst Component = hasUniqueIcons ? VariationsButtons : VariationsDropdown;\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={ baseClass }\n\t\t\tonSelectVariation={ onSelectVariation }\n\t\t\tselectedValue={ selectedValue }\n\t\t\tvariations={ variations }\n\t\t/>\n\t);\n}\n\nexport default __experimentalBlockVariationTransforms;\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default createHigherOrderComponent( ( WrappedComponent ) => {\n\treturn ( props ) => {\n\t\tconst colorsFeature = useSetting( 'color.palette' );\n\t\tconst disableCustomColorsFeature = ! useSetting( 'color.custom' );\n\t\tconst colors =\n\t\t\tprops.colors === undefined ? colorsFeature : props.colors;\n\t\tconst disableCustomColors =\n\t\t\tprops.disableCustomColors === undefined\n\t\t\t\t? disableCustomColorsFeature\n\t\t\t\t: props.disableCustomColors;\n\t\tconst hasColorsToChoose = ! isEmpty( colors ) || ! disableCustomColors;\n\t\treturn (\n\t\t\t<WrappedComponent\n\t\t\t\t{ ...{\n\t\t\t\t\t...props,\n\t\t\t\t\tcolors,\n\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\thasColorsToChoose,\n\t\t\t\t} }\n\t\t\t/>\n\t\t);\n\t};\n}, 'withColorContext' );\n","/**\n * WordPress dependencies\n */\nimport { ColorPalette } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport withColorContext from './with-color-context';\n\nexport default withColorContext( ColorPalette );\n","/**\n * Internal dependencies\n */\nimport ColorGradientControl from '../colors-gradients/control';\n\nexport default function ColorPaletteControl( {\n\tonChange,\n\tvalue,\n\t...otherProps\n} ) {\n\treturn (\n\t\t<ColorGradientControl\n\t\t\t{ ...otherProps }\n\t\t\tonColorChange={ onChange }\n\t\t\tcolorValue={ value }\n\t\t\tgradients={ [] }\n\t\t\tdisableCustomGradients={ true }\n\t\t/>\n\t);\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","/**\n * WordPress dependencies\n */\nimport { _x, __ } from '@wordpress/i18n';\nimport { dateI18n } from '@wordpress/date';\nimport { useState, createInterpolateElement } from '@wordpress/element';\nimport {\n\tTextControl,\n\tExternalLink,\n\tVisuallyHidden,\n\tCustomSelectControl,\n\tBaseControl,\n\tToggleControl,\n} from '@wordpress/components';\n\n// So that we can illustrate the different formats in the dropdown properly,\n// show a date that has a day greater than 12 and a month with more than three\n// letters. Here we're using 2022-01-25 which is when WordPress 5.9 was\n// released.\nconst EXAMPLE_DATE = new Date( 2022, 0, 25 );\n\n/**\n * The `DateFormatPicker` component renders controls that let the user choose a\n * _date format_. That is, how they want their dates to be formatted.\n *\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/date-format-picker/README.md\n *\n * @param {Object}                          props\n * @param {string|null}                     props.format        The selected date\n *                                                              format. If\n *                                                              `null`,\n *                                                              _Default_ is\n *                                                              selected.\n * @param {string}                          props.defaultFormat The date format that\n *                                                              will be used if the\n *                                                              user selects\n *                                                              'Default'.\n * @param {( format: string|null ) => void} props.onChange      Called when a\n *                                                              selection is\n *                                                              made. If `null`,\n *                                                              _Default_ is\n *                                                              selected.\n */\nexport default function DateFormatPicker( {\n\tformat,\n\tdefaultFormat,\n\tonChange,\n} ) {\n\treturn (\n\t\t<fieldset className=\"block-editor-date-format-picker\">\n\t\t\t<VisuallyHidden as=\"legend\">{ __( 'Date format' ) }</VisuallyHidden>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ __( 'Default format' ) }\n\t\t\t\t\t\t<span className=\"block-editor-date-format-picker__default-format-toggle-control__hint\">\n\t\t\t\t\t\t\t{ dateI18n( defaultFormat, EXAMPLE_DATE ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t\tchecked={ ! format }\n\t\t\t\tonChange={ ( checked ) =>\n\t\t\t\t\tonChange( checked ? null : defaultFormat )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ format && (\n\t\t\t\t<NonDefaultControls format={ format } onChange={ onChange } />\n\t\t\t) }\n\t\t</fieldset>\n\t);\n}\n\nfunction NonDefaultControls( { format, onChange } ) {\n\t// Suggest a short format, medium format, long format, and a standardised\n\t// (YYYY-MM-DD) format. The short, medium, and long formats are localised as\n\t// different languages have different ways of writing these. For example, 'F\n\t// j, Y' (April 20, 2022) in American English (en_US) is 'j. F Y' (20. April\n\t// 2022) in German (de). The resultant array is de-duplicated as some\n\t// languages will use the same format string for short, medium, and long\n\t// formats.\n\tconst suggestedFormats = [\n\t\t...new Set( [\n\t\t\t'Y-m-d',\n\t\t\t_x( 'n/j/Y', 'short date format' ),\n\t\t\t_x( 'n/j/Y g:i A', 'short date format with time' ),\n\t\t\t_x( 'M j, Y', 'medium date format' ),\n\t\t\t_x( 'M j, Y g:i A', 'medium date format with time' ),\n\t\t\t_x( 'F j, Y', 'long date format' ),\n\t\t\t_x( 'M j', 'short date format without the year' ),\n\t\t] ),\n\t];\n\n\tconst suggestedOptions = suggestedFormats.map(\n\t\t( suggestedFormat, index ) => ( {\n\t\t\tkey: `suggested-${ index }`,\n\t\t\tname: dateI18n( suggestedFormat, EXAMPLE_DATE ),\n\t\t\tformat: suggestedFormat,\n\t\t} )\n\t);\n\tconst customOption = {\n\t\tkey: 'custom',\n\t\tname: __( 'Custom' ),\n\t\tclassName:\n\t\t\t'block-editor-date-format-picker__custom-format-select-control__custom-option',\n\t\t__experimentalHint: __( 'Enter your own date format' ),\n\t};\n\n\tconst [ isCustom, setIsCustom ] = useState(\n\t\t() => !! format && ! suggestedFormats.includes( format )\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<BaseControl className=\"block-editor-date-format-picker__custom-format-select-control\">\n\t\t\t\t<CustomSelectControl\n\t\t\t\t\t__nextUnconstrainedWidth\n\t\t\t\t\tlabel={ __( 'Choose a format' ) }\n\t\t\t\t\toptions={ [ ...suggestedOptions, customOption ] }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\tisCustom\n\t\t\t\t\t\t\t? customOption\n\t\t\t\t\t\t\t: suggestedOptions.find(\n\t\t\t\t\t\t\t\t\t( option ) => option.format === format\n\t\t\t\t\t\t\t  ) ?? customOption\n\t\t\t\t\t}\n\t\t\t\t\tonChange={ ( { selectedItem } ) => {\n\t\t\t\t\t\tif ( selectedItem === customOption ) {\n\t\t\t\t\t\t\tsetIsCustom( true );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tsetIsCustom( false );\n\t\t\t\t\t\t\tonChange( selectedItem.format );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</BaseControl>\n\t\t\t{ isCustom && (\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Custom format' ) }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\thelp={ createInterpolateElement(\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'Enter a date or time <Link>format string</Link>.'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLink: (\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/support/article/formatting-date-and-time/'\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\tvalue={ format }\n\t\t\t\t\tonChange={ ( value ) => onChange( value ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { every, isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalSpacer as Spacer,\n\t__experimentalToolsPanel as ToolsPanel,\n} from '@wordpress/components';\nimport { useRegistry } from '@wordpress/data';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport ColorGradientSettingsDropdown from './dropdown';\nimport useSetting from '../use-setting';\nimport useCommonSingleMultipleSelects from './use-common-single-multiple-selects';\nimport useMultipleOriginColorsAndGradients from './use-multiple-origin-colors-and-gradients';\n\nconst colorsAndGradientKeys = [\n\t'colors',\n\t'disableCustomColors',\n\t'gradients',\n\t'disableCustomGradients',\n];\n\nexport const PanelColorGradientSettingsInner = ( {\n\tclassName,\n\tcolors,\n\tgradients,\n\tdisableCustomColors,\n\tdisableCustomGradients,\n\tchildren,\n\tsettings,\n\ttitle,\n\tshowTitle = true,\n\t__experimentalHasMultipleOrigins,\n\t__experimentalIsRenderedInSidebar,\n\tenableAlpha,\n} ) => {\n\tconst panelId = useInstanceId( PanelColorGradientSettingsInner );\n\tconst { batch } = useRegistry();\n\tif (\n\t\tisEmpty( colors ) &&\n\t\tisEmpty( gradients ) &&\n\t\tdisableCustomColors &&\n\t\tdisableCustomGradients &&\n\t\tevery(\n\t\t\tsettings,\n\t\t\t( setting ) =>\n\t\t\t\tisEmpty( setting.colors ) &&\n\t\t\t\tisEmpty( setting.gradients ) &&\n\t\t\t\t( setting.disableCustomColors === undefined ||\n\t\t\t\t\tsetting.disableCustomColors ) &&\n\t\t\t\t( setting.disableCustomGradients === undefined ||\n\t\t\t\t\tsetting.disableCustomGradients )\n\t\t)\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ToolsPanel\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-panel-color-gradient-settings',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tlabel={ showTitle ? title : undefined }\n\t\t\tresetAll={ () => {\n\t\t\t\tbatch( () => {\n\t\t\t\t\tsettings.forEach(\n\t\t\t\t\t\t( {\n\t\t\t\t\t\t\tcolorValue,\n\t\t\t\t\t\t\tgradientValue,\n\t\t\t\t\t\t\tonColorChange,\n\t\t\t\t\t\t\tonGradientChange,\n\t\t\t\t\t\t} ) => {\n\t\t\t\t\t\t\tif ( colorValue ) {\n\t\t\t\t\t\t\t\tonColorChange();\n\t\t\t\t\t\t\t} else if ( gradientValue ) {\n\t\t\t\t\t\t\t\tonGradientChange();\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\tpanelId={ panelId }\n\t\t\t__experimentalFirstVisibleItemClass=\"first\"\n\t\t\t__experimentalLastVisibleItemClass=\"last\"\n\t\t>\n\t\t\t<ColorGradientSettingsDropdown\n\t\t\t\tsettings={ settings }\n\t\t\t\tpanelId={ panelId }\n\t\t\t\t{ ...{\n\t\t\t\t\tcolors,\n\t\t\t\t\tgradients,\n\t\t\t\t\tdisableCustomColors,\n\t\t\t\t\tdisableCustomGradients,\n\t\t\t\t\t__experimentalHasMultipleOrigins,\n\t\t\t\t\t__experimentalIsRenderedInSidebar,\n\t\t\t\t\tenableAlpha,\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ !! children && (\n\t\t\t\t<>\n\t\t\t\t\t<Spacer marginY={ 4 } /> { children }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</ToolsPanel>\n\t);\n};\n\nconst PanelColorGradientSettingsSingleSelect = ( props ) => {\n\tconst colorGradientSettings = useCommonSingleMultipleSelects();\n\tcolorGradientSettings.colors = useSetting( 'color.palette' );\n\tcolorGradientSettings.gradients = useSetting( 'color.gradients' );\n\treturn (\n\t\t<PanelColorGradientSettingsInner\n\t\t\t{ ...{ ...colorGradientSettings, ...props } }\n\t\t/>\n\t);\n};\n\nconst PanelColorGradientSettingsMultipleSelect = ( props ) => {\n\tconst colorGradientSettings = useMultipleOriginColorsAndGradients();\n\treturn (\n\t\t<PanelColorGradientSettingsInner\n\t\t\t{ ...{ ...colorGradientSettings, ...props } }\n\t\t/>\n\t);\n};\n\nconst PanelColorGradientSettings = ( props ) => {\n\tif (\n\t\tevery( colorsAndGradientKeys, ( key ) => props.hasOwnProperty( key ) )\n\t) {\n\t\treturn <PanelColorGradientSettingsInner { ...props } />;\n\t}\n\tif ( props.__experimentalHasMultipleOrigins ) {\n\t\treturn <PanelColorGradientSettingsMultipleSelect { ...props } />;\n\t}\n\treturn <PanelColorGradientSettingsSingleSelect { ...props } />;\n};\n\nexport default PanelColorGradientSettings;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n    extendStatics = Object.setPrototypeOf ||\r\n        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n    return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n    extendStatics(d, b);\r\n    function __() { this.constructor = d; }\r\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n    __assign = Object.assign || function __assign(t) {\r\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n            s = arguments[i];\r\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n        }\r\n        return t;\r\n    }\r\n    return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n    var t = {};\r\n    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n        t[p] = s[p];\r\n    if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n                t[p[i]] = s[p[i]];\r\n        }\r\n    return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n    return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n    return new (P || (P = Promise))(function (resolve, reject) {\r\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n        function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n        step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n    });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n    return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n    function verb(n) { return function (v) { return step([n, v]); }; }\r\n    function step(op) {\r\n        if (f) throw new TypeError(\"Generator is already executing.\");\r\n        while (_) try {\r\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;\r\n            if (y = 0, t) op = [op[0] & 2, t.value];\r\n            switch (op[0]) {\r\n                case 0: case 1: t = op; break;\r\n                case 4: _.label++; return { value: op[1], done: false };\r\n                case 5: _.label++; y = op[1]; op = [0]; continue;\r\n                case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n                default:\r\n                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n                    if (t[2]) _.ops.pop();\r\n                    _.trys.pop(); continue;\r\n            }\r\n            op = body.call(thisArg, _);\r\n        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n    }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n    if (k2 === undefined) k2 = k;\r\n    o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n    if (m) return m.call(o);\r\n    if (o && typeof o.length === \"number\") return {\r\n        next: function () {\r\n            if (o && i >= o.length) o = void 0;\r\n            return { value: o && o[i++], done: !o };\r\n        }\r\n    };\r\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n    if (!m) return o;\r\n    var i = m.call(o), r, ar = [], e;\r\n    try {\r\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n    }\r\n    catch (error) { e = { error: error }; }\r\n    finally {\r\n        try {\r\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n        }\r\n        finally { if (e) throw e.error; }\r\n    }\r\n    return ar;\r\n}\r\n\r\nexport function __spread() {\r\n    for (var ar = [], i = 0; i < arguments.length; i++)\r\n        ar = ar.concat(__read(arguments[i]));\r\n    return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n    for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n            r[k] = a[j];\r\n    return r;\r\n};\r\n\r\nexport function __await(v) {\r\n    return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n    return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n    function fulfill(value) { resume(\"next\", value); }\r\n    function reject(value) { resume(\"throw\", value); }\r\n    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n    var i, p;\r\n    return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n    if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n    var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n    if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n    return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n    Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n    o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n    if (mod && mod.__esModule) return mod;\r\n    var result = {};\r\n    if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n    __setModuleDefault(result, mod);\r\n    return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n    return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to get private field on non-instance\");\r\n    }\r\n    return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n    if (!privateMap.has(receiver)) {\r\n        throw new TypeError(\"attempted to set private field on non-instance\");\r\n    }\r\n    privateMap.set(receiver, value);\r\n    return value;\r\n}\r\n","import { Area, MediaSize, Point, Size } from './types'\n\n/**\n * Compute the dimension of the crop area based on media size,\n * aspect ratio and optionally rotation\n */\nexport function getCropSize(\n  mediaWidth: number,\n  mediaHeight: number,\n  containerWidth: number,\n  containerHeight: number,\n  aspect: number,\n  rotation = 0\n): Size {\n  const { width, height } = rotateSize(mediaWidth, mediaHeight, rotation)\n  const fittingWidth = Math.min(width, containerWidth)\n  const fittingHeight = Math.min(height, containerHeight)\n\n  if (fittingWidth > fittingHeight * aspect) {\n    return {\n      width: fittingHeight * aspect,\n      height: fittingHeight,\n    }\n  }\n\n  return {\n    width: fittingWidth,\n    height: fittingWidth / aspect,\n  }\n}\n\n/**\n * Compute media zoom.\n * We fit the media into the container with \"max-width: 100%; max-height: 100%;\"\n */\nexport function getMediaZoom(mediaSize: MediaSize) {\n  // Take the axis with more pixels to improve accuracy\n  return mediaSize.width > mediaSize.height\n    ? mediaSize.width / mediaSize.naturalWidth\n    : mediaSize.height / mediaSize.naturalHeight\n}\n\n/**\n * Ensure a new media position stays in the crop area.\n */\nexport function restrictPosition(\n  position: Point,\n  mediaSize: Size,\n  cropSize: Size,\n  zoom: number,\n  rotation = 0\n): Point {\n  const { width, height } = rotateSize(mediaSize.width, mediaSize.height, rotation)\n\n  return {\n    x: restrictPositionCoord(position.x, width, cropSize.width, zoom),\n    y: restrictPositionCoord(position.y, height, cropSize.height, zoom),\n  }\n}\n\nfunction restrictPositionCoord(\n  position: number,\n  mediaSize: number,\n  cropSize: number,\n  zoom: number\n): number {\n  const maxPosition = (mediaSize * zoom) / 2 - cropSize / 2\n\n  return clamp(position, -maxPosition, maxPosition)\n}\n\nexport function getDistanceBetweenPoints(pointA: Point, pointB: Point) {\n  return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2))\n}\n\nexport function getRotationBetweenPoints(pointA: Point, pointB: Point) {\n  return (Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180) / Math.PI\n}\n\n/**\n * Compute the output cropped area of the media in percentages and pixels.\n * x/y are the top-left coordinates on the src media\n */\nexport function computeCroppedArea(\n  crop: Point,\n  mediaSize: MediaSize,\n  cropSize: Size,\n  aspect: number,\n  zoom: number,\n  rotation = 0,\n  restrictPosition = true\n): { croppedAreaPercentages: Area; croppedAreaPixels: Area } {\n  // if the media is rotated by the user, we cannot limit the position anymore\n  // as it might need to be negative.\n  const limitAreaFn = restrictPosition ? limitArea : noOp\n\n  const mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation)\n  const mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation)\n\n  // calculate the crop area in percentages\n  // in the rotated space\n  const croppedAreaPercentages = {\n    x: limitAreaFn(\n      100,\n      (((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width) *\n        100\n    ),\n    y: limitAreaFn(\n      100,\n      (((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) /\n        mediaBBoxSize.height) *\n        100\n    ),\n    width: limitAreaFn(100, ((cropSize.width / mediaBBoxSize.width) * 100) / zoom),\n    height: limitAreaFn(100, ((cropSize.height / mediaBBoxSize.height) * 100) / zoom),\n  }\n\n  // we compute the pixels size naively\n  const widthInPixels = Math.round(\n    limitAreaFn(\n      mediaNaturalBBoxSize.width,\n      (croppedAreaPercentages.width * mediaNaturalBBoxSize.width) / 100\n    )\n  )\n  const heightInPixels = Math.round(\n    limitAreaFn(\n      mediaNaturalBBoxSize.height,\n      (croppedAreaPercentages.height * mediaNaturalBBoxSize.height) / 100\n    )\n  )\n  const isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect\n\n  // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)\n  // if the media is wider than high, when zoom is 0, the crop height will be equals to image height\n  // thus we want to compute the width from the height and aspect for accuracy.\n  // Otherwise, we compute the height from width and aspect.\n  const sizePixels = isImgWiderThanHigh\n    ? {\n        width: Math.round(heightInPixels * aspect),\n        height: heightInPixels,\n      }\n    : {\n        width: widthInPixels,\n        height: Math.round(widthInPixels / aspect),\n      }\n\n  const croppedAreaPixels = {\n    ...sizePixels,\n    x: Math.round(\n      limitAreaFn(\n        mediaNaturalBBoxSize.width - sizePixels.width,\n        (croppedAreaPercentages.x * mediaNaturalBBoxSize.width) / 100\n      )\n    ),\n    y: Math.round(\n      limitAreaFn(\n        mediaNaturalBBoxSize.height - sizePixels.height,\n        (croppedAreaPercentages.y * mediaNaturalBBoxSize.height) / 100\n      )\n    ),\n  }\n\n  return { croppedAreaPercentages, croppedAreaPixels }\n}\n\n/**\n * Ensure the returned value is between 0 and max\n */\nfunction limitArea(max: number, value: number): number {\n  return Math.min(max, Math.max(0, value))\n}\n\nfunction noOp(_max: number, value: number) {\n  return value\n}\n\n/**\n * Compute crop and zoom from the croppedAreaPercentages.\n */\nexport function getInitialCropFromCroppedAreaPercentages(\n  croppedAreaPercentages: Area,\n  mediaSize: MediaSize,\n  rotation: number,\n  cropSize: Size,\n  minZoom: number,\n  maxZoom: number\n) {\n  const mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation)\n\n  // This is the inverse process of computeCroppedArea\n  const zoom = clamp(\n    (cropSize.width / mediaBBoxSize.width) * (100 / croppedAreaPercentages.width),\n    minZoom,\n    maxZoom\n  )\n\n  const crop = {\n    x:\n      (zoom * mediaBBoxSize.width) / 2 -\n      cropSize.width / 2 -\n      mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),\n    y:\n      (zoom * mediaBBoxSize.height) / 2 -\n      cropSize.height / 2 -\n      mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100),\n  }\n\n  return { crop, zoom }\n}\n\n/**\n * Compute zoom from the croppedAreaPixels\n */\nfunction getZoomFromCroppedAreaPixels(\n  croppedAreaPixels: Area,\n  mediaSize: MediaSize,\n  cropSize: Size\n): number {\n  const mediaZoom = getMediaZoom(mediaSize)\n\n  return cropSize.height > cropSize.width\n    ? cropSize.height / (croppedAreaPixels.height * mediaZoom)\n    : cropSize.width / (croppedAreaPixels.width * mediaZoom)\n}\n\n/**\n * Compute crop and zoom from the croppedAreaPixels\n */\nexport function getInitialCropFromCroppedAreaPixels(\n  croppedAreaPixels: Area,\n  mediaSize: MediaSize,\n  rotation = 0,\n  cropSize: Size,\n  minZoom: number,\n  maxZoom: number\n): { crop: Point; zoom: number } {\n  const mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation)\n\n  const zoom = clamp(\n    getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize),\n    minZoom,\n    maxZoom\n  )\n\n  const cropZoom =\n    cropSize.height > cropSize.width\n      ? cropSize.height / croppedAreaPixels.height\n      : cropSize.width / croppedAreaPixels.width\n\n  const crop = {\n    x:\n      ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,\n    y:\n      ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) *\n      cropZoom,\n  }\n  return { crop, zoom }\n}\n\n/**\n * Return the point that is the center of point a and b\n */\nexport function getCenter(a: Point, b: Point): Point {\n  return {\n    x: (b.x + a.x) / 2,\n    y: (b.y + a.y) / 2,\n  }\n}\n\nexport function getRadianAngle(degreeValue: number) {\n  return (degreeValue * Math.PI) / 180\n}\n\n/**\n * Returns the new bounding area of a rotated rectangle.\n */\nexport function rotateSize(width: number, height: number, rotation: number): Size {\n  const rotRad = getRadianAngle(rotation)\n\n  return {\n    width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),\n    height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height),\n  }\n}\n\n/**\n * Clamp value between min and max\n */\nexport function clamp(value: number, min: number, max: number) {\n  return Math.min(Math.max(value, min), max)\n}\n\n/**\n * Combine multiple class names into a single string.\n */\nexport function classNames(...args: (boolean | string | number | undefined | void | null)[]) {\n  return args\n    .filter((value) => {\n      if (typeof value === 'string' && value.length > 0) {\n        return true\n      }\n\n      return false\n    })\n    .join(' ')\n    .trim()\n}\n","import React from 'react'\nimport normalizeWheel from 'normalize-wheel'\nimport { Area, MediaSize, Point, Size, VideoSrc } from './types'\nimport {\n  getCropSize,\n  restrictPosition,\n  getDistanceBetweenPoints,\n  getRotationBetweenPoints,\n  computeCroppedArea,\n  getCenter,\n  getInitialCropFromCroppedAreaPixels,\n  getInitialCropFromCroppedAreaPercentages,\n  classNames,\n  clamp,\n} from './helpers'\nimport cssStyles from './styles.css'\n\nexport type CropperProps = {\n  image?: string\n  video?: string | VideoSrc[]\n  transform?: string\n  crop: Point\n  zoom: number\n  rotation: number\n  aspect: number\n  minZoom: number\n  maxZoom: number\n  cropShape: 'rect' | 'round'\n  cropSize?: Size\n  objectFit?: 'contain' | 'horizontal-cover' | 'vertical-cover' | 'auto-cover'\n  showGrid?: boolean\n  zoomSpeed: number\n  zoomWithScroll?: boolean\n  onCropChange: (location: Point) => void\n  onZoomChange?: (zoom: number) => void\n  onRotationChange?: (rotation: number) => void\n  onCropComplete?: (croppedArea: Area, croppedAreaPixels: Area) => void\n  onCropAreaChange?: (croppedArea: Area, croppedAreaPixels: Area) => void\n  onCropSizeChange?: (cropSize: Size) => void\n  onInteractionStart?: () => void\n  onInteractionEnd?: () => void\n  onMediaLoaded?: (mediaSize: MediaSize) => void\n  style: {\n    containerStyle?: React.CSSProperties\n    mediaStyle?: React.CSSProperties\n    cropAreaStyle?: React.CSSProperties\n  }\n  classes: {\n    containerClassName?: string\n    mediaClassName?: string\n    cropAreaClassName?: string\n  }\n  restrictPosition: boolean\n  mediaProps: React.ImgHTMLAttributes<HTMLElement> | React.VideoHTMLAttributes<HTMLElement>\n  disableAutomaticStylesInjection?: boolean\n  initialCroppedAreaPixels?: Area\n  initialCroppedAreaPercentages?: Area\n  onTouchRequest?: (e: React.TouchEvent<HTMLDivElement>) => boolean\n  onWheelRequest?: (e: WheelEvent) => boolean\n  setImageRef?: (ref: React.RefObject<HTMLImageElement>) => void\n  setVideoRef?: (ref: React.RefObject<HTMLVideoElement>) => void\n  setMediaSize?: (size: MediaSize) => void\n  setCropSize?: (size: Size) => void\n  nonce?: string\n}\n\ntype State = {\n  cropSize: Size | null\n  hasWheelJustStarted: boolean\n}\n\nconst MIN_ZOOM = 1\nconst MAX_ZOOM = 3\n\nclass Cropper extends React.Component<CropperProps, State> {\n  static defaultProps = {\n    zoom: 1,\n    rotation: 0,\n    aspect: 4 / 3,\n    maxZoom: MAX_ZOOM,\n    minZoom: MIN_ZOOM,\n    cropShape: 'rect' as const,\n    objectFit: 'contain' as const,\n    showGrid: true,\n    style: {},\n    classes: {},\n    mediaProps: {},\n    zoomSpeed: 1,\n    restrictPosition: true,\n    zoomWithScroll: true,\n  }\n\n  imageRef: React.RefObject<HTMLImageElement> = React.createRef()\n  videoRef: React.RefObject<HTMLVideoElement> = React.createRef()\n  containerRef: HTMLDivElement | null = null\n  styleRef: HTMLStyleElement | null = null\n  containerRect: DOMRect | null = null\n  mediaSize: MediaSize = { width: 0, height: 0, naturalWidth: 0, naturalHeight: 0 }\n  dragStartPosition: Point = { x: 0, y: 0 }\n  dragStartCrop: Point = { x: 0, y: 0 }\n  lastPinchDistance = 0\n  lastPinchRotation = 0\n  rafDragTimeout: number | null = null\n  rafPinchTimeout: number | null = null\n  wheelTimer: number | null = null\n  currentDoc: Document = document\n  currentWindow: Window = window\n\n  state: State = {\n    cropSize: null,\n    hasWheelJustStarted: false,\n  }\n\n  componentDidMount() {\n    if (this.containerRef) {\n      if (this.containerRef.ownerDocument) {\n        this.currentDoc = this.containerRef.ownerDocument\n      }\n      if (this.currentDoc.defaultView) {\n        this.currentWindow = this.currentDoc.defaultView\n      }\n      this.currentWindow.addEventListener('resize', this.computeSizes)\n      this.props.zoomWithScroll &&\n        this.containerRef.addEventListener('wheel', this.onWheel, { passive: false })\n      this.containerRef.addEventListener('gesturestart', this.preventZoomSafari)\n      this.containerRef.addEventListener('gesturechange', this.preventZoomSafari)\n    }\n\n    if (!this.props.disableAutomaticStylesInjection) {\n      this.styleRef = this.currentDoc.createElement('style')\n      this.styleRef.setAttribute('type', 'text/css')\n      if (this.props.nonce) {\n        this.styleRef.setAttribute('nonce', this.props.nonce)\n      }\n      this.styleRef.innerHTML = cssStyles\n      this.currentDoc.head.appendChild(this.styleRef)\n    }\n\n    // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called\n    if (this.imageRef.current && this.imageRef.current.complete) {\n      this.onMediaLoad()\n    }\n\n    // set image and video refs in the parent if the callbacks exist\n    if (this.props.setImageRef) {\n      this.props.setImageRef(this.imageRef)\n    }\n\n    if (this.props.setVideoRef) {\n      this.props.setVideoRef(this.videoRef)\n    }\n  }\n\n  componentWillUnmount() {\n    this.currentWindow.removeEventListener('resize', this.computeSizes)\n    if (this.containerRef) {\n      this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari)\n      this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari)\n    }\n\n    if (this.styleRef) {\n      this.styleRef.parentNode?.removeChild(this.styleRef)\n    }\n\n    this.cleanEvents()\n    this.props.zoomWithScroll && this.clearScrollEvent()\n  }\n\n  componentDidUpdate(prevProps: CropperProps) {\n    if (prevProps.rotation !== this.props.rotation) {\n      this.computeSizes()\n      this.recomputeCropPosition()\n    } else if (prevProps.aspect !== this.props.aspect) {\n      this.computeSizes()\n    } else if (prevProps.zoom !== this.props.zoom) {\n      this.recomputeCropPosition()\n    } else if (\n      prevProps.cropSize?.height !== this.props.cropSize?.height ||\n      prevProps.cropSize?.width !== this.props.cropSize?.width\n    ) {\n      this.computeSizes()\n    } else if (\n      prevProps.crop?.x !== this.props.crop?.x ||\n      prevProps.crop?.y !== this.props.crop?.y\n    ) {\n      this.emitCropAreaChange()\n    }\n    if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {\n      this.props.zoomWithScroll\n        ? this.containerRef.addEventListener('wheel', this.onWheel, { passive: false })\n        : this.clearScrollEvent()\n    }\n    if (prevProps.video !== this.props.video) {\n      this.videoRef.current?.load()\n    }\n  }\n\n  // this is to prevent Safari on iOS >= 10 to zoom the page\n  preventZoomSafari = (e: Event) => e.preventDefault()\n\n  cleanEvents = () => {\n    this.currentDoc.removeEventListener('mousemove', this.onMouseMove)\n    this.currentDoc.removeEventListener('mouseup', this.onDragStopped)\n    this.currentDoc.removeEventListener('touchmove', this.onTouchMove)\n    this.currentDoc.removeEventListener('touchend', this.onDragStopped)\n  }\n\n  clearScrollEvent = () => {\n    if (this.containerRef) this.containerRef.removeEventListener('wheel', this.onWheel)\n    if (this.wheelTimer) {\n      clearTimeout(this.wheelTimer)\n    }\n  }\n\n  onMediaLoad = () => {\n    const cropSize = this.computeSizes()\n\n    if (cropSize) {\n      this.emitCropData()\n      this.setInitialCrop(cropSize)\n    }\n\n    if (this.props.onMediaLoaded) {\n      this.props.onMediaLoaded(this.mediaSize)\n    }\n  }\n\n  setInitialCrop = (cropSize: Size) => {\n    if (this.props.initialCroppedAreaPercentages) {\n      const { crop, zoom } = getInitialCropFromCroppedAreaPercentages(\n        this.props.initialCroppedAreaPercentages,\n        this.mediaSize,\n        this.props.rotation,\n        cropSize,\n        this.props.minZoom,\n        this.props.maxZoom\n      )\n\n      this.props.onCropChange(crop)\n      this.props.onZoomChange && this.props.onZoomChange(zoom)\n    } else if (this.props.initialCroppedAreaPixels) {\n      const { crop, zoom } = getInitialCropFromCroppedAreaPixels(\n        this.props.initialCroppedAreaPixels,\n        this.mediaSize,\n        this.props.rotation,\n        cropSize,\n        this.props.minZoom,\n        this.props.maxZoom\n      )\n\n      this.props.onCropChange(crop)\n      this.props.onZoomChange && this.props.onZoomChange(zoom)\n    }\n  }\n\n  getAspect() {\n    const { cropSize, aspect } = this.props\n    if (cropSize) {\n      return cropSize.width / cropSize.height\n    }\n    return aspect\n  }\n\n  computeSizes = () => {\n    const mediaRef = this.imageRef.current || this.videoRef.current\n\n    if (mediaRef && this.containerRef) {\n      this.containerRect = this.containerRef.getBoundingClientRect()\n      const containerAspect = this.containerRect.width / this.containerRect.height\n      const naturalWidth =\n        this.imageRef.current?.naturalWidth || this.videoRef.current?.videoWidth || 0\n      const naturalHeight =\n        this.imageRef.current?.naturalHeight || this.videoRef.current?.videoHeight || 0\n      const isMediaScaledDown =\n        mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight\n      const mediaAspect = naturalWidth / naturalHeight\n\n      // We do not rely on the offsetWidth/offsetHeight if the media is scaled down\n      // as the values they report are rounded. That will result in precision losses\n      // when calculating zoom. We use the fact that the media is positionned relative\n      // to the container. That allows us to use the container's dimensions\n      // and natural aspect ratio of the media to calculate accurate media size.\n      // However, for this to work, the container should not be rotated\n      let renderedMediaSize: Size\n\n      if (isMediaScaledDown) {\n        switch (this.props.objectFit) {\n          default:\n          case 'contain':\n            renderedMediaSize =\n              containerAspect > mediaAspect\n                ? {\n                    width: this.containerRect.height * mediaAspect,\n                    height: this.containerRect.height,\n                  }\n                : {\n                    width: this.containerRect.width,\n                    height: this.containerRect.width / mediaAspect,\n                  }\n            break\n          case 'horizontal-cover':\n            renderedMediaSize = {\n              width: this.containerRect.width,\n              height: this.containerRect.width / mediaAspect,\n            }\n            break\n          case 'vertical-cover':\n            renderedMediaSize = {\n              width: this.containerRect.height * mediaAspect,\n              height: this.containerRect.height,\n            }\n            break\n          case 'auto-cover':\n            renderedMediaSize =\n              naturalWidth > naturalHeight\n                ? {\n                    width: this.containerRect.width,\n                    height: this.containerRect.width / mediaAspect,\n                  }\n                : {\n                    width: this.containerRect.height * mediaAspect,\n                    height: this.containerRect.height,\n                  }\n            break\n        }\n      } else {\n        renderedMediaSize = {\n          width: mediaRef.offsetWidth,\n          height: mediaRef.offsetHeight,\n        }\n      }\n\n      this.mediaSize = {\n        ...renderedMediaSize,\n        naturalWidth,\n        naturalHeight,\n      }\n\n      // set media size in the parent\n      if (this.props.setMediaSize) {\n        this.props.setMediaSize(this.mediaSize)\n      }\n\n      const cropSize = this.props.cropSize\n        ? this.props.cropSize\n        : getCropSize(\n            this.mediaSize.width,\n            this.mediaSize.height,\n            this.containerRect.width,\n            this.containerRect.height,\n            this.props.aspect,\n            this.props.rotation\n          )\n\n      if (\n        this.state.cropSize?.height !== cropSize.height ||\n        this.state.cropSize?.width !== cropSize.width\n      ) {\n        this.props.onCropSizeChange && this.props.onCropSizeChange(cropSize)\n      }\n      this.setState({ cropSize }, this.recomputeCropPosition)\n      // pass crop size to parent\n      if (this.props.setCropSize) {\n        this.props.setCropSize(cropSize)\n      }\n\n      return cropSize\n    }\n  }\n\n  static getMousePoint = (e: MouseEvent | React.MouseEvent) => ({\n    x: Number(e.clientX),\n    y: Number(e.clientY),\n  })\n\n  static getTouchPoint = (touch: Touch | React.Touch) => ({\n    x: Number(touch.clientX),\n    y: Number(touch.clientY),\n  })\n\n  onMouseDown = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n    e.preventDefault()\n    this.currentDoc.addEventListener('mousemove', this.onMouseMove)\n    this.currentDoc.addEventListener('mouseup', this.onDragStopped)\n    this.onDragStart(Cropper.getMousePoint(e))\n  }\n\n  onMouseMove = (e: MouseEvent) => this.onDrag(Cropper.getMousePoint(e))\n\n  onTouchStart = (e: React.TouchEvent<HTMLDivElement>) => {\n    if (this.props.onTouchRequest && !this.props.onTouchRequest(e)) {\n      return\n    }\n\n    this.currentDoc.addEventListener('touchmove', this.onTouchMove, { passive: false }) // iOS 11 now defaults to passive: true\n    this.currentDoc.addEventListener('touchend', this.onDragStopped)\n\n    if (e.touches.length === 2) {\n      this.onPinchStart(e)\n    } else if (e.touches.length === 1) {\n      this.onDragStart(Cropper.getTouchPoint(e.touches[0]))\n    }\n  }\n\n  onTouchMove = (e: TouchEvent) => {\n    // Prevent whole page from scrolling on iOS.\n    e.preventDefault()\n    if (e.touches.length === 2) {\n      this.onPinchMove(e)\n    } else if (e.touches.length === 1) {\n      this.onDrag(Cropper.getTouchPoint(e.touches[0]))\n    }\n  }\n\n  onDragStart = ({ x, y }: Point) => {\n    this.dragStartPosition = { x, y }\n    this.dragStartCrop = { ...this.props.crop }\n    this.props.onInteractionStart?.()\n  }\n\n  onDrag = ({ x, y }: Point) => {\n    if (this.rafDragTimeout) this.currentWindow.cancelAnimationFrame(this.rafDragTimeout)\n\n    this.rafDragTimeout = this.currentWindow.requestAnimationFrame(() => {\n      if (!this.state.cropSize) return\n      if (x === undefined || y === undefined) return\n      const offsetX = x - this.dragStartPosition.x\n      const offsetY = y - this.dragStartPosition.y\n      const requestedPosition = {\n        x: this.dragStartCrop.x + offsetX,\n        y: this.dragStartCrop.y + offsetY,\n      }\n\n      const newPosition = this.props.restrictPosition\n        ? restrictPosition(\n            requestedPosition,\n            this.mediaSize,\n            this.state.cropSize,\n            this.props.zoom,\n            this.props.rotation\n          )\n        : requestedPosition\n      this.props.onCropChange(newPosition)\n    })\n  }\n\n  onDragStopped = () => {\n    this.cleanEvents()\n    this.emitCropData()\n    this.props.onInteractionEnd?.()\n  }\n\n  onPinchStart(e: React.TouchEvent<HTMLDivElement>) {\n    const pointA = Cropper.getTouchPoint(e.touches[0])\n    const pointB = Cropper.getTouchPoint(e.touches[1])\n    this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB)\n    this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB)\n    this.onDragStart(getCenter(pointA, pointB))\n  }\n\n  onPinchMove(e: TouchEvent) {\n    const pointA = Cropper.getTouchPoint(e.touches[0])\n    const pointB = Cropper.getTouchPoint(e.touches[1])\n    const center = getCenter(pointA, pointB)\n    this.onDrag(center)\n\n    if (this.rafPinchTimeout) this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout)\n    this.rafPinchTimeout = this.currentWindow.requestAnimationFrame(() => {\n      const distance = getDistanceBetweenPoints(pointA, pointB)\n      const newZoom = this.props.zoom * (distance / this.lastPinchDistance)\n      this.setNewZoom(newZoom, center, { shouldUpdatePosition: false })\n      this.lastPinchDistance = distance\n\n      const rotation = getRotationBetweenPoints(pointA, pointB)\n      const newRotation = this.props.rotation + (rotation - this.lastPinchRotation)\n      this.props.onRotationChange && this.props.onRotationChange(newRotation)\n      this.lastPinchRotation = rotation\n    })\n  }\n\n  onWheel = (e: WheelEvent) => {\n    if (this.props.onWheelRequest && !this.props.onWheelRequest(e)) {\n      return\n    }\n\n    e.preventDefault()\n    const point = Cropper.getMousePoint(e)\n    const { pixelY } = normalizeWheel(e)\n    const newZoom = this.props.zoom - (pixelY * this.props.zoomSpeed) / 200\n    this.setNewZoom(newZoom, point, { shouldUpdatePosition: true })\n\n    if (!this.state.hasWheelJustStarted) {\n      this.setState({ hasWheelJustStarted: true }, () => this.props.onInteractionStart?.())\n    }\n\n    if (this.wheelTimer) {\n      clearTimeout(this.wheelTimer)\n    }\n    this.wheelTimer = this.currentWindow.setTimeout(\n      () => this.setState({ hasWheelJustStarted: false }, () => this.props.onInteractionEnd?.()),\n      250\n    )\n  }\n\n  getPointOnContainer = ({ x, y }: Point) => {\n    if (!this.containerRect) {\n      throw new Error('The Cropper is not mounted')\n    }\n    return {\n      x: this.containerRect.width / 2 - (x - this.containerRect.left),\n      y: this.containerRect.height / 2 - (y - this.containerRect.top),\n    }\n  }\n\n  getPointOnMedia = ({ x, y }: Point) => {\n    const { crop, zoom } = this.props\n    return {\n      x: (x + crop.x) / zoom,\n      y: (y + crop.y) / zoom,\n    }\n  }\n\n  setNewZoom = (zoom: number, point: Point, { shouldUpdatePosition = true } = {}) => {\n    if (!this.state.cropSize || !this.props.onZoomChange) return\n\n    const zoomPoint = this.getPointOnContainer(point)\n    const zoomTarget = this.getPointOnMedia(zoomPoint)\n    const newZoom = clamp(zoom, this.props.minZoom, this.props.maxZoom)\n    const requestedPosition = {\n      x: zoomTarget.x * newZoom - zoomPoint.x,\n      y: zoomTarget.y * newZoom - zoomPoint.y,\n    }\n\n    if (shouldUpdatePosition) {\n      const newPosition = this.props.restrictPosition\n        ? restrictPosition(\n            requestedPosition,\n            this.mediaSize,\n            this.state.cropSize,\n            newZoom,\n            this.props.rotation\n          )\n        : requestedPosition\n\n      this.props.onCropChange(newPosition)\n    }\n    this.props.onZoomChange(newZoom)\n  }\n\n  getCropData = () => {\n    if (!this.state.cropSize) {\n      return null\n    }\n\n    // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6)\n    const restrictedPosition = this.props.restrictPosition\n      ? restrictPosition(\n          this.props.crop,\n          this.mediaSize,\n          this.state.cropSize,\n          this.props.zoom,\n          this.props.rotation\n        )\n      : this.props.crop\n    return computeCroppedArea(\n      restrictedPosition,\n      this.mediaSize,\n      this.state.cropSize,\n      this.getAspect(),\n      this.props.zoom,\n      this.props.rotation,\n      this.props.restrictPosition\n    )\n  }\n\n  emitCropData = () => {\n    const cropData = this.getCropData()\n    if (!cropData) return\n\n    const { croppedAreaPercentages, croppedAreaPixels } = cropData\n    if (this.props.onCropComplete) {\n      this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels)\n    }\n\n    if (this.props.onCropAreaChange) {\n      this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels)\n    }\n  }\n\n  emitCropAreaChange = () => {\n    const cropData = this.getCropData()\n    if (!cropData) return\n\n    const { croppedAreaPercentages, croppedAreaPixels } = cropData\n    if (this.props.onCropAreaChange) {\n      this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels)\n    }\n  }\n\n  recomputeCropPosition = () => {\n    if (!this.state.cropSize) return\n\n    const newPosition = this.props.restrictPosition\n      ? restrictPosition(\n          this.props.crop,\n          this.mediaSize,\n          this.state.cropSize,\n          this.props.zoom,\n          this.props.rotation\n        )\n      : this.props.crop\n\n    this.props.onCropChange(newPosition)\n    this.emitCropData()\n  }\n\n  render() {\n    const {\n      image,\n      video,\n      mediaProps,\n      transform,\n      crop: { x, y },\n      rotation,\n      zoom,\n      cropShape,\n      showGrid,\n      style: { containerStyle, cropAreaStyle, mediaStyle },\n      classes: { containerClassName, cropAreaClassName, mediaClassName },\n      objectFit,\n    } = this.props\n\n    return (\n      <div\n        onMouseDown={this.onMouseDown}\n        onTouchStart={this.onTouchStart}\n        ref={(el) => (this.containerRef = el)}\n        data-testid=\"container\"\n        style={containerStyle}\n        className={classNames('reactEasyCrop_Container', containerClassName)}\n      >\n        {image ? (\n          <img\n            alt=\"\"\n            className={classNames(\n              'reactEasyCrop_Image',\n              objectFit === 'contain' && 'reactEasyCrop_Contain',\n              objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal',\n              objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical',\n              objectFit === 'auto-cover' &&\n                (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight\n                  ? 'reactEasyCrop_Cover_Horizontal'\n                  : 'reactEasyCrop_Cover_Vertical'),\n              mediaClassName\n            )}\n            {...(mediaProps as React.ImgHTMLAttributes<HTMLElement>)}\n            src={image}\n            ref={this.imageRef}\n            style={{\n              ...mediaStyle,\n              transform:\n                transform || `translate(${x}px, ${y}px) rotate(${rotation}deg) scale(${zoom})`,\n            }}\n            onLoad={this.onMediaLoad}\n          />\n        ) : (\n          video && (\n            <video\n              autoPlay\n              loop\n              muted={true}\n              className={classNames(\n                'reactEasyCrop_Video',\n                objectFit === 'contain' && 'reactEasyCrop_Contain',\n                objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal',\n                objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical',\n                objectFit === 'auto-cover' &&\n                  (this.mediaSize.naturalWidth > this.mediaSize.naturalHeight\n                    ? 'reactEasyCrop_Cover_Horizontal'\n                    : 'reactEasyCrop_Cover_Vertical'),\n                mediaClassName\n              )}\n              {...mediaProps}\n              ref={this.videoRef}\n              onLoadedMetadata={this.onMediaLoad}\n              style={{\n                ...mediaStyle,\n                transform:\n                  transform || `translate(${x}px, ${y}px) rotate(${rotation}deg) scale(${zoom})`,\n              }}\n              controls={false}\n            >\n              {(Array.isArray(video) ? video : [{ src: video }]).map((item) => (\n                <source key={item.src} {...item} />\n              ))}\n            </video>\n          )\n        )}\n        {this.state.cropSize && (\n          <div\n            style={{\n              ...cropAreaStyle,\n              width: this.state.cropSize.width,\n              height: this.state.cropSize.height,\n            }}\n            data-testid=\"cropper\"\n            className={classNames(\n              'reactEasyCrop_CropArea',\n              cropShape === 'round' && 'reactEasyCrop_CropAreaRound',\n              showGrid && 'reactEasyCrop_CropAreaGrid',\n              cropAreaClassName\n            )}\n          />\n        )}\n      </div>\n    )\n  }\n}\n\nexport default Cropper\n","export const MIN_ZOOM = 100;\nexport const MAX_ZOOM = 300;\nexport const POPOVER_PROPS = {\n\tposition: 'bottom right',\n\tisAlternate: true,\n};\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport useSaveImage from './use-save-image';\nimport useTransformImage from './use-transform-image';\n\nconst ImageEditingContext = createContext( {} );\n\nexport const useImageEditingContext = () => useContext( ImageEditingContext );\n\nexport default function ImageEditingProvider( {\n\tid,\n\turl,\n\tnaturalWidth,\n\tnaturalHeight,\n\tisEditing,\n\tonFinishEditing,\n\tonSaveImage,\n\tchildren,\n} ) {\n\tconst transformImage = useTransformImage(\n\t\t{\n\t\t\turl,\n\t\t\tnaturalWidth,\n\t\t\tnaturalHeight,\n\t\t},\n\t\tisEditing\n\t);\n\n\tconst saveImage = useSaveImage( {\n\t\tid,\n\t\turl,\n\t\tonSaveImage,\n\t\tonFinishEditing,\n\t\t...transformImage,\n\t} );\n\n\tconst providerValue = useMemo(\n\t\t() => ( {\n\t\t\t...transformImage,\n\t\t\t...saveImage,\n\t\t} ),\n\t\t[ transformImage, saveImage ]\n\t);\n\n\treturn (\n\t\t<ImageEditingContext.Provider value={ providerValue }>\n\t\t\t{ children }\n\t\t</ImageEditingContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useMemo, useState } from '@wordpress/element';\nimport { applyFilters } from '@wordpress/hooks';\n\nfunction useTransformState( { url, naturalWidth, naturalHeight } ) {\n\tconst [ editedUrl, setEditedUrl ] = useState();\n\tconst [ crop, setCrop ] = useState();\n\tconst [ position, setPosition ] = useState( { x: 0, y: 0 } );\n\tconst [ zoom, setZoom ] = useState();\n\tconst [ rotation, setRotation ] = useState();\n\tconst [ aspect, setAspect ] = useState();\n\tconst [ defaultAspect, setDefaultAspect ] = useState();\n\n\tconst initializeTransformValues = useCallback( () => {\n\t\tsetPosition( { x: 0, y: 0 } );\n\t\tsetZoom( 100 );\n\t\tsetRotation( 0 );\n\t\tsetAspect( naturalWidth / naturalHeight );\n\t\tsetDefaultAspect( naturalWidth / naturalHeight );\n\t}, [\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\tsetPosition,\n\t\tsetZoom,\n\t\tsetRotation,\n\t\tsetAspect,\n\t\tsetDefaultAspect,\n\t] );\n\n\tconst rotateClockwise = useCallback( () => {\n\t\tconst angle = ( rotation + 90 ) % 360;\n\n\t\tlet naturalAspectRatio = naturalWidth / naturalHeight;\n\n\t\tif ( rotation % 180 === 90 ) {\n\t\t\tnaturalAspectRatio = naturalHeight / naturalWidth;\n\t\t}\n\n\t\tif ( angle === 0 ) {\n\t\t\tsetEditedUrl();\n\t\t\tsetRotation( angle );\n\t\t\tsetAspect( naturalWidth / naturalHeight );\n\t\t\tsetPosition( {\n\t\t\t\tx: -( position.y * naturalAspectRatio ),\n\t\t\t\ty: position.x * naturalAspectRatio,\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\tfunction editImage( event ) {\n\t\t\tconst canvas = document.createElement( 'canvas' );\n\n\t\t\tlet translateX = 0;\n\t\t\tlet translateY = 0;\n\n\t\t\tif ( angle % 180 ) {\n\t\t\t\tcanvas.width = event.target.height;\n\t\t\t\tcanvas.height = event.target.width;\n\t\t\t} else {\n\t\t\t\tcanvas.width = event.target.width;\n\t\t\t\tcanvas.height = event.target.height;\n\t\t\t}\n\n\t\t\tif ( angle === 90 || angle === 180 ) {\n\t\t\t\ttranslateX = canvas.width;\n\t\t\t}\n\n\t\t\tif ( angle === 270 || angle === 180 ) {\n\t\t\t\ttranslateY = canvas.height;\n\t\t\t}\n\n\t\t\tconst context = canvas.getContext( '2d' );\n\n\t\t\tcontext.translate( translateX, translateY );\n\t\t\tcontext.rotate( ( angle * Math.PI ) / 180 );\n\t\t\tcontext.drawImage( event.target, 0, 0 );\n\n\t\t\tcanvas.toBlob( ( blob ) => {\n\t\t\t\tsetEditedUrl( URL.createObjectURL( blob ) );\n\t\t\t\tsetRotation( angle );\n\t\t\t\tsetAspect( canvas.width / canvas.height );\n\t\t\t\tsetPosition( {\n\t\t\t\t\tx: -( position.y * naturalAspectRatio ),\n\t\t\t\t\ty: position.x * naturalAspectRatio,\n\t\t\t\t} );\n\t\t\t} );\n\t\t}\n\n\t\tconst el = new window.Image();\n\t\tel.src = url;\n\t\tel.onload = editImage;\n\n\t\tconst imgCrossOrigin = applyFilters(\n\t\t\t'media.crossOrigin',\n\t\t\tundefined,\n\t\t\turl\n\t\t);\n\t\tif ( typeof imgCrossOrigin === 'string' ) {\n\t\t\tel.crossOrigin = imgCrossOrigin;\n\t\t}\n\t}, [\n\t\trotation,\n\t\tnaturalWidth,\n\t\tnaturalHeight,\n\t\tsetEditedUrl,\n\t\tsetRotation,\n\t\tsetAspect,\n\t\tsetPosition,\n\t] );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\teditedUrl,\n\t\t\tsetEditedUrl,\n\t\t\tcrop,\n\t\t\tsetCrop,\n\t\t\tposition,\n\t\t\tsetPosition,\n\t\t\tzoom,\n\t\t\tsetZoom,\n\t\t\trotation,\n\t\t\tsetRotation,\n\t\t\trotateClockwise,\n\t\t\taspect,\n\t\t\tsetAspect,\n\t\t\tdefaultAspect,\n\t\t\tinitializeTransformValues,\n\t\t} ),\n\t\t[\n\t\t\teditedUrl,\n\t\t\tsetEditedUrl,\n\t\t\tcrop,\n\t\t\tsetCrop,\n\t\t\tposition,\n\t\t\tsetPosition,\n\t\t\tzoom,\n\t\t\tsetZoom,\n\t\t\trotation,\n\t\t\tsetRotation,\n\t\t\trotateClockwise,\n\t\t\taspect,\n\t\t\tsetAspect,\n\t\t\tdefaultAspect,\n\t\t\tinitializeTransformValues,\n\t\t]\n\t);\n}\n\nexport default function useTransformImage( imageProperties, isEditing ) {\n\tconst transformState = useTransformState( imageProperties );\n\tconst { initializeTransformValues } = transformState;\n\n\tuseEffect( () => {\n\t\tif ( isEditing ) {\n\t\t\tinitializeTransformValues();\n\t\t}\n\t}, [ isEditing, initializeTransformValues ] );\n\n\treturn transformState;\n}\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { useDispatch } from '@wordpress/data';\nimport { useCallback, useMemo, useState } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\nexport default function useSaveImage( {\n\tcrop,\n\trotation,\n\theight,\n\twidth,\n\taspect,\n\turl,\n\tid,\n\tonSaveImage,\n\tonFinishEditing,\n} ) {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\tconst [ isInProgress, setIsInProgress ] = useState( false );\n\n\tconst cancel = useCallback( () => {\n\t\tsetIsInProgress( false );\n\t\tonFinishEditing();\n\t}, [ setIsInProgress, onFinishEditing ] );\n\n\tconst apply = useCallback( () => {\n\t\tsetIsInProgress( true );\n\n\t\tlet attrs = {};\n\n\t\t// The crop script may return some very small, sub-pixel values when the image was not cropped.\n\t\t// Crop only when the new size has changed by more than 0.1%.\n\t\tif ( crop.width < 99.9 || crop.height < 99.9 ) {\n\t\t\tattrs = crop;\n\t\t}\n\n\t\tif ( rotation > 0 ) {\n\t\t\tattrs.rotation = rotation;\n\t\t}\n\n\t\tattrs.src = url;\n\n\t\tapiFetch( {\n\t\t\tpath: `/wp/v2/media/${ id }/edit`,\n\t\t\tmethod: 'POST',\n\t\t\tdata: attrs,\n\t\t} )\n\t\t\t.then( ( response ) => {\n\t\t\t\tonSaveImage( {\n\t\t\t\t\tid: response.id,\n\t\t\t\t\turl: response.source_url,\n\t\t\t\t\theight: height && width ? width / aspect : undefined,\n\t\t\t\t} );\n\t\t\t} )\n\t\t\t.catch( ( error ) => {\n\t\t\t\tcreateErrorNotice(\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t/* translators: 1. Error message */\n\t\t\t\t\t\t__( 'Could not edit image. %s' ),\n\t\t\t\t\t\tstripHTML( error.message )\n\t\t\t\t\t),\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'image-editing-error',\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\t.finally( () => {\n\t\t\t\tsetIsInProgress( false );\n\t\t\t\tonFinishEditing();\n\t\t\t} );\n\t}, [\n\t\tsetIsInProgress,\n\t\tcrop,\n\t\trotation,\n\t\theight,\n\t\twidth,\n\t\taspect,\n\t\turl,\n\t\tonSaveImage,\n\t\tcreateErrorNotice,\n\t\tsetIsInProgress,\n\t\tonFinishEditing,\n\t] );\n\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tisInProgress,\n\t\t\tapply,\n\t\t\tcancel,\n\t\t} ),\n\t\t[ isInProgress, apply, cancel ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport Cropper from 'react-easy-crop';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Spinner } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { MIN_ZOOM, MAX_ZOOM } from './constants';\n\nimport { useImageEditingContext } from './context';\n\nexport default function ImageCropper( {\n\turl,\n\twidth,\n\theight,\n\tclientWidth,\n\tnaturalHeight,\n\tnaturalWidth,\n\tborderProps,\n} ) {\n\tconst {\n\t\tisInProgress,\n\t\teditedUrl,\n\t\tposition,\n\t\tzoom,\n\t\taspect,\n\t\tsetPosition,\n\t\tsetCrop,\n\t\tsetZoom,\n\t\trotation,\n\t} = useImageEditingContext();\n\n\tlet editedHeight = height || ( clientWidth * naturalHeight ) / naturalWidth;\n\n\tif ( rotation % 180 === 90 ) {\n\t\teditedHeight = ( clientWidth * naturalWidth ) / naturalHeight;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'wp-block-image__crop-area',\n\t\t\t\tborderProps?.className,\n\t\t\t\t{\n\t\t\t\t\t'is-applying': isInProgress,\n\t\t\t\t}\n\t\t\t) }\n\t\t\tstyle={ {\n\t\t\t\t...borderProps?.style,\n\t\t\t\twidth: width || clientWidth,\n\t\t\t\theight: editedHeight,\n\t\t\t} }\n\t\t>\n\t\t\t<Cropper\n\t\t\t\timage={ editedUrl || url }\n\t\t\t\tdisabled={ isInProgress }\n\t\t\t\tminZoom={ MIN_ZOOM / 100 }\n\t\t\t\tmaxZoom={ MAX_ZOOM / 100 }\n\t\t\t\tcrop={ position }\n\t\t\t\tzoom={ zoom / 100 }\n\t\t\t\taspect={ aspect }\n\t\t\t\tonCropChange={ setPosition }\n\t\t\t\tonCropComplete={ ( newCropPercent ) => {\n\t\t\t\t\tsetCrop( newCropPercent );\n\t\t\t\t} }\n\t\t\t\tonZoomChange={ ( newZoom ) => {\n\t\t\t\t\tsetZoom( newZoom * 100 );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t{ isInProgress && <Spinner /> }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst search = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z\" />\n\t</SVG>\n);\n\nexport default search;\n","/**\n * WordPress dependencies\n */\nimport { ToolbarButton, RangeControl, Dropdown } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { search } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { MIN_ZOOM, MAX_ZOOM, POPOVER_PROPS } from './constants';\nimport { useImageEditingContext } from './context';\n\nexport default function ZoomDropdown() {\n\tconst { isInProgress, zoom, setZoom } = useImageEditingContext();\n\treturn (\n\t\t<Dropdown\n\t\t\tcontentClassName=\"wp-block-image__zoom\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={ search }\n\t\t\t\t\tlabel={ __( 'Zoom' ) }\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\tdisabled={ isInProgress }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\trenderContent={ () => (\n\t\t\t\t<RangeControl\n\t\t\t\t\tlabel={ __( 'Zoom' ) }\n\t\t\t\t\tmin={ MIN_ZOOM }\n\t\t\t\t\tmax={ MAX_ZOOM }\n\t\t\t\t\tvalue={ Math.round( zoom ) }\n\t\t\t\t\tonChange={ setZoom }\n\t\t\t\t/>\n\t\t\t) }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst aspectRatio = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z\" />\n\t</SVG>\n);\n\nexport default aspectRatio;\n","/**\n * WordPress dependencies\n */\nimport { check, aspectRatio as aspectRatioIcon } from '@wordpress/icons';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { POPOVER_PROPS } from './constants';\nimport { useImageEditingContext } from './context';\n\nfunction AspectGroup( { aspectRatios, isDisabled, label, onClick, value } ) {\n\treturn (\n\t\t<MenuGroup label={ label }>\n\t\t\t{ aspectRatios.map( ( { title, aspect } ) => (\n\t\t\t\t<MenuItem\n\t\t\t\t\tkey={ aspect }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonClick( aspect );\n\t\t\t\t\t} }\n\t\t\t\t\trole=\"menuitemradio\"\n\t\t\t\t\tisSelected={ aspect === value }\n\t\t\t\t\ticon={ aspect === value ? check : undefined }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</MenuItem>\n\t\t\t) ) }\n\t\t</MenuGroup>\n\t);\n}\n\nexport default function AspectRatioDropdown( { toggleProps } ) {\n\tconst { isInProgress, aspect, setAspect, defaultAspect } =\n\t\tuseImageEditingContext();\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ aspectRatioIcon }\n\t\t\tlabel={ __( 'Aspect Ratio' ) }\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tclassName=\"wp-block-image__aspect-ratio\"\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<AspectGroup\n\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\taspectRatios={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( 'Original' ),\n\t\t\t\t\t\t\t\taspect: defaultAspect,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( 'Square' ),\n\t\t\t\t\t\t\t\taspect: 1,\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<AspectGroup\n\t\t\t\t\t\tlabel={ __( 'Landscape' ) }\n\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\taspectRatios={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '16:10' ),\n\t\t\t\t\t\t\t\taspect: 16 / 10,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '16:9' ),\n\t\t\t\t\t\t\t\taspect: 16 / 9,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '4:3' ),\n\t\t\t\t\t\t\t\taspect: 4 / 3,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '3:2' ),\n\t\t\t\t\t\t\t\taspect: 3 / 2,\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<AspectGroup\n\t\t\t\t\t\tlabel={ __( 'Portrait' ) }\n\t\t\t\t\t\tisDisabled={ isInProgress }\n\t\t\t\t\t\tonClick={ ( newAspect ) => {\n\t\t\t\t\t\t\tsetAspect( newAspect );\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tvalue={ aspect }\n\t\t\t\t\t\taspectRatios={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '10:16' ),\n\t\t\t\t\t\t\t\taspect: 10 / 16,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '9:16' ),\n\t\t\t\t\t\t\t\taspect: 9 / 16,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '3:4' ),\n\t\t\t\t\t\t\t\taspect: 3 / 4,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttitle: __( '2:3' ),\n\t\t\t\t\t\t\t\taspect: 2 / 3,\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</DropdownMenu>\n\t);\n}\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 */\n\nimport { ToolbarButton } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { rotateRight as rotateRightIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useImageEditingContext } from './context';\n\nexport default function RotationButton() {\n\tconst { isInProgress, rotateClockwise } = useImageEditingContext();\n\treturn (\n\t\t<ToolbarButton\n\t\t\ticon={ rotateRightIcon }\n\t\t\tlabel={ __( 'Rotate' ) }\n\t\t\tonClick={ rotateClockwise }\n\t\t\tdisabled={ isInProgress }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ToolbarButton } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useImageEditingContext } from './context';\n\nexport default function FormControls() {\n\tconst { isInProgress, apply, cancel } = useImageEditingContext();\n\treturn (\n\t\t<>\n\t\t\t<ToolbarButton onClick={ apply } disabled={ isInProgress }>\n\t\t\t\t{ __( 'Apply' ) }\n\t\t\t</ToolbarButton>\n\t\t\t<ToolbarButton onClick={ cancel }>{ __( 'Cancel' ) }</ToolbarButton>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { ToolbarGroup, ToolbarItem } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport BlockControls from '../block-controls';\nimport Cropper from './cropper';\nimport ZoomDropdown from './zoom-dropdown';\nimport AspectRatioDropdown from './aspect-ratio-dropdown';\nimport RotationButton from './rotation-button';\nimport FormControls from './form-controls';\n\nexport default function ImageEditor( {\n\turl,\n\twidth,\n\theight,\n\tclientWidth,\n\tnaturalHeight,\n\tnaturalWidth,\n\tborderProps,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<Cropper\n\t\t\t\tborderProps={ borderProps }\n\t\t\t\turl={ url }\n\t\t\t\twidth={ width }\n\t\t\t\theight={ height }\n\t\t\t\tclientWidth={ clientWidth }\n\t\t\t\tnaturalHeight={ naturalHeight }\n\t\t\t\tnaturalWidth={ naturalWidth }\n\t\t\t/>\n\t\t\t<BlockControls>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<ZoomDropdown />\n\t\t\t\t\t<ToolbarItem>\n\t\t\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t\t\t<AspectRatioDropdown toggleProps={ toggleProps } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ToolbarItem>\n\t\t\t\t\t<RotationButton />\n\t\t\t\t</ToolbarGroup>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<FormControls />\n\t\t\t\t</ToolbarGroup>\n\t\t\t</BlockControls>\n\t\t</>\n\t);\n}\n\nexport { default as ImageEditingProvider } from './context';\n","/**\n * External dependencies\n */\nimport { isEmpty } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tButtonGroup,\n\tSelectControl,\n\tTextControl,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useDimensionHandler from './use-dimension-handler';\n\nconst IMAGE_SIZE_PRESETS = [ 25, 50, 75, 100 ];\nconst noop = () => {};\n\nexport default function ImageSizeControl( {\n\timageSizeHelp,\n\timageWidth,\n\timageHeight,\n\timageSizeOptions = [],\n\tisResizable = true,\n\tslug,\n\twidth,\n\theight,\n\tonChange,\n\tonChangeImage = noop,\n} ) {\n\tconst { currentHeight, currentWidth, updateDimension, updateDimensions } =\n\t\tuseDimensionHandler( height, width, imageHeight, imageWidth, onChange );\n\n\treturn (\n\t\t<>\n\t\t\t{ ! isEmpty( imageSizeOptions ) && (\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Image size' ) }\n\t\t\t\t\tvalue={ slug }\n\t\t\t\t\toptions={ imageSizeOptions }\n\t\t\t\t\tonChange={ onChangeImage }\n\t\t\t\t\thelp={ imageSizeHelp }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ isResizable && (\n\t\t\t\t<div className=\"block-editor-image-size-control\">\n\t\t\t\t\t<p className=\"block-editor-image-size-control__row\">\n\t\t\t\t\t\t{ __( 'Image dimensions' ) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<div className=\"block-editor-image-size-control__row\">\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tclassName=\"block-editor-image-size-control__width\"\n\t\t\t\t\t\t\tlabel={ __( 'Width' ) }\n\t\t\t\t\t\t\tvalue={ currentWidth }\n\t\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tupdateDimension( 'width', value )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tclassName=\"block-editor-image-size-control__height\"\n\t\t\t\t\t\t\tlabel={ __( 'Height' ) }\n\t\t\t\t\t\t\tvalue={ currentHeight }\n\t\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\t\tupdateDimension( 'height', value )\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\t<div className=\"block-editor-image-size-control__row\">\n\t\t\t\t\t\t<ButtonGroup aria-label={ __( 'Image size presets' ) }>\n\t\t\t\t\t\t\t{ IMAGE_SIZE_PRESETS.map( ( scale ) => {\n\t\t\t\t\t\t\t\tconst scaledWidth = Math.round(\n\t\t\t\t\t\t\t\t\timageWidth * ( scale / 100 )\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tconst scaledHeight = Math.round(\n\t\t\t\t\t\t\t\t\timageHeight * ( scale / 100 )\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tconst isCurrent =\n\t\t\t\t\t\t\t\t\tcurrentWidth === scaledWidth &&\n\t\t\t\t\t\t\t\t\tcurrentHeight === scaledHeight;\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tkey={ scale }\n\t\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\t\tvariant={\n\t\t\t\t\t\t\t\t\t\t\tisCurrent ? 'primary' : undefined\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tisPressed={ isCurrent }\n\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\tupdateDimensions(\n\t\t\t\t\t\t\t\t\t\t\t\tscaledHeight,\n\t\t\t\t\t\t\t\t\t\t\t\tscaledWidth\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{ scale }%\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</ButtonGroup>\n\t\t\t\t\t\t<Button isSmall onClick={ () => updateDimensions() }>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nexport default function useDimensionHandler(\n\tcustomHeight,\n\tcustomWidth,\n\tdefaultHeight,\n\tdefaultWidth,\n\tonChange\n) {\n\tconst [ currentWidth, setCurrentWidth ] = useState(\n\t\tcustomWidth ?? defaultWidth ?? ''\n\t);\n\tconst [ currentHeight, setCurrentHeight ] = useState(\n\t\tcustomHeight ?? defaultHeight ?? ''\n\t);\n\n\t// When an image is first inserted, the default dimensions are initially\n\t// undefined. This effect updates the dimensions when the default values\n\t// come through.\n\tuseEffect( () => {\n\t\tif ( customWidth === undefined && defaultWidth !== undefined ) {\n\t\t\tsetCurrentWidth( defaultWidth );\n\t\t}\n\t\tif ( customHeight === undefined && defaultHeight !== undefined ) {\n\t\t\tsetCurrentHeight( defaultHeight );\n\t\t}\n\t}, [ defaultWidth, defaultHeight ] );\n\n\t// If custom values change, it means an outsider has resized the image using some other method (eg resize box)\n\t// this keeps track of these values too. We need to parse before comparing; custom values can be strings.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tcustomWidth !== undefined &&\n\t\t\tNumber.parseInt( customWidth ) !== Number.parseInt( currentWidth )\n\t\t) {\n\t\t\tsetCurrentWidth( customWidth );\n\t\t}\n\t\tif (\n\t\t\tcustomHeight !== undefined &&\n\t\t\tNumber.parseInt( customHeight ) !== Number.parseInt( currentHeight )\n\t\t) {\n\t\t\tsetCurrentHeight( customHeight );\n\t\t}\n\t}, [ customWidth, customHeight ] );\n\n\tconst updateDimension = ( dimension, value ) => {\n\t\tif ( dimension === 'width' ) {\n\t\t\tsetCurrentWidth( value );\n\t\t} else {\n\t\t\tsetCurrentHeight( value );\n\t\t}\n\t\tonChange( {\n\t\t\t[ dimension ]: value === '' ? undefined : parseInt( value, 10 ),\n\t\t} );\n\t};\n\n\tconst updateDimensions = ( nextHeight, nextWidth ) => {\n\t\tsetCurrentHeight( nextHeight ?? defaultHeight );\n\t\tsetCurrentWidth( nextWidth ?? defaultWidth );\n\t\tonChange( { height: nextHeight, width: nextWidth } );\n\t};\n\n\treturn {\n\t\tcurrentHeight,\n\t\tcurrentWidth,\n\t\tupdateDimension,\n\t\tupdateDimensions,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst keyboardReturn = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t\t<Path d=\"M6.734 16.106l2.176-2.38-1.093-1.028-3.846 4.158 3.846 4.157 1.093-1.027-2.176-2.38h2.811c1.125 0 2.25.03 3.374 0 1.428-.001 3.362-.25 4.963-1.277 1.66-1.065 2.868-2.906 2.868-5.859 0-2.479-1.327-4.896-3.65-5.93-1.82-.813-3.044-.8-4.806-.788l-.567.002v1.5c.184 0 .368 0 .553-.002 1.82-.007 2.704-.014 4.21.657 1.854.827 2.76 2.657 2.76 4.561 0 2.472-.973 3.824-2.178 4.596-1.258.807-2.864 1.04-4.163 1.04h-.02c-1.115.03-2.229 0-3.344 0H6.734z\" />\n\t</SVG>\n);\n\nexport default keyboardReturn;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ToggleControl, VisuallyHidden } from '@wordpress/components';\n\nconst noop = () => {};\n\nconst LinkControlSettingsDrawer = ( { value, onChange = noop, settings } ) => {\n\tif ( ! settings || ! settings.length ) {\n\t\treturn null;\n\t}\n\n\tconst handleSettingChange = ( setting ) => ( newValue ) => {\n\t\tonChange( {\n\t\t\t...value,\n\t\t\t[ setting.id ]: newValue,\n\t\t} );\n\t};\n\n\tconst theSettings = settings.map( ( setting ) => (\n\t\t<ToggleControl\n\t\t\tclassName=\"block-editor-link-control__setting\"\n\t\t\tkey={ setting.id }\n\t\t\tlabel={ setting.title }\n\t\t\tonChange={ handleSettingChange( setting ) }\n\t\t\tchecked={ value ? !! value[ setting.id ] : false }\n\t\t/>\n\t) );\n\n\treturn (\n\t\t<fieldset className=\"block-editor-link-control__settings\">\n\t\t\t<VisuallyHidden as=\"legend\">\n\t\t\t\t{ __( 'Currently selected link settings' ) }\n\t\t\t</VisuallyHidden>\n\t\t\t{ theSettings }\n\t\t</fieldset>\n\t);\n};\n\nexport default LinkControlSettingsDrawer;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport scrollIntoView from 'dom-scroll-into-view';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { Component, createRef } from '@wordpress/element';\nimport { UP, DOWN, ENTER, TAB } from '@wordpress/keycodes';\nimport {\n\tBaseControl,\n\tButton,\n\tSpinner,\n\twithSpokenMessages,\n\tPopover,\n} from '@wordpress/components';\nimport {\n\tcompose,\n\tdebounce,\n\twithInstanceId,\n\twithSafeTimeout,\n} from '@wordpress/compose';\nimport { withSelect } from '@wordpress/data';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Whether the argument is a function.\n *\n * @param {*} maybeFunc The argument to check.\n * @return {boolean} True if the argument is a function, false otherwise.\n */\nfunction isFunction( maybeFunc ) {\n\treturn typeof maybeFunc === 'function';\n}\n\nclass URLInput extends Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\n\t\tthis.onChange = this.onChange.bind( this );\n\t\tthis.onFocus = this.onFocus.bind( this );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.selectLink = this.selectLink.bind( this );\n\t\tthis.handleOnClick = this.handleOnClick.bind( this );\n\t\tthis.bindSuggestionNode = this.bindSuggestionNode.bind( this );\n\t\tthis.autocompleteRef = props.autocompleteRef || createRef();\n\t\tthis.inputRef = createRef();\n\t\tthis.updateSuggestions = debounce(\n\t\t\tthis.updateSuggestions.bind( this ),\n\t\t\t200\n\t\t);\n\n\t\tthis.suggestionNodes = [];\n\n\t\tthis.isUpdatingSuggestions = false;\n\n\t\tthis.state = {\n\t\t\tsuggestions: [],\n\t\t\tshowSuggestions: false,\n\t\t\tselectedSuggestion: null,\n\n\t\t\tsuggestionsListboxId: '',\n\t\t\tsuggestionOptionIdPrefix: '',\n\t\t};\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tconst { showSuggestions, selectedSuggestion } = this.state;\n\t\tconst { value, __experimentalShowInitialSuggestions = false } =\n\t\t\tthis.props;\n\n\t\t// Only have to worry about scrolling selected suggestion into view\n\t\t// when already expanded.\n\t\tif (\n\t\t\tshowSuggestions &&\n\t\t\tselectedSuggestion !== null &&\n\t\t\tthis.suggestionNodes[ selectedSuggestion ] &&\n\t\t\t! this.scrollingIntoView\n\t\t) {\n\t\t\tthis.scrollingIntoView = true;\n\t\t\tscrollIntoView(\n\t\t\t\tthis.suggestionNodes[ selectedSuggestion ],\n\t\t\t\tthis.autocompleteRef.current,\n\t\t\t\t{\n\t\t\t\t\tonlyScrollIfNeeded: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tthis.props.setTimeout( () => {\n\t\t\t\tthis.scrollingIntoView = false;\n\t\t\t}, 100 );\n\t\t}\n\n\t\t// Update suggestions when the value changes.\n\t\tif (\n\t\t\tprevProps.value !== value &&\n\t\t\t! this.props.disableSuggestions &&\n\t\t\t! this.isUpdatingSuggestions\n\t\t) {\n\t\t\tif ( value?.length ) {\n\t\t\t\t// If the new value is not empty we need to update with suggestions for it.\n\t\t\t\tthis.updateSuggestions( value );\n\t\t\t} else if ( __experimentalShowInitialSuggestions ) {\n\t\t\t\t// If the new value is empty and we can show initial suggestions, then show initial suggestions.\n\t\t\t\tthis.updateSuggestions();\n\t\t\t}\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( this.shouldShowInitialSuggestions() ) {\n\t\t\tthis.updateSuggestions();\n\t\t}\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.suggestionsRequest?.cancel?.();\n\t\tdelete this.suggestionsRequest;\n\t}\n\n\tbindSuggestionNode( index ) {\n\t\treturn ( ref ) => {\n\t\t\tthis.suggestionNodes[ index ] = ref;\n\t\t};\n\t}\n\n\tshouldShowInitialSuggestions() {\n\t\tconst { suggestions } = this.state;\n\t\tconst { __experimentalShowInitialSuggestions = false, value } =\n\t\t\tthis.props;\n\t\treturn (\n\t\t\t! this.isUpdatingSuggestions &&\n\t\t\t__experimentalShowInitialSuggestions &&\n\t\t\t! ( value && value.length ) &&\n\t\t\t! ( suggestions && suggestions.length )\n\t\t);\n\t}\n\n\tupdateSuggestions( value = '' ) {\n\t\tconst {\n\t\t\t__experimentalFetchLinkSuggestions: fetchLinkSuggestions,\n\t\t\t__experimentalHandleURLSuggestions: handleURLSuggestions,\n\t\t} = this.props;\n\n\t\tif ( ! fetchLinkSuggestions ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Initial suggestions may only show if there is no value\n\t\t// (note: this includes whitespace).\n\t\tconst isInitialSuggestions = ! value?.length;\n\n\t\t// Trim only now we've determined whether or not it originally had a \"length\"\n\t\t// (even if that value was all whitespace).\n\t\tvalue = value.trim();\n\n\t\t// Allow a suggestions request if:\n\t\t// - there are at least 2 characters in the search input (except manual searches where\n\t\t//   search input length is not required to trigger a fetch)\n\t\t// - this is a direct entry (eg: a URL)\n\t\tif (\n\t\t\t! isInitialSuggestions &&\n\t\t\t( value.length < 2 || ( ! handleURLSuggestions && isURL( value ) ) )\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tshowSuggestions: false,\n\t\t\t\tselectedSuggestion: null,\n\t\t\t\tloading: false,\n\t\t\t} );\n\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isUpdatingSuggestions = true;\n\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tloading: true,\n\t\t} );\n\n\t\tconst request = fetchLinkSuggestions( value, {\n\t\t\tisInitialSuggestions,\n\t\t} );\n\n\t\trequest\n\t\t\t.then( ( suggestions ) => {\n\t\t\t\t// A fetch Promise doesn't have an abort option. It's mimicked by\n\t\t\t\t// comparing the request reference in on the instance, which is\n\t\t\t\t// reset or deleted on subsequent requests or unmounting.\n\t\t\t\tif ( this.suggestionsRequest !== request ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.setState( {\n\t\t\t\t\tsuggestions,\n\t\t\t\t\tloading: false,\n\t\t\t\t\tshowSuggestions: !! suggestions.length,\n\t\t\t\t} );\n\n\t\t\t\tif ( !! suggestions.length ) {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t/* translators: %s: number of results. */\n\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t'%d result found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\t'%d results found, use up and down arrow keys to navigate.',\n\t\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tsuggestions.length\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.props.debouncedSpeak(\n\t\t\t\t\t\t__( 'No results.' ),\n\t\t\t\t\t\t'assertive'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tthis.isUpdatingSuggestions = false;\n\t\t\t} )\n\t\t\t.catch( () => {\n\t\t\t\tif ( this.suggestionsRequest === request ) {\n\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\tloading: false,\n\t\t\t\t\t} );\n\t\t\t\t\tthis.isUpdatingSuggestions = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t// Note that this assignment is handled *before* the async search request\n\t\t// as a Promise always resolves on the next tick of the event loop.\n\t\tthis.suggestionsRequest = request;\n\t}\n\n\tonChange( event ) {\n\t\tconst inputValue = event.target.value;\n\n\t\tthis.props.onChange( inputValue );\n\t\tif ( ! this.props.disableSuggestions ) {\n\t\t\tthis.updateSuggestions( inputValue );\n\t\t}\n\t}\n\n\tonFocus() {\n\t\tconst { suggestions } = this.state;\n\t\tconst { disableSuggestions, value } = this.props;\n\n\t\t// When opening the link editor, if there's a value present, we want to load the suggestions pane with the results for this input search value\n\t\t// Don't re-run the suggestions on focus if there are already suggestions present (prevents searching again when tabbing between the input and buttons)\n\t\tif (\n\t\t\tvalue &&\n\t\t\t! disableSuggestions &&\n\t\t\t! this.isUpdatingSuggestions &&\n\t\t\t! ( suggestions && suggestions.length )\n\t\t) {\n\t\t\t// Ensure the suggestions are updated with the current input value.\n\t\t\tthis.updateSuggestions( value );\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tconst { showSuggestions, selectedSuggestion, suggestions, loading } =\n\t\t\tthis.state;\n\n\t\t// If the suggestions are not shown or loading, we shouldn't handle the arrow keys\n\t\t// We shouldn't preventDefault to allow block arrow keys navigation.\n\t\tif ( ! showSuggestions || ! suggestions.length || loading ) {\n\t\t\t// In the Windows version of Firefox the up and down arrows don't move the caret\n\t\t\t// within an input field like they do for Mac Firefox/Chrome/Safari. This causes\n\t\t\t// a form of focus trapping that is disruptive to the user experience. This disruption\n\t\t\t// only happens if the caret is not in the first or last position in the text input.\n\t\t\t// See: https://github.com/WordPress/gutenberg/issues/5693#issuecomment-436684747\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t// When UP is pressed, if the caret is at the start of the text, move it to the 0\n\t\t\t\t// position.\n\t\t\t\tcase UP: {\n\t\t\t\t\tif ( 0 !== event.target.selectionStart ) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to position 0.\n\t\t\t\t\t\tevent.target.setSelectionRange( 0, 0 );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// When DOWN is pressed, if the caret is not at the end of the text, move it to the\n\t\t\t\t// last position.\n\t\t\t\tcase DOWN: {\n\t\t\t\t\tif (\n\t\t\t\t\t\tthis.props.value.length !== event.target.selectionStart\n\t\t\t\t\t) {\n\t\t\t\t\t\tevent.preventDefault();\n\n\t\t\t\t\t\t// Set the input caret to the last position.\n\t\t\t\t\t\tevent.target.setSelectionRange(\n\t\t\t\t\t\t\tthis.props.value.length,\n\t\t\t\t\t\t\tthis.props.value.length\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Submitting while loading should trigger onSubmit.\n\t\t\t\tcase ENTER: {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst suggestion =\n\t\t\tthis.state.suggestions[ this.state.selectedSuggestion ];\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase UP: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst previousIndex = ! selectedSuggestion\n\t\t\t\t\t? suggestions.length - 1\n\t\t\t\t\t: selectedSuggestion - 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: previousIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase DOWN: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst nextIndex =\n\t\t\t\t\tselectedSuggestion === null ||\n\t\t\t\t\tselectedSuggestion === suggestions.length - 1\n\t\t\t\t\t\t? 0\n\t\t\t\t\t\t: selectedSuggestion + 1;\n\t\t\t\tthis.setState( {\n\t\t\t\t\tselectedSuggestion: nextIndex,\n\t\t\t\t} );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase TAB: {\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\t\t\t\t\t// Announce a link has been selected when tabbing away from the input field.\n\t\t\t\t\tthis.props.speak( __( 'Link selected.' ) );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ENTER: {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tif ( this.state.selectedSuggestion !== null ) {\n\t\t\t\t\tthis.selectLink( suggestion );\n\n\t\t\t\t\tif ( this.props.onSubmit ) {\n\t\t\t\t\t\tthis.props.onSubmit( suggestion, event );\n\t\t\t\t\t}\n\t\t\t\t} else if ( this.props.onSubmit ) {\n\t\t\t\t\tthis.props.onSubmit( null, event );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tselectLink( suggestion ) {\n\t\tthis.props.onChange( suggestion.url, suggestion );\n\t\tthis.setState( {\n\t\t\tselectedSuggestion: null,\n\t\t\tshowSuggestions: false,\n\t\t} );\n\t}\n\n\thandleOnClick( suggestion ) {\n\t\tthis.selectLink( suggestion );\n\t\t// Move focus to the input field when a link suggestion is clicked.\n\t\tthis.inputRef.current.focus();\n\t}\n\n\tstatic getDerivedStateFromProps(\n\t\t{\n\t\t\tvalue,\n\t\t\tinstanceId,\n\t\t\tdisableSuggestions,\n\t\t\t__experimentalShowInitialSuggestions = false,\n\t\t},\n\t\t{ showSuggestions }\n\t) {\n\t\tlet shouldShowSuggestions = showSuggestions;\n\n\t\tconst hasValue = value && value.length;\n\n\t\tif ( ! __experimentalShowInitialSuggestions && ! hasValue ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\tif ( disableSuggestions === true ) {\n\t\t\tshouldShowSuggestions = false;\n\t\t}\n\n\t\treturn {\n\t\t\tshowSuggestions: shouldShowSuggestions,\n\t\t\tsuggestionsListboxId: `block-editor-url-input-suggestions-${ instanceId }`,\n\t\t\tsuggestionOptionIdPrefix: `block-editor-url-input-suggestion-${ instanceId }`,\n\t\t};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ this.renderControl() }\n\t\t\t\t{ this.renderSuggestions() }\n\t\t\t</>\n\t\t);\n\t}\n\n\trenderControl() {\n\t\tconst {\n\t\t\tlabel = null,\n\t\t\tclassName,\n\t\t\tisFullWidth,\n\t\t\tinstanceId,\n\t\t\tplaceholder = __( 'Paste URL or type to search' ),\n\t\t\t__experimentalRenderControl: renderControl,\n\t\t\tvalue = '',\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tloading,\n\t\t\tshowSuggestions,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t} = this.state;\n\n\t\tconst inputId = `url-input-control-${ instanceId }`;\n\n\t\tconst controlProps = {\n\t\t\tid: inputId, // Passes attribute to label for the for attribute\n\t\t\tlabel,\n\t\t\tclassName: classnames( 'block-editor-url-input', className, {\n\t\t\t\t'is-full-width': isFullWidth,\n\t\t\t} ),\n\t\t};\n\n\t\tconst inputProps = {\n\t\t\tid: inputId,\n\t\t\tvalue,\n\t\t\trequired: true,\n\t\t\tclassName: 'block-editor-url-input__input',\n\t\t\ttype: 'text',\n\t\t\tonChange: this.onChange,\n\t\t\tonFocus: this.onFocus,\n\t\t\tplaceholder,\n\t\t\tonKeyDown: this.onKeyDown,\n\t\t\trole: 'combobox',\n\t\t\t'aria-label': label ? undefined : __( 'URL' ), // Ensure input always has an accessible label\n\t\t\t'aria-expanded': showSuggestions,\n\t\t\t'aria-autocomplete': 'list',\n\t\t\t'aria-controls': suggestionsListboxId,\n\t\t\t'aria-activedescendant':\n\t\t\t\tselectedSuggestion !== null\n\t\t\t\t\t? `${ suggestionOptionIdPrefix }-${ selectedSuggestion }`\n\t\t\t\t\t: undefined,\n\t\t\tref: this.inputRef,\n\t\t};\n\n\t\tif ( renderControl ) {\n\t\t\treturn renderControl( controlProps, inputProps, loading );\n\t\t}\n\n\t\treturn (\n\t\t\t<BaseControl { ...controlProps }>\n\t\t\t\t<input { ...inputProps } />\n\t\t\t\t{ loading && <Spinner /> }\n\t\t\t</BaseControl>\n\t\t);\n\t}\n\n\trenderSuggestions() {\n\t\tconst {\n\t\t\tclassName,\n\t\t\t__experimentalRenderSuggestions: renderSuggestions,\n\t\t\tvalue = '',\n\t\t\t__experimentalShowInitialSuggestions = false,\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tshowSuggestions,\n\t\t\tsuggestions,\n\t\t\tselectedSuggestion,\n\t\t\tsuggestionsListboxId,\n\t\t\tsuggestionOptionIdPrefix,\n\t\t\tloading,\n\t\t} = this.state;\n\n\t\tconst suggestionsListProps = {\n\t\t\tid: suggestionsListboxId,\n\t\t\tref: this.autocompleteRef,\n\t\t\trole: 'listbox',\n\t\t};\n\n\t\tconst buildSuggestionItemProps = ( suggestion, index ) => {\n\t\t\treturn {\n\t\t\t\trole: 'option',\n\t\t\t\ttabIndex: '-1',\n\t\t\t\tid: `${ suggestionOptionIdPrefix }-${ index }`,\n\t\t\t\tref: this.bindSuggestionNode( index ),\n\t\t\t\t'aria-selected': index === selectedSuggestion,\n\t\t\t};\n\t\t};\n\n\t\tif (\n\t\t\tisFunction( renderSuggestions ) &&\n\t\t\tshowSuggestions &&\n\t\t\t!! suggestions.length\n\t\t) {\n\t\t\treturn renderSuggestions( {\n\t\t\t\tsuggestions,\n\t\t\t\tselectedSuggestion,\n\t\t\t\tsuggestionsListProps,\n\t\t\t\tbuildSuggestionItemProps,\n\t\t\t\tisLoading: loading,\n\t\t\t\thandleSuggestionClick: this.handleOnClick,\n\t\t\t\tisInitialSuggestions:\n\t\t\t\t\t__experimentalShowInitialSuggestions &&\n\t\t\t\t\t! ( value && value.length ),\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\t! isFunction( renderSuggestions ) &&\n\t\t\tshowSuggestions &&\n\t\t\t!! suggestions.length\n\t\t) {\n\t\t\treturn (\n\t\t\t\t<Popover position=\"bottom\" focusOnMount={ false }>\n\t\t\t\t\t<div\n\t\t\t\t\t\t{ ...suggestionsListProps }\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-url-input__suggestions',\n\t\t\t\t\t\t\t`${ className }__suggestions`\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ suggestions.map( ( suggestion, index ) => (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t{ ...buildSuggestionItemProps(\n\t\t\t\t\t\t\t\t\tsuggestion,\n\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tkey={ suggestion.id }\n\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t'block-editor-url-input__suggestion',\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'is-selected':\n\t\t\t\t\t\t\t\t\t\t\tindex === selectedSuggestion,\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\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tthis.handleOnClick( suggestion )\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{ suggestion.title }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</div>\n\t\t\t\t</Popover>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md\n */\nexport default compose(\n\twithSafeTimeout,\n\twithSpokenMessages,\n\twithInstanceId,\n\twithSelect( ( select, props ) => {\n\t\t// If a link suggestions handler is already provided then\n\t\t// bail.\n\t\tif ( isFunction( props.__experimentalFetchLinkSuggestions ) ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\t__experimentalFetchLinkSuggestions:\n\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t};\n\t} )\n)( URLInput );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { Icon, plus } from '@wordpress/icons';\n\nexport const LinkControlSearchCreate = ( {\n\tsearchTerm,\n\tonClick,\n\titemProps,\n\tisSelected,\n\tbuttonText,\n} ) => {\n\tif ( ! searchTerm ) {\n\t\treturn null;\n\t}\n\n\tlet text;\n\tif ( buttonText ) {\n\t\ttext =\n\t\t\ttypeof buttonText === 'function'\n\t\t\t\t? buttonText( searchTerm )\n\t\t\t\t: buttonText;\n\t} else {\n\t\ttext = createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Create: <mark>%s</mark>' ),\n\t\t\t\tsearchTerm\n\t\t\t),\n\t\t\t{ mark: <mark /> }\n\t\t);\n\t}\n\n\treturn (\n\t\t<Button\n\t\t\t{ ...itemProps }\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-link-control__search-create block-editor-link-control__search-item',\n\t\t\t\t{\n\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t}\n\t\t\t) }\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t<Icon\n\t\t\t\tclassName=\"block-editor-link-control__search-item-icon\"\n\t\t\t\ticon={ plus }\n\t\t\t/>\n\n\t\t\t<span className=\"block-editor-link-control__search-item-header\">\n\t\t\t\t<span className=\"block-editor-link-control__search-item-title\">\n\t\t\t\t\t{ text }\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</Button>\n\t);\n};\n\nexport default LinkControlSearchCreate;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst postList = (\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 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 14c0 .3-.2.5-.5.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v12zM7 11h2V9H7v2zm0 4h2v-2H7v2zm3-4h7V9h-7v2zm0 4h7v-2h-7v2z\" />\n\t</SVG>\n);\n\nexport default postList;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst tag = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20.1 11.2l-6.7-6.7c-.1-.1-.3-.2-.5-.2H5c-.4-.1-.8.3-.8.7v7.8c0 .2.1.4.2.5l6.7 6.7c.2.2.5.4.7.5s.6.2.9.2c.3 0 .6-.1.9-.2.3-.1.5-.3.8-.5l5.6-5.6c.4-.4.7-1 .7-1.6.1-.6-.2-1.2-.6-1.6zM19 13.4L13.4 19c-.1.1-.2.1-.3.2-.2.1-.4.1-.6 0-.1 0-.2-.1-.3-.2l-6.5-6.5V5.8h6.8l6.5 6.5c.2.2.2.4.2.6 0 .1 0 .3-.2.5zM9 8c-.6 0-1 .4-1 1s.4 1 1 1 1-.4 1-1-.4-1-1-1z\" />\n\t</SVG>\n);\n\nexport default tag;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst category = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\td=\"M6 5.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2V6zm11-.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5h-3a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM13 6a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2h-3a2 2 0 01-2-2V6zm5 8.5h-3a.5.5 0 00-.5.5v3a.5.5 0 00.5.5h3a.5.5 0 00.5-.5v-3a.5.5 0 00-.5-.5zM15 13a2 2 0 00-2 2v3a2 2 0 002 2h3a2 2 0 002-2v-3a2 2 0 00-2-2h-3zm-9 1.5h3a.5.5 0 01.5.5v3a.5.5 0 01-.5.5H6a.5.5 0 01-.5-.5v-3a.5.5 0 01.5-.5zM4 15a2 2 0 012-2h3a2 2 0 012 2v3a2 2 0 01-2 2H6a2 2 0 01-2-2v-3z\"\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default category;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst file = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M19 6.2h-5.9l-.6-1.1c-.3-.7-1-1.1-1.8-1.1H5c-1.1 0-2 .9-2 2v11.8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8.2c0-1.1-.9-2-2-2zm.5 11.6c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h5.8c.2 0 .4.1.4.3l1 2H19c.3 0 .5.2.5.5v9.5z\" />\n\t</SVG>\n);\n\nexport default file;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst globe = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z\" />\n\t</SVG>\n);\n\nexport default globe;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { safeDecodeURI, filterURLForDisplay } from '@wordpress/url';\nimport { __ } from '@wordpress/i18n';\nimport { Button, TextHighlight } from '@wordpress/components';\nimport {\n\tIcon,\n\tglobe,\n\tpage,\n\ttag,\n\tpostList,\n\tcategory,\n\tfile,\n} from '@wordpress/icons';\n\nconst ICONS_MAP = {\n\tpost: postList,\n\tpage,\n\tpost_tag: tag,\n\tcategory,\n\tattachment: file,\n};\n\nfunction SearchItemIcon( { isURL, suggestion } ) {\n\tlet icon = null;\n\n\tif ( isURL ) {\n\t\ticon = globe;\n\t} else if ( suggestion.type in ICONS_MAP ) {\n\t\ticon = ICONS_MAP[ suggestion.type ];\n\t}\n\n\tif ( icon ) {\n\t\treturn (\n\t\t\t<Icon\n\t\t\t\tclassName=\"block-editor-link-control__search-item-icon\"\n\t\t\t\ticon={ icon }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn null;\n}\n\nexport const LinkControlSearchItem = ( {\n\titemProps,\n\tsuggestion,\n\tisSelected = false,\n\tonClick,\n\tisURL = false,\n\tsearchTerm = '',\n\tshouldShowType = false,\n} ) => {\n\treturn (\n\t\t<Button\n\t\t\t{ ...itemProps }\n\t\t\tonClick={ onClick }\n\t\t\tclassName={ classnames( 'block-editor-link-control__search-item', {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-url': isURL,\n\t\t\t\t'is-entity': ! isURL,\n\t\t\t} ) }\n\t\t>\n\t\t\t<SearchItemIcon suggestion={ suggestion } isURL={ isURL } />\n\n\t\t\t<span className=\"block-editor-link-control__search-item-header\">\n\t\t\t\t<span className=\"block-editor-link-control__search-item-title\">\n\t\t\t\t\t<TextHighlight\n\t\t\t\t\t\ttext={ suggestion.title }\n\t\t\t\t\t\thighlight={ searchTerm }\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t<span\n\t\t\t\t\taria-hidden={ ! isURL }\n\t\t\t\t\tclassName=\"block-editor-link-control__search-item-info\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isURL &&\n\t\t\t\t\t\t( filterURLForDisplay(\n\t\t\t\t\t\t\tsafeDecodeURI( suggestion.url )\n\t\t\t\t\t\t) ||\n\t\t\t\t\t\t\t'' ) }\n\t\t\t\t\t{ isURL && __( 'Press ENTER to add this link' ) }\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t\t{ shouldShowType && suggestion.type && (\n\t\t\t\t<span className=\"block-editor-link-control__search-item-type\">\n\t\t\t\t\t{ getVisualTypeName( suggestion ) }\n\t\t\t\t</span>\n\t\t\t) }\n\t\t</Button>\n\t);\n};\n\nfunction getVisualTypeName( suggestion ) {\n\tif ( suggestion.isFrontPage ) {\n\t\treturn 'front page';\n\t}\n\n\t// Rename 'post_tag' to 'tag'. Ideally, the API would return the localised CPT or taxonomy label.\n\treturn suggestion.type === 'post_tag' ? 'tag' : suggestion.type;\n}\n\nexport default LinkControlSearchItem;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n// Used as a unique identifier for the \"Create\" option within search results.\n// Used to help distinguish the \"Create\" suggestion within the search results in\n// order to handle it as a unique case.\nexport const CREATE_TYPE = '__CREATE__';\nexport const TEL_TYPE = 'tel';\nexport const URL_TYPE = 'URL';\nexport const MAILTO_TYPE = 'mailto';\nexport const INTERNAL_TYPE = 'internal';\n\nexport const LINK_ENTRY_TYPES = [\n\tURL_TYPE,\n\tMAILTO_TYPE,\n\tTEL_TYPE,\n\tINTERNAL_TYPE,\n];\n\nexport const DEFAULT_LINK_SETTINGS = [\n\t{\n\t\tid: 'opensInNewTab',\n\t\ttitle: __( 'Open in new tab' ),\n\t},\n];\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { VisuallyHidden } from '@wordpress/components';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { createElement, Fragment } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSearchCreate from './search-create-button';\nimport LinkControlSearchItem from './search-item';\nimport { CREATE_TYPE, LINK_ENTRY_TYPES } from './constants';\n\nexport default function LinkControlSearchResults( {\n\tinstanceId,\n\twithCreateSuggestion,\n\tcurrentInputValue,\n\thandleSuggestionClick,\n\tsuggestionsListProps,\n\tbuildSuggestionItemProps,\n\tsuggestions,\n\tselectedSuggestion,\n\tisLoading,\n\tisInitialSuggestions,\n\tcreateSuggestionButtonText,\n\tsuggestionsQuery,\n} ) {\n\tconst resultsListClasses = classnames(\n\t\t'block-editor-link-control__search-results',\n\t\t{\n\t\t\t'is-loading': isLoading,\n\t\t}\n\t);\n\n\tconst isSingleDirectEntryResult =\n\t\tsuggestions.length === 1 &&\n\t\tLINK_ENTRY_TYPES.includes( suggestions[ 0 ].type );\n\tconst shouldShowCreateSuggestion =\n\t\twithCreateSuggestion &&\n\t\t! isSingleDirectEntryResult &&\n\t\t! isInitialSuggestions;\n\t// If the query has a specified type, then we can skip showing them in the result. See #24839.\n\tconst shouldShowSuggestionsTypes = ! suggestionsQuery?.type;\n\n\t// According to guidelines aria-label should be added if the label\n\t// itself is not visible.\n\t// See: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role\n\tconst searchResultsLabelId = `block-editor-link-control-search-results-label-${ instanceId }`;\n\tconst labelText = isInitialSuggestions\n\t\t? __( 'Recently updated' )\n\t\t: sprintf(\n\t\t\t\t/* translators: %s: search term. */\n\t\t\t\t__( 'Search results for \"%s\"' ),\n\t\t\t\tcurrentInputValue\n\t\t  );\n\n\t// VisuallyHidden rightly doesn't accept custom classNames\n\t// so we conditionally render it as a wrapper to visually hide the label\n\t// when that is required.\n\tconst searchResultsLabel = createElement(\n\t\tisInitialSuggestions ? Fragment : VisuallyHidden,\n\t\t{}, // Empty props.\n\t\t<span\n\t\t\tclassName=\"block-editor-link-control__search-results-label\"\n\t\t\tid={ searchResultsLabelId }\n\t\t>\n\t\t\t{ labelText }\n\t\t</span>\n\t);\n\n\treturn (\n\t\t<div className=\"block-editor-link-control__search-results-wrapper\">\n\t\t\t{ searchResultsLabel }\n\t\t\t<div\n\t\t\t\t{ ...suggestionsListProps }\n\t\t\t\tclassName={ resultsListClasses }\n\t\t\t\taria-labelledby={ searchResultsLabelId }\n\t\t\t>\n\t\t\t\t{ suggestions.map( ( suggestion, index ) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tshouldShowCreateSuggestion &&\n\t\t\t\t\t\tCREATE_TYPE === suggestion.type\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<LinkControlSearchCreate\n\t\t\t\t\t\t\t\tsearchTerm={ currentInputValue }\n\t\t\t\t\t\t\t\tbuttonText={ createSuggestionButtonText }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\thandleSuggestionClick( suggestion )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Intentionally only using `type` here as\n\t\t\t\t\t\t\t\t// the constant is enough to uniquely\n\t\t\t\t\t\t\t\t// identify the single \"CREATE\" suggestion.\n\t\t\t\t\t\t\t\tkey={ suggestion.type }\n\t\t\t\t\t\t\t\titemProps={ buildSuggestionItemProps(\n\t\t\t\t\t\t\t\t\tsuggestion,\n\t\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tisSelected={ index === selectedSuggestion }\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\t// If we're not handling \"Create\" suggestions above then\n\t\t\t\t\t// we don't want them in the main results so exit early.\n\t\t\t\t\tif ( CREATE_TYPE === suggestion.type ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<LinkControlSearchItem\n\t\t\t\t\t\t\tkey={ `${ suggestion.id }-${ suggestion.type }` }\n\t\t\t\t\t\t\titemProps={ buildSuggestionItemProps(\n\t\t\t\t\t\t\t\tsuggestion,\n\t\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tsuggestion={ suggestion }\n\t\t\t\t\t\t\tindex={ index }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleSuggestionClick( suggestion );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tisSelected={ index === selectedSuggestion }\n\t\t\t\t\t\t\tisURL={ LINK_ENTRY_TYPES.includes(\n\t\t\t\t\t\t\t\tsuggestion.type\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tsearchTerm={ currentInputValue }\n\t\t\t\t\t\t\tshouldShowType={ shouldShowSuggestionsTypes }\n\t\t\t\t\t\t\tisFrontPage={ suggestion?.isFrontPage }\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</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { isURL } from '@wordpress/url';\n\n/**\n * Determines whether a given value could be a URL. Note this does not\n * guarantee the value is a URL only that it looks like it might be one. For\n * example, just because a string has `www.` in it doesn't make it a URL,\n * but it does make it highly likely that it will be so in the context of\n * creating a link it makes sense to treat it like one.\n *\n * @param {string} val the candidate for being URL-like (or not).\n *\n * @return {boolean} whether or not the value is potentially a URL.\n */\nexport default function isURLLike( val ) {\n\tconst isInternal = val?.startsWith( '#' );\n\treturn isURL( val ) || ( val && val.includes( 'www.' ) ) || isInternal;\n}\n","/**\n * WordPress dependencies\n */\nimport { getProtocol, prependHTTP } from '@wordpress/url';\nimport { useCallback } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport isURLLike from './is-url-like';\nimport {\n\tCREATE_TYPE,\n\tTEL_TYPE,\n\tMAILTO_TYPE,\n\tINTERNAL_TYPE,\n\tURL_TYPE,\n} from './constants';\nimport { store as blockEditorStore } from '../../store';\n\nexport const handleNoop = () => Promise.resolve( [] );\n\nexport const handleDirectEntry = ( val ) => {\n\tlet type = URL_TYPE;\n\n\tconst protocol = getProtocol( val ) || '';\n\n\tif ( protocol.includes( 'mailto' ) ) {\n\t\ttype = MAILTO_TYPE;\n\t}\n\n\tif ( protocol.includes( 'tel' ) ) {\n\t\ttype = TEL_TYPE;\n\t}\n\n\tif ( val?.startsWith( '#' ) ) {\n\t\ttype = INTERNAL_TYPE;\n\t}\n\n\treturn Promise.resolve( [\n\t\t{\n\t\t\tid: val,\n\t\t\ttitle: val,\n\t\t\turl: type === 'URL' ? prependHTTP( val ) : val,\n\t\t\ttype,\n\t\t},\n\t] );\n};\n\nconst handleEntitySearch = async (\n\tval,\n\tsuggestionsQuery,\n\tfetchSearchSuggestions,\n\tdirectEntryHandler,\n\twithCreateSuggestion,\n\twithURLSuggestion,\n\tpageOnFront\n) => {\n\tconst { isInitialSuggestions } = suggestionsQuery;\n\tlet resultsIncludeFrontPage = false;\n\n\tlet results = await Promise.all( [\n\t\tfetchSearchSuggestions( val, suggestionsQuery ),\n\t\tdirectEntryHandler( val ),\n\t] );\n\n\t// Identify front page and update type to match.\n\tresults[ 0 ] = results[ 0 ].map( ( result ) => {\n\t\tif ( Number( result.id ) === pageOnFront ) {\n\t\t\tresultsIncludeFrontPage = true;\n\t\t\tresult.isFrontPage = true;\n\t\t\treturn result;\n\t\t}\n\n\t\treturn result;\n\t} );\n\n\tconst couldBeURL = ! val.includes( ' ' );\n\n\t// If it's potentially a URL search then concat on a URL search suggestion\n\t// just for good measure. That way once the actual results run out we always\n\t// have a URL option to fallback on.\n\tif (\n\t\t! resultsIncludeFrontPage &&\n\t\tcouldBeURL &&\n\t\twithURLSuggestion &&\n\t\t! isInitialSuggestions\n\t) {\n\t\tresults = results[ 0 ].concat( results[ 1 ] );\n\t} else {\n\t\tresults = results[ 0 ];\n\t}\n\n\t// If displaying initial suggestions just return plain results.\n\tif ( isInitialSuggestions ) {\n\t\treturn results;\n\t}\n\n\t// Here we append a faux suggestion to represent a \"CREATE\" option. This\n\t// is detected in the rendering of the search results and handled as a\n\t// special case. This is currently necessary because the suggestions\n\t// dropdown will only appear if there are valid suggestions and\n\t// therefore unless the create option is a suggestion it will not\n\t// display in scenarios where there are no results returned from the\n\t// API. In addition promoting CREATE to a first class suggestion affords\n\t// the a11y benefits afforded by `URLInput` to all suggestions (eg:\n\t// keyboard handling, ARIA roles...etc).\n\t//\n\t// Note also that the value of the `title` and `url` properties must correspond\n\t// to the text value of the `<input>`. This is because `title` is used\n\t// when creating the suggestion. Similarly `url` is used when using keyboard to select\n\t// the suggestion (the <form> `onSubmit` handler falls-back to `url`).\n\treturn isURLLike( val ) || ! withCreateSuggestion\n\t\t? results\n\t\t: results.concat( {\n\t\t\t\t// the `id` prop is intentionally ommitted here because it\n\t\t\t\t// is never exposed as part of the component's public API.\n\t\t\t\t// see: https://github.com/WordPress/gutenberg/pull/19775#discussion_r378931316.\n\t\t\t\ttitle: val, // Must match the existing `<input>`s text value.\n\t\t\t\turl: val, // Must match the existing `<input>`s text value.\n\t\t\t\ttype: CREATE_TYPE,\n\t\t  } );\n};\n\nexport default function useSearchHandler(\n\tsuggestionsQuery,\n\tallowDirectEntry,\n\twithCreateSuggestion,\n\twithURLSuggestion\n) {\n\tconst { fetchSearchSuggestions, pageOnFront } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\n\t\treturn {\n\t\t\tpageOnFront: getSettings().pageOnFront,\n\t\t\tfetchSearchSuggestions:\n\t\t\t\tgetSettings().__experimentalFetchLinkSuggestions,\n\t\t};\n\t}, [] );\n\n\tconst directEntryHandler = allowDirectEntry\n\t\t? handleDirectEntry\n\t\t: handleNoop;\n\n\treturn useCallback(\n\t\t( val, { isInitialSuggestions } ) => {\n\t\t\treturn isURLLike( val )\n\t\t\t\t? directEntryHandler( val, { isInitialSuggestions } )\n\t\t\t\t: handleEntitySearch(\n\t\t\t\t\t\tval,\n\t\t\t\t\t\t{ ...suggestionsQuery, isInitialSuggestions },\n\t\t\t\t\t\tfetchSearchSuggestions,\n\t\t\t\t\t\tdirectEntryHandler,\n\t\t\t\t\t\twithCreateSuggestion,\n\t\t\t\t\t\twithURLSuggestion,\n\t\t\t\t\t\tpageOnFront\n\t\t\t\t  );\n\t\t},\n\t\t[ directEntryHandler, fetchSearchSuggestions, withCreateSuggestion ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { URLInput } from '../';\nimport LinkControlSearchResults from './search-results';\nimport { CREATE_TYPE } from './constants';\nimport useSearchHandler from './use-search-handler';\n\n// Must be a function as otherwise URLInput will default\n// to the fetchLinkSuggestions passed in block editor settings\n// which will cause an unintended http request.\nconst noopSearchHandler = () => Promise.resolve( [] );\n\nconst noop = () => {};\n\nconst LinkControlSearchInput = forwardRef(\n\t(\n\t\t{\n\t\t\tvalue,\n\t\t\tchildren,\n\t\t\tcurrentLink = {},\n\t\t\tclassName = null,\n\t\t\tplaceholder = null,\n\t\t\twithCreateSuggestion = false,\n\t\t\tonCreateSuggestion = noop,\n\t\t\tonChange = noop,\n\t\t\tonSelect = noop,\n\t\t\tshowSuggestions = true,\n\t\t\trenderSuggestions = ( props ) => (\n\t\t\t\t<LinkControlSearchResults { ...props } />\n\t\t\t),\n\t\t\tfetchSuggestions = null,\n\t\t\tallowDirectEntry = true,\n\t\t\tshowInitialSuggestions = false,\n\t\t\tsuggestionsQuery = {},\n\t\t\twithURLSuggestion = true,\n\t\t\tcreateSuggestionButtonText,\n\t\t\tuseLabel = false,\n\t\t},\n\t\tref\n\t) => {\n\t\tconst genericSearchHandler = useSearchHandler(\n\t\t\tsuggestionsQuery,\n\t\t\tallowDirectEntry,\n\t\t\twithCreateSuggestion,\n\t\t\twithURLSuggestion\n\t\t);\n\n\t\tconst searchHandler = showSuggestions\n\t\t\t? fetchSuggestions || genericSearchHandler\n\t\t\t: noopSearchHandler;\n\n\t\tconst instanceId = useInstanceId( LinkControlSearchInput );\n\t\tconst [ focusedSuggestion, setFocusedSuggestion ] = useState();\n\n\t\t/**\n\t\t * Handles the user moving between different suggestions. Does not handle\n\t\t * choosing an individual item.\n\t\t *\n\t\t * @param {string} selection  the url of the selected suggestion.\n\t\t * @param {Object} suggestion the suggestion object.\n\t\t */\n\t\tconst onInputChange = ( selection, suggestion ) => {\n\t\t\tonChange( selection );\n\t\t\tsetFocusedSuggestion( suggestion );\n\t\t};\n\n\t\tconst handleRenderSuggestions = ( props ) =>\n\t\t\trenderSuggestions( {\n\t\t\t\t...props,\n\t\t\t\tinstanceId,\n\t\t\t\twithCreateSuggestion,\n\t\t\t\tcurrentInputValue: value,\n\t\t\t\tcreateSuggestionButtonText,\n\t\t\t\tsuggestionsQuery,\n\t\t\t\thandleSuggestionClick: ( suggestion ) => {\n\t\t\t\t\tif ( props.handleSuggestionClick ) {\n\t\t\t\t\t\tprops.handleSuggestionClick( suggestion );\n\t\t\t\t\t}\n\t\t\t\t\tonSuggestionSelected( suggestion );\n\t\t\t\t},\n\t\t\t} );\n\n\t\tconst onSuggestionSelected = async ( selectedSuggestion ) => {\n\t\t\tlet suggestion = selectedSuggestion;\n\t\t\tif ( CREATE_TYPE === selectedSuggestion.type ) {\n\t\t\t\t// Create a new page and call onSelect with the output from the onCreateSuggestion callback.\n\t\t\t\ttry {\n\t\t\t\t\tsuggestion = await onCreateSuggestion(\n\t\t\t\t\t\tselectedSuggestion.title\n\t\t\t\t\t);\n\t\t\t\t\tif ( suggestion?.url ) {\n\t\t\t\t\t\tonSelect( suggestion );\n\t\t\t\t\t}\n\t\t\t\t} catch ( e ) {}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tallowDirectEntry ||\n\t\t\t\t( suggestion && Object.keys( suggestion ).length >= 1 )\n\t\t\t) {\n\t\t\t\tconst { id, url, ...restLinkProps } = currentLink;\n\t\t\t\tonSelect(\n\t\t\t\t\t// Some direct entries don't have types or IDs, and we still need to clear the previous ones.\n\t\t\t\t\t{ ...restLinkProps, ...suggestion },\n\t\t\t\t\tsuggestion\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tconst inputClasses = classnames( className, {\n\t\t\t'has-no-label': ! useLabel,\n\t\t} );\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-link-control__search-input-container\">\n\t\t\t\t<URLInput\n\t\t\t\t\tlabel={ useLabel ? 'URL' : undefined }\n\t\t\t\t\tclassName={ inputClasses }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onInputChange }\n\t\t\t\t\tplaceholder={ placeholder ?? __( 'Search or type url' ) }\n\t\t\t\t\t__experimentalRenderSuggestions={\n\t\t\t\t\t\tshowSuggestions ? handleRenderSuggestions : null\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalFetchLinkSuggestions={ searchHandler }\n\t\t\t\t\t__experimentalHandleURLSuggestions={ true }\n\t\t\t\t\t__experimentalShowInitialSuggestions={\n\t\t\t\t\t\tshowInitialSuggestions\n\t\t\t\t\t}\n\t\t\t\t\tonSubmit={ ( suggestion, event ) => {\n\t\t\t\t\t\tconst hasSuggestion = suggestion || focusedSuggestion;\n\n\t\t\t\t\t\t// If there is no suggestion and the value (ie: any manually entered URL) is empty\n\t\t\t\t\t\t// then don't allow submission otherwise we get empty links.\n\t\t\t\t\t\tif ( ! hasSuggestion && ! value?.trim()?.length ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tonSuggestionSelected(\n\t\t\t\t\t\t\t\thasSuggestion || { url: value }\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\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nexport default LinkControlSearchInput;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst info = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z\" />\n\t</SVG>\n);\n\nexport default info;\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=\"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z\" />\n\t</SVG>\n);\n\nexport default pencil;\n","/**\n * WordPress dependencies\n */\nimport { createSlotFill } from '@wordpress/components';\n\nconst { Slot: ViewerSlot, Fill: ViewerFill } = createSlotFill(\n\t'BlockEditorLinkControlViewer'\n);\n\nexport { ViewerSlot, ViewerFill };\nexport default ViewerSlot;\n","/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useReducer } from '@wordpress/element';\n\nfunction reducer( state, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'RESOLVED':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisFetching: false,\n\t\t\t\trichData: action.richData,\n\t\t\t};\n\t\tcase 'ERROR':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisFetching: false,\n\t\t\t\trichData: null,\n\t\t\t};\n\t\tcase 'LOADING':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tisFetching: true,\n\t\t\t};\n\t\tdefault:\n\t\t\tthrow new Error( `Unexpected action type ${ action.type }` );\n\t}\n}\n\nfunction useRemoteUrlData( url ) {\n\tconst [ state, dispatch ] = useReducer( reducer, {\n\t\trichData: null,\n\t\tisFetching: false,\n\t} );\n\n\tconst { fetchRichUrlData } = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tfetchRichUrlData: getSettings().__experimentalFetchRichUrlData,\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\t// Only make the request if we have an actual URL\n\t\t// and the fetching util is available. In some editors\n\t\t// there may not be such a util.\n\t\tif (\n\t\t\turl?.length &&\n\t\t\tfetchRichUrlData &&\n\t\t\ttypeof AbortController !== 'undefined'\n\t\t) {\n\t\t\tdispatch( {\n\t\t\t\ttype: 'LOADING',\n\t\t\t} );\n\n\t\t\tconst controller = new window.AbortController();\n\n\t\t\tconst signal = controller.signal;\n\n\t\t\tfetchRichUrlData( url, {\n\t\t\t\tsignal,\n\t\t\t} )\n\t\t\t\t.then( ( urlData ) => {\n\t\t\t\t\tdispatch( {\n\t\t\t\t\t\ttype: 'RESOLVED',\n\t\t\t\t\t\trichData: urlData,\n\t\t\t\t\t} );\n\t\t\t\t} )\n\t\t\t\t.catch( () => {\n\t\t\t\t\t// Avoid setting state on unmounted component\n\t\t\t\t\tif ( ! signal.aborted ) {\n\t\t\t\t\t\tdispatch( {\n\t\t\t\t\t\t\ttype: 'ERROR',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t// Cleanup: when the URL changes the abort the current request.\n\t\t\treturn () => {\n\t\t\t\tcontroller.abort();\n\t\t\t};\n\t\t}\n\t}, [ url ] );\n\n\treturn state;\n}\n\nexport default useRemoteUrlData;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tExternalLink,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { filterURLForDisplay, safeDecodeURI } from '@wordpress/url';\nimport { Icon, globe, info, linkOff, edit } from '@wordpress/icons';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport { ViewerSlot } from './viewer-slot';\n\nimport useRichUrlData from './use-rich-url-data';\n\nexport default function LinkPreview( {\n\tvalue,\n\tonEditClick,\n\thasRichPreviews = false,\n\thasUnlinkControl = false,\n\tonRemove,\n} ) {\n\t// Avoid fetching if rich previews are not desired.\n\tconst showRichPreviews = hasRichPreviews ? value?.url : null;\n\n\tconst { richData, isFetching } = useRichUrlData( showRichPreviews );\n\n\t// Rich data may be an empty object so test for that.\n\tconst hasRichData = richData && Object.keys( richData ).length;\n\n\tconst displayURL =\n\t\t( value && filterURLForDisplay( safeDecodeURI( value.url ), 16 ) ) ||\n\t\t'';\n\n\tconst displayTitle = richData?.title || value?.title || displayURL;\n\n\t// url can be undefined if the href attribute is unset\n\tconst isEmptyURL = ! value?.url?.length;\n\n\tlet icon;\n\n\tif ( richData?.icon ) {\n\t\ticon = <img src={ richData?.icon } alt=\"\" />;\n\t} else if ( isEmptyURL ) {\n\t\ticon = <Icon icon={ info } size={ 32 } />;\n\t} else {\n\t\ticon = <Icon icon={ globe } />;\n\t}\n\n\treturn (\n\t\t<div\n\t\t\taria-label={ __( 'Currently selected' ) }\n\t\t\tclassName={ classnames( 'block-editor-link-control__search-item', {\n\t\t\t\t'is-current': true,\n\t\t\t\t'is-rich': hasRichData,\n\t\t\t\t'is-fetching': !! isFetching,\n\t\t\t\t'is-preview': true,\n\t\t\t\t'is-error': isEmptyURL,\n\t\t\t} ) }\n\t\t>\n\t\t\t<div className=\"block-editor-link-control__search-item-top\">\n\t\t\t\t<span className=\"block-editor-link-control__search-item-header\">\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-link-control__search-item-icon',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-image': richData?.icon,\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{ icon }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"block-editor-link-control__search-item-details\">\n\t\t\t\t\t\t{ ! isEmptyURL ? (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-item-title\"\n\t\t\t\t\t\t\t\t\thref={ value.url }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ stripHTML( displayTitle ) }\n\t\t\t\t\t\t\t\t</ExternalLink>\n\n\t\t\t\t\t\t\t\t{ value?.url && (\n\t\t\t\t\t\t\t\t\t<span className=\"block-editor-link-control__search-item-info\">\n\t\t\t\t\t\t\t\t\t\t{ displayURL }\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\t</>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span className=\"block-editor-link-control__search-item-error-notice\">\n\t\t\t\t\t\t\t\t{ __( 'Link is empty' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\tclassName=\"block-editor-link-control__search-item-action\"\n\t\t\t\t\tonClick={ onEditClick }\n\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t/>\n\t\t\t\t{ hasUnlinkControl && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\ticon={ linkOff }\n\t\t\t\t\t\tlabel={ __( 'Unlink' ) }\n\t\t\t\t\t\tclassName=\"block-editor-link-control__search-item-action block-editor-link-control__unlink\"\n\t\t\t\t\t\tonClick={ onRemove }\n\t\t\t\t\t\ticonSize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<ViewerSlot fillProps={ value } />\n\t\t\t</div>\n\n\t\t\t{ !! (\n\t\t\t\t( hasRichData &&\n\t\t\t\t\t( richData?.image || richData?.description ) ) ||\n\t\t\t\tisFetching\n\t\t\t) && (\n\t\t\t\t<div className=\"block-editor-link-control__search-item-bottom\">\n\t\t\t\t\t{ ( richData?.image || isFetching ) && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\taria-hidden={ ! richData?.image }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'block-editor-link-control__search-item-image',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-placeholder': ! richData?.image,\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{ richData?.image && (\n\t\t\t\t\t\t\t\t<img src={ richData?.image } alt=\"\" />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ( richData?.description || isFetching ) && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\taria-hidden={ ! richData?.description }\n\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t'block-editor-link-control__search-item-description',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'is-placeholder': ! richData?.description,\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{ richData?.description && (\n\t\t\t\t\t\t\t\t<Text truncate numberOfLines=\"2\">\n\t\t\t\t\t\t\t\t\t{ richData.description }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\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</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useState, useRef } from '@wordpress/element';\n\nexport default function useCreatePage( handleCreatePage ) {\n\tconst cancelableCreateSuggestion = useRef();\n\tconst [ isCreatingPage, setIsCreatingPage ] = useState( false );\n\tconst [ errorMessage, setErrorMessage ] = useState( null );\n\n\tconst createPage = async function ( suggestionTitle ) {\n\t\tsetIsCreatingPage( true );\n\t\tsetErrorMessage( null );\n\n\t\ttry {\n\t\t\t// Make cancellable in order that we can avoid setting State\n\t\t\t// if the component unmounts during the call to `createSuggestion`\n\t\t\tcancelableCreateSuggestion.current = makeCancelable(\n\t\t\t\t// Using Promise.resolve to allow createSuggestion to return a\n\t\t\t\t// non-Promise based value.\n\t\t\t\tPromise.resolve( handleCreatePage( suggestionTitle ) )\n\t\t\t);\n\n\t\t\treturn await cancelableCreateSuggestion.current.promise;\n\t\t} catch ( error ) {\n\t\t\tif ( error && error.isCanceled ) {\n\t\t\t\treturn; // bail if canceled to avoid setting state\n\t\t\t}\n\n\t\t\tsetErrorMessage(\n\t\t\t\terror.message ||\n\t\t\t\t\t__(\n\t\t\t\t\t\t'An unknown error occurred during creation. Please try again.'\n\t\t\t\t\t)\n\t\t\t);\n\t\t\tthrow error;\n\t\t} finally {\n\t\t\tsetIsCreatingPage( false );\n\t\t}\n\t};\n\n\t/**\n\t * Handles cancelling any pending Promises that have been made cancelable.\n\t */\n\tuseEffect( () => {\n\t\treturn () => {\n\t\t\t// componentDidUnmount\n\t\t\tif ( cancelableCreateSuggestion.current ) {\n\t\t\t\tcancelableCreateSuggestion.current.cancel();\n\t\t\t}\n\t\t};\n\t}, [] );\n\n\treturn {\n\t\tcreatePage,\n\t\tisCreatingPage,\n\t\terrorMessage,\n\t};\n}\n\n/**\n * Creates a wrapper around a promise which allows it to be programmatically\n * cancelled.\n * See: https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html\n *\n * @param {Promise} promise the Promise to make cancelable\n */\nconst makeCancelable = ( promise ) => {\n\tlet hasCanceled_ = false;\n\n\tconst wrappedPromise = new Promise( ( resolve, reject ) => {\n\t\tpromise.then(\n\t\t\t( val ) =>\n\t\t\t\thasCanceled_ ? reject( { isCanceled: true } ) : resolve( val ),\n\t\t\t( error ) =>\n\t\t\t\thasCanceled_ ? reject( { isCanceled: true } ) : reject( error )\n\t\t);\n\t} );\n\n\treturn {\n\t\tpromise: wrappedPromise,\n\t\tcancel() {\n\t\t\thasCanceled_ = true;\n\t\t},\n\t};\n};\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Spinner, Notice, TextControl } from '@wordpress/components';\nimport { keyboardReturn } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useEffect } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\nimport { ENTER } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport LinkControlSettingsDrawer from './settings-drawer';\nimport LinkControlSearchInput from './search-input';\nimport LinkPreview from './link-preview';\nimport useCreatePage from './use-create-page';\nimport { ViewerFill } from './viewer-slot';\nimport { DEFAULT_LINK_SETTINGS } from './constants';\n\n/**\n * Default properties associated with a link control value.\n *\n * @typedef WPLinkControlDefaultValue\n *\n * @property {string}   url           Link URL.\n * @property {string=}  title         Link title.\n * @property {boolean=} opensInNewTab Whether link should open in a new browser\n *                                    tab. This value is only assigned if not\n *                                    providing a custom `settings` prop.\n */\n\n/* eslint-disable jsdoc/valid-types */\n/**\n * Custom settings values associated with a link.\n *\n * @typedef {{[setting:string]:any}} WPLinkControlSettingsValue\n */\n/* eslint-enable */\n\n/**\n * Custom settings values associated with a link.\n *\n * @typedef WPLinkControlSetting\n *\n * @property {string} id    Identifier to use as property for setting value.\n * @property {string} title Human-readable label to show in user interface.\n */\n\n/**\n * Properties associated with a link control value, composed as a union of the\n * default properties and any custom settings values.\n *\n * @typedef {WPLinkControlDefaultValue&WPLinkControlSettingsValue} WPLinkControlValue\n */\n\n/** @typedef {(nextValue:WPLinkControlValue)=>void} WPLinkControlOnChangeProp */\n\n/**\n * Properties associated with a search suggestion used within the LinkControl.\n *\n * @typedef WPLinkControlSuggestion\n *\n * @property {string} id    Identifier to use to uniquely identify the suggestion.\n * @property {string} type  Identifies the type of the suggestion (eg: `post`,\n *                          `page`, `url`...etc)\n * @property {string} title Human-readable label to show in user interface.\n * @property {string} url   A URL for the suggestion.\n */\n\n/** @typedef {(title:string)=>WPLinkControlSuggestion} WPLinkControlCreateSuggestionProp */\n\n/**\n * @typedef WPLinkControlProps\n *\n * @property {(WPLinkControlSetting[])=}  settings                   An array of settings objects. Each object will used to\n *                                                                   render a `ToggleControl` for that setting.\n * @property {boolean=}                   forceIsEditingLink         If passed as either `true` or `false`, controls the\n *                                                                   internal editing state of the component to respective\n *                                                                   show or not show the URL input field.\n * @property {WPLinkControlValue=}        value                      Current link value.\n * @property {WPLinkControlOnChangeProp=} onChange                   Value change handler, called with the updated value if\n *                                                                   the user selects a new link or updates settings.\n * @property {boolean=}                   noDirectEntry              Whether to allow turning a URL-like search query directly into a link.\n * @property {boolean=}                   showSuggestions            Whether to present suggestions when typing the URL.\n * @property {boolean=}                   showInitialSuggestions     Whether to present initial suggestions immediately.\n * @property {boolean=}                   withCreateSuggestion       Whether to allow creation of link value from suggestion.\n * @property {Object=}                    suggestionsQuery           Query parameters to pass along to wp.blockEditor.__experimentalFetchLinkSuggestions.\n * @property {boolean=}                   noURLSuggestion            Whether to add a fallback suggestion which treats the search query as a URL.\n * @property {string|Function|undefined}  createSuggestionButtonText The text to use in the button that calls createSuggestion.\n * @property {Function}                   renderControlBottom        Optional controls to be rendered at the bottom of the component.\n */\n\nconst noop = () => {};\n\n/**\n * Renders a link control. A link control is a controlled input which maintains\n * a value associated with a link (HTML anchor element) and relevant settings\n * for how that link is expected to behave.\n *\n * @param {WPLinkControlProps} props Component props.\n */\nfunction LinkControl( {\n\tsearchInputPlaceholder,\n\tvalue,\n\tsettings = DEFAULT_LINK_SETTINGS,\n\tonChange = noop,\n\tonRemove,\n\tnoDirectEntry = false,\n\tshowSuggestions = true,\n\tshowInitialSuggestions,\n\tforceIsEditingLink,\n\tcreateSuggestion,\n\twithCreateSuggestion,\n\tinputValue: propInputValue = '',\n\tsuggestionsQuery = {},\n\tnoURLSuggestion = false,\n\tcreateSuggestionButtonText,\n\thasRichPreviews = false,\n\thasTextControl = false,\n\trenderControlBottom = null,\n} ) {\n\tif ( withCreateSuggestion === undefined && createSuggestion ) {\n\t\twithCreateSuggestion = true;\n\t}\n\n\tconst isMounting = useRef( true );\n\tconst wrapperNode = useRef();\n\tconst textInputRef = useRef();\n\n\tconst [ internalInputValue, setInternalInputValue ] = useState(\n\t\tvalue?.url || ''\n\t);\n\tconst [ internalTextValue, setInternalTextValue ] = useState(\n\t\tvalue?.title || ''\n\t);\n\tconst currentInputValue = propInputValue || internalInputValue;\n\tconst [ isEditingLink, setIsEditingLink ] = useState(\n\t\tforceIsEditingLink !== undefined\n\t\t\t? forceIsEditingLink\n\t\t\t: ! value || ! value.url\n\t);\n\tconst isEndingEditWithFocus = useRef( false );\n\n\tconst currentInputIsEmpty = ! currentInputValue?.trim()?.length;\n\n\tconst { createPage, isCreatingPage, errorMessage } =\n\t\tuseCreatePage( createSuggestion );\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\tforceIsEditingLink !== undefined &&\n\t\t\tforceIsEditingLink !== isEditingLink\n\t\t) {\n\t\t\tsetIsEditingLink( forceIsEditingLink );\n\t\t}\n\t}, [ forceIsEditingLink ] );\n\n\tuseEffect( () => {\n\t\t// We don't auto focus into the Link UI on mount\n\t\t// because otherwise using the keyboard to select text\n\t\t// *within* the link format is not possible.\n\t\tif ( isMounting.current ) {\n\t\t\tisMounting.current = false;\n\t\t\treturn;\n\t\t}\n\t\t// Unless we are mounting, we always want to focus either:\n\t\t// - the URL input\n\t\t// - the first focusable element in the Link UI.\n\t\t// But in editing mode if there is a text input present then\n\t\t// the URL input is at index 1. If not then it is at index 0.\n\t\tconst whichFocusTargetIndex = textInputRef?.current ? 1 : 0;\n\n\t\t// Scenario - when:\n\t\t// - switching between editable and non editable LinkControl\n\t\t// - clicking on a link\n\t\t// ...then move focus to the *first* element to avoid focus loss\n\t\t// and to ensure focus is *within* the Link UI.\n\t\tconst nextFocusTarget =\n\t\t\tfocus.focusable.find( wrapperNode.current )[\n\t\t\t\twhichFocusTargetIndex\n\t\t\t] || wrapperNode.current;\n\n\t\tnextFocusTarget.focus();\n\n\t\tisEndingEditWithFocus.current = false;\n\t}, [ isEditingLink, isCreatingPage ] );\n\n\tuseEffect( () => {\n\t\t/**\n\t\t * If the value's `text` property changes then sync this\n\t\t * back up with state.\n\t\t */\n\t\tif ( value?.title && value.title !== internalTextValue ) {\n\t\t\tsetInternalTextValue( value.title );\n\t\t}\n\n\t\t/**\n\t\t * Update the state value internalInputValue if the url value changes\n\t\t * for example when clicking on another anchor\n\t\t */\n\t\tif ( value?.url ) {\n\t\t\tsetInternalInputValue( value.url );\n\t\t}\n\t}, [ value ] );\n\n\t/**\n\t * Cancels editing state and marks that focus may need to be restored after\n\t * the next render, if focus was within the wrapper when editing finished.\n\t */\n\tfunction stopEditing() {\n\t\tisEndingEditWithFocus.current = !! wrapperNode.current?.contains(\n\t\t\twrapperNode.current.ownerDocument.activeElement\n\t\t);\n\n\t\tsetIsEditingLink( false );\n\t}\n\n\tconst handleSelectSuggestion = ( updatedValue ) => {\n\t\tonChange( {\n\t\t\t...updatedValue,\n\t\t\ttitle: internalTextValue || updatedValue?.title,\n\t\t} );\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif (\n\t\t\tcurrentInputValue !== value?.url ||\n\t\t\tinternalTextValue !== value?.title\n\t\t) {\n\t\t\tonChange( {\n\t\t\t\t...value,\n\t\t\t\turl: currentInputValue,\n\t\t\t\ttitle: internalTextValue,\n\t\t\t} );\n\t\t}\n\t\tstopEditing();\n\t};\n\n\tconst handleSubmitWithEnter = ( event ) => {\n\t\tconst { keyCode } = event;\n\t\tif (\n\t\t\tkeyCode === ENTER &&\n\t\t\t! currentInputIsEmpty // Disallow submitting empty values.\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\thandleSubmit();\n\t\t}\n\t};\n\n\tconst shownUnlinkControl =\n\t\tonRemove && value && ! isEditingLink && ! isCreatingPage;\n\n\tconst showSettingsDrawer = !! settings?.length;\n\n\t// Only show text control once a URL value has been committed\n\t// and it isn't just empty whitespace.\n\t// See https://github.com/WordPress/gutenberg/pull/33849/#issuecomment-932194927.\n\tconst showTextControl = value?.url?.trim()?.length > 0 && hasTextControl;\n\n\treturn (\n\t\t<div\n\t\t\ttabIndex={ -1 }\n\t\t\tref={ wrapperNode }\n\t\t\tclassName=\"block-editor-link-control\"\n\t\t>\n\t\t\t{ isCreatingPage && (\n\t\t\t\t<div className=\"block-editor-link-control__loading\">\n\t\t\t\t\t<Spinner /> { __( 'Creating' ) }…\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ ( isEditingLink || ! value ) && ! isCreatingPage && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( {\n\t\t\t\t\t\t\t'block-editor-link-control__search-input-wrapper': true,\n\t\t\t\t\t\t\t'has-text-control': showTextControl,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showTextControl && (\n\t\t\t\t\t\t\t<TextControl\n\t\t\t\t\t\t\t\tref={ textInputRef }\n\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__text-content\"\n\t\t\t\t\t\t\t\tlabel=\"Text\"\n\t\t\t\t\t\t\t\tvalue={ internalTextValue }\n\t\t\t\t\t\t\t\tonChange={ setInternalTextValue }\n\t\t\t\t\t\t\t\tonKeyDown={ handleSubmitWithEnter }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<LinkControlSearchInput\n\t\t\t\t\t\t\tcurrentLink={ value }\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__field block-editor-link-control__search-input\"\n\t\t\t\t\t\t\tplaceholder={ searchInputPlaceholder }\n\t\t\t\t\t\t\tvalue={ currentInputValue }\n\t\t\t\t\t\t\twithCreateSuggestion={ withCreateSuggestion }\n\t\t\t\t\t\t\tonCreateSuggestion={ createPage }\n\t\t\t\t\t\t\tonChange={ setInternalInputValue }\n\t\t\t\t\t\t\tonSelect={ handleSelectSuggestion }\n\t\t\t\t\t\t\tshowInitialSuggestions={ showInitialSuggestions }\n\t\t\t\t\t\t\tallowDirectEntry={ ! noDirectEntry }\n\t\t\t\t\t\t\tshowSuggestions={ showSuggestions }\n\t\t\t\t\t\t\tsuggestionsQuery={ suggestionsQuery }\n\t\t\t\t\t\t\twithURLSuggestion={ ! noURLSuggestion }\n\t\t\t\t\t\t\tcreateSuggestionButtonText={\n\t\t\t\t\t\t\t\tcreateSuggestionButtonText\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tuseLabel={ showTextControl }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"block-editor-link-control__search-actions\">\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tonClick={ handleSubmit }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-submit\"\n\t\t\t\t\t\t\t\t\tdisabled={ currentInputIsEmpty } // Disallow submitting empty values.\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</LinkControlSearchInput>\n\t\t\t\t\t</div>\n\t\t\t\t\t{ errorMessage && (\n\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\tclassName=\"block-editor-link-control__search-error\"\n\t\t\t\t\t\t\tstatus=\"error\"\n\t\t\t\t\t\t\tisDismissible={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ errorMessage }\n\t\t\t\t\t\t</Notice>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ value && ! isEditingLink && ! isCreatingPage && (\n\t\t\t\t<LinkPreview\n\t\t\t\t\tkey={ value?.url } // force remount when URL changes to avoid race conditions for rich previews\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonEditClick={ () => setIsEditingLink( true ) }\n\t\t\t\t\thasRichPreviews={ hasRichPreviews }\n\t\t\t\t\thasUnlinkControl={ shownUnlinkControl }\n\t\t\t\t\tonRemove={ onRemove }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ showSettingsDrawer && (\n\t\t\t\t<div className=\"block-editor-link-control__tools\">\n\t\t\t\t\t<LinkControlSettingsDrawer\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ renderControlBottom && renderControlBottom() }\n\t\t</div>\n\t);\n}\n\nLinkControl.ViewerFill = ViewerFill;\n\nexport default LinkControl;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst media = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.7 3H5.3C4 3 3 4 3 5.3v13.4C3 20 4 21 5.3 21h13.4c1.3 0 2.3-1 2.3-2.3V5.3C21 4 20 3 18.7 3zm.8 15.7c0 .4-.4.8-.8.8H5.3c-.4 0-.8-.4-.8-.8V5.3c0-.4.4-.8.8-.8h13.4c.4 0 .8.4.8.8v13.4zM10 15l5-3-5-3v6z\" />\n\t</SVG>\n);\n\nexport default media;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst upload = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z\" />\n\t</SVG>\n);\n\nexport default upload;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst postFeaturedImage = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 3H5c-.6 0-1 .4-1 1v7c0 .5.4 1 1 1h14c.5 0 1-.4 1-1V4c0-.6-.4-1-1-1zM5.5 10.5v-.4l1.8-1.3 1.3.8c.3.2.7.2.9-.1L11 8.1l2.4 2.4H5.5zm13 0h-2.9l-4-4c-.3-.3-.8-.3-1.1 0L8.9 8l-1.2-.8c-.3-.2-.6-.2-.9 0l-1.3 1V4.5h13v6zM4 20h9v-1.5H4V20zm0-4h16v-1.5H4V16z\" />\n\t</SVG>\n);\n\nexport default postFeaturedImage;\n","/**\n * WordPress dependencies\n */\nimport { withFilters } from '@wordpress/components';\n\n/**\n * This is a placeholder for the media upload component necessary to make it possible to provide\n * an integration with the core blocks that handle media files. By default it renders nothing but\n * it provides a way to have it overridden with the `editor.MediaUpload` filter.\n *\n * @return {WPComponent} The component to be rendered.\n */\nconst MediaUpload = () => null;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md\n */\nexport default withFilters( 'editor.MediaUpload' )( MediaUpload );\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport function MediaUploadCheck( { fallback = null, children } ) {\n\tconst hasUploadPermissions = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn !! getSettings().mediaUpload;\n\t}, [] );\n\treturn hasUploadPermissions ? children : fallback;\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-upload/README.md\n */\nexport default MediaUploadCheck;\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport {\n\tFormFileUpload,\n\tNavigableMenu,\n\tMenuItem,\n\tToolbarButton,\n\tDropdown,\n\twithFilters,\n\tTooltip,\n} from '@wordpress/components';\nimport { useSelect, withDispatch } from '@wordpress/data';\nimport { DOWN } from '@wordpress/keycodes';\nimport {\n\tpostFeaturedImage,\n\tupload,\n\tmedia as mediaIcon,\n} from '@wordpress/icons';\nimport { compose } from '@wordpress/compose';\nimport { __unstableStripHTML as stripHTML } from '@wordpress/dom';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\nimport LinkControl from '../link-control';\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\nlet uniqueId = 0;\n\nconst MediaReplaceFlow = ( {\n\tmediaURL,\n\tmediaId,\n\tmediaIds,\n\tallowedTypes,\n\taccept,\n\tonError,\n\tonSelect,\n\tonSelectURL,\n\tonToggleFeaturedImage,\n\tuseFeaturedImage,\n\tonFilesUpload = noop,\n\tname = __( 'Replace' ),\n\tcreateNotice,\n\tremoveNotice,\n\tchildren,\n\tmultiple = false,\n\taddToGallery,\n\thandleUpload = true,\n} ) => {\n\tconst mediaUpload = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getSettings().mediaUpload;\n\t}, [] );\n\tconst editMediaButtonRef = useRef();\n\tconst errorNoticeID = `block-editor/media-replace-flow/error-notice/${ ++uniqueId }`;\n\n\tconst onUploadError = ( message ) => {\n\t\tconst safeMessage = stripHTML( message );\n\t\tif ( onError ) {\n\t\t\tonError( safeMessage );\n\t\t\treturn;\n\t\t}\n\t\t// We need to set a timeout for showing the notice\n\t\t// so that VoiceOver and possibly other screen readers\n\t\t// can announce the error afer the toolbar button\n\t\t// regains focus once the upload dialog closes.\n\t\t// Otherwise VO simply skips over the notice and announces\n\t\t// the focused element and the open menu.\n\t\tsetTimeout( () => {\n\t\t\tcreateNotice( 'error', safeMessage, {\n\t\t\t\tspeak: true,\n\t\t\t\tid: errorNoticeID,\n\t\t\t\tisDismissible: true,\n\t\t\t} );\n\t\t}, 1000 );\n\t};\n\n\tconst selectMedia = ( media, closeMenu ) => {\n\t\tif ( useFeaturedImage && onToggleFeaturedImage ) {\n\t\t\tonToggleFeaturedImage();\n\t\t}\n\t\tcloseMenu();\n\t\t// Calling `onSelect` after the state update since it might unmount the component.\n\t\tonSelect( media );\n\t\tspeak( __( 'The media file has been replaced' ) );\n\t\tremoveNotice( errorNoticeID );\n\t};\n\n\tconst uploadFiles = ( event, closeMenu ) => {\n\t\tconst files = event.target.files;\n\t\tif ( ! handleUpload ) {\n\t\t\tcloseMenu();\n\t\t\treturn onSelect( files );\n\t\t}\n\t\tonFilesUpload( files );\n\t\tmediaUpload( {\n\t\t\tallowedTypes,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: ( [ media ] ) => {\n\t\t\t\tselectMedia( media, closeMenu );\n\t\t\t},\n\t\t\tonError: onUploadError,\n\t\t} );\n\t};\n\n\tconst openOnArrowDown = ( event ) => {\n\t\tif ( event.keyCode === DOWN ) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.target.click();\n\t\t}\n\t};\n\n\tconst onlyAllowsImages = () => {\n\t\tif ( ! allowedTypes || allowedTypes.length === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn allowedTypes.every(\n\t\t\t( allowedType ) =>\n\t\t\t\tallowedType === 'image' || allowedType.startsWith( 'image/' )\n\t\t);\n\t};\n\n\tconst gallery = multiple && onlyAllowsImages();\n\n\tconst POPOVER_PROPS = {\n\t\tisAlternate: true,\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tcontentClassName=\"block-editor-media-replace-flow__options\"\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<ToolbarButton\n\t\t\t\t\tref={ editMediaButtonRef }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\tonKeyDown={ openOnArrowDown }\n\t\t\t\t>\n\t\t\t\t\t{ name }\n\t\t\t\t</ToolbarButton>\n\t\t\t) }\n\t\t\trenderContent={ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu className=\"block-editor-media-replace-flow__media-upload-menu\">\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<MediaUpload\n\t\t\t\t\t\t\t\tgallery={ gallery }\n\t\t\t\t\t\t\t\taddToGallery={ addToGallery }\n\t\t\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\t\t\tvalue={ multiple ? mediaIds : mediaId }\n\t\t\t\t\t\t\t\tonSelect={ ( media ) =>\n\t\t\t\t\t\t\t\t\tselectMedia( media, onClose )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\t\t\t\t\trender={ ( { open } ) => (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\ticon={ mediaIcon }\n\t\t\t\t\t\t\t\t\t\tonClick={ open }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Open Media Library' ) }\n\t\t\t\t\t\t\t\t\t</MenuItem>\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<MediaUploadCheck>\n\t\t\t\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\t\t\t\tonChange={ ( event ) => {\n\t\t\t\t\t\t\t\t\t\tuploadFiles( event, onClose );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ upload }\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\topenFileDialog();\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\t{ __( 'Upload' ) }\n\t\t\t\t\t\t\t\t\t\t\t</MenuItem>\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</MediaUploadCheck>\n\t\t\t\t\t\t</>\n\t\t\t\t\t\t{ onToggleFeaturedImage && (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\ticon={ postFeaturedImage }\n\t\t\t\t\t\t\t\tonClick={ onToggleFeaturedImage }\n\t\t\t\t\t\t\t\tisPressed={ useFeaturedImage }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Use featured image' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t{ onSelectURL && (\n\t\t\t\t\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t\t\t\t\t<form className=\"block-editor-media-flow__url-input\">\n\t\t\t\t\t\t\t<span className=\"block-editor-media-replace-flow__image-url-label\">\n\t\t\t\t\t\t\t\t{ __( 'Current media URL:' ) }\n\t\t\t\t\t\t\t</span>\n\n\t\t\t\t\t\t\t<Tooltip text={ mediaURL } position=\"bottom\">\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<LinkControl\n\t\t\t\t\t\t\t\t\t\tvalue={ { url: mediaURL } }\n\t\t\t\t\t\t\t\t\t\tsettings={ [] }\n\t\t\t\t\t\t\t\t\t\tshowSuggestions={ false }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( { url } ) => {\n\t\t\t\t\t\t\t\t\t\t\tonSelectURL( url );\n\t\t\t\t\t\t\t\t\t\t\teditMediaButtonRef.current.focus();\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</div>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-replace-flow/README.md\n */\nexport default compose( [\n\twithDispatch( ( dispatch ) => {\n\t\tconst { createNotice, removeNotice } = dispatch( noticesStore );\n\t\treturn {\n\t\t\tcreateNotice,\n\t\t\tremoveNotice,\n\t\t};\n\t} ),\n\twithFilters( 'editor.MediaReplaceFlow' ),\n] )( MediaReplaceFlow );\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { ExternalLink } from '@wordpress/components';\nimport { safeDecodeURI, filterURLForDisplay } from '@wordpress/url';\n\nexport default function LinkViewerURL( { url, urlLabel, className } ) {\n\tconst linkClassName = classnames(\n\t\tclassName,\n\t\t'block-editor-url-popover__link-viewer-url'\n\t);\n\n\tif ( ! url ) {\n\t\treturn <span className={ linkClassName }></span>;\n\t}\n\n\treturn (\n\t\t<ExternalLink className={ linkClassName } href={ url }>\n\t\t\t{ urlLabel || filterURLForDisplay( safeDecodeURI( url ) ) }\n\t\t</ExternalLink>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { Button, Popover } from '@wordpress/components';\nimport { chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkViewer from './link-viewer';\nimport LinkEditor from './link-editor';\n\nfunction URLPopover( {\n\tadditionalControls,\n\tchildren,\n\trenderSettings,\n\tposition = 'bottom center',\n\tfocusOnMount = 'firstElement',\n\t...popoverProps\n} ) {\n\tconst [ isSettingsExpanded, setIsSettingsExpanded ] = useState( false );\n\n\tconst showSettings = !! renderSettings && isSettingsExpanded;\n\n\tconst toggleSettingsVisibility = () => {\n\t\tsetIsSettingsExpanded( ! isSettingsExpanded );\n\t};\n\n\treturn (\n\t\t<Popover\n\t\t\tclassName=\"block-editor-url-popover\"\n\t\t\tfocusOnMount={ focusOnMount }\n\t\t\tposition={ position }\n\t\t\tshift\n\t\t\t{ ...popoverProps }\n\t\t>\n\t\t\t<div className=\"block-editor-url-popover__input-container\">\n\t\t\t\t<div className=\"block-editor-url-popover__row\">\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ !! renderSettings && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"block-editor-url-popover__settings-toggle\"\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tlabel={ __( 'Link settings' ) }\n\t\t\t\t\t\t\tonClick={ toggleSettingsVisibility }\n\t\t\t\t\t\t\taria-expanded={ isSettingsExpanded }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ showSettings && (\n\t\t\t\t\t<div className=\"block-editor-url-popover__row block-editor-url-popover__settings\">\n\t\t\t\t\t\t{ renderSettings() }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t\t{ additionalControls && ! showSettings && (\n\t\t\t\t<div className=\"block-editor-url-popover__additional-controls\">\n\t\t\t\t\t{ additionalControls }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</Popover>\n\t);\n}\n\nURLPopover.LinkEditor = LinkEditor;\n\nURLPopover.LinkViewer = LinkViewer;\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-popover/README.md\n */\nexport default URLPopover;\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from '../url-input';\n\nexport default function LinkEditor( {\n\tautocompleteRef,\n\tclassName,\n\tonChangeInputValue,\n\tvalue,\n\t...props\n} ) {\n\treturn (\n\t\t<form\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-editor',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<URLInput\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeInputValue }\n\t\t\t\tautocompleteRef={ autocompleteRef }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { edit } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport LinkViewerURL from './link-viewer-url';\n\nexport default function LinkViewer( {\n\tclassName,\n\tlinkClassName,\n\tonEditLinkClick,\n\turl,\n\turlLabel,\n\t...props\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-url-popover__link-viewer',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<LinkViewerURL\n\t\t\t\turl={ url }\n\t\t\t\turlLabel={ urlLabel }\n\t\t\t\tclassName={ linkClassName }\n\t\t\t/>\n\t\t\t{ onEditLinkClick && (\n\t\t\t\t<Button\n\t\t\t\t\ticon={ edit }\n\t\t\t\t\tlabel={ __( 'Edit' ) }\n\t\t\t\t\tonClick={ onEditLinkClick }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tFormFileUpload,\n\tPlaceholder,\n\tDropZone,\n\twithFilters,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { keyboardReturn } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport MediaUpload from '../media-upload';\nimport MediaUploadCheck from '../media-upload/check';\nimport URLPopover from '../url-popover';\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\nconst InsertFromURLPopover = ( { src, onChange, onSubmit, onClose } ) => (\n\t<URLPopover onClose={ onClose }>\n\t\t<form\n\t\t\tclassName=\"block-editor-media-placeholder__url-input-form\"\n\t\t\tonSubmit={ onSubmit }\n\t\t>\n\t\t\t<input\n\t\t\t\tclassName=\"block-editor-media-placeholder__url-input-field\"\n\t\t\t\ttype=\"text\"\n\t\t\t\taria-label={ __( 'URL' ) }\n\t\t\t\tplaceholder={ __( 'Paste or type URL' ) }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tvalue={ src }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\tclassName=\"block-editor-media-placeholder__url-input-submit-button\"\n\t\t\t\ticon={ keyboardReturn }\n\t\t\t\tlabel={ __( 'Apply' ) }\n\t\t\t\ttype=\"submit\"\n\t\t\t/>\n\t\t</form>\n\t</URLPopover>\n);\n\nexport function MediaPlaceholder( {\n\tvalue = {},\n\tallowedTypes,\n\tclassName,\n\ticon,\n\tlabels = {},\n\tmediaPreview,\n\tnotices,\n\tisAppender,\n\taccept,\n\taddToGallery,\n\tmultiple = false,\n\thandleUpload = true,\n\tdisableDropZone,\n\tdisableMediaButtons,\n\tonError,\n\tonSelect,\n\tonCancel,\n\tonSelectURL,\n\tonToggleFeaturedImage,\n\tonDoubleClick,\n\tonFilesPreUpload = noop,\n\tonHTMLDrop = noop,\n\tchildren,\n\tmediaLibraryButton,\n\tplaceholder,\n\tstyle,\n} ) {\n\tconst mediaUpload = useSelect( ( select ) => {\n\t\tconst { getSettings } = select( blockEditorStore );\n\t\treturn getSettings().mediaUpload;\n\t}, [] );\n\tconst [ src, setSrc ] = useState( '' );\n\tconst [ isURLInputVisible, setIsURLInputVisible ] = useState( false );\n\n\tuseEffect( () => {\n\t\tsetSrc( value?.src ?? '' );\n\t}, [ value?.src ] );\n\n\tconst onlyAllowsImages = () => {\n\t\tif ( ! allowedTypes || allowedTypes.length === 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn allowedTypes.every(\n\t\t\t( allowedType ) =>\n\t\t\t\tallowedType === 'image' || allowedType.startsWith( 'image/' )\n\t\t);\n\t};\n\n\tconst onChangeSrc = ( event ) => {\n\t\tsetSrc( event.target.value );\n\t};\n\n\tconst openURLInput = () => {\n\t\tsetIsURLInputVisible( true );\n\t};\n\tconst closeURLInput = () => {\n\t\tsetIsURLInputVisible( false );\n\t};\n\n\tconst onSubmitSrc = ( event ) => {\n\t\tevent.preventDefault();\n\t\tif ( src && onSelectURL ) {\n\t\t\tonSelectURL( src );\n\t\t\tcloseURLInput();\n\t\t}\n\t};\n\n\tconst onFilesUpload = ( files ) => {\n\t\tif ( ! handleUpload ) {\n\t\t\treturn onSelect( files );\n\t\t}\n\t\tonFilesPreUpload( files );\n\t\tlet setMedia;\n\t\tif ( multiple ) {\n\t\t\tif ( addToGallery ) {\n\t\t\t\t// Since the setMedia function runs multiple times per upload group\n\t\t\t\t// and is passed newMedia containing every item in its group each time, we must\n\t\t\t\t// filter out whatever this upload group had previously returned to the\n\t\t\t\t// gallery before adding and returning the image array with replacement newMedia\n\t\t\t\t// values.\n\n\t\t\t\t// Define an array to store urls from newMedia between subsequent function calls.\n\t\t\t\tlet lastMediaPassed = [];\n\t\t\t\tsetMedia = ( newMedia ) => {\n\t\t\t\t\t// Remove any images this upload group is responsible for (lastMediaPassed).\n\t\t\t\t\t// Their replacements are contained in newMedia.\n\t\t\t\t\tconst filteredMedia = ( value ?? [] ).filter( ( item ) => {\n\t\t\t\t\t\t// If Item has id, only remove it if lastMediaPassed has an item with that id.\n\t\t\t\t\t\tif ( item.id ) {\n\t\t\t\t\t\t\treturn ! lastMediaPassed.some(\n\t\t\t\t\t\t\t\t// Be sure to convert to number for comparison.\n\t\t\t\t\t\t\t\t( { id } ) => Number( id ) === Number( item.id )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Compare transient images via .includes since gallery may append extra info onto the url.\n\t\t\t\t\t\treturn ! lastMediaPassed.some( ( { urlSlug } ) =>\n\t\t\t\t\t\t\titem.url.includes( urlSlug )\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\t\t\t\t\t// Return the filtered media array along with newMedia.\n\t\t\t\t\tonSelect( filteredMedia.concat( newMedia ) );\n\t\t\t\t\t// Reset lastMediaPassed and set it with ids and urls from newMedia.\n\t\t\t\t\tlastMediaPassed = newMedia.map( ( media ) => {\n\t\t\t\t\t\t// Add everything up to '.fileType' to compare via .includes.\n\t\t\t\t\t\tconst cutOffIndex = media.url.lastIndexOf( '.' );\n\t\t\t\t\t\tconst urlSlug = media.url.slice( 0, cutOffIndex );\n\t\t\t\t\t\treturn { id: media.id, urlSlug };\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tsetMedia = onSelect;\n\t\t\t}\n\t\t} else {\n\t\t\tsetMedia = ( [ media ] ) => onSelect( media );\n\t\t}\n\t\tmediaUpload( {\n\t\t\tallowedTypes,\n\t\t\tfilesList: files,\n\t\t\tonFileChange: setMedia,\n\t\t\tonError,\n\t\t} );\n\t};\n\n\tconst onUpload = ( event ) => {\n\t\tonFilesUpload( event.target.files );\n\t};\n\n\tconst defaultRenderPlaceholder = ( content ) => {\n\t\tlet { instructions, title } = labels;\n\n\t\tif ( ! mediaUpload && ! onSelectURL ) {\n\t\t\tinstructions = __(\n\t\t\t\t'To edit this block, you need permission to upload media.'\n\t\t\t);\n\t\t}\n\n\t\tif ( instructions === undefined || title === undefined ) {\n\t\t\tconst typesAllowed = allowedTypes ?? [];\n\n\t\t\tconst [ firstAllowedType ] = typesAllowed;\n\t\t\tconst isOneType = 1 === typesAllowed.length;\n\t\t\tconst isAudio = isOneType && 'audio' === firstAllowedType;\n\t\t\tconst isImage = isOneType && 'image' === firstAllowedType;\n\t\t\tconst isVideo = isOneType && 'video' === firstAllowedType;\n\n\t\t\tif ( instructions === undefined && mediaUpload ) {\n\t\t\t\tinstructions = __(\n\t\t\t\t\t'Upload a media file or pick one from your media library.'\n\t\t\t\t);\n\n\t\t\t\tif ( isAudio ) {\n\t\t\t\t\tinstructions = __(\n\t\t\t\t\t\t'Upload an audio file, pick one from your media library, or add one with a URL.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( isImage ) {\n\t\t\t\t\tinstructions = __(\n\t\t\t\t\t\t'Upload an image file, pick one from your media library, or add one with a URL.'\n\t\t\t\t\t);\n\t\t\t\t} else if ( isVideo ) {\n\t\t\t\t\tinstructions = __(\n\t\t\t\t\t\t'Upload a video file, pick one from your media library, or add one with a URL.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( title === undefined ) {\n\t\t\t\ttitle = __( 'Media' );\n\n\t\t\t\tif ( isAudio ) {\n\t\t\t\t\ttitle = __( 'Audio' );\n\t\t\t\t} else if ( isImage ) {\n\t\t\t\t\ttitle = __( 'Image' );\n\t\t\t\t} else if ( isVideo ) {\n\t\t\t\t\ttitle = __( 'Video' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst placeholderClassName = classnames(\n\t\t\t'block-editor-media-placeholder',\n\t\t\tclassName,\n\t\t\t{\n\t\t\t\t'is-appender': isAppender,\n\t\t\t}\n\t\t);\n\n\t\treturn (\n\t\t\t<Placeholder\n\t\t\t\ticon={ icon }\n\t\t\t\tlabel={ title }\n\t\t\t\tinstructions={ instructions }\n\t\t\t\tclassName={ placeholderClassName }\n\t\t\t\tnotices={ notices }\n\t\t\t\tonDoubleClick={ onDoubleClick }\n\t\t\t\tpreview={ mediaPreview }\n\t\t\t\tstyle={ style }\n\t\t\t>\n\t\t\t\t{ content }\n\t\t\t\t{ children }\n\t\t\t</Placeholder>\n\t\t);\n\t};\n\tconst renderPlaceholder = placeholder ?? defaultRenderPlaceholder;\n\n\tconst renderDropZone = () => {\n\t\tif ( disableDropZone ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<DropZone onFilesDrop={ onFilesUpload } onHTMLDrop={ onHTMLDrop } />\n\t\t);\n\t};\n\n\tconst renderCancelLink = () => {\n\t\treturn (\n\t\t\tonCancel && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"block-editor-media-placeholder__cancel-button\"\n\t\t\t\t\ttitle={ __( 'Cancel' ) }\n\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\tonClick={ onCancel }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t</Button>\n\t\t\t)\n\t\t);\n\t};\n\n\tconst renderUrlSelectionUI = () => {\n\t\treturn (\n\t\t\tonSelectURL && (\n\t\t\t\t<div className=\"block-editor-media-placeholder__url-input-container\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-media-placeholder__button\"\n\t\t\t\t\t\tonClick={ openURLInput }\n\t\t\t\t\t\tisPressed={ isURLInputVisible }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Insert from URL' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t{ isURLInputVisible && (\n\t\t\t\t\t\t<InsertFromURLPopover\n\t\t\t\t\t\t\tsrc={ src }\n\t\t\t\t\t\t\tonChange={ onChangeSrc }\n\t\t\t\t\t\t\tonSubmit={ onSubmitSrc }\n\t\t\t\t\t\t\tonClose={ closeURLInput }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t)\n\t\t);\n\t};\n\n\tconst renderFeaturedImageToggle = () => {\n\t\treturn (\n\t\t\tonToggleFeaturedImage && (\n\t\t\t\t<div className=\"block-editor-media-placeholder__url-input-container\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-media-placeholder__button\"\n\t\t\t\t\t\tonClick={ onToggleFeaturedImage }\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Use featured image' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</div>\n\t\t\t)\n\t\t);\n\t};\n\n\tconst renderMediaUploadChecked = () => {\n\t\tconst defaultButton = ( { open } ) => {\n\t\t\treturn (\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\topen();\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Media Library' ) }\n\t\t\t\t</Button>\n\t\t\t);\n\t\t};\n\t\tconst libraryButton = mediaLibraryButton ?? defaultButton;\n\t\tconst uploadMediaLibraryButton = (\n\t\t\t<MediaUpload\n\t\t\t\taddToGallery={ addToGallery }\n\t\t\t\tgallery={ multiple && onlyAllowsImages() }\n\t\t\t\tmultiple={ multiple }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tallowedTypes={ allowedTypes }\n\t\t\t\tmode={ 'browse' }\n\t\t\t\tvalue={\n\t\t\t\t\tArray.isArray( value )\n\t\t\t\t\t\t? value.map( ( { id } ) => id )\n\t\t\t\t\t\t: value.id\n\t\t\t\t}\n\t\t\t\trender={ libraryButton }\n\t\t\t/>\n\t\t);\n\n\t\tif ( mediaUpload && isAppender ) {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{ renderDropZone() }\n\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\tonChange={ onUpload }\n\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t\trender={ ( { openFileDialog } ) => {\n\t\t\t\t\t\t\tconst content = (\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\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-media-placeholder__button',\n\t\t\t\t\t\t\t\t\t\t\t'block-editor-media-placeholder__upload-button'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\tonClick={ openFileDialog }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Upload' ) }\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t{ uploadMediaLibraryButton }\n\t\t\t\t\t\t\t\t\t{ renderUrlSelectionUI() }\n\t\t\t\t\t\t\t\t\t{ renderFeaturedImageToggle() }\n\t\t\t\t\t\t\t\t\t{ renderCancelLink() }\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn renderPlaceholder( content );\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\tif ( mediaUpload ) {\n\t\t\tconst content = (\n\t\t\t\t<>\n\t\t\t\t\t{ renderDropZone() }\n\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t'block-editor-media-placeholder__button',\n\t\t\t\t\t\t\t'block-editor-media-placeholder__upload-button'\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonChange={ onUpload }\n\t\t\t\t\t\taccept={ accept }\n\t\t\t\t\t\tmultiple={ multiple }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Upload' ) }\n\t\t\t\t\t</FormFileUpload>\n\t\t\t\t\t{ uploadMediaLibraryButton }\n\t\t\t\t\t{ renderUrlSelectionUI() }\n\t\t\t\t\t{ renderFeaturedImageToggle() }\n\t\t\t\t\t{ renderCancelLink() }\n\t\t\t\t</>\n\t\t\t);\n\t\t\treturn renderPlaceholder( content );\n\t\t}\n\n\t\treturn renderPlaceholder( uploadMediaLibraryButton );\n\t};\n\n\tif ( disableMediaButtons ) {\n\t\treturn <MediaUploadCheck>{ renderDropZone() }</MediaUploadCheck>;\n\t}\n\n\treturn (\n\t\t<MediaUploadCheck\n\t\t\tfallback={ renderPlaceholder( renderUrlSelectionUI() ) }\n\t\t>\n\t\t\t{ renderMediaUploadChecked() }\n\t\t</MediaUploadCheck>\n\t);\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/media-placeholder/README.md\n */\nexport default withFilters( 'editor.MediaPlaceholder' )( MediaPlaceholder );\n","/**\n * Internal dependencies\n */\nimport PanelColorGradientSettings from '../colors-gradients/panel-color-gradient-settings';\n\nconst PanelColorSettings = ( { colorSettings, ...props } ) => {\n\tconst settings = colorSettings.map( ( setting ) => {\n\t\tif ( ! setting ) {\n\t\t\treturn setting;\n\t\t}\n\t\tconst { value, onChange, ...otherSettings } = setting;\n\t\treturn {\n\t\t\t...otherSettings,\n\t\t\tcolorValue: value,\n\t\t\tonColorChange: onChange,\n\t\t};\n\t} );\n\treturn (\n\t\t<PanelColorGradientSettings\n\t\t\tsettings={ settings }\n\t\t\tgradients={ [] }\n\t\t\tdisableCustomGradients={ true }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n};\nexport default PanelColorSettings;\n","/**\n * External dependencies\n */\n\nimport { orderBy } from 'lodash';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\n\nimport { __ } from '@wordpress/i18n';\nimport { ToolbarItem, DropdownMenu, Slot } from '@wordpress/components';\nimport { chevronDown } from '@wordpress/icons';\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n\tisAlternate: true,\n};\n\nconst FormatToolbar = () => {\n\treturn (\n\t\t<>\n\t\t\t{ [ 'bold', 'italic', 'link' ].map( ( format ) => (\n\t\t\t\t<Slot\n\t\t\t\t\tname={ `RichText.ToolbarControls.${ format }` }\n\t\t\t\t\tkey={ format }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t\t<Slot name=\"RichText.ToolbarControls\">\n\t\t\t\t{ ( fills ) => {\n\t\t\t\t\tif ( ! fills.length ) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst allProps = fills.map( ( [ { props } ] ) => props );\n\t\t\t\t\tconst hasActive = allProps.some(\n\t\t\t\t\t\t( { isActive } ) => isActive\n\t\t\t\t\t);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ToolbarItem>\n\t\t\t\t\t\t\t{ ( toggleProps ) => (\n\t\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\t\ticon={ chevronDown }\n\t\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\t\tlabel={ __( 'More' ) }\n\t\t\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\t\t\t...toggleProps,\n\t\t\t\t\t\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t\t\t\t\t\ttoggleProps.className,\n\t\t\t\t\t\t\t\t\t\t\t{ 'is-pressed': hasActive }\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\tdescribedBy: __(\n\t\t\t\t\t\t\t\t\t\t\t'Displays more block tools'\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\tcontrols={ orderBy(\n\t\t\t\t\t\t\t\t\t\tfills.map( ( [ { props } ] ) => props ),\n\t\t\t\t\t\t\t\t\t\t'title'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</ToolbarItem>\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t</Slot>\n\t\t</>\n\t);\n};\n\nexport default FormatToolbar;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Popover, ToolbarGroup } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tisCollapsed,\n\tgetActiveFormats,\n\tuseAnchor,\n\tstore as richTextStore,\n} from '@wordpress/rich-text';\n\n/**\n * Internal dependencies\n */\nimport BlockControls from '../block-controls';\nimport FormatToolbar from './format-toolbar';\nimport NavigableToolbar from '../navigable-toolbar';\nimport { store as blockEditorStore } from '../../store';\n\nfunction InlineSelectionToolbar( {\n\tvalue,\n\teditableContentElement,\n\tactiveFormats,\n} ) {\n\tconst lastFormat = activeFormats[ activeFormats.length - 1 ];\n\tconst lastFormatType = lastFormat?.type;\n\tconst settings = useSelect(\n\t\t( select ) => select( richTextStore ).getFormatType( lastFormatType ),\n\t\t[ lastFormatType ]\n\t);\n\tconst popoverAnchor = useAnchor( {\n\t\teditableContentElement,\n\t\tvalue,\n\t\tsettings,\n\t} );\n\n\treturn <InlineToolbar popoverAnchor={ popoverAnchor } />;\n}\n\nfunction InlineToolbar( { popoverAnchor } ) {\n\treturn (\n\t\t<Popover\n\t\t\tposition=\"top center\"\n\t\t\tfocusOnMount={ false }\n\t\t\tanchor={ popoverAnchor }\n\t\t\tclassName=\"block-editor-rich-text__inline-format-toolbar\"\n\t\t\t__unstableSlotName=\"block-toolbar\"\n\t\t>\n\t\t\t<NavigableToolbar\n\t\t\t\tclassName=\"block-editor-rich-text__inline-format-toolbar-group\"\n\t\t\t\t/* translators: accessibility text for the inline format toolbar */\n\t\t\t\taria-label={ __( 'Format tools' ) }\n\t\t\t>\n\t\t\t\t<ToolbarGroup>\n\t\t\t\t\t<FormatToolbar />\n\t\t\t\t</ToolbarGroup>\n\t\t\t</NavigableToolbar>\n\t\t</Popover>\n\t);\n}\n\nconst FormatToolbarContainer = ( {\n\tinline,\n\teditableContentElement,\n\tvalue,\n} ) => {\n\tconst hasInlineToolbar = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings().hasInlineToolbar,\n\t\t[]\n\t);\n\n\tif ( inline ) {\n\t\treturn <InlineToolbar popoverAnchor={ editableContentElement } />;\n\t}\n\n\tif ( hasInlineToolbar ) {\n\t\tconst activeFormats = getActiveFormats( value );\n\n\t\tif ( isCollapsed( value ) && ! activeFormats.length ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<InlineSelectionToolbar\n\t\t\t\teditableContentElement={ editableContentElement }\n\t\t\t\tvalue={ value }\n\t\t\t\tactiveFormats={ activeFormats }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// Render regular toolbar.\n\treturn (\n\t\t<BlockControls group=\"inline\">\n\t\t\t<FormatToolbar />\n\t\t</BlockControls>\n\t);\n};\n\nexport default FormatToolbarContainer;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useRefEffect } from '@wordpress/compose';\nimport { BACKSPACE, DELETE, ESCAPE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport function useUndoAutomaticChange() {\n\tconst { didAutomaticChange, getSettings } = useSelect( blockEditorStore );\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tconst { keyCode } = event;\n\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tkeyCode !== DELETE &&\n\t\t\t\tkeyCode !== BACKSPACE &&\n\t\t\t\tkeyCode !== ESCAPE\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ! didAutomaticChange() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\t\t\tgetSettings().__experimentalUndo();\n\t\t}\n\n\t\telement.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { createBlobURL } from '@wordpress/blob';\n\nexport function filePasteHandler( files ) {\n\treturn files\n\t\t.filter( ( { type } ) =>\n\t\t\t/^image\\/(?:jpe?g|png|gif|webp)$/.test( type )\n\t\t)\n\t\t.map( ( file ) => `<img src=\"${ createBlobURL( file ) }\">` )\n\t\t.join( '' );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"shortcode\"];","/**\n * WordPress dependencies\n */\nimport { regexp } from '@wordpress/shortcode';\nimport deprecated from '@wordpress/deprecated';\nimport { renderToString } from '@wordpress/element';\nimport { createBlock } from '@wordpress/blocks';\n\nexport function addActiveFormats( value, activeFormats ) {\n\tif ( activeFormats?.length ) {\n\t\tlet index = value.formats.length;\n\n\t\twhile ( index-- ) {\n\t\t\tvalue.formats[ index ] = [\n\t\t\t\t...activeFormats,\n\t\t\t\t...( value.formats[ index ] || [] ),\n\t\t\t];\n\t\t}\n\t}\n}\n\n/**\n * Get the multiline tag based on the multiline prop.\n *\n * @param {?(string|boolean)} multiline The multiline prop.\n *\n * @return {?string} The multiline tag.\n */\nexport function getMultilineTag( multiline ) {\n\tif ( multiline !== true && multiline !== 'p' && multiline !== 'li' ) {\n\t\treturn;\n\t}\n\n\treturn multiline === true ? 'p' : multiline;\n}\n\nexport function getAllowedFormats( {\n\tallowedFormats,\n\tformattingControls,\n\tdisableFormats,\n} ) {\n\tif ( disableFormats ) {\n\t\treturn getAllowedFormats.EMPTY_ARRAY;\n\t}\n\n\tif ( ! allowedFormats && ! formattingControls ) {\n\t\treturn;\n\t}\n\n\tif ( allowedFormats ) {\n\t\treturn allowedFormats;\n\t}\n\n\tdeprecated( 'wp.blockEditor.RichText formattingControls prop', {\n\t\tsince: '5.4',\n\t\talternative: 'allowedFormats',\n\t\tversion: '6.2',\n\t} );\n\n\treturn formattingControls.map( ( name ) => `core/${ name }` );\n}\n\ngetAllowedFormats.EMPTY_ARRAY = [];\n\nexport const isShortcode = ( text ) => regexp( '.*' ).test( text );\n\n/**\n * Creates a link from pasted URL.\n * Creates a paragraph block containing a link to the URL, and calls `onReplace`.\n *\n * @param {string}   url       The URL that could not be embedded.\n * @param {Function} onReplace Function to call with the created fallback block.\n */\nexport function createLinkInParagraph( url, onReplace ) {\n\tconst link = <a href={ url }>{ url }</a>;\n\tonReplace(\n\t\tcreateBlock( 'core/paragraph', { content: renderToString( link ) } )\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { isEmpty, split, toHTMLString } from '@wordpress/rich-text';\n\n/*\n * Signals to the RichText owner that the block can be replaced with two blocks\n * as a result of splitting the block by pressing enter, or with blocks as a\n * result of splitting the block by pasting block content in the instance.\n */\nexport function splitValue( {\n\tvalue,\n\tpastedBlocks = [],\n\tonReplace,\n\tonSplit,\n\tonSplitMiddle,\n\tmultilineTag,\n} ) {\n\tif ( ! onReplace || ! onSplit ) {\n\t\treturn;\n\t}\n\n\t// Ensure the value has a selection. This might happen when trying to split\n\t// an empty value before there was a `selectionchange` event.\n\tconst { start = 0, end = 0 } = value;\n\tconst valueWithEnsuredSelection = { ...value, start, end };\n\tconst blocks = [];\n\tconst [ before, after ] = split( valueWithEnsuredSelection );\n\tconst hasPastedBlocks = pastedBlocks.length > 0;\n\tlet lastPastedBlockIndex = -1;\n\n\t// Consider the after value to be the original it is not empty and the\n\t// before value *is* empty.\n\tconst isAfterOriginal = isEmpty( before ) && ! isEmpty( after );\n\n\t// Create a block with the content before the caret if there's no pasted\n\t// blocks, or if there are pasted blocks and the value is not empty. We do\n\t// not want a leading empty block on paste, but we do if split with e.g. the\n\t// enter key.\n\tif ( ! hasPastedBlocks || ! isEmpty( before ) ) {\n\t\tblocks.push(\n\t\t\tonSplit(\n\t\t\t\ttoHTMLString( {\n\t\t\t\t\tvalue: before,\n\t\t\t\t\tmultilineTag,\n\t\t\t\t} ),\n\t\t\t\t! isAfterOriginal\n\t\t\t)\n\t\t);\n\t\tlastPastedBlockIndex += 1;\n\t}\n\n\tif ( hasPastedBlocks ) {\n\t\tblocks.push( ...pastedBlocks );\n\t\tlastPastedBlockIndex += pastedBlocks.length;\n\t} else if ( onSplitMiddle ) {\n\t\tblocks.push( onSplitMiddle() );\n\t}\n\n\t// If there's pasted blocks, append a block with non empty content / after\n\t// the caret. Otherwise, do append an empty block if there is no\n\t// `onSplitMiddle` prop, but if there is and the content is empty, the\n\t// middle block is enough to set focus in.\n\tif (\n\t\thasPastedBlocks\n\t\t\t? ! isEmpty( after )\n\t\t\t: ! onSplitMiddle || ! isEmpty( after )\n\t) {\n\t\tblocks.push(\n\t\t\tonSplit(\n\t\t\t\ttoHTMLString( {\n\t\t\t\t\tvalue: after,\n\t\t\t\t\tmultilineTag,\n\t\t\t\t} ),\n\t\t\t\tisAfterOriginal\n\t\t\t)\n\t\t);\n\t}\n\n\t// If there are pasted blocks, set the selection to the last one. Otherwise,\n\t// set the selection to the second block.\n\tconst indexToSelect = hasPastedBlocks ? lastPastedBlockIndex : 1;\n\n\t// If there are pasted blocks, move the caret to the end of the selected\n\t// block Otherwise, retain the default value.\n\tconst initialPosition = hasPastedBlocks ? -1 : 0;\n\n\tonReplace( blocks, indexToSelect, initialPosition );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\nimport { getFilesFromDataTransfer } from '@wordpress/dom';\nimport { pasteHandler } from '@wordpress/blocks';\nimport {\n\tisEmpty,\n\tinsert,\n\tcreate,\n\treplace,\n\t__UNSTABLE_LINE_SEPARATOR as LINE_SEPARATOR,\n} from '@wordpress/rich-text';\nimport { isURL } from '@wordpress/url';\n\n/**\n * Internal dependencies\n */\nimport { filePasteHandler } from './file-paste-handler';\nimport { addActiveFormats, isShortcode } from './utils';\nimport { splitValue } from './split-value';\nimport { shouldDismissPastedFiles } from '../../utils/pasting';\n\n/** @typedef {import('@wordpress/rich-text').RichTextValue} RichTextValue */\n\n/**\n * Replaces line separators with line breaks if not multiline.\n * Replaces line breaks with line separators if multiline.\n *\n * @param {RichTextValue} value       Value to adjust.\n * @param {boolean}       isMultiline Whether to adjust to multiline or not.\n *\n * @return {RichTextValue} Adjusted value.\n */\nfunction adjustLines( value, isMultiline ) {\n\tif ( isMultiline ) {\n\t\treturn replace( value, /\\n+/g, LINE_SEPARATOR );\n\t}\n\n\treturn replace( value, new RegExp( LINE_SEPARATOR, 'g' ), '\\n' );\n}\n\nexport function usePasteHandler( props ) {\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction _onPaste( event ) {\n\t\t\tconst {\n\t\t\t\tisSelected,\n\t\t\t\tdisableFormats,\n\t\t\t\tonChange,\n\t\t\t\tvalue,\n\t\t\t\tformatTypes,\n\t\t\t\ttagName,\n\t\t\t\tonReplace,\n\t\t\t\tonSplit,\n\t\t\t\tonSplitMiddle,\n\t\t\t\t__unstableEmbedURLOnPaste,\n\t\t\t\tmultilineTag,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t\tpastePlainText,\n\t\t\t} = propsRef.current;\n\n\t\t\tif ( ! isSelected ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { clipboardData } = event;\n\n\t\t\tlet plainText = '';\n\t\t\tlet html = '';\n\n\t\t\t// IE11 only supports `Text` as an argument for `getData` and will\n\t\t\t// otherwise throw an invalid argument error, so we try the standard\n\t\t\t// arguments first, then fallback to `Text` if they fail.\n\t\t\ttry {\n\t\t\t\tplainText = clipboardData.getData( 'text/plain' );\n\t\t\t\thtml = clipboardData.getData( 'text/html' );\n\t\t\t} catch ( error1 ) {\n\t\t\t\ttry {\n\t\t\t\t\thtml = clipboardData.getData( 'Text' );\n\t\t\t\t} catch ( error2 ) {\n\t\t\t\t\t// Some browsers like UC Browser paste plain text by default and\n\t\t\t\t\t// don't support clipboardData at all, so allow default\n\t\t\t\t\t// behaviour.\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove Windows-specific metadata appended within copied HTML text.\n\t\t\thtml = removeWindowsFragments( html );\n\n\t\t\t// Strip meta tag.\n\t\t\thtml = removeCharsetMetaTag( html );\n\n\t\t\tevent.preventDefault();\n\n\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\twindow.console.log( 'Received HTML:\\n\\n', html );\n\t\t\twindow.console.log( 'Received plain text:\\n\\n', plainText );\n\n\t\t\tif ( disableFormats ) {\n\t\t\t\tonChange( insert( value, plainText ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst transformed = formatTypes.reduce(\n\t\t\t\t( accumlator, { __unstablePasteRule } ) => {\n\t\t\t\t\t// Only allow one transform.\n\t\t\t\t\tif ( __unstablePasteRule && accumlator === value ) {\n\t\t\t\t\t\taccumlator = __unstablePasteRule( value, {\n\t\t\t\t\t\t\thtml,\n\t\t\t\t\t\t\tplainText,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn accumlator;\n\t\t\t\t},\n\t\t\t\tvalue\n\t\t\t);\n\n\t\t\tif ( transformed !== value ) {\n\t\t\t\tonChange( transformed );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst files = [ ...getFilesFromDataTransfer( clipboardData ) ];\n\t\t\tconst isInternal = clipboardData.getData( 'rich-text' ) === 'true';\n\n\t\t\t// If the data comes from a rich text instance, we can directly use it\n\t\t\t// without filtering the data. The filters are only meant for externally\n\t\t\t// pasted content and remove inline styles.\n\t\t\tif ( isInternal ) {\n\t\t\t\tconst pastedMultilineTag =\n\t\t\t\t\tclipboardData.getData( 'rich-text-multi-line-tag' ) ||\n\t\t\t\t\tundefined;\n\t\t\t\tlet pastedValue = create( {\n\t\t\t\t\thtml,\n\t\t\t\t\tmultilineTag: pastedMultilineTag,\n\t\t\t\t\tmultilineWrapperTags:\n\t\t\t\t\t\tpastedMultilineTag === 'li'\n\t\t\t\t\t\t\t? [ 'ul', 'ol' ]\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\t\t\t\tpastedValue = adjustLines( pastedValue, !! multilineTag );\n\t\t\t\taddActiveFormats( pastedValue, value.activeFormats );\n\t\t\t\tonChange( insert( value, pastedValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( pastePlainText ) {\n\t\t\t\tonChange( insert( value, create( { text: plainText } ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Process any attached files, unless we infer that the files in\n\t\t\t// question are redundant \"screenshots\" of the actual HTML payload,\n\t\t\t// as created by certain office-type programs.\n\t\t\t//\n\t\t\t// @see shouldDismissPastedFiles\n\t\t\tif (\n\t\t\t\tfiles?.length &&\n\t\t\t\t! shouldDismissPastedFiles( files, html, plainText )\n\t\t\t) {\n\t\t\t\tconst content = pasteHandler( {\n\t\t\t\t\tHTML: filePasteHandler( files ),\n\t\t\t\t\tmode: 'BLOCKS',\n\t\t\t\t\ttagName,\n\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t} );\n\n\t\t\t\t// Allows us to ask for this information when we get a report.\n\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\twindow.console.log( 'Received items:\\n\\n', files );\n\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tpastedBlocks: content,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet mode = onReplace && onSplit ? 'AUTO' : 'INLINE';\n\n\t\t\t// Force the blocks mode when the user is pasting\n\t\t\t// on a new line & the content resembles a shortcode.\n\t\t\t// Otherwise it's going to be detected as inline\n\t\t\t// and the shortcode won't be replaced.\n\t\t\tif (\n\t\t\t\tmode === 'AUTO' &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisShortcode( plainText )\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t__unstableEmbedURLOnPaste &&\n\t\t\t\tisEmpty( value ) &&\n\t\t\t\tisURL( plainText.trim() )\n\t\t\t) {\n\t\t\t\tmode = 'BLOCKS';\n\t\t\t}\n\n\t\t\tconst content = pasteHandler( {\n\t\t\t\tHTML: html,\n\t\t\t\tplainText,\n\t\t\t\tmode,\n\t\t\t\ttagName,\n\t\t\t\tpreserveWhiteSpace,\n\t\t\t} );\n\n\t\t\tif ( typeof content === 'string' ) {\n\t\t\t\tlet valueToInsert = create( { html: content } );\n\n\t\t\t\t// If the content should be multiline, we should process text\n\t\t\t\t// separated by a line break as separate lines.\n\t\t\t\tvalueToInsert = adjustLines( valueToInsert, !! multilineTag );\n\n\t\t\t\taddActiveFormats( valueToInsert, value.activeFormats );\n\t\t\t\tonChange( insert( value, valueToInsert ) );\n\t\t\t} else if ( content.length > 0 ) {\n\t\t\t\tif ( onReplace && isEmpty( value ) ) {\n\t\t\t\t\tonReplace( content, content.length - 1, -1 );\n\t\t\t\t} else {\n\t\t\t\t\tsplitValue( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tpastedBlocks: content,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'paste', _onPaste );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'paste', _onPaste );\n\t\t};\n\t}, [] );\n}\n\n/**\n * Normalizes a given string of HTML to remove the Windows-specific \"Fragment\"\n * comments and any preceeding and trailing content.\n *\n * @param {string} html the html to be normalized\n * @return {string} the normalized html\n */\nfunction removeWindowsFragments( html ) {\n\tconst startStr = '<!--StartFragment-->';\n\tconst startIdx = html.indexOf( startStr );\n\tif ( startIdx > -1 ) {\n\t\thtml = html.substring( startIdx + startStr.length );\n\t} else {\n\t\t// No point looking for EndFragment\n\t\treturn html;\n\t}\n\n\tconst endStr = '<!--EndFragment-->';\n\tconst endIdx = html.indexOf( endStr );\n\tif ( endIdx > -1 ) {\n\t\thtml = html.substring( 0, endIdx );\n\t}\n\n\treturn html;\n}\n\n/**\n * Removes the charset meta tag inserted by Chromium.\n * See:\n * - https://github.com/WordPress/gutenberg/issues/33585\n * - https://bugs.chromium.org/p/chromium/issues/detail?id=1264616#c4\n *\n * @param {string} html the html to be stripped of the meta tag.\n * @return {string} the cleaned html\n */\nfunction removeCharsetMetaTag( html ) {\n\tconst metaTag = `<meta charset='utf-8'>`;\n\n\tif ( html.startsWith( metaTag ) ) {\n\t\treturn html.slice( metaTag.length );\n\t}\n\n\treturn html;\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\nimport { insert, isCollapsed } from '@wordpress/rich-text';\nimport { useDispatch } from '@wordpress/data';\nimport { applyFilters } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * When typing over a selection, the selection will we wrapped by a matching\n * character pair. The second character is optional, it defaults to the first\n * character.\n *\n * @type {string[]} Array of character pairs.\n */\nconst wrapSelectionSettings = [ '`', '\"', \"'\", '“”', '‘’' ];\n\nexport function useBeforeInputRules( props ) {\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\t__unstableMarkAutomaticChange,\n\t} = useDispatch( blockEditorStore );\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onInput( event ) {\n\t\t\tconst { inputType, data } = event;\n\t\t\tconst { value, onChange } = propsRef.current;\n\n\t\t\t// Only run the rules when inserting text.\n\t\t\tif ( inputType !== 'insertText' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isCollapsed( value ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst pair = applyFilters(\n\t\t\t\t'blockEditor.wrapSelectionSettings',\n\t\t\t\twrapSelectionSettings\n\t\t\t).find(\n\t\t\t\t( [ startChar, endChar ] ) =>\n\t\t\t\t\tstartChar === data || endChar === data\n\t\t\t);\n\n\t\t\tif ( ! pair ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst [ startChar, endChar = startChar ] = pair;\n\t\t\tconst start = value.start;\n\t\t\tconst end = value.end + startChar.length;\n\n\t\t\tlet newValue = insert( value, startChar, start, start );\n\t\t\tnewValue = insert( newValue, endChar, end, end );\n\n\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\tonChange( newValue );\n\t\t\t__unstableMarkAutomaticChange();\n\n\t\t\tconst init = {};\n\n\t\t\tfor ( const key in event ) {\n\t\t\t\tinit[ key ] = event[ key ];\n\t\t\t}\n\n\t\t\tinit.data = endChar;\n\n\t\t\tconst { ownerDocument } = element;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tconst newEvent = new defaultView.InputEvent( 'input', init );\n\n\t\t\t// Dispatch an input event with the new data. This will trigger the\n\t\t\t// input rules.\n\t\t\tevent.target.dispatchEvent( newEvent );\n\t\t\tevent.preventDefault();\n\t\t}\n\n\t\telement.addEventListener( 'beforeinput', onInput );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'beforeinput', onInput );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\nimport { insert, toHTMLString } from '@wordpress/rich-text';\nimport { getBlockTransforms, findTransform } from '@wordpress/blocks';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { preventEventDiscovery } from './prevent-event-discovery';\nimport {\n\tretrieveSelectedAttribute,\n\tSTART_OF_SELECTED_AREA,\n} from '../../utils/selection';\n\nfunction findSelection( blocks ) {\n\tlet i = blocks.length;\n\n\twhile ( i-- ) {\n\t\tconst attributeKey = retrieveSelectedAttribute(\n\t\t\tblocks[ i ].attributes\n\t\t);\n\n\t\tif ( attributeKey ) {\n\t\t\tblocks[ i ].attributes[ attributeKey ] = blocks[ i ].attributes[\n\t\t\t\tattributeKey\n\t\t\t].replace( START_OF_SELECTED_AREA, '' );\n\t\t\treturn blocks[ i ].clientId;\n\t\t}\n\n\t\tconst nestedSelection = findSelection( blocks[ i ].innerBlocks );\n\n\t\tif ( nestedSelection ) {\n\t\t\treturn nestedSelection;\n\t\t}\n\t}\n}\n\nexport function useInputRules( props ) {\n\tconst {\n\t\t__unstableMarkLastChangeAsPersistent,\n\t\t__unstableMarkAutomaticChange,\n\t} = useDispatch( blockEditorStore );\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction inputRule() {\n\t\t\tconst { value, onReplace, selectionChange } = propsRef.current;\n\n\t\t\tif ( ! onReplace ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { start, text } = value;\n\t\t\tconst characterBefore = text.slice( start - 1, start );\n\n\t\t\t// The character right before the caret must be a plain space.\n\t\t\tif ( characterBefore !== ' ' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedTextBefore = text.slice( 0, start ).trim();\n\t\t\tconst prefixTransforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t( { type } ) => type === 'prefix'\n\t\t\t);\n\t\t\tconst transformation = findTransform(\n\t\t\t\tprefixTransforms,\n\t\t\t\t( { prefix } ) => {\n\t\t\t\t\treturn trimmedTextBefore === prefix;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( ! transformation ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst content = toHTMLString( {\n\t\t\t\tvalue: insert( value, START_OF_SELECTED_AREA, 0, start ),\n\t\t\t} );\n\t\t\tconst block = transformation.transform( content );\n\n\t\t\tselectionChange( findSelection( [ block ] ) );\n\t\t\tonReplace( [ block ] );\n\t\t\t__unstableMarkAutomaticChange();\n\t\t}\n\n\t\tfunction onInput( event ) {\n\t\t\tconst { inputType, type } = event;\n\t\t\tconst {\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\t__unstableAllowPrefixTransformations,\n\t\t\t\tformatTypes,\n\t\t\t} = propsRef.current;\n\n\t\t\t// Only run input rules when inserting text.\n\t\t\tif ( inputType !== 'insertText' && type !== 'compositionend' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( __unstableAllowPrefixTransformations && inputRule ) {\n\t\t\t\tinputRule();\n\t\t\t}\n\n\t\t\tconst transformed = formatTypes.reduce(\n\t\t\t\t( accumlator, { __unstableInputRule } ) => {\n\t\t\t\t\tif ( __unstableInputRule ) {\n\t\t\t\t\t\taccumlator = __unstableInputRule( accumlator );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn accumlator;\n\t\t\t\t},\n\t\t\t\tpreventEventDiscovery( value )\n\t\t\t);\n\n\t\t\tif ( transformed !== value ) {\n\t\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\t\tonChange( {\n\t\t\t\t\t...transformed,\n\t\t\t\t\tactiveFormats: value.activeFormats,\n\t\t\t\t} );\n\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'input', onInput );\n\t\telement.addEventListener( 'compositionend', onInput );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'input', onInput );\n\t\t\telement.removeEventListener( 'compositionend', onInput );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { insert } from '@wordpress/rich-text';\n\nexport function preventEventDiscovery( value ) {\n\tconst searchText = 'tales of gutenberg';\n\tconst addText =\n\t\t' 🐡🐢🦀🐤🦋🐘🐧🐹🦁🦄🦍🐼🐿🎃🐴🐝🐆🦕🦔🌱🍇π🍌🐉💧🥨🌌🍂🍠🥦🥚🥝🎟🥥🥒🛵🥖🍒🍯🎾🎲🐺🐚🐮⌛️';\n\tconst { start, text } = value;\n\n\tif ( start < searchText.length ) {\n\t\treturn value;\n\t}\n\n\tconst charactersBefore = text.slice( start - searchText.length, start );\n\n\tif ( charactersBefore.toLowerCase() !== searchText ) {\n\t\treturn value;\n\t}\n\n\treturn insert( value, addText );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\nimport { useRefEffect } from '@wordpress/compose';\nimport { ENTER } from '@wordpress/keycodes';\nimport {\n\tinsert,\n\t__unstableIsEmptyLine as isEmptyLine,\n\t__unstableInsertLineSeparator as insertLineSeparator,\n} from '@wordpress/rich-text';\nimport { getBlockTransforms, findTransform } from '@wordpress/blocks';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { splitValue } from './split-value';\n\nexport function useEnter( props ) {\n\tconst { __unstableMarkAutomaticChange } = useDispatch( blockEditorStore );\n\tconst propsRef = useRef( props );\n\tpropsRef.current = props;\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tremoveEditorOnlyFormats,\n\t\t\t\tvalue,\n\t\t\t\tonReplace,\n\t\t\t\tonSplit,\n\t\t\t\tonSplitMiddle,\n\t\t\t\tmultilineTag,\n\t\t\t\tonChange,\n\t\t\t\tdisableLineBreaks,\n\t\t\t\tonSplitAtEnd,\n\t\t\t} = propsRef.current;\n\n\t\t\tif ( event.keyCode !== ENTER ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\n\t\t\tconst _value = { ...value };\n\t\t\t_value.formats = removeEditorOnlyFormats( value );\n\t\t\tconst canSplit = onReplace && onSplit;\n\n\t\t\tif ( onReplace ) {\n\t\t\t\tconst transforms = getBlockTransforms( 'from' ).filter(\n\t\t\t\t\t( { type } ) => type === 'enter'\n\t\t\t\t);\n\t\t\t\tconst transformation = findTransform( transforms, ( item ) => {\n\t\t\t\t\treturn item.regExp.test( _value.text );\n\t\t\t\t} );\n\n\t\t\t\tif ( transformation ) {\n\t\t\t\t\tonReplace( [\n\t\t\t\t\t\ttransformation.transform( {\n\t\t\t\t\t\t\tcontent: _value.text,\n\t\t\t\t\t\t} ),\n\t\t\t\t\t] );\n\t\t\t\t\t__unstableMarkAutomaticChange();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( multilineTag ) {\n\t\t\t\tif ( event.shiftKey ) {\n\t\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\t\tonChange( insert( _value, '\\n' ) );\n\t\t\t\t\t}\n\t\t\t\t} else if ( canSplit && isEmptyLine( _value ) ) {\n\t\t\t\t\tsplitValue( {\n\t\t\t\t\t\tvalue: _value,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tonChange( insertLineSeparator( _value ) );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst { text, start, end } = _value;\n\t\t\t\tconst canSplitAtEnd =\n\t\t\t\t\tonSplitAtEnd && start === end && end === text.length;\n\n\t\t\t\tif ( event.shiftKey || ( ! canSplit && ! canSplitAtEnd ) ) {\n\t\t\t\t\tif ( ! disableLineBreaks ) {\n\t\t\t\t\t\tonChange( insert( _value, '\\n' ) );\n\t\t\t\t\t}\n\t\t\t\t} else if ( ! canSplit && canSplitAtEnd ) {\n\t\t\t\t\tonSplitAtEnd();\n\t\t\t\t} else if ( canSplit ) {\n\t\t\t\t\tsplitValue( {\n\t\t\t\t\t\tvalue: _value,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as richTextStore } from '@wordpress/rich-text';\n\nfunction formatTypesSelector( select ) {\n\treturn select( richTextStore ).getFormatTypes();\n}\n\n/**\n * Set of all interactive content tags.\n *\n * @see https://html.spec.whatwg.org/multipage/dom.html#interactive-content\n */\nconst interactiveContentTags = new Set( [\n\t'a',\n\t'audio',\n\t'button',\n\t'details',\n\t'embed',\n\t'iframe',\n\t'input',\n\t'label',\n\t'select',\n\t'textarea',\n\t'video',\n] );\n\nfunction prefixSelectKeys( selected, prefix ) {\n\tif ( typeof selected !== 'object' ) return { [ prefix ]: selected };\n\treturn Object.fromEntries(\n\t\tObject.entries( selected ).map( ( [ key, value ] ) => [\n\t\t\t`${ prefix }.${ key }`,\n\t\t\tvalue,\n\t\t] )\n\t);\n}\n\nfunction getPrefixedSelectKeys( selected, prefix ) {\n\tif ( selected[ prefix ] ) return selected[ prefix ];\n\treturn Object.keys( selected )\n\t\t.filter( ( key ) => key.startsWith( prefix + '.' ) )\n\t\t.reduce( ( accumulator, key ) => {\n\t\t\taccumulator[ key.slice( prefix.length + 1 ) ] = selected[ key ];\n\t\t\treturn accumulator;\n\t\t}, {} );\n}\n\n/**\n * This hook provides RichText with the `formatTypes` and its derived props from\n * experimental format type settings.\n *\n * @param {Object}  $0                              Options\n * @param {string}  $0.clientId                     Block client ID.\n * @param {string}  $0.identifier                   Block attribute.\n * @param {boolean} $0.withoutInteractiveFormatting Whether to clean the interactive formattings or not.\n * @param {Array}   $0.allowedFormats               Allowed formats\n */\nexport function useFormatTypes( {\n\tclientId,\n\tidentifier,\n\twithoutInteractiveFormatting,\n\tallowedFormats,\n} ) {\n\tconst allFormatTypes = useSelect( formatTypesSelector, [] );\n\tconst formatTypes = useMemo( () => {\n\t\treturn allFormatTypes.filter( ( { name, tagName } ) => {\n\t\t\tif ( allowedFormats && ! allowedFormats.includes( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\twithoutInteractiveFormatting &&\n\t\t\t\tinteractiveContentTags.has( tagName )\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} );\n\t}, [ allFormatTypes, allowedFormats, interactiveContentTags ] );\n\tconst keyedSelected = useSelect(\n\t\t( select ) =>\n\t\t\tformatTypes.reduce( ( accumulator, type ) => {\n\t\t\t\tif ( ! type.__experimentalGetPropsForEditableTreePreparation ) {\n\t\t\t\t\treturn accumulator;\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\t...accumulator,\n\t\t\t\t\t...prefixSelectKeys(\n\t\t\t\t\t\ttype.__experimentalGetPropsForEditableTreePreparation(\n\t\t\t\t\t\t\tselect,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttype.name\n\t\t\t\t\t),\n\t\t\t\t};\n\t\t\t}, {} ),\n\t\t[ formatTypes, clientId, identifier ]\n\t);\n\tconst dispatch = useDispatch();\n\tconst prepareHandlers = [];\n\tconst valueHandlers = [];\n\tconst changeHandlers = [];\n\tconst dependencies = [];\n\n\tfor ( const key in keyedSelected ) {\n\t\tdependencies.push( keyedSelected[ key ] );\n\t}\n\n\tformatTypes.forEach( ( type ) => {\n\t\tif ( type.__experimentalCreatePrepareEditableTree ) {\n\t\t\tconst handler = type.__experimentalCreatePrepareEditableTree(\n\t\t\t\tgetPrefixedSelectKeys( keyedSelected, type.name ),\n\t\t\t\t{\n\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\t\tvalueHandlers.push( handler );\n\t\t\t} else {\n\t\t\t\tprepareHandlers.push( handler );\n\t\t\t}\n\t\t}\n\n\t\tif ( type.__experimentalCreateOnChangeEditableValue ) {\n\t\t\tlet dispatchers = {};\n\n\t\t\tif ( type.__experimentalGetPropsForEditableTreeChangeHandler ) {\n\t\t\t\tdispatchers =\n\t\t\t\t\ttype.__experimentalGetPropsForEditableTreeChangeHandler(\n\t\t\t\t\t\tdispatch,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst selected = getPrefixedSelectKeys( keyedSelected, type.name );\n\t\t\tchangeHandlers.push(\n\t\t\t\ttype.__experimentalCreateOnChangeEditableValue(\n\t\t\t\t\t{\n\t\t\t\t\t\t...( typeof selected === 'object' ? selected : {} ),\n\t\t\t\t\t\t...dispatchers,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trichTextIdentifier: identifier,\n\t\t\t\t\t\tblockClientId: clientId,\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t} );\n\n\treturn {\n\t\tformatTypes,\n\t\tprepareHandlers,\n\t\tvalueHandlers,\n\t\tchangeHandlers,\n\t\tdependencies,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\nexport function useShortcuts( keyboardShortcuts ) {\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onKeyDown( event ) {\n\t\t\tfor ( const keyboardShortcut of keyboardShortcuts.current ) {\n\t\t\t\tkeyboardShortcut( event );\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'keydown', onKeyDown );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'keydown', onKeyDown );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\n\nexport function useInputEvents( inputEvents ) {\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onInput( event ) {\n\t\t\tfor ( const keyboardShortcut of inputEvents.current ) {\n\t\t\t\tkeyboardShortcut( event );\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'input', onInput );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'input', onInput );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport function useFirefoxCompat() {\n\tconst { isMultiSelecting } = useSelect( blockEditorStore );\n\treturn useRefEffect( ( element ) => {\n\t\tfunction onFocus() {\n\t\t\tif ( ! isMultiSelecting() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// This is a little hack to work around focus issues with nested\n\t\t\t// editable elements in Firefox. For some reason the editable child\n\t\t\t// element sometimes regains focus, while it should not be focusable\n\t\t\t// and focus should remain on the editable parent element.\n\t\t\t// To do: try to find the cause of the shifting focus.\n\t\t\tconst parentEditable = element.parentElement.closest(\n\t\t\t\t'[contenteditable=\"true\"]'\n\t\t\t);\n\n\t\t\tif ( parentEditable ) {\n\t\t\t\tparentEditable.focus();\n\t\t\t}\n\t\t}\n\n\t\telement.addEventListener( 'focus', onFocus );\n\t\treturn () => {\n\t\t\telement.removeEventListener( 'focus', onFocus );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tgetActiveFormat,\n\tgetActiveObject,\n\tisCollapsed,\n} from '@wordpress/rich-text';\n/**\n * External dependencies\n */\nimport { find } from 'lodash';\n\nexport default function FormatEdit( {\n\tformatTypes,\n\tonChange,\n\tonFocus,\n\tvalue,\n\tforwardedRef,\n} ) {\n\treturn formatTypes.map( ( settings ) => {\n\t\tconst { name, edit: Edit } = settings;\n\n\t\tif ( ! Edit ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst activeFormat = getActiveFormat( value, name );\n\t\tlet isActive = activeFormat !== undefined;\n\t\tconst activeObject = getActiveObject( value );\n\t\tconst isObjectActive =\n\t\t\tactiveObject !== undefined && activeObject.type === name;\n\n\t\t// Edge case: un-collapsed link formats.\n\t\t// If there is a missing link format at either end of the selection\n\t\t// then we shouldn't show the Edit UI because the selection has exceeded\n\t\t// the bounds of the link format.\n\t\t// Also if the format objects don't match then we're dealing with two separate\n\t\t// links so we should not allow the link to be modified over the top.\n\t\tif ( name === 'core/link' && ! isCollapsed( value ) ) {\n\t\t\tconst formats = value.formats;\n\n\t\t\tconst linkFormatAtStart = find( formats[ value.start ], {\n\t\t\t\ttype: 'core/link',\n\t\t\t} );\n\n\t\t\tconst linkFormatAtEnd = find( formats[ value.end - 1 ], {\n\t\t\t\ttype: 'core/link',\n\t\t\t} );\n\n\t\t\tif (\n\t\t\t\t! linkFormatAtStart ||\n\t\t\t\t! linkFormatAtEnd ||\n\t\t\t\tlinkFormatAtStart !== linkFormatAtEnd\n\t\t\t) {\n\t\t\t\tisActive = false;\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t<Edit\n\t\t\t\tkey={ name }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tactiveAttributes={\n\t\t\t\t\tisActive ? activeFormat.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tisObjectActive={ isObjectActive }\n\t\t\t\tactiveObjectAttributes={\n\t\t\t\t\tisObjectActive ? activeObject.attributes || {} : {}\n\t\t\t\t}\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChange }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tcontentRef={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t} );\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tRawHTML,\n\tuseRef,\n\tuseCallback,\n\tforwardRef,\n\tcreateContext,\n} from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { children as childrenSource } from '@wordpress/blocks';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport {\n\t__unstableUseRichText as useRichText,\n\t__unstableCreateElement,\n\tisEmpty,\n\tisCollapsed,\n\tremoveFormat,\n} from '@wordpress/rich-text';\nimport deprecated from '@wordpress/deprecated';\nimport { BACKSPACE, DELETE } from '@wordpress/keycodes';\nimport { Popover } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditorAutocompleteProps } from '../autocomplete';\nimport { useBlockEditContext } from '../block-edit';\nimport FormatToolbarContainer from './format-toolbar-container';\nimport { store as blockEditorStore } from '../../store';\nimport { useUndoAutomaticChange } from './use-undo-automatic-change';\nimport { useMarkPersistent } from './use-mark-persistent';\nimport { usePasteHandler } from './use-paste-handler';\nimport { useBeforeInputRules } from './use-before-input-rules';\nimport { useInputRules } from './use-input-rules';\nimport { useEnter } from './use-enter';\nimport { useFormatTypes } from './use-format-types';\nimport { useRemoveBrowserShortcuts } from './use-remove-browser-shortcuts';\nimport { useShortcuts } from './use-shortcuts';\nimport { useInputEvents } from './use-input-events';\nimport { useFirefoxCompat } from './use-firefox-compat';\nimport FormatEdit from './format-edit';\nimport { getMultilineTag, getAllowedFormats } from './utils';\n\nexport const keyboardShortcutContext = createContext();\nexport const inputEventContext = createContext();\n\n/**\n * Removes props used for the native version of RichText so that they are not\n * passed to the DOM element and log warnings.\n *\n * @param {Object} props Props to filter.\n *\n * @return {Object} Filtered props.\n */\nfunction removeNativeProps( props ) {\n\tconst {\n\t\t__unstableMobileNoFocusOnMount,\n\t\tdeleteEnter,\n\t\tplaceholderTextColor,\n\t\ttextAlign,\n\t\tselectionColor,\n\t\ttagsToEliminate,\n\t\trootTagsToEliminate,\n\t\tdisableEditingMenu,\n\t\tfontSize,\n\t\tfontFamily,\n\t\tfontWeight,\n\t\tfontStyle,\n\t\tminWidth,\n\t\tmaxWidth,\n\t\tsetRef,\n\t\tdisableSuggestions,\n\t\tdisableAutocorrection,\n\t\t...restProps\n\t} = props;\n\treturn restProps;\n}\n\nfunction RichTextWrapper(\n\t{\n\t\tchildren,\n\t\ttagName = 'div',\n\t\tvalue: originalValue = '',\n\t\tonChange: originalOnChange,\n\t\tisSelected: originalIsSelected,\n\t\tmultiline,\n\t\tinlineToolbar,\n\t\twrapperClassName,\n\t\tautocompleters,\n\t\tonReplace,\n\t\tplaceholder,\n\t\tallowedFormats,\n\t\tformattingControls,\n\t\twithoutInteractiveFormatting,\n\t\tonRemove,\n\t\tonMerge,\n\t\tonSplit,\n\t\t__unstableOnSplitAtEnd: onSplitAtEnd,\n\t\t__unstableOnSplitMiddle: onSplitMiddle,\n\t\tidentifier,\n\t\tpreserveWhiteSpace,\n\t\t__unstablePastePlainText: pastePlainText,\n\t\t__unstableEmbedURLOnPaste,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tdisableLineBreaks,\n\t\tunstableOnFocus,\n\t\t__unstableAllowPrefixTransformations,\n\t\t...props\n\t},\n\tforwardedRef\n) {\n\tif ( multiline ) {\n\t\tdeprecated( 'wp.blockEditor.RichText multiline prop', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: 'nested blocks (InnerBlocks)',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/',\n\t\t} );\n\t}\n\n\tconst instanceId = useInstanceId( RichTextWrapper );\n\n\tidentifier = identifier || instanceId;\n\tprops = removeNativeProps( props );\n\n\tconst anchorRef = useRef();\n\tconst { clientId } = useBlockEditContext();\n\tconst selector = ( select ) => {\n\t\tconst { getSelectionStart, getSelectionEnd } =\n\t\t\tselect( blockEditorStore );\n\t\tconst selectionStart = getSelectionStart();\n\t\tconst selectionEnd = getSelectionEnd();\n\n\t\tlet isSelected;\n\n\t\tif ( originalIsSelected === undefined ) {\n\t\t\tisSelected =\n\t\t\t\tselectionStart.clientId === clientId &&\n\t\t\t\tselectionEnd.clientId === clientId &&\n\t\t\t\tselectionStart.attributeKey === identifier;\n\t\t} else if ( originalIsSelected ) {\n\t\t\tisSelected = selectionStart.clientId === clientId;\n\t\t}\n\n\t\treturn {\n\t\t\tselectionStart: isSelected ? selectionStart.offset : undefined,\n\t\t\tselectionEnd: isSelected ? selectionEnd.offset : undefined,\n\t\t\tisSelected,\n\t\t};\n\t};\n\t// This selector must run on every render so the right selection state is\n\t// retreived from the store on merge.\n\t// To do: fix this somehow.\n\tconst { selectionStart, selectionEnd, isSelected } = useSelect( selector );\n\tconst { getSelectionStart, getSelectionEnd, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst { selectionChange } = useDispatch( blockEditorStore );\n\tconst multilineTag = getMultilineTag( multiline );\n\tconst adjustedAllowedFormats = getAllowedFormats( {\n\t\tallowedFormats,\n\t\tformattingControls,\n\t\tdisableFormats,\n\t} );\n\tconst hasFormats =\n\t\t! adjustedAllowedFormats || adjustedAllowedFormats.length > 0;\n\tlet adjustedValue = originalValue;\n\tlet adjustedOnChange = originalOnChange;\n\n\t// Handle deprecated format.\n\tif ( Array.isArray( originalValue ) ) {\n\t\tdeprecated( 'wp.blockEditor.RichText value prop as children type', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: 'value prop as string',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/',\n\t\t} );\n\n\t\tadjustedValue = childrenSource.toHTML( originalValue );\n\t\tadjustedOnChange = ( newValue ) =>\n\t\t\toriginalOnChange(\n\t\t\t\tchildrenSource.fromDOM(\n\t\t\t\t\t__unstableCreateElement( document, newValue ).childNodes\n\t\t\t\t)\n\t\t\t);\n\t}\n\n\tconst onSelectionChange = useCallback(\n\t\t( start, end ) => {\n\t\t\tconst selection = {};\n\t\t\tconst unset = start === undefined && end === undefined;\n\n\t\t\tif ( typeof start === 'number' || unset ) {\n\t\t\t\t// If we are only setting the start (or the end below), which\n\t\t\t\t// means a partial selection, and we're not updating a selection\n\t\t\t\t// with the same client ID, abort. This means the selected block\n\t\t\t\t// is a parent block.\n\t\t\t\tif (\n\t\t\t\t\tend === undefined &&\n\t\t\t\t\tgetBlockRootClientId( clientId ) !==\n\t\t\t\t\t\tgetBlockRootClientId( getSelectionEnd().clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselection.start = {\n\t\t\t\t\tclientId,\n\t\t\t\t\tattributeKey: identifier,\n\t\t\t\t\toffset: start,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif ( typeof end === 'number' || unset ) {\n\t\t\t\tif (\n\t\t\t\t\tstart === undefined &&\n\t\t\t\t\tgetBlockRootClientId( clientId ) !==\n\t\t\t\t\t\tgetBlockRootClientId( getSelectionStart().clientId )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tselection.end = {\n\t\t\t\t\tclientId,\n\t\t\t\t\tattributeKey: identifier,\n\t\t\t\t\toffset: end,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tselectionChange( selection );\n\t\t},\n\t\t[ clientId, identifier ]\n\t);\n\n\tconst {\n\t\tformatTypes,\n\t\tprepareHandlers,\n\t\tvalueHandlers,\n\t\tchangeHandlers,\n\t\tdependencies,\n\t} = useFormatTypes( {\n\t\tclientId,\n\t\tidentifier,\n\t\twithoutInteractiveFormatting,\n\t\tallowedFormats: adjustedAllowedFormats,\n\t} );\n\n\tfunction addEditorOnlyFormats( value ) {\n\t\treturn valueHandlers.reduce(\n\t\t\t( accumulator, fn ) => fn( accumulator, value.text ),\n\t\t\tvalue.formats\n\t\t);\n\t}\n\n\tfunction removeEditorOnlyFormats( value ) {\n\t\tformatTypes.forEach( ( formatType ) => {\n\t\t\t// Remove formats created by prepareEditableTree, because they are editor only.\n\t\t\tif ( formatType.__experimentalCreatePrepareEditableTree ) {\n\t\t\t\tvalue = removeFormat(\n\t\t\t\t\tvalue,\n\t\t\t\t\tformatType.name,\n\t\t\t\t\t0,\n\t\t\t\t\tvalue.text.length\n\t\t\t\t);\n\t\t\t}\n\t\t} );\n\n\t\treturn value.formats;\n\t}\n\n\tfunction addInvisibleFormats( value ) {\n\t\treturn prepareHandlers.reduce(\n\t\t\t( accumulator, fn ) => fn( accumulator, value.text ),\n\t\t\tvalue.formats\n\t\t);\n\t}\n\n\tconst {\n\t\tvalue,\n\t\tonChange,\n\t\tref: richTextRef,\n\t} = useRichText( {\n\t\tvalue: adjustedValue,\n\t\tonChange( html, { __unstableFormats, __unstableText } ) {\n\t\t\tadjustedOnChange( html );\n\t\t\tObject.values( changeHandlers ).forEach( ( changeHandler ) => {\n\t\t\t\tchangeHandler( __unstableFormats, __unstableText );\n\t\t\t} );\n\t\t},\n\t\tselectionStart,\n\t\tselectionEnd,\n\t\tonSelectionChange,\n\t\tplaceholder,\n\t\t__unstableIsSelected: isSelected,\n\t\t__unstableMultilineTag: multilineTag,\n\t\t__unstableDisableFormats: disableFormats,\n\t\tpreserveWhiteSpace,\n\t\t__unstableDependencies: [ ...dependencies, tagName ],\n\t\t__unstableAfterParse: addEditorOnlyFormats,\n\t\t__unstableBeforeSerialize: removeEditorOnlyFormats,\n\t\t__unstableAddInvisibleFormats: addInvisibleFormats,\n\t} );\n\tconst autocompleteProps = useBlockEditorAutocompleteProps( {\n\t\tonReplace,\n\t\tcompleters: autocompleters,\n\t\trecord: value,\n\t\tonChange,\n\t} );\n\n\tuseMarkPersistent( { html: adjustedValue, value } );\n\n\tconst keyboardShortcuts = useRef( new Set() );\n\tconst inputEvents = useRef( new Set() );\n\n\tfunction onKeyDown( event ) {\n\t\tconst { keyCode } = event;\n\n\t\tif ( event.defaultPrevented ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( keyCode === DELETE || keyCode === BACKSPACE ) {\n\t\t\tconst { start, end, text } = value;\n\t\t\tconst isReverse = keyCode === BACKSPACE;\n\t\t\tconst hasActiveFormats =\n\t\t\t\tvalue.activeFormats && !! value.activeFormats.length;\n\n\t\t\t// Only process delete if the key press occurs at an uncollapsed edge.\n\t\t\tif (\n\t\t\t\t! isCollapsed( value ) ||\n\t\t\t\thasActiveFormats ||\n\t\t\t\t( isReverse && start !== 0 ) ||\n\t\t\t\t( ! isReverse && end !== text.length )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( onMerge ) {\n\t\t\t\tonMerge( ! isReverse );\n\t\t\t}\n\n\t\t\t// Only handle remove on Backspace. This serves dual-purpose of being\n\t\t\t// an intentional user interaction distinguishing between Backspace and\n\t\t\t// Delete to remove the empty field, but also to avoid merge & remove\n\t\t\t// causing destruction of two fields (merge, then removed merged).\n\t\t\tif ( onRemove && isEmpty( value ) && isReverse ) {\n\t\t\t\tonRemove( ! isReverse );\n\t\t\t}\n\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tfunction onFocus() {\n\t\tanchorRef.current?.focus();\n\t}\n\n\tconst TagName = tagName;\n\treturn (\n\t\t<>\n\t\t\t{ isSelected && (\n\t\t\t\t<keyboardShortcutContext.Provider value={ keyboardShortcuts }>\n\t\t\t\t\t<inputEventContext.Provider value={ inputEvents }>\n\t\t\t\t\t\t<Popover.__unstableSlotNameProvider value=\"__unstable-block-tools-after\">\n\t\t\t\t\t\t\t{ children &&\n\t\t\t\t\t\t\t\tchildren( { value, onChange, onFocus } ) }\n\t\t\t\t\t\t\t<FormatEdit\n\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t\tonFocus={ onFocus }\n\t\t\t\t\t\t\t\tformatTypes={ formatTypes }\n\t\t\t\t\t\t\t\tforwardedRef={ anchorRef }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover.__unstableSlotNameProvider>\n\t\t\t\t\t</inputEventContext.Provider>\n\t\t\t\t</keyboardShortcutContext.Provider>\n\t\t\t) }\n\t\t\t{ isSelected && hasFormats && (\n\t\t\t\t<FormatToolbarContainer\n\t\t\t\t\tinline={ inlineToolbar }\n\t\t\t\t\teditableContentElement={ anchorRef.current }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<TagName\n\t\t\t\t// Overridable props.\n\t\t\t\trole=\"textbox\"\n\t\t\t\taria-multiline={ ! disableLineBreaks }\n\t\t\t\taria-label={ placeholder }\n\t\t\t\t{ ...props }\n\t\t\t\t{ ...autocompleteProps }\n\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\tforwardedRef,\n\t\t\t\t\tautocompleteProps.ref,\n\t\t\t\t\tprops.ref,\n\t\t\t\t\trichTextRef,\n\t\t\t\t\tuseBeforeInputRules( { value, onChange } ),\n\t\t\t\t\tuseInputRules( {\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tonChange,\n\t\t\t\t\t\t__unstableAllowPrefixTransformations,\n\t\t\t\t\t\tformatTypes,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tselectionChange,\n\t\t\t\t\t} ),\n\t\t\t\t\tuseRemoveBrowserShortcuts(),\n\t\t\t\t\tuseShortcuts( keyboardShortcuts ),\n\t\t\t\t\tuseInputEvents( inputEvents ),\n\t\t\t\t\tuseUndoAutomaticChange(),\n\t\t\t\t\tusePasteHandler( {\n\t\t\t\t\t\tisSelected,\n\t\t\t\t\t\tdisableFormats,\n\t\t\t\t\t\tonChange,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tformatTypes,\n\t\t\t\t\t\ttagName,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\t__unstableEmbedURLOnPaste,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t\tpreserveWhiteSpace,\n\t\t\t\t\t\tpastePlainText,\n\t\t\t\t\t} ),\n\t\t\t\t\tuseEnter( {\n\t\t\t\t\t\tremoveEditorOnlyFormats,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\tonReplace,\n\t\t\t\t\t\tonSplit,\n\t\t\t\t\t\tonSplitMiddle,\n\t\t\t\t\t\tmultilineTag,\n\t\t\t\t\t\tonChange,\n\t\t\t\t\t\tdisableLineBreaks,\n\t\t\t\t\t\tonSplitAtEnd,\n\t\t\t\t\t} ),\n\t\t\t\t\tuseFirefoxCompat(),\n\t\t\t\t\tanchorRef,\n\t\t\t\t] ) }\n\t\t\t\tcontentEditable={ true }\n\t\t\t\tsuppressContentEditableWarning={ true }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'block-editor-rich-text__editable',\n\t\t\t\t\tprops.className,\n\t\t\t\t\t'rich-text'\n\t\t\t\t) }\n\t\t\t\tonFocus={ unstableOnFocus }\n\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nconst ForwardedRichTextContainer = forwardRef( RichTextWrapper );\n\nForwardedRichTextContainer.Content = ( {\n\tvalue,\n\ttagName: Tag,\n\tmultiline,\n\t...props\n} ) => {\n\t// Handle deprecated `children` and `node` sources.\n\tif ( Array.isArray( value ) ) {\n\t\tdeprecated( 'wp.blockEditor.RichText value prop as children type', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: 'value prop as string',\n\t\t\tlink: 'https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/introducing-attributes-and-editable-fields/',\n\t\t} );\n\n\t\tvalue = childrenSource.toHTML( value );\n\t}\n\n\tconst MultilineTag = getMultilineTag( multiline );\n\n\tif ( ! value && MultilineTag ) {\n\t\tvalue = `<${ MultilineTag }></${ MultilineTag }>`;\n\t}\n\n\tconst content = <RawHTML>{ value }</RawHTML>;\n\n\tif ( Tag ) {\n\t\tconst { format, ...restProps } = props;\n\t\treturn <Tag { ...restProps }>{ content }</Tag>;\n\t}\n\n\treturn content;\n};\n\nForwardedRichTextContainer.isEmpty = ( value ) => {\n\treturn ! value || value.length === 0;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/rich-text/README.md\n */\nexport default ForwardedRichTextContainer;\nexport { RichTextShortcut } from './shortcut';\nexport { RichTextToolbarButton } from './toolbar-button';\nexport { __unstableRichTextInputEvent } from './input-event';\n","/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useRef } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nexport function useMarkPersistent( { html, value } ) {\n\tconst previousText = useRef();\n\tconst hasActiveFormats =\n\t\tvalue.activeFormats && !! value.activeFormats.length;\n\tconst { __unstableMarkLastChangeAsPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\t// Must be set synchronously to make sure it applies to the last change.\n\tuseLayoutEffect( () => {\n\t\t// Ignore mount.\n\t\tif ( ! previousText.current ) {\n\t\t\tpreviousText.current = value.text;\n\t\t\treturn;\n\t\t}\n\n\t\t// Text input, so don't create an undo level for every character.\n\t\t// Create an undo level after 1 second of no input.\n\t\tif ( previousText.current !== value.text ) {\n\t\t\tconst timeout = window.setTimeout( () => {\n\t\t\t\t__unstableMarkLastChangeAsPersistent();\n\t\t\t}, 1000 );\n\t\t\tpreviousText.current = value.text;\n\t\t\treturn () => {\n\t\t\t\twindow.clearTimeout( timeout );\n\t\t\t};\n\t\t}\n\n\t\t__unstableMarkLastChangeAsPersistent();\n\t}, [ html, hasActiveFormats ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\n\n/**\n * Hook to prevent default behaviors for key combinations otherwise handled\n * internally by RichText.\n *\n * @return {import('react').RefObject} The component to be rendered.\n */\nexport function useRemoveBrowserShortcuts() {\n\treturn useRefEffect( ( node ) => {\n\t\tfunction onKeydown( event ) {\n\t\t\tif (\n\t\t\t\tisKeyboardEvent.primary( event, 'z' ) ||\n\t\t\t\tisKeyboardEvent.primary( event, 'y' ) ||\n\t\t\t\tisKeyboardEvent.primaryShift( event, 'z' )\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t\tnode.addEventListener( 'keydown', onKeydown );\n\t\treturn () => {\n\t\t\tnode.addEventListener( 'keydown', onKeydown );\n\t\t};\n\t}, [] );\n}\n","/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RichText from '../rich-text';\n\nconst EditableText = forwardRef( ( props, ref ) => {\n\treturn (\n\t\t<RichText\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\t__unstableDisableFormats\n\t\t\tpreserveWhiteSpace\n\t\t/>\n\t);\n} );\n\nEditableText.Content = ( { value = '', tagName: Tag = 'div', ...props } ) => {\n\treturn <Tag { ...props }>{ value }</Tag>;\n};\n\n/**\n * Renders an editable text input in which text formatting is not allowed.\n */\nexport default EditableText;\n","/**\n * External dependencies\n */\nimport TextareaAutosize from 'react-autosize-textarea';\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport EditableText from '../editable-text';\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/plain-text/README.md\n */\nconst PlainText = forwardRef( ( { __experimentalVersion, ...props }, ref ) => {\n\tif ( __experimentalVersion === 2 ) {\n\t\treturn <EditableText ref={ ref } { ...props } />;\n\t}\n\n\tconst { className, onChange, ...remainingProps } = props;\n\n\treturn (\n\t\t<TextareaAutosize\n\t\t\tref={ ref }\n\t\t\tclassName={ classnames( 'block-editor-plain-text', className ) }\n\t\t\tonChange={ ( event ) => onChange( event.target.value ) }\n\t\t\t{ ...remainingProps }\n\t\t/>\n\t);\n} );\n\nexport default PlainText;\n","/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { VisuallyHidden } from '@wordpress/components';\nimport { _x, sprintf } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\n\nexport default function ResponsiveBlockControlLabel( {\n\tproperty,\n\tviewport,\n\tdesc,\n} ) {\n\tconst instanceId = useInstanceId( ResponsiveBlockControlLabel );\n\tconst accessibleLabel =\n\t\tdesc ||\n\t\tsprintf(\n\t\t\t/* translators: 1: property name. 2: viewport name. */\n\t\t\t_x(\n\t\t\t\t'Controls the %1$s property for %2$s viewports.',\n\t\t\t\t'Text labelling a interface as controlling a given layout property (eg: margin) for a given screen size.'\n\t\t\t),\n\t\t\tproperty,\n\t\t\tviewport.label\n\t\t);\n\treturn (\n\t\t<Fragment>\n\t\t\t<span aria-describedby={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ viewport.label }\n\t\t\t</span>\n\t\t\t<VisuallyHidden as=\"span\" id={ `rbc-desc-${ instanceId }` }>\n\t\t\t\t{ accessibleLabel }\n\t\t\t</VisuallyHidden>\n\t\t</Fragment>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Fragment } from '@wordpress/element';\nimport { ToggleControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ResponsiveBlockControlLabel from './label';\n\nfunction ResponsiveBlockControl( props ) {\n\tconst {\n\t\ttitle,\n\t\tproperty,\n\t\ttoggleLabel,\n\t\tonIsResponsiveChange,\n\t\trenderDefaultControl,\n\t\trenderResponsiveControls,\n\t\tisResponsive = false,\n\t\tdefaultLabel = {\n\t\t\tid: 'all',\n\t\t\t/* translators: 'Label. Used to signify a layout property (eg: margin, padding) will apply uniformly to all screensizes.' */\n\t\t\tlabel: __( 'All' ),\n\t\t},\n\t\tviewports = [\n\t\t\t{\n\t\t\t\tid: 'small',\n\t\t\t\tlabel: __( 'Small screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'medium',\n\t\t\t\tlabel: __( 'Medium screens' ),\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'large',\n\t\t\t\tlabel: __( 'Large screens' ),\n\t\t\t},\n\t\t],\n\t} = props;\n\n\tif ( ! title || ! property || ! renderDefaultControl ) {\n\t\treturn null;\n\t}\n\n\tconst toggleControlLabel =\n\t\ttoggleLabel ||\n\t\tsprintf(\n\t\t\t/* translators: 'Toggle control label. Should the property be the same across all screen sizes or unique per screen size.'. %s property value for the control (eg: margin, padding...etc) */\n\t\t\t__( 'Use the same %s on all screensizes.' ),\n\t\t\tproperty\n\t\t);\n\n\t/* translators: 'Help text for the responsive mode toggle control.' */\n\tconst toggleHelpText = __(\n\t\t'Toggle between using the same value for all screen sizes or using a unique value per screen size.'\n\t);\n\n\tconst defaultControl = renderDefaultControl(\n\t\t<ResponsiveBlockControlLabel\n\t\t\tproperty={ property }\n\t\t\tviewport={ defaultLabel }\n\t\t/>,\n\t\tdefaultLabel\n\t);\n\n\tconst defaultResponsiveControls = () => {\n\t\treturn viewports.map( ( viewport ) => (\n\t\t\t<Fragment key={ viewport.id }>\n\t\t\t\t{ renderDefaultControl(\n\t\t\t\t\t<ResponsiveBlockControlLabel\n\t\t\t\t\t\tproperty={ property }\n\t\t\t\t\t\tviewport={ viewport }\n\t\t\t\t\t/>,\n\t\t\t\t\tviewport\n\t\t\t\t) }\n\t\t\t</Fragment>\n\t\t) );\n\t};\n\n\treturn (\n\t\t<fieldset className=\"block-editor-responsive-block-control\">\n\t\t\t<legend className=\"block-editor-responsive-block-control__title\">\n\t\t\t\t{ title }\n\t\t\t</legend>\n\n\t\t\t<div className=\"block-editor-responsive-block-control__inner\">\n\t\t\t\t<ToggleControl\n\t\t\t\t\tclassName=\"block-editor-responsive-block-control__toggle\"\n\t\t\t\t\tlabel={ toggleControlLabel }\n\t\t\t\t\tchecked={ ! isResponsive }\n\t\t\t\t\tonChange={ onIsResponsiveChange }\n\t\t\t\t\thelp={ toggleHelpText }\n\t\t\t\t/>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'block-editor-responsive-block-control__group',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'is-responsive': isResponsive,\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t>\n\t\t\t\t\t{ ! isResponsive && defaultControl }\n\t\t\t\t\t{ isResponsive &&\n\t\t\t\t\t\t( renderResponsiveControls\n\t\t\t\t\t\t\t? renderResponsiveControls( viewports )\n\t\t\t\t\t\t\t: defaultResponsiveControls() ) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</fieldset>\n\t);\n}\n\nexport default ResponsiveBlockControl;\n","/**\n * WordPress dependencies\n */\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport { useEffect, useContext, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { keyboardShortcutContext } from './';\n\nexport function RichTextShortcut( { character, type, onUse } ) {\n\tconst keyboardShortcuts = useContext( keyboardShortcutContext );\n\tconst onUseRef = useRef();\n\tonUseRef.current = onUse;\n\n\tuseEffect( () => {\n\t\tfunction callback( event ) {\n\t\t\tif ( isKeyboardEvent[ type ]( event, character ) ) {\n\t\t\t\tonUseRef.current();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tkeyboardShortcuts.current.add( callback );\n\t\treturn () => {\n\t\t\tkeyboardShortcuts.current.delete( callback );\n\t\t};\n\t}, [ character, type ] );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { Fill, ToolbarButton } from '@wordpress/components';\nimport { displayShortcut } from '@wordpress/keycodes';\n\nexport function RichTextToolbarButton( {\n\tname,\n\tshortcutType,\n\tshortcutCharacter,\n\t...props\n} ) {\n\tlet shortcut;\n\tlet fillName = 'RichText.ToolbarControls';\n\n\tif ( name ) {\n\t\tfillName += `.${ name }`;\n\t}\n\n\tif ( shortcutType && shortcutCharacter ) {\n\t\tshortcut = displayShortcut[ shortcutType ]( shortcutCharacter );\n\t}\n\n\treturn (\n\t\t<Fill name={ fillName }>\n\t\t\t<ToolbarButton { ...props } shortcut={ shortcut } />\n\t\t</Fill>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useContext, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { inputEventContext } from './';\n\nexport function __unstableRichTextInputEvent( { inputType, onInput } ) {\n\tconst callbacks = useContext( inputEventContext );\n\tconst onInputRef = useRef();\n\tonInputRef.current = onInput;\n\n\tuseEffect( () => {\n\t\tfunction callback( event ) {\n\t\t\tif ( event.inputType === inputType ) {\n\t\t\t\tonInputRef.current();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tcallbacks.current.add( callback );\n\t\treturn () => {\n\t\t\tcallbacks.current.delete( callback );\n\t\t};\n\t}, [ inputType ] );\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tDropdown,\n\tButton,\n\tMenuItemsChoice,\n\tSVG,\n\tPath,\n\tNavigableMenu,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\nimport { Icon, edit as editIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst selectIcon = (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path d=\"M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z\" />\n\t</SVG>\n);\n\nfunction ToolSelector( props, ref ) {\n\tconst mode = useSelect(\n\t\t( select ) => select( blockEditorStore ).__unstableGetEditorMode(),\n\t\t[]\n\t);\n\tconst { __unstableSetEditorMode } = useDispatch( blockEditorStore );\n\n\treturn (\n\t\t<Dropdown\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<Button\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ mode === 'navigation' ? selectIcon : editIcon }\n\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\taria-haspopup=\"true\"\n\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\t\t\t\tlabel={ __( 'Tools' ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\tposition=\"bottom right\"\n\t\t\trenderContent={ () => (\n\t\t\t\t<>\n\t\t\t\t\t<NavigableMenu role=\"menu\" aria-label={ __( 'Tools' ) }>\n\t\t\t\t\t\t<MenuItemsChoice\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tmode === 'navigation' ? 'navigation' : 'edit'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonSelect={ __unstableSetEditorMode }\n\t\t\t\t\t\t\tchoices={ [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvalue: 'edit',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<Icon icon={ editIcon } />\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\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{\n\t\t\t\t\t\t\t\t\tvalue: 'navigation',\n\t\t\t\t\t\t\t\t\tlabel: (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{ selectIcon }\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Select' ) }\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</NavigableMenu>\n\t\t\t\t\t<div className=\"block-editor-tool-selector__help\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( ToolSelector );\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalUnitControl as BaseUnitControl,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport useSetting from '../use-setting';\n\nexport default function UnitControl( { units: unitsProp, ...props } ) {\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: useSetting( 'spacing.units' ) || [\n\t\t\t'%',\n\t\t\t'px',\n\t\t\t'em',\n\t\t\t'rem',\n\t\t\t'vw',\n\t\t],\n\t\tunits: unitsProp,\n\t} );\n\n\treturn <BaseUnitControl units={ units } { ...props } />;\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst arrowLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M20 10.8H6.7l4.1-4.5-1.1-1.1-5.8 6.3 5.8 5.8 1.1-1.1-4-3.9H20z\" />\n\t</SVG>\n);\n\nexport default arrowLeft;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { Button } from '@wordpress/components';\nimport { link, keyboardReturn, arrowLeft } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLInput from './';\n\nclass URLInputButton extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.toggle = this.toggle.bind( this );\n\t\tthis.submitLink = this.submitLink.bind( this );\n\t\tthis.state = {\n\t\t\texpanded: false,\n\t\t};\n\t}\n\n\ttoggle() {\n\t\tthis.setState( { expanded: ! this.state.expanded } );\n\t}\n\n\tsubmitLink( event ) {\n\t\tevent.preventDefault();\n\t\tthis.toggle();\n\t}\n\n\trender() {\n\t\tconst { url, onChange } = this.props;\n\t\tconst { expanded } = this.state;\n\t\tconst buttonLabel = url ? __( 'Edit link' ) : __( 'Insert link' );\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-url-input__button\">\n\t\t\t\t<Button\n\t\t\t\t\ticon={ link }\n\t\t\t\t\tlabel={ buttonLabel }\n\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\t\tisPressed={ !! url }\n\t\t\t\t/>\n\t\t\t\t{ expanded && (\n\t\t\t\t\t<form\n\t\t\t\t\t\tclassName=\"block-editor-url-input__button-modal\"\n\t\t\t\t\t\tonSubmit={ this.submitLink }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"block-editor-url-input__button-modal-line\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"block-editor-url-input__back\"\n\t\t\t\t\t\t\t\ticon={ arrowLeft }\n\t\t\t\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ this.toggle }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<URLInput\n\t\t\t\t\t\t\t\tvalue={ url || '' }\n\t\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ticon={ keyboardReturn }\n\t\t\t\t\t\t\t\tlabel={ __( 'Submit' ) }\n\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md\n */\nexport default URLInputButton;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst close = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z\" />\n\t</SVG>\n);\n\nexport default close;\n","/**\n * External dependencies\n */\nimport { find, map } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useRef, useState, useCallback } from '@wordpress/element';\nimport {\n\tToolbarButton,\n\tButton,\n\tNavigableMenu,\n\tMenuItem,\n\tToggleControl,\n\tTextControl,\n\tSVG,\n\tPath,\n} from '@wordpress/components';\nimport { link as linkIcon, close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport URLPopover from './index';\n\nconst LINK_DESTINATION_NONE = 'none';\nconst LINK_DESTINATION_CUSTOM = 'custom';\nconst LINK_DESTINATION_MEDIA = 'media';\nconst LINK_DESTINATION_ATTACHMENT = 'attachment';\nconst NEW_TAB_REL = [ 'noreferrer', 'noopener' ];\n\nconst icon = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M0,0h24v24H0V0z\" fill=\"none\" />\n\t\t<Path d=\"m19 5v14h-14v-14h14m0-2h-14c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h14c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2z\" />\n\t\t<Path d=\"m14.14 11.86l-3 3.87-2.14-2.59-3 3.86h12l-3.86-5.14z\" />\n\t</SVG>\n);\n\nconst ImageURLInputUI = ( {\n\tlinkDestination,\n\tonChangeUrl,\n\turl,\n\tmediaType = 'image',\n\tmediaUrl,\n\tmediaLink,\n\tlinkTarget,\n\tlinkClass,\n\trel,\n} ) => {\n\tconst [ isOpen, setIsOpen ] = useState( false );\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\tconst openLinkUI = useCallback( () => {\n\t\tsetIsOpen( true );\n\t} );\n\n\tconst [ isEditingLink, setIsEditingLink ] = useState( false );\n\tconst [ urlInput, setUrlInput ] = useState( null );\n\n\tconst autocompleteRef = useRef( null );\n\n\tconst startEditLink = useCallback( () => {\n\t\tif (\n\t\t\tlinkDestination === LINK_DESTINATION_MEDIA ||\n\t\t\tlinkDestination === LINK_DESTINATION_ATTACHMENT\n\t\t) {\n\t\t\tsetUrlInput( '' );\n\t\t}\n\t\tsetIsEditingLink( true );\n\t} );\n\n\tconst stopEditLink = useCallback( () => {\n\t\tsetIsEditingLink( false );\n\t} );\n\n\tconst closeLinkUI = useCallback( () => {\n\t\tsetUrlInput( null );\n\t\tstopEditLink();\n\t\tsetIsOpen( false );\n\t} );\n\n\tconst getUpdatedLinkTargetSettings = ( value ) => {\n\t\tconst newLinkTarget = value ? '_blank' : undefined;\n\n\t\tlet updatedRel;\n\t\tif ( newLinkTarget ) {\n\t\t\tconst rels = ( rel ?? '' ).split( ' ' );\n\t\t\tNEW_TAB_REL.forEach( ( relVal ) => {\n\t\t\t\tif ( ! rels.includes( relVal ) ) {\n\t\t\t\t\trels.push( relVal );\n\t\t\t\t}\n\t\t\t} );\n\t\t\tupdatedRel = rels.join( ' ' );\n\t\t} else {\n\t\t\tconst rels = ( rel ?? '' )\n\t\t\t\t.split( ' ' )\n\t\t\t\t.filter(\n\t\t\t\t\t( relVal ) => NEW_TAB_REL.includes( relVal ) === false\n\t\t\t\t);\n\t\t\tupdatedRel = rels.length ? rels.join( ' ' ) : undefined;\n\t\t}\n\n\t\treturn {\n\t\t\tlinkTarget: newLinkTarget,\n\t\t\trel: updatedRel,\n\t\t};\n\t};\n\n\tconst onFocusOutside = useCallback( () => {\n\t\treturn ( event ) => {\n\t\t\t// The autocomplete suggestions list renders in a separate popover (in a portal),\n\t\t\t// so onFocusOutside fails to detect that a click on a suggestion occurred in the\n\t\t\t// LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and\n\t\t\t// return to avoid the popover being closed.\n\t\t\tconst autocompleteElement = autocompleteRef.current;\n\t\t\tif (\n\t\t\t\tautocompleteElement &&\n\t\t\t\tautocompleteElement.contains( event.target )\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tsetIsOpen( false );\n\t\t\tsetUrlInput( null );\n\t\t\tstopEditLink();\n\t\t};\n\t} );\n\n\tconst onSubmitLinkChange = useCallback( () => {\n\t\treturn ( event ) => {\n\t\t\tif ( urlInput ) {\n\t\t\t\t// It is possible the entered URL actually matches a named link destination.\n\t\t\t\t// This check will ensure our link destination is correct.\n\t\t\t\tconst selectedDestination =\n\t\t\t\t\tgetLinkDestinations().find(\n\t\t\t\t\t\t( destination ) => destination.url === urlInput\n\t\t\t\t\t)?.linkDestination || LINK_DESTINATION_CUSTOM;\n\n\t\t\t\tonChangeUrl( {\n\t\t\t\t\thref: urlInput,\n\t\t\t\t\tlinkDestination: selectedDestination,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tstopEditLink();\n\t\t\tsetUrlInput( null );\n\t\t\tevent.preventDefault();\n\t\t};\n\t} );\n\n\tconst onLinkRemove = useCallback( () => {\n\t\tonChangeUrl( {\n\t\t\tlinkDestination: LINK_DESTINATION_NONE,\n\t\t\thref: '',\n\t\t} );\n\t} );\n\n\tconst getLinkDestinations = () => {\n\t\tconst linkDestinations = [\n\t\t\t{\n\t\t\t\tlinkDestination: LINK_DESTINATION_MEDIA,\n\t\t\t\ttitle: __( 'Media File' ),\n\t\t\t\turl: mediaType === 'image' ? mediaUrl : undefined,\n\t\t\t\ticon,\n\t\t\t},\n\t\t];\n\t\tif ( mediaType === 'image' && mediaLink ) {\n\t\t\tlinkDestinations.push( {\n\t\t\t\tlinkDestination: LINK_DESTINATION_ATTACHMENT,\n\t\t\t\ttitle: __( 'Attachment Page' ),\n\t\t\t\turl: mediaType === 'image' ? mediaLink : undefined,\n\t\t\t\ticon: (\n\t\t\t\t\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t\t<Path d=\"M0 0h24v24H0V0z\" fill=\"none\" />\n\t\t\t\t\t\t<Path d=\"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v5h5v11H6z\" />\n\t\t\t\t\t</SVG>\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t\treturn linkDestinations;\n\t};\n\n\tconst onSetHref = ( value ) => {\n\t\tconst linkDestinations = getLinkDestinations();\n\t\tlet linkDestinationInput;\n\t\tif ( ! value ) {\n\t\t\tlinkDestinationInput = LINK_DESTINATION_NONE;\n\t\t} else {\n\t\t\tlinkDestinationInput = (\n\t\t\t\tfind( linkDestinations, ( destination ) => {\n\t\t\t\t\treturn destination.url === value;\n\t\t\t\t} ) || { linkDestination: LINK_DESTINATION_CUSTOM }\n\t\t\t).linkDestination;\n\t\t}\n\t\tonChangeUrl( {\n\t\t\tlinkDestination: linkDestinationInput,\n\t\t\thref: value,\n\t\t} );\n\t};\n\n\tconst onSetNewTab = ( value ) => {\n\t\tconst updatedLinkTarget = getUpdatedLinkTargetSettings( value );\n\t\tonChangeUrl( updatedLinkTarget );\n\t};\n\n\tconst onSetLinkRel = ( value ) => {\n\t\tonChangeUrl( { rel: value } );\n\t};\n\n\tconst onSetLinkClass = ( value ) => {\n\t\tonChangeUrl( { linkClass: value } );\n\t};\n\n\tconst advancedOptions = (\n\t\t<>\n\t\t\t<ToggleControl\n\t\t\t\tlabel={ __( 'Open in new tab' ) }\n\t\t\t\tonChange={ onSetNewTab }\n\t\t\t\tchecked={ linkTarget === '_blank' }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\tlabel={ __( 'Link rel' ) }\n\t\t\t\tvalue={ rel ?? '' }\n\t\t\t\tonChange={ onSetLinkRel }\n\t\t\t/>\n\t\t\t<TextControl\n\t\t\t\tlabel={ __( 'Link CSS Class' ) }\n\t\t\t\tvalue={ linkClass || '' }\n\t\t\t\tonChange={ onSetLinkClass }\n\t\t\t/>\n\t\t</>\n\t);\n\n\tconst linkEditorValue = urlInput !== null ? urlInput : url;\n\n\tconst urlLabel = (\n\t\tfind( getLinkDestinations(), [ 'linkDestination', linkDestination ] ) ||\n\t\t{}\n\t).title;\n\n\treturn (\n\t\t<>\n\t\t\t<ToolbarButton\n\t\t\t\ticon={ linkIcon }\n\t\t\t\tclassName=\"components-toolbar__control\"\n\t\t\t\tlabel={ url ? __( 'Edit link' ) : __( 'Insert link' ) }\n\t\t\t\taria-expanded={ isOpen }\n\t\t\t\tonClick={ openLinkUI }\n\t\t\t\tref={ setPopoverAnchor }\n\t\t\t/>\n\t\t\t{ isOpen && (\n\t\t\t\t<URLPopover\n\t\t\t\t\tanchor={ popoverAnchor }\n\t\t\t\t\tonFocusOutside={ onFocusOutside() }\n\t\t\t\t\tonClose={ closeLinkUI }\n\t\t\t\t\trenderSettings={ () => advancedOptions }\n\t\t\t\t\tadditionalControls={\n\t\t\t\t\t\t! linkEditorValue && (\n\t\t\t\t\t\t\t<NavigableMenu>\n\t\t\t\t\t\t\t\t{ map( getLinkDestinations(), ( link ) => (\n\t\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\t\tkey={ link.linkDestination }\n\t\t\t\t\t\t\t\t\t\ticon={ link.icon }\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tsetUrlInput( null );\n\t\t\t\t\t\t\t\t\t\t\tonSetHref( link.url );\n\t\t\t\t\t\t\t\t\t\t\tstopEditLink();\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{ link.title }\n\t\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</NavigableMenu>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ ( ! url || isEditingLink ) && (\n\t\t\t\t\t\t<URLPopover.LinkEditor\n\t\t\t\t\t\t\tclassName=\"block-editor-format-toolbar__link-container-content\"\n\t\t\t\t\t\t\tvalue={ linkEditorValue }\n\t\t\t\t\t\t\tonChangeInputValue={ setUrlInput }\n\t\t\t\t\t\t\tonSubmit={ onSubmitLinkChange() }\n\t\t\t\t\t\t\tautocompleteRef={ autocompleteRef }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ url && ! isEditingLink && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<URLPopover.LinkViewer\n\t\t\t\t\t\t\t\tclassName=\"block-editor-format-toolbar__link-container-content\"\n\t\t\t\t\t\t\t\turl={ url }\n\t\t\t\t\t\t\t\tonEditLinkClick={ startEditLink }\n\t\t\t\t\t\t\t\turlLabel={ urlLabel }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\tlabel={ __( 'Remove link' ) }\n\t\t\t\t\t\t\t\tonClick={ onLinkRemove }\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</URLPopover>\n\t\t\t) }\n\t\t</>\n\t);\n};\n\nexport { ImageURLInputUI as __experimentalImageURLInputUI };\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { check } from '@wordpress/icons';\n\nexport default function PreviewOptions( {\n\tchildren,\n\tclassName,\n\tisEnabled = true,\n\tdeviceType,\n\tsetDeviceType,\n} ) {\n\tconst isMobile = useViewportMatch( 'small', '<' );\n\tif ( isMobile ) return null;\n\n\tconst popoverProps = {\n\t\tclassName: classnames(\n\t\t\tclassName,\n\t\t\t'block-editor-post-preview__dropdown-content'\n\t\t),\n\t\tposition: 'bottom left',\n\t};\n\tconst toggleProps = {\n\t\tvariant: 'tertiary',\n\t\tclassName: 'block-editor-post-preview__button-toggle',\n\t\tdisabled: ! isEnabled,\n\t\t/* translators: button label text should, if possible, be under 16 characters. */\n\t\tchildren: __( 'View' ),\n\t};\n\tconst menuProps = {\n\t\t'aria-label': __( 'View options' ),\n\t};\n\treturn (\n\t\t<DropdownMenu\n\t\t\tclassName=\"block-editor-post-preview__dropdown\"\n\t\t\tpopoverProps={ popoverProps }\n\t\t\ttoggleProps={ toggleProps }\n\t\t\tmenuProps={ menuProps }\n\t\t\ticon={ null }\n\t\t>\n\t\t\t{ () => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Desktop' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Desktop' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Desktop' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Tablet' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Tablet' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Tablet' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tclassName=\"block-editor-post-preview__button-resize\"\n\t\t\t\t\t\t\tonClick={ () => setDeviceType( 'Mobile' ) }\n\t\t\t\t\t\t\ticon={ deviceType === 'Mobile' && check }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Mobile' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t{ children }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Function to resize the editor window.\n *\n * @param {string} deviceType Used for determining the size of the container (e.g. Desktop, Tablet, Mobile)\n *\n * @return {Object} Inline styles to be added to resizable container.\n */\nexport default function useResizeCanvas( deviceType ) {\n\tconst [ actualWidth, updateActualWidth ] = useState( window.innerWidth );\n\n\tuseEffect( () => {\n\t\tif ( deviceType === 'Desktop' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeListener = () => updateActualWidth( window.innerWidth );\n\t\twindow.addEventListener( 'resize', resizeListener );\n\n\t\treturn () => {\n\t\t\twindow.removeEventListener( 'resize', resizeListener );\n\t\t};\n\t}, [ deviceType ] );\n\n\tconst getCanvasWidth = ( device ) => {\n\t\tlet deviceWidth;\n\n\t\tswitch ( device ) {\n\t\t\tcase 'Tablet':\n\t\t\t\tdeviceWidth = 780;\n\t\t\t\tbreak;\n\t\t\tcase 'Mobile':\n\t\t\t\tdeviceWidth = 360;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\n\t\treturn deviceWidth < actualWidth ? deviceWidth : actualWidth;\n\t};\n\n\tconst marginValue = () => ( window.innerHeight < 800 ? 36 : 72 );\n\n\tconst contentInlineStyles = ( device ) => {\n\t\tconst height = device === 'Mobile' ? '768px' : '1024px';\n\t\tswitch ( device ) {\n\t\t\tcase 'Tablet':\n\t\t\tcase 'Mobile':\n\t\t\t\treturn {\n\t\t\t\t\twidth: getCanvasWidth( device ),\n\t\t\t\t\tmargin: marginValue() + 'px auto',\n\t\t\t\t\theight,\n\t\t\t\t\tborderRadius: '2px 2px 2px 2px',\n\t\t\t\t\tborder: '1px solid #ddd',\n\t\t\t\t\toverflowY: 'auto',\n\t\t\t\t};\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t};\n\n\treturn contentInlineStyles( deviceType );\n}\n","/**\n * WordPress dependencies\n */\nimport { withSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { __unstableUseBlockRef as useBlockRef } from '../block-list/use-block-props/use-block-refs';\n\nconst SkipToSelectedBlock = ( { selectedBlockClientId } ) => {\n\tconst ref = useBlockRef( selectedBlockClientId );\n\tconst onClick = () => {\n\t\tref.current.focus();\n\t};\n\n\treturn selectedBlockClientId ? (\n\t\t<Button\n\t\t\tvariant=\"secondary\"\n\t\t\tclassName=\"block-editor-skip-to-selected-block\"\n\t\t\tonClick={ onClick }\n\t\t>\n\t\t\t{ __( 'Skip to the selected block' ) }\n\t\t</Button>\n\t) : null;\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/skip-to-selected-block/README.md\n */\nexport default withSelect( ( select ) => {\n\treturn {\n\t\tselectedBlockClientId:\n\t\t\tselect( blockEditorStore ).getBlockSelectionStart(),\n\t};\n} )( SkipToSelectedBlock );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"wordcount\"];","/**\n * WordPress dependencies\n */\nimport { sprintf, _n } from '@wordpress/i18n';\nimport { withSelect } from '@wordpress/data';\nimport { serialize } from '@wordpress/blocks';\nimport { count as wordCount } from '@wordpress/wordcount';\nimport { copy } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport BlockIcon from '../block-icon';\nimport { store as blockEditorStore } from '../../store';\n\nfunction MultiSelectionInspector( { blocks } ) {\n\tconst words = wordCount( serialize( blocks ), 'words' );\n\n\treturn (\n\t\t<div className=\"block-editor-multi-selection-inspector__card\">\n\t\t\t<BlockIcon icon={ copy } showColors />\n\t\t\t<div className=\"block-editor-multi-selection-inspector__card-content\">\n\t\t\t\t<div className=\"block-editor-multi-selection-inspector__card-title\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: number of blocks */\n\t\t\t\t\t\t_n( '%d block', '%d blocks', blocks.length ),\n\t\t\t\t\t\tblocks.length\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t<div className=\"block-editor-multi-selection-inspector__card-description\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: number of words */\n\t\t\t\t\t\t_n( '%d word', '%d words', words ),\n\t\t\t\t\t\twords\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n}\n\nexport default withSelect( ( select ) => {\n\tconst { getMultiSelectedBlocks } = select( blockEditorStore );\n\treturn {\n\t\tblocks: getMultiSelectedBlocks(),\n\t};\n} )( MultiSelectionInspector );\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { SelectControl } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\nimport { getDefaultStyle } from '../block-styles/utils';\n\nexport default function DefaultStylePicker( { blockName } ) {\n\tconst { preferredStyle, onUpdatePreferredStyleVariations, styles } =\n\t\tuseSelect(\n\t\t\t( select ) => {\n\t\t\t\tconst settings = select( blockEditorStore ).getSettings();\n\t\t\t\tconst preferredStyleVariations =\n\t\t\t\t\tsettings.__experimentalPreferredStyleVariations;\n\t\t\t\treturn {\n\t\t\t\t\tpreferredStyle:\n\t\t\t\t\t\tpreferredStyleVariations?.value?.[ blockName ],\n\t\t\t\t\tonUpdatePreferredStyleVariations:\n\t\t\t\t\t\tpreferredStyleVariations?.onChange ?? null,\n\t\t\t\t\tstyles: select( blocksStore ).getBlockStyles( blockName ),\n\t\t\t\t};\n\t\t\t},\n\t\t\t[ blockName ]\n\t\t);\n\tconst selectOptions = useMemo(\n\t\t() => [\n\t\t\t{ label: __( 'Not set' ), value: '' },\n\t\t\t...styles.map( ( { label, name } ) => ( { label, value: name } ) ),\n\t\t],\n\t\t[ styles ]\n\t);\n\tconst defaultStyleName = useMemo(\n\t\t() => getDefaultStyle( styles )?.name,\n\t\t[ styles ]\n\t);\n\tconst selectOnChange = useCallback(\n\t\t( blockStyle ) => {\n\t\t\tonUpdatePreferredStyleVariations( blockName, blockStyle );\n\t\t},\n\t\t[ blockName, onUpdatePreferredStyleVariations ]\n\t);\n\n\t// Until the functionality is migrated to global styles,\n\t// only show the default style picker if a non-default style has already been selected.\n\tif ( ! preferredStyle || preferredStyle === defaultStyleName ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\tonUpdatePreferredStyleVariations && (\n\t\t\t<div className=\"default-style-picker__default-switcher\">\n\t\t\t\t<SelectControl\n\t\t\t\t\toptions={ selectOptions }\n\t\t\t\t\tvalue={ preferredStyle || '' }\n\t\t\t\t\tlabel={ __( 'Default Style' ) }\n\t\t\t\t\tonChange={ selectOnChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t)\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tgetBlockType,\n\tgetUnregisteredTypeHandlerName,\n\thasBlockSupport,\n\tstore as blocksStore,\n} from '@wordpress/blocks';\nimport {\n\tPanelBody,\n\t__experimentalUseSlotFills as useSlotFills,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useMemo, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SkipToSelectedBlock from '../skip-to-selected-block';\nimport BlockCard from '../block-card';\nimport {\n\tdefault as InspectorControls,\n\tInspectorAdvancedControls,\n} from '../inspector-controls';\nimport BlockStyles from '../block-styles';\nimport MultiSelectionInspector from '../multi-selection-inspector';\nimport DefaultStylePicker from '../default-style-picker';\nimport BlockVariationTransforms from '../block-variation-transforms';\nimport useBlockDisplayInformation from '../use-block-display-information';\nimport { store as blockEditorStore } from '../../store';\nimport BlockIcon from '../block-icon';\n\nfunction useContentBlocks( blockTypes, block ) {\n\tconst contenBlocksObjectAux = useMemo( () => {\n\t\treturn blockTypes.reduce( ( result, blockType ) => {\n\t\t\tif (\n\t\t\t\tObject.entries( blockType.attributes ).some(\n\t\t\t\t\t( [ , { __experimentalRole } ] ) =>\n\t\t\t\t\t\t__experimentalRole === 'content'\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tresult[ blockType.name ] = true;\n\t\t\t}\n\t\t\treturn result;\n\t\t}, {} );\n\t}, [ blockTypes ] );\n\tconst isContentBlock = useCallback(\n\t\t( blockName ) => {\n\t\t\treturn !! contenBlocksObjectAux[ blockName ];\n\t\t},\n\t\t[ blockTypes ]\n\t);\n\treturn useMemo( () => {\n\t\treturn getContentBlocks( [ block ], isContentBlock );\n\t}, [ block, isContentBlock ] );\n}\n\nfunction getContentBlocks( blocks, isContentBlock ) {\n\tconst result = [];\n\tfor ( const block of blocks ) {\n\t\tif ( isContentBlock( block.name ) ) {\n\t\t\tresult.push( block );\n\t\t}\n\t\tresult.push( ...getContentBlocks( block.innerBlocks, isContentBlock ) );\n\t}\n\treturn result;\n}\n\nfunction BlockNavigationButton( { blockTypes, block, selectedBlock } ) {\n\tconst { selectBlock } = useDispatch( blockEditorStore );\n\tconst blockType = blockTypes.find( ( { name } ) => name === block.name );\n\tconst isSelected =\n\t\tselectedBlock && selectedBlock.clientId === block.clientId;\n\treturn (\n\t\t<Button\n\t\t\tisPressed={ isSelected }\n\t\t\tonClick={ () => selectBlock( block.clientId ) }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ blockType.icon } />\n\t\t\t\t<FlexItem>{ blockType.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</Button>\n\t);\n}\n\nfunction BlockInspectorLockedBlocks( { topLevelLockedBlock } ) {\n\tconst { blockTypes, block, selectedBlock } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tblockTypes: select( blocksStore ).getBlockTypes(),\n\t\t\t\tblock: select( blockEditorStore ).getBlock(\n\t\t\t\t\ttopLevelLockedBlock\n\t\t\t\t),\n\t\t\t\tselectedBlock: select( blockEditorStore ).getSelectedBlock(),\n\t\t\t};\n\t\t},\n\t\t[ topLevelLockedBlock ]\n\t);\n\tconst blockInformation = useBlockDisplayInformation( topLevelLockedBlock );\n\tconst contentBlocks = useContentBlocks( blockTypes, block );\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t<BlockCard { ...blockInformation } />\n\t\t\t<BlockVariationTransforms blockClientId={ topLevelLockedBlock } />\n\t\t\t<VStack\n\t\t\t\tspacing={ 1 }\n\t\t\t\tpadding={ 4 }\n\t\t\t\tclassName=\"block-editor-block-inspector__block-buttons-container\"\n\t\t\t>\n\t\t\t\t<h2 className=\"block-editor-block-card__title\">\n\t\t\t\t\t{ __( 'Content' ) }\n\t\t\t\t</h2>\n\t\t\t\t{ contentBlocks.map( ( contentBlock ) => (\n\t\t\t\t\t<BlockNavigationButton\n\t\t\t\t\t\tselectedBlock={ selectedBlock }\n\t\t\t\t\t\tkey={ contentBlock.clientId }\n\t\t\t\t\t\tblock={ contentBlock }\n\t\t\t\t\t\tblockTypes={ blockTypes }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nconst BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {\n\tconst {\n\t\tcount,\n\t\tselectedBlockName,\n\t\tselectedBlockClientId,\n\t\tblockType,\n\t\ttopLevelLockedBlock,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetSelectedBlockClientId,\n\t\t\tgetSelectedBlockCount,\n\t\t\tgetBlockName,\n\t\t\t__unstableGetContentLockingParent,\n\t\t} = select( blockEditorStore );\n\n\t\tconst _selectedBlockClientId = getSelectedBlockClientId();\n\t\tconst _selectedBlockName =\n\t\t\t_selectedBlockClientId && getBlockName( _selectedBlockClientId );\n\t\tconst _blockType =\n\t\t\t_selectedBlockName && getBlockType( _selectedBlockName );\n\n\t\treturn {\n\t\t\tcount: getSelectedBlockCount(),\n\t\t\tselectedBlockClientId: _selectedBlockClientId,\n\t\t\tselectedBlockName: _selectedBlockName,\n\t\t\tblockType: _blockType,\n\t\t\ttopLevelLockedBlock: __unstableGetContentLockingParent(\n\t\t\t\t_selectedBlockClientId\n\t\t\t),\n\t\t};\n\t}, [] );\n\n\tif ( count > 1 ) {\n\t\treturn (\n\t\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t\t<MultiSelectionInspector />\n\t\t\t\t<InspectorControls.Slot />\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"color\"\n\t\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"typography\"\n\t\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"dimensions\"\n\t\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t\t/>\n\t\t\t\t<InspectorControls.Slot\n\t\t\t\t\t__experimentalGroup=\"border\"\n\t\t\t\t\tlabel={ __( 'Border' ) }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst isSelectedBlockUnregistered =\n\t\tselectedBlockName === getUnregisteredTypeHandlerName();\n\n\t/*\n\t * If the selected block is of an unregistered type, avoid showing it as an actual selection\n\t * because we want the user to focus on the unregistered block warning, not block settings.\n\t */\n\tif (\n\t\t! blockType ||\n\t\t! selectedBlockClientId ||\n\t\tisSelectedBlockUnregistered\n\t) {\n\t\tif ( showNoBlockSelectedMessage ) {\n\t\t\treturn (\n\t\t\t\t<span className=\"block-editor-block-inspector__no-blocks\">\n\t\t\t\t\t{ __( 'No block selected.' ) }\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}\n\tif ( topLevelLockedBlock ) {\n\t\treturn (\n\t\t\t<BlockInspectorLockedBlocks\n\t\t\t\ttopLevelLockedBlock={ topLevelLockedBlock }\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<BlockInspectorSingleBlock\n\t\t\tclientId={ selectedBlockClientId }\n\t\t\tblockName={ blockType.name }\n\t\t/>\n\t);\n};\n\nconst BlockInspectorSingleBlock = ( { clientId, blockName } ) => {\n\tconst hasBlockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\tconst blockStyles = getBlockStyles( blockName );\n\t\t\treturn blockStyles && blockStyles.length > 0;\n\t\t},\n\t\t[ blockName ]\n\t);\n\tconst blockInformation = useBlockDisplayInformation( clientId );\n\treturn (\n\t\t<div className=\"block-editor-block-inspector\">\n\t\t\t<BlockCard { ...blockInformation } />\n\t\t\t<BlockVariationTransforms blockClientId={ clientId } />\n\t\t\t{ hasBlockStyles && (\n\t\t\t\t<div>\n\t\t\t\t\t<PanelBody title={ __( 'Styles' ) }>\n\t\t\t\t\t\t<BlockStyles\n\t\t\t\t\t\t\tscope=\"core/block-inspector\"\n\t\t\t\t\t\t\tclientId={ clientId }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ hasBlockSupport(\n\t\t\t\t\t\t\tblockName,\n\t\t\t\t\t\t\t'defaultStylePicker',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t\t) && <DefaultStylePicker blockName={ blockName } /> }\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<InspectorControls.Slot />\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"color\"\n\t\t\t\tlabel={ __( 'Color' ) }\n\t\t\t\tclassName=\"color-block-support-panel__inner-wrapper\"\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"typography\"\n\t\t\t\tlabel={ __( 'Typography' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"dimensions\"\n\t\t\t\tlabel={ __( 'Dimensions' ) }\n\t\t\t/>\n\t\t\t<InspectorControls.Slot\n\t\t\t\t__experimentalGroup=\"border\"\n\t\t\t\tlabel={ __( 'Border' ) }\n\t\t\t/>\n\t\t\t<div>\n\t\t\t\t<AdvancedControls />\n\t\t\t</div>\n\t\t\t<SkipToSelectedBlock key=\"back\" />\n\t\t</div>\n\t);\n};\n\nconst AdvancedControls = () => {\n\tconst fills = useSlotFills( InspectorAdvancedControls.slotName );\n\tconst hasFills = Boolean( fills && fills.length );\n\n\tif ( ! hasFills ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<PanelBody\n\t\t\tclassName=\"block-editor-block-inspector__advanced\"\n\t\t\ttitle={ __( 'Advanced' ) }\n\t\t\tinitialOpen={ false }\n\t\t>\n\t\t\t<InspectorControls.Slot __experimentalGroup=\"advanced\" />\n\t\t</PanelBody>\n\t);\n};\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/block-inspector/README.md\n */\nexport default BlockInspector;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useEffect, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BlockPopoverInbetween from '../block-popover/inbetween';\nimport { store as blockEditorStore } from '../../store';\nimport Inserter from '../inserter';\n\nfunction ZoomOutModeInserters( { __unstableContentRef } ) {\n\tconst [ isReady, setIsReady ] = useState( false );\n\tconst blockOrder = useSelect( ( select ) => {\n\t\treturn select( blockEditorStore ).getBlockOrder();\n\t}, [] );\n\n\t// Defer the initial rendering to avoid the jumps due to the animation.\n\tuseEffect( () => {\n\t\tconst timeout = setTimeout( () => {\n\t\t\tsetIsReady( true );\n\t\t}, 500 );\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [] );\n\n\tif ( ! isReady ) {\n\t\treturn null;\n\t}\n\n\treturn blockOrder.map( ( clientId, index ) => {\n\t\tif ( index === blockOrder.length - 1 ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<BlockPopoverInbetween\n\t\t\t\tkey={ clientId }\n\t\t\t\tpreviousClientId={ clientId }\n\t\t\t\tnextClientId={ blockOrder[ index + 1 ] }\n\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-block-list__insertion-point-inserter is-with-inserter\">\n\t\t\t\t\t<Inserter\n\t\t\t\t\t\tposition=\"bottom center\"\n\t\t\t\t\t\tclientId={ blockOrder[ index + 1 ] }\n\t\t\t\t\t\t__experimentalIsQuick\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</BlockPopoverInbetween>\n\t\t);\n\t} );\n}\n\nexport default ZoomOutModeInserters;\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { Popover } from '@wordpress/components';\nimport { __unstableUseShortcutEventMatch as useShortcutEventMatch } from '@wordpress/keyboard-shortcuts';\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tInsertionPointOpenRef,\n\tdefault as InsertionPoint,\n} from './insertion-point';\nimport SelectedBlockPopover from './selected-block-popover';\nimport { store as blockEditorStore } from '../../store';\nimport BlockContextualToolbar from './block-contextual-toolbar';\nimport usePopoverScroll from '../block-popover/use-popover-scroll';\nimport ZoomOutModeInserters from './zoom-out-mode-inserters';\n\nfunction selector( select ) {\n\tconst { __unstableGetEditorMode, getSettings, isTyping } =\n\t\tselect( blockEditorStore );\n\n\treturn {\n\t\tisZoomOutMode: __unstableGetEditorMode() === 'zoom-out',\n\t\thasFixedToolbar: getSettings().hasFixedToolbar,\n\t\tisTyping: isTyping(),\n\t};\n}\n\n/**\n * Renders block tools (the block toolbar, select/navigation mode toolbar, the\n * insertion point and a slot for the inline rich text toolbar). Must be wrapped\n * around the block content and editor styles wrapper or iframe.\n *\n * @param {Object} $0                      Props.\n * @param {Object} $0.children             The block content and style container.\n * @param {Object} $0.__unstableContentRef Ref holding the content scroll container.\n */\nexport default function BlockTools( {\n\tchildren,\n\t__unstableContentRef,\n\t...props\n} ) {\n\tconst isLargeViewport = useViewportMatch( 'medium' );\n\tconst { hasFixedToolbar, isZoomOutMode, isTyping } = useSelect(\n\t\tselector,\n\t\t[]\n\t);\n\tconst isMatch = useShortcutEventMatch();\n\tconst { getSelectedBlockClientIds, getBlockRootClientId } =\n\t\tuseSelect( blockEditorStore );\n\tconst {\n\t\tduplicateBlocks,\n\t\tremoveBlocks,\n\t\tinsertAfterBlock,\n\t\tinsertBeforeBlock,\n\t\tclearSelectedBlock,\n\t\tmoveBlocksUp,\n\t\tmoveBlocksDown,\n\t} = useDispatch( blockEditorStore );\n\n\tfunction onKeyDown( event ) {\n\t\tif ( event.defaultPrevented ) return;\n\n\t\tif ( isMatch( 'core/block-editor/move-up', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksUp( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/move-down', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst rootClientId = getBlockRootClientId( clientIds[ 0 ] );\n\t\t\t\tmoveBlocksDown( clientIds, rootClientId );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/duplicate', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tduplicateBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/remove', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tremoveBlocks( clientIds );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-after', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertAfterBlock( clientIds[ clientIds.length - 1 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/insert-before', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tinsertBeforeBlock( clientIds[ 0 ] );\n\t\t\t}\n\t\t} else if ( isMatch( 'core/block-editor/unselect', event ) ) {\n\t\t\tconst clientIds = getSelectedBlockClientIds();\n\t\t\tif ( clientIds.length ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearSelectedBlock();\n\t\t\t\tevent.target.ownerDocument.defaultView\n\t\t\t\t\t.getSelection()\n\t\t\t\t\t.removeAllRanges();\n\t\t\t\t__unstableContentRef?.current.focus();\n\t\t\t}\n\t\t}\n\t}\n\n\tconst blockToolbarRef = usePopoverScroll( __unstableContentRef );\n\tconst blockToolbarAfterRef = usePopoverScroll( __unstableContentRef );\n\n\treturn (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div { ...props } onKeyDown={ onKeyDown }>\n\t\t\t<InsertionPointOpenRef.Provider value={ useRef( false ) }>\n\t\t\t\t{ ! isTyping && (\n\t\t\t\t\t<InsertionPoint\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! isZoomOutMode &&\n\t\t\t\t\t( hasFixedToolbar || ! isLargeViewport ) && (\n\t\t\t\t\t\t<BlockContextualToolbar isFixed />\n\t\t\t\t\t) }\n\t\t\t\t{ /* Even if the toolbar is fixed, the block popover is still\n\t\t\t\t\tneeded for navigation and zoom-out mode. */ }\n\t\t\t\t<SelectedBlockPopover\n\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t/>\n\t\t\t\t{ /* Used for the inline rich text toolbar. */ }\n\t\t\t\t<Popover.Slot name=\"block-toolbar\" ref={ blockToolbarRef } />\n\t\t\t\t{ children }\n\t\t\t\t{ /* Used for inline rich text popovers. */ }\n\t\t\t\t<Popover.Slot\n\t\t\t\t\tname=\"__unstable-block-tools-after\"\n\t\t\t\t\tref={ blockToolbarAfterRef }\n\t\t\t\t/>\n\t\t\t\t{ isZoomOutMode && (\n\t\t\t\t\t<ZoomOutModeInserters\n\t\t\t\t\t\t__unstableContentRef={ __unstableContentRef }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</InsertionPointOpenRef.Provider>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InserterMenu from './menu';\nimport { store as blockEditorStore } from '../../store';\n\nconst noop = () => {};\n\nfunction InserterLibrary(\n\t{\n\t\trootClientId,\n\t\tclientId,\n\t\tisAppender,\n\t\tshowInserterHelpPanel,\n\t\tshowMostUsedBlocks = false,\n\t\t__experimentalInsertionIndex,\n\t\t__experimentalFilterValue,\n\t\tonSelect = noop,\n\t\tshouldFocusBlock = false,\n\t},\n\tref\n) {\n\tconst { destinationRootClientId, prioritizePatterns } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId, getSettings } =\n\t\t\t\tselect( blockEditorStore );\n\n\t\t\tconst _rootClientId =\n\t\t\t\trootClientId || getBlockRootClientId( clientId ) || undefined;\n\t\t\treturn {\n\t\t\t\tdestinationRootClientId: _rootClientId,\n\t\t\t\tprioritizePatterns:\n\t\t\t\t\tgetSettings().__experimentalPreferPatternsOnRoot,\n\t\t\t};\n\t\t},\n\t\t[ clientId, rootClientId ]\n\t);\n\n\treturn (\n\t\t<InserterMenu\n\t\t\tonSelect={ onSelect }\n\t\t\trootClientId={ destinationRootClientId }\n\t\t\tclientId={ clientId }\n\t\t\tisAppender={ isAppender }\n\t\t\tshowInserterHelpPanel={ showInserterHelpPanel }\n\t\t\tshowMostUsedBlocks={ showMostUsedBlocks }\n\t\t\t__experimentalInsertionIndex={ __experimentalInsertionIndex }\n\t\t\t__experimentalFilterValue={ __experimentalFilterValue }\n\t\t\tshouldFocusBlock={ shouldFocusBlock }\n\t\t\tprioritizePatterns={ prioritizePatterns }\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( InserterLibrary );\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useDispatch } from '@wordpress/data';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcuts() {\n\treturn null;\n}\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/duplicate',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Duplicate the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryShift',\n\t\t\t\tcharacter: 'd',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/remove',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Remove the selected block(s).' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'access',\n\t\t\t\tcharacter: 'z',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-before',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block before the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/insert-after',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __(\n\t\t\t\t'Insert a new block after the selected block(s).'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primaryAlt',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/delete-multi-selection',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Delete selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'del',\n\t\t\t},\n\t\t\taliases: [\n\t\t\t\t{\n\t\t\t\t\tcharacter: 'backspace',\n\t\t\t\t},\n\t\t\t],\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/select-all',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __(\n\t\t\t\t'Select all text when typing. Press again to select all blocks.'\n\t\t\t),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 'a',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/unselect',\n\t\t\tcategory: 'selection',\n\t\t\tdescription: __( 'Clear selection.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tcharacter: 'escape',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/focus-toolbar',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Navigate to the nearest toolbar.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'alt',\n\t\t\t\tcharacter: 'F10',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-up',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) up.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 't',\n\t\t\t},\n\t\t} );\n\n\t\tregisterShortcut( {\n\t\t\tname: 'core/block-editor/move-down',\n\t\t\tcategory: 'block',\n\t\t\tdescription: __( 'Move the selected block(s) down.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'secondary',\n\t\t\t\tcharacter: 'y',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nKeyboardShortcuts.Register = KeyboardShortcutsRegister;\n\nexport default KeyboardShortcuts;\n","/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Scrolls the multi block selection end into view if not in view already. This\n * is important to do after selection by keyboard.\n *\n * @deprecated\n */\nexport function MultiSelectScrollIntoView() {\n\tdeprecated( 'wp.blockEditor.MultiSelectScrollIntoView', {\n\t\thint: 'This behaviour is now built-in.',\n\t\tsince: '5.8',\n\t} );\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { isTextField } from '@wordpress/dom';\nimport {\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n\tESCAPE,\n\tTAB,\n} from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\n/**\n * Set of key codes upon which typing is to be initiated on a keydown event.\n *\n * @type {Set<number>}\n */\nconst KEY_DOWN_ELIGIBLE_KEY_CODES = new Set( [\n\tUP,\n\tRIGHT,\n\tDOWN,\n\tLEFT,\n\tENTER,\n\tBACKSPACE,\n] );\n\n/**\n * Returns true if a given keydown event can be inferred as intent to start\n * typing, or false otherwise. A keydown is considered eligible if it is a\n * text navigation without shift active.\n *\n * @param {KeyboardEvent} event Keydown event to test.\n *\n * @return {boolean} Whether event is eligible to start typing.\n */\nfunction isKeyDownEligibleForStartTyping( event ) {\n\tconst { keyCode, shiftKey } = event;\n\treturn ! shiftKey && KEY_DOWN_ELIGIBLE_KEY_CODES.has( keyCode );\n}\n\n/**\n * Removes the `isTyping` flag when the mouse moves in the document of the given\n * element.\n */\nexport function useMouseMoveTypingReset() {\n\tconst isTyping = useSelect(\n\t\t( select ) => select( blockEditorStore ).isTyping(),\n\t\t[]\n\t);\n\tconst { stopTyping } = useDispatch( blockEditorStore );\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! isTyping ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tlet lastClientX;\n\t\t\tlet lastClientY;\n\n\t\t\t/**\n\t\t\t * On mouse move, unset typing flag if user has moved cursor.\n\t\t\t *\n\t\t\t * @param {MouseEvent} event Mousemove event.\n\t\t\t */\n\t\t\tfunction stopTypingOnMouseMove( event ) {\n\t\t\t\tconst { clientX, clientY } = event;\n\n\t\t\t\t// We need to check that the mouse really moved because Safari\n\t\t\t\t// triggers mousemove events when shift or ctrl are pressed.\n\t\t\t\tif (\n\t\t\t\t\tlastClientX &&\n\t\t\t\t\tlastClientY &&\n\t\t\t\t\t( lastClientX !== clientX || lastClientY !== clientY )\n\t\t\t\t) {\n\t\t\t\t\tstopTyping();\n\t\t\t\t}\n\n\t\t\t\tlastClientX = clientX;\n\t\t\t\tlastClientY = clientY;\n\t\t\t}\n\n\t\t\townerDocument.addEventListener(\n\t\t\t\t'mousemove',\n\t\t\t\tstopTypingOnMouseMove\n\t\t\t);\n\n\t\t\treturn () => {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'mousemove',\n\t\t\t\t\tstopTypingOnMouseMove\n\t\t\t\t);\n\t\t\t};\n\t\t},\n\t\t[ isTyping, stopTyping ]\n\t);\n}\n\n/**\n * Sets and removes the `isTyping` flag based on user actions:\n *\n * - Sets the flag if the user types within the given element.\n * - Removes the flag when the user selects some text, focusses a non-text\n *   field, presses ESC or TAB, or moves the mouse in the document.\n */\nexport function useTypingObserver() {\n\tconst { isTyping, hasInlineToolbar } = useSelect( ( select ) => {\n\t\tconst { isTyping: _isTyping, getSettings } = select( blockEditorStore );\n\t\treturn {\n\t\t\tisTyping: _isTyping(),\n\t\t\thasInlineToolbar: getSettings().hasInlineToolbar,\n\t\t};\n\t}, [] );\n\tconst { startTyping, stopTyping } = useDispatch( blockEditorStore );\n\n\tconst ref1 = useMouseMoveTypingReset();\n\tconst ref2 = useRefEffect(\n\t\t( node ) => {\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\t\t\tconst selection = defaultView.getSelection();\n\n\t\t\t// Listeners to stop typing should only be added when typing.\n\t\t\t// Listeners to start typing should only be added when not typing.\n\t\t\tif ( isTyping ) {\n\t\t\t\tlet timerId;\n\n\t\t\t\t/**\n\t\t\t\t * Stops typing when focus transitions to a non-text field element.\n\t\t\t\t *\n\t\t\t\t * @param {FocusEvent} event Focus event.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnNonTextField( event ) {\n\t\t\t\t\tconst { target } = event;\n\n\t\t\t\t\t// Since focus to a non-text field via arrow key will trigger\n\t\t\t\t\t// before the keydown event, wait until after current stack\n\t\t\t\t\t// before evaluating whether typing is to be stopped. Otherwise,\n\t\t\t\t\t// typing will re-start.\n\t\t\t\t\ttimerId = defaultView.setTimeout( () => {\n\t\t\t\t\t\tif ( ! isTextField( target ) ) {\n\t\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Unsets typing flag if user presses Escape while typing flag is\n\t\t\t\t * active.\n\t\t\t\t *\n\t\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to\n\t\t\t\t *                              interpret.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnEscapeKey( event ) {\n\t\t\t\t\tconst { keyCode } = event;\n\n\t\t\t\t\tif ( keyCode === ESCAPE || keyCode === TAB ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * On selection change, unset typing flag if user has made an\n\t\t\t\t * uncollapsed (shift) selection.\n\t\t\t\t */\n\t\t\t\tfunction stopTypingOnSelectionUncollapse() {\n\t\t\t\t\tif ( ! selection.isCollapsed ) {\n\t\t\t\t\t\tstopTyping();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tnode.addEventListener( 'focus', stopTypingOnNonTextField );\n\t\t\t\tnode.addEventListener( 'keydown', stopTypingOnEscapeKey );\n\n\t\t\t\tif ( ! hasInlineToolbar ) {\n\t\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t\t'selectionchange',\n\t\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn () => {\n\t\t\t\t\tdefaultView.clearTimeout( timerId );\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'focus',\n\t\t\t\t\t\tstopTypingOnNonTextField\n\t\t\t\t\t);\n\t\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t\t'keydown',\n\t\t\t\t\t\tstopTypingOnEscapeKey\n\t\t\t\t\t);\n\t\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t\t'selectionchange',\n\t\t\t\t\t\tstopTypingOnSelectionUncollapse\n\t\t\t\t\t);\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles a keypress or keydown event to infer intention to start\n\t\t\t * typing.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keypress or keydown event to interpret.\n\t\t\t */\n\t\t\tfunction startTypingInTextField( event ) {\n\t\t\t\tconst { type, target } = event;\n\n\t\t\t\t// Abort early if already typing, or key press is incurred outside a\n\t\t\t\t// text field (e.g. arrow-ing through toolbar buttons).\n\t\t\t\t// Ignore typing if outside the current DOM container\n\t\t\t\tif ( ! isTextField( target ) || ! node.contains( target ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Special-case keydown because certain keys do not emit a keypress\n\t\t\t\t// event. Conversely avoid keydown as the canonical event since\n\t\t\t\t// there are many keydown which are explicitly not targeted for\n\t\t\t\t// typing.\n\t\t\t\tif (\n\t\t\t\t\ttype === 'keydown' &&\n\t\t\t\t\t! isKeyDownEligibleForStartTyping( event )\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tstartTyping();\n\t\t\t}\n\n\t\t\tnode.addEventListener( 'keypress', startTypingInTextField );\n\t\t\tnode.addEventListener( 'keydown', startTypingInTextField );\n\n\t\t\treturn () => {\n\t\t\t\tnode.removeEventListener( 'keypress', startTypingInTextField );\n\t\t\t\tnode.removeEventListener( 'keydown', startTypingInTextField );\n\t\t\t};\n\t\t},\n\t\t[ isTyping, hasInlineToolbar, startTyping, stopTyping ]\n\t);\n\n\treturn useMergeRefs( [ ref1, ref2 ] );\n}\n\nfunction ObserveTyping( { children } ) {\n\treturn <div ref={ useTypingObserver() }>{ children }</div>;\n}\n\n/**\n * @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/observe-typing/README.md\n */\nexport default ObserveTyping;\n","/**\n * WordPress dependencies\n */\nimport { useRefEffect } from '@wordpress/compose';\nimport { computeCaretRect, getScrollContainer } from '@wordpress/dom';\nimport { useSelect } from '@wordpress/data';\nimport { UP, DOWN, LEFT, RIGHT } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { store as blockEditorStore } from '../../store';\n\nconst isIE = window.navigator.userAgent.indexOf( 'Trident' ) !== -1;\nconst arrowKeyCodes = new Set( [ UP, DOWN, LEFT, RIGHT ] );\nconst initialTriggerPercentage = 0.75;\n\nexport function useTypewriter() {\n\tconst hasSelectedBlock = useSelect(\n\t\t( select ) => select( blockEditorStore ).hasSelectedBlock(),\n\t\t[]\n\t);\n\n\treturn useRefEffect(\n\t\t( node ) => {\n\t\t\tif ( ! hasSelectedBlock ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { ownerDocument } = node;\n\t\t\tconst { defaultView } = ownerDocument;\n\n\t\t\tlet scrollResizeRafId;\n\t\t\tlet onKeyDownRafId;\n\n\t\t\tlet caretRect;\n\n\t\t\tfunction onScrollResize() {\n\t\t\t\tif ( scrollResizeRafId ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tscrollResizeRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tcomputeCaretRectangle();\n\t\t\t\t\tscrollResizeRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tfunction onKeyDown( event ) {\n\t\t\t\t// Ensure the any remaining request is cancelled.\n\t\t\t\tif ( onKeyDownRafId ) {\n\t\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t\t}\n\n\t\t\t\t// Use an animation frame for a smooth result.\n\t\t\t\tonKeyDownRafId = defaultView.requestAnimationFrame( () => {\n\t\t\t\t\tmaintainCaretPosition( event );\n\t\t\t\t\tonKeyDownRafId = null;\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Maintains the scroll position after a selection change caused by a\n\t\t\t * keyboard event.\n\t\t\t *\n\t\t\t * @param {KeyboardEvent} event Keyboard event.\n\t\t\t */\n\t\t\tfunction maintainCaretPosition( { keyCode } ) {\n\t\t\t\tif ( ! isSelectionEligibleForScroll() ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst currentCaretRect = computeCaretRect( defaultView );\n\n\t\t\t\tif ( ! currentCaretRect ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// If for some reason there is no position set to be scrolled to, let\n\t\t\t\t// this be the position to be scrolled to in the future.\n\t\t\t\tif ( ! caretRect ) {\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Even though enabling the typewriter effect for arrow keys results in\n\t\t\t\t// a pleasant experience, it may not be the case for everyone, so, for\n\t\t\t\t// now, let's disable it.\n\t\t\t\tif ( arrowKeyCodes.has( keyCode ) ) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst diff = currentCaretRect.top - caretRect.top;\n\n\t\t\t\tif ( diff === 0 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainer = getScrollContainer( node );\n\n\t\t\t\t// The page must be scrollable.\n\t\t\t\tif ( ! scrollContainer ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst windowScroll = scrollContainer === ownerDocument.body;\n\t\t\t\tconst scrollY = windowScroll\n\t\t\t\t\t? defaultView.scrollY\n\t\t\t\t\t: scrollContainer.scrollTop;\n\t\t\t\tconst scrollContainerY = windowScroll\n\t\t\t\t\t? 0\n\t\t\t\t\t: scrollContainer.getBoundingClientRect().top;\n\t\t\t\tconst relativeScrollPosition = windowScroll\n\t\t\t\t\t? caretRect.top / defaultView.innerHeight\n\t\t\t\t\t: ( caretRect.top - scrollContainerY ) /\n\t\t\t\t\t  ( defaultView.innerHeight - scrollContainerY );\n\n\t\t\t\t// If the scroll position is at the start, the active editable element\n\t\t\t\t// is the last one, and the caret is positioned within the initial\n\t\t\t\t// trigger percentage of the page, do not scroll the page.\n\t\t\t\t// The typewriter effect should not kick in until an empty page has been\n\t\t\t\t// filled with the initial trigger percentage or the user scrolls\n\t\t\t\t// intentionally down.\n\t\t\t\tif (\n\t\t\t\t\tscrollY === 0 &&\n\t\t\t\t\trelativeScrollPosition < initialTriggerPercentage &&\n\t\t\t\t\tisLastEditableNode()\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst scrollContainerHeight = windowScroll\n\t\t\t\t\t? defaultView.innerHeight\n\t\t\t\t\t: scrollContainer.clientHeight;\n\n\t\t\t\t// Abort if the target scroll position would scroll the caret out of\n\t\t\t\t// view.\n\t\t\t\tif (\n\t\t\t\t\t// The caret is under the lower fold.\n\t\t\t\t\tcaretRect.top + caretRect.height >\n\t\t\t\t\t\tscrollContainerY + scrollContainerHeight ||\n\t\t\t\t\t// The caret is above the upper fold.\n\t\t\t\t\tcaretRect.top < scrollContainerY\n\t\t\t\t) {\n\t\t\t\t\t// Reset the caret position to maintain.\n\t\t\t\t\tcaretRect = currentCaretRect;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( windowScroll ) {\n\t\t\t\t\tdefaultView.scrollBy( 0, diff );\n\t\t\t\t} else {\n\t\t\t\t\tscrollContainer.scrollTop += diff;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Adds a `selectionchange` listener to reset the scroll position to be\n\t\t\t * maintained.\n\t\t\t */\n\t\t\tfunction addSelectionChangeListener() {\n\t\t\t\townerDocument.addEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained during a `selectionchange`\n\t\t\t * event. Also removes the listener, so it acts as a one-time listener.\n\t\t\t */\n\t\t\tfunction computeCaretRectOnSelectionChange() {\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\t\t\t\tcomputeCaretRectangle();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Resets the scroll position to be maintained.\n\t\t\t */\n\t\t\tfunction computeCaretRectangle() {\n\t\t\t\tif ( isSelectionEligibleForScroll() ) {\n\t\t\t\t\tcaretRect = computeCaretRect( defaultView );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Checks if the current situation is elegible for scroll:\n\t\t\t * - There should be one and only one block selected.\n\t\t\t * - The component must contain the selection.\n\t\t\t * - The active element must be contenteditable.\n\t\t\t */\n\t\t\tfunction isSelectionEligibleForScroll() {\n\t\t\t\treturn (\n\t\t\t\t\tnode.contains( ownerDocument.activeElement ) &&\n\t\t\t\t\townerDocument.activeElement.isContentEditable\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tfunction isLastEditableNode() {\n\t\t\t\tconst editableNodes = node.querySelectorAll(\n\t\t\t\t\t'[contenteditable=\"true\"]'\n\t\t\t\t);\n\t\t\t\tconst lastEditableNode =\n\t\t\t\t\teditableNodes[ editableNodes.length - 1 ];\n\t\t\t\treturn lastEditableNode === ownerDocument.activeElement;\n\t\t\t}\n\n\t\t\t// When the user scrolls or resizes, the scroll position should be\n\t\t\t// reset.\n\t\t\tdefaultView.addEventListener( 'scroll', onScrollResize, true );\n\t\t\tdefaultView.addEventListener( 'resize', onScrollResize, true );\n\n\t\t\tnode.addEventListener( 'keydown', onKeyDown );\n\t\t\tnode.addEventListener( 'keyup', maintainCaretPosition );\n\t\t\tnode.addEventListener( 'mousedown', addSelectionChangeListener );\n\t\t\tnode.addEventListener( 'touchstart', addSelectionChangeListener );\n\n\t\t\treturn () => {\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tdefaultView.removeEventListener(\n\t\t\t\t\t'resize',\n\t\t\t\t\tonScrollResize,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tnode.removeEventListener( 'keydown', onKeyDown );\n\t\t\t\tnode.removeEventListener( 'keyup', maintainCaretPosition );\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'mousedown',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\t\t\t\tnode.removeEventListener(\n\t\t\t\t\t'touchstart',\n\t\t\t\t\taddSelectionChangeListener\n\t\t\t\t);\n\n\t\t\t\townerDocument.removeEventListener(\n\t\t\t\t\t'selectionchange',\n\t\t\t\t\tcomputeCaretRectOnSelectionChange\n\t\t\t\t);\n\n\t\t\t\tdefaultView.cancelAnimationFrame( scrollResizeRafId );\n\t\t\t\tdefaultView.cancelAnimationFrame( onKeyDownRafId );\n\t\t\t};\n\t\t},\n\t\t[ hasSelectedBlock ]\n\t);\n}\n\nfunction Typewriter( { children } ) {\n\treturn (\n\t\t<div ref={ useTypewriter() } className=\"block-editor__typewriter\">\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * The exported component. The implementation of Typewriter faced technical\n * challenges in Internet Explorer, and is simply skipped, rendering the given\n * props children instead.\n *\n * @type {WPComponent}\n */\nconst TypewriterOrIEBypass = isIE ? ( props ) => props.children : Typewriter;\n\n/**\n * Ensures that the text selection keeps the same vertical distance from the\n * viewport during keyboard events within this component. The vertical distance\n * can vary. It is the last clicked or scrolled to position.\n */\nexport default TypewriterOrIEBypass;\n","/**\n * WordPress dependencies\n */\nimport { createContext, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useBlockEditContext } from '../block-edit/context';\n\nconst RenderedRefsContext = createContext( {} );\n\n/**\n * Immutably adds an unique identifier to a set scoped for a given block type.\n *\n * @param {Object} renderedBlocks Rendered blocks grouped by block name\n * @param {string} blockName      Name of the block.\n * @param {*}      uniqueId       Any value that acts as a unique identifier for a block instance.\n *\n * @return {Object} The list of rendered blocks grouped by block name.\n */\nfunction addToBlockType( renderedBlocks, blockName, uniqueId ) {\n\tconst result = {\n\t\t...renderedBlocks,\n\t\t[ blockName ]: renderedBlocks[ blockName ]\n\t\t\t? new Set( renderedBlocks[ blockName ] )\n\t\t\t: new Set(),\n\t};\n\tresult[ blockName ].add( uniqueId );\n\n\treturn result;\n}\n\n/**\n * A React context provider for use with the `useHasRecursion` hook to prevent recursive\n * renders.\n *\n * Wrap block content with this provider and provide the same `uniqueId` prop as used\n * with `useHasRecursion`.\n *\n * @param {Object}      props\n * @param {*}           props.uniqueId  Any value that acts as a unique identifier for a block instance.\n * @param {string}      props.blockName Optional block name.\n * @param {JSX.Element} props.children  React children.\n *\n * @return {JSX.Element} A React element.\n */\nexport function RecursionProvider( { children, uniqueId, blockName = '' } ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\n\tblockName = blockName || name;\n\n\tconst newRenderedBlocks = useMemo(\n\t\t() => addToBlockType( previouslyRenderedBlocks, blockName, uniqueId ),\n\t\t[ previouslyRenderedBlocks, blockName, uniqueId ]\n\t);\n\n\treturn (\n\t\t<RenderedRefsContext.Provider value={ newRenderedBlocks }>\n\t\t\t{ children }\n\t\t</RenderedRefsContext.Provider>\n\t);\n}\n\n/**\n * A React hook for keeping track of blocks previously rendered up in the block\n * tree. Blocks susceptible to recursion can use this hook in their `Edit`\n * function to prevent said recursion.\n *\n * Use this with the `RecursionProvider` component, using the same `uniqueId` value\n * for both the hook and the provider.\n *\n * @param {*}      uniqueId  Any value that acts as a unique identifier for a block instance.\n * @param {string} blockName Optional block name.\n *\n * @return {boolean} A boolean describing whether the provided id has already been rendered.\n */\nexport function useHasRecursion( uniqueId, blockName = '' ) {\n\tconst previouslyRenderedBlocks = useContext( RenderedRefsContext );\n\tconst { name } = useBlockEditContext();\n\tblockName = blockName || name;\n\treturn Boolean( previouslyRenderedBlocks[ blockName ]?.has( uniqueId ) );\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\tButton,\n\t__experimentalText as Text,\n} from '@wordpress/components';\nimport { closeSmall } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\n\nexport default function InspectorPopoverHeader( {\n\ttitle,\n\thelp,\n\tactions = [],\n\tonClose,\n} ) {\n\treturn (\n\t\t<VStack className=\"block-editor-inspector-popover-header\" spacing={ 4 }>\n\t\t\t<HStack alignment=\"center\">\n\t\t\t\t<Heading\n\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__heading\"\n\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\tsize={ 13 }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<Spacer />\n\t\t\t\t{ actions.map( ( { label, icon, onClick } ) => (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tvariant={ ! icon && 'tertiary' }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! icon && label }\n\t\t\t\t\t</Button>\n\t\t\t\t) ) }\n\t\t\t\t{ onClose && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"block-editor-inspector-popover-header__action\"\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/>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t\t{ help && <Text>{ help }</Text> }\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { DateTimePicker } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\nimport { getSettings } from '@wordpress/date';\n\n/**\n * Internal dependencies\n */\nimport InspectorPopoverHeader from '../inspector-popover-header';\n\nfunction PublishDateTimePicker(\n\t{ onClose, onChange, ...additionalProps },\n\tref\n) {\n\treturn (\n\t\t<div ref={ ref } className=\"block-editor-publish-date-time-picker\">\n\t\t\t<InspectorPopoverHeader\n\t\t\t\ttitle={ __( 'Publish' ) }\n\t\t\t\tactions={ [\n\t\t\t\t\t{\n\t\t\t\t\t\tlabel: __( 'Now' ),\n\t\t\t\t\t\tonClick: () => onChange?.( null ),\n\t\t\t\t\t},\n\t\t\t\t] }\n\t\t\t\tonClose={ onClose }\n\t\t\t/>\n\t\t\t<DateTimePicker\n\t\t\t\tstartOfWeek={ getSettings().l10n.startOfWeek }\n\t\t\t\t__nextRemoveHelpButton\n\t\t\t\t__nextRemoveResetButton\n\t\t\t\tonChange={ onChange }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</div>\n\t);\n}\n\nexport default forwardRef( PublishDateTimePicker );\n","const ELEMENT_CLASS_NAMES = {\n\tbutton: 'wp-element-button',\n\tcaption: 'wp-element-caption',\n};\n\nexport const __experimentalGetElementClassName = ( element ) => {\n\treturn ELEMENT_CLASS_NAMES[ element ] ? ELEMENT_CLASS_NAMES[ element ] : '';\n};\n","/** @typedef {import('@wordpress/blocks').WPBlockVariation} WPBlockVariation */\n\nfunction matchesAttributes( blockAttributes, variation ) {\n\treturn Object.entries( variation ).every( ( [ key, value ] ) => {\n\t\tif (\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof blockAttributes[ key ] === 'object'\n\t\t) {\n\t\t\treturn matchesAttributes( blockAttributes[ key ], value );\n\t\t}\n\t\treturn blockAttributes[ key ] === value;\n\t} );\n}\n\n/**\n * Matches the provided block variations with a block's attributes. If no match\n * or more than one matches are found it returns `undefined`. If a single match is\n * found it returns it.\n *\n * This is a simple implementation for now as it takes into account only the attributes\n * of a block variation and not `InnerBlocks`.\n *\n * @param {Object}             blockAttributes - The block attributes to try to find a match.\n * @param {WPBlockVariation[]} variations      - A list of block variations to test for a match.\n * @return {?WPBlockVariation} - If a match is found returns it. If not or more than one matches are found returns `undefined`.\n */\nexport const __experimentalGetMatchingVariation = (\n\tblockAttributes,\n\tvariations\n) => {\n\tif ( ! variations || ! blockAttributes ) return;\n\tconst matches = variations.filter( ( { attributes } ) => {\n\t\tif ( ! attributes || ! Object.keys( attributes ).length ) return false;\n\t\treturn matchesAttributes( blockAttributes, attributes );\n\t} );\n\tif ( matches.length !== 1 ) return;\n\treturn matches[ 0 ];\n};\n","/**\n * Converts string to object { value, unit }.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit\n */\nfunction parseUnit( cssUnit ) {\n\tconst match = cssUnit\n\t\t?.trim()\n\t\t.match(\n\t\t\t/^(0?[-.]?\\d*\\.?\\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/\n\t\t);\n\tif ( ! isNaN( cssUnit ) && ! isNaN( parseFloat( cssUnit ) ) ) {\n\t\treturn { value: parseFloat( cssUnit ), unit: 'px' };\n\t}\n\treturn match\n\t\t? { value: parseFloat( match[ 1 ] ) || match[ 1 ], unit: match[ 2 ] }\n\t\t: { value: cssUnit, unit: undefined };\n}\n/**\n * Evaluate a math expression.\n *\n * @param {string} expression\n * @return {number} evaluated expression.\n */\nfunction calculate( expression ) {\n\treturn Function( `'use strict'; return (${ expression })` )();\n}\n\n/**\n * Calculates the css function value for the supported css functions such as max, min, clamp and calc.\n *\n * @param {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops.\n * @param {Object} options\n * @return {string} unit containing the unit in PX.\n */\nfunction getFunctionUnitValue( functionUnitValue, options ) {\n\tconst functionUnit = functionUnitValue.split( /[(),]/g ).filter( Boolean );\n\n\tconst units = functionUnit\n\t\t.slice( 1 )\n\t\t.map( ( unit ) => parseUnit( getPxFromCssUnit( unit, options ) ).value )\n\t\t.filter( Boolean );\n\n\tswitch ( functionUnit[ 0 ] ) {\n\t\tcase 'min':\n\t\t\treturn Math.min( ...units ) + 'px';\n\t\tcase 'max':\n\t\t\treturn Math.max( ...units ) + 'px';\n\t\tcase 'clamp':\n\t\t\tif ( units.length !== 3 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif ( units[ 1 ] < units[ 0 ] ) {\n\t\t\t\treturn units[ 0 ] + 'px';\n\t\t\t}\n\t\t\tif ( units[ 1 ] > units[ 2 ] ) {\n\t\t\t\treturn units[ 2 ] + 'px';\n\t\t\t}\n\t\t\treturn units[ 1 ] + 'px';\n\t\tcase 'calc':\n\t\t\treturn units[ 0 ] + 'px';\n\t}\n}\n\n/**\n * Take a css function such as min, max, calc, clamp and returns parsedUnit\n *\n * How this works for the nested function is that it first replaces the inner function call.\n * Then it tackles the outer onces.\n * So for example: min( max(25px, 35px), 40px )\n * in the first pass we would replace max(25px, 35px) with 35px.\n * then we would try to evaluate min( 35px, 40px )\n * and then finally return 35px.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit object.\n */\nfunction parseUnitFunction( cssUnit ) {\n\twhile ( true ) {\n\t\tconst currentCssUnit = cssUnit;\n\t\tconst regExp = /(max|min|calc|clamp)\\(([^()]*)\\)/g;\n\t\tconst matches = regExp.exec( cssUnit ) || [];\n\t\tif ( matches[ 0 ] ) {\n\t\t\tconst functionUnitValue = getFunctionUnitValue( matches[ 0 ] );\n\t\t\tcssUnit = cssUnit.replace( matches[ 0 ], functionUnitValue );\n\t\t}\n\n\t\t// If the unit hasn't been modified or we have a single value break free.\n\t\tif ( cssUnit === currentCssUnit || parseFloat( cssUnit ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parseUnit( cssUnit );\n}\n/**\n * Return true if we think this is a math expression.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {boolean} Whether the cssUnit is a math expression.\n */\nfunction isMathExpression( cssUnit ) {\n\tfor ( let i = 0; i < cssUnit.length; i++ ) {\n\t\tif ( [ '+', '-', '/', '*' ].includes( cssUnit[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n * Evaluates the math expression and return a px value.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {string} return a converfted value to px.\n */\nfunction evalMathExpression( cssUnit ) {\n\tlet errorFound = false;\n\t// Convert every part of the expression to px values.\n\tconst cssUnitsBits = cssUnit.split( /[+-/*/]/g ).filter( Boolean );\n\tfor ( const unit of cssUnitsBits ) {\n\t\t// Standardize the unit to px and extract the value.\n\t\tconst parsedUnit = parseUnit( getPxFromCssUnit( unit ) );\n\t\tif ( ! parseFloat( parsedUnit.value ) ) {\n\t\t\terrorFound = true;\n\t\t\t// End early since we are dealing with a null value.\n\t\t\tbreak;\n\t\t}\n\t\tcssUnit = cssUnit.replace( unit, parsedUnit.value );\n\t}\n\n\treturn errorFound ? null : calculate( cssUnit ).toFixed( 0 ) + 'px';\n}\n\n/**\n * Convert a parsedUnit object to px value.\n *\n * @param {Object} parsedUnit\n * @param {Object} options\n * @return {string} or {null} returns the converted with in a px value format.\n */\nfunction convertParsedUnitToPx( parsedUnit, options ) {\n\tconst PIXELS_PER_INCH = 96;\n\tconst ONE_PERCENT = 0.01;\n\n\tconst defaultProperties = {\n\t\tfontSize: 16,\n\t\tlineHeight: 16,\n\t\twidth: 375,\n\t\theight: 812,\n\t\ttype: 'font',\n\t};\n\n\tconst setOptions = Object.assign( {}, defaultProperties, options );\n\n\tconst relativeUnits = {\n\t\tem: setOptions.fontSize,\n\t\trem: setOptions.fontSize,\n\t\tvh: setOptions.height * ONE_PERCENT,\n\t\tvw: setOptions.width * ONE_PERCENT,\n\t\tvmin:\n\t\t\t( setOptions.width < setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\tvmax:\n\t\t\t( setOptions.width > setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\t'%':\n\t\t\t( setOptions.type === 'font'\n\t\t\t\t? setOptions.fontSize\n\t\t\t\t: setOptions.width ) * ONE_PERCENT,\n\t\tch: 8, // The advance measure (width) of the glyph \"0\" of the element's font. Approximate\n\t\tex: 7.15625, // X-height of the element's font. Approximate.\n\t\tlh: setOptions.lineHeight,\n\t};\n\n\tconst absoluteUnits = {\n\t\tin: PIXELS_PER_INCH,\n\t\tcm: PIXELS_PER_INCH / 2.54,\n\t\tmm: PIXELS_PER_INCH / 25.4,\n\t\tpt: PIXELS_PER_INCH / 72,\n\t\tpc: PIXELS_PER_INCH / 6,\n\t\tpx: 1,\n\t\tQ: PIXELS_PER_INCH / 2.54 / 40,\n\t};\n\n\tif ( relativeUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( relativeUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\tif ( absoluteUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( absoluteUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the px value of a cssUnit.\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nexport function getPxFromCssUnit( cssUnit, options = {} ) {\n\tif ( Number.isFinite( cssUnit ) ) {\n\t\treturn cssUnit.toFixed( 0 ) + 'px';\n\t}\n\tif ( cssUnit === undefined ) {\n\t\treturn null;\n\t}\n\tlet parsedUnit = parseUnit( cssUnit );\n\n\tif ( ! parsedUnit.unit ) {\n\t\tparsedUnit = parseUnitFunction( cssUnit );\n\t}\n\n\tif ( isMathExpression( cssUnit ) && ! parsedUnit.unit ) {\n\t\treturn evalMathExpression( cssUnit );\n\t}\n\n\treturn convertParsedUnitToPx( parsedUnit, options );\n}\n\n// Use simple cache.\nconst cache = {};\n/**\n * Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit;\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nfunction memoizedGetPxFromCssUnit( cssUnit, options = {} ) {\n\tconst hash = cssUnit + hashOptions( options );\n\n\tif ( ! cache[ hash ] ) {\n\t\tcache[ hash ] = getPxFromCssUnit( cssUnit, options );\n\t}\n\treturn cache[ hash ];\n}\n\nfunction hashOptions( options ) {\n\tlet hash = '';\n\tif ( options.hasOwnProperty( 'fontSize' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'lineHeight' ) ) {\n\t\thash = ':' + options.lineHeight;\n\t}\n\tif ( options.hasOwnProperty( 'width' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'height' ) ) {\n\t\thash = ':' + options.height;\n\t}\n\tif ( options.hasOwnProperty( 'type' ) ) {\n\t\thash = ':' + options.type;\n\t}\n\treturn hash;\n}\n\nexport default memoizedGetPxFromCssUnit;\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","hasOwn","hasOwnProperty","classNames","classes","i","arguments","arg","argType","isArray","inner","apply","toString","join","prop","currentStyle","replace","word","letter","toUpperCase","Diff","buildValues","diff","components","newString","oldString","useLongestToken","componentPos","componentLen","newPos","oldPos","component","removed","slice","count","added","tmp","oldValue","lastComponent","equals","pop","clonePath","path","callback","this","self","done","setTimeout","undefined","castInput","removeEmpty","tokenize","newLen","oldLen","editLength","maxEditLength","bestPath","extractCommon","execEditLength","diagonalPath","basePath","addPath","removePath","canAdd","canRemove","pushComponent","exec","ret","last","commonCount","left","right","comparator","ignoreCase","toLowerCase","array","split","chars","oldStr","newStr","characterDiff","util","elem","container","config","nodeType","getWindow","allowHorizontalScroll","onlyScrollIfNeeded","alignWithTop","alignWithLeft","offsetTop","offsetLeft","offsetBottom","offsetRight","isWin","isWindow","isFramed","frameElement","elemOffset","offset","eh","outerHeight","ew","outerWidth","containerOffset","ch","cw","containerScroll","diffTop","diffBottom","win","winScroll","ww","wh","scrollingElement","body","scrollLeft","top","clientHeight","css","_extends","target","source","_typeof","Symbol","iterator","obj","constructor","getScroll","w","method","d","getScrollLeft","getScrollTop","getOffset","pos","box","y","doc","ownerDocument","docElem","getBoundingClientRect","clientLeft","clientTop","getClientPosition","defaultView","parentWindow","_RE_NUM_NO_PX","RegExp","RE_POS","getComputedStyleX","each","fn","isBorderBoxFn","computedStyle_","val","computedStyle","getPropertyValue","test","rsLeft","pixelLeft","BOX_MODELS","swap","old","getPBMWidth","props","which","j","cssProp","domUtils","getWH","extra","viewportWidth","viewportHeight","docWidth","docHeight","borderBoxValue","isBorderBox","cssBoxValue","Number","borderBoxValueOrIsBorderBox","padding","refWin","max","documentElementProp","compatMode","cssShow","position","visibility","display","getWHIgnoreDisplay","args","v","first","charAt","includeMargin","current","setOffset","clone","overflow","scrollTo","create","ctor","superCtor","super_","enumerable","writable","configurable","TempCtor","lnHeightStr","lnHeight","_lnHeightStyle","lineHeight","_node","createElement","innerHTML","setAttribute","fontSizeStr","fontSize","border","appendChild","removeChild","canUseDOM","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","attachEvent","canUseViewport","screen","isInWorker","_ie","_firefox","_opera","_webkit","_chrome","_ie_real_version","_osx","_windows","_linux","_android","_win64","_iphone","_ipad","_native","_mobile","_populated","_populate","uas","navigator","userAgent","agent","os","NaN","documentMode","trident","ver","UserAgent_DEPRECATED","ie","ieCompatibilityMode","ie64","firefox","opera","webkit","safari","chrome","windows","osx","linux","iphone","mobile","nativeApp","android","ipad","useHasFeature","implementation","hasFeature","eventNameSuffix","capture","eventName","isSupported","element","isEventSupported","normalizeWheel","event","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","deltaY","deltaX","deltaMode","spinX","spinY","pixelX","pixelY","getEventType","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","propName","componentName","location","propFullName","secret","Error","getShim","isRequired","ReactPropTypes","bool","func","number","object","string","symbol","any","arrayOf","elementType","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","extendStatics","__extends","setPrototypeOf","__proto__","b","p","__","__assign","t","s","n","__rest","getOwnPropertySymbols","__esModule","React","getLineHeight","RESIZED","TextareaAutosizeClass","_super","_this","state","textarea","onResize","updateLineHeight","setState","onChange","currentValue","currentTarget","componentDidMount","_a","maxRows","async","componentWillUnmount","render","_b","children","innerRef","maxHeight","ref","componentDidUpdate","defaultProps","rows","propTypes","Component","TextareaAutosize","forwardRef","TextareaAutosize_1","characterMap","allAccents","firstAccent","removeAccents","match","remove","traverse","Traverse","walk","root","cb","immutable","parents","alive","walker","node_","copy","modifiers","keepGoing","concat","parent","isRoot","level","circular","stopHere","before","f","after","pre","post","stop","block","updateState","objectKeys","isLeaf","notLeaf","notRoot","child","isLast","isFirst","src","dst","toS","Date","getTime","isError","message","isBoolean","Boolean","isNumber","isString","String","getPrototypeOf","proto","T","ps","reduce","init","skip","acc","paths","nodes","res","xs","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","a","definition","o","defineProperty","r","toStringTag","addFilter","settings","apiVersion","hasBlockSupport","createSlotFill","inline","other","PREFERENCES_DEFAULTS","insertUsage","SETTINGS_DEFAULTS","alignWide","supportsLayout","colors","slug","color","fontSizes","_x","size","imageDefaultSize","imageSizes","imageEditing","maxWidth","allowedBlockTypes","maxUploadFileSize","allowedMimeTypes","canLockBlocks","__experimentalCanUserUseUnfilteredHTML","__experimentalBlockDirectory","__mobileEnablePageTemplates","__experimentalBlockPatterns","__experimentalBlockPatternCategories","__unstableGalleryWithImageBlocks","generateAnchors","gradients","gradient","__unstableResolvedAssets","styles","scripts","insertAt","elements","castArray","moveTo","from","to","withoutMovedElements","identity","mapBlockOrder","blocks","rootClientId","result","clientId","innerBlocks","mapBlockParents","flattenBlocks","transform","stack","shift","getFlattenedBlocksWithoutAttributes","omit","getFlattenedBlockAttributes","attributes","isUpdatingSameBlockAttribute","action","lastAction","type","isEqual","clientIds","hasSameKeys","buildBlockTree","flattenedBlocks","byClientId","subBlock","updateParentInnerBlocksInTree","tree","updatedClientIds","updateChildrenOfUpdatedClientIds","uncontrolledParents","Set","controlledParents","controlledInnerBlocks","add","order","subClientId","pipe","combineReducers","reducer","id","updatedId","mapValues","newState","subTree","newSubTree","replacedClientIds","filter","parentsOfRemovedBlocks","removedClientIds","updatedBlockUids","fromRootClientId","toRootClientId","omitBy","getAllChildren","keepControlledInnerBlocks","nestedControllers","stateAfterBlocksRemoval","stateAfterInsert","_key","markNextChangeAsNotPersistent","nextState","isExplicitPersistentChange","nextIsPersistentChange","isPersistentChange","IGNORED_ACTION_TYPES","isIgnoredChange","tempState","changes","updates","isEmpty","every","next","accumulator","uniqueByBlock","original","working","blockOrder","subState","mappedBlocks","fromIndex","without","firstClientId","firstIndex","lastClientId","hasControlledInnerBlocks","selectionHelper","updateSelection","blockToSelect","indexToSelect","isTyping","draggedBlocks","selection","selectionStart","attributeKey","startOffset","selectionEnd","endOffset","start","end","startClientId","endClientId","some","isMultiSelecting","isSelectionEnabled","initialPosition","includes","blocksMode","blockListSettings","insertionPoint","__unstableWithInserter","template","isValid","preferences","prevState","blockName","select","blocksStore","getActiveBlockVariation","insert","time","lastBlockAttributesChange","editorMode","mode","hasBlockMovingClientId","automaticChangeStatus","highlightedBlock","isHighlighted","lastBlockInserted","meta","temporarilyEditingAsBlocks","blockVisibility","LEAF_KEY","isShallowEqual","selector","getDependants","rootCache","normalizedGetDependants","getCache","dependants","dependant","cache","caches","isUniqueByDependants","WeakMap","clear","head","createCache","callSelector","len","lastDependants","prev","SVG","xmlns","viewBox","Path","mapRichTextSettings","attributeDefinition","multiline","multilineTag","__unstableMultilineWrapperTags","multilineWrapperTags","__unstablePreserveWhiteSpace","preserveWhiteSpace","EMPTY_ARRAY","getBlockName","socialLinkName","Platform","service","isBlockValid","getBlockAttributes","getBlock","__unstableGetBlockWithoutInnerBlocks","createSelector","getBlocks","treeKey","areInnerBlocksControlled","__unstableGetClientIdWithClientIdsTree","__unstableGetClientIdsTree","getBlockOrder","getClientIdsOfDescendants","collectedIds","givenId","descendantId","getClientIdsWithDescendants","topLevelId","getGlobalBlockCount","__experimentalGetGlobalBlocksByName","foundBlocks","getBlocksByClientId","getBlockCount","getSelectionStart","getSelectionEnd","getBlockSelectionStart","getBlockSelectionEnd","getSelectedBlockCount","getMultiSelectedBlockClientIds","hasSelectedBlock","getSelectedBlockClientId","getSelectedBlock","getBlockRootClientId","getBlockParents","ascending","reverse","getBlockParentsByBlockName","getBlockHierarchyRootClientId","getLowestCommonAncestorWithSelectedBlock","selectedId","clientParents","selectedParents","lowestCommonAncestor","maxDepth","min","getAdjacentBlockClientId","modifier","getFirstMultiSelectedBlockClientId","getLastMultiSelectedBlockClientId","orderSet","nextIndex","getPreviousBlockClientId","getNextBlockClientId","getSelectedBlocksInitialCaretPosition","getSelectedBlockClientIds","startIndex","endIndex","getMultiSelectedBlocks","multiSelectedBlockClientIds","selectedClientIds","isFirstMultiSelectedBlock","isBlockMultiSelected","isAncestorMultiSelected","ancestorClientId","isMultiSelected","getMultiSelectedBlocksStartClientId","getMultiSelectedBlocksEndClientId","__unstableIsFullySelected","selectionAnchor","selectionFocus","__unstableIsSelectionCollapsed","__unstableSelectionHasUnmergeableBlock","getBlockType","merge","__unstableIsSelectionMergeable","isForward","anchorRootClientId","targetBlockClientId","blockToMergeClientId","targetBlockName","blockToMerge","blocksToMerge","switchToBlockType","__unstableGetSelectedBlocksWithPartialSelection","anchorIndex","focusIndex","blockA","blockAType","blockB","blockBType","htmlA","htmlB","attributeDefinitionA","attributeDefinitionB","valueA","html","valueB","text","toHTMLString","getBlockIndex","isBlockSelected","hasSelectedInnerBlock","deep","innerClientId","isBlockWithinSelection","hasMultiSelection","getBlockMode","isDraggingBlocks","getDraggedBlockClientIds","isBlockBeingDragged","isAncestorBeingDragged","parentClientId","isCaretWithinFormattedText","deprecated","since","version","getBlockInsertionPoint","isBlockInsertionPointVisible","isValidTemplate","getTemplate","getTemplateLock","templateLock","getBlockListSettings","checkAllowList","list","item","defaultResult","canInsertBlockTypeUnmemoized","blockType","getSettings","isBlockAllowedInEditor","isLocked","parentBlockListSettings","parentAllowedBlocks","allowedBlocks","hasParentAllowedBlock","blockAllowedParentBlocks","parentName","hasBlockAllowedParent","hasBlockAllowedAncestor","blockAllowedAncestorBlocks","ancestor","ancestors","canInsert","applyFilters","canInsertBlockType","canInsertBlocks","canRemoveBlock","lock","parentIsLocked","canRemoveBlocks","canMoveBlock","move","canMoveBlocks","canEditBlock","edit","canLockBlockType","nameOrType","getInsertUsage","canIncludeBlockTypeInInserter","getItemFromVariation","variation","variationId","icon","title","description","category","example","initialAttributes","keywords","frecency","calculateFrecency","duration","now","buildBlockTypeItem","buildScope","isDisabled","blockItemBase","inserterVariations","getBlockVariations","variations","utility","getInserterItems","buildBlockTypeInserterItem","blockParserTokenizer","buildReusableBlockInserterItem","reusableBlock","rawBlockMatch","content","raw","namespace","referencedBlockType","blockTypeInserterItems","getBlockTypes","reusableBlockInserterItems","getReusableBlocks","items","isDefault","variationMapper","groupByType","core","noncore","startsWith","coreItems","nonCoreItems","sortedBlockTypes","getBlockTransformItems","normalizedBlocks","sourceBlock","buildBlockTypeTransformItem","blockTypeTransformItems","itemsByName","fromEntries","entries","possibleTransforms","getPossibleBlockTransformations","orderBy","hasInserterItems","hasBlockType","hasReusableBlock","__experimentalGetAllowedBlocks","__experimentalGetDirectInsertBlock","defaultBlock","__experimentalDefaultBlock","directInsert","__experimentalDirectInsert","__experimentalGetParsedPattern","patternName","pattern","find","parse","__unstableSkipMigrationLogs","getAllAllowedPatterns","patterns","parsedPatterns","inserter","allowedPatterns","blocksQueue","innerBlock","checkAllowListRecursive","__experimentalGetAllowedPatterns","availableParsedPatterns","patternsAllowed","__experimentalGetPatternsByBlockTypes","blockNames","normalizedBlockNames","blockTypes","__experimentalGetPatternTransformItems","selectedBlockNames","isLastBlockChangePersistent","__experimentalGetBlockListSettingsForBlocks","blockListSettingsForBlocks","__experimentalGetReusableBlockTitle","__unstableIsLastBlockChangeIgnored","__experimentalGetLastBlockAttributeChanges","__experimentalReusableBlocks","isNavigationMode","__unstableGetEditorMode","didAutomaticChange","isBlockHighlighted","__experimentalGetActiveBlockIdByBlockNames","validBlockNames","selectedBlockClientId","entityAreaParents","wasBlockJustInserted","isBlockVisible","__unstableGetVisibleBlocks","__unstableGetContentLockingParent","__unstableGetTemporarilyEditingAsBlocks","__unstableHasActiveBlockOverlayActive","blockSupportDisable","__unstableIsWithinBlockOverlay","START_OF_SELECTED_AREA","retrieveSelectedAttribute","blockAttributes","maybeArray","resetBlocks","dispatch","validateBlocksToTemplate","isBlocksValidToTemplate","doBlocksMatchTemplate","setTemplateValidity","resetSelection","receiveBlocks","alternative","updateBlockAttributes","updateBlock","selectBlock","selectPreviousBlock","previousBlockClientId","selectNextBlock","nextBlockClientId","startMultiSelect","stopMultiSelect","multiSelect","__experimentalInitialPosition","blockCount","speak","sprintf","_n","clearSelectedBlock","toggleSelection","getBlocksWithDefaultStylesApplied","blockEditorSettings","preferredStyleVariations","__experimentalPreferredStyleVariations","className","blockStyle","trim","replaceBlocks","__unstableHasCustomAppender","insertDefaultBlock","replaceBlock","createOnMove","moveBlocksDown","moveBlocksUp","moveBlocksToPosition","moveBlockToPosition","insertBlock","insertBlocks","hint","showInsertionPoint","__unstableOptions","hideInsertionPoint","synchronizeTemplate","updatedBlockList","synchronizeBlocksWithTemplate","__unstableDeleteSelection","registry","targetSelection","targetBlock","targetBlockType","selectionA","selectionB","cloneA","cloneBlock","cloneB","followingBlock","blocksWithTheSameType","updatedAttributes","newAttributeKey","convertedHtml","convertedValue","newOffset","newValue","newHtml","selectedBlockClientIds","replacement","batch","selectionChange","__unstableSplitSelection","createBlock","getDefaultBlockName","__unstableExpandSelection","mergeBlocks","firstBlockClientId","secondBlockClientId","clientIdA","clientIdB","blockWithSameType","removeBlock","canRestoreTextSelection","console","error","selectedBlock","removeBlocks","selectPrevious","replaceInnerBlocks","toggleBlockMode","startTyping","stopTyping","startDraggingBlocks","stopDraggingBlocks","enterFormattedText","exitFormattedText","defaultBlockName","updateBlockListSettings","updateSettings","__unstableSaveReusableBlock","__unstableMarkLastChangeAsPersistent","__unstableMarkNextChangeAsNotPersistent","__unstableMarkAutomaticChange","requestIdleCallback","setNavigationMode","__unstableSetEditorMode","firstSelectedClientId","setBlockMovingClientId","duplicateBlocks","clientIdsArray","lastSelectedIndex","clonedBlocks","__experimentalCloneSanitizedBlock","insertBeforeBlock","firstSelectedIndex","insertAfterBlock","toggleBlockHighlight","flashBlock","Promise","resolve","setHasControlledInnerBlocks","setBlockVisibility","__unstableSetTemporarilyEditingAsBlocks","STORE_NAME","storeConfig","selectors","actions","store","createReduxStore","persist","registerStore","DEFAULT_BLOCK_EDIT_CONTEXT","isSelected","Context","createContext","Provider","useBlockEditContext","useContext","useDisplayBlockControls","useSelect","blockEditorStore","BlockControlsFill","group","controls","__experimentalShareWithChildBlocks","Fill","shareWithChildBlocks","isDisplayed","isParentDisplayed","groups","useBlockControlsFill","fillProps","ToolbarGroup","BlockControlsSlot","accessibleToolbarState","ToolbarContext","Slot","fills","useSlotFills","__unstableName","bubblesVirtually","BlockControls","BlockFormatControls","appendSelectors","append","subselector","getBlockGapCSS","layoutDefinitions","layoutType","blockGapValue","output","spacingStyles","gapStyle","rules","cssProperty","getAlignmentsInfo","layout","contentSize","wideSize","alignmentInfo","sizeRegex","none","wide","BlockRefs","refs","callbacks","BlockRefsProvider","useMemo","useBlockRefProvider","useRef","useLayoutEffect","useRefEffect","setElement","useBlockRef","freshClientId","useBlockElement","useState","isValueSpacingPreset","getCustomValueFromPreset","spacingSizes","getSpacingPresetSlug","spacingSize","getSpacingPresetCssVar","LABELS","all","bottom","mixed","vertical","horizontal","DEFAULT_VALUES","ALL_SIDES","sort","isValuesMixed","sides","isValuesDefined","blockedPaths","deprecatedFlags","disableCustomColors","disableCustomGradients","disableCustomFontSizes","enableCustomLineHeight","enableCustomUnits","enableCustomSpacing","prefixedFlags","useSetting","warn","normalizedPath","removeCustomPrefixes","candidates","candidateClientId","candidateBlockName","candidateAtts","defaultsPath","blockPath","PATHS_WITH_MERGE","custom","theme","deprecatedSettingsValue","SpacingInputControl","side","isMixed","minimumCustomValue","spacingMatch","getPresetValueFromCustomValue","selectListSizes","showRangeControl","disableCustomSpacingSizes","editorSettings","showCustomValueControl","setShowCustomValueControl","units","useCustomUnits","availableUnits","presetValue","sliderValue","findIndex","getSliderValueFromPreset","selectedUnit","parseQuantityAndUnitFromRawValue","customTooltipContent","customRangeValue","parseInt","getNewPresetValue","newSize","controlType","allPlaceholder","currentValueHint","marks","label","ariaLabel","showHint","BaseControl","Button","onClick","isPressed","isSmall","classnames","iconSize","getNewCustomValue","placeholder","disableUnits","hideLabelFromVision","gridColumn","RangeControl","withInputField","onMouseDown","nativeEvent","offsetX","renderTooltipContent","__nextHasNoMarginBottom","CustomSelectControl","option","selectedItem","__nextUnconstrainedWidth","AllInputControl","allValue","getAllRawValue","nextValues","applyValueToSides","BoxInputControls","filteredSides","createHandleOnChange","groupedSides","AxialInputControls","axisValue","LinkedButton","isLinked","Tooltip","link","linkOff","SpacingSizesControl","inputProps","splitOnAxis","unshift","inputValues","hasInitialValue","hasOneSide","setIsLinked","inputControlProps","nextValue","newValues","role","as","advanced","dimensions","typography","InspectorControlsFill","__experimentalGroup","cleanEmptyObject","cleanedNestedObjects","pickBy","immutableSet","setWith","transformStyles","activeSupports","migrationPaths","results","isActive","referenceBlockAttributes","returnBlock","support","styleValue","shouldSkipSerialization","featureSet","feature","getBlockSupport","skipSerialization","__experimentalSkipSerialization","BlockSupportToolsPanel","useDispatch","panelId","resetAll","useCallback","resetFilters","newAttributes","newBlockAttributes","resetFilter","hasInnerWrapper","shouldRenderPlaceholderItems","__experimentalFirstVisibleItemClass","__experimentalLastVisibleItemClass","BlockSupportSlotContainer","toolsPanelContext","ToolsPanelContext","InspectorControlsSlot","slot","useSlot","InspectorControls","InspectorAdvancedControls","slotName","scrollableRef","onWheel","scrollBy","passive","MAX_POPOVER_RECOMPUTE_COUNTER","MAX_SAFE_INTEGER","bottomClientId","__unstableRefreshSize","__unstableCoverTarget","__unstablePopoverSlot","__unstableContentRef","selectedElement","lastSelectedElement","mergedRefs","useMergeRefs","usePopoverScroll","popoverDimensionsRecomputeCounter","forceRecomputePopoverDimensions","useReducer","observer","MutationObserver","observe","disconnect","popoverAnchor","selectedBCR","lastSelectedBCR","Infinity","DOMRect","Popover","animate","focusOnMount","anchor","__unstableSlotName","placement","flip","hasMarginSupport","SPACING_SUPPORT_KEY","margin","useIsMarginDisabled","isInvalid","useIsDimensionsSupportValid","MarginEdit","setAttributes","useCustomSides","AXIAL_SIDES","newStyle","spacing","web","allowReset","native","MarginVisualizer","marginTop","marginRight","marginBottom","marginLeft","borderRightWidth","borderLeftWidth","setIsActive","valueRef","timeoutRef","clearTimer","clearTimeout","useEffect","hasPaddingSupport","useIsPaddingDisabled","PaddingEdit","PaddingVisualizer","DimensionsPanel","isGapDisabled","useIsGapDisabled","isPaddingDisabled","isMarginDisabled","useIsDimensionsDisabled","hasGapSupport","defaultSpacingControls","createResetAllFilter","attribute","spacingClassnames","hasValue","hasPaddingValue","onDeselect","resetPadding","resetAllFilter","isShownByDefault","hasMarginValue","resetMargin","blockGap","hasGapValue","resetGap","GapEdit","gapDisabled","paddingDisabled","marginDisabled","getGapBoxControlValueFromStyle","isValueString","getGapCSSValue","defaultValue","blockGapBoxControlValue","row","column","isSafari","replaceChild","gapValue","boxControlGapValue","__unstableInputWidth","alignBottom","alignCenter","BLOCK_ALIGNMENTS_CONTROLS","center","DEFAULT_CONTROLS","POPOVER_PROPS","isAlternate","isCollapsed","isToolbar","activeAlignment","defaultAlignmentControl","UIComponent","ToolbarDropdownMenu","extraProps","popoverProps","control","align","BlockVerticalAlignmentControl","BlockVerticalAlignmentToolbar","icons","justifyLeft","justifyCenter","justifyRight","justifySpaceBetween","allowedControls","handleClick","allControls","JustifyContentControl","JustifyToolbar","justifyContentMap","alignItemsMap","verticalAlignmentMap","flexWrapOptions","inspectorControls","layoutBlockSupport","allowOrientation","Flex","FlexItem","FlexLayoutJustifyContentControl","OrientationControl","FlexWrapControl","toolBarControls","allowSwitching","allowVerticalAlignment","orientation","FlexLayoutVerticalAlignmentControl","getLayoutStyle","hasBlockGapSupport","justifyContent","flexWrap","verticalAlignment","alignItems","getOrientation","getAlignments","onVerticalAlignmentChange","verticalAlignmentOptions","onJustificationChange","justificationOptions","ToggleControl","checked","arrowRight","arrowDown","blockGapStyleValue","alignments","alignment","info","cloneElement","labelPosition","nextWidth","positionCenter","stretchWide","__experimentalIsBorderless","getCSSRules","rule","layoutTypes","flow","flex","constrained","getLayoutType","defaultLayout","Layout","LayoutProvider","useLayout","LayoutStyle","layoutStyle","WIDE_CONTROLS","useAvailableAlignments","wideControlsEnabled","themeSupportsLayout","layoutAlignments","alignmentName","availableAlignments","enabledControls","enabledControl","alignNone","positionLeft","positionRight","full","stretchFullWidth","onChangeAlignment","activeAlignmentControl","commonProps","controlName","toggleProps","describedBy","onClose","MenuGroup","MenuItem","iconPosition","BlockAlignmentControl","BlockAlignmentToolbar","ALL_ALIGNMENTS","WIDE_ALIGNMENTS","getValidAlignments","blockAlign","validAlignments","hasWideBlockSupport","hasWideEnabled","withToolbarControls","createHigherOrderComponent","BlockEdit","blockEdit","isContentLocked","nextAlign","withDataAlign","BlockListBlock","wrapperProps","enum","ANCHOR_REGEX","ANCHOR_SCHEMA","withInspectorControl","isWeb","textControl","TextControl","help","ExternalLink","href","autoCapitalize","autoComplete","PanelBody","ARIA_LABEL_SCHEMA","originClassName","getBlockDefaultClassName","BlockContextProvider","context","DEFAULT_BLOCK_CONTEXT","withFilters","blockContext","BlockContext","usesContext","pick","save","generatedClassName","secondaryActions","Children","DropdownMenu","moreHorizontal","noIcons","BlockView","rawContent","renderedContent","actionText","RawHTML","safeHTML","variant","tabIndex","onKeep","onConvert","convertor","convertButtonText","converted","convertedBlock","getSaveContent","difference","originalContent","newContent","diffChars","blockToBlocks","rawHandler","HTML","compose","withSelect","withDispatch","convertToClassic","blockToClassic","convertToHTML","blockToHTML","convertToBlocks","attemptBlockRecovery","recoverBlock","hasHTMLBlock","compare","setCompare","onCompare","onCompareClose","hiddenActions","Modal","onRequestClose","warning","BlockCrashBoundary","super","hasError","componentDidCatch","fallback","setHtml","getBlockContent","onBlur","validateBlock","updateQueue","makeQueue","raf","schedule","writeQueue","write","onStartQueue","onStart","onFrameQueue","onFrame","onFinishQueue","onFinish","timeouts","handler","ms","cancel","pendingCount","timeout","findTimeout","sync","batchedUpdates","throttle","lastArgs","queuedFn","throttled","nativeRaf","requestAnimationFrame","use","impl","performance","catch","frameLoop","advance","ts","queue","loop","prevTs","eachSafely","flush","noop","fun","str","num","und","eachProp","ctx","flushCalls","isSSR","createStringInterpolator$1","colors$1","skipAnimation","willAdvance","globals","freeze","createStringInterpolator","startQueue","currentFrame","prevFrame","priority","idle","animation","flushStartQueue","startSafely","prevIndex","startUnsafely","dt","nextFrame","NUMBER","PERCENTAGE","parts","rgb","rgba","hsl","hsla","hex3","hex4","hex6","hex8","hue2rgb","q","hslToRgb","h","l","g","parse255","int","parse360","parse1","parsePercentage","colorToRgba","input","int32Color","normalizeColor","createInterpolator","range","extrapolate","outputRange","inputRange","extrapolateLeft","extrapolateRight","easing","findRange","inputMin","inputMax","outputMin","outputMax","interpolate","$get","for","$observers","hasFluidValue","getFluidValue","getFluidObservers","callFluidObservers","observers","eventObserved","callFluidObserver","FluidValue","setFluidGetter","setHidden","addFluidObserver","observerAdded","removeFluidObserver","observerRemoved","numberRegex","colorRegex","unitRegex","rgbaRegex","cssVariableRegex","variableToRgba","token","parseCSSVariable","namedColorRegex","rgbaRound","_","p1","p2","p3","p4","keyframes","outputRanges","interpolators","_output$find","missingUnit","prefix","once","called","TypeError","warnInterpolate","warnDirectCall","isAnimatedString","isMounted","useIsMounted","random","effect","emptyDeps","prevRef","$node","getAnimated","owner","setAnimated","defineHidden","getPayload","Animated","payload","AnimatedValue","_value","elapsedTime","lastPosition","lastVelocity","v0","durationProgress","static","getValue","setValue","step","reset","AnimatedString","_string","_toString","goal","TreeContext","dependencies","AnimatedObject","animated","_makePayload","_addToPayload","AnimatedArray","makeAnimated","getAnimatedType","withAnimated","host","hasInstance","isReactComponent","givenProps","givenRef","instanceRef","updateRef","deps","createAnimatedStyle","getAnimatedState","forceUpdate","instance","applyAnimatedValues","PropsObserver","observerRef","dep","usedProps","getComponentProps","cacheKey","getDisplayName","displayName","callProp","matchProp","resolveProp","getDefaultProp","noopTransform","getDefaultProps","DEFAULT_PROPS","defaults","RESERVED_PROPS","pause","immediate","delay","onProps","onPause","onResume","onRest","onResolve","trail","expires","initial","enter","leave","onDestroyed","callId","parentId","inferTo","forward","getForwardProps","out","computeGoal","hasProps","isAsyncTo","detachRefs","ctrl","_ctrl$ref","replaceRef","_ctrl$ref2","c1","c2","c3","c4","PI","c5","bounceOut","n1","d1","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","pow","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","cos","easeOutSine","sin","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","sqrt","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInElastic","easeOutElastic","easeInOutElastic","easeInBounce","easeOutBounce","easeInOutBounce","tension","friction","mass","damping","clamp","AnimationConfig","frequency","velocity","restVelocity","precision","progress","bounce","decay","sanitizeConfig","isTensionConfig","emptyArray","Animation","changed","toValues","fromValues","scheduleProps","reject","_props$cancel","paused","resumeQueue","resume","delayed","pauseQueue","cancelId","getCombinedResult","cancelled","getCancelledResult","getNoopResult","getFinishedResult","finished","runAsync","asyncTo","prevTo","promise","prevPromise","asyncId","preventBail","bail","bailPromise","bailIfEnded","bailSignal","bailResult","arg1","arg2","BailSignal","skipAnimationSignal","SkipAniamtionSignal","stopAsync","animating","then","isFrameValue","FrameValue","nextId$1","_priority","_onPriorityChange","toJSON","_attach","_detach","_onChange","$P","hasAnimated","isAnimating","isPaused","setActiveBit","active","IS_ANIMATING","setPausedBit","SpringValue","_state","_pendingCalls","_lastCallId","_lastToId","_memoizedDuration","isDelayed","anim","elapsed","abs","exp","bounceFactor","canBounce","isGrowing","isMoving","isBouncing","numSteps","ceil","currVal","finalVal","_stop","_focus","_set","_update","finish","_onStart","_start","_prepareNode","_ref","isLoop","mergeActiveFn","sendEvent","isFrozen","checkFinished","_resume","_merge","nextProps","createLoopUpdate","hasToProp","hasFromProp","prevFrom","hasFromChanged","hasToChanged","hasAsyncTo","newConfig","defaultConfig","mergeConfig","isAnimatable","goalType","started","hasValueChanged","ACTIVE_EVENTS","oldNode","loopRet","overrides","createUpdate","findDefined","declareUpdate","_target$animation$typ","_target$animation","_target$defaultProps$","_target$defaultProps","BATCHED_EVENTS","nextId","Controller","springs","_flush","_initialProps","_lastAsyncId","_active","_changed","_started","_item","_events","_onFrame","spring","prepareKeys","flushUpdateQueue","flushUpdate","promises","getSprings","prepareSprings","createSpring","setSprings","_excluded$3","SpringContext","excluded","sourceKeys","_objectWithoutPropertiesLoose","inherited","getResult","inputs","committed","prevCache","useCache","areInputsEqual","useMemoOne","_context","Consumer","SpringRef","_getProps","useSprings","propsFn","layoutId","ctrls","prevLength","declareUpdates","prevContext","hasContext","TransitionPhase","Interpolation","calc","_get","_dt","checkIdle","becomeIdle","highest","isIdle","isCustomPropRE","dangerousStyleValue","isUnitlessNumber","attributeCache","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","opacity","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","substring","prefixKey","domTransforms","pxTransforms","degTransforms","addUnit","unit","isValueIdentity","AnimatedStyle","z","transforms","xyz","deg","FluidTransform","unstable_batchedUpdates","transparent","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","_applyAnimatedValues","_createAnimatedStyle","_getComponentProps","hostConfig","createHost","isFilterElement","names","hasAttribute","textContent","setProperty","counterReducer","getAbsolutePosition","adjustScrolling","enableAnimation","triggerAnimationOnChange","prefersReducedMotion","useReducedMotion","triggeredAnimation","triggerAnimation","finishedAnimation","endAnimation","setTransform","previous","preserveScrollPosition","scrollContainer","getScrollContainer","prevRect","destination","isFn","useSpring","finishedMoving","transformOrigin","BLOCK_SELECTOR","APPENDER_SELECTOR","BLOCK_APPENDER_CLASS","isInsideRootBlock","blockElement","closest","getBlockClientId","ELEMENT_NODE","blockNode","useFocusFirstElement","useInitialPosition","activeElement","textInputs","focus","isTextField","isReverse","getAttribute","focusElement","isFormElement","placeCaretAtHorizontalEdge","listener","defaultPrevented","preventDefault","classList","useIsHovered","isEnabled","outlineMode","useBlockClassNames","isDragging","isAncestorOfSelectedBlock","isReusableBlock","useBlockDefaultClassName","useBlockCustomClassName","useBlockMovingModeClassNames","movingClientId","useFocusHandler","onFocus","parentElement","isContentEditable","useEventHandlers","onKeyDown","onDragStart","keyCode","ENTER","BACKSPACE","DELETE","useNavModeExit","useIntersectionObserver","IntersectionObserver","unobserve","useBlockOverlayActive","useBlockProps","__unstableIsHtml","isAligned","BlockListBlockContext","blockApiVersion","blockTitle","isPartOfSelection","isPartOfMultiSelection","hasOverlay","blockLabel","htmlSuffix","useMovingAnimation","useDisabled","blockEditContext","getBlockProps","Block","isHtml","applyWithSelect","canMove","applyWithDispatch","ownProps","onInsertBlocks","onInsertBlocksAfter","onMerge","onReplace","isUnmodifiedDefaultBlock","selectionEnabled","pure","ifCondition","__unstableBlockSource","hasContentLockedParent","isContentBlock","isContentLocking","isTemporarilyEditingAsBlocks","_hasContentLockedParent","__experimentalHasContentRoleAttribute","onRemove","insertBlocksAfter","getEditWrapperProps","propsA","propsB","newProps","mergeWrapperProps","saveContent","serializeRawBlock","dataAlign","restWrapperProps","memoizedValue","globalTips","createInterpolateElement","kbd","randomIndex","floor","Tip","memo","showColors","blockDefault","renderedIcon","Icon","backgroundColor","background","foreground","withRegistryProvider","WrappedComponent","withRegistry","useSubRegistry","subRegistry","setSubRegistry","newRegistry","createRegistry","blockEditorStoreName","RegistryProvider","useBlockSync","controlledBlocks","controlledSelection","onInput","useRegistry","isControlled","pendingChanges","incoming","outgoing","subscribed","setControlledBlocks","storeBlocks","onInputRef","onChangeRef","isPersistent","previousAreBlocksDifferent","unsubscribe","subscribe","newIsPersistent","newBlocks","areBlocksDifferent","LiveBlockPreview","onKeyPress","Disabled","BlockList","useBlockSelectionClearer","BlockSelectionClearer","isFullSelection","useMultiSelection","contentEditable","getSelection","removeAllRanges","getClosestTabbable","containerElement","onlyVertical","targetRect","focusableNodes","isInSameBlock","firstElementChild","nodeRect","useArrowNav","verticalRect","shiftKey","ctrlKey","altKey","metaKey","isUp","UP","isDown","DOWN","isLeft","LEFT","isRight","RIGHT","isHorizontal","isVertical","isNav","hasModifier","isNavEdge","isVerticalEdge","isHorizontalEdge","computeCaretRect","tagName","isNavigationCandidate","isReverseDir","isRTL","keepCaretInsideBlock","closestTabbable","isClosestTabbableABlock","placeCaretAtVerticalEdge","useSelectAll","isMatch","useShortcutEventMatch","isEntirelySelected","blockClientIds","setContentEditableWrapper","useDragSelection","anchorElement","rafId","onMouseUp","rangeCount","commonAncestorContainer","getRangeAt","contains","onMouseLeave","buttons","cancelAnimationFrame","useSelectionObserver","onSelectionChange","isClickShift","anchorNode","anchorOffset","TEXT_NODE","childNodes","extractSelectionStartNode","focusNode","focusOffset","extractSelectionEndNode","selectedClientId","clickedClientId","focusNodeIsNonSelectable","startPath","endPath","depth","findDepth","addListeners","removeListeners","resetListeners","useClickSelection","button","useInput","onBeforeInput","inputType","onCompositionStart","useWritingFlow","focusCaptureBeforeRef","focusCaptureAfterRef","lastFocus","focusCaptureTabIndex","noCapture","onFocusCapture","compareDocumentPosition","DOCUMENT_POSITION_FOLLOWING","ESCAPE","TAB","isShift","direction","preventScroll","onFocusOut","relatedTarget","preventScrollOnTab","useTabNav","removeAttribute","forwardedRef","BODY_CLASS_NAME","useParsedAssets","createHTMLDocument","contentRef","assets","isZoomedOut","forceRender","iframeDocument","setIframeDocument","bodyClasses","setBodyClasses","clearerRef","writingFlowRef","contentResizeListener","contentHeight","useResizeObserver","setRef","iFrameDocument","preventFileDropDefault","setDocumentIfReady","contentDocument","readyState","bubbleEvent","constructorName","Constructor","MouseEvent","rect","clientX","clientY","newEvent","eventTypes","bubbleEvents","dir","headRef","script","onload","onerror","loadScript","finally","bodyRef","styleCompatibilityRef","styleSheets","styleSheet","cssRules","ownerNode","matchFromRules","_cssRules","selectorText","conditionText","__cssRules","getElementById","cloneNode","inlineCssId","inlineCssElement","rel","media","TagName","srcDoc","createPortal","grad","turn","rad","u","isFinite","c","m","substr","N","M","H","$","parsed","brightness","isDark","isLight","toHex","toRgb","toRgbString","toHsl","toHslString","toHsv","invert","saturate","desaturate","grayscale","lighten","darken","rotate","hue","alpha","S","k","toName","luminance","contrast","isReadable","commentre","lineno","updatePosition","lines","lastIndexOf","line","Position","whitespace","errorsList","msg","reason","filename","silent","open","close","comments","atrule","re","comment","matched","declaration","property","declarations","decls","decl","keyframe","vals","atimport","_compileAtrule","atcharset","atnamespace","vendor","frame","frames","atkeyframes","atmedia","atcustommedia","supports","atsupports","atdocument","sel","atpage","athost","atfontface","addParent","rulesList","stylesheet","parsingErrors","isNode","childParent","Compiler","opts","emit","visit","mapVisit","delim","buf","Base","inherits","compile","import","charset","page","indentation","indent","updated","updatedNode","compress","Compressed","Identity","isValidURL","filePath","isRemotePath","getResourcePath","baseURL","URL","rootURL","updatedURLs","reg","URLs","quote","getURLs","newUrl","IS_ROOT_TAG","ignore","wrapperClassName","wrap","urlRewrite","EDITOR_STYLES_SELECTOR","useDarkThemeBodyClassName","canvas","querySelector","tempCanvas","colordBackgroundColor","colord","EditorStyles","transformedStyles","getValuesFromColors","rgbColor","DuotoneStylesheet","DuotoneUnsetStylesheet","DuotoneFilter","xmlnsXlink","focusable","colorInterpolationFilters","tableValues","in2","operator","PresetDuotoneFilter","preset","MemoizedBlockList","extend","namesPlugin","a11yPlugin","MAX_HEIGHT","ScaledBlockPreview","containerWidth","__experimentalPadding","__experimentalMinHeight","duotone","__experimentalFeatures","editorStyles","__unstableType","svgFilters","scale","minHeight","bodyElement","pointerEvents","renderAppender","AutoBlockPreview","containerResizeListener","__experimentalLive","__experimentalOnClick","originalSettings","_settings","renderedBlocks","useBlockPreview","__experimentalLayout","disabledRef","BlockListItems","isReusable","getBlockFromExample","InserterListboxContext","htmlProps","propsWithTabIndex","BlockDraggableChip","justify","dragHandle","transferData","Draggable","__experimentalTransferDataType","__experimentalDragComponent","onDraggableStart","onDraggableEnd","draggable","onDragEnd","onSelect","onHover","isDraggable","itemIconStyle","createBlocksFromInnerBlocksTemplate","disabled","isAppleOS","onMouseEnter","numberOfLines","shouldSpeak","setShouldSpeak","chunks","chunk","getBlockMenuDefaultClassName","onInsert","categories","collections","getCategories","getCollections","shouldFocusBlock","insertedBlock","compositeState","useCompositeState","showMostUsedBlocks","onSelectItem","useBlockTypesState","suggestedItems","uncategorizedItems","itemsPerCategory","itemList","groupBy","itemsPerCollection","getBlockNamespace","currentlyRenderedCategories","useAsyncList","didRenderAllCategories","collectionEntries","currentlyRenderedCollections","categoryItems","collection","collectionItems","selectedCategory","patternCategories","onClickCategory","openPatternExplorer","isMobile","useViewportMatch","gap","isBlock","SelectControl","selected","patternCategory","stopPropagation","categoryOptions","createSuccessNotice","noticesStore","onClickPattern","BlockPattern","composite","descriptionId","useInstanceId","VisuallyHidden","BlockPatternPlaceholder","blockPatterns","shownPatterns","PatternCategoriesList","baseClassName","PatternsExplorerSearch","filterValue","setFilterValue","SearchControl","insertionIndex","isAppender","destinationRootClientId","destinationIndex","_destinationIndex","_destinationRootClientId","shouldForceFocusBlock","onToggleInsertionPoint","show","defaultGetName","defaultGetTitle","defaultGetDescription","defaultGetKeywords","defaultGetCategory","defaultGetCollection","normalizeSearchInput","getNormalizedSearchTerms","words","removeMatchingTerms","unmatchedTerms","unprocessedTerms","term","unprocessedTerm","searchBlockItems","searchInput","searchItems","getCategory","getCollection","normalizedSearchTerms","rankedItems","getItemSearchRank","rank","rank1","rank2","searchTerm","getName","getTitle","getDescription","getKeywords","normalizedSearchInput","normalizedTitle","terms","PatternsListHeader","filteredBlockPatternsLength","debouncedSpeak","useDebounce","useInsertionPoint","allPatterns","onSelectBlockPattern","usePatternsState","registeredPatternCategories","filteredBlockPatterns","resultsFoundMessage","currentShownPatterns","hasItems","PatternsExplorer","initialCategory","setSelectedCategory","onModalClose","restProps","closeLabel","isFullScreen","BlockPatternsCategory","populatedCategories","getPatternIndex","indexedCategories","cat","currentCategoryPatterns","orderedPatterns","showPatternsExplorer","setShowPatternsExplorer","allCategories","hasRegisteredCategory","currentName","nextName","ReusableBlocksList","filteredItems","addQueryArgs","post_type","__unstableInserterMenuExtension","__experimentalInsertionIndex","maxBlockPatterns","maxBlockTypes","showBlockDirectory","prioritizePatterns","blockTypeCategories","blockTypeCollections","onSelectBlockType","maxBlockTypesToShow","filteredBlockTypes","currentShownBlockTypes","blocksUI","patternsUI","blocksTab","patternsTab","reusableBlocksTab","showPatterns","showReusableBlocks","tabs","tempTabs","TabPanel","showInserterHelpPanel","__experimentalFilterValue","hoveredItem","setHoveredItem","selectedPatternCategory","setSelectedPatternCategory","hasReusableBlocks","onInsertPattern","onClickPatternCategory","getCurrentTab","tab","searchRef","useImperativeHandle","focusSearch","showAsTabs","QuickInserter","setInserterIsOpened","__experimentalSetIsInserterOpened","showSearch","defaultRenderToggle","onToggle","isOpen","hasSingleBlockType","rest","plus","tooltipPosition","Inserter","renderToggle","renderContent","directInsertBlock","__experimentalIsQuick","isQuick","insertOnlyAllowedBlock","onSelectOrClose","Dropdown","contentClassName","expandOnMobile","headerTitle","allowedBlockType","__experimentalPreferPatternsOnRoot","blockToInsert","attributesToCopy","adjacentAttributes","currentBlock","previousBlock","parentBlock","lastInnerBlock","getAdjacentBlockAttributes","getInsertionIndex","bodyPlaceholder","showPrompt","onAppend","decodeEntities","SPACE","ButtonBlockAppender","isToggleButton","inserterButton","ButtonBlockerAppender","CustomAppender","hideInserter","canInsertDefaultBlock","appender","previousClientId","nextClientId","popoverRecomputeCounter","forcePopoverRecompute","isVisible","_rootClientId","previousElement","nextElement","previousRect","nextRect","popoverScrollRef","InsertionPointOpenRef","InsertionPointPopover","openRef","isInserterShown","_previousClientId","_nextClientId","disableMotion","lineVariants","borderRadius","transition","hover","inserterVariants","whileHover","whileTap","exit","onHoverEnd","variants","InsertionPoint","useInBetweenInserter","isInBetweenInserterDisabled","hasReducedUI","delayedShowInsertionPoint","trailing","onMouseMove","blockEl","blockElRect","elementRect","cancelIdleCallback","useBlockDisplayInformation","blockTypeInfo","useBlockDisplayTitle","maximumLength","reusableBlockTitle","blockInformation","getBlockLabel","omission","BlockTitle","cloneClassname","srcRootClientId","startScrolling","scrollOnDragOver","stopScrolling","dragStartY","velocityY","scrollParentY","scrollEditorInterval","clearInterval","setInterval","newTop","scroll","scrollParentHeight","offsetDragStartPosition","offsetDragPosition","moveableDistance","distancePercentage","PIXELS_PER_SECOND_PER_PERCENTAGE","useScrollWhenDragging","srcClientIds","onDragOver","getMovementDirection","moveDirection","getArrowIcon","chevronRight","chevronLeft","chevronUp","chevronDown","getMovementDirectionLabel","BlockMoverButton","moverOrientation","instanceId","normalizedClientIds","blocksCount","blockRootClientId","firstBlockIndex","lastBlockIndex","isFirstBlock","isLastBlock","blockListOrientation","moverFunction","__experimentalIsFocusable","selectedCount","movementDirection","getMultiBlockMoverDescription","getBlockMoverDescription","BlockMoverUpButton","BlockMoverDownButton","hideDragHandle","lastIndex","dragHandleLabel","draggableProps","ToolbarItem","itemProps","blockMovingMode","getAccessibleBlockLabel","isTab","isEscape","isEnter","isSpace","selectionEndClientId","selectionBeforeEndClientId","selectionAfterEndClientId","navigateUp","navigateDown","navigateOut","navigateIn","focusedBlockUid","startingBlockClientId","sourceRoot","destRoot","sourceBlockIndex","destinationBlockIndex","nextTabbable","showTooltip","getAllToolbarItemsIn","querySelectorAll","__experimentalInitialIndex","initialIndex","__experimentalOnIndexChange","onIndexChange","isAccessibleToolbar","setIsAccessibleToolbar","determineIsAccessibleToolbar","onlyToolbarItem","dataset","childList","subtree","useIsAccessibleToolbar","defaultIndex","initialFocusOnMount","focusToolbar","firstTabbable","focusFirstTabbableIn","useShortcut","useToolbarFocus","Toolbar","NavigableMenu","DEBOUNCE_TIMEOUT","useDebouncedShowMovers","isFocused","debounceTimeout","showMovers","setShowMovers","handleOnChange","nextIsFocused","clearTimeoutRef","debouncedShowMovers","debouncedHideMovers","isHovered","matches","shouldHideMovers","useShowMoversGestures","setIsFocused","registerRef","isFocusedWithin","handleOnFocus","handleOnBlur","gestures","BlockParentSelector","firstParentClientId","shouldHide","_firstParentClientId","parentBlockName","_parentBlockType","nodeRef","showMoversGestures","ToolbarButton","PreviewBlockPopover","RestTransformationItems","restTransformations","setHoveredTransformItemName","BlockTranformationItem","possibleBlockTransformations","hoveredTransformItemName","priorityTextTransformations","priorityContentTranformationBlocks","transformations","priorityTextTranformsNames","useGroupedTransforms","hasBothContentTransformations","restTransformItems","replaceActiveStyle","activeStyle","TokenList","getDefaultStyle","useStylesForBlocks","onSwitch","getBlockStyles","stylesToRender","getRenderedStyles","potentialStyleName","getActiveStyle","genericPreviewBlock","useGenericPreviewBlock","styleClassName","BlockStylesMenuItems","menuItemText","check","limit","ellipsizeMode","truncate","BlockStylesMenu","hoveredBlock","getMatchingBlockByName","selectedBlockName","consumedBlocks","transformMatchingBlock","retainedBlockAttributes","contentAttributes","getBlockAttributesNamesByRole","_accumulator","getRetainedBlockAttributes","PreviewPatternsPopover","BlockPatternsList","transformedBlocks","statePatterns","showTransforms","setShowTransforms","selectedBlocks","_pattern","patternBlocks","_patternBlocks","patternBlock","getPatternTransformedBlocks","useTransformedPatterns","BlockSwitcherDropdownMenu","hasBlockStyles","firstBlockName","_isSingleBlockSelected","_icon","isTemplate","isTemplatePart","hasPossibleBlockTransformations","hasPatternTransformation","blockSwitcherLabel","blockSwitcherDescription","showDropDown","menuProps","onPatternTransform","onBlockTransform","__unstableBlockToolbarLastItem","shouldDismissPastedFiles","files","IMAGE_TAG","IMG_WITH_LOCAL_SRC","useNotifyCopy","eventType","notice","useClipboardHandler","notifyCopy","documentHasUncollapsedSelection","documentHasSelection","eventDefaultPrevented","isSelectionMergeable","shouldHandleWholeBlocks","expandSelectionIsNeeded","tail","wrapperBlockName","clipboardData","getData","JSON","serialized","serialize","setData","stripHTML","canUserUseUnfilteredHTML","plainText","error1","error2","getFilesFromDataTransfer","file","createBlobURL","getPasteEventData","pasteHandler","BlockActions","__experimentalUpdateSelection","getGroupingBlockName","canDuplicate","onDuplicate","onInsertBefore","onInsertAfter","onMoveTo","onGroup","groupingBlockName","onUngroup","onCopy","isCodeEditingEnabled","codeEditingEnabled","onToggleMode","small","shouldRender","__unstableBlockSettingsMenuFirstItem","ConvertToGroupButton","isGroupable","isUngroupable","blocksSelection","onConvertToGroup","onConvertFromGroup","useConvertToGroupButtonProps","_clientIds","_groupingBlockName","groupingBlockAvailable","_blocksSelection","isSingleGroupingBlock","useBlockLock","canEdit","canLock","getTemplateLockValue","BlockLockModal","setLock","hasTemplateLock","applyTemplateLock","setApplyTemplateLock","isAllChecked","overlayClassName","onSubmit","CheckboxControl","indeterminate","lockIcon","unlockIcon","prevLock","expanded","BlockLockMenuItem","isModalOpen","toggleModal","unlock","BlockSettingsMenuControls","__unstableDisplayLocation","ids","showLockButton","convertToGroupButtonProps","showConvertToGroupButton","CopyMenuItem","useCopyToClipboard","copyMenuItemLabel","__experimentalSelectBlock","onlyBlock","parentBlockType","shortcuts","getShortcutRepresentation","keyboardShortcutsStore","duplicate","insertAfter","insertBefore","updateSelectionAfterDuplicate","clientIdsPromise","updateSelectionAfterRemove","removeBlockLabel","selectParentButtonRef","showParentOutlineGestures","moreVertical","shortcut","BlockLockToolbar","layouts","canInsertRow","canInsertStack","BlockEditVisuallyButton","canEditVisually","blockClientId","hasFixedToolbar","isVisual","displayHeaderToolbar","shouldShowMovers","shouldShowVisualToolbar","isMultiToolbar","isFixed","hasParents","showParentSelector","COMMON_PROPS","RESTRICTED_HEIGHT_PROPS","getProps","contentElement","selectedBlockElement","toolbarHeight","blockRect","contentRect","hasSpaceForToolbarAbove","isBlockTallerThanViewport","SelectedBlockPopover","isEmptyDefaultBlock","capturingClientId","isInsertionPointVisible","isLargeViewport","isToolbarForced","shouldShowBreadcrumb","shouldShowContextualToolbar","canFocusHiddenToolbar","initialToolbarItemIndexRef","setToolbarHeight","setProps","blockIndex","popoverRef","popoverNode","updateProps","contentView","resizeObserver","addEventHandler","blockView","ResizeObserver","removeEventHandler","useBlockToolbarPopoverProps","wrapperSelector","blockParentsClientIds","__experimentalCaptureToolbars","WrappedBlockPopover","BlockToolsBackCompat","withClientId","showSeparator","isFloating","onAddBlock","isToggle","lastBlockClientId","pendingSettingsUpdates","BLOCK_CONTEXT_CACHE","onBlockDrop","targetRootClientId","targetBlockIndex","moveBlocks","insertOrReplaceBlocks","sourceRootClientId","sourceClientIds","dropType","srcIndex","dataTransfer","parseDropEvent","blocksToInsert","isAtSameLevel","draggedBlockCount","onFilesDrop","hasUploadPermissions","transformation","findTransform","getBlockTransforms","onHTMLDrop","useOnBlockDrop","mediaUpload","insertIndex","sourceBlocks","_onDrop","_onFilesDrop","_onHTMLDrop","getDistanceFromPointToEdge","point","edge","pointLateralPosition","pointForwardPosition","edgeStart","edgeEnd","edgeForwardPosition","edgeLateralPosition","getDistanceToNearestEdge","candidateDistance","candidateEdge","allowedEdges","distance","getNearestBlockIndex","isRightToLeft","candidateIndex","isEmptyParagraph","empty","useBlockDropZone","setTargetBlockIndex","useThrottle","blockElements","targetIndex","nextBlock","useDropZone","onDrop","onDragLeave","UncontrolledInnerBlocks","wrapperRef","templateInsertUpdatesSelection","captureToolbars","__experimentalAppenderTagName","parentLock","_allowedBlocks","newSettings","queueMicrotask","useNestedSettingsUpdate","existingTemplate","currentInnerBlocks","shouldApplyTemplate","hasTemplateChanged","nextBlocks","useInnerBlockTemplateSync","providesContext","blockTypeCache","attributeName","getBlockContext","ControlledInnerBlocks","ForwardedInnerBlocks","innerBlocksProps","useInnerBlocksProps","isSmallScreen","enableClickThrough","InnerBlocks","getInnerBlocksProps","DefaultBlockAppender","Content","elementContext","pendingBlockVisibilityUpdatesPerRegistry","Root","isOutlineMode","isFocusMode","focusMode","delayedBlockVisibilityUpdates","isIntersecting","intersectionObserver","Observer","entry","_select","handle","usePreParsePatterns","Items","visibleBlocks","AsyncModeProvider","inputArray","getAllUnit","selectedUnits","flat","cornerUnits","getAllValue","parsedQuantitiesAndUnits","allValues","allUnits","hasMixedValues","hasDefinedValues","setSelectedUnits","isOnly","isNumeric","onUnitChange","topLeft","topRight","bottomLeft","bottomRight","__unstableElementContext","CORNERS","valuesProp","corner","parsedQuantity","parsedUnit","computedUnit","newUnits","MAX_BORDER_RADIUS_VALUES","px","em","rem","BorderRadiusControl","unitConfig","BorderRadiusEdit","radius","newRadius","getColorObjectByAttributeValues","definedColor","customColor","colorObj","getColorObjectByColorValue","colorValue","getColorClassName","colorContextName","colorSlug","kebabCase","useCommonSingleMultipleSelects","useMultipleOriginColorsAndGradients","colorGradientSettings","customColors","themeColors","defaultColors","shouldDisplayDefaultColors","customGradients","themeGradients","defaultGradients","shouldDisplayDefaultGradients","BORDER_SUPPORT_KEY","borderSides","resetBorderFilter","borderColor","getColorByProperty","matchedColor","origin","getMultiOriginColor","namedColor","colorObject","getColorSlugFromVariable","BorderPanel","hasBorderSupport","isColorSupported","isRadiusSupported","isStyleSupported","isWidthSupported","defaultBorderControls","showBorderByDefault","hydratedBorder","borderStyles","hydratedBorderStyles","getBorderObject","isDefinedBorder","hasBorderValue","resetBorder","enableAlpha","enableStyle","newBorder","newBorderColor","newBorderStyles","hasSplitBorders","popoverOffset","popoverPlacement","__experimentalHasMultipleOrigins","__experimentalIsRenderedInSidebar","hasBorderRadiusValue","removeBorderAttribute","resetBorderRadius","addSaveProps","borderClasses","getBorderClasses","newClassName","borderColorClass","withBorderColorPaletteStyles","borderColorValue","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","extraStyles","__experimentalGetGradientClass","gradientSlug","getGradientValueBySlug","__experimentalGetGradientObjectByGradientValue","getGradientSlugByValue","__experimentalUseGradient","gradientAttribute","customGradientAttribute","userGradientPalette","themeGradientPalette","defaultGradientPalette","allGradients","customGradient","setGradient","newGradientValue","gradientClass","gradientValue","existingGetEditWrapperProps","colorsAndGradientKeys","TAB_COLOR","TAB_GRADIENT","TABS_SETTINGS","ColorGradientControlInner","onColorChange","onGradientChange","clearable","showTitle","canChooseAColor","canChooseAGradient","tabPanels","ColorPalette","newColor","GradientPicker","__nextHasNoMargin","newGradient","renderPanelType","initialTabName","ColorGradientControlSelect","WithToolsPanelItem","setting","LabeledColorIndicator","ColorIndicator","ColorGradientSettingsDropdown","controlProps","toggleSettings","paddingSize","fallbackBackgroundColor","fallbackTextColor","fallbackLinkColor","isLargeText","textColor","linkColor","enableAlphaChecker","currentBackgroundColor","currentTextColor","currentLinkColor","textColors","backgroundColorHasTransparency","backgroundColorBrightness","isReadableOptions","speakMessage","colordTextColor","isColordTextReadable","textHasTransparency","Notice","spokenMessage","status","isDismissible","ColorPanel","enableContrastChecking","detectedBackgroundColor","setDetectedBackgroundColor","detectedColor","setDetectedColor","detectedLinkColor","setDetectedLinkColor","definedColors","firstLinkElement","innerText","backgroundColorNode","__experimentalIsItemGroup","COLOR_SUPPORT_KEY","hasColorSupport","colorSupport","hasLinkColorSupport","hasGradientSupport","hasBackgroundColorSupport","hasTextColorSupport","clearColorFromStyles","resetAllTextFilter","resetAllLinkFilter","clearBackgroundAndGradient","hasGradient","shouldSerialize","textClass","backgroundClass","serializeHasBackground","hasBackground","getLinkColorFromAttributeValue","attributeParsed","ColorEdit","userPalette","themePalette","defaultPalette","allSolids","areCustomSolidsEnabled","areCustomGradientsEnabled","isBackgroundEnabled","isLinkEnabled","isTextEnabled","solidsEnabled","gradientsEnabled","localAttributes","hasLinkColor","hasTextColor","hasBackgroundColor","hasGradientColor","onChangeColor","newNamedColor","defaultColorControls","newLinkColorValue","withColorPaletteStyles","MIGRATION_PATHS","destinationBlockType","FONT_STYLES","FONT_WEIGHTS","getFontAppearanceLabel","hasFontStyles","hasFontWeights","FontAppearanceControl","fontStyle","otherProps","hasStylesOrWeights","defaultOption","selectOptions","combinedOptions","styleName","weightName","weightValue","optionName","combineOptions","styleOptions","weightOptions","currentSelection","isDefined","isLineHeightDefined","deprecatedStyles","__unstableStateReducer","wasTypedOrPasted","BASE_DEFAULT_VALUE","adjustNextValue","LINE_HEIGHT_SUPPORT_KEY","LineHeightEdit","newLineHeightValue","useIsLineHeightDisabled","FONT_STYLE_SUPPORT_KEY","FONT_WEIGHT_SUPPORT_KEY","FontAppearanceEdit","useIsFontStyleDisabled","useIsFontWeightDisabled","newStyles","styleSupport","weightSupport","useIsFontAppearanceDisabled","stylesDisabled","weightsDisabled","FontFamilyControl","fontFamilies","blockLevelFontFamilies","fontFamily","FONT_FAMILY_SUPPORT_KEY","TYPOGRAPHY_SUPPORT_KEY","FontFamilyEdit","predefinedFontFamily","useIsFontFamilyDisabled","getFontSize","fontSizeAttribute","customFontSizeAttribute","fontSizeObject","getFontSizeObjectByValue","getFontSizeClass","fontSizeSlug","FONT_SIZE_SUPPORT_KEY","FontSizeEdit","fontSizeValue","withReset","useIsFontSizeDisabled","hasFontSizes","withFontSizeInlineStyles","TEXT_DECORATIONS","formatUnderline","formatStrikethrough","TextDecorationControl","textDecoration","TEXT_DECORATION_SUPPORT_KEY","TextDecorationEdit","newDecoration","useIsTextDecorationDisabled","notSupported","hasTextDecoration","TEXT_TRANSFORMS","formatUppercase","formatLowercase","formatCapitalize","TextTransformControl","textTransform","TEXT_TRANSFORM_SUPPORT_KEY","TextTransformEdit","newTransform","useIsTextTransformDisabled","hasTextTransforms","LetterSpacingControl","defaultValues","LETTER_SPACING_SUPPORT_KEY","LetterSpacingEdit","letterSpacing","newSpacing","useIsLetterSpacingDisabled","hasLetterSpacing","TYPOGRAPHY_SUPPORT_KEYS","TypographyPanel","isFontFamilyDisabled","isFontSizeDisabled","isFontAppearanceDisabled","isLineHeightDisabled","isTextDecorationDisabled","isTextTransformDisabled","isLetterSpacingDisabled","configs","useIsTypographyDisabled","hasTypographySupport","defaultControls","hasFontFamilyValue","resetFontFamily","hasFontSizeValue","resetFontSize","hasFontAppearanceValue","resetFontAppearance","fontAppearance","hasLineHeightValue","resetLineHeight","hasLetterSpacingValue","resetLetterSpacing","hasTextDecorationValue","resetTextDecoration","hasTextTransformValue","resetTextTransform","styleSupportKeys","hasStyleSupport","getInlineStyles","skipSerializationPathsEdit","skipSerializationPathsSave","renamedFeatures","skipPaths","indicator","featureName","withBlockControls","shouldDisplayControls","withElementsStyles","blockElementsContainerIdentifier","skipLinkColorSerialization","rawElementsStyles","elementCssRules","filteredElementsStyles","elementName","elementStyles","cssRule","compileCSS","ELEMENTS","dangerouslySetInnerHTML","__html","toolbarIcon","colorPalette","duotonePalette","disableCustomDuotone","DuotoneSwatch","DuotonePicker","InlineDuotone","useMultiOriginPresets","presetSetting","defaultSetting","disableDefault","userPresets","themePresets","defaultPresets","DuotonePanel","newDuotone","withDuotoneControls","hasDuotoneSupport","withDuotoneStyles","duotoneSupport","selectorsGroup","scope","scopes","selectorsScoped","outer","scopeSelector","layoutBlockSupportKey","useLayoutClasses","rootPaddingAlignment","useRootPaddingAwareAlignments","globalLayoutSettings","defaultBlockLayout","usedLayout","inherit","layoutClassnames","definitions","useLayoutStyles","fullLayoutType","blockGapSupport","LayoutPanel","defaultThemeLayout","allowEditing","allowInheriting","showInheritToggle","constrainedType","displayControlsForLegacyLayouts","hasContentSizeOrLegacySettings","onChangeLayout","newLayout","LayoutTypeSwitcher","newType","ButtonGroup","withInspectorControls","withLayoutStyles","hasLayoutBlockSupport","disableLayoutStyles","shouldRenderLayoutStyles","layoutClasses","StopEditingAsBlocksOnOutsideSelect","stopEditingAsBlock","isBlockOrDescendantSelected","focusModeToRevert","isLockedByParent","isEditingAsBlocks","hasBlockMetadataSupport","getBorderClassesAndStyles","useBorderProps","borderProps","borderColorObject","getColorClassesAndStyles","blockTypeSettings","__experimentalLabel","metadata","EMPTY_OBJECT","useColorProps","gradientsPerOrigin","colorProps","backgroundColorObject","textColorObject","getSpacingClassesAndStyles","getTypographyClassesAndStyles","fontFamilyClassName","useCachedTruthy","cachedValue","setCachedValue","upperFirst","firstLetter","withCustomColorPalette","colorsArray","withEditorColorPalette","allColors","createColorHOC","colorTypes","withColorPalette","colorMap","colorType","setters","createSetters","colorUtils","getMostReadableColor","colordColor","getColorContrast","maxContrast","settersAccumulator","colorContext","colorAttributeName","upperFirstColorAttributeName","customColorAttributeName","createSetColor","previousState","previousColorObject","class","createCustomColorsHOC","withColors","DEFAULT_FONT_SIZES","fontSizeNames","fontSizeAttributeNames","fontSizeAttributeNamesAccumulator","fontSizeAttributeName","customFontSizeAttributeName","createSetFontSize","didAttributesChange","newStateAccumulator","fontSizeAttributeValue","DEFAULT_ALIGNMENT_CONTROLS","alignLeft","alignRight","alignmentControls","applyOrUnset","AlignmentControl","AlignmentToolbar","triggerPrefix","useItems","blockItem","allowContext","getOptionCompletion","inserterItem","apiFetch","per_page","search","letters","order_by","getOptionKeywords","getOptionLabel","subtype","url","useCompleters","completers","filteredCompleters","linkAutocompleter","blockAutocompleter","hasFilter","Autocomplete","fullscreen","hasFocusBorder","rootLabelText","hasSelection","rootLabel","chevronRightSmall","ColorSelectorSVGIcon","ColorSelectorIcon","renderToggleComponent","TextColor","BackgroundColor","AnimatedTreeGridRow","TreeGridRow","ListViewLeaf","rowCount","positionInSet","setSize","ListViewExpander","forceToggle","chevronLeftSmall","onToggleExpanded","clearData","ListViewBlockContents","siblingBlockCount","isExpanded","blockMovingClientId","selectedBlockInBlockEditor","isBlockMoveTarget","draggableClientIds","ListViewContext","useListViewContext","ListViewBlock","isDragged","isBranchSelected","showBlockMovers","preventAnnouncement","cellRef","setIsHovered","forceSelectionContentLock","isFirstSelectedBlock","isLastSelectedBlock","showBlockActions","blockPositionDescription","siblingCount","getBlockPositionDescription","blockAriaLabel","settingsAriaLabel","isTreeGridMounted","expand","collapse","hasRenderedMovers","moverCellClassName","listViewBlockSettingsClassName","selectEditorBlock","newClientId","toggleExpanded","colSpan","dropdownClientIds","withoutGridItem","disableOpenOnArrowDown","countBlocks","expandedState","draggedClientIds","isExpandedByDefault","countReducer","ListViewBranch","listPosition","fixedListWindow","shouldShowInnerBlocks","filteredBlocks","nextPosition","itemInView","blockInView","updatedPath","hasNestedBlocks","shouldExpand","showBlock","isClientIdSelected","isSelectedBranch","ListViewDropIndicator","listViewRef","blockDropTarget","dropPosition","rootBlockElement","targetElement","getDropIndicatorIndent","targetElementRect","isPointContainedByRect","ALLOWED_DROP_EDGES","clientIdsTree","useListViewClientIds","visibleBlockCount","updateBlockSelection","destinationClientId","isKeyPress","HOME","END","clientIdWithParents","blockId","startTarget","endTarget","startParents","endParents","startId","endId","getCommonDepthClientIds","updatedSelectedBlocks","selectionDiff","useBlockSelection","setExpandedState","dropZoneRef","setTarget","draggedBlockClientIds","isBlockDrag","newTarget","blocksData","candidateBlockData","candidateRect","blockData","isDraggedBlock","isCursorWithinBlock","previousBlockData","isDraggingBelow","canInsertDraggedBlocksAsChild","innerBlockCount","blockCenterX","isNestingGesture","canInsertDraggedBlocksAsSibling","getListViewDropTarget","useListViewDropZone","elementRef","treeGridRef","setSelectedTreeId","firstSelectedBlockClientId","selectedTreeId","selectedBlockParentClientIds","parentClientIds","useListViewExpandSelectedItem","useFixedWindowList","useWindowing","windowOverscan","expandRow","collapseRow","focusRow","startRow","endRow","contextValue","onCollapseRow","onExpandRow","onFocusRow","applicationAriaLabel","BlockNavigationDropdownToggle","listView","BlockStylesPreviewPanel","previewBlocks","isStylePreview","BlockStylesPreviewPanelFill","BlockStyles","onHoverClassName","previewClassName","hoveredStyle","setHoveredStyle","containerScrollTop","setContainerScrollTop","isMobileViewport","debouncedSetHoveredStyle","debounce","styleItemHandler","buttonText","onSelectStylePreview","instructions","allowSkip","Placeholder","fillRule","clipRule","VIEWMODES","Actions","onBlockPatternSelect","CarouselNavigation","handlePrevious","handleNext","activeSlide","totalSlides","viewMode","setViewMode","isCarouselView","displayControls","grid","SetupContent","containerClass","slideClass","BlockPatternSlide","filterPatternsFn","setActiveSlide","usePatternsSetup","onPatternSelectCallback","VariationsButtons","onSelectVariation","selectedValue","VariationsDropdown","MenuItemsChoice","choices","activeBlockVariation","hasUniqueIcons","variationIcons","variationName","colorsFeature","disableCustomColorsFeature","hasColorsToChoose","withColorContext","ColorPaletteControl","EXAMPLE_DATE","DateFormatPicker","format","defaultFormat","dateI18n","NonDefaultControls","suggestedFormats","suggestedOptions","suggestedFormat","customOption","__experimentalHint","isCustom","setIsCustom","Link","PanelColorGradientSettingsInner","marginY","PanelColorGradientSettingsSingleSelect","PanelColorGradientSettingsMultipleSelect","getCropSize","mediaWidth","mediaHeight","containerHeight","aspect","rotation","rotateSize","fittingWidth","fittingHeight","restrictPosition","mediaSize","cropSize","restrictPositionCoord","maxPosition","getDistanceBetweenPoints","pointA","pointB","getRotationBetweenPoints","atan2","computeCroppedArea","crop","limitAreaFn","limitArea","noOp","mediaBBoxSize","mediaNaturalBBoxSize","naturalWidth","naturalHeight","croppedAreaPercentages","widthInPixels","heightInPixels","sizePixels","croppedAreaPixels","_max","getInitialCropFromCroppedAreaPercentages","minZoom","maxZoom","getInitialCropFromCroppedAreaPixels","mediaZoom","getMediaZoom","getZoomFromCroppedAreaPixels","cropZoom","getCenter","rotRad","_i","hasWheelJustStarted","currentDoc","onDragStopped","onTouchMove","containerRef","wheelTimer","computeSizes","emitCropData","setInitialCrop","onMediaLoaded","initialCroppedAreaPercentages","onCropChange","onZoomChange","initialCroppedAreaPixels","mediaRef","imageRef","videoRef","containerRect","containerAspect","videoWidth","videoHeight","mediaAspect","renderedMediaSize","objectFit","setMediaSize","onCropSizeChange","recomputeCropPosition","setCropSize","Cropper","getMousePoint","onDrag","onTouchRequest","touches","onPinchStart","getTouchPoint","onPinchMove","dragStartPosition","dragStartCrop","onInteractionStart","rafDragTimeout","currentWindow","offsetY","requestedPosition","newPosition","cleanEvents","onInteractionEnd","onWheelRequest","newZoom","zoomSpeed","setNewZoom","shouldUpdatePosition","zoomPoint","getPointOnContainer","zoomTarget","getPointOnMedia","getAspect","cropData","getCropData","onCropComplete","onCropAreaChange","zoomWithScroll","preventZoomSafari","disableAutomaticStylesInjection","styleRef","nonce","complete","onMediaLoad","setImageRef","setVideoRef","clearScrollEvent","prevProps","emitCropAreaChange","video","load","lastPinchDistance","lastPinchRotation","rafPinchTimeout","newRotation","onRotationChange","image","mediaProps","cropShape","showGrid","_c","containerStyle","cropAreaStyle","mediaStyle","_d","containerClassName","cropAreaClassName","mediaClassName","onTouchStart","alt","onLoad","autoPlay","muted","onLoadedMetadata","touch","ImageEditingContext","useImageEditingContext","ImageEditingProvider","isEditing","onFinishEditing","onSaveImage","transformImage","imageProperties","transformState","editedUrl","setEditedUrl","setCrop","setPosition","setZoom","setRotation","setAspect","defaultAspect","setDefaultAspect","initializeTransformValues","rotateClockwise","angle","naturalAspectRatio","Image","translateX","translateY","getContext","translate","drawImage","toBlob","blob","createObjectURL","imgCrossOrigin","crossOrigin","useTransformState","useTransformImage","saveImage","createErrorNotice","isInProgress","setIsInProgress","attrs","data","response","source_url","useSaveImage","providerValue","ImageCropper","editedHeight","MIN_ZOOM","MAX_ZOOM","newCropPercent","Spinner","ZoomDropdown","AspectGroup","aspectRatios","AspectRatioDropdown","aspectRatioIcon","newAspect","RotationButton","rotateRightIcon","FormControls","ImageEditor","IMAGE_SIZE_PRESETS","ImageSizeControl","imageSizeHelp","imageWidth","imageHeight","imageSizeOptions","isResizable","onChangeImage","currentHeight","currentWidth","updateDimension","updateDimensions","customHeight","customWidth","defaultHeight","defaultWidth","setCurrentWidth","setCurrentHeight","dimension","nextHeight","useDimensionHandler","scaledWidth","scaledHeight","isCurrent","handleSettingChange","theSettings","isFunction","maybeFunc","URLInput","selectLink","handleOnClick","bindSuggestionNode","autocompleteRef","createRef","inputRef","updateSuggestions","suggestionNodes","isUpdatingSuggestions","suggestions","showSuggestions","selectedSuggestion","suggestionsListboxId","suggestionOptionIdPrefix","__experimentalShowInitialSuggestions","scrollingIntoView","scrollIntoView","disableSuggestions","shouldShowInitialSuggestions","suggestionsRequest","__experimentalFetchLinkSuggestions","fetchLinkSuggestions","__experimentalHandleURLSuggestions","handleURLSuggestions","isInitialSuggestions","isURL","loading","request","inputValue","setSelectionRange","suggestion","previousIndex","shouldShowSuggestions","renderControl","renderSuggestions","isFullWidth","__experimentalRenderControl","inputId","required","__experimentalRenderSuggestions","suggestionsListProps","buildSuggestionItemProps","isLoading","handleSuggestionClick","withSafeTimeout","withSpokenMessages","withInstanceId","mark","ICONS_MAP","postList","post_tag","tag","attachment","SearchItemIcon","globe","shouldShowType","TextHighlight","highlight","filterURLForDisplay","safeDecodeURI","isFrontPage","getVisualTypeName","CREATE_TYPE","MAILTO_TYPE","INTERNAL_TYPE","LINK_ENTRY_TYPES","DEFAULT_LINK_SETTINGS","LinkControlSearchResults","withCreateSuggestion","currentInputValue","createSuggestionButtonText","suggestionsQuery","resultsListClasses","isSingleDirectEntryResult","shouldShowCreateSuggestion","shouldShowSuggestionsTypes","searchResultsLabelId","labelText","searchResultsLabel","Fragment","isURLLike","isInternal","handleNoop","handleDirectEntry","protocol","getProtocol","prependHTTP","noopSearchHandler","LinkControlSearchInput","currentLink","onCreateSuggestion","fetchSuggestions","allowDirectEntry","showInitialSuggestions","withURLSuggestion","useLabel","genericSearchHandler","fetchSearchSuggestions","pageOnFront","directEntryHandler","resultsIncludeFrontPage","couldBeURL","handleEntitySearch","useSearchHandler","searchHandler","focusedSuggestion","setFocusedSuggestion","onSuggestionSelected","restLinkProps","inputClasses","hasSuggestion","ViewerSlot","ViewerFill","isFetching","richData","LinkPreview","onEditClick","hasRichPreviews","hasUnlinkControl","showRichPreviews","fetchRichUrlData","__experimentalFetchRichUrlData","AbortController","controller","signal","urlData","aborted","abort","useRichUrlData","hasRichData","displayURL","displayTitle","isEmptyURL","LinkControl","searchInputPlaceholder","noDirectEntry","forceIsEditingLink","createSuggestion","propInputValue","noURLSuggestion","hasTextControl","renderControlBottom","isMounting","wrapperNode","textInputRef","internalInputValue","setInternalInputValue","internalTextValue","setInternalTextValue","isEditingLink","setIsEditingLink","isEndingEditWithFocus","currentInputIsEmpty","createPage","isCreatingPage","errorMessage","handleCreatePage","cancelableCreateSuggestion","setIsCreatingPage","setErrorMessage","suggestionTitle","hasCanceled_","isCanceled","makeCancelable","useCreatePage","stopEditing","whichFocusTargetIndex","handleSubmit","shownUnlinkControl","showSettingsDrawer","showTextControl","updatedValue","keyboardReturn","uniqueId","createNotice","removeNotice","mediaURL","mediaId","mediaIds","allowedTypes","accept","onError","onSelectURL","onToggleFeaturedImage","useFeaturedImage","onFilesUpload","multiple","addToGallery","handleUpload","editMediaButtonRef","errorNoticeID","onUploadError","safeMessage","selectMedia","closeMenu","openOnArrowDown","click","gallery","allowedType","mediaIcon","FormFileUpload","filesList","onFileChange","uploadFiles","openFileDialog","upload","postFeaturedImage","LinkViewerURL","urlLabel","linkClassName","URLPopover","additionalControls","renderSettings","isSettingsExpanded","setIsSettingsExpanded","showSettings","LinkEditor","onChangeInputValue","LinkViewer","onEditLinkClick","InsertFromURLPopover","labels","mediaPreview","notices","disableDropZone","disableMediaButtons","onCancel","onDoubleClick","onFilesPreUpload","mediaLibraryButton","setSrc","isURLInputVisible","setIsURLInputVisible","onChangeSrc","openURLInput","closeURLInput","onSubmitSrc","setMedia","lastMediaPassed","newMedia","filteredMedia","urlSlug","cutOffIndex","onUpload","renderPlaceholder","typesAllowed","firstAllowedType","isOneType","isAudio","isImage","isVideo","placeholderClassName","preview","renderDropZone","DropZone","renderCancelLink","renderUrlSelectionUI","renderFeaturedImageToggle","libraryButton","uploadMediaLibraryButton","renderMediaUploadChecked","colorSettings","otherSettings","hasActive","InlineSelectionToolbar","editableContentElement","activeFormats","lastFormat","lastFormatType","richTextStore","getFormatType","useAnchor","InlineToolbar","hasInlineToolbar","getActiveFormats","useUndoAutomaticChange","__experimentalUndo","filePasteHandler","addActiveFormats","formats","getMultilineTag","getAllowedFormats","allowedFormats","formattingControls","disableFormats","splitValue","pastedBlocks","onSplit","onSplitMiddle","valueWithEnsuredSelection","hasPastedBlocks","lastPastedBlockIndex","isAfterOriginal","adjustLines","isMultiline","LINE_SEPARATOR","usePasteHandler","propsRef","_onPaste","formatTypes","__unstableEmbedURLOnPaste","pastePlainText","startStr","startIdx","endIdx","removeWindowsFragments","metaTag","removeCharsetMetaTag","log","transformed","accumlator","__unstablePasteRule","pastedMultilineTag","pastedValue","regexp","valueToInsert","wrapSelectionSettings","useBeforeInputRules","pair","startChar","endChar","InputEvent","findSelection","nestedSelection","useInputRules","inputRule","trimmedTextBefore","prefixTransforms","__unstableAllowPrefixTransformations","__unstableInputRule","searchText","preventEventDiscovery","useEnter","removeEditorOnlyFormats","disableLineBreaks","onSplitAtEnd","canSplit","regExp","isEmptyLine","insertLineSeparator","canSplitAtEnd","formatTypesSelector","getFormatTypes","interactiveContentTags","prefixSelectKeys","getPrefixedSelectKeys","useShortcuts","keyboardShortcuts","keyboardShortcut","useInputEvents","inputEvents","useFirefoxCompat","parentEditable","FormatEdit","Edit","activeFormat","getActiveFormat","activeObject","getActiveObject","isObjectActive","linkFormatAtStart","linkFormatAtEnd","activeAttributes","activeObjectAttributes","keyboardShortcutContext","inputEventContext","ForwardedRichTextContainer","RichTextWrapper","originalValue","originalOnChange","originalIsSelected","inlineToolbar","autocompleters","withoutInteractiveFormatting","__unstableOnSplitAtEnd","__unstableOnSplitMiddle","identifier","__unstablePastePlainText","__unstableDisableFormats","unstableOnFocus","__unstableMobileNoFocusOnMount","deleteEnter","placeholderTextColor","textAlign","selectionColor","tagsToEliminate","rootTagsToEliminate","disableEditingMenu","minWidth","disableAutocorrection","removeNativeProps","anchorRef","adjustedAllowedFormats","hasFormats","adjustedValue","adjustedOnChange","childrenSource","__unstableCreateElement","unset","prepareHandlers","valueHandlers","changeHandlers","allFormatTypes","keyedSelected","__experimentalGetPropsForEditableTreePreparation","richTextIdentifier","__experimentalCreatePrepareEditableTree","__experimentalCreateOnChangeEditableValue","dispatchers","__experimentalGetPropsForEditableTreeChangeHandler","useFormatTypes","formatType","removeFormat","richTextRef","useRichText","__unstableFormats","__unstableText","changeHandler","__unstableIsSelected","__unstableMultilineTag","__unstableDependencies","__unstableAfterParse","__unstableBeforeSerialize","__unstableAddInvisibleFormats","autocompleteProps","useAutocompleteProps","useBlockEditorAutocompleteProps","record","previousText","hasActiveFormats","useMarkPersistent","onKeydown","isKeyboardEvent","suppressContentEditableWarning","Tag","MultilineTag","EditableText","__experimentalVersion","remainingProps","ResponsiveBlockControlLabel","viewport","desc","accessibleLabel","toggleLabel","onIsResponsiveChange","renderDefaultControl","renderResponsiveControls","isResponsive","defaultLabel","viewports","toggleControlLabel","toggleHelpText","defaultControl","RichTextShortcut","character","onUse","onUseRef","RichTextToolbarButton","shortcutType","shortcutCharacter","fillName","displayShortcut","__unstableRichTextInputEvent","selectIcon","editIcon","UnitControl","unitsProp","URLInputButton","toggle","submitLink","buttonLabel","arrowLeft","LINK_DESTINATION_NONE","LINK_DESTINATION_CUSTOM","LINK_DESTINATION_MEDIA","LINK_DESTINATION_ATTACHMENT","NEW_TAB_REL","fill","ImageURLInputUI","linkDestination","onChangeUrl","mediaType","mediaUrl","mediaLink","linkTarget","linkClass","setIsOpen","setPopoverAnchor","openLinkUI","urlInput","setUrlInput","startEditLink","stopEditLink","closeLinkUI","onFocusOutside","autocompleteElement","onSubmitLinkChange","selectedDestination","getLinkDestinations","onLinkRemove","linkDestinations","advancedOptions","updatedLinkTarget","newLinkTarget","updatedRel","rels","relVal","getUpdatedLinkTargetSettings","linkEditorValue","linkIcon","linkDestinationInput","onSetHref","PreviewOptions","deviceType","setDeviceType","useResizeCanvas","actualWidth","updateActualWidth","innerWidth","resizeListener","getCanvasWidth","device","deviceWidth","innerHeight","contentInlineStyles","wordCount","DefaultStylePicker","preferredStyle","onUpdatePreferredStyleVariations","defaultStyleName","selectOnChange","useContentBlocks","contenBlocksObjectAux","__experimentalRole","getContentBlocks","BlockNavigationButton","BlockInspectorLockedBlocks","topLevelLockedBlock","contentBlocks","contentBlock","BlockInspectorSingleBlock","blockStyles","AdvancedControls","initialOpen","showNoBlockSelectedMessage","_selectedBlockClientId","_selectedBlockName","_blockType","isSelectedBlockUnregistered","getUnregisteredTypeHandlerName","isReady","setIsReady","isZoomOutMode","BlockTools","blockToolbarRef","blockToolbarAfterRef","KeyboardShortcuts","Register","registerShortcut","keyCombination","aliases","MultiSelectScrollIntoView","KEY_DOWN_ELIGIBLE_KEY_CODES","useMouseMoveTypingReset","lastClientX","lastClientY","stopTypingOnMouseMove","useTypingObserver","_isTyping","ref1","ref2","timerId","stopTypingOnNonTextField","stopTypingOnEscapeKey","stopTypingOnSelectionUncollapse","startTypingInTextField","isKeyDownEligibleForStartTyping","isIE","arrowKeyCodes","useTypewriter","scrollResizeRafId","onKeyDownRafId","caretRect","onScrollResize","computeCaretRectangle","maintainCaretPosition","isSelectionEligibleForScroll","currentCaretRect","windowScroll","scrollY","scrollContainerY","relativeScrollPosition","editableNodes","isLastEditableNode","scrollContainerHeight","addSelectionChangeListener","computeCaretRectOnSelectionChange","RenderedRefsContext","RecursionProvider","previouslyRenderedBlocks","newRenderedBlocks","addToBlockType","useHasRecursion","InspectorPopoverHeader","closeSmall","additionalProps","DateTimePicker","startOfWeek","l10n","__nextRemoveHelpButton","__nextRemoveResetButton","ELEMENT_CLASS_NAMES","caption","__experimentalGetElementClassName","matchesAttributes","__experimentalGetMatchingVariation","parseUnit","cssUnit","getFunctionUnitValue","functionUnitValue","functionUnit","getPxFromCssUnit","parseUnitFunction","currentCssUnit","isMathExpression","evalMathExpression","errorFound","cssUnitsBits","expression","Function","toFixed","convertParsedUnitToPx","ONE_PERCENT","setOptions","relativeUnits","vh","vw","vmin","vmax","ex","lh","absoluteUnits","in","cm","PIXELS_PER_INCH","mm","pt","pc","Q","hashOptions","hash"],"sourceRoot":""}

Zerion Mini Shell 1.0