File "index.min.js.map"
Full Path: /home/pumpbmko/public_html/wp-content/plugins/gutenberg/build/edit-site/index.min.js.map
File size: 2.27 MB
MIME-type: text/plain
Charset: utf-8
{"version":3,"file":"./build/edit-site/index.min.js","mappings":"UACIA,EADAC,E,YCAJ,IAAIC,EAAe,CAClB,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,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,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KgE,MAEzChE,KAAKygF,IADa,KAAdyE,EACO7sF,EAAEooF,IAwCR,CACN,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,QACS,GAtGgByE,GAIzB,IAAIC,EAAqC,IAFdnlF,KAAKolF,kBAChB,IAAbplF,KAAKgE,QAAiB,GAEP,SAAbhE,KAAKygF,KAA+B,SAAbzgF,KAAKygF,MAChC0E,EAA0C,IAA1BnlF,KAAKolF,kBAEtBplF,KAAKmkF,WAAa9rF,EAAEipF,QACf6D,IACJnlF,KAAK+kF,gBAAkB1sF,EAAEipF,QAE3B,EA4FD,MAAM+D,GAAe,CAAC,EACtB,IAAIC,IAAqB,EAoIzB,SAAS1C,GAAa/zE,EAAQ0xE,EAAMC,GACnC,IAAIjgF,EAAOggF,EAAKE,IAAIppF,QAAS,WAAY,IACrCkuF,EAAOF,GAAc9kF,GACzB,OAAKglF,EAAc,IAAIA,EAAMhF,EAAMC,EAAU3xE,IAC7CwzB,QAAQG,KACP,kCAAmCjiC,6BAE7B,CAAC,EACT,CACA,SAASilF,KACR,IAAI78E,EAAQ,EACZ,SAAS88E,EAAahxC,EAASC,GAC9B,IAAO4wC,GACN,OAAK38E,EAAQ,GACL+rC,EAAQ,IAAIn7C,MAAO,2BAE3BoP,IACOq3B,YAAY,IAAMylD,EAAahxC,IAAW,MAElDA,EAASmuC,GACV,CACA,OAAO,IAAIpuC,SAAS,CAAEC,EAASC,IAAY+wC,EAAahxC,IACzD,CAzJAD,QAAQqC,IAAK,CACZrC,QAAQC,UAAUp6B,MAAM,WACvB,OAAOqrE,E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Bv+F,EAAE4oF,OACjCjhF,KAAK62F,wBAA0Bx+F,EAAE4oF,OACX,IAAjBjhF,KAAK+pB,QAAuB1xB,EAAE0pF,oBAAnC,IACD,KAiED,MAAM+U,GAAa,CAClB,UACA,QACA,mBACA,QACA,SACA,WACA,aACA,SACA,UACA,YACA,cACA,YACA,aACA,WACA,OACA,QACA,SACA,SACA,QACA,OACA,MACA,MACA,QACA,OACA,OACA,MACA,QACA,QACA,OACA,QACA,YACA,OACA,QACA,UACA,WACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,cACA,YACA,eACA,cACA,aACA,QACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,YACA,MACA,aACA,aACA,YACA,QACA,WACA,SACA,SACA,YACA,YACA,SACA,SACA,cACA,YACA,SACA,QACA,WACA,SACA,SACA,cACA,YACA,SACA,SACA,cACA,YACA,SACA,SACA,SACA,cACA,YACA,SACA,SACA,SACA,cACA,YACA,SACA,SACA,OACA,WACA,UACA,SACA,YACA,aACA,aACA,YACA,YACA,QACA,WACA,WACA,KACA,SACA,WACA,YACA,YACA,eACA,MACA,KACA,cACA,YACA,UACA,KACA,WACA,cACA,eACA,QACA,KACA,SACA,eACA,aACA,aACA,UACA,SACA,cACA,QACA,gBACA,iBACA,WACA,mBACA,SACA,SACA,SACA,KACA,KACA,SACA,SACA,eACA,gBACA,YACA,aACA,SACA,UACA,YACA,YACA,WACA,WACA,gBACA,iBACA,KACA,KACA,YACA,iBACA,iBACA,eACA,cACA,cACA,cACA,SACA,YACA,SACA,SACA,cACA,YACA,SACA,SACA,cACA,QACA,SACA,SACA,cACA,SACA,WACA,aACA,QACA,SACA,QACA,YACA,OACA,UACA,eACA,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BAAsBpoJ,EAASooJ,qBAC/BsS,yBAA0B16J,EAAS06J,2BAIpC7oL,OAAOskF,iBAAkB,YAAczlF,GAAOA,EAAEukC,mBAAkB,GAClEpjC,OAAOskF,iBAAkB,QAAUzlF,GAAOA,EAAEukC,mBAAkB,GAE9D7zB,EAAK8pB,QACJ7M,EAAAA,GAAAA,KAAC87J,EAAAA,WAAU,CAAA/7J,UACVC,EAAAA,GAAAA,KAACu5J,GAAG,OAICx2K,CACR,CAEO,SAASu5K,KACfp4J,IAAY,iCAAkC,CAC7CC,MAAO,MACPO,QAAS,OAEX,C","sources":["webpack://wp/webpack/runtime/create fake namespace object","webpack://wp/./node_modules/remove-accents/index.js","webpack://wp/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://wp/./node_modules/use-sync-external-store/shim/index.js","webpack://wp/./packages/edit-site/lib/inflate.js","webpack://wp/./packages/edit-site/lib/unbrotli.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\",\"blockLibrary\"]","webpack://wp/external window [\"wp\",\"data\"]","webpack://wp/external window [\"wp\",\"deprecated\"]","webpack://wp/external window [\"wp\",\"element\"]","webpack://wp/external window [\"wp\",\"editor\"]","webpack://wp/external window [\"wp\",\"preferences\"]","webpack://wp/external window [\"wp\",\"widgets\"]","webpack://wp/external window [\"wp\",\"hooks\"]","webpack://wp/external window [\"wp\",\"compose\"]","webpack://wp/external window [\"wp\",\"blockEditor\"]","webpack://wp/external window [\"wp\",\"components\"]","webpack://wp/external window [\"wp\",\"i18n\"]","webpack://wp/external window [\"wp\",\"notices\"]","webpack://wp/external window [\"wp\",\"coreData\"]","webpack://wp/./node_modules/colord/index.mjs","webpack://wp/./node_modules/colord/plugins/a11y.mjs","webpack://wp/external window [\"wp\",\"privateApis\"]","../../packages/edit-site/src/lock-unlock.js","../../packages/edit-site/src/components/global-styles/hooks.js","../../packages/edit-site/src/utils/clone-deep.js","../../packages/edit-site/src/utils/set-nested-value.js","webpack://wp/external window \"ReactJSXRuntime\"","../../packages/edit-site/src/hooks/push-changes-to-global-styles/index.js","../../packages/edit-site/src/store/reducer.js","webpack://wp/external window [\"wp\",\"patterns\"]","../../packages/edit-site/src/utils/constants.js","../../packages/edit-site/src/store/actions.js","../../packages/edit-site/src/store/private-actions.js","../../packages/edit-site/src/utils/get-filtered-template-parts.js","../../packages/edit-site/src/store/selectors.js","../../packages/edit-site/src/store/private-selectors.js","../../packages/edit-site/src/store/constants.js","../../packages/edit-site/src/store/index.js","webpack://wp/external window [\"wp\",\"plugins\"]","webpack://wp/external window [\"wp\",\"router\"]","webpack://wp/./node_modules/clsx/dist/clsx.mjs","webpack://wp/external window [\"wp\",\"keyboardShortcuts\"]","webpack://wp/external window [\"wp\",\"commands\"]","webpack://wp/external window [\"wp\",\"coreCommands\"]","../../packages/edit-site/src/components/error-boundary/warning.js","../../packages/edit-site/src/components/error-boundary/index.js","webpack://wp/external window [\"wp\",\"htmlEntities\"]","webpack://wp/external window [\"wp\",\"primitives\"]","../../packages/icons/src/library/search.js","webpack://wp/external window [\"wp\",\"keycodes\"]","webpack://wp/external window [\"wp\",\"url\"]","../../packages/icons/src/library/wordpress.js","../../packages/edit-site/src/components/site-icon/index.js","webpack://wp/external window [\"wp\",\"dom\"]","../../packages/edit-site/src/components/sidebar/index.js","../../packages/edit-site/src/components/site-hub/index.js","../../packages/edit-site/src/components/resizable-frame/index.js","../../packages/edit-site/src/components/keyboard-shortcuts/register.js","../../packages/edit-site/src/components/keyboard-shortcuts/global.js","../../packages/edit-site/src/components/use-edited-entity-record/index.js","../../packages/edit-site/src/components/layout/hooks.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","../../packages/edit-site/src/components/layout/animation.js","../../packages/icons/src/library/check.js","../../packages/edit-site/src/utils/is-previewing-theme.js","../../packages/edit-site/src/components/save-button/index.js","../../packages/edit-site/src/components/save-hub/index.js","../../packages/edit-site/src/utils/use-activate-theme.js","webpack://wp/external window [\"wp\",\"apiFetch\"]","../../packages/edit-site/src/components/save-panel/index.js","../../packages/edit-site/src/utils/use-actual-current-theme.js","../../packages/edit-site/src/components/sync-state-with-url/use-sync-canvas-mode-with-url.js","../../packages/edit-site/src/components/layout/index.js","../../packages/icons/src/library/styles.js","../../packages/icons/src/library/help.js","../../packages/icons/src/library/rotate-right.js","../../packages/icons/src/library/rotate-left.js","../../packages/icons/src/library/brush.js","../../packages/icons/src/library/backup.js","../../packages/icons/src/library/external.js","../../packages/edit-site/src/hooks/commands/use-common-commands.js","../../packages/icons/src/library/layout.js","../../packages/icons/src/library/page.js","../../packages/icons/src/library/trash.js","../../packages/edit-site/src/components/routes/link.js","../../packages/edit-site/src/hooks/commands/use-edit-mode-commands.js","../../packages/edit-site/src/utils/is-template-revertable.js","../../packages/edit-site/src/utils/is-template-removable.js","../../packages/edit-site/src/components/sync-state-with-url/use-init-edited-entity-from-url.js","../../packages/edit-site/src/components/welcome-guide/image.js","../../packages/edit-site/src/components/welcome-guide/editor.js","../../packages/edit-site/src/components/welcome-guide/styles.js","../../packages/edit-site/src/components/welcome-guide/page.js","../../packages/edit-site/src/components/welcome-guide/template.js","../../packages/edit-site/src/components/welcome-guide/index.js","../../packages/edit-site/src/components/global-styles-renderer/index.js","../../packages/edit-site/src/components/canvas-loader/index.js","../../packages/edit-site/src/components/block-editor/use-navigate-to-entity-record.js","../../packages/edit-site/src/components/block-editor/use-site-editor-settings.js","../../packages/edit-site/src/components/plugin-template-setting-panel/index.js","../../packages/icons/src/library/seen.js","../../packages/icons/src/library/more-vertical.js","../../packages/icons/src/library/chevron-left.js","../../packages/icons/src/library/chevron-right.js","../../packages/edit-site/src/components/global-styles/icon-with-current-color.js","../../packages/edit-site/src/components/global-styles/navigation-button.js","../../packages/icons/src/library/typography.js","../../packages/icons/src/library/color.js","../../packages/icons/src/library/shadow.js","../../packages/edit-site/src/components/global-styles/root-menu.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/preview-styles.js","../../packages/edit-site/src/components/global-styles/utils.js","../../packages/edit-site/src/components/global-styles/typography-example.js","../../packages/edit-site/src/components/global-styles/highlighted-colors.js","../../packages/edit-site/src/components/global-styles/preview-iframe.js","../../packages/edit-site/src/components/global-styles/preview-styles.js","../../packages/edit-site/src/components/global-styles/screen-root.js","webpack://wp/external window [\"wp\",\"a11y\"]","../../packages/edit-site/src/components/global-styles/variations/variations-panel.js","../../packages/edit-site/src/components/global-styles/header.js","../../packages/edit-site/src/components/global-styles/screen-block-list.js","../../packages/edit-site/src/components/global-styles/block-preview-panel.js","../../packages/edit-site/src/components/global-styles/subtitle.js","../../packages/edit-site/src/components/global-styles/screen-block.js","../../packages/edit-site/src/components/global-styles/typography-elements.js","../../packages/edit-site/src/components/global-styles/preview-typography.js","../../packages/edit-site/src/hooks/use-theme-style-variations/use-theme-style-variations-by-property.js","../../packages/edit-site/src/components/global-styles/variations/variation.js","../../packages/edit-site/src/components/global-styles/variations/variations-typography.js","../../packages/edit-site/src/components/global-styles/font-library-modal/resolvers.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/constants.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/index.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/toggleFont.js","../../packages/edit-site/src/components/global-styles/font-library-modal/context.js","../../packages/edit-site/src/components/global-styles/font-library-modal/font-demo.js","../../packages/edit-site/src/components/global-styles/font-library-modal/font-card.js","../../packages/edit-site/src/components/global-styles/font-library-modal/library-font-variant.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/sort-font-faces.js","../../packages/edit-site/src/components/global-styles/font-library-modal/installed-fonts.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/fonts-outline.js","../../packages/edit-site/src/components/global-styles/font-library-modal/google-fonts-confirm-dialog.js","../../packages/edit-site/src/components/global-styles/font-library-modal/collection-font-variant.js","../../packages/edit-site/src/components/global-styles/font-library-modal/font-collection.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/filter-fonts.js","webpack://wp/./packages/edit-site/lib/lib-font.browser.js","../../packages/edit-site/src/components/global-styles/font-library-modal/utils/make-families-from-faces.js","../../packages/edit-site/src/components/global-styles/font-library-modal/upload-fonts.js","../../packages/edit-site/src/components/global-styles/font-library-modal/index.js","../../packages/edit-site/src/components/global-styles/font-family-item.js","../../packages/edit-site/src/components/global-styles/font-families.js","../../packages/icons/src/icon/index.js","../../packages/edit-site/src/components/global-styles/font-sizes/font-sizes-count.js","../../packages/edit-site/src/components/global-styles/screen-typography.js","../../packages/edit-site/src/components/global-styles/typography-panel.js","../../packages/edit-site/src/components/global-styles/typography-preview.js","../../packages/edit-site/src/components/global-styles/screen-typography-element.js","../../packages/edit-site/src/components/global-styles/font-sizes/font-size-preview.js","../../packages/edit-site/src/components/global-styles/font-sizes/confirm-delete-font-size-dialog.js","../../packages/edit-site/src/components/global-styles/font-sizes/rename-font-size-dialog.js","../../packages/edit-site/src/components/global-styles/size-control/index.js","../../packages/edit-site/src/components/global-styles/font-sizes/font-size.js","../../packages/icons/src/library/plus.js","../../packages/edit-site/src/components/global-styles/font-sizes/confirm-reset-font-sizes-dialog.js","../../packages/edit-site/src/components/global-styles/font-sizes/font-sizes.js","../../packages/icons/src/library/shuffle.js","../../packages/edit-site/src/components/global-styles/color-indicator-wrapper.js","../../packages/edit-site/src/components/global-styles/palette.js","../../packages/edit-site/src/components/global-styles/screen-colors.js","../../packages/edit-site/src/components/global-styles/preset-colors.js","../../packages/edit-site/src/components/global-styles/preview-colors.js","../../packages/edit-site/src/components/global-styles/variations/variations-color.js","../../packages/edit-site/src/components/global-styles/color-palette-panel.js","../../packages/edit-site/src/components/global-styles/gradients-palette-panel.js","../../packages/edit-site/src/components/global-styles/screen-color-palette.js","../../packages/edit-site/src/components/global-styles/shadows-panel.js","../../packages/icons/src/library/reset.js","../../packages/icons/src/library/settings.js","../../packages/edit-site/src/components/global-styles/shadow-utils.js","../../packages/edit-site/src/components/global-styles/shadows-edit-panel.js","../../packages/edit-site/src/components/global-styles/screen-shadows.js","../../packages/edit-site/src/components/global-styles/dimensions-panel.js","../../packages/edit-site/src/components/global-styles/background-panel.js","../../packages/edit-site/src/components/global-styles/screen-layout.js","../../packages/edit-site/src/components/global-styles/style-variations-container.js","../../packages/edit-site/src/components/sidebar-navigation-screen-global-styles/content.js","../../packages/edit-site/src/components/global-styles/screen-style-variations.js","../../packages/icons/src/library/close-small.js","../../packages/edit-site/src/components/editor-canvas-container/index.js","../../packages/edit-site/src/components/style-book/index.js","../../packages/edit-site/src/components/global-styles/screen-css.js","../../packages/edit-site/src/components/revisions/index.js","../../packages/edit-site/src/components/global-styles/screen-revisions/use-global-styles-revisions.js","webpack://wp/external window [\"wp\",\"date\"]","../../packages/edit-site/src/components/global-styles/screen-revisions/revisions-buttons.js","../../packages/icons/src/library/previous.js","../../packages/icons/src/library/next.js","../../packages/edit-site/src/components/pagination/index.js","../../packages/edit-site/src/components/global-styles/screen-revisions/index.js","../../packages/edit-site/src/components/global-styles/ui.js","../../packages/edit-site/src/components/global-styles-sidebar/default-sidebar.js","../../packages/edit-site/src/components/global-styles-sidebar/index.js","../../packages/icons/src/library/download.js","webpack://wp/external window [\"wp\",\"blob\"]","../../packages/edit-site/src/components/more-menu/site-export.js","../../packages/edit-site/src/components/more-menu/welcome-guide-menu-item.js","../../packages/edit-site/src/components/more-menu/index.js","../../packages/edit-site/src/components/routes/use-title.js","../../packages/edit-site/src/components/editor/use-editor-title.js","../../packages/edit-site/src/components/editor/index.js","../../packages/edit-site/src/components/block-editor/use-editor-iframe-props.js","../../packages/dataviews/src/constants.ts","../../packages/dataviews/src/components/dataviews-context/index.ts","../../packages/dataviews/src/lock-unlock.ts","../../packages/dataviews/src/components/dataviews-bulk-actions/index.tsx","../../packages/dataviews/src/components/dataviews-item-actions/index.tsx","../../packages/dataviews/src/components/dataviews-bulk-actions-toolbar/index.tsx","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/3IEDWLST.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/4R3V3JGP.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/4R3V3JGP.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/22HHDS5F.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/RRSZHCH6.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/VDNATJW2.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/utils/events.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/6O5OEQGF.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/XM66DUTO.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/5M6RSQEC.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/MADQZZRL.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/3D6OCOHF.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/DMSZFK7W.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/utils/focus.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/WL6TTPTB.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/R676XYVY.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/EKQEJRUF.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/7GBW5FLS.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/Y6GYTNQ2.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/I62TROYO.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/HZJ2XALY.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/URUD7X4C.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/7PRQYBBV.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/2H5K47H4.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/combobox/combobox-store.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/MFZZDIHG.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/5RJNXXU2.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/core/esm/__chunks/WCKXDMU7.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/URCSOWGR.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/XWCFCD3Q.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/J55AVALY.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/XXVAHUAO.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/TE637IA7.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/UNDSQXBK.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/combobox/combobox-provider.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/combobox/combobox-label.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/NLT7LY5Y.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/SHA3WOPI.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/WAZE6NXP.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/FTNKYK65.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/combobox/combobox.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/RQZGFHI2.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/Y3BYYHRY.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/KSZPJCUA.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/7YKLTEOQ.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/__chunks/C6OBNQ4F.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/combobox/combobox-item.js","webpack://wp/./packages/dataviews/node_modules/@ariakit/react-core/esm/combobox/combobox-item-value.js","../../packages/dataviews/src/components/dataviews-filters/search-widget.tsx","../../packages/dataviews/src/components/dataviews-filters/filter-summary.tsx","../../packages/dataviews/src/components/dataviews-filters/add-filter.tsx","../../packages/dataviews/src/components/dataviews-filters/reset-filters.tsx","../../packages/dataviews/src/utils.ts","../../packages/dataviews/src/components/dataviews-filters/index.tsx","../../packages/icons/src/library/block-table.js","../../packages/icons/src/library/category.js","../../packages/icons/src/library/format-list-bullets-rtl.js","../../packages/icons/src/library/format-list-bullets.js","../../packages/dataviews/src/components/dataviews-selection-checkbox/index.tsx","../../packages/icons/src/library/funnel.js","../../packages/icons/src/library/arrow-left.js","../../packages/icons/src/library/arrow-right.js","../../packages/icons/src/library/unseen.js","../../packages/dataviews/src/layouts/table/column-header-menu.tsx","../../packages/dataviews/src/layouts/table/index.tsx","../../packages/dataviews/src/layouts/grid/index.tsx","../../packages/dataviews/src/layouts/list/index.tsx","../../packages/dataviews/src/layouts/index.ts","../../packages/dataviews/src/components/dataviews-layout/index.tsx","../../packages/dataviews/src/components/dataviews-pagination/index.tsx","../../packages/dataviews/src/components/dataviews-search/index.tsx","../../packages/icons/src/library/cog.js","../../packages/dataviews/src/components/dataviews-view-config/index.tsx","../../packages/dataviews/src/normalize-fields.ts","../../packages/icons/src/library/line-solid.js","../../packages/dataviews/src/layouts/grid/density-picker.tsx","../../packages/dataviews/src/components/dataviews/index.tsx","../../packages/icons/src/library/drawer-right.js","../../packages/edit-site/src/components/page/header.js","../../packages/edit-site/src/components/page/index.js","../../packages/icons/src/library/pages.js","../../packages/icons/src/library/published.js","../../packages/icons/src/library/scheduled.js","../../packages/icons/src/library/drafts.js","../../packages/icons/src/library/pending.js","../../packages/icons/src/library/not-allowed.js","../../packages/edit-site/src/components/sidebar-dataviews/default-views.js","../../packages/edit-site/src/components/add-new-post/index.js","../../packages/icons/src/library/pencil.js","../../packages/icons/src/library/edit.js","../../packages/edit-site/src/components/dataviews-actions/index.js","../../packages/icons/src/library/comment-author-avatar.js","../../packages/edit-site/src/components/media/index.js","../../packages/edit-site/src/components/post-fields/index.js","../../packages/edit-site/src/components/post-list/index.js","../../packages/dataviews/src/filter-and-sort-data-view.ts","../../packages/icons/src/library/lock-small.js","../../packages/edit-site/src/components/async/index.js","webpack://wp/external window [\"wp\",\"priorityQueue\"]","../../packages/edit-site/src/components/page-patterns/utils.js","../../packages/edit-site/src/components/page-patterns/use-pattern-settings.js","../../packages/edit-site/src/components/page-patterns/search-items.js","../../packages/edit-site/src/components/page-patterns/use-patterns.js","../../packages/icons/src/library/symbol.js","../../packages/icons/src/library/symbol-filled.js","../../packages/icons/src/library/upload.js","../../packages/edit-site/src/components/add-new-pattern/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-pattern-categories.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-default-pattern-categories.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-theme-patterns.js","../../packages/edit-site/src/components/page-patterns/rename-category-menu-item.js","../../packages/edit-site/src/components/page-patterns/delete-category-menu-item.js","../../packages/edit-site/src/components/page-patterns/header.js","../../packages/icons/src/library/plugins.js","../../packages/icons/src/library/globe.js","../../packages/edit-site/src/components/page-templates/hooks.js","../../packages/edit-site/src/components/page-patterns/index.js","../../packages/icons/src/library/home.js","../../packages/icons/src/library/verse.js","../../packages/icons/src/library/pin.js","../../packages/icons/src/library/archive.js","../../packages/icons/src/library/not-found.js","../../packages/icons/src/library/list.js","../../packages/icons/src/library/block-meta.js","../../packages/icons/src/library/calendar.js","../../packages/icons/src/library/tag.js","../../packages/icons/src/library/media.js","../../packages/icons/src/library/post.js","../../packages/edit-site/src/components/add-new-template/utils.js","../../packages/edit-site/src/components/add-new-template/add-custom-template-modal-content.js","webpack://wp/./node_modules/tslib/tslib.es6.mjs","webpack://wp/./node_modules/lower-case/src/index.ts","webpack://wp/./node_modules/no-case/src/index.ts","webpack://wp/./node_modules/dot-case/src/index.ts","../../packages/edit-site/src/components/add-new-template/add-custom-generic-template-modal-content.js","webpack://wp/./node_modules/param-case/src/index.ts","../../packages/edit-site/src/components/add-new-template/index.js","../../packages/edit-site/src/components/page-templates/index.js","../../packages/edit-site/src/components/sidebar-button/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen/index.js","../../packages/icons/src/library/chevron-left-small.js","../../packages/icons/src/library/chevron-right-small.js","../../packages/edit-site/src/components/sidebar-navigation-item/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-label.js","../../packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-row.js","../../packages/edit-site/src/components/sidebar-navigation-screen-details-panel/sidebar-navigation-screen-details-panel-value.js","../../packages/edit-site/src/components/sidebar-navigation-screen-details-footer/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js","../../packages/icons/src/library/navigation.js","../../packages/edit-site/src/components/sidebar-navigation-screen-main/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/constants.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/rename-modal.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/delete-confirm-dialog.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/more-menu.js","../../packages/icons/src/library/chevron-up.js","../../packages/icons/src/library/chevron-down.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/leaf-more-menu.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/navigation-menu-content.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/navigation-menu-editor.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/build-navigation-label.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/single-navigation-menu.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/index.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers.js","../../packages/edit-site/src/components/sidebar-navigation-screen-navigation-menus/index.js","../../packages/edit-site/src/components/sidebar-dataviews/dataview-item.js","../../packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/content.js","../../packages/edit-site/src/components/sidebar-navigation-screen-templates-browse/index.js","../../packages/icons/src/library/file.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/category-item.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/use-template-part-areas.js","../../packages/edit-site/src/components/sidebar-navigation-screen-patterns/index.js","../../packages/edit-site/src/components/sidebar-dataviews/add-new-view.js","../../packages/edit-site/src/components/sidebar-dataviews/custom-dataviews-list.js","../../packages/edit-site/src/components/sidebar-dataviews/index.js","../../packages/dataviews/src/components/dataform/index.tsx","../../packages/edit-site/src/components/post-edit/index.js","../../packages/edit-site/src/components/layout/router.js","../../packages/edit-site/src/hooks/commands/use-set-command-context.js","../../packages/edit-site/src/components/app/index.js","../../packages/edit-site/src/deprecated.js","../../packages/edit-site/src/components/posts-app/router.js","../../packages/edit-site/src/components/posts-app/index.js","../../packages/edit-site/src/posts.js","../../packages/edit-site/src/index.js"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var characterMap = {\n\t\"À\": \"A\",\n\t\"Á\": \"A\",\n\t\"Â\": \"A\",\n\t\"Ã\": \"A\",\n\t\"Ä\": \"A\",\n\t\"Å\": \"A\",\n\t\"Ấ\": \"A\",\n\t\"Ắ\": \"A\",\n\t\"Ẳ\": \"A\",\n\t\"Ẵ\": \"A\",\n\t\"Ặ\": \"A\",\n\t\"Æ\": \"AE\",\n\t\"Ầ\": \"A\",\n\t\"Ằ\": \"A\",\n\t\"Ȃ\": \"A\",\n\t\"Ả\": \"A\",\n\t\"Ạ\": \"A\",\n\t\"Ẩ\": \"A\",\n\t\"Ẫ\": \"A\",\n\t\"Ậ\": \"A\",\n\t\"Ç\": \"C\",\n\t\"Ḉ\": \"C\",\n\t\"È\": \"E\",\n\t\"É\": \"E\",\n\t\"Ê\": \"E\",\n\t\"Ë\": \"E\",\n\t\"Ế\": \"E\",\n\t\"Ḗ\": \"E\",\n\t\"Ề\": \"E\",\n\t\"Ḕ\": \"E\",\n\t\"Ḝ\": \"E\",\n\t\"Ȇ\": \"E\",\n\t\"Ẻ\": \"E\",\n\t\"Ẽ\": \"E\",\n\t\"Ẹ\": \"E\",\n\t\"Ể\": \"E\",\n\t\"Ễ\": \"E\",\n\t\"Ệ\": \"E\",\n\t\"Ì\": \"I\",\n\t\"Í\": \"I\",\n\t\"Î\": \"I\",\n\t\"Ï\": \"I\",\n\t\"Ḯ\": \"I\",\n\t\"Ȋ\": \"I\",\n\t\"Ỉ\": \"I\",\n\t\"Ị\": \"I\",\n\t\"Ð\": \"D\",\n\t\"Ñ\": \"N\",\n\t\"Ò\": \"O\",\n\t\"Ó\": \"O\",\n\t\"Ô\": \"O\",\n\t\"Õ\": \"O\",\n\t\"Ö\": \"O\",\n\t\"Ø\": \"O\",\n\t\"Ố\": \"O\",\n\t\"Ṍ\": \"O\",\n\t\"Ṓ\": \"O\",\n\t\"Ȏ\": \"O\",\n\t\"Ỏ\": \"O\",\n\t\"Ọ\": \"O\",\n\t\"Ổ\": \"O\",\n\t\"Ỗ\": \"O\",\n\t\"Ộ\": \"O\",\n\t\"Ờ\": \"O\",\n\t\"Ở\": \"O\",\n\t\"Ỡ\": \"O\",\n\t\"Ớ\": \"O\",\n\t\"Ợ\": \"O\",\n\t\"Ù\": \"U\",\n\t\"Ú\": \"U\",\n\t\"Û\": \"U\",\n\t\"Ü\": \"U\",\n\t\"Ủ\": \"U\",\n\t\"Ụ\": \"U\",\n\t\"Ử\": \"U\",\n\t\"Ữ\": \"U\",\n\t\"Ự\": \"U\",\n\t\"Ý\": \"Y\",\n\t\"à\": \"a\",\n\t\"á\": \"a\",\n\t\"â\": \"a\",\n\t\"ã\": \"a\",\n\t\"ä\": \"a\",\n\t\"å\": \"a\",\n\t\"ấ\": \"a\",\n\t\"ắ\": \"a\",\n\t\"ẳ\": \"a\",\n\t\"ẵ\": \"a\",\n\t\"ặ\": \"a\",\n\t\"æ\": \"ae\",\n\t\"ầ\": \"a\",\n\t\"ằ\": \"a\",\n\t\"ȃ\": \"a\",\n\t\"ả\": \"a\",\n\t\"ạ\": \"a\",\n\t\"ẩ\": \"a\",\n\t\"ẫ\": \"a\",\n\t\"ậ\": \"a\",\n\t\"ç\": \"c\",\n\t\"ḉ\": \"c\",\n\t\"è\": \"e\",\n\t\"é\": \"e\",\n\t\"ê\": \"e\",\n\t\"ë\": \"e\",\n\t\"ế\": \"e\",\n\t\"ḗ\": \"e\",\n\t\"ề\": \"e\",\n\t\"ḕ\": \"e\",\n\t\"ḝ\": \"e\",\n\t\"ȇ\": \"e\",\n\t\"ẻ\": \"e\",\n\t\"ẽ\": \"e\",\n\t\"ẹ\": \"e\",\n\t\"ể\": \"e\",\n\t\"ễ\": \"e\",\n\t\"ệ\": \"e\",\n\t\"ì\": \"i\",\n\t\"í\": \"i\",\n\t\"î\": \"i\",\n\t\"ï\": \"i\",\n\t\"ḯ\": \"i\",\n\t\"ȋ\": \"i\",\n\t\"ỉ\": \"i\",\n\t\"ị\": \"i\",\n\t\"ð\": \"d\",\n\t\"ñ\": \"n\",\n\t\"ò\": \"o\",\n\t\"ó\": \"o\",\n\t\"ô\": \"o\",\n\t\"õ\": \"o\",\n\t\"ö\": \"o\",\n\t\"ø\": \"o\",\n\t\"ố\": \"o\",\n\t\"ṍ\": \"o\",\n\t\"ṓ\": \"o\",\n\t\"ȏ\": \"o\",\n\t\"ỏ\": \"o\",\n\t\"ọ\": \"o\",\n\t\"ổ\": \"o\",\n\t\"ỗ\": \"o\",\n\t\"ộ\": \"o\",\n\t\"ờ\": \"o\",\n\t\"ở\": \"o\",\n\t\"ỡ\": \"o\",\n\t\"ớ\": \"o\",\n\t\"ợ\": \"o\",\n\t\"ù\": \"u\",\n\t\"ú\": \"u\",\n\t\"û\": \"u\",\n\t\"ü\": \"u\",\n\t\"ủ\": \"u\",\n\t\"ụ\": \"u\",\n\t\"ử\": \"u\",\n\t\"ữ\": \"u\",\n\t\"ự\": \"u\",\n\t\"ý\": \"y\",\n\t\"ÿ\": \"y\",\n\t\"Ā\": \"A\",\n\t\"ā\": \"a\",\n\t\"Ă\": \"A\",\n\t\"ă\": \"a\",\n\t\"Ą\": \"A\",\n\t\"ą\": \"a\",\n\t\"Ć\": \"C\",\n\t\"ć\": \"c\",\n\t\"Ĉ\": \"C\",\n\t\"ĉ\": \"c\",\n\t\"Ċ\": \"C\",\n\t\"ċ\": \"c\",\n\t\"Č\": \"C\",\n\t\"č\": \"c\",\n\t\"C̆\": \"C\",\n\t\"c̆\": \"c\",\n\t\"Ď\": \"D\",\n\t\"ď\": \"d\",\n\t\"Đ\": \"D\",\n\t\"đ\": \"d\",\n\t\"Ē\": \"E\",\n\t\"ē\": \"e\",\n\t\"Ĕ\": \"E\",\n\t\"ĕ\": \"e\",\n\t\"Ė\": \"E\",\n\t\"ė\": \"e\",\n\t\"Ę\": \"E\",\n\t\"ę\": \"e\",\n\t\"Ě\": \"E\",\n\t\"ě\": \"e\",\n\t\"Ĝ\": \"G\",\n\t\"Ǵ\": \"G\",\n\t\"ĝ\": \"g\",\n\t\"ǵ\": \"g\",\n\t\"Ğ\": \"G\",\n\t\"ğ\": \"g\",\n\t\"Ġ\": \"G\",\n\t\"ġ\": \"g\",\n\t\"Ģ\": \"G\",\n\t\"ģ\": \"g\",\n\t\"Ĥ\": \"H\",\n\t\"ĥ\": \"h\",\n\t\"Ħ\": \"H\",\n\t\"ħ\": \"h\",\n\t\"Ḫ\": \"H\",\n\t\"ḫ\": \"h\",\n\t\"Ĩ\": \"I\",\n\t\"ĩ\": \"i\",\n\t\"Ī\": \"I\",\n\t\"ī\": \"i\",\n\t\"Ĭ\": \"I\",\n\t\"ĭ\": \"i\",\n\t\"Į\": \"I\",\n\t\"į\": \"i\",\n\t\"İ\": \"I\",\n\t\"ı\": \"i\",\n\t\"IJ\": \"IJ\",\n\t\"ij\": \"ij\",\n\t\"Ĵ\": \"J\",\n\t\"ĵ\": \"j\",\n\t\"Ķ\": \"K\",\n\t\"ķ\": \"k\",\n\t\"Ḱ\": \"K\",\n\t\"ḱ\": \"k\",\n\t\"K̆\": \"K\",\n\t\"k̆\": \"k\",\n\t\"Ĺ\": \"L\",\n\t\"ĺ\": \"l\",\n\t\"Ļ\": \"L\",\n\t\"ļ\": \"l\",\n\t\"Ľ\": \"L\",\n\t\"ľ\": \"l\",\n\t\"Ŀ\": \"L\",\n\t\"ŀ\": \"l\",\n\t\"Ł\": \"l\",\n\t\"ł\": \"l\",\n\t\"Ḿ\": \"M\",\n\t\"ḿ\": \"m\",\n\t\"M̆\": \"M\",\n\t\"m̆\": \"m\",\n\t\"Ń\": \"N\",\n\t\"ń\": \"n\",\n\t\"Ņ\": \"N\",\n\t\"ņ\": \"n\",\n\t\"Ň\": \"N\",\n\t\"ň\": \"n\",\n\t\"ʼn\": \"n\",\n\t\"N̆\": \"N\",\n\t\"n̆\": \"n\",\n\t\"Ō\": \"O\",\n\t\"ō\": \"o\",\n\t\"Ŏ\": \"O\",\n\t\"ŏ\": \"o\",\n\t\"Ő\": \"O\",\n\t\"ő\": \"o\",\n\t\"Œ\": \"OE\",\n\t\"œ\": \"oe\",\n\t\"P̆\": \"P\",\n\t\"p̆\": \"p\",\n\t\"Ŕ\": \"R\",\n\t\"ŕ\": \"r\",\n\t\"Ŗ\": \"R\",\n\t\"ŗ\": \"r\",\n\t\"Ř\": \"R\",\n\t\"ř\": \"r\",\n\t\"R̆\": \"R\",\n\t\"r̆\": \"r\",\n\t\"Ȓ\": \"R\",\n\t\"ȓ\": \"r\",\n\t\"Ś\": \"S\",\n\t\"ś\": \"s\",\n\t\"Ŝ\": \"S\",\n\t\"ŝ\": \"s\",\n\t\"Ş\": \"S\",\n\t\"Ș\": \"S\",\n\t\"ș\": \"s\",\n\t\"ş\": \"s\",\n\t\"Š\": \"S\",\n\t\"š\": \"s\",\n\t\"Ţ\": \"T\",\n\t\"ţ\": \"t\",\n\t\"ț\": \"t\",\n\t\"Ț\": \"T\",\n\t\"Ť\": \"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",\n\t\"ứ\": \"u\",\n\t\"Ṹ\": \"U\",\n\t\"ṹ\": \"u\",\n\t\"Ǻ\": \"A\",\n\t\"ǻ\": \"a\",\n\t\"Ǽ\": \"AE\",\n\t\"ǽ\": \"ae\",\n\t\"Ǿ\": \"O\",\n\t\"ǿ\": \"o\",\n\t\"Þ\": \"TH\",\n\t\"þ\": \"th\",\n\t\"Ṕ\": \"P\",\n\t\"ṕ\": \"p\",\n\t\"Ṥ\": \"S\",\n\t\"ṥ\": \"s\",\n\t\"X́\": \"X\",\n\t\"x́\": \"x\",\n\t\"Ѓ\": \"Г\",\n\t\"ѓ\": \"г\",\n\t\"Ќ\": \"К\",\n\t\"ќ\": \"к\",\n\t\"A̋\": \"A\",\n\t\"a̋\": \"a\",\n\t\"E̋\": \"E\",\n\t\"e̋\": \"e\",\n\t\"I̋\": \"I\",\n\t\"i̋\": \"i\",\n\t\"Ǹ\": \"N\",\n\t\"ǹ\": \"n\",\n\t\"Ồ\": \"O\",\n\t\"ồ\": \"o\",\n\t\"Ṑ\": \"O\",\n\t\"ṑ\": \"o\",\n\t\"Ừ\": \"U\",\n\t\"ừ\": \"u\",\n\t\"Ẁ\": \"W\",\n\t\"ẁ\": \"w\",\n\t\"Ỳ\": \"Y\",\n\t\"ỳ\": \"y\",\n\t\"Ȁ\": \"A\",\n\t\"ȁ\": \"a\",\n\t\"Ȅ\": \"E\",\n\t\"ȅ\": \"e\",\n\t\"Ȉ\": \"I\",\n\t\"ȉ\": \"i\",\n\t\"Ȍ\": \"O\",\n\t\"ȍ\": \"o\",\n\t\"Ȑ\": \"R\",\n\t\"ȑ\": \"r\",\n\t\"Ȕ\": \"U\",\n\t\"ȕ\": \"u\",\n\t\"B̌\": \"B\",\n\t\"b̌\": \"b\",\n\t\"Č̣\": \"C\",\n\t\"č̣\": \"c\",\n\t\"Ê̌\": \"E\",\n\t\"ê̌\": \"e\",\n\t\"F̌\": \"F\",\n\t\"f̌\": \"f\",\n\t\"Ǧ\": \"G\",\n\t\"ǧ\": \"g\",\n\t\"Ȟ\": \"H\",\n\t\"ȟ\": \"h\",\n\t\"J̌\": \"J\",\n\t\"ǰ\": \"j\",\n\t\"Ǩ\": \"K\",\n\t\"ǩ\": \"k\",\n\t\"M̌\": \"M\",\n\t\"m̌\": \"m\",\n\t\"P̌\": \"P\",\n\t\"p̌\": \"p\",\n\t\"Q̌\": \"Q\",\n\t\"q̌\": \"q\",\n\t\"Ř̩\": \"R\",\n\t\"ř̩\": \"r\",\n\t\"Ṧ\": \"S\",\n\t\"ṧ\": \"s\",\n\t\"V̌\": \"V\",\n\t\"v̌\": \"v\",\n\t\"W̌\": \"W\",\n\t\"w̌\": \"w\",\n\t\"X̌\": \"X\",\n\t\"x̌\": \"x\",\n\t\"Y̌\": \"Y\",\n\t\"y̌\": \"y\",\n\t\"A̧\": \"A\",\n\t\"a̧\": \"a\",\n\t\"B̧\": \"B\",\n\t\"b̧\": \"b\",\n\t\"Ḑ\": \"D\",\n\t\"ḑ\": \"d\",\n\t\"Ȩ\": \"E\",\n\t\"ȩ\": \"e\",\n\t\"Ɛ̧\": \"E\",\n\t\"ɛ̧\": \"e\",\n\t\"Ḩ\": \"H\",\n\t\"ḩ\": \"h\",\n\t\"I̧\": \"I\",\n\t\"i̧\": \"i\",\n\t\"Ɨ̧\": \"I\",\n\t\"ɨ̧\": \"i\",\n\t\"M̧\": \"M\",\n\t\"m̧\": \"m\",\n\t\"O̧\": \"O\",\n\t\"o̧\": \"o\",\n\t\"Q̧\": \"Q\",\n\t\"q̧\": \"q\",\n\t\"U̧\": \"U\",\n\t\"u̧\": \"u\",\n\t\"X̧\": \"X\",\n\t\"x̧\": \"x\",\n\t\"Z̧\": \"Z\",\n\t\"z̧\": \"z\",\n\t\"й\":\"и\",\n\t\"Й\":\"И\",\n\t\"ё\":\"е\",\n\t\"Ё\":\"Е\",\n};\n\nvar chars = Object.keys(characterMap).join('|');\nvar allAccents = new RegExp(chars, 'g');\nvar firstAccent = new RegExp(chars, '');\n\nfunction matcher(match) {\n\treturn characterMap[match];\n}\n\nvar removeAccents = function(string) {\n\treturn string.replace(allAccents, matcher);\n};\n\nvar hasAccents = function(string) {\n\treturn !!string.match(firstAccent);\n};\n\nmodule.exports = removeAccents;\nmodule.exports.has = hasAccents;\nmodule.exports.remove = removeAccents;\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib/inflate.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\n/* pako 1.0.10 nodeca/pako */(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.pako = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n 'use strict';\n\n\n var TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\n function _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n }\n\n exports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n };\n\n\n // reduce buffer size, avoiding mem copy\n exports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n };\n\n\n var fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n };\n\n var fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n };\n\n\n // Enable/Disable typed arrays use, for testing\n //\n exports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n };\n\n exports.setTyped(TYPED_OK);\n\n },{}],2:[function(require,module,exports){\n // String encode/decode helpers\n 'use strict';\n\n\n var utils = require('./common');\n\n\n // Quick check if we can use fast array to bin string conversion\n //\n // - apply(Array) can fail on Android 2.2\n // - apply(Uint8Array) can fail on iOS 5.1 Safari\n //\n var STR_APPLY_OK = true;\n var STR_APPLY_UIA_OK = true;\n\n try { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\n try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n // Table with utf8 lengths (calculated by first byte of sequence)\n // Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n // because max possible codepoint is 0x10ffff\n var _utf8len = new utils.Buf8(256);\n for (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n }\n _utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n // convert string to array (typed, when possible)\n exports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n };\n\n // Helper (used in 2 places)\n function buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n }\n\n\n // Convert byte array to binary string\n exports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n };\n\n\n // Convert binary string (typed, when possible)\n exports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n };\n\n\n // convert array to string\n exports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n };\n\n\n // Calculate max possible position in utf8 buffer,\n // that will not break sequence. If that's not possible\n // - (very small limits) return max size as is.\n //\n // buf[] - utf8 bytes array\n // max - length limit (mandatory);\n exports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n };\n\n },{\"./common\":1}],3:[function(require,module,exports){\n 'use strict';\n\n // Note: adler32 takes 12% for level 0 and 2% for level 6.\n // It isn't worth it to make additional optimizations as in original.\n // Small size is preferable.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n }\n\n\n module.exports = adler32;\n\n },{}],4:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n module.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n };\n\n },{}],5:[function(require,module,exports){\n 'use strict';\n\n // Note: we can't get significant speed boost here.\n // So write code to minimize size - no pregenerated tables\n // and array tools dependencies.\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // Use ordinary array, since untyped makes no boost here\n function makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n }\n\n // Create table on load. Just 255 signed longs. Not a problem.\n var crcTable = makeTable();\n\n\n function crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n }\n\n\n module.exports = crc32;\n\n },{}],6:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n }\n\n module.exports = GZheader;\n\n },{}],7:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n // See state defs from inflate.js\n var BAD = 30; /* got a data error -- remain here until reset */\n var TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n /*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\n module.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n //#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n //#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n //#ifdef INFLATE_STRICT\n dmax = state.dmax;\n //#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n //#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n //#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // if (len <= op - whave) {\n // do {\n // output[_out++] = 0;\n // } while (--len);\n // continue top;\n // }\n // len -= op - whave;\n // do {\n // output[_out++] = 0;\n // } while (--op > whave);\n // if (op === 0) {\n // from = _out - dist;\n // do {\n // output[_out++] = output[from++];\n // } while (--len);\n // continue top;\n // }\n //#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n };\n\n },{}],8:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var utils = require('../utils/common');\n var adler32 = require('./adler32');\n var crc32 = require('./crc32');\n var inflate_fast = require('./inffast');\n var inflate_table = require('./inftrees');\n\n var CODES = 0;\n var LENS = 1;\n var DISTS = 2;\n\n /* Public constants ==========================================================*/\n /* ===========================================================================*/\n\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n //var Z_NO_FLUSH = 0;\n //var Z_PARTIAL_FLUSH = 1;\n //var Z_SYNC_FLUSH = 2;\n //var Z_FULL_FLUSH = 3;\n var Z_FINISH = 4;\n var Z_BLOCK = 5;\n var Z_TREES = 6;\n\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n var Z_OK = 0;\n var Z_STREAM_END = 1;\n var Z_NEED_DICT = 2;\n //var Z_ERRNO = -1;\n var Z_STREAM_ERROR = -2;\n var Z_DATA_ERROR = -3;\n var Z_MEM_ERROR = -4;\n var Z_BUF_ERROR = -5;\n //var Z_VERSION_ERROR = -6;\n\n /* The deflate compression method */\n var Z_DEFLATED = 8;\n\n\n /* STATES ====================================================================*/\n /* ===========================================================================*/\n\n\n var HEAD = 1; /* i: waiting for magic header */\n var FLAGS = 2; /* i: waiting for method and flags (gzip) */\n var TIME = 3; /* i: waiting for modification time (gzip) */\n var OS = 4; /* i: waiting for extra flags and operating system (gzip) */\n var EXLEN = 5; /* i: waiting for extra length (gzip) */\n var EXTRA = 6; /* i: waiting for extra bytes (gzip) */\n var NAME = 7; /* i: waiting for end of file name (gzip) */\n var COMMENT = 8; /* i: waiting for end of comment (gzip) */\n var HCRC = 9; /* i: waiting for header crc (gzip) */\n var DICTID = 10; /* i: waiting for dictionary check value */\n var DICT = 11; /* waiting for inflateSetDictionary() call */\n var TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\n var STORED = 14; /* i: waiting for stored size (length and complement) */\n var COPY_ = 15; /* i/o: same as COPY below, but only first time in */\n var COPY = 16; /* i/o: waiting for input or output to copy stored block */\n var TABLE = 17; /* i: waiting for dynamic block table lengths */\n var LENLENS = 18; /* i: waiting for code length code lengths */\n var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\n var LEN_ = 20; /* i: same as LEN below, but only first time in */\n var LEN = 21; /* i: waiting for length/lit/eob code */\n var LENEXT = 22; /* i: waiting for length extra bits */\n var DIST = 23; /* i: waiting for distance code */\n var DISTEXT = 24; /* i: waiting for distance extra bits */\n var MATCH = 25; /* o: waiting for output space to copy string */\n var LIT = 26; /* o: waiting for output space to write literal */\n var CHECK = 27; /* i: waiting for 32-bit check value */\n var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\n var DONE = 29; /* finished check, done -- remain here until reset */\n var BAD = 30; /* got a data error -- remain here until reset */\n var MEM = 31; /* got an inflate() memory error -- remain here until reset */\n var SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n /* ===========================================================================*/\n\n\n\n var ENOUGH_LENS = 852;\n var ENOUGH_DISTS = 592;\n //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n var MAX_WBITS = 15;\n /* 32K LZ77 window */\n var DEF_WBITS = MAX_WBITS;\n\n\n function zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n }\n\n\n function InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n }\n\n function inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n }\n\n function inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n }\n\n function inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n }\n\n function inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n }\n\n function inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n }\n\n\n /*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\n var virgin = true;\n\n var lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\n function fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n }\n\n\n /*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\n function updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n }\n\n function inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n //#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n //#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n // (!) This block is disabled in zlib defaults,\n // don't enable it for binary compatibility\n //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n // Trace((stderr, \"inflate.c too far\\n\"));\n // copy -= state.whave;\n // if (copy > state.length) { copy = state.length; }\n // if (copy > left) { copy = left; }\n // left -= copy;\n // state.length -= copy;\n // do {\n // output[put++] = 0;\n // } while (--copy);\n // if (state.length === 0) { state.mode = LEN; }\n // break;\n //#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n }\n\n function inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n }\n\n function inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n }\n\n function inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n }\n\n exports.inflateReset = inflateReset;\n exports.inflateReset2 = inflateReset2;\n exports.inflateResetKeep = inflateResetKeep;\n exports.inflateInit = inflateInit;\n exports.inflateInit2 = inflateInit2;\n exports.inflate = inflate;\n exports.inflateEnd = inflateEnd;\n exports.inflateGetHeader = inflateGetHeader;\n exports.inflateSetDictionary = inflateSetDictionary;\n exports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n /* Not implemented\n exports.inflateCopy = inflateCopy;\n exports.inflateGetDictionary = inflateGetDictionary;\n exports.inflateMark = inflateMark;\n exports.inflatePrime = inflatePrime;\n exports.inflateSync = inflateSync;\n exports.inflateSyncPoint = inflateSyncPoint;\n exports.inflateUndermine = inflateUndermine;\n */\n\n },{\"../utils/common\":1,\"./adler32\":3,\"./crc32\":5,\"./inffast\":7,\"./inftrees\":9}],9:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n var utils = require('../utils/common');\n\n var MAXBITS = 15;\n var ENOUGH_LENS = 852;\n var ENOUGH_DISTS = 592;\n //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\n var CODES = 0;\n var LENS = 1;\n var DISTS = 2;\n\n var lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n ];\n\n var lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n ];\n\n var dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n ];\n\n var dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n ];\n\n module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n {\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n // var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n };\n\n },{\"../utils/common\":1}],10:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n module.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n };\n\n },{}],11:[function(require,module,exports){\n 'use strict';\n\n // (C) 1995-2013 Jean-loup Gailly and Mark Adler\n // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n //\n // This software is provided 'as-is', without any express or implied\n // warranty. In no event will the authors be held liable for any damages\n // arising from the use of this software.\n //\n // Permission is granted to anyone to use this software for any purpose,\n // including commercial applications, and to alter it and redistribute it\n // freely, subject to the following restrictions:\n //\n // 1. The origin of this software must not be misrepresented; you must not\n // claim that you wrote the original software. If you use this software\n // in a product, an acknowledgment in the product documentation would be\n // appreciated but is not required.\n // 2. Altered source versions must be plainly marked as such, and must not be\n // misrepresented as being the original software.\n // 3. This notice may not be removed or altered from any source distribution.\n\n function ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n }\n\n module.exports = ZStream;\n\n },{}],\"/lib/inflate.js\":[function(require,module,exports){\n 'use strict';\n\n\n var zlib_inflate = require('./zlib/inflate');\n var utils = require('./utils/common');\n var strings = require('./utils/strings');\n var c = require('./zlib/constants');\n var msg = require('./zlib/messages');\n var ZStream = require('./zlib/zstream');\n var GZheader = require('./zlib/gzheader');\n\n var toString = Object.prototype.toString;\n\n /**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n /* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n /**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n /**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n /**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n /**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\n function Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n }\n\n /**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\n Inflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n };\n\n\n /**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\n Inflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n };\n\n\n /**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\n Inflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n };\n\n\n /**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\n function inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n }\n\n\n /**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\n function inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n }\n\n\n /**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\n exports.Inflate = Inflate;\n exports.inflate = inflate;\n exports.inflateRaw = inflateRaw;\n exports.ungzip = inflate;\n\n },{\"./utils/common\":1,\"./utils/strings\":2,\"./zlib/constants\":4,\"./zlib/gzheader\":6,\"./zlib/inflate\":8,\"./zlib/messages\":10,\"./zlib/zstream\":11}]},{},[])(\"/lib/inflate.js\")\n });\n/* eslint-enable */\n","/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib/unbrotli.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\n(function(f){if(typeof exports===\"object\"&&typeof module!==\"undefined\"){module.exports=f()}else if(typeof define===\"function\"&&define.amd){define([],f)}else{var g;if(typeof window!==\"undefined\"){g=window}else if(typeof global!==\"undefined\"){g=global}else if(typeof self!==\"undefined\"){g=self}else{g=this}g.unbrotli = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Bit reading helpers\n*/\n\nvar BROTLI_READ_SIZE = 4096;\nvar BROTLI_IBUF_SIZE = (2 * BROTLI_READ_SIZE + 32);\nvar BROTLI_IBUF_MASK = (2 * BROTLI_READ_SIZE - 1);\n\nvar kBitMask = new Uint32Array([\n 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767,\n 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215\n]);\n\n/* Input byte buffer, consist of a ringbuffer and a \"slack\" region where */\n/* bytes from the start of the ringbuffer are copied. */\nfunction BrotliBitReader(input) {\n this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);\n this.input_ = input; /* input callback */\n\n this.reset();\n}\n\nBrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;\nBrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;\n\nBrotliBitReader.prototype.reset = function() {\n this.buf_ptr_ = 0; /* next input will write here */\n this.val_ = 0; /* pre-fetched bits */\n this.pos_ = 0; /* byte position in stream */\n this.bit_pos_ = 0; /* current bit-reading position in val_ */\n this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */\n this.eos_ = 0; /* input stream is finished */\n\n this.readMoreInput();\n for (var i = 0; i < 4; i++) {\n this.val_ |= this.buf_[this.pos_] << (8 * i);\n ++this.pos_;\n }\n\n return this.bit_end_pos_ > 0;\n};\n\n/* Fills up the input ringbuffer by calling the input callback.\n\n Does nothing if there are at least 32 bytes present after current position.\n\n Returns 0 if either:\n - the input callback returned an error, or\n - there is no more input and the position is past the end of the stream.\n\n After encountering the end of the input stream, 32 additional zero bytes are\n copied to the ringbuffer, therefore it is safe to call this function after\n every 32 bytes of input is read.\n*/\nBrotliBitReader.prototype.readMoreInput = function() {\n if (this.bit_end_pos_ > 256) {\n return;\n } else if (this.eos_) {\n if (this.bit_pos_ > this.bit_end_pos_)\n throw new Error('Unexpected end of input ' + this.bit_pos_ + ' ' + this.bit_end_pos_);\n } else {\n var dst = this.buf_ptr_;\n var bytes_read = this.input_.read(this.buf_, dst, BROTLI_READ_SIZE);\n if (bytes_read < 0) {\n throw new Error('Unexpected end of input');\n }\n\n if (bytes_read < BROTLI_READ_SIZE) {\n this.eos_ = 1;\n /* Store 32 bytes of zero after the stream end. */\n for (var p = 0; p < 32; p++)\n this.buf_[dst + bytes_read + p] = 0;\n }\n\n if (dst === 0) {\n /* Copy the head of the ringbuffer to the slack region. */\n for (var p = 0; p < 32; p++)\n this.buf_[(BROTLI_READ_SIZE << 1) + p] = this.buf_[p];\n\n this.buf_ptr_ = BROTLI_READ_SIZE;\n } else {\n this.buf_ptr_ = 0;\n }\n\n this.bit_end_pos_ += bytes_read << 3;\n }\n};\n\n/* Guarantees that there are at least 24 bits in the buffer. */\nBrotliBitReader.prototype.fillBitWindow = function() {\n while (this.bit_pos_ >= 8) {\n this.val_ >>>= 8;\n this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;\n ++this.pos_;\n this.bit_pos_ = this.bit_pos_ - 8 >>> 0;\n this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;\n }\n};\n\n/* Reads the specified number of bits from Read Buffer. */\nBrotliBitReader.prototype.readBits = function(n_bits) {\n if (32 - this.bit_pos_ < n_bits) {\n this.fillBitWindow();\n }\n\n var val = ((this.val_ >>> this.bit_pos_) & kBitMask[n_bits]);\n this.bit_pos_ += n_bits;\n return val;\n};\n\nmodule.exports = BrotliBitReader;\n\n},{}],2:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Lookup table to map the previous two bytes to a context id.\n\n There are four different context modeling modes defined here:\n CONTEXT_LSB6: context id is the least significant 6 bits of the last byte,\n CONTEXT_MSB6: context id is the most significant 6 bits of the last byte,\n CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text,\n CONTEXT_SIGNED: second-order context model tuned for signed integers.\n\n The context id for the UTF8 context model is calculated as follows. If p1\n and p2 are the previous two bytes, we calcualte the context as\n\n context = kContextLookup[p1] | kContextLookup[p2 + 256].\n\n If the previous two bytes are ASCII characters (i.e. < 128), this will be\n equivalent to\n\n context = 4 * context1(p1) + context2(p2),\n\n where context1 is based on the previous byte in the following way:\n\n 0 : non-ASCII control\n 1 : \\t, \\n, \\r\n 2 : space\n 3 : other punctuation\n 4 : \" '\n 5 : %\n 6 : ( < [ {\n 7 : ) > ] }\n 8 : , ; :\n 9 : .\n 10 : =\n 11 : number\n 12 : upper-case vowel\n 13 : upper-case consonant\n 14 : lower-case vowel\n 15 : lower-case consonant\n\n and context2 is based on the second last byte:\n\n 0 : control, space\n 1 : punctuation\n 2 : upper-case letter, number\n 3 : lower-case letter\n\n If the last byte is ASCII, and the second last byte is not (in a valid UTF8\n stream it will be a continuation byte, value between 128 and 191), the\n context is the same as if the second last byte was an ASCII control or space.\n\n If the last byte is a UTF8 lead byte (value >= 192), then the next byte will\n be a continuation byte and the context id is 2 or 3 depending on the LSB of\n the last byte and to a lesser extent on the second last byte if it is ASCII.\n\n If the last byte is a UTF8 continuation byte, the second last byte can be:\n - continuation byte: the next byte is probably ASCII or lead byte (assuming\n 4-byte UTF8 characters are rare) and the context id is 0 or 1.\n - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1\n - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3\n\n The possible value combinations of the previous two bytes, the range of\n context ids and the type of the next byte is summarized in the table below:\n\n |--------\\-----------------------------------------------------------------|\n | \\ Last byte |\n | Second \\---------------------------------------------------------------|\n | last byte \\ ASCII | cont. byte | lead byte |\n | \\ (0-127) | (128-191) | (192-) |\n |=============|===================|=====================|==================|\n | ASCII | next: ASCII/lead | not valid | next: cont. |\n | (0-127) | context: 4 - 63 | | context: 2 - 3 |\n |-------------|-------------------|---------------------|------------------|\n | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. |\n | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 |\n |-------------|-------------------|---------------------|------------------|\n | lead byte | not valid | next: ASCII/lead | not valid |\n | (192-207) | | context: 0 - 1 | |\n |-------------|-------------------|---------------------|------------------|\n | lead byte | not valid | next: cont. | not valid |\n | (208-) | | context: 2 - 3 | |\n |-------------|-------------------|---------------------|------------------|\n\n The context id for the signed context mode is calculated as:\n\n context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2].\n\n For any context modeling modes, the context ids can be calculated by |-ing\n together two lookups from one table using context model dependent offsets:\n\n context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2].\n\n where offset1 and offset2 are dependent on the context mode.\n*/\n\nvar CONTEXT_LSB6 = 0;\nvar CONTEXT_MSB6 = 1;\nvar CONTEXT_UTF8 = 2;\nvar CONTEXT_SIGNED = 3;\n\n/* Common context lookup table for all context modes. */\nexports.lookup = new Uint8Array([\n /* CONTEXT_UTF8, last byte. */\n /* ASCII range. */\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12,\n 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12,\n 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48,\n 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12,\n 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56,\n 60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0,\n /* UTF8 continuation byte range. */\n 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,\n 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,\n 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,\n 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,\n /* UTF8 lead byte range. */\n 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,\n 2, 3, 2, 3, 2, 3, 2, 3, 2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\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,\n 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,\n 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,\n 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56,\n /* CONTEXT_LSB6, last byte. */\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,\n 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,\n /* CONTEXT_MSB6, last byte. */\n 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,\n 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,\n 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11,\n 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15,\n 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19,\n 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23,\n 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27,\n 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31,\n 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35,\n 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39,\n 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43,\n 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47,\n 48, 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\n\nexports.lookupOffsets = new Uint16Array([\n /* CONTEXT_LSB6 */\n 1024, 1536,\n /* CONTEXT_MSB6 */\n 1280, 1536,\n /* CONTEXT_UTF8 */\n 0, 256,\n /* CONTEXT_SIGNED */\n 768, 512,\n]);\n\n},{}],3:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\nvar BrotliInput = require('./streams').BrotliInput;\nvar BrotliOutput = require('./streams').BrotliOutput;\nvar BrotliBitReader = require('./bit_reader');\nvar BrotliDictionary = require('./dictionary');\nvar HuffmanCode = require('./huffman').HuffmanCode;\nvar BrotliBuildHuffmanTable = require('./huffman').BrotliBuildHuffmanTable;\nvar Context = require('./context');\nvar Prefix = require('./prefix');\nvar Transform = require('./transform');\n\nvar kDefaultCodeLength = 8;\nvar kCodeLengthRepeatCode = 16;\nvar kNumLiteralCodes = 256;\nvar kNumInsertAndCopyCodes = 704;\nvar kNumBlockLengthCodes = 26;\nvar kLiteralContextBits = 6;\nvar kDistanceContextBits = 2;\n\nvar HUFFMAN_TABLE_BITS = 8;\nvar HUFFMAN_TABLE_MASK = 0xff;\n/* Maximum possible Huffman table size for an alphabet size of 704, max code\n * length 15 and root table bits 8. */\nvar HUFFMAN_MAX_TABLE_SIZE = 1080;\n\nvar CODE_LENGTH_CODES = 18;\nvar kCodeLengthCodeOrder = new Uint8Array([\n 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n]);\n\nvar NUM_DISTANCE_SHORT_CODES = 16;\nvar kDistanceShortCodeIndexOffset = new Uint8Array([\n 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2\n]);\n\nvar kDistanceShortCodeValueOffset = new Int8Array([\n 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3\n]);\n\nvar kMaxHuffmanTableSize = new Uint16Array([\n 256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822,\n 854, 886, 920, 952, 984, 1016, 1048, 1080\n]);\n\nfunction DecodeWindowBits(br) {\n var n;\n if (br.readBits(1) === 0) {\n return 16;\n }\n\n n = br.readBits(3);\n if (n > 0) {\n return 17 + n;\n }\n\n n = br.readBits(3);\n if (n > 0) {\n return 8 + n;\n }\n\n return 17;\n}\n\n/* Decodes a number in the range [0..255], by reading 1 - 11 bits. */\nfunction DecodeVarLenUint8(br) {\n if (br.readBits(1)) {\n var nbits = br.readBits(3);\n if (nbits === 0) {\n return 1;\n } else {\n return br.readBits(nbits) + (1 << nbits);\n }\n }\n return 0;\n}\n\nfunction MetaBlockLength() {\n this.meta_block_length = 0;\n this.input_end = 0;\n this.is_uncompressed = 0;\n this.is_metadata = false;\n}\n\nfunction DecodeMetaBlockLength(br) {\n var out = new MetaBlockLength;\n var size_nibbles;\n var size_bytes;\n var i;\n\n out.input_end = br.readBits(1);\n if (out.input_end && br.readBits(1)) {\n return out;\n }\n\n size_nibbles = br.readBits(2) + 4;\n if (size_nibbles === 7) {\n out.is_metadata = true;\n\n if (br.readBits(1) !== 0)\n throw new Error('Invalid reserved bit');\n\n size_bytes = br.readBits(2);\n if (size_bytes === 0)\n return out;\n\n for (i = 0; i < size_bytes; i++) {\n var next_byte = br.readBits(8);\n if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0)\n throw new Error('Invalid size byte');\n\n out.meta_block_length |= next_byte << (i * 8);\n }\n } else {\n for (i = 0; i < size_nibbles; ++i) {\n var next_nibble = br.readBits(4);\n if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)\n throw new Error('Invalid size nibble');\n\n out.meta_block_length |= next_nibble << (i * 4);\n }\n }\n\n ++out.meta_block_length;\n\n if (!out.input_end && !out.is_metadata) {\n out.is_uncompressed = br.readBits(1);\n }\n\n return out;\n}\n\n/* Decodes the next Huffman code from bit-stream. */\nfunction ReadSymbol(table, index, br) {\n var start_index = index;\n\n var nbits;\n br.fillBitWindow();\n index += (br.val_ >>> br.bit_pos_) & HUFFMAN_TABLE_MASK;\n nbits = table[index].bits - HUFFMAN_TABLE_BITS;\n if (nbits > 0) {\n br.bit_pos_ += HUFFMAN_TABLE_BITS;\n index += table[index].value;\n index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1);\n }\n br.bit_pos_ += table[index].bits;\n return table[index].value;\n}\n\nfunction ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {\n var symbol = 0;\n var prev_code_len = kDefaultCodeLength;\n var repeat = 0;\n var repeat_code_len = 0;\n var space = 32768;\n\n var table = [];\n for (var i = 0; i < 32; i++)\n table.push(new HuffmanCode(0, 0));\n\n BrotliBuildHuffmanTable(table, 0, 5, code_length_code_lengths, CODE_LENGTH_CODES);\n\n while (symbol < num_symbols && space > 0) {\n var p = 0;\n var code_len;\n\n br.readMoreInput();\n br.fillBitWindow();\n p += (br.val_ >>> br.bit_pos_) & 31;\n br.bit_pos_ += table[p].bits;\n code_len = table[p].value & 0xff;\n if (code_len < kCodeLengthRepeatCode) {\n repeat = 0;\n code_lengths[symbol++] = code_len;\n if (code_len !== 0) {\n prev_code_len = code_len;\n space -= 32768 >> code_len;\n }\n } else {\n var extra_bits = code_len - 14;\n var old_repeat;\n var repeat_delta;\n var new_len = 0;\n if (code_len === kCodeLengthRepeatCode) {\n new_len = prev_code_len;\n }\n if (repeat_code_len !== new_len) {\n repeat = 0;\n repeat_code_len = new_len;\n }\n old_repeat = repeat;\n if (repeat > 0) {\n repeat -= 2;\n repeat <<= extra_bits;\n }\n repeat += br.readBits(extra_bits) + 3;\n repeat_delta = repeat - old_repeat;\n if (symbol + repeat_delta > num_symbols) {\n throw new Error('[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols');\n }\n\n for (var x = 0; x < repeat_delta; x++)\n code_lengths[symbol + x] = repeat_code_len;\n\n symbol += repeat_delta;\n\n if (repeat_code_len !== 0) {\n space -= repeat_delta << (15 - repeat_code_len);\n }\n }\n }\n if (space !== 0) {\n throw new Error(\"[ReadHuffmanCodeLengths] space = \" + space);\n }\n\n for (; symbol < num_symbols; symbol++)\n code_lengths[symbol] = 0;\n}\n\nfunction ReadHuffmanCode(alphabet_size, tables, table, br) {\n var table_size = 0;\n var simple_code_or_skip;\n var code_lengths = new Uint8Array(alphabet_size);\n\n br.readMoreInput();\n\n /* simple_code_or_skip is used as follows:\n 1 for simple code;\n 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */\n simple_code_or_skip = br.readBits(2);\n if (simple_code_or_skip === 1) {\n /* Read symbols, codes & code lengths directly. */\n var i;\n var max_bits_counter = alphabet_size - 1;\n var max_bits = 0;\n var symbols = new Int32Array(4);\n var num_symbols = br.readBits(2) + 1;\n while (max_bits_counter) {\n max_bits_counter >>= 1;\n ++max_bits;\n }\n\n for (i = 0; i < num_symbols; ++i) {\n symbols[i] = br.readBits(max_bits) % alphabet_size;\n code_lengths[symbols[i]] = 2;\n }\n code_lengths[symbols[0]] = 1;\n switch (num_symbols) {\n case 1:\n break;\n case 3:\n if ((symbols[0] === symbols[1]) ||\n (symbols[0] === symbols[2]) ||\n (symbols[1] === symbols[2])) {\n throw new Error('[ReadHuffmanCode] invalid symbols');\n }\n break;\n case 2:\n if (symbols[0] === symbols[1]) {\n throw new Error('[ReadHuffmanCode] invalid symbols');\n }\n\n code_lengths[symbols[1]] = 1;\n break;\n case 4:\n if ((symbols[0] === symbols[1]) ||\n (symbols[0] === symbols[2]) ||\n (symbols[0] === symbols[3]) ||\n (symbols[1] === symbols[2]) ||\n (symbols[1] === symbols[3]) ||\n (symbols[2] === symbols[3])) {\n throw new Error('[ReadHuffmanCode] invalid symbols');\n }\n\n if (br.readBits(1)) {\n code_lengths[symbols[2]] = 3;\n code_lengths[symbols[3]] = 3;\n } else {\n code_lengths[symbols[0]] = 2;\n }\n break;\n }\n } else { /* Decode Huffman-coded code lengths. */\n var i;\n var code_length_code_lengths = new Uint8Array(CODE_LENGTH_CODES);\n var space = 32;\n var num_codes = 0;\n /* Static Huffman code for the code length code lengths */\n var huff = [\n new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2),\n new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 1),\n new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2),\n new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 5)\n ];\n for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) {\n var code_len_idx = kCodeLengthCodeOrder[i];\n var p = 0;\n var v;\n br.fillBitWindow();\n p += (br.val_ >>> br.bit_pos_) & 15;\n br.bit_pos_ += huff[p].bits;\n v = huff[p].value;\n code_length_code_lengths[code_len_idx] = v;\n if (v !== 0) {\n space -= (32 >> v);\n ++num_codes;\n }\n }\n\n if (!(num_codes === 1 || space === 0))\n throw new Error('[ReadHuffmanCode] invalid num_codes or space');\n\n ReadHuffmanCodeLengths(code_length_code_lengths, alphabet_size, code_lengths, br);\n }\n\n table_size = BrotliBuildHuffmanTable(tables, table, HUFFMAN_TABLE_BITS, code_lengths, alphabet_size);\n\n if (table_size === 0) {\n throw new Error(\"[ReadHuffmanCode] BuildHuffmanTable failed: \");\n }\n\n return table_size;\n}\n\nfunction ReadBlockLength(table, index, br) {\n var code;\n var nbits;\n code = ReadSymbol(table, index, br);\n nbits = Prefix.kBlockLengthPrefixCode[code].nbits;\n return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);\n}\n\nfunction TranslateShortCodes(code, ringbuffer, index) {\n var val;\n if (code < NUM_DISTANCE_SHORT_CODES) {\n index += kDistanceShortCodeIndexOffset[code];\n index &= 3;\n val = ringbuffer[index] + kDistanceShortCodeValueOffset[code];\n } else {\n val = code - NUM_DISTANCE_SHORT_CODES + 1;\n }\n return val;\n}\n\nfunction MoveToFront(v, index) {\n var value = v[index];\n var i = index;\n for (; i; --i) v[i] = v[i - 1];\n v[0] = value;\n}\n\nfunction InverseMoveToFrontTransform(v, v_len) {\n var mtf = new Uint8Array(256);\n var i;\n for (i = 0; i < 256; ++i) {\n mtf[i] = i;\n }\n for (i = 0; i < v_len; ++i) {\n var index = v[i];\n v[i] = mtf[index];\n if (index) MoveToFront(mtf, index);\n }\n}\n\n/* Contains a collection of huffman trees with the same alphabet size. */\nfunction HuffmanTreeGroup(alphabet_size, num_htrees) {\n this.alphabet_size = alphabet_size;\n this.num_htrees = num_htrees;\n this.codes = new Array(num_htrees + num_htrees * kMaxHuffmanTableSize[(alphabet_size + 31) >>> 5]);\n this.htrees = new Uint32Array(num_htrees);\n}\n\nHuffmanTreeGroup.prototype.decode = function(br) {\n var i;\n var table_size;\n var next = 0;\n for (i = 0; i < this.num_htrees; ++i) {\n this.htrees[i] = next;\n table_size = ReadHuffmanCode(this.alphabet_size, this.codes, next, br);\n next += table_size;\n }\n};\n\nfunction DecodeContextMap(context_map_size, br) {\n var out = { num_htrees: null, context_map: null };\n var use_rle_for_zeros;\n var max_run_length_prefix = 0;\n var table;\n var i;\n\n br.readMoreInput();\n var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;\n\n var context_map = out.context_map = new Uint8Array(context_map_size);\n if (num_htrees <= 1) {\n return out;\n }\n\n use_rle_for_zeros = br.readBits(1);\n if (use_rle_for_zeros) {\n max_run_length_prefix = br.readBits(4) + 1;\n }\n\n table = [];\n for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) {\n table[i] = new HuffmanCode(0, 0);\n }\n\n ReadHuffmanCode(num_htrees + max_run_length_prefix, table, 0, br);\n\n for (i = 0; i < context_map_size;) {\n var code;\n\n br.readMoreInput();\n code = ReadSymbol(table, 0, br);\n if (code === 0) {\n context_map[i] = 0;\n ++i;\n } else if (code <= max_run_length_prefix) {\n var reps = 1 + (1 << code) + br.readBits(code);\n while (--reps) {\n if (i >= context_map_size) {\n throw new Error(\"[DecodeContextMap] i >= context_map_size\");\n }\n context_map[i] = 0;\n ++i;\n }\n } else {\n context_map[i] = code - max_run_length_prefix;\n ++i;\n }\n }\n if (br.readBits(1)) {\n InverseMoveToFrontTransform(context_map, context_map_size);\n }\n\n return out;\n}\n\nfunction DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {\n var ringbuffer = tree_type * 2;\n var index = tree_type;\n var type_code = ReadSymbol(trees, tree_type * HUFFMAN_MAX_TABLE_SIZE, br);\n var block_type;\n if (type_code === 0) {\n block_type = ringbuffers[ringbuffer + (indexes[index] & 1)];\n } else if (type_code === 1) {\n block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1;\n } else {\n block_type = type_code - 2;\n }\n if (block_type >= max_block_type) {\n block_type -= max_block_type;\n }\n block_types[tree_type] = block_type;\n ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type;\n ++indexes[index];\n}\n\nfunction CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {\n var rb_size = ringbuffer_mask + 1;\n var rb_pos = pos & ringbuffer_mask;\n var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;\n var nbytes;\n\n /* For short lengths copy byte-by-byte */\n if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {\n while (len-- > 0) {\n br.readMoreInput();\n ringbuffer[rb_pos++] = br.readBits(8);\n if (rb_pos === rb_size) {\n output.write(ringbuffer, rb_size);\n rb_pos = 0;\n }\n }\n return;\n }\n\n if (br.bit_end_pos_ < 32) {\n throw new Error('[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32');\n }\n\n /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */\n while (br.bit_pos_ < 32) {\n ringbuffer[rb_pos] = (br.val_ >>> br.bit_pos_);\n br.bit_pos_ += 8;\n ++rb_pos;\n --len;\n }\n\n /* Copy remaining bytes from br.buf_ to ringbuffer. */\n nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3;\n if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {\n var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;\n for (var x = 0; x < tail; x++)\n ringbuffer[rb_pos + x] = br.buf_[br_pos + x];\n\n nbytes -= tail;\n rb_pos += tail;\n len -= tail;\n br_pos = 0;\n }\n\n for (var x = 0; x < nbytes; x++)\n ringbuffer[rb_pos + x] = br.buf_[br_pos + x];\n\n rb_pos += nbytes;\n len -= nbytes;\n\n /* If we wrote past the logical end of the ringbuffer, copy the tail of the\n ringbuffer to its beginning and flush the ringbuffer to the output. */\n if (rb_pos >= rb_size) {\n output.write(ringbuffer, rb_size);\n rb_pos -= rb_size;\n for (var x = 0; x < rb_pos; x++)\n ringbuffer[x] = ringbuffer[rb_size + x];\n }\n\n /* If we have more to copy than the remaining size of the ringbuffer, then we\n first fill the ringbuffer from the input and then flush the ringbuffer to\n the output */\n while (rb_pos + len >= rb_size) {\n nbytes = rb_size - rb_pos;\n if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {\n throw new Error('[CopyUncompressedBlockToOutput] not enough bytes');\n }\n output.write(ringbuffer, rb_size);\n len -= nbytes;\n rb_pos = 0;\n }\n\n /* Copy straight from the input onto the ringbuffer. The ringbuffer will be\n flushed to the output at a later time. */\n if (br.input_.read(ringbuffer, rb_pos, len) < len) {\n throw new Error('[CopyUncompressedBlockToOutput] not enough bytes');\n }\n\n /* Restore the state of the bit reader. */\n br.reset();\n}\n\n/* Advances the bit reader position to the next byte boundary and verifies\n that any skipped bits are set to zero. */\nfunction JumpToByteBoundary(br) {\n var new_bit_pos = (br.bit_pos_ + 7) & ~7;\n var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);\n return pad_bits == 0;\n}\n\nfunction BrotliDecompressedSize(buffer) {\n var input = new BrotliInput(buffer);\n var br = new BrotliBitReader(input);\n DecodeWindowBits(br);\n var out = DecodeMetaBlockLength(br);\n return out.meta_block_length;\n}\n\nexports.BrotliDecompressedSize = BrotliDecompressedSize;\n\nfunction BrotliDecompressBuffer(buffer, output_size) {\n var input = new BrotliInput(buffer);\n\n if (output_size == null) {\n output_size = BrotliDecompressedSize(buffer);\n }\n\n var output_buffer = new Uint8Array(output_size);\n var output = new BrotliOutput(output_buffer);\n\n BrotliDecompress(input, output);\n\n if (output.pos < output.buffer.length) {\n output.buffer = output.buffer.subarray(0, output.pos);\n }\n\n return output.buffer;\n}\n\nexports.BrotliDecompressBuffer = BrotliDecompressBuffer;\n\nfunction BrotliDecompress(input, output) {\n var i;\n var pos = 0;\n var input_end = 0;\n var window_bits = 0;\n var max_backward_distance;\n var max_distance = 0;\n var ringbuffer_size;\n var ringbuffer_mask;\n var ringbuffer;\n var ringbuffer_end;\n /* This ring buffer holds a few past copy distances that will be used by */\n /* some special distance codes. */\n var dist_rb = [ 16, 15, 11, 4 ];\n var dist_rb_idx = 0;\n /* The previous 2 bytes used for context. */\n var prev_byte1 = 0;\n var prev_byte2 = 0;\n var hgroup = [new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0)];\n var block_type_trees;\n var block_len_trees;\n var br;\n\n /* We need the slack region for the following reasons:\n - always doing two 8-byte copies for fast backward copying\n - transforms\n - flushing the input ringbuffer when decoding uncompressed blocks */\n var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;\n\n br = new BrotliBitReader(input);\n\n /* Decode window size. */\n window_bits = DecodeWindowBits(br);\n max_backward_distance = (1 << window_bits) - 16;\n\n ringbuffer_size = 1 << window_bits;\n ringbuffer_mask = ringbuffer_size - 1;\n ringbuffer = new Uint8Array(ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength);\n ringbuffer_end = ringbuffer_size;\n\n block_type_trees = [];\n block_len_trees = [];\n for (var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++) {\n block_type_trees[x] = new HuffmanCode(0, 0);\n block_len_trees[x] = new HuffmanCode(0, 0);\n }\n\n while (!input_end) {\n var meta_block_remaining_len = 0;\n var is_uncompressed;\n var block_length = [ 1 << 28, 1 << 28, 1 << 28 ];\n var block_type = [ 0 ];\n var num_block_types = [ 1, 1, 1 ];\n var block_type_rb = [ 0, 1, 0, 1, 0, 1 ];\n var block_type_rb_index = [ 0 ];\n var distance_postfix_bits;\n var num_direct_distance_codes;\n var distance_postfix_mask;\n var num_distance_codes;\n var context_map = null;\n var context_modes = null;\n var num_literal_htrees;\n var dist_context_map = null;\n var num_dist_htrees;\n var context_offset = 0;\n var context_map_slice = null;\n var literal_htree_index = 0;\n var dist_context_offset = 0;\n var dist_context_map_slice = null;\n var dist_htree_index = 0;\n var context_lookup_offset1 = 0;\n var context_lookup_offset2 = 0;\n var context_mode;\n var htree_command;\n\n for (i = 0; i < 3; ++i) {\n hgroup[i].codes = null;\n hgroup[i].htrees = null;\n }\n\n br.readMoreInput();\n\n var _out = DecodeMetaBlockLength(br);\n meta_block_remaining_len = _out.meta_block_length;\n if (pos + meta_block_remaining_len > output.buffer.length) {\n /* We need to grow the output buffer to fit the additional data. */\n var tmp = new Uint8Array( pos + meta_block_remaining_len );\n tmp.set( output.buffer );\n output.buffer = tmp;\n }\n input_end = _out.input_end;\n is_uncompressed = _out.is_uncompressed;\n\n if (_out.is_metadata) {\n JumpToByteBoundary(br);\n\n for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {\n br.readMoreInput();\n /* Read one byte and ignore it. */\n br.readBits(8);\n }\n\n continue;\n }\n\n if (meta_block_remaining_len === 0) {\n continue;\n }\n\n if (is_uncompressed) {\n br.bit_pos_ = (br.bit_pos_ + 7) & ~7;\n CopyUncompressedBlockToOutput(output, meta_block_remaining_len, pos,\n ringbuffer, ringbuffer_mask, br);\n pos += meta_block_remaining_len;\n continue;\n }\n\n for (i = 0; i < 3; ++i) {\n num_block_types[i] = DecodeVarLenUint8(br) + 1;\n if (num_block_types[i] >= 2) {\n ReadHuffmanCode(num_block_types[i] + 2, block_type_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);\n ReadHuffmanCode(kNumBlockLengthCodes, block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);\n block_length[i] = ReadBlockLength(block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);\n block_type_rb_index[i] = 1;\n }\n }\n\n br.readMoreInput();\n\n distance_postfix_bits = br.readBits(2);\n num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);\n distance_postfix_mask = (1 << distance_postfix_bits) - 1;\n num_distance_codes = (num_direct_distance_codes + (48 << distance_postfix_bits));\n context_modes = new Uint8Array(num_block_types[0]);\n\n for (i = 0; i < num_block_types[0]; ++i) {\n br.readMoreInput();\n context_modes[i] = (br.readBits(2) << 1);\n }\n\n var _o1 = DecodeContextMap(num_block_types[0] << kLiteralContextBits, br);\n num_literal_htrees = _o1.num_htrees;\n context_map = _o1.context_map;\n\n var _o2 = DecodeContextMap(num_block_types[2] << kDistanceContextBits, br);\n num_dist_htrees = _o2.num_htrees;\n dist_context_map = _o2.context_map;\n\n hgroup[0] = new HuffmanTreeGroup(kNumLiteralCodes, num_literal_htrees);\n hgroup[1] = new HuffmanTreeGroup(kNumInsertAndCopyCodes, num_block_types[1]);\n hgroup[2] = new HuffmanTreeGroup(num_distance_codes, num_dist_htrees);\n\n for (i = 0; i < 3; ++i) {\n hgroup[i].decode(br);\n }\n\n context_map_slice = 0;\n dist_context_map_slice = 0;\n context_mode = context_modes[block_type[0]];\n context_lookup_offset1 = Context.lookupOffsets[context_mode];\n context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];\n htree_command = hgroup[1].htrees[0];\n\n while (meta_block_remaining_len > 0) {\n var cmd_code;\n var range_idx;\n var insert_code;\n var copy_code;\n var insert_length;\n var copy_length;\n var distance_code;\n var distance;\n var context;\n var j;\n var copy_dst;\n\n br.readMoreInput();\n\n if (block_length[1] === 0) {\n DecodeBlockType(num_block_types[1],\n block_type_trees, 1, block_type, block_type_rb,\n block_type_rb_index, br);\n block_length[1] = ReadBlockLength(block_len_trees, HUFFMAN_MAX_TABLE_SIZE, br);\n htree_command = hgroup[1].htrees[block_type[1]];\n }\n --block_length[1];\n cmd_code = ReadSymbol(hgroup[1].codes, htree_command, br);\n range_idx = cmd_code >> 6;\n if (range_idx >= 2) {\n range_idx -= 2;\n distance_code = -1;\n } else {\n distance_code = 0;\n }\n insert_code = Prefix.kInsertRangeLut[range_idx] + ((cmd_code >> 3) & 7);\n copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);\n insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset +\n br.readBits(Prefix.kInsertLengthPrefixCode[insert_code].nbits);\n copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset +\n br.readBits(Prefix.kCopyLengthPrefixCode[copy_code].nbits);\n prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask];\n prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask];\n for (j = 0; j < insert_length; ++j) {\n br.readMoreInput();\n\n if (block_length[0] === 0) {\n DecodeBlockType(num_block_types[0],\n block_type_trees, 0, block_type, block_type_rb,\n block_type_rb_index, br);\n block_length[0] = ReadBlockLength(block_len_trees, 0, br);\n context_offset = block_type[0] << kLiteralContextBits;\n context_map_slice = context_offset;\n context_mode = context_modes[block_type[0]];\n context_lookup_offset1 = Context.lookupOffsets[context_mode];\n context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];\n }\n context = (Context.lookup[context_lookup_offset1 + prev_byte1] |\n Context.lookup[context_lookup_offset2 + prev_byte2]);\n literal_htree_index = context_map[context_map_slice + context];\n --block_length[0];\n prev_byte2 = prev_byte1;\n prev_byte1 = ReadSymbol(hgroup[0].codes, hgroup[0].htrees[literal_htree_index], br);\n ringbuffer[pos & ringbuffer_mask] = prev_byte1;\n if ((pos & ringbuffer_mask) === ringbuffer_mask) {\n output.write(ringbuffer, ringbuffer_size);\n }\n ++pos;\n }\n meta_block_remaining_len -= insert_length;\n if (meta_block_remaining_len <= 0) break;\n\n if (distance_code < 0) {\n var context;\n\n br.readMoreInput();\n if (block_length[2] === 0) {\n DecodeBlockType(num_block_types[2],\n block_type_trees, 2, block_type, block_type_rb,\n block_type_rb_index, br);\n block_length[2] = ReadBlockLength(block_len_trees, 2 * HUFFMAN_MAX_TABLE_SIZE, br);\n dist_context_offset = block_type[2] << kDistanceContextBits;\n dist_context_map_slice = dist_context_offset;\n }\n --block_length[2];\n context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff;\n dist_htree_index = dist_context_map[dist_context_map_slice + context];\n distance_code = ReadSymbol(hgroup[2].codes, hgroup[2].htrees[dist_htree_index], br);\n if (distance_code >= num_direct_distance_codes) {\n var nbits;\n var postfix;\n var offset;\n distance_code -= num_direct_distance_codes;\n postfix = distance_code & distance_postfix_mask;\n distance_code >>= distance_postfix_bits;\n nbits = (distance_code >> 1) + 1;\n offset = ((2 + (distance_code & 1)) << nbits) - 4;\n distance_code = num_direct_distance_codes +\n ((offset + br.readBits(nbits)) <<\n distance_postfix_bits) + postfix;\n }\n }\n\n /* Convert the distance code to the actual distance by possibly looking */\n /* up past distnaces from the ringbuffer. */\n distance = TranslateShortCodes(distance_code, dist_rb, dist_rb_idx);\n if (distance < 0) {\n throw new Error('[BrotliDecompress] invalid distance');\n }\n\n if (pos < max_backward_distance &&\n max_distance !== max_backward_distance) {\n max_distance = pos;\n } else {\n max_distance = max_backward_distance;\n }\n\n copy_dst = pos & ringbuffer_mask;\n\n if (distance > max_distance) {\n if (copy_length >= BrotliDictionary.minDictionaryWordLength &&\n copy_length <= BrotliDictionary.maxDictionaryWordLength) {\n var offset = BrotliDictionary.offsetsByLength[copy_length];\n var word_id = distance - max_distance - 1;\n var shift = BrotliDictionary.sizeBitsByLength[copy_length];\n var mask = (1 << shift) - 1;\n var word_idx = word_id & mask;\n var transform_idx = word_id >> shift;\n offset += word_idx * copy_length;\n if (transform_idx < Transform.kNumTransforms) {\n var len = Transform.transformDictionaryWord(ringbuffer, copy_dst, offset, copy_length, transform_idx);\n copy_dst += len;\n pos += len;\n meta_block_remaining_len -= len;\n if (copy_dst >= ringbuffer_end) {\n output.write(ringbuffer, ringbuffer_size);\n\n for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++)\n ringbuffer[_x] = ringbuffer[ringbuffer_end + _x];\n }\n } else {\n throw new Error(\"Invalid backward reference. pos: \" + pos + \" distance: \" + distance +\n \" len: \" + copy_length + \" bytes left: \" + meta_block_remaining_len);\n }\n } else {\n throw new Error(\"Invalid backward reference. pos: \" + pos + \" distance: \" + distance +\n \" len: \" + copy_length + \" bytes left: \" + meta_block_remaining_len);\n }\n } else {\n if (distance_code > 0) {\n dist_rb[dist_rb_idx & 3] = distance;\n ++dist_rb_idx;\n }\n\n if (copy_length > meta_block_remaining_len) {\n throw new Error(\"Invalid backward reference. pos: \" + pos + \" distance: \" + distance +\n \" len: \" + copy_length + \" bytes left: \" + meta_block_remaining_len);\n }\n\n for (j = 0; j < copy_length; ++j) {\n ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask];\n if ((pos & ringbuffer_mask) === ringbuffer_mask) {\n output.write(ringbuffer, ringbuffer_size);\n }\n ++pos;\n --meta_block_remaining_len;\n }\n }\n\n /* When we get here, we must have inserted at least one literal and */\n /* made a copy of at least length two, therefore accessing the last 2 */\n /* bytes is valid. */\n prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask];\n prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask];\n }\n\n /* Protect pos from overflow, wrap it around at every GB of input data */\n pos &= 0x3fffffff;\n }\n\n output.write(ringbuffer, pos & ringbuffer_mask);\n}\n\nexports.BrotliDecompress = BrotliDecompress;\n\nBrotliDictionary.init();\n\n},{\"./bit_reader\":1,\"./context\":2,\"./dictionary\":6,\"./huffman\":7,\"./prefix\":9,\"./streams\":10,\"./transform\":11}],4:[function(require,module,exports){\nvar base64 = require('base64-js');\n//var fs = require('fs');\n\n/**\n * The normal dictionary-data.js is quite large, which makes it\n * unsuitable for browser usage. In order to make it smaller,\n * we read dictionary.bin, which is a compressed version of\n * the dictionary, and on initial load, Brotli decompresses\n * it's own dictionary. 😜\n */\nexports.init = function() {\n var BrotliDecompressBuffer = require('./decode').BrotliDecompressBuffer;\n var compressed = base64.toByteArray(require('./dictionary.bin.js'));\n return BrotliDecompressBuffer(compressed);\n};\n\n},{\"./decode\":3,\"./dictionary.bin.js\":5,\"base64-js\":8}],5:[function(require,module,exports){\nmodule.exports=\"W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYY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lf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=\";\n\n},{}],6:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Collection of static dictionary words.\n*/\n\nvar data = require('./dictionary-browser');\nexports.init = function() {\n exports.dictionary = data.init();\n};\n\nexports.offsetsByLength = new Uint32Array([\n 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032,\n 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536,\n 115968, 118528, 119872, 121280, 122016,\n]);\n\nexports.sizeBitsByLength = new Uint8Array([\n 0, 0, 0, 0, 10, 10, 11, 11, 10, 10,\n 10, 10, 10, 9, 9, 8, 7, 7, 8, 7,\n 7, 6, 6, 5, 5,\n]);\n\nexports.minDictionaryWordLength = 4;\nexports.maxDictionaryWordLength = 24;\n\n},{\"./dictionary-browser\":4}],7:[function(require,module,exports){\nfunction HuffmanCode(bits, value) {\n this.bits = bits; /* number of bits used for this symbol */\n this.value = value; /* symbol value or table offset */\n}\n\nexports.HuffmanCode = HuffmanCode;\n\nvar MAX_LENGTH = 15;\n\n/* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the\n bit-wise reversal of the len least significant bits of key. */\nfunction GetNextKey(key, len) {\n var step = 1 << (len - 1);\n while (key & step) {\n step >>= 1;\n }\n return (key & (step - 1)) + step;\n}\n\n/* Stores code in table[0], table[step], table[2*step], ..., table[end] */\n/* Assumes that end is an integer multiple of step */\nfunction ReplicateValue(table, i, step, end, code) {\n do {\n end -= step;\n table[i + end] = new HuffmanCode(code.bits, code.value);\n } while (end > 0);\n}\n\n/* Returns the table width of the next 2nd level table. count is the histogram\n of bit lengths for the remaining symbols, len is the code length of the next\n processed symbol */\nfunction NextTableBitSize(count, len, root_bits) {\n var left = 1 << (len - root_bits);\n while (len < MAX_LENGTH) {\n left -= count[len];\n if (left <= 0) break;\n ++len;\n left <<= 1;\n }\n return len - root_bits;\n}\n\nexports.BrotliBuildHuffmanTable = function(root_table, table, root_bits, code_lengths, code_lengths_size) {\n var start_table = table;\n var code; /* current table entry */\n var len; /* current code length */\n var symbol; /* symbol index in original or sorted table */\n var key; /* reversed prefix code */\n var step; /* step size to replicate values in current table */\n var low; /* low bits for current root entry */\n var mask; /* mask for low bits */\n var table_bits; /* key length of current table */\n var table_size; /* size of current table */\n var total_size; /* sum of root table size and 2nd level table sizes */\n var sorted; /* symbols sorted by code length */\n var count = new Int32Array(MAX_LENGTH + 1); /* number of codes of each length */\n var offset = new Int32Array(MAX_LENGTH + 1); /* offsets in sorted table for each length */\n\n sorted = new Int32Array(code_lengths_size);\n\n /* build histogram of code lengths */\n for (symbol = 0; symbol < code_lengths_size; symbol++) {\n count[code_lengths[symbol]]++;\n }\n\n /* generate offsets into sorted symbol table by code length */\n offset[1] = 0;\n for (len = 1; len < MAX_LENGTH; len++) {\n offset[len + 1] = offset[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (symbol = 0; symbol < code_lengths_size; symbol++) {\n if (code_lengths[symbol] !== 0) {\n sorted[offset[code_lengths[symbol]]++] = symbol;\n }\n }\n\n table_bits = root_bits;\n table_size = 1 << table_bits;\n total_size = table_size;\n\n /* special case code with only one value */\n if (offset[MAX_LENGTH] === 1) {\n for (key = 0; key < total_size; ++key) {\n root_table[table + key] = new HuffmanCode(0, sorted[0] & 0xffff);\n }\n\n return total_size;\n }\n\n /* fill in root table */\n key = 0;\n symbol = 0;\n for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {\n for (; count[len] > 0; --count[len]) {\n code = new HuffmanCode(len & 0xff, sorted[symbol++] & 0xffff);\n ReplicateValue(root_table, table + key, step, table_size, code);\n key = GetNextKey(key, len);\n }\n }\n\n /* fill in 2nd level tables and add pointers to root table */\n mask = total_size - 1;\n low = -1;\n for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {\n for (; count[len] > 0; --count[len]) {\n if ((key & mask) !== low) {\n table += table_size;\n table_bits = NextTableBitSize(count, len, root_bits);\n table_size = 1 << table_bits;\n total_size += table_size;\n low = key & mask;\n root_table[start_table + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff);\n }\n code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff);\n ReplicateValue(root_table, table + (key >> root_bits), step, table_size, code);\n key = GetNextKey(key, len);\n }\n }\n\n return total_size;\n}\n\n},{}],8:[function(require,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n},{}],9:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Lookup tables to map prefix codes to value ranges. This is used during\n decoding of the block lengths, literal insertion lengths and copy lengths.\n*/\n\n/* Represents the range of values belonging to a prefix code: */\n/* [offset, offset + 2^nbits) */\nfunction PrefixCodeRange(offset, nbits) {\n this.offset = offset;\n this.nbits = nbits;\n}\n\nexports.kBlockLengthPrefixCode = [\n new PrefixCodeRange(1, 2), new PrefixCodeRange(5, 2), new PrefixCodeRange(9, 2), new PrefixCodeRange(13, 2),\n new PrefixCodeRange(17, 3), new PrefixCodeRange(25, 3), new PrefixCodeRange(33, 3), new PrefixCodeRange(41, 3),\n new PrefixCodeRange(49, 4), new PrefixCodeRange(65, 4), new PrefixCodeRange(81, 4), new PrefixCodeRange(97, 4),\n new PrefixCodeRange(113, 5), new PrefixCodeRange(145, 5), new PrefixCodeRange(177, 5), new PrefixCodeRange(209, 5),\n new PrefixCodeRange(241, 6), new PrefixCodeRange(305, 6), new PrefixCodeRange(369, 7), new PrefixCodeRange(497, 8),\n new PrefixCodeRange(753, 9), new PrefixCodeRange(1265, 10), new PrefixCodeRange(2289, 11), new PrefixCodeRange(4337, 12),\n new PrefixCodeRange(8433, 13), new PrefixCodeRange(16625, 24)\n];\n\nexports.kInsertLengthPrefixCode = [\n new PrefixCodeRange(0, 0), new PrefixCodeRange(1, 0), new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0),\n new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 1), new PrefixCodeRange(8, 1),\n new PrefixCodeRange(10, 2), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 3), new PrefixCodeRange(26, 3),\n new PrefixCodeRange(34, 4), new PrefixCodeRange(50, 4), new PrefixCodeRange(66, 5), new PrefixCodeRange(98, 5),\n new PrefixCodeRange(130, 6), new PrefixCodeRange(194, 7), new PrefixCodeRange(322, 8), new PrefixCodeRange(578, 9),\n new PrefixCodeRange(1090, 10), new PrefixCodeRange(2114, 12), new PrefixCodeRange(6210, 14), new PrefixCodeRange(22594, 24),\n];\n\nexports.kCopyLengthPrefixCode = [\n new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0),\n new PrefixCodeRange(6, 0), new PrefixCodeRange(7, 0), new PrefixCodeRange(8, 0), new PrefixCodeRange(9, 0),\n new PrefixCodeRange(10, 1), new PrefixCodeRange(12, 1), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 2),\n new PrefixCodeRange(22, 3), new PrefixCodeRange(30, 3), new PrefixCodeRange(38, 4), new PrefixCodeRange(54, 4),\n new PrefixCodeRange(70, 5), new PrefixCodeRange(102, 5), new PrefixCodeRange(134, 6), new PrefixCodeRange(198, 7),\n new PrefixCodeRange(326, 8), new PrefixCodeRange(582, 9), new PrefixCodeRange(1094, 10), new PrefixCodeRange(2118, 24),\n];\n\nexports.kInsertRangeLut = [\n 0, 0, 8, 8, 0, 16, 8, 16, 16,\n];\n\nexports.kCopyRangeLut = [\n 0, 8, 0, 8, 16, 0, 16, 8, 16,\n];\n\n},{}],10:[function(require,module,exports){\nfunction BrotliInput(buffer) {\n this.buffer = buffer;\n this.pos = 0;\n}\n\nBrotliInput.prototype.read = function(buf, i, count) {\n if (this.pos + count > this.buffer.length) {\n count = this.buffer.length - this.pos;\n }\n\n for (var p = 0; p < count; p++)\n buf[i + p] = this.buffer[this.pos + p];\n\n this.pos += count;\n return count;\n}\n\nexports.BrotliInput = BrotliInput;\n\nfunction BrotliOutput(buf) {\n this.buffer = buf;\n this.pos = 0;\n}\n\nBrotliOutput.prototype.write = function(buf, count) {\n if (this.pos + count > this.buffer.length)\n throw new Error('Output buffer is not large enough');\n\n this.buffer.set(buf.subarray(0, count), this.pos);\n this.pos += count;\n return count;\n};\n\nexports.BrotliOutput = BrotliOutput;\n\n},{}],11:[function(require,module,exports){\n/* Copyright 2013 Google Inc. All Rights Reserved.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n Transformations on dictionary words.\n*/\n\nvar BrotliDictionary = require('./dictionary');\n\nvar kIdentity = 0;\nvar kOmitLast1 = 1;\nvar kOmitLast2 = 2;\nvar kOmitLast3 = 3;\nvar kOmitLast4 = 4;\nvar kOmitLast5 = 5;\nvar kOmitLast6 = 6;\nvar kOmitLast7 = 7;\nvar kOmitLast8 = 8;\nvar kOmitLast9 = 9;\nvar kUppercaseFirst = 10;\nvar kUppercaseAll = 11;\nvar kOmitFirst1 = 12;\nvar kOmitFirst2 = 13;\nvar kOmitFirst3 = 14;\nvar kOmitFirst4 = 15;\nvar kOmitFirst5 = 16;\nvar kOmitFirst6 = 17;\nvar kOmitFirst7 = 18;\nvar kOmitFirst8 = 19;\nvar kOmitFirst9 = 20;\n\nfunction Transform(prefix, transform, suffix) {\n this.prefix = new Uint8Array(prefix.length);\n this.transform = transform;\n this.suffix = new Uint8Array(suffix.length);\n\n for (var i = 0; i < prefix.length; i++)\n this.prefix[i] = prefix.charCodeAt(i);\n\n for (var i = 0; i < suffix.length; i++)\n this.suffix[i] = suffix.charCodeAt(i);\n}\n\nvar kTransforms = [\n new Transform( \"\", kIdentity, \"\" ),\n new Transform( \"\", kIdentity, \" \" ),\n new Transform( \" \", kIdentity, \" \" ),\n new Transform( \"\", kOmitFirst1, \"\" ),\n new Transform( \"\", kUppercaseFirst, \" \" ),\n new Transform( \"\", kIdentity, \" the \" ),\n new Transform( \" \", kIdentity, \"\" ),\n new Transform( \"s \", kIdentity, \" \" ),\n new Transform( \"\", kIdentity, \" of \" ),\n new Transform( \"\", kUppercaseFirst, \"\" ),\n new Transform( \"\", kIdentity, \" and \" ),\n new Transform( \"\", kOmitFirst2, \"\" ),\n new Transform( \"\", kOmitLast1, \"\" ),\n new Transform( \", \", kIdentity, \" \" ),\n new Transform( \"\", kIdentity, \", \" ),\n new Transform( \" \", kUppercaseFirst, \" \" ),\n new Transform( \"\", kIdentity, \" in \" ),\n new Transform( \"\", kIdentity, \" to \" ),\n new Transform( \"e \", kIdentity, \" \" ),\n new Transform( \"\", kIdentity, \"\\\"\" ),\n new Transform( \"\", kIdentity, \".\" ),\n new Transform( \"\", kIdentity, \"\\\">\" ),\n new Transform( \"\", kIdentity, \"\\n\" ),\n new Transform( \"\", kOmitLast3, \"\" ),\n new Transform( \"\", kIdentity, \"]\" ),\n new Transform( \"\", kIdentity, \" for \" ),\n new Transform( \"\", kOmitFirst3, \"\" ),\n new Transform( \"\", kOmitLast2, \"\" ),\n new Transform( \"\", kIdentity, \" a \" ),\n new Transform( \"\", kIdentity, \" that \" ),\n new Transform( \" \", kUppercaseFirst, \"\" ),\n new Transform( \"\", kIdentity, \". \" ),\n new Transform( \".\", kIdentity, \"\" ),\n new Transform( \" \", kIdentity, \", \" ),\n new Transform( \"\", kOmitFirst4, \"\" ),\n new Transform( \"\", kIdentity, \" with \" ),\n new Transform( \"\", kIdentity, \"'\" ),\n new Transform( \"\", kIdentity, \" from \" ),\n new Transform( \"\", kIdentity, \" by \" ),\n new Transform( \"\", kOmitFirst5, \"\" ),\n new Transform( \"\", kOmitFirst6, \"\" ),\n new Transform( \" the \", kIdentity, \"\" ),\n new Transform( \"\", kOmitLast4, \"\" ),\n new Transform( \"\", kIdentity, \". The \" ),\n new Transform( \"\", kUppercaseAll, \"\" ),\n new Transform( \"\", kIdentity, \" on \" ),\n new Transform( \"\", kIdentity, \" as \" ),\n new Transform( \"\", kIdentity, \" is \" ),\n new Transform( \"\", kOmitLast7, \"\" ),\n new Transform( \"\", kOmitLast1, \"ing \" ),\n new Transform( \"\", kIdentity, \"\\n\\t\" ),\n new Transform( \"\", kIdentity, \":\" ),\n new Transform( \" \", kIdentity, \". \" ),\n new Transform( \"\", kIdentity, \"ed \" ),\n new Transform( \"\", kOmitFirst9, \"\" ),\n new Transform( \"\", kOmitFirst7, \"\" ),\n new Transform( \"\", kOmitLast6, \"\" ),\n new Transform( \"\", kIdentity, \"(\" ),\n new Transform( \"\", kUppercaseFirst, \", \" ),\n new Transform( \"\", kOmitLast8, \"\" ),\n new Transform( \"\", kIdentity, \" at \" ),\n new Transform( \"\", kIdentity, \"ly \" ),\n new Transform( \" the \", kIdentity, \" of \" ),\n new Transform( \"\", kOmitLast5, \"\" ),\n new Transform( \"\", kOmitLast9, \"\" ),\n new Transform( \" \", kUppercaseFirst, \", \" ),\n new Transform( \"\", kUppercaseFirst, \"\\\"\" ),\n new Transform( \".\", kIdentity, \"(\" ),\n new Transform( \"\", kUppercaseAll, \" \" ),\n new Transform( \"\", kUppercaseFirst, \"\\\">\" ),\n new Transform( \"\", kIdentity, \"=\\\"\" ),\n new Transform( \" \", kIdentity, \".\" ),\n new Transform( \".com/\", kIdentity, \"\" ),\n new Transform( \" the \", kIdentity, \" of the \" ),\n new Transform( \"\", kUppercaseFirst, \"'\" ),\n new Transform( \"\", kIdentity, \". This \" ),\n new Transform( \"\", kIdentity, \",\" ),\n new Transform( \".\", kIdentity, \" \" ),\n new Transform( \"\", kUppercaseFirst, \"(\" ),\n new Transform( \"\", kUppercaseFirst, \".\" ),\n new Transform( \"\", kIdentity, \" not \" ),\n new Transform( \" \", kIdentity, \"=\\\"\" ),\n new Transform( \"\", kIdentity, \"er \" ),\n new Transform( \" \", kUppercaseAll, \" \" ),\n new Transform( \"\", kIdentity, \"al \" ),\n new Transform( \" \", kUppercaseAll, \"\" ),\n new Transform( \"\", kIdentity, \"='\" ),\n new Transform( \"\", kUppercaseAll, \"\\\"\" ),\n new Transform( \"\", kUppercaseFirst, \". \" ),\n new Transform( \" \", kIdentity, \"(\" ),\n new Transform( \"\", kIdentity, \"ful \" ),\n new Transform( \" \", kUppercaseFirst, \". \" ),\n new Transform( \"\", kIdentity, \"ive \" ),\n new Transform( \"\", kIdentity, \"less \" ),\n new Transform( \"\", kUppercaseAll, \"'\" ),\n new Transform( \"\", kIdentity, \"est \" ),\n new Transform( \" \", kUppercaseFirst, \".\" ),\n new Transform( \"\", kUppercaseAll, \"\\\">\" ),\n new Transform( \" \", kIdentity, \"='\" ),\n new Transform( \"\", kUppercaseFirst, \",\" ),\n new Transform( \"\", kIdentity, \"ize \" ),\n new Transform( \"\", kUppercaseAll, \".\" ),\n new Transform( \"\\xc2\\xa0\", kIdentity, \"\" ),\n new Transform( \" \", kIdentity, \",\" ),\n new Transform( \"\", kUppercaseFirst, \"=\\\"\" ),\n new Transform( \"\", kUppercaseAll, \"=\\\"\" ),\n new Transform( \"\", kIdentity, \"ous \" ),\n new Transform( \"\", kUppercaseAll, \", \" ),\n new Transform( \"\", kUppercaseFirst, \"='\" ),\n new Transform( \" \", kUppercaseFirst, \",\" ),\n new Transform( \" \", kUppercaseAll, \"=\\\"\" ),\n new Transform( \" \", kUppercaseAll, \", \" ),\n new Transform( \"\", kUppercaseAll, \",\" ),\n new Transform( \"\", kUppercaseAll, \"(\" ),\n new Transform( \"\", kUppercaseAll, \". \" ),\n new Transform( \" \", kUppercaseAll, \".\" ),\n new Transform( \"\", kUppercaseAll, \"='\" ),\n new Transform( \" \", kUppercaseAll, \". \" ),\n new Transform( \" \", kUppercaseFirst, \"=\\\"\" ),\n new Transform( \" \", kUppercaseAll, \"='\" ),\n new Transform( \" \", kUppercaseFirst, \"='\" )\n];\n\nexports.kTransforms = kTransforms;\nexports.kNumTransforms = kTransforms.length;\n\nfunction ToUpperCase(p, i) {\n if (p[i] < 0xc0) {\n if (p[i] >= 97 && p[i] <= 122) {\n p[i] ^= 32;\n }\n return 1;\n }\n\n /* An overly simplified uppercasing model for utf-8. */\n if (p[i] < 0xe0) {\n p[i + 1] ^= 32;\n return 2;\n }\n\n /* An arbitrary transform for three byte characters. */\n p[i + 2] ^= 5;\n return 3;\n}\n\nexports.transformDictionaryWord = function(dst, idx, word, len, transform) {\n var prefix = kTransforms[transform].prefix;\n var suffix = kTransforms[transform].suffix;\n var t = kTransforms[transform].transform;\n var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);\n var i = 0;\n var start_idx = idx;\n var uppercase;\n\n if (skip > len) {\n skip = len;\n }\n\n var prefix_pos = 0;\n while (prefix_pos < prefix.length) {\n dst[idx++] = prefix[prefix_pos++];\n }\n\n word += skip;\n len -= skip;\n\n if (t <= kOmitLast9) {\n len -= t;\n }\n\n for (i = 0; i < len; i++) {\n dst[idx++] = BrotliDictionary.dictionary[word + i];\n }\n\n uppercase = idx - len;\n\n if (t === kUppercaseFirst) {\n ToUpperCase(dst, uppercase);\n } else if (t === kUppercaseAll) {\n while (len > 0) {\n var step = ToUpperCase(dst, uppercase);\n uppercase += step;\n len -= step;\n }\n }\n\n var suffix_pos = 0;\n while (suffix_pos < suffix.length) {\n dst[idx++] = suffix[suffix_pos++];\n }\n\n return idx - start_idx;\n}\n\n},{\"./dictionary\":6}],12:[function(require,module,exports){\nmodule.exports = require('./dec/decode').BrotliDecompressBuffer;\n\n},{\"./dec/decode\":3}]},{},[12])(12)\n});\n/* eslint-enable */\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](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\"][\"blockLibrary\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"data\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"deprecated\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"element\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"editor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"preferences\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"widgets\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"hooks\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"compose\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blockEditor\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"components\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"i18n\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"notices\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreData\"];","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","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","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"privateApis\"];","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/edit-site'\n\t);\n","/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useSelect } from '@wordpress/data';\n\nconst { useGlobalSetting, useGlobalStyle } = unlock( blockEditorPrivateApis );\n\n// Enable colord's a11y plugin.\nextend( [ a11yPlugin ] );\n\nexport function useColorRandomizer( name ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\n\tfunction randomizeColors() {\n\t\t/* eslint-disable no-restricted-syntax */\n\t\tconst randomRotationValue = Math.floor( Math.random() * 225 );\n\t\t/* eslint-enable no-restricted-syntax */\n\n\t\tconst newColors = themeColors.map( ( colorObject ) => {\n\t\t\tconst { color } = colorObject;\n\t\t\tconst newColor = colord( color )\n\t\t\t\t.rotate( randomRotationValue )\n\t\t\t\t.toHex();\n\n\t\t\treturn {\n\t\t\t\t...colorObject,\n\t\t\t\tcolor: newColor,\n\t\t\t};\n\t\t} );\n\n\t\tsetThemeColors( newColors );\n\t}\n\n\treturn window.__experimentalEnableColorRandomizer\n\t\t? [ randomizeColors ]\n\t\t: [];\n}\n\nexport function useStylesPreviewColors() {\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\tconst [ linkColor = headingColor ] = useGlobalStyle(\n\t\t'elements.link.color.text'\n\t);\n\n\tconst [ buttonBackgroundColor = linkColor ] = useGlobalStyle(\n\t\t'elements.button.color.background'\n\t);\n\tconst [ coreColors ] = useGlobalSetting( 'color.palette.core' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\n\tconst paletteColors = ( themeColors ?? [] )\n\t\t.concat( customColors ?? [] )\n\t\t.concat( coreColors ?? [] );\n\n\tconst textColorObject = paletteColors.filter(\n\t\t( { color } ) => color === textColor\n\t);\n\tconst buttonBackgroundColorObject = paletteColors.filter(\n\t\t( { color } ) => color === buttonBackgroundColor\n\t);\n\n\tconst highlightedColors = textColorObject\n\t\t.concat( buttonBackgroundColorObject )\n\t\t.concat( paletteColors )\n\t\t.filter(\n\t\t\t// we exclude these background color because it is already visible in the preview.\n\t\t\t( { color } ) => color !== backgroundColor\n\t\t)\n\t\t.slice( 0, 2 );\n\n\treturn {\n\t\tpaletteColors,\n\t\thighlightedColors,\n\t};\n}\n\nexport function useSupportedStyles( name, element ) {\n\tconst { supportedPanels } = useSelect(\n\t\t( select ) => {\n\t\t\treturn {\n\t\t\t\tsupportedPanels: unlock(\n\t\t\t\t\tselect( blocksStore )\n\t\t\t\t).getSupportedStyles( name, element ),\n\t\t\t};\n\t\t},\n\t\t[ name, element ]\n\t);\n\n\treturn supportedPanels;\n}\n","/**\n * Makes a copy of an object without storing any references to the original object.\n * @param {Object} object\n * @return {Object} The cloned object.\n */\nexport default function cloneDeep( object ) {\n\treturn ! object ? {} : JSON.parse( JSON.stringify( object ) );\n}\n","/**\n * Sets the value at path of object.\n * If a portion of path doesn’t exist, it’s created.\n * Arrays are created for missing index properties while objects are created\n * for all other missing properties.\n *\n * This function intentionally mutates the input object.\n *\n * Inspired by _.set().\n *\n * @see https://lodash.com/docs/4.17.15#set\n *\n * @todo Needs to be deduplicated with its copy in `@wordpress/core-data`.\n *\n * @param {Object} object Object to modify\n * @param {Array} path Path of the property to set.\n * @param {*} value Value to set.\n */\nexport default function setNestedValue( object, path, value ) {\n\tif ( ! object || typeof object !== 'object' ) {\n\t\treturn object;\n\t}\n\n\tpath.reduce( ( acc, key, idx ) => {\n\t\tif ( acc[ key ] === undefined ) {\n\t\t\tif ( Number.isInteger( path[ idx + 1 ] ) ) {\n\t\t\t\tacc[ key ] = [];\n\t\t\t} else {\n\t\t\t\tacc[ key ] = {};\n\t\t\t}\n\t\t}\n\t\tif ( idx === path.length - 1 ) {\n\t\t\tacc[ key ] = value;\n\t\t}\n\t\treturn acc[ key ];\n\t}, object );\n\n\treturn object;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"ReactJSXRuntime\"];","/**\n * WordPress dependencies\n */\nimport { addFilter } from '@wordpress/hooks';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport {\n\tInspectorAdvancedControls,\n\tstore as blockEditorStore,\n\tprivateApis as blockEditorPrivateApis,\n\tuseBlockEditingMode,\n} from '@wordpress/block-editor';\nimport { BaseControl, Button } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__EXPERIMENTAL_STYLE_PROPERTY,\n\tgetBlockType,\n\thasBlockSupport,\n} from '@wordpress/blocks';\nimport { useContext, useMemo, useCallback } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { useSupportedStyles } from '../../components/global-styles/hooks';\nimport { unlock } from '../../lock-unlock';\nimport cloneDeep from '../../utils/clone-deep';\nimport setNestedValue from '../../utils/set-nested-value';\n\nconst { cleanEmptyObject, GlobalStylesContext } = unlock(\n\tblockEditorPrivateApis\n);\n\n// Block Gap is a special case and isn't defined within the blocks\n// style properties config. We'll add it here to allow it to be pushed\n// to global styles as well.\nconst STYLE_PROPERTY = {\n\t...__EXPERIMENTAL_STYLE_PROPERTY,\n\tblockGap: { value: [ 'spacing', 'blockGap' ] },\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_CSS_VAR_INFIX = {\n\t'border.color': 'color',\n\t'color.background': 'color',\n\t'color.text': 'color',\n\t'elements.link.color.text': 'color',\n\t'elements.link.:hover.color.text': 'color',\n\t'elements.link.typography.fontFamily': 'font-family',\n\t'elements.link.typography.fontSize': 'font-size',\n\t'elements.button.color.text': 'color',\n\t'elements.button.color.background': 'color',\n\t'elements.button.typography.fontFamily': 'font-family',\n\t'elements.button.typography.fontSize': 'font-size',\n\t'elements.caption.color.text': 'color',\n\t'elements.heading.color': 'color',\n\t'elements.heading.color.background': 'color',\n\t'elements.heading.typography.fontFamily': 'font-family',\n\t'elements.heading.gradient': 'gradient',\n\t'elements.heading.color.gradient': 'gradient',\n\t'elements.h1.color': 'color',\n\t'elements.h1.color.background': 'color',\n\t'elements.h1.typography.fontFamily': 'font-family',\n\t'elements.h1.color.gradient': 'gradient',\n\t'elements.h2.color': 'color',\n\t'elements.h2.color.background': 'color',\n\t'elements.h2.typography.fontFamily': 'font-family',\n\t'elements.h2.color.gradient': 'gradient',\n\t'elements.h3.color': 'color',\n\t'elements.h3.color.background': 'color',\n\t'elements.h3.typography.fontFamily': 'font-family',\n\t'elements.h3.color.gradient': 'gradient',\n\t'elements.h4.color': 'color',\n\t'elements.h4.color.background': 'color',\n\t'elements.h4.typography.fontFamily': 'font-family',\n\t'elements.h4.color.gradient': 'gradient',\n\t'elements.h5.color': 'color',\n\t'elements.h5.color.background': 'color',\n\t'elements.h5.typography.fontFamily': 'font-family',\n\t'elements.h5.color.gradient': 'gradient',\n\t'elements.h6.color': 'color',\n\t'elements.h6.color.background': 'color',\n\t'elements.h6.typography.fontFamily': 'font-family',\n\t'elements.h6.color.gradient': 'gradient',\n\t'color.gradient': 'gradient',\n\tblockGap: 'spacing',\n\t'typography.fontSize': 'font-size',\n\t'typography.fontFamily': 'font-family',\n};\n\n// TODO: Temporary duplication of constant in @wordpress/block-editor. Can be\n// removed by moving PushChangesToGlobalStylesControl to\n// @wordpress/block-editor.\nconst STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE = {\n\t'border.color': 'borderColor',\n\t'color.background': 'backgroundColor',\n\t'color.text': 'textColor',\n\t'color.gradient': 'gradient',\n\t'typography.fontSize': 'fontSize',\n\t'typography.fontFamily': 'fontFamily',\n};\n\nconst SUPPORTED_STYLES = [ 'border', 'color', 'spacing', 'typography' ];\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\nconst flatBorderProperties = [ 'borderColor', 'borderWidth', 'borderStyle' ];\nconst sides = [ 'top', 'right', 'bottom', 'left' ];\n\nfunction getBorderStyleChanges( border, presetColor, userStyle ) {\n\tif ( ! border && ! presetColor ) {\n\t\treturn [];\n\t}\n\n\tconst changes = [\n\t\t...getFallbackBorderStyleChange( 'top', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'right', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'bottom', border, userStyle ),\n\t\t...getFallbackBorderStyleChange( 'left', border, userStyle ),\n\t];\n\n\t// Handle a flat border i.e. all sides the same, CSS shorthand.\n\tconst { color: customColor, style, width } = border || {};\n\tconst hasColorOrWidth = presetColor || customColor || width;\n\n\tif ( hasColorOrWidth && ! style ) {\n\t\t// Global Styles need individual side configurations to overcome\n\t\t// theme.json configurations which are per side as well.\n\t\tsides.forEach( ( side ) => {\n\t\t\t// Only add fallback border-style if global styles don't already\n\t\t\t// have something set.\n\t\t\tif ( ! userStyle?.[ side ]?.style ) {\n\t\t\t\tchanges.push( {\n\t\t\t\t\tpath: [ 'border', side, 'style' ],\n\t\t\t\t\tvalue: 'solid',\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n\n\treturn changes;\n}\n\nfunction getFallbackBorderStyleChange( side, border, globalBorderStyle ) {\n\tif ( ! border?.[ side ] || globalBorderStyle?.[ side ]?.style ) {\n\t\treturn [];\n\t}\n\n\tconst { color, style, width } = border[ side ];\n\tconst hasColorOrWidth = color || width;\n\n\tif ( ! hasColorOrWidth || style ) {\n\t\treturn [];\n\t}\n\n\treturn [ { path: [ 'border', side, 'style' ], value: 'solid' } ];\n}\n\nfunction useChangesToPush( name, attributes, userConfig ) {\n\tconst supports = useSupportedStyles( name );\n\tconst blockUserConfig = userConfig?.styles?.blocks?.[ name ];\n\n\treturn useMemo( () => {\n\t\tconst changes = supports.flatMap( ( key ) => {\n\t\t\tif ( ! STYLE_PROPERTY[ key ] ) {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t\tconst { value: path } = STYLE_PROPERTY[ key ];\n\t\t\tconst presetAttributeKey = path.join( '.' );\n\t\t\tconst presetAttributeValue =\n\t\t\t\tattributes[\n\t\t\t\t\tSTYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE[ presetAttributeKey ]\n\t\t\t\t];\n\t\t\tconst value = presetAttributeValue\n\t\t\t\t? `var:preset|${ STYLE_PATH_TO_CSS_VAR_INFIX[ presetAttributeKey ] }|${ presetAttributeValue }`\n\t\t\t\t: getValueFromObjectPath( attributes.style, path );\n\n\t\t\t// Links only have a single support entry but have two element\n\t\t\t// style properties, color and hover color. The following check\n\t\t\t// will add the hover color to the changes if required.\n\t\t\tif ( key === 'linkColor' ) {\n\t\t\t\tconst linkChanges = value ? [ { path, value } ] : [];\n\t\t\t\tconst hoverPath = [\n\t\t\t\t\t'elements',\n\t\t\t\t\t'link',\n\t\t\t\t\t':hover',\n\t\t\t\t\t'color',\n\t\t\t\t\t'text',\n\t\t\t\t];\n\t\t\t\tconst hoverValue = getValueFromObjectPath(\n\t\t\t\t\tattributes.style,\n\t\t\t\t\thoverPath\n\t\t\t\t);\n\n\t\t\t\tif ( hoverValue ) {\n\t\t\t\t\tlinkChanges.push( { path: hoverPath, value: hoverValue } );\n\t\t\t\t}\n\n\t\t\t\treturn linkChanges;\n\t\t\t}\n\n\t\t\t// The shorthand border styles can't be mapped directly as global\n\t\t\t// styles requires longhand config.\n\t\t\tif ( flatBorderProperties.includes( key ) && value ) {\n\t\t\t\t// The shorthand config path is included to clear the block attribute.\n\t\t\t\tconst borderChanges = [ { path, value } ];\n\t\t\t\tsides.forEach( ( side ) => {\n\t\t\t\t\tconst currentPath = [ ...path ];\n\t\t\t\t\tcurrentPath.splice( -1, 0, side );\n\t\t\t\t\tborderChanges.push( { path: currentPath, value } );\n\t\t\t\t} );\n\t\t\t\treturn borderChanges;\n\t\t\t}\n\n\t\t\treturn value ? [ { path, value } ] : [];\n\t\t} );\n\n\t\t// To ensure display of a visible border, global styles require a\n\t\t// default border style if a border color or width is present.\n\t\tgetBorderStyleChanges(\n\t\t\tattributes.style?.border,\n\t\t\tattributes.borderColor,\n\t\t\tblockUserConfig?.border\n\t\t).forEach( ( change ) => changes.push( change ) );\n\n\t\treturn changes;\n\t}, [ supports, attributes, blockUserConfig ] );\n}\n\nfunction PushChangesToGlobalStylesControl( {\n\tname,\n\tattributes,\n\tsetAttributes,\n} ) {\n\tconst { user: userConfig, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\n\tconst changes = useChangesToPush( name, attributes, userConfig );\n\n\tconst { __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\n\tconst pushChanges = useCallback( () => {\n\t\tif ( changes.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( changes.length > 0 ) {\n\t\t\tconst { style: blockStyles } = attributes;\n\n\t\t\tconst newBlockStyles = cloneDeep( blockStyles );\n\t\t\tconst newUserConfig = cloneDeep( userConfig );\n\n\t\t\tfor ( const { path, value } of changes ) {\n\t\t\t\tsetNestedValue( newBlockStyles, path, undefined );\n\t\t\t\tsetNestedValue(\n\t\t\t\t\tnewUserConfig,\n\t\t\t\t\t[ 'styles', 'blocks', name, ...path ],\n\t\t\t\t\tvalue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst newBlockAttributes = {\n\t\t\t\tborderColor: undefined,\n\t\t\t\tbackgroundColor: undefined,\n\t\t\t\ttextColor: undefined,\n\t\t\t\tgradient: undefined,\n\t\t\t\tfontSize: undefined,\n\t\t\t\tfontFamily: undefined,\n\t\t\t\tstyle: cleanEmptyObject( newBlockStyles ),\n\t\t\t};\n\n\t\t\t// @wordpress/core-data doesn't support editing multiple entity types in\n\t\t\t// a single undo level. So for now, we disable @wordpress/core-data undo\n\t\t\t// tracking and implement our own Undo button in the snackbar\n\t\t\t// notification.\n\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\tsetAttributes( newBlockAttributes );\n\t\t\tsetUserConfig( newUserConfig, { undoIgnore: true } );\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t\t__( '%s styles applied.' ),\n\t\t\t\t\tgetBlockType( name ).title\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\tactions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel: __( 'Undo' ),\n\t\t\t\t\t\t\tonClick() {\n\t\t\t\t\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\t\t\t\t\tsetAttributes( attributes );\n\t\t\t\t\t\t\t\tsetUserConfig( userConfig, {\n\t\t\t\t\t\t\t\t\tundoIgnore: true,\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}, [\n\t\t__unstableMarkNextChangeAsNotPersistent,\n\t\tattributes,\n\t\tchanges,\n\t\tcreateSuccessNotice,\n\t\tname,\n\t\tsetAttributes,\n\t\tsetUserConfig,\n\t\tuserConfig,\n\t] );\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName=\"edit-site-push-changes-to-global-styles-control\"\n\t\t\thelp={ sprintf(\n\t\t\t\t// translators: %s: Title of the block e.g. 'Heading'.\n\t\t\t\t__(\n\t\t\t\t\t'Apply this block’s typography, spacing, dimensions, and color styles to all %s blocks.'\n\t\t\t\t),\n\t\t\t\tgetBlockType( name ).title\n\t\t\t) }\n\t\t>\n\t\t\t<BaseControl.VisualLabel>\n\t\t\t\t{ __( 'Styles' ) }\n\t\t\t</BaseControl.VisualLabel>\n\t\t\t<Button\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tvariant=\"secondary\"\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tdisabled={ changes.length === 0 }\n\t\t\t\tonClick={ pushChanges }\n\t\t\t>\n\t\t\t\t{ __( 'Apply globally' ) }\n\t\t\t</Button>\n\t\t</BaseControl>\n\t);\n}\n\nfunction PushChangesToGlobalStyles( props ) {\n\tconst blockEditingMode = useBlockEditingMode();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\tconst supportsStyles = SUPPORTED_STYLES.some( ( feature ) =>\n\t\thasBlockSupport( props.name, feature )\n\t);\n\tconst isDisplayed =\n\t\tblockEditingMode === 'default' && supportsStyles && isBlockBasedTheme;\n\n\tif ( ! isDisplayed ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<InspectorAdvancedControls>\n\t\t\t<PushChangesToGlobalStylesControl { ...props } />\n\t\t</InspectorAdvancedControls>\n\t);\n}\n\nconst withPushChangesToGlobalStyles = createHigherOrderComponent(\n\t( BlockEdit ) => ( props ) => (\n\t\t<>\n\t\t\t<BlockEdit key=\"edit\" { ...props } />\n\t\t\t{ props.isSelected && <PushChangesToGlobalStyles { ...props } /> }\n\t\t</>\n\t)\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'core/edit-site/push-changes-to-global-styles',\n\twithPushChangesToGlobalStyles\n);\n","/**\n * WordPress dependencies\n */\nimport { combineReducers } from '@wordpress/data';\n\n/**\n * Reducer returning the settings.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function settings( state = {}, 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 keeping track of the currently edited Post Type,\n * Post Id and the context provided to fill the content of the block editor.\n *\n * @param {Object} state Current edited post.\n * @param {Object} action Dispatched action.\n *\n * @return {Object} Updated state.\n */\nexport function editedPost( state = {}, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITED_POST':\n\t\t\treturn {\n\t\t\t\tpostType: action.postType,\n\t\t\t\tid: action.id,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t\tcase 'SET_EDITED_POST_CONTEXT':\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tcontext: action.context,\n\t\t\t};\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer to set the save view panel open or closed.\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nexport function saveViewPanel( state = false, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_IS_SAVE_VIEW_OPENED':\n\t\t\treturn action.isOpen;\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn false;\n\t}\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas mode (edit or view).\n *\n * @param {Object} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction canvasMode( state = 'init', action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_CANVAS_MODE':\n\t\t\treturn action.mode;\n\t}\n\n\treturn state;\n}\n\n/**\n * Reducer used to track the site editor canvas container view.\n * Default is `undefined`, denoting the default, visual block editor.\n * This could be, for example, `'style-book'` (the style book).\n *\n * @param {string|undefined} state Current state.\n * @param {Object} action Dispatched action.\n */\nfunction editorCanvasContainerView( state = undefined, action ) {\n\tswitch ( action.type ) {\n\t\tcase 'SET_EDITOR_CANVAS_CONTAINER_VIEW':\n\t\t\treturn action.view;\n\t}\n\n\treturn state;\n}\n\nexport default combineReducers( {\n\tsettings,\n\teditedPost,\n\tsaveViewPanel,\n\tcanvasMode,\n\teditorCanvasContainerView,\n} );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"patterns\"];","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternPrivateApis } from '@wordpress/patterns';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\n\n// Navigation\nexport const NAVIGATION_POST_TYPE = 'wp_navigation';\n\n// Templates.\nexport const TEMPLATE_POST_TYPE = 'wp_template';\nexport const TEMPLATE_PART_POST_TYPE = 'wp_template_part';\nexport const TEMPLATE_ORIGINS = {\n\tcustom: 'custom',\n\ttheme: 'theme',\n\tplugin: 'plugin',\n};\nexport const TEMPLATE_PART_AREA_DEFAULT_CATEGORY = 'uncategorized';\nexport const TEMPLATE_PART_ALL_AREAS_CATEGORY = 'all-parts';\n\n// Patterns.\nexport const {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tEXCLUDED_PATTERN_SOURCES,\n\tPATTERN_SYNC_TYPES,\n} = unlock( patternPrivateApis );\n\n// Entities that are editable in focus mode.\nexport const FOCUSABLE_ENTITIES = [\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\nexport const POST_TYPE_LABELS = {\n\t[ TEMPLATE_POST_TYPE ]: __( 'Template' ),\n\t[ TEMPLATE_PART_POST_TYPE ]: __( 'Template part' ),\n\t[ PATTERN_TYPES.user ]: __( 'Pattern' ),\n\t[ NAVIGATION_POST_TYPE ]: __( 'Navigation' ),\n};\n\n// DataViews constants\nexport const LAYOUT_GRID = 'grid';\nexport const LAYOUT_TABLE = 'table';\nexport const LAYOUT_LIST = 'list';\n\nexport const OPERATOR_IS = 'is';\nexport const OPERATOR_IS_NOT = 'isNot';\nexport const OPERATOR_IS_ANY = 'isAny';\nexport const OPERATOR_IS_NONE = 'isNone';\n","/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport deprecated from '@wordpress/deprecated';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n} from '../utils/constants';\nimport { unlock } from '../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\n/**\n * Dispatches an action that toggles a feature flag.\n *\n * @param {string} featureName Feature name.\n */\nexport function toggleFeature( featureName ) {\n\treturn function ( { registry } ) {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).toggleFeature( featureName )\",\n\t\t\t{\n\t\t\t\tsince: '6.0',\n\t\t\t\talternative:\n\t\t\t\t\t\"dispatch( 'core/preferences').toggle( 'core/edit-site', featureName )\",\n\t\t\t}\n\t\t);\n\n\t\tregistry\n\t\t\t.dispatch( preferencesStore )\n\t\t\t.toggle( 'core/edit-site', featureName );\n\t};\n}\n\n/**\n * Action that changes the width of the editing canvas.\n *\n * @deprecated\n *\n * @param {string} deviceType\n *\n * @return {Object} Action object.\n */\nexport const __experimentalSetPreviewDeviceType =\n\t( deviceType ) =>\n\t( { registry } ) => {\n\t\tdeprecated(\n\t\t\t\"dispatch( 'core/edit-site' ).__experimentalSetPreviewDeviceType\",\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\thint: 'registry.dispatch( editorStore ).setDeviceType',\n\t\t\t}\n\t\t);\n\t\tregistry.dispatch( editorStore ).setDeviceType( deviceType );\n\t};\n\n/**\n * Action that sets a template, optionally fetching it from REST API.\n *\n * @return {Object} Action object.\n */\nexport function setTemplate() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setTemplate\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setTemplate is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Action that adds a new template and sets it as the current template.\n *\n * @param {Object} template The template.\n *\n * @deprecated\n *\n * @return {Object} Action object used to set the current template.\n */\nexport const addTemplate =\n\t( template ) =>\n\tasync ( { dispatch, registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).addTemplate\", {\n\t\t\tsince: '6.5',\n\t\t\tversion: '6.8',\n\t\t\thint: 'use saveEntityRecord directly',\n\t\t} );\n\n\t\tconst newTemplate = await registry\n\t\t\t.dispatch( coreStore )\n\t\t\t.saveEntityRecord( 'postType', TEMPLATE_POST_TYPE, template );\n\n\t\tif ( template.content ) {\n\t\t\tregistry\n\t\t\t\t.dispatch( coreStore )\n\t\t\t\t.editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\tnewTemplate.id,\n\t\t\t\t\t{ blocks: parse( template.content ) },\n\t\t\t\t\t{ undoIgnore: true }\n\t\t\t\t);\n\t\t}\n\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITED_POST',\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tid: newTemplate.id,\n\t\t} );\n\t};\n\n/**\n * Action that removes a template.\n *\n * @param {Object} template The template object.\n */\nexport const removeTemplate =\n\t( template ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).removeTemplates( [\n\t\t\ttemplate,\n\t\t] );\n\t};\n\n/**\n * Action that sets a template part.\n *\n * @param {string} templatePartId The template part ID.\n *\n * @return {Object} Action object.\n */\nexport function setTemplatePart( templatePartId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tid: templatePartId,\n\t};\n}\n\n/**\n * Action that sets a navigation menu.\n *\n * @param {string} navigationMenuId The Navigation Menu Post ID.\n *\n * @return {Object} Action object.\n */\nexport function setNavigationMenu( navigationMenuId ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType: NAVIGATION_POST_TYPE,\n\t\tid: navigationMenuId,\n\t};\n}\n\n/**\n * Action that sets an edited entity.\n *\n * @param {string} postType The entity's post type.\n * @param {string} postId The entity's ID.\n * @param {Object} context The entity's context.\n *\n * @return {Object} Action object.\n */\nexport function setEditedEntity( postType, postId, context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST',\n\t\tpostType,\n\t\tid: postId,\n\t\tcontext,\n\t};\n}\n\n/**\n * @deprecated\n */\nexport function setHomeTemplateId() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn {\n\t\ttype: 'NOTHING',\n\t};\n}\n\n/**\n * Set's the current block editor context.\n *\n * @param {Object} context The context object.\n *\n * @return {Object} Action object.\n */\nexport function setEditedPostContext( context ) {\n\treturn {\n\t\ttype: 'SET_EDITED_POST_CONTEXT',\n\t\tcontext,\n\t};\n}\n\n/**\n * Resolves the template for a page and displays both. If no path is given, attempts\n * to use the postId to generate a path like `?p=${ postId }`.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setPage() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setPage\", {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\thint: 'The setPage is not needed anymore, the correct entity is resolved from the URL automatically.',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Action that sets the active navigation panel menu.\n *\n * @deprecated\n *\n * @return {Object} Action object.\n */\nexport function setNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Opens the navigation panel and sets its active menu at the same time.\n *\n * @deprecated\n */\nexport function openNavigationPanelToMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).openNavigationPanelToMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Sets whether the navigation panel should be open.\n *\n * @deprecated\n */\nexport function setIsNavigationPanelOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).setIsNavigationPanelOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n\n\treturn { type: 'NOTHING' };\n}\n\n/**\n * Returns an action object used to open/close the inserter.\n *\n * @deprecated\n *\n * @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).\n */\nexport const setIsInserterOpened =\n\t( value ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsInserterOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsInserterOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsInserterOpened( value );\n\t};\n\n/**\n * Returns an action object used to open/close the list view.\n *\n * @deprecated\n *\n * @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.\n */\nexport const setIsListViewOpened =\n\t( isOpen ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).setIsListViewOpened\", {\n\t\t\tsince: '6.5',\n\t\t\talternative: \"dispatch( 'core/editor').setIsListViewOpened\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).setIsListViewOpened( isOpen );\n\t};\n\n/**\n * Returns an action object used to update the settings.\n *\n * @param {Object} settings New 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 * Sets whether the save view panel should be open.\n *\n * @param {boolean} isOpen If true, opens the save view. If false, closes it.\n * It does not toggle the state, but sets it directly.\n */\nexport function setIsSaveViewOpened( isOpen ) {\n\treturn {\n\t\ttype: 'SET_IS_SAVE_VIEW_OPENED',\n\t\tisOpen,\n\t};\n}\n\n/**\n * Reverts a template to its original theme-provided file.\n *\n * @param {Object} template The template to revert.\n * @param {Object} [options]\n * @param {boolean} [options.allowUndo] Whether to allow the user to undo\n * reverting the template. Default true.\n */\nexport const revertTemplate =\n\t( template, options ) =>\n\t( { registry } ) => {\n\t\treturn unlock( registry.dispatch( editorStore ) ).revertTemplate(\n\t\t\ttemplate,\n\t\t\toptions\n\t\t);\n\t};\n\n/**\n * Action that opens an editor sidebar.\n *\n * @param {?string} name Sidebar name to be opened.\n */\nexport const openGeneralSidebar =\n\t( name ) =>\n\t( { registry } ) => {\n\t\tregistry\n\t\t\t.dispatch( interfaceStore )\n\t\t\t.enableComplementaryArea( 'core', name );\n\t};\n\n/**\n * Action that closes the sidebar.\n */\nexport const closeGeneralSidebar =\n\t() =>\n\t( { registry } ) => {\n\t\tregistry.dispatch( interfaceStore ).disableComplementaryArea( 'core' );\n\t};\n\n/**\n * Triggers an action used to switch editor mode.\n *\n * @deprecated\n *\n * @param {string} mode The editor mode.\n */\nexport const switchEditorMode =\n\t( mode ) =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).switchEditorMode\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').switchEditorMode\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).switchEditorMode( mode );\n\t};\n\n/**\n * Sets whether or not the editor allows only page content to be edited.\n *\n * @param {boolean} hasPageContentFocus True to allow only page content to be\n * edited, false to allow template to be\n * edited.\n */\nexport const setHasPageContentFocus =\n\t( hasPageContentFocus ) =>\n\t( { dispatch, registry } ) => {\n\t\tdeprecated( `dispatch( 'core/edit-site' ).setHasPageContentFocus`, {\n\t\t\tsince: '6.5',\n\t\t} );\n\n\t\tif ( hasPageContentFocus ) {\n\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t}\n\t\tdispatch( {\n\t\t\ttype: 'SET_HAS_PAGE_CONTENT_FOCUS',\n\t\t\thasPageContentFocus,\n\t\t} );\n\t};\n\n/**\n * Action that toggles Distraction free mode.\n * Distraction free mode expects there are no sidebars, as due to the\n * z-index values set, you can't close sidebars.\n *\n * @deprecated\n */\nexport const toggleDistractionFree =\n\t() =>\n\t( { registry } ) => {\n\t\tdeprecated( \"dispatch( 'core/edit-site' ).toggleDistractionFree\", {\n\t\t\tsince: '6.6',\n\t\t\talternative: \"dispatch( 'core/editor').toggleDistractionFree\",\n\t\t} );\n\t\tregistry.dispatch( editorStore ).toggleDistractionFree();\n\t};\n","/**\n * WordPress dependencies\n */\nimport { store as blockEditorStore } from '@wordpress/block-editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Action that switches the canvas mode.\n *\n * @param {?string} mode Canvas mode.\n */\nexport const setCanvasMode =\n\t( mode ) =>\n\t( { registry, dispatch } ) => {\n\t\tconst isMediumOrBigger =\n\t\t\twindow.matchMedia( '(min-width: 782px)' ).matches;\n\t\tconst switchCanvasMode = () => {\n\t\t\tregistry.batch( () => {\n\t\t\t\tregistry.dispatch( blockEditorStore ).clearSelectedBlock();\n\t\t\t\tregistry.dispatch( editorStore ).setDeviceType( 'Desktop' );\n\t\t\t\tregistry\n\t\t\t\t\t.dispatch( blockEditorStore )\n\t\t\t\t\t.__unstableSetEditorMode( 'edit' );\n\t\t\t\tconst isPublishSidebarOpened = registry\n\t\t\t\t\t.select( editorStore )\n\t\t\t\t\t.isPublishSidebarOpened();\n\t\t\t\tdispatch( {\n\t\t\t\t\ttype: 'SET_CANVAS_MODE',\n\t\t\t\t\tmode,\n\t\t\t\t} );\n\t\t\t\tconst isEditMode = mode === 'edit';\n\t\t\t\tif ( isPublishSidebarOpened && ! isEditMode ) {\n\t\t\t\t\tregistry.dispatch( editorStore ).closePublishSidebar();\n\t\t\t\t}\n\n\t\t\t\t// Check if the block list view should be open by default.\n\t\t\t\t// If `distractionFree` mode is enabled, the block list view should not be open.\n\t\t\t\t// This behavior is disabled for small viewports.\n\t\t\t\tif (\n\t\t\t\t\tisMediumOrBigger &&\n\t\t\t\t\tisEditMode &&\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.select( preferencesStore )\n\t\t\t\t\t\t.get( 'core', 'showListViewByDefault' ) &&\n\t\t\t\t\t! registry\n\t\t\t\t\t\t.select( preferencesStore )\n\t\t\t\t\t\t.get( 'core', 'distractionFree' )\n\t\t\t\t) {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( editorStore )\n\t\t\t\t\t\t.setIsListViewOpened( true );\n\t\t\t\t} else {\n\t\t\t\t\tregistry\n\t\t\t\t\t\t.dispatch( editorStore )\n\t\t\t\t\t\t.setIsListViewOpened( false );\n\t\t\t\t}\n\t\t\t\tregistry.dispatch( editorStore ).setIsInserterOpened( false );\n\t\t\t} );\n\t\t};\n\n\t\t/*\n\t\t * Skip transition in mobile, otherwise it crashes the browser.\n\t\t * See: https://github.com/WordPress/gutenberg/pull/63002.\n\t\t */\n\t\tif ( ! isMediumOrBigger || ! document.startViewTransition ) {\n\t\t\tswitchCanvasMode();\n\t\t} else {\n\t\t\tdocument.documentElement.classList.add(\n\t\t\t\t`canvas-mode-${ mode }-transition`\n\t\t\t);\n\t\t\tconst transition = document.startViewTransition( () =>\n\t\t\t\tswitchCanvasMode()\n\t\t\t);\n\t\t\ttransition.finished.finally( () => {\n\t\t\t\tdocument.documentElement.classList.remove(\n\t\t\t\t\t`canvas-mode-${ mode }-transition`\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t};\n\n/**\n * Action that switches the editor canvas container view.\n *\n * @param {?string} view Editor canvas container view.\n */\nexport const setEditorCanvasContainerView =\n\t( view ) =>\n\t( { dispatch } ) => {\n\t\tdispatch( {\n\t\t\ttype: 'SET_EDITOR_CANVAS_CONTAINER_VIEW',\n\t\t\tview,\n\t\t} );\n\t};\n","/**\n * WordPress dependencies\n */\nimport { isTemplatePart } from '@wordpress/blocks';\n\nconst EMPTY_ARRAY = [];\n\n/**\n * Get a flattened and filtered list of template parts and the matching block for that template part.\n *\n * Takes a list of blocks defined within a template, and a list of template parts, and returns a\n * flattened list of template parts and the matching block for that template part.\n *\n * @param {Array} blocks Blocks to flatten.\n * @param {?Array} templateParts Available template parts.\n * @return {Array} An array of template parts and their blocks.\n */\nexport default function getFilteredTemplatePartBlocks(\n\tblocks = EMPTY_ARRAY,\n\ttemplateParts\n) {\n\tconst templatePartsById = templateParts\n\t\t? // Key template parts by their ID.\n\t\t templateParts.reduce(\n\t\t\t\t( newTemplateParts, part ) => ( {\n\t\t\t\t\t...newTemplateParts,\n\t\t\t\t\t[ part.id ]: part,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t )\n\t\t: {};\n\n\tconst result = [];\n\n\t// Iterate over all blocks, recursing into inner blocks.\n\t// Output will be based on a depth-first traversal.\n\tconst stack = [ ...blocks ];\n\twhile ( stack.length ) {\n\t\tconst { innerBlocks, ...block } = stack.shift();\n\t\t// Place inner blocks at the beginning of the stack to preserve order.\n\t\tstack.unshift( ...innerBlocks );\n\n\t\tif ( isTemplatePart( block ) ) {\n\t\t\tconst {\n\t\t\t\tattributes: { theme, slug },\n\t\t\t} = block;\n\t\t\tconst templatePartId = `${ theme }//${ slug }`;\n\t\t\tconst templatePart = templatePartsById[ templatePartId ];\n\n\t\t\t// Only add to output if the found template part block is in the list of available template parts.\n\t\t\tif ( templatePart ) {\n\t\t\t\tresult.push( {\n\t\t\t\t\ttemplatePart,\n\t\t\t\t\tblock,\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { createRegistrySelector, createSelector } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { Platform } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport { TEMPLATE_PART_POST_TYPE } from '../utils/constants';\nimport getFilteredTemplatePartBlocks from '../utils/get-filtered-template-parts';\n\n/**\n * @typedef {'template'|'template_type'} TemplateType Template type.\n */\n\n/**\n * Returns whether the given feature is enabled or not.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @param {string} featureName Feature slug.\n *\n * @return {boolean} Is active.\n */\nexport const isFeatureActive = createRegistrySelector(\n\t( select ) => ( _, featureName ) => {\n\t\tdeprecated( `select( 'core/edit-site' ).isFeatureActive`, {\n\t\t\tsince: '6.0',\n\t\t\talternative: `select( 'core/preferences' ).get`,\n\t\t} );\n\n\t\treturn !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\tfeatureName\n\t\t);\n\t}\n);\n\n/**\n * Returns the current editing canvas device type.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Device type.\n */\nexport const __experimentalGetPreviewDeviceType = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t\talternative: `select( 'core/editor' ).getDeviceType`,\n\t\t\t}\n\t\t);\n\t\treturn select( editorStore ).getDeviceType();\n\t}\n);\n\n/**\n * Returns whether the current user can create media or not.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Whether the current user can create media or not.\n */\nexport const getCanUserCreateMedia = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`wp.data.select( 'core/edit-site' ).getCanUserCreateMedia()`,\n\t\t\t{\n\t\t\t\tsince: '6.7',\n\t\t\t\talternative: `wp.data.select( 'core' ).canUser( 'create', { kind: 'root', type: 'media' } )`,\n\t\t\t}\n\t\t);\n\n\t\treturn select( coreDataStore ).canUser( 'create', 'media' );\n\t}\n);\n\n/**\n * Returns any available Reusable blocks.\n *\n * @param {Object} state Global application state.\n *\n * @return {Array} The available reusable blocks.\n */\nexport const getReusableBlocks = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).getReusableBlocks()`, {\n\t\tsince: '6.5',\n\t\tversion: '6.8',\n\t\talternative: `select( 'core/core' ).getEntityRecords( 'postType', 'wp_block' )`,\n\t} );\n\tconst isWeb = Platform.OS === 'web';\n\treturn isWeb\n\t\t? select( coreDataStore ).getEntityRecords( 'postType', 'wp_block', {\n\t\t\t\tper_page: -1,\n\t\t } )\n\t\t: [];\n} );\n\n/**\n * Returns the site editor settings.\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} Settings.\n */\nexport function getSettings( state ) {\n\t// It is important that we don't inject anything into these settings locally.\n\t// The reason for this is that we have an effect in place that calls setSettings based on the previous value of getSettings.\n\t// If we add computed settings here, we'll be adding these computed settings to the state which is very unexpected.\n\treturn state.settings;\n}\n\n/**\n * @deprecated\n */\nexport function getHomeTemplateId() {\n\tdeprecated( \"select( 'core/edit-site' ).getHomeTemplateId\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Returns the current edited post type (wp_template or wp_template_part).\n *\n * @param {Object} state Global application state.\n *\n * @return {?TemplateType} Template type.\n */\nexport function getEditedPostType( state ) {\n\treturn state.editedPost.postType;\n}\n\n/**\n * Returns the ID of the currently edited template or template part.\n *\n * @param {Object} state Global application state.\n *\n * @return {?string} Post ID.\n */\nexport function getEditedPostId( state ) {\n\treturn state.editedPost.id;\n}\n\n/**\n * Returns the edited post's context object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getEditedPostContext( state ) {\n\treturn state.editedPost.context;\n}\n\n/**\n * Returns the current page object.\n *\n * @deprecated\n * @param {Object} state Global application state.\n *\n * @return {Object} Page.\n */\nexport function getPage( state ) {\n\treturn { context: state.editedPost.context };\n}\n\n/**\n * Returns true if the inserter is opened.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the inserter is opened.\n */\nexport const isInserterOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isInserterOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isInserterOpened`,\n\t} );\n\treturn select( editorStore ).isInserterOpened();\n} );\n\n/**\n * Get the insertion point for the inserter.\n *\n * @deprecated\n *\n * @param {Object} state Global application state.\n *\n * @return {Object} The root client ID, index to insert at and starting filter value.\n */\nexport const __experimentalGetInsertionPoint = createRegistrySelector(\n\t( select ) => () => {\n\t\tdeprecated(\n\t\t\t`select( 'core/edit-site' ).__experimentalGetInsertionPoint`,\n\t\t\t{\n\t\t\t\tsince: '6.5',\n\t\t\t\tversion: '6.7',\n\t\t\t}\n\t\t);\n\t\treturn unlock( select( editorStore ) ).getInsertionPoint();\n\t}\n);\n\n/**\n * Returns true if the list view is opened.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether the list view is opened.\n */\nexport const isListViewOpened = createRegistrySelector( ( select ) => () => {\n\tdeprecated( `select( 'core/edit-site' ).isListViewOpened`, {\n\t\tsince: '6.5',\n\t\talternative: `select( 'core/editor' ).isListViewOpened`,\n\t} );\n\treturn select( editorStore ).isListViewOpened();\n} );\n\n/**\n * Returns the current opened/closed state of the save panel.\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} True if the save panel should be open; false if closed.\n */\nexport function isSaveViewOpened( state ) {\n\treturn state.saveViewPanel;\n}\n\nfunction getBlocksAndTemplateParts( select ) {\n\tconst templateParts = select( coreDataStore ).getEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\tconst { getBlocksByName, getBlocksByClientId } = select( blockEditorStore );\n\n\tconst clientIds = getBlocksByName( 'core/template-part' );\n\tconst blocks = getBlocksByClientId( clientIds );\n\treturn [ blocks, templateParts ];\n}\n\n/**\n * Returns the template parts and their blocks for the current edited template.\n *\n * @deprecated\n * @param {Object} state Global application state.\n * @return {Array} Template parts and their blocks in an array.\n */\nexport const getCurrentTemplateTemplateParts = createRegistrySelector(\n\t( select ) =>\n\t\tcreateSelector(\n\t\t\t() => {\n\t\t\t\tdeprecated(\n\t\t\t\t\t`select( 'core/edit-site' ).getCurrentTemplateTemplateParts()`,\n\t\t\t\t\t{\n\t\t\t\t\t\tsince: '6.7',\n\t\t\t\t\t\tversion: '6.9',\n\t\t\t\t\t\talternative: `select( 'core/block-editor' ).getBlocksByName( 'core/template-part' )`,\n\t\t\t\t\t}\n\t\t\t\t);\n\n\t\t\t\treturn getFilteredTemplatePartBlocks(\n\t\t\t\t\t...getBlocksAndTemplateParts( select )\n\t\t\t\t);\n\t\t\t},\n\t\t\t() => getBlocksAndTemplateParts( select )\n\t\t)\n);\n\n/**\n * Returns the current editing mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editing mode.\n */\nexport const getEditorMode = createRegistrySelector( ( select ) => () => {\n\treturn select( preferencesStore ).get( 'core', 'editorMode' );\n} );\n\n/**\n * @deprecated\n */\nexport function getCurrentTemplateNavigationPanelSubMenu() {\n\tdeprecated(\n\t\t\"dispatch( 'core/edit-site' ).getCurrentTemplateNavigationPanelSubMenu\",\n\t\t{\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.4',\n\t\t}\n\t);\n}\n\n/**\n * @deprecated\n */\nexport function getNavigationPanelActiveMenu() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).getNavigationPanelActiveMenu\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * @deprecated\n */\nexport function isNavigationOpened() {\n\tdeprecated( \"dispatch( 'core/edit-site' ).isNavigationOpened\", {\n\t\tsince: '6.2',\n\t\tversion: '6.4',\n\t} );\n}\n\n/**\n * Whether or not the editor has a page loaded into it.\n *\n * @see setPage\n *\n * @param {Object} state Global application state.\n *\n * @return {boolean} Whether or not the editor has a page loaded into it.\n */\nexport function isPage( state ) {\n\treturn !! state.editedPost.context?.postId;\n}\n\n/**\n * Whether or not the editor allows only page content to be edited.\n *\n * @deprecated\n *\n * @return {boolean} Whether or not focus is on editing page content.\n */\nexport function hasPageContentFocus() {\n\tdeprecated( `select( 'core/edit-site' ).hasPageContentFocus`, {\n\t\tsince: '6.5',\n\t} );\n\n\treturn false;\n}\n","/**\n * Returns the current canvas mode.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Canvas mode.\n */\nexport function getCanvasMode( state ) {\n\treturn state.canvasMode;\n}\n\n/**\n * Returns the editor canvas container view.\n *\n * @param {Object} state Global application state.\n *\n * @return {string} Editor canvas container view.\n */\nexport function getEditorCanvasContainerView( state ) {\n\treturn state.editorCanvasContainerView;\n}\n","/**\n * The identifier for the data store.\n *\n * @type {string}\n */\nexport const STORE_NAME = 'core/edit-site';\n","/**\n * WordPress dependencies\n */\nimport { createReduxStore, register } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as privateActions from './private-actions';\nimport * as selectors from './selectors';\nimport * as privateSelectors from './private-selectors';\nimport { STORE_NAME } from './constants';\nimport { unlock } from '../lock-unlock';\n\nexport const storeConfig = {\n\treducer,\n\tactions,\n\tselectors,\n};\n\nexport const store = createReduxStore( STORE_NAME, storeConfig );\nregister( store );\nunlock( store ).registerPrivateSelectors( privateSelectors );\nunlock( store ).registerPrivateActions( privateActions );\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"plugins\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"router\"];","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keyboardShortcuts\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"commands\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"coreCommands\"];","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { Warning } from '@wordpress/block-editor';\nimport { useCopyToClipboard } from '@wordpress/compose';\n\nfunction CopyButton( { text, children } ) {\n\tconst ref = useCopyToClipboard( text );\n\treturn (\n\t\t<Button variant=\"secondary\" ref={ ref }>\n\t\t\t{ children }\n\t\t</Button>\n\t);\n}\n\nexport default function ErrorBoundaryWarning( { message, error } ) {\n\tconst actions = [\n\t\t<CopyButton key=\"copy-error\" text={ error.stack }>\n\t\t\t{ __( 'Copy Error' ) }\n\t\t</CopyButton>,\n\t];\n\n\treturn (\n\t\t<Warning className=\"editor-error-boundary\" actions={ actions }>\n\t\t\t{ message }\n\t\t</Warning>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { doAction } from '@wordpress/hooks';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundaryWarning from './warning';\n\nexport default class ErrorBoundary extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\terror: null,\n\t\t};\n\t}\n\n\tcomponentDidCatch( error ) {\n\t\tdoAction( 'editor.ErrorBoundary.errorLogged', error );\n\t}\n\n\tstatic getDerivedStateFromError( error ) {\n\t\treturn { error };\n\t}\n\n\trender() {\n\t\tif ( ! this.state.error ) {\n\t\t\treturn this.props.children;\n\t\t}\n\n\t\treturn (\n\t\t\t<ErrorBoundaryWarning\n\t\t\t\tmessage={ __(\n\t\t\t\t\t'The editor has encountered an unexpected error.'\n\t\t\t\t) }\n\t\t\t\terror={ this.state.error }\n\t\t\t/>\n\t\t);\n\t}\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"htmlEntities\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"primitives\"];","/**\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 5c-3.3 0-6 2.7-6 6 0 1.4.5 2.7 1.3 3.7l-3.8 3.8 1.1 1.1 3.8-3.8c1 .8 2.3 1.3 3.7 1.3 3.3 0 6-2.7 6-6S16.3 5 13 5zm0 10.5c-2.5 0-4.5-2-4.5-4.5s2-4.5 4.5-4.5 4.5 2 4.5 4.5-2 4.5-4.5 4.5z\" />\n\t</SVG>\n);\n\nexport default search;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"keycodes\"];","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"url\"];","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst wordpress = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-2 -2 24 24\">\n\t\t<Path d=\"M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z\" />\n\t</SVG>\n);\n\nexport default wordpress;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { Icon } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { wordpress } from '@wordpress/icons';\nimport { store as coreDataStore } from '@wordpress/core-data';\n\nfunction SiteIcon( { className } ) {\n\tconst { isRequestingSite, siteIconUrl } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreDataStore );\n\t\tconst siteData = getEntityRecord( 'root', '__unstableBase', undefined );\n\n\t\treturn {\n\t\t\tisRequestingSite: ! siteData,\n\t\t\tsiteIconUrl: siteData?.site_icon_url,\n\t\t};\n\t}, [] );\n\n\tif ( isRequestingSite && ! siteIconUrl ) {\n\t\treturn <div className=\"edit-site-site-icon__image\" />;\n\t}\n\n\tconst icon = siteIconUrl ? (\n\t\t<img\n\t\t\tclassName=\"edit-site-site-icon__image\"\n\t\t\talt={ __( 'Site Icon' ) }\n\t\t\tsrc={ siteIconUrl }\n\t\t/>\n\t) : (\n\t\t<Icon\n\t\t\tclassName=\"edit-site-site-icon__icon\"\n\t\t\ticon={ wordpress }\n\t\t\tsize={ 48 }\n\t\t/>\n\t);\n\n\treturn (\n\t\t<div className={ clsx( className, 'edit-site-site-icon' ) }>\n\t\t\t{ icon }\n\t\t</div>\n\t);\n}\n\nexport default SiteIcon;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"dom\"];","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreateContext,\n\tuseContext,\n\tuseState,\n\tuseRef,\n\tuseLayoutEffect,\n} from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nexport const SidebarNavigationContext = createContext( () => {} );\n// Focus a sidebar element after a navigation. The element to focus is either\n// specified by `focusSelector` (when navigating back) or it is the first\n// tabbable element (usually the \"Back\" button).\nfunction focusSidebarElement( el, direction, focusSelector ) {\n\tlet elementToFocus;\n\tif ( direction === 'back' && focusSelector ) {\n\t\telementToFocus = el.querySelector( focusSelector );\n\t}\n\tif ( direction !== null && ! elementToFocus ) {\n\t\tconst [ firstTabbable ] = focus.tabbable.find( el );\n\t\telementToFocus = firstTabbable ?? el;\n\t}\n\telementToFocus?.focus();\n}\n\n// Navigation state that is updated when navigating back or forward. Helps us\n// manage the animations and also focus.\nfunction createNavState() {\n\tlet state = {\n\t\tdirection: null,\n\t\tfocusSelector: null,\n\t};\n\n\treturn {\n\t\tget() {\n\t\t\treturn state;\n\t\t},\n\t\tnavigate( direction, focusSelector = null ) {\n\t\t\tstate = {\n\t\t\t\tdirection,\n\t\t\t\tfocusSelector:\n\t\t\t\t\tdirection === 'forward' && focusSelector\n\t\t\t\t\t\t? focusSelector\n\t\t\t\t\t\t: state.focusSelector,\n\t\t\t};\n\t\t},\n\t};\n}\n\nfunction SidebarContentWrapper( { children } ) {\n\tconst navState = useContext( SidebarNavigationContext );\n\tconst wrapperRef = useRef();\n\tconst [ navAnimation, setNavAnimation ] = useState( null );\n\n\tuseLayoutEffect( () => {\n\t\tconst { direction, focusSelector } = navState.get();\n\t\tfocusSidebarElement( wrapperRef.current, direction, focusSelector );\n\t\tsetNavAnimation( direction );\n\t}, [ navState ] );\n\n\tconst wrapperCls = clsx( 'edit-site-sidebar__screen-wrapper', {\n\t\t'slide-from-left': navAnimation === 'back',\n\t\t'slide-from-right': navAnimation === 'forward',\n\t} );\n\n\treturn (\n\t\t<div ref={ wrapperRef } className={ wrapperCls }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default function SidebarContent( { routeKey, children } ) {\n\tconst [ navState ] = useState( createNavState );\n\n\treturn (\n\t\t<SidebarNavigationContext.Provider value={ navState }>\n\t\t\t<div className=\"edit-site-sidebar__content\">\n\t\t\t\t<SidebarContentWrapper key={ routeKey }>\n\t\t\t\t\t{ children }\n\t\t\t\t</SidebarContentWrapper>\n\t\t\t</div>\n\t\t</SidebarNavigationContext.Provider>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { memo, forwardRef, useContext } from '@wordpress/element';\nimport { search } from '@wordpress/icons';\nimport { store as commandsStore } from '@wordpress/commands';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { filterURLForDisplay } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport SiteIcon from '../site-icon';\nimport { unlock } from '../../lock-unlock';\nconst { useHistory } = unlock( routerPrivateApis );\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst SiteHub = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst { dashboardLink, homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\t\tconst {\n\t\t\t\tgetSite,\n\t\t\t\tgetUnstableBase, // Site index.\n\t\t\t} = select( coreStore );\n\t\t\tconst _site = getSite();\n\t\t\treturn {\n\t\t\t\tdashboardLink:\n\t\t\t\t\tgetSettings().__experimentalDashboardLink || 'index.php',\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\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<Button\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\thref={ dashboardLink }\n\t\t\t\t\t\t\tlabel={ __( 'Go to the Dashboard' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n\nexport default SiteHub;\n\nexport const SiteHubMobile = memo(\n\tforwardRef( ( { isTransparent }, ref ) => {\n\t\tconst history = useHistory();\n\t\tconst { navigate } = useContext( SidebarNavigationContext );\n\n\t\tconst { homeUrl, siteTitle } = useSelect( ( select ) => {\n\t\t\tconst {\n\t\t\t\tgetSite,\n\t\t\t\tgetUnstableBase, // Site index.\n\t\t\t} = select( coreStore );\n\t\t\tconst _site = getSite();\n\t\t\treturn {\n\t\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t\t\tsiteTitle:\n\t\t\t\t\t! _site?.title && !! _site?.url\n\t\t\t\t\t\t? filterURLForDisplay( _site?.url )\n\t\t\t\t\t\t: _site?.title,\n\t\t\t};\n\t\t}, [] );\n\t\tconst { open: openCommandCenter } = useDispatch( commandsStore );\n\n\t\treturn (\n\t\t\t<div className=\"edit-site-site-hub\">\n\t\t\t\t<HStack justify=\"flex-start\" spacing=\"0\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-site-hub__view-mode-toggle-container',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'has-transparent-background': isTransparent,\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<Button\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\tlabel={ __( 'Go to Site Editor' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\ttransform: 'scale(0.5)',\n\t\t\t\t\t\t\t\tborderRadius: 4,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thistory.push( {} );\n\t\t\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<HStack>\n\t\t\t\t\t\t<div className=\"edit-site-site-hub__title\">\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\t\t\thref={ homeUrl }\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\tlabel={ __( 'View site (opens in a new tab)' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ decodeEntities( siteTitle ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\tclassName=\"edit-site-site-hub__actions\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-site-hub_toggle-command-center\"\n\t\t\t\t\t\t\t\ticon={ search }\n\t\t\t\t\t\t\t\tonClick={ () => openCommandCenter() }\n\t\t\t\t\t\t\t\tlabel={ __( 'Open command palette' ) }\n\t\t\t\t\t\t\t\tshortcut={ displayShortcut.primary( 'k' ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t</div>\n\t\t);\n\t} )\n);\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tResizableBox,\n\tTooltip,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\nimport { useInstanceId, useReducedMotion } from '@wordpress/compose';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDE = {\n\tposition: undefined,\n\tuserSelect: undefined,\n\tcursor: undefined,\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\n\n// The minimum width of the frame (in px) while resizing.\nconst FRAME_MIN_WIDTH = 320;\n// The reference width of the frame (in px) used to calculate the aspect ratio.\nconst FRAME_REFERENCE_WIDTH = 1300;\n// 9 : 19.5 is the target aspect ratio enforced (when possible) while resizing.\nconst FRAME_TARGET_ASPECT_RATIO = 9 / 19.5;\n// The minimum distance (in px) between the frame resize handle and the\n// viewport's edge. If the frame is resized to be closer to the viewport's edge\n// than this distance, then \"canvas mode\" will be enabled.\nconst SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD = 200;\n// Default size for the `frameSize` state.\nconst INITIAL_FRAME_SIZE = { width: '100%', height: '100%' };\n\nfunction calculateNewHeight( width, initialAspectRatio ) {\n\tconst lerp = ( a, b, amount ) => {\n\t\treturn a + ( b - a ) * amount;\n\t};\n\n\t// Calculate the intermediate aspect ratio based on the current width.\n\tconst lerpFactor =\n\t\t1 -\n\t\tMath.max(\n\t\t\t0,\n\t\t\tMath.min(\n\t\t\t\t1,\n\t\t\t\t( width - FRAME_MIN_WIDTH ) /\n\t\t\t\t\t( FRAME_REFERENCE_WIDTH - FRAME_MIN_WIDTH )\n\t\t\t)\n\t\t);\n\n\t// Calculate the height based on the intermediate aspect ratio\n\t// ensuring the frame arrives at the target aspect ratio.\n\tconst intermediateAspectRatio = lerp(\n\t\tinitialAspectRatio,\n\t\tFRAME_TARGET_ASPECT_RATIO,\n\t\tlerpFactor\n\t);\n\n\treturn width / intermediateAspectRatio;\n}\n\nfunction ResizableFrame( {\n\tisFullWidth,\n\tisOversized,\n\tsetIsOversized,\n\tisReady,\n\tchildren,\n\t/** The default (unresized) width/height of the frame, based on the space availalbe in the viewport. */\n\tdefaultSize,\n\tinnerContentStyle,\n} ) {\n\tconst disableMotion = useReducedMotion();\n\tconst [ frameSize, setFrameSize ] = useState( INITIAL_FRAME_SIZE );\n\t// The width of the resizable frame when a new resize gesture starts.\n\tconst [ startingWidth, setStartingWidth ] = useState();\n\tconst [ isResizing, setIsResizing ] = useState( false );\n\tconst [ shouldShowHandle, setShouldShowHandle ] = useState( false );\n\tconst [ resizeRatio, setResizeRatio ] = useState( 1 );\n\tconst canvasMode = useSelect(\n\t\t( select ) => unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst FRAME_TRANSITION = { type: 'tween', duration: isResizing ? 0 : 0.5 };\n\tconst frameRef = useRef( null );\n\tconst resizableHandleHelpId = useInstanceId(\n\t\tResizableFrame,\n\t\t'edit-site-resizable-frame-handle-help'\n\t);\n\tconst defaultAspectRatio = defaultSize.width / defaultSize.height;\n\n\tconst handleResizeStart = ( _event, _direction, ref ) => {\n\t\t// Remember the starting width so we don't have to get `ref.offsetWidth` on\n\t\t// every resize event thereafter, which will cause layout thrashing.\n\t\tsetStartingWidth( ref.offsetWidth );\n\t\tsetIsResizing( true );\n\t};\n\n\t// Calculate the frame size based on the window width as its resized.\n\tconst handleResize = ( _event, _direction, _ref, delta ) => {\n\t\tconst normalizedDelta = delta.width / resizeRatio;\n\t\tconst deltaAbs = Math.abs( normalizedDelta );\n\t\tconst maxDoubledDelta =\n\t\t\tdelta.width < 0 // is shrinking\n\t\t\t\t? deltaAbs\n\t\t\t\t: ( defaultSize.width - startingWidth ) / 2;\n\t\tconst deltaToDouble = Math.min( deltaAbs, maxDoubledDelta );\n\t\tconst doubleSegment = deltaAbs === 0 ? 0 : deltaToDouble / deltaAbs;\n\t\tconst singleSegment = 1 - doubleSegment;\n\n\t\tsetResizeRatio( singleSegment + doubleSegment * 2 );\n\n\t\tconst updatedWidth = startingWidth + delta.width;\n\n\t\tsetIsOversized( updatedWidth > defaultSize.width );\n\n\t\t// Width will be controlled by the library (via `resizeRatio`),\n\t\t// so we only need to update the height.\n\t\tsetFrameSize( {\n\t\t\theight: isOversized\n\t\t\t\t? '100%'\n\t\t\t\t: calculateNewHeight( updatedWidth, defaultAspectRatio ),\n\t\t} );\n\t};\n\n\tconst handleResizeStop = ( _event, _direction, ref ) => {\n\t\tsetIsResizing( false );\n\n\t\tif ( ! isOversized ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetIsOversized( false );\n\n\t\tconst remainingWidth =\n\t\t\tref.ownerDocument.documentElement.offsetWidth - ref.offsetWidth;\n\n\t\tif ( remainingWidth > SNAP_TO_EDIT_CANVAS_MODE_THRESHOLD ) {\n\t\t\t// Reset the initial aspect ratio if the frame is resized slightly\n\t\t\t// above the sidebar but not far enough to trigger full screen.\n\t\t\tsetFrameSize( INITIAL_FRAME_SIZE );\n\t\t} else {\n\t\t\t// Trigger full screen if the frame is resized far enough to the left.\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t};\n\n\t// Handle resize by arrow keys\n\tconst handleResizableHandleKeyDown = ( event ) => {\n\t\tif ( ! [ 'ArrowLeft', 'ArrowRight' ].includes( event.key ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tconst step = 20 * ( event.shiftKey ? 5 : 1 );\n\t\tconst delta = step * ( event.key === 'ArrowLeft' ? 1 : -1 );\n\t\tconst newWidth = Math.min(\n\t\t\tMath.max(\n\t\t\t\tFRAME_MIN_WIDTH,\n\t\t\t\tframeRef.current.resizable.offsetWidth + delta\n\t\t\t),\n\t\t\tdefaultSize.width\n\t\t);\n\n\t\tsetFrameSize( {\n\t\t\twidth: newWidth,\n\t\t\theight: calculateNewHeight( newWidth, defaultAspectRatio ),\n\t\t} );\n\t};\n\n\tconst frameAnimationVariants = {\n\t\tdefault: {\n\t\t\tflexGrow: 0,\n\t\t\theight: frameSize.height,\n\t\t},\n\t\tfullWidth: {\n\t\t\tflexGrow: 1,\n\t\t\theight: frameSize.height,\n\t\t},\n\t};\n\n\tconst resizeHandleVariants = {\n\t\thidden: {\n\t\t\topacity: 0,\n\t\t\tleft: 0,\n\t\t},\n\t\tvisible: {\n\t\t\topacity: 1,\n\t\t\tleft: -14, // Account for the handle's width.\n\t\t},\n\t\tactive: {\n\t\t\topacity: 1,\n\t\t\tleft: -14, // Account for the handle's width.\n\t\t\tscaleY: 1.3,\n\t\t},\n\t};\n\tconst currentResizeHandleVariant = ( () => {\n\t\tif ( isResizing ) {\n\t\t\treturn 'active';\n\t\t}\n\t\treturn shouldShowHandle ? 'visible' : 'hidden';\n\t} )();\n\n\treturn (\n\t\t<ResizableBox\n\t\t\tas={ motion.div }\n\t\t\tref={ frameRef }\n\t\t\tinitial={ false }\n\t\t\tvariants={ frameAnimationVariants }\n\t\t\tanimate={ isFullWidth ? 'fullWidth' : 'default' }\n\t\t\tonAnimationComplete={ ( definition ) => {\n\t\t\t\tif ( definition === 'fullWidth' ) {\n\t\t\t\t\tsetFrameSize( { width: '100%', height: '100%' } );\n\t\t\t\t}\n\t\t\t} }\n\t\t\twhileHover={\n\t\t\t\tcanvasMode === 'view'\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tscale: 1.005,\n\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\tduration: disableMotion ? 0 : 0.5,\n\t\t\t\t\t\t\t\tease: 'easeOut',\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\ttransition={ FRAME_TRANSITION }\n\t\t\tsize={ frameSize }\n\t\t\tenable={ {\n\t\t\t\ttop: false,\n\t\t\t\tright: false,\n\t\t\t\tbottom: false,\n\t\t\t\t// Resizing will be disabled until the editor content is loaded.\n\t\t\t\tleft: isReady,\n\t\t\t\ttopRight: false,\n\t\t\t\tbottomRight: false,\n\t\t\t\tbottomLeft: false,\n\t\t\t\ttopLeft: false,\n\t\t\t} }\n\t\t\tresizeRatio={ resizeRatio }\n\t\t\thandleClasses={ undefined }\n\t\t\thandleStyles={ {\n\t\t\t\tleft: HANDLE_STYLES_OVERRIDE,\n\t\t\t\tright: HANDLE_STYLES_OVERRIDE,\n\t\t\t} }\n\t\t\tminWidth={ FRAME_MIN_WIDTH }\n\t\t\tmaxWidth={ isFullWidth ? '100%' : '150%' }\n\t\t\tmaxHeight=\"100%\"\n\t\t\tonFocus={ () => setShouldShowHandle( true ) }\n\t\t\tonBlur={ () => setShouldShowHandle( false ) }\n\t\t\tonMouseOver={ () => setShouldShowHandle( true ) }\n\t\t\tonMouseOut={ () => setShouldShowHandle( false ) }\n\t\t\thandleComponent={ {\n\t\t\t\tleft: canvasMode === 'view' && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Tooltip text={ __( 'Drag to resize' ) }>\n\t\t\t\t\t\t\t{ /* Disable reason: role=\"separator\" does in fact support aria-valuenow */ }\n\t\t\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/role-supports-aria-props */ }\n\t\t\t\t\t\t\t<motion.button\n\t\t\t\t\t\t\t\tkey=\"handle\"\n\t\t\t\t\t\t\t\trole=\"separator\"\n\t\t\t\t\t\t\t\taria-orientation=\"vertical\"\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'edit-site-resizable-frame__handle',\n\t\t\t\t\t\t\t\t\t{ 'is-resizing': isResizing }\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tvariants={ resizeHandleVariants }\n\t\t\t\t\t\t\t\tanimate={ currentResizeHandleVariant }\n\t\t\t\t\t\t\t\taria-label={ __( 'Drag to resize' ) }\n\t\t\t\t\t\t\t\taria-describedby={ resizableHandleHelpId }\n\t\t\t\t\t\t\t\taria-valuenow={\n\t\t\t\t\t\t\t\t\tframeRef.current?.resizable?.offsetWidth ||\n\t\t\t\t\t\t\t\t\tundefined\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taria-valuemin={ FRAME_MIN_WIDTH }\n\t\t\t\t\t\t\t\taria-valuemax={ defaultSize.width }\n\t\t\t\t\t\t\t\tonKeyDown={ handleResizableHandleKeyDown }\n\t\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\t\texit=\"hidden\"\n\t\t\t\t\t\t\t\twhileFocus=\"active\"\n\t\t\t\t\t\t\t\twhileHover=\"active\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<div hidden id={ resizableHandleHelpId }>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Use left and right arrow keys to resize the canvas. Hold shift to resize in larger increments.'\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),\n\t\t\t} }\n\t\t\tonResizeStart={ handleResizeStart }\n\t\t\tonResize={ handleResize }\n\t\t\tonResizeStop={ handleResizeStop }\n\t\t\tclassName={ clsx( 'edit-site-resizable-frame__inner', {\n\t\t\t\t'is-resizing': isResizing,\n\t\t\t} ) }\n\t\t\tshowHandle={ false } // Do not show the default handle, as we're using a custom one.\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-resizable-frame__inner-content\"\n\t\t\t\tstyle={ innerContentStyle }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</ResizableBox>\n\t);\n}\n\nexport default ResizableFrame;\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nfunction KeyboardShortcutsRegister() {\n\t// Registering the shortcuts.\n\tconst { registerShortcut } = useDispatch( keyboardShortcutsStore );\n\tuseEffect( () => {\n\t\tregisterShortcut( {\n\t\t\tname: 'core/edit-site/save',\n\t\t\tcategory: 'global',\n\t\t\tdescription: __( 'Save your changes.' ),\n\t\t\tkeyCombination: {\n\t\t\t\tmodifier: 'primary',\n\t\t\t\tcharacter: 's',\n\t\t\t},\n\t\t} );\n\t}, [ registerShortcut ] );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsRegister;\n","/**\n * WordPress dependencies\n */\nimport { useShortcut } from '@wordpress/keyboard-shortcuts';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nfunction KeyboardShortcutsGlobal() {\n\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\tuseSelect( coreStore );\n\tconst { hasNonPostEntityChanges } = useSelect( editorStore );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\n\tuseShortcut( 'core/edit-site/save', ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst hasDirtyEntities = !! dirtyEntityRecords.length;\n\t\tconst isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\t\tconst _hasNonPostEntityChanges = hasNonPostEntityChanges();\n\t\tconst isViewMode = getCanvasMode() === 'view';\n\t\tif (\n\t\t\t( ! hasDirtyEntities || ! _hasNonPostEntityChanges || isSaving ) &&\n\t\t\t! isViewMode\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\t// At this point, we know that there are dirty entities, other than\n\t\t// the edited post, and we're not in the process of saving, so open\n\t\t// save view.\n\t\tsetIsSaveViewOpened( true );\n\t} );\n\n\treturn null;\n}\n\nexport default KeyboardShortcutsGlobal;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function useEditedEntityRecord( postType, postId ) {\n\tconst { record, title, description, isLoaded, icon } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedPostType, getEditedPostId } =\n\t\t\t\tselect( editSiteStore );\n\t\t\tconst { getEditedEntityRecord, hasFinishedResolution } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst { __experimentalGetTemplateInfo: getTemplateInfo } =\n\t\t\t\tselect( editorStore );\n\t\t\tconst usedPostType = postType ?? getEditedPostType();\n\t\t\tconst usedPostId = postId ?? getEditedPostId();\n\t\t\tconst _record = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tusedPostType,\n\t\t\t\tusedPostId\n\t\t\t);\n\t\t\tconst _isLoaded =\n\t\t\t\tusedPostId &&\n\t\t\t\thasFinishedResolution( 'getEditedEntityRecord', [\n\t\t\t\t\t'postType',\n\t\t\t\t\tusedPostType,\n\t\t\t\t\tusedPostId,\n\t\t\t\t] );\n\t\t\tconst templateInfo = getTemplateInfo( _record );\n\n\t\t\treturn {\n\t\t\t\trecord: _record,\n\t\t\t\ttitle: templateInfo.title,\n\t\t\t\tdescription: templateInfo.description,\n\t\t\t\tisLoaded: _isLoaded,\n\t\t\t\ticon: templateInfo.icon,\n\t\t\t};\n\t\t},\n\t\t[ postType, postId ]\n\t);\n\n\treturn {\n\t\tisLoaded,\n\t\ticon,\n\t\trecord,\n\t\tgetTitle: () => ( title ? decodeEntities( title ) : null ),\n\t\tgetDescription: () =>\n\t\t\tdescription ? decodeEntities( description ) : null,\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\n\nconst MAX_LOADING_TIME = 10000; // 10 seconds\n\nexport function useIsSiteEditorLoading() {\n\tconst { isLoaded: hasLoadedPost } = useEditedEntityRecord();\n\tconst [ loaded, setLoaded ] = useState( false );\n\tconst inLoadingPause = useSelect(\n\t\t( select ) => {\n\t\t\tconst hasResolvingSelectors =\n\t\t\t\tselect( coreStore ).hasResolvingSelectors();\n\t\t\treturn ! loaded && ! hasResolvingSelectors;\n\t\t},\n\t\t[ loaded ]\n\t);\n\n\t/*\n\t * If the maximum expected loading time has passed, we're marking the\n\t * editor as loaded, in order to prevent any failed requests from blocking\n\t * the editor canvas from appearing.\n\t */\n\tuseEffect( () => {\n\t\tlet timeout;\n\n\t\tif ( ! loaded ) {\n\t\t\ttimeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, MAX_LOADING_TIME );\n\t\t}\n\n\t\treturn () => {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t}, [ loaded ] );\n\n\tuseEffect( () => {\n\t\tif ( inLoadingPause ) {\n\t\t\t/*\n\t\t\t * We're using an arbitrary 100ms timeout here to catch brief\n\t\t\t * moments without any resolving selectors that would result in\n\t\t\t * displaying brief flickers of loading state and loaded state.\n\t\t\t *\n\t\t\t * It's worth experimenting with different values, since this also\n\t\t\t * adds 100ms of artificial delay after loading has finished.\n\t\t\t */\n\t\t\tconst ARTIFICIAL_DELAY = 100;\n\t\t\tconst timeout = setTimeout( () => {\n\t\t\t\tsetLoaded( true );\n\t\t\t}, ARTIFICIAL_DELAY );\n\n\t\t\treturn () => {\n\t\t\t\tclearTimeout( timeout );\n\t\t\t};\n\t\t}\n\t}, [ inLoadingPause ] );\n\n\treturn ! loaded || ! hasLoadedPost;\n}\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 { Controller, easings } from '@react-spring/web';\n\n/**\n * WordPress dependencies\n */\nimport { useLayoutEffect, useMemo, useRef } from '@wordpress/element';\n\nfunction getAbsolutePosition( element ) {\n\treturn {\n\t\ttop: element.offsetTop,\n\t\tleft: element.offsetLeft,\n\t};\n}\n\nconst ANIMATION_DURATION = 400;\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 {*} $1.triggerAnimationOnChange Variable used to trigger the animation if it changes.\n */\nfunction useMovingAnimation( { triggerAnimationOnChange } ) {\n\tconst ref = useRef();\n\n\t// Whenever the trigger changes, we need to take a snapshot of the current\n\t// position of the block to use it as a destination point for the animation.\n\tconst { previous, prevRect } = useMemo(\n\t\t() => ( {\n\t\t\tprevious: ref.current && getAbsolutePosition( ref.current ),\n\t\t\tprevRect: ref.current && ref.current.getBoundingClientRect(),\n\t\t} ),\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t[ triggerAnimationOnChange ]\n\t);\n\n\tuseLayoutEffect( () => {\n\t\tif ( ! previous || ! ref.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We disable the animation if the user has a preference for reduced\n\t\t// motion.\n\t\tconst disableAnimation = window.matchMedia(\n\t\t\t'(prefers-reduced-motion: reduce)'\n\t\t).matches;\n\n\t\tif ( disableAnimation ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst controller = new Controller( {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\twidth: prevRect.width,\n\t\t\theight: prevRect.height,\n\t\t\tconfig: {\n\t\t\t\tduration: ANIMATION_DURATION,\n\t\t\t\teasing: easings.easeInOutQuint,\n\t\t\t},\n\t\t\tonChange( { value } ) {\n\t\t\t\tif ( ! ref.current ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tlet { x, y, width, height } = value;\n\t\t\t\tx = Math.round( x );\n\t\t\t\ty = Math.round( y );\n\t\t\t\twidth = Math.round( width );\n\t\t\t\theight = Math.round( height );\n\t\t\t\tconst finishedMoving = x === 0 && y === 0;\n\t\t\t\tref.current.style.transformOrigin = 'center center';\n\t\t\t\tref.current.style.transform = finishedMoving\n\t\t\t\t\t? null // Set to `null` to explicitly remove the transform.\n\t\t\t\t\t: `translate3d(${ x }px,${ y }px,0)`;\n\t\t\t\tref.current.style.width = finishedMoving\n\t\t\t\t\t? null\n\t\t\t\t\t: `${ width }px`;\n\t\t\t\tref.current.style.height = finishedMoving\n\t\t\t\t\t? null\n\t\t\t\t\t: `${ height }px`;\n\t\t\t},\n\t\t} );\n\n\t\tref.current.style.transform = undefined;\n\t\tconst destination = ref.current.getBoundingClientRect();\n\n\t\tconst x = Math.round( prevRect.left - destination.left );\n\t\tconst y = Math.round( prevRect.top - destination.top );\n\t\tconst width = destination.width;\n\t\tconst height = destination.height;\n\n\t\tcontroller.start( {\n\t\t\tx: 0,\n\t\t\ty: 0,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tfrom: { x, y, width: prevRect.width, height: prevRect.height },\n\t\t} );\n\n\t\treturn () => {\n\t\t\tcontroller.stop();\n\t\t\tcontroller.set( {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0,\n\t\t\t\twidth: prevRect.width,\n\t\t\t\theight: prevRect.height,\n\t\t\t} );\n\t\t};\n\t}, [ previous, prevRect ] );\n\n\treturn ref;\n}\n\nexport default useMovingAnimation;\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","/**\n * WordPress dependencies\n */\nimport { getQueryArg } from '@wordpress/url';\n\nexport function isPreviewingTheme() {\n\treturn (\n\t\tgetQueryArg( window.location.href, 'wp_theme_preview' ) !== undefined\n\t);\n}\n\nexport function currentlyPreviewingTheme() {\n\tif ( isPreviewingTheme() ) {\n\t\treturn getQueryArg( window.location.href, 'wp_theme_preview' );\n\t}\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { __, _n, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { displayShortcut } from '@wordpress/keycodes';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport {\n\tuseEntitiesSavedStatesIsDirty,\n\tstore as editorStore,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport {\n\tcurrentlyPreviewingTheme,\n\tisPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SaveButton( {\n\tclassName = 'edit-site-save-button__button',\n\tvariant = 'primary',\n\tshowTooltip = true,\n\tshowReviewMessage,\n\ticon,\n\tsize,\n\t__next40pxDefaultSize = false,\n} ) {\n\tconst { params } = useLocation();\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst { saveDirtyEntities } = unlock( useDispatch( editorStore ) );\n\tconst { dirtyEntityRecords } = useEntitiesSavedStatesIsDirty();\n\tconst { isSaving, isSaveViewOpen, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isResolving } = select( coreStore );\n\t\t\tconst { isSaveViewOpened } = select( editSiteStore );\n\t\t\tconst isActivatingTheme = isResolving( 'activateTheme' );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tisSaving:\n\t\t\t\t\tdirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\t\tisSavingEntityRecord(\n\t\t\t\t\t\t\trecord.kind,\n\t\t\t\t\t\t\trecord.name,\n\t\t\t\t\t\t\trecord.key\n\t\t\t\t\t\t)\n\t\t\t\t\t) || isActivatingTheme,\n\t\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[ dirtyEntityRecords ]\n\t);\n\tconst hasDirtyEntities = !! dirtyEntityRecords.length;\n\tlet isOnlyCurrentEntityDirty;\n\t// Check if the current entity is the only entity with changes.\n\t// We have some extra logic for `wp_global_styles` for now, that\n\t// is used in navigation sidebar.\n\tif ( dirtyEntityRecords.length === 1 ) {\n\t\tif ( params.postId ) {\n\t\t\tisOnlyCurrentEntityDirty =\n\t\t\t\t`${ dirtyEntityRecords[ 0 ].key }` === params.postId &&\n\t\t\t\tdirtyEntityRecords[ 0 ].name === params.postType;\n\t\t} else if ( params.path?.includes( 'wp_global_styles' ) ) {\n\t\t\tisOnlyCurrentEntityDirty =\n\t\t\t\tdirtyEntityRecords[ 0 ].name === 'globalStyles';\n\t\t}\n\t}\n\tconst disabled =\n\t\tisSaving || ( ! hasDirtyEntities && ! isPreviewingTheme() );\n\tconst getLabel = () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tif ( isSaving ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t\t__( 'Activating %s' ),\n\t\t\t\t\tpreviewingThemeName\n\t\t\t\t);\n\t\t\t} else if ( disabled ) {\n\t\t\t\treturn __( 'Saved' );\n\t\t\t} else if ( hasDirtyEntities ) {\n\t\t\t\treturn sprintf(\n\t\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t\t__( 'Activate %s & Save' ),\n\t\t\t\t\tpreviewingThemeName\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn sprintf(\n\t\t\t\t/* translators: %s: The name of theme to be activated. */\n\t\t\t\t__( 'Activate %s' ),\n\t\t\t\tpreviewingThemeName\n\t\t\t);\n\t\t}\n\t\tif ( isSaving ) {\n\t\t\treturn __( 'Saving' );\n\t\t}\n\t\tif ( disabled ) {\n\t\t\treturn __( 'Saved' );\n\t\t}\n\t\tif ( ! isOnlyCurrentEntityDirty && showReviewMessage ) {\n\t\t\treturn sprintf(\n\t\t\t\t// translators: %d: number of unsaved changes (number).\n\t\t\t\t_n(\n\t\t\t\t\t'Review %d change…',\n\t\t\t\t\t'Review %d changes…',\n\t\t\t\t\tdirtyEntityRecords.length\n\t\t\t\t),\n\t\t\t\tdirtyEntityRecords.length\n\t\t\t);\n\t\t}\n\t\treturn __( 'Save' );\n\t};\n\tconst label = getLabel();\n\tconst onClick = isOnlyCurrentEntityDirty\n\t\t? () => saveDirtyEntities( { dirtyEntityRecords } )\n\t\t: () => setIsSaveViewOpened( true );\n\treturn (\n\t\t<Button\n\t\t\tvariant={ variant }\n\t\t\tclassName={ className }\n\t\t\taria-disabled={ disabled }\n\t\t\taria-expanded={ isSaveViewOpen }\n\t\t\tisBusy={ isSaving }\n\t\t\tonClick={ disabled ? undefined : onClick }\n\t\t\tlabel={ label }\n\t\t\t/*\n\t\t\t * We want the tooltip to show the keyboard shortcut only when the\n\t\t\t * button does something, i.e. when it's not disabled.\n\t\t\t */\n\t\t\tshortcut={ disabled ? undefined : displayShortcut.primary( 's' ) }\n\t\t\t/*\n\t\t\t * Displaying the keyboard shortcut conditionally makes the tooltip\n\t\t\t * itself show conditionally. This would trigger a full-rerendering\n\t\t\t * of the button that we want to avoid. By setting `showTooltip`,\n\t\t\t * the tooltip is always rendered even when there's no keyboard shortcut.\n\t\t\t */\n\t\t\tshowTooltip={ showTooltip }\n\t\t\ticon={ icon }\n\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\tsize={ size }\n\t\t>\n\t\t\t{ label }\n\t\t</Button>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SaveButton from '../save-button';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nexport default function SaveHub() {\n\tconst { isDisabled, isSaving } = useSelect( ( select ) => {\n\t\tconst { __experimentalGetDirtyEntityRecords, isSavingEntityRecord } =\n\t\t\tselect( coreStore );\n\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\tconst _isSaving = dirtyEntityRecords.some( ( record ) =>\n\t\t\tisSavingEntityRecord( record.kind, record.name, record.key )\n\t\t);\n\t\treturn {\n\t\t\tisSaving: _isSaving,\n\t\t\tisDisabled:\n\t\t\t\t_isSaving ||\n\t\t\t\t( ! dirtyEntityRecords.length && ! isPreviewingTheme() ),\n\t\t};\n\t}, [] );\n\treturn (\n\t\t<HStack className=\"edit-site-save-hub\" alignment=\"right\" spacing={ 4 }>\n\t\t\t<SaveButton\n\t\t\t\tclassName=\"edit-site-save-hub__button\"\n\t\t\t\tvariant={ isDisabled ? null : 'primary' }\n\t\t\t\tshowTooltip={ false }\n\t\t\t\ticon={ isDisabled && ! isSaving ? check : null }\n\t\t\t\tshowReviewMessage\n\t\t\t\t__next40pxDefaultSize\n\t\t\t/>\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../lock-unlock';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from './is-previewing-theme';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\n/**\n * This should be refactored to use the REST API, once the REST API can activate themes.\n *\n * @return {Function} A function that activates the theme.\n */\nexport function useActivateTheme() {\n\tconst history = useHistory();\n\tconst { startResolution, finishResolution } = useDispatch( coreStore );\n\n\treturn async () => {\n\t\tif ( isPreviewingTheme() ) {\n\t\t\tconst activationURL =\n\t\t\t\t'themes.php?action=activate&stylesheet=' +\n\t\t\t\tcurrentlyPreviewingTheme() +\n\t\t\t\t'&_wpnonce=' +\n\t\t\t\twindow.WP_BLOCK_THEME_ACTIVATE_NONCE;\n\t\t\tstartResolution( 'activateTheme' );\n\t\t\tawait window.fetch( activationURL );\n\t\t\tfinishResolution( 'activateTheme' );\n\t\t\t// Remove the wp_theme_preview query param: we've finished activating\n\t\t\t// the queue and are switching to normal Site Editor.\n\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\thistory.replace( { ...params, wp_theme_preview: undefined } );\n\t\t}\n\t};\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"apiFetch\"];","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Button, Modal } from '@wordpress/components';\nimport {\n\tEntitiesSavedStates,\n\tuseEntitiesSavedStatesIsDirty,\n\tprivateApis,\n} from '@wordpress/editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useActivateTheme } from '../../utils/use-activate-theme';\nimport { useActualCurrentTheme } from '../../utils/use-actual-current-theme';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\n\nconst { EntitiesSavedStatesExtensible, NavigableRegion } =\n\tunlock( privateApis );\n\nconst EntitiesSavedStatesForPreview = ( { onClose } ) => {\n\tconst isDirtyProps = useEntitiesSavedStatesIsDirty();\n\tlet activateSaveLabel;\n\tif ( isDirtyProps.isDirty ) {\n\t\tactivateSaveLabel = __( 'Activate & Save' );\n\t} else {\n\t\tactivateSaveLabel = __( 'Activate' );\n\t}\n\n\tconst currentTheme = useActualCurrentTheme();\n\n\tconst previewingTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme(),\n\t\t[]\n\t);\n\n\tconst additionalPrompt = (\n\t\t<p>\n\t\t\t{ sprintf(\n\t\t\t\t/* translators: %1$s: The name of active theme, %2$s: The name of theme to be activated. */\n\t\t\t\t__(\n\t\t\t\t\t'Saving your changes will change your active theme from %1$s to %2$s.'\n\t\t\t\t),\n\t\t\t\tcurrentTheme?.name?.rendered ?? '...',\n\t\t\t\tpreviewingTheme?.name?.rendered ?? '...'\n\t\t\t) }\n\t\t</p>\n\t);\n\n\tconst activateTheme = useActivateTheme();\n\tconst onSave = async ( values ) => {\n\t\tawait activateTheme();\n\t\treturn values;\n\t};\n\n\treturn (\n\t\t<EntitiesSavedStatesExtensible\n\t\t\t{ ...{\n\t\t\t\t...isDirtyProps,\n\t\t\t\tadditionalPrompt,\n\t\t\t\tclose: onClose,\n\t\t\t\tonSave,\n\t\t\t\tsaveEnabled: true,\n\t\t\t\tsaveLabel: activateSaveLabel,\n\t\t\t} }\n\t\t/>\n\t);\n};\n\nconst _EntitiesSavedStates = ( { onClose, renderDialog = undefined } ) => {\n\tif ( isPreviewingTheme() ) {\n\t\treturn <EntitiesSavedStatesForPreview onClose={ onClose } />;\n\t}\n\treturn (\n\t\t<EntitiesSavedStates close={ onClose } renderDialog={ renderDialog } />\n\t);\n};\n\nexport default function SavePanel() {\n\tconst { isSaveViewOpen, canvasMode, isDirty, isSaving } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tisSavingEntityRecord,\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst isActivatingTheme = isResolving( 'activateTheme' );\n\t\t\tconst { isSaveViewOpened, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\n\t\t\t// The currently selected entity to display.\n\t\t\t// Typically template or template part in the site editor.\n\t\t\treturn {\n\t\t\t\tisSaveViewOpen: isSaveViewOpened(),\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tisDirty: dirtyEntityRecords.length > 0,\n\t\t\t\tisSaving:\n\t\t\t\t\tdirtyEntityRecords.some( ( record ) =>\n\t\t\t\t\t\tisSavingEntityRecord(\n\t\t\t\t\t\t\trecord.kind,\n\t\t\t\t\t\t\trecord.name,\n\t\t\t\t\t\t\trecord.key\n\t\t\t\t\t\t)\n\t\t\t\t\t) || isActivatingTheme,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { setIsSaveViewOpened } = useDispatch( editSiteStore );\n\tconst onClose = () => setIsSaveViewOpened( false );\n\n\tif ( canvasMode === 'view' ) {\n\t\treturn isSaveViewOpen ? (\n\t\t\t<Modal\n\t\t\t\tclassName=\"edit-site-save-panel__modal\"\n\t\t\t\tonRequestClose={ onClose }\n\t\t\t\t__experimentalHideHeader\n\t\t\t\tcontentLabel={ __(\n\t\t\t\t\t'Save site, content, and template changes'\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } />\n\t\t\t</Modal>\n\t\t) : null;\n\t}\n\tconst activateSaveEnabled = isPreviewingTheme() || isDirty;\n\tconst disabled = isSaving || ! activateSaveEnabled;\n\treturn (\n\t\t<NavigableRegion\n\t\t\tclassName={ clsx( 'edit-site-layout__actions', {\n\t\t\t\t'is-entity-save-view-open': isSaveViewOpen,\n\t\t\t} ) }\n\t\t\tariaLabel={ __( 'Save panel' ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-editor__toggle-save-panel', {\n\t\t\t\t\t'screen-reader-text': isSaveViewOpen,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t<Button\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\tclassName=\"edit-site-editor__toggle-save-panel-button\"\n\t\t\t\t\tonClick={ () => setIsSaveViewOpened( true ) }\n\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Open save panel' ) }\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t\t{ isSaveViewOpen && (\n\t\t\t\t<_EntitiesSavedStates onClose={ onClose } renderDialog />\n\t\t\t) }\n\t\t</NavigableRegion>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\nimport { useState, useEffect } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\n\nconst ACTIVE_THEMES_URL = '/wp/v2/themes?status=active';\n\nexport function useActualCurrentTheme() {\n\tconst [ currentTheme, setCurrentTheme ] = useState();\n\n\tuseEffect( () => {\n\t\t// Set the `wp_theme_preview` to empty string to bypass the createThemePreviewMiddleware.\n\t\tconst path = addQueryArgs( ACTIVE_THEMES_URL, {\n\t\t\tcontext: 'edit',\n\t\t\twp_theme_preview: '',\n\t\t} );\n\n\t\tapiFetch( { path } )\n\t\t\t.then( ( activeThemes ) => setCurrentTheme( activeThemes[ 0 ] ) )\n\t\t\t// Do nothing\n\t\t\t.catch( () => {} );\n\t}, [] );\n\n\treturn currentTheme;\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nexport default function useSyncCanvasModeWithURL() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tconst canvasMode = useSelect(\n\t\t( select ) => unlock( select( editSiteStore ) ).getCanvasMode(),\n\t\t[]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst currentCanvasMode = useRef( canvasMode );\n\tconst { canvas: canvasInUrl } = params;\n\tconst currentCanvasInUrl = useRef( canvasInUrl );\n\tconst currentUrlParams = useRef( params );\n\tuseEffect( () => {\n\t\tcurrentUrlParams.current = params;\n\t}, [ params ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasMode.current = canvasMode;\n\t\tif ( canvasMode === 'init' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'edit' &&\n\t\t\tcurrentCanvasInUrl.current !== canvasMode\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\t\t}\n\n\t\tif (\n\t\t\tcanvasMode === 'view' &&\n\t\t\tcurrentCanvasInUrl.current !== undefined\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...currentUrlParams.current,\n\t\t\t\tcanvas: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ canvasMode, history ] );\n\n\tuseEffect( () => {\n\t\tcurrentCanvasInUrl.current = canvasInUrl;\n\t\tif ( canvasInUrl !== 'edit' && currentCanvasMode.current !== 'view' ) {\n\t\t\tsetCanvasMode( 'view' );\n\t\t} else if (\n\t\t\tcanvasInUrl === 'edit' &&\n\t\t\tcurrentCanvasMode.current !== 'edit'\n\t\t) {\n\t\t\tsetCanvasMode( 'edit' );\n\t\t}\n\t}, [ canvasInUrl, setCanvasMode ] );\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport {\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n\t__unstableUseNavigateRegions as useNavigateRegions,\n} from '@wordpress/components';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseResizeObserver,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useRef, useEffect } from '@wordpress/element';\nimport { store as keyboardShortcutsStore } from '@wordpress/keyboard-shortcuts';\nimport { CommandMenu } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\tEditorSnackbars,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { privateApis as coreCommandsPrivateApis } from '@wordpress/core-commands';\n\n/**\n * Internal dependencies\n */\nimport ErrorBoundary from '../error-boundary';\nimport { store as editSiteStore } from '../../store';\nimport { default as SiteHub, SiteHubMobile } from '../site-hub';\nimport ResizableFrame from '../resizable-frame';\nimport { unlock } from '../../lock-unlock';\nimport KeyboardShortcutsRegister from '../keyboard-shortcuts/register';\nimport KeyboardShortcutsGlobal from '../keyboard-shortcuts/global';\nimport { useIsSiteEditorLoading } from './hooks';\nimport useMovingAnimation from './animation';\nimport SidebarContent from '../sidebar';\nimport SaveHub from '../save-hub';\nimport SavePanel from '../save-panel';\nimport useSyncCanvasModeWithURL from '../sync-state-with-url/use-sync-canvas-mode-with-url';\n\nconst { useCommands } = unlock( coreCommandsPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\nconst { NavigableRegion } = unlock( editorPrivateApis );\n\nconst ANIMATION_DURATION = 0.3;\n\nexport default function Layout( { route } ) {\n\tuseSyncCanvasModeWithURL();\n\tuseCommands();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst toggleRef = useRef();\n\tconst { canvasMode, previousShortcut, nextShortcut } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getAllShortcutKeyCombinations } = select(\n\t\t\t\tkeyboardShortcutsStore\n\t\t\t);\n\t\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\t\t\treturn {\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tpreviousShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t\t'core/editor/previous-region'\n\t\t\t\t),\n\t\t\t\tnextShortcut: getAllShortcutKeyCombinations(\n\t\t\t\t\t'core/editor/next-region'\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst navigateRegionsProps = useNavigateRegions( {\n\t\tprevious: previousShortcut,\n\t\tnext: nextShortcut,\n\t} );\n\tconst disableMotion = useReducedMotion();\n\tconst [ canvasResizer, canvasSize ] = useResizeObserver();\n\tconst [ fullResizer ] = useResizeObserver();\n\tconst isEditorLoading = useIsSiteEditorLoading();\n\tconst [ isResizableFrameOversized, setIsResizableFrameOversized ] =\n\t\tuseState( false );\n\tconst { key: routeKey, areas, widths } = route;\n\tconst animationRef = useMovingAnimation( {\n\t\ttriggerAnimationOnChange: canvasMode + '__' + routeKey,\n\t} );\n\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst previousCanvaMode = usePrevious( canvasMode );\n\tuseEffect( () => {\n\t\tif ( previousCanvaMode === 'edit' ) {\n\t\t\ttoggleRef.current?.focus();\n\t\t}\n\t\t// Should not depend on the previous canvas mode value but the next.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ canvasMode ] );\n\n\t// Synchronizing the URL with the store value of canvasMode happens in an effect\n\t// This condition ensures the component is only rendered after the synchronization happens\n\t// which prevents any animations due to potential canvasMode value change.\n\tif ( canvasMode === 'init' ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<CommandMenu />\n\t\t\t<KeyboardShortcutsRegister />\n\t\t\t<KeyboardShortcutsGlobal />\n\t\t\t{ fullResizer }\n\t\t\t<div\n\t\t\t\t{ ...navigateRegionsProps }\n\t\t\t\tref={ navigateRegionsProps.ref }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-site-layout',\n\t\t\t\t\tnavigateRegionsProps.className,\n\t\t\t\t\t{\n\t\t\t\t\t\t'is-full-canvas': canvasMode === 'edit',\n\t\t\t\t\t}\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-layout__content\">\n\t\t\t\t\t{ /*\n\t\t\t\t\t\tThe NavigableRegion must always be rendered and not use\n\t\t\t\t\t\t`inert` otherwise `useNavigateRegions` will fail.\n\t\t\t\t\t*/ }\n\t\t\t\t\t{ ( ! isMobileViewport || ! areas.mobile ) && (\n\t\t\t\t\t\t<NavigableRegion\n\t\t\t\t\t\t\tariaLabel={ __( 'Navigation' ) }\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__sidebar-region\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t\t{ canvasMode === 'view' && (\n\t\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\t\tinitial={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\tanimate={ { opacity: 1 } }\n\t\t\t\t\t\t\t\t\t\texit={ { opacity: 0 } }\n\t\t\t\t\t\t\t\t\t\ttransition={ {\n\t\t\t\t\t\t\t\t\t\t\ttype: 'tween',\n\t\t\t\t\t\t\t\t\t\t\tduration:\n\t\t\t\t\t\t\t\t\t\t\t\t// Disable transition in mobile to emulate a full page transition.\n\t\t\t\t\t\t\t\t\t\t\t\tdisableMotion ||\n\t\t\t\t\t\t\t\t\t\t\t\tisMobileViewport\n\t\t\t\t\t\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t: ANIMATION_DURATION,\n\t\t\t\t\t\t\t\t\t\t\tease: 'easeOut',\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__sidebar\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<SiteHub\n\t\t\t\t\t\t\t\t\t\t\tref={ toggleRef }\n\t\t\t\t\t\t\t\t\t\t\tisTransparent={\n\t\t\t\t\t\t\t\t\t\t\t\tisResizableFrameOversized\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<SidebarContent routeKey={ routeKey }>\n\t\t\t\t\t\t\t\t\t\t\t{ areas.sidebar }\n\t\t\t\t\t\t\t\t\t\t</SidebarContent>\n\t\t\t\t\t\t\t\t\t\t<SaveHub />\n\t\t\t\t\t\t\t\t\t\t<SavePanel />\n\t\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t\t</NavigableRegion>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<EditorSnackbars />\n\n\t\t\t\t\t{ isMobileViewport && areas.mobile && (\n\t\t\t\t\t\t<div className=\"edit-site-layout__mobile\">\n\t\t\t\t\t\t\t{ canvasMode !== 'edit' && (\n\t\t\t\t\t\t\t\t<SidebarContent routeKey={ routeKey }>\n\t\t\t\t\t\t\t\t\t<SiteHubMobile\n\t\t\t\t\t\t\t\t\t\tref={ toggleRef }\n\t\t\t\t\t\t\t\t\t\tisTransparent={\n\t\t\t\t\t\t\t\t\t\t\tisResizableFrameOversized\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</SidebarContent>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ areas.mobile }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! isMobileViewport &&\n\t\t\t\t\t\tareas.content &&\n\t\t\t\t\t\tcanvasMode !== 'edit' && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__area\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tmaxWidth: widths?.content,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ areas.content }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! isMobileViewport && areas.edit && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"edit-site-layout__area\"\n\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\tmaxWidth: widths?.edit,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ areas.edit }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! isMobileViewport && areas.preview && (\n\t\t\t\t\t\t<div className=\"edit-site-layout__canvas-container\">\n\t\t\t\t\t\t\t{ canvasResizer }\n\t\t\t\t\t\t\t{ !! canvasSize.width && (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t\t'edit-site-layout__canvas',\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t'is-right-aligned':\n\t\t\t\t\t\t\t\t\t\t\t\tisResizableFrameOversized,\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\tref={ animationRef }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ErrorBoundary>\n\t\t\t\t\t\t\t\t\t\t<ResizableFrame\n\t\t\t\t\t\t\t\t\t\t\tisReady={ ! isEditorLoading }\n\t\t\t\t\t\t\t\t\t\t\tisFullWidth={\n\t\t\t\t\t\t\t\t\t\t\t\tcanvasMode === 'edit'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdefaultSize={ {\n\t\t\t\t\t\t\t\t\t\t\t\twidth:\n\t\t\t\t\t\t\t\t\t\t\t\t\tcanvasSize.width -\n\t\t\t\t\t\t\t\t\t\t\t\t\t24 /* $canvas-padding */,\n\t\t\t\t\t\t\t\t\t\t\t\theight: canvasSize.height,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\tisOversized={\n\t\t\t\t\t\t\t\t\t\t\t\tisResizableFrameOversized\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tsetIsOversized={\n\t\t\t\t\t\t\t\t\t\t\t\tsetIsResizableFrameOversized\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinnerContentStyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\t\t\t\t\t\t\tbackgroundColor,\n\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ areas.preview }\n\t\t\t\t\t\t\t\t\t\t</ResizableFrame>\n\t\t\t\t\t\t\t\t\t</ErrorBoundary>\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</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nexport const styles = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z\" />\n\t</SVG>\n);\n\nexport default styles;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst help = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4.75a7.25 7.25 0 100 14.5 7.25 7.25 0 000-14.5zM3.25 12a8.75 8.75 0 1117.5 0 8.75 8.75 0 01-17.5 0zM12 8.75a1.5 1.5 0 01.167 2.99c-.465.052-.917.44-.917 1.01V14h1.5v-.845A3 3 0 109 10.25h1.5a1.5 1.5 0 011.5-1.5zM11.25 15v1.5h1.5V15h-1.5z\" />\n\t</SVG>\n);\n\nexport default help;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst rotateRight = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.1 4.8l-3-2.5V4c-4.4 0-8 3.6-8 8 0 3.7 2.5 6.9 6 7.7.3.1.6.1 1 .2l.2-1.5c-.4 0-.7-.1-1.1-.2l-.1.2v-.2c-2.6-.8-4.5-3.3-4.5-6.2 0-3.6 2.9-6.5 6.5-6.5v1.8l3-2.5zM20 11c-.2-1.4-.7-2.7-1.6-3.8l-1.2.8c.7.9 1.1 2 1.3 3.1L20 11zm-1.5 1.8c-.1.5-.2 1.1-.4 1.6s-.5 1-.8 1.5l1.2.9c.4-.5.8-1.1 1-1.8s.5-1.3.5-2l-1.5-.2zm-5.6 5.6l.2 1.5c1.4-.2 2.7-.7 3.8-1.6l-.9-1.1c-.9.7-2 1.1-3.1 1.2z\" />\n\t</SVG>\n);\n\nexport default rotateRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst rotateLeft = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4V2.2L9 4.8l3 2.5V5.5c3.6 0 6.5 2.9 6.5 6.5 0 2.9-1.9 5.3-4.5 6.2v.2l-.1-.2c-.4.1-.7.2-1.1.2l.2 1.5c.3 0 .6-.1 1-.2 3.5-.9 6-4 6-7.7 0-4.4-3.6-8-8-8zm-7.9 7l1.5.2c.1-1.2.5-2.3 1.2-3.2l-1.1-.9C4.8 8.2 4.3 9.6 4.1 11zm1.5 1.8l-1.5.2c.1.7.3 1.4.5 2 .3.7.6 1.3 1 1.8l1.2-.8c-.3-.5-.6-1-.8-1.5s-.4-1.1-.4-1.7zm1.5 5.5c1.1.9 2.4 1.4 3.8 1.6l.2-1.5c-1.1-.1-2.2-.5-3.1-1.2l-.9 1.1z\" />\n\t</SVG>\n);\n\nexport default rotateLeft;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst brush = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z\" />\n\t</SVG>\n);\n\nexport default brush;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst backup = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5.5 12h1.75l-2.5 3-2.5-3H4a8 8 0 113.134 6.35l.907-1.194A6.5 6.5 0 105.5 12zm9.53 1.97l-2.28-2.28V8.5a.75.75 0 00-1.5 0V12a.747.747 0 00.218.529l1.282-.84-1.28.842 2.5 2.5a.75.75 0 101.06-1.061z\" />\n\t</SVG>\n);\n\nexport default backup;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst external = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z\" />\n\t</SVG>\n);\n\nexport default external;\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\trotateLeft,\n\trotateRight,\n\tbackup,\n\thelp,\n\tstyles,\n\texternal,\n\tbrush,\n} from '@wordpress/icons';\nimport { useCommandLoader, useCommand } from '@wordpress/commands';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nfunction useGlobalStylesOpenStylesCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst history = useHistory();\n\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles',\n\t\t\t\tlabel: __( 'Open styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t},\n\t\t\t\ticon: styles,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesToggleWelcomeGuideCommands() {\n\tconst { openGeneralSidebar, setCanvasMode } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { params } = useLocation();\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { set } = useDispatch( preferencesStore );\n\n\tconst history = useHistory();\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! isBlockBasedTheme ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\t\t\tlabel: __( 'Learn about styles' ),\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t// sometimes there's a focus loss that happens after some time\n\t\t\t\t\t// that closes the modal, we need to force reopening it.\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tset( 'core/edit-site', 'welcomeGuideStyles', true );\n\t\t\t\t\t}, 500 );\n\t\t\t\t},\n\t\t\t\ticon: help,\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetCanvasMode,\n\t\tgetCanvasMode,\n\t\tisBlockBasedTheme,\n\t\tset,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesResetCommands() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst commands = useMemo( () => {\n\t\tif ( ! canReset ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/reset-global-styles',\n\t\t\t\tlabel: __( 'Reset styles' ),\n\t\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tonReset();\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [ canReset, onReset ] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenCssCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! canEditCSS ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-styles-css',\n\t\t\t\tlabel: __( 'Customize CSS' ),\n\t\t\t\ticon: brush,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tcanEditCSS,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nfunction useGlobalStylesOpenRevisionsCommands() {\n\tconst { openGeneralSidebar, setEditorCanvasContainerView, setCanvasMode } =\n\t\tunlock( useDispatch( editSiteStore ) );\n\tconst { getCanvasMode } = unlock( useSelect( editSiteStore ) );\n\tconst { params } = useLocation();\n\tconst history = useHistory();\n\tconst hasRevisions = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\t\treturn !! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count;\n\t}, [] );\n\n\tconst commands = useMemo( () => {\n\t\tif ( ! hasRevisions ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t{\n\t\t\t\tname: 'core/edit-site/open-global-styles-revisions',\n\t\t\t\tlabel: __( 'Style revisions' ),\n\t\t\t\ticon: backup,\n\t\t\t\tcallback: ( { close } ) => {\n\t\t\t\t\tclose();\n\t\t\t\t\tif ( ! params.postId ) {\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpath: '/wp_global_styles',\n\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tif ( params.postId && getCanvasMode() !== 'edit' ) {\n\t\t\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t\t}\n\t\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\t\t},\n\t\t\t},\n\t\t];\n\t}, [\n\t\thasRevisions,\n\t\thistory,\n\t\topenGeneralSidebar,\n\t\tsetEditorCanvasContainerView,\n\t\tgetCanvasMode,\n\t\tsetCanvasMode,\n\t\tparams.postId,\n\t] );\n\n\treturn {\n\t\tisLoading: false,\n\t\tcommands,\n\t};\n}\n\nexport function useCommonCommands() {\n\tconst homeUrl = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn getUnstableBase()?.home;\n\t}, [] );\n\n\tuseCommand( {\n\t\tname: 'core/edit-site/view-site',\n\t\tlabel: __( 'View site' ),\n\t\tcallback: ( { close } ) => {\n\t\t\tclose();\n\t\t\twindow.open( homeUrl, '_blank' );\n\t\t},\n\t\ticon: external,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles',\n\t\thook: useGlobalStylesOpenStylesCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/toggle-styles-welcome-guide',\n\t\thook: useGlobalStylesToggleWelcomeGuideCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/reset-global-styles',\n\t\thook: useGlobalStylesResetCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-css',\n\t\thook: useGlobalStylesOpenCssCommands,\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/open-styles-revisions',\n\t\thook: useGlobalStylesOpenRevisionsCommands,\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst layout = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 5.5H6a.5.5 0 00-.5.5v3h13V6a.5.5 0 00-.5-.5zm.5 5H10v8h8a.5.5 0 00.5-.5v-7.5zm-10 0h-3V18a.5.5 0 00.5.5h2.5v-8zM6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2z\" />\n\t</SVG>\n);\n\nexport default layout;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst page = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M15.5 7.5h-7V9h7V7.5Zm-7 3.5h7v1.5h-7V11Zm7 3.5h-7V16h7v-1.5Z\" />\n\t\t<Path d=\"M17 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM7 5.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5Z\" />\n\t</SVG>\n);\n\nexport default page;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst trash = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 5.5A2.25 2.25 0 0 0 9.878 7h4.244A2.251 2.251 0 0 0 12 5.5ZM12 4a3.751 3.751 0 0 0-3.675 3H5v1.5h1.27l.818 8.997a2.75 2.75 0 0 0 2.739 2.501h4.347a2.75 2.75 0 0 0 2.738-2.5L17.73 8.5H19V7h-3.325A3.751 3.751 0 0 0 12 4Zm4.224 4.5H7.776l.806 8.861a1.25 1.25 0 0 0 1.245 1.137h4.347a1.25 1.25 0 0 0 1.245-1.137l.805-8.861Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default trash;\n","/**\n * WordPress dependencies\n */\nimport { addQueryArgs, getQueryArgs, removeQueryArgs } from '@wordpress/url';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport function useLink( params, state, shouldReplace = false ) {\n\tconst history = useHistory();\n\tfunction onClick( event ) {\n\t\tevent?.preventDefault();\n\n\t\tif ( shouldReplace ) {\n\t\t\thistory.replace( params, state );\n\t\t} else {\n\t\t\thistory.push( params, state );\n\t\t}\n\t}\n\n\tconst currentArgs = getQueryArgs( window.location.href );\n\tconst currentUrlWithoutArgs = removeQueryArgs(\n\t\twindow.location.href,\n\t\t...Object.keys( currentArgs )\n\t);\n\n\tif ( isPreviewingTheme() ) {\n\t\tparams = {\n\t\t\t...params,\n\t\t\twp_theme_preview: currentlyPreviewingTheme(),\n\t\t};\n\t}\n\n\tconst newUrl = addQueryArgs( currentUrlWithoutArgs, params );\n\n\treturn {\n\t\thref: newUrl,\n\t\tonClick,\n\t};\n}\n\nexport default function Link( {\n\tparams = {},\n\tstate,\n\treplace: shouldReplace = false,\n\tchildren,\n\t...props\n} ) {\n\tconst { href, onClick } = useLink( params, state, shouldReplace );\n\n\treturn (\n\t\t<a href={ href } onClick={ onClick } { ...props }>\n\t\t\t{ children }\n\t\t</a>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport { trash, rotateLeft, rotateRight, layout, page } from '@wordpress/icons';\nimport { useCommandLoader } from '@wordpress/commands';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport useEditedEntityRecord from '../../components/use-edited-entity-record';\nimport isTemplateRemovable from '../../utils/is-template-removable';\nimport isTemplateRevertable from '../../utils/is-template-revertable';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\nimport { useLink } from '../../components/routes/link';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction usePageContentFocusCommands() {\n\tconst { record: template } = useEditedEntityRecord();\n\tconst { isPage, canvasMode, templateId, currentPostType } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isPage: _isPage, getCanvasMode } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getCurrentPostType, getCurrentTemplateId } =\n\t\t\t\tselect( editorStore );\n\t\t\treturn {\n\t\t\t\tisPage: _isPage(),\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\ttemplateId: getCurrentTemplateId(),\n\t\t\t\tcurrentPostType: getCurrentPostType(),\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\n\tconst { onClick: editTemplate } = useLink( {\n\t\tpostType: 'wp_template',\n\t\tpostId: templateId,\n\t} );\n\n\tconst { setRenderingMode } = useDispatch( editorStore );\n\n\tif ( ! isPage || canvasMode !== 'edit' ) {\n\t\treturn { isLoading: false, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( currentPostType !== 'wp_template' ) {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-template-focus',\n\t\t\tlabel: sprintf(\n\t\t\t\t/* translators: %s: template title */\n\t\t\t\t__( 'Edit template: %s' ),\n\t\t\t\tdecodeEntities( template.title )\n\t\t\t),\n\t\t\ticon: layout,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\teditTemplate();\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t} else {\n\t\tcommands.push( {\n\t\t\tname: 'core/switch-to-page-focus',\n\t\t\tlabel: __( 'Back to page' ),\n\t\t\ticon: page,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tsetRenderingMode( 'template-locked' );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn { isLoading: false, commands };\n}\n\nfunction useManipulateDocumentCommands() {\n\tconst { isLoaded, record: template } = useEditedEntityRecord();\n\tconst { removeTemplate, revertTemplate } = useDispatch( editSiteStore );\n\tconst history = useHistory();\n\tconst isEditingPage = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editSiteStore ).isPage() &&\n\t\t\tselect( editorStore ).getCurrentPostType() !== 'wp_template',\n\t\t[]\n\t);\n\n\tif ( ! isLoaded ) {\n\t\treturn { isLoading: true, commands: [] };\n\t}\n\n\tconst commands = [];\n\n\tif ( isTemplateRevertable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t__( 'Reset template: %s' ),\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t__( 'Reset template part: %s' ),\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tcommands.push( {\n\t\t\tname: 'core/reset-template',\n\t\t\tlabel,\n\t\t\ticon: isRTL() ? rotateRight : rotateLeft,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\trevertTemplate( template );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\tif ( isTemplateRemovable( template ) && ! isEditingPage ) {\n\t\tconst label =\n\t\t\ttemplate.type === TEMPLATE_POST_TYPE\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: %s: template title */\n\t\t\t\t\t\t__( 'Delete template: %s' ),\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t )\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: %s: template part title */\n\t\t\t\t\t\t__( 'Delete template part: %s' ),\n\t\t\t\t\t\tdecodeEntities( template.title )\n\t\t\t\t );\n\t\tcommands.push( {\n\t\t\tname: 'core/remove-template',\n\t\t\tlabel,\n\t\t\ticon: trash,\n\t\t\tcallback: ( { close } ) => {\n\t\t\t\tremoveTemplate( template );\n\t\t\t\t// Navigate to the template list\n\t\t\t\thistory.push( {\n\t\t\t\t\tpostType: template.type,\n\t\t\t\t} );\n\t\t\t\tclose();\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn {\n\t\tisLoading: ! isLoaded,\n\t\tcommands,\n\t};\n}\n\nexport function useEditModeCommands() {\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/page-content-focus',\n\t\thook: usePageContentFocusCommands,\n\t\tcontext: 'entity-edit',\n\t} );\n\n\tuseCommandLoader( {\n\t\tname: 'core/edit-site/manipulate-document',\n\t\thook: useManipulateDocumentCommands,\n\t} );\n}\n","/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is revertable to its original theme-provided template file.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRevertable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\t/* eslint-disable camelcase */\n\treturn (\n\t\ttemplate?.source === TEMPLATE_ORIGINS.custom && template?.has_theme_file\n\t);\n\t/* eslint-enable camelcase */\n}\n","/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from './constants';\n\n/**\n * Check if a template is removable.\n *\n * @param {Object} template The template entity to check.\n * @return {boolean} Whether the template is revertable.\n */\nexport default function isTemplateRemovable( template ) {\n\tif ( ! template ) {\n\t\treturn false;\n\t}\n\n\treturn (\n\t\ttemplate.source === TEMPLATE_ORIGINS.custom && ! template.has_theme_file\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useMemo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES,\n} from '../../utils/constants';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nconst postTypesWithoutParentTemplate = [\n\tTEMPLATE_POST_TYPE,\n\tTEMPLATE_PART_POST_TYPE,\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES.user,\n];\n\nconst authorizedPostTypes = [ 'page', 'post' ];\n\nfunction useResolveEditedEntityAndContext( { postId, postType } ) {\n\tconst {\n\t\thasLoadedAllDependencies,\n\t\thomepageId,\n\t\tpostsPageId,\n\t\turl,\n\t\tfrontPageTemplateId,\n\t} = useSelect( ( select ) => {\n\t\tconst { getSite, getUnstableBase, getEntityRecords } =\n\t\t\tselect( coreDataStore );\n\t\tconst siteData = getSite();\n\t\tconst base = getUnstableBase();\n\t\tconst templates = getEntityRecords( 'postType', TEMPLATE_POST_TYPE, {\n\t\t\tper_page: -1,\n\t\t} );\n\t\tconst _homepageId =\n\t\t\tsiteData?.show_on_front === 'page' &&\n\t\t\t[ 'number', 'string' ].includes( typeof siteData.page_on_front ) &&\n\t\t\t!! +siteData.page_on_front // We also need to check if it's not zero(`0`).\n\t\t\t\t? siteData.page_on_front.toString()\n\t\t\t\t: null;\n\t\tconst _postsPageId =\n\t\t\tsiteData?.show_on_front === 'page' &&\n\t\t\t[ 'number', 'string' ].includes( typeof siteData.page_for_posts )\n\t\t\t\t? siteData.page_for_posts.toString()\n\t\t\t\t: null;\n\t\tlet _frontPageTemplateId;\n\t\tif ( templates ) {\n\t\t\tconst frontPageTemplate = templates.find(\n\t\t\t\t( t ) => t.slug === 'front-page'\n\t\t\t);\n\t\t\t_frontPageTemplateId = frontPageTemplate\n\t\t\t\t? frontPageTemplate.id\n\t\t\t\t: false;\n\t\t}\n\t\treturn {\n\t\t\thasLoadedAllDependencies: !! base && !! siteData,\n\t\t\thomepageId: _homepageId,\n\t\t\tpostsPageId: _postsPageId,\n\t\t\turl: base?.home,\n\t\t\tfrontPageTemplateId: _frontPageTemplateId,\n\t\t};\n\t}, [] );\n\n\t/**\n\t * This is a hook that recreates the logic to resolve a template for a given WordPress postID postTypeId\n\t * in order to match the frontend as closely as possible in the site editor.\n\t *\n\t * It is not possible to rely on the server logic because there maybe unsaved changes that impact the template resolution.\n\t */\n\tconst resolvedTemplateId = useSelect(\n\t\t( select ) => {\n\t\t\t// If we're rendering a post type that doesn't have a template\n\t\t\t// no need to resolve its template.\n\t\t\tif (\n\t\t\t\tpostTypesWithoutParentTemplate.includes( postType ) &&\n\t\t\t\tpostId\n\t\t\t) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t\tgetEntityRecords,\n\t\t\t\tgetDefaultTemplateId,\n\t\t\t\t__experimentalGetTemplateForLink,\n\t\t\t} = select( coreDataStore );\n\n\t\t\tfunction resolveTemplateForPostTypeAndId(\n\t\t\t\tpostTypeToResolve,\n\t\t\t\tpostIdToResolve\n\t\t\t) {\n\t\t\t\t// For the front page, we always use the front page template if existing.\n\t\t\t\tif (\n\t\t\t\t\tpostTypeToResolve === 'page' &&\n\t\t\t\t\thomepageId === postIdToResolve\n\t\t\t\t) {\n\t\t\t\t\t// We're still checking whether the front page template exists.\n\t\t\t\t\t// Don't resolve the template yet.\n\t\t\t\t\tif ( frontPageTemplateId === undefined ) {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !! frontPageTemplateId ) {\n\t\t\t\t\t\treturn frontPageTemplateId;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst editedEntity = getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostTypeToResolve,\n\t\t\t\t\tpostIdToResolve\n\t\t\t\t);\n\t\t\t\tif ( ! editedEntity ) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\t// Check if the current page is the posts page.\n\t\t\t\tif (\n\t\t\t\t\tpostTypeToResolve === 'page' &&\n\t\t\t\t\tpostsPageId === postIdToResolve\n\t\t\t\t) {\n\t\t\t\t\treturn __experimentalGetTemplateForLink( editedEntity.link )\n\t\t\t\t\t\t?.id;\n\t\t\t\t}\n\t\t\t\t// First see if the post/page has an assigned template and fetch it.\n\t\t\t\tconst currentTemplateSlug = editedEntity.template;\n\t\t\t\tif ( currentTemplateSlug ) {\n\t\t\t\t\tconst currentTemplate = getEntityRecords(\n\t\t\t\t\t\t'postType',\n\t\t\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tper_page: -1,\n\t\t\t\t\t\t}\n\t\t\t\t\t)?.find( ( { slug } ) => slug === currentTemplateSlug );\n\t\t\t\t\tif ( currentTemplate ) {\n\t\t\t\t\t\treturn currentTemplate.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If no template is assigned, use the default template.\n\t\t\t\tlet slugToCheck;\n\t\t\t\t// In `draft` status we might not have a slug available, so we use the `single`\n\t\t\t\t// post type templates slug(ex page, single-post, single-product etc..).\n\t\t\t\t// Pages do not need the `single` prefix in the slug to be prioritized\n\t\t\t\t// through template hierarchy.\n\t\t\t\tif ( editedEntity.slug ) {\n\t\t\t\t\tslugToCheck =\n\t\t\t\t\t\tpostTypeToResolve === 'page'\n\t\t\t\t\t\t\t? `${ postTypeToResolve }-${ editedEntity.slug }`\n\t\t\t\t\t\t\t: `single-${ postTypeToResolve }-${ editedEntity.slug }`;\n\t\t\t\t} else {\n\t\t\t\t\tslugToCheck =\n\t\t\t\t\t\tpostTypeToResolve === 'page'\n\t\t\t\t\t\t\t? 'page'\n\t\t\t\t\t\t\t: `single-${ postTypeToResolve }`;\n\t\t\t\t}\n\t\t\t\treturn getDefaultTemplateId( {\n\t\t\t\t\tslug: slugToCheck,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tif ( ! hasLoadedAllDependencies ) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\t// If we're rendering a specific page, we need to resolve its template.\n\t\t\t// The site editor only supports pages for now, not other CPTs.\n\t\t\tif (\n\t\t\t\tpostType &&\n\t\t\t\tpostId &&\n\t\t\t\tauthorizedPostTypes.includes( postType )\n\t\t\t) {\n\t\t\t\treturn resolveTemplateForPostTypeAndId( postType, postId );\n\t\t\t}\n\n\t\t\t// If we're rendering the home page, and we have a static home page, resolve its template.\n\t\t\tif ( homepageId ) {\n\t\t\t\treturn resolveTemplateForPostTypeAndId( 'page', homepageId );\n\t\t\t}\n\n\t\t\t// If we're not rendering a specific page, use the front page template.\n\t\t\tif ( url ) {\n\t\t\t\tconst template = __experimentalGetTemplateForLink( url );\n\t\t\t\treturn template?.id;\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\thomepageId,\n\t\t\tpostsPageId,\n\t\t\thasLoadedAllDependencies,\n\t\t\turl,\n\t\t\tpostId,\n\t\t\tpostType,\n\t\t\tfrontPageTemplateId,\n\t\t]\n\t);\n\n\tconst context = useMemo( () => {\n\t\tif ( postTypesWithoutParentTemplate.includes( postType ) && postId ) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif ( postType && postId && authorizedPostTypes.includes( postType ) ) {\n\t\t\treturn { postType, postId };\n\t\t}\n\t\t// TODO: for post types lists we should probably not render the front page, but maybe a placeholder\n\t\t// with a message like \"Select a page\" or something similar.\n\t\tif ( homepageId ) {\n\t\t\treturn { postType: 'page', postId: homepageId };\n\t\t}\n\n\t\treturn {};\n\t}, [ homepageId, postType, postId ] );\n\n\tif ( postTypesWithoutParentTemplate.includes( postType ) && postId ) {\n\t\treturn { isReady: true, postType, postId, context };\n\t}\n\n\tif ( hasLoadedAllDependencies ) {\n\t\treturn {\n\t\t\tisReady: resolvedTemplateId !== undefined,\n\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\tpostId: resolvedTemplateId,\n\t\t\tcontext,\n\t\t};\n\t}\n\n\treturn { isReady: false };\n}\n\nexport default function useInitEditedEntityFromURL() {\n\tconst { params = {} } = useLocation();\n\tconst { postType, postId, context, isReady } =\n\t\tuseResolveEditedEntityAndContext( params );\n\n\tconst { setEditedEntity } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( isReady ) {\n\t\t\tsetEditedEntity( postType, postId, context );\n\t\t}\n\t}, [ isReady, postType, postId, context, setEditedEntity ] );\n}\n","export default function WelcomeGuideImage( { nonAnimatedSrc, animatedSrc } ) {\n\treturn (\n\t\t<picture className=\"edit-site-welcome-guide__image\">\n\t\t\t<source\n\t\t\t\tsrcSet={ nonAnimatedSrc }\n\t\t\t\tmedia=\"(prefers-reduced-motion: reduce)\"\n\t\t\t/>\n\t\t\t<img src={ animatedSrc } width=\"312\" height=\"240\" alt=\"\" />\n\t\t</picture>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\n\nexport default function WelcomeGuideEditor() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isBlockBasedTheme } = useSelect( ( select ) => {\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuide'\n\t\t\t),\n\t\t\tisBlockBasedTheme:\n\t\t\t\tselect( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isBlockBasedTheme ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-editor\"\n\t\t\tcontentLabel={ __( 'Welcome to the site editor' ) }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/edit-your-site.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Edit your site' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Design everything on your site — from the header right down to the footer — using blocks.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t\t\t'Click <StylesIconImage /> to start designing your blocks, and choose your typography, layout, and colors.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tStylesIconImage: (\n\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\talt={ __( 'styles' ) }\n\t\t\t\t\t\t\t\t\t\t\t\tsrc=\"data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z' fill='%231E1E1E'/%3E%3C/svg%3E%0A\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\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 { useDispatch, useSelect } from '@wordpress/data';\nimport { ExternalLink, Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuideImage from './image';\nimport { unlock } from '../../lock-unlock';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\nexport default function WelcomeGuideStyles() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst { isActive, isStylesOpen } = useSelect( ( select ) => {\n\t\tconst sidebar =\n\t\t\tselect( interfaceStore ).getActiveComplementaryArea( 'core' );\n\n\t\treturn {\n\t\t\tisActive: !! select( preferencesStore ).get(\n\t\t\t\t'core/edit-site',\n\t\t\t\t'welcomeGuideStyles'\n\t\t\t),\n\t\t\tisStylesOpen: sidebar === 'edit-site/global-styles',\n\t\t};\n\t}, [] );\n\n\tif ( ! isActive || ! isStylesOpen ) {\n\t\treturn null;\n\t}\n\n\tconst welcomeLabel = __( 'Welcome to Styles' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-styles\"\n\t\t\tcontentLabel={ welcomeLabel }\n\t\t\tfinishButtonText={ __( 'Get started' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuideStyles' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-to-styles.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-to-styles.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ welcomeLabel }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Tweak your site, or give it a whole new look! Get creative — how about a new color palette for your buttons, or choosing a new font? Take a look at what you can do here.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/set-the-design.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/set-the-design.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Set the design' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'You can customize your site as much as you like with different colors, typography, and layouts. Or if you prefer, just leave it up to your theme to handle!'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/personalize-blocks.svg?1\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/personalize-blocks.gif?1\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Personalize blocks' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'You can adjust your blocks to ensure a cohesive experience across your site — add your unique colors to a branded Button block, or adjust the Heading block to your preferred size.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<WelcomeGuideImage\n\t\t\t\t\t\t\tnonAnimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.svg\"\n\t\t\t\t\t\t\tanimatedSrc=\"https://s.w.org/images/block-editor/welcome-documentation.gif\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ __( 'Learn more' ) }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'New to block themes and styling your site?'\n\t\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\thref={ __(\n\t\t\t\t\t\t\t\t\t\t'https://wordpress.org/documentation/article/styles-overview/'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'Here’s a detailed guide to learn how to make the most of it.'\n\t\t\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</p>\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 * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuidePage() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isPageActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuidePage'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\tconst { isPage } = select( editSiteStore );\n\t\treturn isPageActive && ! isEditorActive && isPage();\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a page' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-page\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () => toggle( 'core/edit-site', 'welcomeGuidePage' ) }\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-page.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'It’s now possible to edit page content in the site editor. To customise other parts of the page like the header and footer switch to editing the template using the settings sidebar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Guide } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\n\nexport default function WelcomeGuideTemplate() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\tconst isVisible = useSelect( ( select ) => {\n\t\tconst isTemplateActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuideTemplate'\n\t\t);\n\t\tconst isEditorActive = !! select( preferencesStore ).get(\n\t\t\t'core/edit-site',\n\t\t\t'welcomeGuide'\n\t\t);\n\t\tconst { isPage } = select( editSiteStore );\n\t\tconst { getCurrentPostType } = select( editorStore );\n\t\treturn (\n\t\t\tisTemplateActive &&\n\t\t\t! isEditorActive &&\n\t\t\tisPage() &&\n\t\t\tgetCurrentPostType() === 'wp_template'\n\t\t);\n\t}, [] );\n\n\tif ( ! isVisible ) {\n\t\treturn null;\n\t}\n\n\tconst heading = __( 'Editing a template' );\n\n\treturn (\n\t\t<Guide\n\t\t\tclassName=\"edit-site-welcome-guide guide-template\"\n\t\t\tcontentLabel={ heading }\n\t\t\tfinishButtonText={ __( 'Continue' ) }\n\t\t\tonFinish={ () =>\n\t\t\t\ttoggle( 'core/edit-site', 'welcomeGuideTemplate' )\n\t\t\t}\n\t\t\tpages={ [\n\t\t\t\t{\n\t\t\t\t\timage: (\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclassName=\"edit-site-welcome-guide__video\"\n\t\t\t\t\t\t\tautoPlay\n\t\t\t\t\t\t\tloop\n\t\t\t\t\t\t\tmuted\n\t\t\t\t\t\t\twidth=\"312\"\n\t\t\t\t\t\t\theight=\"240\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<source\n\t\t\t\t\t\t\t\tsrc=\"https://s.w.org/images/block-editor/editing-your-template.mp4\"\n\t\t\t\t\t\t\t\ttype=\"video/mp4\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</video>\n\t\t\t\t\t),\n\t\t\t\t\tcontent: (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<h1 className=\"edit-site-welcome-guide__heading\">\n\t\t\t\t\t\t\t\t{ heading }\n\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t<p className=\"edit-site-welcome-guide__text\">\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Note that the same template can be used by multiple pages, so any changes made here may affect other pages on the site. To switch back to editing the page content click the ‘Back’ button in the toolbar.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</>\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t] }\n\t\t/>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport WelcomeGuideEditor from './editor';\nimport WelcomeGuideStyles from './styles';\nimport WelcomeGuidePage from './page';\nimport WelcomeGuideTemplate from './template';\n\nexport default function WelcomeGuide() {\n\treturn (\n\t\t<>\n\t\t\t<WelcomeGuideEditor />\n\t\t\t<WelcomeGuideStyles />\n\t\t\t<WelcomeGuidePage />\n\t\t\t<WelcomeGuideTemplate />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst { useGlobalStylesOutput } = unlock( blockEditorPrivateApis );\n\nfunction useGlobalStylesRenderer() {\n\tconst postType = useSelect( ( select ) => {\n\t\treturn select( editSiteStore ).getEditedPostType();\n\t} );\n\tconst [ styles, settings ] = useGlobalStylesOutput(\n\t\tpostType !== TEMPLATE_POST_TYPE\n\t);\n\tconst { getSettings } = useSelect( editSiteStore );\n\tconst { updateSettings } = useDispatch( editSiteStore );\n\n\tuseEffect( () => {\n\t\tif ( ! styles || ! settings ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentStoreSettings = getSettings();\n\t\tconst nonGlobalStyles = Object.values(\n\t\t\tcurrentStoreSettings.styles ?? []\n\t\t).filter( ( style ) => ! style.isGlobalStyles );\n\t\tupdateSettings( {\n\t\t\t...currentStoreSettings,\n\t\t\tstyles: [ ...nonGlobalStyles, ...styles ],\n\t\t\t__experimentalFeatures: settings,\n\t\t} );\n\t}, [ styles, settings, updateSettings, getSettings ] );\n}\n\nexport function GlobalStylesRenderer() {\n\tuseGlobalStylesRenderer();\n\n\treturn null;\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\tprivateApis as componentsPrivateApis,\n\tProgressBar,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from '../global-styles/hooks';\n\nconst { Theme } = unlock( componentsPrivateApis );\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function CanvasLoader( { id } ) {\n\tconst [ fallbackIndicatorColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst indicatorColor =\n\t\thighlightedColors[ 0 ]?.color ?? fallbackIndicatorColor;\n\tconst { elapsed, total } = useSelect( ( select ) => {\n\t\tconst selectorsByStatus = select( coreStore ).countSelectorsByStatus();\n\t\tconst resolving = selectorsByStatus.resolving ?? 0;\n\t\tconst finished = selectorsByStatus.finished ?? 0;\n\t\treturn {\n\t\t\telapsed: finished,\n\t\t\ttotal: finished + resolving,\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<div className=\"edit-site-canvas-loader\">\n\t\t\t<Theme accent={ indicatorColor } background={ backgroundColor }>\n\t\t\t\t<ProgressBar id={ id } max={ total } value={ elapsed } />\n\t\t\t</Theme>\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function useNavigateToEntityRecord() {\n\tconst history = useHistory();\n\n\tconst onNavigateToEntityRecord = useCallback(\n\t\t( params ) => {\n\t\t\thistory.push( { ...params, focusMode: true, canvas: 'edit' } );\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn onNavigateToEntityRecord;\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport useNavigateToEntityRecord from './use-navigate-to-entity-record';\nimport { FOCUSABLE_ENTITIES } from '../../utils/constants';\n\nconst { useBlockEditorSettings } = unlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction useNavigateToPreviousEntityRecord() {\n\tconst location = useLocation();\n\tconst previousLocation = usePrevious( location );\n\tconst history = useHistory();\n\tconst goBack = useMemo( () => {\n\t\tconst isFocusMode =\n\t\t\tlocation.params.focusMode ||\n\t\t\t( location.params.postId &&\n\t\t\t\tFOCUSABLE_ENTITIES.includes( location.params.postType ) );\n\t\tconst didComeFromEditorCanvas =\n\t\t\tpreviousLocation?.params.canvas === 'edit';\n\t\tconst showBackButton = isFocusMode && didComeFromEditorCanvas;\n\t\treturn showBackButton ? () => history.back() : undefined;\n\t\t// Disable reason: previousLocation changes when the component updates for any reason, not\n\t\t// just when location changes. Until this is fixed we can't add it to deps. See\n\t\t// https://github.com/WordPress/gutenberg/pull/58710#discussion_r1479219465.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ location, history ] );\n\treturn goBack;\n}\n\nexport function useSpecificEditorSettings() {\n\tconst onNavigateToEntityRecord = useNavigateToEntityRecord();\n\tconst { canvasMode, settings, shouldUseTemplateAsDefaultRenderingMode } =\n\t\tuseSelect( ( select ) => {\n\t\t\tconst { getEditedPostContext, getCanvasMode, getSettings } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst _context = getEditedPostContext();\n\t\t\treturn {\n\t\t\t\tcanvasMode: getCanvasMode(),\n\t\t\t\tsettings: getSettings(),\n\t\t\t\t// TODO: The `postType` check should be removed when the default rendering mode per post type is merged.\n\t\t\t\t// @see https://github.com/WordPress/gutenberg/pull/62304/\n\t\t\t\tshouldUseTemplateAsDefaultRenderingMode:\n\t\t\t\t\t_context?.postId && _context?.postType !== 'post',\n\t\t\t};\n\t\t}, [] );\n\tconst defaultRenderingMode = shouldUseTemplateAsDefaultRenderingMode\n\t\t? 'template-locked'\n\t\t: 'post-only';\n\tconst onNavigateToPreviousEntityRecord =\n\t\tuseNavigateToPreviousEntityRecord();\n\tconst defaultEditorSettings = useMemo( () => {\n\t\treturn {\n\t\t\t...settings,\n\n\t\t\trichEditingEnabled: true,\n\t\t\tsupportsTemplateMode: true,\n\t\t\tfocusMode: canvasMode !== 'view',\n\t\t\tdefaultRenderingMode,\n\t\t\tonNavigateToEntityRecord,\n\t\t\tonNavigateToPreviousEntityRecord,\n\t\t\t__unstableIsPreviewMode: canvasMode === 'view',\n\t\t};\n\t}, [\n\t\tsettings,\n\t\tcanvasMode,\n\t\tdefaultRenderingMode,\n\t\tonNavigateToEntityRecord,\n\t\tonNavigateToPreviousEntityRecord,\n\t] );\n\n\treturn defaultEditorSettings;\n}\n\nexport default function useSiteEditorSettings() {\n\tconst defaultEditorSettings = useSpecificEditorSettings();\n\tconst { postType, postId } = useSelect( ( select ) => {\n\t\tconst { getEditedPostType, getEditedPostId } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst usedPostType = getEditedPostType();\n\t\tconst usedPostId = getEditedPostId();\n\t\treturn {\n\t\t\tpostType: usedPostType,\n\t\t\tpostId: usedPostId,\n\t\t};\n\t}, [] );\n\treturn useBlockEditorSettings( defaultEditorSettings, postType, postId );\n}\n","/**\n * Defines an extensibility slot for the Template sidebar.\n */\n\n/**\n * WordPress dependencies\n */\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { createSlotFill } from '@wordpress/components';\nimport deprecated from '@wordpress/deprecated';\n\nconst { Fill, Slot } = createSlotFill( 'PluginTemplateSettingPanel' );\n\nconst PluginTemplateSettingPanel = ( { children } ) => {\n\tdeprecated( 'wp.editSite.PluginTemplateSettingPanel', {\n\t\tsince: '6.6',\n\t\tversion: '6.8',\n\t\talternative: 'wp.editor.PluginDocumentSettingPanel',\n\t} );\n\tconst isCurrentEntityTemplate = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getCurrentPostType() === 'wp_template',\n\t\t[]\n\t);\n\tif ( ! isCurrentEntityTemplate ) {\n\t\treturn null;\n\t}\n\treturn <Fill>{ children }</Fill>;\n};\n\nPluginTemplateSettingPanel.Slot = Slot;\n\n/**\n * Renders items in the Template Sidebar below the main information\n * like the Template Card.\n *\n * @deprecated since 6.6. Use `wp.editor.PluginDocumentSettingPanel` instead.\n *\n * @example\n * ```jsx\n * // Using ESNext syntax\n * import { PluginTemplateSettingPanel } from '@wordpress/edit-site';\n *\n * const MyTemplateSettingTest = () => (\n * \t\t<PluginTemplateSettingPanel>\n *\t\t\t<p>Hello, World!</p>\n *\t\t</PluginTemplateSettingPanel>\n *\t);\n * ```\n *\n * @return {Component} The component to be rendered.\n */\nexport default PluginTemplateSettingPanel;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst seen = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M3.99961 13C4.67043 13.3354 4.6703 13.3357 4.67017 13.3359L4.67298 13.3305C4.67621 13.3242 4.68184 13.3135 4.68988 13.2985C4.70595 13.2686 4.7316 13.2218 4.76695 13.1608C4.8377 13.0385 4.94692 12.8592 5.09541 12.6419C5.39312 12.2062 5.84436 11.624 6.45435 11.0431C7.67308 9.88241 9.49719 8.75 11.9996 8.75C14.502 8.75 16.3261 9.88241 17.5449 11.0431C18.1549 11.624 18.6061 12.2062 18.9038 12.6419C19.0523 12.8592 19.1615 13.0385 19.2323 13.1608C19.2676 13.2218 19.2933 13.2686 19.3093 13.2985C19.3174 13.3135 19.323 13.3242 19.3262 13.3305L19.3291 13.3359C19.3289 13.3357 19.3288 13.3354 19.9996 13C20.6704 12.6646 20.6703 12.6643 20.6701 12.664L20.6697 12.6632L20.6688 12.6614L20.6662 12.6563L20.6583 12.6408C20.6517 12.6282 20.6427 12.6108 20.631 12.5892C20.6078 12.5459 20.5744 12.4852 20.5306 12.4096C20.4432 12.2584 20.3141 12.0471 20.1423 11.7956C19.7994 11.2938 19.2819 10.626 18.5794 9.9569C17.1731 8.61759 14.9972 7.25 11.9996 7.25C9.00203 7.25 6.82614 8.61759 5.41987 9.9569C4.71736 10.626 4.19984 11.2938 3.85694 11.7956C3.68511 12.0471 3.55605 12.2584 3.4686 12.4096C3.42484 12.4852 3.39142 12.5459 3.36818 12.5892C3.35656 12.6108 3.34748 12.6282 3.34092 12.6408L3.33297 12.6563L3.33041 12.6614L3.32948 12.6632L3.32911 12.664C3.32894 12.6643 3.32879 12.6646 3.99961 13ZM11.9996 16C13.9326 16 15.4996 14.433 15.4996 12.5C15.4996 10.567 13.9326 9 11.9996 9C10.0666 9 8.49961 10.567 8.49961 12.5C8.49961 14.433 10.0666 16 11.9996 16Z\" />\n\t</SVG>\n);\n\nexport default seen;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst moreVertical = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z\" />\n\t</SVG>\n);\n\nexport default moreVertical;\n","/**\n * WordPress dependencies\n */\nimport { 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 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 * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\n\nexport function IconWithCurrentColor( { className, ...props } ) {\n\treturn (\n\t\t<Icon\n\t\t\tclassName={ clsx(\n\t\t\t\tclassName,\n\t\t\t\t'edit-site-global-styles-icon-with-current-color'\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorButton as NavigatorButton,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalItem as Item,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\n\nfunction GenericNavigationButton( { icon, children, ...props } ) {\n\treturn (\n\t\t<Item { ...props }>\n\t\t\t{ icon && (\n\t\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t\t<IconWithCurrentColor icon={ icon } size={ 24 } />\n\t\t\t\t\t<FlexItem>{ children }</FlexItem>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ ! icon && children }\n\t\t</Item>\n\t);\n}\n\nfunction NavigationButtonAsItem( props ) {\n\treturn <NavigatorButton as={ GenericNavigationButton } { ...props } />;\n}\n\nfunction NavigationBackButtonAsItem( props ) {\n\treturn (\n\t\t<NavigatorToParentButton as={ GenericNavigationButton } { ...props } />\n\t);\n}\n\nexport { NavigationButtonAsItem, NavigationBackButtonAsItem };\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst typography = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6.9 7L3 17.8h1.7l1-2.8h4.1l1 2.8h1.7L8.6 7H6.9zm-.7 6.6l1.5-4.3 1.5 4.3h-3zM21.6 17c-.1.1-.2.2-.3.2-.1.1-.2.1-.4.1s-.3-.1-.4-.2c-.1-.1-.1-.3-.1-.6V12c0-.5 0-1-.1-1.4-.1-.4-.3-.7-.5-1-.2-.2-.5-.4-.9-.5-.4 0-.8-.1-1.3-.1s-1 .1-1.4.2c-.4.1-.7.3-1 .4-.2.2-.4.3-.6.5-.1.2-.2.4-.2.7 0 .3.1.5.2.8.2.2.4.3.8.3.3 0 .6-.1.8-.3.2-.2.3-.4.3-.7 0-.3-.1-.5-.2-.7-.2-.2-.4-.3-.6-.4.2-.2.4-.3.7-.4.3-.1.6-.1.8-.1.3 0 .6 0 .8.1.2.1.4.3.5.5.1.2.2.5.2.9v1.1c0 .3-.1.5-.3.6-.2.2-.5.3-.9.4-.3.1-.7.3-1.1.4-.4.1-.8.3-1.1.5-.3.2-.6.4-.8.7-.2.3-.3.7-.3 1.2 0 .6.2 1.1.5 1.4.3.4.9.5 1.6.5.5 0 1-.1 1.4-.3.4-.2.8-.6 1.1-1.1 0 .4.1.7.3 1 .2.3.6.4 1.2.4.4 0 .7-.1.9-.2.2-.1.5-.3.7-.4h-.3zm-3-.9c-.2.4-.5.7-.8.8-.3.2-.6.2-.8.2-.4 0-.6-.1-.9-.3-.2-.2-.3-.6-.3-1.1 0-.5.1-.9.3-1.2s.5-.5.8-.7c.3-.2.7-.3 1-.5.3-.1.6-.3.7-.6v3.4z\" />\n\t</SVG>\n);\n\nexport default typography;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst color = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.2 10.9c-.5-1-1.2-2.1-2.1-3.2-.6-.9-1.3-1.7-2.1-2.6L12 4l-1 1.1c-.6.9-1.3 1.7-2 2.6-.8 1.2-1.5 2.3-2 3.2-.6 1.2-1 2.2-1 3 0 3.4 2.7 6.1 6.1 6.1s6.1-2.7 6.1-6.1c0-.8-.3-1.8-1-3zm-5.1 7.6c-2.5 0-4.6-2.1-4.6-4.6 0-.3.1-1 .8-2.3.5-.9 1.1-1.9 2-3.1.7-.9 1.3-1.7 1.8-2.3.7.8 1.3 1.6 1.8 2.3.8 1.1 1.5 2.2 2 3.1.7 1.3.8 2 .8 2.3 0 2.5-2.1 4.6-4.6 4.6z\" />\n\t</SVG>\n);\n\nexport default color;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst shadow = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M12 8c-2.2 0-4 1.8-4 4s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4zm0 6.5c-1.4 0-2.5-1.1-2.5-2.5s1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5-1.1 2.5-2.5 2.5zM12.8 3h-1.5v3h1.5V3zm-1.6 18h1.5v-3h-1.5v3zm6.8-9.8v1.5h3v-1.5h-3zm-12 0H3v1.5h3v-1.5zm9.7 5.6 2.1 2.1 1.1-1.1-2.1-2.1-1.1 1.1zM8.3 7.2 6.2 5.1 5.1 6.2l2.1 2.1 1.1-1.1zM5.1 17.8l1.1 1.1 2.1-2.1-1.1-1.1-2.1 2.1zM18.9 6.2l-1.1-1.1-2.1 2.1 1.1 1.1 2.1-2.1z\" />\n\t</SVG>\n);\n\nexport default shadow;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport {\n\ttypography,\n\tcolor,\n\tlayout,\n\tshadow as shadowIcon,\n} from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasColorPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n} = unlock( blockEditorPrivateApis );\n\nfunction RootMenu() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasShadowPanel = true; // useHasShadowPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasDimensionsPanel;\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ hasTypographyPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ typography }\n\t\t\t\t\t\tpath=\"/typography\"\n\t\t\t\t\t\taria-label={ __( 'Typography styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Typography' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasColorPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ color }\n\t\t\t\t\t\tpath=\"/colors\"\n\t\t\t\t\t\taria-label={ __( 'Colors styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Colors' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasShadowPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ shadowIcon }\n\t\t\t\t\t\tpath=\"/shadows\"\n\t\t\t\t\t\taria-label={ __( 'Shadow styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Shadows' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t\t{ hasLayoutPanel && (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\tpath=\"/layout\"\n\t\t\t\t\t\taria-label={ __( 'Layout styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Layout' ) }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nexport default RootMenu;\n","function findNearest( input, numbers ) {\n\t// If the numbers array is empty, return null\n\tif ( numbers.length === 0 ) {\n\t\treturn null;\n\t}\n\t// Sort the array based on the absolute difference with the input\n\tnumbers.sort( ( a, b ) => Math.abs( input - a ) - Math.abs( input - b ) );\n\t// Return the first element (which will be the nearest) from the sorted array\n\treturn numbers[ 0 ];\n}\n\nfunction extractFontWeights( fontFaces ) {\n\tconst result = [];\n\n\tfontFaces.forEach( ( face ) => {\n\t\tconst weights = String( face.fontWeight ).split( ' ' );\n\n\t\tif ( weights.length === 2 ) {\n\t\t\tconst start = parseInt( weights[ 0 ] );\n\t\t\tconst end = parseInt( weights[ 1 ] );\n\n\t\t\tfor ( let i = start; i <= end; i += 100 ) {\n\t\t\t\tresult.push( i );\n\t\t\t}\n\t\t} else if ( weights.length === 1 ) {\n\t\t\tresult.push( parseInt( weights[ 0 ] ) );\n\t\t}\n\t} );\n\n\treturn result;\n}\n\n/*\n * Format the font family to use in the CSS font-family property of a CSS rule.\n *\n * The input can be a string with the font family name or a string with multiple font family names separated by commas.\n * It follows the recommendations from the CSS Fonts Module Level 4.\n * https://www.w3.org/TR/css-fonts-4/#font-family-prop\n *\n * @param {string} input - The font family.\n * @return {string} The formatted font family.\n *\n * Example:\n * formatFontFamily( \"Open Sans, Font+Name, sans-serif\" ) => '\"Open Sans\", \"Font+Name\", sans-serif'\n * formatFontFamily( \"'Open Sans', generic(kai), sans-serif\" ) => '\"Open Sans\", sans-serif'\n * formatFontFamily( \"DotGothic16, Slabo 27px, serif\" ) => '\"DotGothic16\",\"Slabo 27px\",serif'\n * formatFontFamily( \"Mine's, Moe's Typography\" ) => `\"mine's\",\"Moe's Typography\"`\n */\nexport function formatFontFamily( input ) {\n\t// Matches strings that are not exclusively alphabetic characters or hyphens, and do not exactly follow the pattern generic(alphabetic characters or hyphens).\n\tconst regex = /^(?!generic\\([ a-zA-Z\\-]+\\)$)(?!^[a-zA-Z\\-]+$).+/;\n\tconst output = input.trim();\n\n\tconst formatItem = ( item ) => {\n\t\titem = item.trim();\n\t\tif ( item.match( regex ) ) {\n\t\t\t// removes leading and trailing quotes.\n\t\t\titem = item.replace( /^[\"']|[\"']$/g, '' );\n\t\t\treturn `\"${ item }\"`;\n\t\t}\n\t\treturn item;\n\t};\n\n\tif ( output.includes( ',' ) ) {\n\t\treturn output\n\t\t\t.split( ',' )\n\t\t\t.map( formatItem )\n\t\t\t.filter( ( item ) => item !== '' )\n\t\t\t.join( ', ' );\n\t}\n\n\treturn formatItem( output );\n}\n\n/*\n * Format the font face name to use in the font-family property of a font face.\n *\n * The input can be a string with the font face name or a string with multiple font face names separated by commas.\n * It removes the leading and trailing quotes from the font face name.\n *\n * @param {string} input - The font face name.\n * @return {string} The formatted font face name.\n *\n * Example:\n * formatFontFaceName(\"Open Sans\") => \"Open Sans\"\n * formatFontFaceName(\"'Open Sans', sans-serif\") => \"Open Sans\"\n * formatFontFaceName(\", 'Open Sans', 'Helvetica Neue', sans-serif\") => \"Open Sans\"\n */\nexport function formatFontFaceName( input ) {\n\tif ( ! input ) {\n\t\treturn '';\n\t}\n\n\tlet output = input.trim();\n\tif ( output.includes( ',' ) ) {\n\t\toutput = output\n\t\t\t.split( ',' )\n\t\t\t// finds the first item that is not an empty string.\n\t\t\t.find( ( item ) => item.trim() !== '' )\n\t\t\t.trim();\n\t}\n\t// removes leading and trailing quotes.\n\toutput = output.replace( /^[\"']|[\"']$/g, '' );\n\n\t// Firefox needs the font name to be wrapped in double quotes meanwhile other browsers don't.\n\tif ( window.navigator.userAgent.toLowerCase().includes( 'firefox' ) ) {\n\t\toutput = `\"${ output }\"`;\n\t}\n\treturn output;\n}\n\nexport function getFamilyPreviewStyle( family ) {\n\tconst style = { fontFamily: formatFontFamily( family.fontFamily ) };\n\n\tif ( ! Array.isArray( family.fontFace ) ) {\n\t\tstyle.fontWeight = '400';\n\t\tstyle.fontStyle = 'normal';\n\t\treturn style;\n\t}\n\n\tif ( family.fontFace ) {\n\t\t//get all the font faces with normal style\n\t\tconst normalFaces = family.fontFace.filter(\n\t\t\t( face ) =>\n\t\t\t\tface?.fontStyle && face.fontStyle.toLowerCase() === 'normal'\n\t\t);\n\t\tif ( normalFaces.length > 0 ) {\n\t\t\tstyle.fontStyle = 'normal';\n\t\t\tconst normalWeights = extractFontWeights( normalFaces );\n\t\t\tconst nearestWeight = findNearest( 400, normalWeights );\n\t\t\tstyle.fontWeight = String( nearestWeight ) || '400';\n\t\t} else {\n\t\t\tstyle.fontStyle =\n\t\t\t\t( family.fontFace.length && family.fontFace[ 0 ].fontStyle ) ||\n\t\t\t\t'normal';\n\t\t\tstyle.fontWeight =\n\t\t\t\t( family.fontFace.length &&\n\t\t\t\t\tString( family.fontFace[ 0 ].fontWeight ) ) ||\n\t\t\t\t'400';\n\t\t}\n\t}\n\n\treturn style;\n}\n\nexport function getFacePreviewStyle( face ) {\n\treturn {\n\t\tfontFamily: formatFontFamily( face.fontFamily ),\n\t\tfontStyle: face.fontStyle || 'normal',\n\t\tfontWeight: face.fontWeight || '400',\n\t};\n}\n","/**\n *\n * @param {string} variation The variation name.\n *\n * @return {string} The variation class name.\n */\nexport function getVariationClassName( variation ) {\n\tif ( ! variation ) {\n\t\treturn '';\n\t}\n\treturn `is-style-${ variation }`;\n}\n\n/**\n * Iterates through the presets array and searches for slugs that start with the specified\n * slugPrefix followed by a numerical suffix. It identifies the highest numerical suffix found\n * and returns one greater than the highest found suffix, ensuring that the new index is unique.\n *\n * @param {Array} presets The array of preset objects, each potentially containing a slug property.\n * @param {string} slugPrefix The prefix to look for in the preset slugs.\n *\n * @return {number} The next available index for a preset with the specified slug prefix, or 1 if no matching slugs are found.\n */\nexport function getNewIndexFromPresets( presets, slugPrefix ) {\n\tconst nameRegex = new RegExp( `^${ slugPrefix }([\\\\d]+)$` );\n\tconst highestPresetValue = presets.reduce( ( currentHighest, preset ) => {\n\t\tif ( typeof preset?.slug === 'string' ) {\n\t\t\tconst matches = preset?.slug.match( nameRegex );\n\t\t\tif ( matches ) {\n\t\t\t\tconst id = parseInt( matches[ 1 ], 10 );\n\t\t\t\tif ( id > currentHighest ) {\n\t\t\t\t\treturn id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn currentHighest;\n\t}, 0 );\n\treturn highestPresetValue + 1;\n}\n\nfunction getFontFamilyFromSetting( fontFamilies, setting ) {\n\tif ( ! Array.isArray( fontFamilies ) || ! setting ) {\n\t\treturn null;\n\t}\n\n\tconst fontFamilyVariable = setting.replace( 'var(', '' ).replace( ')', '' );\n\tconst fontFamilySlug = fontFamilyVariable?.split( '--' ).slice( -1 )[ 0 ];\n\n\treturn fontFamilies.find(\n\t\t( fontFamily ) => fontFamily.slug === fontFamilySlug\n\t);\n}\n\nexport function getFontFamilies( themeJson ) {\n\tconst fontFamilies = themeJson?.settings?.typography?.fontFamilies?.theme; // TODO this could not be under theme.\n\tconst bodyFontFamilySetting = themeJson?.styles?.typography?.fontFamily;\n\tconst bodyFontFamily = getFontFamilyFromSetting(\n\t\tfontFamilies,\n\t\tbodyFontFamilySetting\n\t);\n\n\tconst headingFontFamilySetting =\n\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily;\n\n\tlet headingFontFamily;\n\tif ( ! headingFontFamilySetting ) {\n\t\theadingFontFamily = bodyFontFamily;\n\t} else {\n\t\theadingFontFamily = getFontFamilyFromSetting(\n\t\t\tfontFamilies,\n\t\t\tthemeJson?.styles?.elements?.heading?.typography?.fontFamily\n\t\t);\n\t}\n\n\treturn [ bodyFontFamily, headingFontFamily ];\n}\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport { _x } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\nimport { getFontFamilies } from './utils';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nexport default function PreviewTypography( { fontSize, variation } ) {\n\tconst { base } = useContext( GlobalStylesContext );\n\tlet config = base;\n\tif ( variation ) {\n\t\tconfig = mergeBaseAndUserConfigs( base, variation );\n\t}\n\tconst [ bodyFontFamilies, headingFontFamilies ] = getFontFamilies( config );\n\tconst bodyPreviewStyle = bodyFontFamilies\n\t\t? getFamilyPreviewStyle( bodyFontFamilies )\n\t\t: {};\n\tconst headingPreviewStyle = headingFontFamilies\n\t\t? getFamilyPreviewStyle( headingFontFamilies )\n\t\t: {};\n\n\tif ( fontSize ) {\n\t\tbodyPreviewStyle.fontSize = fontSize;\n\t\theadingPreviewStyle.fontSize = fontSize;\n\t}\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: 0.3,\n\t\t\t\ttype: 'tween',\n\t\t\t} }\n\t\t\tstyle={ {\n\t\t\t\ttextAlign: 'center',\n\t\t\t} }\n\t\t>\n\t\t\t<span style={ headingPreviewStyle }>\n\t\t\t\t{ _x( 'A', 'Uppercase letter A' ) }\n\t\t\t</span>\n\t\t\t<span style={ bodyPreviewStyle }>\n\t\t\t\t{ _x( 'a', 'Lowercase letter A' ) }\n\t\t\t</span>\n\t\t</motion.div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __unstableMotion as motion } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function HighlightedColors( {\n\tnormalizedColorSwatchSize,\n\tratio,\n} ) {\n\tconst { highlightedColors } = useStylesPreviewColors();\n\tconst scaledSwatchSize = normalizedColorSwatchSize * ratio;\n\treturn highlightedColors.map( ( { slug, color }, index ) => (\n\t\t<motion.div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\theight: scaledSwatchSize,\n\t\t\t\twidth: scaledSwatchSize,\n\t\t\t\tbackground: color,\n\t\t\t\tborderRadius: scaledSwatchSize / 2,\n\t\t\t} }\n\t\t\tanimate={ {\n\t\t\t\tscale: 1,\n\t\t\t\topacity: 1,\n\t\t\t} }\n\t\t\tinitial={ {\n\t\t\t\tscale: 0.1,\n\t\t\t\topacity: 0,\n\t\t\t} }\n\t\t\ttransition={ {\n\t\t\t\tdelay: index === 1 ? 0.2 : 0.1,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__unstableIframe as Iframe,\n\t__unstableEditorStyles as EditorStyles,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __unstableMotion as motion } from '@wordpress/components';\nimport {\n\tuseThrottle,\n\tuseReducedMotion,\n\tuseResizeObserver,\n} from '@wordpress/compose';\nimport { useLayoutEffect, useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle, useGlobalStylesOutput } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst normalizedWidth = 248;\nconst normalizedHeight = 152;\n\n// Throttle options for useThrottle. Must be defined outside of the component,\n// so that the object reference is the same on each render.\nconst THROTTLE_OPTIONS = {\n\tleading: true,\n\ttrailing: true,\n};\n\nexport default function PreviewIframe( {\n\tchildren,\n\tlabel,\n\tisFocused,\n\twithHoverView,\n} ) {\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( 'color.gradient' );\n\tconst [ styles ] = useGlobalStylesOutput();\n\tconst disableMotion = useReducedMotion();\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst [ containerResizeListener, { width } ] = useResizeObserver();\n\tconst [ throttledWidth, setThrottledWidthState ] = useState( width );\n\tconst [ ratioState, setRatioState ] = useState();\n\n\tconst setThrottledWidth = useThrottle(\n\t\tsetThrottledWidthState,\n\t\t250,\n\t\tTHROTTLE_OPTIONS\n\t);\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tif ( width ) {\n\t\t\tsetThrottledWidth( width );\n\t\t}\n\t}, [ width, setThrottledWidth ] );\n\n\t// Must use useLayoutEffect to avoid a flash of the iframe at the wrong\n\t// size before the width is set.\n\tuseLayoutEffect( () => {\n\t\tconst newRatio = throttledWidth ? throttledWidth / normalizedWidth : 1;\n\t\tconst ratioDiff = newRatio - ( ratioState || 0 );\n\n\t\t// Only update the ratio state if the difference is big enough\n\t\t// or if the ratio state is not yet set. This is to avoid an\n\t\t// endless loop of updates at particular viewport heights when the\n\t\t// presence of a scrollbar causes the width to change slightly.\n\t\tconst isRatioDiffBigEnough = Math.abs( ratioDiff ) > 0.1;\n\n\t\tif ( isRatioDiffBigEnough || ! ratioState ) {\n\t\t\tsetRatioState( newRatio );\n\t\t}\n\t}, [ throttledWidth, ratioState ] );\n\n\t// Set a fallbackRatio to use before the throttled ratio has been set.\n\tconst fallbackRatio = width ? width / normalizedWidth : 1;\n\t/*\n\t * Use the throttled ratio if it has been calculated, otherwise\n\t * use the fallback ratio. The throttled ratio is used to avoid\n\t * an endless loop of updates at particular viewport heights.\n\t * See: https://github.com/WordPress/gutenberg/issues/55112\n\t */\n\tconst ratio = ratioState ? ratioState : fallbackRatio;\n\n\t/*\n\t * Reset leaked styles from WP common.css and remove main content layout padding and border.\n\t * Add pointer cursor to the body to indicate the iframe is interactive,\n\t * similar to Typography variation previews.\n\t */\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: 'html{overflow:hidden}body{min-width: 0;padding: 0;border: none;cursor: pointer;}',\n\t\t\t\t\tisGlobalStyles: true,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\n\t\treturn styles;\n\t}, [ styles ] );\n\tconst isReady = !! width;\n\n\treturn (\n\t\t<>\n\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t{ containerResizeListener }\n\t\t\t</div>\n\t\t\t{ isReady && (\n\t\t\t\t<Iframe\n\t\t\t\t\tclassName=\"edit-site-global-styles-preview__iframe\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t} }\n\t\t\t\t\tonMouseEnter={ () => setIsHovered( true ) }\n\t\t\t\t\tonMouseLeave={ () => setIsHovered( false ) }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t>\n\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: normalizedHeight * ratio,\n\t\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\t\tbackground: gradientValue ?? backgroundColor,\n\t\t\t\t\t\t\tcursor: withHoverView ? 'pointer' : undefined,\n\t\t\t\t\t\t} }\n\t\t\t\t\t\tinitial=\"start\"\n\t\t\t\t\t\tanimate={\n\t\t\t\t\t\t\t( isHovered || isFocused ) &&\n\t\t\t\t\t\t\t! disableMotion &&\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t? 'hover'\n\t\t\t\t\t\t\t\t: 'start'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t{ []\n\t\t\t\t\t\t\t.concat( children ) // This makes sure children is always an array.\n\t\t\t\t\t\t\t.map( ( child, key ) => child( { ratio, key } ) ) }\n\t\t\t\t\t</motion.div>\n\t\t\t\t</Iframe>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { useStylesPreviewColors } from './hooks';\nimport TypographyExample from './typography-example';\nimport HighlightedColors from './highlighted-colors';\nimport PreviewIframe from './preview-iframe';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst midFrameVariants = {\n\thover: {\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\topacity: 0.5,\n\t},\n};\n\nconst secondFrameVariants = {\n\thover: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\tstart: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst PreviewStyles = ( { label, isFocused, withHoverView, variation } ) => {\n\tconst [ fontWeight ] = useGlobalStyle( 'typography.fontWeight' );\n\tconst [ fontFamily = 'serif' ] = useGlobalStyle( 'typography.fontFamily' );\n\tconst [ headingFontFamily = fontFamily ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontFamily'\n\t);\n\tconst [ headingFontWeight = fontWeight ] = useGlobalStyle(\n\t\t'elements.h1.typography.fontWeight'\n\t);\n\tconst [ textColor = 'black' ] = useGlobalStyle( 'color.text' );\n\tconst [ headingColor = textColor ] = useGlobalStyle(\n\t\t'elements.h1.color.text'\n\t);\n\n\tconst { paletteColors } = useStylesPreviewColors();\n\n\treturn (\n\t\t<PreviewIframe\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\t\tfontSize={ 65 * ratio }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<VStack spacing={ 4 * ratio }>\n\t\t\t\t\t\t\t<HighlightedColors\n\t\t\t\t\t\t\t\tnormalizedColorSwatchSize={ 32 }\n\t\t\t\t\t\t\t\tratio={ ratio }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</VStack>\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ withHoverView && midFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tfilter: 'blur(60px)',\n\t\t\t\t\t\topacity: 0.1,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ paletteColors\n\t\t\t\t\t\t\t.slice( 0, 4 )\n\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\t\t\t\tbackground: color,\n\t\t\t\t\t\t\t\t\t\tflexGrow: 1,\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ secondFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\twidth: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<VStack\n\t\t\t\t\t\tspacing={ 3 * ratio }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t\tpadding: 10 * ratio,\n\t\t\t\t\t\t\tboxSizing: 'border-box',\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\t\t<div\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\tfontSize: 40 * ratio,\n\t\t\t\t\t\t\t\t\tfontFamily: headingFontFamily,\n\t\t\t\t\t\t\t\t\tcolor: headingColor,\n\t\t\t\t\t\t\t\t\tfontWeight: headingFontWeight,\n\t\t\t\t\t\t\t\t\tlineHeight: '1em',\n\t\t\t\t\t\t\t\t\ttextAlign: 'center',\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{ label }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</VStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewIframe>\n\t);\n};\n\nexport default PreviewStyles;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n\tCardBody,\n\tCard,\n\tCardDivider,\n\tCardMedia,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { IconWithCurrentColor } from './icon-with-current-color';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport RootMenu from './root-menu';\nimport PreviewStyles from './preview-styles';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ScreenRoot() {\n\tconst [ customCSS ] = useGlobalStyle( 'css' );\n\n\tconst { hasVariations, canEditCSS } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEntityRecord,\n\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t__experimentalGetCurrentThemeGlobalStylesVariations,\n\t\t} = select( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\thasVariations:\n\t\t\t\t!! __experimentalGetCurrentThemeGlobalStylesVariations()\n\t\t\t\t\t?.length,\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\n\treturn (\n\t\t<Card size=\"small\" className=\"edit-site-global-styles-screen-root\">\n\t\t\t<CardBody>\n\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t<Card>\n\t\t\t\t\t\t<CardMedia>\n\t\t\t\t\t\t\t<PreviewStyles />\n\t\t\t\t\t\t</CardMedia>\n\t\t\t\t\t</Card>\n\t\t\t\t\t{ hasVariations && (\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/variations\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Browse styles' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\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</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t) }\n\t\t\t\t\t<RootMenu />\n\t\t\t\t</VStack>\n\t\t\t</CardBody>\n\n\t\t\t<CardDivider />\n\n\t\t\t<CardBody>\n\t\t\t\t<Spacer\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t/*\n\t\t\t\t\t * 13px matches the text inset of the NavigationButton (12px padding, plus the width of the button's border).\n\t\t\t\t\t * This is an ad hoc override for this instance and the Addtional CSS option below. Other options for matching the\n\t\t\t\t\t * the nav button inset should be looked at before reusing further.\n\t\t\t\t\t */\n\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Customize the appearance of specific blocks for the whole site.'\n\t\t\t\t\t) }\n\t\t\t\t</Spacer>\n\t\t\t\t<ItemGroup>\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tpath=\"/blocks\"\n\t\t\t\t\t\taria-label={ __( 'Blocks styles' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Blocks' ) }</FlexItem>\n\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\ticon={ isRTL() ? chevronLeft : chevronRight }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t</ItemGroup>\n\t\t\t</CardBody>\n\n\t\t\t{ canEditCSS && !! customCSS && (\n\t\t\t\t<>\n\t\t\t\t\t<CardDivider />\n\t\t\t\t\t<CardBody>\n\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tpaddingTop={ 2 }\n\t\t\t\t\t\t\tpaddingX=\"13px\"\n\t\t\t\t\t\t\tmarginBottom={ 4 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tpath=\"/css\"\n\t\t\t\t\t\t\t\taria-label={ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<IconWithCurrentColor\n\t\t\t\t\t\t\t\t\t\ticon={\n\t\t\t\t\t\t\t\t\t\t\tisRTL() ? chevronLeft : chevronRight\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</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</CardBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</Card>\n\t);\n}\n\nexport default ScreenRoot;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"a11y\"];","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from '../navigation-button';\nimport { unlock } from '../../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\n// Only core block styles (source === block) or block styles with a matching\n// theme.json style variation will be configurable via Global Styles.\nfunction getFilteredBlockStyles( blockStyles, variations ) {\n\treturn blockStyles?.filter(\n\t\t( style ) =>\n\t\t\tstyle.source === 'block' || variations.includes( style.name )\n\t);\n}\n\nexport function useBlockVariations( name ) {\n\tconst blockStyles = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\tconst [ variations ] = useGlobalStyle( 'variations', name );\n\tconst variationNames = Object.keys( variations ?? {} );\n\n\treturn getFilteredBlockStyles( blockStyles, variationNames );\n}\n\nexport function VariationsPanel( { name } ) {\n\tconst coreBlockStyles = useBlockVariations( name );\n\n\treturn (\n\t\t<ItemGroup isBordered isSeparated>\n\t\t\t{ coreBlockStyles.map( ( style, index ) => {\n\t\t\t\tif ( style?.isDefault ) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tpath={\n\t\t\t\t\t\t\t'/blocks/' +\n\t\t\t\t\t\t\tencodeURIComponent( name ) +\n\t\t\t\t\t\t\t'/variations/' +\n\t\t\t\t\t\t\tencodeURIComponent( style.name )\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-label={ style.label }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ style.label }\n\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalHeading as Heading,\n\t__experimentalView as View,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\n\nfunction ScreenHeader( { title, description, onBack } ) {\n\treturn (\n\t\t<VStack spacing={ 0 }>\n\t\t\t<View>\n\t\t\t\t<Spacer marginBottom={ 0 } paddingX={ 4 } paddingY={ 3 }>\n\t\t\t\t\t<HStack spacing={ 2 }>\n\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t// TODO: This style override is also used in ToolsPanelHeader.\n\t\t\t\t\t\t\t\t// It should be supported out-of-the-box by Button.\n\t\t\t\t\t\t\t\t{ minWidth: 24, padding: 0 }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticon={ isRTL() ? chevronRight : chevronLeft }\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tonClick={ onBack }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer>\n\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</HStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t\t{ description && (\n\t\t\t\t<p className=\"edit-site-global-styles-header__description\">\n\t\t\t\t\t{ description }\n\t\t\t\t</p>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default ScreenHeader;\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport {\n\tFlexItem,\n\tSearchControl,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tuseState,\n\tuseEffect,\n\tuseRef,\n\tuseDeferredValue,\n\tmemo,\n} from '@wordpress/element';\nimport {\n\tBlockIcon,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport { useBlockVariations } from './variations/variations-panel';\nimport ScreenHeader from './header';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction useSortedBlockTypes() {\n\tconst blockItems = useSelect(\n\t\t( select ) => select( blocksStore ).getBlockTypes(),\n\t\t[]\n\t);\n\t// Ensure core blocks are prioritized in the returned results,\n\t// because third party blocks can be registered earlier than\n\t// the core blocks (usually by using the `init` action),\n\t// thus affecting the display order.\n\t// We don't sort reusable blocks as they are handled differently.\n\tconst groupByType = ( blocks, block ) => {\n\t\tconst { core, noncore } = blocks;\n\t\tconst type = block.name.startsWith( 'core/' ) ? core : noncore;\n\t\ttype.push( block );\n\t\treturn blocks;\n\t};\n\tconst { core: coreItems, noncore: nonCoreItems } = blockItems.reduce(\n\t\tgroupByType,\n\t\t{ core: [], noncore: [] }\n\t);\n\treturn [ ...coreItems, ...nonCoreItems ];\n}\n\nexport function useBlockHasGlobalStyles( blockName ) {\n\tconst [ rawSettings ] = useGlobalSetting( '', blockName );\n\tconst settings = useSettingsForBlockElement( rawSettings, blockName );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasLayoutPanel = hasBorderPanel || hasDimensionsPanel;\n\tconst hasVariationsPanel = !! useBlockVariations( blockName )?.length;\n\tconst hasGlobalStyles =\n\t\thasTypographyPanel ||\n\t\thasColorPanel ||\n\t\thasLayoutPanel ||\n\t\thasVariationsPanel;\n\treturn hasGlobalStyles;\n}\n\nfunction BlockMenuItem( { block } ) {\n\tconst hasBlockMenuItem = useBlockHasGlobalStyles( block.name );\n\tif ( ! hasBlockMenuItem ) {\n\t\treturn null;\n\t}\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t__( '%s block styles' ),\n\t\tblock.title\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<BlockIcon icon={ block.icon } />\n\t\t\t\t<FlexItem>{ block.title }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction BlockList( { filterValue } ) {\n\tconst sortedBlockTypes = useSortedBlockTypes();\n\tconst debouncedSpeak = useDebounce( speak, 500 );\n\tconst { isMatchingSearchTerm } = useSelect( blocksStore );\n\n\tconst filteredBlockTypes = ! filterValue\n\t\t? sortedBlockTypes\n\t\t: sortedBlockTypes.filter( ( blockType ) =>\n\t\t\t\tisMatchingSearchTerm( blockType, filterValue )\n\t\t );\n\n\tconst blockTypesListRef = useRef();\n\n\t// Announce search results on change\n\tuseEffect( () => {\n\t\tif ( ! filterValue ) {\n\t\t\treturn;\n\t\t}\n\t\t// We extract the results from the wrapper div's `ref` because\n\t\t// filtered items can contain items that will eventually not\n\t\t// render and there is no reliable way to detect when a child\n\t\t// will return `null`.\n\t\t// TODO: We should find a better way of handling this as it's\n\t\t// fragile and depends on the number of rendered elements of `BlockMenuItem`,\n\t\t// which is now one.\n\t\t// @see https://github.com/WordPress/gutenberg/pull/39117#discussion_r816022116\n\t\tconst count = blockTypesListRef.current.childElementCount;\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, count );\n\t}, [ filterValue, debouncedSpeak ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ blockTypesListRef }\n\t\t\tclassName=\"edit-site-block-types-item-list\"\n\t\t>\n\t\t\t{ filteredBlockTypes.map( ( block ) => (\n\t\t\t\t<BlockMenuItem\n\t\t\t\t\tblock={ block }\n\t\t\t\t\tkey={ 'menu-itemblock-' + block.name }\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</div>\n\t);\n}\n\nconst MemoizedBlockList = memo( BlockList );\n\nfunction ScreenBlockList() {\n\tconst [ filterValue, setFilterValue ] = useState( '' );\n\tconst deferredFilterValue = useDeferredValue( filterValue );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Blocks' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Customize the appearance of specific blocks and for the whole site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<SearchControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tclassName=\"edit-site-block-types-search\"\n\t\t\t\tonChange={ setFilterValue }\n\t\t\t\tvalue={ filterValue }\n\t\t\t\tlabel={ __( 'Search for blocks' ) }\n\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t/>\n\t\t\t<MemoizedBlockList filterValue={ deferredFilterValue } />\n\t\t</>\n\t);\n}\n\nexport default ScreenBlockList;\n","/**\n * WordPress dependencies\n */\nimport { BlockPreview } from '@wordpress/block-editor';\nimport { getBlockType, getBlockFromExample } from '@wordpress/blocks';\nimport { __experimentalSpacer as Spacer } from '@wordpress/components';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { getVariationClassName } from './utils';\n\nconst BlockPreviewPanel = ( { name, variation = '' } ) => {\n\tconst blockExample = getBlockType( name )?.example;\n\tconst blocks = useMemo( () => {\n\t\tif ( ! blockExample ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tlet example = blockExample;\n\t\tif ( variation ) {\n\t\t\texample = {\n\t\t\t\t...example,\n\t\t\t\tattributes: {\n\t\t\t\t\t...example.attributes,\n\t\t\t\t\tclassName: getVariationClassName( variation ),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\treturn getBlockFromExample( name, example );\n\t}, [ name, blockExample, variation ] );\n\n\tconst viewportWidth = blockExample?.viewportWidth ?? 500;\n\t// Same as height of InserterPreviewPanel.\n\tconst previewHeight = 144;\n\tconst sidebarWidth = 235;\n\tconst scale = sidebarWidth / viewportWidth;\n\tconst minHeight =\n\t\tscale !== 0 && scale < 1 && previewHeight\n\t\t\t? previewHeight / scale\n\t\t\t: previewHeight;\n\n\tif ( ! blockExample ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Spacer marginX={ 4 } marginBottom={ 4 }>\n\t\t\t<div\n\t\t\t\tclassName=\"edit-site-global-styles__block-preview-panel\"\n\t\t\t\tstyle={ { maxHeight: previewHeight, boxSizing: 'initial' } }\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\tminHeight={ previewHeight }\n\t\t\t\t\tadditionalStyles={\n\t\t\t\t\t\t//We want this CSS to be in sync with the one in InserterPreviewPanel.\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcss: `\n\t\t\t\t\t\t\t\tbody{\n\t\t\t\t\t\t\t\t\tpadding: 24px;\n\t\t\t\t\t\t\t\t\tmin-height:${ Math.round( minHeight ) }px;\n\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.is-root-container { width: 100%; }\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\t\t\t\t/>\n\t\t\t</div>\n\t\t</Spacer>\n\t);\n};\n\nexport default BlockPreviewPanel;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalHeading as Heading } from '@wordpress/components';\n\nfunction Subtitle( { children, level } ) {\n\treturn (\n\t\t<Heading\n\t\t\tclassName=\"edit-site-global-styles-subtitle\"\n\t\t\tlevel={ level ?? 2 }\n\t\t>\n\t\t\t{ children }\n\t\t</Heading>\n\t);\n}\n\nexport default Subtitle;\n","/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\tPanelBody,\n\t__experimentalVStack as VStack,\n\t__experimentalHasSplitBorders as hasSplitBorders,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport BlockPreviewPanel from './block-preview-panel';\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport {\n\tuseBlockVariations,\n\tVariationsPanel,\n} from './variations/variations-panel';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_BLOCK_DEFAULT_VALUES = {\n\tbackgroundSize: 'cover',\n};\n\nfunction applyFallbackStyle( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tconst hasColorOrWidth = border.color || border.width;\n\n\tif ( ! border.style && hasColorOrWidth ) {\n\t\treturn { ...border, style: 'solid' };\n\t}\n\n\tif ( border.style && ! hasColorOrWidth ) {\n\t\treturn undefined;\n\t}\n\n\treturn border;\n}\n\nfunction applyAllFallbackStyles( border ) {\n\tif ( ! border ) {\n\t\treturn border;\n\t}\n\n\tif ( hasSplitBorders( border ) ) {\n\t\treturn {\n\t\t\ttop: applyFallbackStyle( border.top ),\n\t\t\tright: applyFallbackStyle( border.right ),\n\t\t\tbottom: applyFallbackStyle( border.bottom ),\n\t\t\tleft: applyFallbackStyle( border.left ),\n\t\t};\n\t}\n\n\treturn applyFallbackStyle( border );\n}\n\nconst {\n\tuseHasDimensionsPanel,\n\tuseHasTypographyPanel,\n\tuseHasBorderPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tuseHasColorPanel,\n\tuseHasFiltersPanel,\n\tuseHasImageSettingsPanel,\n\tuseGlobalStyle,\n\tuseHasBackgroundPanel,\n\tBackgroundPanel: StylesBackgroundPanel,\n\tBorderPanel: StylesBorderPanel,\n\tColorPanel: StylesColorPanel,\n\tTypographyPanel: StylesTypographyPanel,\n\tDimensionsPanel: StylesDimensionsPanel,\n\tFiltersPanel: StylesFiltersPanel,\n\tImageSettingsPanel,\n\tAdvancedPanel: StylesAdvancedPanel,\n\tuseGlobalStyleLinks,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenBlock( { name, variation } ) {\n\tlet prefixParts = [];\n\tif ( variation ) {\n\t\tprefixParts = [ 'variations', variation ].concat( prefixParts );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, name, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( prefix, name, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', name, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '', name );\n\tconst settings = useSettingsForBlockElement( rawSettings, name );\n\tconst blockType = getBlockType( name );\n\tconst _links = useGlobalStyleLinks();\n\n\t// Only allow `blockGap` support if serialization has not been skipped, to be sure global spacing can be applied.\n\tif (\n\t\tsettings?.spacing?.blockGap &&\n\t\tblockType?.supports?.spacing?.blockGap &&\n\t\t( blockType?.supports?.spacing?.__experimentalSkipSerialization ===\n\t\t\ttrue ||\n\t\t\tblockType?.supports?.spacing?.__experimentalSkipSerialization?.some?.(\n\t\t\t\t( spacingType ) => spacingType === 'blockGap'\n\t\t\t) )\n\t) {\n\t\tsettings.spacing.blockGap = false;\n\t}\n\n\t// Only allow `aspectRatio` support if the block is not the grouping block.\n\t// The grouping block allows the user to use Group, Row and Stack variations,\n\t// and it is highly likely that the user will not want to set an aspect ratio\n\t// for all three at once. Until there is the ability to set a different aspect\n\t// ratio for each variation, we disable the aspect ratio controls for the\n\t// grouping block in global styles.\n\tif ( settings?.dimensions?.aspectRatio && name === 'core/group' ) {\n\t\tsettings.dimensions.aspectRatio = false;\n\t}\n\n\tconst blockVariations = useBlockVariations( name );\n\tconst hasBackgroundPanel = useHasBackgroundPanel( settings );\n\tconst hasTypographyPanel = useHasTypographyPanel( settings );\n\tconst hasColorPanel = useHasColorPanel( settings );\n\tconst hasBorderPanel = useHasBorderPanel( settings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\tconst hasFiltersPanel = useHasFiltersPanel( settings );\n\tconst hasImageSettingsPanel = useHasImageSettingsPanel(\n\t\tname,\n\t\tuserSettings,\n\t\tsettings\n\t);\n\tconst hasVariationsPanel = !! blockVariations?.length && ! variation;\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst currentBlockStyle = variation\n\t\t? blockVariations.find( ( s ) => s.name === variation )\n\t\t: null;\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\tconst onChangeDimensions = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tsetSettings( {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeLightbox = ( newSetting ) => {\n\t\t// If the newSetting is undefined, this means that the user has deselected\n\t\t// (reset) the lightbox setting.\n\t\tif ( newSetting === undefined ) {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: undefined,\n\t\t\t} );\n\n\t\t\t// Otherwise, we simply set the lightbox setting to the new value but\n\t\t\t// taking care of not overriding the other lightbox settings.\n\t\t} else {\n\t\t\tsetSettings( {\n\t\t\t\t...rawSettings,\n\t\t\t\tlightbox: {\n\t\t\t\t\t...rawSettings.lightbox,\n\t\t\t\t\t...newSetting,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t};\n\tconst onChangeBorders = ( newStyle ) => {\n\t\tif ( ! newStyle?.border ) {\n\t\t\tsetStyle( newStyle );\n\t\t\treturn;\n\t\t}\n\n\t\t// As Global Styles can't conditionally generate styles based on if\n\t\t// other style properties have been set, we need to force split\n\t\t// border definitions for user set global border styles. Border\n\t\t// radius is derived from the same property i.e. `border.radius` if\n\t\t// it is a string that is used. The longhand border radii styles are\n\t\t// only generated if that property is an object.\n\t\t//\n\t\t// For borders (color, style, and width) those are all properties on\n\t\t// the `border` style property. This means if the theme.json defined\n\t\t// split borders and the user condenses them into a flat border or\n\t\t// vice-versa we'd get both sets of styles which would conflict.\n\t\tconst { radius, ...newBorder } = newStyle.border;\n\t\tconst border = applyAllFallbackStyles( newBorder );\n\t\tconst updatedBorder = ! hasSplitBorders( border )\n\t\t\t? {\n\t\t\t\t\ttop: border,\n\t\t\t\t\tright: border,\n\t\t\t\t\tbottom: border,\n\t\t\t\t\tleft: border,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tcolor: null,\n\t\t\t\t\tstyle: null,\n\t\t\t\t\twidth: null,\n\t\t\t\t\t...border,\n\t\t\t };\n\n\t\tsetStyle( { ...newStyle, border: { ...updatedBorder, radius } } );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ variation ? currentBlockStyle?.label : blockType.title }\n\t\t\t/>\n\t\t\t<BlockPreviewPanel name={ name } variation={ variation } />\n\t\t\t{ hasVariationsPanel && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-variations\">\n\t\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t\t<Subtitle>{ __( 'Style Variations' ) }</Subtitle>\n\t\t\t\t\t\t<VariationsPanel name={ name } />\n\t\t\t\t\t</VStack>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ hasColorPanel && (\n\t\t\t\t<StylesColorPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBackgroundPanel && (\n\t\t\t\t<StylesBackgroundPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tdefaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }\n\t\t\t\t\tthemeFileURIs={ _links?.[ 'wp:theme-file' ] }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasTypographyPanel && (\n\t\t\t\t<StylesTypographyPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasDimensionsPanel && (\n\t\t\t\t<StylesDimensionsPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ onChangeDimensions }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasBorderPanel && (\n\t\t\t\t<StylesBorderPanel\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ onChangeBorders }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasFiltersPanel && (\n\t\t\t\t<StylesFiltersPanel\n\t\t\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\t\t\tvalue={ styleWithLayout }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tincludeLayoutControls\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ hasImageSettingsPanel && (\n\t\t\t\t<ImageSettingsPanel\n\t\t\t\t\tonChange={ onChangeLightbox }\n\t\t\t\t\tvalue={ userSettings }\n\t\t\t\t\tinheritedValue={ settings }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t{ canEditCSS && (\n\t\t\t\t<PanelBody title={ __( 'Advanced' ) } initialOpen={ false }>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t\t// translators: %s: is the name of a block e.g., 'Image' or 'Table'.\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Add your own CSS to customize the appearance of the %s block. You do not need to include a CSS selector, just add the property and value.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tblockType?.title\n\t\t\t\t\t\t) }\n\t\t\t\t\t</p>\n\t\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t/>\n\t\t\t\t</PanelBody>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenBlock;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { NavigationButtonAsItem } from './navigation-button';\nimport Subtitle from './subtitle';\n\nimport { unlock } from '../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction ElementItem( { parentMenu, element, label } ) {\n\tconst prefix =\n\t\telement === 'text' || ! element ? '' : `elements.${ element }.`;\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\tconst [ fontFamily ] = useGlobalStyle( prefix + 'typography.fontFamily' );\n\tconst [ fontStyle ] = useGlobalStyle( prefix + 'typography.fontStyle' );\n\tconst [ fontWeight ] = useGlobalStyle( prefix + 'typography.fontWeight' );\n\tconst [ backgroundColor ] = useGlobalStyle( prefix + 'color.background' );\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text' );\n\n\tconst navigationButtonLabel = sprintf(\n\t\t// translators: %s: is a subset of Typography, e.g., 'text' or 'links'.\n\t\t__( 'Typography %s styles' ),\n\t\tlabel\n\t);\n\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ parentMenu + '/typography/' + element }\n\t\t\taria-label={ navigationButtonLabel }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t<FlexItem\n\t\t\t\t\tclassName=\"edit-site-global-styles-screen-typography__indicator\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\t\t\tbackground:\n\t\t\t\t\t\t\tgradientValue ??\n\t\t\t\t\t\t\tbackgroundColor ??\n\t\t\t\t\t\t\tfallbackBackgroundColor,\n\t\t\t\t\t\tcolor,\n\t\t\t\t\t\tfontStyle,\n\t\t\t\t\t\tfontWeight,\n\t\t\t\t\t\t...extraStyles,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Aa' ) }\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem>{ label }</FlexItem>\n\t\t\t</HStack>\n\t\t</NavigationButtonAsItem>\n\t);\n}\n\nfunction TypographyElements() {\n\tconst parentMenu = '';\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Elements' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"text\"\n\t\t\t\t\tlabel={ __( 'Text' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"link\"\n\t\t\t\t\tlabel={ __( 'Links' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"heading\"\n\t\t\t\t\tlabel={ __( 'Headings' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"caption\"\n\t\t\t\t\tlabel={ __( 'Captions' ) }\n\t\t\t\t/>\n\t\t\t\t<ElementItem\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\telement=\"button\"\n\t\t\t\t\tlabel={ __( 'Buttons' ) }\n\t\t\t\t/>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default TypographyElements;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport TypographyExample from './typography-example';\nimport PreviewIframe from './preview-iframe';\n\nconst StylesPreviewTypography = ( { variation, isFocused, withHoverView } ) => {\n\treturn (\n\t\t<PreviewIframe\n\t\t\tlabel={ variation.title }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { ratio, key } ) => (\n\t\t\t\t<HStack\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tspacing={ 10 * ratio }\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<TypographyExample\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tfontSize={ 85 * ratio }\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t</PreviewIframe>\n\t);\n};\n\nexport default StylesPreviewTypography;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport cloneDeep from '../../utils/clone-deep';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\n/**\n * Removes all instances of properties from an object.\n *\n * @param {Object} object The object to remove the properties from.\n * @param {string[]} properties The properties to remove.\n * @return {Object} The modified object.\n */\nexport function removePropertiesFromObject( object, properties ) {\n\tif ( ! properties?.length ) {\n\t\treturn object;\n\t}\n\n\tif (\n\t\ttypeof object !== 'object' ||\n\t\t! object ||\n\t\t! Object.keys( object ).length\n\t) {\n\t\treturn object;\n\t}\n\n\tfor ( const key in object ) {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tdelete object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tremovePropertiesFromObject( object[ key ], properties );\n\t\t}\n\t}\n\treturn object;\n}\n\n/**\n * Checks whether a style variation is empty.\n *\n * @param {Object} variation A style variation object.\n * @param {string} variation.title The title of the variation.\n * @param {Object} variation.settings The settings of the variation.\n * @param {Object} variation.styles The styles of the variation.\n * @return {boolean} Whether the variation is empty.\n */\nfunction hasThemeVariation( { title, settings, styles } ) {\n\treturn (\n\t\ttitle === __( 'Default' ) || // Always preserve the default variation.\n\t\tObject.keys( settings ).length > 0 ||\n\t\tObject.keys( styles ).length > 0\n\t);\n}\n\n/**\n * Fetches the current theme style variations that contain only the specified properties\n * and merges them with the user config.\n *\n * @param {string[]} properties The properties to filter by.\n * @return {Object[]|*} The merged object.\n */\nexport function useCurrentMergeThemeStyleVariationsWithUserConfig(\n\tproperties = []\n) {\n\tconst { variationsFromTheme } = useSelect( ( select ) => {\n\t\tconst _variationsFromTheme =\n\t\t\tselect(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\n\t\treturn {\n\t\t\tvariationsFromTheme: _variationsFromTheme || [],\n\t\t};\n\t}, [] );\n\tconst { user: userVariation } = useContext( GlobalStylesContext );\n\n\tconst propertiesAsString = properties.toString();\n\n\treturn useMemo( () => {\n\t\tconst clonedUserVariation = cloneDeep( userVariation );\n\n\t\t// Get user variation and remove the settings for the given property.\n\t\tconst userVariationWithoutProperties = removePropertiesFromObject(\n\t\t\tclonedUserVariation,\n\t\t\tproperties\n\t\t);\n\t\tuserVariationWithoutProperties.title = __( 'Default' );\n\n\t\tconst variationsWithPropertiesAndBase = variationsFromTheme\n\t\t\t.filter( ( variation ) => {\n\t\t\t\treturn isVariationWithProperties( variation, properties );\n\t\t\t} )\n\t\t\t.map( ( variation ) => {\n\t\t\t\treturn mergeBaseAndUserConfigs(\n\t\t\t\t\tuserVariationWithoutProperties,\n\t\t\t\t\tvariation\n\t\t\t\t);\n\t\t\t} );\n\n\t\tconst variationsByProperties = [\n\t\t\tuserVariationWithoutProperties,\n\t\t\t...variationsWithPropertiesAndBase,\n\t\t];\n\n\t\t/*\n\t\t * Filter out variations with no settings or styles.\n\t\t */\n\t\treturn variationsByProperties?.length\n\t\t\t? variationsByProperties.filter( hasThemeVariation )\n\t\t\t: [];\n\t}, [ propertiesAsString, userVariation, variationsFromTheme ] );\n}\n\n/**\n * Returns a new object, with properties specified in `properties` array.,\n * maintain the original object tree structure.\n * The function is recursive, so it will perform a deep search for the given properties.\n * E.g., the function will return `{ a: { b: { c: { test: 1 } } } }` if the properties are `[ 'test' ]`.\n *\n * @param {Object} object The object to filter\n * @param {string[]} properties The properties to filter by\n * @return {Object} The merged object.\n */\nexport const filterObjectByProperties = ( object, properties ) => {\n\tif ( ! object || ! properties?.length ) {\n\t\treturn {};\n\t}\n\n\tconst newObject = {};\n\tObject.keys( object ).forEach( ( key ) => {\n\t\tif ( properties.includes( key ) ) {\n\t\t\tnewObject[ key ] = object[ key ];\n\t\t} else if ( typeof object[ key ] === 'object' ) {\n\t\t\tconst newFilter = filterObjectByProperties(\n\t\t\t\tobject[ key ],\n\t\t\t\tproperties\n\t\t\t);\n\t\t\tif ( Object.keys( newFilter ).length ) {\n\t\t\t\tnewObject[ key ] = newFilter;\n\t\t\t}\n\t\t}\n\t} );\n\treturn newObject;\n};\n\n/**\n * Compares a style variation to the same variation filtered by the specified properties.\n * Returns true if the variation contains only the properties specified.\n *\n * @param {Object} variation The variation to compare.\n * @param {string[]} properties The properties to compare.\n * @return {boolean} Whether the variation contains only the specified properties.\n */\nexport function isVariationWithProperties( variation, properties ) {\n\tconst variationWithProperties = filterObjectByProperties(\n\t\tcloneDeep( variation ),\n\t\tproperties\n\t);\n\n\treturn areGlobalStyleConfigsEqual( variationWithProperties, variation );\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Tooltip } from '@wordpress/components';\nimport { useMemo, useContext, useState } from '@wordpress/element';\nimport { ENTER } from '@wordpress/keycodes';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { filterObjectByProperties } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../../lock-unlock';\n\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nexport default function Variation( {\n\tvariation,\n\tchildren,\n\tisPill,\n\tproperties,\n\tshowTooltip,\n} ) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\tconst { base, user, setUserConfig } = useContext( GlobalStylesContext );\n\n\tconst context = useMemo( () => {\n\t\tlet merged = mergeBaseAndUserConfigs( base, variation );\n\t\tif ( properties ) {\n\t\t\tmerged = filterObjectByProperties( merged, properties );\n\t\t}\n\t\treturn {\n\t\t\tuser: variation,\n\t\t\tbase,\n\t\t\tmerged,\n\t\t\tsetUserConfig: () => {},\n\t\t};\n\t}, [ variation, base, properties ] );\n\n\tconst selectVariation = () => setUserConfig( variation );\n\n\tconst selectOnEnter = ( event ) => {\n\t\tif ( event.keyCode === ENTER ) {\n\t\t\tevent.preventDefault();\n\t\t\tselectVariation();\n\t\t}\n\t};\n\n\tconst isActive = useMemo(\n\t\t() => areGlobalStyleConfigsEqual( user, variation ),\n\t\t[ user, variation ]\n\t);\n\n\tlet label = variation?.title;\n\tif ( variation?.description ) {\n\t\tlabel = sprintf(\n\t\t\t/* translators: %1$s: variation title. %2$s variation description. */\n\t\t\t__( '%1$s (%2$s)' ),\n\t\t\tvariation?.title,\n\t\t\tvariation?.description\n\t\t);\n\t}\n\n\tconst content = (\n\t\t<div\n\t\t\tclassName={ clsx( 'edit-site-global-styles-variations_item', {\n\t\t\t\t'is-active': isActive,\n\t\t\t} ) }\n\t\t\trole=\"button\"\n\t\t\tonClick={ selectVariation }\n\t\t\tonKeyDown={ selectOnEnter }\n\t\t\ttabIndex=\"0\"\n\t\t\taria-label={ label }\n\t\t\taria-current={ isActive }\n\t\t\tonFocus={ () => setIsFocused( true ) }\n\t\t\tonBlur={ () => setIsFocused( false ) }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\t'edit-site-global-styles-variations_item-preview',\n\t\t\t\t\t{ 'is-pill': isPill }\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ children( isFocused ) }\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\treturn (\n\t\t<GlobalStylesContext.Provider value={ context }>\n\t\t\t{ showTooltip ? (\n\t\t\t\t<Tooltip text={ variation?.title }>{ content }</Tooltip>\n\t\t\t) : (\n\t\t\t\tcontent\n\t\t\t) }\n\t\t</GlobalStylesContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewTypography from '../preview-typography';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function TypographyVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'typography' ];\n\tconst typographyVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( typographyVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid\n\t\t\t\tcolumns={ 3 }\n\t\t\t\tgap={ gap }\n\t\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\t>\n\t\t\t\t{ typographyVariations.map( ( variation, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Variation\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ () => (\n\t\t\t\t\t\t\t\t<StylesPreviewTypography\n\t\t\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Variation>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport apiFetch from '@wordpress/api-fetch';\n\nconst FONT_FAMILIES_URL = '/wp/v2/font-families';\nconst FONT_COLLECTIONS_URL = '/wp/v2/font-collections';\n\nexport async function fetchInstallFontFamily( data ) {\n\tconst config = {\n\t\tpath: FONT_FAMILIES_URL,\n\t\tmethod: 'POST',\n\t\tbody: data,\n\t};\n\tconst response = await apiFetch( config );\n\treturn {\n\t\tid: response.id,\n\t\t...response.font_family_settings,\n\t\tfontFace: [],\n\t};\n}\n\nexport async function fetchInstallFontFace( fontFamilyId, data ) {\n\tconst config = {\n\t\tpath: `${ FONT_FAMILIES_URL }/${ fontFamilyId }/font-faces`,\n\t\tmethod: 'POST',\n\t\tbody: data,\n\t};\n\tconst response = await apiFetch( config );\n\treturn {\n\t\tid: response.id,\n\t\t...response.font_face_settings,\n\t};\n}\n\nexport async function fetchGetFontFamilyBySlug( slug ) {\n\tconst config = {\n\t\tpath: `${ FONT_FAMILIES_URL }?slug=${ slug }&_embed=true`,\n\t\tmethod: 'GET',\n\t};\n\tconst response = await apiFetch( config );\n\tif ( ! response || response.length === 0 ) {\n\t\treturn null;\n\t}\n\tconst fontFamilyPost = response[ 0 ];\n\treturn {\n\t\tid: fontFamilyPost.id,\n\t\t...fontFamilyPost.font_family_settings,\n\t\tfontFace:\n\t\t\tfontFamilyPost?._embedded?.font_faces.map(\n\t\t\t\t( face ) => face.font_face_settings\n\t\t\t) || [],\n\t};\n}\n\nexport async function fetchUninstallFontFamily( fontFamilyId ) {\n\tconst config = {\n\t\tpath: `${ FONT_FAMILIES_URL }/${ fontFamilyId }?force=true`,\n\t\tmethod: 'DELETE',\n\t};\n\treturn await apiFetch( config );\n}\n\nexport async function fetchFontCollections() {\n\tconst config = {\n\t\tpath: `${ FONT_COLLECTIONS_URL }?_fields=slug,name,description`,\n\t\tmethod: 'GET',\n\t};\n\treturn await apiFetch( config );\n}\n\nexport async function fetchFontCollection( id ) {\n\tconst config = {\n\t\tpath: `${ FONT_COLLECTIONS_URL }/${ id }`,\n\t\tmethod: 'GET',\n\t};\n\treturn await apiFetch( config );\n}\n","/**\n * WordPress dependencies\n */\nimport { _x } from '@wordpress/i18n';\n\nexport const ALLOWED_FILE_EXTENSIONS = [ 'otf', 'ttf', 'woff', 'woff2' ];\n\nexport const FONT_WEIGHTS = {\n\t100: _x( 'Thin', 'font weight' ),\n\t200: _x( 'Extra-light', 'font weight' ),\n\t300: _x( 'Light', 'font weight' ),\n\t400: _x( 'Normal', 'font weight' ),\n\t500: _x( 'Medium', 'font weight' ),\n\t600: _x( 'Semi-bold', 'font weight' ),\n\t700: _x( 'Bold', 'font weight' ),\n\t800: _x( 'Extra-bold', 'font weight' ),\n\t900: _x( 'Black', 'font weight' ),\n};\n\nexport const FONT_STYLES = {\n\tnormal: _x( 'Normal', 'font style' ),\n\titalic: _x( 'Italic', 'font style' ),\n};\n","/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { FONT_WEIGHTS, FONT_STYLES } from './constants';\nimport { unlock } from '../../../../lock-unlock';\nimport { fetchInstallFontFace } from '../resolvers';\nimport { formatFontFaceName } from './preview-styles';\n\n/**\n * Browser dependencies\n */\nconst { File } = window;\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nexport function setUIValuesNeeded( font, extraValues = {} ) {\n\tif ( ! font.name && ( font.fontFamily || font.slug ) ) {\n\t\tfont.name = font.fontFamily || font.slug;\n\t}\n\treturn {\n\t\t...font,\n\t\t...extraValues,\n\t};\n}\n\nexport function isUrlEncoded( url ) {\n\tif ( typeof url !== 'string' ) {\n\t\treturn false;\n\t}\n\treturn url !== decodeURIComponent( url );\n}\n\nexport function getFontFaceVariantName( face ) {\n\tconst weightName = FONT_WEIGHTS[ face.fontWeight ] || face.fontWeight;\n\tconst styleName =\n\t\tface.fontStyle === 'normal'\n\t\t\t? ''\n\t\t\t: FONT_STYLES[ face.fontStyle ] || face.fontStyle;\n\treturn `${ weightName } ${ styleName }`;\n}\n\nexport function mergeFontFaces( existing = [], incoming = [] ) {\n\tconst map = new Map();\n\tfor ( const face of existing ) {\n\t\tmap.set( `${ face.fontWeight }${ face.fontStyle }`, face );\n\t}\n\tfor ( const face of incoming ) {\n\t\t// This will overwrite if the src already exists, keeping it unique.\n\t\tmap.set( `${ face.fontWeight }${ face.fontStyle }`, face );\n\t}\n\treturn Array.from( map.values() );\n}\n\nexport function mergeFontFamilies( existing = [], incoming = [] ) {\n\tconst map = new Map();\n\t// Add the existing array to the map.\n\tfor ( const font of existing ) {\n\t\tmap.set( font.slug, { ...font } );\n\t}\n\t// Add the incoming array to the map, overwriting existing values excepting fontFace that need to be merged.\n\tfor ( const font of incoming ) {\n\t\tif ( map.has( font.slug ) ) {\n\t\t\tconst { fontFace: incomingFontFaces, ...restIncoming } = font;\n\t\t\tconst existingFont = map.get( font.slug );\n\t\t\t// Merge the fontFaces existing with the incoming fontFaces.\n\t\t\tconst mergedFontFaces = mergeFontFaces(\n\t\t\t\texistingFont.fontFace,\n\t\t\t\tincomingFontFaces\n\t\t\t);\n\t\t\t// Except for the fontFace key all the other keys are overwritten with the incoming values.\n\t\t\tmap.set( font.slug, {\n\t\t\t\t...restIncoming,\n\t\t\t\tfontFace: mergedFontFaces,\n\t\t\t} );\n\t\t} else {\n\t\t\tmap.set( font.slug, { ...font } );\n\t\t}\n\t}\n\treturn Array.from( map.values() );\n}\n\n/*\n * Loads the font face from a URL and adds it to the browser.\n * It also adds it to the iframe document.\n */\nexport async function loadFontFaceInBrowser( fontFace, source, addTo = 'all' ) {\n\tlet dataSource;\n\n\tif ( typeof source === 'string' ) {\n\t\tdataSource = `url(${ source })`;\n\t\t// eslint-disable-next-line no-undef\n\t} else if ( source instanceof File ) {\n\t\tdataSource = await source.arrayBuffer();\n\t} else {\n\t\treturn;\n\t}\n\n\tconst newFont = new window.FontFace(\n\t\tformatFontFaceName( fontFace.fontFamily ),\n\t\tdataSource,\n\t\t{\n\t\t\tstyle: fontFace.fontStyle,\n\t\t\tweight: fontFace.fontWeight,\n\t\t}\n\t);\n\n\tconst loadedFace = await newFont.load();\n\n\tif ( addTo === 'document' || addTo === 'all' ) {\n\t\tdocument.fonts.add( loadedFace );\n\t}\n\n\tif ( addTo === 'iframe' || addTo === 'all' ) {\n\t\tconst iframeDocument = document.querySelector(\n\t\t\t'iframe[name=\"editor-canvas\"]'\n\t\t).contentDocument;\n\t\tiframeDocument.fonts.add( loadedFace );\n\t}\n}\n\n/*\n * Unloads the font face and remove it from the browser.\n * It also removes it from the iframe document.\n *\n * Note that Font faces that were added to the set using the CSS @font-face rule\n * remain connected to the corresponding CSS, and cannot be deleted.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/delete.\n */\nexport function unloadFontFaceInBrowser( fontFace, removeFrom = 'all' ) {\n\tconst unloadFontFace = ( fonts ) => {\n\t\tfonts.forEach( ( f ) => {\n\t\t\tif (\n\t\t\t\tf.family === formatFontFaceName( fontFace?.fontFamily ) &&\n\t\t\t\tf.weight === fontFace?.fontWeight &&\n\t\t\t\tf.style === fontFace?.fontStyle\n\t\t\t) {\n\t\t\t\tfonts.delete( f );\n\t\t\t}\n\t\t} );\n\t};\n\n\tif ( removeFrom === 'document' || removeFrom === 'all' ) {\n\t\tunloadFontFace( document.fonts );\n\t}\n\n\tif ( removeFrom === 'iframe' || removeFrom === 'all' ) {\n\t\tconst iframeDocument = document.querySelector(\n\t\t\t'iframe[name=\"editor-canvas\"]'\n\t\t).contentDocument;\n\t\tunloadFontFace( iframeDocument.fonts );\n\t}\n}\n\n/**\n * Retrieves the display source from a font face src.\n *\n * @param {string|string[]} input - The font face src.\n * @return {string|undefined} The display source or undefined if the input is invalid.\n */\nexport function getDisplaySrcFromFontFace( input ) {\n\tif ( ! input ) {\n\t\treturn;\n\t}\n\n\tlet src;\n\tif ( Array.isArray( input ) ) {\n\t\tsrc = input[ 0 ];\n\t} else {\n\t\tsrc = input;\n\t}\n\t// It's expected theme fonts will already be loaded in the browser.\n\tif ( src.startsWith( 'file:.' ) ) {\n\t\treturn;\n\t}\n\tif ( ! isUrlEncoded( src ) ) {\n\t\tsrc = encodeURI( src );\n\t}\n\treturn src;\n}\n\nexport function makeFontFamilyFormData( fontFamily ) {\n\tconst formData = new FormData();\n\n\tconst { fontFace, category, ...familyWithValidParameters } = fontFamily;\n\tconst fontFamilySettings = {\n\t\t...familyWithValidParameters,\n\t\tslug: kebabCase( fontFamily.slug ),\n\t};\n\n\tformData.append(\n\t\t'font_family_settings',\n\t\tJSON.stringify( fontFamilySettings )\n\t);\n\treturn formData;\n}\n\nexport function makeFontFacesFormData( font ) {\n\tif ( font?.fontFace ) {\n\t\tconst fontFacesFormData = font.fontFace.map( ( item, faceIndex ) => {\n\t\t\tconst face = { ...item };\n\t\t\tconst formData = new FormData();\n\t\t\tif ( face.file ) {\n\t\t\t\t// Normalize to an array, since face.file may be a single file or an array of files.\n\t\t\t\tconst files = Array.isArray( face.file )\n\t\t\t\t\t? face.file\n\t\t\t\t\t: [ face.file ];\n\t\t\t\tconst src = [];\n\n\t\t\t\tfiles.forEach( ( file, key ) => {\n\t\t\t\t\t// Slugified file name because the it might contain spaces or characters treated differently on the server.\n\t\t\t\t\tconst fileId = `file-${ faceIndex }-${ key }`;\n\t\t\t\t\t// Add the files to the formData\n\t\t\t\t\tformData.append( fileId, file, file.name );\n\t\t\t\t\tsrc.push( fileId );\n\t\t\t\t} );\n\n\t\t\t\tface.src = src.length === 1 ? src[ 0 ] : src;\n\t\t\t\tdelete face.file;\n\n\t\t\t\tformData.append( 'font_face_settings', JSON.stringify( face ) );\n\t\t\t} else {\n\t\t\t\tformData.append( 'font_face_settings', JSON.stringify( face ) );\n\t\t\t}\n\t\t\treturn formData;\n\t\t} );\n\n\t\treturn fontFacesFormData;\n\t}\n}\n\nexport async function batchInstallFontFaces( fontFamilyId, fontFacesData ) {\n\tconst responses = [];\n\n\t/*\n\t * Uses the same response format as Promise.allSettled, but executes requests in sequence to work\n\t * around a race condition that can cause an error when the fonts directory doesn't exist yet.\n\t */\n\tfor ( const faceData of fontFacesData ) {\n\t\ttry {\n\t\t\tconst response = await fetchInstallFontFace(\n\t\t\t\tfontFamilyId,\n\t\t\t\tfaceData\n\t\t\t);\n\t\t\tresponses.push( { status: 'fulfilled', value: response } );\n\t\t} catch ( error ) {\n\t\t\tresponses.push( { status: 'rejected', reason: error } );\n\t\t}\n\t}\n\n\tconst results = {\n\t\terrors: [],\n\t\tsuccesses: [],\n\t};\n\n\tresponses.forEach( ( result, index ) => {\n\t\tif ( result.status === 'fulfilled' ) {\n\t\t\tconst response = result.value;\n\t\t\tif ( response.id ) {\n\t\t\t\tresults.successes.push( response );\n\t\t\t} else {\n\t\t\t\tresults.errors.push( {\n\t\t\t\t\tdata: fontFacesData[ index ],\n\t\t\t\t\tmessage: `Error: ${ response.message }`,\n\t\t\t\t} );\n\t\t\t}\n\t\t} else {\n\t\t\t// Handle network errors or other fetch-related errors\n\t\t\tresults.errors.push( {\n\t\t\t\tdata: fontFacesData[ index ],\n\t\t\t\tmessage: result.reason.message,\n\t\t\t} );\n\t\t}\n\t} );\n\n\treturn results;\n}\n\n/*\n * Downloads a font face asset from a URL to the client and returns a File object.\n */\nexport async function downloadFontFaceAssets( src ) {\n\t// Normalize to an array, since `src` could be a string or array.\n\tsrc = Array.isArray( src ) ? src : [ src ];\n\n\tconst files = await Promise.all(\n\t\tsrc.map( async ( url ) => {\n\t\t\treturn fetch( new Request( url ) )\n\t\t\t\t.then( ( response ) => {\n\t\t\t\t\tif ( ! response.ok ) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Error downloading font face asset from ${ url }. Server responded with status: ${ response.status }`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn response.blob();\n\t\t\t\t} )\n\t\t\t\t.then( ( blob ) => {\n\t\t\t\t\tconst filename = url.split( '/' ).pop();\n\t\t\t\t\tconst file = new File( [ blob ], filename, {\n\t\t\t\t\t\ttype: blob.type,\n\t\t\t\t\t} );\n\t\t\t\t\treturn file;\n\t\t\t\t} );\n\t\t} )\n\t);\n\n\t// If we only have one file return it (not the array). Otherwise return all of them in the array.\n\treturn files.length === 1 ? files[ 0 ] : files;\n}\n\n/*\n * Determine if a given Font Face is present in a given collection.\n * We determine that a font face has been installed by comparing the fontWeight and fontStyle\n *\n * @param {Object} fontFace The Font Face to seek\n * @param {Array} collection The Collection to seek in\n * @returns True if the font face is found in the collection. Otherwise False.\n */\nexport function checkFontFaceInstalled( fontFace, collection ) {\n\treturn (\n\t\t-1 !==\n\t\tcollection.findIndex( ( collectionFontFace ) => {\n\t\t\treturn (\n\t\t\t\tcollectionFontFace.fontWeight === fontFace.fontWeight &&\n\t\t\t\tcollectionFontFace.fontStyle === fontFace.fontStyle\n\t\t\t);\n\t\t} )\n\t);\n}\n","/**\n * Toggles the activation of a given font or font variant within a list of custom fonts.\n *\n * - If only the font is provided (without face), the entire font family's activation is toggled.\n * - If both font and face are provided, the activation of the specific font variant is toggled.\n *\n * @param {Object} font - The font to be toggled.\n * @param {string} font.slug - The unique identifier for the font.\n * @param {Array} [font.fontFace] - The list of font variants (faces) associated with the font.\n *\n * @param {Object} [face] - The specific font variant to be toggled.\n * @param {string} face.fontWeight - The weight of the font variant.\n * @param {string} face.fontStyle - The style of the font variant.\n *\n * @param {Array} initialfonts - The initial list of custom fonts.\n *\n * @return {Array} - The updated list of custom fonts with the font/font variant toggled.\n *\n * @example\n * const customFonts = [\n * { slug: 'roboto', fontFace: [{ fontWeight: '400', fontStyle: 'normal' }] }\n * ];\n *\n * toggleFont({ slug: 'roboto' }, null, customFonts);\n * // This will remove 'roboto' from customFonts\n *\n * toggleFont({ slug: 'roboto' }, { fontWeight: '400', fontStyle: 'normal' }, customFonts);\n * // This will remove the specified face from 'roboto' in customFonts\n *\n * toggleFont({ slug: 'roboto' }, { fontWeight: '500', fontStyle: 'normal' }, customFonts);\n * // This will add the specified face to 'roboto' in customFonts\n */\nexport function toggleFont( font, face, initialfonts ) {\n\t// Helper to check if a font is activated based on its slug\n\tconst isFontActivated = ( f ) => f.slug === font.slug;\n\n\t// Helper to get the activated font from a list of fonts\n\tconst getActivatedFont = ( fonts ) => fonts.find( isFontActivated );\n\n\t// Toggle the activation status of an entire font family\n\tconst toggleEntireFontFamily = ( activatedFont ) => {\n\t\tif ( ! activatedFont ) {\n\t\t\t// If the font is not active, activate the entire font family\n\t\t\treturn [ ...initialfonts, font ];\n\t\t}\n\t\t// If the font is already active, deactivate the entire font family\n\t\treturn initialfonts.filter( ( f ) => ! isFontActivated( f ) );\n\t};\n\n\t// Toggle the activation status of a specific font variant\n\tconst toggleFontVariant = ( activatedFont ) => {\n\t\tconst isFaceActivated = ( f ) =>\n\t\t\tf.fontWeight === face.fontWeight && f.fontStyle === face.fontStyle;\n\n\t\tif ( ! activatedFont ) {\n\t\t\t// If the font family is not active, activate the font family with the font variant\n\t\t\treturn [ ...initialfonts, { ...font, fontFace: [ face ] } ];\n\t\t}\n\n\t\tlet newFontFaces = activatedFont.fontFace || [];\n\n\t\tif ( newFontFaces.find( isFaceActivated ) ) {\n\t\t\t// If the font variant is active, deactivate it\n\t\t\tnewFontFaces = newFontFaces.filter(\n\t\t\t\t( f ) => ! isFaceActivated( f )\n\t\t\t);\n\t\t} else {\n\t\t\t// If the font variant is not active, activate it\n\t\t\tnewFontFaces = [ ...newFontFaces, face ];\n\t\t}\n\n\t\t// If there are no more font faces, deactivate the font family\n\t\tif ( newFontFaces.length === 0 ) {\n\t\t\treturn initialfonts.filter( ( f ) => ! isFontActivated( f ) );\n\t\t}\n\n\t\t// Return updated fonts list with toggled font variant\n\t\treturn initialfonts.map( ( f ) =>\n\t\t\tisFontActivated( f ) ? { ...f, fontFace: newFontFaces } : f\n\t\t);\n\t};\n\n\tconst activatedFont = getActivatedFont( initialfonts );\n\n\tif ( ! face ) {\n\t\treturn toggleEntireFontFamily( activatedFont );\n\t}\n\n\treturn toggleFontVariant( activatedFont );\n}\n","/**\n * WordPress dependencies\n */\nimport { createContext, useState, useEffect } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tuseEntityRecord,\n\tuseEntityRecords,\n\tstore as coreStore,\n} from '@wordpress/core-data';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tfetchGetFontFamilyBySlug,\n\tfetchInstallFontFamily,\n\tfetchUninstallFontFamily,\n\tfetchFontCollections,\n\tfetchFontCollection,\n} from './resolvers';\nimport { unlock } from '../../../lock-unlock';\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nimport {\n\tsetUIValuesNeeded,\n\tmergeFontFamilies,\n\tloadFontFaceInBrowser,\n\tunloadFontFaceInBrowser,\n\tgetDisplaySrcFromFontFace,\n\tmakeFontFacesFormData,\n\tmakeFontFamilyFormData,\n\tbatchInstallFontFaces,\n\tcheckFontFaceInstalled,\n} from './utils';\nimport { toggleFont } from './utils/toggleFont';\nimport setNestedValue from '../../../utils/set-nested-value';\n\nexport const FontLibraryContext = createContext( {} );\n\nfunction FontLibraryProvider( { children } ) {\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { globalStylesId } = useSelect( ( select ) => {\n\t\tconst { __experimentalGetCurrentGlobalStylesId } = select( coreStore );\n\t\treturn { globalStylesId: __experimentalGetCurrentGlobalStylesId() };\n\t} );\n\n\tconst globalStyles = useEntityRecord(\n\t\t'root',\n\t\t'globalStyles',\n\t\tglobalStylesId\n\t);\n\n\tconst [ isInstalling, setIsInstalling ] = useState( false );\n\tconst [ refreshKey, setRefreshKey ] = useState( 0 );\n\tconst [ notice, setNotice ] = useState( null );\n\n\tconst refreshLibrary = () => {\n\t\tsetRefreshKey( Date.now() );\n\t};\n\n\tconst { records: libraryPosts = [], isResolving: isResolvingLibrary } =\n\t\tuseEntityRecords( 'postType', 'wp_font_family', {\n\t\t\trefreshKey,\n\t\t\t_embed: true,\n\t\t} );\n\n\tconst libraryFonts =\n\t\t( libraryPosts || [] ).map( ( fontFamilyPost ) => {\n\t\t\treturn {\n\t\t\t\tid: fontFamilyPost.id,\n\t\t\t\t...fontFamilyPost.font_family_settings,\n\t\t\t\tfontFace:\n\t\t\t\t\tfontFamilyPost?._embedded?.font_faces.map(\n\t\t\t\t\t\t( face ) => face.font_face_settings\n\t\t\t\t\t) || [],\n\t\t\t};\n\t\t} ) || [];\n\n\t// Global Styles (settings) font families\n\tconst [ fontFamilies, setFontFamilies ] = useGlobalSetting(\n\t\t'typography.fontFamilies'\n\t);\n\n\t/*\n\t * Save the font families to the database.\n\n\t * This function is called when the user activates or deactivates a font family.\n\t * It only updates the global styles post content in the database for new font families.\n\t * This avoids saving other styles/settings changed by the user using other parts of the editor.\n\t *\n\t * It uses the font families from the param to avoid using the font families from an outdated state.\n\t *\n\t * @param {Array} fonts - The font families that will be saved to the database.\n\t */\n\tconst saveFontFamilies = async ( fonts ) => {\n\t\t// Gets the global styles database post content.\n\t\tconst updatedGlobalStyles = globalStyles.record;\n\n\t\t// Updates the database version of global styles with the edited font families in the client.\n\t\tsetNestedValue(\n\t\t\tupdatedGlobalStyles,\n\t\t\t[ 'settings', 'typography', 'fontFamilies' ],\n\t\t\tfonts\n\t\t);\n\n\t\t// Saves a new version of the global styles in the database.\n\t\tawait saveEntityRecord( 'root', 'globalStyles', updatedGlobalStyles );\n\t};\n\n\t// Library Fonts\n\tconst [ modalTabOpen, setModalTabOpen ] = useState( false );\n\tconst [ libraryFontSelected, setLibraryFontSelected ] = useState( null );\n\n\t// Themes Fonts are the fonts defined in the global styles (database persisted theme.json data).\n\tconst themeFonts = fontFamilies?.theme\n\t\t? fontFamilies.theme\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tconst customFonts = fontFamilies?.custom\n\t\t? fontFamilies.custom\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tconst baseCustomFonts = libraryFonts\n\t\t? libraryFonts\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\n\tuseEffect( () => {\n\t\tif ( ! modalTabOpen ) {\n\t\t\tsetLibraryFontSelected( null );\n\t\t}\n\t}, [ modalTabOpen ] );\n\n\tconst handleSetLibraryFontSelected = ( font ) => {\n\t\tsetNotice( null );\n\n\t\t// If font is null, reset the selected font\n\t\tif ( ! font ) {\n\t\t\tsetLibraryFontSelected( null );\n\t\t\treturn;\n\t\t}\n\n\t\tconst fonts = font.source === 'theme' ? themeFonts : baseCustomFonts;\n\n\t\t// Tries to find the font in the installed fonts\n\t\tconst fontSelected = fonts.find( ( f ) => f.slug === font.slug );\n\t\t// If the font is not found (it is only defined in custom styles), use the font from custom styles\n\t\tsetLibraryFontSelected( {\n\t\t\t...( fontSelected || font ),\n\t\t\tsource: font.source,\n\t\t} );\n\t};\n\n\t// Demo\n\tconst [ loadedFontUrls ] = useState( new Set() );\n\n\tconst getAvailableFontsOutline = ( availableFontFamilies ) => {\n\t\tconst outline = availableFontFamilies.reduce( ( acc, font ) => {\n\t\t\tconst availableFontFaces =\n\t\t\t\tfont?.fontFace && font.fontFace?.length > 0\n\t\t\t\t\t? font?.fontFace.map(\n\t\t\t\t\t\t\t( face ) => `${ face.fontStyle + face.fontWeight }`\n\t\t\t\t\t )\n\t\t\t\t\t: [ 'normal400' ]; // If the font doesn't have fontFace, we assume it is a system font and we add the defaults: normal 400\n\n\t\t\tacc[ font.slug ] = availableFontFaces;\n\t\t\treturn acc;\n\t\t}, {} );\n\t\treturn outline;\n\t};\n\n\tconst getActivatedFontsOutline = ( source ) => {\n\t\tswitch ( source ) {\n\t\t\tcase 'theme':\n\t\t\t\treturn getAvailableFontsOutline( themeFonts );\n\t\t\tcase 'custom':\n\t\t\tdefault:\n\t\t\t\treturn getAvailableFontsOutline( customFonts );\n\t\t}\n\t};\n\n\tconst isFontActivated = ( slug, style, weight, source ) => {\n\t\tif ( ! style && ! weight ) {\n\t\t\treturn !! getActivatedFontsOutline( source )[ slug ];\n\t\t}\n\t\treturn !! getActivatedFontsOutline( source )[ slug ]?.includes(\n\t\t\tstyle + weight\n\t\t);\n\t};\n\n\tconst getFontFacesActivated = ( slug, source ) => {\n\t\treturn getActivatedFontsOutline( source )[ slug ] || [];\n\t};\n\n\tasync function installFonts( fontFamiliesToInstall ) {\n\t\tsetIsInstalling( true );\n\t\ttry {\n\t\t\tconst fontFamiliesToActivate = [];\n\t\t\tlet installationErrors = [];\n\n\t\t\tfor ( const fontFamilyToInstall of fontFamiliesToInstall ) {\n\t\t\t\tlet isANewFontFamily = false;\n\n\t\t\t\t// Get the font family if it already exists.\n\t\t\t\tlet installedFontFamily = await fetchGetFontFamilyBySlug(\n\t\t\t\t\tfontFamilyToInstall.slug\n\t\t\t\t);\n\n\t\t\t\t// Otherwise create it.\n\t\t\t\tif ( ! installedFontFamily ) {\n\t\t\t\t\tisANewFontFamily = true;\n\t\t\t\t\t// Prepare font family form data to install.\n\t\t\t\t\tinstalledFontFamily = await fetchInstallFontFamily(\n\t\t\t\t\t\tmakeFontFamilyFormData( fontFamilyToInstall )\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Collect font faces that have already been installed (to be activated later)\n\t\t\t\tconst alreadyInstalledFontFaces =\n\t\t\t\t\tinstalledFontFamily.fontFace && fontFamilyToInstall.fontFace\n\t\t\t\t\t\t? installedFontFamily.fontFace.filter(\n\t\t\t\t\t\t\t\t( fontFaceToInstall ) =>\n\t\t\t\t\t\t\t\t\tcheckFontFaceInstalled(\n\t\t\t\t\t\t\t\t\t\tfontFaceToInstall,\n\t\t\t\t\t\t\t\t\t\tfontFamilyToInstall.fontFace\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: [];\n\n\t\t\t\t// Filter out Font Faces that have already been installed (so that they are not re-installed)\n\t\t\t\tif (\n\t\t\t\t\tinstalledFontFamily.fontFace &&\n\t\t\t\t\tfontFamilyToInstall.fontFace\n\t\t\t\t) {\n\t\t\t\t\tfontFamilyToInstall.fontFace =\n\t\t\t\t\t\tfontFamilyToInstall.fontFace.filter(\n\t\t\t\t\t\t\t( fontFaceToInstall ) =>\n\t\t\t\t\t\t\t\t! checkFontFaceInstalled(\n\t\t\t\t\t\t\t\t\tfontFaceToInstall,\n\t\t\t\t\t\t\t\t\tinstalledFontFamily.fontFace\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t// Install the fonts (upload the font files to the server and create the post in the database).\n\t\t\t\tlet successfullyInstalledFontFaces = [];\n\t\t\t\tlet unsuccessfullyInstalledFontFaces = [];\n\t\t\t\tif ( fontFamilyToInstall?.fontFace?.length > 0 ) {\n\t\t\t\t\tconst response = await batchInstallFontFaces(\n\t\t\t\t\t\tinstalledFontFamily.id,\n\t\t\t\t\t\tmakeFontFacesFormData( fontFamilyToInstall )\n\t\t\t\t\t);\n\t\t\t\t\tsuccessfullyInstalledFontFaces = response?.successes;\n\t\t\t\t\tunsuccessfullyInstalledFontFaces = response?.errors;\n\t\t\t\t}\n\n\t\t\t\t// Use the successfully installed font faces\n\t\t\t\t// As well as any font faces that were already installed (those will be activated)\n\t\t\t\tif (\n\t\t\t\t\tsuccessfullyInstalledFontFaces?.length > 0 ||\n\t\t\t\t\talreadyInstalledFontFaces?.length > 0\n\t\t\t\t) {\n\t\t\t\t\t// Use font data from REST API not from client to ensure\n\t\t\t\t\t// correct font information is used.\n\t\t\t\t\tinstalledFontFamily.fontFace = [\n\t\t\t\t\t\t...successfullyInstalledFontFaces,\n\t\t\t\t\t];\n\n\t\t\t\t\tfontFamiliesToActivate.push( installedFontFamily );\n\t\t\t\t}\n\n\t\t\t\t// If it's a system font but was installed successfully, activate it.\n\t\t\t\tif (\n\t\t\t\t\tinstalledFontFamily &&\n\t\t\t\t\t! fontFamilyToInstall?.fontFace?.length\n\t\t\t\t) {\n\t\t\t\t\tfontFamiliesToActivate.push( installedFontFamily );\n\t\t\t\t}\n\n\t\t\t\t// If the font family is new and is not a system font, delete it to avoid having font families without font faces.\n\t\t\t\tif (\n\t\t\t\t\tisANewFontFamily &&\n\t\t\t\t\tfontFamilyToInstall?.fontFace?.length > 0 &&\n\t\t\t\t\tsuccessfullyInstalledFontFaces?.length === 0\n\t\t\t\t) {\n\t\t\t\t\tawait fetchUninstallFontFamily( installedFontFamily.id );\n\t\t\t\t}\n\n\t\t\t\tinstallationErrors = installationErrors.concat(\n\t\t\t\t\tunsuccessfullyInstalledFontFaces\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tinstallationErrors = installationErrors.reduce(\n\t\t\t\t( unique, item ) =>\n\t\t\t\t\tunique.includes( item.message )\n\t\t\t\t\t\t? unique\n\t\t\t\t\t\t: [ ...unique, item.message ],\n\t\t\t\t[]\n\t\t\t);\n\n\t\t\tif ( fontFamiliesToActivate.length > 0 ) {\n\t\t\t\t// Activate the font family (add the font family to the global styles).\n\t\t\t\tconst activeFonts = activateCustomFontFamilies(\n\t\t\t\t\tfontFamiliesToActivate\n\t\t\t\t);\n\t\t\t\t// Save the global styles to the database.\n\t\t\t\tawait saveFontFamilies( activeFonts );\n\n\t\t\t\trefreshLibrary();\n\t\t\t}\n\n\t\t\tif ( installationErrors.length > 0 ) {\n\t\t\t\tconst installError = new Error(\n\t\t\t\t\t__( 'There was an error installing fonts.' )\n\t\t\t\t);\n\n\t\t\t\tinstallError.installationErrors = installationErrors;\n\n\t\t\t\tthrow installError;\n\t\t\t}\n\t\t} finally {\n\t\t\tsetIsInstalling( false );\n\t\t}\n\t}\n\n\tasync function uninstallFontFamily( fontFamilyToUninstall ) {\n\t\ttry {\n\t\t\t// Uninstall the font family.\n\t\t\t// (Removes the font files from the server and the posts from the database).\n\t\t\tconst uninstalledFontFamily = await fetchUninstallFontFamily(\n\t\t\t\tfontFamilyToUninstall.id\n\t\t\t);\n\n\t\t\t// Deactivate the font family if delete request is successful\n\t\t\t// (Removes the font family from the global styles).\n\t\t\tif ( uninstalledFontFamily.deleted ) {\n\t\t\t\tconst activeFonts = deactivateFontFamily(\n\t\t\t\t\tfontFamilyToUninstall\n\t\t\t\t);\n\t\t\t\t// Save the global styles to the database.\n\t\t\t\tawait saveFontFamilies( activeFonts );\n\t\t\t}\n\n\t\t\t// Refresh the library (the library font families from database).\n\t\t\trefreshLibrary();\n\n\t\t\treturn uninstalledFontFamily;\n\t\t} catch ( error ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error(\n\t\t\t\t`There was an error uninstalling the font family:`,\n\t\t\t\terror\n\t\t\t);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tconst deactivateFontFamily = ( font ) => {\n\t\t// If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts\n\t\t// We want to save as active all the theme fonts at the beginning\n\t\tconst initialCustomFonts = fontFamilies?.[ font.source ] ?? [];\n\t\tconst newCustomFonts = initialCustomFonts.filter(\n\t\t\t( f ) => f.slug !== font.slug\n\t\t);\n\t\tconst activeFonts = {\n\t\t\t...fontFamilies,\n\t\t\t[ font.source ]: newCustomFonts,\n\t\t};\n\t\tsetFontFamilies( activeFonts );\n\n\t\tif ( font.fontFace ) {\n\t\t\tfont.fontFace.forEach( ( face ) => {\n\t\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t\t} );\n\t\t}\n\t\treturn activeFonts;\n\t};\n\n\tconst activateCustomFontFamilies = ( fontsToAdd ) => {\n\t\tconst fontsToActivate = cleanFontsForSave( fontsToAdd );\n\n\t\tconst activeFonts = {\n\t\t\t...fontFamilies,\n\t\t\t// Merge the existing custom fonts with the new fonts.\n\t\t\tcustom: mergeFontFamilies( fontFamilies?.custom, fontsToActivate ),\n\t\t};\n\n\t\t// Activate the fonts by set the new custom fonts array.\n\t\tsetFontFamilies( activeFonts );\n\n\t\tloadFontsInBrowser( fontsToActivate );\n\n\t\treturn activeFonts;\n\t};\n\n\t// Removes the id from the families and faces to avoid saving that to global styles post content.\n\tconst cleanFontsForSave = ( fonts ) => {\n\t\treturn fonts.map( ( { id: _familyDbId, fontFace, ...font } ) => ( {\n\t\t\t...font,\n\t\t\t...( fontFace && fontFace.length > 0\n\t\t\t\t? {\n\t\t\t\t\t\tfontFace: fontFace.map(\n\t\t\t\t\t\t\t( { id: _faceDbId, ...face } ) => face\n\t\t\t\t\t\t),\n\t\t\t\t }\n\t\t\t\t: {} ),\n\t\t} ) );\n\t};\n\n\tconst loadFontsInBrowser = ( fonts ) => {\n\t\t// Add custom fonts to the browser.\n\t\tfonts.forEach( ( font ) => {\n\t\t\tif ( font.fontFace ) {\n\t\t\t\tfont.fontFace.forEach( ( face ) => {\n\t\t\t\t\t// Load font faces just in the iframe because they already are in the document.\n\t\t\t\t\tloadFontFaceInBrowser(\n\t\t\t\t\t\tface,\n\t\t\t\t\t\tgetDisplaySrcFromFontFace( face.src ),\n\t\t\t\t\t\t'all'\n\t\t\t\t\t);\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t};\n\n\tconst toggleActivateFont = ( font, face ) => {\n\t\t// If the user doesn't have custom fonts defined, include as custom fonts all the theme fonts\n\t\t// We want to save as active all the theme fonts at the beginning\n\t\tconst initialFonts = fontFamilies?.[ font.source ] ?? [];\n\t\t// Toggles the received font family or font face\n\t\tconst newFonts = toggleFont( font, face, initialFonts );\n\t\t// Updates the font families activated in global settings:\n\t\tsetFontFamilies( {\n\t\t\t...fontFamilies,\n\t\t\t[ font.source ]: newFonts,\n\t\t} );\n\n\t\tconst isFaceActivated = isFontActivated(\n\t\t\tfont.slug,\n\t\t\tface?.fontStyle,\n\t\t\tface?.fontWeight,\n\t\t\tfont.source\n\t\t);\n\n\t\tif ( isFaceActivated ) {\n\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t} else {\n\t\t\tloadFontFaceInBrowser(\n\t\t\t\tface,\n\t\t\t\tgetDisplaySrcFromFontFace( face?.src ),\n\t\t\t\t'all'\n\t\t\t);\n\t\t}\n\t};\n\n\tconst loadFontFaceAsset = async ( fontFace ) => {\n\t\t// If the font doesn't have a src, don't load it.\n\t\tif ( ! fontFace.src ) {\n\t\t\treturn;\n\t\t}\n\t\t// Get the src of the font.\n\t\tconst src = getDisplaySrcFromFontFace( fontFace.src );\n\t\t// If the font is already loaded, don't load it again.\n\t\tif ( ! src || loadedFontUrls.has( src ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// Load the font in the browser.\n\t\tloadFontFaceInBrowser( fontFace, src, 'document' );\n\t\t// Add the font to the loaded fonts list.\n\t\tloadedFontUrls.add( src );\n\t};\n\n\t// Font Collections\n\tconst [ collections, setFontCollections ] = useState( [] );\n\tconst getFontCollections = async () => {\n\t\tconst response = await fetchFontCollections();\n\t\tsetFontCollections( response );\n\t};\n\tconst getFontCollection = async ( slug ) => {\n\t\ttry {\n\t\t\tconst hasData = !! collections.find(\n\t\t\t\t( collection ) => collection.slug === slug\n\t\t\t)?.font_families;\n\t\t\tif ( hasData ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst response = await fetchFontCollection( slug );\n\t\t\tconst updatedCollections = collections.map( ( collection ) =>\n\t\t\t\tcollection.slug === slug\n\t\t\t\t\t? { ...collection, ...response }\n\t\t\t\t\t: collection\n\t\t\t);\n\t\t\tsetFontCollections( updatedCollections );\n\t\t} catch ( e ) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.error( e );\n\t\t\tthrow e;\n\t\t}\n\t};\n\n\tuseEffect( () => {\n\t\tgetFontCollections();\n\t}, [] );\n\n\treturn (\n\t\t<FontLibraryContext.Provider\n\t\t\tvalue={ {\n\t\t\t\tlibraryFontSelected,\n\t\t\t\thandleSetLibraryFontSelected,\n\t\t\t\tfontFamilies,\n\t\t\t\tbaseCustomFonts,\n\t\t\t\tisFontActivated,\n\t\t\t\tgetFontFacesActivated,\n\t\t\t\tloadFontFaceAsset,\n\t\t\t\tinstallFonts,\n\t\t\t\tuninstallFontFamily,\n\t\t\t\ttoggleActivateFont,\n\t\t\t\tgetAvailableFontsOutline,\n\t\t\t\tmodalTabOpen,\n\t\t\t\tsetModalTabOpen,\n\t\t\t\trefreshLibrary,\n\t\t\t\tnotice,\n\t\t\t\tsetNotice,\n\t\t\t\tsaveFontFamilies,\n\t\t\t\tisResolvingLibrary,\n\t\t\t\tisInstalling,\n\t\t\t\tcollections,\n\t\t\t\tgetFontCollection,\n\t\t\t} }\n\t\t>\n\t\t\t{ children }\n\t\t</FontLibraryContext.Provider>\n\t);\n}\n\nexport default FontLibraryProvider;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\nimport { useContext, useEffect, useState, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport {\n\tgetFacePreviewStyle,\n\tgetFamilyPreviewStyle,\n} from './utils/preview-styles';\n\nfunction getPreviewUrl( fontFace ) {\n\tif ( fontFace.preview ) {\n\t\treturn fontFace.preview;\n\t}\n\tif ( fontFace.src ) {\n\t\treturn Array.isArray( fontFace.src ) ? fontFace.src[ 0 ] : fontFace.src;\n\t}\n}\n\nfunction getDisplayFontFace( font ) {\n\t// if this IS a font face return it\n\tif ( font.fontStyle || font.fontWeight ) {\n\t\treturn font;\n\t}\n\t// if this is a font family with a collection of font faces\n\t// return the first one that is normal and 400 OR just the first one\n\tif ( font.fontFace && font.fontFace.length ) {\n\t\treturn (\n\t\t\tfont.fontFace.find(\n\t\t\t\t( face ) =>\n\t\t\t\t\tface.fontStyle === 'normal' && face.fontWeight === '400'\n\t\t\t) || font.fontFace[ 0 ]\n\t\t);\n\t}\n\t// This must be a font family with no font faces\n\t// return a fake font face\n\treturn {\n\t\tfontStyle: 'normal',\n\t\tfontWeight: '400',\n\t\tfontFamily: font.fontFamily,\n\t\tfake: true,\n\t};\n}\n\nfunction FontDemo( { font, text } ) {\n\tconst ref = useRef( null );\n\n\tconst fontFace = getDisplayFontFace( font );\n\tconst style = getFamilyPreviewStyle( font );\n\ttext = text || font.name;\n\tconst customPreviewUrl = font.preview;\n\n\tconst [ isIntersecting, setIsIntersecting ] = useState( false );\n\tconst [ isAssetLoaded, setIsAssetLoaded ] = useState( false );\n\tconst { loadFontFaceAsset } = useContext( FontLibraryContext );\n\n\tconst previewUrl = customPreviewUrl ?? getPreviewUrl( fontFace );\n\tconst isPreviewImage =\n\t\tpreviewUrl && previewUrl.match( /\\.(png|jpg|jpeg|gif|svg)$/i );\n\n\tconst faceStyles = getFacePreviewStyle( fontFace );\n\tconst textDemoStyle = {\n\t\tfontSize: '18px',\n\t\tlineHeight: 1,\n\t\topacity: isAssetLoaded ? '1' : '0',\n\t\t...style,\n\t\t...faceStyles,\n\t};\n\n\tuseEffect( () => {\n\t\tconst observer = new window.IntersectionObserver( ( [ entry ] ) => {\n\t\t\tsetIsIntersecting( entry.isIntersecting );\n\t\t}, {} );\n\t\tobserver.observe( ref.current );\n\t\treturn () => observer.disconnect();\n\t}, [ ref ] );\n\n\tuseEffect( () => {\n\t\tconst loadAsset = async () => {\n\t\t\tif ( isIntersecting ) {\n\t\t\t\tif ( ! isPreviewImage && fontFace.src ) {\n\t\t\t\t\tawait loadFontFaceAsset( fontFace );\n\t\t\t\t}\n\t\t\t\tsetIsAssetLoaded( true );\n\t\t\t}\n\t\t};\n\t\tloadAsset();\n\t}, [ fontFace, isIntersecting, loadFontFaceAsset, isPreviewImage ] );\n\n\treturn (\n\t\t<div ref={ ref }>\n\t\t\t{ isPreviewImage ? (\n\t\t\t\t<img\n\t\t\t\t\tsrc={ previewUrl }\n\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\talt={ text }\n\t\t\t\t\tclassName=\"font-library-modal__font-variant_demo-image\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ textDemoStyle }\n\t\t\t\t\tclassName=\"font-library-modal__font-variant_demo-text\"\n\t\t\t\t>\n\t\t\t\t\t{ text }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default FontDemo;\n","/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalText as Text,\n\tButton,\n\tFlex,\n\tFlexItem,\n\tIcon,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FontDemo from './font-demo';\nimport { chevronRight } from '@wordpress/icons';\n\nfunction FontCard( { font, onClick, variantsText, navigatorPath } ) {\n\tconst variantsCount = font.fontFace?.length || 1;\n\n\tconst style = {\n\t\tcursor: !! onClick ? 'pointer' : 'default',\n\t};\n\n\tconst navigator = useNavigator();\n\n\treturn (\n\t\t<Button\n\t\t\tonClick={ () => {\n\t\t\t\tonClick();\n\t\t\t\tif ( navigatorPath ) {\n\t\t\t\t\tnavigator.goTo( navigatorPath );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tstyle={ style }\n\t\t\tclassName=\"font-library-modal__font-card\"\n\t\t>\n\t\t\t<Flex justify=\"space-between\" wrap={ false }>\n\t\t\t\t<FontDemo font={ font } />\n\t\t\t\t<Flex justify=\"flex-end\">\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Text className=\"font-library-modal__font-card__count\">\n\t\t\t\t\t\t\t{ variantsText ||\n\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'%d variant',\n\t\t\t\t\t\t\t\t\t\t'%d variants',\n\t\t\t\t\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Icon icon={ chevronRight } />\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</Flex>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n\nexport default FontCard;\n","/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport {\n\tCheckboxControl,\n\tFlex,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport { FontLibraryContext } from './context';\nimport FontDemo from './font-demo';\nimport { unlock } from '../../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nfunction LibraryFontVariant( { face, font } ) {\n\tconst { isFontActivated, toggleActivateFont } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst isInstalled =\n\t\tfont?.fontFace?.length > 0\n\t\t\t? isFontActivated(\n\t\t\t\t\tfont.slug,\n\t\t\t\t\tface.fontStyle,\n\t\t\t\t\tface.fontWeight,\n\t\t\t\t\tfont.source\n\t\t\t )\n\t\t\t: isFontActivated( font.slug, null, null, font.source );\n\n\tconst handleToggleActivation = () => {\n\t\tif ( font?.fontFace?.length > 0 ) {\n\t\t\ttoggleActivateFont( font, face );\n\t\t\treturn;\n\t\t}\n\t\ttoggleActivateFont( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst checkboxId = kebabCase(\n\t\t`${ font.slug }-${ getFontFaceVariantName( face ) }`\n\t);\n\n\treturn (\n\t\t<div className=\"font-library-modal__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ isInstalled }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default LibraryFontVariant;\n","function getNumericFontWeight( value ) {\n\tswitch ( value ) {\n\t\tcase 'normal':\n\t\t\treturn 400;\n\t\tcase 'bold':\n\t\t\treturn 700;\n\t\tcase 'bolder':\n\t\t\treturn 500;\n\t\tcase 'lighter':\n\t\t\treturn 300;\n\t\tdefault:\n\t\t\treturn parseInt( value, 10 );\n\t}\n}\n\nexport function sortFontFaces( faces ) {\n\treturn faces.sort( ( a, b ) => {\n\t\t// Ensure 'normal' fontStyle is always first\n\t\tif ( a.fontStyle === 'normal' && b.fontStyle !== 'normal' ) {\n\t\t\treturn -1;\n\t\t}\n\t\tif ( b.fontStyle === 'normal' && a.fontStyle !== 'normal' ) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t// If both fontStyles are the same, sort by fontWeight\n\t\tif ( a.fontStyle === b.fontStyle ) {\n\t\t\treturn (\n\t\t\t\tgetNumericFontWeight( a.fontWeight ) -\n\t\t\t\tgetNumericFontWeight( b.fontWeight )\n\t\t\t);\n\t\t}\n\n\t\t// Sort other fontStyles alphabetically\n\t\treturn a.fontStyle.localeCompare( b.fontStyle );\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalSpacer as Spacer,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tNotice,\n\tProgressBar,\n\tCheckboxControl,\n} from '@wordpress/components';\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useState } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { chevronLeft } from '@wordpress/icons';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport FontCard from './font-card';\nimport LibraryFontVariant from './library-font-variant';\nimport { sortFontFaces } from './utils/sort-font-faces';\nimport {\n\tsetUIValuesNeeded,\n\tloadFontFaceInBrowser,\n\tunloadFontFaceInBrowser,\n\tgetDisplaySrcFromFontFace,\n} from './utils';\nimport { unlock } from '../../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nfunction InstalledFonts() {\n\tconst {\n\t\tbaseCustomFonts,\n\t\tlibraryFontSelected,\n\t\thandleSetLibraryFontSelected,\n\t\trefreshLibrary,\n\t\tuninstallFontFamily,\n\t\tisResolvingLibrary,\n\t\tisInstalling,\n\t\tsaveFontFamilies,\n\t\tgetFontFacesActivated,\n\t\tnotice,\n\t\tsetNotice,\n\t} = useContext( FontLibraryContext );\n\n\tconst [ fontFamilies, setFontFamilies ] = useGlobalSetting(\n\t\t'typography.fontFamilies'\n\t);\n\tconst [ isConfirmDeleteOpen, setIsConfirmDeleteOpen ] = useState( false );\n\tconst [ baseFontFamilies ] = useGlobalSetting(\n\t\t'typography.fontFamilies',\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst globalStylesId = useSelect( ( select ) => {\n\t\tconst { __experimentalGetCurrentGlobalStylesId } = select( coreStore );\n\t\treturn __experimentalGetCurrentGlobalStylesId();\n\t} );\n\tconst globalStyles = useEntityRecord(\n\t\t'root',\n\t\t'globalStyles',\n\t\tglobalStylesId\n\t);\n\tconst fontFamiliesHasChanges =\n\t\t!! globalStyles?.edits?.settings?.typography?.fontFamilies;\n\n\tconst themeFonts = fontFamilies?.theme\n\t\t? fontFamilies.theme\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\tconst themeFontsSlugs = new Set( themeFonts.map( ( f ) => f.slug ) );\n\tconst baseThemeFonts = baseFontFamilies?.theme\n\t\t? themeFonts.concat(\n\t\t\t\tbaseFontFamilies.theme\n\t\t\t\t\t.filter( ( f ) => ! themeFontsSlugs.has( f.slug ) )\n\t\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t )\n\t\t: [];\n\n\tconst customFontFamilyId =\n\t\tlibraryFontSelected?.source === 'custom' && libraryFontSelected?.id;\n\n\tconst canUserDelete = useSelect(\n\t\t( select ) => {\n\t\t\tconst { canUser } = select( coreStore );\n\t\t\treturn (\n\t\t\t\tcustomFontFamilyId &&\n\t\t\t\tcanUser( 'delete', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: 'wp_font_family',\n\t\t\t\t\tid: customFontFamilyId,\n\t\t\t\t} )\n\t\t\t);\n\t\t},\n\t\t[ customFontFamilyId ]\n\t);\n\n\tconst shouldDisplayDeleteButton =\n\t\t!! libraryFontSelected &&\n\t\tlibraryFontSelected?.source !== 'theme' &&\n\t\tcanUserDelete;\n\n\tconst handleUninstallClick = () => {\n\t\tsetIsConfirmDeleteOpen( true );\n\t};\n\n\tconst getFontFacesToDisplay = ( font ) => {\n\t\tif ( ! font ) {\n\t\t\treturn [];\n\t\t}\n\t\tif ( ! font.fontFace || ! font.fontFace.length ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tfontFamily: font.fontFamily,\n\t\t\t\t\tfontStyle: 'normal',\n\t\t\t\t\tfontWeight: '400',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn sortFontFaces( font.fontFace );\n\t};\n\n\tconst getFontCardVariantsText = ( font ) => {\n\t\tconst variantsInstalled =\n\t\t\tfont?.fontFace?.length > 0 ? font.fontFace.length : 1;\n\t\tconst variantsActive = getFontFacesActivated(\n\t\t\tfont.slug,\n\t\t\tfont.source\n\t\t).length;\n\t\treturn sprintf(\n\t\t\t/* translators: 1: Active font variants, 2: Total font variants. */\n\t\t\t__( '%1$s/%2$s variants active' ),\n\t\t\tvariantsActive,\n\t\t\tvariantsInstalled\n\t\t);\n\t};\n\n\tuseEffect( () => {\n\t\thandleSetLibraryFontSelected( libraryFontSelected );\n\t\trefreshLibrary();\n\t}, [] );\n\n\t// Get activated fonts count.\n\tconst activeFontsCount = libraryFontSelected\n\t\t? getFontFacesActivated(\n\t\t\t\tlibraryFontSelected.slug,\n\t\t\t\tlibraryFontSelected.source\n\t\t ).length\n\t\t: 0;\n\n\tconst selectedFontsCount =\n\t\tlibraryFontSelected?.fontFace?.length ??\n\t\t( libraryFontSelected?.fontFamily ? 1 : 0 );\n\n\t// Check if any fonts are selected.\n\tconst isIndeterminate =\n\t\tactiveFontsCount > 0 && activeFontsCount !== selectedFontsCount;\n\n\t// Check if all fonts are selected.\n\tconst isSelectAllChecked = activeFontsCount === selectedFontsCount;\n\n\t// Toggle select all fonts.\n\tconst toggleSelectAll = () => {\n\t\tconst initialFonts =\n\t\t\tfontFamilies?.[ libraryFontSelected.source ]?.filter(\n\t\t\t\t( f ) => f.slug !== libraryFontSelected.slug\n\t\t\t) ?? [];\n\t\tconst newFonts = isSelectAllChecked\n\t\t\t? initialFonts\n\t\t\t: [ ...initialFonts, libraryFontSelected ];\n\n\t\tsetFontFamilies( {\n\t\t\t...fontFamilies,\n\t\t\t[ libraryFontSelected.source ]: newFonts,\n\t\t} );\n\n\t\tif ( libraryFontSelected.fontFace ) {\n\t\t\tlibraryFontSelected.fontFace.forEach( ( face ) => {\n\t\t\t\tif ( isSelectAllChecked ) {\n\t\t\t\t\tunloadFontFaceInBrowser( face, 'all' );\n\t\t\t\t} else {\n\t\t\t\t\tloadFontFaceInBrowser(\n\t\t\t\t\t\tface,\n\t\t\t\t\t\tgetDisplaySrcFromFontFace( face?.src ),\n\t\t\t\t\t\t'all'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst hasFonts = baseThemeFonts.length > 0 || baseCustomFonts.length > 0;\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t{ isResolvingLibrary && (\n\t\t\t\t<div className=\"font-library-modal__loading\">\n\t\t\t\t\t<ProgressBar />\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ ! isResolvingLibrary && (\n\t\t\t\t<>\n\t\t\t\t\t<NavigatorProvider\n\t\t\t\t\t\tinitialPath={\n\t\t\t\t\t\t\tlibraryFontSelected ? '/fontFamily' : '/'\n\t\t\t\t\t\t}\n\t\t\t\t\t>\n\t\t\t\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t\t\t\t<VStack spacing=\"8\">\n\t\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ ! hasFonts && (\n\t\t\t\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\t\t\t\t{ __( 'No fonts installed.' ) }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ baseThemeFonts.length > 0 && (\n\t\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t\t<h2 className=\"font-library-modal__fonts-title\">\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/* translators: Heading for a list of fonts provided by the theme. */\n\t\t\t\t\t\t\t\t\t\t\t\t_x( 'Theme', 'font source' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ baseThemeFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnavigatorPath=\"/fontFamily\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariantsText={ getFontCardVariantsText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ baseCustomFonts.length > 0 && (\n\t\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t\t<h2 className=\"font-library-modal__fonts-title\">\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/* translators: Heading for a list of fonts installed by the user. */\n\t\t\t\t\t\t\t\t\t\t\t\t_x( 'Custom', 'font source' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ baseCustomFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnavigatorPath=\"/fontFamily\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvariantsText={ getFontCardVariantsText(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</NavigatorScreen>\n\n\t\t\t\t\t\t<NavigatorScreen path=\"/fontFamily\">\n\t\t\t\t\t\t\t<ConfirmDeleteDialog\n\t\t\t\t\t\t\t\tfont={ libraryFontSelected }\n\t\t\t\t\t\t\t\tisOpen={ isConfirmDeleteOpen }\n\t\t\t\t\t\t\t\tsetIsOpen={ setIsConfirmDeleteOpen }\n\t\t\t\t\t\t\t\tsetNotice={ setNotice }\n\t\t\t\t\t\t\t\tuninstallFontFamily={ uninstallFontFamily }\n\t\t\t\t\t\t\t\thandleSetLibraryFontSelected={\n\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<Flex justify=\"flex-start\">\n\t\t\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\thandleSetLibraryFontSelected( null );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ libraryFontSelected?.name }\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\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<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t'Choose font variants. Keep in mind that too many variants could make your site slower.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__select-all\"\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Select all' ) }\n\t\t\t\t\t\t\t\t\tchecked={ isSelectAllChecked }\n\t\t\t\t\t\t\t\t\tonChange={ toggleSelectAll }\n\t\t\t\t\t\t\t\t\tindeterminate={ isIndeterminate }\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Spacer margin={ 8 } />\n\t\t\t\t\t\t\t\t{ getFontFacesToDisplay(\n\t\t\t\t\t\t\t\t\tlibraryFontSelected\n\t\t\t\t\t\t\t\t).map( ( face, i ) => (\n\t\t\t\t\t\t\t\t\t<LibraryFontVariant\n\t\t\t\t\t\t\t\t\t\tfont={ libraryFontSelected }\n\t\t\t\t\t\t\t\t\t\tface={ face }\n\t\t\t\t\t\t\t\t\t\tkey={ `face${ i }` }\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</VStack>\n\t\t\t\t\t\t</NavigatorScreen>\n\t\t\t\t\t</NavigatorProvider>\n\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\tclassName=\"font-library-modal__footer\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isInstalling && <ProgressBar /> }\n\t\t\t\t\t\t{ shouldDisplayDeleteButton && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\tonClick={ handleUninstallClick }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsaveFontFamilies( fontFamilies );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tdisabled={ ! fontFamiliesHasChanges }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Update' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction ConfirmDeleteDialog( {\n\tfont,\n\tisOpen,\n\tsetIsOpen,\n\tsetNotice,\n\tuninstallFontFamily,\n\thandleSetLibraryFontSelected,\n} ) {\n\tconst navigator = useNavigator();\n\n\tconst handleConfirmUninstall = async () => {\n\t\tsetNotice( null );\n\t\tsetIsOpen( false );\n\t\ttry {\n\t\t\tawait uninstallFontFamily( font );\n\t\t\tnavigator.goBack();\n\t\t\thandleSetLibraryFontSelected( null );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Font family uninstalled successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage:\n\t\t\t\t\t__( 'There was an error uninstalling the font family. ' ) +\n\t\t\t\t\terror.message,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst handleCancelUninstall = () => {\n\t\tsetIsOpen( false );\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tonCancel={ handleCancelUninstall }\n\t\t\tonConfirm={ handleConfirmUninstall }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ font &&\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: Name of the font. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\" font and all its variants and assets?'\n\t\t\t\t\t),\n\t\t\t\t\tfont.name\n\t\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default InstalledFonts;\n","export function getFontsOutline( fonts ) {\n\treturn fonts.reduce(\n\t\t( acc, font ) => ( {\n\t\t\t...acc,\n\t\t\t[ font.slug ]: ( font?.fontFace || [] ).reduce(\n\t\t\t\t( faces, face ) => ( {\n\t\t\t\t\t...faces,\n\t\t\t\t\t[ `${ face.fontStyle }-${ face.fontWeight }` ]: true,\n\t\t\t\t} ),\n\t\t\t\t{}\n\t\t\t),\n\t\t} ),\n\t\t{}\n\t);\n}\n\nexport function isFontFontFaceInOutline( slug, face, outline ) {\n\tif ( ! face ) {\n\t\treturn !! outline[ slug ];\n\t}\n\treturn !! outline[ slug ]?.[ `${ face.fontStyle }-${ face.fontWeight }` ];\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tCard,\n\tCardBody,\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\nfunction GoogleFontsConfirmDialog() {\n\tconst handleConfirm = () => {\n\t\t// eslint-disable-next-line no-undef\n\t\twindow.localStorage.setItem(\n\t\t\t'wp-font-library-google-fonts-permission',\n\t\t\t'true'\n\t\t);\n\t\twindow.dispatchEvent( new Event( 'storage' ) );\n\t};\n\n\treturn (\n\t\t<div className=\"font-library__google-fonts-confirm\">\n\t\t\t<Card>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<Heading level={ 2 }>\n\t\t\t\t\t\t{ __( 'Connect to Google Fonts' ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t<Spacer margin={ 6 } />\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'To install fonts from Google you must give permission to connect directly to Google servers. The fonts you install will be downloaded from Google and stored on your site. Your site will then use these locally-hosted fonts.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'You can alternatively upload files directly on the Upload tab.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Spacer margin={ 6 } />\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\tonClick={ handleConfirm }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Allow access to Google Fonts' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n\nexport default GoogleFontsConfirmDialog;\n","/**\n * WordPress dependencies\n */\nimport {\n\tCheckboxControl,\n\tFlex,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { getFontFaceVariantName } from './utils';\nimport FontDemo from './font-demo';\nimport { unlock } from '../../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nfunction CollectionFontVariant( {\n\tface,\n\tfont,\n\thandleToggleVariant,\n\tselected,\n} ) {\n\tconst handleToggleActivation = () => {\n\t\tif ( font?.fontFace ) {\n\t\t\thandleToggleVariant( font, face );\n\t\t\treturn;\n\t\t}\n\t\thandleToggleVariant( font );\n\t};\n\n\tconst displayName = font.name + ' ' + getFontFaceVariantName( face );\n\tconst checkboxId = kebabCase(\n\t\t`${ font.slug }-${ getFontFaceVariantName( face ) }`\n\t);\n\n\treturn (\n\t\t<div className=\"font-library-modal__font-card\">\n\t\t\t<Flex justify=\"flex-start\" align=\"center\" gap=\"1rem\">\n\t\t\t\t<CheckboxControl\n\t\t\t\t\tchecked={ selected }\n\t\t\t\t\tonChange={ handleToggleActivation }\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ checkboxId }\n\t\t\t\t/>\n\t\t\t\t<label htmlFor={ checkboxId }>\n\t\t\t\t\t<FontDemo\n\t\t\t\t\t\tfont={ face }\n\t\t\t\t\t\ttext={ displayName }\n\t\t\t\t\t\tonClick={ handleToggleActivation }\n\t\t\t\t\t/>\n\t\t\t\t</label>\n\t\t\t</Flex>\n\t\t</div>\n\t);\n}\n\nexport default CollectionFontVariant;\n","/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseState,\n\tuseMemo,\n\tcreateInterpolateElement,\n} from '@wordpress/element';\nimport {\n\t__experimentalSpacer as Spacer,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalNavigatorToParentButton as NavigatorToParentButton,\n\t__experimentalHeading as Heading,\n\tNotice,\n\tSelectControl,\n\tFlexItem,\n\tFlex,\n\tButton,\n\tDropdownMenu,\n\tSearchControl,\n\tProgressBar,\n} from '@wordpress/components';\nimport { debounce } from '@wordpress/compose';\nimport { sprintf, __, _x } from '@wordpress/i18n';\nimport { moreVertical, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './context';\nimport FontCard from './font-card';\nimport filterFonts from './utils/filter-fonts';\nimport { toggleFont } from './utils/toggleFont';\nimport {\n\tgetFontsOutline,\n\tisFontFontFaceInOutline,\n} from './utils/fonts-outline';\nimport GoogleFontsConfirmDialog from './google-fonts-confirm-dialog';\nimport { downloadFontFaceAssets } from './utils';\nimport { sortFontFaces } from './utils/sort-font-faces';\nimport CollectionFontVariant from './collection-font-variant';\n\nconst DEFAULT_CATEGORY = {\n\tslug: 'all',\n\tname: _x( 'All', 'font categories' ),\n};\n\nconst LOCAL_STORAGE_ITEM = 'wp-font-library-google-fonts-permission';\nconst MIN_WINDOW_HEIGHT = 500;\n\nfunction FontCollection( { slug } ) {\n\tconst requiresPermission = slug === 'google-fonts';\n\n\tconst getGoogleFontsPermissionFromStorage = () => {\n\t\treturn window.localStorage.getItem( LOCAL_STORAGE_ITEM ) === 'true';\n\t};\n\n\tconst [ selectedFont, setSelectedFont ] = useState( null );\n\tconst [ fontsToInstall, setFontsToInstall ] = useState( [] );\n\tconst [ page, setPage ] = useState( 1 );\n\tconst [ filters, setFilters ] = useState( {} );\n\tconst [ renderConfirmDialog, setRenderConfirmDialog ] = useState(\n\t\trequiresPermission && ! getGoogleFontsPermissionFromStorage()\n\t);\n\tconst {\n\t\tcollections,\n\t\tgetFontCollection,\n\t\tinstallFonts,\n\t\tisInstalling,\n\t\tnotice,\n\t\tsetNotice,\n\t} = useContext( FontLibraryContext );\n\tconst selectedCollection = collections.find(\n\t\t( collection ) => collection.slug === slug\n\t);\n\n\tuseEffect( () => {\n\t\tconst handleStorage = () => {\n\t\t\tsetRenderConfirmDialog(\n\t\t\t\trequiresPermission && ! getGoogleFontsPermissionFromStorage()\n\t\t\t);\n\t\t};\n\t\thandleStorage();\n\t\twindow.addEventListener( 'storage', handleStorage );\n\t\treturn () => window.removeEventListener( 'storage', handleStorage );\n\t}, [ slug, requiresPermission ] );\n\n\tconst revokeAccess = () => {\n\t\twindow.localStorage.setItem( LOCAL_STORAGE_ITEM, 'false' );\n\t\twindow.dispatchEvent( new Event( 'storage' ) );\n\t};\n\n\tuseEffect( () => {\n\t\tconst fetchFontCollection = async () => {\n\t\t\ttry {\n\t\t\t\tawait getFontCollection( slug );\n\t\t\t\tresetFilters();\n\t\t\t} catch ( e ) {\n\t\t\t\tif ( ! notice ) {\n\t\t\t\t\tsetNotice( {\n\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\tmessage: e?.message,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tfetchFontCollection();\n\t}, [ slug, getFontCollection, setNotice, notice ] );\n\n\tuseEffect( () => {\n\t\tsetSelectedFont( null );\n\t\tsetNotice( null );\n\t}, [ slug, setNotice ] );\n\n\tuseEffect( () => {\n\t\t// If the selected fonts change, reset the selected fonts to install\n\t\tsetFontsToInstall( [] );\n\t}, [ selectedFont ] );\n\n\tconst collectionFonts = useMemo(\n\t\t() => selectedCollection?.font_families ?? [],\n\t\t[ selectedCollection ]\n\t);\n\tconst collectionCategories = selectedCollection?.categories ?? [];\n\n\tconst categories = [ DEFAULT_CATEGORY, ...collectionCategories ];\n\n\tconst fonts = useMemo(\n\t\t() => filterFonts( collectionFonts, filters ),\n\t\t[ collectionFonts, filters ]\n\t);\n\n\tconst isLoading = ! selectedCollection?.font_families && ! notice;\n\n\t// NOTE: The height of the font library modal unavailable to use for rendering font family items is roughly 417px\n\t// The height of each font family item is 61px.\n\tconst windowHeight = Math.max( window.innerHeight, MIN_WINDOW_HEIGHT );\n\tconst pageSize = Math.floor( ( windowHeight - 417 ) / 61 );\n\tconst totalPages = Math.ceil( fonts.length / pageSize );\n\tconst itemsStart = ( page - 1 ) * pageSize;\n\tconst itemsLimit = page * pageSize;\n\tconst items = fonts.slice( itemsStart, itemsLimit );\n\n\tconst handleCategoryFilter = ( category ) => {\n\t\tsetFilters( { ...filters, category } );\n\t\tsetPage( 1 );\n\t};\n\n\tconst handleUpdateSearchInput = ( value ) => {\n\t\tsetFilters( { ...filters, search: value } );\n\t\tsetPage( 1 );\n\t};\n\n\tconst debouncedUpdateSearchInput = debounce( handleUpdateSearchInput, 300 );\n\n\tconst resetFilters = () => {\n\t\tsetFilters( {} );\n\t\tsetPage( 1 );\n\t};\n\n\tconst handleToggleVariant = ( font, face ) => {\n\t\tconst newFontsToInstall = toggleFont( font, face, fontsToInstall );\n\t\tsetFontsToInstall( newFontsToInstall );\n\t};\n\n\tconst fontToInstallOutline = getFontsOutline( fontsToInstall );\n\n\tconst resetFontsToInstall = () => {\n\t\tsetFontsToInstall( [] );\n\t};\n\n\tconst handleInstall = async () => {\n\t\tsetNotice( null );\n\n\t\tconst fontFamily = fontsToInstall[ 0 ];\n\n\t\ttry {\n\t\t\tif ( fontFamily?.fontFace ) {\n\t\t\t\tawait Promise.all(\n\t\t\t\t\tfontFamily.fontFace.map( async ( fontFace ) => {\n\t\t\t\t\t\tif ( fontFace.src ) {\n\t\t\t\t\t\t\tfontFace.file = await downloadFontFaceAssets(\n\t\t\t\t\t\t\t\tfontFace.src\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} catch ( error ) {\n\t\t\t// If any of the fonts fail to download,\n\t\t\t// show an error notice and stop the request from being sent.\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: __(\n\t\t\t\t\t'Error installing the fonts, could not be downloaded.'\n\t\t\t\t),\n\t\t\t} );\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait installFonts( [ fontFamily ] );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Fonts were installed successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: error.message,\n\t\t\t} );\n\t\t}\n\t\tresetFontsToInstall();\n\t};\n\n\tconst getSortedFontFaces = ( fontFamily ) => {\n\t\tif ( ! fontFamily ) {\n\t\t\treturn [];\n\t\t}\n\t\tif ( ! fontFamily.fontFace || ! fontFamily.fontFace.length ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tfontFamily: fontFamily.fontFamily,\n\t\t\t\t\tfontStyle: 'normal',\n\t\t\t\t\tfontWeight: '400',\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn sortFontFaces( fontFamily.fontFace );\n\t};\n\n\tif ( renderConfirmDialog ) {\n\t\treturn <GoogleFontsConfirmDialog />;\n\t}\n\n\tconst ActionsComponent = () => {\n\t\tif ( slug !== 'google-fonts' || renderConfirmDialog || selectedFont ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\tpopoverProps={ {\n\t\t\t\t\tposition: 'bottom left',\n\t\t\t\t} }\n\t\t\t\tcontrols={ [\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle: __( 'Revoke access to Google Fonts' ),\n\t\t\t\t\t\tonClick: revokeAccess,\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\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t{ isLoading && (\n\t\t\t\t<div className=\"font-library-modal__loading\">\n\t\t\t\t\t<ProgressBar />\n\t\t\t\t</div>\n\t\t\t) }\n\n\t\t\t{ ! isLoading && (\n\t\t\t\t<>\n\t\t\t\t\t<NavigatorProvider\n\t\t\t\t\t\tinitialPath=\"/\"\n\t\t\t\t\t\tclassName=\"font-library-modal__tabpanel-layout\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<NavigatorScreen path=\"/\">\n\t\t\t\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t\t\t\t<VStack>\n\t\t\t\t\t\t\t\t\t<Heading level={ 2 } size={ 13 }>\n\t\t\t\t\t\t\t\t\t\t{ selectedCollection.name }\n\t\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t\t\t{ selectedCollection.description }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t\t\t<ActionsComponent />\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<Flex>\n\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t<SearchControl\n\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__search\"\n\t\t\t\t\t\t\t\t\t\tvalue={ filters.search }\n\t\t\t\t\t\t\t\t\t\tplaceholder={ __( 'Font name…' ) }\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Search' ) }\n\t\t\t\t\t\t\t\t\t\tonChange={ debouncedUpdateSearchInput }\n\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\thideLabelFromVision={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ filters.category }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleCategoryFilter }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ categories &&\n\t\t\t\t\t\t\t\t\t\t\tcategories.map( ( category ) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<option\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={ category.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={ category.slug }\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{ category.name }\n\t\t\t\t\t\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t\t</SelectControl>\n\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t</Flex>\n\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\n\t\t\t\t\t\t\t{ !! selectedCollection?.font_families?.length &&\n\t\t\t\t\t\t\t\t! fonts.length && (\n\t\t\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t\t'No fonts found. Try with a different search term'\n\t\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t<div className=\"font-library-modal__fonts-grid__main\">\n\t\t\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t\t\t * Disable reason: The `list` ARIA role is redundant but\n\t\t\t\t\t\t\t\t * Safari+VoiceOver won't announce the list otherwise.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t/* eslint-disable jsx-a11y/no-redundant-roles */ }\n\t\t\t\t\t\t\t\t<ul\n\t\t\t\t\t\t\t\t\trole=\"list\"\n\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ items.map( ( font ) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={\n\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings.slug\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"font-library-modal__fonts-list-item\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<FontCard\n\t\t\t\t\t\t\t\t\t\t\t\tfont={\n\t\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings\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\tnavigatorPath=\"/fontFamily\"\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\tsetSelectedFont(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont.font_family_settings\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/>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t{ /* eslint-enable jsx-a11y/no-redundant-roles */ }{ ' ' }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</NavigatorScreen>\n\n\t\t\t\t\t\t<NavigatorScreen path=\"/fontFamily\">\n\t\t\t\t\t\t\t<Flex justify=\"flex-start\">\n\t\t\t\t\t\t\t\t<NavigatorToParentButton\n\t\t\t\t\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetSelectedFont( null );\n\t\t\t\t\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Heading\n\t\t\t\t\t\t\t\t\tlevel={ 2 }\n\t\t\t\t\t\t\t\t\tsize={ 13 }\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-header\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ selectedFont?.name }\n\t\t\t\t\t\t\t\t</Heading>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t{ notice && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\n\t\t\t\t\t\t\t\t\t<Notice\n\t\t\t\t\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t\t\t\t</Notice>\n\t\t\t\t\t\t\t\t\t<Spacer margin={ 1 } />\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<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<Text>\n\t\t\t\t\t\t\t\t{ __( 'Select font variants to install.' ) }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Spacer margin={ 4 } />\n\t\t\t\t\t\t\t<VStack spacing={ 0 }>\n\t\t\t\t\t\t\t\t<Spacer margin={ 8 } />\n\t\t\t\t\t\t\t\t{ getSortedFontFaces( selectedFont ).map(\n\t\t\t\t\t\t\t\t\t( face, i ) => (\n\t\t\t\t\t\t\t\t\t\t<CollectionFontVariant\n\t\t\t\t\t\t\t\t\t\t\tfont={ selectedFont }\n\t\t\t\t\t\t\t\t\t\t\tface={ face }\n\t\t\t\t\t\t\t\t\t\t\tkey={ `face${ i }` }\n\t\t\t\t\t\t\t\t\t\t\thandleToggleVariant={\n\t\t\t\t\t\t\t\t\t\t\t\thandleToggleVariant\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tselected={ isFontFontFaceInOutline(\n\t\t\t\t\t\t\t\t\t\t\t\tselectedFont.slug,\n\t\t\t\t\t\t\t\t\t\t\t\tselectedFont.fontFace\n\t\t\t\t\t\t\t\t\t\t\t\t\t? face\n\t\t\t\t\t\t\t\t\t\t\t\t\t: null, // If the font has no fontFace, we want to check if the font is in the outline\n\t\t\t\t\t\t\t\t\t\t\t\tfontToInstallOutline\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</VStack>\n\t\t\t\t\t\t\t<Spacer margin={ 16 } />\n\t\t\t\t\t\t</NavigatorScreen>\n\t\t\t\t\t</NavigatorProvider>\n\n\t\t\t\t\t{ selectedFont && (\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\tclassName=\"font-library-modal__footer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\tonClick={ handleInstall }\n\t\t\t\t\t\t\t\tisBusy={ isInstalling }\n\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\tfontsToInstall.length === 0 || isInstalling\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Install' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! selectedFont && (\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 4 }\n\t\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\t\tclassName=\"font-library-modal__footer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tlabel={ __( 'Previous page' ) }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tonClick={ () => setPage( page - 1 ) }\n\t\t\t\t\t\t\t\tdisabled={ page === 1 }\n\t\t\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\t\t\t\tclassName=\"font-library-modal__page-selection\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: Total number of pages.\n\t\t\t\t\t\t\t\t\t\t_x(\n\t\t\t\t\t\t\t\t\t\t\t'Page <CurrentPageControl /> of %s',\n\t\t\t\t\t\t\t\t\t\t\t'paging'\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\ttotalPages\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tCurrentPageControl: (\n\t\t\t\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\t\t\t\taria-label={ __(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'Current page'\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\tvalue={ page }\n\t\t\t\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t\t\t\t...Array( totalPages ),\n\t\t\t\t\t\t\t\t\t\t\t\t].map( ( e, i ) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel: i + 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: i + 1,\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\tonChange={ ( newPage ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetPage(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tparseInt( newPage )\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\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t\t\t\t/>\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</HStack>\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tlabel={ __( 'Next page' ) }\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\tonClick={ () => setPage( page + 1 ) }\n\t\t\t\t\t\t\t\tdisabled={ page === totalPages }\n\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\ticon={ chevronRight }\n\t\t\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default FontCollection;\n","/**\n * Filters a list of fonts based on the specified filters.\n *\n * This function filters a given array of fonts based on the criteria provided in the filters object.\n * It supports filtering by category and a search term. If the category is provided and not equal to 'all',\n * the function filters the fonts array to include only those fonts that belong to the specified category.\n * Additionally, if a search term is provided, it filters the fonts array to include only those fonts\n * whose name includes the search term, case-insensitively.\n *\n * @param {Array} fonts Array of font objects in font-collection schema fashion to be filtered. Each font object should have a 'categories' property and a 'font_family_settings' property with a 'name' key.\n * @param {Object} filters Object containing the filter criteria. It should have a 'category' key and/or a 'search' key.\n * The 'category' key is a string representing the category to filter by.\n * The 'search' key is a string representing the search term to filter by.\n * @return {Array} Array of filtered font objects based on the provided criteria.\n */\nexport default function filterFonts( fonts, filters ) {\n\tconst { category, search } = filters;\n\tlet filteredFonts = fonts || [];\n\n\tif ( category && category !== 'all' ) {\n\t\tfilteredFonts = filteredFonts.filter(\n\t\t\t( font ) => font.categories.indexOf( category ) !== -1\n\t\t);\n\t}\n\n\tif ( search ) {\n\t\tfilteredFonts = filteredFonts.filter( ( font ) =>\n\t\t\tfont.font_family_settings.name\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes( search.toLowerCase() )\n\t\t);\n\t}\n\n\treturn filteredFonts;\n}\n","/**\n * Credits:\n *\n * lib-font\n * https://github.com/Pomax/lib-font\n * https://github.com/Pomax/lib-font/blob/master/lib-font.browser.js\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2020 pomax@nihongoresources.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint eslint-comments/no-unlimited-disable: 0 */\n/* eslint-disable */\n// import pako from 'pako';\nimport unbrotli from \"./unbrotli\";\nimport GzipDecode from \"./inflate\";\n\nlet fetchFunction = globalThis.fetch;\n// if ( ! fetchFunction ) {\n// \tlet backlog = [];\n// \tfetchFunction = globalThis.fetch = ( ...args ) =>\n// \t\tnew Promise( ( resolve, reject ) => {\n// \t\t\tbacklog.push( { args: args, resolve: resolve, reject: reject } );\n// \t\t} );\n// \timport( 'fs' )\n// \t\t.then( ( fs ) => {\n// \t\t\tfetchFunction = globalThis.fetch = async function ( path ) {\n// \t\t\t\treturn new Promise( ( resolve, reject ) => {\n// \t\t\t\t\tfs.readFile( path, ( err, data ) => {\n// \t\t\t\t\t\tif ( err ) return reject( err );\n// \t\t\t\t\t\tresolve( { ok: true, arrayBuffer: () => data.buffer } );\n// \t\t\t\t\t} );\n// \t\t\t\t} );\n// \t\t\t};\n// \t\t\twhile ( backlog.length ) {\n// \t\t\t\tlet instruction = backlog.shift();\n// \t\t\t\tfetchFunction( ...instruction.args )\n// \t\t\t\t\t.then( ( data ) => instruction.resolve( data ) )\n// \t\t\t\t\t.catch( ( err ) => instruction.reject( err ) );\n// \t\t\t}\n// \t\t} )\n// \t\t.catch( ( err ) => {\n// \t\t\tconsole.error( err );\n// \t\t\tthrow new Error(\n// \t\t\t\t`lib-font cannot run unless either the Fetch API or Node's filesystem module is available.`\n// \t\t\t);\n// \t\t} );\n// }\nclass Event {\n\tconstructor( type, detail = {}, msg ) {\n\t\tthis.type = type;\n\t\tthis.detail = detail;\n\t\tthis.msg = msg;\n\t\tObject.defineProperty( this, `__mayPropagate`, {\n\t\t\tenumerable: false,\n\t\t\twritable: true,\n\t\t} );\n\t\tthis.__mayPropagate = true;\n\t}\n\tpreventDefault() {}\n\tstopPropagation() {\n\t\tthis.__mayPropagate = false;\n\t}\n\tvalueOf() {\n\t\treturn this;\n\t}\n\ttoString() {\n\t\treturn this.msg\n\t\t\t? `[${ this.type } event]: ${ this.msg }`\n\t\t\t: `[${ this.type } event]`;\n\t}\n}\nclass EventManager {\n\tconstructor() {\n\t\tthis.listeners = {};\n\t}\n\taddEventListener( type, listener, useCapture ) {\n\t\tlet bin = this.listeners[ type ] || [];\n\t\tif ( useCapture ) bin.unshift( listener );\n\t\telse bin.push( listener );\n\t\tthis.listeners[ type ] = bin;\n\t}\n\tremoveEventListener( type, listener ) {\n\t\tlet bin = this.listeners[ type ] || [];\n\t\tlet pos = bin.findIndex( ( e ) => e === listener );\n\t\tif ( pos > -1 ) {\n\t\t\tbin.splice( pos, 1 );\n\t\t\tthis.listeners[ type ] = bin;\n\t\t}\n\t}\n\tdispatch( event ) {\n\t\tlet bin = this.listeners[ event.type ];\n\t\tif ( bin ) {\n\t\t\tfor ( let l = 0, e = bin.length; l < e; l++ ) {\n\t\t\t\tif ( ! event.__mayPropagate ) break;\n\t\t\t\tbin[ l ]( event );\n\t\t\t}\n\t\t}\n\t}\n}\nconst startDate = new Date( `1904-01-01T00:00:00+0000` ).getTime();\nfunction asText( data ) {\n\treturn Array.from( data )\n\t\t.map( ( v ) => String.fromCharCode( v ) )\n\t\t.join( `` );\n}\nclass Parser {\n\tconstructor( dict, dataview, name ) {\n\t\tthis.name = ( name || dict.tag || `` ).trim();\n\t\tthis.length = dict.length;\n\t\tthis.start = dict.offset;\n\t\tthis.offset = 0;\n\t\tthis.data = dataview;\n\t\t[\n\t\t\t`getInt8`,\n\t\t\t`getUint8`,\n\t\t\t`getInt16`,\n\t\t\t`getUint16`,\n\t\t\t`getInt32`,\n\t\t\t`getUint32`,\n\t\t\t`getBigInt64`,\n\t\t\t`getBigUint64`,\n\t\t].forEach( ( name ) => {\n\t\t\tlet fn = name.replace( /get(Big)?/, '' ).toLowerCase();\n\t\t\tlet increment = parseInt( name.replace( /[^\\d]/g, '' ) ) / 8;\n\t\t\tObject.defineProperty( this, fn, {\n\t\t\t\tget: () => this.getValue( name, increment ),\n\t\t\t} );\n\t\t} );\n\t}\n\tget currentPosition() {\n\t\treturn this.start + this.offset;\n\t}\n\tset currentPosition( position ) {\n\t\tthis.start = position;\n\t\tthis.offset = 0;\n\t}\n\tskip( n = 0, bits = 8 ) {\n\t\tthis.offset += ( n * bits ) / 8;\n\t}\n\tgetValue( type, increment ) {\n\t\tlet pos = this.start + this.offset;\n\t\tthis.offset += increment;\n\t\ttry {\n\t\t\treturn this.data[ type ]( pos );\n\t\t} catch ( e ) {\n\t\t\tconsole.error( `parser`, type, increment, this );\n\t\t\tconsole.error( `parser`, this.start, this.offset );\n\t\t\tthrow e;\n\t\t}\n\t}\n\tflags( n ) {\n\t\tif ( n === 8 || n === 16 || n === 32 || n === 64 ) {\n\t\t\treturn this[ `uint${ n }` ]\n\t\t\t\t.toString( 2 )\n\t\t\t\t.padStart( n, 0 )\n\t\t\t\t.split( `` )\n\t\t\t\t.map( ( v ) => v === '1' );\n\t\t}\n\t\tconsole.error(\n\t\t\t`Error parsing flags: flag types can only be 1, 2, 4, or 8 bytes long`\n\t\t);\n\t\tconsole.trace();\n\t}\n\tget tag() {\n\t\tconst t = this.uint32;\n\t\treturn asText( [\n\t\t\t( t >> 24 ) & 255,\n\t\t\t( t >> 16 ) & 255,\n\t\t\t( t >> 8 ) & 255,\n\t\t\tt & 255,\n\t\t] );\n\t}\n\tget fixed() {\n\t\tlet major = this.int16;\n\t\tlet minor = Math.round( ( 1e3 * this.uint16 ) / 65356 );\n\t\treturn major + minor / 1e3;\n\t}\n\tget legacyFixed() {\n\t\tlet major = this.uint16;\n\t\tlet minor = this.uint16.toString( 16 ).padStart( 4, 0 );\n\t\treturn parseFloat( `${ major }.${ minor }` );\n\t}\n\tget uint24() {\n\t\treturn ( this.uint8 << 16 ) + ( this.uint8 << 8 ) + this.uint8;\n\t}\n\tget uint128() {\n\t\tlet value = 0;\n\t\tfor ( let i = 0; i < 5; i++ ) {\n\t\t\tlet byte = this.uint8;\n\t\t\tvalue = value * 128 + ( byte & 127 );\n\t\t\tif ( byte < 128 ) break;\n\t\t}\n\t\treturn value;\n\t}\n\tget longdatetime() {\n\t\treturn new Date( startDate + 1e3 * parseInt( this.int64.toString() ) );\n\t}\n\tget fword() {\n\t\treturn this.int16;\n\t}\n\tget ufword() {\n\t\treturn this.uint16;\n\t}\n\tget Offset16() {\n\t\treturn this.uint16;\n\t}\n\tget Offset32() {\n\t\treturn this.uint32;\n\t}\n\tget F2DOT14() {\n\t\tconst bits = p.uint16;\n\t\tconst integer = [ 0, 1, -2, -1 ][ bits >> 14 ];\n\t\tconst fraction = bits & 16383;\n\t\treturn integer + fraction / 16384;\n\t}\n\tverifyLength() {\n\t\tif ( this.offset != this.length ) {\n\t\t\tconsole.error(\n\t\t\t\t`unexpected parsed table size (${ this.offset }) for \"${ this.name }\" (expected ${ this.length })`\n\t\t\t);\n\t\t}\n\t}\n\treadBytes( n = 0, position = 0, bits = 8, signed = false ) {\n\t\tn = n || this.length;\n\t\tif ( n === 0 ) return [];\n\t\tif ( position ) this.currentPosition = position;\n\t\tconst fn = `${ signed ? `` : `u` }int${ bits }`,\n\t\t\tslice = [];\n\t\twhile ( n-- ) slice.push( this[ fn ] );\n\t\treturn slice;\n\t}\n}\nclass ParsedData {\n\tconstructor( parser ) {\n\t\tconst pGetter = { enumerable: false, get: () => parser };\n\t\tObject.defineProperty( this, `parser`, pGetter );\n\t\tconst start = parser.currentPosition;\n\t\tconst startGetter = { enumerable: false, get: () => start };\n\t\tObject.defineProperty( this, `start`, startGetter );\n\t}\n\tload( struct ) {\n\t\tObject.keys( struct ).forEach( ( p ) => {\n\t\t\tlet props = Object.getOwnPropertyDescriptor( struct, p );\n\t\t\tif ( props.get ) {\n\t\t\t\tthis[ p ] = props.get.bind( this );\n\t\t\t} else if ( props.value !== undefined ) {\n\t\t\t\tthis[ p ] = props.value;\n\t\t\t}\n\t\t} );\n\t\tif ( this.parser.length ) {\n\t\t\tthis.parser.verifyLength();\n\t\t}\n\t}\n}\nclass SimpleTable extends ParsedData {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { parser: parser, start: start } = super(\n\t\t\tnew Parser( dict, dataview, name )\n\t\t);\n\t\tconst pGetter = { enumerable: false, get: () => parser };\n\t\tObject.defineProperty( this, `p`, pGetter );\n\t\tconst startGetter = { enumerable: false, get: () => start };\n\t\tObject.defineProperty( this, `tableStart`, startGetter );\n\t}\n}\nfunction lazy$1( object, property, getter ) {\n\tlet val;\n\tObject.defineProperty( object, property, {\n\t\tget: () => {\n\t\t\tif ( val ) return val;\n\t\t\tval = getter();\n\t\t\treturn val;\n\t\t},\n\t\tenumerable: true,\n\t} );\n}\nclass SFNT extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 12 }, dataview, `sfnt` );\n\t\tthis.version = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tthis.searchRange = p.uint16;\n\t\tthis.entrySelector = p.uint16;\n\t\tthis.rangeShift = p.uint16;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new TableRecord( p )\n\t\t);\n\t\tthis.tables = {};\n\t\tthis.directory.forEach( ( entry ) => {\n\t\t\tconst getter = () =>\n\t\t\t\tcreateTable(\n\t\t\t\t\tthis.tables,\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: entry.tag,\n\t\t\t\t\t\toffset: entry.offset,\n\t\t\t\t\t\tlength: entry.length,\n\t\t\t\t\t},\n\t\t\t\t\tdataview\n\t\t\t\t);\n\t\t\tlazy$1( this.tables, entry.tag.trim(), getter );\n\t\t} );\n\t}\n}\nclass TableRecord {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.checksum = p.uint32;\n\t\tthis.offset = p.uint32;\n\t\tthis.length = p.uint32;\n\t}\n}\nconst gzipDecode = GzipDecode.inflate || undefined;\nlet nativeGzipDecode = undefined;\n// if ( ! gzipDecode ) {\n// \timport( 'zlib' ).then( ( zlib ) => {\n// \t\tnativeGzipDecode = ( buffer ) => zlib.unzipSync( buffer );\n// \t} );\n// }\nclass WOFF$1 extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 44 }, dataview, `woff` );\n\t\tthis.signature = p.tag;\n\t\tthis.flavor = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tp.uint16;\n\t\tthis.totalSfntSize = p.uint32;\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.metaOffset = p.uint32;\n\t\tthis.metaLength = p.uint32;\n\t\tthis.metaOrigLength = p.uint32;\n\t\tthis.privOffset = p.uint32;\n\t\tthis.privLength = p.uint32;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new WoffTableDirectoryEntry( p )\n\t\t);\n\t\tbuildWoffLazyLookups( this, dataview, createTable );\n\t}\n}\nclass WoffTableDirectoryEntry {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.offset = p.uint32;\n\t\tthis.compLength = p.uint32;\n\t\tthis.origLength = p.uint32;\n\t\tthis.origChecksum = p.uint32;\n\t}\n}\nfunction buildWoffLazyLookups( woff, dataview, createTable ) {\n\twoff.tables = {};\n\twoff.directory.forEach( ( entry ) => {\n\t\tlazy$1( woff.tables, entry.tag.trim(), () => {\n\t\t\tlet offset = 0;\n\t\t\tlet view = dataview;\n\t\t\tif ( entry.compLength !== entry.origLength ) {\n\t\t\t\tconst data = dataview.buffer.slice(\n\t\t\t\t\tentry.offset,\n\t\t\t\t\tentry.offset + entry.compLength\n\t\t\t\t);\n\t\t\t\tlet unpacked;\n\t\t\t\tif ( gzipDecode ) {\n\t\t\t\t\tunpacked = gzipDecode( new Uint8Array( data ) );\n\t\t\t\t} else if ( nativeGzipDecode ) {\n\t\t\t\t\tunpacked = nativeGzipDecode( new Uint8Array( data ) );\n\t\t\t\t} else {\n\t\t\t\t\tconst msg = `no brotli decoder available to decode WOFF2 font`;\n\t\t\t\t\tif ( font.onerror ) font.onerror( msg );\n\t\t\t\t\tthrow new Error( msg );\n\t\t\t\t}\n\t\t\t\tview = new DataView( unpacked.buffer );\n\t\t\t} else {\n\t\t\t\toffset = entry.offset;\n\t\t\t}\n\t\t\treturn createTable(\n\t\t\t\twoff.tables,\n\t\t\t\t{ tag: entry.tag, offset: offset, length: entry.origLength },\n\t\t\t\tview\n\t\t\t);\n\t\t} );\n\t} );\n}\nconst brotliDecode = unbrotli;\nlet nativeBrotliDecode = undefined;\n// if ( ! brotliDecode ) {\n// \timport( 'zlib' ).then( ( zlib ) => {\n// \t\tnativeBrotliDecode = ( buffer ) => zlib.brotliDecompressSync( buffer );\n// \t} );\n// }\nclass WOFF2$1 extends SimpleTable {\n\tconstructor( font, dataview, createTable ) {\n\t\tconst { p: p } = super( { offset: 0, length: 48 }, dataview, `woff2` );\n\t\tthis.signature = p.tag;\n\t\tthis.flavor = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.numTables = p.uint16;\n\t\tp.uint16;\n\t\tthis.totalSfntSize = p.uint32;\n\t\tthis.totalCompressedSize = p.uint32;\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.metaOffset = p.uint32;\n\t\tthis.metaLength = p.uint32;\n\t\tthis.metaOrigLength = p.uint32;\n\t\tthis.privOffset = p.uint32;\n\t\tthis.privLength = p.uint32;\n\t\tp.verifyLength();\n\t\tthis.directory = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new Woff2TableDirectoryEntry( p )\n\t\t);\n\t\tlet dictOffset = p.currentPosition;\n\t\tthis.directory[ 0 ].offset = 0;\n\t\tthis.directory.forEach( ( e, i ) => {\n\t\t\tlet next = this.directory[ i + 1 ];\n\t\t\tif ( next ) {\n\t\t\t\tnext.offset =\n\t\t\t\t\te.offset +\n\t\t\t\t\t( e.transformLength !== undefined\n\t\t\t\t\t\t? e.transformLength\n\t\t\t\t\t\t: e.origLength );\n\t\t\t}\n\t\t} );\n\t\tlet decoded;\n\t\tlet buffer = dataview.buffer.slice( dictOffset );\n\t\tif ( brotliDecode ) {\n\t\t\tdecoded = brotliDecode( new Uint8Array( buffer ) );\n\t\t} else if ( nativeBrotliDecode ) {\n\t\t\tdecoded = new Uint8Array( nativeBrotliDecode( buffer ) );\n\t\t} else {\n\t\t\tconst msg = `no brotli decoder available to decode WOFF2 font`;\n\t\t\tif ( font.onerror ) font.onerror( msg );\n\t\t\tthrow new Error( msg );\n\t\t}\n\t\tbuildWoff2LazyLookups( this, decoded, createTable );\n\t}\n}\nclass Woff2TableDirectoryEntry {\n\tconstructor( p ) {\n\t\tthis.flags = p.uint8;\n\t\tconst tagNumber = ( this.tagNumber = this.flags & 63 );\n\t\tif ( tagNumber === 63 ) {\n\t\t\tthis.tag = p.tag;\n\t\t} else {\n\t\t\tthis.tag = getWOFF2Tag( tagNumber );\n\t\t}\n\t\tconst transformVersion = ( this.transformVersion =\n\t\t\t( this.flags & 192 ) >> 6 );\n\t\tlet hasTransforms = transformVersion !== 0;\n\t\tif ( this.tag === `glyf` || this.tag === `loca` ) {\n\t\t\thasTransforms = this.transformVersion !== 3;\n\t\t}\n\t\tthis.origLength = p.uint128;\n\t\tif ( hasTransforms ) {\n\t\t\tthis.transformLength = p.uint128;\n\t\t}\n\t}\n}\nfunction buildWoff2LazyLookups( woff2, decoded, createTable ) {\n\twoff2.tables = {};\n\twoff2.directory.forEach( ( entry ) => {\n\t\tlazy$1( woff2.tables, entry.tag.trim(), () => {\n\t\t\tconst start = entry.offset;\n\t\t\tconst end =\n\t\t\t\tstart +\n\t\t\t\t( entry.transformLength\n\t\t\t\t\t? entry.transformLength\n\t\t\t\t\t: entry.origLength );\n\t\t\tconst data = new DataView( decoded.slice( start, end ).buffer );\n\t\t\ttry {\n\t\t\t\treturn createTable(\n\t\t\t\t\twoff2.tables,\n\t\t\t\t\t{ tag: entry.tag, offset: 0, length: entry.origLength },\n\t\t\t\t\tdata\n\t\t\t\t);\n\t\t\t} catch ( e ) {\n\t\t\t\tconsole.error( e );\n\t\t\t}\n\t\t} );\n\t} );\n}\nfunction getWOFF2Tag( flag ) {\n\treturn [\n\t\t`cmap`,\n\t\t`head`,\n\t\t`hhea`,\n\t\t`hmtx`,\n\t\t`maxp`,\n\t\t`name`,\n\t\t`OS/2`,\n\t\t`post`,\n\t\t`cvt `,\n\t\t`fpgm`,\n\t\t`glyf`,\n\t\t`loca`,\n\t\t`prep`,\n\t\t`CFF `,\n\t\t`VORG`,\n\t\t`EBDT`,\n\t\t`EBLC`,\n\t\t`gasp`,\n\t\t`hdmx`,\n\t\t`kern`,\n\t\t`LTSH`,\n\t\t`PCLT`,\n\t\t`VDMX`,\n\t\t`vhea`,\n\t\t`vmtx`,\n\t\t`BASE`,\n\t\t`GDEF`,\n\t\t`GPOS`,\n\t\t`GSUB`,\n\t\t`EBSC`,\n\t\t`JSTF`,\n\t\t`MATH`,\n\t\t`CBDT`,\n\t\t`CBLC`,\n\t\t`COLR`,\n\t\t`CPAL`,\n\t\t`SVG `,\n\t\t`sbix`,\n\t\t`acnt`,\n\t\t`avar`,\n\t\t`bdat`,\n\t\t`bloc`,\n\t\t`bsln`,\n\t\t`cvar`,\n\t\t`fdsc`,\n\t\t`feat`,\n\t\t`fmtx`,\n\t\t`fvar`,\n\t\t`gvar`,\n\t\t`hsty`,\n\t\t`just`,\n\t\t`lcar`,\n\t\t`mort`,\n\t\t`morx`,\n\t\t`opbd`,\n\t\t`prop`,\n\t\t`trak`,\n\t\t`Zapf`,\n\t\t`Silf`,\n\t\t`Glat`,\n\t\t`Gloc`,\n\t\t`Feat`,\n\t\t`Sill`,\n\t][ flag & 63 ];\n}\nconst tableClasses = {};\nlet tableClassesLoaded = false;\nPromise.all( [\n\tPromise.resolve().then( function () {\n\t\treturn cmap$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn head$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hhea$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hmtx$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn maxp$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn name$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn OS2$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn post$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn BASE$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GDEF$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GSUB$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn GPOS$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn SVG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn fvar$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn cvt$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn fpgm$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn gasp$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn glyf$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn loca$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn prep$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CFF$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CFF2$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn VORG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBLC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBDT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn EBSC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CBLC$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CBDT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn sbix$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn COLR$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn CPAL$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn DSIG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn hdmx$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn kern$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn LTSH$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn MERG$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn meta$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn PCLT$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn VDMX$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn vhea$1;\n\t} ),\n\tPromise.resolve().then( function () {\n\t\treturn vmtx$1;\n\t} ),\n] ).then( ( data ) => {\n\tdata.forEach( ( e ) => {\n\t\tlet name = Object.keys( e )[ 0 ];\n\t\ttableClasses[ name ] = e[ name ];\n\t} );\n\ttableClassesLoaded = true;\n} );\nfunction createTable( tables, dict, dataview ) {\n\tlet name = dict.tag.replace( /[^\\w\\d]/g, `` );\n\tlet Type = tableClasses[ name ];\n\tif ( Type ) return new Type( dict, dataview, tables );\n\tconsole.warn(\n\t\t`lib-font has no definition for ${ name }. The table was skipped.`\n\t);\n\treturn {};\n}\nfunction loadTableClasses() {\n\tlet count = 0;\n\tfunction checkLoaded( resolve, reject ) {\n\t\tif ( ! tableClassesLoaded ) {\n\t\t\tif ( count > 10 ) {\n\t\t\t\treturn reject( new Error( `loading took too long` ) );\n\t\t\t}\n\t\t\tcount++;\n\t\t\treturn setTimeout( () => checkLoaded( resolve ), 250 );\n\t\t}\n\t\tresolve( createTable );\n\t}\n\treturn new Promise( ( resolve, reject ) => checkLoaded( resolve ) );\n}\nfunction getFontCSSFormat( path, errorOnStyle ) {\n\tlet pos = path.lastIndexOf( `.` );\n\tlet ext = ( path.substring( pos + 1 ) || `` ).toLowerCase();\n\tlet format = {\n\t\tttf: `truetype`,\n\t\totf: `opentype`,\n\t\twoff: `woff`,\n\t\twoff2: `woff2`,\n\t}[ ext ];\n\tif ( format ) return format;\n\tlet msg = {\n\t\teot: `The .eot format is not supported: it died in January 12, 2016, when Microsoft retired all versions of IE that didn't already support WOFF.`,\n\t\tsvg: `The .svg format is not supported: SVG fonts (not to be confused with OpenType with embedded SVG) were so bad we took the entire fonts chapter out of the SVG specification again.`,\n\t\tfon: `The .fon format is not supported: this is an ancient Windows bitmap font format.`,\n\t\tttc: `Based on the current CSS specification, font collections are not (yet?) supported.`,\n\t}[ ext ];\n\tif ( ! msg ) msg = `${ path } is not a known webfont format.`;\n\tif ( errorOnStyle ) {\n\t\tthrow new Error( msg );\n\t} else {\n\t\tconsole.warn( `Could not load font: ${ msg }` );\n\t}\n}\nasync function setupFontFace( name, url, options = {} ) {\n\tif ( ! globalThis.document ) return;\n\tlet format = getFontCSSFormat( url, options.errorOnStyle );\n\tif ( ! format ) return;\n\tlet style = document.createElement( `style` );\n\tstyle.className = `injected-by-Font-js`;\n\tlet rules = [];\n\tif ( options.styleRules ) {\n\t\trules = Object.entries( options.styleRules ).map(\n\t\t\t( [ key, value ] ) => `${ key }: ${ value };`\n\t\t);\n\t}\n\tstyle.textContent = `\\n@font-face {\\n font-family: \"${ name }\";\\n ${ rules.join(\n\t\t`\\n\\t`\n\t) }\\n src: url(\"${ url }\") format(\"${ format }\");\\n}`;\n\tglobalThis.document.head.appendChild( style );\n\treturn style;\n}\nconst TTF = [ 0, 1, 0, 0 ];\nconst OTF = [ 79, 84, 84, 79 ];\nconst WOFF = [ 119, 79, 70, 70 ];\nconst WOFF2 = [ 119, 79, 70, 50 ];\nfunction match( ar1, ar2 ) {\n\tif ( ar1.length !== ar2.length ) return;\n\tfor ( let i = 0; i < ar1.length; i++ ) {\n\t\tif ( ar1[ i ] !== ar2[ i ] ) return;\n\t}\n\treturn true;\n}\nfunction validFontFormat( dataview ) {\n\tconst LEAD_BYTES = [\n\t\tdataview.getUint8( 0 ),\n\t\tdataview.getUint8( 1 ),\n\t\tdataview.getUint8( 2 ),\n\t\tdataview.getUint8( 3 ),\n\t];\n\tif ( match( LEAD_BYTES, TTF ) || match( LEAD_BYTES, OTF ) ) return `SFNT`;\n\tif ( match( LEAD_BYTES, WOFF ) ) return `WOFF`;\n\tif ( match( LEAD_BYTES, WOFF2 ) ) return `WOFF2`;\n}\nfunction checkFetchResponseStatus( response ) {\n\tif ( ! response.ok ) {\n\t\tthrow new Error(\n\t\t\t`HTTP ${ response.status } - ${ response.statusText }`\n\t\t);\n\t}\n\treturn response;\n}\nclass Font extends EventManager {\n\tconstructor( name, options = {} ) {\n\t\tsuper();\n\t\tthis.name = name;\n\t\tthis.options = options;\n\t\tthis.metrics = false;\n\t}\n\tget src() {\n\t\treturn this.__src;\n\t}\n\tset src( src ) {\n\t\tthis.__src = src;\n\t\t( async () => {\n\t\t\tif ( globalThis.document && ! this.options.skipStyleSheet ) {\n\t\t\t\tawait setupFontFace( this.name, src, this.options );\n\t\t\t}\n\t\t\tthis.loadFont( src );\n\t\t} )();\n\t}\n\tasync loadFont( url, filename ) {\n\t\tfetch( url )\n\t\t\t.then(\n\t\t\t\t( response ) =>\n\t\t\t\t\tcheckFetchResponseStatus( response ) &&\n\t\t\t\t\tresponse.arrayBuffer()\n\t\t\t)\n\t\t\t.then( ( buffer ) =>\n\t\t\t\tthis.fromDataBuffer( buffer, filename || url )\n\t\t\t)\n\t\t\t.catch( ( err ) => {\n\t\t\t\tconst evt = new Event(\n\t\t\t\t\t`error`,\n\t\t\t\t\terr,\n\t\t\t\t\t`Failed to load font at ${ filename || url }`\n\t\t\t\t);\n\t\t\t\tthis.dispatch( evt );\n\t\t\t\tif ( this.onerror ) this.onerror( evt );\n\t\t\t} );\n\t}\n\tasync fromDataBuffer( buffer, filenameOrUrL ) {\n\t\tthis.fontData = new DataView( buffer );\n\t\tlet type = validFontFormat( this.fontData );\n\t\tif ( ! type ) {\n\t\t\tthrow new Error(\n\t\t\t\t`${ filenameOrUrL } is either an unsupported font format, or not a font at all.`\n\t\t\t);\n\t\t}\n\t\tawait this.parseBasicData( type );\n\t\tconst evt = new Event( 'load', { font: this } );\n\t\tthis.dispatch( evt );\n\t\tif ( this.onload ) this.onload( evt );\n\t}\n\tasync parseBasicData( type ) {\n\t\treturn loadTableClasses().then( ( createTable ) => {\n\t\t\tif ( type === `SFNT` ) {\n\t\t\t\tthis.opentype = new SFNT( this, this.fontData, createTable );\n\t\t\t}\n\t\t\tif ( type === `WOFF` ) {\n\t\t\t\tthis.opentype = new WOFF$1( this, this.fontData, createTable );\n\t\t\t}\n\t\t\tif ( type === `WOFF2` ) {\n\t\t\t\tthis.opentype = new WOFF2$1( this, this.fontData, createTable );\n\t\t\t}\n\t\t\treturn this.opentype;\n\t\t} );\n\t}\n\tgetGlyphId( char ) {\n\t\treturn this.opentype.tables.cmap.getGlyphId( char );\n\t}\n\treverse( glyphid ) {\n\t\treturn this.opentype.tables.cmap.reverse( glyphid );\n\t}\n\tsupports( char ) {\n\t\treturn this.getGlyphId( char ) !== 0;\n\t}\n\tsupportsVariation( variation ) {\n\t\treturn (\n\t\t\tthis.opentype.tables.cmap.supportsVariation( variation ) !== false\n\t\t);\n\t}\n\tmeasureText( text, size = 16 ) {\n\t\tif ( this.__unloaded )\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot measure text: font was unloaded. Please reload before calling measureText()'\n\t\t\t);\n\t\tlet d = document.createElement( 'div' );\n\t\td.textContent = text;\n\t\td.style.fontFamily = this.name;\n\t\td.style.fontSize = `${ size }px`;\n\t\td.style.color = `transparent`;\n\t\td.style.background = `transparent`;\n\t\td.style.top = `0`;\n\t\td.style.left = `0`;\n\t\td.style.position = `absolute`;\n\t\tdocument.body.appendChild( d );\n\t\tlet bbox = d.getBoundingClientRect();\n\t\tdocument.body.removeChild( d );\n\t\tconst OS2 = this.opentype.tables[ 'OS/2' ];\n\t\tbbox.fontSize = size;\n\t\tbbox.ascender = OS2.sTypoAscender;\n\t\tbbox.descender = OS2.sTypoDescender;\n\t\treturn bbox;\n\t}\n\tunload() {\n\t\tif ( this.styleElement.parentNode ) {\n\t\t\tthis.styleElement.parentNode.removeElement( this.styleElement );\n\t\t\tconst evt = new Event( 'unload', { font: this } );\n\t\t\tthis.dispatch( evt );\n\t\t\tif ( this.onunload ) this.onunload( evt );\n\t\t}\n\t\tthis._unloaded = true;\n\t}\n\tload() {\n\t\tif ( this.__unloaded ) {\n\t\t\tdelete this.__unloaded;\n\t\t\tdocument.head.appendChild( this.styleElement );\n\t\t\tconst evt = new Event( 'load', { font: this } );\n\t\t\tthis.dispatch( evt );\n\t\t\tif ( this.onload ) this.onload( evt );\n\t\t}\n\t}\n}\nglobalThis.Font = Font;\nclass Subtable extends ParsedData {\n\tconstructor( p, plaformID, encodingID ) {\n\t\tsuper( p );\n\t\tthis.plaformID = plaformID;\n\t\tthis.encodingID = encodingID;\n\t}\n}\nclass Format0 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 0;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.glyphIdArray = [ ...new Array( 256 ) ].map( ( _ ) => p.uint8 );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 0. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\treturn 0 <= charCode && charCode <= 255;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 0` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes() {\n\t\treturn [ { start: 1, end: 256 } ];\n\t}\n}\nclass Format2 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 2;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.subHeaderKeys = [ ...new Array( 256 ) ].map( ( _ ) => p.uint16 );\n\t\tconst subHeaderCount = Math.max( ...this.subHeaderKeys );\n\t\tconst subHeaderOffset = p.currentPosition;\n\t\tlazy$1( this, `subHeaders`, () => {\n\t\t\tp.currentPosition = subHeaderOffset;\n\t\t\treturn [ ...new Array( subHeaderCount ) ].map(\n\t\t\t\t( _ ) => new SubHeader( p )\n\t\t\t);\n\t\t} );\n\t\tconst glyphIndexOffset = subHeaderOffset + subHeaderCount * 8;\n\t\tlazy$1( this, `glyphIndexArray`, () => {\n\t\t\tp.currentPosition = glyphIndexOffset;\n\t\t\treturn [ ...new Array( subHeaderCount ) ].map( ( _ ) => p.uint16 );\n\t\t} );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 2. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tconst low = charCode && 255;\n\t\tconst high = charCode && 65280;\n\t\tconst subHeaderKey = this.subHeaders[ high ];\n\t\tconst subheader = this.subHeaders[ subHeaderKey ];\n\t\tconst first = subheader.firstCode;\n\t\tconst last = first + subheader.entryCount;\n\t\treturn first <= low && low <= last;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 2` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn this.subHeaders.map( ( h ) => ( {\n\t\t\t\tfirstCode: h.firstCode,\n\t\t\t\tlastCode: h.lastCode,\n\t\t\t} ) );\n\t\t}\n\t\treturn this.subHeaders.map( ( h ) => ( {\n\t\t\tstart: h.firstCode,\n\t\t\tend: h.lastCode,\n\t\t} ) );\n\t}\n}\nclass SubHeader {\n\tconstructor( p ) {\n\t\tthis.firstCode = p.uint16;\n\t\tthis.entryCount = p.uint16;\n\t\tthis.lastCode = this.first + this.entryCount;\n\t\tthis.idDelta = p.int16;\n\t\tthis.idRangeOffset = p.uint16;\n\t}\n}\nclass Format4 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 4;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.segCountX2 = p.uint16;\n\t\tthis.segCount = this.segCountX2 / 2;\n\t\tthis.searchRange = p.uint16;\n\t\tthis.entrySelector = p.uint16;\n\t\tthis.rangeShift = p.uint16;\n\t\tconst endCodePosition = p.currentPosition;\n\t\tlazy$1( this, `endCode`, () =>\n\t\t\tp.readBytes( this.segCount, endCodePosition, 16 )\n\t\t);\n\t\tconst startCodePosition = endCodePosition + 2 + this.segCountX2;\n\t\tlazy$1( this, `startCode`, () =>\n\t\t\tp.readBytes( this.segCount, startCodePosition, 16 )\n\t\t);\n\t\tconst idDeltaPosition = startCodePosition + this.segCountX2;\n\t\tlazy$1( this, `idDelta`, () =>\n\t\t\tp.readBytes( this.segCount, idDeltaPosition, 16, true )\n\t\t);\n\t\tconst idRangePosition = idDeltaPosition + this.segCountX2;\n\t\tlazy$1( this, `idRangeOffset`, () =>\n\t\t\tp.readBytes( this.segCount, idRangePosition, 16 )\n\t\t);\n\t\tconst glyphIdArrayPosition = idRangePosition + this.segCountX2;\n\t\tconst glyphIdArrayLength =\n\t\t\tthis.length - ( glyphIdArrayPosition - this.tableStart );\n\t\tlazy$1( this, `glyphIdArray`, () =>\n\t\t\tp.readBytes( glyphIdArrayLength, glyphIdArrayPosition, 16 )\n\t\t);\n\t\tlazy$1( this, `segments`, () =>\n\t\t\tthis.buildSegments( idRangePosition, glyphIdArrayPosition, p )\n\t\t);\n\t}\n\tbuildSegments( idRangePosition, glyphIdArrayPosition, p ) {\n\t\tconst build = ( _, i ) => {\n\t\t\tlet startCode = this.startCode[ i ],\n\t\t\t\tendCode = this.endCode[ i ],\n\t\t\t\tidDelta = this.idDelta[ i ],\n\t\t\t\tidRangeOffset = this.idRangeOffset[ i ],\n\t\t\t\tidRangeOffsetPointer = idRangePosition + 2 * i,\n\t\t\t\tglyphIDs = [];\n\t\t\tif ( idRangeOffset === 0 ) {\n\t\t\t\tfor (\n\t\t\t\t\tlet i = startCode + idDelta, e = endCode + idDelta;\n\t\t\t\t\ti <= e;\n\t\t\t\t\ti++\n\t\t\t\t) {\n\t\t\t\t\tglyphIDs.push( i );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( let i = 0, e = endCode - startCode; i <= e; i++ ) {\n\t\t\t\t\tp.currentPosition =\n\t\t\t\t\t\tidRangeOffsetPointer + idRangeOffset + i * 2;\n\t\t\t\t\tglyphIDs.push( p.uint16 );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tstartCode: startCode,\n\t\t\t\tendCode: endCode,\n\t\t\t\tidDelta: idDelta,\n\t\t\t\tidRangeOffset: idRangeOffset,\n\t\t\t\tglyphIDs: glyphIDs,\n\t\t\t};\n\t\t};\n\t\treturn [ ...new Array( this.segCount ) ].map( build );\n\t}\n\treverse( glyphID ) {\n\t\tlet s = this.segments.find( ( v ) => v.glyphIDs.includes( glyphID ) );\n\t\tif ( ! s ) return {};\n\t\tconst code = s.startCode + s.glyphIDs.indexOf( glyphID );\n\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t}\n\tgetGlyphId( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\tif ( 55296 <= charCode && charCode <= 57343 ) return 0;\n\t\tif ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )\n\t\t\treturn 0;\n\t\tlet segment = this.segments.find(\n\t\t\t( s ) => s.startCode <= charCode && charCode <= s.endCode\n\t\t);\n\t\tif ( ! segment ) return 0;\n\t\treturn segment.glyphIDs[ charCode - segment.startCode ];\n\t}\n\tsupports( charCode ) {\n\t\treturn this.getGlyphId( charCode ) !== 0;\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.segments;\n\t\treturn this.segments.map( ( v ) => ( {\n\t\t\tstart: v.startCode,\n\t\t\tend: v.endCode,\n\t\t} ) );\n\t}\n}\nclass Format6 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 6;\n\t\tthis.length = p.uint16;\n\t\tthis.language = p.uint16;\n\t\tthis.firstCode = p.uint16;\n\t\tthis.entryCount = p.uint16;\n\t\tthis.lastCode = this.firstCode + this.entryCount - 1;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.entryCount ) ].map( ( _ ) => p.uint16 );\n\t\tlazy$1( this, `glyphIdArray`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 6. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tif ( charCode < this.firstCode ) return {};\n\t\tif ( charCode > this.firstCode + this.entryCount ) return {};\n\t\tconst code = charCode - this.firstCode;\n\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t}\n\treverse( glyphID ) {\n\t\tlet pos = this.glyphIdArray.indexOf( glyphID );\n\t\tif ( pos > -1 ) return this.firstCode + pos;\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn [ { firstCode: this.firstCode, lastCode: this.lastCode } ];\n\t\t}\n\t\treturn [ { start: this.firstCode, end: this.lastCode } ];\n\t}\n}\nclass Format8 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 8;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.is32 = [ ...new Array( 8192 ) ].map( ( _ ) => p.uint8 );\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numGroups ) ].map(\n\t\t\t\t( _ ) => new SequentialMapGroup$1( p )\n\t\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 8. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startcharCode <= charCode && charCode <= s.endcharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 8` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startcharCode,\n\t\t\tend: v.endcharCode,\n\t\t} ) );\n\t}\n}\nclass SequentialMapGroup$1 {\n\tconstructor( p ) {\n\t\tthis.startcharCode = p.uint32;\n\t\tthis.endcharCode = p.uint32;\n\t\tthis.startGlyphID = p.uint32;\n\t}\n}\nclass Format10 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 10;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.numChars = p.uint32;\n\t\tthis.endCharCode = this.startCharCode + this.numChars;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numChars ) ].map( ( _ ) => p.uint16 );\n\t\tlazy$1( this, `glyphs`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) {\n\t\t\tcharCode = -1;\n\t\t\tconsole.warn(\n\t\t\t\t`supports(character) not implemented for cmap subtable format 10. only supports(id) is implemented.`\n\t\t\t);\n\t\t}\n\t\tif ( charCode < this.startCharCode ) return false;\n\t\tif ( charCode > this.startCharCode + this.numChars ) return false;\n\t\treturn charCode - this.startCharCode;\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 10` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tstartCharCode: this.startCharCode,\n\t\t\t\t\tendCharCode: this.endCharCode,\n\t\t\t\t},\n\t\t\t];\n\t\t}\n\t\treturn [ { start: this.startCharCode, end: this.endCharCode } ];\n\t}\n}\nclass Format12 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 12;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numGroups ) ].map(\n\t\t\t\t( _ ) => new SequentialMapGroup( p )\n\t\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\tif ( 55296 <= charCode && charCode <= 57343 ) return 0;\n\t\tif ( ( charCode & 65534 ) === 65534 || ( charCode & 65535 ) === 65535 )\n\t\t\treturn 0;\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startCharCode <= charCode && charCode <= s.endCharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tfor ( let group of this.groups ) {\n\t\t\tlet start = group.startGlyphID;\n\t\t\tif ( start > glyphID ) continue;\n\t\t\tif ( start === glyphID ) return group.startCharCode;\n\t\t\tlet end = start + ( group.endCharCode - group.startCharCode );\n\t\t\tif ( end < glyphID ) continue;\n\t\t\tconst code = group.startCharCode + ( glyphID - start );\n\t\t\treturn { code: code, unicode: String.fromCodePoint( code ) };\n\t\t}\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startCharCode,\n\t\t\tend: v.endCharCode,\n\t\t} ) );\n\t}\n}\nclass SequentialMapGroup {\n\tconstructor( p ) {\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.endCharCode = p.uint32;\n\t\tthis.startGlyphID = p.uint32;\n\t}\n}\nclass Format13 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.format = 13;\n\t\tp.uint16;\n\t\tthis.length = p.uint32;\n\t\tthis.language = p.uint32;\n\t\tthis.numGroups = p.uint32;\n\t\tconst getter = [ ...new Array( this.numGroups ) ].map(\n\t\t\t( _ ) => new ConstantMapGroup( p )\n\t\t);\n\t\tlazy$1( this, `groups`, getter );\n\t}\n\tsupports( charCode ) {\n\t\tif ( charCode.charCodeAt ) charCode = charCode.charCodeAt( 0 );\n\t\treturn (\n\t\t\tthis.groups.findIndex(\n\t\t\t\t( s ) =>\n\t\t\t\t\ts.startCharCode <= charCode && charCode <= s.endCharCode\n\t\t\t) !== -1\n\t\t);\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 13` );\n\t\treturn {};\n\t}\n\tgetSupportedCharCodes( preservePropNames = false ) {\n\t\tif ( preservePropNames ) return this.groups;\n\t\treturn this.groups.map( ( v ) => ( {\n\t\t\tstart: v.startCharCode,\n\t\t\tend: v.endCharCode,\n\t\t} ) );\n\t}\n}\nclass ConstantMapGroup {\n\tconstructor( p ) {\n\t\tthis.startCharCode = p.uint32;\n\t\tthis.endCharCode = p.uint32;\n\t\tthis.glyphID = p.uint32;\n\t}\n}\nclass Format14 extends Subtable {\n\tconstructor( p, platformID, encodingID ) {\n\t\tsuper( p, platformID, encodingID );\n\t\tthis.subTableStart = p.currentPosition;\n\t\tthis.format = 14;\n\t\tthis.length = p.uint32;\n\t\tthis.numVarSelectorRecords = p.uint32;\n\t\tlazy$1( this, `varSelectors`, () =>\n\t\t\t[ ...new Array( this.numVarSelectorRecords ) ].map(\n\t\t\t\t( _ ) => new VariationSelector( p )\n\t\t\t)\n\t\t);\n\t}\n\tsupports() {\n\t\tconsole.warn( `supports not implemented for cmap subtable format 14` );\n\t\treturn 0;\n\t}\n\tgetSupportedCharCodes() {\n\t\tconsole.warn(\n\t\t\t`getSupportedCharCodes not implemented for cmap subtable format 14`\n\t\t);\n\t\treturn [];\n\t}\n\treverse( glyphID ) {\n\t\tconsole.warn( `reverse not implemented for cmap subtable format 14` );\n\t\treturn {};\n\t}\n\tsupportsVariation( variation ) {\n\t\tlet v = this.varSelector.find(\n\t\t\t( uvs ) => uvs.varSelector === variation\n\t\t);\n\t\treturn v ? v : false;\n\t}\n\tgetSupportedVariations() {\n\t\treturn this.varSelectors.map( ( v ) => v.varSelector );\n\t}\n}\nclass VariationSelector {\n\tconstructor( p ) {\n\t\tthis.varSelector = p.uint24;\n\t\tthis.defaultUVSOffset = p.Offset32;\n\t\tthis.nonDefaultUVSOffset = p.Offset32;\n\t}\n}\nfunction createSubTable( parser, platformID, encodingID ) {\n\tconst format = parser.uint16;\n\tif ( format === 0 ) return new Format0( parser, platformID, encodingID );\n\tif ( format === 2 ) return new Format2( parser, platformID, encodingID );\n\tif ( format === 4 ) return new Format4( parser, platformID, encodingID );\n\tif ( format === 6 ) return new Format6( parser, platformID, encodingID );\n\tif ( format === 8 ) return new Format8( parser, platformID, encodingID );\n\tif ( format === 10 ) return new Format10( parser, platformID, encodingID );\n\tif ( format === 12 ) return new Format12( parser, platformID, encodingID );\n\tif ( format === 13 ) return new Format13( parser, platformID, encodingID );\n\tif ( format === 14 ) return new Format14( parser, platformID, encodingID );\n\treturn {};\n}\nclass cmap extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numTables = p.uint16;\n\t\tthis.encodingRecords = [ ...new Array( this.numTables ) ].map(\n\t\t\t( _ ) => new EncodingRecord( p, this.tableStart )\n\t\t);\n\t}\n\tgetSubTable( tableID ) {\n\t\treturn this.encodingRecords[ tableID ].table;\n\t}\n\tgetSupportedEncodings() {\n\t\treturn this.encodingRecords.map( ( r ) => ( {\n\t\t\tplatformID: r.platformID,\n\t\t\tencodingId: r.encodingID,\n\t\t} ) );\n\t}\n\tgetSupportedCharCodes( platformID, encodingID ) {\n\t\tconst recordID = this.encodingRecords.findIndex(\n\t\t\t( r ) => r.platformID === platformID && r.encodingID === encodingID\n\t\t);\n\t\tif ( recordID === -1 ) return false;\n\t\tconst subtable = this.getSubTable( recordID );\n\t\treturn subtable.getSupportedCharCodes();\n\t}\n\treverse( glyphid ) {\n\t\tfor ( let i = 0; i < this.numTables; i++ ) {\n\t\t\tlet code = this.getSubTable( i ).reverse( glyphid );\n\t\t\tif ( code ) return code;\n\t\t}\n\t}\n\tgetGlyphId( char ) {\n\t\tlet last = 0;\n\t\tthis.encodingRecords.some( ( _, tableID ) => {\n\t\t\tlet t = this.getSubTable( tableID );\n\t\t\tif ( ! t.getGlyphId ) return false;\n\t\t\tlast = t.getGlyphId( char );\n\t\t\treturn last !== 0;\n\t\t} );\n\t\treturn last;\n\t}\n\tsupports( char ) {\n\t\treturn this.encodingRecords.some( ( _, tableID ) => {\n\t\t\tconst t = this.getSubTable( tableID );\n\t\t\treturn t.supports && t.supports( char ) !== false;\n\t\t} );\n\t}\n\tsupportsVariation( variation ) {\n\t\treturn this.encodingRecords.some( ( _, tableID ) => {\n\t\t\tconst t = this.getSubTable( tableID );\n\t\t\treturn (\n\t\t\t\tt.supportsVariation &&\n\t\t\t\tt.supportsVariation( variation ) !== false\n\t\t\t);\n\t\t} );\n\t}\n}\nclass EncodingRecord {\n\tconstructor( p, tableStart ) {\n\t\tconst platformID = ( this.platformID = p.uint16 );\n\t\tconst encodingID = ( this.encodingID = p.uint16 );\n\t\tconst offset = ( this.offset = p.Offset32 );\n\t\tlazy$1( this, `table`, () => {\n\t\t\tp.currentPosition = tableStart + offset;\n\t\t\treturn createSubTable( p, platformID, encodingID );\n\t\t} );\n\t}\n}\nvar cmap$1 = Object.freeze( { __proto__: null, cmap: cmap } );\nclass head extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.load( {\n\t\t\tmajorVersion: p.uint16,\n\t\t\tminorVersion: p.uint16,\n\t\t\tfontRevision: p.fixed,\n\t\t\tcheckSumAdjustment: p.uint32,\n\t\t\tmagicNumber: p.uint32,\n\t\t\tflags: p.flags( 16 ),\n\t\t\tunitsPerEm: p.uint16,\n\t\t\tcreated: p.longdatetime,\n\t\t\tmodified: p.longdatetime,\n\t\t\txMin: p.int16,\n\t\t\tyMin: p.int16,\n\t\t\txMax: p.int16,\n\t\t\tyMax: p.int16,\n\t\t\tmacStyle: p.flags( 16 ),\n\t\t\tlowestRecPPEM: p.uint16,\n\t\t\tfontDirectionHint: p.uint16,\n\t\t\tindexToLocFormat: p.uint16,\n\t\t\tglyphDataFormat: p.uint16,\n\t\t} );\n\t}\n}\nvar head$1 = Object.freeze( { __proto__: null, head: head } );\nclass hhea extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.ascender = p.fword;\n\t\tthis.descender = p.fword;\n\t\tthis.lineGap = p.fword;\n\t\tthis.advanceWidthMax = p.ufword;\n\t\tthis.minLeftSideBearing = p.fword;\n\t\tthis.minRightSideBearing = p.fword;\n\t\tthis.xMaxExtent = p.fword;\n\t\tthis.caretSlopeRise = p.int16;\n\t\tthis.caretSlopeRun = p.int16;\n\t\tthis.caretOffset = p.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tp.int16;\n\t\tthis.metricDataFormat = p.int16;\n\t\tthis.numberOfHMetrics = p.uint16;\n\t\tp.verifyLength();\n\t}\n}\nvar hhea$1 = Object.freeze( { __proto__: null, hhea: hhea } );\nclass hmtx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst numberOfHMetrics = tables.hhea.numberOfHMetrics;\n\t\tconst numGlyphs = tables.maxp.numGlyphs;\n\t\tconst metricsStart = p.currentPosition;\n\t\tlazy$1( this, `hMetrics`, () => {\n\t\t\tp.currentPosition = metricsStart;\n\t\t\treturn [ ...new Array( numberOfHMetrics ) ].map(\n\t\t\t\t( _ ) => new LongHorMetric( p.uint16, p.int16 )\n\t\t\t);\n\t\t} );\n\t\tif ( numberOfHMetrics < numGlyphs ) {\n\t\t\tconst lsbStart = metricsStart + numberOfHMetrics * 4;\n\t\t\tlazy$1( this, `leftSideBearings`, () => {\n\t\t\t\tp.currentPosition = lsbStart;\n\t\t\t\treturn [ ...new Array( numGlyphs - numberOfHMetrics ) ].map(\n\t\t\t\t\t( _ ) => p.int16\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t}\n}\nclass LongHorMetric {\n\tconstructor( w, b ) {\n\t\tthis.advanceWidth = w;\n\t\tthis.lsb = b;\n\t}\n}\nvar hmtx$1 = Object.freeze( { __proto__: null, hmtx: hmtx } );\nclass maxp extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.legacyFixed;\n\t\tthis.numGlyphs = p.uint16;\n\t\tif ( this.version === 1 ) {\n\t\t\tthis.maxPoints = p.uint16;\n\t\t\tthis.maxContours = p.uint16;\n\t\t\tthis.maxCompositePoints = p.uint16;\n\t\t\tthis.maxCompositeContours = p.uint16;\n\t\t\tthis.maxZones = p.uint16;\n\t\t\tthis.maxTwilightPoints = p.uint16;\n\t\t\tthis.maxStorage = p.uint16;\n\t\t\tthis.maxFunctionDefs = p.uint16;\n\t\t\tthis.maxInstructionDefs = p.uint16;\n\t\t\tthis.maxStackElements = p.uint16;\n\t\t\tthis.maxSizeOfInstructions = p.uint16;\n\t\t\tthis.maxComponentElements = p.uint16;\n\t\t\tthis.maxComponentDepth = p.uint16;\n\t\t}\n\t\tp.verifyLength();\n\t}\n}\nvar maxp$1 = Object.freeze( { __proto__: null, maxp: maxp } );\nclass name extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.format = p.uint16;\n\t\tthis.count = p.uint16;\n\t\tthis.stringOffset = p.Offset16;\n\t\tthis.nameRecords = [ ...new Array( this.count ) ].map(\n\t\t\t( _ ) => new NameRecord( p, this )\n\t\t);\n\t\tif ( this.format === 1 ) {\n\t\t\tthis.langTagCount = p.uint16;\n\t\t\tthis.langTagRecords = [ ...new Array( this.langTagCount ) ].map(\n\t\t\t\t( _ ) => new LangTagRecord( p.uint16, p.Offset16 )\n\t\t\t);\n\t\t}\n\t\tthis.stringStart = this.tableStart + this.stringOffset;\n\t}\n\tget( nameID ) {\n\t\tlet record = this.nameRecords.find(\n\t\t\t( record ) => record.nameID === nameID\n\t\t);\n\t\tif ( record ) return record.string;\n\t}\n}\nclass LangTagRecord {\n\tconstructor( length, offset ) {\n\t\tthis.length = length;\n\t\tthis.offset = offset;\n\t}\n}\nclass NameRecord {\n\tconstructor( p, nameTable ) {\n\t\tthis.platformID = p.uint16;\n\t\tthis.encodingID = p.uint16;\n\t\tthis.languageID = p.uint16;\n\t\tthis.nameID = p.uint16;\n\t\tthis.length = p.uint16;\n\t\tthis.offset = p.Offset16;\n\t\tlazy$1( this, `string`, () => {\n\t\t\tp.currentPosition = nameTable.stringStart + this.offset;\n\t\t\treturn decodeString( p, this );\n\t\t} );\n\t}\n}\nfunction decodeString( p, record ) {\n\tconst { platformID: platformID, length: length } = record;\n\tif ( length === 0 ) return ``;\n\tif ( platformID === 0 || platformID === 3 ) {\n\t\tconst str = [];\n\t\tfor ( let i = 0, e = length / 2; i < e; i++ )\n\t\t\tstr[ i ] = String.fromCharCode( p.uint16 );\n\t\treturn str.join( `` );\n\t}\n\tconst bytes = p.readBytes( length );\n\tconst str = [];\n\tbytes.forEach( function ( b, i ) {\n\t\tstr[ i ] = String.fromCharCode( b );\n\t} );\n\treturn str.join( `` );\n}\nvar name$1 = Object.freeze( { __proto__: null, name: name } );\nclass OS2 extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.xAvgCharWidth = p.int16;\n\t\tthis.usWeightClass = p.uint16;\n\t\tthis.usWidthClass = p.uint16;\n\t\tthis.fsType = p.uint16;\n\t\tthis.ySubscriptXSize = p.int16;\n\t\tthis.ySubscriptYSize = p.int16;\n\t\tthis.ySubscriptXOffset = p.int16;\n\t\tthis.ySubscriptYOffset = p.int16;\n\t\tthis.ySuperscriptXSize = p.int16;\n\t\tthis.ySuperscriptYSize = p.int16;\n\t\tthis.ySuperscriptXOffset = p.int16;\n\t\tthis.ySuperscriptYOffset = p.int16;\n\t\tthis.yStrikeoutSize = p.int16;\n\t\tthis.yStrikeoutPosition = p.int16;\n\t\tthis.sFamilyClass = p.int16;\n\t\tthis.panose = [ ...new Array( 10 ) ].map( ( _ ) => p.uint8 );\n\t\tthis.ulUnicodeRange1 = p.flags( 32 );\n\t\tthis.ulUnicodeRange2 = p.flags( 32 );\n\t\tthis.ulUnicodeRange3 = p.flags( 32 );\n\t\tthis.ulUnicodeRange4 = p.flags( 32 );\n\t\tthis.achVendID = p.tag;\n\t\tthis.fsSelection = p.uint16;\n\t\tthis.usFirstCharIndex = p.uint16;\n\t\tthis.usLastCharIndex = p.uint16;\n\t\tthis.sTypoAscender = p.int16;\n\t\tthis.sTypoDescender = p.int16;\n\t\tthis.sTypoLineGap = p.int16;\n\t\tthis.usWinAscent = p.uint16;\n\t\tthis.usWinDescent = p.uint16;\n\t\tif ( this.version === 0 ) return p.verifyLength();\n\t\tthis.ulCodePageRange1 = p.flags( 32 );\n\t\tthis.ulCodePageRange2 = p.flags( 32 );\n\t\tif ( this.version === 1 ) return p.verifyLength();\n\t\tthis.sxHeight = p.int16;\n\t\tthis.sCapHeight = p.int16;\n\t\tthis.usDefaultChar = p.uint16;\n\t\tthis.usBreakChar = p.uint16;\n\t\tthis.usMaxContext = p.uint16;\n\t\tif ( this.version <= 4 ) return p.verifyLength();\n\t\tthis.usLowerOpticalPointSize = p.uint16;\n\t\tthis.usUpperOpticalPointSize = p.uint16;\n\t\tif ( this.version === 5 ) return p.verifyLength();\n\t}\n}\nvar OS2$1 = Object.freeze( { __proto__: null, OS2: OS2 } );\nclass post extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.legacyFixed;\n\t\tthis.italicAngle = p.fixed;\n\t\tthis.underlinePosition = p.fword;\n\t\tthis.underlineThickness = p.fword;\n\t\tthis.isFixedPitch = p.uint32;\n\t\tthis.minMemType42 = p.uint32;\n\t\tthis.maxMemType42 = p.uint32;\n\t\tthis.minMemType1 = p.uint32;\n\t\tthis.maxMemType1 = p.uint32;\n\t\tif ( this.version === 1 || this.version === 3 ) return p.verifyLength();\n\t\tthis.numGlyphs = p.uint16;\n\t\tif ( this.version === 2 ) {\n\t\t\tthis.glyphNameIndex = [ ...new Array( this.numGlyphs ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t\tthis.namesOffset = p.currentPosition;\n\t\t\tthis.glyphNameOffsets = [ 1 ];\n\t\t\tfor ( let i = 0; i < this.numGlyphs; i++ ) {\n\t\t\t\tlet index = this.glyphNameIndex[ i ];\n\t\t\t\tif ( index < macStrings.length ) {\n\t\t\t\t\tthis.glyphNameOffsets.push( this.glyphNameOffsets[ i ] );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlet bytelength = p.int8;\n\t\t\t\tp.skip( bytelength );\n\t\t\t\tthis.glyphNameOffsets.push(\n\t\t\t\t\tthis.glyphNameOffsets[ i ] + bytelength + 1\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif ( this.version === 2.5 ) {\n\t\t\tthis.offset = [ ...new Array( this.numGlyphs ) ].map(\n\t\t\t\t( _ ) => p.int8\n\t\t\t);\n\t\t}\n\t}\n\tgetGlyphName( glyphid ) {\n\t\tif ( this.version !== 2 ) {\n\t\t\tconsole.warn(\n\t\t\t\t`post table version ${ this.version } does not support glyph name lookups`\n\t\t\t);\n\t\t\treturn ``;\n\t\t}\n\t\tlet index = this.glyphNameIndex[ glyphid ];\n\t\tif ( index < 258 ) return macStrings[ index ];\n\t\tlet offset = this.glyphNameOffsets[ glyphid ];\n\t\tlet next = this.glyphNameOffsets[ glyphid + 1 ];\n\t\tlet len = next - offset - 1;\n\t\tif ( len === 0 ) return `.notdef.`;\n\t\tthis.parser.currentPosition = this.namesOffset + offset;\n\t\tconst data = this.parser.readBytes(\n\t\t\tlen,\n\t\t\tthis.namesOffset + offset,\n\t\t\t8,\n\t\t\ttrue\n\t\t);\n\t\treturn data.map( ( b ) => String.fromCharCode( b ) ).join( `` );\n\t}\n}\nconst macStrings = [\n\t`.notdef`,\n\t`.null`,\n\t`nonmarkingreturn`,\n\t`space`,\n\t`exclam`,\n\t`quotedbl`,\n\t`numbersign`,\n\t`dollar`,\n\t`percent`,\n\t`ampersand`,\n\t`quotesingle`,\n\t`parenleft`,\n\t`parenright`,\n\t`asterisk`,\n\t`plus`,\n\t`comma`,\n\t`hyphen`,\n\t`period`,\n\t`slash`,\n\t`zero`,\n\t`one`,\n\t`two`,\n\t`three`,\n\t`four`,\n\t`five`,\n\t`six`,\n\t`seven`,\n\t`eight`,\n\t`nine`,\n\t`colon`,\n\t`semicolon`,\n\t`less`,\n\t`equal`,\n\t`greater`,\n\t`question`,\n\t`at`,\n\t`A`,\n\t`B`,\n\t`C`,\n\t`D`,\n\t`E`,\n\t`F`,\n\t`G`,\n\t`H`,\n\t`I`,\n\t`J`,\n\t`K`,\n\t`L`,\n\t`M`,\n\t`N`,\n\t`O`,\n\t`P`,\n\t`Q`,\n\t`R`,\n\t`S`,\n\t`T`,\n\t`U`,\n\t`V`,\n\t`W`,\n\t`X`,\n\t`Y`,\n\t`Z`,\n\t`bracketleft`,\n\t`backslash`,\n\t`bracketright`,\n\t`asciicircum`,\n\t`underscore`,\n\t`grave`,\n\t`a`,\n\t`b`,\n\t`c`,\n\t`d`,\n\t`e`,\n\t`f`,\n\t`g`,\n\t`h`,\n\t`i`,\n\t`j`,\n\t`k`,\n\t`l`,\n\t`m`,\n\t`n`,\n\t`o`,\n\t`p`,\n\t`q`,\n\t`r`,\n\t`s`,\n\t`t`,\n\t`u`,\n\t`v`,\n\t`w`,\n\t`x`,\n\t`y`,\n\t`z`,\n\t`braceleft`,\n\t`bar`,\n\t`braceright`,\n\t`asciitilde`,\n\t`Adieresis`,\n\t`Aring`,\n\t`Ccedilla`,\n\t`Eacute`,\n\t`Ntilde`,\n\t`Odieresis`,\n\t`Udieresis`,\n\t`aacute`,\n\t`agrave`,\n\t`acircumflex`,\n\t`adieresis`,\n\t`atilde`,\n\t`aring`,\n\t`ccedilla`,\n\t`eacute`,\n\t`egrave`,\n\t`ecircumflex`,\n\t`edieresis`,\n\t`iacute`,\n\t`igrave`,\n\t`icircumflex`,\n\t`idieresis`,\n\t`ntilde`,\n\t`oacute`,\n\t`ograve`,\n\t`ocircumflex`,\n\t`odieresis`,\n\t`otilde`,\n\t`uacute`,\n\t`ugrave`,\n\t`ucircumflex`,\n\t`udieresis`,\n\t`dagger`,\n\t`degree`,\n\t`cent`,\n\t`sterling`,\n\t`section`,\n\t`bullet`,\n\t`paragraph`,\n\t`germandbls`,\n\t`registered`,\n\t`copyright`,\n\t`trademark`,\n\t`acute`,\n\t`dieresis`,\n\t`notequal`,\n\t`AE`,\n\t`Oslash`,\n\t`infinity`,\n\t`plusminus`,\n\t`lessequal`,\n\t`greaterequal`,\n\t`yen`,\n\t`mu`,\n\t`partialdiff`,\n\t`summation`,\n\t`product`,\n\t`pi`,\n\t`integral`,\n\t`ordfeminine`,\n\t`ordmasculine`,\n\t`Omega`,\n\t`ae`,\n\t`oslash`,\n\t`questiondown`,\n\t`exclamdown`,\n\t`logicalnot`,\n\t`radical`,\n\t`florin`,\n\t`approxequal`,\n\t`Delta`,\n\t`guillemotleft`,\n\t`guillemotright`,\n\t`ellipsis`,\n\t`nonbreakingspace`,\n\t`Agrave`,\n\t`Atilde`,\n\t`Otilde`,\n\t`OE`,\n\t`oe`,\n\t`endash`,\n\t`emdash`,\n\t`quotedblleft`,\n\t`quotedblright`,\n\t`quoteleft`,\n\t`quoteright`,\n\t`divide`,\n\t`lozenge`,\n\t`ydieresis`,\n\t`Ydieresis`,\n\t`fraction`,\n\t`currency`,\n\t`guilsinglleft`,\n\t`guilsinglright`,\n\t`fi`,\n\t`fl`,\n\t`daggerdbl`,\n\t`periodcentered`,\n\t`quotesinglbase`,\n\t`quotedblbase`,\n\t`perthousand`,\n\t`Acircumflex`,\n\t`Ecircumflex`,\n\t`Aacute`,\n\t`Edieresis`,\n\t`Egrave`,\n\t`Iacute`,\n\t`Icircumflex`,\n\t`Idieresis`,\n\t`Igrave`,\n\t`Oacute`,\n\t`Ocircumflex`,\n\t`apple`,\n\t`Ograve`,\n\t`Uacute`,\n\t`Ucircumflex`,\n\t`Ugrave`,\n\t`dotlessi`,\n\t`circumflex`,\n\t`tilde`,\n\t`macron`,\n\t`breve`,\n\t`dotaccent`,\n\t`ring`,\n\t`cedilla`,\n\t`hungarumlaut`,\n\t`ogonek`,\n\t`caron`,\n\t`Lslash`,\n\t`lslash`,\n\t`Scaron`,\n\t`scaron`,\n\t`Zcaron`,\n\t`zcaron`,\n\t`brokenbar`,\n\t`Eth`,\n\t`eth`,\n\t`Yacute`,\n\t`yacute`,\n\t`Thorn`,\n\t`thorn`,\n\t`minus`,\n\t`multiply`,\n\t`onesuperior`,\n\t`twosuperior`,\n\t`threesuperior`,\n\t`onehalf`,\n\t`onequarter`,\n\t`threequarters`,\n\t`franc`,\n\t`Gbreve`,\n\t`gbreve`,\n\t`Idotaccent`,\n\t`Scedilla`,\n\t`scedilla`,\n\t`Cacute`,\n\t`cacute`,\n\t`Ccaron`,\n\t`ccaron`,\n\t`dcroat`,\n];\nvar post$1 = Object.freeze( { __proto__: null, post: post } );\nclass BASE extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.horizAxisOffset = p.Offset16;\n\t\tthis.vertAxisOffset = p.Offset16;\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`horizAxis`,\n\t\t\t() =>\n\t\t\t\tnew AxisTable(\n\t\t\t\t\t{ offset: dict.offset + this.horizAxisOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`vertAxis`,\n\t\t\t() =>\n\t\t\t\tnew AxisTable(\n\t\t\t\t\t{ offset: dict.offset + this.vertAxisOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tif ( this.majorVersion === 1 && this.minorVersion === 1 ) {\n\t\t\tthis.itemVarStoreOffset = p.Offset32;\n\t\t\tlazy$1(\n\t\t\t\tthis,\n\t\t\t\t`itemVarStore`,\n\t\t\t\t() =>\n\t\t\t\t\tnew AxisTable(\n\t\t\t\t\t\t{ offset: dict.offset + this.itemVarStoreOffset },\n\t\t\t\t\t\tdataview\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n}\nclass AxisTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `AxisTable` );\n\t\tthis.baseTagListOffset = p.Offset16;\n\t\tthis.baseScriptListOffset = p.Offset16;\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`baseTagList`,\n\t\t\t() =>\n\t\t\t\tnew BaseTagListTable(\n\t\t\t\t\t{ offset: dict.offset + this.baseTagListOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t\tlazy$1(\n\t\t\tthis,\n\t\t\t`baseScriptList`,\n\t\t\t() =>\n\t\t\t\tnew BaseScriptListTable(\n\t\t\t\t\t{ offset: dict.offset + this.baseScriptListOffset },\n\t\t\t\t\tdataview\n\t\t\t\t)\n\t\t);\n\t}\n}\nclass BaseTagListTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `BaseTagListTable` );\n\t\tthis.baseTagCount = p.uint16;\n\t\tthis.baselineTags = [ ...new Array( this.baseTagCount ) ].map(\n\t\t\t( _ ) => p.tag\n\t\t);\n\t}\n}\nclass BaseScriptListTable extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview, `BaseScriptListTable` );\n\t\tthis.baseScriptCount = p.uint16;\n\t\tconst recordStart = p.currentPosition;\n\t\tlazy$1( this, `baseScriptRecords`, () => {\n\t\t\tp.currentPosition = recordStart;\n\t\t\treturn [ ...new Array( this.baseScriptCount ) ].map(\n\t\t\t\t( _ ) => new BaseScriptRecord( this.start, p )\n\t\t\t);\n\t\t} );\n\t}\n}\nclass BaseScriptRecord {\n\tconstructor( baseScriptListTableStart, p ) {\n\t\tthis.baseScriptTag = p.tag;\n\t\tthis.baseScriptOffset = p.Offset16;\n\t\tlazy$1( this, `baseScriptTable`, () => {\n\t\t\tp.currentPosition =\n\t\t\t\tbaseScriptListTableStart + this.baseScriptOffset;\n\t\t\treturn new BaseScriptTable( p );\n\t\t} );\n\t}\n}\nclass BaseScriptTable {\n\tconstructor( p ) {\n\t\tthis.start = p.currentPosition;\n\t\tthis.baseValuesOffset = p.Offset16;\n\t\tthis.defaultMinMaxOffset = p.Offset16;\n\t\tthis.baseLangSysCount = p.uint16;\n\t\tthis.baseLangSysRecords = [ ...new Array( this.baseLangSysCount ) ].map(\n\t\t\t( _ ) => new BaseLangSysRecord( this.start, p )\n\t\t);\n\t\tlazy$1( this, `baseValues`, () => {\n\t\t\tp.currentPosition = this.start + this.baseValuesOffset;\n\t\t\treturn new BaseValuesTable( p );\n\t\t} );\n\t\tlazy$1( this, `defaultMinMax`, () => {\n\t\t\tp.currentPosition = this.start + this.defaultMinMaxOffset;\n\t\t\treturn new MinMaxTable( p );\n\t\t} );\n\t}\n}\nclass BaseLangSysRecord {\n\tconstructor( baseScriptTableStart, p ) {\n\t\tthis.baseLangSysTag = p.tag;\n\t\tthis.minMaxOffset = p.Offset16;\n\t\tlazy$1( this, `minMax`, () => {\n\t\t\tp.currentPosition = baseScriptTableStart + this.minMaxOffset;\n\t\t\treturn new MinMaxTable( p );\n\t\t} );\n\t}\n}\nclass BaseValuesTable {\n\tconstructor( p ) {\n\t\tthis.parser = p;\n\t\tthis.start = p.currentPosition;\n\t\tthis.defaultBaselineIndex = p.uint16;\n\t\tthis.baseCoordCount = p.uint16;\n\t\tthis.baseCoords = [ ...new Array( this.baseCoordCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetTable( id ) {\n\t\tthis.parser.currentPosition = this.start + this.baseCoords[ id ];\n\t\treturn new BaseCoordTable( this.parser );\n\t}\n}\nclass MinMaxTable {\n\tconstructor( p ) {\n\t\tthis.minCoord = p.Offset16;\n\t\tthis.maxCoord = p.Offset16;\n\t\tthis.featMinMaxCount = p.uint16;\n\t\tconst recordStart = p.currentPosition;\n\t\tlazy$1( this, `featMinMaxRecords`, () => {\n\t\t\tp.currentPosition = recordStart;\n\t\t\treturn [ ...new Array( this.featMinMaxCount ) ].map(\n\t\t\t\t( _ ) => new FeatMinMaxRecord( p )\n\t\t\t);\n\t\t} );\n\t}\n}\nclass FeatMinMaxRecord {\n\tconstructor( p ) {\n\t\tthis.featureTableTag = p.tag;\n\t\tthis.minCoord = p.Offset16;\n\t\tthis.maxCoord = p.Offset16;\n\t}\n}\nclass BaseCoordTable {\n\tconstructor( p ) {\n\t\tthis.baseCoordFormat = p.uint16;\n\t\tthis.coordinate = p.int16;\n\t\tif ( this.baseCoordFormat === 2 ) {\n\t\t\tthis.referenceGlyph = p.uint16;\n\t\t\tthis.baseCoordPoint = p.uint16;\n\t\t}\n\t\tif ( this.baseCoordFormat === 3 ) {\n\t\t\tthis.deviceTable = p.Offset16;\n\t\t}\n\t}\n}\nvar BASE$1 = Object.freeze( { __proto__: null, BASE: BASE } );\nclass ClassDefinition {\n\tconstructor( p ) {\n\t\tthis.classFormat = p.uint16;\n\t\tif ( this.classFormat === 1 ) {\n\t\t\tthis.startGlyphID = p.uint16;\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.classValueArray = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t}\n\t\tif ( this.classFormat === 2 ) {\n\t\t\tthis.classRangeCount = p.uint16;\n\t\t\tthis.classRangeRecords = [\n\t\t\t\t...new Array( this.classRangeCount ),\n\t\t\t].map( ( _ ) => new ClassRangeRecord( p ) );\n\t\t}\n\t}\n}\nclass ClassRangeRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.class = p.uint16;\n\t}\n}\nclass CoverageTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageFormat = p.uint16;\n\t\tif ( this.coverageFormat === 1 ) {\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.glyphArray = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.uint16\n\t\t\t);\n\t\t}\n\t\tif ( this.coverageFormat === 2 ) {\n\t\t\tthis.rangeCount = p.uint16;\n\t\t\tthis.rangeRecords = [ ...new Array( this.rangeCount ) ].map(\n\t\t\t\t( _ ) => new CoverageRangeRecord( p )\n\t\t\t);\n\t\t}\n\t}\n}\nclass CoverageRangeRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.startCoverageIndex = p.uint16;\n\t}\n}\nclass ItemVariationStoreTable {\n\tconstructor( table, p ) {\n\t\tthis.table = table;\n\t\tthis.parser = p;\n\t\tthis.start = p.currentPosition;\n\t\tthis.format = p.uint16;\n\t\tthis.variationRegionListOffset = p.Offset32;\n\t\tthis.itemVariationDataCount = p.uint16;\n\t\tthis.itemVariationDataOffsets = [\n\t\t\t...new Array( this.itemVariationDataCount ),\n\t\t].map( ( _ ) => p.Offset32 );\n\t}\n}\nclass GDEF extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.glyphClassDefOffset = p.Offset16;\n\t\tlazy$1( this, `glyphClassDefs`, () => {\n\t\t\tif ( this.glyphClassDefOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.glyphClassDefOffset;\n\t\t\treturn new ClassDefinition( p );\n\t\t} );\n\t\tthis.attachListOffset = p.Offset16;\n\t\tlazy$1( this, `attachList`, () => {\n\t\t\tif ( this.attachListOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.attachListOffset;\n\t\t\treturn new AttachList( p );\n\t\t} );\n\t\tthis.ligCaretListOffset = p.Offset16;\n\t\tlazy$1( this, `ligCaretList`, () => {\n\t\t\tif ( this.ligCaretListOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.ligCaretListOffset;\n\t\t\treturn new LigCaretList( p );\n\t\t} );\n\t\tthis.markAttachClassDefOffset = p.Offset16;\n\t\tlazy$1( this, `markAttachClassDef`, () => {\n\t\t\tif ( this.markAttachClassDefOffset === 0 ) return undefined;\n\t\t\tp.currentPosition = this.tableStart + this.markAttachClassDefOffset;\n\t\t\treturn new ClassDefinition( p );\n\t\t} );\n\t\tif ( this.minorVersion >= 2 ) {\n\t\t\tthis.markGlyphSetsDefOffset = p.Offset16;\n\t\t\tlazy$1( this, `markGlyphSetsDef`, () => {\n\t\t\t\tif ( this.markGlyphSetsDefOffset === 0 ) return undefined;\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.markGlyphSetsDefOffset;\n\t\t\t\treturn new MarkGlyphSetsTable( p );\n\t\t\t} );\n\t\t}\n\t\tif ( this.minorVersion === 3 ) {\n\t\t\tthis.itemVarStoreOffset = p.Offset32;\n\t\t\tlazy$1( this, `itemVarStore`, () => {\n\t\t\t\tif ( this.itemVarStoreOffset === 0 ) return undefined;\n\t\t\t\tp.currentPosition = this.tableStart + this.itemVarStoreOffset;\n\t\t\t\treturn new ItemVariationStoreTable( p );\n\t\t\t} );\n\t\t}\n\t}\n}\nclass AttachList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageOffset = p.Offset16;\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.attachPointOffsets = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetPoint( pointID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.attachPointOffsets[ pointID ];\n\t\treturn new AttachPoint( this.parser );\n\t}\n}\nclass AttachPoint {\n\tconstructor( p ) {\n\t\tthis.pointCount = p.uint16;\n\t\tthis.pointIndices = [ ...new Array( this.pointCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LigCaretList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.coverageOffset = p.Offset16;\n\t\tlazy$1( this, `coverage`, () => {\n\t\t\tp.currentPosition = this.start + this.coverageOffset;\n\t\t\treturn new CoverageTable( p );\n\t\t} );\n\t\tthis.ligGlyphCount = p.uint16;\n\t\tthis.ligGlyphOffsets = [ ...new Array( this.ligGlyphCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigGlyph( ligGlyphID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.ligGlyphOffsets[ ligGlyphID ];\n\t\treturn new LigGlyph( this.parser );\n\t}\n}\nclass LigGlyph extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.caretCount = p.uint16;\n\t\tthis.caretValueOffsets = [ ...new Array( this.caretCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetCaretValue( caretID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.caretValueOffsets[ caretID ];\n\t\treturn new CaretValue( this.parser );\n\t}\n}\nclass CaretValue {\n\tconstructor( p ) {\n\t\tthis.caretValueFormat = p.uint16;\n\t\tif ( this.caretValueFormat === 1 ) {\n\t\t\tthis.coordinate = p.int16;\n\t\t}\n\t\tif ( this.caretValueFormat === 2 ) {\n\t\t\tthis.caretValuePointIndex = p.uint16;\n\t\t}\n\t\tif ( this.caretValueFormat === 3 ) {\n\t\t\tthis.coordinate = p.int16;\n\t\t\tthis.deviceOffset = p.Offset16;\n\t\t}\n\t}\n}\nclass MarkGlyphSetsTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.markGlyphSetTableFormat = p.uint16;\n\t\tthis.markGlyphSetCount = p.uint16;\n\t\tthis.coverageOffsets = [ ...new Array( this.markGlyphSetCount ) ].map(\n\t\t\t( _ ) => p.Offset32\n\t\t);\n\t}\n\tgetMarkGlyphSet( markGlyphSetID ) {\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.coverageOffsets[ markGlyphSetID ];\n\t\treturn new CoverageTable( this.parser );\n\t}\n}\nvar GDEF$1 = Object.freeze( { __proto__: null, GDEF: GDEF } );\nclass ScriptList extends ParsedData {\n\tstatic EMPTY = { scriptCount: 0, scriptRecords: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.scriptCount = p.uint16;\n\t\tthis.scriptRecords = [ ...new Array( this.scriptCount ) ].map(\n\t\t\t( _ ) => new ScriptRecord( p )\n\t\t);\n\t}\n}\nclass ScriptRecord {\n\tconstructor( p ) {\n\t\tthis.scriptTag = p.tag;\n\t\tthis.scriptOffset = p.Offset16;\n\t}\n}\nclass ScriptTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.defaultLangSys = p.Offset16;\n\t\tthis.langSysCount = p.uint16;\n\t\tthis.langSysRecords = [ ...new Array( this.langSysCount ) ].map(\n\t\t\t( _ ) => new LangSysRecord( p )\n\t\t);\n\t}\n}\nclass LangSysRecord {\n\tconstructor( p ) {\n\t\tthis.langSysTag = p.tag;\n\t\tthis.langSysOffset = p.Offset16;\n\t}\n}\nclass LangSysTable {\n\tconstructor( p ) {\n\t\tthis.lookupOrder = p.Offset16;\n\t\tthis.requiredFeatureIndex = p.uint16;\n\t\tthis.featureIndexCount = p.uint16;\n\t\tthis.featureIndices = [ ...new Array( this.featureIndexCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass FeatureList extends ParsedData {\n\tstatic EMPTY = { featureCount: 0, featureRecords: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.featureCount = p.uint16;\n\t\tthis.featureRecords = [ ...new Array( this.featureCount ) ].map(\n\t\t\t( _ ) => new FeatureRecord( p )\n\t\t);\n\t}\n}\nclass FeatureRecord {\n\tconstructor( p ) {\n\t\tthis.featureTag = p.tag;\n\t\tthis.featureOffset = p.Offset16;\n\t}\n}\nclass FeatureTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.featureParams = p.Offset16;\n\t\tthis.lookupIndexCount = p.uint16;\n\t\tthis.lookupListIndices = [ ...new Array( this.lookupIndexCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n\tgetFeatureParams() {\n\t\tif ( this.featureParams > 0 ) {\n\t\t\tconst p = this.parser;\n\t\t\tp.currentPosition = this.start + this.featureParams;\n\t\t\tconst tag = this.featureTag;\n\t\t\tif ( tag === `size` ) return new Size( p );\n\t\t\tif ( tag.startsWith( `cc` ) ) return new CharacterVariant( p );\n\t\t\tif ( tag.startsWith( `ss` ) ) return new StylisticSet( p );\n\t\t}\n\t}\n}\nclass CharacterVariant {\n\tconstructor( p ) {\n\t\tthis.format = p.uint16;\n\t\tthis.featUiLabelNameId = p.uint16;\n\t\tthis.featUiTooltipTextNameId = p.uint16;\n\t\tthis.sampleTextNameId = p.uint16;\n\t\tthis.numNamedParameters = p.uint16;\n\t\tthis.firstParamUiLabelNameId = p.uint16;\n\t\tthis.charCount = p.uint16;\n\t\tthis.character = [ ...new Array( this.charCount ) ].map(\n\t\t\t( _ ) => p.uint24\n\t\t);\n\t}\n}\nclass Size {\n\tconstructor( p ) {\n\t\tthis.designSize = p.uint16;\n\t\tthis.subfamilyIdentifier = p.uint16;\n\t\tthis.subfamilyNameID = p.uint16;\n\t\tthis.smallEnd = p.uint16;\n\t\tthis.largeEnd = p.uint16;\n\t}\n}\nclass StylisticSet {\n\tconstructor( p ) {\n\t\tthis.version = p.uint16;\n\t\tthis.UINameID = p.uint16;\n\t}\n}\nfunction undoCoverageOffsetParsing( instance ) {\n\tinstance.parser.currentPosition -= 2;\n\tdelete instance.coverageOffset;\n\tdelete instance.getCoverageTable;\n}\nclass LookupType$1 extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.substFormat = p.uint16;\n\t\tthis.coverageOffset = p.Offset16;\n\t}\n\tgetCoverageTable() {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.coverageOffset;\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass SubstLookupRecord {\n\tconstructor( p ) {\n\t\tthis.glyphSequenceIndex = p.uint16;\n\t\tthis.lookupListIndex = p.uint16;\n\t}\n}\nclass LookupType1$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.deltaGlyphID = p.int16;\n\t}\n}\nclass LookupType2$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.sequenceCount = p.uint16;\n\t\tthis.sequenceOffsets = [ ...new Array( this.sequenceCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetSequence( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.sequenceOffsets[ index ];\n\t\treturn new SequenceTable( p );\n\t}\n}\nclass SequenceTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LookupType3$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.alternateSetCount = p.uint16;\n\t\tthis.alternateSetOffsets = [\n\t\t\t...new Array( this.alternateSetCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetAlternateSet( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.alternateSetOffsets[ index ];\n\t\treturn new AlternateSetTable( p );\n\t}\n}\nclass AlternateSetTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.alternateGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass LookupType4$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.ligatureSetCount = p.uint16;\n\t\tthis.ligatureSetOffsets = [ ...new Array( this.ligatureSetCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigatureSet( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.ligatureSetOffsets[ index ];\n\t\treturn new LigatureSetTable( p );\n\t}\n}\nclass LigatureSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.ligatureCount = p.uint16;\n\t\tthis.ligatureOffsets = [ ...new Array( this.ligatureCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetLigature( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.ligatureOffsets[ index ];\n\t\treturn new LigatureTable( p );\n\t}\n}\nclass LigatureTable {\n\tconstructor( p ) {\n\t\tthis.ligatureGlyph = p.uint16;\n\t\tthis.componentCount = p.uint16;\n\t\tthis.componentGlyphIDs = [\n\t\t\t...new Array( this.componentCount - 1 ),\n\t\t].map( ( _ ) => p.uint16 );\n\t}\n}\nclass LookupType5$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tif ( this.substFormat === 1 ) {\n\t\t\tthis.subRuleSetCount = p.uint16;\n\t\t\tthis.subRuleSetOffsets = [\n\t\t\t\t...new Array( this.subRuleSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 2 ) {\n\t\t\tthis.classDefOffset = p.Offset16;\n\t\t\tthis.subClassSetCount = p.uint16;\n\t\t\tthis.subClassSetOffsets = [\n\t\t\t\t...new Array( this.subClassSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 3 ) {\n\t\t\tundoCoverageOffsetParsing( this );\n\t\t\tthis.glyphCount = p.uint16;\n\t\t\tthis.substitutionCount = p.uint16;\n\t\t\tthis.coverageOffsets = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t\t( _ ) => p.Offset16\n\t\t\t);\n\t\t\tthis.substLookupRecords = [\n\t\t\t\t...new Array( this.substitutionCount ),\n\t\t\t].map( ( _ ) => new SubstLookupRecord( p ) );\n\t\t}\n\t}\n\tgetSubRuleSet( index ) {\n\t\tif ( this.substFormat !== 1 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } has no subrule sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subRuleSetOffsets[ index ];\n\t\treturn new SubRuleSetTable( p );\n\t}\n\tgetSubClassSet( index ) {\n\t\tif ( this.substFormat !== 2 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } has no subclass sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subClassSetOffsets[ index ];\n\t\treturn new SubClassSetTable( p );\n\t}\n\tgetCoverageTable( index ) {\n\t\tif ( this.substFormat !== 3 && ! index )\n\t\t\treturn super.getCoverageTable();\n\t\tif ( ! index )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 5.${ this.substFormat } requires an coverage table index.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.coverageOffsets[ index ];\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass SubRuleSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.subRuleCount = p.uint16;\n\t\tthis.subRuleOffsets = [ ...new Array( this.subRuleCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n\tgetSubRule( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subRuleOffsets[ index ];\n\t\treturn new SubRuleTable( p );\n\t}\n}\nclass SubRuleTable {\n\tconstructor( p ) {\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.glyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.substLookupRecords = [\n\t\t\t...new Array( this.substitutionCount ),\n\t\t].map( ( _ ) => new SubstLookupRecord( p ) );\n\t}\n}\nclass SubClassSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.subClassRuleCount = p.uint16;\n\t\tthis.subClassRuleOffsets = [\n\t\t\t...new Array( this.subClassRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubClass( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.subClassRuleOffsets[ index ];\n\t\treturn new SubClassRuleTable( p );\n\t}\n}\nclass SubClassRuleTable extends SubRuleTable {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t}\n}\nclass LookupType6$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tif ( this.substFormat === 1 ) {\n\t\t\tthis.chainSubRuleSetCount = p.uint16;\n\t\t\tthis.chainSubRuleSetOffsets = [\n\t\t\t\t...new Array( this.chainSubRuleSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 2 ) {\n\t\t\tthis.backtrackClassDefOffset = p.Offset16;\n\t\t\tthis.inputClassDefOffset = p.Offset16;\n\t\t\tthis.lookaheadClassDefOffset = p.Offset16;\n\t\t\tthis.chainSubClassSetCount = p.uint16;\n\t\t\tthis.chainSubClassSetOffsets = [\n\t\t\t\t...new Array( this.chainSubClassSetCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t}\n\t\tif ( this.substFormat === 3 ) {\n\t\t\tundoCoverageOffsetParsing( this );\n\t\t\tthis.backtrackGlyphCount = p.uint16;\n\t\t\tthis.backtrackCoverageOffsets = [\n\t\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.inputGlyphCount = p.uint16;\n\t\t\tthis.inputCoverageOffsets = [\n\t\t\t\t...new Array( this.inputGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\t\tthis.lookaheadCoverageOffsets = [\n\t\t\t\t...new Array( this.lookaheadGlyphCount ),\n\t\t\t].map( ( _ ) => p.Offset16 );\n\t\t\tthis.seqLookupCount = p.uint16;\n\t\t\tthis.seqLookupRecords = [\n\t\t\t\t...new Array( this.substitutionCount ),\n\t\t\t].map( ( _ ) => new SequenceLookupRecord( p ) );\n\t\t}\n\t}\n\tgetChainSubRuleSet( index ) {\n\t\tif ( this.substFormat !== 1 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } has no chainsubrule sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleSetOffsets[ index ];\n\t\treturn new ChainSubRuleSetTable( p );\n\t}\n\tgetChainSubClassSet( index ) {\n\t\tif ( this.substFormat !== 2 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } has no chainsubclass sets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubClassSetOffsets[ index ];\n\t\treturn new ChainSubClassSetTable( p );\n\t}\n\tgetCoverageFromOffset( offset ) {\n\t\tif ( this.substFormat !== 3 )\n\t\t\tthrow new Error(\n\t\t\t\t`lookup type 6.${ this.substFormat } does not use contextual coverage offsets.`\n\t\t\t);\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + offset;\n\t\treturn new CoverageTable( p );\n\t}\n}\nclass ChainSubRuleSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.chainSubRuleCount = p.uint16;\n\t\tthis.chainSubRuleOffsets = [\n\t\t\t...new Array( this.chainSubRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubRule( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleOffsets[ index ];\n\t\treturn new ChainSubRuleTable( p );\n\t}\n}\nclass ChainSubRuleTable {\n\tconstructor( p ) {\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackSequence = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.inputGlyphCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookAheadSequence = [\n\t\t\t...new Array( this.lookAheadGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.substLookupRecords = [ ...new Array( this.SubstCount ) ].map(\n\t\t\t( _ ) => new SubstLookupRecord( p )\n\t\t);\n\t}\n}\nclass ChainSubClassSetTable extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.chainSubClassRuleCount = p.uint16;\n\t\tthis.chainSubClassRuleOffsets = [\n\t\t\t...new Array( this.chainSubClassRuleCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t}\n\tgetSubClass( index ) {\n\t\tlet p = this.parser;\n\t\tp.currentPosition = this.start + this.chainSubRuleOffsets[ index ];\n\t\treturn new ChainSubClassRuleTable( p );\n\t}\n}\nclass ChainSubClassRuleTable {\n\tconstructor( p ) {\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackSequence = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.inputGlyphCount = p.uint16;\n\t\tthis.inputSequence = [ ...new Array( this.inputGlyphCount - 1 ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookAheadSequence = [\n\t\t\t...new Array( this.lookAheadGlyphCount ),\n\t\t].map( ( _ ) => p.uint16 );\n\t\tthis.substitutionCount = p.uint16;\n\t\tthis.substLookupRecords = [\n\t\t\t...new Array( this.substitutionCount ),\n\t\t].map( ( _ ) => new SequenceLookupRecord( p ) );\n\t}\n}\nclass SequenceLookupRecord extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.sequenceIndex = p.uint16;\n\t\tthis.lookupListIndex = p.uint16;\n\t}\n}\nclass LookupType7$1 extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.substFormat = p.uint16;\n\t\tthis.extensionLookupType = p.uint16;\n\t\tthis.extensionOffset = p.Offset32;\n\t}\n}\nclass LookupType8$1 extends LookupType$1 {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.backtrackGlyphCount = p.uint16;\n\t\tthis.backtrackCoverageOffsets = [\n\t\t\t...new Array( this.backtrackGlyphCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t\tthis.lookaheadGlyphCount = p.uint16;\n\t\tthis.lookaheadCoverageOffsets = [\n\t\t\tnew Array( this.lookaheadGlyphCount ),\n\t\t].map( ( _ ) => p.Offset16 );\n\t\tthis.glyphCount = p.uint16;\n\t\tthis.substituteGlyphIDs = [ ...new Array( this.glyphCount ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nvar GSUBtables = {\n\tbuildSubtable: function ( type, p ) {\n\t\tconst subtable = new [\n\t\t\tundefined,\n\t\t\tLookupType1$1,\n\t\t\tLookupType2$1,\n\t\t\tLookupType3$1,\n\t\t\tLookupType4$1,\n\t\t\tLookupType5$1,\n\t\t\tLookupType6$1,\n\t\t\tLookupType7$1,\n\t\t\tLookupType8$1,\n\t\t][ type ]( p );\n\t\tsubtable.type = type;\n\t\treturn subtable;\n\t},\n};\nclass LookupType extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t}\n}\nclass LookupType1 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 1` );\n\t}\n}\nclass LookupType2 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 2` );\n\t}\n}\nclass LookupType3 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 3` );\n\t}\n}\nclass LookupType4 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 4` );\n\t}\n}\nclass LookupType5 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 5` );\n\t}\n}\nclass LookupType6 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 6` );\n\t}\n}\nclass LookupType7 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 7` );\n\t}\n}\nclass LookupType8 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 8` );\n\t}\n}\nclass LookupType9 extends LookupType {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tconsole.log( `lookup type 9` );\n\t}\n}\nvar GPOStables = {\n\tbuildSubtable: function ( type, p ) {\n\t\tconst subtable = new [\n\t\t\tundefined,\n\t\t\tLookupType1,\n\t\t\tLookupType2,\n\t\t\tLookupType3,\n\t\t\tLookupType4,\n\t\t\tLookupType5,\n\t\t\tLookupType6,\n\t\t\tLookupType7,\n\t\t\tLookupType8,\n\t\t\tLookupType9,\n\t\t][ type ]( p );\n\t\tsubtable.type = type;\n\t\treturn subtable;\n\t},\n};\nclass LookupList extends ParsedData {\n\tstatic EMPTY = { lookupCount: 0, lookups: [] };\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.lookupCount = p.uint16;\n\t\tthis.lookups = [ ...new Array( this.lookupCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t}\n}\nclass LookupTable extends ParsedData {\n\tconstructor( p, type ) {\n\t\tsuper( p );\n\t\tthis.ctType = type;\n\t\tthis.lookupType = p.uint16;\n\t\tthis.lookupFlag = p.uint16;\n\t\tthis.subTableCount = p.uint16;\n\t\tthis.subtableOffsets = [ ...new Array( this.subTableCount ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t\tthis.markFilteringSet = p.uint16;\n\t}\n\tget rightToLeft() {\n\t\treturn this.lookupFlag & ( 1 === 1 );\n\t}\n\tget ignoreBaseGlyphs() {\n\t\treturn this.lookupFlag & ( 2 === 2 );\n\t}\n\tget ignoreLigatures() {\n\t\treturn this.lookupFlag & ( 4 === 4 );\n\t}\n\tget ignoreMarks() {\n\t\treturn this.lookupFlag & ( 8 === 8 );\n\t}\n\tget useMarkFilteringSet() {\n\t\treturn this.lookupFlag & ( 16 === 16 );\n\t}\n\tget markAttachmentType() {\n\t\treturn this.lookupFlag & ( 65280 === 65280 );\n\t}\n\tgetSubTable( index ) {\n\t\tconst builder = this.ctType === `GSUB` ? GSUBtables : GPOStables;\n\t\tthis.parser.currentPosition =\n\t\t\tthis.start + this.subtableOffsets[ index ];\n\t\treturn builder.buildSubtable( this.lookupType, this.parser );\n\t}\n}\nclass CommonLayoutTable extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p, tableStart: tableStart } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.scriptListOffset = p.Offset16;\n\t\tthis.featureListOffset = p.Offset16;\n\t\tthis.lookupListOffset = p.Offset16;\n\t\tif ( this.majorVersion === 1 && this.minorVersion === 1 ) {\n\t\t\tthis.featureVariationsOffset = p.Offset32;\n\t\t}\n\t\tconst no_content = ! (\n\t\t\tthis.scriptListOffset ||\n\t\t\tthis.featureListOffset ||\n\t\t\tthis.lookupListOffset\n\t\t);\n\t\tlazy$1( this, `scriptList`, () => {\n\t\t\tif ( no_content ) return ScriptList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.scriptListOffset;\n\t\t\treturn new ScriptList( p );\n\t\t} );\n\t\tlazy$1( this, `featureList`, () => {\n\t\t\tif ( no_content ) return FeatureList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.featureListOffset;\n\t\t\treturn new FeatureList( p );\n\t\t} );\n\t\tlazy$1( this, `lookupList`, () => {\n\t\t\tif ( no_content ) return LookupList.EMPTY;\n\t\t\tp.currentPosition = tableStart + this.lookupListOffset;\n\t\t\treturn new LookupList( p );\n\t\t} );\n\t\tif ( this.featureVariationsOffset ) {\n\t\t\tlazy$1( this, `featureVariations`, () => {\n\t\t\t\tif ( no_content ) return FeatureVariations.EMPTY;\n\t\t\t\tp.currentPosition = tableStart + this.featureVariationsOffset;\n\t\t\t\treturn new FeatureVariations( p );\n\t\t\t} );\n\t\t}\n\t}\n\tgetSupportedScripts() {\n\t\treturn this.scriptList.scriptRecords.map( ( r ) => r.scriptTag );\n\t}\n\tgetScriptTable( scriptTag ) {\n\t\tlet record = this.scriptList.scriptRecords.find(\n\t\t\t( r ) => r.scriptTag === scriptTag\n\t\t);\n\t\tthis.parser.currentPosition =\n\t\t\tthis.scriptList.start + record.scriptOffset;\n\t\tlet table = new ScriptTable( this.parser );\n\t\ttable.scriptTag = scriptTag;\n\t\treturn table;\n\t}\n\tensureScriptTable( arg ) {\n\t\tif ( typeof arg === 'string' ) {\n\t\t\treturn this.getScriptTable( arg );\n\t\t}\n\t\treturn arg;\n\t}\n\tgetSupportedLangSys( scriptTable ) {\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tconst hasDefault = scriptTable.defaultLangSys !== 0;\n\t\tconst supported = scriptTable.langSysRecords.map(\n\t\t\t( l ) => l.langSysTag\n\t\t);\n\t\tif ( hasDefault ) supported.unshift( `dflt` );\n\t\treturn supported;\n\t}\n\tgetDefaultLangSysTable( scriptTable ) {\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tlet offset = scriptTable.defaultLangSys;\n\t\tif ( offset !== 0 ) {\n\t\t\tthis.parser.currentPosition = scriptTable.start + offset;\n\t\t\tlet table = new LangSysTable( this.parser );\n\t\t\ttable.langSysTag = ``;\n\t\t\ttable.defaultForScript = scriptTable.scriptTag;\n\t\t\treturn table;\n\t\t}\n\t}\n\tgetLangSysTable( scriptTable, langSysTag = `dflt` ) {\n\t\tif ( langSysTag === `dflt` )\n\t\t\treturn this.getDefaultLangSysTable( scriptTable );\n\t\tscriptTable = this.ensureScriptTable( scriptTable );\n\t\tlet record = scriptTable.langSysRecords.find(\n\t\t\t( l ) => l.langSysTag === langSysTag\n\t\t);\n\t\tthis.parser.currentPosition = scriptTable.start + record.langSysOffset;\n\t\tlet table = new LangSysTable( this.parser );\n\t\ttable.langSysTag = langSysTag;\n\t\treturn table;\n\t}\n\tgetFeatures( langSysTable ) {\n\t\treturn langSysTable.featureIndices.map( ( index ) =>\n\t\t\tthis.getFeature( index )\n\t\t);\n\t}\n\tgetFeature( indexOrTag ) {\n\t\tlet record;\n\t\tif ( parseInt( indexOrTag ) == indexOrTag ) {\n\t\t\trecord = this.featureList.featureRecords[ indexOrTag ];\n\t\t} else {\n\t\t\trecord = this.featureList.featureRecords.find(\n\t\t\t\t( f ) => f.featureTag === indexOrTag\n\t\t\t);\n\t\t}\n\t\tif ( ! record ) return;\n\t\tthis.parser.currentPosition =\n\t\t\tthis.featureList.start + record.featureOffset;\n\t\tlet table = new FeatureTable( this.parser );\n\t\ttable.featureTag = record.featureTag;\n\t\treturn table;\n\t}\n\tgetLookups( featureTable ) {\n\t\treturn featureTable.lookupListIndices.map( ( index ) =>\n\t\t\tthis.getLookup( index )\n\t\t);\n\t}\n\tgetLookup( lookupIndex, type ) {\n\t\tlet lookupOffset = this.lookupList.lookups[ lookupIndex ];\n\t\tthis.parser.currentPosition = this.lookupList.start + lookupOffset;\n\t\treturn new LookupTable( this.parser, type );\n\t}\n}\nclass GSUB extends CommonLayoutTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `GSUB` );\n\t}\n\tgetLookup( lookupIndex ) {\n\t\treturn super.getLookup( lookupIndex, `GSUB` );\n\t}\n}\nvar GSUB$1 = Object.freeze( { __proto__: null, GSUB: GSUB } );\nclass GPOS extends CommonLayoutTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `GPOS` );\n\t}\n\tgetLookup( lookupIndex ) {\n\t\treturn super.getLookup( lookupIndex, `GPOS` );\n\t}\n}\nvar GPOS$1 = Object.freeze( { __proto__: null, GPOS: GPOS } );\nclass SVG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.offsetToSVGDocumentList = p.Offset32;\n\t\tp.currentPosition = this.tableStart + this.offsetToSVGDocumentList;\n\t\tthis.documentList = new SVGDocumentList( p );\n\t}\n}\nclass SVGDocumentList extends ParsedData {\n\tconstructor( p ) {\n\t\tsuper( p );\n\t\tthis.numEntries = p.uint16;\n\t\tthis.documentRecords = [ ...new Array( this.numEntries ) ].map(\n\t\t\t( _ ) => new SVGDocumentRecord( p )\n\t\t);\n\t}\n\tgetDocument( documentID ) {\n\t\tlet record = this.documentRecords[ documentID ];\n\t\tif ( ! record ) return '';\n\t\tlet offset = this.start + record.svgDocOffset;\n\t\tthis.parser.currentPosition = offset;\n\t\treturn this.parser.readBytes( record.svgDocLength );\n\t}\n\tgetDocumentForGlyph( glyphID ) {\n\t\tlet id = this.documentRecords.findIndex(\n\t\t\t( d ) => d.startGlyphID <= glyphID && glyphID <= d.endGlyphID\n\t\t);\n\t\tif ( id === -1 ) return '';\n\t\treturn this.getDocument( id );\n\t}\n}\nclass SVGDocumentRecord {\n\tconstructor( p ) {\n\t\tthis.startGlyphID = p.uint16;\n\t\tthis.endGlyphID = p.uint16;\n\t\tthis.svgDocOffset = p.Offset32;\n\t\tthis.svgDocLength = p.uint32;\n\t}\n}\nvar SVG$1 = Object.freeze( { __proto__: null, SVG: SVG } );\nclass fvar extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.axesArrayOffset = p.Offset16;\n\t\tp.uint16;\n\t\tthis.axisCount = p.uint16;\n\t\tthis.axisSize = p.uint16;\n\t\tthis.instanceCount = p.uint16;\n\t\tthis.instanceSize = p.uint16;\n\t\tconst axisStart = this.tableStart + this.axesArrayOffset;\n\t\tlazy$1( this, `axes`, () => {\n\t\t\tp.currentPosition = axisStart;\n\t\t\treturn [ ...new Array( this.axisCount ) ].map(\n\t\t\t\t( _ ) => new VariationAxisRecord( p )\n\t\t\t);\n\t\t} );\n\t\tconst instanceStart = axisStart + this.axisCount * this.axisSize;\n\t\tlazy$1( this, `instances`, () => {\n\t\t\tlet instances = [];\n\t\t\tfor ( let i = 0; i < this.instanceCount; i++ ) {\n\t\t\t\tp.currentPosition = instanceStart + i * this.instanceSize;\n\t\t\t\tinstances.push(\n\t\t\t\t\tnew InstanceRecord( p, this.axisCount, this.instanceSize )\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn instances;\n\t\t} );\n\t}\n\tgetSupportedAxes() {\n\t\treturn this.axes.map( ( a ) => a.tag );\n\t}\n\tgetAxis( name ) {\n\t\treturn this.axes.find( ( a ) => a.tag === name );\n\t}\n}\nclass VariationAxisRecord {\n\tconstructor( p ) {\n\t\tthis.tag = p.tag;\n\t\tthis.minValue = p.fixed;\n\t\tthis.defaultValue = p.fixed;\n\t\tthis.maxValue = p.fixed;\n\t\tthis.flags = p.flags( 16 );\n\t\tthis.axisNameID = p.uint16;\n\t}\n}\nclass InstanceRecord {\n\tconstructor( p, axisCount, size ) {\n\t\tlet start = p.currentPosition;\n\t\tthis.subfamilyNameID = p.uint16;\n\t\tp.uint16;\n\t\tthis.coordinates = [ ...new Array( axisCount ) ].map(\n\t\t\t( _ ) => p.fixed\n\t\t);\n\t\tif ( p.currentPosition - start < size ) {\n\t\t\tthis.postScriptNameID = p.uint16;\n\t\t}\n\t}\n}\nvar fvar$1 = Object.freeze( { __proto__: null, fvar: fvar } );\nclass cvt extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst n = dict.length / 2;\n\t\tlazy$1( this, `items`, () =>\n\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.fword )\n\t\t);\n\t}\n}\nvar cvt$1 = Object.freeze( { __proto__: null, cvt: cvt } );\nclass fpgm extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `instructions`, () =>\n\t\t\t[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )\n\t\t);\n\t}\n}\nvar fpgm$1 = Object.freeze( { __proto__: null, fpgm: fpgm } );\nclass gasp extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numRanges = p.uint16;\n\t\tconst getter = () =>\n\t\t\t[ ...new Array( this.numRanges ) ].map(\n\t\t\t\t( _ ) => new GASPRange( p )\n\t\t\t);\n\t\tlazy$1( this, `gaspRanges`, getter );\n\t}\n}\nclass GASPRange {\n\tconstructor( p ) {\n\t\tthis.rangeMaxPPEM = p.uint16;\n\t\tthis.rangeGaspBehavior = p.uint16;\n\t}\n}\nvar gasp$1 = Object.freeze( { __proto__: null, gasp: gasp } );\nclass glyf extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview );\n\t}\n\tgetGlyphData( offset, length ) {\n\t\tthis.parser.currentPosition = this.tableStart + offset;\n\t\treturn this.parser.readBytes( length );\n\t}\n}\nvar glyf$1 = Object.freeze( { __proto__: null, glyf: glyf } );\nclass loca extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst n = tables.maxp.numGlyphs + 1;\n\t\tif ( tables.head.indexToLocFormat === 0 ) {\n\t\t\tthis.x2 = true;\n\t\t\tlazy$1( this, `offsets`, () =>\n\t\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.Offset16 )\n\t\t\t);\n\t\t} else {\n\t\t\tlazy$1( this, `offsets`, () =>\n\t\t\t\t[ ...new Array( n ) ].map( ( _ ) => p.Offset32 )\n\t\t\t);\n\t\t}\n\t}\n\tgetGlyphDataOffsetAndLength( glyphID ) {\n\t\tlet offset = this.offsets[ glyphID ] * this.x2 ? 2 : 1;\n\t\tlet nextOffset = this.offsets[ glyphID + 1 ] * this.x2 ? 2 : 1;\n\t\treturn { offset: offset, length: nextOffset - offset };\n\t}\n}\nvar loca$1 = Object.freeze( { __proto__: null, loca: loca } );\nclass prep extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `instructions`, () =>\n\t\t\t[ ...new Array( dict.length ) ].map( ( _ ) => p.uint8 )\n\t\t);\n\t}\n}\nvar prep$1 = Object.freeze( { __proto__: null, prep: prep } );\nclass CFF extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `data`, () => p.readBytes() );\n\t}\n}\nvar CFF$1 = Object.freeze( { __proto__: null, CFF: CFF } );\nclass CFF2 extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tlazy$1( this, `data`, () => p.readBytes() );\n\t}\n}\nvar CFF2$1 = Object.freeze( { __proto__: null, CFF2: CFF2 } );\nclass VORG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.defaultVertOriginY = p.int16;\n\t\tthis.numVertOriginYMetrics = p.uint16;\n\t\tlazy$1( this, `vertORiginYMetrics`, () =>\n\t\t\t[ ...new Array( this.numVertOriginYMetrics ) ].map(\n\t\t\t\t( _ ) => new VertOriginYMetric( p )\n\t\t\t)\n\t\t);\n\t}\n}\nclass VertOriginYMetric {\n\tconstructor( p ) {\n\t\tthis.glyphIndex = p.uint16;\n\t\tthis.vertOriginY = p.int16;\n\t}\n}\nvar VORG$1 = Object.freeze( { __proto__: null, VORG: VORG } );\nclass BitmapSize {\n\tconstructor( p ) {\n\t\tthis.indexSubTableArrayOffset = p.Offset32;\n\t\tthis.indexTablesSize = p.uint32;\n\t\tthis.numberofIndexSubTables = p.uint32;\n\t\tthis.colorRef = p.uint32;\n\t\tthis.hori = new SbitLineMetrics( p );\n\t\tthis.vert = new SbitLineMetrics( p );\n\t\tthis.startGlyphIndex = p.uint16;\n\t\tthis.endGlyphIndex = p.uint16;\n\t\tthis.ppemX = p.uint8;\n\t\tthis.ppemY = p.uint8;\n\t\tthis.bitDepth = p.uint8;\n\t\tthis.flags = p.int8;\n\t}\n}\nclass BitmapScale {\n\tconstructor( p ) {\n\t\tthis.hori = new SbitLineMetrics( p );\n\t\tthis.vert = new SbitLineMetrics( p );\n\t\tthis.ppemX = p.uint8;\n\t\tthis.ppemY = p.uint8;\n\t\tthis.substitutePpemX = p.uint8;\n\t\tthis.substitutePpemY = p.uint8;\n\t}\n}\nclass SbitLineMetrics {\n\tconstructor( p ) {\n\t\tthis.ascender = p.int8;\n\t\tthis.descender = p.int8;\n\t\tthis.widthMax = p.uint8;\n\t\tthis.caretSlopeNumerator = p.int8;\n\t\tthis.caretSlopeDenominator = p.int8;\n\t\tthis.caretOffset = p.int8;\n\t\tthis.minOriginSB = p.int8;\n\t\tthis.minAdvanceSB = p.int8;\n\t\tthis.maxBeforeBL = p.int8;\n\t\tthis.minAfterBL = p.int8;\n\t\tthis.pad1 = p.int8;\n\t\tthis.pad2 = p.int8;\n\t}\n}\nclass EBLC extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.numSizes = p.uint32;\n\t\tlazy$1( this, `bitMapSizes`, () =>\n\t\t\t[ ...new Array( this.numSizes ) ].map(\n\t\t\t\t( _ ) => new BitmapSize( p )\n\t\t\t)\n\t\t);\n\t}\n}\nvar EBLC$1 = Object.freeze( { __proto__: null, EBLC: EBLC } );\nclass EBDT extends SimpleTable {\n\tconstructor( dict, dataview, name ) {\n\t\tconst { p: p } = super( dict, dataview, name );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t}\n}\nvar EBDT$1 = Object.freeze( { __proto__: null, EBDT: EBDT } );\nclass EBSC extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.majorVersion = p.uint16;\n\t\tthis.minorVersion = p.uint16;\n\t\tthis.numSizes = p.uint32;\n\t\tlazy$1( this, `bitmapScales`, () =>\n\t\t\t[ ...new Array( this.numSizes ) ].map(\n\t\t\t\t( _ ) => new BitmapScale( p )\n\t\t\t)\n\t\t);\n\t}\n}\nvar EBSC$1 = Object.freeze( { __proto__: null, EBSC: EBSC } );\nclass CBLC extends EBLC {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `CBLC` );\n\t}\n}\nvar CBLC$1 = Object.freeze( { __proto__: null, CBLC: CBLC } );\nclass CBDT extends EBDT {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview, `CBDT` );\n\t}\n}\nvar CBDT$1 = Object.freeze( { __proto__: null, CBDT: CBDT } );\nclass sbix extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.flags = p.flags( 16 );\n\t\tthis.numStrikes = p.uint32;\n\t\tlazy$1( this, `strikeOffsets`, () =>\n\t\t\t[ ...new Array( this.numStrikes ) ].map( ( _ ) => p.Offset32 )\n\t\t);\n\t}\n}\nvar sbix$1 = Object.freeze( { __proto__: null, sbix: sbix } );\nclass COLR extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numBaseGlyphRecords = p.uint16;\n\t\tthis.baseGlyphRecordsOffset = p.Offset32;\n\t\tthis.layerRecordsOffset = p.Offset32;\n\t\tthis.numLayerRecords = p.uint16;\n\t}\n\tgetBaseGlyphRecord( glyphID ) {\n\t\tlet start = this.tableStart + this.baseGlyphRecordsOffset;\n\t\tthis.parser.currentPosition = start;\n\t\tlet first = new BaseGlyphRecord( this.parser );\n\t\tlet firstID = first.gID;\n\t\tlet end = this.tableStart + this.layerRecordsOffset - 6;\n\t\tthis.parser.currentPosition = end;\n\t\tlet last = new BaseGlyphRecord( this.parser );\n\t\tlet lastID = last.gID;\n\t\tif ( firstID === glyphID ) return first;\n\t\tif ( lastID === glyphID ) return last;\n\t\twhile ( true ) {\n\t\t\tif ( start === end ) break;\n\t\t\tlet mid = start + ( end - start ) / 12;\n\t\t\tthis.parser.currentPosition = mid;\n\t\t\tlet middle = new BaseGlyphRecord( this.parser );\n\t\t\tlet midID = middle.gID;\n\t\t\tif ( midID === glyphID ) return middle;\n\t\t\telse if ( midID > glyphID ) {\n\t\t\t\tend = mid;\n\t\t\t} else if ( midID < glyphID ) {\n\t\t\t\tstart = mid;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\tgetLayers( glyphID ) {\n\t\tlet record = this.getBaseGlyphRecord( glyphID );\n\t\tthis.parser.currentPosition =\n\t\t\tthis.tableStart +\n\t\t\tthis.layerRecordsOffset +\n\t\t\t4 * record.firstLayerIndex;\n\t\treturn [ ...new Array( record.numLayers ) ].map(\n\t\t\t( _ ) => new LayerRecord( p )\n\t\t);\n\t}\n}\nclass BaseGlyphRecord {\n\tconstructor( p ) {\n\t\tthis.gID = p.uint16;\n\t\tthis.firstLayerIndex = p.uint16;\n\t\tthis.numLayers = p.uint16;\n\t}\n}\nclass LayerRecord {\n\tconstructor( p ) {\n\t\tthis.gID = p.uint16;\n\t\tthis.paletteIndex = p.uint16;\n\t}\n}\nvar COLR$1 = Object.freeze( { __proto__: null, COLR: COLR } );\nclass CPAL extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numPaletteEntries = p.uint16;\n\t\tconst numPalettes = ( this.numPalettes = p.uint16 );\n\t\tthis.numColorRecords = p.uint16;\n\t\tthis.offsetFirstColorRecord = p.Offset32;\n\t\tthis.colorRecordIndices = [ ...new Array( this.numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t\tlazy$1( this, `colorRecords`, () => {\n\t\t\tp.currentPosition = this.tableStart + this.offsetFirstColorRecord;\n\t\t\treturn [ ...new Array( this.numColorRecords ) ].map(\n\t\t\t\t( _ ) => new ColorRecord( p )\n\t\t\t);\n\t\t} );\n\t\tif ( this.version === 1 ) {\n\t\t\tthis.offsetPaletteTypeArray = p.Offset32;\n\t\t\tthis.offsetPaletteLabelArray = p.Offset32;\n\t\t\tthis.offsetPaletteEntryLabelArray = p.Offset32;\n\t\t\tlazy$1( this, `paletteTypeArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteTypeArray;\n\t\t\t\treturn new PaletteTypeArray( p, numPalettes );\n\t\t\t} );\n\t\t\tlazy$1( this, `paletteLabelArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteLabelArray;\n\t\t\t\treturn new PaletteLabelsArray( p, numPalettes );\n\t\t\t} );\n\t\t\tlazy$1( this, `paletteEntryLabelArray`, () => {\n\t\t\t\tp.currentPosition =\n\t\t\t\t\tthis.tableStart + this.offsetPaletteEntryLabelArray;\n\t\t\t\treturn new PaletteEntryLabelArray( p, numPalettes );\n\t\t\t} );\n\t\t}\n\t}\n}\nclass ColorRecord {\n\tconstructor( p ) {\n\t\tthis.blue = p.uint8;\n\t\tthis.green = p.uint8;\n\t\tthis.red = p.uint8;\n\t\tthis.alpha = p.uint8;\n\t}\n}\nclass PaletteTypeArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteTypes = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint32\n\t\t);\n\t}\n}\nclass PaletteLabelsArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteLabels = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nclass PaletteEntryLabelArray {\n\tconstructor( p, numPalettes ) {\n\t\tthis.paletteEntryLabels = [ ...new Array( numPalettes ) ].map(\n\t\t\t( _ ) => p.uint16\n\t\t);\n\t}\n}\nvar CPAL$1 = Object.freeze( { __proto__: null, CPAL: CPAL } );\nclass DSIG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint32;\n\t\tthis.numSignatures = p.uint16;\n\t\tthis.flags = p.uint16;\n\t\tthis.signatureRecords = [ ...new Array( this.numSignatures ) ].map(\n\t\t\t( _ ) => new SignatureRecord( p )\n\t\t);\n\t}\n\tgetData( signatureID ) {\n\t\tconst record = this.signatureRecords[ signatureID ];\n\t\tthis.parser.currentPosition = this.tableStart + record.offset;\n\t\treturn new SignatureBlockFormat1( this.parser );\n\t}\n}\nclass SignatureRecord {\n\tconstructor( p ) {\n\t\tthis.format = p.uint32;\n\t\tthis.length = p.uint32;\n\t\tthis.offset = p.Offset32;\n\t}\n}\nclass SignatureBlockFormat1 {\n\tconstructor( p ) {\n\t\tp.uint16;\n\t\tp.uint16;\n\t\tthis.signatureLength = p.uint32;\n\t\tthis.signature = p.readBytes( this.signatureLength );\n\t}\n}\nvar DSIG$1 = Object.freeze( { __proto__: null, DSIG: DSIG } );\nclass hdmx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tconst numGlyphs = tables.hmtx.numGlyphs;\n\t\tthis.version = p.uint16;\n\t\tthis.numRecords = p.int16;\n\t\tthis.sizeDeviceRecord = p.int32;\n\t\tthis.records = [ ...new Array( numRecords ) ].map(\n\t\t\t( _ ) => new DeviceRecord( p, numGlyphs )\n\t\t);\n\t}\n}\nclass DeviceRecord {\n\tconstructor( p, numGlyphs ) {\n\t\tthis.pixelSize = p.uint8;\n\t\tthis.maxWidth = p.uint8;\n\t\tthis.widths = p.readBytes( numGlyphs );\n\t}\n}\nvar hdmx$1 = Object.freeze( { __proto__: null, hdmx: hdmx } );\nclass kern extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.nTables = p.uint16;\n\t\tlazy$1( this, `tables`, () => {\n\t\t\tlet offset = this.tableStart + 4;\n\t\t\tconst tables = [];\n\t\t\tfor ( let i = 0; i < this.nTables; i++ ) {\n\t\t\t\tp.currentPosition = offset;\n\t\t\t\tlet subtable = new KernSubTable( p );\n\t\t\t\ttables.push( subtable );\n\t\t\t\toffset += subtable;\n\t\t\t}\n\t\t\treturn tables;\n\t\t} );\n\t}\n}\nclass KernSubTable {\n\tconstructor( p ) {\n\t\tthis.version = p.uint16;\n\t\tthis.length = p.uint16;\n\t\tthis.coverage = p.flags( 8 );\n\t\tthis.format = p.uint8;\n\t\tif ( this.format === 0 ) {\n\t\t\tthis.nPairs = p.uint16;\n\t\t\tthis.searchRange = p.uint16;\n\t\t\tthis.entrySelector = p.uint16;\n\t\t\tthis.rangeShift = p.uint16;\n\t\t\tlazy$1( this, `pairs`, () =>\n\t\t\t\t[ ...new Array( this.nPairs ) ].map( ( _ ) => new Pair( p ) )\n\t\t\t);\n\t\t}\n\t\tif ( this.format === 2 ) {\n\t\t\tconsole.warn(\n\t\t\t\t`Kern subtable format 2 is not supported: this parser currently only parses universal table data.`\n\t\t\t);\n\t\t}\n\t}\n\tget horizontal() {\n\t\treturn this.coverage[ 0 ];\n\t}\n\tget minimum() {\n\t\treturn this.coverage[ 1 ];\n\t}\n\tget crossstream() {\n\t\treturn this.coverage[ 2 ];\n\t}\n\tget override() {\n\t\treturn this.coverage[ 3 ];\n\t}\n}\nclass Pair {\n\tconstructor( p ) {\n\t\tthis.left = p.uint16;\n\t\tthis.right = p.uint16;\n\t\tthis.value = p.fword;\n\t}\n}\nvar kern$1 = Object.freeze( { __proto__: null, kern: kern } );\nclass LTSH extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numGlyphs = p.uint16;\n\t\tthis.yPels = p.readBytes( this.numGlyphs );\n\t}\n}\nvar LTSH$1 = Object.freeze( { __proto__: null, LTSH: LTSH } );\nclass MERG extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.mergeClassCount = p.uint16;\n\t\tthis.mergeDataOffset = p.Offset16;\n\t\tthis.classDefCount = p.uint16;\n\t\tthis.offsetToClassDefOffsets = p.Offset16;\n\t\tlazy$1( this, `mergeEntryMatrix`, () =>\n\t\t\t[ ...new Array( this.mergeClassCount ) ].map( ( _ ) =>\n\t\t\t\tp.readBytes( this.mergeClassCount )\n\t\t\t)\n\t\t);\n\t\tconsole.warn( `Full MERG parsing is currently not supported.` );\n\t\tconsole.warn(\n\t\t\t`If you need this table parsed, please file an issue, or better yet, a PR.`\n\t\t);\n\t}\n}\nvar MERG$1 = Object.freeze( { __proto__: null, MERG: MERG } );\nclass meta extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint32;\n\t\tthis.flags = p.uint32;\n\t\tp.uint32;\n\t\tthis.dataMapsCount = p.uint32;\n\t\tthis.dataMaps = [ ...new Array( this.dataMapsCount ) ].map(\n\t\t\t( _ ) => new DataMap( this.tableStart, p )\n\t\t);\n\t}\n}\nclass DataMap {\n\tconstructor( tableStart, p ) {\n\t\tthis.tableStart = tableStart;\n\t\tthis.parser = p;\n\t\tthis.tag = p.tag;\n\t\tthis.dataOffset = p.Offset32;\n\t\tthis.dataLength = p.uint32;\n\t}\n\tgetData() {\n\t\tthis.parser.currentField = this.tableStart + this.dataOffset;\n\t\treturn this.parser.readBytes( this.dataLength );\n\t}\n}\nvar meta$1 = Object.freeze( { __proto__: null, meta: meta } );\nclass PCLT extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tsuper( dict, dataview );\n\t\tconsole.warn(\n\t\t\t`This font uses a PCLT table, which is currently not supported by this parser.`\n\t\t);\n\t\tconsole.warn(\n\t\t\t`If you need this table parsed, please file an issue, or better yet, a PR.`\n\t\t);\n\t}\n}\nvar PCLT$1 = Object.freeze( { __proto__: null, PCLT: PCLT } );\nclass VDMX extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.uint16;\n\t\tthis.numRecs = p.uint16;\n\t\tthis.numRatios = p.uint16;\n\t\tthis.ratRanges = [ ...new Array( this.numRatios ) ].map(\n\t\t\t( _ ) => new RatioRange( p )\n\t\t);\n\t\tthis.offsets = [ ...new Array( this.numRatios ) ].map(\n\t\t\t( _ ) => p.Offset16\n\t\t);\n\t\tthis.VDMXGroups = [ ...new Array( this.numRecs ) ].map(\n\t\t\t( _ ) => new VDMXGroup( p )\n\t\t);\n\t}\n}\nclass RatioRange {\n\tconstructor( p ) {\n\t\tthis.bCharSet = p.uint8;\n\t\tthis.xRatio = p.uint8;\n\t\tthis.yStartRatio = p.uint8;\n\t\tthis.yEndRatio = p.uint8;\n\t}\n}\nclass VDMXGroup {\n\tconstructor( p ) {\n\t\tthis.recs = p.uint16;\n\t\tthis.startsz = p.uint8;\n\t\tthis.endsz = p.uint8;\n\t\tthis.records = [ ...new Array( this.recs ) ].map(\n\t\t\t( _ ) => new vTable( p )\n\t\t);\n\t}\n}\nclass vTable {\n\tconstructor( p ) {\n\t\tthis.yPelHeight = p.uint16;\n\t\tthis.yMax = p.int16;\n\t\tthis.yMin = p.int16;\n\t}\n}\nvar VDMX$1 = Object.freeze( { __proto__: null, VDMX: VDMX } );\nclass vhea extends SimpleTable {\n\tconstructor( dict, dataview ) {\n\t\tconst { p: p } = super( dict, dataview );\n\t\tthis.version = p.fixed;\n\t\tthis.ascent = this.vertTypoAscender = p.int16;\n\t\tthis.descent = this.vertTypoDescender = p.int16;\n\t\tthis.lineGap = this.vertTypoLineGap = p.int16;\n\t\tthis.advanceHeightMax = p.int16;\n\t\tthis.minTopSideBearing = p.int16;\n\t\tthis.minBottomSideBearing = p.int16;\n\t\tthis.yMaxExtent = p.int16;\n\t\tthis.caretSlopeRise = p.int16;\n\t\tthis.caretSlopeRun = p.int16;\n\t\tthis.caretOffset = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.reserved = p.int16;\n\t\tthis.metricDataFormat = p.int16;\n\t\tthis.numOfLongVerMetrics = p.uint16;\n\t\tp.verifyLength();\n\t}\n}\nvar vhea$1 = Object.freeze( { __proto__: null, vhea: vhea } );\nclass vmtx extends SimpleTable {\n\tconstructor( dict, dataview, tables ) {\n\t\tsuper( dict, dataview );\n\t\tconst numOfLongVerMetrics = tables.vhea.numOfLongVerMetrics;\n\t\tconst numGlyphs = tables.maxp.numGlyphs;\n\t\tconst metricsStart = p.currentPosition;\n\t\tlazy( this, `vMetrics`, () => {\n\t\t\tp.currentPosition = metricsStart;\n\t\t\treturn [ ...new Array( numOfLongVerMetrics ) ].map(\n\t\t\t\t( _ ) => new LongVertMetric( p.uint16, p.int16 )\n\t\t\t);\n\t\t} );\n\t\tif ( numOfLongVerMetrics < numGlyphs ) {\n\t\t\tconst tsbStart = metricsStart + numOfLongVerMetrics * 4;\n\t\t\tlazy( this, `topSideBearings`, () => {\n\t\t\t\tp.currentPosition = tsbStart;\n\t\t\t\treturn [ ...new Array( numGlyphs - numOfLongVerMetrics ) ].map(\n\t\t\t\t\t( _ ) => p.int16\n\t\t\t\t);\n\t\t\t} );\n\t\t}\n\t}\n}\nclass LongVertMetric {\n\tconstructor( h, b ) {\n\t\tthis.advanceHeight = h;\n\t\tthis.topSideBearing = b;\n\t}\n}\nvar vmtx$1 = Object.freeze( { __proto__: null, vmtx: vmtx } );\nexport { Font };\n/* eslint-enable */\n","/**\n * WordPress dependencies\n */\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../../lock-unlock';\n\nconst { kebabCase } = unlock( componentsPrivateApis );\n\nexport default function makeFamiliesFromFaces( fontFaces ) {\n\tconst fontFamiliesObject = fontFaces.reduce( ( acc, item ) => {\n\t\tif ( ! acc[ item.fontFamily ] ) {\n\t\t\tacc[ item.fontFamily ] = {\n\t\t\t\tname: item.fontFamily,\n\t\t\t\tfontFamily: item.fontFamily,\n\t\t\t\tslug: kebabCase( item.fontFamily.toLowerCase() ),\n\t\t\t\tfontFace: [],\n\t\t\t};\n\t\t}\n\t\tacc[ item.fontFamily ].fontFace.push( item );\n\t\treturn acc;\n\t}, {} );\n\treturn Object.values( fontFamiliesObject );\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\t__experimentalSpacer as Spacer,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tButton,\n\tDropZone,\n\tNotice,\n\tFormFileUpload,\n\tFlexItem,\n\tProgressBar,\n} from '@wordpress/components';\nimport { useContext, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ALLOWED_FILE_EXTENSIONS } from './utils/constants';\nimport { FontLibraryContext } from './context';\nimport { Font } from '../../../../lib/lib-font.browser';\nimport makeFamiliesFromFaces from './utils/make-families-from-faces';\nimport { loadFontFaceInBrowser } from './utils';\n\nfunction UploadFonts() {\n\tconst { installFonts, notice, setNotice } =\n\t\tuseContext( FontLibraryContext );\n\tconst [ isUploading, setIsUploading ] = useState( false );\n\n\tconst handleDropZone = ( files ) => {\n\t\thandleFilesUpload( files );\n\t};\n\tconst onFilesUpload = ( event ) => {\n\t\thandleFilesUpload( event.target.files );\n\t};\n\n\t/**\n\t * Filters the selected files to only allow the ones with the allowed extensions\n\t *\n\t * @param {Array} files The files to be filtered\n\t * @return {void}\n\t */\n\tconst handleFilesUpload = async ( files ) => {\n\t\tsetNotice( null );\n\t\tsetIsUploading( true );\n\t\tconst uniqueFilenames = new Set();\n\t\tconst selectedFiles = [ ...files ];\n\t\tlet hasInvalidFiles = false;\n\n\t\t// Use map to create a promise for each file check, then filter with Promise.all.\n\t\tconst checkFilesPromises = selectedFiles.map( async ( file ) => {\n\t\t\tconst isFont = await isFontFile( file );\n\t\t\tif ( ! isFont ) {\n\t\t\t\thasInvalidFiles = true;\n\t\t\t\treturn null; // Return null for invalid files.\n\t\t\t}\n\t\t\t// Check for duplicates\n\t\t\tif ( uniqueFilenames.has( file.name ) ) {\n\t\t\t\treturn null; // Return null for duplicates.\n\t\t\t}\n\t\t\t// Check if the file extension is allowed.\n\t\t\tconst fileExtension = file.name.split( '.' ).pop().toLowerCase();\n\t\t\tif ( ALLOWED_FILE_EXTENSIONS.includes( fileExtension ) ) {\n\t\t\t\tuniqueFilenames.add( file.name );\n\t\t\t\treturn file; // Return the file if it passes all checks.\n\t\t\t}\n\t\t\treturn null; // Return null for disallowed file extensions.\n\t\t} );\n\n\t\t// Filter out the nulls after all promises have resolved.\n\t\tconst allowedFiles = ( await Promise.all( checkFilesPromises ) ).filter(\n\t\t\t( file ) => null !== file\n\t\t);\n\n\t\tif ( allowedFiles.length > 0 ) {\n\t\t\tloadFiles( allowedFiles );\n\t\t} else {\n\t\t\tconst message = hasInvalidFiles\n\t\t\t\t? __( 'Sorry, you are not allowed to upload this file type.' )\n\t\t\t\t: __( 'No fonts found to install.' );\n\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage,\n\t\t\t} );\n\t\t\tsetIsUploading( false );\n\t\t}\n\t};\n\n\t/**\n\t * Loads the selected files and reads the font metadata\n\t *\n\t * @param {Array} files The files to be loaded\n\t * @return {void}\n\t */\n\tconst loadFiles = async ( files ) => {\n\t\tconst fontFacesLoaded = await Promise.all(\n\t\t\tfiles.map( async ( fontFile ) => {\n\t\t\t\tconst fontFaceData = await getFontFaceMetadata( fontFile );\n\t\t\t\tawait loadFontFaceInBrowser(\n\t\t\t\t\tfontFaceData,\n\t\t\t\t\tfontFaceData.file,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t\treturn fontFaceData;\n\t\t\t} )\n\t\t);\n\t\thandleInstall( fontFacesLoaded );\n\t};\n\n\t/**\n\t * Checks if a file is a valid Font file.\n\t *\n\t * @param {File} file The file to be checked.\n\t * @return {boolean} Whether the file is a valid font file.\n\t */\n\tasync function isFontFile( file ) {\n\t\tconst font = new Font( 'Uploaded Font' );\n\t\ttry {\n\t\t\tconst buffer = await readFileAsArrayBuffer( file );\n\t\t\tawait font.fromDataBuffer( buffer, 'font' );\n\t\t\treturn true;\n\t\t} catch ( error ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Create a function to read the file as array buffer\n\tasync function readFileAsArrayBuffer( file ) {\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst reader = new window.FileReader();\n\t\t\treader.readAsArrayBuffer( file );\n\t\t\treader.onload = () => resolve( reader.result );\n\t\t\treader.onerror = reject;\n\t\t} );\n\t}\n\n\tconst getFontFaceMetadata = async ( fontFile ) => {\n\t\tconst buffer = await readFileAsArrayBuffer( fontFile );\n\t\tconst fontObj = new Font( 'Uploaded Font' );\n\t\tfontObj.fromDataBuffer( buffer, fontFile.name );\n\t\t// Assuming that fromDataBuffer triggers onload event and returning a Promise\n\t\tconst onloadEvent = await new Promise(\n\t\t\t( resolve ) => ( fontObj.onload = resolve )\n\t\t);\n\t\tconst font = onloadEvent.detail.font;\n\t\tconst { name } = font.opentype.tables;\n\t\tconst fontName = name.get( 16 ) || name.get( 1 );\n\t\tconst isItalic = name.get( 2 ).toLowerCase().includes( 'italic' );\n\t\tconst fontWeight =\n\t\t\tfont.opentype.tables[ 'OS/2' ].usWeightClass || 'normal';\n\t\tconst isVariable = !! font.opentype.tables.fvar;\n\t\tconst weightAxis =\n\t\t\tisVariable &&\n\t\t\tfont.opentype.tables.fvar.axes.find(\n\t\t\t\t( { tag } ) => tag === 'wght'\n\t\t\t);\n\t\tconst weightRange = weightAxis\n\t\t\t? `${ weightAxis.minValue } ${ weightAxis.maxValue }`\n\t\t\t: null;\n\t\treturn {\n\t\t\tfile: fontFile,\n\t\t\tfontFamily: fontName,\n\t\t\tfontStyle: isItalic ? 'italic' : 'normal',\n\t\t\tfontWeight: weightRange || fontWeight,\n\t\t};\n\t};\n\n\t/**\n\t * Creates the font family definition and sends it to the server\n\t *\n\t * @param {Array} fontFaces The font faces to be installed\n\t * @return {void}\n\t */\n\tconst handleInstall = async ( fontFaces ) => {\n\t\tconst fontFamilies = makeFamiliesFromFaces( fontFaces );\n\n\t\ttry {\n\t\t\tawait installFonts( fontFamilies );\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'success',\n\t\t\t\tmessage: __( 'Fonts were installed successfully.' ),\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: error.message,\n\t\t\t\terrors: error?.installationErrors,\n\t\t\t} );\n\t\t}\n\n\t\tsetIsUploading( false );\n\t};\n\n\treturn (\n\t\t<div className=\"font-library-modal__tabpanel-layout\">\n\t\t\t<DropZone onFilesDrop={ handleDropZone } />\n\t\t\t<VStack className=\"font-library-modal__local-fonts\">\n\t\t\t\t{ notice && (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\tstatus={ notice.type }\n\t\t\t\t\t\t__unstableHTML\n\t\t\t\t\t\tonRemove={ () => setNotice( null ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ notice.message }\n\t\t\t\t\t\t{ notice.errors && (\n\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t{ notice.errors.map( ( error, index ) => (\n\t\t\t\t\t\t\t\t\t<li key={ index }>{ error }</li>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Notice>\n\t\t\t\t) }\n\t\t\t\t{ isUploading && (\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<div className=\"font-library-modal__upload-area\">\n\t\t\t\t\t\t\t<ProgressBar />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t) }\n\t\t\t\t{ ! isUploading && (\n\t\t\t\t\t<FormFileUpload\n\t\t\t\t\t\taccept={ ALLOWED_FILE_EXTENSIONS.map(\n\t\t\t\t\t\t\t( ext ) => `.${ ext }`\n\t\t\t\t\t\t).join( ',' ) }\n\t\t\t\t\t\tmultiple\n\t\t\t\t\t\tonChange={ onFilesUpload }\n\t\t\t\t\t\trender={ ( { openFileDialog } ) => (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"font-library-modal__upload-area\"\n\t\t\t\t\t\t\t\tonClick={ openFileDialog }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Upload font' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<Spacer margin={ 2 } />\n\t\t\t\t<Text className=\"font-library-modal__upload-area__text\">\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Uploaded fonts appear in your library and can be used in your theme. Supported formats: .ttf, .otf, .woff, and .woff2.'\n\t\t\t\t\t) }\n\t\t\t\t</Text>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default UploadFonts;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InstalledFonts from './installed-fonts';\nimport FontCollection from './font-collection';\nimport UploadFonts from './upload-fonts';\nimport { FontLibraryContext } from './context';\nimport { unlock } from '../../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nconst DEFAULT_TAB = {\n\tid: 'installed-fonts',\n\ttitle: _x( 'Library', 'Font library' ),\n};\n\nconst UPLOAD_TAB = {\n\tid: 'upload-fonts',\n\ttitle: __( 'Upload' ),\n};\n\nconst tabsFromCollections = ( collections ) =>\n\tcollections.map( ( { slug, name } ) => ( {\n\t\tid: slug,\n\t\ttitle:\n\t\t\tcollections.length === 1 && slug === 'google-fonts'\n\t\t\t\t? __( 'Install Fonts' )\n\t\t\t\t: name,\n\t} ) );\n\nfunction FontLibraryModal( {\n\tonRequestClose,\n\tdefaultTabId = 'installed-fonts',\n} ) {\n\tconst { collections, setNotice } = useContext( FontLibraryContext );\n\tconst canUserCreate = useSelect( ( select ) => {\n\t\treturn select( coreStore ).canUser( 'create', {\n\t\t\tkind: 'postType',\n\t\t\tname: 'wp_font_family',\n\t\t} );\n\t}, [] );\n\n\tconst tabs = [ DEFAULT_TAB ];\n\n\tif ( canUserCreate ) {\n\t\ttabs.push( UPLOAD_TAB );\n\t\ttabs.push( ...tabsFromCollections( collections || [] ) );\n\t}\n\n\t// Reset notice when new tab is selected.\n\tconst onSelect = () => {\n\t\tsetNotice( null );\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Fonts' ) }\n\t\t\tonRequestClose={ onRequestClose }\n\t\t\tisFullScreen\n\t\t\tclassName=\"font-library-modal\"\n\t\t>\n\t\t\t<div className=\"font-library-modal__tabs\">\n\t\t\t\t<Tabs defaultTabId={ defaultTabId } onSelect={ onSelect }>\n\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t{ tabs.map( ( { id, title } ) => (\n\t\t\t\t\t\t\t<Tabs.Tab key={ id } tabId={ id }>\n\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t{ tabs.map( ( { id } ) => {\n\t\t\t\t\t\tlet contents;\n\t\t\t\t\t\tswitch ( id ) {\n\t\t\t\t\t\t\tcase 'upload-fonts':\n\t\t\t\t\t\t\t\tcontents = <UploadFonts />;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'installed-fonts':\n\t\t\t\t\t\t\t\tcontents = <InstalledFonts />;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\tcontents = <FontCollection slug={ id } />;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\t\t\ttabId={ id }\n\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ contents }\n\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</Tabs>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default FontLibraryModal;\n","/**\n * WordPress dependencies\n */\nimport { _n, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalItem as Item,\n\tFlexItem,\n} from '@wordpress/components';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { FontLibraryContext } from './font-library-modal/context';\nimport { getFamilyPreviewStyle } from './font-library-modal/utils/preview-styles';\n\nfunction FontFamilyItem( { font } ) {\n\tconst { handleSetLibraryFontSelected, setModalTabOpen } =\n\t\tuseContext( FontLibraryContext );\n\n\tconst variantsCount = font?.fontFace?.length || 1;\n\n\tconst handleClick = () => {\n\t\thandleSetLibraryFontSelected( font );\n\t\tsetModalTabOpen( 'installed-fonts' );\n\t};\n\n\tconst previewStyle = getFamilyPreviewStyle( font );\n\n\treturn (\n\t\t<Item onClick={ handleClick }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<FlexItem style={ previewStyle }>{ font.name }</FlexItem>\n\t\t\t\t<FlexItem className=\"edit-site-global-styles-screen-typography__font-variants-count\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %d: Number of font variants. */\n\t\t\t\t\t\t_n( '%d variant', '%d variants', variantsCount ),\n\t\t\t\t\t\tvariantsCount\n\t\t\t\t\t) }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n\nexport default FontFamilyItem;\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalText as Text,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\tButton,\n} from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport FontLibraryProvider, {\n\tFontLibraryContext,\n} from './font-library-modal/context';\nimport FontLibraryModal from './font-library-modal';\nimport FontFamilyItem from './font-family-item';\nimport Subtitle from './subtitle';\nimport { setUIValuesNeeded } from './font-library-modal/utils';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nfunction FontFamilies() {\n\tconst { baseCustomFonts, modalTabOpen, setModalTabOpen, setNotice } =\n\t\tuseContext( FontLibraryContext );\n\tconst [ fontFamilies ] = useGlobalSetting( 'typography.fontFamilies' );\n\tconst [ baseFontFamilies ] = useGlobalSetting(\n\t\t'typography.fontFamilies',\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst themeFonts = fontFamilies?.theme\n\t\t? fontFamilies.theme\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'theme' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\tconst customFonts = fontFamilies?.custom\n\t\t? fontFamilies.custom\n\t\t\t\t.map( ( f ) => setUIValuesNeeded( f, { source: 'custom' } ) )\n\t\t\t\t.sort( ( a, b ) => a.name.localeCompare( b.name ) )\n\t\t: [];\n\tconst hasFonts = 0 < customFonts.length || 0 < themeFonts.length;\n\n\tconst hasInstalledFonts =\n\t\thasFonts ||\n\t\tbaseFontFamilies?.theme?.length > 0 ||\n\t\tbaseCustomFonts?.length > 0;\n\n\treturn (\n\t\t<>\n\t\t\t{ !! modalTabOpen && (\n\t\t\t\t<FontLibraryModal\n\t\t\t\t\tonRequestClose={ () => setModalTabOpen( null ) }\n\t\t\t\t\tdefaultTabId={ modalTabOpen }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t{ themeFonts.length > 0 && (\n\t\t\t\t\t<VStack>\n\t\t\t\t\t\t<Subtitle level={ 3 }>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Heading for a list of fonts provided by the theme. */\n\t\t\t\t\t\t\t\t_x( 'Theme', 'font source' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Subtitle>\n\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t{ themeFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t<FontFamilyItem\n\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</VStack>\n\t\t\t\t) }\n\t\t\t\t{ customFonts.length > 0 && (\n\t\t\t\t\t<VStack>\n\t\t\t\t\t\t<Subtitle level={ 3 }>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Heading for a list of fonts installed by the user. */\n\t\t\t\t\t\t\t\t_x( 'Custom', 'font source' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</Subtitle>\n\t\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t\t{ customFonts.map( ( font ) => (\n\t\t\t\t\t\t\t\t<FontFamilyItem\n\t\t\t\t\t\t\t\t\tkey={ font.slug }\n\t\t\t\t\t\t\t\t\tfont={ font }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t</VStack>\n\t\t\t\t) }\n\t\t\t\t{ ! hasFonts && (\n\t\t\t\t\t<VStack>\n\t\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Fonts' ) }</Subtitle>\n\t\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t\t{ hasInstalledFonts\n\t\t\t\t\t\t\t\t? __( 'No fonts activated.' )\n\t\t\t\t\t\t\t\t: __( 'No fonts installed.' ) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</VStack>\n\t\t\t\t) }\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"edit-site-global-styles-font-families__manage-fonts\"\n\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t// Reset notice when opening the modal.\n\t\t\t\t\t\tsetNotice( null );\n\t\t\t\t\t\tsetModalTabOpen(\n\t\t\t\t\t\t\thasInstalledFonts\n\t\t\t\t\t\t\t\t? 'installed-fonts'\n\t\t\t\t\t\t\t\t: 'upload-fonts'\n\t\t\t\t\t\t);\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ hasInstalledFonts\n\t\t\t\t\t\t? __( 'Manage fonts' )\n\t\t\t\t\t\t: __( 'Add fonts' ) }\n\t\t\t\t</Button>\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default ( { ...props } ) => (\n\t<FontLibraryProvider>\n\t\t<FontFamilies { ...props } />\n\t</FontLibraryProvider>\n);\n","/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */\n\n/**\n * Return an SVG icon.\n *\n * @param {IconProps} props icon is the SVG component to render\n * size is a number specifiying the icon size in pixels\n * Other props will be passed to wrapped SVG component\n * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element.\n *\n * @return {JSX.Element} Icon component\n */\nfunction Icon( { icon, size = 24, ...props }, ref ) {\n\treturn cloneElement( icon, {\n\t\twidth: size,\n\t\theight: size,\n\t\t...props,\n\t\tref,\n\t} );\n}\n\nexport default forwardRef( Icon );\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n} from '@wordpress/components';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from '../subtitle';\nimport { NavigationButtonAsItem } from '../navigation-button';\n\nfunction FontSizes() {\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Subtitle level={ 3 }>{ __( 'Font Sizes' ) }</Subtitle>\n\t\t\t</HStack>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\tpath=\"/typography/font-sizes/\"\n\t\t\t\t\taria-label={ __( 'Edit font size presets' ) }\n\t\t\t\t>\n\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t<FlexItem>{ __( 'Font size presets' ) }</FlexItem>\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t</VStack>\n\t);\n}\n\nexport default FontSizes;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport TypographyElements from './typography-elements';\nimport TypographyVariations from './variations/variations-typography';\nimport FontFamilies from './font-families';\nimport ScreenHeader from './header';\nimport FontSizesCount from './font-sizes/font-sizes-count';\n\nfunction ScreenTypography() {\n\tconst fontLibraryEnabled = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).getEditorSettings().fontLibraryEnabled,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Typography styles and the application of those styles on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t{ fontLibraryEnabled && <FontFamilies /> }\n\t\t\t\t\t<TypographyElements />\n\t\t\t\t\t<TypographyVariations title={ __( 'Presets' ) } />\n\t\t\t\t\t<FontSizesCount />\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypography;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tTypographyPanel: StylesTypographyPanel,\n} = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPanel( { element, headingLevel } ) {\n\tlet prefixParts = [];\n\tif ( element === 'heading' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', headingLevel ] );\n\t} else if ( element && element !== 'text' ) {\n\t\tprefixParts = prefixParts.concat( [ 'elements', element ] );\n\t}\n\tconst prefix = prefixParts.join( '.' );\n\n\tconst [ style ] = useGlobalStyle( prefix, undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle(\n\t\tprefix,\n\t\tundefined,\n\t\t'all',\n\t\t{\n\t\t\tshouldDecodeEncode: false,\n\t\t}\n\t);\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst usedElement = element === 'heading' ? headingLevel : element;\n\tconst settings = useSettingsForBlockElement(\n\t\trawSettings,\n\t\tundefined,\n\t\tusedElement\n\t);\n\n\treturn (\n\t\t<StylesTypographyPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nexport default function TypographyPreview( { name, element, headingLevel } ) {\n\tlet prefix = '';\n\tif ( element === 'heading' ) {\n\t\tprefix = `elements.${ headingLevel }.`;\n\t} else if ( element && element !== 'text' ) {\n\t\tprefix = `elements.${ element }.`;\n\t}\n\n\tconst [ fontFamily ] = useGlobalStyle(\n\t\tprefix + 'typography.fontFamily',\n\t\tname\n\t);\n\tconst [ gradientValue ] = useGlobalStyle( prefix + 'color.gradient', name );\n\tconst [ backgroundColor ] = useGlobalStyle(\n\t\tprefix + 'color.background',\n\t\tname\n\t);\n\tconst [ fallbackBackgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ color ] = useGlobalStyle( prefix + 'color.text', name );\n\tconst [ fontSize ] = useGlobalStyle( prefix + 'typography.fontSize', name );\n\tconst [ fontStyle ] = useGlobalStyle(\n\t\tprefix + 'typography.fontStyle',\n\t\tname\n\t);\n\tconst [ fontWeight ] = useGlobalStyle(\n\t\tprefix + 'typography.fontWeight',\n\t\tname\n\t);\n\tconst [ letterSpacing ] = useGlobalStyle(\n\t\tprefix + 'typography.letterSpacing',\n\t\tname\n\t);\n\tconst extraStyles =\n\t\telement === 'link'\n\t\t\t? {\n\t\t\t\t\ttextDecoration: 'underline',\n\t\t\t }\n\t\t\t: {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontFamily: fontFamily ?? 'serif',\n\t\t\t\tbackground:\n\t\t\t\t\tgradientValue ?? backgroundColor ?? fallbackBackgroundColor,\n\t\t\t\tcolor,\n\t\t\t\tfontSize,\n\t\t\t\tfontStyle,\n\t\t\t\tfontWeight,\n\t\t\t\tletterSpacing,\n\t\t\t\t...extraStyles,\n\t\t\t} }\n\t\t>\n\t\t\tAa\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport {\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TypographyPanel from './typography-panel';\nimport ScreenHeader from './header';\nimport TypographyPreview from './typography-preview';\n\nconst elements = {\n\ttext: {\n\t\tdescription: __( 'Manage the fonts used on the site.' ),\n\t\ttitle: __( 'Text' ),\n\t},\n\tlink: {\n\t\tdescription: __( 'Manage the fonts and typography used on the links.' ),\n\t\ttitle: __( 'Links' ),\n\t},\n\theading: {\n\t\tdescription: __( 'Manage the fonts and typography used on headings.' ),\n\t\ttitle: __( 'Headings' ),\n\t},\n\tcaption: {\n\t\tdescription: __( 'Manage the fonts and typography used on captions.' ),\n\t\ttitle: __( 'Captions' ),\n\t},\n\tbutton: {\n\t\tdescription: __( 'Manage the fonts and typography used on buttons.' ),\n\t\ttitle: __( 'Buttons' ),\n\t},\n};\n\nfunction ScreenTypographyElement( { element } ) {\n\tconst [ headingLevel, setHeadingLevel ] = useState( 'heading' );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ elements[ element ].title }\n\t\t\t\tdescription={ elements[ element ].description }\n\t\t\t/>\n\t\t\t<Spacer marginX={ 4 }>\n\t\t\t\t<TypographyPreview\n\t\t\t\t\telement={ element }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t</Spacer>\n\t\t\t{ element === 'heading' && (\n\t\t\t\t<Spacer marginX={ 4 } marginBottom=\"1em\">\n\t\t\t\t\t<ToggleGroupControl\n\t\t\t\t\t\tlabel={ __( 'Select heading level' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ headingLevel }\n\t\t\t\t\t\tonChange={ setHeadingLevel }\n\t\t\t\t\t\tisBlock\n\t\t\t\t\t\tsize=\"__unstable-large\"\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"heading\"\n\t\t\t\t\t\t\tlabel={ _x( 'All', 'heading levels' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h1\"\n\t\t\t\t\t\t\tlabel={ __( 'H1' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h2\"\n\t\t\t\t\t\t\tlabel={ __( 'H2' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h3\"\n\t\t\t\t\t\t\tlabel={ __( 'H3' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h4\"\n\t\t\t\t\t\t\tlabel={ __( 'H4' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h5\"\n\t\t\t\t\t\t\tlabel={ __( 'H5' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\t\tvalue=\"h6\"\n\t\t\t\t\t\t\tlabel={ __( 'H6' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ToggleGroupControl>\n\t\t\t\t</Spacer>\n\t\t\t) }\n\t\t\t<TypographyPanel\n\t\t\t\telement={ element }\n\t\t\t\theadingLevel={ headingLevel }\n\t\t\t/>\n\t\t</>\n\t);\n}\n\nexport default ScreenTypographyElement;\n","/**\n * WordPress dependencies\n */\nimport {\n\tgetComputedFluidTypographyValue,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\n\nfunction FontSizePreview( { fontSize } ) {\n\tconst [ font ] = useGlobalStyle( 'typography' );\n\n\tconst input =\n\t\tfontSize?.fluid?.min && fontSize?.fluid?.max\n\t\t\t? {\n\t\t\t\t\tminimumFontSize: fontSize.fluid.min,\n\t\t\t\t\tmaximumFontSize: fontSize.fluid.max,\n\t\t\t }\n\t\t\t: {\n\t\t\t\t\tfontSize: fontSize.size,\n\t\t\t };\n\n\tconst computedFontSize = getComputedFluidTypographyValue( input );\n\treturn (\n\t\t<div\n\t\t\tclassName=\"edit-site-typography-preview\"\n\t\t\tstyle={ {\n\t\t\t\tfontSize: computedFontSize,\n\t\t\t\tfontFamily: font?.fontFamily ?? 'serif',\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Aa' ) }\n\t\t</div>\n\t);\n}\n\nexport default FontSizePreview;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\n\nfunction ConfirmDeleteFontSizeDialog( {\n\tfontSize,\n\tisOpen,\n\ttoggleOpen,\n\thandleRemoveFontSize,\n} ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\thandleRemoveFontSize( fontSize );\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ fontSize &&\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: Name of the font size preset. */\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\" font size preset?'\n\t\t\t\t\t),\n\t\t\t\t\tfontSize.name\n\t\t\t\t) }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmDeleteFontSizeDialog;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalInputControl as InputControl,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nfunction RenameFontSizeDialog( { fontSize, toggleOpen, handleRename } ) {\n\tconst [ newName, setNewName ] = useState( fontSize.name );\n\n\tconst handleConfirm = () => {\n\t\t// If the new name is not empty, call the handleRename function\n\t\tif ( newName.trim() ) {\n\t\t\thandleRename( newName );\n\t\t}\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<Modal\n\t\t\tonRequestClose={ toggleOpen }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form\n\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleConfirm();\n\t\t\t\t\ttoggleOpen();\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<InputControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tvalue={ newName }\n\t\t\t\t\t\tonChange={ setNewName }\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\tplaceholder={ __( 'Font size preset name' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ toggleOpen }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n\nexport default RenameFontSizeDialog;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBaseControl,\n\tRangeControl,\n\tFlex,\n\tFlexItem,\n\tuseBaseControlProps,\n\t__experimentalUseCustomUnits as useCustomUnits,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalSpacer as Spacer,\n} from '@wordpress/components';\n\nconst DEFAULT_UNITS = [ 'px', 'em', 'rem', 'vw', 'vh' ];\n\nfunction SizeControl( props ) {\n\tconst { baseControlProps } = useBaseControlProps( props );\n\tconst { value, onChange, fallbackValue, disabled } = props;\n\n\tconst units = useCustomUnits( {\n\t\tavailableUnits: DEFAULT_UNITS,\n\t} );\n\n\tconst [ valueQuantity, valueUnit = 'px' ] =\n\t\tparseQuantityAndUnitFromRawValue( value, units );\n\n\tconst isValueUnitRelative =\n\t\t!! valueUnit && [ 'em', 'rem', 'vw', 'vh' ].includes( valueUnit );\n\n\t// Receives the new value from the UnitControl component as a string containing the value and unit.\n\tconst handleUnitControlChange = ( newValue ) => {\n\t\tonChange( newValue );\n\t};\n\n\t// Receives the new value from the RangeControl component as a number.\n\tconst handleRangeControlChange = ( newValue ) => {\n\t\tonChange?.( newValue + valueUnit );\n\t};\n\n\treturn (\n\t\t<BaseControl { ...baseControlProps }>\n\t\t\t<Flex>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<UnitControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ handleUnitControlChange }\n\t\t\t\t\t\tunits={ units }\n\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t/>\n\t\t\t\t</FlexItem>\n\t\t\t\t<FlexItem isBlock>\n\t\t\t\t\t<Spacer marginX={ 2 } marginBottom={ 0 }>\n\t\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tlabel={ __( 'Custom Size' ) }\n\t\t\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t\t\tvalue={ valueQuantity }\n\t\t\t\t\t\t\tinitialPosition={ fallbackValue }\n\t\t\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t\t\tonChange={ handleRangeControlChange }\n\t\t\t\t\t\t\tmin={ 0 }\n\t\t\t\t\t\t\tmax={ isValueUnitRelative ? 10 : 100 }\n\t\t\t\t\t\t\tstep={ isValueUnitRelative ? 0.1 : 1 }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</Flex>\n\t\t</BaseControl>\n\t);\n}\n\nexport default SizeControl;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalSpacer as Spacer,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalView as View,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tFlexItem,\n\tToggleControl,\n} from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n} = unlock( componentsPrivateApis );\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nimport ScreenHeader from '../header';\nimport FontSizePreview from './font-size-preview';\nimport ConfirmDeleteFontSizeDialog from './confirm-delete-font-size-dialog';\nimport RenameFontSizeDialog from './rename-font-size-dialog';\nimport SizeControl from '../size-control';\n\nfunction FontSize() {\n\tconst [ isDeleteConfirmOpen, setIsDeleteConfirmOpen ] = useState( false );\n\tconst [ isRenameDialogOpen, setIsRenameDialogOpen ] = useState( false );\n\n\tconst {\n\t\tparams: { origin, slug },\n\t\tgoBack,\n\t\tgoTo,\n\t} = useNavigator();\n\n\tconst [ fontSizes, setFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes'\n\t);\n\n\t// Get the font sizes from the origin, default to empty array.\n\tconst sizes = fontSizes[ origin ] ?? [];\n\n\t// Get the font size by slug.\n\tconst fontSize = sizes.find( ( size ) => size.slug === slug );\n\n\t// Whether fluid is true or an object, set it to true, otherwise false.\n\tconst isFluid = !! fontSize.fluid ?? false;\n\n\t// Whether custom fluid values are used.\n\tconst isCustomFluid = typeof fontSize.fluid === 'object';\n\n\tconst handleNameChange = ( value ) => {\n\t\tupdateFontSize( 'name', value );\n\t};\n\n\tconst handleFontSizeChange = ( value ) => {\n\t\tupdateFontSize( 'size', value );\n\t};\n\n\tconst handleFluidChange = ( value ) => {\n\t\tupdateFontSize( 'fluid', value );\n\t};\n\n\tconst handleCustomFluidValues = ( value ) => {\n\t\tif ( value ) {\n\t\t\t// If custom values are used, init the values with the current ones.\n\t\t\tupdateFontSize( 'fluid', {\n\t\t\t\tmin: fontSize.size,\n\t\t\t\tmax: fontSize.size,\n\t\t\t} );\n\t\t} else {\n\t\t\t// If custom fluid values are disabled, set fluid to true.\n\t\t\tupdateFontSize( 'fluid', true );\n\t\t}\n\t};\n\n\tconst handleMinChange = ( value ) => {\n\t\tupdateFontSize( 'fluid', { ...fontSize.fluid, min: value } );\n\t};\n\n\tconst handleMaxChange = ( value ) => {\n\t\tupdateFontSize( 'fluid', { ...fontSize.fluid, max: value } );\n\t};\n\n\tconst updateFontSize = ( key, value ) => {\n\t\tconst newFontSizes = sizes.map( ( size ) => {\n\t\t\tif ( size.slug === slug ) {\n\t\t\t\treturn { ...size, [ key ]: value }; // Create a new object with updated key\n\t\t\t}\n\t\t\treturn size;\n\t\t} );\n\n\t\tsetFontSizes( {\n\t\t\t...fontSizes,\n\t\t\t[ origin ]: newFontSizes,\n\t\t} );\n\t};\n\n\tconst handleRemoveFontSize = () => {\n\t\t// Navigate to the font sizes list.\n\t\tgoBack();\n\n\t\tconst newFontSizes = sizes.filter( ( size ) => size.slug !== slug );\n\t\tsetFontSizes( {\n\t\t\t...fontSizes,\n\t\t\t[ origin ]: newFontSizes,\n\t\t} );\n\t};\n\n\tconst toggleDeleteConfirm = () => {\n\t\tsetIsDeleteConfirmOpen( ! isDeleteConfirmOpen );\n\t};\n\n\tconst toggleRenameDialog = () => {\n\t\tsetIsRenameDialogOpen( ! isRenameDialogOpen );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ConfirmDeleteFontSizeDialog\n\t\t\t\tfontSize={ fontSize }\n\t\t\t\tisOpen={ isDeleteConfirmOpen }\n\t\t\t\ttoggleOpen={ toggleDeleteConfirm }\n\t\t\t\thandleRemoveFontSize={ handleRemoveFontSize }\n\t\t\t/>\n\n\t\t\t{ isRenameDialogOpen && (\n\t\t\t\t<RenameFontSizeDialog\n\t\t\t\t\tfontSize={ fontSize }\n\t\t\t\t\ttoggleOpen={ toggleRenameDialog }\n\t\t\t\t\thandleRename={ handleNameChange }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<HStack justify=\"space-between\" align=\"flex-start\">\n\t\t\t\t\t<ScreenHeader\n\t\t\t\t\t\ttitle={ fontSize.name }\n\t\t\t\t\t\tdescription={ sprintf(\n\t\t\t\t\t\t\t/* translators: %s: font size preset name. */\n\t\t\t\t\t\t\t__( 'Manage the font size %s.' ),\n\t\t\t\t\t\t\tfontSize.name\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonBack={ () => goTo( '/typography/font-sizes/' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t{ origin === 'custom' && (\n\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\t\tmarginTop={ 3 }\n\t\t\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\t\t\tpaddingX={ 4 }\n\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\t\ttrigger={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Font size options' ) }\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\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ toggleRenameDialog }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\t\tonClick={ toggleDeleteConfirm }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\n\t\t\t\t<View>\n\t\t\t\t\t<Spacer paddingX={ 4 }>\n\t\t\t\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<FontSizePreview fontSize={ fontSize } />\n\t\t\t\t\t\t\t</FlexItem>\n\n\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Size' ) }\n\t\t\t\t\t\t\t\tvalue={ ! isCustomFluid ? fontSize.size : '' }\n\t\t\t\t\t\t\t\tonChange={ handleFontSizeChange }\n\t\t\t\t\t\t\t\tdisabled={ isCustomFluid }\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Fluid typography' ) }\n\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t'Scale the font size dynamically to fit the screen or viewport.'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tchecked={ isFluid }\n\t\t\t\t\t\t\t\tonChange={ handleFluidChange }\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t{ isFluid && (\n\t\t\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Custom fluid values' ) }\n\t\t\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t\t\t'Set custom min and max values for the fluid font size.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tchecked={ isCustomFluid }\n\t\t\t\t\t\t\t\t\tonChange={ handleCustomFluidValues }\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t\t{ isCustomFluid && (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Minimum' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ fontSize.fluid?.min }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleMinChange }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<SizeControl\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Maximum' ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ fontSize.fluid?.max }\n\t\t\t\t\t\t\t\t\t\tonChange={ handleMaxChange }\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</VStack>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</View>\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nexport default FontSize;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plus = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z\" />\n\t</SVG>\n);\n\nexport default plus;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nfunction ConfirmResetFontSizesDialog( {\n\ttext,\n\tconfirmButtonText,\n\tisOpen,\n\ttoggleOpen,\n\tonConfirm,\n} ) {\n\tconst handleConfirm = async () => {\n\t\ttoggleOpen();\n\t\tonConfirm();\n\t};\n\n\tconst handleCancel = () => {\n\t\ttoggleOpen();\n\t};\n\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen={ isOpen }\n\t\t\tcancelButtonText={ __( 'Cancel' ) }\n\t\t\tconfirmButtonText={ confirmButtonText }\n\t\t\tonCancel={ handleCancel }\n\t\t\tonConfirm={ handleConfirm }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ text }\n\t\t</ConfirmDialog>\n\t);\n}\n\nexport default ConfirmResetFontSizesDialog;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { __, sprintf, isRTL } from '@wordpress/i18n';\nimport {\n\tprivateApis as componentsPrivateApis,\n\t__experimentalSpacer as Spacer,\n\t__experimentalView as View,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n\tFlexBlock,\n\tButton,\n} from '@wordpress/components';\nimport {\n\tIcon,\n\tplus,\n\tmoreVertical,\n\tchevronLeft,\n\tchevronRight,\n} from '@wordpress/icons';\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n} = unlock( componentsPrivateApis );\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nimport Subtitle from '../subtitle';\nimport { NavigationButtonAsItem } from '../navigation-button';\nimport { getNewIndexFromPresets } from '../utils';\nimport ScreenHeader from '../header';\nimport ConfirmResetFontSizesDialog from './confirm-reset-font-sizes-dialog';\n\nfunction FontSizeGroup( {\n\tlabel,\n\torigin,\n\tsizes,\n\thandleAddFontSize,\n\thandleResetFontSizes,\n} ) {\n\tconst [ isResetDialogOpen, setIsResetDialogOpen ] = useState( false );\n\n\tconst toggleResetDialog = () => setIsResetDialogOpen( ! isResetDialogOpen );\n\n\tconst resetDialogText =\n\t\torigin === 'custom'\n\t\t\t? __(\n\t\t\t\t\t'Are you sure you want to remove all custom font size presets?'\n\t\t\t )\n\t\t\t: __(\n\t\t\t\t\t'Are you sure you want to reset all font size presets to their default values?'\n\t\t\t );\n\n\treturn (\n\t\t<>\n\t\t\t{ isResetDialogOpen && (\n\t\t\t\t<ConfirmResetFontSizesDialog\n\t\t\t\t\ttext={ resetDialogText }\n\t\t\t\t\tconfirmButtonText={\n\t\t\t\t\t\torigin === 'custom' ? __( 'Remove' ) : __( 'Reset' )\n\t\t\t\t\t}\n\t\t\t\t\tisOpen={ isResetDialogOpen }\n\t\t\t\t\ttoggleOpen={ toggleResetDialog }\n\t\t\t\t\tonConfirm={ handleResetFontSizes }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<VStack spacing={ 4 }>\n\t\t\t\t<HStack justify=\"space-between\" align=\"center\">\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t{ origin === 'custom' && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tlabel={ __( 'Add font size' ) }\n\t\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\tonClick={ handleAddFontSize }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ !! handleResetFontSizes && (\n\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\tlabel={ __(\n\t\t\t\t\t\t\t\t\t\t\t'Font size presets options'\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\t\t<DropdownMenuItem onClick={ toggleResetDialog }>\n\t\t\t\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ origin === 'custom'\n\t\t\t\t\t\t\t\t\t\t\t? __( 'Remove font size presets' )\n\t\t\t\t\t\t\t\t\t\t\t: __( 'Reset font size presets' ) }\n\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</FlexItem>\n\t\t\t\t</HStack>\n\n\t\t\t\t{ !! sizes.length && (\n\t\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t\t{ sizes.map( ( size ) => (\n\t\t\t\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\t\t\t\tkey={ size.slug }\n\t\t\t\t\t\t\t\tpath={ `/typography/font-sizes/${ origin }/${ size.slug }` }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t\t\t\t<FlexItem className=\"edit-site-font-size__item\">\n\t\t\t\t\t\t\t\t\t\t{ size.name }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t\t\t<HStack justify=\"flex-end\">\n\t\t\t\t\t\t\t\t\t\t\t<FlexBlock className=\"edit-site-font-size__item edit-site-font-size__item-value\">\n\t\t\t\t\t\t\t\t\t\t\t\t{ size.size }\n\t\t\t\t\t\t\t\t\t\t\t</FlexBlock>\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\tisRTL()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t? chevronLeft\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: chevronRight\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</HStack>\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t\t</NavigationButtonAsItem>\n\t\t\t\t\t\t) ) }\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</>\n\t);\n}\n\nfunction FontSizes() {\n\tconst [ themeFontSizes, setThemeFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes.theme'\n\t);\n\n\tconst [ baseThemeFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes.theme',\n\t\tnull,\n\t\t'base'\n\t);\n\tconst [ defaultFontSizes, setDefaultFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes.default'\n\t);\n\n\tconst [ baseDefaultFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes.default',\n\t\tnull,\n\t\t'base'\n\t);\n\n\tconst [ customFontSizes = [], setCustomFontSizes ] = useGlobalSetting(\n\t\t'typography.fontSizes.custom'\n\t);\n\n\tconst [ defaultFontSizesEnabled ] = useGlobalSetting(\n\t\t'typography.defaultFontSizes'\n\t);\n\n\tconst handleAddFontSize = () => {\n\t\tconst index = getNewIndexFromPresets( customFontSizes, 'custom-' );\n\t\tconst newFontSize = {\n\t\t\t/* translators: %d: font size index */\n\t\t\tname: sprintf( __( 'New Font Size %d' ), index ),\n\t\t\tsize: '16px',\n\t\t\tslug: `custom-${ index }`,\n\t\t};\n\n\t\tsetCustomFontSizes( [ ...customFontSizes, newFontSize ] );\n\t};\n\n\tconst hasSameSizeValues = ( arr1, arr2 ) =>\n\t\tarr1.map( ( item ) => item.size ).join( '' ) ===\n\t\tarr2.map( ( item ) => item.size ).join( '' );\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Font size presets' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Create and edit the presets used for font sizes across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<View>\n\t\t\t\t<Spacer paddingX={ 4 }>\n\t\t\t\t\t<VStack spacing={ 8 }>\n\t\t\t\t\t\t{ !! themeFontSizes?.length && (\n\t\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\t\torigin=\"theme\"\n\t\t\t\t\t\t\t\tsizes={ themeFontSizes }\n\t\t\t\t\t\t\t\tbaseSizes={ baseThemeFontSizes }\n\t\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\t\thasSameSizeValues(\n\t\t\t\t\t\t\t\t\t\tthemeFontSizes,\n\t\t\t\t\t\t\t\t\t\tbaseThemeFontSizes\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t? null\n\t\t\t\t\t\t\t\t\t\t: () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetThemeFontSizes(\n\t\t\t\t\t\t\t\t\t\t\t\t\tbaseThemeFontSizes\n\t\t\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\n\t\t\t\t\t\t{ defaultFontSizesEnabled &&\n\t\t\t\t\t\t\t!! defaultFontSizes?.length && (\n\t\t\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\t\t\torigin=\"default\"\n\t\t\t\t\t\t\t\t\tsizes={ defaultFontSizes }\n\t\t\t\t\t\t\t\t\tbaseSizes={ baseDefaultFontSizes }\n\t\t\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\t\t\thasSameSizeValues(\n\t\t\t\t\t\t\t\t\t\t\tdefaultFontSizes,\n\t\t\t\t\t\t\t\t\t\t\tbaseDefaultFontSizes\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t? null\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\tsetDefaultFontSizes(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbaseDefaultFontSizes\n\t\t\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/>\n\t\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<FontSizeGroup\n\t\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\t\torigin=\"custom\"\n\t\t\t\t\t\t\tsizes={ customFontSizes }\n\t\t\t\t\t\t\thandleAddFontSize={ handleAddFontSize }\n\t\t\t\t\t\t\thandleResetFontSizes={\n\t\t\t\t\t\t\t\tcustomFontSizes.length > 0\n\t\t\t\t\t\t\t\t\t? () => setCustomFontSizes( [] )\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t</Spacer>\n\t\t\t</View>\n\t\t</VStack>\n\t);\n}\n\nexport default FontSizes;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst shuffle = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/SVG\">\n\t\t<Path d=\"M17.192 6.75L15.47 5.03l1.06-1.06 3.537 3.53-3.537 3.53-1.06-1.06 1.723-1.72h-3.19c-.602 0-.993.202-1.28.498-.309.319-.538.792-.695 1.383-.13.488-.222 1.023-.296 1.508-.034.664-.116 1.413-.303 2.117-.193.721-.513 1.467-1.068 2.04-.575.594-1.359.954-2.357.954H4v-1.5h4.003c.601 0 .993-.202 1.28-.498.308-.319.538-.792.695-1.383.149-.557.216-1.093.288-1.662l.039-.31a9.653 9.653 0 0 1 .272-1.653c.193-.722.513-1.467 1.067-2.04.576-.594 1.36-.954 2.358-.954h3.19zM8.004 6.75c.8 0 1.46.23 1.988.628a6.24 6.24 0 0 0-.684 1.396 1.725 1.725 0 0 0-.024-.026c-.287-.296-.679-.498-1.28-.498H4v-1.5h4.003zM12.699 14.726c-.161.459-.38.94-.684 1.396.527.397 1.188.628 1.988.628h3.19l-1.722 1.72 1.06 1.06L20.067 16l-3.537-3.53-1.06 1.06 1.723 1.72h-3.19c-.602 0-.993-.202-1.28-.498a1.96 1.96 0 0 1-.024-.026z\" />\n\t</SVG>\n);\n\nexport default shuffle;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Flex } from '@wordpress/components';\n\nfunction ColorIndicatorWrapper( { className, ...props } ) {\n\treturn (\n\t\t<Flex\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-global-styles__color-indicator-wrapper',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default ColorIndicatorWrapper;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tFlexItem,\n\t__experimentalHStack as HStack,\n\t__experimentalZStack as ZStack,\n\t__experimentalVStack as VStack,\n\tColorIndicator,\n\tButton,\n} from '@wordpress/components';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { Icon, shuffle, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport { useColorRandomizer } from './hooks';\nimport ColorIndicatorWrapper from './color-indicator-wrapper';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nconst EMPTY_COLORS = [];\n\nfunction Palette( { name } ) {\n\tconst [ customColors ] = useGlobalSetting( 'color.palette.custom' );\n\tconst [ themeColors ] = useGlobalSetting( 'color.palette.theme' );\n\tconst [ defaultColors ] = useGlobalSetting( 'color.palette.default' );\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\n\tconst [ randomizeThemeColors ] = useColorRandomizer();\n\n\tconst colors = useMemo(\n\t\t() => [\n\t\t\t...( customColors || EMPTY_COLORS ),\n\t\t\t...( themeColors || EMPTY_COLORS ),\n\t\t\t...( defaultColors && defaultPaletteEnabled\n\t\t\t\t? defaultColors\n\t\t\t\t: EMPTY_COLORS ),\n\t\t],\n\t\t[ customColors, themeColors, defaultColors, defaultPaletteEnabled ]\n\t);\n\n\tconst screenPath = ! name\n\t\t? '/colors/palette'\n\t\t: '/blocks/' + encodeURIComponent( name ) + '/colors/palette';\n\tconst paletteButtonText =\n\t\tcolors.length > 0 ? __( 'Edit palette' ) : __( 'Add colors' );\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t<Subtitle level={ 3 }>{ __( 'Palette' ) }</Subtitle>\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t<NavigationButtonAsItem\n\t\t\t\t\tpath={ screenPath }\n\t\t\t\t\taria-label={ paletteButtonText }\n\t\t\t\t>\n\t\t\t\t\t<HStack direction=\"row\">\n\t\t\t\t\t\t{ colors.length <= 0 && (\n\t\t\t\t\t\t\t<FlexItem>{ __( 'Add colors' ) }</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<ZStack isLayered={ false } offset={ -8 }>\n\t\t\t\t\t\t\t{ colors\n\t\t\t\t\t\t\t\t.slice( 0, 5 )\n\t\t\t\t\t\t\t\t.map( ( { color }, index ) => (\n\t\t\t\t\t\t\t\t\t<ColorIndicatorWrapper\n\t\t\t\t\t\t\t\t\t\tkey={ `${ color }-${ index }` }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<ColorIndicator colorValue={ color } />\n\t\t\t\t\t\t\t\t\t</ColorIndicatorWrapper>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</ZStack>\n\t\t\t\t\t\t<Icon icon={ isRTL() ? chevronLeft : chevronRight } />\n\t\t\t\t\t</HStack>\n\t\t\t\t</NavigationButtonAsItem>\n\t\t\t</ItemGroup>\n\t\t\t{ window.__experimentalEnableColorRandomizer &&\n\t\t\t\tthemeColors?.length > 0 && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\ticon={ shuffle }\n\t\t\t\t\t\tonClick={ randomizeThemeColors }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Randomize colors' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default Palette;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport Palette from './palette';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tColorPanel: StylesColorPanel,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenColors() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Colors' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Palette colors and the application of those colors on site elements.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack spacing={ 7 }>\n\t\t\t\t\t<Palette />\n\t\t\t\t\t<StylesColorPanel\n\t\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t\t\tvalue={ style }\n\t\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenColors;\n","/**\n * Internal dependencies\n */\nimport { useStylesPreviewColors } from './hooks';\n\nexport default function PresetColors() {\n\tconst { paletteColors } = useStylesPreviewColors();\n\treturn paletteColors.slice( 0, 5 ).map( ( { slug, color }, index ) => (\n\t\t<div\n\t\t\tkey={ `${ slug }-${ index }` }\n\t\t\tstyle={ {\n\t\t\t\tflexGrow: 1,\n\t\t\t\theight: '100%',\n\t\t\t\tbackground: color,\n\t\t\t} }\n\t\t/>\n\t) );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__unstableMotion as motion,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport PresetColors from './preset-colors';\nimport PreviewIframe from './preview-iframe';\n\nconst firstFrameVariants = {\n\tstart: {\n\t\tscale: 1,\n\t\topacity: 1,\n\t},\n\thover: {\n\t\tscale: 0,\n\t\topacity: 0,\n\t},\n};\n\nconst StylesPreviewColors = ( { label, isFocused, withHoverView } ) => {\n\treturn (\n\t\t<PreviewIframe\n\t\t\tlabel={ label }\n\t\t\tisFocused={ isFocused }\n\t\t\twithHoverView={ withHoverView }\n\t\t>\n\t\t\t{ ( { key } ) => (\n\t\t\t\t<motion.div\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvariants={ firstFrameVariants }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 0 }\n\t\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<PresetColors />\n\t\t\t\t\t</HStack>\n\t\t\t\t</motion.div>\n\t\t\t) }\n\t\t</PreviewIframe>\n\t);\n};\n\nexport default StylesPreviewColors;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport StylesPreviewColors from '../preview-colors';\nimport { useCurrentMergeThemeStyleVariationsWithUserConfig } from '../../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport Subtitle from '../subtitle';\nimport Variation from './variation';\n\nexport default function ColorVariations( { title, gap = 2 } ) {\n\tconst propertiesToFilter = [ 'color' ];\n\tconst colorVariations =\n\t\tuseCurrentMergeThemeStyleVariationsWithUserConfig( propertiesToFilter );\n\n\t// Return null if there is only one variation (the default).\n\tif ( colorVariations?.length <= 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack spacing={ 3 }>\n\t\t\t{ title && <Subtitle level={ 3 }>{ title }</Subtitle> }\n\t\t\t<Grid spacing={ gap }>\n\t\t\t\t{ colorVariations.map( ( variation, index ) => (\n\t\t\t\t\t<Variation\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\tisPill\n\t\t\t\t\t\tproperties={ propertiesToFilter }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t>\n\t\t\t\t\t\t{ () => <StylesPreviewColors /> }\n\t\t\t\t\t</Variation>\n\t\t\t\t) ) }\n\t\t\t</Grid>\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ColorVariations from './variations/variations-color';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nexport default function ColorPalettePanel( { name } ) {\n\tconst [ themeColors, setThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname\n\t);\n\tconst [ baseThemeColors ] = useGlobalSetting(\n\t\t'color.palette.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultColors, setDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname\n\t);\n\tconst [ baseDefaultColors ] = useGlobalSetting(\n\t\t'color.palette.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customColors, setCustomColors ] = useGlobalSetting(\n\t\t'color.palette.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultPalette',\n\t\tname\n\t);\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-color-palette-panel\"\n\t\t\tspacing={ 8 }\n\t\t>\n\t\t\t{ !! themeColors && !! themeColors.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeColors !== baseThemeColors }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tcolors={ themeColors }\n\t\t\t\t\tonChange={ setThemeColors }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultColors &&\n\t\t\t\t!! defaultColors.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultColors !== baseDefaultColors }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tcolors={ defaultColors }\n\t\t\t\t\t\tonChange={ setDefaultColors }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tcolors={ customColors }\n\t\t\t\tonChange={ setCustomColors }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t<ColorVariations title={ __( 'Palettes' ) } />\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\t__experimentalVStack as VStack,\n\t__experimentalPaletteEdit as PaletteEdit,\n\t__experimentalSpacer as Spacer,\n\tDuotonePicker,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport Subtitle from './subtitle';\nimport { unlock } from '../../lock-unlock';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst mobilePopoverProps = { placement: 'bottom-start', offset: 8 };\n\nconst noop = () => {};\n\nexport default function GradientPalettePanel( { name } ) {\n\tconst [ themeGradients, setThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname\n\t);\n\tconst [ baseThemeGradients ] = useGlobalSetting(\n\t\t'color.gradients.theme',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ defaultGradients, setDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname\n\t);\n\tconst [ baseDefaultGradients ] = useGlobalSetting(\n\t\t'color.gradients.default',\n\t\tname,\n\t\t'base'\n\t);\n\tconst [ customGradients, setCustomGradients ] = useGlobalSetting(\n\t\t'color.gradients.custom',\n\t\tname\n\t);\n\n\tconst [ defaultPaletteEnabled ] = useGlobalSetting(\n\t\t'color.defaultGradients',\n\t\tname\n\t);\n\n\tconst [ customDuotone ] = useGlobalSetting( 'color.duotone.custom' ) || [];\n\tconst [ defaultDuotone ] =\n\t\tuseGlobalSetting( 'color.duotone.default' ) || [];\n\tconst [ themeDuotone ] = useGlobalSetting( 'color.duotone.theme' ) || [];\n\tconst [ defaultDuotoneEnabled ] = useGlobalSetting(\n\t\t'color.defaultDuotone'\n\t);\n\n\tconst duotonePalette = [\n\t\t...( customDuotone || [] ),\n\t\t...( themeDuotone || [] ),\n\t\t...( defaultDuotone && defaultDuotoneEnabled ? defaultDuotone : [] ),\n\t];\n\n\tconst isMobileViewport = useViewportMatch( 'small', '<' );\n\tconst popoverProps = isMobileViewport ? mobilePopoverProps : undefined;\n\n\treturn (\n\t\t<VStack\n\t\t\tclassName=\"edit-site-global-styles-gradient-palette-panel\"\n\t\t\tspacing={ 8 }\n\t\t>\n\t\t\t{ !! themeGradients && !! themeGradients.length && (\n\t\t\t\t<PaletteEdit\n\t\t\t\t\tcanReset={ themeGradients !== baseThemeGradients }\n\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\tgradients={ themeGradients }\n\t\t\t\t\tonChange={ setThemeGradients }\n\t\t\t\t\tpaletteLabel={ __( 'Theme' ) }\n\t\t\t\t\tpaletteLabelHeadingLevel={ 3 }\n\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! defaultGradients &&\n\t\t\t\t!! defaultGradients.length &&\n\t\t\t\t!! defaultPaletteEnabled && (\n\t\t\t\t\t<PaletteEdit\n\t\t\t\t\t\tcanReset={ defaultGradients !== baseDefaultGradients }\n\t\t\t\t\t\tcanOnlyChangeValues\n\t\t\t\t\t\tgradients={ defaultGradients }\n\t\t\t\t\t\tonChange={ setDefaultGradients }\n\t\t\t\t\t\tpaletteLabel={ __( 'Default' ) }\n\t\t\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t<PaletteEdit\n\t\t\t\tgradients={ customGradients }\n\t\t\t\tonChange={ setCustomGradients }\n\t\t\t\tpaletteLabel={ __( 'Custom' ) }\n\t\t\t\tpaletteLabelLevel={ 3 }\n\t\t\t\tslugPrefix=\"custom-\"\n\t\t\t\tpopoverProps={ popoverProps }\n\t\t\t/>\n\t\t\t{ !! duotonePalette && !! duotonePalette.length && (\n\t\t\t\t<div>\n\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Duotone' ) }</Subtitle>\n\t\t\t\t\t<Spacer margin={ 3 } />\n\t\t\t\t\t<DuotonePicker\n\t\t\t\t\t\tduotonePalette={ duotonePalette }\n\t\t\t\t\t\tdisableCustomDuotone\n\t\t\t\t\t\tdisableCustomColors\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tonChange={ noop }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as componentsPrivateApis } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport ColorPalettePanel from './color-palette-panel';\nimport GradientPalettePanel from './gradients-palette-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { Tabs } = unlock( componentsPrivateApis );\n\nfunction ScreenColorPalette( { name } ) {\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Edit palette' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'The combination of colors used across the site and in color pickers.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<Tabs>\n\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t<Tabs.Tab tabId=\"color\">{ __( 'Color' ) }</Tabs.Tab>\n\t\t\t\t\t<Tabs.Tab tabId=\"gradient\">{ __( 'Gradient' ) }</Tabs.Tab>\n\t\t\t\t</Tabs.TabList>\n\t\t\t\t<Tabs.TabPanel tabId=\"color\" focusable={ false }>\n\t\t\t\t\t<ColorPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t<Tabs.TabPanel tabId=\"gradient\" focusable={ false }>\n\t\t\t\t\t<GradientPalettePanel name={ name } />\n\t\t\t\t</Tabs.TabPanel>\n\t\t\t</Tabs>\n\t\t</>\n\t);\n}\n\nexport default ScreenColorPalette;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalItemGroup as ItemGroup,\n\tButton,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { plus, shadow as shadowIcon } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport { NavigationButtonAsItem } from './navigation-button';\nimport ScreenHeader from './header';\nimport { getNewIndexFromPresets } from './utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\n\nexport const defaultShadow = '6px 6px 9px rgba(0, 0, 0, 0.2)';\n\nexport default function ShadowsPanel() {\n\tconst [ defaultShadows ] = useGlobalSetting( 'shadow.presets.default' );\n\tconst [ defaultShadowsEnabled ] = useGlobalSetting(\n\t\t'shadow.defaultPresets'\n\t);\n\tconst [ themeShadows ] = useGlobalSetting( 'shadow.presets.theme' );\n\tconst [ customShadows, setCustomShadows ] = useGlobalSetting(\n\t\t'shadow.presets.custom'\n\t);\n\n\tconst onCreateShadow = ( shadow ) => {\n\t\tsetCustomShadows( [ ...( customShadows || [] ), shadow ] );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Shadows' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Manage and create shadow styles for use across the site.'\n\t\t\t\t) }\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel\"\n\t\t\t\t\tspacing={ 7 }\n\t\t\t\t>\n\t\t\t\t\t{ defaultShadowsEnabled && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Default' ) }\n\t\t\t\t\t\t\tshadows={ defaultShadows || [] }\n\t\t\t\t\t\t\tcategory=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ themeShadows && themeShadows.length > 0 && (\n\t\t\t\t\t\t<ShadowList\n\t\t\t\t\t\t\tlabel={ __( 'Theme' ) }\n\t\t\t\t\t\t\tshadows={ themeShadows || [] }\n\t\t\t\t\t\t\tcategory=\"theme\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<ShadowList\n\t\t\t\t\t\tlabel={ __( 'Custom' ) }\n\t\t\t\t\t\tshadows={ customShadows || [] }\n\t\t\t\t\t\tcategory=\"custom\"\n\t\t\t\t\t\tcanCreate\n\t\t\t\t\t\tonCreate={ onCreateShadow }\n\t\t\t\t\t/>\n\t\t\t\t</VStack>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nfunction ShadowList( { label, shadows, category, canCreate, onCreate } ) {\n\tconst handleAddShadow = () => {\n\t\tconst newIndex = getNewIndexFromPresets( shadows, 'shadow-' );\n\t\tonCreate( {\n\t\t\tname: sprintf(\n\t\t\t\t/* translators: %s: is an index for a preset */\n\t\t\t\t__( 'Shadow %s' ),\n\t\t\t\tnewIndex\n\t\t\t),\n\t\t\tshadow: defaultShadow,\n\t\t\tslug: `shadow-${ newIndex }`,\n\t\t} );\n\t};\n\n\treturn (\n\t\t<VStack spacing={ 2 }>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Flex\n\t\t\t\t\talign=\"center\"\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t>\n\t\t\t\t\t<Subtitle level={ 3 }>{ label }</Subtitle>\n\t\t\t\t</Flex>\n\t\t\t\t{ canCreate && (\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thandleAddShadow();\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) }\n\t\t\t</HStack>\n\t\t\t{ shadows.length > 0 && (\n\t\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t\t{ shadows.map( ( shadow ) => (\n\t\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\t\tkey={ shadow.slug }\n\t\t\t\t\t\t\tshadow={ shadow }\n\t\t\t\t\t\t\tcategory={ category }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</ItemGroup>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nfunction ShadowItem( { shadow, category } ) {\n\treturn (\n\t\t<NavigationButtonAsItem\n\t\t\tpath={ `/shadows/edit/${ category }/${ shadow.slug }` }\n\t\t\taria-label={\n\t\t\t\t// translators: %s: name of the shadow\n\t\t\t\tsprintf( 'Edit shadow %s', shadow.name )\n\t\t\t}\n\t\t\ticon={ shadowIcon }\n\t\t>\n\t\t\t{ shadow.name }\n\t\t</NavigationButtonAsItem>\n\t);\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 settings = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z\" />\n\t\t<Path d=\"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z\" />\n\t</SVG>\n);\n\nexport default settings;\n","export const CUSTOM_VALUE_SETTINGS = {\n\tpx: { max: 20, step: 1 },\n\t'%': { max: 100, step: 1 },\n\tvw: { max: 100, step: 1 },\n\tvh: { max: 100, step: 1 },\n\tem: { max: 10, step: 0.1 },\n\trm: { max: 10, step: 0.1 },\n\tsvw: { max: 100, step: 1 },\n\tlvw: { max: 100, step: 1 },\n\tdvw: { max: 100, step: 1 },\n\tsvh: { max: 100, step: 1 },\n\tlvh: { max: 100, step: 1 },\n\tdvh: { max: 100, step: 1 },\n\tvi: { max: 100, step: 1 },\n\tsvi: { max: 100, step: 1 },\n\tlvi: { max: 100, step: 1 },\n\tdvi: { max: 100, step: 1 },\n\tvb: { max: 100, step: 1 },\n\tsvb: { max: 100, step: 1 },\n\tlvb: { max: 100, step: 1 },\n\tdvb: { max: 100, step: 1 },\n\tvmin: { max: 100, step: 1 },\n\tsvmin: { max: 100, step: 1 },\n\tlvmin: { max: 100, step: 1 },\n\tdvmin: { max: 100, step: 1 },\n\tvmax: { max: 100, step: 1 },\n\tsvmax: { max: 100, step: 1 },\n\tlvmax: { max: 100, step: 1 },\n\tdvmax: { max: 100, step: 1 },\n};\n\nexport function getShadowParts( shadow ) {\n\tconst shadowValues = shadow.match( /(?:[^,(]|\\([^)]*\\))+/g ) || [];\n\treturn shadowValues.map( ( value ) => value.trim() );\n}\n\nexport function shadowStringToObject( shadowValue ) {\n\t/*\n\t * Shadow spec: https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow\n\t * Shadow string format: <offset-x> <offset-y> <blur-radius> <spread-radius> <color> [inset]\n\t *\n\t * A shadow to be valid it must satisfy the following.\n\t *\n\t * 1. Should not contain \"none\" keyword.\n\t * 2. Values x, y, blur, spread should be in the order. Color and inset can be anywhere in the string except in between x, y, blur, spread values.\n\t * 3. Should not contain more than one set of x, y, blur, spread values.\n\t * 4. Should contain at least x and y values. Others are optional.\n\t * 5. Should not contain more than one \"inset\" (case insensitive) keyword.\n\t * 6. Should not contain more than one color value.\n\t */\n\n\tconst defaultShadow = {\n\t\tx: '0',\n\t\ty: '0',\n\t\tblur: '0',\n\t\tspread: '0',\n\t\tcolor: '#000',\n\t\tinset: false,\n\t};\n\n\tif ( ! shadowValue ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 1: Should not contain \"none\" keyword.\n\t// if the shadow has \"none\" keyword, it is not a valid shadow string\n\tif ( shadowValue.includes( 'none' ) ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 2: Values x, y, blur, spread should be in the order.\n\t//\t\t Color and inset can be anywhere in the string except in between x, y, blur, spread values.\n\t// Extract length values (x, y, blur, spread) from shadow string\n\t// Regex match groups of 1 to 4 length values.\n\tconst lengthsRegex =\n\t\t/((?:^|\\s+)(-?\\d*\\.?\\d+(?:px|%|in|cm|mm|em|rem|ex|pt|pc|vh|vw|vmin|vmax|ch|lh)?)(?=\\s|$)(?![^(]*\\))){1,4}/g;\n\tconst matches = shadowValue.match( lengthsRegex ) || [];\n\n\t// Rule 3: Should not contain more than one set of x, y, blur, spread values.\n\t// if the string doesn't contain exactly 1 set of x, y, blur, spread values,\n\t// it is not a valid shadow string\n\tif ( matches.length !== 1 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Extract length values (x, y, blur, spread) from shadow string\n\tconst lengths = matches[ 0 ]\n\t\t.split( ' ' )\n\t\t.map( ( value ) => value.trim() )\n\t\t.filter( ( value ) => value );\n\n\t// Rule 4: Should contain at least x and y values. Others are optional.\n\tif ( lengths.length < 2 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Rule 5: Should not contain more than one \"inset\" (case insensitive) keyword.\n\t// check if the shadow string contains \"inset\" keyword\n\tconst insets = shadowValue.match( /inset/gi ) || [];\n\tif ( insets.length > 1 ) {\n\t\treturn defaultShadow;\n\t}\n\n\t// Strip lengths and inset from shadow string, leaving just color.\n\tconst hasInset = insets.length === 1;\n\tlet colorString = shadowValue.replace( lengthsRegex, '' ).trim();\n\tif ( hasInset ) {\n\t\tcolorString = colorString\n\t\t\t.replace( 'inset', '' )\n\t\t\t.replace( 'INSET', '' )\n\t\t\t.trim();\n\t}\n\n\t// Rule 6: Should not contain more than one color value.\n\t// validate color string with regular expression\n\t// check if color has matching hex, rgb or hsl values\n\tconst colorRegex =\n\t\t/^#([0-9a-f]{3}){1,2}$|^#([0-9a-f]{4}){1,2}$|^(?:rgb|hsl)a?\\(?[\\d*\\.?\\d+%?,?\\/?\\s]*\\)$/gi;\n\tlet colorMatches = ( colorString.match( colorRegex ) || [] )\n\t\t.map( ( value ) => value?.trim() )\n\t\t.filter( ( value ) => value );\n\n\t// If color string has more than one color values, it is not a valid\n\tif ( colorMatches.length > 1 ) {\n\t\treturn defaultShadow;\n\t} else if ( colorMatches.length === 0 ) {\n\t\t// check if color string has multiple named color values separated by space\n\t\tcolorMatches = colorString\n\t\t\t.trim()\n\t\t\t.split( ' ' )\n\t\t\t.filter( ( value ) => value );\n\t\t// If color string has more than one color values, it is not a valid\n\t\tif ( colorMatches.length > 1 ) {\n\t\t\treturn defaultShadow;\n\t\t}\n\t}\n\n\t// Return parsed shadow object.\n\tconst [ x, y, blur, spread ] = lengths;\n\treturn {\n\t\tx,\n\t\ty,\n\t\tblur: blur || defaultShadow.blur,\n\t\tspread: spread || defaultShadow.spread,\n\t\tinset: hasInset,\n\t\tcolor: colorString || defaultShadow.color,\n\t};\n}\n\nexport function shadowObjectToString( shadowObj ) {\n\tconst shadowString = `${ shadowObj.x || '0px' } ${ shadowObj.y || '0px' } ${\n\t\tshadowObj.blur || '0px'\n\t} ${ shadowObj.spread || '0px' }`;\n\n\treturn `${ shadowObj.inset ? 'inset' : '' } ${ shadowString } ${\n\t\tshadowObj.color || ''\n\t}`.trim();\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\t__experimentalSpacer as Spacer,\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHeading as Heading,\n\t__experimentalInputControl as InputControl,\n\t__experimentalUnitControl as UnitControl,\n\t__experimentalParseQuantityAndUnitFromRawValue as parseQuantityAndUnitFromRawValue,\n\t__experimentalGrid as Grid,\n\t__experimentalDropdownContentWrapper as DropdownContentWrapper,\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalToggleGroupControl as ToggleGroupControl,\n\t__experimentalToggleGroupControlOption as ToggleGroupControlOption,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tDropdown,\n\tRangeControl,\n\tButton,\n\tFlex,\n\tFlexItem,\n\tColorPalette,\n\tModal,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport {\n\tplus,\n\tshadow as shadowIcon,\n\treset,\n\tsettings,\n\tmoreVertical,\n} from '@wordpress/icons';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Subtitle from './subtitle';\nimport ScreenHeader from './header';\nimport { defaultShadow } from './shadows-panel';\nimport {\n\tgetShadowParts,\n\tshadowStringToObject,\n\tshadowObjectToString,\n\tCUSTOM_VALUE_SETTINGS,\n} from './shadow-utils';\n\nconst { useGlobalSetting } = unlock( blockEditorPrivateApis );\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n} = unlock( componentsPrivateApis );\n\nconst customShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Rename' ),\n\t\taction: 'rename',\n\t},\n\t{\n\t\tlabel: __( 'Delete' ),\n\t\taction: 'delete',\n\t},\n];\n\nconst presetShadowMenuItems = [\n\t{\n\t\tlabel: __( 'Reset' ),\n\t\taction: 'reset',\n\t},\n];\n\nexport default function ShadowsEditPanel() {\n\tconst {\n\t\tparams: { category, slug },\n\t\tgoTo,\n\t} = useNavigator();\n\tconst [ shadows, setShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`\n\t);\n\tconst [ baseShadows ] = useGlobalSetting(\n\t\t`shadow.presets.${ category }`,\n\t\tundefined,\n\t\t'base'\n\t);\n\tconst [ selectedShadow, setSelectedShadow ] = useState( () =>\n\t\t( shadows || [] ).find( ( shadow ) => shadow.slug === slug )\n\t);\n\tconst baseSelectedShadow = useMemo(\n\t\t() => ( baseShadows || [] ).find( ( b ) => b.slug === slug ),\n\t\t[ baseShadows, slug ]\n\t);\n\tconst [ isConfirmDialogVisible, setIsConfirmDialogVisible ] =\n\t\tuseState( false );\n\tconst [ isRenameModalVisible, setIsRenameModalVisible ] = useState( false );\n\tconst [ shadowName, setShadowName ] = useState( selectedShadow.name );\n\n\tconst onShadowChange = ( shadow ) => {\n\t\tsetSelectedShadow( { ...selectedShadow, shadow } );\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, shadow } : s\n\t\t);\n\t\tsetShadows( updatedShadows );\n\t};\n\n\tconst onMenuClick = ( action ) => {\n\t\tif ( action === 'reset' ) {\n\t\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\t\ts.slug === slug ? baseSelectedShadow : s\n\t\t\t);\n\t\t\tsetSelectedShadow( baseSelectedShadow );\n\t\t\tsetShadows( updatedShadows );\n\t\t} else if ( action === 'delete' ) {\n\t\t\tsetIsConfirmDialogVisible( true );\n\t\t} else if ( action === 'rename' ) {\n\t\t\tsetIsRenameModalVisible( true );\n\t\t}\n\t};\n\n\tconst handleShadowDelete = () => {\n\t\tconst updatedShadows = shadows.filter( ( s ) => s.slug !== slug );\n\t\tsetShadows( updatedShadows );\n\t\tgoTo( `/shadows` );\n\t};\n\n\tconst handleShadowRename = ( newName ) => {\n\t\tif ( ! newName ) {\n\t\t\treturn;\n\t\t}\n\t\tconst updatedShadows = shadows.map( ( s ) =>\n\t\t\ts.slug === slug ? { ...selectedShadow, name: newName } : s\n\t\t);\n\t\tsetSelectedShadow( { ...selectedShadow, name: newName } );\n\t\tsetShadows( updatedShadows );\n\t};\n\n\treturn ! selectedShadow ? (\n\t\t<ScreenHeader title=\"\" />\n\t) : (\n\t\t<>\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<ScreenHeader title={ selectedShadow.name } />\n\t\t\t\t<FlexItem>\n\t\t\t\t\t<Spacer marginTop={ 2 } marginBottom={ 0 } paddingX={ 4 }>\n\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Menu' ) }\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{ ( category === 'custom'\n\t\t\t\t\t\t\t\t? customShadowMenuItems\n\t\t\t\t\t\t\t\t: presetShadowMenuItems\n\t\t\t\t\t\t\t).map( ( item ) => (\n\t\t\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\t\t\tkey={ item.action }\n\t\t\t\t\t\t\t\t\tonClick={ () => onMenuClick( item.action ) }\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\titem.action === 'reset' &&\n\t\t\t\t\t\t\t\t\t\tselectedShadow.shadow ===\n\t\t\t\t\t\t\t\t\t\t\tbaseSelectedShadow.shadow\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ item.label }\n\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t</Spacer>\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t<div className=\"edit-site-global-styles-screen\">\n\t\t\t\t<ShadowsPreview shadow={ selectedShadow.shadow } />\n\t\t\t\t<ShadowEditor\n\t\t\t\t\tshadow={ selectedShadow.shadow }\n\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t{ isConfirmDialogVisible && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen\n\t\t\t\t\tonConfirm={ () => {\n\t\t\t\t\t\thandleShadowDelete();\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tonCancel={ () => {\n\t\t\t\t\t\tsetIsConfirmDialogVisible( false );\n\t\t\t\t\t} }\n\t\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t// translators: %s: name of the shadow\n\t\t\t\t\t\t'Are you sure you want to delete \"%s\"?',\n\t\t\t\t\t\tselectedShadow.name\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t\t{ isRenameModalVisible && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => setIsRenameModalVisible( false ) }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<form\n\t\t\t\t\t\tonSubmit={ ( event ) => {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\thandleShadowRename( shadowName );\n\t\t\t\t\t\t\tsetIsRenameModalVisible( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<InputControl\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t\t\tplaceholder={ __( 'Shadow name' ) }\n\t\t\t\t\t\t\tvalue={ shadowName }\n\t\t\t\t\t\t\tonChange={ ( value ) => setShadowName( value ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Spacer marginBottom={ 6 } />\n\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\tclassName=\"block-editor-shadow-edit-modal__actions\"\n\t\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\tsetIsRenameModalVisible( false )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t</Flex>\n\t\t\t\t\t</form>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction ShadowsPreview( { shadow } ) {\n\tconst shadowStyle = {\n\t\tboxShadow: shadow,\n\t};\n\n\treturn (\n\t\t<Spacer marginBottom={ 4 } marginTop={ -2 }>\n\t\t\t<HStack\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-panel\"\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"edit-site-global-styles__shadow-preview-block\"\n\t\t\t\t\tstyle={ shadowStyle }\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</Spacer>\n\t);\n}\n\nfunction ShadowEditor( { shadow, onChange } ) {\n\tconst shadowParts = useMemo( () => getShadowParts( shadow ), [ shadow ] );\n\n\tconst onChangeShadowPart = ( index, part ) => {\n\t\tshadowParts[ index ] = part;\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\tconst onAddShadowPart = () => {\n\t\tshadowParts.push( defaultShadow );\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\tconst onRemoveShadowPart = ( index ) => {\n\t\tshadowParts.splice( index, 1 );\n\t\tonChange( shadowParts.join( ', ' ) );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t\t<Flex\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tclassName=\"edit-site-global-styles__shadows-panel__title\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Subtitle level={ 3 }>{ __( 'Shadows' ) }</Subtitle>\n\t\t\t\t\t</Flex>\n\t\t\t\t\t<FlexItem className=\"edit-site-global-styles__shadows-panel__options-container\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\ticon={ plus }\n\t\t\t\t\t\t\tlabel={ __( 'Add shadow' ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonAddShadowPart();\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</HStack>\n\t\t\t</VStack>\n\t\t\t<Spacer />\n\t\t\t<ItemGroup isBordered isSeparated>\n\t\t\t\t{ shadowParts.map( ( part, index ) => (\n\t\t\t\t\t<ShadowItem\n\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\tshadow={ part }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonChangeShadowPart( index, value )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcanRemove={ shadowParts.length > 1 }\n\t\t\t\t\t\tonRemove={ () => onRemoveShadowPart( index ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n\nfunction ShadowItem( { shadow, onChange, canRemove, onRemove } ) {\n\tconst popoverProps = {\n\t\tplacement: 'left-start',\n\t\toffset: 36,\n\t\tshift: true,\n\t};\n\tconst shadowObj = useMemo(\n\t\t() => shadowStringToObject( shadow ),\n\t\t[ shadow ]\n\t);\n\tconst onShadowChange = ( newShadow ) => {\n\t\tonChange( shadowObjectToString( newShadow ) );\n\t};\n\n\treturn (\n\t\t<Dropdown\n\t\t\tpopoverProps={ popoverProps }\n\t\t\tclassName=\"edit-site-global-styles__shadow-editor__dropdown\"\n\t\t\trenderToggle={ ( { onToggle, isOpen } ) => {\n\t\t\t\tconst toggleProps = {\n\t\t\t\t\tonClick: onToggle,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__dropdown-toggle',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\t'aria-expanded': isOpen,\n\t\t\t\t};\n\t\t\t\tconst removeButtonProps = {\n\t\t\t\t\tonClick: onRemove,\n\t\t\t\t\tclassName: clsx(\n\t\t\t\t\t\t'edit-site-global-styles__shadow-editor__remove-button',\n\t\t\t\t\t\t{ 'is-open': isOpen }\n\t\t\t\t\t),\n\t\t\t\t\tlabel: __( 'Remove shadow' ),\n\t\t\t\t};\n\n\t\t\t\treturn (\n\t\t\t\t\t<HStack align=\"center\" justify=\"flex-start\" spacing={ 0 }>\n\t\t\t\t\t\t<FlexItem style={ { flexGrow: 1 } }>\n\t\t\t\t\t\t\t<Button icon={ shadowIcon } { ...toggleProps }>\n\t\t\t\t\t\t\t\t{ shadowObj.inset\n\t\t\t\t\t\t\t\t\t? __( 'Inner shadow' )\n\t\t\t\t\t\t\t\t\t: __( 'Drop shadow' ) }\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t{ canRemove && (\n\t\t\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ reset }\n\t\t\t\t\t\t\t\t\t{ ...removeButtonProps }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</HStack>\n\t\t\t\t);\n\t\t\t} }\n\t\t\trenderContent={ () => (\n\t\t\t\t<DropdownContentWrapper paddingSize=\"none\">\n\t\t\t\t\t<div className=\"edit-site-global-styles__shadow-editor__dropdown-content\">\n\t\t\t\t\t\t<ShadowPopover\n\t\t\t\t\t\t\tshadowObj={ shadowObj }\n\t\t\t\t\t\t\tonChange={ onShadowChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</DropdownContentWrapper>\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nfunction ShadowPopover( { shadowObj, onChange } ) {\n\tconst __experimentalIsRenderedInSidebar = true;\n\tconst enableAlpha = true;\n\n\tconst onShadowChange = ( key, value ) => {\n\t\tconst newShadow = {\n\t\t\t...shadowObj,\n\t\t\t[ key ]: value,\n\t\t};\n\t\tonChange( newShadow );\n\t};\n\n\treturn (\n\t\t<div className=\"edit-site-global-styles__shadow-editor-panel\">\n\t\t\t<VStack spacing={ 2 }>\n\t\t\t\t<Heading level={ 5 }>{ __( 'Shadow' ) }</Heading>\n\t\t\t\t<div className=\"edit-site-global-styles__shadow-editor-color-palette\">\n\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\tclearable={ false }\n\t\t\t\t\t\tenableAlpha={ enableAlpha }\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ shadowObj.color }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonShadowChange( 'color', value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<ToggleGroupControl\n\t\t\t\t\tvalue={ shadowObj.inset ? 'inset' : 'outset' }\n\t\t\t\t\tisBlock\n\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\tonShadowChange( 'inset', value === 'inset' )\n\t\t\t\t\t}\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t>\n\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\tvalue=\"outset\"\n\t\t\t\t\t\tlabel={ __( 'Outset' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ToggleGroupControlOption\n\t\t\t\t\t\tvalue=\"inset\"\n\t\t\t\t\t\tlabel={ __( 'Inset' ) }\n\t\t\t\t\t/>\n\t\t\t\t</ToggleGroupControl>\n\t\t\t\t<Grid columns={ 2 } gap={ 4 }>\n\t\t\t\t\t<ShadowInputControl\n\t\t\t\t\t\tlabel={ __( 'X Position' ) }\n\t\t\t\t\t\tvalue={ shadowObj.x }\n\t\t\t\t\t\thasNegativeRange\n\t\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'x', value ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ShadowInputControl\n\t\t\t\t\t\tlabel={ __( 'Y Position' ) }\n\t\t\t\t\t\tvalue={ shadowObj.y }\n\t\t\t\t\t\thasNegativeRange\n\t\t\t\t\t\tonChange={ ( value ) => onShadowChange( 'y', value ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<ShadowInputControl\n\t\t\t\t\t\tlabel={ __( 'Blur' ) }\n\t\t\t\t\t\tvalue={ shadowObj.blur }\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonShadowChange( 'blur', value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t\t<ShadowInputControl\n\t\t\t\t\t\tlabel={ __( 'Spread' ) }\n\t\t\t\t\t\tvalue={ shadowObj.spread }\n\t\t\t\t\t\thasNegativeRange\n\t\t\t\t\t\tonChange={ ( value ) =>\n\t\t\t\t\t\t\tonShadowChange( 'spread', value )\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</Grid>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nfunction ShadowInputControl( { label, value, onChange, hasNegativeRange } ) {\n\tconst [ isCustomInput, setIsCustomInput ] = useState( false );\n\tconst [ parsedQuantity, parsedUnit ] =\n\t\tparseQuantityAndUnitFromRawValue( value );\n\n\tconst sliderOnChange = ( next ) => {\n\t\tonChange(\n\t\t\tnext !== undefined ? [ next, parsedUnit || 'px' ].join( '' ) : '0px'\n\t\t);\n\t};\n\tconst onValueChange = ( next ) => {\n\t\tconst isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );\n\t\tconst nextValue = isNumeric ? next : '0px';\n\t\tonChange( nextValue );\n\t};\n\n\treturn (\n\t\t<VStack justify=\"flex-start\">\n\t\t\t<HStack justify=\"space-between\">\n\t\t\t\t<Subtitle>{ label }</Subtitle>\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ __( 'Use custom size' ) }\n\t\t\t\t\ticon={ settings }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tsetIsCustomInput( ! isCustomInput );\n\t\t\t\t\t} }\n\t\t\t\t\tisPressed={ isCustomInput }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t\t{ isCustomInput ? (\n\t\t\t\t<UnitControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onValueChange }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<RangeControl\n\t\t\t\t\tvalue={ parsedQuantity ?? 0 }\n\t\t\t\t\tonChange={ sliderOnChange }\n\t\t\t\t\twithInputField={ false }\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tmin={\n\t\t\t\t\t\thasNegativeRange\n\t\t\t\t\t\t\t? -(\n\t\t\t\t\t\t\t\t\tCUSTOM_VALUE_SETTINGS[ parsedUnit ?? 'px' ]\n\t\t\t\t\t\t\t\t\t\t?.max ?? 10\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: 0\n\t\t\t\t\t}\n\t\t\t\t\tmax={\n\t\t\t\t\t\tCUSTOM_VALUE_SETTINGS[ parsedUnit ?? 'px' ]?.max ?? 10\n\t\t\t\t\t}\n\t\t\t\t\tstep={\n\t\t\t\t\t\tCUSTOM_VALUE_SETTINGS[ parsedUnit ?? 'px' ]?.step ?? 0.1\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport ShadowsPanel from './shadows-panel';\nimport ShadowsEditPanel from './shadows-edit-panel';\n\nexport function ScreenShadows() {\n\treturn <ShadowsPanel />;\n}\n\nexport function ScreenShadowsEdit() {\n\treturn <ShadowsEditPanel />;\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n\tDimensionsPanel: StylesDimensionsPanel,\n} = unlock( blockEditorPrivateApis );\n\nconst DEFAULT_CONTROLS = {\n\tcontentSize: true,\n\twideSize: true,\n\tpadding: true,\n\tmargin: true,\n\tblockGap: true,\n\tminHeight: true,\n\tchildLayout: false,\n};\n\nexport default function DimensionsPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ userSettings ] = useGlobalSetting( '', undefined, 'user' );\n\tconst [ rawSettings, setSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\n\t// These intermediary objects are needed because the \"layout\" property is stored\n\t// in settings rather than styles.\n\tconst inheritedStyleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...inheritedStyle,\n\t\t\tlayout: settings.layout,\n\t\t};\n\t}, [ inheritedStyle, settings.layout ] );\n\n\tconst styleWithLayout = useMemo( () => {\n\t\treturn {\n\t\t\t...style,\n\t\t\tlayout: userSettings.layout,\n\t\t};\n\t}, [ style, userSettings.layout ] );\n\n\tconst onChange = ( newStyle ) => {\n\t\tconst updatedStyle = { ...newStyle };\n\t\tdelete updatedStyle.layout;\n\t\tsetStyle( updatedStyle );\n\n\t\tif ( newStyle.layout !== userSettings.layout ) {\n\t\t\tconst updatedSettings = {\n\t\t\t\t...userSettings,\n\t\t\t\tlayout: newStyle.layout,\n\t\t\t};\n\n\t\t\t// Ensure any changes to layout definitions are not persisted.\n\t\t\tif ( updatedSettings.layout?.definitions ) {\n\t\t\t\tdelete updatedSettings.layout.definitions;\n\t\t\t}\n\n\t\t\tsetSettings( updatedSettings );\n\t\t}\n\t};\n\n\treturn (\n\t\t<StylesDimensionsPanel\n\t\t\tinheritedValue={ inheritedStyleWithLayout }\n\t\t\tvalue={ styleWithLayout }\n\t\t\tonChange={ onChange }\n\t\t\tsettings={ settings }\n\t\t\tincludeLayoutControls\n\t\t\tdefaultControls={ DEFAULT_CONTROLS }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\n// Initial control values where no block style is set.\nconst BACKGROUND_DEFAULT_VALUES = {\n\tbackgroundSize: 'auto',\n};\n\nconst {\n\tuseGlobalStyle,\n\tuseGlobalSetting,\n\tuseGlobalStyleLinks,\n\tBackgroundPanel: StylesBackgroundPanel,\n} = unlock( blockEditorPrivateApis );\n\n/**\n * Checks if there is a current value in the background image block support\n * attributes.\n *\n * @param {Object} style Style attribute.\n * @return {boolean} Whether the block has a background image value set.\n */\nexport function hasBackgroundImageValue( style ) {\n\treturn (\n\t\t!! style?.background?.backgroundImage?.id ||\n\t\t!! style?.background?.backgroundImage?.url ||\n\t\ttypeof style?.background?.backgroundImage === 'string'\n\t);\n}\n\nexport default function BackgroundPanel() {\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst _links = useGlobalStyleLinks();\n\tconst [ settings ] = useGlobalSetting( '' );\n\n\treturn (\n\t\t<StylesBackgroundPanel\n\t\t\tinheritedValue={ inheritedStyle }\n\t\t\tvalue={ style }\n\t\t\tonChange={ setStyle }\n\t\t\tsettings={ settings }\n\t\t\tdefaultValues={ BACKGROUND_DEFAULT_VALUES }\n\t\t\tthemeFileURIs={ _links?.[ 'wp:theme-file' ] }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport DimensionsPanel from './dimensions-panel';\nimport BackgroundPanel from './background-panel';\nimport ScreenHeader from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst {\n\tuseHasBackgroundPanel,\n\tuseHasDimensionsPanel,\n\tuseGlobalSetting,\n\tuseSettingsForBlockElement,\n} = unlock( blockEditorPrivateApis );\n\nfunction ScreenLayout() {\n\tconst [ rawSettings ] = useGlobalSetting( '' );\n\tconst settings = useSettingsForBlockElement( rawSettings );\n\tconst hasDimensionsPanel = useHasDimensionsPanel( settings );\n\t/*\n\t * Use the raw settings to determine if the background panel should be displayed,\n\t * as the background panel is not dependent on the block element settings.\n\t */\n\tconst hasBackgroundPanel = useHasBackgroundPanel( rawSettings );\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader title={ __( 'Layout' ) } />\n\t\t\t{ hasDimensionsPanel && <DimensionsPanel /> }\n\t\t\t{ hasBackgroundPanel && <BackgroundPanel /> }\n\t\t</>\n\t);\n}\n\nexport default ScreenLayout;\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useEffect, useMemo, useState } from '@wordpress/element';\nimport { __experimentalGrid as Grid } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport PreviewStyles from './preview-styles';\nimport Variation from './variations/variation';\nimport { isVariationWithProperties } from '../../hooks/use-theme-style-variations/use-theme-style-variations-by-property';\nimport { unlock } from '../../lock-unlock';\n\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\n\nexport default function StyleVariationsContainer( { gap = 2 } ) {\n\tconst { user } = useContext( GlobalStylesContext );\n\tconst [ currentUserStyles, setCurrentUserStyles ] = useState( user );\n\tconst userStyles = currentUserStyles?.styles;\n\n\tuseEffect( () => {\n\t\tsetCurrentUserStyles( user );\n\t}, [ user ] );\n\n\tconst variations = useSelect( ( select ) => {\n\t\treturn select(\n\t\t\tcoreStore\n\t\t).__experimentalGetCurrentThemeGlobalStylesVariations();\n\t}, [] );\n\n\t// Filter out variations that are color or typography variations.\n\tconst fullStyleVariations = variations?.filter( ( variation ) => {\n\t\treturn (\n\t\t\t! isVariationWithProperties( variation, [ 'color' ] ) &&\n\t\t\t! isVariationWithProperties( variation, [\n\t\t\t\t'typography',\n\t\t\t\t'spacing',\n\t\t\t] )\n\t\t);\n\t} );\n\n\tconst themeVariations = useMemo( () => {\n\t\tconst withEmptyVariation = [\n\t\t\t{\n\t\t\t\ttitle: __( 'Default' ),\n\t\t\t\tsettings: {},\n\t\t\t\tstyles: {},\n\t\t\t},\n\t\t\t...( fullStyleVariations ?? [] ),\n\t\t];\n\t\treturn [\n\t\t\t...withEmptyVariation.map( ( variation ) => {\n\t\t\t\tconst blockStyles = { ...variation?.styles?.blocks } || {};\n\n\t\t\t\t// We need to copy any user custom CSS to the variation to prevent it being lost\n\t\t\t\t// when switching variations.\n\t\t\t\tif ( userStyles?.blocks ) {\n\t\t\t\t\tObject.keys( userStyles.blocks ).forEach( ( blockName ) => {\n\t\t\t\t\t\t// First get any block specific custom CSS from the current user styles and merge with any custom CSS for\n\t\t\t\t\t\t// that block in the variation.\n\t\t\t\t\t\tif ( userStyles.blocks[ blockName ].css ) {\n\t\t\t\t\t\t\tconst variationBlockStyles =\n\t\t\t\t\t\t\t\tblockStyles[ blockName ] || {};\n\t\t\t\t\t\t\tconst customCSS = {\n\t\t\t\t\t\t\t\tcss: `${\n\t\t\t\t\t\t\t\t\tblockStyles[ blockName ]?.css || ''\n\t\t\t\t\t\t\t\t} ${\n\t\t\t\t\t\t\t\t\tuserStyles.blocks[ blockName ].css.trim() ||\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\tblockStyles[ blockName ] = {\n\t\t\t\t\t\t\t\t...variationBlockStyles,\n\t\t\t\t\t\t\t\t...customCSS,\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\t// Now merge any global custom CSS from current user styles with global custom CSS in the variation.\n\t\t\t\tconst css =\n\t\t\t\t\tuserStyles?.css || variation.styles?.css\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\tcss: `${ variation.styles?.css || '' } ${\n\t\t\t\t\t\t\t\t\tuserStyles?.css || ''\n\t\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst blocks =\n\t\t\t\t\tObject.keys( blockStyles ).length > 0\n\t\t\t\t\t\t? { blocks: blockStyles }\n\t\t\t\t\t\t: {};\n\n\t\t\t\tconst styles = {\n\t\t\t\t\t...variation.styles,\n\t\t\t\t\t...css,\n\t\t\t\t\t...blocks,\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\t...variation,\n\t\t\t\t\tsettings: variation.settings ?? {},\n\t\t\t\t\tstyles,\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\t}, [ fullStyleVariations, userStyles?.blocks, userStyles?.css ] );\n\n\tif ( ! fullStyleVariations || fullStyleVariations?.length < 1 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Grid\n\t\t\tcolumns={ 2 }\n\t\t\tclassName=\"edit-site-global-styles-style-variations-container\"\n\t\t\tgap={ gap }\n\t\t>\n\t\t\t{ themeVariations.map( ( variation, index ) => (\n\t\t\t\t<Variation key={ index } variation={ variation }>\n\t\t\t\t\t{ ( isFocused ) => (\n\t\t\t\t\t\t<PreviewStyles\n\t\t\t\t\t\t\tlabel={ variation?.title }\n\t\t\t\t\t\t\twithHoverView\n\t\t\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\t\t\tvariation={ variation }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Variation>\n\t\t\t) ) }\n\t\t</Grid>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { __experimentalVStack as VStack } from '@wordpress/components';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport StyleVariationsContainer from '../global-styles/style-variations-container';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport ColorVariations from '../global-styles/variations/variations-color';\nimport TypographyVariations from '../global-styles/variations/variations-typography';\n\nconst noop = () => {};\n\nexport default function SidebarNavigationScreenGlobalStylesContent() {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst gap = 3;\n\n\t// Wrap in a BlockEditorProvider to ensure that the Iframe's dependencies are\n\t// loaded. This is necessary because the Iframe component waits until\n\t// the block editor store's `__internalIsInitialized` is true before\n\t// rendering the iframe. Without this, the iframe previews will not render\n\t// in mobile viewport sizes, where the editor canvas is hidden.\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<VStack\n\t\t\t\tspacing={ 10 }\n\t\t\t\tclassName=\"edit-site-global-styles-variation-container\"\n\t\t\t>\n\t\t\t\t<StyleVariationsContainer gap={ gap } />\n\t\t\t\t<ColorVariations title={ __( 'Palettes' ) } gap={ gap } />\n\t\t\t\t<TypographyVariations\n\t\t\t\t\ttitle={ __( 'Typography' ) }\n\t\t\t\t\tgap={ gap }\n\t\t\t\t/>\n\t\t\t</VStack>\n\t\t</BlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { Card, CardBody } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useZoomOut } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from './header';\nimport SidebarNavigationScreenGlobalStylesContent from '../sidebar-navigation-screen-global-styles/content';\n\nfunction ScreenStyleVariations() {\n\t// Move to zoom out mode when this component is mounted\n\t// and back to the previous mode when unmounted.\n\tuseZoomOut();\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'Browse styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a variation to change the look of the site.'\n\t\t\t\t) }\n\t\t\t/>\n\n\t\t\t<Card\n\t\t\t\tsize=\"small\"\n\t\t\t\tisBorderless\n\t\t\t\tclassName=\"edit-site-global-styles-screen-style-variations\"\n\t\t\t>\n\t\t\t\t<CardBody>\n\t\t\t\t\t<SidebarNavigationScreenGlobalStylesContent />\n\t\t\t\t</CardBody>\n\t\t\t</Card>\n\t\t</>\n\t);\n}\n\nexport default ScreenStyleVariations;\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 { Children, cloneElement, useState } from '@wordpress/element';\nimport {\n\tButton,\n\t__experimentalUseSlotFills as useSlotFills,\n} from '@wordpress/components';\nimport { ESCAPE } from '@wordpress/keycodes';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { backup, closeSmall, seen } from '@wordpress/icons';\nimport { useFocusOnMount, useFocusReturn } from '@wordpress/compose';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst { EditorContentSlotFill, ResizableEditor } = unlock( editorPrivateApis );\n\n/**\n * Returns a translated string for the title of the editor canvas container.\n *\n * @param {string} view Editor canvas container view.\n *\n * @return {Object} Translated string for the view title and associated icon, both defaulting to ''.\n */\nfunction getEditorCanvasContainerTitleAndIcon( view ) {\n\tswitch ( view ) {\n\t\tcase 'style-book':\n\t\t\treturn {\n\t\t\t\ttitle: __( 'Style Book' ),\n\t\t\t\ticon: seen,\n\t\t\t};\n\t\tcase 'global-styles-revisions':\n\t\tcase 'global-styles-revisions:style-book':\n\t\t\treturn {\n\t\t\t\ttitle: __( 'Style Revisions' ),\n\t\t\t\ticon: backup,\n\t\t\t};\n\t\tdefault:\n\t\t\treturn {\n\t\t\t\ttitle: '',\n\t\t\t\ticon: '',\n\t\t\t};\n\t}\n}\n\nfunction EditorCanvasContainer( {\n\tchildren,\n\tcloseButtonLabel,\n\tonClose,\n\tenableResizing = false,\n} ) {\n\tconst { editorCanvasContainerView, showListViewByDefault } = useSelect(\n\t\t( select ) => {\n\t\t\tconst _editorCanvasContainerView = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView();\n\n\t\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t\t'core',\n\t\t\t\t'showListViewByDefault'\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\teditorCanvasContainerView: _editorCanvasContainerView,\n\t\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst [ isClosed, setIsClosed ] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\n\tconst focusOnMountRef = useFocusOnMount( 'firstElement' );\n\tconst sectionFocusReturnRef = useFocusReturn();\n\n\tfunction onCloseContainer() {\n\t\tsetIsListViewOpened( showListViewByDefault );\n\t\tsetEditorCanvasContainerView( undefined );\n\t\tsetIsClosed( true );\n\t\tif ( typeof onClose === 'function' ) {\n\t\t\tonClose();\n\t\t}\n\t}\n\n\tfunction closeOnEscape( event ) {\n\t\tif ( event.keyCode === ESCAPE && ! event.defaultPrevented ) {\n\t\t\tevent.preventDefault();\n\t\t\tonCloseContainer();\n\t\t}\n\t}\n\n\tconst childrenWithProps = Array.isArray( children )\n\t\t? Children.map( children, ( child, index ) =>\n\t\t\t\tindex === 0\n\t\t\t\t\t? cloneElement( child, {\n\t\t\t\t\t\t\tref: sectionFocusReturnRef,\n\t\t\t\t\t } )\n\t\t\t\t\t: child\n\t\t )\n\t\t: cloneElement( children, {\n\t\t\t\tref: sectionFocusReturnRef,\n\t\t } );\n\n\tif ( isClosed ) {\n\t\treturn null;\n\t}\n\n\tconst { title } = getEditorCanvasContainerTitleAndIcon(\n\t\teditorCanvasContainerView\n\t);\n\tconst shouldShowCloseButton = onClose || closeButtonLabel;\n\n\treturn (\n\t\t<EditorContentSlotFill.Fill>\n\t\t\t<div className=\"edit-site-editor-canvas-container\">\n\t\t\t\t<ResizableEditor enableResizing={ enableResizing }>\n\t\t\t\t\t{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }\n\t\t\t\t\t<section\n\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__section\"\n\t\t\t\t\t\tref={ shouldShowCloseButton ? focusOnMountRef : null }\n\t\t\t\t\t\tonKeyDown={ closeOnEscape }\n\t\t\t\t\t\taria-label={ title }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ shouldShowCloseButton && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"edit-site-editor-canvas-container__close-button\"\n\t\t\t\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\t\t\t\tlabel={ closeButtonLabel || __( 'Close' ) }\n\t\t\t\t\t\t\t\tonClick={ onCloseContainer }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ childrenWithProps }\n\t\t\t\t\t</section>\n\t\t\t\t</ResizableEditor>\n\t\t\t</div>\n\t\t</EditorContentSlotFill.Fill>\n\t);\n}\n\nfunction useHasEditorCanvasContainer() {\n\tconst fills = useSlotFills( EditorContentSlotFill.privateKey );\n\treturn !! fills?.length;\n}\n\nexport default EditorCanvasContainer;\nexport { useHasEditorCanvasContainer, getEditorCanvasContainerTitleAndIcon };\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDisabled,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\tgetCategories,\n\tgetBlockTypes,\n\tgetBlockFromExample,\n\tcreateBlock,\n} from '@wordpress/blocks';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useResizeObserver } from '@wordpress/compose';\nimport { useMemo, useState, memo, useContext } from '@wordpress/element';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tuseGlobalStyle,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n\tTabs,\n} = unlock( componentsPrivateApis );\n\n// The content area of the Style Book is rendered within an iframe so that global styles\n// are applied to elements within the entire content area. To support elements that are\n// not part of the block previews, such as headings and layout for the block previews,\n// additional CSS rules need to be passed into the iframe. These are hard-coded below.\n// Note that button styles are unset, and then focus rules from the `Button` component are\n// applied to the `button` element, targeted via `.edit-site-style-book__example`.\n// This is to ensure that browser default styles for buttons are not applied to the previews.\nconst STYLE_BOOK_IFRAME_STYLES = `\n\t.edit-site-style-book__examples {\n\t\tmax-width: 900px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.edit-site-style-book__example {\n\t\tborder-radius: 2px;\n\t\tcursor: pointer;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 40px;\n\t\tmargin-bottom: 40px;\n\t\tpadding: 16px;\n\t\twidth: 100%;\n\t\tbox-sizing: border-box;\n\t\tscroll-margin-top: 32px;\n\t\tscroll-margin-bottom: 32px;\n\t}\n\n\t.edit-site-style-book__example.is-selected {\n\t\tbox-shadow: 0 0 0 1px var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t}\n\n\t.edit-site-style-book__example:focus:not(:disabled) {\n\t\tbox-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #007cba));\n\t\toutline: 3px solid transparent;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example {\n\t\tflex-direction: row;\n\t}\n\n\t.edit-site-style-book__example-title {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen-Sans, Ubuntu, Cantarell, \"Helvetica Neue\", sans-serif;\n\t\tfont-size: 11px;\n\t\tfont-weight: 500;\n\t\tline-height: normal;\n\t\tmargin: 0;\n\t\ttext-align: left;\n\t\ttext-transform: uppercase;\n\t}\n\n\t.edit-site-style-book__examples.is-wide .edit-site-style-book__example-title {\n\t\ttext-align: right;\n\t\twidth: 120px;\n\t}\n\n\t.edit-site-style-book__example-preview {\n\t\twidth: 100%;\n\t}\n\n\t.edit-site-style-book__example-preview .block-editor-block-list__insertion-point,\n\t.edit-site-style-book__example-preview .block-list-appender {\n\t\tdisplay: none;\n\t}\n\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:first-child {\n\t\tmargin-top: 0;\n\t}\n\t.edit-site-style-book__example-preview .is-root-container > .wp-block:last-child {\n\t\tmargin-bottom: 0;\n\t}\n`;\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\nfunction getExamples() {\n\t// Use our own example for the Heading block so that we can show multiple\n\t// heading levels.\n\tconst headingsExample = {\n\t\tname: 'core/heading',\n\t\ttitle: __( 'Headings' ),\n\t\tcategory: 'text',\n\t\tblocks: [\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 1,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 2,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 3,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 4,\n\t\t\t} ),\n\t\t\tcreateBlock( 'core/heading', {\n\t\t\t\tcontent: __( 'Code Is Poetry' ),\n\t\t\t\tlevel: 5,\n\t\t\t} ),\n\t\t],\n\t};\n\n\tconst otherExamples = getBlockTypes()\n\t\t.filter( ( blockType ) => {\n\t\t\tconst { name, example, supports } = blockType;\n\t\t\treturn (\n\t\t\t\tname !== 'core/heading' &&\n\t\t\t\t!! example &&\n\t\t\t\tsupports.inserter !== false\n\t\t\t);\n\t\t} )\n\t\t.map( ( blockType ) => ( {\n\t\t\tname: blockType.name,\n\t\t\ttitle: blockType.title,\n\t\t\tcategory: blockType.category,\n\t\t\tblocks: getBlockFromExample( blockType.name, blockType.example ),\n\t\t} ) );\n\n\treturn [ headingsExample, ...otherExamples ];\n}\n\nfunction StyleBook( {\n\tenableResizing = true,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tshowCloseButton = true,\n\tonClose,\n\tshowTabs = true,\n\tuserConfig = {},\n} ) {\n\tconst [ resizeObserver, sizes ] = useResizeObserver();\n\tconst [ textColor ] = useGlobalStyle( 'color.text' );\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst [ examples ] = useState( getExamples );\n\tconst tabs = useMemo(\n\t\t() =>\n\t\t\tgetCategories()\n\t\t\t\t.filter( ( category ) =>\n\t\t\t\t\texamples.some(\n\t\t\t\t\t\t( example ) => example.category === category.slug\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.map( ( category ) => ( {\n\t\t\t\t\tname: category.slug,\n\t\t\t\t\ttitle: category.title,\n\t\t\t\t\ticon: category.icon,\n\t\t\t\t} ) ),\n\t\t[ examples ]\n\t);\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\t// Copied from packages/edit-site/src/components/revisions/index.js\n\t// could we create a shared hook?\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\n\tconst settings = useMemo(\n\t\t() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),\n\t\t[ originalSettings ]\n\t);\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tsettings.styles =\n\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t? globalStyles\n\t\t\t: settings.styles;\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\tonClose={ onClose }\n\t\t\tenableResizing={ enableResizing }\n\t\t\tcloseButtonLabel={ showCloseButton ? __( 'Close' ) : null }\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( 'edit-site-style-book', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t\t'is-button': !! onClick,\n\t\t\t\t} ) }\n\t\t\t\tstyle={ {\n\t\t\t\t\tcolor: textColor,\n\t\t\t\t\tbackground: backgroundColor,\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t{ resizeObserver }\n\t\t\t\t{ showTabs ? (\n\t\t\t\t\t<div className=\"edit-site-style-book__tabs\">\n\t\t\t\t\t\t<Tabs>\n\t\t\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t\t<Tabs.Tab\n\t\t\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ tab.title }\n\t\t\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t\t\t{ tabs.map( ( tab ) => (\n\t\t\t\t\t\t\t\t<Tabs.TabPanel\n\t\t\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\t\t\ttabId={ tab.name }\n\t\t\t\t\t\t\t\t\tfocusable={ false }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\t\t\t\t\tcategory={ tab.name }\n\t\t\t\t\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t\t\t\t\t\ttitle={ tab.title }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</Tabs.TabPanel>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t</Tabs>\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<StyleBookBody\n\t\t\t\t\t\texamples={ examples }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\tsizes={ sizes }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nconst StyleBookBody = ( {\n\tcategory,\n\texamples,\n\tisSelected,\n\tonClick,\n\tonSelect,\n\tsettings,\n\tsizes,\n\ttitle,\n} ) => {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\t// The presence of an `onClick` prop indicates that the Style Book is being used as a button.\n\t// In this case, add additional props to the iframe to make it behave like a button.\n\tconst buttonModeProps = {\n\t\trole: 'button',\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { keyCode } = event;\n\t\t\tif ( onClick && ( keyCode === ENTER || keyCode === SPACE ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\tonClick: ( event ) => {\n\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( onClick ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tonClick( event );\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\tconst buttonModeStyles = onClick\n\t\t? 'body { cursor: pointer; } body * { pointer-events: none; }'\n\t\t: '';\n\n\treturn (\n\t\t<Iframe\n\t\t\tclassName={ clsx( 'edit-site-style-book__iframe', {\n\t\t\t\t'is-focused': isFocused && !! onClick,\n\t\t\t\t'is-button': !! onClick,\n\t\t\t} ) }\n\t\t\tname=\"style-book-canvas\"\n\t\t\ttabIndex={ 0 }\n\t\t\t{ ...( onClick ? buttonModeProps : {} ) }\n\t\t>\n\t\t\t<EditorStyles styles={ settings.styles } />\n\t\t\t<style>\n\t\t\t\t{\n\t\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\n\t\t\t\t\t`.is-root-container { display: flow-root; }\n\t\t\t\t\t\tbody { position: relative; padding: 32px !important; }` +\n\t\t\t\t\t\tSTYLE_BOOK_IFRAME_STYLES +\n\t\t\t\t\t\tbuttonModeStyles\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<Examples\n\t\t\t\tclassName={ clsx( 'edit-site-style-book__examples', {\n\t\t\t\t\t'is-wide': sizes.width > 600,\n\t\t\t\t} ) }\n\t\t\t\texamples={ examples }\n\t\t\t\tcategory={ category }\n\t\t\t\tlabel={\n\t\t\t\t\ttitle\n\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Category of blocks, e.g. Text.\n\t\t\t\t\t\t\t\t__( 'Examples of blocks in the %s category' ),\n\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: __( 'Examples of blocks' )\n\t\t\t\t}\n\t\t\t\tisSelected={ isSelected }\n\t\t\t\tonSelect={ onSelect }\n\t\t\t\tkey={ category }\n\t\t\t/>\n\t\t</Iframe>\n\t);\n};\n\nconst Examples = memo(\n\t( { className, examples, category, label, isSelected, onSelect } ) => {\n\t\tconst compositeStore = useCompositeStore( { orientation: 'vertical' } );\n\n\t\treturn (\n\t\t\t<Composite\n\t\t\t\tstore={ compositeStore }\n\t\t\t\tclassName={ className }\n\t\t\t\taria-label={ label }\n\t\t\t\trole=\"grid\"\n\t\t\t>\n\t\t\t\t{ examples\n\t\t\t\t\t.filter( ( example ) =>\n\t\t\t\t\t\tcategory ? example.category === category : true\n\t\t\t\t\t)\n\t\t\t\t\t.map( ( example ) => (\n\t\t\t\t\t\t<Example\n\t\t\t\t\t\t\tkey={ example.name }\n\t\t\t\t\t\t\tid={ `example-${ example.name }` }\n\t\t\t\t\t\t\ttitle={ example.title }\n\t\t\t\t\t\t\tblocks={ example.blocks }\n\t\t\t\t\t\t\tisSelected={ isSelected( example.name ) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonSelect?.( example.name );\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</Composite>\n\t\t);\n\t}\n);\n\nconst Example = ( { id, title, blocks, isSelected, onClick } ) => {\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( {\n\t\t\t...originalSettings,\n\t\t\tfocusMode: false, // Disable \"Spotlight mode\".\n\t\t\t__unstableIsPreviewMode: true,\n\t\t} ),\n\t\t[ originalSettings ]\n\t);\n\n\t// Cache the list of blocks to avoid additional processing when the component is re-rendered.\n\tconst renderedBlocks = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\treturn (\n\t\t<div role=\"row\">\n\t\t\t<div role=\"gridcell\">\n\t\t\t\t<CompositeItem\n\t\t\t\t\tclassName={ clsx( 'edit-site-style-book__example', {\n\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t} ) }\n\t\t\t\t\tid={ id }\n\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t// translators: %s: Title of a block, e.g. Heading.\n\t\t\t\t\t\t__( 'Open %s styles in Styles panel' ),\n\t\t\t\t\t\ttitle\n\t\t\t\t\t) }\n\t\t\t\t\trender={ <div /> }\n\t\t\t\t\trole=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"edit-site-style-book__example-title\">\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</span>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"edit-site-style-book__example-preview\"\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t>\n\t\t\t\t\t\t<Disabled className=\"edit-site-style-book__example-preview__content\">\n\t\t\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\t\t\tvalue={ renderedBlocks }\n\t\t\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t\t\t</Disabled>\n\t\t\t\t\t</div>\n\t\t\t\t</CompositeItem>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default StyleBook;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { ExternalLink } from '@wordpress/components';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport ScreenHeader from './header';\n\nconst { useGlobalStyle, AdvancedPanel: StylesAdvancedPanel } = unlock(\n\tblockEditorPrivateApis\n);\n\nfunction ScreenCSS() {\n\tconst description = __(\n\t\t'Add your own CSS to customize the appearance and layout of your site.'\n\t);\n\tconst [ style ] = useGlobalStyle( '', undefined, 'user', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\tconst [ inheritedStyle, setStyle ] = useGlobalStyle( '', undefined, 'all', {\n\t\tshouldDecodeEncode: false,\n\t} );\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={ __( 'CSS' ) }\n\t\t\t\tdescription={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t<ExternalLink\n\t\t\t\t\t\t\thref=\"https://developer.wordpress.org/advanced-administration/wordpress/css/\"\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-css-help-link\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Learn more about CSS' ) }\n\t\t\t\t\t\t</ExternalLink>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"edit-site-global-styles-screen-css\">\n\t\t\t\t<StylesAdvancedPanel\n\t\t\t\t\tvalue={ style }\n\t\t\t\t\tonChange={ setStyle }\n\t\t\t\t\tinheritedValue={ inheritedStyle }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ScreenCSS;\n","/**\n * WordPress dependencies\n */\nimport { Disabled } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tBlockList,\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\t__unstableEditorStyles as EditorStyles,\n\t__unstableIframe as Iframe,\n} from '@wordpress/block-editor';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { unlock } from '../../lock-unlock';\nimport EditorCanvasContainer from '../editor-canvas-container';\n\nconst {\n\tExperimentalBlockEditorProvider,\n\tGlobalStylesContext,\n\tuseGlobalStylesOutputWithConfig,\n\t__unstableBlockStyleVariationOverridesWithConfig,\n} = unlock( blockEditorPrivateApis );\nconst { mergeBaseAndUserConfigs } = unlock( editorPrivateApis );\n\nfunction isObjectEmpty( object ) {\n\treturn ! object || Object.keys( object ).length === 0;\n}\n\nfunction Revisions( { userConfig, blocks } ) {\n\tconst { base: baseConfig } = useContext( GlobalStylesContext );\n\n\tconst mergedConfig = useMemo( () => {\n\t\tif ( ! isObjectEmpty( userConfig ) && ! isObjectEmpty( baseConfig ) ) {\n\t\t\treturn mergeBaseAndUserConfigs( baseConfig, userConfig );\n\t\t}\n\t\treturn {};\n\t}, [ baseConfig, userConfig ] );\n\n\tconst renderedBlocksArray = useMemo(\n\t\t() => ( Array.isArray( blocks ) ? blocks : [ blocks ] ),\n\t\t[ blocks ]\n\t);\n\n\tconst originalSettings = useSelect(\n\t\t( select ) => select( blockEditorStore ).getSettings(),\n\t\t[]\n\t);\n\tconst settings = useMemo(\n\t\t() => ( { ...originalSettings, __unstableIsPreviewMode: true } ),\n\t\t[ originalSettings ]\n\t);\n\n\tconst [ globalStyles ] = useGlobalStylesOutputWithConfig( mergedConfig );\n\n\tconst editorStyles =\n\t\t! isObjectEmpty( globalStyles ) && ! isObjectEmpty( userConfig )\n\t\t\t? globalStyles\n\t\t\t: settings.styles;\n\n\treturn (\n\t\t<EditorCanvasContainer\n\t\t\ttitle={ __( 'Revisions' ) }\n\t\t\tcloseButtonLabel={ __( 'Close revisions' ) }\n\t\t\tenableResizing\n\t\t>\n\t\t\t<Iframe\n\t\t\t\tclassName=\"edit-site-revisions__iframe\"\n\t\t\t\tname=\"revisions\"\n\t\t\t\ttabIndex={ 0 }\n\t\t\t>\n\t\t\t\t<style>\n\t\t\t\t\t{\n\t\t\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\n\t\t\t\t\t\t`.is-root-container { display: flow-root; }`\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t\t<Disabled className=\"edit-site-revisions__example-preview__content\">\n\t\t\t\t\t<ExperimentalBlockEditorProvider\n\t\t\t\t\t\tvalue={ renderedBlocksArray }\n\t\t\t\t\t\tsettings={ settings }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BlockList renderAppender={ false } />\n\t\t\t\t\t\t{ /*\n\t\t\t\t\t\t * Styles are printed inside the block editor provider,\n\t\t\t\t\t\t * so they can access any registered style overrides.\n\t\t\t\t\t\t */ }\n\t\t\t\t\t\t<EditorStyles styles={ editorStyles } />\n\t\t\t\t\t\t<__unstableBlockStyleVariationOverridesWithConfig\n\t\t\t\t\t\t\tconfig={ mergedConfig }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ExperimentalBlockEditorProvider>\n\t\t\t\t</Disabled>\n\t\t\t</Iframe>\n\t\t</EditorCanvasContainer>\n\t);\n}\n\nexport default Revisions;\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useContext, useMemo } from '@wordpress/element';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst SITE_EDITOR_AUTHORS_QUERY = {\n\tper_page: -1,\n\t_fields: 'id,name,avatar_urls',\n\tcontext: 'view',\n\tcapabilities: [ 'edit_theme_options' ],\n};\nconst DEFAULT_QUERY = { per_page: 100, page: 1 };\nconst EMPTY_ARRAY = [];\nconst { GlobalStylesContext } = unlock( blockEditorPrivateApis );\nexport default function useGlobalStylesRevisions( { query } = {} ) {\n\tconst { user: userConfig } = useContext( GlobalStylesContext );\n\tconst _query = { ...DEFAULT_QUERY, ...query };\n\tconst {\n\t\tauthors,\n\t\tcurrentUser,\n\t\tisDirty,\n\t\trevisions,\n\t\tisLoadingGlobalStylesRevisions,\n\t\trevisionsCount,\n\t} = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\t__experimentalGetDirtyEntityRecords,\n\t\t\t\tgetCurrentUser,\n\t\t\t\tgetUsers,\n\t\t\t\tgetRevisions,\n\t\t\t\t__experimentalGetCurrentGlobalStylesId,\n\t\t\t\tgetEntityRecord,\n\t\t\t\tisResolving,\n\t\t\t} = select( coreStore );\n\t\t\tconst dirtyEntityRecords = __experimentalGetDirtyEntityRecords();\n\t\t\tconst _currentUser = getCurrentUser();\n\t\t\tconst _isDirty = dirtyEntityRecords.length > 0;\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\tconst _revisionsCount =\n\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t\t\tconst globalStylesRevisions =\n\t\t\t\tgetRevisions(\n\t\t\t\t\t'root',\n\t\t\t\t\t'globalStyles',\n\t\t\t\t\tglobalStylesId,\n\t\t\t\t\t_query\n\t\t\t\t) || EMPTY_ARRAY;\n\t\t\tconst _authors =\n\t\t\t\tgetUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;\n\t\t\tconst _isResolving = isResolving( 'getRevisions', [\n\t\t\t\t'root',\n\t\t\t\t'globalStyles',\n\t\t\t\tglobalStylesId,\n\t\t\t\t_query,\n\t\t\t] );\n\t\t\treturn {\n\t\t\t\tauthors: _authors,\n\t\t\t\tcurrentUser: _currentUser,\n\t\t\t\tisDirty: _isDirty,\n\t\t\t\trevisions: globalStylesRevisions,\n\t\t\t\tisLoadingGlobalStylesRevisions: _isResolving,\n\t\t\t\trevisionsCount: _revisionsCount,\n\t\t\t};\n\t\t},\n\t\t[ query ]\n\t);\n\treturn useMemo( () => {\n\t\tif ( ! authors.length || isLoadingGlobalStylesRevisions ) {\n\t\t\treturn {\n\t\t\t\trevisions: EMPTY_ARRAY,\n\t\t\t\thasUnsavedChanges: isDirty,\n\t\t\t\tisLoading: true,\n\t\t\t\trevisionsCount,\n\t\t\t};\n\t\t}\n\n\t\t// Adds author details to each revision.\n\t\tconst _modifiedRevisions = revisions.map( ( revision ) => {\n\t\t\treturn {\n\t\t\t\t...revision,\n\t\t\t\tauthor: authors.find(\n\t\t\t\t\t( author ) => author.id === revision.author\n\t\t\t\t),\n\t\t\t};\n\t\t} );\n\n\t\tconst fetchedRevisionsCount = revisions.length;\n\n\t\tif ( fetchedRevisionsCount ) {\n\t\t\t// Flags the most current saved revision.\n\t\t\tif (\n\t\t\t\t_modifiedRevisions[ 0 ].id !== 'unsaved' &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\t_modifiedRevisions[ 0 ].isLatest = true;\n\t\t\t}\n\n\t\t\t// Adds an item for unsaved changes.\n\t\t\tif (\n\t\t\t\tisDirty &&\n\t\t\t\tuserConfig &&\n\t\t\t\tObject.keys( userConfig ).length > 0 &&\n\t\t\t\tcurrentUser &&\n\t\t\t\t_query.page === 1\n\t\t\t) {\n\t\t\t\tconst unsavedRevision = {\n\t\t\t\t\tid: 'unsaved',\n\t\t\t\t\tstyles: userConfig?.styles,\n\t\t\t\t\tsettings: userConfig?.settings,\n\t\t\t\t\t_links: userConfig?._links,\n\t\t\t\t\tauthor: {\n\t\t\t\t\t\tname: currentUser?.name,\n\t\t\t\t\t\tavatar_urls: currentUser?.avatar_urls,\n\t\t\t\t\t},\n\t\t\t\t\tmodified: new Date(),\n\t\t\t\t};\n\n\t\t\t\t_modifiedRevisions.unshift( unsavedRevision );\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t_query.page === Math.ceil( revisionsCount / _query.per_page )\n\t\t\t) {\n\t\t\t\t// Adds an item for the default theme styles.\n\t\t\t\t_modifiedRevisions.push( {\n\t\t\t\t\tid: 'parent',\n\t\t\t\t\tstyles: {},\n\t\t\t\t\tsettings: {},\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\trevisions: _modifiedRevisions,\n\t\t\thasUnsavedChanges: isDirty,\n\t\t\tisLoading: false,\n\t\t\trevisionsCount,\n\t\t};\n\t}, [\n\t\tisDirty,\n\t\trevisions,\n\t\tcurrentUser,\n\t\tauthors,\n\t\tuserConfig,\n\t\tisLoadingGlobalStylesRevisions,\n\t] );\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"date\"];","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { Button } from '@wordpress/components';\nimport { dateI18n, getDate, humanTimeDiff, getSettings } from '@wordpress/date';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../../lock-unlock';\n\nconst DAY_IN_MILLISECONDS = 60 * 60 * 1000 * 24;\nconst { getGlobalStylesChanges } = unlock( blockEditorPrivateApis );\n\nfunction ChangesSummary( { revision, previousRevision } ) {\n\tconst changes = getGlobalStylesChanges( revision, previousRevision, {\n\t\tmaxResults: 7,\n\t} );\n\n\tif ( ! changes.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<ul\n\t\t\tdata-testid=\"global-styles-revision-changes\"\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__changes\"\n\t\t>\n\t\t\t{ changes.map( ( change ) => (\n\t\t\t\t<li key={ change }>{ change }</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n\n/**\n * Returns a button label for the revision.\n *\n * @param {string|number} id A revision object.\n * @param {string} authorDisplayName Author name.\n * @param {string} formattedModifiedDate Revision modified date formatted.\n * @param {boolean} areStylesEqual Whether the revision matches the current editor styles.\n * @return {string} Translated label.\n */\nfunction getRevisionLabel(\n\tid,\n\tauthorDisplayName,\n\tformattedModifiedDate,\n\tareStylesEqual\n) {\n\tif ( 'parent' === id ) {\n\t\treturn __( 'Reset the styles to the theme defaults' );\n\t}\n\n\tif ( 'unsaved' === id ) {\n\t\treturn sprintf(\n\t\t\t/* translators: %s: author display name */\n\t\t\t__( 'Unsaved changes by %s' ),\n\t\t\tauthorDisplayName\n\t\t);\n\t}\n\n\treturn areStylesEqual\n\t\t? sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__(\n\t\t\t\t\t'Changes saved by %1$s on %2$s. This revision matches current editor styles.'\n\t\t\t\t),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t )\n\t\t: sprintf(\n\t\t\t\t// translators: %1$s: author display name, %2$s: revision creation date.\n\t\t\t\t__( 'Changes saved by %1$s on %2$s' ),\n\t\t\t\tauthorDisplayName,\n\t\t\t\tformattedModifiedDate\n\t\t );\n}\n\n/**\n * Returns a rendered list of revisions buttons.\n *\n * @typedef {Object} props\n * @property {Array<Object>} userRevisions A collection of user revisions.\n * @property {number} selectedRevisionId The id of the currently-selected revision.\n * @property {Function} onChange Callback fired when a revision is selected.\n *\n * @param {props} Component props.\n * @return {JSX.Element} The modal component.\n */\nfunction RevisionsButtons( {\n\tuserRevisions,\n\tselectedRevisionId,\n\tonChange,\n\tcanApplyRevision,\n\tonApplyRevision,\n} ) {\n\tconst { currentThemeName, currentUser } = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getCurrentUser } = select( coreStore );\n\t\tconst currentTheme = getCurrentTheme();\n\t\treturn {\n\t\t\tcurrentThemeName:\n\t\t\t\tcurrentTheme?.name?.rendered || currentTheme?.stylesheet,\n\t\t\tcurrentUser: getCurrentUser(),\n\t\t};\n\t}, [] );\n\tconst dateNowInMs = getDate().getTime();\n\tconst { datetimeAbbreviated } = getSettings().formats;\n\n\treturn (\n\t\t<ol\n\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revisions-list\"\n\t\t\taria-label={ __( 'Global styles revisions list' ) }\n\t\t\trole=\"group\"\n\t\t>\n\t\t\t{ userRevisions.map( ( revision, index ) => {\n\t\t\t\tconst { id, author, modified } = revision;\n\t\t\t\tconst isUnsaved = 'unsaved' === id;\n\t\t\t\t// Unsaved changes are created by the current user.\n\t\t\t\tconst revisionAuthor = isUnsaved ? currentUser : author;\n\t\t\t\tconst authorDisplayName = revisionAuthor?.name || __( 'User' );\n\t\t\t\tconst authorAvatar = revisionAuthor?.avatar_urls?.[ '48' ];\n\t\t\t\tconst isFirstItem = index === 0;\n\t\t\t\tconst isSelected = selectedRevisionId\n\t\t\t\t\t? selectedRevisionId === id\n\t\t\t\t\t: isFirstItem;\n\t\t\t\tconst areStylesEqual = ! canApplyRevision && isSelected;\n\t\t\t\tconst isReset = 'parent' === id;\n\t\t\t\tconst modifiedDate = getDate( modified );\n\t\t\t\tconst displayDate =\n\t\t\t\t\tmodified &&\n\t\t\t\t\tdateNowInMs - modifiedDate.getTime() > DAY_IN_MILLISECONDS\n\t\t\t\t\t\t? dateI18n( datetimeAbbreviated, modifiedDate )\n\t\t\t\t\t\t: humanTimeDiff( modified );\n\t\t\t\tconst revisionLabel = getRevisionLabel(\n\t\t\t\t\tid,\n\t\t\t\t\tauthorDisplayName,\n\t\t\t\t\tdateI18n( datetimeAbbreviated, modifiedDate ),\n\t\t\t\t\tareStylesEqual\n\t\t\t\t);\n\n\t\t\t\treturn (\n\t\t\t\t\t<li\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t'edit-site-global-styles-screen-revisions__revision-item',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'is-selected': isSelected,\n\t\t\t\t\t\t\t\t'is-active': areStylesEqual,\n\t\t\t\t\t\t\t\t'is-reset': isReset,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\taria-current={ isSelected }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__revision-button\"\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ isSelected }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tonChange( revision );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taria-label={ revisionLabel }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ isReset ? (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ __( 'Default styles' ) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t{ currentThemeName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__description\">\n\t\t\t\t\t\t\t\t\t{ isUnsaved ? (\n\t\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__date\">\n\t\t\t\t\t\t\t\t\t\t\t{ __( '(Unsaved)' ) }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t<time\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__date\"\n\t\t\t\t\t\t\t\t\t\t\tdateTime={ modified }\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ displayDate }\n\t\t\t\t\t\t\t\t\t\t</time>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t<span className=\"edit-site-global-styles-screen-revisions__meta\">\n\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\talt={ authorDisplayName }\n\t\t\t\t\t\t\t\t\t\t\tsrc={ authorAvatar }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t{ authorDisplayName }\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t\t\t\t\t<ChangesSummary\n\t\t\t\t\t\t\t\t\t\t\trevision={ revision }\n\t\t\t\t\t\t\t\t\t\t\tpreviousRevision={\n\t\t\t\t\t\t\t\t\t\t\t\tindex < userRevisions.length\n\t\t\t\t\t\t\t\t\t\t\t\t\t? userRevisions[ index + 1 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t\t\t}\n\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</span>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ isSelected &&\n\t\t\t\t\t\t\t( areStylesEqual ? (\n\t\t\t\t\t\t\t\t<p className=\"edit-site-global-styles-screen-revisions__applied-text\">\n\t\t\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t\t\t'These styles are already applied to your site.'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__apply-button\"\n\t\t\t\t\t\t\t\t\tonClick={ onApplyRevision }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ isReset\n\t\t\t\t\t\t\t\t\t\t? __( 'Reset to defaults' )\n\t\t\t\t\t\t\t\t\t\t: __( 'Apply' ) }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t</li>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ol>\n\t);\n}\n\nexport default RevisionsButtons;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst previous = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.6 7l-1.1-1L5 12l5.5 6 1.1-1L7 12l4.6-5zm6 0l-1.1-1-5.5 6 5.5 6 1.1-1-4.6-5 4.6-5z\" />\n\t</SVG>\n);\n\nexport default previous;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst next = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M6.6 6L5.4 7l4.5 5-4.5 5 1.1 1 5.5-6-5.4-6zm6 0l-1.1 1 4.5 5-4.5 5 1.1 1 5.5-6-5.5-6z\" />\n\t</SVG>\n);\n\nexport default next;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalText as Text,\n\tButton,\n} from '@wordpress/components';\nimport { __, _x, _n, sprintf } from '@wordpress/i18n';\nimport { previous, chevronLeft, chevronRight, next } from '@wordpress/icons';\n\nexport default function Pagination( {\n\tcurrentPage,\n\tnumPages,\n\tchangePage,\n\ttotalItems,\n\tclassName,\n\tdisabled = false,\n\tbuttonVariant = 'tertiary',\n\tlabel = __( 'Pagination Navigation' ),\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\texpanded={ false }\n\t\t\tas=\"nav\"\n\t\t\taria-label={ label }\n\t\t\tspacing={ 3 }\n\t\t\tjustify=\"flex-start\"\n\t\t\tclassName={ clsx( 'edit-site-pagination', className ) }\n\t\t>\n\t\t\t<Text variant=\"muted\" className=\"edit-site-pagination__total\">\n\t\t\t\t{\n\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\tsprintf(\n\t\t\t\t\t\t// translators: %s: Total number of patterns.\n\t\t\t\t\t\t_n( '%s item', '%s items', totalItems ),\n\t\t\t\t\t\ttotalItems\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</Text>\n\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === 1 }\n\t\t\t\t\tlabel={ __( 'First page' ) }\n\t\t\t\t\ticon={ previous }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( currentPage - 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === 1 }\n\t\t\t\t\tlabel={ __( 'Previous page' ) }\n\t\t\t\t\ticon={ chevronLeft }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t\t<Text variant=\"muted\">\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %1$s: Current page number, %2$s: Total number of pages.\n\t\t\t\t\t_x( '%1$s of %2$s', 'paging' ),\n\t\t\t\t\tcurrentPage,\n\t\t\t\t\tnumPages\n\t\t\t\t) }\n\t\t\t</Text>\n\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( currentPage + 1 ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === numPages }\n\t\t\t\t\tlabel={ __( 'Next page' ) }\n\t\t\t\t\ticon={ chevronRight }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tvariant={ buttonVariant }\n\t\t\t\t\tonClick={ () => changePage( numPages ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ disabled || currentPage === numPages }\n\t\t\t\t\tlabel={ __( 'Last page' ) }\n\t\t\t\t\ticon={ next }\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport {\n\t__experimentalUseNavigator as useNavigator,\n\t__experimentalConfirmDialog as ConfirmDialog,\n\tSpinner,\n} from '@wordpress/components';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useContext, useState, useEffect } from '@wordpress/element';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport ScreenHeader from '../header';\nimport { unlock } from '../../../lock-unlock';\nimport Revisions from '../../revisions';\nimport { store as editSiteStore } from '../../../store';\nimport useGlobalStylesRevisions from './use-global-styles-revisions';\nimport RevisionsButtons from './revisions-buttons';\nimport StyleBook from '../../style-book';\nimport Pagination from '../../pagination';\n\nconst { GlobalStylesContext, areGlobalStyleConfigsEqual } = unlock(\n\tblockEditorPrivateApis\n);\n\nconst PAGE_SIZE = 10;\n\nfunction ScreenRevisions() {\n\tconst { goTo } = useNavigator();\n\tconst { user: currentEditorGlobalStyles, setUserConfig } =\n\t\tuseContext( GlobalStylesContext );\n\tconst { blocks, editorCanvasContainerView } = useSelect(\n\t\t( select ) => ( {\n\t\t\teditorCanvasContainerView: unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t).getEditorCanvasContainerView(),\n\t\t\tblocks: select( blockEditorStore ).getBlocks(),\n\t\t} ),\n\t\t[]\n\t);\n\tconst [ currentPage, setCurrentPage ] = useState( 1 );\n\tconst [ currentRevisions, setCurrentRevisions ] = useState( [] );\n\tconst { revisions, isLoading, hasUnsavedChanges, revisionsCount } =\n\t\tuseGlobalStylesRevisions( {\n\t\t\tquery: {\n\t\t\t\tper_page: PAGE_SIZE,\n\t\t\t\tpage: currentPage,\n\t\t\t},\n\t\t} );\n\n\tconst numPages = Math.ceil( revisionsCount / PAGE_SIZE );\n\n\tconst [ currentlySelectedRevision, setCurrentlySelectedRevision ] =\n\t\tuseState( currentEditorGlobalStyles );\n\tconst [\n\t\tisLoadingRevisionWithUnsavedChanges,\n\t\tsetIsLoadingRevisionWithUnsavedChanges,\n\t] = useState( false );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst selectedRevisionMatchesEditorStyles = areGlobalStyleConfigsEqual(\n\t\tcurrentlySelectedRevision,\n\t\tcurrentEditorGlobalStyles\n\t);\n\n\tconst onCloseRevisions = () => {\n\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\tconst canvasContainerView =\n\t\t\teditorCanvasContainerView === 'global-styles-revisions:style-book'\n\t\t\t\t? 'style-book'\n\t\t\t\t: undefined;\n\t\tsetEditorCanvasContainerView( canvasContainerView );\n\t};\n\n\tconst restoreRevision = ( revision ) => {\n\t\tsetUserConfig( () => revision );\n\t\tsetIsLoadingRevisionWithUnsavedChanges( false );\n\t\tonCloseRevisions();\n\t};\n\n\tuseEffect( () => {\n\t\tif (\n\t\t\t! editorCanvasContainerView ||\n\t\t\t! editorCanvasContainerView.startsWith( 'global-styles-revisions' )\n\t\t) {\n\t\t\tgoTo( '/' ); // Return to global styles main panel.\n\t\t}\n\t}, [ editorCanvasContainerView ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isLoading && revisions.length ) {\n\t\t\tsetCurrentRevisions( revisions );\n\t\t}\n\t}, [ revisions, isLoading ] );\n\n\tconst firstRevision = revisions[ 0 ];\n\tconst currentlySelectedRevisionId = currentlySelectedRevision?.id;\n\tconst shouldSelectFirstItem =\n\t\t!! firstRevision?.id &&\n\t\t! selectedRevisionMatchesEditorStyles &&\n\t\t! currentlySelectedRevisionId;\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * Ensure that the first item is selected and loaded into the preview pane\n\t\t * when no revision is selected and the selected styles don't match the current editor styles.\n\t\t * This is required in case editor styles are changed outside the revisions panel,\n\t\t * e.g., via the reset styles function of useGlobalStylesReset().\n\t\t * See: https://github.com/WordPress/gutenberg/issues/55866\n\t\t */\n\t\tif ( shouldSelectFirstItem ) {\n\t\t\tsetCurrentlySelectedRevision( firstRevision );\n\t\t}\n\t}, [ shouldSelectFirstItem, firstRevision ] );\n\n\t// Only display load button if there is a revision to load,\n\t// and it is different from the current editor styles.\n\tconst isLoadButtonEnabled =\n\t\t!! currentlySelectedRevisionId &&\n\t\tcurrentlySelectedRevisionId !== 'unsaved' &&\n\t\t! selectedRevisionMatchesEditorStyles;\n\tconst hasRevisions = !! currentRevisions.length;\n\n\treturn (\n\t\t<>\n\t\t\t<ScreenHeader\n\t\t\t\ttitle={\n\t\t\t\t\trevisionsCount &&\n\t\t\t\t\t// translators: %s: number of revisions.\n\t\t\t\t\tsprintf( __( 'Revisions (%s)' ), revisionsCount )\n\t\t\t\t}\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Click on previously saved styles to preview them. To restore a selected version to the editor, hit \"Apply.\" When you\\'re ready, use the Save button to save your changes.'\n\t\t\t\t) }\n\t\t\t\tonBack={ onCloseRevisions }\n\t\t\t/>\n\t\t\t{ ! hasRevisions && (\n\t\t\t\t<Spinner className=\"edit-site-global-styles-screen-revisions__loading\" />\n\t\t\t) }\n\t\t\t{ hasRevisions &&\n\t\t\t\t( editorCanvasContainerView ===\n\t\t\t\t'global-styles-revisions:style-book' ? (\n\t\t\t\t\t<StyleBook\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tisSelected={ () => {} }\n\t\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t'global-styles-revisions'\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\t\t<Revisions\n\t\t\t\t\t\tblocks={ blocks }\n\t\t\t\t\t\tuserConfig={ currentlySelectedRevision }\n\t\t\t\t\t\tcloseButtonLabel={ __( 'Close revisions' ) }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t<RevisionsButtons\n\t\t\t\tonChange={ setCurrentlySelectedRevision }\n\t\t\t\tselectedRevisionId={ currentlySelectedRevisionId }\n\t\t\t\tuserRevisions={ currentRevisions }\n\t\t\t\tcanApplyRevision={ isLoadButtonEnabled }\n\t\t\t\tonApplyRevision={ () =>\n\t\t\t\t\thasUnsavedChanges\n\t\t\t\t\t\t? setIsLoadingRevisionWithUnsavedChanges( true )\n\t\t\t\t\t\t: restoreRevision( currentlySelectedRevision )\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ numPages > 1 && (\n\t\t\t\t<div className=\"edit-site-global-styles-screen-revisions__footer\">\n\t\t\t\t\t<Pagination\n\t\t\t\t\t\tclassName=\"edit-site-global-styles-screen-revisions__pagination\"\n\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\tnumPages={ numPages }\n\t\t\t\t\t\tchangePage={ setCurrentPage }\n\t\t\t\t\t\ttotalItems={ revisionsCount }\n\t\t\t\t\t\tdisabled={ isLoading }\n\t\t\t\t\t\tlabel={ __( 'Global Styles pagination navigation' ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ isLoadingRevisionWithUnsavedChanges && (\n\t\t\t\t<ConfirmDialog\n\t\t\t\t\tisOpen={ isLoadingRevisionWithUnsavedChanges }\n\t\t\t\t\tconfirmButtonText={ __( 'Apply' ) }\n\t\t\t\t\tonConfirm={ () =>\n\t\t\t\t\t\trestoreRevision( currentlySelectedRevision )\n\t\t\t\t\t}\n\t\t\t\t\tonCancel={ () =>\n\t\t\t\t\t\tsetIsLoadingRevisionWithUnsavedChanges( false )\n\t\t\t\t\t}\n\t\t\t\t\tsize=\"medium\"\n\t\t\t\t>\n\t\t\t\t\t{ __(\n\t\t\t\t\t\t'Are you sure you want to apply this revision? Any unsaved changes will be lost.'\n\t\t\t\t\t) }\n\t\t\t\t</ConfirmDialog>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default ScreenRevisions;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalNavigatorProvider as NavigatorProvider,\n\t__experimentalNavigatorScreen as NavigatorScreen,\n\t__experimentalUseNavigator as useNavigator,\n\tcreateSlotFill,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n} from '@wordpress/components';\nimport { getBlockTypes, store as blocksStore } from '@wordpress/blocks';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n} from '@wordpress/block-editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { moreVertical } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ScreenRoot from './screen-root';\nimport {\n\tuseBlockHasGlobalStyles,\n\tdefault as ScreenBlockList,\n} from './screen-block-list';\nimport ScreenBlock from './screen-block';\nimport ScreenTypography from './screen-typography';\nimport ScreenTypographyElement from './screen-typography-element';\nimport FontSize from './font-sizes/font-size';\nimport FontSizes from './font-sizes/font-sizes';\nimport ScreenColors from './screen-colors';\nimport ScreenColorPalette from './screen-color-palette';\nimport { ScreenShadows, ScreenShadowsEdit } from './screen-shadows';\nimport ScreenLayout from './screen-layout';\nimport ScreenStyleVariations from './screen-style-variations';\nimport StyleBook from '../style-book';\nimport ScreenCSS from './screen-css';\nimport ScreenRevisions from './screen-revisions';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nconst SLOT_FILL_NAME = 'GlobalStylesMenu';\nconst { useGlobalStylesReset } = unlock( blockEditorPrivateApis );\nconst { Slot: GlobalStylesMenuSlot, Fill: GlobalStylesMenuFill } =\n\tcreateSlotFill( SLOT_FILL_NAME );\n\nfunction GlobalStylesActionMenu() {\n\tconst [ canReset, onReset ] = useGlobalStylesReset();\n\tconst { toggle } = useDispatch( preferencesStore );\n\tconst { canEditCSS } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tcanEditCSS: !! globalStyles?._links?.[ 'wp:action-edit-css' ],\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { goTo } = useNavigator();\n\tconst loadCustomCSS = () => {\n\t\tsetEditorCanvasContainerView( 'global-styles-css' );\n\t\tgoTo( '/css' );\n\t};\n\n\treturn (\n\t\t<GlobalStylesMenuFill>\n\t\t\t<DropdownMenu\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tlabel={ __( 'More' ) }\n\t\t\t\ttoggleProps={ { size: 'compact' } }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t{ canEditCSS && (\n\t\t\t\t\t\t\t\t<MenuItem onClick={ loadCustomCSS }>\n\t\t\t\t\t\t\t\t\t{ __( 'Additional CSS' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\ttoggle(\n\t\t\t\t\t\t\t\t\t\t'core/edit-site',\n\t\t\t\t\t\t\t\t\t\t'welcomeGuideStyles'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Welcome Guide' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonReset();\n\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tdisabled={ ! canReset }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Reset styles' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t</GlobalStylesMenuFill>\n\t);\n}\n\nfunction GlobalStylesNavigationScreen( { className, ...props } ) {\n\treturn (\n\t\t<NavigatorScreen\n\t\t\tclassName={ [\n\t\t\t\t'edit-site-global-styles-sidebar__navigator-screen',\n\t\t\t\tclassName,\n\t\t\t]\n\t\t\t\t.filter( Boolean )\n\t\t\t\t.join( ' ' ) }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nfunction BlockStylesNavigationScreens( {\n\tparentMenu,\n\tblockStyles,\n\tblockName,\n} ) {\n\treturn blockStyles.map( ( style, index ) => (\n\t\t<GlobalStylesNavigationScreen\n\t\t\tkey={ index }\n\t\t\tpath={ parentMenu + '/variations/' + style.name }\n\t\t>\n\t\t\t<ScreenBlock name={ blockName } variation={ style.name } />\n\t\t</GlobalStylesNavigationScreen>\n\t) );\n}\n\nfunction ContextScreens( { name, parentMenu = '' } ) {\n\tconst blockStyleVariations = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockStyles } = select( blocksStore );\n\t\t\treturn getBlockStyles( name );\n\t\t},\n\t\t[ name ]\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\tpath={ parentMenu + '/colors/palette' }\n\t\t\t>\n\t\t\t\t<ScreenColorPalette name={ name } />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ !! blockStyleVariations?.length && (\n\t\t\t\t<BlockStylesNavigationScreens\n\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\tblockStyles={ blockStyleVariations }\n\t\t\t\t\tblockName={ name }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction GlobalStylesStyleBook() {\n\tconst navigator = useNavigator();\n\tconst { path } = navigator.location;\n\treturn (\n\t\t<StyleBook\n\t\t\tisSelected={ ( blockName ) =>\n\t\t\t\t// Match '/blocks/core%2Fbutton' and\n\t\t\t\t// '/blocks/core%2Fbutton/typography', but not\n\t\t\t\t// '/blocks/core%2Fbuttons'.\n\t\t\t\tpath === `/blocks/${ encodeURIComponent( blockName ) }` ||\n\t\t\t\tpath.startsWith(\n\t\t\t\t\t`/blocks/${ encodeURIComponent( blockName ) }/`\n\t\t\t\t)\n\t\t\t}\n\t\t\tonSelect={ ( blockName ) => {\n\t\t\t\t// Now go to the selected block.\n\t\t\t\tnavigator.goTo( '/blocks/' + encodeURIComponent( blockName ) );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nfunction GlobalStylesBlockLink() {\n\tconst navigator = useNavigator();\n\tconst { selectedBlockName, selectedBlockClientId } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSelectedBlockClientId, getBlockName } =\n\t\t\t\tselect( blockEditorStore );\n\t\t\tconst clientId = getSelectedBlockClientId();\n\t\t\treturn {\n\t\t\t\tselectedBlockName: getBlockName( clientId ),\n\t\t\t\tselectedBlockClientId: clientId,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst blockHasGlobalStyles = useBlockHasGlobalStyles( selectedBlockName );\n\t// When we're in the `Blocks` screen enable deep linking to the selected block.\n\tuseEffect( () => {\n\t\tif ( ! selectedBlockClientId || ! blockHasGlobalStyles ) {\n\t\t\treturn;\n\t\t}\n\t\tconst currentPath = navigator.location.path;\n\t\tif (\n\t\t\tcurrentPath !== '/blocks' &&\n\t\t\t! currentPath.startsWith( '/blocks/' )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconst newPath = '/blocks/' + encodeURIComponent( selectedBlockName );\n\t\t// Avoid navigating to the same path. This can happen when selecting\n\t\t// a new block of the same type.\n\t\tif ( newPath !== currentPath ) {\n\t\t\tnavigator.goTo( newPath, { skipFocus: true } );\n\t\t}\n\t}, [ selectedBlockClientId, selectedBlockName, blockHasGlobalStyles ] );\n}\n\nfunction GlobalStylesEditorCanvasContainerLink() {\n\tconst { goTo, location } = useNavigator();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\tconst path = location?.path;\n\tconst isRevisionsOpen = path === '/revisions';\n\n\t// If the user switches the editor canvas container view, redirect\n\t// to the appropriate screen. This effectively allows deep linking to the\n\t// desired screens from outside the global styles navigation provider.\n\tuseEffect( () => {\n\t\tswitch ( editorCanvasContainerView ) {\n\t\t\tcase 'global-styles-revisions':\n\t\t\tcase 'global-styles-revisions:style-book':\n\t\t\t\tgoTo( '/revisions' );\n\t\t\t\tbreak;\n\t\t\tcase 'global-styles-css':\n\t\t\t\tgoTo( '/css' );\n\t\t\t\tbreak;\n\t\t\tcase 'style-book':\n\t\t\t\t/*\n\t\t\t\t * The stand-alone style book is open\n\t\t\t\t * and the revisions panel is open,\n\t\t\t\t * close the revisions panel.\n\t\t\t\t * Otherwise keep the style book open while\n\t\t\t\t * browsing global styles panel.\n\t\t\t\t */\n\t\t\t\tif ( isRevisionsOpen ) {\n\t\t\t\t\tgoTo( '/' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t/*\n\t\t\t\t * Example: the user has navigated to \"Browse styles\" or elsewhere\n\t\t\t\t * and changes the editorCanvasContainerView, e.g., closes the style book.\n\t\t\t\t * The panel should not be affected.\n\t\t\t\t * Exclude revisions panel from this behavior,\n\t\t\t\t * as it should close when the editorCanvasContainerView doesn't correspond.\n\t\t\t\t */\n\t\t\t\tif ( path !== '/' && ! isRevisionsOpen ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgoTo( '/' );\n\t\t\t\tbreak;\n\t\t}\n\t}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );\n}\n\nfunction GlobalStylesUI() {\n\tconst blocks = getBlockTypes();\n\tconst editorCanvasContainerView = useSelect(\n\t\t( select ) =>\n\t\t\tunlock( select( editSiteStore ) ).getEditorCanvasContainerView(),\n\t\t[]\n\t);\n\treturn (\n\t\t<NavigatorProvider\n\t\t\tclassName=\"edit-site-global-styles-sidebar__navigator-provider\"\n\t\t\tinitialPath=\"/\"\n\t\t>\n\t\t\t<GlobalStylesNavigationScreen path=\"/\">\n\t\t\t\t<ScreenRoot />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/variations\">\n\t\t\t\t<ScreenStyleVariations />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/blocks\">\n\t\t\t\t<ScreenBlockList />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography\">\n\t\t\t\t<ScreenTypography />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/\">\n\t\t\t\t<FontSizes />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/font-sizes/:origin/:slug\">\n\t\t\t\t<FontSize />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/text\">\n\t\t\t\t<ScreenTypographyElement element=\"text\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/link\">\n\t\t\t\t<ScreenTypographyElement element=\"link\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/heading\">\n\t\t\t\t<ScreenTypographyElement element=\"heading\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/caption\">\n\t\t\t\t<ScreenTypographyElement element=\"caption\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/typography/button\">\n\t\t\t\t<ScreenTypographyElement element=\"button\" />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/colors\">\n\t\t\t\t<ScreenColors />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows\">\n\t\t\t\t<ScreenShadows />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/shadows/edit/:category/:slug\">\n\t\t\t\t<ScreenShadowsEdit />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/layout\">\n\t\t\t\t<ScreenLayout />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/css\">\n\t\t\t\t<ScreenCSS />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t<GlobalStylesNavigationScreen path=\"/revisions\">\n\t\t\t\t<ScreenRevisions />\n\t\t\t</GlobalStylesNavigationScreen>\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<GlobalStylesNavigationScreen\n\t\t\t\t\tkey={ 'menu-block-' + block.name }\n\t\t\t\t\tpath={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t>\n\t\t\t\t\t<ScreenBlock name={ block.name } />\n\t\t\t\t</GlobalStylesNavigationScreen>\n\t\t\t) ) }\n\n\t\t\t<ContextScreens />\n\n\t\t\t{ blocks.map( ( block ) => (\n\t\t\t\t<ContextScreens\n\t\t\t\t\tkey={ 'screens-block-' + block.name }\n\t\t\t\t\tname={ block.name }\n\t\t\t\t\tparentMenu={ '/blocks/' + encodeURIComponent( block.name ) }\n\t\t\t\t/>\n\t\t\t) ) }\n\n\t\t\t{ 'style-book' === editorCanvasContainerView && (\n\t\t\t\t<GlobalStylesStyleBook />\n\t\t\t) }\n\n\t\t\t<GlobalStylesActionMenu />\n\t\t\t<GlobalStylesBlockLink />\n\t\t\t<GlobalStylesEditorCanvasContainerLink />\n\t\t</NavigatorProvider>\n\t);\n}\nexport { GlobalStylesMenuSlot };\nexport default GlobalStylesUI;\n","/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { ComplementaryArea, ComplementaryAreaMoreMenuItem } =\n\tunlock( editorPrivateApis );\n\nexport default function DefaultSidebar( {\n\tclassName,\n\tidentifier,\n\ttitle,\n\ticon,\n\tchildren,\n\tcloseLabel,\n\theader,\n\theaderClassName,\n\tpanelClassName,\n\tisActiveByDefault,\n} ) {\n\treturn (\n\t\t<>\n\t\t\t<ComplementaryArea\n\t\t\t\tclassName={ className }\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ttitle={ title }\n\t\t\t\tsmallScreenTitle={ title }\n\t\t\t\ticon={ icon }\n\t\t\t\tcloseLabel={ closeLabel }\n\t\t\t\theader={ header }\n\t\t\t\theaderClassName={ headerClassName }\n\t\t\t\tpanelClassName={ panelClassName }\n\t\t\t\tisActiveByDefault={ isActiveByDefault }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</ComplementaryArea>\n\t\t\t<ComplementaryAreaMoreMenuItem\n\t\t\t\tscope=\"core\"\n\t\t\t\tidentifier={ identifier }\n\t\t\t\ticon={ icon }\n\t\t\t>\n\t\t\t\t{ title }\n\t\t\t</ComplementaryAreaMoreMenuItem>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tFlexItem,\n\tFlexBlock,\n\tFlex,\n\tButton,\n\t__experimentalUseNavigator as useNavigator,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { styles, seen, backup } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { GlobalStylesUI } from '../global-styles';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesMenuSlot } from '../global-styles/ui';\nimport { unlock } from '../../lock-unlock';\nimport { store as coreStore } from '@wordpress/core-data';\nimport DefaultSidebar from './default-sidebar';\n\nconst { interfaceStore } = unlock( editorPrivateApis );\n\nexport default function GlobalStylesSidebar() {\n\tconst {\n\t\tshouldClearCanvasContainerView,\n\t\tisStyleBookOpened,\n\t\tshowListViewByDefault,\n\t\thasRevisions,\n\t\tisRevisionsOpened,\n\t\tisRevisionsStyleBookOpened,\n\t} = useSelect( ( select ) => {\n\t\tconst { getActiveComplementaryArea } = select( interfaceStore );\n\t\tconst { getEditorCanvasContainerView, getCanvasMode } = unlock(\n\t\t\tselect( editSiteStore )\n\t\t);\n\t\tconst canvasContainerView = getEditorCanvasContainerView();\n\t\tconst _isVisualEditorMode =\n\t\t\t'visual' === select( editorStore ).getEditorMode();\n\t\tconst _isEditCanvasMode = 'edit' === getCanvasMode();\n\t\tconst _showListViewByDefault = select( preferencesStore ).get(\n\t\t\t'core',\n\t\t\t'showListViewByDefault'\n\t\t);\n\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\tselect( coreStore );\n\n\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\tconst globalStyles = globalStylesId\n\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t: undefined;\n\n\t\treturn {\n\t\t\tisStyleBookOpened: 'style-book' === canvasContainerView,\n\t\t\tshouldClearCanvasContainerView:\n\t\t\t\t'edit-site/global-styles' !==\n\t\t\t\t\tgetActiveComplementaryArea( 'core' ) ||\n\t\t\t\t! _isVisualEditorMode ||\n\t\t\t\t! _isEditCanvasMode,\n\t\t\tshowListViewByDefault: _showListViewByDefault,\n\t\t\thasRevisions:\n\t\t\t\t!! globalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count,\n\t\t\tisRevisionsStyleBookOpened:\n\t\t\t\t'global-styles-revisions:style-book' === canvasContainerView,\n\t\t\tisRevisionsOpened:\n\t\t\t\t'global-styles-revisions' === canvasContainerView,\n\t\t};\n\t}, [] );\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\tuseEffect( () => {\n\t\tif ( shouldClearCanvasContainerView ) {\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t}\n\t}, [ shouldClearCanvasContainerView ] );\n\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst { goTo } = useNavigator();\n\n\tconst toggleRevisions = () => {\n\t\tsetIsListViewOpened( false );\n\t\tif ( isRevisionsStyleBookOpened ) {\n\t\t\tgoTo( '/' );\n\t\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\t\treturn;\n\t\t}\n\t\tif ( isRevisionsOpened ) {\n\t\t\tgoTo( '/' );\n\t\t\tsetEditorCanvasContainerView( undefined );\n\t\t\treturn;\n\t\t}\n\t\tgoTo( '/revisions' );\n\n\t\tif ( isStyleBookOpened ) {\n\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t'global-styles-revisions:style-book'\n\t\t\t);\n\t\t} else {\n\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t}\n\t};\n\tconst toggleStyleBook = () => {\n\t\tif ( isRevisionsOpened ) {\n\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t'global-styles-revisions:style-book'\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tif ( isRevisionsStyleBookOpened ) {\n\t\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t\t\treturn;\n\t\t}\n\t\tsetIsListViewOpened( isStyleBookOpened && showListViewByDefault );\n\t\tsetEditorCanvasContainerView(\n\t\t\tisStyleBookOpened ? undefined : 'style-book'\n\t\t);\n\t};\n\n\treturn (\n\t\t<DefaultSidebar\n\t\t\tclassName=\"edit-site-global-styles-sidebar\"\n\t\t\tidentifier=\"edit-site/global-styles\"\n\t\t\ttitle={ __( 'Styles' ) }\n\t\t\ticon={ styles }\n\t\t\tcloseLabel={ __( 'Close Styles' ) }\n\t\t\tpanelClassName=\"edit-site-global-styles-sidebar__panel\"\n\t\t\theader={\n\t\t\t\t<Flex\n\t\t\t\t\tclassName=\"edit-site-global-styles-sidebar__header\"\n\t\t\t\t\tgap={ 1 }\n\t\t\t\t>\n\t\t\t\t\t<FlexBlock style={ { minWidth: 'min-content' } }>\n\t\t\t\t\t\t<h2 className=\"edit-site-global-styles-sidebar__header-title\">\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</FlexBlock>\n\t\t\t\t\t<FlexItem>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisStyleBookOpened || isRevisionsStyleBookOpened\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ shouldClearCanvasContainerView }\n\t\t\t\t\t\t\tonClick={ toggleStyleBook }\n\t\t\t\t\t\t\tsize=\"compact\"\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<Button\n\t\t\t\t\t\t\tlabel={ __( 'Revisions' ) }\n\t\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t\t\tonClick={ toggleRevisions }\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ ! hasRevisions }\n\t\t\t\t\t\t\tisPressed={\n\t\t\t\t\t\t\t\tisRevisionsOpened || isRevisionsStyleBookOpened\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</FlexItem>\n\t\t\t\t\t<GlobalStylesMenuSlot />\n\t\t\t\t</Flex>\n\t\t\t}\n\t\t>\n\t\t\t<GlobalStylesUI />\n\t\t</DefaultSidebar>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst download = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z\" />\n\t</SVG>\n);\n\nexport default download;\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"blob\"];","/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { MenuItem } from '@wordpress/components';\nimport apiFetch from '@wordpress/api-fetch';\nimport { download } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { downloadBlob } from '@wordpress/blob';\nimport { store as noticesStore } from '@wordpress/notices';\n\nexport default function SiteExport() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tasync function handleExport() {\n\t\ttry {\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: '/wp-block-editor/v1/export',\n\t\t\t\tparse: false,\n\t\t\t\theaders: {\n\t\t\t\t\tAccept: 'application/zip',\n\t\t\t\t},\n\t\t\t} );\n\t\t\tconst blob = await response.blob();\n\t\t\tconst contentDisposition = response.headers.get(\n\t\t\t\t'content-disposition'\n\t\t\t);\n\t\t\tconst contentDispositionMatches =\n\t\t\t\tcontentDisposition.match( /=(.+)\\.zip/ );\n\t\t\tconst fileName = contentDispositionMatches[ 1 ]\n\t\t\t\t? contentDispositionMatches[ 1 ]\n\t\t\t\t: 'edit-site-export';\n\n\t\t\tdownloadBlob( fileName + '.zip', blob, 'application/zip' );\n\t\t} catch ( errorResponse ) {\n\t\t\tlet error = {};\n\t\t\ttry {\n\t\t\t\terror = await errorResponse.json();\n\t\t\t} catch ( e ) {}\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the site export.' );\n\n\t\t\tcreateErrorNotice( errorMessage, { type: 'snackbar' } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<MenuItem\n\t\t\trole=\"menuitem\"\n\t\t\ticon={ download }\n\t\t\tonClick={ handleExport }\n\t\t\tinfo={ __(\n\t\t\t\t'Download your theme with updated templates and styles.'\n\t\t\t) }\n\t\t>\n\t\t\t{ _x( 'Export', 'site exporter menu item' ) }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch } from '@wordpress/data';\nimport { MenuItem } from '@wordpress/components';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\nexport default function WelcomeGuideMenuItem() {\n\tconst { toggle } = useDispatch( preferencesStore );\n\n\treturn (\n\t\t<MenuItem onClick={ () => toggle( 'core/edit-site', 'welcomeGuide' ) }>\n\t\t\t{ __( 'Welcome Guide' ) }\n\t\t</MenuItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport SiteExport from './site-export';\nimport WelcomeGuideMenuItem from './welcome-guide-menu-item';\nimport { unlock } from '../../lock-unlock';\n\nconst { ToolsMoreMenuGroup, PreferencesModal } = unlock( editorPrivateApis );\n\nexport default function MoreMenu() {\n\tconst isBlockBasedTheme = useSelect( ( select ) => {\n\t\treturn select( coreStore ).getCurrentTheme().is_block_theme;\n\t}, [] );\n\n\treturn (\n\t\t<>\n\t\t\t<ToolsMoreMenuGroup>\n\t\t\t\t{ isBlockBasedTheme && <SiteExport /> }\n\t\t\t\t<WelcomeGuideMenuItem />\n\t\t\t</ToolsMoreMenuGroup>\n\t\t\t<PreferencesModal />\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useRef } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { speak } from '@wordpress/a11y';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useTitle( title ) {\n\tconst location = useLocation();\n\tconst siteTitle = useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecord( 'root', 'site' )?.title,\n\t\t[]\n\t);\n\tconst isInitialLocationRef = useRef( true );\n\n\tuseEffect( () => {\n\t\tisInitialLocationRef.current = false;\n\t}, [ location ] );\n\n\tuseEffect( () => {\n\t\t// Don't update or announce the title for initial page load.\n\t\tif ( isInitialLocationRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( title && siteTitle ) {\n\t\t\t// @see https://github.com/WordPress/wordpress-develop/blob/94849898192d271d533e09756007e176feb80697/src/wp-admin/admin-header.php#L67-L68\n\t\t\tconst formattedTitle = sprintf(\n\t\t\t\t/* translators: Admin document title. 1: Admin screen name, 2: Network or site name. */\n\t\t\t\t__( '%1$s ‹ %2$s ‹ Editor — WordPress' ),\n\t\t\t\tdecodeEntities( title ),\n\t\t\t\tdecodeEntities( siteTitle )\n\t\t\t);\n\n\t\t\tdocument.title = formattedTitle;\n\n\t\t\t// Announce title on route change for screen readers.\n\t\t\tspeak( title, 'assertive' );\n\t\t}\n\t}, [ title, siteTitle, location ] );\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useEditedEntityRecord from '../use-edited-entity-record';\nimport useTitle from '../routes/use-title';\nimport { POST_TYPE_LABELS, TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nfunction useEditorTitle() {\n\tconst {\n\t\trecord: editedPost,\n\t\tgetTitle,\n\t\tisLoaded: hasLoadedPost,\n\t} = useEditedEntityRecord();\n\tlet title;\n\tif ( hasLoadedPost ) {\n\t\ttitle = sprintf(\n\t\t\t// translators: A breadcrumb trail for the Admin document title. %1$s: title of template being edited, %2$s: type of template (Template or Template Part).\n\t\t\t__( '%1$s ‹ %2$s' ),\n\t\t\tgetTitle(),\n\t\t\tPOST_TYPE_LABELS[ editedPost.type ] ??\n\t\t\t\tPOST_TYPE_LABELS[ TEMPLATE_POST_TYPE ]\n\t\t);\n\t}\n\n\t// Only announce the title once the editor is ready to prevent \"Replace\"\n\t// action in <URLQueryController> from double-announcing.\n\tuseTitle( hasLoadedPost && title );\n}\n\nexport default useEditorTitle;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { Button } from '@wordpress/components';\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tEditorKeyboardShortcutsRegister,\n\tprivateApis as editorPrivateApis,\n\tstore as editorStore,\n} from '@wordpress/editor';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { privateApis as blockLibraryPrivateApis } from '@wordpress/block-library';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport WelcomeGuide from '../welcome-guide';\nimport { store as editSiteStore } from '../../store';\nimport { GlobalStylesRenderer } from '../global-styles-renderer';\nimport CanvasLoader from '../canvas-loader';\nimport { unlock } from '../../lock-unlock';\nimport { useSpecificEditorSettings } from '../block-editor/use-site-editor-settings';\nimport PluginTemplateSettingPanel from '../plugin-template-setting-panel';\nimport GlobalStylesSidebar from '../global-styles-sidebar';\nimport { isPreviewingTheme } from '../../utils/is-previewing-theme';\nimport {\n\tgetEditorCanvasContainerTitleAndIcon,\n\tuseHasEditorCanvasContainer,\n} from '../editor-canvas-container';\nimport SaveButton from '../save-button';\nimport SavePanel from '../save-panel';\nimport SiteEditorMoreMenu from '../more-menu';\nimport SiteIcon from '../site-icon';\nimport useEditorIframeProps from '../block-editor/use-editor-iframe-props';\nimport useEditorTitle from './use-editor-title';\nimport { useIsSiteEditorLoading } from '../layout/hooks';\n\nconst { Editor, BackButton } = unlock( editorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\nconst { BlockKeyboardShortcuts } = unlock( blockLibraryPrivateApis );\n\nexport default function EditSiteEditor( { isPostsList = false } ) {\n\tconst { params } = useLocation();\n\tconst isLoading = useIsSiteEditorLoading();\n\tconst {\n\t\teditedPostType,\n\t\teditedPostId,\n\t\tcontextPostType,\n\t\tcontextPostId,\n\t\tcanvasMode,\n\t\tisEditingPage,\n\t\tsupportsGlobalStyles,\n\t\tshowIconLabels,\n\t\teditorCanvasView,\n\t\tcurrentPostIsTrashed,\n\t} = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetEditorCanvasContainerView,\n\t\t\tgetEditedPostContext,\n\t\t\tgetCanvasMode,\n\t\t\tisPage,\n\t\t\tgetEditedPostType,\n\t\t\tgetEditedPostId,\n\t\t} = unlock( select( editSiteStore ) );\n\t\tconst { get } = select( preferencesStore );\n\t\tconst { getCurrentTheme } = select( coreDataStore );\n\t\tconst _context = getEditedPostContext();\n\n\t\t// The currently selected entity to display.\n\t\t// Typically template or template part in the site editor.\n\t\treturn {\n\t\t\teditedPostType: getEditedPostType(),\n\t\t\teditedPostId: getEditedPostId(),\n\t\t\tcontextPostType: _context?.postId ? _context.postType : undefined,\n\t\t\tcontextPostId: _context?.postId ? _context.postId : undefined,\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tisEditingPage: isPage(),\n\t\t\tsupportsGlobalStyles: getCurrentTheme()?.is_block_theme,\n\t\t\tshowIconLabels: get( 'core', 'showIconLabels' ),\n\t\t\teditorCanvasView: getEditorCanvasContainerView(),\n\t\t\tcurrentPostIsTrashed:\n\t\t\t\tselect( editorStore ).getCurrentPostAttribute( 'status' ) ===\n\t\t\t\t'trash',\n\t\t};\n\t}, [] );\n\tuseEditorTitle();\n\tconst _isPreviewingTheme = isPreviewingTheme();\n\tconst hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer();\n\tconst iframeProps = useEditorIframeProps();\n\tconst isEditMode = canvasMode === 'edit';\n\tconst postWithTemplate = !! contextPostId;\n\tconst loadingProgressId = useInstanceId(\n\t\tCanvasLoader,\n\t\t'edit-site-editor__loading-progress'\n\t);\n\n\tconst settings = useSpecificEditorSettings();\n\tconst styles = useMemo(\n\t\t() => [\n\t\t\t...settings.styles,\n\t\t\t{\n\t\t\t\t// Forming a \"block formatting context\" to prevent margin collapsing.\n\t\t\t\t// @see https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context\n\t\t\t\tcss:\n\t\t\t\t\tcanvasMode === 'view'\n\t\t\t\t\t\t? `body{min-height: 100vh; ${\n\t\t\t\t\t\t\t\tcurrentPostIsTrashed ? '' : 'cursor: pointer;'\n\t\t\t\t\t\t }}`\n\t\t\t\t\t\t: undefined,\n\t\t\t},\n\t\t],\n\t\t[ settings.styles, canvasMode, currentPostIsTrashed ]\n\t);\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst { createSuccessNotice } = useDispatch( noticesStore );\n\tconst history = useHistory();\n\tconst onActionPerformed = useCallback(\n\t\t( actionId, items ) => {\n\t\t\tswitch ( actionId ) {\n\t\t\t\tcase 'move-to-trash':\n\t\t\t\tcase 'delete-post':\n\t\t\t\t\t{\n\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\tpostType: items[ 0 ].type,\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'duplicate-post':\n\t\t\t\t\t{\n\t\t\t\t\t\tconst newItem = items[ 0 ];\n\t\t\t\t\t\tconst _title =\n\t\t\t\t\t\t\ttypeof newItem.title === 'string'\n\t\t\t\t\t\t\t\t? newItem.title\n\t\t\t\t\t\t\t\t: newItem.title?.rendered;\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Post 1\".\n\t\t\t\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\t\t\t\tdecodeEntities( _title )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'duplicate-post-action',\n\t\t\t\t\t\t\t\tactions: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tlabel: __( 'Edit' ),\n\t\t\t\t\t\t\t\t\t\tonClick: () => {\n\t\t\t\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t\t\t\tpostId: newItem.id,\n\t\t\t\t\t\t\t\t\t\t\t\tpostType: newItem.type,\n\t\t\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\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}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t[ history, createSuccessNotice ]\n\t);\n\n\t// Replace the title and icon displayed in the DocumentBar when there's an overlay visible.\n\tconst { title, icon } =\n\t\tgetEditorCanvasContainerTitleAndIcon( editorCanvasView );\n\n\tconst isReady = ! isLoading;\n\n\treturn (\n\t\t<>\n\t\t\t<GlobalStylesRenderer />\n\t\t\t<EditorKeyboardShortcutsRegister />\n\t\t\t{ isEditMode && <BlockKeyboardShortcuts /> }\n\t\t\t{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }\n\t\t\t{ isEditMode && <WelcomeGuide /> }\n\t\t\t{ isReady && (\n\t\t\t\t<Editor\n\t\t\t\t\tpostType={\n\t\t\t\t\t\tpostWithTemplate ? contextPostType : editedPostType\n\t\t\t\t\t}\n\t\t\t\t\tpostId={ postWithTemplate ? contextPostId : editedPostId }\n\t\t\t\t\ttemplateId={ postWithTemplate ? editedPostId : undefined }\n\t\t\t\t\tsettings={ settings }\n\t\t\t\t\tclassName={ clsx( 'edit-site-editor__editor-interface', {\n\t\t\t\t\t\t'show-icon-labels': showIconLabels,\n\t\t\t\t\t} ) }\n\t\t\t\t\tstyles={ styles }\n\t\t\t\t\tenableRegionNavigation={ false }\n\t\t\t\t\tcustomSaveButton={\n\t\t\t\t\t\t_isPreviewingTheme && <SaveButton size=\"compact\" />\n\t\t\t\t\t}\n\t\t\t\t\tcustomSavePanel={ _isPreviewingTheme && <SavePanel /> }\n\t\t\t\t\tforceDisableBlockTools={ ! hasDefaultEditorCanvasView }\n\t\t\t\t\ttitle={ title }\n\t\t\t\t\ticon={ icon }\n\t\t\t\t\tiframeProps={ iframeProps }\n\t\t\t\t\tonActionPerformed={ onActionPerformed }\n\t\t\t\t\textraSidebarPanels={\n\t\t\t\t\t\t! isEditingPage && <PluginTemplateSettingPanel.Slot />\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ isEditMode && (\n\t\t\t\t\t\t<BackButton>\n\t\t\t\t\t\t\t{ ( { length } ) =>\n\t\t\t\t\t\t\t\tlength <= 1 && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Open Navigation' ) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"edit-site-layout__view-mode-toggle\"\n\t\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\t\tsetCanvasMode( 'view' );\n\t\t\t\t\t\t\t\t\t\t\t// TODO: this is a temporary solution to navigate to the posts list if we are\n\t\t\t\t\t\t\t\t\t\t\t// come here through `posts list` and are in focus mode editing a template, template part etc..\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tisPostsList &&\n\t\t\t\t\t\t\t\t\t\t\t\tparams?.focusMode\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t\t\t\t\tpage: 'gutenberg-posts-dashboard',\n\t\t\t\t\t\t\t\t\t\t\t\t\tpostType: 'post',\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\t\t<SiteIcon className=\"edit-site-layout__view-mode-toggle-icon\" />\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</BackButton>\n\t\t\t\t\t) }\n\t\t\t\t\t<SiteEditorMoreMenu />\n\t\t\t\t\t{ supportsGlobalStyles && <GlobalStylesSidebar /> }\n\t\t\t\t</Editor>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { ENTER, SPACE } from '@wordpress/keycodes';\nimport { useState, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function useEditorIframeProps() {\n\tconst { canvasMode, currentPostIsTrashed } = useSelect( ( select ) => {\n\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\tcurrentPostIsTrashed:\n\t\t\t\tselect( editorStore ).getCurrentPostAttribute( 'status' ) ===\n\t\t\t\t'trash',\n\t\t};\n\t}, [] );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tuseEffect( () => {\n\t\tif ( canvasMode === 'edit' ) {\n\t\t\tsetIsFocused( false );\n\t\t}\n\t}, [ canvasMode ] );\n\n\t// In view mode, make the canvas iframe be perceived and behave as a button\n\t// to switch to edit mode, with a meaningful label and no title attribute.\n\tconst viewModeIframeProps = {\n\t\t'aria-label': __( 'Edit' ),\n\t\t'aria-disabled': currentPostIsTrashed,\n\t\ttitle: null,\n\t\trole: 'button',\n\t\ttabIndex: 0,\n\t\tonFocus: () => setIsFocused( true ),\n\t\tonBlur: () => setIsFocused( false ),\n\t\tonKeyDown: ( event ) => {\n\t\t\tconst { keyCode } = event;\n\t\t\tif (\n\t\t\t\t( keyCode === ENTER || keyCode === SPACE ) &&\n\t\t\t\t! currentPostIsTrashed\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t}\n\t\t},\n\t\tonClick: () => {\n\t\t\tsetCanvasMode( 'edit' );\n\t\t},\n\t\tonClickCapture: ( event ) => {\n\t\t\tif ( currentPostIsTrashed ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t},\n\t\treadonly: true,\n\t};\n\n\treturn {\n\t\tclassName: clsx( 'edit-site-visual-editor__editor-canvas', {\n\t\t\t'is-focused': isFocused && canvasMode === 'view',\n\t\t} ),\n\t\t...( canvasMode === 'view' ? viewModeIframeProps : {} ),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Operator } from './types';\n\n// Filter operators.\nexport const OPERATOR_IS = 'is';\nexport const OPERATOR_IS_NOT = 'isNot';\nexport const OPERATOR_IS_ANY = 'isAny';\nexport const OPERATOR_IS_NONE = 'isNone';\nexport const OPERATOR_IS_ALL = 'isAll';\nexport const OPERATOR_IS_NOT_ALL = 'isNotAll';\n\nexport const ALL_OPERATORS = [\n\tOPERATOR_IS,\n\tOPERATOR_IS_NOT,\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_NONE,\n\tOPERATOR_IS_ALL,\n\tOPERATOR_IS_NOT_ALL,\n];\nexport const OPERATORS: Record< Operator, { key: string; label: string } > = {\n\t[ OPERATOR_IS ]: {\n\t\tkey: 'is-filter',\n\t\tlabel: __( 'Is' ),\n\t},\n\t[ OPERATOR_IS_NOT ]: {\n\t\tkey: 'is-not-filter',\n\t\tlabel: __( 'Is not' ),\n\t},\n\t[ OPERATOR_IS_ANY ]: {\n\t\tkey: 'is-any-filter',\n\t\tlabel: __( 'Is any' ),\n\t},\n\t[ OPERATOR_IS_NONE ]: {\n\t\tkey: 'is-none-filter',\n\t\tlabel: __( 'Is none' ),\n\t},\n\t[ OPERATOR_IS_ALL ]: {\n\t\tkey: 'is-all-filter',\n\t\tlabel: __( 'Is all' ),\n\t},\n\t[ OPERATOR_IS_NOT_ALL ]: {\n\t\tkey: 'is-not-all-filter',\n\t\tlabel: __( 'Is not all' ),\n\t},\n};\n\nexport const SORTING_DIRECTIONS = [ 'asc', 'desc' ] as const;\nexport const sortArrows = { asc: '↑', desc: '↓' };\nexport const sortValues = { asc: 'ascending', desc: 'descending' } as const;\nexport const sortLabels = {\n\tasc: __( 'Sort ascending' ),\n\tdesc: __( 'Sort descending' ),\n};\n\n// View layouts.\nexport const LAYOUT_TABLE = 'table';\nexport const LAYOUT_GRID = 'grid';\nexport const LAYOUT_LIST = 'list';\n","/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { View, Action, NormalizedField } from '../../types';\nimport type { SetSelection } from '../../private-types';\nimport { LAYOUT_TABLE } from '../../constants';\n\ntype DataViewsContextType< Item > = {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tfields: NormalizedField< Item >[];\n\tactions?: Action< Item >[];\n\tdata: Item[];\n\tisLoading?: boolean;\n\tpaginationInfo: {\n\t\ttotalItems: number;\n\t\ttotalPages: number;\n\t};\n\tselection: string[];\n\tonChangeSelection: SetSelection;\n\topenedFilter: string | null;\n\tsetOpenedFilter: ( openedFilter: string | null ) => void;\n\tgetItemId: ( item: Item ) => string;\n\tdensity: number;\n};\n\nconst DataViewsContext = createContext< DataViewsContextType< any > >( {\n\tview: { type: LAYOUT_TABLE },\n\tonChangeView: () => {},\n\tfields: [],\n\tdata: [],\n\tpaginationInfo: {\n\t\ttotalItems: 0,\n\t\ttotalPages: 0,\n\t},\n\tselection: [],\n\tonChangeSelection: () => {},\n\tsetOpenedFilter: () => {},\n\topenedFilter: null,\n\tgetItemId: ( item ) => item.id,\n\tdensity: 0,\n} );\n\nexport default DataViewsContext;\n","/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',\n\t\t'@wordpress/dataviews'\n\t);\n","/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { __, sprintf, _n } from '@wordpress/i18n';\nimport { useMemo, useState, useCallback, useContext } from '@wordpress/element';\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\nimport { LAYOUT_TABLE, LAYOUT_GRID } from '../../constants';\nimport { unlock } from '../../lock-unlock';\nimport type { Action, ActionModal } from '../../types';\n\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuGroupV2: DropdownMenuGroup,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuSeparatorV2: DropdownMenuSeparator,\n} = unlock( componentsPrivateApis );\n\ninterface ActionWithModalProps< Item > {\n\taction: ActionModal< Item >;\n\tselectedItems: Item[];\n\tsetActionWithModal: ( action?: ActionModal< Item > ) => void;\n\tonMenuOpenChange: ( isOpen: boolean ) => void;\n}\n\ninterface BulkActionsItemProps< Item > {\n\taction: Action< Item >;\n\tselectedItems: Item[];\n\tsetActionWithModal: ( action?: ActionModal< Item > ) => void;\n}\n\ninterface ActionsMenuGroupProps< Item > {\n\tactions: Action< Item >[];\n\tselectedItems: Item[];\n\tsetActionWithModal: ( action?: ActionModal< Item > ) => void;\n}\n\nexport function useHasAPossibleBulkAction< Item >(\n\tactions: Action< Item >[],\n\titem: Item\n) {\n\treturn useMemo( () => {\n\t\treturn actions.some( ( action ) => {\n\t\t\treturn (\n\t\t\t\taction.supportsBulk &&\n\t\t\t\t( ! action.isEligible || action.isEligible( item ) )\n\t\t\t);\n\t\t} );\n\t}, [ actions, item ] );\n}\n\nexport function useSomeItemHasAPossibleBulkAction< Item >(\n\tactions: Action< Item >[],\n\tdata: Item[]\n) {\n\treturn useMemo( () => {\n\t\treturn data.some( ( item ) => {\n\t\t\treturn actions.some( ( action ) => {\n\t\t\t\treturn (\n\t\t\t\t\taction.supportsBulk &&\n\t\t\t\t\t( ! action.isEligible || action.isEligible( item ) )\n\t\t\t\t);\n\t\t\t} );\n\t\t} );\n\t}, [ actions, data ] );\n}\n\nfunction ActionWithModal< Item >( {\n\taction,\n\tselectedItems,\n\tsetActionWithModal,\n\tonMenuOpenChange,\n}: ActionWithModalProps< Item > ) {\n\tconst eligibleItems = useMemo( () => {\n\t\treturn selectedItems.filter(\n\t\t\t( item ) => ! action.isEligible || action.isEligible( item )\n\t\t);\n\t}, [ action, selectedItems ] );\n\tconst { RenderModal, hideModalHeader } = action;\n\tconst onCloseModal = useCallback( () => {\n\t\tsetActionWithModal( undefined );\n\t}, [ setActionWithModal ] );\n\tconst label =\n\t\ttypeof action.label === 'string'\n\t\t\t? action.label\n\t\t\t: action.label( selectedItems );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ ! hideModalHeader ? label : undefined }\n\t\t\t__experimentalHideHeader={ !! hideModalHeader }\n\t\t\tonRequestClose={ onCloseModal }\n\t\t\toverlayClassName=\"dataviews-bulk-actions__modal\"\n\t\t>\n\t\t\t<RenderModal\n\t\t\t\titems={ eligibleItems }\n\t\t\t\tcloseModal={ onCloseModal }\n\t\t\t\tonActionPerformed={ () => onMenuOpenChange( false ) }\n\t\t\t/>\n\t\t</Modal>\n\t);\n}\n\nfunction BulkActionItem< Item >( {\n\taction,\n\tselectedItems,\n\tsetActionWithModal,\n}: BulkActionsItemProps< Item > ) {\n\tconst registry = useRegistry();\n\tconst eligibleItems = useMemo( () => {\n\t\treturn selectedItems.filter(\n\t\t\t( item ) => ! action.isEligible || action.isEligible( item )\n\t\t);\n\t}, [ action, selectedItems ] );\n\n\tconst shouldShowModal = 'RenderModal' in action;\n\n\treturn (\n\t\t<DropdownMenuItem\n\t\t\tkey={ action.id }\n\t\t\thideOnClick={ ! shouldShowModal }\n\t\t\tonClick={ async () => {\n\t\t\t\tif ( shouldShowModal ) {\n\t\t\t\t\tsetActionWithModal( action );\n\t\t\t\t} else {\n\t\t\t\t\taction.callback( eligibleItems, { registry } );\n\t\t\t\t}\n\t\t\t} }\n\t\t\tsuffix={ eligibleItems.length }\n\t\t>\n\t\t\t{ action.label }\n\t\t</DropdownMenuItem>\n\t);\n}\n\nfunction ActionsMenuGroup< Item >( {\n\tactions,\n\tselectedItems,\n\tsetActionWithModal,\n}: ActionsMenuGroupProps< Item > ) {\n\tconst elligibleActions = useMemo( () => {\n\t\treturn actions.filter( ( action ) => {\n\t\t\treturn selectedItems.some(\n\t\t\t\t( item ) => ! action.isEligible || action.isEligible( item )\n\t\t\t);\n\t\t} );\n\t}, [ actions, selectedItems ] );\n\tif ( ! elligibleActions.length ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenuGroup>\n\t\t\t\t{ elligibleActions.map( ( action ) => (\n\t\t\t\t\t<BulkActionItem\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tselectedItems={ selectedItems }\n\t\t\t\t\t\tsetActionWithModal={ setActionWithModal }\n\t\t\t\t\t/>\n\t\t\t\t) ) }\n\t\t\t</DropdownMenuGroup>\n\t\t\t<DropdownMenuSeparator />\n\t\t</>\n\t);\n}\n\nfunction _BulkActions() {\n\tconst {\n\t\tdata,\n\t\tactions = [],\n\t\tselection,\n\t\tonChangeSelection,\n\t\tgetItemId,\n\t} = useContext( DataViewsContext );\n\tconst bulkActions = useMemo(\n\t\t() => actions.filter( ( action ) => action.supportsBulk ),\n\t\t[ actions ]\n\t);\n\tconst [ isMenuOpen, onMenuOpenChange ] = useState( false );\n\tconst [ actionWithModal, setActionWithModal ] = useState<\n\t\tActionModal< any > | undefined\n\t>();\n\tconst selectableItems = useMemo( () => {\n\t\treturn data.filter( ( item ) => {\n\t\t\treturn bulkActions.some(\n\t\t\t\t( action ) => ! action.isEligible || action.isEligible( item )\n\t\t\t);\n\t\t} );\n\t}, [ data, bulkActions ] );\n\n\tconst numberSelectableItems = selectableItems.length;\n\n\tconst selectedItems = useMemo( () => {\n\t\treturn data.filter(\n\t\t\t( item ) =>\n\t\t\t\tselection.includes( getItemId( item ) ) &&\n\t\t\t\tselectableItems.includes( item )\n\t\t);\n\t}, [ selection, data, getItemId, selectableItems ] );\n\n\tconst areAllSelected = selectedItems.length === numberSelectableItems;\n\n\tif ( bulkActions.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\topen={ isMenuOpen }\n\t\t\t\tonOpenChange={ onMenuOpenChange }\n\t\t\t\tlabel={ __( 'Bulk actions' ) }\n\t\t\t\tstyle={ { minWidth: '240px' } }\n\t\t\t\ttrigger={\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"dataviews-bulk-actions__edit-button\"\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ selectedItems.length\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %d: Number of items. */\n\t\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t\t'Edit %d item',\n\t\t\t\t\t\t\t\t\t\t'Edit %d items',\n\t\t\t\t\t\t\t\t\t\tselectedItems.length\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tselectedItems.length\n\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t: __( 'Bulk edit' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<ActionsMenuGroup\n\t\t\t\t\tactions={ bulkActions }\n\t\t\t\t\tsetActionWithModal={ setActionWithModal }\n\t\t\t\t\tselectedItems={ selectedItems }\n\t\t\t\t/>\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tdisabled={ areAllSelected }\n\t\t\t\t\t\thideOnClick={ false }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonChangeSelection(\n\t\t\t\t\t\t\t\tselectableItems.map( ( item ) =>\n\t\t\t\t\t\t\t\t\tgetItemId( item )\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\tsuffix={ numberSelectableItems }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Select all' ) }\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tdisabled={ selection.length === 0 }\n\t\t\t\t\t\thideOnClick={ false }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonChangeSelection( [] );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Deselect' ) }\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</DropdownMenu>\n\t\t\t{ actionWithModal && (\n\t\t\t\t<ActionWithModal\n\t\t\t\t\taction={ actionWithModal }\n\t\t\t\t\tselectedItems={ selectedItems }\n\t\t\t\t\tsetActionWithModal={ setActionWithModal }\n\t\t\t\t\tonMenuOpenChange={ onMenuOpenChange }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport default function BulkActions() {\n\tconst { data, actions = [], view } = useContext( DataViewsContext );\n\tconst hasPossibleBulkAction = useSomeItemHasAPossibleBulkAction(\n\t\tactions,\n\t\tdata\n\t);\n\tif (\n\t\t! [ LAYOUT_TABLE, LAYOUT_GRID ].includes( view.type ) ||\n\t\t! hasPossibleBulkAction\n\t) {\n\t\treturn null;\n\t}\n\n\treturn <_BulkActions />;\n}\n","/**\n * External dependencies\n */\nimport type { MouseEventHandler, ReactElement } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\nimport { moreVertical } from '@wordpress/icons';\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport type { Action, ActionModal as ActionModalType } from '../../types';\n\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuGroupV2: DropdownMenuGroup,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n\tkebabCase,\n} = unlock( componentsPrivateApis );\n\nexport interface ActionTriggerProps< Item > {\n\taction: Action< Item >;\n\tonClick: MouseEventHandler;\n\tisBusy?: boolean;\n\titems: Item[];\n}\n\ninterface ActionModalProps< Item > {\n\taction: ActionModalType< Item >;\n\titems: Item[];\n\tcloseModal?: () => void;\n}\n\ninterface ActionWithModalProps< Item > extends ActionModalProps< Item > {\n\tActionTrigger: ( props: ActionTriggerProps< Item > ) => ReactElement;\n\tisBusy?: boolean;\n}\n\ninterface ActionsDropdownMenuGroupProps< Item > {\n\tactions: Action< Item >[];\n\titem: Item;\n}\n\ninterface ItemActionsProps< Item > {\n\titem: Item;\n\tactions: Action< Item >[];\n\tisCompact?: boolean;\n}\n\ninterface CompactItemActionsProps< Item > {\n\titem: Item;\n\tactions: Action< Item >[];\n}\n\nfunction ButtonTrigger< Item >( {\n\taction,\n\tonClick,\n\titems,\n}: ActionTriggerProps< Item > ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Button\n\t\t\tlabel={ label }\n\t\t\ticon={ action.icon }\n\t\t\tisDestructive={ action.isDestructive }\n\t\t\tsize=\"compact\"\n\t\t\tonClick={ onClick }\n\t\t/>\n\t);\n}\n\nfunction DropdownMenuItemTrigger< Item >( {\n\taction,\n\tonClick,\n\titems,\n}: ActionTriggerProps< Item > ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<DropdownMenuItem\n\t\t\tonClick={ onClick }\n\t\t\thideOnClick={ ! ( 'RenderModal' in action ) }\n\t\t>\n\t\t\t<DropdownMenuItemLabel>{ label }</DropdownMenuItemLabel>\n\t\t</DropdownMenuItem>\n\t);\n}\n\nexport function ActionModal< Item >( {\n\taction,\n\titems,\n\tcloseModal,\n}: ActionModalProps< Item > ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ action.modalHeader || label }\n\t\t\t__experimentalHideHeader={ !! action.hideModalHeader }\n\t\t\tonRequestClose={ closeModal ?? ( () => {} ) }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t\toverlayClassName={ `dataviews-action-modal dataviews-action-modal__${ kebabCase(\n\t\t\t\taction.id\n\t\t\t) }` }\n\t\t>\n\t\t\t<action.RenderModal items={ items } closeModal={ closeModal } />\n\t\t</Modal>\n\t);\n}\n\nexport function ActionWithModal< Item >( {\n\taction,\n\titems,\n\tActionTrigger,\n\tisBusy,\n}: ActionWithModalProps< Item > ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst actionTriggerProps = {\n\t\taction,\n\t\tonClick: () => {\n\t\t\tsetIsModalOpen( true );\n\t\t},\n\t\titems,\n\t\tisBusy,\n\t};\n\treturn (\n\t\t<>\n\t\t\t<ActionTrigger { ...actionTriggerProps } />\n\t\t\t{ isModalOpen && (\n\t\t\t\t<ActionModal\n\t\t\t\t\taction={ action }\n\t\t\t\t\titems={ items }\n\t\t\t\t\tcloseModal={ () => setIsModalOpen( false ) }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport function ActionsDropdownMenuGroup< Item >( {\n\tactions,\n\titem,\n}: ActionsDropdownMenuGroupProps< Item > ) {\n\tconst registry = useRegistry();\n\treturn (\n\t\t<DropdownMenuGroup>\n\t\t\t{ actions.map( ( action ) => {\n\t\t\t\tif ( 'RenderModal' in action ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ActionWithModal\n\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\t\tActionTrigger={ DropdownMenuItemTrigger }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItemTrigger\n\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\taction.callback( [ item ], { registry } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</DropdownMenuGroup>\n\t);\n}\n\nexport default function ItemActions< Item >( {\n\titem,\n\tactions,\n\tisCompact,\n}: ItemActionsProps< Item > ) {\n\tconst registry = useRegistry();\n\tconst { primaryActions, eligibleActions } = useMemo( () => {\n\t\t// If an action is eligible for all items, doesn't need\n\t\t// to provide the `isEligible` function.\n\t\tconst _eligibleActions = actions.filter(\n\t\t\t( action ) => ! action.isEligible || action.isEligible( item )\n\t\t);\n\t\tconst _primaryActions = _eligibleActions.filter(\n\t\t\t( action ) => action.isPrimary && !! action.icon\n\t\t);\n\t\treturn {\n\t\t\tprimaryActions: _primaryActions,\n\t\t\teligibleActions: _eligibleActions,\n\t\t};\n\t}, [ actions, item ] );\n\tif ( isCompact ) {\n\t\treturn <CompactItemActions item={ item } actions={ eligibleActions } />;\n\t}\n\treturn (\n\t\t<HStack\n\t\t\tspacing={ 1 }\n\t\t\tjustify=\"flex-end\"\n\t\t\tclassName=\"dataviews-item-actions\"\n\t\t\tstyle={ {\n\t\t\t\tflexShrink: '0',\n\t\t\t\twidth: 'auto',\n\t\t\t} }\n\t\t>\n\t\t\t{ !! primaryActions.length &&\n\t\t\t\tprimaryActions.map( ( action ) => {\n\t\t\t\t\tif ( 'RenderModal' in action ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ActionWithModal\n\t\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\t\t\tActionTrigger={ ButtonTrigger }\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\treturn (\n\t\t\t\t\t\t<ButtonTrigger\n\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\taction.callback( [ item ], { registry } );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t<CompactItemActions item={ item } actions={ eligibleActions } />\n\t\t</HStack>\n\t);\n}\n\nfunction CompactItemActions< Item >( {\n\titem,\n\tactions,\n}: CompactItemActionsProps< Item > ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ttrigger={\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\tclassName=\"dataviews-all-actions-button\"\n\t\t\t\t/>\n\t\t\t}\n\t\t\tplacement=\"bottom-end\"\n\t\t>\n\t\t\t<ActionsDropdownMenuGroup actions={ actions } item={ item } />\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tToolbarButton,\n\tToolbar,\n\tToolbarGroup,\n\t__unstableMotion as motion,\n\t__unstableAnimatePresence as AnimatePresence,\n} from '@wordpress/components';\nimport { useMemo, useState, useRef, useContext } from '@wordpress/element';\nimport { _n, sprintf, __ } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { useSomeItemHasAPossibleBulkAction } from '../dataviews-bulk-actions';\nimport DataViewsContext from '../dataviews-context';\nimport { ActionWithModal } from '../dataviews-item-actions';\nimport { LAYOUT_GRID, LAYOUT_TABLE } from '../../constants';\nimport type { Action } from '../../types';\nimport type { ActionTriggerProps } from '../dataviews-item-actions';\nimport type { SetSelection } from '../../private-types';\n\ninterface ActionButtonProps< Item > {\n\taction: Action< Item >;\n\tselectedItems: Item[];\n\tactionInProgress: string | null;\n\tsetActionInProgress: ( actionId: string | null ) => void;\n}\n\ninterface ToolbarContentProps< Item > {\n\tselection: string[];\n\tactionsToShow: Action< Item >[];\n\tselectedItems: Item[];\n\tonChangeSelection: SetSelection;\n}\n\nconst SNACKBAR_VARIANTS = {\n\tinit: {\n\t\tbottom: -48,\n\t},\n\topen: {\n\t\tbottom: 24,\n\t\ttransition: {\n\t\t\tbottom: { type: 'tween', duration: 0.2, ease: [ 0, 0, 0.2, 1 ] },\n\t\t},\n\t},\n\texit: {\n\t\topacity: 0,\n\t\tbottom: 24,\n\t\ttransition: {\n\t\t\topacity: { type: 'tween', duration: 0.2, ease: [ 0, 0, 0.2, 1 ] },\n\t\t},\n\t},\n};\n\nfunction ActionTrigger< Item >( {\n\taction,\n\tonClick,\n\tisBusy,\n\titems,\n}: ActionTriggerProps< Item > ) {\n\tconst label =\n\t\ttypeof action.label === 'string' ? action.label : action.label( items );\n\treturn (\n\t\t<ToolbarButton\n\t\t\tdisabled={ isBusy }\n\t\t\tlabel={ label }\n\t\t\ticon={ action.icon }\n\t\t\tisDestructive={ action.isDestructive }\n\t\t\tsize=\"compact\"\n\t\t\tonClick={ onClick }\n\t\t\tisBusy={ isBusy }\n\t\t\ttooltipPosition=\"top\"\n\t\t/>\n\t);\n}\n\nconst EMPTY_ARRAY: [] = [];\n\nfunction ActionButton< Item >( {\n\taction,\n\tselectedItems,\n\tactionInProgress,\n\tsetActionInProgress,\n}: ActionButtonProps< Item > ) {\n\tconst registry = useRegistry();\n\tconst selectedEligibleItems = useMemo( () => {\n\t\treturn selectedItems.filter( ( item ) => {\n\t\t\treturn ! action.isEligible || action.isEligible( item );\n\t\t} );\n\t}, [ action, selectedItems ] );\n\tif ( 'RenderModal' in action ) {\n\t\treturn (\n\t\t\t<ActionWithModal\n\t\t\t\tkey={ action.id }\n\t\t\t\taction={ action }\n\t\t\t\titems={ selectedEligibleItems }\n\t\t\t\tActionTrigger={ ActionTrigger }\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<ActionTrigger\n\t\t\tkey={ action.id }\n\t\t\taction={ action }\n\t\t\tonClick={ () => {\n\t\t\t\tsetActionInProgress( action.id );\n\t\t\t\taction.callback( selectedItems, {\n\t\t\t\t\tregistry,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\titems={ selectedEligibleItems }\n\t\t\tisBusy={ actionInProgress === action.id }\n\t\t/>\n\t);\n}\n\nfunction renderToolbarContent< Item >(\n\tselection: string[],\n\tactionsToShow: Action< Item >[],\n\tselectedItems: Item[],\n\tactionInProgress: string | null,\n\tsetActionInProgress: ( actionId: string | null ) => void,\n\tonChangeSelection: SetSelection\n) {\n\treturn (\n\t\t<>\n\t\t\t<ToolbarGroup>\n\t\t\t\t<div className=\"dataviews-bulk-actions-toolbar__selection-count\">\n\t\t\t\t\t{ selection.length === 1\n\t\t\t\t\t\t? __( '1 item selected' )\n\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: Total number of selected items.\n\t\t\t\t\t\t\t\t_n(\n\t\t\t\t\t\t\t\t\t'%s item selected',\n\t\t\t\t\t\t\t\t\t'%s items selected',\n\t\t\t\t\t\t\t\t\tselection.length\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tselection.length\n\t\t\t\t\t\t ) }\n\t\t\t\t</div>\n\t\t\t</ToolbarGroup>\n\t\t\t<ToolbarGroup>\n\t\t\t\t{ actionsToShow.map( ( action ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ActionButton\n\t\t\t\t\t\t\tkey={ action.id }\n\t\t\t\t\t\t\taction={ action }\n\t\t\t\t\t\t\tselectedItems={ selectedItems }\n\t\t\t\t\t\t\tactionInProgress={ actionInProgress }\n\t\t\t\t\t\t\tsetActionInProgress={ setActionInProgress }\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\t<ToolbarGroup>\n\t\t\t\t<ToolbarButton\n\t\t\t\t\ticon={ closeSmall }\n\t\t\t\t\tshowTooltip\n\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\tlabel={ __( 'Cancel' ) }\n\t\t\t\t\tdisabled={ !! actionInProgress }\n\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\tonChangeSelection( EMPTY_ARRAY );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</ToolbarGroup>\n\t\t</>\n\t);\n}\n\nfunction ToolbarContent< Item >( {\n\tselection,\n\tactionsToShow,\n\tselectedItems,\n\tonChangeSelection,\n}: ToolbarContentProps< Item > ) {\n\tconst [ actionInProgress, setActionInProgress ] = useState< string | null >(\n\t\tnull\n\t);\n\tconst buttons = useRef< JSX.Element | null >( null );\n\tif ( ! actionInProgress ) {\n\t\tif ( buttons.current ) {\n\t\t\tbuttons.current = null;\n\t\t}\n\t\treturn renderToolbarContent(\n\t\t\tselection,\n\t\t\tactionsToShow,\n\t\t\tselectedItems,\n\t\t\tactionInProgress,\n\t\t\tsetActionInProgress,\n\t\t\tonChangeSelection\n\t\t);\n\t} else if ( ! buttons.current ) {\n\t\tbuttons.current = renderToolbarContent(\n\t\t\tselection,\n\t\t\tactionsToShow,\n\t\t\tselectedItems,\n\t\t\tactionInProgress,\n\t\t\tsetActionInProgress,\n\t\t\tonChangeSelection\n\t\t);\n\t}\n\treturn buttons.current;\n}\n\nfunction _BulkActionsToolbar() {\n\tconst {\n\t\tdata,\n\t\tselection,\n\t\tactions = EMPTY_ARRAY,\n\t\tonChangeSelection,\n\t\tgetItemId,\n\t} = useContext( DataViewsContext );\n\tconst isReducedMotion = useReducedMotion();\n\tconst selectedItems = useMemo( () => {\n\t\treturn data.filter( ( item ) =>\n\t\t\tselection.includes( getItemId( item ) )\n\t\t);\n\t}, [ selection, data, getItemId ] );\n\n\tconst actionsToShow = useMemo(\n\t\t() =>\n\t\t\tactions.filter( ( action ) => {\n\t\t\t\treturn (\n\t\t\t\t\taction.supportsBulk &&\n\t\t\t\t\taction.icon &&\n\t\t\t\t\tselectedItems.some(\n\t\t\t\t\t\t( item ) =>\n\t\t\t\t\t\t\t! action.isEligible || action.isEligible( item )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t} ),\n\t\t[ actions, selectedItems ]\n\t);\n\n\tif (\n\t\t( selection && selection.length === 0 ) ||\n\t\tactionsToShow.length === 0\n\t) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<AnimatePresence>\n\t\t\t<motion.div\n\t\t\t\tlayout={ ! isReducedMotion } // See https://www.framer.com/docs/animation/#layout-animations\n\t\t\t\tinitial=\"init\"\n\t\t\t\tanimate=\"open\"\n\t\t\t\texit=\"exit\"\n\t\t\t\tvariants={ isReducedMotion ? undefined : SNACKBAR_VARIANTS }\n\t\t\t\tclassName=\"dataviews-bulk-actions-toolbar\"\n\t\t\t>\n\t\t\t\t<Toolbar label={ __( 'Bulk actions' ) }>\n\t\t\t\t\t<div className=\"dataviews-bulk-actions-toolbar__wrapper\">\n\t\t\t\t\t\t<ToolbarContent\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tactionsToShow={ actionsToShow }\n\t\t\t\t\t\t\tselectedItems={ selectedItems }\n\t\t\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</Toolbar>\n\t\t\t</motion.div>\n\t\t</AnimatePresence>\n\t);\n}\n\nexport default function BulkActionsToolbar() {\n\tconst { data, actions = [], view } = useContext( DataViewsContext );\n\tconst hasPossibleBulkAction = useSomeItemHasAPossibleBulkAction(\n\t\tactions,\n\t\tdata\n\t);\n\tif (\n\t\t! [ LAYOUT_TABLE, LAYOUT_GRID ].includes( view.type ) ||\n\t\t! hasPossibleBulkAction\n\t) {\n\t\treturn null;\n\t}\n\n\treturn <_BulkActionsToolbar />;\n}\n","\"use client\";\n\n// src/composite/utils.ts\nimport { getDocument, isTextField } from \"@ariakit/core/utils/dom\";\nvar NULL_ITEM = { id: null };\nfunction flipItems(items, activeId, shouldInsertNullItem = false) {\n const index = items.findIndex((item) => item.id === activeId);\n return [\n ...items.slice(index + 1),\n ...shouldInsertNullItem ? [NULL_ITEM] : [],\n ...items.slice(0, index)\n ];\n}\nfunction findFirstEnabledItem(items, excludeId) {\n return items.find((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getEnabledItem(store, id) {\n if (!id)\n return null;\n return store.item(id) || null;\n}\nfunction groupItemsByRows(items) {\n const rows = [];\n for (const item of items) {\n const row = rows.find((currentRow) => {\n var _a;\n return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;\n });\n if (row) {\n row.push(item);\n } else {\n rows.push([item]);\n }\n }\n return rows;\n}\nfunction selectTextField(element, collapseToEnd = false) {\n if (isTextField(element)) {\n element.setSelectionRange(\n collapseToEnd ? element.value.length : 0,\n element.value.length\n );\n } else if (element.isContentEditable) {\n const selection = getDocument(element).getSelection();\n selection == null ? void 0 : selection.selectAllChildren(element);\n if (collapseToEnd) {\n selection == null ? void 0 : selection.collapseToEnd();\n }\n }\n}\nvar FOCUS_SILENTLY = Symbol(\"FOCUS_SILENTLY\");\nfunction focusSilently(element) {\n element[FOCUS_SILENTLY] = true;\n element.focus({ preventScroll: true });\n}\nfunction silentlyFocused(element) {\n const isSilentlyFocused = element[FOCUS_SILENTLY];\n delete element[FOCUS_SILENTLY];\n return isSilentlyFocused;\n}\nfunction isItem(store, element, exclude) {\n if (!element)\n return false;\n if (element === exclude)\n return false;\n const item = store.item(element.id);\n if (!item)\n return false;\n if (exclude && item.element === exclude)\n return false;\n return true;\n}\n\nexport {\n flipItems,\n findFirstEnabledItem,\n getEnabledItem,\n groupItemsByRows,\n selectTextField,\n focusSilently,\n silentlyFocused,\n isItem\n};\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __objRest\n};\n","\"use client\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\nexport {\n __spreadValues,\n __spreadProps,\n __objRest\n};\n","\"use client\";\nimport {\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/misc.ts\nfunction noop(..._) {\n}\nfunction shallowEqual(a, b) {\n if (a === b)\n return true;\n if (!a)\n return false;\n if (!b)\n return false;\n if (typeof a !== \"object\")\n return false;\n if (typeof b !== \"object\")\n return false;\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n const { length } = aKeys;\n if (bKeys.length !== length)\n return false;\n for (const key of aKeys) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n return true;\n}\nfunction applyState(argument, currentValue) {\n if (isUpdater(argument)) {\n const value = isLazyValue(currentValue) ? currentValue() : currentValue;\n return argument(value);\n }\n return argument;\n}\nfunction isUpdater(argument) {\n return typeof argument === \"function\";\n}\nfunction isLazyValue(value) {\n return typeof value === \"function\";\n}\nfunction isObject(arg) {\n return typeof arg === \"object\" && arg != null;\n}\nfunction isEmpty(arg) {\n if (Array.isArray(arg))\n return !arg.length;\n if (isObject(arg))\n return !Object.keys(arg).length;\n if (arg == null)\n return true;\n if (arg === \"\")\n return true;\n return false;\n}\nfunction isInteger(arg) {\n if (typeof arg === \"number\") {\n return Math.floor(arg) === arg;\n }\n return String(Math.floor(Number(arg))) === arg;\n}\nfunction hasOwnProperty(object, prop) {\n if (typeof Object.hasOwn === \"function\") {\n return Object.hasOwn(object, prop);\n }\n return Object.prototype.hasOwnProperty.call(object, prop);\n}\nfunction chain(...fns) {\n return (...args) => {\n for (const fn of fns) {\n if (typeof fn === \"function\") {\n fn(...args);\n }\n }\n };\n}\nfunction cx(...args) {\n return args.filter(Boolean).join(\" \") || void 0;\n}\nfunction normalizeString(str) {\n return str.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\nfunction omit(object, keys) {\n const result = __spreadValues({}, object);\n for (const key of keys) {\n if (hasOwnProperty(result, key)) {\n delete result[key];\n }\n }\n return result;\n}\nfunction pick(object, paths) {\n const result = {};\n for (const key of paths) {\n if (hasOwnProperty(object, key)) {\n result[key] = object[key];\n }\n }\n return result;\n}\nfunction identity(value) {\n return value;\n}\nfunction beforePaint(cb = noop) {\n const raf = requestAnimationFrame(cb);\n return () => cancelAnimationFrame(raf);\n}\nfunction afterPaint(cb = noop) {\n let raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(cb);\n });\n return () => cancelAnimationFrame(raf);\n}\nfunction invariant(condition, message) {\n if (condition)\n return;\n if (typeof message !== \"string\")\n throw new Error(\"Invariant failed\");\n throw new Error(message);\n}\nfunction getKeys(obj) {\n return Object.keys(obj);\n}\nfunction isFalsyBooleanCallback(booleanOrCallback, ...args) {\n const result = typeof booleanOrCallback === \"function\" ? booleanOrCallback(...args) : booleanOrCallback;\n if (result == null)\n return false;\n return !result;\n}\nfunction disabledFromProps(props) {\n return props.disabled || props[\"aria-disabled\"] === true || props[\"aria-disabled\"] === \"true\";\n}\nfunction removeUndefinedValues(obj) {\n const result = {};\n for (const key in obj) {\n if (obj[key] !== void 0) {\n result[key] = obj[key];\n }\n }\n return result;\n}\nfunction defaultValue(...values) {\n for (const value of values) {\n if (value !== void 0)\n return value;\n }\n return void 0;\n}\n\nexport {\n noop,\n shallowEqual,\n applyState,\n isObject,\n isEmpty,\n isInteger,\n hasOwnProperty,\n chain,\n cx,\n normalizeString,\n omit,\n pick,\n identity,\n beforePaint,\n afterPaint,\n invariant,\n getKeys,\n isFalsyBooleanCallback,\n disabledFromProps,\n removeUndefinedValues,\n defaultValue\n};\n","\"use client\";\n\n// src/utils/dom.ts\nvar canUseDOM = checkIsBrowser();\nfunction checkIsBrowser() {\n var _a;\n return typeof window !== \"undefined\" && !!((_a = window.document) == null ? void 0 : _a.createElement);\n}\nfunction getDocument(node) {\n return node ? node.ownerDocument || node : document;\n}\nfunction getWindow(node) {\n return getDocument(node).defaultView || window;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getDocument(node);\n if (!(activeElement == null ? void 0 : activeElement.nodeName)) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(\n activeElement.contentDocument.body,\n activeDescendant\n );\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction contains(parent, child) {\n return parent === child || parent.contains(child);\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nfunction isButton(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"button\")\n return true;\n if (tagName === \"input\" && element.type) {\n return buttonInputTypes.indexOf(element.type) !== -1;\n }\n return false;\n}\nvar buttonInputTypes = [\n \"button\",\n \"color\",\n \"file\",\n \"image\",\n \"reset\",\n \"submit\"\n];\nfunction matches(element, selectors) {\n if (\"matches\" in element) {\n return element.matches(selectors);\n }\n if (\"msMatchesSelector\" in element) {\n return element.msMatchesSelector(selectors);\n }\n return element.webkitMatchesSelector(selectors);\n}\nfunction isVisible(element) {\n const htmlElement = element;\n return htmlElement.offsetWidth > 0 || htmlElement.offsetHeight > 0 || element.getClientRects().length > 0;\n}\nfunction closest(element, selectors) {\n if (\"closest\" in element)\n return element.closest(selectors);\n do {\n if (matches(element, selectors))\n return element;\n element = element.parentElement || element.parentNode;\n } while (element !== null && element.nodeType === 1);\n return null;\n}\nfunction isTextField(element) {\n try {\n const isTextInput = element instanceof HTMLInputElement && element.selectionStart !== null;\n const isTextArea = element.tagName === \"TEXTAREA\";\n return isTextInput || isTextArea || false;\n } catch (error) {\n return false;\n }\n}\nfunction getPopupRole(element, fallback) {\n const allowedPopupRoles = [\"dialog\", \"menu\", \"listbox\", \"tree\", \"grid\"];\n const role = element == null ? void 0 : element.getAttribute(\"role\");\n if (role && allowedPopupRoles.indexOf(role) !== -1) {\n return role;\n }\n return fallback;\n}\nfunction getPopupItemRole(element, fallback) {\n var _a;\n const itemRoleByPopupRole = {\n menu: \"menuitem\",\n listbox: \"option\",\n tree: \"treeitem\"\n };\n const popupRole = getPopupRole(element);\n if (!popupRole)\n return fallback;\n const key = popupRole;\n return (_a = itemRoleByPopupRole[key]) != null ? _a : fallback;\n}\nfunction getTextboxSelection(element) {\n let start = 0;\n let end = 0;\n if (isTextField(element)) {\n start = element.selectionStart || 0;\n end = element.selectionEnd || 0;\n } else if (element.isContentEditable) {\n const selection = getDocument(element).getSelection();\n if ((selection == null ? void 0 : selection.rangeCount) && selection.anchorNode && contains(element, selection.anchorNode) && selection.focusNode && contains(element, selection.focusNode)) {\n const range = selection.getRangeAt(0);\n const nextRange = range.cloneRange();\n nextRange.selectNodeContents(element);\n nextRange.setEnd(range.startContainer, range.startOffset);\n start = nextRange.toString().length;\n nextRange.setEnd(range.endContainer, range.endOffset);\n end = nextRange.toString().length;\n }\n }\n return { start, end };\n}\nfunction scrollIntoViewIfNeeded(element, arg) {\n if (isPartiallyHidden(element) && \"scrollIntoView\" in element) {\n element.scrollIntoView(arg);\n }\n}\nfunction getScrollingElement(element) {\n if (!element)\n return null;\n if (element.clientHeight && element.scrollHeight > element.clientHeight) {\n const { overflowY } = getComputedStyle(element);\n const isScrollable = overflowY !== \"visible\" && overflowY !== \"hidden\";\n if (isScrollable)\n return element;\n } else if (element.clientWidth && element.scrollWidth > element.clientWidth) {\n const { overflowX } = getComputedStyle(element);\n const isScrollable = overflowX !== \"visible\" && overflowX !== \"hidden\";\n if (isScrollable)\n return element;\n }\n return getScrollingElement(element.parentElement) || document.scrollingElement || document.body;\n}\nfunction isPartiallyHidden(element) {\n const elementRect = element.getBoundingClientRect();\n const scroller = getScrollingElement(element);\n if (!scroller)\n return false;\n const scrollerRect = scroller.getBoundingClientRect();\n const isHTML = scroller.tagName === \"HTML\";\n const scrollerTop = isHTML ? scrollerRect.top + scroller.scrollTop : scrollerRect.top;\n const scrollerBottom = isHTML ? scroller.clientHeight : scrollerRect.bottom;\n const scrollerLeft = isHTML ? scrollerRect.left + scroller.scrollLeft : scrollerRect.left;\n const scrollerRight = isHTML ? scroller.clientWidth : scrollerRect.right;\n const top = elementRect.top < scrollerTop;\n const left = elementRect.left < scrollerLeft;\n const bottom = elementRect.bottom > scrollerBottom;\n const right = elementRect.right > scrollerRight;\n return top || left || bottom || right;\n}\nfunction setSelectionRange(element, ...args) {\n if (/text|search|password|tel|url/i.test(element.type)) {\n element.setSelectionRange(...args);\n }\n}\n\nexport {\n canUseDOM,\n getDocument,\n getWindow,\n getActiveElement,\n contains,\n isFrame,\n isButton,\n matches,\n isVisible,\n closest,\n isTextField,\n getPopupRole,\n getPopupItemRole,\n getTextboxSelection,\n scrollIntoViewIfNeeded,\n getScrollingElement,\n isPartiallyHidden,\n setSelectionRange\n};\n","\"use client\";\nimport {\n canUseDOM\n} from \"./RRSZHCH6.js\";\n\n// src/utils/platform.ts\nfunction isTouchDevice() {\n return canUseDOM && !!navigator.maxTouchPoints;\n}\nfunction isApple() {\n if (!canUseDOM)\n return false;\n return /mac|iphone|ipad|ipod/i.test(navigator.platform);\n}\nfunction isSafari() {\n return canUseDOM && isApple() && /apple/i.test(navigator.vendor);\n}\nfunction isFirefox() {\n return canUseDOM && /firefox\\//i.test(navigator.userAgent);\n}\nfunction isMac() {\n return canUseDOM && navigator.platform.startsWith(\"Mac\") && !isTouchDevice();\n}\n\nexport {\n isTouchDevice,\n isApple,\n isSafari,\n isFirefox,\n isMac\n};\n","\"use client\";\nimport {\n isApple\n} from \"../__chunks/VDNATJW2.js\";\nimport {\n contains\n} from \"../__chunks/RRSZHCH6.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/utils/events.ts\nfunction isPortalEvent(event) {\n return Boolean(\n event.currentTarget && !contains(event.currentTarget, event.target)\n );\n}\nfunction isSelfTarget(event) {\n return event.target === event.currentTarget;\n}\nfunction isOpeningInNewTab(event) {\n const element = event.currentTarget;\n if (!element)\n return false;\n const isAppleDevice = isApple();\n if (isAppleDevice && !event.metaKey)\n return false;\n if (!isAppleDevice && !event.ctrlKey)\n return false;\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"a\")\n return true;\n if (tagName === \"button\" && element.type === \"submit\")\n return true;\n if (tagName === \"input\" && element.type === \"submit\")\n return true;\n return false;\n}\nfunction isDownloading(event) {\n const element = event.currentTarget;\n if (!element)\n return false;\n const tagName = element.tagName.toLowerCase();\n if (!event.altKey)\n return false;\n if (tagName === \"a\")\n return true;\n if (tagName === \"button\" && element.type === \"submit\")\n return true;\n if (tagName === \"input\" && element.type === \"submit\")\n return true;\n return false;\n}\nfunction fireEvent(element, type, eventInit) {\n const event = new Event(type, eventInit);\n return element.dispatchEvent(event);\n}\nfunction fireBlurEvent(element, eventInit) {\n const event = new FocusEvent(\"blur\", eventInit);\n const defaultAllowed = element.dispatchEvent(event);\n const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true });\n element.dispatchEvent(new FocusEvent(\"focusout\", bubbleInit));\n return defaultAllowed;\n}\nfunction fireFocusEvent(element, eventInit) {\n const event = new FocusEvent(\"focus\", eventInit);\n const defaultAllowed = element.dispatchEvent(event);\n const bubbleInit = __spreadProps(__spreadValues({}, eventInit), { bubbles: true });\n element.dispatchEvent(new FocusEvent(\"focusin\", bubbleInit));\n return defaultAllowed;\n}\nfunction fireKeyboardEvent(element, type, eventInit) {\n const event = new KeyboardEvent(type, eventInit);\n return element.dispatchEvent(event);\n}\nfunction fireClickEvent(element, eventInit) {\n const event = new MouseEvent(\"click\", eventInit);\n return element.dispatchEvent(event);\n}\nfunction isFocusEventOutside(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nfunction queueBeforeEvent(element, type, callback) {\n const raf = requestAnimationFrame(() => {\n element.removeEventListener(type, callImmediately, true);\n callback();\n });\n const callImmediately = () => {\n cancelAnimationFrame(raf);\n callback();\n };\n element.addEventListener(type, callImmediately, {\n once: true,\n capture: true\n });\n return raf;\n}\nfunction addGlobalEventListener(type, listener, options, scope = window) {\n const children = [];\n try {\n scope.document.addEventListener(type, listener, options);\n for (const frame of Array.from(scope.frames)) {\n children.push(addGlobalEventListener(type, listener, options, frame));\n }\n } catch (e) {\n }\n const removeEventListener = () => {\n try {\n scope.document.removeEventListener(type, listener, options);\n } catch (e) {\n }\n children.forEach((remove) => remove());\n };\n return removeEventListener;\n}\nexport {\n addGlobalEventListener,\n fireBlurEvent,\n fireClickEvent,\n fireEvent,\n fireFocusEvent,\n fireKeyboardEvent,\n isDownloading,\n isFocusEventOutside,\n isOpeningInNewTab,\n isPortalEvent,\n isSelfTarget,\n queueBeforeEvent\n};\n","\"use client\";\nimport {\n setRef\n} from \"./XM66DUTO.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/hooks.ts\nimport {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useReducer,\n useRef,\n useState\n} from \"react\";\nimport * as React from \"react\";\nimport { canUseDOM } from \"@ariakit/core/utils/dom\";\nimport { addGlobalEventListener } from \"@ariakit/core/utils/events\";\nimport { applyState } from \"@ariakit/core/utils/misc\";\nvar _React = __spreadValues({}, React);\nvar useReactId = _React.useId;\nvar useReactDeferredValue = _React.useDeferredValue;\nvar useReactInsertionEffect = _React.useInsertionEffect;\nvar useSafeLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\nfunction useInitialValue(value) {\n const [initialValue] = useState(value);\n return initialValue;\n}\nfunction useLazyValue(init) {\n const ref = useRef();\n if (ref.current === void 0) {\n ref.current = init();\n }\n return ref.current;\n}\nfunction useLiveRef(value) {\n const ref = useRef(value);\n useSafeLayoutEffect(() => {\n ref.current = value;\n });\n return ref;\n}\nfunction usePreviousValue(value) {\n const [previousValue, setPreviousValue] = useState(value);\n if (value !== previousValue) {\n setPreviousValue(value);\n }\n return previousValue;\n}\nfunction useEvent(callback) {\n const ref = useRef(() => {\n throw new Error(\"Cannot call an event handler while rendering.\");\n });\n if (useReactInsertionEffect) {\n useReactInsertionEffect(() => {\n ref.current = callback;\n });\n } else {\n ref.current = callback;\n }\n return useCallback((...args) => {\n var _a;\n return (_a = ref.current) == null ? void 0 : _a.call(ref, ...args);\n }, []);\n}\nfunction useMergeRefs(...refs) {\n return useMemo(() => {\n if (!refs.some(Boolean))\n return;\n return (value) => {\n refs.forEach((ref) => setRef(ref, value));\n };\n }, refs);\n}\nfunction useRefId(ref, deps) {\n const [id, setId] = useState(void 0);\n useSafeLayoutEffect(() => {\n var _a;\n setId((_a = ref == null ? void 0 : ref.current) == null ? void 0 : _a.id);\n }, deps);\n return id;\n}\nfunction useId(defaultId) {\n if (useReactId) {\n const reactId = useReactId();\n if (defaultId)\n return defaultId;\n return reactId;\n }\n const [id, setId] = useState(defaultId);\n useSafeLayoutEffect(() => {\n if (defaultId || id)\n return;\n const random = Math.random().toString(36).substr(2, 6);\n setId(`id-${random}`);\n }, [defaultId, id]);\n return defaultId || id;\n}\nfunction useDeferredValue(value) {\n if (useReactDeferredValue) {\n return useReactDeferredValue(value);\n }\n const [deferredValue, setDeferredValue] = useState(value);\n useEffect(() => {\n const raf = requestAnimationFrame(() => setDeferredValue(value));\n return () => cancelAnimationFrame(raf);\n }, [value]);\n return deferredValue;\n}\nfunction useTagName(refOrElement, type) {\n const stringOrUndefined = (type2) => {\n if (typeof type2 !== \"string\")\n return;\n return type2;\n };\n const [tagName, setTagName] = useState(() => stringOrUndefined(type));\n useSafeLayoutEffect(() => {\n const element = refOrElement && \"current\" in refOrElement ? refOrElement.current : refOrElement;\n setTagName((element == null ? void 0 : element.tagName.toLowerCase()) || stringOrUndefined(type));\n }, [refOrElement, type]);\n return tagName;\n}\nfunction useAttribute(refOrElement, attributeName, defaultValue) {\n const [attribute, setAttribute] = useState(defaultValue);\n useSafeLayoutEffect(() => {\n const element = refOrElement && \"current\" in refOrElement ? refOrElement.current : refOrElement;\n const value = element == null ? void 0 : element.getAttribute(attributeName);\n if (value == null)\n return;\n setAttribute(value);\n }, [refOrElement, attributeName]);\n return attribute;\n}\nfunction useUpdateEffect(effect, deps) {\n const mounted = useRef(false);\n useEffect(() => {\n if (mounted.current) {\n return effect();\n }\n mounted.current = true;\n }, deps);\n useEffect(\n () => () => {\n mounted.current = false;\n },\n []\n );\n}\nfunction useUpdateLayoutEffect(effect, deps) {\n const mounted = useRef(false);\n useSafeLayoutEffect(() => {\n if (mounted.current) {\n return effect();\n }\n mounted.current = true;\n }, deps);\n useSafeLayoutEffect(\n () => () => {\n mounted.current = false;\n },\n []\n );\n}\nfunction useControlledState(defaultState, state, setState) {\n const [localState, setLocalState] = useState(defaultState);\n const nextState = state !== void 0 ? state : localState;\n const stateRef = useLiveRef(state);\n const setStateRef = useLiveRef(setState);\n const nextStateRef = useLiveRef(nextState);\n const setNextState = useCallback((prevValue) => {\n const setStateProp = setStateRef.current;\n if (setStateProp) {\n if (isSetNextState(setStateProp)) {\n setStateProp(prevValue);\n } else {\n const nextValue = applyState(prevValue, nextStateRef.current);\n nextStateRef.current = nextValue;\n setStateProp(nextValue);\n }\n }\n if (stateRef.current === void 0) {\n setLocalState(prevValue);\n }\n }, []);\n defineSetNextState(setNextState);\n return [nextState, setNextState];\n}\nvar SET_NEXT_STATE = Symbol(\"setNextState\");\nfunction isSetNextState(arg) {\n return arg[SET_NEXT_STATE] === true;\n}\nfunction defineSetNextState(arg) {\n if (!isSetNextState(arg)) {\n Object.defineProperty(arg, SET_NEXT_STATE, { value: true });\n }\n}\nfunction useForceUpdate() {\n return useReducer(() => [], []);\n}\nfunction useBooleanEvent(booleanOrCallback) {\n return useEvent(\n typeof booleanOrCallback === \"function\" ? booleanOrCallback : () => booleanOrCallback\n );\n}\nfunction useWrapElement(props, callback, deps = []) {\n const wrapElement = useCallback(\n (element) => {\n if (props.wrapElement) {\n element = props.wrapElement(element);\n }\n return callback(element);\n },\n [...deps, props.wrapElement]\n );\n return __spreadProps(__spreadValues({}, props), { wrapElement });\n}\nfunction usePortalRef(portalProp = false, portalRefProp) {\n const [portalNode, setPortalNode] = useState(null);\n const portalRef = useMergeRefs(setPortalNode, portalRefProp);\n const domReady = !portalProp || portalNode;\n return { portalRef, portalNode, domReady };\n}\nfunction useMetadataProps(props, key, value) {\n const parent = props.onLoadedMetadataCapture;\n const onLoadedMetadataCapture = useMemo(() => {\n return Object.assign(() => {\n }, __spreadProps(__spreadValues({}, parent), { [key]: value }));\n }, [parent, key, value]);\n return [parent == null ? void 0 : parent[key], { onLoadedMetadataCapture }];\n}\nfunction useIsMouseMoving() {\n useEffect(() => {\n addGlobalEventListener(\"mousemove\", setMouseMoving, true);\n addGlobalEventListener(\"mousedown\", resetMouseMoving, true);\n addGlobalEventListener(\"mouseup\", resetMouseMoving, true);\n addGlobalEventListener(\"keydown\", resetMouseMoving, true);\n addGlobalEventListener(\"scroll\", resetMouseMoving, true);\n }, []);\n const isMouseMoving = useEvent(() => mouseMoving);\n return isMouseMoving;\n}\nvar mouseMoving = false;\nvar previousScreenX = 0;\nvar previousScreenY = 0;\nfunction hasMouseMovement(event) {\n const movementX = event.movementX || event.screenX - previousScreenX;\n const movementY = event.movementY || event.screenY - previousScreenY;\n previousScreenX = event.screenX;\n previousScreenY = event.screenY;\n return movementX || movementY || process.env.NODE_ENV === \"test\";\n}\nfunction setMouseMoving(event) {\n if (!hasMouseMovement(event))\n return;\n mouseMoving = true;\n}\nfunction resetMouseMoving() {\n mouseMoving = false;\n}\n\nexport {\n useSafeLayoutEffect,\n useInitialValue,\n useLazyValue,\n useLiveRef,\n usePreviousValue,\n useEvent,\n useMergeRefs,\n useRefId,\n useId,\n useDeferredValue,\n useTagName,\n useAttribute,\n useUpdateEffect,\n useUpdateLayoutEffect,\n useControlledState,\n useForceUpdate,\n useBooleanEvent,\n useWrapElement,\n usePortalRef,\n useMetadataProps,\n useIsMouseMoving\n};\n","\"use client\";\nimport {\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/misc.ts\nimport { isValidElement } from \"react\";\nimport { hasOwnProperty } from \"@ariakit/core/utils/misc\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\nfunction isValidElementWithRef(element) {\n if (!element)\n return false;\n if (!isValidElement(element))\n return false;\n if (!(\"ref\" in element))\n return false;\n return true;\n}\nfunction getRefProperty(element) {\n if (!isValidElementWithRef(element))\n return null;\n return element.ref;\n}\nfunction mergeProps(base, overrides) {\n const props = __spreadValues({}, base);\n for (const key in overrides) {\n if (!hasOwnProperty(overrides, key))\n continue;\n if (key === \"className\") {\n const prop = \"className\";\n props[prop] = base[prop] ? `${base[prop]} ${overrides[prop]}` : overrides[prop];\n continue;\n }\n if (key === \"style\") {\n const prop = \"style\";\n props[prop] = base[prop] ? __spreadValues(__spreadValues({}, base[prop]), overrides[prop]) : overrides[prop];\n continue;\n }\n const overrideValue = overrides[key];\n if (typeof overrideValue === \"function\" && key.startsWith(\"on\")) {\n const baseValue = base[key];\n if (typeof baseValue === \"function\") {\n props[key] = (...args) => {\n overrideValue(...args);\n baseValue(...args);\n };\n continue;\n }\n }\n props[key] = overrideValue;\n }\n return props;\n}\n\nexport {\n setRef,\n isValidElementWithRef,\n getRefProperty,\n mergeProps\n};\n","\"use client\";\nimport {\n useMergeRefs\n} from \"./6O5OEQGF.js\";\nimport {\n getRefProperty,\n mergeProps\n} from \"./XM66DUTO.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/system.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction forwardRef2(render) {\n const Role = React.forwardRef((props, ref) => render(__spreadProps(__spreadValues({}, props), { ref })));\n Role.displayName = render.displayName || render.name;\n return Role;\n}\nfunction memo2(Component, propsAreEqual) {\n return React.memo(Component, propsAreEqual);\n}\nfunction createElement(Type, props) {\n const _a = props, { wrapElement, render } = _a, rest = __objRest(_a, [\"wrapElement\", \"render\"]);\n const mergedRef = useMergeRefs(props.ref, getRefProperty(render));\n let element;\n if (React.isValidElement(render)) {\n const renderProps = __spreadProps(__spreadValues({}, render.props), { ref: mergedRef });\n element = React.cloneElement(render, mergeProps(rest, renderProps));\n } else if (render) {\n element = render(rest);\n } else {\n element = /* @__PURE__ */ jsx(Type, __spreadValues({}, rest));\n }\n if (wrapElement) {\n return wrapElement(element);\n }\n return element;\n}\nfunction createHook(useProps) {\n const useRole = (props = {}) => {\n return useProps(props);\n };\n useRole.displayName = useProps.name;\n return useRole;\n}\nfunction createStoreContext(providers = [], scopedProviders = []) {\n const context = React.createContext(void 0);\n const scopedContext = React.createContext(void 0);\n const useContext2 = () => React.useContext(context);\n const useScopedContext = (onlyScoped = false) => {\n const scoped = React.useContext(scopedContext);\n const store = useContext2();\n if (onlyScoped)\n return scoped;\n return scoped || store;\n };\n const useProviderContext = () => {\n const scoped = React.useContext(scopedContext);\n const store = useContext2();\n if (scoped && scoped === store)\n return;\n return store;\n };\n const ContextProvider = (props) => {\n return providers.reduceRight(\n (children, Provider) => /* @__PURE__ */ jsx(Provider, __spreadProps(__spreadValues({}, props), { children })),\n /* @__PURE__ */ jsx(context.Provider, __spreadValues({}, props))\n );\n };\n const ScopedContextProvider = (props) => {\n return /* @__PURE__ */ jsx(ContextProvider, __spreadProps(__spreadValues({}, props), { children: scopedProviders.reduceRight(\n (children, Provider) => /* @__PURE__ */ jsx(Provider, __spreadProps(__spreadValues({}, props), { children })),\n /* @__PURE__ */ jsx(scopedContext.Provider, __spreadValues({}, props))\n ) }));\n };\n return {\n context,\n scopedContext,\n useContext: useContext2,\n useScopedContext,\n useProviderContext,\n ContextProvider,\n ScopedContextProvider\n };\n}\n\nexport {\n forwardRef2 as forwardRef,\n memo2 as memo,\n createElement,\n createHook,\n createStoreContext\n};\n","\"use client\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/collection/collection-context.tsx\nvar ctx = createStoreContext();\nvar useCollectionContext = ctx.useContext;\nvar useCollectionScopedContext = ctx.useScopedContext;\nvar useCollectionProviderContext = ctx.useProviderContext;\nvar CollectionContextProvider = ctx.ContextProvider;\nvar CollectionScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useCollectionContext,\n useCollectionScopedContext,\n useCollectionProviderContext,\n CollectionContextProvider,\n CollectionScopedContextProvider\n};\n","\"use client\";\nimport {\n CollectionContextProvider,\n CollectionScopedContextProvider\n} from \"./MADQZZRL.js\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/composite/composite-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [CollectionContextProvider],\n [CollectionScopedContextProvider]\n);\nvar useCompositeContext = ctx.useContext;\nvar useCompositeScopedContext = ctx.useScopedContext;\nvar useCompositeProviderContext = ctx.useProviderContext;\nvar CompositeContextProvider = ctx.ContextProvider;\nvar CompositeScopedContextProvider = ctx.ScopedContextProvider;\nvar CompositeItemContext = createContext(\n void 0\n);\nvar CompositeRowContext = createContext(\n void 0\n);\n\nexport {\n useCompositeContext,\n useCompositeScopedContext,\n useCompositeProviderContext,\n CompositeContextProvider,\n CompositeScopedContextProvider,\n CompositeItemContext,\n CompositeRowContext\n};\n","\"use client\";\nimport {\n flipItems\n} from \"./3IEDWLST.js\";\nimport {\n useCompositeContext\n} from \"./3D6OCOHF.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useEvent\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/composite/composite-typeahead.ts\nimport { useRef } from \"react\";\nimport { isTextField } from \"@ariakit/core/utils/dom\";\nimport { isSelfTarget } from \"@ariakit/core/utils/events\";\nimport {\n invariant,\n normalizeString,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nvar chars = \"\";\nfunction clearChars() {\n chars = \"\";\n}\nfunction isValidTypeaheadEvent(event) {\n const target = event.target;\n if (target && isTextField(target))\n return false;\n if (event.key === \" \" && chars.length)\n return true;\n return event.key.length === 1 && !event.ctrlKey && !event.altKey && !event.metaKey && /^[\\p{Letter}\\p{Number}]$/u.test(event.key);\n}\nfunction isSelfTargetOrItem(event, items) {\n if (isSelfTarget(event))\n return true;\n const target = event.target;\n if (!target)\n return false;\n const isItem = items.some((item) => item.element === target);\n return isItem;\n}\nfunction getEnabledItems(items) {\n return items.filter((item) => !item.disabled);\n}\nfunction itemTextStartsWith(item, text) {\n var _a;\n const itemText = ((_a = item.element) == null ? void 0 : _a.textContent) || item.children;\n if (!itemText)\n return false;\n return normalizeString(itemText).trim().toLowerCase().startsWith(text.toLowerCase());\n}\nfunction getSameInitialItems(items, char, activeId) {\n if (!activeId)\n return items;\n const activeItem = items.find((item) => item.id === activeId);\n if (!activeItem)\n return items;\n if (!itemTextStartsWith(activeItem, char))\n return items;\n if (chars !== char && itemTextStartsWith(activeItem, chars))\n return items;\n chars = char;\n return flipItems(\n items.filter((item) => itemTextStartsWith(item, chars)),\n activeId\n ).filter((item) => item.id !== activeId);\n}\nvar useCompositeTypeahead = createHook(function useCompositeTypeahead2(_a) {\n var _b = _a, { store, typeahead = true } = _b, props = __objRest(_b, [\"store\", \"typeahead\"]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeTypeahead must be a Composite component\"\n );\n const onKeyDownCaptureProp = props.onKeyDownCapture;\n const cleanupTimeoutRef = useRef(0);\n const onKeyDownCapture = useEvent((event) => {\n onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);\n if (event.defaultPrevented)\n return;\n if (!typeahead)\n return;\n if (!store)\n return;\n const { items, activeId } = store.getState();\n if (!isValidTypeaheadEvent(event))\n return clearChars();\n let enabledItems = getEnabledItems(items);\n if (!isSelfTargetOrItem(event, enabledItems))\n return clearChars();\n event.preventDefault();\n window.clearTimeout(cleanupTimeoutRef.current);\n cleanupTimeoutRef.current = window.setTimeout(() => {\n chars = \"\";\n }, 500);\n const char = event.key.toLowerCase();\n chars += char;\n enabledItems = getSameInitialItems(enabledItems, char, activeId);\n const item = enabledItems.find((item2) => itemTextStartsWith(item2, chars));\n if (item) {\n store.move(item.id);\n } else {\n clearChars();\n }\n });\n props = __spreadProps(__spreadValues({}, props), {\n onKeyDownCapture\n });\n return removeUndefinedValues(props);\n});\nvar CompositeTypeahead = forwardRef(function CompositeTypeahead2(props) {\n const htmlProps = useCompositeTypeahead(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCompositeTypeahead,\n CompositeTypeahead\n};\n","\"use client\";\nimport {\n closest,\n contains,\n getActiveElement,\n isFrame,\n isVisible,\n matches\n} from \"../__chunks/RRSZHCH6.js\";\nimport {\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/utils/focus.ts\nvar selector = \"input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])\";\nfunction hasNegativeTabIndex(element) {\n const tabIndex = parseInt(element.getAttribute(\"tabindex\") || \"0\", 10);\n return tabIndex < 0;\n}\nfunction isFocusable(element) {\n if (!matches(element, selector))\n return false;\n if (!isVisible(element))\n return false;\n if (closest(element, \"[inert]\"))\n return false;\n return true;\n}\nfunction isTabbable(element) {\n if (!isFocusable(element))\n return false;\n if (hasNegativeTabIndex(element))\n return false;\n if (!(\"form\" in element))\n return true;\n if (!element.form)\n return true;\n if (element.checked)\n return true;\n if (element.type !== \"radio\")\n return true;\n const radioGroup = element.form.elements.namedItem(element.name);\n if (!radioGroup)\n return true;\n if (!(\"length\" in radioGroup))\n return true;\n const activeElement = getActiveElement(element);\n if (!activeElement)\n return true;\n if (activeElement === element)\n return true;\n if (!(\"form\" in activeElement))\n return true;\n if (activeElement.form !== element.form)\n return true;\n if (activeElement.name !== element.name)\n return true;\n return false;\n}\nfunction getAllFocusableIn(container, includeContainer) {\n const elements = Array.from(\n container.querySelectorAll(selector)\n );\n if (includeContainer) {\n elements.unshift(container);\n }\n const focusableElements = elements.filter(isFocusable);\n focusableElements.forEach((element, i) => {\n if (isFrame(element) && element.contentDocument) {\n const frameBody = element.contentDocument.body;\n focusableElements.splice(i, 1, ...getAllFocusableIn(frameBody));\n }\n });\n return focusableElements;\n}\nfunction getAllFocusable(includeBody) {\n return getAllFocusableIn(document.body, includeBody);\n}\nfunction getFirstFocusableIn(container, includeContainer) {\n const [first] = getAllFocusableIn(container, includeContainer);\n return first || null;\n}\nfunction getFirstFocusable(includeBody) {\n return getFirstFocusableIn(document.body, includeBody);\n}\nfunction getAllTabbableIn(container, includeContainer, fallbackToFocusable) {\n const elements = Array.from(\n container.querySelectorAll(selector)\n );\n const tabbableElements = elements.filter(isTabbable);\n if (includeContainer && isTabbable(container)) {\n tabbableElements.unshift(container);\n }\n tabbableElements.forEach((element, i) => {\n if (isFrame(element) && element.contentDocument) {\n const frameBody = element.contentDocument.body;\n const allFrameTabbable = getAllTabbableIn(\n frameBody,\n false,\n fallbackToFocusable\n );\n tabbableElements.splice(i, 1, ...allFrameTabbable);\n }\n });\n if (!tabbableElements.length && fallbackToFocusable) {\n return elements;\n }\n return tabbableElements;\n}\nfunction getAllTabbable(fallbackToFocusable) {\n return getAllTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getFirstTabbableIn(container, includeContainer, fallbackToFocusable) {\n const [first] = getAllTabbableIn(\n container,\n includeContainer,\n fallbackToFocusable\n );\n return first || null;\n}\nfunction getFirstTabbable(fallbackToFocusable) {\n return getFirstTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getLastTabbableIn(container, includeContainer, fallbackToFocusable) {\n const allTabbable = getAllTabbableIn(\n container,\n includeContainer,\n fallbackToFocusable\n );\n return allTabbable[allTabbable.length - 1] || null;\n}\nfunction getLastTabbable(fallbackToFocusable) {\n return getLastTabbableIn(document.body, false, fallbackToFocusable);\n}\nfunction getNextTabbableIn(container, includeContainer, fallbackToFirst, fallbackToFocusable) {\n const activeElement = getActiveElement(container);\n const allFocusable = getAllFocusableIn(container, includeContainer);\n const activeIndex = allFocusable.indexOf(activeElement);\n const nextFocusableElements = allFocusable.slice(activeIndex + 1);\n return nextFocusableElements.find(isTabbable) || (fallbackToFirst ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? nextFocusableElements[0] : null) || null;\n}\nfunction getNextTabbable(fallbackToFirst, fallbackToFocusable) {\n return getNextTabbableIn(\n document.body,\n false,\n fallbackToFirst,\n fallbackToFocusable\n );\n}\nfunction getPreviousTabbableIn(container, includeContainer, fallbackToLast, fallbackToFocusable) {\n const activeElement = getActiveElement(container);\n const allFocusable = getAllFocusableIn(container, includeContainer).reverse();\n const activeIndex = allFocusable.indexOf(activeElement);\n const previousFocusableElements = allFocusable.slice(activeIndex + 1);\n return previousFocusableElements.find(isTabbable) || (fallbackToLast ? allFocusable.find(isTabbable) : null) || (fallbackToFocusable ? previousFocusableElements[0] : null) || null;\n}\nfunction getPreviousTabbable(fallbackToFirst, fallbackToFocusable) {\n return getPreviousTabbableIn(\n document.body,\n false,\n fallbackToFirst,\n fallbackToFocusable\n );\n}\nfunction getClosestFocusable(element) {\n while (element && !isFocusable(element)) {\n element = closest(element, selector);\n }\n return element || null;\n}\nfunction hasFocus(element) {\n const activeElement = getActiveElement(element);\n if (!activeElement)\n return false;\n if (activeElement === element)\n return true;\n const activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n if (!activeDescendant)\n return false;\n return activeDescendant === element.id;\n}\nfunction hasFocusWithin(element) {\n const activeElement = getActiveElement(element);\n if (!activeElement)\n return false;\n if (contains(element, activeElement))\n return true;\n const activeDescendant = activeElement.getAttribute(\"aria-activedescendant\");\n if (!activeDescendant)\n return false;\n if (!(\"id\" in element))\n return false;\n if (activeDescendant === element.id)\n return true;\n return !!element.querySelector(`#${CSS.escape(activeDescendant)}`);\n}\nfunction focusIfNeeded(element) {\n if (!hasFocusWithin(element) && isFocusable(element)) {\n element.focus();\n }\n}\nfunction disableFocus(element) {\n var _a;\n const currentTabindex = (_a = element.getAttribute(\"tabindex\")) != null ? _a : \"\";\n element.setAttribute(\"data-tabindex\", currentTabindex);\n element.setAttribute(\"tabindex\", \"-1\");\n}\nfunction disableFocusIn(container, includeContainer) {\n const tabbableElements = getAllTabbableIn(container, includeContainer);\n tabbableElements.forEach(disableFocus);\n}\nfunction restoreFocusIn(container) {\n const elements = container.querySelectorAll(\"[data-tabindex]\");\n const restoreTabIndex = (element) => {\n const tabindex = element.getAttribute(\"data-tabindex\");\n element.removeAttribute(\"data-tabindex\");\n if (tabindex) {\n element.setAttribute(\"tabindex\", tabindex);\n } else {\n element.removeAttribute(\"tabindex\");\n }\n };\n if (container.hasAttribute(\"data-tabindex\")) {\n restoreTabIndex(container);\n }\n elements.forEach(restoreTabIndex);\n}\nfunction focusIntoView(element, options) {\n if (!(\"scrollIntoView\" in element)) {\n element.focus();\n } else {\n element.focus({ preventScroll: true });\n element.scrollIntoView(__spreadValues({ block: \"nearest\", inline: \"nearest\" }, options));\n }\n}\nexport {\n disableFocus,\n disableFocusIn,\n focusIfNeeded,\n focusIntoView,\n getAllFocusable,\n getAllFocusableIn,\n getAllTabbable,\n getAllTabbableIn,\n getClosestFocusable,\n getFirstFocusable,\n getFirstFocusableIn,\n getFirstTabbable,\n getFirstTabbableIn,\n getLastTabbable,\n getLastTabbableIn,\n getNextTabbable,\n getNextTabbableIn,\n getPreviousTabbable,\n getPreviousTabbableIn,\n hasFocus,\n hasFocusWithin,\n isFocusable,\n isTabbable,\n restoreFocusIn\n};\n","\"use client\";\nimport {\n useCompositeContext\n} from \"./3D6OCOHF.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./5M6RSQEC.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useIsMouseMoving,\n useMergeRefs\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/composite/composite-hover.ts\nimport { useCallback } from \"react\";\nimport { contains } from \"@ariakit/core/utils/dom\";\nimport { hasFocus, hasFocusWithin } from \"@ariakit/core/utils/focus\";\nimport {\n hasOwnProperty,\n invariant,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nfunction getMouseDestination(event) {\n const relatedTarget = event.relatedTarget;\n if ((relatedTarget == null ? void 0 : relatedTarget.nodeType) === Node.ELEMENT_NODE) {\n return relatedTarget;\n }\n return null;\n}\nfunction hoveringInside(event) {\n const nextElement = getMouseDestination(event);\n if (!nextElement)\n return false;\n return contains(event.currentTarget, nextElement);\n}\nvar symbol = Symbol(\"composite-hover\");\nfunction movingToAnotherItem(event) {\n let dest = getMouseDestination(event);\n if (!dest)\n return false;\n do {\n if (hasOwnProperty(dest, symbol) && dest[symbol])\n return true;\n dest = dest.parentElement;\n } while (dest);\n return false;\n}\nvar useCompositeHover = createHook(\n function useCompositeHover2(_a) {\n var _b = _a, {\n store,\n focusOnHover = true,\n blurOnHoverEnd = !!focusOnHover\n } = _b, props = __objRest(_b, [\n \"store\",\n \"focusOnHover\",\n \"blurOnHoverEnd\"\n ]);\n const context = useCompositeContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"CompositeHover must be wrapped in a Composite component.\"\n );\n const isMouseMoving = useIsMouseMoving();\n const onMouseMoveProp = props.onMouseMove;\n const focusOnHoverProp = useBooleanEvent(focusOnHover);\n const onMouseMove = useEvent((event) => {\n onMouseMoveProp == null ? void 0 : onMouseMoveProp(event);\n if (event.defaultPrevented)\n return;\n if (!isMouseMoving())\n return;\n if (!focusOnHoverProp(event))\n return;\n if (!hasFocusWithin(event.currentTarget)) {\n const baseElement = store == null ? void 0 : store.getState().baseElement;\n if (baseElement && !hasFocus(baseElement)) {\n baseElement.focus();\n }\n }\n store == null ? void 0 : store.setActiveId(event.currentTarget.id);\n });\n const onMouseLeaveProp = props.onMouseLeave;\n const blurOnHoverEndProp = useBooleanEvent(blurOnHoverEnd);\n const onMouseLeave = useEvent((event) => {\n var _a2;\n onMouseLeaveProp == null ? void 0 : onMouseLeaveProp(event);\n if (event.defaultPrevented)\n return;\n if (!isMouseMoving())\n return;\n if (hoveringInside(event))\n return;\n if (movingToAnotherItem(event))\n return;\n if (!focusOnHoverProp(event))\n return;\n if (!blurOnHoverEndProp(event))\n return;\n store == null ? void 0 : store.setActiveId(null);\n (_a2 = store == null ? void 0 : store.getState().baseElement) == null ? void 0 : _a2.focus();\n });\n const ref = useCallback((element) => {\n if (!element)\n return;\n element[symbol] = true;\n }, []);\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref),\n onMouseMove,\n onMouseLeave\n });\n return removeUndefinedValues(props);\n }\n);\nvar CompositeHover = memo(\n forwardRef(function CompositeHover2(props) {\n const htmlProps = useCompositeHover(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useCompositeHover,\n CompositeHover\n};\n","\"use client\";\nimport {\n applyState,\n chain,\n getKeys,\n hasOwnProperty,\n invariant,\n noop,\n omit,\n pick\n} from \"./22HHDS5F.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/store.ts\nfunction getInternal(store, key) {\n const internals = store.__unstableInternals;\n invariant(internals, \"Invalid store\");\n return internals[key];\n}\nfunction createStore(initialState, ...stores) {\n let state = initialState;\n let prevStateBatch = state;\n let lastUpdate = Symbol();\n let destroy = noop;\n const instances = /* @__PURE__ */ new Set();\n const updatedKeys = /* @__PURE__ */ new Set();\n const setups = /* @__PURE__ */ new Set();\n const listeners = /* @__PURE__ */ new Set();\n const batchListeners = /* @__PURE__ */ new Set();\n const disposables = /* @__PURE__ */ new WeakMap();\n const listenerKeys = /* @__PURE__ */ new WeakMap();\n const storeSetup = (callback) => {\n setups.add(callback);\n return () => setups.delete(callback);\n };\n const storeInit = () => {\n const initialized = instances.size;\n const instance = Symbol();\n instances.add(instance);\n const maybeDestroy = () => {\n instances.delete(instance);\n if (instances.size)\n return;\n destroy();\n };\n if (initialized)\n return maybeDestroy;\n const desyncs = getKeys(state).map(\n (key) => chain(\n ...stores.map((store) => {\n var _a;\n const storeState = (_a = store == null ? void 0 : store.getState) == null ? void 0 : _a.call(store);\n if (!storeState)\n return;\n if (!hasOwnProperty(storeState, key))\n return;\n return sync(store, [key], (state2) => {\n setState(\n key,\n state2[key],\n // @ts-expect-error - Not public API. This is just to prevent\n // infinite loops.\n true\n );\n });\n })\n )\n );\n const teardowns = [];\n setups.forEach((setup2) => teardowns.push(setup2()));\n const cleanups = stores.map(init);\n destroy = chain(...desyncs, ...teardowns, ...cleanups);\n return maybeDestroy;\n };\n const sub = (keys, listener, set = listeners) => {\n set.add(listener);\n listenerKeys.set(listener, keys);\n return () => {\n var _a;\n (_a = disposables.get(listener)) == null ? void 0 : _a();\n disposables.delete(listener);\n listenerKeys.delete(listener);\n set.delete(listener);\n };\n };\n const storeSubscribe = (keys, listener) => sub(keys, listener);\n const storeSync = (keys, listener) => {\n disposables.set(listener, listener(state, state));\n return sub(keys, listener);\n };\n const storeBatch = (keys, listener) => {\n disposables.set(listener, listener(state, prevStateBatch));\n return sub(keys, listener, batchListeners);\n };\n const storePick = (keys) => createStore(pick(state, keys), finalStore);\n const storeOmit = (keys) => createStore(omit(state, keys), finalStore);\n const getState = () => state;\n const setState = (key, value, fromStores = false) => {\n if (!hasOwnProperty(state, key))\n return;\n const nextValue = applyState(value, state[key]);\n if (nextValue === state[key])\n return;\n if (!fromStores) {\n stores.forEach((store) => {\n var _a;\n (_a = store == null ? void 0 : store.setState) == null ? void 0 : _a.call(store, key, nextValue);\n });\n }\n const prevState = state;\n state = __spreadProps(__spreadValues({}, state), { [key]: nextValue });\n const thisUpdate = Symbol();\n lastUpdate = thisUpdate;\n updatedKeys.add(key);\n const run = (listener, prev, uKeys) => {\n var _a;\n const keys = listenerKeys.get(listener);\n const updated = (k) => uKeys ? uKeys.has(k) : k === key;\n if (!keys || keys.some(updated)) {\n (_a = disposables.get(listener)) == null ? void 0 : _a();\n disposables.set(listener, listener(state, prev));\n }\n };\n listeners.forEach((listener) => {\n run(listener, prevState);\n });\n queueMicrotask(() => {\n if (lastUpdate !== thisUpdate)\n return;\n const snapshot = state;\n batchListeners.forEach((listener) => {\n run(listener, prevStateBatch, updatedKeys);\n });\n prevStateBatch = snapshot;\n updatedKeys.clear();\n });\n };\n const finalStore = {\n getState,\n setState,\n __unstableInternals: {\n setup: storeSetup,\n init: storeInit,\n subscribe: storeSubscribe,\n sync: storeSync,\n batch: storeBatch,\n pick: storePick,\n omit: storeOmit\n }\n };\n return finalStore;\n}\nfunction setup(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"setup\")(...args);\n}\nfunction init(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"init\")(...args);\n}\nfunction subscribe(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"subscribe\")(...args);\n}\nfunction sync(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"sync\")(...args);\n}\nfunction batch(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"batch\")(...args);\n}\nfunction omit2(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"omit\")(...args);\n}\nfunction pick2(store, ...args) {\n if (!store)\n return;\n return getInternal(store, \"pick\")(...args);\n}\nfunction mergeStore(...stores) {\n const initialState = stores.reduce((state, store2) => {\n var _a;\n const nextState = (_a = store2 == null ? void 0 : store2.getState) == null ? void 0 : _a.call(store2);\n if (!nextState)\n return state;\n return __spreadValues(__spreadValues({}, state), nextState);\n }, {});\n const store = createStore(initialState, ...stores);\n return store;\n}\nfunction throwOnConflictingProps(props, store) {\n if (process.env.NODE_ENV === \"production\")\n return;\n if (!store)\n return;\n const defaultKeys = Object.entries(props).filter(([key, value]) => key.startsWith(\"default\") && value !== void 0).map(([key]) => {\n var _a;\n const stateKey = key.replace(\"default\", \"\");\n return `${((_a = stateKey[0]) == null ? void 0 : _a.toLowerCase()) || \"\"}${stateKey.slice(1)}`;\n });\n if (!defaultKeys.length)\n return;\n const storeState = store.getState();\n const conflictingProps = defaultKeys.filter(\n (key) => hasOwnProperty(storeState, key)\n );\n if (!conflictingProps.length)\n return;\n throw new Error(\n `Passing a store prop in conjunction with a default state is not supported.\n\nconst store = useSelectStore();\n<SelectProvider store={store} defaultValue=\"Apple\" />\n ^ ^\n\nInstead, pass the default state to the topmost store:\n\nconst store = useSelectStore({ defaultValue: \"Apple\" });\n<SelectProvider store={store} />\n\nSee https://github.com/ariakit/ariakit/pull/2745 for more details.\n\nIf there's a particular need for this, please submit a feature request at https://github.com/ariakit/ariakit\n`\n );\n}\n\nexport {\n createStore,\n setup,\n init,\n subscribe,\n sync,\n batch,\n omit2 as omit,\n pick2 as pick,\n mergeStore,\n throwOnConflictingProps\n};\n","\"use client\";\nimport {\n useEvent,\n useLiveRef,\n useSafeLayoutEffect\n} from \"./6O5OEQGF.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/utils/store.tsx\nimport * as React from \"react\";\nimport { hasOwnProperty, identity } from \"@ariakit/core/utils/misc\";\nimport { batch, init, subscribe, sync } from \"@ariakit/core/utils/store\";\nimport useSyncExternalStoreExports from \"use-sync-external-store/shim/index.js\";\nvar { useSyncExternalStore } = useSyncExternalStoreExports;\nvar noopSubscribe = () => () => {\n};\nfunction useStoreState(store, keyOrSelector = identity) {\n const storeSubscribe = React.useCallback(\n (callback) => {\n if (!store)\n return noopSubscribe();\n return subscribe(store, null, callback);\n },\n [store]\n );\n const getSnapshot = () => {\n const key = typeof keyOrSelector === \"string\" ? keyOrSelector : null;\n const selector = typeof keyOrSelector === \"function\" ? keyOrSelector : null;\n const state = store == null ? void 0 : store.getState();\n if (selector)\n return selector(state);\n if (!state)\n return;\n if (!key)\n return;\n if (!hasOwnProperty(state, key))\n return;\n return state[key];\n };\n return useSyncExternalStore(storeSubscribe, getSnapshot, getSnapshot);\n}\nfunction useStoreProps(store, props, key, setKey) {\n const value = hasOwnProperty(props, key) ? props[key] : void 0;\n const setValue = setKey ? props[setKey] : void 0;\n const propsRef = useLiveRef({ value, setValue });\n useSafeLayoutEffect(() => {\n return sync(store, [key], (state, prev) => {\n const { value: value2, setValue: setValue2 } = propsRef.current;\n if (!setValue2)\n return;\n if (state[key] === prev[key])\n return;\n if (state[key] === value2)\n return;\n setValue2(state[key]);\n });\n }, [store, key]);\n useSafeLayoutEffect(() => {\n if (value === void 0)\n return;\n store.setState(key, value);\n return batch(store, [key], () => {\n if (value === void 0)\n return;\n store.setState(key, value);\n });\n });\n}\nfunction useStore(createStore, props) {\n const [store, setStore] = React.useState(() => createStore(props));\n useSafeLayoutEffect(() => init(store), [store]);\n const useState2 = React.useCallback(\n (keyOrSelector) => useStoreState(store, keyOrSelector),\n [store]\n );\n const memoizedStore = React.useMemo(\n () => __spreadProps(__spreadValues({}, store), { useState: useState2 }),\n [store, useState2]\n );\n const updateStore = useEvent(() => {\n setStore((store2) => createStore(__spreadValues(__spreadValues({}, props), store2.getState())));\n });\n return [memoizedStore, updateStore];\n}\n\nexport {\n useStoreState,\n useStoreProps,\n useStore\n};\n","\"use client\";\nimport {\n useCollectionStoreProps\n} from \"./Y6GYTNQ2.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./EKQEJRUF.js\";\n\n// src/composite/composite-store.ts\nimport * as Core from \"@ariakit/core/composite/composite-store\";\nfunction useCompositeStoreProps(store, update, props) {\n store = useCollectionStoreProps(store, update, props);\n useStoreProps(store, props, \"activeId\", \"setActiveId\");\n useStoreProps(store, props, \"includesBaseElement\");\n useStoreProps(store, props, \"virtualFocus\");\n useStoreProps(store, props, \"orientation\");\n useStoreProps(store, props, \"rtl\");\n useStoreProps(store, props, \"focusLoop\");\n useStoreProps(store, props, \"focusWrap\");\n useStoreProps(store, props, \"focusShift\");\n return store;\n}\nfunction useCompositeStore(props = {}) {\n const [store, update] = useStore(Core.createCompositeStore, props);\n return useCompositeStoreProps(store, update, props);\n}\n\nexport {\n useCompositeStoreProps,\n useCompositeStore\n};\n","\"use client\";\nimport {\n useStore,\n useStoreProps\n} from \"./EKQEJRUF.js\";\nimport {\n useUpdateEffect\n} from \"./6O5OEQGF.js\";\n\n// src/collection/collection-store.ts\nimport * as Core from \"@ariakit/core/collection/collection-store\";\nfunction useCollectionStoreProps(store, update, props) {\n useUpdateEffect(update, [props.store]);\n useStoreProps(store, props, \"items\", \"setItems\");\n return store;\n}\nfunction useCollectionStore(props = {}) {\n const [store, update] = useStore(Core.createCollectionStore, props);\n return useCollectionStoreProps(store, update, props);\n}\n\nexport {\n useCollectionStoreProps,\n useCollectionStore\n};\n","\"use client\";\nimport {\n useDisclosureStoreProps\n} from \"./HZJ2XALY.js\";\nimport {\n useStore\n} from \"./EKQEJRUF.js\";\n\n// src/dialog/dialog-store.ts\nimport * as Core from \"@ariakit/core/dialog/dialog-store\";\nfunction useDialogStoreProps(store, update, props) {\n return useDisclosureStoreProps(store, update, props);\n}\nfunction useDialogStore(props = {}) {\n const [store, update] = useStore(Core.createDialogStore, props);\n return useDialogStoreProps(store, update, props);\n}\n\nexport {\n useDialogStoreProps,\n useDialogStore\n};\n","\"use client\";\nimport {\n useStore,\n useStoreProps\n} from \"./EKQEJRUF.js\";\nimport {\n useUpdateEffect\n} from \"./6O5OEQGF.js\";\n\n// src/disclosure/disclosure-store.ts\nimport * as Core from \"@ariakit/core/disclosure/disclosure-store\";\nfunction useDisclosureStoreProps(store, update, props) {\n useUpdateEffect(update, [props.store, props.disclosure]);\n useStoreProps(store, props, \"open\", \"setOpen\");\n useStoreProps(store, props, \"mounted\", \"setMounted\");\n useStoreProps(store, props, \"animated\");\n return Object.assign(store, { disclosure: props.disclosure });\n}\nfunction useDisclosureStore(props = {}) {\n const [store, update] = useStore(Core.createDisclosureStore, props);\n return useDisclosureStoreProps(store, update, props);\n}\n\nexport {\n useDisclosureStoreProps,\n useDisclosureStore\n};\n","\"use client\";\nimport {\n batch,\n createStore,\n init,\n setup,\n throwOnConflictingProps\n} from \"./R676XYVY.js\";\nimport {\n chain,\n defaultValue\n} from \"./22HHDS5F.js\";\nimport {\n getDocument\n} from \"./RRSZHCH6.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/collection/collection-store.ts\nfunction isElementPreceding(a, b) {\n return Boolean(\n b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING\n );\n}\nfunction sortBasedOnDOMPosition(items) {\n const pairs = items.map((item, index) => [index, item]);\n let isOrderDifferent = false;\n pairs.sort(([indexA, a], [indexB, b]) => {\n const elementA = a.element;\n const elementB = b.element;\n if (elementA === elementB)\n return 0;\n if (!elementA || !elementB)\n return 0;\n if (isElementPreceding(elementA, elementB)) {\n if (indexA > indexB) {\n isOrderDifferent = true;\n }\n return -1;\n }\n if (indexA < indexB) {\n isOrderDifferent = true;\n }\n return 1;\n });\n if (isOrderDifferent) {\n return pairs.map(([_, item]) => item);\n }\n return items;\n}\nfunction getCommonParent(items) {\n var _a;\n const firstItem = items.find((item) => !!item.element);\n const lastItem = [...items].reverse().find((item) => !!item.element);\n let parentElement = (_a = firstItem == null ? void 0 : firstItem.element) == null ? void 0 : _a.parentElement;\n while (parentElement && (lastItem == null ? void 0 : lastItem.element)) {\n const parent = parentElement;\n if (lastItem && parent.contains(lastItem.element)) {\n return parentElement;\n }\n parentElement = parentElement.parentElement;\n }\n return getDocument(parentElement).body;\n}\nfunction getPrivateStore(store) {\n return store == null ? void 0 : store.__unstablePrivateStore;\n}\nfunction createCollectionStore(props = {}) {\n var _a;\n throwOnConflictingProps(props, props.store);\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const items = defaultValue(\n props.items,\n syncState == null ? void 0 : syncState.items,\n props.defaultItems,\n []\n );\n const itemsMap = new Map(items.map((item) => [item.id, item]));\n const initialState = {\n items,\n renderedItems: defaultValue(syncState == null ? void 0 : syncState.renderedItems, [])\n };\n const syncPrivateStore = getPrivateStore(props.store);\n const privateStore = createStore(\n { items, renderedItems: initialState.renderedItems },\n syncPrivateStore\n );\n const collection = createStore(initialState, props.store);\n const sortItems = (renderedItems) => {\n const sortedItems = sortBasedOnDOMPosition(renderedItems);\n privateStore.setState(\"renderedItems\", sortedItems);\n collection.setState(\"renderedItems\", sortedItems);\n };\n setup(collection, () => init(privateStore));\n setup(privateStore, () => {\n return batch(privateStore, [\"items\"], (state) => {\n collection.setState(\"items\", state.items);\n });\n });\n setup(privateStore, () => {\n return batch(privateStore, [\"renderedItems\"], (state) => {\n let firstRun = true;\n let raf = requestAnimationFrame(() => {\n const { renderedItems } = collection.getState();\n if (state.renderedItems === renderedItems)\n return;\n sortItems(state.renderedItems);\n });\n if (typeof IntersectionObserver !== \"function\") {\n return () => cancelAnimationFrame(raf);\n }\n const ioCallback = () => {\n if (firstRun) {\n firstRun = false;\n return;\n }\n cancelAnimationFrame(raf);\n raf = requestAnimationFrame(() => sortItems(state.renderedItems));\n };\n const root = getCommonParent(state.renderedItems);\n const observer = new IntersectionObserver(ioCallback, { root });\n for (const item of state.renderedItems) {\n if (!item.element)\n continue;\n observer.observe(item.element);\n }\n return () => {\n cancelAnimationFrame(raf);\n observer.disconnect();\n };\n });\n });\n const mergeItem = (item, setItems, canDeleteFromMap = false) => {\n let prevItem;\n setItems((items2) => {\n const index = items2.findIndex(({ id }) => id === item.id);\n const nextItems = items2.slice();\n if (index !== -1) {\n prevItem = items2[index];\n const nextItem = __spreadValues(__spreadValues({}, prevItem), item);\n nextItems[index] = nextItem;\n itemsMap.set(item.id, nextItem);\n } else {\n nextItems.push(item);\n itemsMap.set(item.id, item);\n }\n return nextItems;\n });\n const unmergeItem = () => {\n setItems((items2) => {\n if (!prevItem) {\n if (canDeleteFromMap) {\n itemsMap.delete(item.id);\n }\n return items2.filter(({ id }) => id !== item.id);\n }\n const index = items2.findIndex(({ id }) => id === item.id);\n if (index === -1)\n return items2;\n const nextItems = items2.slice();\n nextItems[index] = prevItem;\n itemsMap.set(item.id, prevItem);\n return nextItems;\n });\n };\n return unmergeItem;\n };\n const registerItem = (item) => mergeItem(\n item,\n (getItems) => privateStore.setState(\"items\", getItems),\n true\n );\n return __spreadProps(__spreadValues({}, collection), {\n registerItem,\n renderItem: (item) => chain(\n registerItem(item),\n mergeItem(\n item,\n (getItems) => privateStore.setState(\"renderedItems\", getItems)\n )\n ),\n item: (id) => {\n if (!id)\n return null;\n let item = itemsMap.get(id);\n if (!item) {\n const { items: items2 } = collection.getState();\n item = items2.find((item2) => item2.id === id);\n if (item) {\n itemsMap.set(id, item);\n }\n }\n return item || null;\n },\n // @ts-expect-error Internal\n __unstablePrivateStore: privateStore\n });\n}\n\nexport {\n createCollectionStore\n};\n","\"use client\";\n\n// src/utils/array.ts\nfunction toArray(arg) {\n if (Array.isArray(arg)) {\n return arg;\n }\n return typeof arg !== \"undefined\" ? [arg] : [];\n}\nfunction addItemToArray(array, item, index = -1) {\n if (!(index in array)) {\n return [...array, item];\n }\n return [...array.slice(0, index), item, ...array.slice(index)];\n}\nfunction flatten2DArray(array) {\n const flattened = [];\n for (const row of array) {\n flattened.push(...row);\n }\n return flattened;\n}\nfunction reverseArray(array) {\n return array.slice().reverse();\n}\n\nexport {\n toArray,\n addItemToArray,\n flatten2DArray,\n reverseArray\n};\n","\"use client\";\nimport {\n createCollectionStore\n} from \"./URUD7X4C.js\";\nimport {\n createStore,\n setup,\n sync\n} from \"./R676XYVY.js\";\nimport {\n defaultValue\n} from \"./22HHDS5F.js\";\nimport {\n flatten2DArray,\n reverseArray\n} from \"./7PRQYBBV.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/composite/composite-store.ts\nvar NULL_ITEM = { id: null };\nfunction findFirstEnabledItem(items, excludeId) {\n return items.find((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getEnabledItems(items, excludeId) {\n return items.filter((item) => {\n if (excludeId) {\n return !item.disabled && item.id !== excludeId;\n }\n return !item.disabled;\n });\n}\nfunction getOppositeOrientation(orientation) {\n if (orientation === \"vertical\")\n return \"horizontal\";\n if (orientation === \"horizontal\")\n return \"vertical\";\n return;\n}\nfunction getItemsInRow(items, rowId) {\n return items.filter((item) => item.rowId === rowId);\n}\nfunction flipItems(items, activeId, shouldInsertNullItem = false) {\n const index = items.findIndex((item) => item.id === activeId);\n return [\n ...items.slice(index + 1),\n ...shouldInsertNullItem ? [NULL_ITEM] : [],\n ...items.slice(0, index)\n ];\n}\nfunction groupItemsByRows(items) {\n const rows = [];\n for (const item of items) {\n const row = rows.find((currentRow) => {\n var _a;\n return ((_a = currentRow[0]) == null ? void 0 : _a.rowId) === item.rowId;\n });\n if (row) {\n row.push(item);\n } else {\n rows.push([item]);\n }\n }\n return rows;\n}\nfunction getMaxRowLength(array) {\n let maxLength = 0;\n for (const { length } of array) {\n if (length > maxLength) {\n maxLength = length;\n }\n }\n return maxLength;\n}\nfunction createEmptyItem(rowId) {\n return {\n id: \"__EMPTY_ITEM__\",\n disabled: true,\n rowId\n };\n}\nfunction normalizeRows(rows, activeId, focusShift) {\n const maxLength = getMaxRowLength(rows);\n for (const row of rows) {\n for (let i = 0; i < maxLength; i += 1) {\n const item = row[i];\n if (!item || focusShift && item.disabled) {\n const isFirst = i === 0;\n const previousItem = isFirst && focusShift ? findFirstEnabledItem(row) : row[i - 1];\n row[i] = previousItem && activeId !== previousItem.id && focusShift ? previousItem : createEmptyItem(previousItem == null ? void 0 : previousItem.rowId);\n }\n }\n }\n return rows;\n}\nfunction verticalizeItems(items) {\n const rows = groupItemsByRows(items);\n const maxLength = getMaxRowLength(rows);\n const verticalized = [];\n for (let i = 0; i < maxLength; i += 1) {\n for (const row of rows) {\n const item = row[i];\n if (item) {\n verticalized.push(__spreadProps(__spreadValues({}, item), {\n // If there's no rowId, it means that it's not a grid composite, but\n // a single row instead. So, instead of verticalizing it, that is,\n // assigning a different rowId based on the column index, we keep it\n // undefined so they will be part of the same row. This is useful\n // when using up/down on one-dimensional composites.\n rowId: item.rowId ? `${i}` : void 0\n }));\n }\n }\n }\n return verticalized;\n}\nfunction createCompositeStore(props = {}) {\n var _a;\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const collection = createCollectionStore(props);\n const activeId = defaultValue(\n props.activeId,\n syncState == null ? void 0 : syncState.activeId,\n props.defaultActiveId\n );\n const initialState = __spreadProps(__spreadValues({}, collection.getState()), {\n activeId,\n baseElement: defaultValue(syncState == null ? void 0 : syncState.baseElement, null),\n includesBaseElement: defaultValue(\n props.includesBaseElement,\n syncState == null ? void 0 : syncState.includesBaseElement,\n activeId === null\n ),\n moves: defaultValue(syncState == null ? void 0 : syncState.moves, 0),\n orientation: defaultValue(\n props.orientation,\n syncState == null ? void 0 : syncState.orientation,\n \"both\"\n ),\n rtl: defaultValue(props.rtl, syncState == null ? void 0 : syncState.rtl, false),\n virtualFocus: defaultValue(\n props.virtualFocus,\n syncState == null ? void 0 : syncState.virtualFocus,\n false\n ),\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, false),\n focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, false),\n focusShift: defaultValue(props.focusShift, syncState == null ? void 0 : syncState.focusShift, false)\n });\n const composite = createStore(initialState, collection, props.store);\n setup(\n composite,\n () => sync(composite, [\"renderedItems\", \"activeId\"], (state) => {\n composite.setState(\"activeId\", (activeId2) => {\n var _a2;\n if (activeId2 !== void 0)\n return activeId2;\n return (_a2 = findFirstEnabledItem(state.renderedItems)) == null ? void 0 : _a2.id;\n });\n })\n );\n const getNextId = (items, orientation, hasNullItem, skip) => {\n var _a2, _b;\n const { activeId: activeId2, rtl, focusLoop, focusWrap, includesBaseElement } = composite.getState();\n const isHorizontal = orientation !== \"vertical\";\n const isRTL = rtl && isHorizontal;\n const allItems = isRTL ? reverseArray(items) : items;\n if (activeId2 == null) {\n return (_a2 = findFirstEnabledItem(allItems)) == null ? void 0 : _a2.id;\n }\n const activeItem = allItems.find((item) => item.id === activeId2);\n if (!activeItem) {\n return (_b = findFirstEnabledItem(allItems)) == null ? void 0 : _b.id;\n }\n const isGrid = !!activeItem.rowId;\n const activeIndex = allItems.indexOf(activeItem);\n const nextItems = allItems.slice(activeIndex + 1);\n const nextItemsInRow = getItemsInRow(nextItems, activeItem.rowId);\n if (skip !== void 0) {\n const nextEnabledItemsInRow = getEnabledItems(nextItemsInRow, activeId2);\n const nextItem2 = nextEnabledItemsInRow.slice(skip)[0] || // If we can't find an item, just return the last one.\n nextEnabledItemsInRow[nextEnabledItemsInRow.length - 1];\n return nextItem2 == null ? void 0 : nextItem2.id;\n }\n const oppositeOrientation = getOppositeOrientation(\n // If it's a grid and orientation is not set, it's a next/previous call,\n // which is inherently horizontal. up/down will call next with orientation\n // set to vertical by default (see below on up/down methods).\n isGrid ? orientation || \"horizontal\" : orientation\n );\n const canLoop = focusLoop && focusLoop !== oppositeOrientation;\n const canWrap = isGrid && focusWrap && focusWrap !== oppositeOrientation;\n hasNullItem = hasNullItem || !isGrid && canLoop && includesBaseElement;\n if (canLoop) {\n const loopItems = canWrap && !hasNullItem ? allItems : getItemsInRow(allItems, activeItem.rowId);\n const sortedItems = flipItems(loopItems, activeId2, hasNullItem);\n const nextItem2 = findFirstEnabledItem(sortedItems, activeId2);\n return nextItem2 == null ? void 0 : nextItem2.id;\n }\n if (canWrap) {\n const nextItem2 = findFirstEnabledItem(\n // We can use nextItems, which contains all the next items, including\n // items from other rows, to wrap between rows. However, if there is a\n // null item (the composite container), we'll only use the next items in\n // the row. So moving next from the last item will focus on the\n // composite container. On grid composites, horizontal navigation never\n // focuses on the composite container, only vertical.\n hasNullItem ? nextItemsInRow : nextItems,\n activeId2\n );\n const nextId = hasNullItem ? (nextItem2 == null ? void 0 : nextItem2.id) || null : nextItem2 == null ? void 0 : nextItem2.id;\n return nextId;\n }\n const nextItem = findFirstEnabledItem(nextItemsInRow, activeId2);\n if (!nextItem && hasNullItem) {\n return null;\n }\n return nextItem == null ? void 0 : nextItem.id;\n };\n return __spreadProps(__spreadValues(__spreadValues({}, collection), composite), {\n setBaseElement: (element) => composite.setState(\"baseElement\", element),\n setActiveId: (id) => composite.setState(\"activeId\", id),\n move: (id) => {\n if (id === void 0)\n return;\n composite.setState(\"activeId\", id);\n composite.setState(\"moves\", (moves) => moves + 1);\n },\n first: () => {\n var _a2;\n return (_a2 = findFirstEnabledItem(composite.getState().renderedItems)) == null ? void 0 : _a2.id;\n },\n last: () => {\n var _a2;\n return (_a2 = findFirstEnabledItem(reverseArray(composite.getState().renderedItems))) == null ? void 0 : _a2.id;\n },\n next: (skip) => {\n const { renderedItems, orientation } = composite.getState();\n return getNextId(renderedItems, orientation, false, skip);\n },\n previous: (skip) => {\n var _a2;\n const { renderedItems, orientation, includesBaseElement } = composite.getState();\n const isGrid = !!((_a2 = findFirstEnabledItem(renderedItems)) == null ? void 0 : _a2.rowId);\n const hasNullItem = !isGrid && includesBaseElement;\n return getNextId(\n reverseArray(renderedItems),\n orientation,\n hasNullItem,\n skip\n );\n },\n down: (skip) => {\n const {\n activeId: activeId2,\n renderedItems,\n focusShift,\n focusLoop,\n includesBaseElement\n } = composite.getState();\n const shouldShift = focusShift && !skip;\n const verticalItems = verticalizeItems(\n flatten2DArray(\n normalizeRows(groupItemsByRows(renderedItems), activeId2, shouldShift)\n )\n );\n const canLoop = focusLoop && focusLoop !== \"horizontal\";\n const hasNullItem = canLoop && includesBaseElement;\n return getNextId(verticalItems, \"vertical\", hasNullItem, skip);\n },\n up: (skip) => {\n const { activeId: activeId2, renderedItems, focusShift, includesBaseElement } = composite.getState();\n const shouldShift = focusShift && !skip;\n const verticalItems = verticalizeItems(\n reverseArray(\n flatten2DArray(\n normalizeRows(\n groupItemsByRows(renderedItems),\n activeId2,\n shouldShift\n )\n )\n )\n );\n const hasNullItem = includesBaseElement;\n return getNextId(verticalItems, \"vertical\", hasNullItem, skip);\n }\n });\n}\n\nexport {\n createCompositeStore\n};\n","\"use client\";\nimport {\n createPopoverStore\n} from \"../__chunks/MFZZDIHG.js\";\nimport \"../__chunks/5RJNXXU2.js\";\nimport \"../__chunks/WCKXDMU7.js\";\nimport {\n createCompositeStore\n} from \"../__chunks/2H5K47H4.js\";\nimport \"../__chunks/URUD7X4C.js\";\nimport {\n batch,\n createStore,\n setup,\n sync,\n throwOnConflictingProps\n} from \"../__chunks/R676XYVY.js\";\nimport {\n defaultValue\n} from \"../__chunks/22HHDS5F.js\";\nimport {\n isSafari,\n isTouchDevice\n} from \"../__chunks/VDNATJW2.js\";\nimport \"../__chunks/RRSZHCH6.js\";\nimport \"../__chunks/7PRQYBBV.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox-store.ts\nvar isSafariOnMobile = isSafari() && isTouchDevice();\nfunction createComboboxStore(props = {}) {\n var _a;\n throwOnConflictingProps(props, props.store);\n const syncState = (_a = props.store) == null ? void 0 : _a.getState();\n const activeId = defaultValue(\n props.activeId,\n syncState == null ? void 0 : syncState.activeId,\n props.defaultActiveId,\n null\n );\n const composite = createCompositeStore(__spreadProps(__spreadValues({}, props), {\n activeId,\n includesBaseElement: defaultValue(\n props.includesBaseElement,\n syncState == null ? void 0 : syncState.includesBaseElement,\n true\n ),\n orientation: defaultValue(\n props.orientation,\n syncState == null ? void 0 : syncState.orientation,\n \"vertical\"\n ),\n focusLoop: defaultValue(props.focusLoop, syncState == null ? void 0 : syncState.focusLoop, true),\n focusWrap: defaultValue(props.focusWrap, syncState == null ? void 0 : syncState.focusWrap, true),\n virtualFocus: defaultValue(\n props.virtualFocus,\n syncState == null ? void 0 : syncState.virtualFocus,\n !isSafariOnMobile\n )\n }));\n const popover = createPopoverStore(__spreadProps(__spreadValues({}, props), {\n placement: defaultValue(\n props.placement,\n syncState == null ? void 0 : syncState.placement,\n \"bottom-start\"\n )\n }));\n const value = defaultValue(\n props.value,\n syncState == null ? void 0 : syncState.value,\n props.defaultValue,\n \"\"\n );\n const selectedValue = defaultValue(\n props.selectedValue,\n syncState == null ? void 0 : syncState.selectedValue,\n props.defaultSelectedValue,\n \"\"\n );\n const multiSelectable = Array.isArray(selectedValue);\n const initialState = __spreadProps(__spreadValues(__spreadValues({}, composite.getState()), popover.getState()), {\n value,\n selectedValue,\n resetValueOnSelect: defaultValue(\n props.resetValueOnSelect,\n syncState == null ? void 0 : syncState.resetValueOnSelect,\n multiSelectable\n ),\n resetValueOnHide: defaultValue(\n props.resetValueOnHide,\n syncState == null ? void 0 : syncState.resetValueOnHide,\n multiSelectable\n ),\n activeValue: syncState == null ? void 0 : syncState.activeValue\n });\n const combobox = createStore(initialState, composite, popover, props.store);\n setup(\n combobox,\n () => sync(combobox, [\"resetValueOnHide\", \"mounted\"], (state) => {\n if (!state.resetValueOnHide)\n return;\n if (state.mounted)\n return;\n combobox.setState(\"value\", value);\n })\n );\n setup(\n combobox,\n () => sync(combobox, [\"resetValueOnSelect\", \"selectedValue\"], (state) => {\n if (!state.resetValueOnSelect)\n return;\n combobox.setState(\"value\", value);\n })\n );\n setup(\n combobox,\n () => batch(combobox, [\"mounted\"], (state) => {\n if (state.mounted)\n return;\n combobox.setState(\"activeId\", activeId);\n combobox.setState(\"moves\", 0);\n })\n );\n setup(\n combobox,\n () => sync(combobox, [\"moves\", \"activeId\"], (state, prevState) => {\n if (state.moves === prevState.moves) {\n combobox.setState(\"activeValue\", void 0);\n }\n })\n );\n setup(\n combobox,\n () => batch(combobox, [\"moves\", \"renderedItems\"], (state, prev) => {\n if (state.moves === prev.moves)\n return;\n const { activeId: activeId2 } = combobox.getState();\n const activeItem = composite.item(activeId2);\n combobox.setState(\"activeValue\", activeItem == null ? void 0 : activeItem.value);\n })\n );\n return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, popover), composite), combobox), {\n setValue: (value2) => combobox.setState(\"value\", value2),\n setSelectedValue: (selectedValue2) => combobox.setState(\"selectedValue\", selectedValue2)\n });\n}\nexport {\n createComboboxStore\n};\n","\"use client\";\nimport {\n createDialogStore\n} from \"./5RJNXXU2.js\";\nimport {\n createStore,\n mergeStore,\n omit,\n throwOnConflictingProps\n} from \"./R676XYVY.js\";\nimport {\n defaultValue\n} from \"./22HHDS5F.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/popover/popover-store.ts\nfunction createPopoverStore(_a = {}) {\n var _b = _a, {\n popover: otherPopover\n } = _b, props = __objRest(_b, [\n \"popover\"\n ]);\n const store = mergeStore(\n props.store,\n omit(otherPopover, [\n \"arrowElement\",\n \"anchorElement\",\n \"contentElement\",\n \"popoverElement\",\n \"disclosureElement\"\n ])\n );\n throwOnConflictingProps(props, store);\n const syncState = store == null ? void 0 : store.getState();\n const dialog = createDialogStore(__spreadProps(__spreadValues({}, props), { store }));\n const placement = defaultValue(\n props.placement,\n syncState == null ? void 0 : syncState.placement,\n \"bottom\"\n );\n const initialState = __spreadProps(__spreadValues({}, dialog.getState()), {\n placement,\n currentPlacement: placement,\n anchorElement: defaultValue(syncState == null ? void 0 : syncState.anchorElement, null),\n popoverElement: defaultValue(syncState == null ? void 0 : syncState.popoverElement, null),\n arrowElement: defaultValue(syncState == null ? void 0 : syncState.arrowElement, null),\n rendered: Symbol(\"rendered\")\n });\n const popover = createStore(initialState, dialog, store);\n return __spreadProps(__spreadValues(__spreadValues({}, dialog), popover), {\n setAnchorElement: (element) => popover.setState(\"anchorElement\", element),\n setPopoverElement: (element) => popover.setState(\"popoverElement\", element),\n setArrowElement: (element) => popover.setState(\"arrowElement\", element),\n render: () => popover.setState(\"rendered\", Symbol(\"rendered\"))\n });\n}\n\nexport {\n createPopoverStore\n};\n","\"use client\";\nimport {\n createDisclosureStore\n} from \"./WCKXDMU7.js\";\n\n// src/dialog/dialog-store.ts\nfunction createDialogStore(props = {}) {\n return createDisclosureStore(props);\n}\n\nexport {\n createDialogStore\n};\n","\"use client\";\nimport {\n createStore,\n mergeStore,\n omit,\n setup,\n subscribe,\n sync,\n throwOnConflictingProps\n} from \"./R676XYVY.js\";\nimport {\n defaultValue\n} from \"./22HHDS5F.js\";\nimport {\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/disclosure/disclosure-store.ts\nfunction createDisclosureStore(props = {}) {\n const store = mergeStore(\n props.store,\n omit(props.disclosure, [\"contentElement\", \"disclosureElement\"])\n );\n throwOnConflictingProps(props, store);\n const syncState = store == null ? void 0 : store.getState();\n const open = defaultValue(\n props.open,\n syncState == null ? void 0 : syncState.open,\n props.defaultOpen,\n false\n );\n const animated = defaultValue(props.animated, syncState == null ? void 0 : syncState.animated, false);\n const initialState = {\n open,\n animated,\n animating: !!animated && open,\n mounted: open,\n contentElement: defaultValue(syncState == null ? void 0 : syncState.contentElement, null),\n disclosureElement: defaultValue(syncState == null ? void 0 : syncState.disclosureElement, null)\n };\n const disclosure = createStore(initialState, store);\n setup(\n disclosure,\n () => sync(disclosure, [\"animated\", \"animating\"], (state) => {\n if (state.animated)\n return;\n disclosure.setState(\"animating\", false);\n })\n );\n setup(\n disclosure,\n () => subscribe(disclosure, [\"open\"], () => {\n if (!disclosure.getState().animated)\n return;\n disclosure.setState(\"animating\", true);\n })\n );\n setup(\n disclosure,\n () => sync(disclosure, [\"open\", \"animating\"], (state) => {\n disclosure.setState(\"mounted\", state.open || state.animating);\n })\n );\n return __spreadProps(__spreadValues({}, disclosure), {\n disclosure: props.disclosure,\n setOpen: (value) => disclosure.setState(\"open\", value),\n show: () => disclosure.setState(\"open\", true),\n hide: () => disclosure.setState(\"open\", false),\n toggle: () => disclosure.setState(\"open\", (open2) => !open2),\n stopAnimation: () => disclosure.setState(\"animating\", false),\n setContentElement: (value) => disclosure.setState(\"contentElement\", value),\n setDisclosureElement: (value) => disclosure.setState(\"disclosureElement\", value)\n });\n}\n\nexport {\n createDisclosureStore\n};\n","\"use client\";\nimport {\n useCompositeStoreProps\n} from \"./7GBW5FLS.js\";\nimport {\n usePopoverStoreProps\n} from \"./XWCFCD3Q.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./EKQEJRUF.js\";\n\n// src/combobox/combobox-store.ts\nimport * as Core from \"@ariakit/core/combobox/combobox-store\";\nfunction useComboboxStoreProps(store, update, props) {\n useStoreProps(store, props, \"value\", \"setValue\");\n useStoreProps(store, props, \"selectedValue\", \"setSelectedValue\");\n useStoreProps(store, props, \"resetValueOnHide\");\n useStoreProps(store, props, \"resetValueOnSelect\");\n return useCompositeStoreProps(\n usePopoverStoreProps(store, update, props),\n update,\n props\n );\n}\nfunction useComboboxStore(props = {}) {\n const [store, update] = useStore(Core.createComboboxStore, props);\n return useComboboxStoreProps(store, update, props);\n}\n\nexport {\n useComboboxStoreProps,\n useComboboxStore\n};\n","\"use client\";\nimport {\n useDialogStoreProps\n} from \"./I62TROYO.js\";\nimport {\n useStore,\n useStoreProps\n} from \"./EKQEJRUF.js\";\nimport {\n useUpdateEffect\n} from \"./6O5OEQGF.js\";\n\n// src/popover/popover-store.ts\nimport * as Core from \"@ariakit/core/popover/popover-store\";\nfunction usePopoverStoreProps(store, update, props) {\n useUpdateEffect(update, [props.popover]);\n useStoreProps(store, props, \"placement\");\n return useDialogStoreProps(store, update, props);\n}\nfunction usePopoverStore(props = {}) {\n const [store, update] = useStore(Core.createPopoverStore, props);\n return usePopoverStoreProps(store, update, props);\n}\n\nexport {\n usePopoverStoreProps,\n usePopoverStore\n};\n","\"use client\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/disclosure/disclosure-context.tsx\nvar ctx = createStoreContext();\nvar useDisclosureContext = ctx.useContext;\nvar useDisclosureScopedContext = ctx.useScopedContext;\nvar useDisclosureProviderContext = ctx.useProviderContext;\nvar DisclosureContextProvider = ctx.ContextProvider;\nvar DisclosureScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n useDisclosureContext,\n useDisclosureScopedContext,\n useDisclosureProviderContext,\n DisclosureContextProvider,\n DisclosureScopedContextProvider\n};\n","\"use client\";\nimport {\n DisclosureContextProvider,\n DisclosureScopedContextProvider\n} from \"./J55AVALY.js\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/dialog/dialog-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [DisclosureContextProvider],\n [DisclosureScopedContextProvider]\n);\nvar useDialogContext = ctx.useContext;\nvar useDialogScopedContext = ctx.useScopedContext;\nvar useDialogProviderContext = ctx.useProviderContext;\nvar DialogContextProvider = ctx.ContextProvider;\nvar DialogScopedContextProvider = ctx.ScopedContextProvider;\nvar DialogHeadingContext = createContext(void 0);\nvar DialogDescriptionContext = createContext(void 0);\n\nexport {\n useDialogContext,\n useDialogScopedContext,\n useDialogProviderContext,\n DialogContextProvider,\n DialogScopedContextProvider,\n DialogHeadingContext,\n DialogDescriptionContext\n};\n","\"use client\";\nimport {\n DialogContextProvider,\n DialogScopedContextProvider\n} from \"./XXVAHUAO.js\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/popover/popover-context.tsx\nvar ctx = createStoreContext(\n [DialogContextProvider],\n [DialogScopedContextProvider]\n);\nvar usePopoverContext = ctx.useContext;\nvar usePopoverScopedContext = ctx.useScopedContext;\nvar usePopoverProviderContext = ctx.useProviderContext;\nvar PopoverContextProvider = ctx.ContextProvider;\nvar PopoverScopedContextProvider = ctx.ScopedContextProvider;\n\nexport {\n usePopoverContext,\n usePopoverScopedContext,\n usePopoverProviderContext,\n PopoverContextProvider,\n PopoverScopedContextProvider\n};\n","\"use client\";\nimport {\n CompositeContextProvider,\n CompositeScopedContextProvider\n} from \"./3D6OCOHF.js\";\nimport {\n PopoverContextProvider,\n PopoverScopedContextProvider\n} from \"./TE637IA7.js\";\nimport {\n createStoreContext\n} from \"./5M6RSQEC.js\";\n\n// src/combobox/combobox-context.tsx\nimport { createContext } from \"react\";\nvar ctx = createStoreContext(\n [PopoverContextProvider, CompositeContextProvider],\n [PopoverScopedContextProvider, CompositeScopedContextProvider]\n);\nvar useComboboxContext = ctx.useContext;\nvar useComboboxScopedContext = ctx.useScopedContext;\nvar useComboboxProviderContext = ctx.useProviderContext;\nvar ComboboxContextProvider = ctx.ContextProvider;\nvar ComboboxScopedContextProvider = ctx.ScopedContextProvider;\nvar ComboboxItemValueContext = createContext(\n void 0\n);\nvar ComboboxItemCheckedContext = createContext(false);\n\nexport {\n useComboboxContext,\n useComboboxScopedContext,\n useComboboxProviderContext,\n ComboboxContextProvider,\n ComboboxScopedContextProvider,\n ComboboxItemValueContext,\n ComboboxItemCheckedContext\n};\n","\"use client\";\nimport {\n useComboboxStore\n} from \"../__chunks/URCSOWGR.js\";\nimport {\n ComboboxContextProvider\n} from \"../__chunks/UNDSQXBK.js\";\nimport \"../__chunks/7GBW5FLS.js\";\nimport \"../__chunks/Y6GYTNQ2.js\";\nimport \"../__chunks/3D6OCOHF.js\";\nimport \"../__chunks/MADQZZRL.js\";\nimport \"../__chunks/TE637IA7.js\";\nimport \"../__chunks/XXVAHUAO.js\";\nimport \"../__chunks/J55AVALY.js\";\nimport \"../__chunks/5M6RSQEC.js\";\nimport \"../__chunks/XWCFCD3Q.js\";\nimport \"../__chunks/I62TROYO.js\";\nimport \"../__chunks/HZJ2XALY.js\";\nimport \"../__chunks/EKQEJRUF.js\";\nimport \"../__chunks/6O5OEQGF.js\";\nimport \"../__chunks/XM66DUTO.js\";\nimport \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox-provider.tsx\nimport { jsx } from \"react/jsx-runtime\";\nfunction ComboboxProvider(props = {}) {\n const store = useComboboxStore(props);\n return /* @__PURE__ */ jsx(ComboboxContextProvider, { value: store, children: props.children });\n}\nexport {\n ComboboxProvider\n};\n","\"use client\";\nimport {\n useComboboxProviderContext\n} from \"../__chunks/UNDSQXBK.js\";\nimport \"../__chunks/3D6OCOHF.js\";\nimport \"../__chunks/MADQZZRL.js\";\nimport \"../__chunks/TE637IA7.js\";\nimport \"../__chunks/XXVAHUAO.js\";\nimport \"../__chunks/J55AVALY.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/5M6RSQEC.js\";\nimport \"../__chunks/6O5OEQGF.js\";\nimport \"../__chunks/XM66DUTO.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox-label.ts\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nvar TagName = \"label\";\nvar useComboboxLabel = createHook(\n function useComboboxLabel2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = useComboboxProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"ComboboxLabel must receive a `store` prop or be wrapped in a ComboboxProvider component.\"\n );\n const comboboxId = store.useState((state) => {\n var _a2;\n return (_a2 = state.baseElement) == null ? void 0 : _a2.id;\n });\n props = __spreadValues({\n htmlFor: comboboxId\n }, props);\n return removeUndefinedValues(props);\n }\n);\nvar ComboboxLabel = memo(\n forwardRef(function ComboboxLabel2(props) {\n const htmlProps = useComboboxLabel(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n ComboboxLabel,\n useComboboxLabel\n};\n","\"use client\";\nimport {\n usePopoverProviderContext\n} from \"./TE637IA7.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useMergeRefs\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/popover/popover-anchor.ts\nvar TagName = \"div\";\nvar usePopoverAnchor = createHook(\n function usePopoverAnchor2(_a) {\n var _b = _a, { store } = _b, props = __objRest(_b, [\"store\"]);\n const context = usePopoverProviderContext();\n store = store || context;\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(store == null ? void 0 : store.setAnchorElement, props.ref)\n });\n return props;\n }\n);\nvar PopoverAnchor = forwardRef(function PopoverAnchor2(props) {\n const htmlProps = usePopoverAnchor(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n usePopoverAnchor,\n PopoverAnchor\n};\n","\"use client\";\n\n// src/focusable/focusable-context.ts\nimport { createContext } from \"react\";\nvar FocusableContext = createContext(true);\n\nexport {\n FocusableContext\n};\n","\"use client\";\nimport {\n FocusableContext\n} from \"./SHA3WOPI.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useEvent,\n useMergeRefs,\n useTagName\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/focusable/focusable.ts\nimport { useContext, useEffect, useMemo, useRef, useState } from \"react\";\nimport { isButton } from \"@ariakit/core/utils/dom\";\nimport {\n addGlobalEventListener,\n isFocusEventOutside,\n isPortalEvent,\n isSelfTarget,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport {\n focusIfNeeded,\n hasFocus,\n isFocusable\n} from \"@ariakit/core/utils/focus\";\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { isSafari } from \"@ariakit/core/utils/platform\";\nvar TagName = \"div\";\nvar isSafariBrowser = isSafari();\nvar alwaysFocusVisibleInputTypes = [\n \"text\",\n \"search\",\n \"url\",\n \"tel\",\n \"email\",\n \"password\",\n \"number\",\n \"date\",\n \"month\",\n \"week\",\n \"time\",\n \"datetime\",\n \"datetime-local\"\n];\nfunction isAlwaysFocusVisible(element) {\n const { tagName, readOnly, type } = element;\n if (tagName === \"TEXTAREA\" && !readOnly)\n return true;\n if (tagName === \"SELECT\" && !readOnly)\n return true;\n if (tagName === \"INPUT\" && !readOnly) {\n return alwaysFocusVisibleInputTypes.includes(type);\n }\n if (element.isContentEditable)\n return true;\n return false;\n}\nfunction isAlwaysFocusVisibleDelayed(element) {\n const role = element.getAttribute(\"role\");\n if (role !== \"combobox\")\n return false;\n return !!element.dataset.name;\n}\nfunction getLabels(element) {\n if (\"labels\" in element) {\n return element.labels;\n }\n return null;\n}\nfunction isNativeCheckboxOrRadio(element) {\n const tagName = element.tagName.toLowerCase();\n if (tagName === \"input\" && element.type) {\n return element.type === \"radio\" || element.type === \"checkbox\";\n }\n return false;\n}\nfunction isNativeTabbable(tagName) {\n if (!tagName)\n return true;\n return tagName === \"button\" || tagName === \"input\" || tagName === \"select\" || tagName === \"textarea\" || tagName === \"a\";\n}\nfunction supportsDisabledAttribute(tagName) {\n if (!tagName)\n return true;\n return tagName === \"button\" || tagName === \"input\" || tagName === \"select\" || tagName === \"textarea\";\n}\nfunction getTabIndex(focusable, trulyDisabled, nativeTabbable, supportsDisabled, tabIndexProp) {\n if (!focusable) {\n return tabIndexProp;\n }\n if (trulyDisabled) {\n if (nativeTabbable && !supportsDisabled) {\n return -1;\n }\n return;\n }\n if (nativeTabbable) {\n return tabIndexProp;\n }\n return tabIndexProp || 0;\n}\nfunction useDisableEvent(onEvent, disabled) {\n return useEvent((event) => {\n onEvent == null ? void 0 : onEvent(event);\n if (event.defaultPrevented)\n return;\n if (disabled) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n}\nvar isKeyboardModality = true;\nfunction onGlobalMouseDown(event) {\n const target = event.target;\n if (target && \"hasAttribute\" in target) {\n if (!target.hasAttribute(\"data-focus-visible\")) {\n isKeyboardModality = false;\n }\n }\n}\nfunction onGlobalKeyDown(event) {\n if (event.metaKey)\n return;\n if (event.ctrlKey)\n return;\n if (event.altKey)\n return;\n isKeyboardModality = true;\n}\nvar useFocusable = createHook(\n function useFocusable2(_a) {\n var _b = _a, {\n focusable = true,\n accessibleWhenDisabled,\n autoFocus,\n onFocusVisible\n } = _b, props = __objRest(_b, [\n \"focusable\",\n \"accessibleWhenDisabled\",\n \"autoFocus\",\n \"onFocusVisible\"\n ]);\n const ref = useRef(null);\n useEffect(() => {\n if (!focusable)\n return;\n addGlobalEventListener(\"mousedown\", onGlobalMouseDown, true);\n addGlobalEventListener(\"keydown\", onGlobalKeyDown, true);\n }, [focusable]);\n if (isSafariBrowser) {\n useEffect(() => {\n if (!focusable)\n return;\n const element = ref.current;\n if (!element)\n return;\n if (!isNativeCheckboxOrRadio(element))\n return;\n const labels = getLabels(element);\n if (!labels)\n return;\n const onMouseUp = () => queueMicrotask(() => element.focus());\n labels.forEach((label) => label.addEventListener(\"mouseup\", onMouseUp));\n return () => {\n labels.forEach(\n (label) => label.removeEventListener(\"mouseup\", onMouseUp)\n );\n };\n }, [focusable]);\n }\n const disabled = focusable && disabledFromProps(props);\n const trulyDisabled = !!disabled && !accessibleWhenDisabled;\n const [focusVisible, setFocusVisible] = useState(false);\n useEffect(() => {\n if (!focusable)\n return;\n if (trulyDisabled && focusVisible) {\n setFocusVisible(false);\n }\n }, [focusable, trulyDisabled, focusVisible]);\n useEffect(() => {\n if (!focusable)\n return;\n if (!focusVisible)\n return;\n const element = ref.current;\n if (!element)\n return;\n if (typeof IntersectionObserver === \"undefined\")\n return;\n const observer = new IntersectionObserver(() => {\n if (!isFocusable(element)) {\n setFocusVisible(false);\n }\n });\n observer.observe(element);\n return () => observer.disconnect();\n }, [focusable, focusVisible]);\n const onKeyPressCapture = useDisableEvent(\n props.onKeyPressCapture,\n disabled\n );\n const onMouseDownCapture = useDisableEvent(\n props.onMouseDownCapture,\n disabled\n );\n const onClickCapture = useDisableEvent(props.onClickCapture, disabled);\n const onMouseDownProp = props.onMouseDown;\n const onMouseDown = useEvent((event) => {\n onMouseDownProp == null ? void 0 : onMouseDownProp(event);\n if (event.defaultPrevented)\n return;\n if (!focusable)\n return;\n const element = event.currentTarget;\n if (!isSafariBrowser)\n return;\n if (isPortalEvent(event))\n return;\n if (!isButton(element) && !isNativeCheckboxOrRadio(element))\n return;\n let receivedFocus = false;\n const onFocus = () => {\n receivedFocus = true;\n };\n const options = { capture: true, once: true };\n element.addEventListener(\"focusin\", onFocus, options);\n queueBeforeEvent(element, \"mouseup\", () => {\n element.removeEventListener(\"focusin\", onFocus, true);\n if (receivedFocus)\n return;\n focusIfNeeded(element);\n });\n });\n const handleFocusVisible = (event, currentTarget) => {\n if (currentTarget) {\n event.currentTarget = currentTarget;\n }\n if (!focusable)\n return;\n const element = event.currentTarget;\n if (!element)\n return;\n if (!hasFocus(element))\n return;\n onFocusVisible == null ? void 0 : onFocusVisible(event);\n if (event.defaultPrevented)\n return;\n setFocusVisible(true);\n };\n const onKeyDownCaptureProp = props.onKeyDownCapture;\n const onKeyDownCapture = useEvent((event) => {\n onKeyDownCaptureProp == null ? void 0 : onKeyDownCaptureProp(event);\n if (event.defaultPrevented)\n return;\n if (!focusable)\n return;\n if (focusVisible)\n return;\n if (event.metaKey)\n return;\n if (event.altKey)\n return;\n if (event.ctrlKey)\n return;\n if (!isSelfTarget(event))\n return;\n const element = event.currentTarget;\n queueMicrotask(() => handleFocusVisible(event, element));\n });\n const onFocusCaptureProp = props.onFocusCapture;\n const onFocusCapture = useEvent((event) => {\n onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);\n if (event.defaultPrevented)\n return;\n if (!focusable)\n return;\n if (!isSelfTarget(event)) {\n setFocusVisible(false);\n return;\n }\n const element = event.currentTarget;\n const applyFocusVisible = () => handleFocusVisible(event, element);\n if (isKeyboardModality || isAlwaysFocusVisible(event.target)) {\n queueMicrotask(applyFocusVisible);\n } else if (isAlwaysFocusVisibleDelayed(event.target)) {\n queueBeforeEvent(event.target, \"focusout\", applyFocusVisible);\n } else {\n setFocusVisible(false);\n }\n });\n const onBlurProp = props.onBlur;\n const onBlur = useEvent((event) => {\n onBlurProp == null ? void 0 : onBlurProp(event);\n if (!focusable)\n return;\n if (!isFocusEventOutside(event))\n return;\n setFocusVisible(false);\n });\n const autoFocusOnShow = useContext(FocusableContext);\n const autoFocusRef = useEvent((element) => {\n if (!focusable)\n return;\n if (!autoFocus)\n return;\n if (!element)\n return;\n if (!autoFocusOnShow)\n return;\n queueMicrotask(() => {\n if (hasFocus(element))\n return;\n if (!isFocusable(element))\n return;\n element.focus();\n });\n });\n const tagName = useTagName(ref);\n const nativeTabbable = focusable && isNativeTabbable(tagName);\n const supportsDisabled = focusable && supportsDisabledAttribute(tagName);\n const styleProp = props.style;\n const style = useMemo(() => {\n if (trulyDisabled) {\n return __spreadValues({ pointerEvents: \"none\" }, styleProp);\n }\n return styleProp;\n }, [trulyDisabled, styleProp]);\n props = __spreadProps(__spreadValues({\n \"data-focus-visible\": focusable && focusVisible || void 0,\n \"data-autofocus\": autoFocus || void 0,\n \"aria-disabled\": disabled || void 0\n }, props), {\n ref: useMergeRefs(ref, autoFocusRef, props.ref),\n style,\n tabIndex: getTabIndex(\n focusable,\n trulyDisabled,\n nativeTabbable,\n supportsDisabled,\n props.tabIndex\n ),\n disabled: supportsDisabled && trulyDisabled ? true : void 0,\n // TODO: Test Focusable contentEditable.\n contentEditable: disabled ? void 0 : props.contentEditable,\n onKeyPressCapture,\n onClickCapture,\n onMouseDownCapture,\n onMouseDown,\n onKeyDownCapture,\n onFocusCapture,\n onBlur\n });\n return removeUndefinedValues(props);\n }\n);\nvar Focusable = forwardRef(function Focusable2(props) {\n const htmlProps = useFocusable(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useFocusable,\n Focusable\n};\n","\"use client\";\nimport {\n findFirstEnabledItem,\n getEnabledItem,\n groupItemsByRows,\n isItem,\n silentlyFocused\n} from \"./3IEDWLST.js\";\nimport {\n CompositeContextProvider,\n useCompositeProviderContext\n} from \"./3D6OCOHF.js\";\nimport {\n useFocusable\n} from \"./WAZE6NXP.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useMergeRefs,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/composite/composite.tsx\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { flatten2DArray, reverseArray } from \"@ariakit/core/utils/array\";\nimport { getActiveElement, isTextField } from \"@ariakit/core/utils/dom\";\nimport {\n fireBlurEvent,\n fireKeyboardEvent,\n isSelfTarget\n} from \"@ariakit/core/utils/events\";\nimport { focusIntoView, hasFocus } from \"@ariakit/core/utils/focus\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isGrid(items) {\n return items.some((item) => !!item.rowId);\n}\nfunction isPrintableKey(event) {\n const target = event.target;\n if (target && !isTextField(target))\n return false;\n return event.key.length === 1 && !event.ctrlKey && !event.metaKey;\n}\nfunction isModifierKey(event) {\n return event.key === \"Shift\" || event.key === \"Control\" || event.key === \"Alt\" || event.key === \"Meta\";\n}\nfunction useKeyboardEventProxy(store, onKeyboardEvent, previousElementRef) {\n return useEvent((event) => {\n var _a;\n onKeyboardEvent == null ? void 0 : onKeyboardEvent(event);\n if (event.defaultPrevented)\n return;\n if (event.isPropagationStopped())\n return;\n if (!isSelfTarget(event))\n return;\n if (isModifierKey(event))\n return;\n if (isPrintableKey(event))\n return;\n const state = store.getState();\n const activeElement = (_a = getEnabledItem(store, state.activeId)) == null ? void 0 : _a.element;\n if (!activeElement)\n return;\n const _b = event, { view } = _b, eventInit = __objRest(_b, [\"view\"]);\n const previousElement = previousElementRef == null ? void 0 : previousElementRef.current;\n if (activeElement !== previousElement) {\n activeElement.focus();\n }\n if (!fireKeyboardEvent(activeElement, event.type, eventInit)) {\n event.preventDefault();\n }\n if (event.currentTarget.contains(activeElement)) {\n event.stopPropagation();\n }\n });\n}\nfunction findFirstEnabledItemInTheLastRow(items) {\n return findFirstEnabledItem(\n flatten2DArray(reverseArray(groupItemsByRows(items)))\n );\n}\nfunction useScheduleFocus(store) {\n const [scheduled, setScheduled] = useState(false);\n const schedule = useCallback(() => setScheduled(true), []);\n const activeItem = store.useState(\n (state) => getEnabledItem(store, state.activeId)\n );\n useEffect(() => {\n const activeElement = activeItem == null ? void 0 : activeItem.element;\n if (!scheduled)\n return;\n if (!activeElement)\n return;\n setScheduled(false);\n activeElement.focus({ preventScroll: true });\n }, [activeItem, scheduled]);\n return schedule;\n}\nvar useComposite = createHook(\n function useComposite2(_a) {\n var _b = _a, {\n store,\n composite = true,\n focusOnMove = composite,\n moveOnKeyPress = true\n } = _b, props = __objRest(_b, [\n \"store\",\n \"composite\",\n \"focusOnMove\",\n \"moveOnKeyPress\"\n ]);\n const context = useCompositeProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Composite must receive a `store` prop or be wrapped in a CompositeProvider component.\"\n );\n const previousElementRef = useRef(null);\n const scheduleFocus = useScheduleFocus(store);\n const moves = store.useState(\"moves\");\n useEffect(() => {\n var _a2;\n if (!store)\n return;\n if (!moves)\n return;\n if (!composite)\n return;\n if (!focusOnMove)\n return;\n const { activeId: activeId2 } = store.getState();\n const itemElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;\n if (!itemElement)\n return;\n focusIntoView(itemElement);\n }, [store, moves, composite, focusOnMove]);\n useSafeLayoutEffect(() => {\n if (!store)\n return;\n if (!moves)\n return;\n if (!composite)\n return;\n const { baseElement, activeId: activeId2 } = store.getState();\n const isSelfAcive = activeId2 === null;\n if (!isSelfAcive)\n return;\n if (!baseElement)\n return;\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (previousElement) {\n fireBlurEvent(previousElement, { relatedTarget: baseElement });\n }\n if (!hasFocus(baseElement)) {\n baseElement.focus();\n }\n }, [store, moves, composite]);\n const activeId = store.useState(\"activeId\");\n const virtualFocus = store.useState(\"virtualFocus\");\n useSafeLayoutEffect(() => {\n var _a2;\n if (!store)\n return;\n if (!composite)\n return;\n if (!virtualFocus)\n return;\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (!previousElement)\n return;\n const activeElement = (_a2 = getEnabledItem(store, activeId)) == null ? void 0 : _a2.element;\n const relatedTarget = activeElement || getActiveElement(previousElement);\n if (relatedTarget === previousElement)\n return;\n fireBlurEvent(previousElement, { relatedTarget });\n }, [store, activeId, virtualFocus, composite]);\n const onKeyDownCapture = useKeyboardEventProxy(\n store,\n props.onKeyDownCapture,\n previousElementRef\n );\n const onKeyUpCapture = useKeyboardEventProxy(\n store,\n props.onKeyUpCapture,\n previousElementRef\n );\n const onFocusCaptureProp = props.onFocusCapture;\n const onFocusCapture = useEvent((event) => {\n onFocusCaptureProp == null ? void 0 : onFocusCaptureProp(event);\n if (event.defaultPrevented)\n return;\n if (!store)\n return;\n const { virtualFocus: virtualFocus2 } = store.getState();\n if (!virtualFocus2)\n return;\n const previousActiveElement = event.relatedTarget;\n const isSilentlyFocused = silentlyFocused(event.currentTarget);\n if (isSelfTarget(event) && isSilentlyFocused) {\n event.stopPropagation();\n previousElementRef.current = previousActiveElement;\n }\n });\n const onFocusProp = props.onFocus;\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented)\n return;\n if (!composite)\n return;\n if (!store)\n return;\n const { relatedTarget } = event;\n const { virtualFocus: virtualFocus2 } = store.getState();\n if (virtualFocus2) {\n if (isSelfTarget(event) && !isItem(store, relatedTarget)) {\n queueMicrotask(scheduleFocus);\n }\n } else if (isSelfTarget(event)) {\n store.setActiveId(null);\n }\n });\n const onBlurCaptureProp = props.onBlurCapture;\n const onBlurCapture = useEvent((event) => {\n var _a2;\n onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);\n if (event.defaultPrevented)\n return;\n if (!store)\n return;\n const { virtualFocus: virtualFocus2, activeId: activeId2 } = store.getState();\n if (!virtualFocus2)\n return;\n const activeElement = (_a2 = getEnabledItem(store, activeId2)) == null ? void 0 : _a2.element;\n const nextActiveElement = event.relatedTarget;\n const nextActiveElementIsItem = isItem(store, nextActiveElement);\n const previousElement = previousElementRef.current;\n previousElementRef.current = null;\n if (isSelfTarget(event) && nextActiveElementIsItem) {\n if (nextActiveElement === activeElement) {\n if (previousElement && previousElement !== nextActiveElement) {\n fireBlurEvent(previousElement, event);\n }\n } else if (activeElement) {\n fireBlurEvent(activeElement, event);\n } else if (previousElement) {\n fireBlurEvent(previousElement, event);\n }\n event.stopPropagation();\n } else {\n const targetIsItem = isItem(store, event.target);\n if (!targetIsItem && activeElement) {\n fireBlurEvent(activeElement, event);\n }\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);\n const onKeyDown = useEvent((event) => {\n var _a2;\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented)\n return;\n if (!store)\n return;\n if (!isSelfTarget(event))\n return;\n const { orientation, items, renderedItems, activeId: activeId2 } = store.getState();\n const activeItem = getEnabledItem(store, activeId2);\n if ((_a2 = activeItem == null ? void 0 : activeItem.element) == null ? void 0 : _a2.isConnected)\n return;\n const isVertical = orientation !== \"horizontal\";\n const isHorizontal = orientation !== \"vertical\";\n const grid = isGrid(renderedItems);\n const isHorizontalKey = event.key === \"ArrowLeft\" || event.key === \"ArrowRight\" || event.key === \"Home\" || event.key === \"End\";\n if (isHorizontalKey && isTextField(event.currentTarget))\n return;\n const up = () => {\n if (grid) {\n const item = items && findFirstEnabledItemInTheLastRow(items);\n return item == null ? void 0 : item.id;\n }\n return store == null ? void 0 : store.last();\n };\n const keyMap = {\n ArrowUp: (grid || isVertical) && up,\n ArrowRight: (grid || isHorizontal) && store.first,\n ArrowDown: (grid || isVertical) && store.first,\n ArrowLeft: (grid || isHorizontal) && store.last,\n Home: store.first,\n End: store.last,\n PageUp: store.first,\n PageDown: store.last\n };\n const action = keyMap[event.key];\n if (action) {\n const id = action();\n if (id !== void 0) {\n if (!moveOnKeyPressProp(event))\n return;\n event.preventDefault();\n store.move(id);\n }\n }\n });\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CompositeContextProvider, { value: store, children: element }),\n [store]\n );\n const activeDescendant = store.useState((state) => {\n var _a2;\n if (!store)\n return;\n if (!composite)\n return;\n if (!state.virtualFocus)\n return;\n return (_a2 = getEnabledItem(store, state.activeId)) == null ? void 0 : _a2.id;\n });\n props = __spreadProps(__spreadValues({\n \"aria-activedescendant\": activeDescendant\n }, props), {\n ref: useMergeRefs(composite ? store.setBaseElement : null, props.ref),\n onKeyDownCapture,\n onKeyUpCapture,\n onFocusCapture,\n onFocus,\n onBlurCapture,\n onKeyDown\n });\n const focusable = store.useState(\n (state) => composite && (state.virtualFocus || state.activeId === null)\n );\n props = useFocusable(__spreadValues({ focusable }, props));\n return props;\n }\n);\nvar Composite = forwardRef(function Composite2(props) {\n const htmlProps = useComposite(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useComposite,\n Composite\n};\n","\"use client\";\nimport {\n usePopoverAnchor\n} from \"../__chunks/NLT7LY5Y.js\";\nimport {\n useComboboxProviderContext\n} from \"../__chunks/UNDSQXBK.js\";\nimport {\n useComposite\n} from \"../__chunks/FTNKYK65.js\";\nimport \"../__chunks/3IEDWLST.js\";\nimport \"../__chunks/3D6OCOHF.js\";\nimport \"../__chunks/MADQZZRL.js\";\nimport \"../__chunks/TE637IA7.js\";\nimport \"../__chunks/XXVAHUAO.js\";\nimport \"../__chunks/J55AVALY.js\";\nimport \"../__chunks/WAZE6NXP.js\";\nimport \"../__chunks/SHA3WOPI.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/5M6RSQEC.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useForceUpdate,\n useId,\n useMergeRefs,\n useSafeLayoutEffect,\n useUpdateEffect,\n useUpdateLayoutEffect\n} from \"../__chunks/6O5OEQGF.js\";\nimport \"../__chunks/XM66DUTO.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox.ts\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport {\n getPopupRole,\n getScrollingElement,\n setSelectionRange\n} from \"@ariakit/core/utils/dom\";\nimport {\n isFocusEventOutside,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport { hasFocus } from \"@ariakit/core/utils/focus\";\nimport {\n invariant,\n isFalsyBooleanCallback,\n normalizeString\n} from \"@ariakit/core/utils/misc\";\nimport { flushSync } from \"react-dom\";\nvar TagName = \"input\";\nfunction isFirstItemAutoSelected(items, activeValue, autoSelect) {\n if (!autoSelect)\n return false;\n const firstItem = items.find((item) => !item.disabled && item.value);\n return (firstItem == null ? void 0 : firstItem.value) === activeValue;\n}\nfunction hasCompletionString(value, activeValue) {\n if (!activeValue)\n return false;\n if (value == null)\n return false;\n value = normalizeString(value);\n return activeValue.length > value.length && activeValue.toLowerCase().indexOf(value.toLowerCase()) === 0;\n}\nfunction isInputEvent(event) {\n return event.type === \"input\";\n}\nfunction isAriaAutoCompleteValue(value) {\n return value === \"inline\" || value === \"list\" || value === \"both\" || value === \"none\";\n}\nvar useCombobox = createHook(\n function useCombobox2(_a) {\n var _b = _a, {\n store,\n focusable = true,\n autoSelect: autoSelectProp = false,\n getAutoSelectId,\n showOnChange = true,\n setValueOnChange = true,\n showOnMouseDown = true,\n showOnClick = showOnMouseDown,\n blurActiveItemOnClick,\n setValueOnClick = true,\n showOnKeyDown = true,\n showOnKeyPress = showOnKeyDown,\n moveOnKeyPress = true,\n autoComplete = \"list\"\n } = _b, props = __objRest(_b, [\n \"store\",\n \"focusable\",\n \"autoSelect\",\n \"getAutoSelectId\",\n \"showOnChange\",\n \"setValueOnChange\",\n \"showOnMouseDown\",\n \"showOnClick\",\n \"blurActiveItemOnClick\",\n \"setValueOnClick\",\n \"showOnKeyDown\",\n \"showOnKeyPress\",\n \"moveOnKeyPress\",\n \"autoComplete\"\n ]);\n const context = useComboboxProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"Combobox must receive a `store` prop or be wrapped in a ComboboxProvider component.\"\n );\n const ref = useRef(null);\n const [valueUpdated, forceValueUpdate] = useForceUpdate();\n const canAutoSelectRef = useRef(false);\n const composingRef = useRef(false);\n const autoSelect = store.useState(\n (state) => state.virtualFocus && autoSelectProp\n );\n const inline = autoComplete === \"inline\" || autoComplete === \"both\";\n const [canInline, setCanInline] = useState(inline);\n useUpdateLayoutEffect(() => {\n if (!inline)\n return;\n setCanInline(true);\n }, [inline]);\n const storeValue = store.useState(\"value\");\n const activeValue = store.useState(\n (state) => inline && canInline ? state.activeValue : void 0\n );\n const items = store.useState(\"renderedItems\");\n const open = store.useState(\"open\");\n const contentElement = store.useState(\"contentElement\");\n const value = useMemo(() => {\n if (!inline)\n return storeValue;\n if (!canInline)\n return storeValue;\n const firstItemAutoSelected = isFirstItemAutoSelected(\n items,\n activeValue,\n autoSelect\n );\n if (firstItemAutoSelected) {\n if (hasCompletionString(storeValue, activeValue)) {\n const slice = (activeValue == null ? void 0 : activeValue.slice(storeValue.length)) || \"\";\n return storeValue + slice;\n }\n return storeValue;\n }\n return activeValue || storeValue;\n }, [inline, canInline, items, activeValue, autoSelect, storeValue]);\n useEffect(() => {\n const element = ref.current;\n if (!element)\n return;\n const onCompositeItemMove = () => setCanInline(true);\n element.addEventListener(\"combobox-item-move\", onCompositeItemMove);\n return () => {\n element.removeEventListener(\"combobox-item-move\", onCompositeItemMove);\n };\n }, []);\n useEffect(() => {\n if (!inline)\n return;\n if (!canInline)\n return;\n if (!activeValue)\n return;\n const firstItemAutoSelected = isFirstItemAutoSelected(\n items,\n activeValue,\n autoSelect\n );\n if (!firstItemAutoSelected)\n return;\n if (!hasCompletionString(storeValue, activeValue))\n return;\n queueMicrotask(() => {\n const element = ref.current;\n if (!element)\n return;\n setSelectionRange(element, storeValue.length, activeValue.length);\n });\n }, [\n valueUpdated,\n inline,\n canInline,\n activeValue,\n items,\n autoSelect,\n storeValue\n ]);\n const scrollingElementRef = useRef(null);\n const getAutoSelectIdProp = useEvent(getAutoSelectId);\n const autoSelectIdRef = useRef(null);\n useEffect(() => {\n if (!open)\n return;\n if (!contentElement)\n return;\n const scrollingElement = getScrollingElement(contentElement);\n if (!scrollingElement)\n return;\n scrollingElementRef.current = scrollingElement;\n const onWheel = () => {\n canAutoSelectRef.current = false;\n };\n const onScroll = () => {\n if (!store)\n return;\n if (!canAutoSelectRef.current)\n return;\n const { activeId } = store.getState();\n if (activeId === null)\n return;\n if (activeId === autoSelectIdRef.current)\n return;\n canAutoSelectRef.current = false;\n };\n const options = { passive: true, capture: true };\n scrollingElement.addEventListener(\"wheel\", onWheel, options);\n scrollingElement.addEventListener(\"scroll\", onScroll, options);\n return () => {\n scrollingElement.removeEventListener(\"wheel\", onWheel, true);\n scrollingElement.removeEventListener(\"scroll\", onScroll, true);\n };\n }, [open, contentElement, store]);\n useSafeLayoutEffect(() => {\n if (!storeValue)\n return;\n if (composingRef.current)\n return;\n canAutoSelectRef.current = true;\n }, [storeValue]);\n useSafeLayoutEffect(() => {\n if (autoSelect !== \"always\" && open)\n return;\n canAutoSelectRef.current = open;\n }, [autoSelect, open]);\n const resetValueOnSelect = store.useState(\"resetValueOnSelect\");\n useUpdateEffect(() => {\n var _a2;\n const canAutoSelect = canAutoSelectRef.current;\n if (!store)\n return;\n if (!open)\n return;\n if ((!autoSelect || !canAutoSelect) && !resetValueOnSelect)\n return;\n const { baseElement, contentElement: contentElement2, activeId } = store.getState();\n if (baseElement && !hasFocus(baseElement))\n return;\n if (contentElement2 == null ? void 0 : contentElement2.hasAttribute(\"data-placing\")) {\n const observer = new MutationObserver(forceValueUpdate);\n observer.observe(contentElement2, { attributeFilter: [\"data-placing\"] });\n return () => observer.disconnect();\n }\n if (autoSelect && canAutoSelect) {\n const userAutoSelectId = getAutoSelectIdProp(items);\n const autoSelectId = userAutoSelectId !== void 0 ? userAutoSelectId : store.first();\n autoSelectIdRef.current = autoSelectId;\n store.move(autoSelectId != null ? autoSelectId : null);\n } else {\n const element = (_a2 = store.item(activeId)) == null ? void 0 : _a2.element;\n if (element && \"scrollIntoView\" in element) {\n element.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }\n }\n return;\n }, [\n store,\n open,\n valueUpdated,\n storeValue,\n autoSelect,\n resetValueOnSelect,\n getAutoSelectIdProp,\n items\n ]);\n useEffect(() => {\n if (!inline)\n return;\n const combobox = ref.current;\n if (!combobox)\n return;\n const elements = [combobox, contentElement].filter(\n (value2) => !!value2\n );\n const onBlur2 = (event) => {\n if (elements.every((el) => isFocusEventOutside(event, el))) {\n store == null ? void 0 : store.setValue(value);\n }\n };\n elements.forEach((el) => el.addEventListener(\"focusout\", onBlur2));\n return () => {\n elements.forEach((el) => el.removeEventListener(\"focusout\", onBlur2));\n };\n }, [inline, contentElement, store, value]);\n const onChangeProp = props.onChange;\n const showOnChangeProp = useBooleanEvent(showOnChange);\n const setValueOnChangeProp = useBooleanEvent(setValueOnChange);\n const onChange = useEvent((event) => {\n onChangeProp == null ? void 0 : onChangeProp(event);\n if (event.defaultPrevented)\n return;\n if (!store)\n return;\n const { value: value2, selectionStart, selectionEnd } = event.target;\n const nativeEvent = event.nativeEvent;\n canAutoSelectRef.current = true;\n if (isInputEvent(nativeEvent)) {\n if (nativeEvent.isComposing) {\n canAutoSelectRef.current = false;\n composingRef.current = true;\n }\n if (inline) {\n const textInserted = nativeEvent.inputType === \"insertText\" || nativeEvent.inputType === \"insertCompositionText\";\n const caretAtEnd = selectionStart === value2.length;\n setCanInline(textInserted && caretAtEnd);\n }\n }\n if (setValueOnChangeProp(event)) {\n const isSameValue = value2 === store.getState().value;\n flushSync(() => store == null ? void 0 : store.setValue(value2));\n setSelectionRange(event.currentTarget, selectionStart, selectionEnd);\n if (inline && autoSelect && isSameValue) {\n forceValueUpdate();\n }\n }\n if (showOnChangeProp(event)) {\n store.show();\n }\n if (!autoSelect || !canAutoSelectRef.current) {\n store.setActiveId(null);\n }\n });\n const onCompositionEndProp = props.onCompositionEnd;\n const onCompositionEnd = useEvent((event) => {\n canAutoSelectRef.current = true;\n composingRef.current = false;\n onCompositionEndProp == null ? void 0 : onCompositionEndProp(event);\n if (event.defaultPrevented)\n return;\n if (!autoSelect)\n return;\n forceValueUpdate();\n });\n const onMouseDownProp = props.onMouseDown;\n const blurActiveItemOnClickProp = useBooleanEvent(\n blurActiveItemOnClick != null ? blurActiveItemOnClick : () => !!(store == null ? void 0 : store.getState().includesBaseElement)\n );\n const setValueOnClickProp = useBooleanEvent(setValueOnClick);\n const showOnClickProp = useBooleanEvent(showOnClick);\n const onMouseDown = useEvent((event) => {\n onMouseDownProp == null ? void 0 : onMouseDownProp(event);\n if (event.defaultPrevented)\n return;\n if (event.button)\n return;\n if (event.ctrlKey)\n return;\n if (!store)\n return;\n if (blurActiveItemOnClickProp(event)) {\n store.setActiveId(null);\n }\n if (setValueOnClickProp(event)) {\n store.setValue(value);\n }\n if (showOnClickProp(event)) {\n queueBeforeEvent(event.currentTarget, \"mouseup\", store.show);\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const showOnKeyPressProp = useBooleanEvent(showOnKeyPress);\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (!event.repeat) {\n canAutoSelectRef.current = false;\n }\n if (event.defaultPrevented)\n return;\n if (event.ctrlKey)\n return;\n if (event.altKey)\n return;\n if (event.shiftKey)\n return;\n if (event.metaKey)\n return;\n if (!store)\n return;\n const { open: open2, activeId } = store.getState();\n if (open2)\n return;\n if (activeId !== null)\n return;\n if (event.key === \"ArrowUp\" || event.key === \"ArrowDown\") {\n if (showOnKeyPressProp(event)) {\n event.preventDefault();\n store.show();\n }\n }\n });\n const onBlurProp = props.onBlur;\n const onBlur = useEvent((event) => {\n canAutoSelectRef.current = false;\n onBlurProp == null ? void 0 : onBlurProp(event);\n if (event.defaultPrevented)\n return;\n });\n const id = useId(props.id);\n const ariaAutoComplete = isAriaAutoCompleteValue(autoComplete) ? autoComplete : void 0;\n const isActiveItem = store.useState((state) => state.activeId === null);\n props = __spreadProps(__spreadValues({\n id,\n role: \"combobox\",\n \"aria-autocomplete\": ariaAutoComplete,\n \"aria-haspopup\": getPopupRole(contentElement, \"listbox\"),\n \"aria-expanded\": open,\n \"aria-controls\": contentElement == null ? void 0 : contentElement.id,\n \"data-active-item\": isActiveItem || void 0,\n value\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n onChange,\n onCompositionEnd,\n onMouseDown,\n onKeyDown,\n onBlur\n });\n props = useComposite(__spreadProps(__spreadValues({\n store,\n focusable\n }, props), {\n // Enable inline autocomplete when the user moves from the combobox input\n // to an item.\n moveOnKeyPress: (event) => {\n if (isFalsyBooleanCallback(moveOnKeyPress, event))\n return false;\n if (inline)\n setCanInline(true);\n return true;\n }\n }));\n props = usePopoverAnchor(__spreadValues({ store }, props));\n return __spreadValues({ autoComplete: \"off\" }, props);\n }\n);\nvar Combobox = forwardRef(function Combobox2(props) {\n const htmlProps = useCombobox(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n Combobox,\n useCombobox\n};\n","\"use client\";\nimport {\n DialogScopedContextProvider\n} from \"./XXVAHUAO.js\";\nimport {\n useDisclosureProviderContext\n} from \"./J55AVALY.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useStoreState\n} from \"./EKQEJRUF.js\";\nimport {\n useId,\n useMergeRefs,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/disclosure/disclosure-content.tsx\nimport { useMemo, useRef, useState } from \"react\";\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { flushSync } from \"react-dom\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction afterTimeout(timeoutMs, cb) {\n const timeoutId = setTimeout(cb, timeoutMs);\n return () => clearTimeout(timeoutId);\n}\nfunction afterPaint(cb) {\n let raf = requestAnimationFrame(() => {\n raf = requestAnimationFrame(cb);\n });\n return () => cancelAnimationFrame(raf);\n}\nfunction parseCSSTime(...times) {\n return times.join(\", \").split(\", \").reduce((longestTime, currentTimeString) => {\n const multiplier = currentTimeString.endsWith(\"ms\") ? 1 : 1e3;\n const currentTime = parseFloat(currentTimeString || \"0s\") * multiplier;\n if (currentTime > longestTime)\n return currentTime;\n return longestTime;\n }, 0);\n}\nfunction isHidden(mounted, hidden, alwaysVisible) {\n return !alwaysVisible && hidden !== false && (!mounted || !!hidden);\n}\nvar useDisclosureContent = createHook(function useDisclosureContent2(_a) {\n var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\"]);\n const context = useDisclosureProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"DisclosureContent must receive a `store` prop or be wrapped in a DisclosureProvider component.\"\n );\n const ref = useRef(null);\n const id = useId(props.id);\n const [transition, setTransition] = useState(null);\n const open = store.useState(\"open\");\n const mounted = store.useState(\"mounted\");\n const animated = store.useState(\"animated\");\n const contentElement = store.useState(\"contentElement\");\n const otherElement = useStoreState(store.disclosure, \"contentElement\");\n useSafeLayoutEffect(() => {\n if (!ref.current)\n return;\n store == null ? void 0 : store.setContentElement(ref.current);\n }, [store]);\n useSafeLayoutEffect(() => {\n let previousAnimated;\n store == null ? void 0 : store.setState(\"animated\", (animated2) => {\n previousAnimated = animated2;\n return true;\n });\n return () => {\n if (previousAnimated === void 0)\n return;\n store == null ? void 0 : store.setState(\"animated\", previousAnimated);\n };\n }, [store]);\n useSafeLayoutEffect(() => {\n if (!animated)\n return;\n if (!(contentElement == null ? void 0 : contentElement.isConnected)) {\n setTransition(null);\n return;\n }\n return afterPaint(() => {\n setTransition(open ? \"enter\" : mounted ? \"leave\" : null);\n });\n }, [animated, contentElement, open, mounted]);\n useSafeLayoutEffect(() => {\n if (!store)\n return;\n if (!animated)\n return;\n const stopAnimation = () => store == null ? void 0 : store.setState(\"animating\", false);\n const stopAnimationSync = () => flushSync(stopAnimation);\n if (!transition || !contentElement) {\n stopAnimation();\n return;\n }\n if (transition === \"leave\" && open)\n return;\n if (transition === \"enter\" && !open)\n return;\n if (typeof animated === \"number\") {\n const timeout2 = animated;\n return afterTimeout(timeout2, stopAnimationSync);\n }\n const {\n transitionDuration,\n animationDuration,\n transitionDelay,\n animationDelay\n } = getComputedStyle(contentElement);\n const {\n transitionDuration: transitionDuration2 = \"0\",\n animationDuration: animationDuration2 = \"0\",\n transitionDelay: transitionDelay2 = \"0\",\n animationDelay: animationDelay2 = \"0\"\n } = otherElement ? getComputedStyle(otherElement) : {};\n const delay = parseCSSTime(\n transitionDelay,\n animationDelay,\n transitionDelay2,\n animationDelay2\n );\n const duration = parseCSSTime(\n transitionDuration,\n animationDuration,\n transitionDuration2,\n animationDuration2\n );\n const timeout = delay + duration;\n if (!timeout) {\n if (transition === \"enter\") {\n store.setState(\"animated\", false);\n }\n stopAnimation();\n return;\n }\n const frameRate = 1e3 / 60;\n const maxTimeout = Math.max(timeout - frameRate, 0);\n return afterTimeout(maxTimeout, stopAnimationSync);\n }, [store, animated, contentElement, otherElement, open, transition]);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(DialogScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n const styleProp = props.style;\n const style = useMemo(() => {\n if (hidden)\n return __spreadProps(__spreadValues({}, styleProp), { display: \"none\" });\n return styleProp;\n }, [hidden, styleProp]);\n props = __spreadProps(__spreadValues({\n id,\n \"data-open\": open || void 0,\n \"data-enter\": transition === \"enter\" || void 0,\n \"data-leave\": transition === \"leave\" || void 0,\n hidden\n }, props), {\n ref: useMergeRefs(id ? store.setContentElement : null, ref, props.ref),\n style\n });\n return removeUndefinedValues(props);\n});\nvar DisclosureContentImpl = forwardRef(function DisclosureContentImpl2(props) {\n const htmlProps = useDisclosureContent(props);\n return createElement(TagName, htmlProps);\n});\nvar DisclosureContent = forwardRef(function DisclosureContent2(_a) {\n var _b = _a, {\n unmountOnHide\n } = _b, props = __objRest(_b, [\n \"unmountOnHide\"\n ]);\n const context = useDisclosureProviderContext();\n const store = props.store || context;\n const mounted = useStoreState(\n store,\n (state) => !unmountOnHide || (state == null ? void 0 : state.mounted)\n );\n if (mounted === false)\n return null;\n return /* @__PURE__ */ jsx(DisclosureContentImpl, __spreadValues({}, props));\n});\n\nexport {\n isHidden,\n useDisclosureContent,\n DisclosureContent\n};\n","\"use client\";\nimport {\n ComboboxScopedContextProvider,\n useComboboxProviderContext\n} from \"./UNDSQXBK.js\";\nimport {\n isHidden\n} from \"./RQZGFHI2.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useAttribute,\n useId,\n useMergeRefs,\n useWrapElement\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/combobox/combobox-list.tsx\nimport { useRef } from \"react\";\nimport { invariant, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nvar useComboboxList = createHook(\n function useComboboxList2(_a) {\n var _b = _a, { store, alwaysVisible } = _b, props = __objRest(_b, [\"store\", \"alwaysVisible\"]);\n const context = useComboboxProviderContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"ComboboxList must receive a `store` prop or be wrapped in a ComboboxProvider component.\"\n );\n const ref = useRef(null);\n const id = useId(props.id);\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(ComboboxScopedContextProvider, { value: store, children: element }),\n [store]\n );\n const mounted = store.useState(\"mounted\");\n const hidden = isHidden(mounted, props.hidden, alwaysVisible);\n const style = hidden ? __spreadProps(__spreadValues({}, props.style), { display: \"none\" }) : props.style;\n const multiSelectable = store.useState(\n (state) => Array.isArray(state.selectedValue)\n );\n const role = useAttribute(ref, \"role\", props.role);\n const isCompositeRole = role === \"listbox\" || role === \"tree\" || role === \"grid\";\n const ariaMultiSelectable = isCompositeRole ? multiSelectable || void 0 : void 0;\n props = __spreadProps(__spreadValues({\n id,\n hidden,\n role: \"listbox\",\n \"aria-multiselectable\": ariaMultiSelectable\n }, props), {\n ref: useMergeRefs(id ? store.setContentElement : null, ref, props.ref),\n style\n });\n return removeUndefinedValues(props);\n }\n);\nvar ComboboxList = forwardRef(function ComboboxList2(props) {\n const htmlProps = useComboboxList(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useComboboxList,\n ComboboxList\n};\n","\"use client\";\nimport {\n useFocusable\n} from \"./WAZE6NXP.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useEvent,\n useMergeRefs,\n useMetadataProps,\n useTagName\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/command/command.ts\nimport { useEffect, useRef, useState } from \"react\";\nimport { isButton, isTextField } from \"@ariakit/core/utils/dom\";\nimport {\n fireClickEvent,\n isSelfTarget,\n queueBeforeEvent\n} from \"@ariakit/core/utils/events\";\nimport { disabledFromProps } from \"@ariakit/core/utils/misc\";\nimport { isFirefox } from \"@ariakit/core/utils/platform\";\nvar TagName = \"button\";\nfunction isNativeClick(event) {\n if (!event.isTrusted)\n return false;\n const element = event.currentTarget;\n if (event.key === \"Enter\") {\n return isButton(element) || element.tagName === \"SUMMARY\" || element.tagName === \"A\";\n }\n if (event.key === \" \") {\n return isButton(element) || element.tagName === \"SUMMARY\" || element.tagName === \"INPUT\" || element.tagName === \"SELECT\";\n }\n return false;\n}\nvar symbol = Symbol(\"command\");\nvar useCommand = createHook(\n function useCommand2(_a) {\n var _b = _a, { clickOnEnter = true, clickOnSpace = true } = _b, props = __objRest(_b, [\"clickOnEnter\", \"clickOnSpace\"]);\n const ref = useRef(null);\n const tagName = useTagName(ref);\n const type = props.type;\n const [isNativeButton, setIsNativeButton] = useState(\n () => !!tagName && isButton({ tagName, type })\n );\n useEffect(() => {\n if (!ref.current)\n return;\n setIsNativeButton(isButton(ref.current));\n }, []);\n const [active, setActive] = useState(false);\n const activeRef = useRef(false);\n const disabled = disabledFromProps(props);\n const [isDuplicate, metadataProps] = useMetadataProps(props, symbol, true);\n const onKeyDownProp = props.onKeyDown;\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n const element = event.currentTarget;\n if (event.defaultPrevented)\n return;\n if (isDuplicate)\n return;\n if (disabled)\n return;\n if (!isSelfTarget(event))\n return;\n if (isTextField(element))\n return;\n if (element.isContentEditable)\n return;\n const isEnter = clickOnEnter && event.key === \"Enter\";\n const isSpace = clickOnSpace && event.key === \" \";\n const shouldPreventEnter = event.key === \"Enter\" && !clickOnEnter;\n const shouldPreventSpace = event.key === \" \" && !clickOnSpace;\n if (shouldPreventEnter || shouldPreventSpace) {\n event.preventDefault();\n return;\n }\n if (isEnter || isSpace) {\n const nativeClick = isNativeClick(event);\n if (isEnter) {\n if (!nativeClick) {\n event.preventDefault();\n const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, [\"view\"]);\n const click = () => fireClickEvent(element, eventInit);\n if (isFirefox()) {\n queueBeforeEvent(element, \"keyup\", click);\n } else {\n queueMicrotask(click);\n }\n }\n } else if (isSpace) {\n activeRef.current = true;\n if (!nativeClick) {\n event.preventDefault();\n setActive(true);\n }\n }\n }\n });\n const onKeyUpProp = props.onKeyUp;\n const onKeyUp = useEvent((event) => {\n onKeyUpProp == null ? void 0 : onKeyUpProp(event);\n if (event.defaultPrevented)\n return;\n if (isDuplicate)\n return;\n if (disabled)\n return;\n if (event.metaKey)\n return;\n const isSpace = clickOnSpace && event.key === \" \";\n if (activeRef.current && isSpace) {\n activeRef.current = false;\n if (!isNativeClick(event)) {\n event.preventDefault();\n setActive(false);\n const element = event.currentTarget;\n const _a2 = event, { view } = _a2, eventInit = __objRest(_a2, [\"view\"]);\n queueMicrotask(() => fireClickEvent(element, eventInit));\n }\n }\n });\n props = __spreadProps(__spreadValues(__spreadValues({\n \"data-active\": active || void 0,\n type: isNativeButton ? \"button\" : void 0\n }, metadataProps), props), {\n ref: useMergeRefs(ref, props.ref),\n onKeyDown,\n onKeyUp\n });\n props = useFocusable(props);\n return props;\n }\n);\nvar Command = forwardRef(function Command2(props) {\n const htmlProps = useCommand(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCommand,\n Command\n};\n","\"use client\";\nimport {\n useCollectionContext\n} from \"./MADQZZRL.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"./5M6RSQEC.js\";\nimport {\n useId,\n useMergeRefs\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/collection/collection-item.ts\nimport { useEffect, useRef } from \"react\";\nimport { identity, removeUndefinedValues } from \"@ariakit/core/utils/misc\";\nvar TagName = \"div\";\nvar useCollectionItem = createHook(\n function useCollectionItem2(_a) {\n var _b = _a, {\n store,\n shouldRegisterItem = true,\n getItem = identity,\n element: element\n } = _b, props = __objRest(_b, [\n \"store\",\n \"shouldRegisterItem\",\n \"getItem\",\n // @ts-expect-error This prop may come from a collection renderer.\n \"element\"\n ]);\n const context = useCollectionContext();\n store = store || context;\n const id = useId(props.id);\n const ref = useRef(element);\n useEffect(() => {\n const element2 = ref.current;\n if (!id)\n return;\n if (!element2)\n return;\n if (!shouldRegisterItem)\n return;\n const item = getItem({ id, element: element2 });\n return store == null ? void 0 : store.renderItem(item);\n }, [id, shouldRegisterItem, getItem, store]);\n props = __spreadProps(__spreadValues({}, props), {\n ref: useMergeRefs(ref, props.ref)\n });\n return removeUndefinedValues(props);\n }\n);\nvar CollectionItem = forwardRef(function CollectionItem2(props) {\n const htmlProps = useCollectionItem(props);\n return createElement(TagName, htmlProps);\n});\n\nexport {\n useCollectionItem,\n CollectionItem\n};\n","\"use client\";\nimport {\n useCommand\n} from \"./KSZPJCUA.js\";\nimport {\n useCollectionItem\n} from \"./7YKLTEOQ.js\";\nimport {\n focusSilently,\n getEnabledItem,\n isItem\n} from \"./3IEDWLST.js\";\nimport {\n CompositeItemContext,\n CompositeRowContext,\n useCompositeContext\n} from \"./3D6OCOHF.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"./5M6RSQEC.js\";\nimport {\n useStoreState\n} from \"./EKQEJRUF.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useId,\n useMergeRefs,\n useSafeLayoutEffect,\n useWrapElement\n} from \"./6O5OEQGF.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"./4R3V3JGP.js\";\n\n// src/composite/composite-item.tsx\nimport { useCallback, useContext, useMemo, useRef, useState } from \"react\";\nimport {\n getScrollingElement,\n isButton,\n isTextField\n} from \"@ariakit/core/utils/dom\";\nimport { isPortalEvent, isSelfTarget } from \"@ariakit/core/utils/events\";\nimport {\n disabledFromProps,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"button\";\nfunction isEditableElement(element) {\n if (element.isContentEditable)\n return true;\n if (isTextField(element))\n return true;\n return element.tagName === \"INPUT\" && !isButton(element);\n}\nfunction getNextPageOffset(scrollingElement, pageUp = false) {\n const height = scrollingElement.clientHeight;\n const { top } = scrollingElement.getBoundingClientRect();\n const pageSize = Math.max(height * 0.875, height - 40) * 1.5;\n const pageOffset = pageUp ? height - pageSize + top : pageSize + top;\n if (scrollingElement.tagName === \"HTML\") {\n return pageOffset + scrollingElement.scrollTop;\n }\n return pageOffset;\n}\nfunction getItemOffset(itemElement, pageUp = false) {\n const { top } = itemElement.getBoundingClientRect();\n if (pageUp) {\n return top + itemElement.clientHeight;\n }\n return top;\n}\nfunction findNextPageItemId(element, store, next, pageUp = false) {\n var _a;\n if (!store)\n return;\n if (!next)\n return;\n const { renderedItems } = store.getState();\n const scrollingElement = getScrollingElement(element);\n if (!scrollingElement)\n return;\n const nextPageOffset = getNextPageOffset(scrollingElement, pageUp);\n let id;\n let prevDifference;\n for (let i = 0; i < renderedItems.length; i += 1) {\n const previousId = id;\n id = next(i);\n if (!id)\n break;\n if (id === previousId)\n continue;\n const itemElement = (_a = getEnabledItem(store, id)) == null ? void 0 : _a.element;\n if (!itemElement)\n continue;\n const itemOffset = getItemOffset(itemElement, pageUp);\n const difference = itemOffset - nextPageOffset;\n const absDifference = Math.abs(difference);\n if (pageUp && difference <= 0 || !pageUp && difference >= 0) {\n if (prevDifference !== void 0 && prevDifference < absDifference) {\n id = previousId;\n }\n break;\n }\n prevDifference = absDifference;\n }\n return id;\n}\nfunction targetIsAnotherItem(event, store) {\n if (isSelfTarget(event))\n return false;\n return isItem(store, event.target);\n}\nfunction useRole(ref, props) {\n const roleProp = props.role;\n const [role, setRole] = useState(roleProp);\n useSafeLayoutEffect(() => {\n const element = ref.current;\n if (!element)\n return;\n setRole(element.getAttribute(\"role\") || roleProp);\n }, [roleProp]);\n return role;\n}\nfunction requiresAriaSelected(role) {\n return role === \"option\" || role === \"treeitem\";\n}\nfunction supportsAriaSelected(role) {\n if (role === \"option\")\n return true;\n if (role === \"tab\")\n return true;\n if (role === \"treeitem\")\n return true;\n if (role === \"gridcell\")\n return true;\n if (role === \"row\")\n return true;\n if (role === \"columnheader\")\n return true;\n if (role === \"rowheader\")\n return true;\n return false;\n}\nvar useCompositeItem = createHook(\n function useCompositeItem2(_a) {\n var _b = _a, {\n store,\n rowId: rowIdProp,\n preventScrollOnKeyDown = false,\n moveOnKeyPress = true,\n tabbable = false,\n getItem: getItemProp,\n \"aria-setsize\": ariaSetSizeProp,\n \"aria-posinset\": ariaPosInSetProp\n } = _b, props = __objRest(_b, [\n \"store\",\n \"rowId\",\n \"preventScrollOnKeyDown\",\n \"moveOnKeyPress\",\n \"tabbable\",\n \"getItem\",\n \"aria-setsize\",\n \"aria-posinset\"\n ]);\n const context = useCompositeContext();\n store = store || context;\n const id = useId(props.id);\n const ref = useRef(null);\n const row = useContext(CompositeRowContext);\n const rowId = useStoreState(store, (state) => {\n if (rowIdProp)\n return rowIdProp;\n if (!state)\n return;\n if (!(row == null ? void 0 : row.baseElement))\n return;\n if (row.baseElement !== state.baseElement)\n return;\n return row.id;\n });\n const disabled = disabledFromProps(props);\n const trulyDisabled = disabled && !props.accessibleWhenDisabled;\n const getItem = useCallback(\n (item) => {\n const nextItem = __spreadProps(__spreadValues({}, item), {\n id: id || item.id,\n rowId,\n disabled: !!trulyDisabled\n });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [id, rowId, trulyDisabled, getItemProp]\n );\n const onFocusProp = props.onFocus;\n const hasFocusedComposite = useRef(false);\n const onFocus = useEvent((event) => {\n onFocusProp == null ? void 0 : onFocusProp(event);\n if (event.defaultPrevented)\n return;\n if (isPortalEvent(event))\n return;\n if (!id)\n return;\n if (!store)\n return;\n const { activeId, virtualFocus: virtualFocus2, baseElement: baseElement2 } = store.getState();\n if (targetIsAnotherItem(event, store))\n return;\n if (activeId !== id) {\n store.setActiveId(id);\n }\n if (!virtualFocus2)\n return;\n if (!isSelfTarget(event))\n return;\n if (isEditableElement(event.currentTarget))\n return;\n if (!(baseElement2 == null ? void 0 : baseElement2.isConnected))\n return;\n hasFocusedComposite.current = true;\n const fromComposite = event.relatedTarget === baseElement2 || isItem(store, event.relatedTarget);\n if (fromComposite) {\n focusSilently(baseElement2);\n } else {\n baseElement2.focus();\n }\n });\n const onBlurCaptureProp = props.onBlurCapture;\n const onBlurCapture = useEvent((event) => {\n onBlurCaptureProp == null ? void 0 : onBlurCaptureProp(event);\n if (event.defaultPrevented)\n return;\n const state = store == null ? void 0 : store.getState();\n if ((state == null ? void 0 : state.virtualFocus) && hasFocusedComposite.current) {\n hasFocusedComposite.current = false;\n event.preventDefault();\n event.stopPropagation();\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const preventScrollOnKeyDownProp = useBooleanEvent(preventScrollOnKeyDown);\n const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented)\n return;\n if (!isSelfTarget(event))\n return;\n if (!store)\n return;\n const { currentTarget } = event;\n const state = store.getState();\n const item = store.item(id);\n const isGrid = !!(item == null ? void 0 : item.rowId);\n const isVertical = state.orientation !== \"horizontal\";\n const isHorizontal = state.orientation !== \"vertical\";\n const canHomeEnd = () => {\n if (isGrid)\n return true;\n if (isHorizontal)\n return true;\n if (!state.baseElement)\n return true;\n if (!isTextField(state.baseElement))\n return true;\n return false;\n };\n const keyMap = {\n ArrowUp: (isGrid || isVertical) && store.up,\n ArrowRight: (isGrid || isHorizontal) && store.next,\n ArrowDown: (isGrid || isVertical) && store.down,\n ArrowLeft: (isGrid || isHorizontal) && store.previous,\n Home: () => {\n if (!canHomeEnd())\n return;\n if (!isGrid || event.ctrlKey) {\n return store == null ? void 0 : store.first();\n }\n return store == null ? void 0 : store.previous(-1);\n },\n End: () => {\n if (!canHomeEnd())\n return;\n if (!isGrid || event.ctrlKey) {\n return store == null ? void 0 : store.last();\n }\n return store == null ? void 0 : store.next(-1);\n },\n PageUp: () => {\n return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.up, true);\n },\n PageDown: () => {\n return findNextPageItemId(currentTarget, store, store == null ? void 0 : store.down);\n }\n };\n const action = keyMap[event.key];\n if (action) {\n const nextId = action();\n if (preventScrollOnKeyDownProp(event) || nextId !== void 0) {\n if (!moveOnKeyPressProp(event))\n return;\n event.preventDefault();\n store.move(nextId);\n }\n }\n });\n const baseElement = useStoreState(\n store,\n (state) => (state == null ? void 0 : state.baseElement) || void 0\n );\n const providerValue = useMemo(\n () => ({ id, baseElement }),\n [id, baseElement]\n );\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(CompositeItemContext.Provider, { value: providerValue, children: element }),\n [providerValue]\n );\n const isActiveItem = useStoreState(\n store,\n (state) => !!state && state.activeId === id\n );\n const virtualFocus = useStoreState(store, \"virtualFocus\");\n const role = useRole(ref, props);\n let ariaSelected;\n if (isActiveItem) {\n if (requiresAriaSelected(role)) {\n ariaSelected = true;\n } else if (virtualFocus && supportsAriaSelected(role)) {\n ariaSelected = true;\n }\n }\n const ariaSetSize = useStoreState(store, (state) => {\n if (ariaSetSizeProp != null)\n return ariaSetSizeProp;\n if (!state)\n return;\n if (!(row == null ? void 0 : row.ariaSetSize))\n return;\n if (row.baseElement !== state.baseElement)\n return;\n return row.ariaSetSize;\n });\n const ariaPosInSet = useStoreState(store, (state) => {\n if (ariaPosInSetProp != null)\n return ariaPosInSetProp;\n if (!state)\n return;\n if (!(row == null ? void 0 : row.ariaPosInSet))\n return;\n if (row.baseElement !== state.baseElement)\n return;\n const itemsInRow = state.renderedItems.filter(\n (item) => item.rowId === rowId\n );\n return row.ariaPosInSet + itemsInRow.findIndex((item) => item.id === id);\n });\n const isTabbable = useStoreState(store, (state) => {\n if (!(state == null ? void 0 : state.renderedItems.length))\n return true;\n if (state.virtualFocus)\n return false;\n if (tabbable)\n return true;\n return state.activeId === id;\n });\n props = __spreadProps(__spreadValues({\n id,\n \"aria-selected\": ariaSelected,\n \"data-active-item\": isActiveItem || void 0\n }, props), {\n ref: useMergeRefs(ref, props.ref),\n tabIndex: isTabbable ? props.tabIndex : -1,\n onFocus,\n onBlurCapture,\n onKeyDown\n });\n props = useCommand(props);\n props = useCollectionItem(__spreadProps(__spreadValues({\n store\n }, props), {\n getItem,\n shouldRegisterItem: !!id ? props.shouldRegisterItem : false\n }));\n return removeUndefinedValues(__spreadProps(__spreadValues({}, props), {\n \"aria-setsize\": ariaSetSize,\n \"aria-posinset\": ariaPosInSet\n }));\n }\n);\nvar CompositeItem = memo(\n forwardRef(function CompositeItem2(props) {\n const htmlProps = useCompositeItem(props);\n return createElement(TagName, htmlProps);\n })\n);\n\nexport {\n useCompositeItem,\n CompositeItem\n};\n","\"use client\";\nimport {\n useCompositeHover\n} from \"../__chunks/WL6TTPTB.js\";\nimport {\n ComboboxItemCheckedContext,\n ComboboxItemValueContext,\n useComboboxScopedContext\n} from \"../__chunks/UNDSQXBK.js\";\nimport {\n useCompositeItem\n} from \"../__chunks/C6OBNQ4F.js\";\nimport \"../__chunks/KSZPJCUA.js\";\nimport \"../__chunks/7YKLTEOQ.js\";\nimport \"../__chunks/3IEDWLST.js\";\nimport \"../__chunks/3D6OCOHF.js\";\nimport \"../__chunks/MADQZZRL.js\";\nimport \"../__chunks/TE637IA7.js\";\nimport \"../__chunks/XXVAHUAO.js\";\nimport \"../__chunks/J55AVALY.js\";\nimport \"../__chunks/WAZE6NXP.js\";\nimport \"../__chunks/SHA3WOPI.js\";\nimport {\n createElement,\n createHook,\n forwardRef,\n memo\n} from \"../__chunks/5M6RSQEC.js\";\nimport \"../__chunks/EKQEJRUF.js\";\nimport {\n useBooleanEvent,\n useEvent,\n useWrapElement\n} from \"../__chunks/6O5OEQGF.js\";\nimport \"../__chunks/XM66DUTO.js\";\nimport {\n __objRest,\n __spreadProps,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox-item.tsx\nimport { useCallback } from \"react\";\nimport { getPopupItemRole, isTextField } from \"@ariakit/core/utils/dom\";\nimport { isDownloading, isOpeningInNewTab } from \"@ariakit/core/utils/events\";\nimport { hasFocus } from \"@ariakit/core/utils/focus\";\nimport { invariant } from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"div\";\nfunction isSelected(storeValue, itemValue) {\n if (itemValue == null)\n return;\n if (storeValue == null)\n return false;\n if (Array.isArray(storeValue)) {\n return storeValue.includes(itemValue);\n }\n return storeValue === itemValue;\n}\nvar useComboboxItem = createHook(\n function useComboboxItem2(_a) {\n var _b = _a, {\n store,\n value,\n hideOnClick,\n selectValueOnClick = true,\n setValueOnClick,\n focusOnHover = false,\n moveOnKeyPress = true,\n getItem: getItemProp\n } = _b, props = __objRest(_b, [\n \"store\",\n \"value\",\n \"hideOnClick\",\n \"selectValueOnClick\",\n \"setValueOnClick\",\n \"focusOnHover\",\n \"moveOnKeyPress\",\n \"getItem\"\n ]);\n const context = useComboboxScopedContext();\n store = store || context;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"ComboboxItem must be wrapped in a ComboboxList or ComboboxPopover component.\"\n );\n const getItem = useCallback(\n (item) => {\n const nextItem = __spreadProps(__spreadValues({}, item), { value });\n if (getItemProp) {\n return getItemProp(nextItem);\n }\n return nextItem;\n },\n [value, getItemProp]\n );\n const multiSelectable = store.useState(\n (state) => Array.isArray(state.selectedValue)\n );\n setValueOnClick = setValueOnClick != null ? setValueOnClick : !multiSelectable;\n hideOnClick = hideOnClick != null ? hideOnClick : value != null && !multiSelectable;\n const onClickProp = props.onClick;\n const setValueOnClickProp = useBooleanEvent(setValueOnClick);\n const selectValueOnClickProp = useBooleanEvent(selectValueOnClick);\n const hideOnClickProp = useBooleanEvent(hideOnClick);\n const onClick = useEvent((event) => {\n onClickProp == null ? void 0 : onClickProp(event);\n if (event.defaultPrevented)\n return;\n if (isDownloading(event))\n return;\n if (isOpeningInNewTab(event))\n return;\n if (value != null) {\n if (selectValueOnClickProp(event)) {\n store == null ? void 0 : store.setSelectedValue((prevValue) => {\n if (!Array.isArray(prevValue))\n return value;\n if (prevValue.includes(value)) {\n return prevValue.filter((v) => v !== value);\n }\n return [...prevValue, value];\n });\n }\n if (setValueOnClickProp(event)) {\n store == null ? void 0 : store.setValue(value);\n }\n }\n if (hideOnClickProp(event)) {\n store == null ? void 0 : store.hide();\n }\n });\n const onKeyDownProp = props.onKeyDown;\n const onKeyDown = useEvent((event) => {\n onKeyDownProp == null ? void 0 : onKeyDownProp(event);\n if (event.defaultPrevented)\n return;\n const baseElement = store == null ? void 0 : store.getState().baseElement;\n if (!baseElement)\n return;\n if (hasFocus(baseElement))\n return;\n const printable = event.key.length === 1;\n if (printable || event.key === \"Backspace\" || event.key === \"Delete\") {\n queueMicrotask(() => baseElement.focus());\n if (isTextField(baseElement)) {\n store == null ? void 0 : store.setValue(baseElement.value);\n }\n }\n });\n const selected = store.useState(\n (state) => isSelected(state.selectedValue, value)\n );\n if (multiSelectable && selected != null) {\n props = __spreadValues({\n \"aria-selected\": selected\n }, props);\n }\n props = useWrapElement(\n props,\n (element) => /* @__PURE__ */ jsx(ComboboxItemValueContext.Provider, { value, children: /* @__PURE__ */ jsx(ComboboxItemCheckedContext.Provider, { value: selected != null ? selected : false, children: element }) }),\n [value, selected]\n );\n const contentElement = store.useState(\"contentElement\");\n props = __spreadProps(__spreadValues({\n role: getPopupItemRole(contentElement),\n children: value\n }, props), {\n onClick,\n onKeyDown\n });\n const moveOnKeyPressProp = useBooleanEvent(moveOnKeyPress);\n props = useCompositeItem(__spreadProps(__spreadValues({\n store\n }, props), {\n getItem,\n // Dispatch a custom event on the combobox input when moving to an item\n // with the keyboard so the Combobox component can enable inline\n // autocompletion.\n moveOnKeyPress: (event) => {\n if (!moveOnKeyPressProp(event))\n return false;\n const moveEvent = new Event(\"combobox-item-move\");\n const baseElement = store == null ? void 0 : store.getState().baseElement;\n baseElement == null ? void 0 : baseElement.dispatchEvent(moveEvent);\n return true;\n }\n }));\n props = useCompositeHover(__spreadValues({ store, focusOnHover }, props));\n return props;\n }\n);\nvar ComboboxItem = memo(\n forwardRef(function ComboboxItem2(props) {\n const htmlProps = useComboboxItem(props);\n return createElement(TagName, htmlProps);\n })\n);\nexport {\n ComboboxItem,\n useComboboxItem\n};\n","\"use client\";\nimport {\n ComboboxItemValueContext,\n useComboboxScopedContext\n} from \"../__chunks/UNDSQXBK.js\";\nimport \"../__chunks/3D6OCOHF.js\";\nimport \"../__chunks/MADQZZRL.js\";\nimport \"../__chunks/TE637IA7.js\";\nimport \"../__chunks/XXVAHUAO.js\";\nimport \"../__chunks/J55AVALY.js\";\nimport {\n createElement,\n createHook,\n forwardRef\n} from \"../__chunks/5M6RSQEC.js\";\nimport \"../__chunks/6O5OEQGF.js\";\nimport \"../__chunks/XM66DUTO.js\";\nimport {\n __objRest,\n __spreadValues\n} from \"../__chunks/4R3V3JGP.js\";\n\n// src/combobox/combobox-item-value.tsx\nimport { useContext, useMemo } from \"react\";\nimport {\n invariant,\n normalizeString,\n removeUndefinedValues\n} from \"@ariakit/core/utils/misc\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TagName = \"span\";\nfunction normalizeValue(value) {\n return normalizeString(value).toLowerCase();\n}\nfunction splitValue(itemValue, userValue) {\n userValue = normalizeValue(userValue);\n let index = normalizeValue(itemValue).indexOf(userValue);\n const parts = [];\n while (index !== -1) {\n if (index !== 0) {\n parts.push(\n /* @__PURE__ */ jsx(\"span\", { \"data-autocomplete-value\": \"\", children: itemValue.substr(0, index) }, parts.length)\n );\n }\n parts.push(\n /* @__PURE__ */ jsx(\"span\", { \"data-user-value\": \"\", children: itemValue.substr(index, userValue.length) }, parts.length)\n );\n itemValue = itemValue.substr(index + userValue.length);\n index = normalizeValue(itemValue).indexOf(userValue);\n }\n if (itemValue) {\n parts.push(\n /* @__PURE__ */ jsx(\"span\", { \"data-autocomplete-value\": \"\", children: itemValue }, parts.length)\n );\n }\n return parts;\n}\nvar useComboboxItemValue = createHook(function useComboboxItemValue2(_a) {\n var _b = _a, { store, value } = _b, props = __objRest(_b, [\"store\", \"value\"]);\n const context = useComboboxScopedContext();\n store = store || context;\n const itemContext = useContext(ComboboxItemValueContext);\n const itemValue = value != null ? value : itemContext;\n invariant(\n store,\n process.env.NODE_ENV !== \"production\" && \"ComboboxItemValue must be wrapped in a ComboboxItem component.\"\n );\n const stateValue = store.useState(\n (state) => itemValue && state.value ? state.value : void 0\n );\n const children = useMemo(\n () => itemValue && stateValue ? splitValue(itemValue, stateValue) : itemValue,\n [itemValue, stateValue]\n );\n props = __spreadValues({\n children\n }, props);\n return removeUndefinedValues(props);\n});\nvar ComboboxItemValue = forwardRef(function ComboboxItemValue2(props) {\n const htmlProps = useComboboxItemValue(props);\n return createElement(TagName, htmlProps);\n});\nexport {\n ComboboxItemValue,\n useComboboxItemValue\n};\n","/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport removeAccents from 'remove-accents';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useState, useMemo, useDeferredValue } from '@wordpress/element';\nimport {\n\tVisuallyHidden,\n\tIcon,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { search, check } from '@wordpress/icons';\nimport { SVG, Circle } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport type { Filter, NormalizedFilter, View } from '../../types';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\ninterface SearchWidgetProps {\n\tview: View;\n\tfilter: NormalizedFilter;\n\tonChangeView: ( view: View ) => void;\n}\n\nconst radioCheck = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Circle cx={ 12 } cy={ 12 } r={ 3 }></Circle>\n\t</SVG>\n);\n\nfunction normalizeSearchInput( input = '' ) {\n\treturn removeAccents( input.trim().toLowerCase() );\n}\n\nconst EMPTY_ARRAY: [] = [];\nconst getCurrentValue = (\n\tfilterDefinition: NormalizedFilter,\n\tcurrentFilter?: Filter\n) => {\n\tif ( filterDefinition.singleSelection ) {\n\t\treturn currentFilter?.value;\n\t}\n\n\tif ( Array.isArray( currentFilter?.value ) ) {\n\t\treturn currentFilter.value;\n\t}\n\n\tif ( ! Array.isArray( currentFilter?.value ) && !! currentFilter?.value ) {\n\t\treturn [ currentFilter.value ];\n\t}\n\n\treturn EMPTY_ARRAY;\n};\n\nconst getNewValue = (\n\tfilterDefinition: NormalizedFilter,\n\tcurrentFilter: Filter | undefined,\n\tvalue: any\n) => {\n\tif ( filterDefinition.singleSelection ) {\n\t\treturn value;\n\t}\n\n\tif ( Array.isArray( currentFilter?.value ) ) {\n\t\treturn currentFilter.value.includes( value )\n\t\t\t? currentFilter.value.filter( ( v ) => v !== value )\n\t\t\t: [ ...currentFilter.value, value ];\n\t}\n\n\treturn [ value ];\n};\n\nfunction ListBox( { view, filter, onChangeView }: SearchWidgetProps ) {\n\tconst compositeStore = useCompositeStore( {\n\t\tvirtualFocus: true,\n\t\tfocusLoop: true,\n\t\t// When we have no or just one operator, we can set the first item as active.\n\t\t// We do that by passing `undefined` to `defaultActiveId`. Otherwise, we set it to `null`,\n\t\t// so the first item is not selected, since the focus is on the operators control.\n\t\tdefaultActiveId: filter.operators?.length === 1 ? undefined : null,\n\t} );\n\tconst currentFilter = view.filters?.find(\n\t\t( f ) => f.field === filter.field\n\t);\n\tconst currentValue = getCurrentValue( filter, currentFilter );\n\treturn (\n\t\t<Composite\n\t\t\tstore={ compositeStore }\n\t\t\trole=\"listbox\"\n\t\t\tclassName=\"dataviews-filters__search-widget-listbox\"\n\t\t\taria-label={ sprintf(\n\t\t\t\t/* translators: List of items for a filter. 1: Filter name. e.g.: \"List of: Author\". */\n\t\t\t\t__( 'List of: %1$s' ),\n\t\t\t\tfilter.name\n\t\t\t) }\n\t\t\tonFocusVisible={ () => {\n\t\t\t\tif ( ! compositeStore.getState().activeId ) {\n\t\t\t\t\tcompositeStore.move( compositeStore.first() );\n\t\t\t\t}\n\t\t\t} }\n\t\t\trender={ <Ariakit.CompositeTypeahead store={ compositeStore } /> }\n\t\t>\n\t\t\t{ filter.elements.map( ( element ) => (\n\t\t\t\t<Ariakit.CompositeHover\n\t\t\t\t\tstore={ compositeStore }\n\t\t\t\t\tkey={ element.value }\n\t\t\t\t\trender={\n\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\taria-label={ element.label }\n\t\t\t\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t\t\t\t\tclassName=\"dataviews-filters__search-widget-listitem\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst newFilters = currentFilter\n\t\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t\t...( view.filters ?? [] ).map(\n\t\t\t\t\t\t\t\t\t\t\t\t( _filter ) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t_filter.field ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfilter.field\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\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t..._filter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toperator:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentFilter.operator ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfilter\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.operators[ 0 ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue: getNewValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfilter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentFilter,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\telement.value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn _filter;\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 ]\n\t\t\t\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t\t\t\t...( view.filters ?? [] ),\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tfield: filter.field,\n\t\t\t\t\t\t\t\t\t\t\t\toperator: filter.operators[ 0 ],\n\t\t\t\t\t\t\t\t\t\t\t\tvalue: getNewValue(\n\t\t\t\t\t\t\t\t\t\t\t\t\tfilter,\n\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentFilter,\n\t\t\t\t\t\t\t\t\t\t\t\t\telement.value\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 ];\n\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\t\t\t\tfilters: newFilters,\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\t\t<span className=\"dataviews-filters__search-widget-listitem-check\">\n\t\t\t\t\t\t{ filter.singleSelection &&\n\t\t\t\t\t\t\tcurrentValue === element.value && (\n\t\t\t\t\t\t\t\t<Icon icon={ radioCheck } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! filter.singleSelection &&\n\t\t\t\t\t\t\tcurrentValue.includes( element.value ) && (\n\t\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>\n\t\t\t\t\t\t{ element.label }\n\t\t\t\t\t\t{ !! element.description && (\n\t\t\t\t\t\t\t<span className=\"dataviews-filters__search-widget-listitem-description\">\n\t\t\t\t\t\t\t\t{ element.description }\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</Ariakit.CompositeHover>\n\t\t\t) ) }\n\t\t</Composite>\n\t);\n}\n\nfunction ComboboxList( { view, filter, onChangeView }: SearchWidgetProps ) {\n\tconst [ searchValue, setSearchValue ] = useState( '' );\n\tconst deferredSearchValue = useDeferredValue( searchValue );\n\tconst currentFilter = view.filters?.find(\n\t\t( _filter ) => _filter.field === filter.field\n\t);\n\tconst currentValue = getCurrentValue( filter, currentFilter );\n\tconst matches = useMemo( () => {\n\t\tconst normalizedSearch = normalizeSearchInput( deferredSearchValue );\n\t\treturn filter.elements.filter( ( item ) =>\n\t\t\tnormalizeSearchInput( item.label ).includes( normalizedSearch )\n\t\t);\n\t}, [ filter.elements, deferredSearchValue ] );\n\treturn (\n\t\t<Ariakit.ComboboxProvider\n\t\t\tresetValueOnSelect={ false }\n\t\t\tselectedValue={ currentValue }\n\t\t\tsetSelectedValue={ ( value ) => {\n\t\t\t\tconst newFilters = currentFilter\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t...( view.filters ?? [] ).map( ( _filter ) => {\n\t\t\t\t\t\t\t\tif ( _filter.field === filter.field ) {\n\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t..._filter,\n\t\t\t\t\t\t\t\t\t\toperator:\n\t\t\t\t\t\t\t\t\t\t\tcurrentFilter.operator ||\n\t\t\t\t\t\t\t\t\t\t\tfilter.operators[ 0 ],\n\t\t\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn _filter;\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\t\t\t...( view.filters ?? [] ),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: filter.field,\n\t\t\t\t\t\t\t\toperator: filter.operators[ 0 ],\n\t\t\t\t\t\t\t\tvalue,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t ];\n\t\t\t\tonChangeView( {\n\t\t\t\t\t...view,\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tfilters: newFilters,\n\t\t\t\t} );\n\t\t\t} }\n\t\t\tsetValue={ setSearchValue }\n\t\t>\n\t\t\t<div className=\"dataviews-filters__search-widget-filter-combobox__wrapper\">\n\t\t\t\t<Ariakit.ComboboxLabel\n\t\t\t\t\trender={\n\t\t\t\t\t\t<VisuallyHidden>\n\t\t\t\t\t\t\t{ __( 'Search items' ) }\n\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Search items' ) }\n\t\t\t\t</Ariakit.ComboboxLabel>\n\t\t\t\t<Ariakit.Combobox\n\t\t\t\t\tautoSelect=\"always\"\n\t\t\t\t\tplaceholder={ __( 'Search' ) }\n\t\t\t\t\tclassName=\"dataviews-filters__search-widget-filter-combobox__input\"\n\t\t\t\t/>\n\t\t\t\t<div className=\"dataviews-filters__search-widget-filter-combobox__icon\">\n\t\t\t\t\t<Icon icon={ search } />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<Ariakit.ComboboxList\n\t\t\t\tclassName=\"dataviews-filters__search-widget-filter-combobox-list\"\n\t\t\t\talwaysVisible\n\t\t\t>\n\t\t\t\t{ matches.map( ( element ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.ComboboxItem\n\t\t\t\t\t\t\tkey={ element.value }\n\t\t\t\t\t\t\tvalue={ element.value }\n\t\t\t\t\t\t\tclassName=\"dataviews-filters__search-widget-listitem\"\n\t\t\t\t\t\t\thideOnClick={ false }\n\t\t\t\t\t\t\tsetValueOnClick={ false }\n\t\t\t\t\t\t\tfocusOnHover\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<span className=\"dataviews-filters__search-widget-listitem-check\">\n\t\t\t\t\t\t\t\t{ filter.singleSelection &&\n\t\t\t\t\t\t\t\t\tcurrentValue === element.value && (\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ radioCheck } />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t{ ! filter.singleSelection &&\n\t\t\t\t\t\t\t\t\tcurrentValue.includes( element.value ) && (\n\t\t\t\t\t\t\t\t\t\t<Icon icon={ check } />\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t<Ariakit.ComboboxItemValue\n\t\t\t\t\t\t\t\t\tclassName=\"dataviews-filters__search-widget-filter-combobox-item-value\"\n\t\t\t\t\t\t\t\t\tvalue={ element.label }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t{ !! element.description && (\n\t\t\t\t\t\t\t\t\t<span className=\"dataviews-filters__search-widget-listitem-description\">\n\t\t\t\t\t\t\t\t\t\t{ element.description }\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</span>\n\t\t\t\t\t\t</Ariakit.ComboboxItem>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t\t{ ! matches.length && <p>{ __( 'No results found' ) }</p> }\n\t\t\t</Ariakit.ComboboxList>\n\t\t</Ariakit.ComboboxProvider>\n\t);\n}\n\nexport default function SearchWidget( props: SearchWidgetProps ) {\n\tconst Widget = props.filter.elements.length > 10 ? ComboboxList : ListBox;\n\treturn <Widget { ...props } />;\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { RefObject } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tDropdown,\n\t__experimentalVStack as VStack,\n\t__experimentalHStack as HStack,\n\tFlexItem,\n\tSelectControl,\n\tTooltip,\n\tIcon,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useRef, createInterpolateElement } from '@wordpress/element';\nimport { closeSmall } from '@wordpress/icons';\n\nconst ENTER = 'Enter';\nconst SPACE = ' ';\n\n/**\n * Internal dependencies\n */\nimport SearchWidget from './search-widget';\nimport {\n\tOPERATORS,\n\tOPERATOR_IS,\n\tOPERATOR_IS_NOT,\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_NONE,\n\tOPERATOR_IS_ALL,\n\tOPERATOR_IS_NOT_ALL,\n} from '../../constants';\nimport type {\n\tFilter,\n\tNormalizedFilter,\n\tOperator,\n\tOption,\n\tView,\n} from '../../types';\n\ninterface FilterTextProps {\n\tactiveElements: Option[];\n\tfilterInView?: Filter;\n\tfilter: NormalizedFilter;\n}\n\ninterface OperatorSelectorProps {\n\tfilter: NormalizedFilter;\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n}\n\ninterface FilterSummaryProps extends OperatorSelectorProps {\n\taddFilterRef: RefObject< HTMLButtonElement >;\n\topenedFilter: string | null;\n}\n\nconst FilterText = ( {\n\tactiveElements,\n\tfilterInView,\n\tfilter,\n}: FilterTextProps ) => {\n\tif ( activeElements === undefined || activeElements.length === 0 ) {\n\t\treturn filter.name;\n\t}\n\n\tconst filterTextWrappers = {\n\t\tName: <span className=\"dataviews-filters__summary-filter-text-name\" />,\n\t\tValue: (\n\t\t\t<span className=\"dataviews-filters__summary-filter-text-value\" />\n\t\t),\n\t};\n\n\tif ( filterInView?.operator === OPERATOR_IS_ANY ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is any: Admin, Editor\". */\n\t\t\t\t__( '<Name>%1$s is any: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements.map( ( element ) => element.label ).join( ', ' )\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\tif ( filterInView?.operator === OPERATOR_IS_NONE ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is none: Admin, Editor\". */\n\t\t\t\t__( '<Name>%1$s is none: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements.map( ( element ) => element.label ).join( ', ' )\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\tif ( filterInView?.operator === OPERATOR_IS_ALL ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is all: Admin, Editor\". */\n\t\t\t\t__( '<Name>%1$s is all: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements.map( ( element ) => element.label ).join( ', ' )\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\tif ( filterInView?.operator === OPERATOR_IS_NOT_ALL ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is not all: Admin, Editor\". */\n\t\t\t\t__( '<Name>%1$s is not all: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements.map( ( element ) => element.label ).join( ', ' )\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\tif ( filterInView?.operator === OPERATOR_IS ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is: Admin\". */\n\t\t\t\t__( '<Name>%1$s is: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements[ 0 ].label\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\tif ( filterInView?.operator === OPERATOR_IS_NOT ) {\n\t\treturn createInterpolateElement(\n\t\t\tsprintf(\n\t\t\t\t/* translators: 1: Filter name. 3: Filter value. e.g.: \"Author is not: Admin\". */\n\t\t\t\t__( '<Name>%1$s is not: </Name><Value>%2$s</Value>' ),\n\t\t\t\tfilter.name,\n\t\t\t\tactiveElements[ 0 ].label\n\t\t\t),\n\t\t\tfilterTextWrappers\n\t\t);\n\t}\n\n\treturn sprintf(\n\t\t/* translators: 1: Filter name e.g.: \"Unknown status for Author\". */\n\t\t__( 'Unknown status for %1$s' ),\n\t\tfilter.name\n\t);\n};\n\nfunction OperatorSelector( {\n\tfilter,\n\tview,\n\tonChangeView,\n}: OperatorSelectorProps ) {\n\tconst operatorOptions = filter.operators?.map( ( operator ) => ( {\n\t\tvalue: operator,\n\t\tlabel: OPERATORS[ operator ]?.label,\n\t} ) );\n\tconst currentFilter = view.filters?.find(\n\t\t( _filter ) => _filter.field === filter.field\n\t);\n\tconst value = currentFilter?.operator || filter.operators[ 0 ];\n\treturn (\n\t\toperatorOptions.length > 1 && (\n\t\t\t<HStack\n\t\t\t\tspacing={ 2 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t\tclassName=\"dataviews-filters__summary-operators-container\"\n\t\t\t>\n\t\t\t\t<FlexItem className=\"dataviews-filters__summary-operators-filter-name\">\n\t\t\t\t\t{ filter.name }\n\t\t\t\t</FlexItem>\n\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Conditions' ) }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\toptions={ operatorOptions }\n\t\t\t\t\tonChange={ ( newValue ) => {\n\t\t\t\t\t\tconst operator = newValue as Operator;\n\t\t\t\t\t\tconst newFilters = currentFilter\n\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t...( view.filters ?? [] ).map(\n\t\t\t\t\t\t\t\t\t\t( _filter ) => {\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t_filter.field === filter.field\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t..._filter,\n\t\t\t\t\t\t\t\t\t\t\t\t\toperator,\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\treturn _filter;\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 ]\n\t\t\t\t\t\t\t: [\n\t\t\t\t\t\t\t\t\t...( view.filters ?? [] ),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfield: filter.field,\n\t\t\t\t\t\t\t\t\t\toperator,\n\t\t\t\t\t\t\t\t\t\tvalue: undefined,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t ];\n\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\t\tfilters: newFilters,\n\t\t\t\t\t\t} );\n\t\t\t\t\t} }\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\thideLabelFromVision\n\t\t\t\t/>\n\t\t\t</HStack>\n\t\t)\n\t);\n}\n\nexport default function FilterSummary( {\n\taddFilterRef,\n\topenedFilter,\n\t...commonProps\n}: FilterSummaryProps ) {\n\tconst toggleRef = useRef< HTMLDivElement >( null );\n\tconst { filter, view, onChangeView } = commonProps;\n\tconst filterInView = view.filters?.find(\n\t\t( f ) => f.field === filter.field\n\t);\n\tconst activeElements = filter.elements.filter( ( element ) => {\n\t\tif ( filter.singleSelection ) {\n\t\t\treturn element.value === filterInView?.value;\n\t\t}\n\t\treturn filterInView?.value?.includes( element.value );\n\t} );\n\tconst isPrimary = filter.isPrimary;\n\tconst hasValues = filterInView?.value !== undefined;\n\tconst canResetOrRemove = ! isPrimary || hasValues;\n\treturn (\n\t\t<Dropdown\n\t\t\tdefaultOpen={ openedFilter === filter.field }\n\t\t\tcontentClassName=\"dataviews-filters__summary-popover\"\n\t\t\tpopoverProps={ { placement: 'bottom-start', role: 'dialog' } }\n\t\t\tonClose={ () => {\n\t\t\t\ttoggleRef.current?.focus();\n\t\t\t} }\n\t\t\trenderToggle={ ( { isOpen, onToggle } ) => (\n\t\t\t\t<div className=\"dataviews-filters__summary-chip-container\">\n\t\t\t\t\t<Tooltip\n\t\t\t\t\t\ttext={ sprintf(\n\t\t\t\t\t\t\t/* translators: 1: Filter name. */\n\t\t\t\t\t\t\t__( 'Filter by: %1$s' ),\n\t\t\t\t\t\t\tfilter.name.toLowerCase()\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'dataviews-filters__summary-chip',\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t'has-reset': canResetOrRemove,\n\t\t\t\t\t\t\t\t\t'has-values': hasValues,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\t\ttabIndex={ 0 }\n\t\t\t\t\t\t\tonClick={ onToggle }\n\t\t\t\t\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\t\t\t\t\tif ( [ ENTER, SPACE ].includes( event.key ) ) {\n\t\t\t\t\t\t\t\t\tonToggle();\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taria-pressed={ isOpen }\n\t\t\t\t\t\t\taria-expanded={ isOpen }\n\t\t\t\t\t\t\tref={ toggleRef }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FilterText\n\t\t\t\t\t\t\t\tactiveElements={ activeElements }\n\t\t\t\t\t\t\t\tfilterInView={ filterInView }\n\t\t\t\t\t\t\t\tfilter={ filter }\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\t{ canResetOrRemove && (\n\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\ttext={ isPrimary ? __( 'Reset' ) : __( 'Remove' ) }\n\t\t\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'dataviews-filters__summary-chip-remove',\n\t\t\t\t\t\t\t\t\t{ 'has-values': hasValues }\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\tonChangeView( {\n\t\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\t\t\t\t\tfilters: view.filters?.filter(\n\t\t\t\t\t\t\t\t\t\t\t( _filter ) =>\n\t\t\t\t\t\t\t\t\t\t\t\t_filter.field !== filter.field\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t\t// If the filter is not primary and can be removed, it will be added\n\t\t\t\t\t\t\t\t\t// back to the available filters from `Add filter` component.\n\t\t\t\t\t\t\t\t\tif ( ! isPrimary ) {\n\t\t\t\t\t\t\t\t\t\taddFilterRef.current?.focus();\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// If is primary, focus the toggle button.\n\t\t\t\t\t\t\t\t\t\ttoggleRef.current?.focus();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon icon={ closeSmall } />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\trenderContent={ () => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 0 } justify=\"flex-start\">\n\t\t\t\t\t\t<OperatorSelector { ...commonProps } />\n\t\t\t\t\t\t<SearchWidget { ...commonProps } />\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as componentsPrivateApis,\n\tButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport type { NormalizedFilter, View } from '../../types';\n\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n} = unlock( componentsPrivateApis );\n\ninterface AddFilterProps {\n\tfilters: NormalizedFilter[];\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tsetOpenedFilter: ( filter: string | null ) => void;\n}\n\nfunction AddFilter(\n\t{ filters, view, onChangeView, setOpenedFilter }: AddFilterProps,\n\tref: Ref< HTMLButtonElement >\n) {\n\tif ( ! filters.length || filters.every( ( { isPrimary } ) => isPrimary ) ) {\n\t\treturn null;\n\t}\n\tconst inactiveFilters = filters.filter( ( filter ) => ! filter.isVisible );\n\treturn (\n\t\t<DropdownMenu\n\t\t\ttrigger={\n\t\t\t\t<Button\n\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tclassName=\"dataviews-filters__button\"\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\tdisabled={ ! inactiveFilters.length }\n\t\t\t\t\tref={ ref }\n\t\t\t\t>\n\t\t\t\t\t{ __( 'Add filter' ) }\n\t\t\t\t</Button>\n\t\t\t}\n\t\t>\n\t\t\t{ inactiveFilters.map( ( filter ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tkey={ filter.field }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetOpenedFilter( filter.field );\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t\t\t...( view.filters || [] ),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfield: filter.field,\n\t\t\t\t\t\t\t\t\t\tvalue: undefined,\n\t\t\t\t\t\t\t\t\t\toperator: filter.operators[ 0 ],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t{ filter.name }\n\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</DropdownMenu>\n\t);\n}\n\nexport default forwardRef( AddFilter );\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { NormalizedFilter, View } from '../../types';\n\ninterface ResetFilterProps {\n\tfilters: NormalizedFilter[];\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n}\n\nexport default function ResetFilter( {\n\tfilters,\n\tview,\n\tonChangeView,\n}: ResetFilterProps ) {\n\tconst isPrimary = ( field: string ) =>\n\t\tfilters.some(\n\t\t\t( _filter ) => _filter.field === field && _filter.isPrimary\n\t\t);\n\tconst isDisabled =\n\t\t! view.search &&\n\t\t! view.filters?.some(\n\t\t\t( _filter ) =>\n\t\t\t\t_filter.value !== undefined || ! isPrimary( _filter.field )\n\t\t);\n\treturn (\n\t\t<Button\n\t\t\tdisabled={ isDisabled }\n\t\t\taccessibleWhenDisabled\n\t\t\tsize=\"compact\"\n\t\t\tvariant=\"tertiary\"\n\t\t\tclassName=\"dataviews-filters__reset-button\"\n\t\t\tonClick={ () => {\n\t\t\t\tonChangeView( {\n\t\t\t\t\t...view,\n\t\t\t\t\tpage: 1,\n\t\t\t\t\tsearch: '',\n\t\t\t\t\tfilters: [],\n\t\t\t\t} );\n\t\t\t} }\n\t\t>\n\t\t\t{ __( 'Reset' ) }\n\t\t</Button>\n\t);\n}\n","/**\n * Internal dependencies\n */\nimport {\n\tALL_OPERATORS,\n\tOPERATOR_IS,\n\tOPERATOR_IS_NOT,\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_NONE,\n} from './constants';\nimport type { NormalizedField } from './types';\n\nexport function sanitizeOperators< Item >( field: NormalizedField< Item > ) {\n\tlet operators = field.filterBy?.operators;\n\n\t// Assign default values.\n\tif ( ! operators || ! Array.isArray( operators ) ) {\n\t\toperators = [ OPERATOR_IS_ANY, OPERATOR_IS_NONE ];\n\t}\n\n\t// Make sure only valid operators are used.\n\toperators = operators.filter( ( operator ) =>\n\t\tALL_OPERATORS.includes( operator )\n\t);\n\n\t// Do not allow mixing single & multiselection operators.\n\t// Remove multiselection operators if any of the single selection ones is present.\n\tif (\n\t\toperators.includes( OPERATOR_IS ) ||\n\t\toperators.includes( OPERATOR_IS_NOT )\n\t) {\n\t\toperators = operators.filter( ( operator ) =>\n\t\t\t[ OPERATOR_IS, OPERATOR_IS_NOT ].includes( operator )\n\t\t);\n\t}\n\n\treturn operators;\n}\n","/**\n * WordPress dependencies\n */\nimport { memo, useContext, useRef } from '@wordpress/element';\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport FilterSummary from './filter-summary';\nimport AddFilter from './add-filter';\nimport ResetFilters from './reset-filters';\nimport DataViewsContext from '../dataviews-context';\nimport { sanitizeOperators } from '../../utils';\nimport { ALL_OPERATORS, OPERATOR_IS, OPERATOR_IS_NOT } from '../../constants';\nimport type { NormalizedFilter } from '../../types';\n\nfunction Filters() {\n\tconst { fields, view, onChangeView, openedFilter, setOpenedFilter } =\n\t\tuseContext( DataViewsContext );\n\tconst addFilterRef = useRef< HTMLButtonElement >( null );\n\tconst filters: NormalizedFilter[] = [];\n\tfields.forEach( ( field ) => {\n\t\tif ( ! field.elements?.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst operators = sanitizeOperators( field );\n\t\tif ( operators.length === 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isPrimary = !! field.filterBy?.isPrimary;\n\t\tfilters.push( {\n\t\t\tfield: field.id,\n\t\t\tname: field.label,\n\t\t\telements: field.elements,\n\t\t\tsingleSelection: operators.some( ( op ) =>\n\t\t\t\t[ OPERATOR_IS, OPERATOR_IS_NOT ].includes( op )\n\t\t\t),\n\t\t\toperators,\n\t\t\tisVisible:\n\t\t\t\tisPrimary ||\n\t\t\t\t!! view.filters?.some(\n\t\t\t\t\t( f ) =>\n\t\t\t\t\t\tf.field === field.id &&\n\t\t\t\t\t\tALL_OPERATORS.includes( f.operator )\n\t\t\t\t),\n\t\t\tisPrimary,\n\t\t} );\n\t} );\n\t// Sort filters by primary property. We need the primary filters to be first.\n\t// Then we sort by name.\n\tfilters.sort( ( a, b ) => {\n\t\tif ( a.isPrimary && ! b.isPrimary ) {\n\t\t\treturn -1;\n\t\t}\n\t\tif ( ! a.isPrimary && b.isPrimary ) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn a.name.localeCompare( b.name );\n\t} );\n\tconst addFilter = (\n\t\t<AddFilter\n\t\t\tkey=\"add-filter\"\n\t\t\tfilters={ filters }\n\t\t\tview={ view }\n\t\t\tonChangeView={ onChangeView }\n\t\t\tref={ addFilterRef }\n\t\t\tsetOpenedFilter={ setOpenedFilter }\n\t\t/>\n\t);\n\tconst filterComponents = [\n\t\t...filters.map( ( filter ) => {\n\t\t\tif ( ! filter.isVisible ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<FilterSummary\n\t\t\t\t\tkey={ filter.field }\n\t\t\t\t\tfilter={ filter }\n\t\t\t\t\tview={ view }\n\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\taddFilterRef={ addFilterRef }\n\t\t\t\t\topenedFilter={ openedFilter }\n\t\t\t\t/>\n\t\t\t);\n\t\t} ),\n\t\taddFilter,\n\t];\n\n\tif ( filterComponents.length > 1 ) {\n\t\tfilterComponents.push(\n\t\t\t<ResetFilters\n\t\t\t\tkey=\"reset-filters\"\n\t\t\t\tfilters={ filters }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ onChangeView }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<HStack justify=\"flex-start\" style={ { width: 'fit-content' } } wrap>\n\t\t\t{ filterComponents }\n\t\t</HStack>\n\t);\n}\n\nexport default memo( Filters );\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst blockTable = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"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-2zM5 4.5h14c.3 0 .5.2.5.5v3.5h-15V5c0-.3.2-.5.5-.5zm8 5.5h6.5v3.5H13V10zm-1.5 3.5h-7V10h7v3.5zm-7 5.5v-4h7v4.5H5c-.3 0-.5-.2-.5-.5zm14.5.5h-6V15h6.5v4c0 .3-.2.5-.5.5z\" />\n\t</SVG>\n);\n\nexport default blockTable;\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 { SVG, Path } from '@wordpress/primitives';\n\nconst formatListBulletsRTL = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M4 8.8h8.9V7.2H4v1.6zm0 7h8.9v-1.5H4v1.5zM18 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z\" />\n\t</SVG>\n);\n\nexport default formatListBulletsRTL;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst formatListBullets = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M11.1 15.8H20v-1.5h-8.9v1.5zm0-8.6v1.5H20V7.2h-8.9zM6 13c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\" />\n\t</SVG>\n);\n\nexport default formatListBullets;\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { CheckboxControl } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport type { Field } from '../../types';\nimport type { SetSelection } from '../../private-types';\n\ninterface DataViewsSelectionCheckboxProps< Item > {\n\tselection: string[];\n\tonChangeSelection: SetSelection;\n\titem: Item;\n\tgetItemId: ( item: Item ) => string;\n\tprimaryField?: Field< Item >;\n\tdisabled: boolean;\n}\n\nexport default function DataViewsSelectionCheckbox< Item >( {\n\tselection,\n\tonChangeSelection,\n\titem,\n\tgetItemId,\n\tprimaryField,\n\tdisabled,\n}: DataViewsSelectionCheckboxProps< Item > ) {\n\tconst id = getItemId( item );\n\tconst checked = ! disabled && selection.includes( id );\n\tlet selectionLabel;\n\tif ( primaryField?.getValue && item ) {\n\t\t// eslint-disable-next-line @wordpress/valid-sprintf\n\t\tselectionLabel = sprintf(\n\t\t\t/* translators: %s: item title. */\n\t\t\tchecked ? __( 'Deselect item: %s' ) : __( 'Select item: %s' ),\n\t\t\tprimaryField.getValue( { item } )\n\t\t);\n\t} else {\n\t\tselectionLabel = checked\n\t\t\t? __( 'Select a new item' )\n\t\t\t: __( 'Deselect item' );\n\t}\n\treturn (\n\t\t<CheckboxControl\n\t\t\tclassName=\"dataviews-selection-checkbox\"\n\t\t\t__nextHasNoMarginBottom\n\t\t\taria-label={ selectionLabel }\n\t\t\taria-disabled={ disabled }\n\t\t\tchecked={ checked }\n\t\t\tonChange={ () => {\n\t\t\t\tif ( disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tonChangeSelection(\n\t\t\t\t\tselection.includes( id )\n\t\t\t\t\t\t? selection.filter( ( itemId ) => id !== itemId )\n\t\t\t\t\t\t: [ ...selection, id ]\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 funnel = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M10 17.5H14V16H10V17.5ZM6 6V7.5H18V6H6ZM8 12.5H16V11H8V12.5Z\" />\n\t</SVG>\n);\n\nexport default funnel;\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 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z\" />\n\t</SVG>\n);\n\nexport default arrowLeft;\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.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z\" />\n\t</SVG>\n);\n\nexport default arrowRight;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst unseen = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M4.67 10.664s-2.09 1.11-2.917 1.582l.494.87 1.608-.914.002.002c.343.502.86 1.17 1.563 1.84.348.33.742.663 1.185.976L5.57 16.744l.858.515 1.02-1.701a9.1 9.1 0 0 0 4.051 1.18V19h1v-2.263a9.1 9.1 0 0 0 4.05-1.18l1.021 1.7.858-.514-1.034-1.723c.442-.313.837-.646 1.184-.977.703-.669 1.22-1.337 1.563-1.839l.002-.003 1.61.914.493-.87c-1.75-.994-2.918-1.58-2.918-1.58l-.003.005a8.29 8.29 0 0 1-.422.689 10.097 10.097 0 0 1-1.36 1.598c-1.218 1.16-3.042 2.293-5.544 2.293-2.503 0-4.327-1.132-5.546-2.293a10.099 10.099 0 0 1-1.359-1.599 8.267 8.267 0 0 1-.422-.689l-.003-.005Z\" />\n\t</SVG>\n);\n\nexport default unseen;\n","/**\n * External dependencies\n */\nimport type { ReactNode, Ref, PropsWithoutRef, RefAttributes } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { arrowLeft, arrowRight, unseen, funnel } from '@wordpress/icons';\nimport {\n\tButton,\n\tIcon,\n\tprivateApis as componentsPrivateApis,\n} from '@wordpress/components';\nimport { forwardRef, Children, Fragment } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { sanitizeOperators } from '../../utils';\nimport { SORTING_DIRECTIONS, sortArrows, sortLabels } from '../../constants';\nimport type {\n\tNormalizedField,\n\tSortDirection,\n\tViewTable as ViewTableType,\n} from '../../types';\n\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuGroupV2: DropdownMenuGroup,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuRadioItemV2: DropdownMenuRadioItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n\tDropdownMenuSeparatorV2: DropdownMenuSeparator,\n} = unlock( componentsPrivateApis );\n\ninterface HeaderMenuProps< Item > {\n\tfieldId: string;\n\tview: ViewTableType;\n\tfields: NormalizedField< Item >[];\n\tonChangeView: ( view: ViewTableType ) => void;\n\tonHide: ( field: NormalizedField< Item > ) => void;\n\tsetOpenedFilter: ( fieldId: string ) => void;\n}\n\nfunction WithDropDownMenuSeparators( { children }: { children: ReactNode } ) {\n\treturn Children.toArray( children )\n\t\t.filter( Boolean )\n\t\t.map( ( child, i ) => (\n\t\t\t<Fragment key={ i }>\n\t\t\t\t{ i > 0 && <DropdownMenuSeparator /> }\n\t\t\t\t{ child }\n\t\t\t</Fragment>\n\t\t) );\n}\n\nconst _HeaderMenu = forwardRef( function HeaderMenu< Item >(\n\t{\n\t\tfieldId,\n\t\tview,\n\t\tfields,\n\t\tonChangeView,\n\t\tonHide,\n\t\tsetOpenedFilter,\n\t}: HeaderMenuProps< Item >,\n\tref: Ref< HTMLButtonElement >\n) {\n\tconst combinedField = view.layout?.combinedFields?.find(\n\t\t( f ) => f.id === fieldId\n\t);\n\tconst index = view.fields?.indexOf( fieldId ) as number;\n\tif ( !! combinedField ) {\n\t\treturn combinedField.label;\n\t}\n\tconst field = fields.find( ( f ) => f.id === fieldId );\n\tif ( ! field ) {\n\t\treturn null;\n\t}\n\tconst isHidable = field.enableHiding !== false;\n\tconst isSortable = field.enableSorting !== false;\n\tconst isSorted = view.sort?.field === field.id;\n\tconst operators = sanitizeOperators( field );\n\t// Filter can be added:\n\t// 1. If the field is not already part of a view's filters.\n\t// 2. If the field meets the type and operator requirements.\n\t// 3. If it's not primary. If it is, it should be already visible.\n\tconst canAddFilter =\n\t\t! view.filters?.some( ( _filter ) => field.id === _filter.field ) &&\n\t\t!! field.elements?.length &&\n\t\t!! operators.length &&\n\t\t! field.filterBy?.isPrimary;\n\tif ( ! isSortable && ! isHidable && ! canAddFilter ) {\n\t\treturn field.label;\n\t}\n\treturn (\n\t\t<DropdownMenu\n\t\t\talign=\"start\"\n\t\t\ttrigger={\n\t\t\t\t<Button\n\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\tclassName=\"dataviews-view-table-header-button\"\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t>\n\t\t\t\t\t{ field.label }\n\t\t\t\t\t{ view.sort && isSorted && (\n\t\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t\t{ sortArrows[ view.sort.direction ] }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t}\n\t\t\tstyle={ { minWidth: '240px' } }\n\t\t>\n\t\t\t<WithDropDownMenuSeparators>\n\t\t\t\t{ isSortable && (\n\t\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t\t{ SORTING_DIRECTIONS.map(\n\t\t\t\t\t\t\t( direction: SortDirection ) => {\n\t\t\t\t\t\t\t\tconst isChecked =\n\t\t\t\t\t\t\t\t\tview.sort &&\n\t\t\t\t\t\t\t\t\tisSorted &&\n\t\t\t\t\t\t\t\t\tview.sort.direction === direction;\n\n\t\t\t\t\t\t\t\tconst value = `${ field.id }-${ direction }`;\n\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<DropdownMenuRadioItem\n\t\t\t\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\t\t\t\t// All sorting radio items share the same name, so that\n\t\t\t\t\t\t\t\t\t\t// selecting a sorting option automatically deselects the\n\t\t\t\t\t\t\t\t\t\t// previously selected one, even if it is displayed in\n\t\t\t\t\t\t\t\t\t\t// another submenu. The field and direction are passed via\n\t\t\t\t\t\t\t\t\t\t// the `value` prop.\n\t\t\t\t\t\t\t\t\t\tname=\"view-table-sorting\"\n\t\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\t\tchecked={ isChecked }\n\t\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\t\t\t\tsort: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tfield: field.id,\n\t\t\t\t\t\t\t\t\t\t\t\t\tdirection,\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\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t\t{ sortLabels[ direction ] }\n\t\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t</DropdownMenuRadioItem>\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</DropdownMenuGroup>\n\t\t\t\t) }\n\t\t\t\t{ canAddFilter && (\n\t\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tprefix={ <Icon icon={ funnel } /> }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetOpenedFilter( field.id );\n\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\tpage: 1,\n\t\t\t\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t\t\t\t...( view.filters || [] ),\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tfield: field.id,\n\t\t\t\t\t\t\t\t\t\t\tvalue: undefined,\n\t\t\t\t\t\t\t\t\t\t\toperator: operators[ 0 ],\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\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t{ __( 'Add filter' ) }\n\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t</DropdownMenuGroup>\n\t\t\t\t) }\n\t\t\t\t<DropdownMenuGroup>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tprefix={ <Icon icon={ arrowLeft } /> }\n\t\t\t\t\t\tdisabled={ index < 1 }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( ! view.fields || index < 1 ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\tfields: [\n\t\t\t\t\t\t\t\t\t...( view.fields.slice( 0, index - 1 ) ??\n\t\t\t\t\t\t\t\t\t\t[] ),\n\t\t\t\t\t\t\t\t\tfield.id,\n\t\t\t\t\t\t\t\t\tview.fields[ index - 1 ],\n\t\t\t\t\t\t\t\t\t...view.fields.slice( index + 1 ),\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<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t{ __( 'Move left' ) }\n\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\tprefix={ <Icon icon={ arrowRight } /> }\n\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t! view.fields || index >= view.fields.length - 1\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t! view.fields ||\n\t\t\t\t\t\t\t\tindex >= view.fields.length - 1\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\tfields: [\n\t\t\t\t\t\t\t\t\t...( view.fields.slice( 0, index ) ?? [] ),\n\t\t\t\t\t\t\t\t\tview.fields[ index + 1 ],\n\t\t\t\t\t\t\t\t\tfield.id,\n\t\t\t\t\t\t\t\t\t...view.fields.slice( index + 2 ),\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t{ __( 'Move right' ) }\n\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t{ isHidable && (\n\t\t\t\t\t\t<DropdownMenuItem\n\t\t\t\t\t\t\tprefix={ <Icon icon={ unseen } /> }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst viewFields =\n\t\t\t\t\t\t\t\t\tview.fields || fields.map( ( f ) => f.id );\n\t\t\t\t\t\t\t\tonHide( field );\n\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\tfields: viewFields.filter(\n\t\t\t\t\t\t\t\t\t\t( id ) => id !== field.id\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\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t{ __( 'Hide' ) }\n\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenuGroup>\n\t\t\t</WithDropDownMenuSeparators>\n\t\t</DropdownMenu>\n\t);\n} );\n\n// @ts-expect-error Lift the `Item` type argument through the forwardRef.\nconst ColumnHeaderMenu: < Item >(\n\tprops: PropsWithoutRef< HeaderMenuProps< Item > > &\n\t\tRefAttributes< HTMLButtonElement >\n) => ReturnType< typeof _HeaderMenu > = _HeaderMenu;\n\nexport default ColumnHeaderMenu;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport {\n\tCheckboxControl,\n\tSpinner,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport {\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n\tuseMemo,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SingleSelectionCheckbox from '../../components/dataviews-selection-checkbox';\nimport ItemActions from '../../components/dataviews-item-actions';\nimport { sortValues } from '../../constants';\nimport {\n\tuseSomeItemHasAPossibleBulkAction,\n\tuseHasAPossibleBulkAction,\n} from '../../components/dataviews-bulk-actions';\nimport type {\n\tAction,\n\tNormalizedField,\n\tViewTable as ViewTableType,\n\tViewTableProps,\n\tCombinedField,\n} from '../../types';\nimport type { SetSelection } from '../../private-types';\nimport ColumnHeaderMenu from './column-header-menu';\n\ninterface BulkSelectionCheckboxProps< Item > {\n\tselection: string[];\n\tonChangeSelection: SetSelection;\n\tdata: Item[];\n\tactions: Action< Item >[];\n\tgetItemId: ( item: Item ) => string;\n}\n\ninterface TableColumnFieldProps< Item > {\n\tprimaryField?: NormalizedField< Item >;\n\tfield: NormalizedField< Item >;\n\titem: Item;\n}\n\ninterface TableColumnCombinedProps< Item > {\n\tprimaryField?: NormalizedField< Item >;\n\tfields: NormalizedField< Item >[];\n\tfield: CombinedField;\n\titem: Item;\n\tview: ViewTableType;\n}\n\ninterface TableColumnProps< Item > {\n\tprimaryField?: NormalizedField< Item >;\n\tfields: NormalizedField< Item >[];\n\titem: Item;\n\tcolumn: string;\n\tview: ViewTableType;\n}\n\ninterface TableRowProps< Item > {\n\thasBulkActions: boolean;\n\titem: Item;\n\tactions: Action< Item >[];\n\tfields: NormalizedField< Item >[];\n\tid: string;\n\tview: ViewTableType;\n\tprimaryField?: NormalizedField< Item >;\n\tselection: string[];\n\tgetItemId: ( item: Item ) => string;\n\tonChangeSelection: SetSelection;\n}\n\nfunction BulkSelectionCheckbox< Item >( {\n\tselection,\n\tonChangeSelection,\n\tdata,\n\tactions,\n\tgetItemId,\n}: BulkSelectionCheckboxProps< Item > ) {\n\tconst selectableItems = useMemo( () => {\n\t\treturn data.filter( ( item ) => {\n\t\t\treturn actions.some(\n\t\t\t\t( action ) =>\n\t\t\t\t\taction.supportsBulk &&\n\t\t\t\t\t( ! action.isEligible || action.isEligible( item ) )\n\t\t\t);\n\t\t} );\n\t}, [ data, actions ] );\n\tconst selectedItems = data.filter(\n\t\t( item ) =>\n\t\t\tselection.includes( getItemId( item ) ) &&\n\t\t\tselectableItems.includes( item )\n\t);\n\tconst areAllSelected = selectedItems.length === selectableItems.length;\n\treturn (\n\t\t<CheckboxControl\n\t\t\tclassName=\"dataviews-view-table-selection-checkbox\"\n\t\t\t__nextHasNoMarginBottom\n\t\t\tchecked={ areAllSelected }\n\t\t\tindeterminate={ ! areAllSelected && !! selectedItems.length }\n\t\t\tonChange={ () => {\n\t\t\t\tif ( areAllSelected ) {\n\t\t\t\t\tonChangeSelection( [] );\n\t\t\t\t} else {\n\t\t\t\t\tonChangeSelection(\n\t\t\t\t\t\tselectableItems.map( ( item ) => getItemId( item ) )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} }\n\t\t\taria-label={\n\t\t\t\tareAllSelected ? __( 'Deselect all' ) : __( 'Select all' )\n\t\t\t}\n\t\t/>\n\t);\n}\n\nfunction TableColumn< Item >( {\n\tcolumn,\n\tfields,\n\tview,\n\t...props\n}: TableColumnProps< Item > ) {\n\tconst field = fields.find( ( f ) => f.id === column );\n\tif ( !! field ) {\n\t\treturn <TableColumnField { ...props } field={ field } />;\n\t}\n\tconst combinedField = view.layout?.combinedFields?.find(\n\t\t( f ) => f.id === column\n\t);\n\tif ( !! combinedField ) {\n\t\treturn (\n\t\t\t<TableColumnCombined\n\t\t\t\t{ ...props }\n\t\t\t\tfields={ fields }\n\t\t\t\tview={ view }\n\t\t\t\tfield={ combinedField }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn null;\n}\n\nfunction TableColumnField< Item >( {\n\tprimaryField,\n\titem,\n\tfield,\n}: TableColumnFieldProps< Item > ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ clsx( 'dataviews-view-table__cell-content-wrapper', {\n\t\t\t\t'dataviews-view-table__primary-field':\n\t\t\t\t\tprimaryField?.id === field.id,\n\t\t\t} ) }\n\t\t>\n\t\t\t<field.render { ...{ item } } />\n\t\t</div>\n\t);\n}\n\nfunction TableColumnCombined< Item >( {\n\tfield,\n\t...props\n}: TableColumnCombinedProps< Item > ) {\n\tconst children = field.children.map( ( child ) => (\n\t\t<TableColumn key={ child } { ...props } column={ child } />\n\t) );\n\n\tif ( field.direction === 'horizontal' ) {\n\t\treturn <HStack spacing={ 3 }>{ children }</HStack>;\n\t}\n\treturn <VStack spacing={ 0 }>{ children }</VStack>;\n}\n\nfunction TableRow< Item >( {\n\thasBulkActions,\n\titem,\n\tactions,\n\tfields,\n\tid,\n\tview,\n\tprimaryField,\n\tselection,\n\tgetItemId,\n\tonChangeSelection,\n}: TableRowProps< Item > ) {\n\tconst hasPossibleBulkAction = useHasAPossibleBulkAction( actions, item );\n\tconst isSelected = hasPossibleBulkAction && selection.includes( id );\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\n\tconst handleMouseEnter = () => {\n\t\tsetIsHovered( true );\n\t};\n\tconst handleMouseLeave = () => {\n\t\tsetIsHovered( false );\n\t};\n\n\t// Will be set to true if `onTouchStart` fires. This happens before\n\t// `onClick` and can be used to exclude touchscreen devices from certain\n\t// behaviours.\n\tconst isTouchDevice = useRef( false );\n\tconst columns = view.fields || fields.map( ( f ) => f.id );\n\n\treturn (\n\t\t<tr\n\t\t\tclassName={ clsx( 'dataviews-view-table__row', {\n\t\t\t\t'is-selected': hasPossibleBulkAction && isSelected,\n\t\t\t\t'is-hovered': isHovered,\n\t\t\t\t'has-bulk-actions': hasPossibleBulkAction,\n\t\t\t} ) }\n\t\t\tonMouseEnter={ handleMouseEnter }\n\t\t\tonMouseLeave={ handleMouseLeave }\n\t\t\tonTouchStart={ () => {\n\t\t\t\tisTouchDevice.current = true;\n\t\t\t} }\n\t\t\tonClick={ () => {\n\t\t\t\tif ( ! hasPossibleBulkAction ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\t! isTouchDevice.current &&\n\t\t\t\t\tdocument.getSelection()?.type !== 'Range'\n\t\t\t\t) {\n\t\t\t\t\tonChangeSelection(\n\t\t\t\t\t\tselection.includes( id )\n\t\t\t\t\t\t\t? selection.filter( ( itemId ) => id !== itemId )\n\t\t\t\t\t\t\t: [ id ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t{ hasBulkActions && (\n\t\t\t\t<td\n\t\t\t\t\tclassName=\"dataviews-view-table__checkbox-column\"\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\twidth: '1%',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<div className=\"dataviews-view-table__cell-content-wrapper\">\n\t\t\t\t\t\t<SingleSelectionCheckbox\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\t\t\tgetItemId={ getItemId }\n\t\t\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\t\t\tdisabled={ ! hasPossibleBulkAction }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t) }\n\t\t\t{ columns.map( ( column: string ) => {\n\t\t\t\t// Explicits picks the supported styles.\n\t\t\t\tconst { width, maxWidth, minWidth } =\n\t\t\t\t\tview.layout?.styles?.[ column ] ?? {};\n\n\t\t\t\treturn (\n\t\t\t\t\t<td key={ column } style={ { width, maxWidth, minWidth } }>\n\t\t\t\t\t\t<TableColumn\n\t\t\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\tcolumn={ column }\n\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</td>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t\t{ !! actions?.length && (\n\t\t\t\t// Disable reason: we are not making the element interactive,\n\t\t\t\t// but preventing any click events from bubbling up to the\n\t\t\t\t// table row. This allows us to add a click handler to the row\n\t\t\t\t// itself (to toggle row selection) without erroneously\n\t\t\t\t// intercepting click events from ItemActions.\n\n\t\t\t\t/* eslint-disable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t\t<td\n\t\t\t\t\tclassName=\"dataviews-view-table__actions-column\"\n\t\t\t\t\tonClick={ ( e ) => e.stopPropagation() }\n\t\t\t\t>\n\t\t\t\t\t<ItemActions item={ item } actions={ actions } />\n\t\t\t\t</td>\n\t\t\t\t/* eslint-enable jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events */\n\t\t\t) }\n\t\t</tr>\n\t);\n}\n\nfunction ViewTable< Item >( {\n\tactions,\n\tdata,\n\tfields,\n\tgetItemId,\n\tisLoading = false,\n\tonChangeView,\n\tonChangeSelection,\n\tselection,\n\tsetOpenedFilter,\n\tview,\n}: ViewTableProps< Item > ) {\n\tconst headerMenuRefs = useRef<\n\t\tMap< string, { node: HTMLButtonElement; fallback: string } >\n\t>( new Map() );\n\tconst headerMenuToFocusRef = useRef< HTMLButtonElement >();\n\tconst [ nextHeaderMenuToFocus, setNextHeaderMenuToFocus ] =\n\t\tuseState< HTMLButtonElement >();\n\tconst hasBulkActions = useSomeItemHasAPossibleBulkAction( actions, data );\n\n\tuseEffect( () => {\n\t\tif ( headerMenuToFocusRef.current ) {\n\t\t\theaderMenuToFocusRef.current.focus();\n\t\t\theaderMenuToFocusRef.current = undefined;\n\t\t}\n\t} );\n\n\tconst tableNoticeId = useId();\n\n\tif ( nextHeaderMenuToFocus ) {\n\t\t// If we need to force focus, we short-circuit rendering here\n\t\t// to prevent any additional work while we handle that.\n\t\t// Clearing out the focus directive is necessary to make sure\n\t\t// future renders don't cause unexpected focus jumps.\n\t\theaderMenuToFocusRef.current = nextHeaderMenuToFocus;\n\t\tsetNextHeaderMenuToFocus( undefined );\n\t\treturn;\n\t}\n\n\tconst onHide = ( field: NormalizedField< Item > ) => {\n\t\tconst hidden = headerMenuRefs.current.get( field.id );\n\t\tconst fallback = hidden\n\t\t\t? headerMenuRefs.current.get( hidden.fallback )\n\t\t\t: undefined;\n\t\tsetNextHeaderMenuToFocus( fallback?.node );\n\t};\n\n\tconst columns = view.fields || fields.map( ( f ) => f.id );\n\tconst hasData = !! data?.length;\n\n\tconst primaryField = fields.find(\n\t\t( field ) => field.id === view.layout?.primaryField\n\t);\n\n\treturn (\n\t\t<>\n\t\t\t<table\n\t\t\t\tclassName=\"dataviews-view-table\"\n\t\t\t\taria-busy={ isLoading }\n\t\t\t\taria-describedby={ tableNoticeId }\n\t\t\t>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr className=\"dataviews-view-table__row\">\n\t\t\t\t\t\t{ hasBulkActions && (\n\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\tclassName=\"dataviews-view-table__checkbox-column\"\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\twidth: '1%',\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\tscope=\"col\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<BulkSelectionCheckbox\n\t\t\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\t\t\t\t\tdata={ data }\n\t\t\t\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\t\t\t\tgetItemId={ getItemId }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ columns.map( ( column, index ) => {\n\t\t\t\t\t\t\t// Explicits picks the supported styles.\n\t\t\t\t\t\t\tconst { width, maxWidth, minWidth } =\n\t\t\t\t\t\t\t\tview.layout?.styles?.[ column ] ?? {};\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\t\tkey={ column }\n\t\t\t\t\t\t\t\t\tstyle={ { width, maxWidth, minWidth } }\n\t\t\t\t\t\t\t\t\taria-sort={\n\t\t\t\t\t\t\t\t\t\tview.sort?.field === column\n\t\t\t\t\t\t\t\t\t\t\t? sortValues[ view.sort.direction ]\n\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\tscope=\"col\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<ColumnHeaderMenu\n\t\t\t\t\t\t\t\t\t\tref={ ( node ) => {\n\t\t\t\t\t\t\t\t\t\t\tif ( node ) {\n\t\t\t\t\t\t\t\t\t\t\t\theaderMenuRefs.current.set(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn,\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\tnode,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfallback:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolumns[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindex > 0\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? index - 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\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} else {\n\t\t\t\t\t\t\t\t\t\t\t\theaderMenuRefs.current.delete(\n\t\t\t\t\t\t\t\t\t\t\t\t\tcolumn\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\tfieldId={ column }\n\t\t\t\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\t\t\t\t\t\tonHide={ onHide }\n\t\t\t\t\t\t\t\t\t\tsetOpenedFilter={ setOpenedFilter }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t{ !! actions?.length && (\n\t\t\t\t\t\t\t<th className=\"dataviews-view-table__actions-column\">\n\t\t\t\t\t\t\t\t<span className=\"dataviews-view-table-header\">\n\t\t\t\t\t\t\t\t\t{ __( 'Actions' ) }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t{ hasData &&\n\t\t\t\t\t\tdata.map( ( item, index ) => (\n\t\t\t\t\t\t\t<TableRow\n\t\t\t\t\t\t\t\tkey={ getItemId( item ) }\n\t\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\t\thasBulkActions={ hasBulkActions }\n\t\t\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\t\t\tid={ getItemId( item ) || index.toString() }\n\t\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\t\tgetItemId={ getItemId }\n\t\t\t\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) ) }\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<div\n\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t'dataviews-loading': isLoading,\n\t\t\t\t\t'dataviews-no-results': ! hasData && ! isLoading,\n\t\t\t\t} ) }\n\t\t\t\tid={ tableNoticeId }\n\t\t\t>\n\t\t\t\t{ ! hasData && (\n\t\t\t\t\t<p>{ isLoading ? <Spinner /> : __( 'No results' ) }</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n}\n\nexport default ViewTable;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalGrid as Grid,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tSpinner,\n\tFlex,\n\tFlexItem,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ItemActions from '../../components/dataviews-item-actions';\nimport SingleSelectionCheckbox from '../../components/dataviews-selection-checkbox';\nimport { useHasAPossibleBulkAction } from '../../components/dataviews-bulk-actions';\nimport type { Action, NormalizedField, ViewGridProps } from '../../types';\nimport type { SetSelection } from '../../private-types';\n\ninterface GridItemProps< Item > {\n\tselection: string[];\n\tonChangeSelection: SetSelection;\n\tgetItemId: ( item: Item ) => string;\n\titem: Item;\n\tactions: Action< Item >[];\n\tmediaField?: NormalizedField< Item >;\n\tprimaryField?: NormalizedField< Item >;\n\tvisibleFields: NormalizedField< Item >[];\n\tbadgeFields: NormalizedField< Item >[];\n\tcolumnFields?: string[];\n}\n\nfunction GridItem< Item >( {\n\tselection,\n\tonChangeSelection,\n\tgetItemId,\n\titem,\n\tactions,\n\tmediaField,\n\tprimaryField,\n\tvisibleFields,\n\tbadgeFields,\n\tcolumnFields,\n}: GridItemProps< Item > ) {\n\tconst hasBulkAction = useHasAPossibleBulkAction( actions, item );\n\tconst id = getItemId( item );\n\tconst isSelected = selection.includes( id );\n\tconst renderedMediaField = mediaField?.render ? (\n\t\t<mediaField.render item={ item } />\n\t) : null;\n\tconst renderedPrimaryField = primaryField?.render ? (\n\t\t<primaryField.render item={ item } />\n\t) : null;\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 0 }\n\t\t\tkey={ id }\n\t\t\tclassName={ clsx( 'dataviews-view-grid__card', {\n\t\t\t\t'is-selected': hasBulkAction && isSelected,\n\t\t\t} ) }\n\t\t\tonClickCapture={ ( event ) => {\n\t\t\t\tif ( event.ctrlKey || event.metaKey ) {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( ! hasBulkAction ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tonChangeSelection(\n\t\t\t\t\t\tselection.includes( id )\n\t\t\t\t\t\t\t? selection.filter( ( itemId ) => id !== itemId )\n\t\t\t\t\t\t\t: [ ...selection, id ]\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"dataviews-view-grid__media\">\n\t\t\t\t{ renderedMediaField }\n\t\t\t</div>\n\t\t\t<HStack\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\tclassName=\"dataviews-view-grid__title-actions\"\n\t\t\t>\n\t\t\t\t<SingleSelectionCheckbox\n\t\t\t\t\titem={ item }\n\t\t\t\t\tselection={ selection }\n\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\tgetItemId={ getItemId }\n\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\tdisabled={ ! hasBulkAction }\n\t\t\t\t/>\n\t\t\t\t<HStack className=\"dataviews-view-grid__primary-field\">\n\t\t\t\t\t{ renderedPrimaryField }\n\t\t\t\t</HStack>\n\t\t\t\t<ItemActions item={ item } actions={ actions } isCompact />\n\t\t\t</HStack>\n\t\t\t{ !! badgeFields?.length && (\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"dataviews-view-grid__badge-fields\"\n\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\twrap\n\t\t\t\t\talignment=\"top\"\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t>\n\t\t\t\t\t{ badgeFields.map( ( field ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\t\tkey={ field.id }\n\t\t\t\t\t\t\t\tclassName=\"dataviews-view-grid__field-value\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<field.render item={ item } />\n\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</HStack>\n\t\t\t) }\n\t\t\t{ !! visibleFields?.length && (\n\t\t\t\t<VStack className=\"dataviews-view-grid__fields\" spacing={ 1 }>\n\t\t\t\t\t{ visibleFields.map( ( field ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Flex\n\t\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t\t'dataviews-view-grid__field',\n\t\t\t\t\t\t\t\t\tcolumnFields?.includes( field.id )\n\t\t\t\t\t\t\t\t\t\t? 'is-column'\n\t\t\t\t\t\t\t\t\t\t: 'is-row'\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\tkey={ field.id }\n\t\t\t\t\t\t\t\tgap={ 1 }\n\t\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t\t\texpanded\n\t\t\t\t\t\t\t\tstyle={ { height: 'auto' } }\n\t\t\t\t\t\t\t\tdirection={\n\t\t\t\t\t\t\t\t\tcolumnFields?.includes( field.id )\n\t\t\t\t\t\t\t\t\t\t? 'column'\n\t\t\t\t\t\t\t\t\t\t: 'row'\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<>\n\t\t\t\t\t\t\t\t\t<FlexItem className=\"dataviews-view-grid__field-name\">\n\t\t\t\t\t\t\t\t\t\t{ field.label }\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\t\t\t\tclassName=\"dataviews-view-grid__field-value\"\n\t\t\t\t\t\t\t\t\t\tstyle={ { maxHeight: 'none' } }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<field.render item={ item } />\n\t\t\t\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</VStack>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default function ViewGrid< Item >( {\n\tactions,\n\tdata,\n\tfields,\n\tgetItemId,\n\tisLoading,\n\tonChangeSelection,\n\tselection,\n\tview,\n\tdensity,\n}: ViewGridProps< Item > ) {\n\tconst mediaField = fields.find(\n\t\t( field ) => field.id === view.layout?.mediaField\n\t);\n\tconst primaryField = fields.find(\n\t\t( field ) => field.id === view.layout?.primaryField\n\t);\n\tconst viewFields = view.fields || fields.map( ( field ) => field.id );\n\tconst { visibleFields, badgeFields } = fields.reduce(\n\t\t( accumulator: Record< string, NormalizedField< Item >[] >, field ) => {\n\t\t\tif (\n\t\t\t\t! viewFields.includes( field.id ) ||\n\t\t\t\t[\n\t\t\t\t\tview.layout?.mediaField,\n\t\t\t\t\tview?.layout?.primaryField,\n\t\t\t\t].includes( field.id )\n\t\t\t) {\n\t\t\t\treturn accumulator;\n\t\t\t}\n\t\t\t// If the field is a badge field, add it to the badgeFields array\n\t\t\t// otherwise add it to the rest visibleFields array.\n\t\t\tconst key = view.layout?.badgeFields?.includes( field.id )\n\t\t\t\t? 'badgeFields'\n\t\t\t\t: 'visibleFields';\n\t\t\taccumulator[ key ].push( field );\n\t\t\treturn accumulator;\n\t\t},\n\t\t{ visibleFields: [], badgeFields: [] }\n\t);\n\tconst hasData = !! data?.length;\n\tconst gridStyle = density\n\t\t? { gridTemplateColumns: `repeat(${ density }, minmax(0, 1fr))` }\n\t\t: {};\n\treturn (\n\t\t<>\n\t\t\t{ hasData && (\n\t\t\t\t<Grid\n\t\t\t\t\tgap={ 8 }\n\t\t\t\t\tcolumns={ 2 }\n\t\t\t\t\talignment=\"top\"\n\t\t\t\t\tclassName=\"dataviews-view-grid\"\n\t\t\t\t\tstyle={ gridStyle }\n\t\t\t\t\taria-busy={ isLoading }\n\t\t\t\t>\n\t\t\t\t\t{ data.map( ( item ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<GridItem\n\t\t\t\t\t\t\t\tkey={ getItemId( item ) }\n\t\t\t\t\t\t\t\tselection={ selection }\n\t\t\t\t\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\t\t\t\t\tgetItemId={ getItemId }\n\t\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\t\t\tmediaField={ mediaField }\n\t\t\t\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\t\t\t\tvisibleFields={ visibleFields }\n\t\t\t\t\t\t\t\tbadgeFields={ badgeFields }\n\t\t\t\t\t\t\t\tcolumnFields={ view.layout?.columnFields }\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</Grid>\n\t\t\t) }\n\t\t\t{ ! hasData && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t\t'dataviews-loading': isLoading,\n\t\t\t\t\t\t'dataviews-no-results': ! isLoading,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<p>{ isLoading ? <Spinner /> : __( 'No results' ) }</p>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n// Import CompositeStore type, which is not exported from @wordpress/components.\n// eslint-disable-next-line no-restricted-imports\nimport type { CompositeStore } from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tprivateApis as componentsPrivateApis,\n\tSpinner,\n\tVisuallyHidden,\n} from '@wordpress/components';\nimport {\n\tuseCallback,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\nimport { useRegistry } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport {\n\tActionsDropdownMenuGroup,\n\tActionModal,\n} from '../../components/dataviews-item-actions';\nimport type { Action, NormalizedField, ViewListProps } from '../../types';\n\ninterface ListViewItemProps< Item > {\n\tactions: Action< Item >[];\n\tid?: string;\n\tisSelected: boolean;\n\titem: Item;\n\tmediaField?: NormalizedField< Item >;\n\tonSelect: ( item: Item ) => void;\n\tprimaryField?: NormalizedField< Item >;\n\tstore: CompositeStore;\n\tvisibleFields: NormalizedField< Item >[];\n}\n\nconst {\n\tuseCompositeStoreV2: useCompositeStore,\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tCompositeRowV2: CompositeRow,\n\tDropdownMenuV2: DropdownMenu,\n} = unlock( componentsPrivateApis );\n\nfunction ListItem< Item >( {\n\tactions,\n\tid,\n\tisSelected,\n\titem,\n\tmediaField,\n\tonSelect,\n\tprimaryField,\n\tstore,\n\tvisibleFields,\n}: ListViewItemProps< Item > ) {\n\tconst registry = useRegistry();\n\tconst itemRef = useRef< HTMLElement >( null );\n\tconst labelId = `${ id }-label`;\n\tconst descriptionId = `${ id }-description`;\n\n\tconst [ isHovered, setIsHovered ] = useState( false );\n\tconst handleMouseEnter = () => {\n\t\tsetIsHovered( true );\n\t};\n\tconst handleMouseLeave = () => {\n\t\tsetIsHovered( false );\n\t};\n\n\tuseEffect( () => {\n\t\tif ( isSelected ) {\n\t\t\titemRef.current?.scrollIntoView( {\n\t\t\t\tbehavior: 'auto',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tinline: 'nearest',\n\t\t\t} );\n\t\t}\n\t}, [ isSelected ] );\n\n\tconst { primaryAction, eligibleActions } = useMemo( () => {\n\t\t// If an action is eligible for all items, doesn't need\n\t\t// to provide the `isEligible` function.\n\t\tconst _eligibleActions = actions.filter(\n\t\t\t( action ) => ! action.isEligible || action.isEligible( item )\n\t\t);\n\t\tconst _primaryActions = _eligibleActions.filter(\n\t\t\t( action ) => action.isPrimary && !! action.icon\n\t\t);\n\t\treturn {\n\t\t\tprimaryAction: _primaryActions?.[ 0 ],\n\t\t\teligibleActions: _eligibleActions,\n\t\t};\n\t}, [ actions, item ] );\n\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst primaryActionLabel =\n\t\tprimaryAction &&\n\t\t( typeof primaryAction.label === 'string'\n\t\t\t? primaryAction.label\n\t\t\t: primaryAction.label( [ item ] ) );\n\n\tconst renderedMediaField = mediaField?.render ? (\n\t\t<mediaField.render item={ item } />\n\t) : (\n\t\t<div className=\"dataviews-view-list__media-placeholder\"></div>\n\t);\n\n\tconst renderedPrimaryField = primaryField?.render ? (\n\t\t<primaryField.render item={ item } />\n\t) : null;\n\n\treturn (\n\t\t<CompositeRow\n\t\t\tref={ itemRef }\n\t\t\trender={ <li /> }\n\t\t\trole=\"row\"\n\t\t\tclassName={ clsx( {\n\t\t\t\t'is-selected': isSelected,\n\t\t\t\t'is-hovered': isHovered,\n\t\t\t} ) }\n\t\t\tonMouseEnter={ handleMouseEnter }\n\t\t\tonMouseLeave={ handleMouseLeave }\n\t\t>\n\t\t\t<HStack\n\t\t\t\tclassName=\"dataviews-view-list__item-wrapper\"\n\t\t\t\talignment=\"center\"\n\t\t\t\tspacing={ 0 }\n\t\t\t>\n\t\t\t\t<div role=\"gridcell\">\n\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\tstore={ store }\n\t\t\t\t\t\trender={ <div /> }\n\t\t\t\t\t\trole=\"button\"\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\taria-pressed={ isSelected }\n\t\t\t\t\t\taria-labelledby={ labelId }\n\t\t\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t\t\tclassName=\"dataviews-view-list__item\"\n\t\t\t\t\t\tonClick={ () => onSelect( item ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<HStack\n\t\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\t\tjustify=\"start\"\n\t\t\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"dataviews-view-list__media-wrapper\">\n\t\t\t\t\t\t\t\t{ renderedMediaField }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<VStack\n\t\t\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\t\t\tclassName=\"dataviews-view-list__field-wrapper\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName=\"dataviews-view-list__primary-field\"\n\t\t\t\t\t\t\t\t\tid={ labelId }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ renderedPrimaryField }\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"dataviews-view-list__fields\"\n\t\t\t\t\t\t\t\t\tid={ descriptionId }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ visibleFields.map( ( field ) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={ field.id }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"dataviews-view-list__field\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<VisuallyHidden\n\t\t\t\t\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"dataviews-view-list__field-label\"\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{ field.label }\n\t\t\t\t\t\t\t\t\t\t\t</VisuallyHidden>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"dataviews-view-list__field-value\">\n\t\t\t\t\t\t\t\t\t\t\t\t<field.render item={ item } />\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t) ) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</VStack>\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t</CompositeItem>\n\t\t\t\t</div>\n\t\t\t\t{ eligibleActions?.length > 0 && (\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\t\tjustify=\"flex-end\"\n\t\t\t\t\t\tclassName=\"dataviews-view-list__item-actions\"\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tflexShrink: '0',\n\t\t\t\t\t\t\twidth: 'auto',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ primaryAction && 'RenderModal' in primaryAction && (\n\t\t\t\t\t\t\t<div role=\"gridcell\">\n\t\t\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\t\t\tstore={ store }\n\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tlabel={ primaryActionLabel }\n\t\t\t\t\t\t\t\t\t\t\ticon={ primaryAction.icon }\n\t\t\t\t\t\t\t\t\t\t\tisDestructive={\n\t\t\t\t\t\t\t\t\t\t\t\tprimaryAction.isDestructive\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetIsModalOpen( true )\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\t\t{ isModalOpen && (\n\t\t\t\t\t\t\t\t\t\t<ActionModal< Item >\n\t\t\t\t\t\t\t\t\t\t\taction={ primaryAction }\n\t\t\t\t\t\t\t\t\t\t\titems={ [ item ] }\n\t\t\t\t\t\t\t\t\t\t\tcloseModal={ () =>\n\t\t\t\t\t\t\t\t\t\t\t\tsetIsModalOpen( false )\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</CompositeItem>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ primaryAction &&\n\t\t\t\t\t\t\t! ( 'RenderModal' in primaryAction ) && (\n\t\t\t\t\t\t\t\t<div role=\"gridcell\" key={ primaryAction.id }>\n\t\t\t\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\t\t\t\tstore={ store }\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ primaryActionLabel }\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ primaryAction.icon }\n\t\t\t\t\t\t\t\t\t\t\t\tisDestructive={\n\t\t\t\t\t\t\t\t\t\t\t\t\tprimaryAction.isDestructive\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\tsize=\"small\"\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\tprimaryAction.callback(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[ item ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{ registry }\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/>\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<div role=\"gridcell\">\n\t\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t\t\t<CompositeItem\n\t\t\t\t\t\t\t\t\t\tstore={ store }\n\t\t\t\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\t\t\t\t\t\tdisabled={ ! actions.length }\n\t\t\t\t\t\t\t\t\t\t\t\tonKeyDown={ ( event: {\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey: string;\n\t\t\t\t\t\t\t\t\t\t\t\t\tpreventDefault: () => void;\n\t\t\t\t\t\t\t\t\t\t\t\t} ) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.key ===\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ArrowDown'\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// Prevent the default behaviour (open dropdown menu) and go down.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstore.move(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstore.down()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.key === 'ArrowUp'\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// Prevent the default behavior (open dropdown menu) and go up.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstore.move(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstore.up()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tplacement=\"bottom-end\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<ActionsDropdownMenuGroup\n\t\t\t\t\t\t\t\t\tactions={ eligibleActions }\n\t\t\t\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</DropdownMenu>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</HStack>\n\t\t\t\t) }\n\t\t\t</HStack>\n\t\t</CompositeRow>\n\t);\n}\n\nexport default function ViewList< Item >( props: ViewListProps< Item > ) {\n\tconst {\n\t\tactions,\n\t\tdata,\n\t\tfields,\n\t\tgetItemId,\n\t\tisLoading,\n\t\tonChangeSelection,\n\t\tselection,\n\t\tview,\n\t} = props;\n\tconst baseId = useInstanceId( ViewList, 'view-list' );\n\tconst selectedItem = data?.findLast( ( item ) =>\n\t\tselection.includes( getItemId( item ) )\n\t);\n\n\tconst mediaField = fields.find(\n\t\t( field ) => field.id === view.layout?.mediaField\n\t);\n\tconst primaryField = fields.find(\n\t\t( field ) => field.id === view.layout?.primaryField\n\t);\n\tconst viewFields = view.fields || fields.map( ( field ) => field.id );\n\tconst visibleFields = fields.filter(\n\t\t( field ) =>\n\t\t\tviewFields.includes( field.id ) &&\n\t\t\t! [ view.layout?.primaryField, view.layout?.mediaField ].includes(\n\t\t\t\tfield.id\n\t\t\t)\n\t);\n\n\tconst onSelect = ( item: Item ) =>\n\t\tonChangeSelection( [ getItemId( item ) ] );\n\n\tconst getItemDomId = useCallback(\n\t\t( item?: Item ) =>\n\t\t\titem ? `${ baseId }-${ getItemId( item ) }` : undefined,\n\t\t[ baseId, getItemId ]\n\t);\n\n\tconst store = useCompositeStore( {\n\t\tdefaultActiveId: getItemDomId( selectedItem ),\n\t} );\n\n\t// Manage focused item, when the active one is removed from the list.\n\tconst isActiveIdInList = store.useState(\n\t\t( state: { items: any[]; activeId: any } ) =>\n\t\t\tstate.items.some(\n\t\t\t\t( item: { id: any } ) => item.id === state.activeId\n\t\t\t)\n\t);\n\tuseEffect( () => {\n\t\tif ( ! isActiveIdInList ) {\n\t\t\t// Prefer going down, except if there is no item below (last item), then go up (last item in list).\n\t\t\tif ( store.down() ) {\n\t\t\t\tstore.move( store.down() );\n\t\t\t} else if ( store.up() ) {\n\t\t\t\tstore.move( store.up() );\n\t\t\t}\n\t\t}\n\t}, [ isActiveIdInList ] );\n\n\tconst hasData = data?.length;\n\tif ( ! hasData ) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={ clsx( {\n\t\t\t\t\t'dataviews-loading': isLoading,\n\t\t\t\t\t'dataviews-no-results': ! hasData && ! isLoading,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ ! hasData && (\n\t\t\t\t\t<p>{ isLoading ? <Spinner /> : __( 'No results' ) }</p>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<Composite\n\t\t\tid={ baseId }\n\t\t\trender={ <ul /> }\n\t\t\tclassName=\"dataviews-view-list\"\n\t\t\trole=\"grid\"\n\t\t\tstore={ store }\n\t\t>\n\t\t\t{ data.map( ( item ) => {\n\t\t\t\tconst id = getItemDomId( item );\n\t\t\t\treturn (\n\t\t\t\t\t<ListItem\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\tid={ id }\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t\titem={ item }\n\t\t\t\t\t\tisSelected={ item === selectedItem }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\tmediaField={ mediaField }\n\t\t\t\t\t\tprimaryField={ primaryField }\n\t\t\t\t\t\tstore={ store }\n\t\t\t\t\t\tvisibleFields={ visibleFields }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</Composite>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport {\n\tblockTable,\n\tcategory,\n\tformatListBullets,\n\tformatListBulletsRTL,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport ViewTable from './table';\nimport ViewGrid from './grid';\nimport ViewList from './list';\nimport { LAYOUT_GRID, LAYOUT_LIST, LAYOUT_TABLE } from '../constants';\nimport type { View } from '../types';\n\nexport const VIEW_LAYOUTS = [\n\t{\n\t\ttype: LAYOUT_TABLE,\n\t\tlabel: __( 'Table' ),\n\t\tcomponent: ViewTable,\n\t\ticon: blockTable,\n\t},\n\t{\n\t\ttype: LAYOUT_GRID,\n\t\tlabel: __( 'Grid' ),\n\t\tcomponent: ViewGrid,\n\t\ticon: category,\n\t},\n\t{\n\t\ttype: LAYOUT_LIST,\n\t\tlabel: __( 'List' ),\n\t\tcomponent: ViewList,\n\t\ticon: isRTL() ? formatListBulletsRTL : formatListBullets,\n\t},\n];\n\nexport function getMandatoryFields( view: View ): string[] {\n\tif ( view.type === 'table' ) {\n\t\treturn [ view.layout?.primaryField ]\n\t\t\t.concat(\n\t\t\t\tview.layout?.combinedFields?.flatMap(\n\t\t\t\t\t( field ) => field.children\n\t\t\t\t) ?? []\n\t\t\t)\n\t\t\t.filter( ( item ): item is string => !! item );\n\t}\n\n\tif ( view.type === 'grid' ) {\n\t\treturn [ view.layout?.primaryField, view.layout?.mediaField ].filter(\n\t\t\t( item ): item is string => !! item\n\t\t);\n\t}\n\n\tif ( view.type === 'list' ) {\n\t\treturn [ view.layout?.primaryField, view.layout?.mediaField ].filter(\n\t\t\t( item ): item is string => !! item\n\t\t);\n\t}\n\n\treturn [];\n}\n","/**\n * External dependencies\n */\nimport type { ComponentType } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\nimport { VIEW_LAYOUTS } from '../../layouts';\nimport type { ViewBaseProps } from '../../types';\n\nexport default function DataViewsLayout() {\n\tconst {\n\t\tactions = [],\n\t\tdata,\n\t\tfields,\n\t\tgetItemId,\n\t\tisLoading,\n\t\tview,\n\t\tonChangeView,\n\t\tselection,\n\t\tonChangeSelection,\n\t\tsetOpenedFilter,\n\t\tdensity,\n\t} = useContext( DataViewsContext );\n\n\tconst ViewComponent = VIEW_LAYOUTS.find( ( v ) => v.type === view.type )\n\t\t?.component as ComponentType< ViewBaseProps< any > >;\n\n\treturn (\n\t\t<ViewComponent\n\t\t\tactions={ actions }\n\t\t\tdata={ data }\n\t\t\tfields={ fields }\n\t\t\tgetItemId={ getItemId }\n\t\t\tisLoading={ isLoading }\n\t\t\tonChangeView={ onChangeView }\n\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\tselection={ selection }\n\t\t\tsetOpenedFilter={ setOpenedFilter }\n\t\t\tview={ view }\n\t\t\tdensity={ density }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\t__experimentalHStack as HStack,\n\tSelectControl,\n} from '@wordpress/components';\nimport { createInterpolateElement, memo, useContext } from '@wordpress/element';\nimport { sprintf, __, _x } from '@wordpress/i18n';\nimport { next, previous } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\n\nfunction DataViewsPagination() {\n\tconst {\n\t\tview,\n\t\tonChangeView,\n\t\tpaginationInfo: { totalItems = 0, totalPages },\n\t} = useContext( DataViewsContext );\n\tif ( ! totalItems || ! totalPages ) {\n\t\treturn null;\n\t}\n\tconst currentPage = view.page ?? 1;\n\treturn (\n\t\t!! totalItems &&\n\t\ttotalPages !== 1 && (\n\t\t\t<HStack\n\t\t\t\texpanded={ false }\n\t\t\t\tspacing={ 6 }\n\t\t\t\tjustify=\"end\"\n\t\t\t\tclassName=\"dataviews-pagination\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\texpanded={ false }\n\t\t\t\t\tspacing={ 2 }\n\t\t\t\t\tclassName=\"dataviews-pagination__page-selection\"\n\t\t\t\t>\n\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t// translators: %s: Total number of pages.\n\t\t\t\t\t\t\t_x( 'Page <CurrentPageControl /> of %s', 'paging' ),\n\t\t\t\t\t\t\ttotalPages\n\t\t\t\t\t\t),\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tCurrentPageControl: (\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\taria-label={ __( 'Current page' ) }\n\t\t\t\t\t\t\t\t\tvalue={ view.page?.toString() }\n\t\t\t\t\t\t\t\t\toptions={ Array.from(\n\t\t\t\t\t\t\t\t\t\tArray( totalPages )\n\t\t\t\t\t\t\t\t\t).map( ( _, i ) => {\n\t\t\t\t\t\t\t\t\t\tconst page = i + 1;\n\t\t\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t\t\tvalue: page.toString(),\n\t\t\t\t\t\t\t\t\t\t\tlabel: page.toString(),\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\tonChange={ ( newValue ) => {\n\t\t\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\t\t\tpage: +newValue,\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\tsize=\"compact\"\n\t\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\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</HStack>\n\t\t\t\t<HStack expanded={ false } spacing={ 1 }>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\tpage: currentPage - 1,\n\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={ currentPage === 1 }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tlabel={ __( 'Previous page' ) }\n\t\t\t\t\t\ticon={ previous }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tonChangeView( { ...view, page: currentPage + 1 } )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={ currentPage >= totalPages }\n\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\tlabel={ __( 'Next page' ) }\n\t\t\t\t\t\ticon={ next }\n\t\t\t\t\t\tshowTooltip\n\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\ttooltipPosition=\"top\"\n\t\t\t\t\t/>\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t)\n\t);\n}\n\nexport default memo( DataViewsPagination );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useEffect, useRef, memo, useContext } from '@wordpress/element';\nimport { SearchControl } from '@wordpress/components';\nimport { useDebouncedInput } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport DataViewsContext from '../dataviews-context';\n\ninterface SearchProps {\n\tlabel?: string;\n}\n\nconst DataViewsSearch = memo( function Search( { label }: SearchProps ) {\n\tconst { view, onChangeView } = useContext( DataViewsContext );\n\tconst [ search, setSearch, debouncedSearch ] = useDebouncedInput(\n\t\tview.search\n\t);\n\tuseEffect( () => {\n\t\tsetSearch( view.search ?? '' );\n\t}, [ view.search, setSearch ] );\n\tconst onChangeViewRef = useRef( onChangeView );\n\tconst viewRef = useRef( view );\n\tuseEffect( () => {\n\t\tonChangeViewRef.current = onChangeView;\n\t\tviewRef.current = view;\n\t}, [ onChangeView, view ] );\n\tuseEffect( () => {\n\t\tonChangeViewRef.current( {\n\t\t\t...viewRef.current,\n\t\t\tpage: 1,\n\t\t\tsearch: debouncedSearch,\n\t\t} );\n\t}, [ debouncedSearch ] );\n\tconst searchLabel = label || __( 'Search' );\n\treturn (\n\t\t<SearchControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tonChange={ setSearch }\n\t\t\tvalue={ search }\n\t\t\tlabel={ searchLabel }\n\t\t\tplaceholder={ searchLabel }\n\t\t\tsize=\"compact\"\n\t\t/>\n\t);\n} );\n\nexport default DataViewsSearch;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst cog = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M10.289 4.836A1 1 0 0111.275 4h1.306a1 1 0 01.987.836l.244 1.466c.787.26 1.503.679 2.108 1.218l1.393-.522a1 1 0 011.216.437l.653 1.13a1 1 0 01-.23 1.273l-1.148.944a6.025 6.025 0 010 2.435l1.149.946a1 1 0 01.23 1.272l-.653 1.13a1 1 0 01-1.216.437l-1.394-.522c-.605.54-1.32.958-2.108 1.218l-.244 1.466a1 1 0 01-.987.836h-1.306a1 1 0 01-.986-.836l-.244-1.466a5.995 5.995 0 01-2.108-1.218l-1.394.522a1 1 0 01-1.217-.436l-.653-1.131a1 1 0 01.23-1.272l1.149-.946a6.026 6.026 0 010-2.435l-1.148-.944a1 1 0 01-.23-1.272l.653-1.131a1 1 0 011.217-.437l1.393.522a5.994 5.994 0 012.108-1.218l.244-1.466zM14.929 12a3 3 0 11-6 0 3 3 0 016 0z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default cog;\n","/**\n * External dependencies\n */\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalHStack as HStack,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { memo, useContext } from '@wordpress/element';\nimport { cog } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { SORTING_DIRECTIONS, sortLabels } from '../../constants';\nimport { VIEW_LAYOUTS, getMandatoryFields } from '../../layouts';\nimport type { NormalizedField, View, SupportedLayouts } from '../../types';\nimport DataViewsContext from '../dataviews-context';\n\nconst {\n\tDropdownMenuV2: DropdownMenu,\n\tDropdownMenuGroupV2: DropdownMenuGroup,\n\tDropdownMenuItemV2: DropdownMenuItem,\n\tDropdownMenuRadioItemV2: DropdownMenuRadioItem,\n\tDropdownMenuCheckboxItemV2: DropdownMenuCheckboxItem,\n\tDropdownMenuItemLabelV2: DropdownMenuItemLabel,\n} = unlock( componentsPrivateApis );\n\ninterface ViewTypeMenuProps {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tdefaultLayouts?: SupportedLayouts;\n}\n\ninterface PageSizeMenuProps {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n}\n\ninterface FieldsVisibilityMenuProps< Item > {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tfields: NormalizedField< Item >[];\n}\n\ninterface SortMenuProps< Item > {\n\tfields: NormalizedField< Item >[];\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n}\n\ninterface ViewActionsProps {\n\tdefaultLayouts?: SupportedLayouts;\n}\n\nfunction ViewTypeMenu( {\n\tview,\n\tonChangeView,\n\tdefaultLayouts = { list: {}, grid: {}, table: {} },\n}: ViewTypeMenuProps ) {\n\tconst availableLayouts = Object.keys( defaultLayouts );\n\tif ( availableLayouts.length <= 1 ) {\n\t\treturn null;\n\t}\n\treturn availableLayouts.map( ( layout ) => {\n\t\tconst config = VIEW_LAYOUTS.find( ( v ) => v.type === layout );\n\t\tif ( ! config ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn (\n\t\t\t<DropdownMenuRadioItem\n\t\t\t\tkey={ layout }\n\t\t\t\tvalue={ layout }\n\t\t\t\tname=\"view-actions-available-view\"\n\t\t\t\tchecked={ layout === view.type }\n\t\t\t\thideOnClick\n\t\t\t\tonChange={ ( e: ChangeEvent< HTMLInputElement > ) => {\n\t\t\t\t\tswitch ( e.target.value ) {\n\t\t\t\t\t\tcase 'list':\n\t\t\t\t\t\tcase 'grid':\n\t\t\t\t\t\tcase 'table':\n\t\t\t\t\t\t\treturn onChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\ttype: e.target.value,\n\t\t\t\t\t\t\t\t...defaultLayouts[ e.target.value ],\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Error( 'Invalid dataview' );\n\t\t\t\t} }\n\t\t\t>\n\t\t\t\t<DropdownMenuItemLabel>{ config.label }</DropdownMenuItemLabel>\n\t\t\t</DropdownMenuRadioItem>\n\t\t);\n\t} );\n}\n\nconst PAGE_SIZE_VALUES = [ 10, 20, 50, 100 ];\nfunction PageSizeMenu( { view, onChangeView }: PageSizeMenuProps ) {\n\treturn (\n\t\t<DropdownMenu\n\t\t\ttrigger={\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tsuffix={ <span aria-hidden=\"true\">{ view.perPage }</span> }\n\t\t\t\t>\n\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t{ __( 'Items per page' ) }\n\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t}\n\t\t>\n\t\t\t{ PAGE_SIZE_VALUES.map( ( size ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuRadioItem\n\t\t\t\t\t\tkey={ size }\n\t\t\t\t\t\tvalue={ size }\n\t\t\t\t\t\tname=\"view-actions-page-size\"\n\t\t\t\t\t\tchecked={ view.perPage === size }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t// `e.target.value` holds the same value as `size` but as a string,\n\t\t\t\t\t\t\t\t// so we use `size` directly to avoid parsing to int.\n\t\t\t\t\t\t\t\tperPage: size,\n\t\t\t\t\t\t\t\tpage: 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\t<DropdownMenuItemLabel>{ size }</DropdownMenuItemLabel>\n\t\t\t\t\t</DropdownMenuRadioItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction FieldsVisibilityMenu< Item >( {\n\tview,\n\tonChangeView,\n\tfields,\n}: FieldsVisibilityMenuProps< Item > ) {\n\tconst mandatoryFields = getMandatoryFields( view );\n\tconst hidableFields = fields.filter(\n\t\t( field ) =>\n\t\t\tfield.enableHiding !== false &&\n\t\t\t! mandatoryFields.includes( field.id )\n\t);\n\tconst viewFields = view.fields || fields.map( ( field ) => field.id );\n\tif ( ! hidableFields?.length ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<DropdownMenu\n\t\t\ttrigger={\n\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t{ __( 'Fields' ) }\n\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t}\n\t\t>\n\t\t\t{ hidableFields?.map( ( field ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenuCheckboxItem\n\t\t\t\t\t\tkey={ field.id }\n\t\t\t\t\t\tvalue={ field.id }\n\t\t\t\t\t\tchecked={ viewFields.includes( field.id ) }\n\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\tfields: viewFields.includes( field.id )\n\t\t\t\t\t\t\t\t\t? viewFields.filter(\n\t\t\t\t\t\t\t\t\t\t\t( id ) => id !== field.id\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t: [ ...viewFields, field.id ],\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<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t{ field.label }\n\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t</DropdownMenuCheckboxItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction SortMenu< Item >( {\n\tfields,\n\tview,\n\tonChangeView,\n}: SortMenuProps< Item > ) {\n\tconst sortableFields = fields.filter(\n\t\t( field ) => field.enableSorting !== false\n\t);\n\tif ( ! sortableFields?.length ) {\n\t\treturn null;\n\t}\n\tconst currentSortedField = fields.find(\n\t\t( field ) => field.id === view.sort?.field\n\t);\n\treturn (\n\t\t<DropdownMenu\n\t\t\ttrigger={\n\t\t\t\t<DropdownMenuItem\n\t\t\t\t\tsuffix={\n\t\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t\t{ currentSortedField?.label }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t{ __( 'Sort by' ) }\n\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t</DropdownMenuItem>\n\t\t\t}\n\t\t>\n\t\t\t{ sortableFields?.map( ( field ) => {\n\t\t\t\tconst sortedDirection = view.sort?.direction;\n\t\t\t\treturn (\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\tkey={ field.id }\n\t\t\t\t\t\ttrigger={\n\t\t\t\t\t\t\t<DropdownMenuItem>\n\t\t\t\t\t\t\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t{ field.label }\n\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t</DropdownMenuItem>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\tminWidth: '220px',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ SORTING_DIRECTIONS.map( ( direction ) => {\n\t\t\t\t\t\t\tconst isChecked =\n\t\t\t\t\t\t\t\tcurrentSortedField !== undefined &&\n\t\t\t\t\t\t\t\tsortedDirection === direction &&\n\t\t\t\t\t\t\t\tfield.id === currentSortedField.id;\n\n\t\t\t\t\t\t\tconst value = `${ field.id }-${ direction }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<DropdownMenuRadioItem\n\t\t\t\t\t\t\t\t\tkey={ value }\n\t\t\t\t\t\t\t\t\t// All sorting radio items share the same name, so that\n\t\t\t\t\t\t\t\t\t// selecting a sorting option automatically deselects the\n\t\t\t\t\t\t\t\t\t// previously selected one, even if it is displayed in\n\t\t\t\t\t\t\t\t\t// another submenu. The field and direction are passed via\n\t\t\t\t\t\t\t\t\t// the `value` prop.\n\t\t\t\t\t\t\t\t\tname=\"view-actions-sorting\"\n\t\t\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t\t\tchecked={ isChecked }\n\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\tonChangeView( {\n\t\t\t\t\t\t\t\t\t\t\t...view,\n\t\t\t\t\t\t\t\t\t\t\tsort: {\n\t\t\t\t\t\t\t\t\t\t\t\tfield: field.id,\n\t\t\t\t\t\t\t\t\t\t\t\tdirection,\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\t\t<DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t\t\t{ sortLabels[ direction ] }\n\t\t\t\t\t\t\t\t\t</DropdownMenuItemLabel>\n\t\t\t\t\t\t\t\t</DropdownMenuRadioItem>\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} ) }\n\t\t</DropdownMenu>\n\t);\n}\n\nfunction _DataViewsViewConfig( { defaultLayouts }: ViewActionsProps ) {\n\tconst { view, fields, onChangeView } = useContext( DataViewsContext );\n\tconst activeView = VIEW_LAYOUTS.find( ( v ) => view.type === v.type );\n\treturn (\n\t\t<>\n\t\t\t<HStack\n\t\t\t\tspacing={ 1 }\n\t\t\t\texpanded={ false }\n\t\t\t\tstyle={ { flexShrink: 0 } }\n\t\t\t>\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ttrigger={\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\ticon={ activeView?.icon }\n\t\t\t\t\t\t\tlabel={ __( 'Layout' ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<ViewTypeMenu\n\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\t\t/>\n\t\t\t\t</DropdownMenu>\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ttrigger={\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\ticon={ cog }\n\t\t\t\t\t\t\tlabel={ _x(\n\t\t\t\t\t\t\t\t'View options',\n\t\t\t\t\t\t\t\t'View is used as a noun'\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\t\t<DropdownMenuGroup>\n\t\t\t\t\t\t<SortMenu\n\t\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<FieldsVisibilityMenu\n\t\t\t\t\t\t\tfields={ fields }\n\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<PageSizeMenu\n\t\t\t\t\t\t\tview={ view }\n\t\t\t\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</DropdownMenuGroup>\n\t\t\t\t</DropdownMenu>\n\t\t\t</HStack>\n\t\t</>\n\t);\n}\n\nconst DataViewsViewConfig = memo( _DataViewsViewConfig );\n\nexport default DataViewsViewConfig;\n","/**\n * Internal dependencies\n */\nimport type { Field, NormalizedField, ItemRecord } from './types';\n\n/**\n * Apply default values and normalize the fields config.\n *\n * @param fields Fields config.\n * @return Normalized fields config.\n */\nexport function normalizeFields< Item >(\n\tfields: Field< Item >[]\n): NormalizedField< Item >[] {\n\treturn fields.map( ( field ) => {\n\t\tconst getValue =\n\t\t\tfield.getValue ||\n\t\t\t( ( { item }: { item: ItemRecord } ) => item[ field.id ] );\n\n\t\treturn {\n\t\t\t...field,\n\t\t\tlabel: field.label || field.id,\n\t\t\tgetValue,\n\t\t\trender: field.render || getValue,\n\t\t};\n\t} );\n}\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst lineSolid = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M5 11.25h14v1.5H5z\" />\n\t</SVG>\n);\n\nexport default lineSolid;\n","/**\n * WordPress dependencies\n */\nimport { RangeControl, Button } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { plus, lineSolid } from '@wordpress/icons';\nimport { useEffect } from '@wordpress/element';\n\nconst viewportBreaks = {\n\txhuge: { min: 3, max: 6, default: 5 },\n\thuge: { min: 2, max: 4, default: 4 },\n\txlarge: { min: 2, max: 3, default: 3 },\n\tlarge: { min: 1, max: 2, default: 2 },\n\tmobile: { min: 1, max: 2, default: 2 },\n};\n\nfunction useViewPortBreakpoint() {\n\tconst isXHuge = useViewportMatch( 'xhuge', '>=' );\n\tconst isHuge = useViewportMatch( 'huge', '>=' );\n\tconst isXlarge = useViewportMatch( 'xlarge', '>=' );\n\tconst isLarge = useViewportMatch( 'large', '>=' );\n\tconst isMobile = useViewportMatch( 'mobile', '>=' );\n\n\tif ( isXHuge ) {\n\t\treturn 'xhuge';\n\t}\n\tif ( isHuge ) {\n\t\treturn 'huge';\n\t}\n\tif ( isXlarge ) {\n\t\treturn 'xlarge';\n\t}\n\tif ( isLarge ) {\n\t\treturn 'large';\n\t}\n\tif ( isMobile ) {\n\t\treturn 'mobile';\n\t}\n\treturn null;\n}\n\n// Value is number from 0 to 100 representing how big an item is in the grid\n// 100 being the biggest and 0 being the smallest.\n// The size is relative to the viewport size, if one a given viewport the\n// number of allowed items in a grid is 3 to 6 a 0 ( the smallest ) will mean that the grid will\n// have 6 items in a row, a 100 ( the biggest ) will mean that the grid will have 3 items in a row.\n// A value of 75 will mean that the grid will have 4 items in a row.\nfunction getRangeValue(\n\tdensity: number,\n\tbreakValues: { min: number; max: number; default: number }\n) {\n\tconst inverseDensity = breakValues.max - density;\n\tconst max = breakValues.max - breakValues.min;\n\treturn Math.round( ( inverseDensity * 100 ) / max );\n}\n\nexport default function DensityPicker( {\n\tdensity,\n\tsetDensity,\n}: {\n\tdensity: number;\n\tsetDensity: React.Dispatch< React.SetStateAction< number > >;\n} ) {\n\tconst viewport = useViewPortBreakpoint();\n\tuseEffect( () => {\n\t\tsetDensity( ( _density ) => {\n\t\t\tif ( ! viewport || ! _density ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\tconst breakValues = viewportBreaks[ viewport ];\n\t\t\tif ( _density < breakValues.min ) {\n\t\t\t\treturn breakValues.min;\n\t\t\t}\n\t\t\tif ( _density > breakValues.max ) {\n\t\t\t\treturn breakValues.max;\n\t\t\t}\n\t\t\treturn _density;\n\t\t} );\n\t}, [ setDensity, viewport ] );\n\tif ( ! viewport ) {\n\t\treturn null;\n\t}\n\tconst breakValues = viewportBreaks[ viewport ];\n\tconst densityToUse = density || breakValues.default;\n\tconst rangeValue = getRangeValue( densityToUse, breakValues );\n\n\tconst step = 100 / ( breakValues.max - breakValues.min + 1 );\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tsize=\"compact\"\n\t\t\t\ticon={ lineSolid }\n\t\t\t\tdisabled={ rangeValue <= 0 }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tlabel={ __( 'Decrease size' ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetDensity( densityToUse + 1 );\n\t\t\t\t} }\n\t\t\t/>\n\t\t\t<RangeControl\n\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\tshowTooltip={ false }\n\t\t\t\tclassName=\"dataviews-density-picker__range-control\"\n\t\t\t\tlabel={ __( 'Item size' ) }\n\t\t\t\thideLabelFromVision\n\t\t\t\tvalue={ rangeValue }\n\t\t\t\tmin={ 0 }\n\t\t\t\tmax={ 100 }\n\t\t\t\twithInputField={ false }\n\t\t\t\tonChange={ ( value = 0 ) => {\n\t\t\t\t\tconst inverseValue = 100 - value;\n\t\t\t\t\tsetDensity(\n\t\t\t\t\t\tMath.round(\n\t\t\t\t\t\t\t( inverseValue *\n\t\t\t\t\t\t\t\t( breakValues.max - breakValues.min ) ) /\n\t\t\t\t\t\t\t\t100 +\n\t\t\t\t\t\t\t\tbreakValues.min\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t} }\n\t\t\t\tstep={ step }\n\t\t\t/>\n\t\t\t<Button\n\t\t\t\tsize=\"compact\"\n\t\t\t\ticon={ plus }\n\t\t\t\tdisabled={ rangeValue >= 100 }\n\t\t\t\taccessibleWhenDisabled\n\t\t\t\tlabel={ __( 'Increase size' ) }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetDensity( densityToUse - 1 );\n\t\t\t\t} }\n\t\t\t/>\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { default as DataViewsBulkActions } from '../dataviews-bulk-actions';\nimport DataViewsBulkActionsToolbar from '../dataviews-bulk-actions-toolbar';\nimport DataViewsContext from '../dataviews-context';\nimport DataViewsFilters from '../dataviews-filters';\nimport DataViewsLayout from '../dataviews-layout';\nimport DataviewsPagination from '../dataviews-pagination';\nimport DataViewsSearch from '../dataviews-search';\nimport DataViewsViewConfig from '../dataviews-view-config';\nimport { normalizeFields } from '../../normalize-fields';\nimport type { Action, Field, View, SupportedLayouts } from '../../types';\nimport type { SelectionOrUpdater } from '../../private-types';\nimport DensityPicker from '../../layouts/grid/density-picker';\nimport { LAYOUT_GRID } from '../../constants';\n\ntype ItemWithId = { id: string };\n\ntype DataViewsProps< Item > = {\n\tview: View;\n\tonChangeView: ( view: View ) => void;\n\tfields: Field< Item >[];\n\tsearch?: boolean;\n\tsearchLabel?: string;\n\tactions?: Action< Item >[];\n\tdata: Item[];\n\tisLoading?: boolean;\n\tpaginationInfo: {\n\t\ttotalItems: number;\n\t\ttotalPages: number;\n\t};\n\tdefaultLayouts: SupportedLayouts;\n\tselection?: string[];\n\tonChangeSelection?: ( items: string[] ) => void;\n\theader?: ReactNode;\n} & ( Item extends ItemWithId\n\t? { getItemId?: ( item: Item ) => string }\n\t: { getItemId: ( item: Item ) => string } );\n\nconst defaultGetItemId = ( item: ItemWithId ) => item.id;\n\nexport default function DataViews< Item >( {\n\tview,\n\tonChangeView,\n\tfields,\n\tsearch = true,\n\tsearchLabel = undefined,\n\tactions = [],\n\tdata,\n\tgetItemId = defaultGetItemId,\n\tisLoading = false,\n\tpaginationInfo,\n\tdefaultLayouts,\n\tselection: selectionProperty,\n\tonChangeSelection,\n\theader,\n}: DataViewsProps< Item > ) {\n\tconst [ selectionState, setSelectionState ] = useState< string[] >( [] );\n\tconst [ density, setDensity ] = useState< number >( 0 );\n\tconst isUncontrolled =\n\t\tselectionProperty === undefined || onChangeSelection === undefined;\n\tconst selection = isUncontrolled ? selectionState : selectionProperty;\n\tconst [ openedFilter, setOpenedFilter ] = useState< string | null >( null );\n\tfunction setSelectionWithChange( value: SelectionOrUpdater ) {\n\t\tconst newValue =\n\t\t\ttypeof value === 'function' ? value( selection ) : value;\n\t\tif ( isUncontrolled ) {\n\t\t\tsetSelectionState( newValue );\n\t\t}\n\t\tif ( onChangeSelection ) {\n\t\t\tonChangeSelection( newValue );\n\t\t}\n\t}\n\tconst _fields = useMemo( () => normalizeFields( fields ), [ fields ] );\n\tconst _selection = useMemo( () => {\n\t\treturn selection.filter( ( id ) =>\n\t\t\tdata.some( ( item ) => getItemId( item ) === id )\n\t\t);\n\t}, [ selection, data, getItemId ] );\n\n\treturn (\n\t\t<DataViewsContext.Provider\n\t\t\tvalue={ {\n\t\t\t\tview,\n\t\t\t\tonChangeView,\n\t\t\t\tfields: _fields,\n\t\t\t\tactions,\n\t\t\t\tdata,\n\t\t\t\tisLoading,\n\t\t\t\tpaginationInfo,\n\t\t\t\tselection: _selection,\n\t\t\t\tonChangeSelection: setSelectionWithChange,\n\t\t\t\topenedFilter,\n\t\t\t\tsetOpenedFilter,\n\t\t\t\tgetItemId,\n\t\t\t\tdensity,\n\t\t\t} }\n\t\t>\n\t\t\t<div className=\"dataviews-wrapper\">\n\t\t\t\t<HStack\n\t\t\t\t\talignment=\"top\"\n\t\t\t\t\tjustify=\"start\"\n\t\t\t\t\tclassName=\"dataviews__view-actions\"\n\t\t\t\t>\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tjustify=\"start\"\n\t\t\t\t\t\tclassName=\"dataviews-filters__container\"\n\t\t\t\t\t\twrap\n\t\t\t\t\t>\n\t\t\t\t\t\t{ search && <DataViewsSearch label={ searchLabel } /> }\n\t\t\t\t\t\t<DataViewsFilters />\n\t\t\t\t\t</HStack>\n\t\t\t\t\t{ view.type === LAYOUT_GRID && (\n\t\t\t\t\t\t<DensityPicker\n\t\t\t\t\t\t\tdensity={ density }\n\t\t\t\t\t\t\tsetDensity={ setDensity }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<DataViewsBulkActions />\n\t\t\t\t\t<HStack\n\t\t\t\t\t\tspacing={ 1 }\n\t\t\t\t\t\texpanded={ false }\n\t\t\t\t\t\tstyle={ { flexShrink: 0 } }\n\t\t\t\t\t>\n\t\t\t\t\t\t<DataViewsViewConfig\n\t\t\t\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{ header }\n\t\t\t\t\t</HStack>\n\t\t\t\t</HStack>\n\t\t\t\t<DataViewsLayout />\n\t\t\t\t<DataviewsPagination />\n\t\t\t\t<DataViewsBulkActionsToolbar />\n\t\t\t</div>\n\t\t</DataViewsContext.Provider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drawerRight = (\n\t<SVG\n\t\twidth=\"24\"\n\t\theight=\"24\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 24 24\"\n\t>\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-4 14.5H6c-.3 0-.5-.2-.5-.5V6c0-.3.2-.5.5-.5h8v13zm4.5-.5c0 .3-.2.5-.5.5h-2.5v-13H18c.3 0 .5.2.5.5v12z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drawerRight;\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tFlexItem,\n} from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\n\nexport default function Header( { title, subTitle, actions } ) {\n\treturn (\n\t\t<VStack className=\"edit-site-page-header\" as=\"header\" spacing={ 0 }>\n\t\t\t<HStack className=\"edit-site-page-header__page-title\">\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\tweight={ 500 }\n\t\t\t\t\tclassName=\"edit-site-page-header__title\"\n\t\t\t\t\ttruncate\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<FlexItem className=\"edit-site-page-header__actions\">\n\t\t\t\t\t{ actions }\n\t\t\t\t</FlexItem>\n\t\t\t</HStack>\n\t\t\t{ subTitle && (\n\t\t\t\t<Text\n\t\t\t\t\tvariant=\"muted\"\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"edit-site-page-header__sub-title\"\n\t\t\t\t>\n\t\t\t\t\t{ subTitle }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport Header from './header';\nimport { unlock } from '../../lock-unlock';\n\nconst { NavigableRegion } = unlock( editorPrivateApis );\n\nexport default function Page( {\n\ttitle,\n\tsubTitle,\n\tactions,\n\tchildren,\n\tclassName,\n\thideTitleFromUI = false,\n} ) {\n\tconst classes = clsx( 'edit-site-page', className );\n\n\treturn (\n\t\t<NavigableRegion className={ classes } ariaLabel={ title }>\n\t\t\t<div className=\"edit-site-page-content\">\n\t\t\t\t{ ! hideTitleFromUI && title && (\n\t\t\t\t\t<Header\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tsubTitle={ subTitle }\n\t\t\t\t\t\tactions={ actions }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t</NavigableRegion>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pages = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M14.5 5.5h-7V7h7V5.5ZM7.5 9h7v1.5h-7V9Zm7 3.5h-7V14h7v-1.5Z\" />\n\t\t<Path d=\"M16 2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2ZM6 3.5h10a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H6a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5Z\" />\n\t\t<Path d=\"M20 8v11c0 .69-.31 1-.999 1H6v1.5h13.001c1.52 0 2.499-.982 2.499-2.5V8H20Z\" />\n\t</SVG>\n);\n\nexport default pages;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst published = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm11.53-1.47-1.06-1.06L11 12.94l-1.47-1.47-1.06 1.06L11 15.06l4.53-4.53Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default published;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst scheduled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm9 1V8h-1.5v3.5h-2V13H13Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default scheduled;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst drafts = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 0 4-4H8a4 4 0 0 0 4 4Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default drafts;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pending = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm8 4a4 4 0 0 1-4-4h4V8a4 4 0 0 1 0 8Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default pending;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst notAllowed = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12 18.5A6.5 6.5 0 0 1 6.93 7.931l9.139 9.138A6.473 6.473 0 0 1 12 18.5Zm5.123-2.498a6.5 6.5 0 0 0-9.124-9.124l9.124 9.124ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default notAllowed;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nimport {\n\ttrash,\n\tpages,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n} from '@wordpress/icons';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tLAYOUT_LIST,\n\tLAYOUT_TABLE,\n\tLAYOUT_GRID,\n\tOPERATOR_IS_ANY,\n} from '../../utils/constants';\n\nexport const defaultLayouts = {\n\t[ LAYOUT_TABLE ]: {\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tstyles: {\n\t\t\t\t'featured-image': {\n\t\t\t\t\twidth: '1%',\n\t\t\t\t},\n\t\t\t\ttitle: {\n\t\t\t\t\tmaxWidth: 300,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t[ LAYOUT_GRID ]: {\n\t\tlayout: {\n\t\t\tmediaField: 'featured-image',\n\t\t\tprimaryField: 'title',\n\t\t},\n\t},\n\t[ LAYOUT_LIST ]: {\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tmediaField: 'featured-image',\n\t\t},\n\t},\n};\n\nconst DEFAULT_POST_BASE = {\n\ttype: LAYOUT_LIST,\n\tsearch: '',\n\tfilters: [],\n\tpage: 1,\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'date',\n\t\tdirection: 'desc',\n\t},\n\tfields: [ 'title', 'author', 'status' ],\n\tlayout: defaultLayouts[ LAYOUT_LIST ].layout,\n};\n\nexport function useDefaultViews( { postType } ) {\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType } = select( coreStore );\n\t\t\treturn getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\treturn useMemo( () => {\n\t\treturn {\n\t\t\t[ postType ]: [\n\t\t\t\t{\n\t\t\t\t\ttitle: labels?.all_items || __( 'All items' ),\n\t\t\t\t\tslug: 'all',\n\t\t\t\t\ticon: pages,\n\t\t\t\t\tview: DEFAULT_POST_BASE,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttitle: __( 'Published' ),\n\t\t\t\t\tslug: 'published',\n\t\t\t\t\ticon: published,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'publish',\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\t{\n\t\t\t\t\ttitle: __( 'Scheduled' ),\n\t\t\t\t\tslug: 'future',\n\t\t\t\t\ticon: scheduled,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'future',\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\t{\n\t\t\t\t\ttitle: __( 'Drafts' ),\n\t\t\t\t\tslug: 'drafts',\n\t\t\t\t\ticon: drafts,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'draft',\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\t{\n\t\t\t\t\ttitle: __( 'Pending' ),\n\t\t\t\t\tslug: 'pending',\n\t\t\t\t\ticon: pending,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'pending',\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\t{\n\t\t\t\t\ttitle: __( 'Private' ),\n\t\t\t\t\tslug: 'private',\n\t\t\t\t\ticon: notAllowed,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'private',\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\t{\n\t\t\t\t\ttitle: __( 'Trash' ),\n\t\t\t\t\tslug: 'trash',\n\t\t\t\t\ticon: trash,\n\t\t\t\t\tview: {\n\t\t\t\t\t\t...DEFAULT_POST_BASE,\n\t\t\t\t\t\tfilters: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'status',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: 'trash',\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}, [ labels, postType ] );\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tTextControl,\n} from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useDispatch, useRegistry, useSelect } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { serialize, synchronizeBlocksWithTemplate } from '@wordpress/blocks';\n\nexport default function AddNewPostModal( { postType, onSave, onClose } ) {\n\tconst labels = useSelect(\n\t\t( select ) => select( coreStore ).getPostType( postType )?.labels,\n\t\t[ postType ]\n\t);\n\tconst [ isCreatingPost, setIsCreatingPost ] = useState( false );\n\tconst [ title, setTitle ] = useState( '' );\n\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { resolveSelect } = useRegistry();\n\n\tasync function createPost( event ) {\n\t\tevent.preventDefault();\n\n\t\tif ( isCreatingPost ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsCreatingPost( true );\n\t\ttry {\n\t\t\tconst postTypeObject =\n\t\t\t\tawait resolveSelect( coreStore ).getPostType( postType );\n\t\t\tconst newPage = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\tstatus: 'draft',\n\t\t\t\t\ttitle,\n\t\t\t\t\tslug: title || __( 'No title' ),\n\t\t\t\t\tcontent:\n\t\t\t\t\t\t!! postTypeObject.template &&\n\t\t\t\t\t\tpostTypeObject.template.length\n\t\t\t\t\t\t\t? serialize(\n\t\t\t\t\t\t\t\t\tsynchronizeBlocksWithTemplate(\n\t\t\t\t\t\t\t\t\t\t[],\n\t\t\t\t\t\t\t\t\t\tpostTypeObject.template\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\t: undefined,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\tonSave( newPage );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created post e.g: \"Hello world\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tdecodeEntities( newPage.title?.rendered || title )\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar' }\n\t\t\t);\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the item.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsCreatingPost( false );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={\n\t\t\t\t// translators: %s: post type singular_name label e.g: \"Page\".\n\t\t\t\tsprintf( __( 'Draft new: %s' ), labels?.singular_name )\n\t\t\t}\n\t\t\tonRequestClose={ onClose }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form onSubmit={ createPost }>\n\t\t\t\t<VStack spacing={ 3 }>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Title' ) }\n\t\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\t\tplaceholder={ __( 'No title' ) }\n\t\t\t\t\t\tvalue={ title }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack spacing={ 2 } justify=\"end\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tisBusy={ isCreatingPost }\n\t\t\t\t\t\t\taria-disabled={ isCreatingPost }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Create draft' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pencil = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z\" />\n\t</SVG>\n);\n\nexport default pencil;\n","/**\n * Internal dependencies\n */\n\nimport { default as pencil } from './pencil';\nexport default pencil;\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit } from '@wordpress/icons';\nimport { useMemo } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { PATTERN_TYPES } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport const useEditPostAction = () => {\n\tconst history = useHistory();\n\treturn useMemo(\n\t\t() => ( {\n\t\t\tid: 'edit-post',\n\t\t\tlabel: __( 'Edit' ),\n\t\t\tisPrimary: true,\n\t\t\ticon: edit,\n\t\t\tisEligible( post ) {\n\t\t\t\tif ( post.status === 'trash' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// It's eligible for all post types except theme patterns.\n\t\t\t\treturn post.type !== PATTERN_TYPES.theme;\n\t\t\t},\n\t\t\tcallback( items ) {\n\t\t\t\tconst post = items[ 0 ];\n\t\t\t\thistory.push( {\n\t\t\t\t\tpostId: post.id,\n\t\t\t\t\tpostType: post.type,\n\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t\t[ history ]\n\t);\n};\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst commentAuthorAvatar = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M7.25 16.437a6.5 6.5 0 1 1 9.5 0V16A2.75 2.75 0 0 0 14 13.25h-4A2.75 2.75 0 0 0 7.25 16v.437Zm1.5 1.193a6.47 6.47 0 0 0 3.25.87 6.47 6.47 0 0 0 3.25-.87V16c0-.69-.56-1.25-1.25-1.25h-4c-.69 0-1.25.56-1.25 1.25v1.63ZM4 12a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm10-2a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default commentAuthorAvatar;\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecord } from '@wordpress/core-data';\n\nfunction Media( { id, size = [ 'large', 'medium', 'thumbnail' ], ...props } ) {\n\tconst { record: media } = useEntityRecord( 'root', 'media', id );\n\tconst currentSize = size.find(\n\t\t( s ) => !! media?.media_details?.sizes[ s ]\n\t);\n\n\tconst mediaUrl =\n\t\tmedia?.media_details?.sizes[ currentSize ]?.source_url ||\n\t\tmedia?.source_url;\n\n\tif ( ! mediaUrl ) {\n\t\treturn null;\n\t}\n\n\treturn <img { ...props } src={ mediaUrl } alt={ media.alt_text } />;\n}\n\nexport default Media;\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\tcreateInterpolateElement,\n\tuseMemo,\n\tuseState,\n} from '@wordpress/element';\nimport { dateI18n, getDate, getSettings } from '@wordpress/date';\nimport {\n\ttrash,\n\tdrafts,\n\tpublished,\n\tscheduled,\n\tpending,\n\tnotAllowed,\n\tcommentAuthorAvatar as authorIcon,\n} from '@wordpress/icons';\nimport { __experimentalHStack as HStack, Icon } from '@wordpress/components';\nimport { useSelect } from '@wordpress/data';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport {\n\tLAYOUT_GRID,\n\tLAYOUT_TABLE,\n\tLAYOUT_LIST,\n\tOPERATOR_IS_ANY,\n} from '../../utils/constants';\nimport { default as Link, useLink } from '../routes/link';\nimport Media from '../media';\n\n// See https://github.com/WordPress/gutenberg/issues/55886\n// We do not support custom statutes at the moment.\nconst STATUSES = [\n\t{ value: 'draft', label: __( 'Draft' ), icon: drafts },\n\t{ value: 'future', label: __( 'Scheduled' ), icon: scheduled },\n\t{ value: 'pending', label: __( 'Pending Review' ), icon: pending },\n\t{ value: 'private', label: __( 'Private' ), icon: notAllowed },\n\t{ value: 'publish', label: __( 'Published' ), icon: published },\n\t{ value: 'trash', label: __( 'Trash' ), icon: trash },\n];\n\nconst getFormattedDate = ( dateToDisplay ) =>\n\tdateI18n(\n\t\tgetSettings().formats.datetimeAbbreviated,\n\t\tgetDate( dateToDisplay )\n\t);\n\nfunction FeaturedImage( { item, viewType } ) {\n\tconst isDisabled = item.status === 'trash';\n\tconst { onClick } = useLink( {\n\t\tpostId: item.id,\n\t\tpostType: item.type,\n\t\tcanvas: 'edit',\n\t} );\n\tconst hasMedia = !! item.featured_media;\n\tconst size =\n\t\tviewType === LAYOUT_GRID\n\t\t\t? [ 'large', 'full', 'medium', 'thumbnail' ]\n\t\t\t: [ 'thumbnail', 'medium', 'large', 'full' ];\n\tconst media = hasMedia ? (\n\t\t<Media\n\t\t\tclassName=\"edit-site-post-list__featured-image\"\n\t\t\tid={ item.featured_media }\n\t\t\tsize={ size }\n\t\t/>\n\t) : null;\n\tconst renderButton = viewType !== LAYOUT_LIST && ! isDisabled;\n\treturn (\n\t\t<div\n\t\t\tclassName={ `edit-site-post-list__featured-image-wrapper is-layout-${ viewType }` }\n\t\t>\n\t\t\t{ renderButton ? (\n\t\t\t\t<button\n\t\t\t\t\tclassName=\"edit-site-post-list__featured-image-button\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\taria-label={ item.title?.rendered || __( '(no title)' ) }\n\t\t\t\t>\n\t\t\t\t\t{ media }\n\t\t\t\t</button>\n\t\t\t) : (\n\t\t\t\tmedia\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction PostStatusField( { item } ) {\n\tconst status = STATUSES.find( ( { value } ) => value === item.status );\n\tconst label = status?.label || item.status;\n\tconst icon = status?.icon;\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ icon && (\n\t\t\t\t<div className=\"edit-site-post-list__status-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span>{ label }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction PostAuthorField( { item } ) {\n\tconst { text, imageUrl } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getUser } = select( coreStore );\n\t\t\tconst user = getUser( item.author );\n\t\t\treturn {\n\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\ttext: user?.name,\n\t\t\t};\n\t\t},\n\t\t[ item ]\n\t);\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ !! imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt={ __( 'Author avatar' ) }\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ authorIcon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction usePostFields( viewType ) {\n\tconst { records: authors, isResolving: isLoadingAuthors } =\n\t\tuseEntityRecords( 'root', 'user', { per_page: -1 } );\n\n\tconst { frontPageId, postsPageId } = useSelect( ( select ) => {\n\t\tconst { getEntityRecord } = select( coreStore );\n\t\tconst siteSettings = getEntityRecord( 'root', 'site' );\n\t\treturn {\n\t\t\tfrontPageId: siteSettings?.page_on_front,\n\t\t\tpostsPageId: siteSettings?.page_for_posts,\n\t\t};\n\t}, [] );\n\n\tconst fields = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tid: 'featured-image',\n\t\t\t\tlabel: __( 'Featured Image' ),\n\t\t\t\tgetValue: ( { item } ) => item.featured_media,\n\t\t\t\trender: ( { item } ) => (\n\t\t\t\t\t<FeaturedImage item={ item } viewType={ viewType } />\n\t\t\t\t),\n\t\t\t\tenableSorting: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Title' ),\n\t\t\t\tid: 'title',\n\t\t\t\ttype: 'text',\n\t\t\t\tgetValue: ( { item } ) =>\n\t\t\t\t\ttypeof item.title === 'string'\n\t\t\t\t\t\t? item.title\n\t\t\t\t\t\t: item.title?.raw,\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst addLink =\n\t\t\t\t\t\t[ LAYOUT_TABLE, LAYOUT_GRID ].includes( viewType ) &&\n\t\t\t\t\t\titem.status !== 'trash';\n\t\t\t\t\tconst title = addLink ? (\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\tparams={ {\n\t\t\t\t\t\t\t\tpostId: item.id,\n\t\t\t\t\t\t\t\tpostType: item.type,\n\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ decodeEntities( item.title?.rendered ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{ decodeEntities( item.title?.rendered ) ||\n\t\t\t\t\t\t\t\t__( '(no title)' ) }\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\n\t\t\t\t\tlet suffix = '';\n\t\t\t\t\tif ( item.id === frontPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-post-list__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Homepage' ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( item.id === postsPageId ) {\n\t\t\t\t\t\tsuffix = (\n\t\t\t\t\t\t\t<span className=\"edit-site-post-list__title-badge\">\n\t\t\t\t\t\t\t\t{ __( 'Posts Page' ) }\n\t\t\t\t\t\t\t</span>\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<HStack\n\t\t\t\t\t\t\tclassName=\"edit-site-post-list__title\"\n\t\t\t\t\t\t\talignment=\"center\"\n\t\t\t\t\t\t\tjustify=\"flex-start\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</HStack>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tenableHiding: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\tgetValue: ( { item } ) => item._embedded?.author[ 0 ]?.name,\n\t\t\t\telements:\n\t\t\t\t\tauthors?.map( ( { id, name } ) => ( {\n\t\t\t\t\t\tvalue: id,\n\t\t\t\t\t\tlabel: name,\n\t\t\t\t\t} ) ) || [],\n\t\t\t\trender: PostAuthorField,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Status' ),\n\t\t\t\tid: 'status',\n\t\t\t\tgetValue: ( { item } ) =>\n\t\t\t\t\tSTATUSES.find( ( { value } ) => value === item.status )\n\t\t\t\t\t\t?.label ?? item.status,\n\t\t\t\telements: STATUSES,\n\t\t\t\trender: PostStatusField,\n\t\t\t\tenableSorting: false,\n\t\t\t\tfilterBy: {\n\t\t\t\t\toperators: [ OPERATOR_IS_ANY ],\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Date' ),\n\t\t\t\tid: 'date',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst isDraftOrPrivate = [ 'draft', 'private' ].includes(\n\t\t\t\t\t\titem.status\n\t\t\t\t\t);\n\t\t\t\t\tif ( isDraftOrPrivate ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\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\tconst isScheduled = item.status === 'future';\n\t\t\t\t\tif ( isScheduled ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: page creation date */\n\t\t\t\t\t\t\t\t__( '<span>Scheduled: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( item.date )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\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// Pending & Published posts show the modified date if it's newer.\n\t\t\t\t\tconst dateToDisplay =\n\t\t\t\t\t\tgetDate( item.modified ) > getDate( item.date )\n\t\t\t\t\t\t\t? item.modified\n\t\t\t\t\t\t\t: item.date;\n\n\t\t\t\t\tconst isPending = item.status === 'pending';\n\t\t\t\t\tif ( isPending ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: the newest of created or modified date for the page */\n\t\t\t\t\t\t\t\t__( '<span>Modified: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( dateToDisplay )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\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\tconst isPublished = item.status === 'publish';\n\t\t\t\t\tif ( isPublished ) {\n\t\t\t\t\t\treturn createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: the newest of created or modified date for the page */\n\t\t\t\t\t\t\t\t__( '<span>Published: <time>%s</time></span>' ),\n\t\t\t\t\t\t\t\tgetFormattedDate( dateToDisplay )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tspan: <span />,\n\t\t\t\t\t\t\t\ttime: <time />,\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// Unknow status.\n\t\t\t\t\treturn <time>{ getFormattedDate( item.date ) }</time>;\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t\t[ authors, viewType, frontPageId, postsPageId ]\n\t);\n\n\treturn {\n\t\tisLoading: isLoadingAuthors,\n\t\tfields,\n\t};\n}\n\nexport default usePostFields;\n","/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useState, useMemo, useCallback, useEffect } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { DataViews } from '@wordpress/dataviews';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { drawerRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Page from '../page';\nimport {\n\tuseDefaultViews,\n\tdefaultLayouts,\n} from '../sidebar-dataviews/default-views';\nimport {\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_NONE,\n\tLAYOUT_LIST,\n} from '../../utils/constants';\n\nimport AddNewPostModal from '../add-new-post';\nimport { unlock } from '../../lock-unlock';\nimport { useEditPostAction } from '../dataviews-actions';\nimport { usePrevious } from '@wordpress/compose';\nimport usePostFields from '../post-fields';\n\nconst { usePostActions } = unlock( editorPrivateApis );\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\nconst EMPTY_ARRAY = [];\n\nfunction useView( postType ) {\n\tconst {\n\t\tparams: { activeView = 'all', isCustom = 'false', layout },\n\t} = useLocation();\n\tconst history = useHistory();\n\tconst DEFAULT_VIEWS = useDefaultViews( { postType } );\n\tconst selectedDefaultView = useMemo( () => {\n\t\tconst defaultView =\n\t\t\tisCustom === 'false' &&\n\t\t\tDEFAULT_VIEWS[ postType ].find(\n\t\t\t\t( { slug } ) => slug === activeView\n\t\t\t)?.view;\n\t\tif ( isCustom === 'false' && layout ) {\n\t\t\treturn {\n\t\t\t\t...defaultView,\n\t\t\t\ttype: layout,\n\t\t\t\tlayout: defaultLayouts[ layout ]?.layout,\n\t\t\t};\n\t\t}\n\t\treturn defaultView;\n\t}, [ isCustom, activeView, layout, postType, DEFAULT_VIEWS ] );\n\tconst [ view, setView ] = useState( selectedDefaultView );\n\n\tuseEffect( () => {\n\t\tif ( selectedDefaultView ) {\n\t\t\tsetView( selectedDefaultView );\n\t\t}\n\t}, [ selectedDefaultView ] );\n\tconst editedViewRecord = useSelect(\n\t\t( select ) => {\n\t\t\tif ( isCustom !== 'true' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\tconst dataviewRecord = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_dataviews',\n\t\t\t\tNumber( activeView )\n\t\t\t);\n\t\t\treturn dataviewRecord;\n\t\t},\n\t\t[ activeView, isCustom ]\n\t);\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\n\tconst customView = useMemo( () => {\n\t\tconst storedView =\n\t\t\teditedViewRecord?.content &&\n\t\t\tJSON.parse( editedViewRecord?.content );\n\t\tif ( ! storedView ) {\n\t\t\treturn storedView;\n\t\t}\n\n\t\treturn {\n\t\t\t...storedView,\n\t\t\tlayout: defaultLayouts[ storedView?.type ]?.layout,\n\t\t};\n\t}, [ editedViewRecord?.content ] );\n\n\tconst setCustomView = useCallback(\n\t\t( viewToSet ) => {\n\t\t\teditEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\t'wp_dataviews',\n\t\t\t\teditedViewRecord?.id,\n\t\t\t\t{\n\t\t\t\t\tcontent: JSON.stringify( viewToSet ),\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\t\t[ editEntityRecord, editedViewRecord?.id ]\n\t);\n\n\tconst setDefaultViewAndUpdateUrl = useCallback(\n\t\t( viewToSet ) => {\n\t\t\tif ( viewToSet.type !== view?.type ) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tlayout: viewToSet.type,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetView( viewToSet );\n\t\t},\n\t\t[ history, view?.type ]\n\t);\n\n\tif ( isCustom === 'false' ) {\n\t\treturn [ view, setDefaultViewAndUpdateUrl ];\n\t} else if ( isCustom === 'true' && customView ) {\n\t\treturn [ customView, setCustomView ];\n\t}\n\t// Loading state where no the view was not found on custom views or default views.\n\treturn [ DEFAULT_VIEWS[ postType ][ 0 ].view, setDefaultViewAndUpdateUrl ];\n}\n\nconst DEFAULT_STATUSES = 'draft,future,pending,private,publish'; // All but 'trash'.\n\nfunction getItemId( item ) {\n\treturn item.id.toString();\n}\n\nexport default function PostList( { postType } ) {\n\tconst [ view, setView ] = useView( postType );\n\tconst history = useHistory();\n\tconst location = useLocation();\n\tconst { postId, quickEdit = false } = location.params;\n\tconst [ selection, setSelection ] = useState( postId?.split( ',' ) ?? [] );\n\tconst onChangeSelection = useCallback(\n\t\t( items ) => {\n\t\t\tsetSelection( items );\n\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\tif ( ( params.isCustom ?? 'false' ) === 'false' ) {\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tpostId: items.join( ',' ),\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\tconst queryArgs = useMemo( () => {\n\t\tconst filters = {};\n\t\tview.filters.forEach( ( filter ) => {\n\t\t\tif (\n\t\t\t\tfilter.field === 'status' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_ANY\n\t\t\t) {\n\t\t\t\tfilters.status = filter.value;\n\t\t\t}\n\t\t\tif (\n\t\t\t\tfilter.field === 'author' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_ANY\n\t\t\t) {\n\t\t\t\tfilters.author = filter.value;\n\t\t\t} else if (\n\t\t\t\tfilter.field === 'author' &&\n\t\t\t\tfilter.operator === OPERATOR_IS_NONE\n\t\t\t) {\n\t\t\t\tfilters.author_exclude = filter.value;\n\t\t\t}\n\t\t} );\n\t\t// We want to provide a different default item for the status filter\n\t\t// than the REST API provides.\n\t\tif ( ! filters.status || filters.status === '' ) {\n\t\t\tfilters.status = DEFAULT_STATUSES;\n\t\t}\n\n\t\treturn {\n\t\t\tper_page: view.perPage,\n\t\t\tpage: view.page,\n\t\t\t_embed: 'author',\n\t\t\torder: view.sort?.direction,\n\t\t\torderby: view.sort?.field,\n\t\t\tsearch: view.search,\n\t\t\t...filters,\n\t\t};\n\t}, [ view ] );\n\tconst {\n\t\trecords,\n\t\tisResolving: isLoadingMainEntities,\n\t\ttotalItems,\n\t\ttotalPages,\n\t} = useEntityRecords( 'postType', postType, queryArgs );\n\n\tconst ids = records?.map( ( record ) => getItemId( record ) ) ?? [];\n\tconst prevIds = usePrevious( ids ) ?? [];\n\tconst deletedIds = prevIds.filter( ( id ) => ! ids.includes( id ) );\n\tconst postIdWasDeleted = deletedIds.includes( postId );\n\n\tuseEffect( () => {\n\t\tif ( postIdWasDeleted ) {\n\t\t\thistory.push( {\n\t\t\t\t...history.getLocationWithParams().params,\n\t\t\t\tpostId: undefined,\n\t\t\t} );\n\t\t}\n\t}, [ postIdWasDeleted, history ] );\n\n\tconst paginationInfo = useMemo(\n\t\t() => ( {\n\t\t\ttotalItems,\n\t\t\ttotalPages,\n\t\t} ),\n\t\t[ totalItems, totalPages ]\n\t);\n\n\tconst { labels, canCreateRecord } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getPostType, canUser } = select( coreStore );\n\t\t\treturn {\n\t\t\t\tlabels: getPostType( postType )?.labels,\n\t\t\t\tcanCreateRecord: canUser( 'create', {\n\t\t\t\t\tkind: 'postType',\n\t\t\t\t\tname: postType,\n\t\t\t\t} ),\n\t\t\t};\n\t\t},\n\t\t[ postType ]\n\t);\n\n\tconst postTypeActions = usePostActions( {\n\t\tpostType,\n\t\tcontext: 'list',\n\t} );\n\tconst editAction = useEditPostAction();\n\tconst actions = useMemo(\n\t\t() => [ editAction, ...postTypeActions ],\n\t\t[ postTypeActions, editAction ]\n\t);\n\n\tconst [ showAddPostModal, setShowAddPostModal ] = useState( false );\n\n\tconst openModal = () => setShowAddPostModal( true );\n\tconst closeModal = () => setShowAddPostModal( false );\n\tconst handleNewPage = ( { type, id } ) => {\n\t\thistory.push( {\n\t\t\tpostId: id,\n\t\t\tpostType: type,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t\tcloseModal();\n\t};\n\tconst { isLoading: isLoadingFields, fields } = usePostFields( view.type );\n\n\treturn (\n\t\t<Page\n\t\t\ttitle={ labels?.name }\n\t\t\tactions={\n\t\t\t\tlabels?.add_new_item &&\n\t\t\t\tcanCreateRecord && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ openModal }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ labels.add_new_item }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t{ showAddPostModal && (\n\t\t\t\t\t\t\t<AddNewPostModal\n\t\t\t\t\t\t\t\tpostType={ postType }\n\t\t\t\t\t\t\t\tonSave={ handleNewPage }\n\t\t\t\t\t\t\t\tonClose={ closeModal }\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\t<DataViews\n\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\tfields={ fields }\n\t\t\t\tactions={ actions }\n\t\t\t\tdata={ records || EMPTY_ARRAY }\n\t\t\t\tisLoading={ isLoadingMainEntities || isLoadingFields }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ setView }\n\t\t\t\tselection={ selection }\n\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\tgetItemId={ getItemId }\n\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\theader={\n\t\t\t\t\twindow.__experimentalQuickEditDataViews &&\n\t\t\t\t\tview.type !== LAYOUT_LIST &&\n\t\t\t\t\tpostType === 'page' && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\tisPressed={ quickEdit }\n\t\t\t\t\t\t\ticon={ drawerRight }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t! quickEdit\n\t\t\t\t\t\t\t\t\t? __( 'Show quick edit sidebar' )\n\t\t\t\t\t\t\t\t\t: __( 'Close quick edit sidebar' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t...location.params,\n\t\t\t\t\t\t\t\t\tquickEdit: quickEdit ? undefined : true,\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</Page>\n\t);\n}\n","/**\n * External dependencies\n */\nimport removeAccents from 'remove-accents';\n\n/**\n * Internal dependencies\n */\nimport {\n\tOPERATOR_IS,\n\tOPERATOR_IS_NOT,\n\tOPERATOR_IS_NONE,\n\tOPERATOR_IS_ANY,\n\tOPERATOR_IS_ALL,\n\tOPERATOR_IS_NOT_ALL,\n} from './constants';\nimport { normalizeFields } from './normalize-fields';\nimport type { Field, View } from './types';\n\nfunction normalizeSearchInput( input = '' ) {\n\treturn removeAccents( input.trim().toLowerCase() );\n}\n\nconst EMPTY_ARRAY: [] = [];\n\n/**\n * Applies the filtering, sorting and pagination to the raw data based on the view configuration.\n *\n * @param data Raw data.\n * @param view View config.\n * @param fields Fields config.\n *\n * @return Filtered, sorted and paginated data.\n */\nexport function filterSortAndPaginate< Item >(\n\tdata: Item[],\n\tview: View,\n\tfields: Field< Item >[]\n): {\n\tdata: Item[];\n\tpaginationInfo: { totalItems: number; totalPages: number };\n} {\n\tif ( ! data ) {\n\t\treturn {\n\t\t\tdata: EMPTY_ARRAY,\n\t\t\tpaginationInfo: { totalItems: 0, totalPages: 0 },\n\t\t};\n\t}\n\tconst _fields = normalizeFields( fields );\n\tlet filteredData = [ ...data ];\n\t// Handle global search.\n\tif ( view.search ) {\n\t\tconst normalizedSearch = normalizeSearchInput( view.search );\n\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\treturn _fields\n\t\t\t\t.filter( ( field ) => field.enableGlobalSearch )\n\t\t\t\t.map( ( field ) => {\n\t\t\t\t\treturn normalizeSearchInput( field.getValue( { item } ) );\n\t\t\t\t} )\n\t\t\t\t.some( ( field ) => field.includes( normalizedSearch ) );\n\t\t} );\n\t}\n\n\tif ( view.filters && view.filters?.length > 0 ) {\n\t\tview.filters.forEach( ( filter ) => {\n\t\t\tconst field = _fields.find(\n\t\t\t\t( _field ) => _field.id === filter.field\n\t\t\t);\n\t\t\tif ( field ) {\n\t\t\t\tif (\n\t\t\t\t\tfilter.operator === OPERATOR_IS_ANY &&\n\t\t\t\t\tfilter?.value?.length > 0\n\t\t\t\t) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\tconst fieldValue = field.getValue( { item } );\n\t\t\t\t\t\tif ( Array.isArray( fieldValue ) ) {\n\t\t\t\t\t\t\treturn filter.value.some( ( filterValue: any ) =>\n\t\t\t\t\t\t\t\tfieldValue.includes( filterValue )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if ( typeof fieldValue === 'string' ) {\n\t\t\t\t\t\t\treturn filter.value.includes( fieldValue );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\t\t\t\t} else if (\n\t\t\t\t\tfilter.operator === OPERATOR_IS_NONE &&\n\t\t\t\t\tfilter?.value?.length > 0\n\t\t\t\t) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\tconst fieldValue = field.getValue( { item } );\n\t\t\t\t\t\tif ( Array.isArray( fieldValue ) ) {\n\t\t\t\t\t\t\treturn ! filter.value.some( ( filterValue: any ) =>\n\t\t\t\t\t\t\t\tfieldValue.includes( filterValue )\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else if ( typeof fieldValue === 'string' ) {\n\t\t\t\t\t\t\treturn ! filter.value.includes( fieldValue );\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} );\n\t\t\t\t} else if (\n\t\t\t\t\tfilter.operator === OPERATOR_IS_ALL &&\n\t\t\t\t\tfilter?.value?.length > 0\n\t\t\t\t) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\treturn filter.value.every( ( value: any ) => {\n\t\t\t\t\t\t\treturn field\n\t\t\t\t\t\t\t\t.getValue( { item } )\n\t\t\t\t\t\t\t\t?.includes( value );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t} else if (\n\t\t\t\t\tfilter.operator === OPERATOR_IS_NOT_ALL &&\n\t\t\t\t\tfilter?.value?.length > 0\n\t\t\t\t) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\treturn filter.value.every( ( value: any ) => {\n\t\t\t\t\t\t\treturn ! field\n\t\t\t\t\t\t\t\t.getValue( { item } )\n\t\t\t\t\t\t\t\t?.includes( value );\n\t\t\t\t\t\t} );\n\t\t\t\t\t} );\n\t\t\t\t} else if ( filter.operator === OPERATOR_IS ) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\treturn filter.value === field.getValue( { item } );\n\t\t\t\t\t} );\n\t\t\t\t} else if ( filter.operator === OPERATOR_IS_NOT ) {\n\t\t\t\t\tfilteredData = filteredData.filter( ( item ) => {\n\t\t\t\t\t\treturn filter.value !== field.getValue( { item } );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t}\n\n\t// Handle sorting.\n\tif ( view.sort ) {\n\t\tconst fieldId = view.sort.field;\n\t\tconst fieldToSort = _fields.find( ( field ) => {\n\t\t\treturn field.id === fieldId;\n\t\t} );\n\t\tif ( fieldToSort ) {\n\t\t\tfilteredData.sort( ( a, b ) => {\n\t\t\t\tconst valueA = fieldToSort.getValue( { item: a } ) ?? '';\n\t\t\t\tconst valueB = fieldToSort.getValue( { item: b } ) ?? '';\n\n\t\t\t\tif (\n\t\t\t\t\ttypeof valueA === 'number' &&\n\t\t\t\t\ttypeof valueB === 'number'\n\t\t\t\t) {\n\t\t\t\t\treturn view.sort?.direction === 'asc'\n\t\t\t\t\t\t? valueA - valueB\n\t\t\t\t\t\t: valueB - valueA;\n\t\t\t\t}\n\n\t\t\t\treturn view.sort?.direction === 'asc'\n\t\t\t\t\t? valueA.localeCompare( valueB )\n\t\t\t\t\t: valueB.localeCompare( valueA );\n\t\t\t} );\n\t\t}\n\t}\n\n\t// Handle pagination.\n\tlet totalItems = filteredData.length;\n\tlet totalPages = 1;\n\tif ( view.page !== undefined && view.perPage !== undefined ) {\n\t\tconst start = ( view.page - 1 ) * view.perPage;\n\t\ttotalItems = filteredData?.length || 0;\n\t\ttotalPages = Math.ceil( totalItems / view.perPage );\n\t\tfilteredData = filteredData?.slice( start, start + view.perPage );\n\t}\n\n\treturn {\n\t\tdata: filteredData,\n\t\tpaginationInfo: {\n\t\t\ttotalItems,\n\t\t\ttotalPages,\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst lockSmall = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M15 11h-.2V9c0-1.5-1.2-2.8-2.8-2.8S9.2 7.5 9.2 9v2H9c-.6 0-1 .4-1 1v4c0 .6.4 1 1 1h6c.6 0 1-.4 1-1v-4c0-.6-.4-1-1-1zm-1.8 0h-2.5V9c0-.7.6-1.2 1.2-1.2s1.2.6 1.2 1.2v2z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default lockSmall;\n","/**\n * WordPress dependencies\n */\nimport { useEffect, useState, flushSync } from '@wordpress/element';\nimport { createQueue } from '@wordpress/priority-queue';\n\nconst blockPreviewQueue = createQueue();\n\n/**\n * Renders a component at the next idle time.\n * @param {*} props\n */\nexport function Async( { children, placeholder } ) {\n\tconst [ shouldRender, setShouldRender ] = useState( false );\n\n\t// In the future, we could try to use startTransition here, but currently\n\t// react will batch all transitions, which means all previews will be\n\t// rendered at the same time.\n\t// https://react.dev/reference/react/startTransition#caveats\n\t// > If there are multiple ongoing Transitions, React currently batches them\n\t// > together. This is a limitation that will likely be removed in a future\n\t// > release.\n\n\tuseEffect( () => {\n\t\tconst context = {};\n\t\tblockPreviewQueue.add( context, () => {\n\t\t\t// Synchronously run all renders so it consumes timeRemaining.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/48238\n\t\t\tflushSync( () => {\n\t\t\t\tsetShouldRender( true );\n\t\t\t} );\n\t\t} );\n\t\treturn () => {\n\t\t\tblockPreviewQueue.cancel( context );\n\t\t};\n\t}, [] );\n\n\tif ( ! shouldRender ) {\n\t\treturn placeholder;\n\t}\n\n\treturn children;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = window[\"wp\"][\"priorityQueue\"];","export const filterOutDuplicatesByName = ( currentItem, index, items ) =>\n\tindex === items.findIndex( ( item ) => currentItem.name === item.name );\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport { filterOutDuplicatesByName } from './utils';\n\nexport default function usePatternSettings() {\n\tconst storedSettings = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\treturn getSettings();\n\t}, [] );\n\n\tconst settingsBlockPatterns =\n\t\tstoredSettings.__experimentalAdditionalBlockPatterns ?? // WP 6.0\n\t\tstoredSettings.__experimentalBlockPatterns; // WP 5.9\n\n\tconst restBlockPatterns = useSelect(\n\t\t( select ) => select( coreStore ).getBlockPatterns(),\n\t\t[]\n\t);\n\n\tconst blockPatterns = useMemo(\n\t\t() =>\n\t\t\t[\n\t\t\t\t...( settingsBlockPatterns || [] ),\n\t\t\t\t...( restBlockPatterns || [] ),\n\t\t\t].filter( filterOutDuplicatesByName ),\n\t\t[ settingsBlockPatterns, restBlockPatterns ]\n\t);\n\n\tconst settings = useMemo( () => {\n\t\tconst { __experimentalAdditionalBlockPatterns, ...restStoredSettings } =\n\t\t\tstoredSettings;\n\n\t\treturn {\n\t\t\t...restStoredSettings,\n\t\t\t__experimentalBlockPatterns: blockPatterns,\n\t\t\t__unstableIsPreviewMode: true,\n\t\t};\n\t}, [ storedSettings, blockPatterns ] );\n\n\treturn settings;\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { extractWords, getNormalizedSearchTerms, normalizeString } = unlock(\n\tblockEditorPrivateApis\n);\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\n\n// Default search helpers.\nconst defaultGetName = ( item ) => {\n\tif ( item.type === PATTERN_TYPES.user ) {\n\t\treturn item.slug;\n\t}\n\n\tif ( item.type === TEMPLATE_PART_POST_TYPE ) {\n\t\treturn '';\n\t}\n\n\treturn item.name || '';\n};\n\nexport const defaultGetTitle = ( item ) => {\n\tif ( typeof item.title === 'string' ) {\n\t\treturn item.title;\n\t}\n\n\tif ( item.title && item.title.rendered ) {\n\t\treturn item.title.rendered;\n\t}\n\n\tif ( item.title && item.title.raw ) {\n\t\treturn item.title.raw;\n\t}\n\n\treturn '';\n};\n\nconst defaultGetDescription = ( item ) => {\n\tif ( item.type === PATTERN_TYPES.user ) {\n\t\treturn item.excerpt.raw;\n\t}\n\n\treturn item.description || '';\n};\n\nconst defaultGetKeywords = ( item ) => item.keywords || [];\nconst defaultHasCategory = () => false;\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\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\n\t// Filter patterns by category: the default category indicates that all patterns will be shown.\n\tconst onlyFilterByCategory =\n\t\tconfig.categoryId !== PATTERN_DEFAULT_CATEGORY &&\n\t\t! normalizedSearchTerms.length;\n\tconst searchRankConfig = { ...config, onlyFilterByCategory };\n\n\t// If we aren't filtering on search terms, matching on category is satisfactory.\n\t// If we are, then we need more than a category match.\n\tconst threshold = onlyFilterByCategory ? 0 : 1;\n\n\tconst rankedItems = items\n\t\t.map( ( item ) => {\n\t\t\treturn [\n\t\t\t\titem,\n\t\t\t\tgetItemSearchRank( item, searchInput, searchRankConfig ),\n\t\t\t];\n\t\t} )\n\t\t.filter( ( [ , rank ] ) => rank > threshold );\n\n\t// If we didn't have terms to search on, there's no point sorting.\n\tif ( normalizedSearchTerms.length === 0 ) {\n\t\treturn rankedItems.map( ( [ item ] ) => item );\n\t}\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 */\nfunction getItemSearchRank( item, searchTerm, config ) {\n\tconst {\n\t\tcategoryId,\n\t\tgetName = defaultGetName,\n\t\tgetTitle = defaultGetTitle,\n\t\tgetDescription = defaultGetDescription,\n\t\tgetKeywords = defaultGetKeywords,\n\t\thasCategory = defaultHasCategory,\n\t\tonlyFilterByCategory,\n\t} = config;\n\n\tlet rank =\n\t\tcategoryId === PATTERN_DEFAULT_CATEGORY ||\n\t\tcategoryId === TEMPLATE_PART_ALL_AREAS_CATEGORY ||\n\t\t( categoryId === PATTERN_USER_CATEGORY &&\n\t\t\titem.type === PATTERN_TYPES.user ) ||\n\t\thasCategory( item, categoryId )\n\t\t\t? 1\n\t\t\t: 0;\n\n\t// If an item doesn't belong to the current category or we don't have\n\t// search terms to filter by, return the initial rank value.\n\tif ( ! rank || onlyFilterByCategory ) {\n\t\treturn rank;\n\t}\n\n\tconst name = getName( item );\n\tconst title = getTitle( item );\n\tconst description = getDescription( item );\n\tconst keywords = getKeywords( item );\n\n\tconst normalizedSearchInput = normalizeString( searchTerm );\n\tconst normalizedTitle = normalizeString( title );\n\n\t// Prefers exact matches\n\t// Then prefers if the beginning of the title matches the search term\n\t// name, keywords, description matches 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 = [ name, title, description, ...keywords ].join( ' ' );\n\t\tconst normalizedSearchTerms = extractWords( 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\treturn rank;\n}\n","/**\n * WordPress dependencies\n */\nimport { parse } from '@wordpress/blocks';\nimport { useSelect, createSelector } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { filterOutDuplicatesByName } from './utils';\nimport {\n\tEXCLUDED_PATTERN_SOURCES,\n\tPATTERN_TYPES,\n\tPATTERN_SYNC_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { searchItems } from './search-items';\nimport { store as editSiteStore } from '../../store';\n\nconst EMPTY_PATTERN_LIST = [];\n\nconst selectTemplateParts = createSelector(\n\t( select, categoryId, search = '' ) => {\n\t\tconst { getEntityRecords, isResolving: isResolvingSelector } =\n\t\t\tselect( coreStore );\n\t\tconst { __experimentalGetDefaultTemplatePartAreas } =\n\t\t\tselect( editorStore );\n\t\tconst query = { per_page: -1 };\n\t\tconst templateParts =\n\t\t\tgetEntityRecords( 'postType', TEMPLATE_PART_POST_TYPE, query ) ??\n\t\t\tEMPTY_PATTERN_LIST;\n\n\t\t// In the case where a custom template part area has been removed we need\n\t\t// the current list of areas to cross check against so orphaned template\n\t\t// parts can be treated as uncategorized.\n\t\tconst knownAreas = __experimentalGetDefaultTemplatePartAreas() || [];\n\t\tconst templatePartAreas = knownAreas.map( ( area ) => area.area );\n\n\t\tconst templatePartHasCategory = ( item, category ) => {\n\t\t\tif ( category !== TEMPLATE_PART_AREA_DEFAULT_CATEGORY ) {\n\t\t\t\treturn item.area === category;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\titem.area === category ||\n\t\t\t\t! templatePartAreas.includes( item.area )\n\t\t\t);\n\t\t};\n\n\t\tconst isResolving = isResolvingSelector( 'getEntityRecords', [\n\t\t\t'postType',\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\tquery,\n\t\t] );\n\n\t\tconst patterns = searchItems( templateParts, search, {\n\t\t\tcategoryId,\n\t\t\thasCategory: templatePartHasCategory,\n\t\t} );\n\n\t\treturn { patterns, isResolving };\n\t},\n\t( select ) => [\n\t\tselect( coreStore ).getEntityRecords(\n\t\t\t'postType',\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t{\n\t\t\t\tper_page: -1,\n\t\t\t}\n\t\t),\n\t\tselect( coreStore ).isResolving( 'getEntityRecords', [\n\t\t\t'postType',\n\t\t\tTEMPLATE_PART_POST_TYPE,\n\t\t\t{ per_page: -1 },\n\t\t] ),\n\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t]\n);\n\nconst selectThemePatterns = createSelector(\n\t( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\tconst { isResolving: isResolvingSelector } = select( coreStore );\n\t\tconst settings = getSettings();\n\t\tconst blockPatterns =\n\t\t\tsettings.__experimentalAdditionalBlockPatterns ??\n\t\t\tsettings.__experimentalBlockPatterns;\n\n\t\tconst restBlockPatterns = select( coreStore ).getBlockPatterns();\n\n\t\tconst patterns = [\n\t\t\t...( blockPatterns || [] ),\n\t\t\t...( restBlockPatterns || [] ),\n\t\t]\n\t\t\t.filter(\n\t\t\t\t( pattern ) =>\n\t\t\t\t\t! EXCLUDED_PATTERN_SOURCES.includes( pattern.source )\n\t\t\t)\n\t\t\t.filter( filterOutDuplicatesByName )\n\t\t\t.filter( ( pattern ) => pattern.inserter !== false )\n\t\t\t.map( ( pattern ) => ( {\n\t\t\t\t...pattern,\n\t\t\t\tkeywords: pattern.keywords || [],\n\t\t\t\ttype: PATTERN_TYPES.theme,\n\t\t\t\tblocks: parse( pattern.content, {\n\t\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t\t} ),\n\t\t\t} ) );\n\t\treturn {\n\t\t\tpatterns,\n\t\t\tisResolving: isResolvingSelector( 'getBlockPatterns' ),\n\t\t};\n\t},\n\t( select ) => [\n\t\tselect( coreStore ).getBlockPatterns(),\n\t\tselect( coreStore ).isResolving( 'getBlockPatterns' ),\n\t\tunlock( select( editSiteStore ) ).getSettings(),\n\t]\n);\n\nconst selectPatterns = createSelector(\n\t( select, categoryId, syncStatus, search = '' ) => {\n\t\tconst {\n\t\t\tpatterns: themePatterns,\n\t\t\tisResolving: isResolvingThemePatterns,\n\t\t} = selectThemePatterns( select );\n\t\tconst {\n\t\t\tpatterns: userPatterns,\n\t\t\tisResolving: isResolvingUserPatterns,\n\t\t\tcategories: userPatternCategories,\n\t\t} = selectUserPatterns( select );\n\n\t\tlet patterns = [\n\t\t\t...( themePatterns || [] ),\n\t\t\t...( userPatterns || [] ),\n\t\t];\n\n\t\tif ( syncStatus ) {\n\t\t\t// User patterns can have their sync statuses checked directly\n\t\t\t// Non-user patterns are all unsynced for the time being.\n\t\t\tpatterns = patterns.filter( ( pattern ) => {\n\t\t\t\treturn pattern.type === PATTERN_TYPES.user\n\t\t\t\t\t? ( pattern.wp_pattern_sync_status ||\n\t\t\t\t\t\t\tPATTERN_SYNC_TYPES.full ) === syncStatus\n\t\t\t\t\t: syncStatus === PATTERN_SYNC_TYPES.unsynced;\n\t\t\t} );\n\t\t}\n\n\t\tif ( categoryId ) {\n\t\t\tpatterns = searchItems( patterns, search, {\n\t\t\t\tcategoryId,\n\t\t\t\thasCategory: ( item, currentCategory ) => {\n\t\t\t\t\tif ( item.type === PATTERN_TYPES.user ) {\n\t\t\t\t\t\treturn item.wp_pattern_category.some(\n\t\t\t\t\t\t\t( catId ) =>\n\t\t\t\t\t\t\t\tuserPatternCategories.find(\n\t\t\t\t\t\t\t\t\t( cat ) => cat.id === catId\n\t\t\t\t\t\t\t\t)?.slug === currentCategory\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn item.categories?.includes( currentCategory );\n\t\t\t\t},\n\t\t\t} );\n\t\t} else {\n\t\t\tpatterns = searchItems( patterns, search, {\n\t\t\t\thasCategory: ( item ) => {\n\t\t\t\t\tif ( item.type === PATTERN_TYPES.user ) {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\tuserPatternCategories?.length &&\n\t\t\t\t\t\t\t( ! item.wp_pattern_category?.length ||\n\t\t\t\t\t\t\t\t! item.wp_pattern_category.some( ( catId ) =>\n\t\t\t\t\t\t\t\t\tuserPatternCategories.find(\n\t\t\t\t\t\t\t\t\t\t( cat ) => cat.id === catId\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);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn ! item.hasOwnProperty( 'categories' );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\t\treturn {\n\t\t\tpatterns,\n\t\t\tisResolving: isResolvingThemePatterns || isResolvingUserPatterns,\n\t\t};\n\t},\n\t( select ) => [\n\t\tselectThemePatterns( select ),\n\t\tselectUserPatterns( select ),\n\t]\n);\n\nconst selectUserPatterns = createSelector(\n\t( select, syncStatus, search = '' ) => {\n\t\tconst {\n\t\t\tgetEntityRecords,\n\t\t\tisResolving: isResolvingSelector,\n\t\t\tgetUserPatternCategories,\n\t\t} = select( coreStore );\n\n\t\tconst query = { per_page: -1 };\n\t\tconst patternPosts = getEntityRecords(\n\t\t\t'postType',\n\t\t\tPATTERN_TYPES.user,\n\t\t\tquery\n\t\t);\n\t\tconst userPatternCategories = getUserPatternCategories();\n\t\tconst categories = new Map();\n\t\tuserPatternCategories.forEach( ( userCategory ) =>\n\t\t\tcategories.set( userCategory.id, userCategory )\n\t\t);\n\t\tlet patterns = patternPosts ?? EMPTY_PATTERN_LIST;\n\t\tconst isResolving = isResolvingSelector( 'getEntityRecords', [\n\t\t\t'postType',\n\t\t\tPATTERN_TYPES.user,\n\t\t\tquery,\n\t\t] );\n\n\t\tif ( syncStatus ) {\n\t\t\tpatterns = patterns.filter(\n\t\t\t\t( pattern ) =>\n\t\t\t\t\tpattern.wp_pattern_sync_status ||\n\t\t\t\t\tPATTERN_SYNC_TYPES.full === syncStatus\n\t\t\t);\n\t\t}\n\n\t\tpatterns = searchItems( patterns, search, {\n\t\t\t// We exit user pattern retrieval early if we aren't in the\n\t\t\t// catch-all category for user created patterns, so it has\n\t\t\t// to be in the category.\n\t\t\thasCategory: () => true,\n\t\t} );\n\n\t\treturn {\n\t\t\tpatterns,\n\t\t\tisResolving,\n\t\t\tcategories: userPatternCategories,\n\t\t};\n\t},\n\t( select ) => [\n\t\tselect( coreStore ).getEntityRecords( 'postType', PATTERN_TYPES.user, {\n\t\t\tper_page: -1,\n\t\t} ),\n\t\tselect( coreStore ).isResolving( 'getEntityRecords', [\n\t\t\t'postType',\n\t\t\tPATTERN_TYPES.user,\n\t\t\t{ per_page: -1 },\n\t\t] ),\n\t\tselect( coreStore ).getUserPatternCategories(),\n\t]\n);\n\nexport const usePatterns = (\n\tpostType,\n\tcategoryId,\n\t{ search = '', syncStatus } = {}\n) => {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tif ( postType === TEMPLATE_PART_POST_TYPE ) {\n\t\t\t\treturn selectTemplateParts( select, categoryId, search );\n\t\t\t} else if ( postType === PATTERN_TYPES.user && !! categoryId ) {\n\t\t\t\tconst appliedCategory =\n\t\t\t\t\tcategoryId === 'uncategorized' ? '' : categoryId;\n\t\t\t\treturn selectPatterns(\n\t\t\t\t\tselect,\n\t\t\t\t\tappliedCategory,\n\t\t\t\t\tsyncStatus,\n\t\t\t\t\tsearch\n\t\t\t\t);\n\t\t\t} else if ( postType === PATTERN_TYPES.user ) {\n\t\t\t\treturn selectUserPatterns( select, syncStatus, search );\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tpatterns: EMPTY_PATTERN_LIST,\n\t\t\t\tisResolving: false,\n\t\t\t};\n\t\t},\n\t\t[ categoryId, postType, search, syncStatus ]\n\t);\n};\n\nexport default usePatterns;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbol = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-1 1.4l-5.6 5.6c-.1.1-.3.1-.4 0l-5.6-5.6c-.1-.1-.1-.3 0-.4l5.6-5.6s.1-.1.2-.1.1 0 .2.1l5.6 5.6c.1.1.1.3 0 .4zm-16.6-.4L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n\nexport default symbol;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst symbolFilled = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M21.3 10.8l-5.6-5.6c-.7-.7-1.8-.7-2.5 0l-5.6 5.6c-.7.7-.7 1.8 0 2.5l5.6 5.6c.3.3.8.5 1.2.5s.9-.2 1.2-.5l5.6-5.6c.8-.7.8-1.9.1-2.5zm-17.6 1L10 5.5l-1-1-6.3 6.3c-.7.7-.7 1.8 0 2.5L9 19.5l1.1-1.1-6.3-6.3c-.2 0-.2-.2-.1-.3z\" />\n\t</SVG>\n);\n\nexport default symbolFilled;\n","/**\n * WordPress dependencies\n */\nimport { 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 { DropdownMenu } from '@wordpress/components';\nimport { useState, useRef } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { symbol, symbolFilled, upload } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport {\n\tprivateApis as editPatternsPrivateApis,\n\tstore as patternsStore,\n} from '@wordpress/patterns';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\n\nconst { useHistory } = unlock( routerPrivateApis );\nconst { CreatePatternModal, useAddPatternCategory } = unlock(\n\teditPatternsPrivateApis\n);\nconst { CreateTemplatePartModal } = unlock( editorPrivateApis );\n\nexport default function AddNewPattern() {\n\tconst history = useHistory();\n\tconst [ showPatternModal, setShowPatternModal ] = useState( false );\n\tconst [ showTemplatePartModal, setShowTemplatePartModal ] =\n\t\tuseState( false );\n\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\tconst { createPatternFromFile } = unlock( useDispatch( patternsStore ) );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst patternUploadInputRef = useRef();\n\tconst {\n\t\tisBlockBasedTheme,\n\t\taddNewPatternLabel,\n\t\taddNewTemplatePartLabel,\n\t\tcanCreatePattern,\n\t\tcanCreateTemplatePart,\n\t} = useSelect( ( select ) => {\n\t\tconst { getCurrentTheme, getPostType, canUser } = select( coreStore );\n\t\treturn {\n\t\t\tisBlockBasedTheme: getCurrentTheme()?.is_block_theme,\n\t\t\taddNewPatternLabel: getPostType( PATTERN_TYPES.user )?.labels\n\t\t\t\t?.add_new_item,\n\t\t\taddNewTemplatePartLabel: getPostType( TEMPLATE_PART_POST_TYPE )\n\t\t\t\t?.labels?.add_new_item,\n\t\t\t// Blocks refers to the wp_block post type, this checks the ability to create a post of that type.\n\t\t\tcanCreatePattern: canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: PATTERN_TYPES.user,\n\t\t\t} ),\n\t\t\tcanCreateTemplatePart: canUser( 'create', {\n\t\t\t\tkind: 'postType',\n\t\t\t\tname: TEMPLATE_PART_POST_TYPE,\n\t\t\t} ),\n\t\t};\n\t}, [] );\n\n\tfunction handleCreatePattern( { pattern } ) {\n\t\tsetShowPatternModal( false );\n\n\t\thistory.push( {\n\t\t\tpostId: pattern.id,\n\t\t\tpostType: PATTERN_TYPES.user,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t}\n\n\tfunction handleCreateTemplatePart( templatePart ) {\n\t\tsetShowTemplatePartModal( false );\n\n\t\t// Navigate to the created template part editor.\n\t\thistory.push( {\n\t\t\tpostId: templatePart.id,\n\t\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\t\tcanvas: 'edit',\n\t\t} );\n\t}\n\n\tfunction handleError() {\n\t\tsetShowPatternModal( false );\n\t\tsetShowTemplatePartModal( false );\n\t}\n\n\tconst controls = [];\n\tif ( canCreatePattern ) {\n\t\tcontrols.push( {\n\t\t\ticon: symbol,\n\t\t\tonClick: () => setShowPatternModal( true ),\n\t\t\ttitle: addNewPatternLabel,\n\t\t} );\n\t}\n\n\tif ( isBlockBasedTheme && canCreateTemplatePart ) {\n\t\tcontrols.push( {\n\t\t\ticon: symbolFilled,\n\t\t\tonClick: () => setShowTemplatePartModal( true ),\n\t\t\ttitle: addNewTemplatePartLabel,\n\t\t} );\n\t}\n\n\tif ( canCreatePattern ) {\n\t\tcontrols.push( {\n\t\t\ticon: upload,\n\t\t\tonClick: () => {\n\t\t\t\tpatternUploadInputRef.current.click();\n\t\t\t},\n\t\t\ttitle: __( 'Import pattern from JSON' ),\n\t\t} );\n\t}\n\n\tconst { categoryMap, findOrCreateTerm } = useAddPatternCategory();\n\tif ( controls.length === 0 ) {\n\t\treturn null;\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ addNewPatternLabel && (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\tcontrols={ controls }\n\t\t\t\t\ticon={ null }\n\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\tvariant: 'primary',\n\t\t\t\t\t\tshowTooltip: false,\n\t\t\t\t\t\t__next40pxDefaultSize: true,\n\t\t\t\t\t} }\n\t\t\t\t\ttext={ addNewPatternLabel }\n\t\t\t\t\tlabel={ addNewPatternLabel }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showPatternModal && (\n\t\t\t\t<CreatePatternModal\n\t\t\t\t\tonClose={ () => setShowPatternModal( false ) }\n\t\t\t\t\tonSuccess={ handleCreatePattern }\n\t\t\t\t\tonError={ handleError }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ showTemplatePartModal && (\n\t\t\t\t<CreateTemplatePartModal\n\t\t\t\t\tcloseModal={ () => setShowTemplatePartModal( false ) }\n\t\t\t\t\tblocks={ [] }\n\t\t\t\t\tonCreate={ handleCreateTemplatePart }\n\t\t\t\t\tonError={ handleError }\n\t\t\t\t/>\n\t\t\t) }\n\n\t\t\t<input\n\t\t\t\ttype=\"file\"\n\t\t\t\taccept=\".json\"\n\t\t\t\thidden\n\t\t\t\tref={ patternUploadInputRef }\n\t\t\t\tonChange={ async ( event ) => {\n\t\t\t\t\tconst file = event.target.files?.[ 0 ];\n\t\t\t\t\tif ( ! file ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\tparams: { postType, categoryId },\n\t\t\t\t\t\t} = history.getLocationWithParams();\n\t\t\t\t\t\tlet currentCategoryId;\n\t\t\t\t\t\t// When we're not handling template parts, we should\n\t\t\t\t\t\t// add or create the proper pattern category.\n\t\t\t\t\t\tif ( postType !== TEMPLATE_PART_POST_TYPE ) {\n\t\t\t\t\t\t\tconst currentCategory = categoryMap\n\t\t\t\t\t\t\t\t.values()\n\t\t\t\t\t\t\t\t.find( ( term ) => term.name === categoryId );\n\t\t\t\t\t\t\tif ( currentCategory ) {\n\t\t\t\t\t\t\t\tcurrentCategoryId =\n\t\t\t\t\t\t\t\t\tcurrentCategory.id ||\n\t\t\t\t\t\t\t\t\t( await findOrCreateTerm(\n\t\t\t\t\t\t\t\t\t\tcurrentCategory.label\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\tconst pattern = await createPatternFromFile(\n\t\t\t\t\t\t\tfile,\n\t\t\t\t\t\t\tcurrentCategoryId\n\t\t\t\t\t\t\t\t? [ currentCategoryId ]\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// Navigate to the All patterns category for the newly created pattern\n\t\t\t\t\t\t// if we're not on that page already and if we're not in the `my-patterns`\n\t\t\t\t\t\t// category.\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t! currentCategoryId &&\n\t\t\t\t\t\t\tcategoryId !== 'my-patterns'\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\tpostType: PATTERN_TYPES.user,\n\t\t\t\t\t\t\t\tcategoryId: PATTERN_DEFAULT_CATEGORY,\n\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcreateSuccessNotice(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The imported pattern's title.\n\t\t\t\t\t\t\t\t__( 'Imported \"%s\" from JSON.' ),\n\t\t\t\t\t\t\t\tpattern.title.raw\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\t\tid: 'import-pattern-success',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t} catch ( err ) {\n\t\t\t\t\t\tcreateErrorNotice( err.message, {\n\t\t\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t\t\t\tid: 'import-pattern-error',\n\t\t\t\t\t\t} );\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tevent.target.value = '';\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 { useMemo } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport useDefaultPatternCategories from './use-default-pattern-categories';\nimport useThemePatterns from './use-theme-patterns';\nimport usePatterns from '../page-patterns/use-patterns';\nimport {\n\tPATTERN_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_USER_CATEGORY,\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n} from '../../utils/constants';\n\nexport default function usePatternCategories() {\n\tconst defaultCategories = useDefaultPatternCategories();\n\tdefaultCategories.push( {\n\t\tname: TEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\t\tlabel: __( 'Uncategorized' ),\n\t} );\n\tconst themePatterns = useThemePatterns();\n\tconst { patterns: userPatterns, categories: userPatternCategories } =\n\t\tusePatterns( PATTERN_TYPES.user );\n\n\tconst patternCategories = useMemo( () => {\n\t\tconst categoryMap = {};\n\t\tconst categoriesWithCounts = [];\n\n\t\t// Create a map for easier counting of patterns in categories.\n\t\tdefaultCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\t\tuserPatternCategories.forEach( ( category ) => {\n\t\t\tif ( ! categoryMap[ category.name ] ) {\n\t\t\t\tcategoryMap[ category.name ] = { ...category, count: 0 };\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect theme registered patterns.\n\t\tthemePatterns.forEach( ( pattern ) => {\n\t\t\tpattern.categories?.forEach( ( category ) => {\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif ( ! pattern.categories?.length ) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Update the category counts to reflect user registered patterns.\n\t\tuserPatterns.forEach( ( pattern ) => {\n\t\t\tpattern.wp_pattern_category?.forEach( ( catId ) => {\n\t\t\t\tconst category = userPatternCategories.find(\n\t\t\t\t\t( cat ) => cat.id === catId\n\t\t\t\t)?.name;\n\t\t\t\tif ( categoryMap[ category ] ) {\n\t\t\t\t\tcategoryMap[ category ].count += 1;\n\t\t\t\t}\n\t\t\t} );\n\t\t\t// If the pattern has no categories, add it to uncategorized.\n\t\t\tif (\n\t\t\t\t! pattern.wp_pattern_category?.length ||\n\t\t\t\t! pattern.wp_pattern_category.some( ( catId ) =>\n\t\t\t\t\tuserPatternCategories.find( ( cat ) => cat.id === catId )\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tcategoryMap.uncategorized.count += 1;\n\t\t\t}\n\t\t} );\n\n\t\t// Filter categories so we only have those containing patterns.\n\t\t[ ...defaultCategories, ...userPatternCategories ].forEach(\n\t\t\t( category ) => {\n\t\t\t\tif (\n\t\t\t\t\tcategoryMap[ category.name ].count &&\n\t\t\t\t\t! categoriesWithCounts.find(\n\t\t\t\t\t\t( cat ) => cat.name === category.name\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\tcategoriesWithCounts.push( categoryMap[ category.name ] );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\tconst sortedCategories = categoriesWithCounts.sort( ( a, b ) =>\n\t\t\ta.label.localeCompare( b.label )\n\t\t);\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_USER_CATEGORY,\n\t\t\tlabel: __( 'My patterns' ),\n\t\t\tcount: userPatterns.length,\n\t\t} );\n\n\t\tsortedCategories.unshift( {\n\t\t\tname: PATTERN_DEFAULT_CATEGORY,\n\t\t\tlabel: __( 'All patterns' ),\n\t\t\tdescription: __( 'A list of all patterns from all sources.' ),\n\t\t\tcount: themePatterns.length + userPatterns.length,\n\t\t} );\n\n\t\treturn sortedCategories;\n\t}, [\n\t\tdefaultCategories,\n\t\tthemePatterns,\n\t\tuserPatternCategories,\n\t\tuserPatterns,\n\t] );\n\n\treturn { patternCategories, hasPatterns: !! patternCategories.length };\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function useDefaultPatternCategories() {\n\tconst blockPatternCategories = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\tconst settings = getSettings();\n\n\t\treturn (\n\t\t\tsettings.__experimentalAdditionalBlockPatternCategories ??\n\t\t\tsettings.__experimentalBlockPatternCategories\n\t\t);\n\t} );\n\n\tconst restBlockPatternCategories = useSelect( ( select ) =>\n\t\tselect( coreStore ).getBlockPatternCategories()\n\t);\n\n\treturn [\n\t\t...( blockPatternCategories || [] ),\n\t\t...( restBlockPatternCategories || [] ),\n\t];\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { filterOutDuplicatesByName } from '../page-patterns/utils';\nimport { EXCLUDED_PATTERN_SOURCES } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\n\nexport default function useThemePatterns() {\n\tconst blockPatterns = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn (\n\t\t\tgetSettings().__experimentalAdditionalBlockPatterns ??\n\t\t\tgetSettings().__experimentalBlockPatterns\n\t\t);\n\t} );\n\n\tconst restBlockPatterns = useSelect( ( select ) =>\n\t\tselect( coreStore ).getBlockPatterns()\n\t);\n\n\tconst patterns = useMemo(\n\t\t() =>\n\t\t\t[ ...( blockPatterns || [] ), ...( restBlockPatterns || [] ) ]\n\t\t\t\t.filter(\n\t\t\t\t\t( pattern ) =>\n\t\t\t\t\t\t! EXCLUDED_PATTERN_SOURCES.includes( pattern.source )\n\t\t\t\t)\n\t\t\t\t.filter( filterOutDuplicatesByName )\n\t\t\t\t.filter( ( pattern ) => pattern.inserter !== false ),\n\t\t[ blockPatterns, restBlockPatterns ]\n\t);\n\n\treturn patterns;\n}\n","/**\n * WordPress dependencies\n */\nimport { MenuItem } from '@wordpress/components';\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as patternsPrivateApis } from '@wordpress/patterns';\n/**\n * Internal dependencies\n */\nimport usePatternCategories from '../sidebar-navigation-screen-patterns/use-pattern-categories';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { RenamePatternCategoryModal } = unlock( patternsPrivateApis );\n\nexport default function RenameCategoryMenuItem( { category, onClose } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={ () => setIsModalOpen( true ) }>\n\t\t\t\t{ __( 'Rename' ) }\n\t\t\t</MenuItem>\n\t\t\t{ isModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tcategory={ category }\n\t\t\t\t\tonClose={ () => {\n\t\t\t\t\t\tsetIsModalOpen( false );\n\t\t\t\t\t\tonClose();\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction RenameModal( { category, onClose } ) {\n\t// User created pattern categories have their properties updated when\n\t// retrieved via `getUserPatternCategories`. The rename modal expects an\n\t// object that will match the pattern category entity.\n\tconst normalizedCategory = {\n\t\tid: category.id,\n\t\tslug: category.slug,\n\t\tname: category.label,\n\t};\n\n\t// Optimization - only use pattern categories when the modal is open.\n\tconst existingCategories = usePatternCategories();\n\n\treturn (\n\t\t<RenamePatternCategoryModal\n\t\t\tcategory={ normalizedCategory }\n\t\t\texistingCategories={ existingCategories }\n\t\t\tonClose={ onClose }\n\t\t\toverlayClassName=\"edit-site-list__rename-modal\"\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tMenuItem,\n\t__experimentalConfirmDialog as ConfirmDialog,\n} from '@wordpress/components';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useDispatch } from '@wordpress/data';\nimport { useState } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { PATTERN_TYPES, PATTERN_DEFAULT_CATEGORY } from '../../utils/constants';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function DeleteCategoryMenuItem( { category, onClose } ) {\n\tconst [ isModalOpen, setIsModalOpen ] = useState( false );\n\tconst history = useHistory();\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst { deleteEntityRecord, invalidateResolution } =\n\t\tuseDispatch( coreStore );\n\n\tconst onDelete = async () => {\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'taxonomy',\n\t\t\t\t'wp_pattern_category',\n\t\t\t\tcategory.id,\n\t\t\t\t{ force: true },\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// Prevent the need to refresh the page to get up-to-date categories\n\t\t\t// and pattern categorization.\n\t\t\tinvalidateResolution( 'getUserPatternCategories' );\n\t\t\tinvalidateResolution( 'getEntityRecords', [\n\t\t\t\t'postType',\n\t\t\t\tPATTERN_TYPES.user,\n\t\t\t\t{ per_page: -1 },\n\t\t\t] );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: The pattern category's name */\n\t\t\t\t\t__( '\"%s\" deleted.' ),\n\t\t\t\t\tcategory.label\n\t\t\t\t),\n\t\t\t\t{ type: 'snackbar', id: 'pattern-category-delete' }\n\t\t\t);\n\n\t\t\tonClose?.();\n\t\t\thistory.push( {\n\t\t\t\tpostType: PATTERN_TYPES.user,\n\t\t\t\tcategoryId: PATTERN_DEFAULT_CATEGORY,\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __(\n\t\t\t\t\t\t\t'An error occurred while deleting the pattern category.'\n\t\t\t\t\t );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t\tid: 'pattern-category-delete',\n\t\t\t} );\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem isDestructive onClick={ () => setIsModalOpen( true ) }>\n\t\t\t\t{ __( 'Delete' ) }\n\t\t\t</MenuItem>\n\t\t\t<ConfirmDialog\n\t\t\t\tisOpen={ isModalOpen }\n\t\t\t\tonConfirm={ onDelete }\n\t\t\t\tonCancel={ () => setIsModalOpen( false ) }\n\t\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\t\tclassName=\"edit-site-patterns__delete-modal\"\n\t\t\t\ttitle={ sprintf(\n\t\t\t\t\t// translators: %s: The pattern category's name.\n\t\t\t\t\t__( 'Delete \"%s\"?' ),\n\t\t\t\t\tdecodeEntities( category.label )\n\t\t\t\t) }\n\t\t\t\tsize=\"medium\"\n\t\t\t\t__experimentalHideHeader={ false }\n\t\t\t>\n\t\t\t\t{ sprintf(\n\t\t\t\t\t// translators: %s: The pattern category's name.\n\t\t\t\t\t__(\n\t\t\t\t\t\t'Are you sure you want to delete the category \"%s\"? The patterns will not be deleted.'\n\t\t\t\t\t),\n\t\t\t\t\tdecodeEntities( category.label )\n\t\t\t\t) }\n\t\t\t</ConfirmDialog>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tDropdownMenu,\n\tMenuGroup,\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { store as editorStore } from '@wordpress/editor';\nimport { useSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { moreVertical } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport AddNewPattern from '../add-new-pattern';\nimport RenameCategoryMenuItem from './rename-category-menu-item';\nimport DeleteCategoryMenuItem from './delete-category-menu-item';\nimport usePatternCategories from '../sidebar-navigation-screen-patterns/use-pattern-categories';\nimport { TEMPLATE_PART_POST_TYPE, PATTERN_TYPES } from '../../utils/constants';\n\nexport default function PatternsHeader( {\n\tcategoryId,\n\ttype,\n\ttitleId,\n\tdescriptionId,\n} ) {\n\tconst { patternCategories } = usePatternCategories();\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\n\tlet title, description, patternCategory;\n\tif ( type === TEMPLATE_PART_POST_TYPE ) {\n\t\tconst templatePartArea = templatePartAreas.find(\n\t\t\t( area ) => area.area === categoryId\n\t\t);\n\t\ttitle = templatePartArea?.label || __( 'All Template Parts' );\n\t\tdescription =\n\t\t\ttemplatePartArea?.description ||\n\t\t\t__( 'Includes every template part defined for any area.' );\n\t} else if ( type === PATTERN_TYPES.user && !! categoryId ) {\n\t\tpatternCategory = patternCategories.find(\n\t\t\t( category ) => category.name === categoryId\n\t\t);\n\t\ttitle = patternCategory?.label;\n\t\tdescription = patternCategory?.description;\n\t}\n\n\tif ( ! title ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<VStack className=\"edit-site-patterns__section-header\" spacing={ 1 }>\n\t\t\t<HStack\n\t\t\t\tjustify=\"space-between\"\n\t\t\t\tclassName=\"edit-site-patterns__title\"\n\t\t\t>\n\t\t\t\t<Heading\n\t\t\t\t\tas=\"h2\"\n\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\tid={ titleId }\n\t\t\t\t\tweight={ 500 }\n\t\t\t\t\ttruncate\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Heading>\n\t\t\t\t<HStack expanded={ false }>\n\t\t\t\t\t<AddNewPattern />\n\t\t\t\t\t{ !! patternCategory?.id && (\n\t\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\t\tclassName: 'edit-site-patterns__button',\n\t\t\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t\t\t/* translators: %s: pattern category name */\n\t\t\t\t\t\t\t\t\t__( 'Action menu for %s pattern category' ),\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tsize: 'compact',\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t\t<RenameCategoryMenuItem\n\t\t\t\t\t\t\t\t\t\tcategory={ patternCategory }\n\t\t\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<DeleteCategoryMenuItem\n\t\t\t\t\t\t\t\t\t\tcategory={ patternCategory }\n\t\t\t\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t\t\t\t/>\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</DropdownMenu>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t</HStack>\n\t\t\t{ description ? (\n\t\t\t\t<Text\n\t\t\t\t\tvariant=\"muted\"\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tid={ descriptionId }\n\t\t\t\t\tclassName=\"edit-site-patterns__sub-title\"\n\t\t\t\t>\n\t\t\t\t\t{ description }\n\t\t\t\t</Text>\n\t\t\t) : null }\n\t\t</VStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst plugins = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M10.5 4v4h3V4H15v4h1.5a1 1 0 011 1v4l-3 4v2a1 1 0 01-1 1h-3a1 1 0 01-1-1v-2l-3-4V9a1 1 0 011-1H9V4h1.5zm.5 12.5v2h2v-2l3-4v-3H8v3l3 4z\" />\n\t</SVG>\n);\n\nexport default plugins;\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 * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport {\n\tcommentAuthorAvatar as authorIcon,\n\tlayout as themeIcon,\n\tplugins as pluginIcon,\n\tglobe as globeIcon,\n} from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_ORIGINS } from '../../utils/constants';\n\n/** @typedef {'wp_template'|'wp_template_part'} TemplateType */\n\n/**\n * @typedef {'theme'|'plugin'|'site'|'user'} AddedByType\n *\n * @typedef AddedByData\n * @type {Object}\n * @property {AddedByType} type The type of the data.\n * @property {JSX.Element} icon The icon to display.\n * @property {string} [imageUrl] The optional image URL to display.\n * @property {string} [text] The text to display.\n * @property {boolean} isCustomized Whether the template has been customized.\n *\n * @param {TemplateType} postType The template post type.\n * @param {number} postId The template post id.\n * @return {AddedByData} The added by object or null.\n */\nexport function useAddedBy( postType, postId ) {\n\treturn useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tgetEntityRecord,\n\t\t\t\tgetMedia,\n\t\t\t\tgetUser,\n\t\t\t\tgetEditedEntityRecord,\n\t\t\t} = select( coreStore );\n\t\t\tconst template = getEditedEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId\n\t\t\t);\n\t\t\tconst originalSource = template?.original_source;\n\t\t\tconst authorText = template?.author_text;\n\n\t\t\tswitch ( originalSource ) {\n\t\t\t\tcase 'theme': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: themeIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'plugin': {\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: pluginIcon,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized:\n\t\t\t\t\t\t\ttemplate.source === TEMPLATE_ORIGINS.custom,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase 'site': {\n\t\t\t\t\tconst siteData = getEntityRecord(\n\t\t\t\t\t\t'root',\n\t\t\t\t\t\t'__unstableBase'\n\t\t\t\t\t);\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: originalSource,\n\t\t\t\t\t\ticon: globeIcon,\n\t\t\t\t\t\timageUrl: siteData?.site_logo\n\t\t\t\t\t\t\t? getMedia( siteData.site_logo )?.source_url\n\t\t\t\t\t\t\t: undefined,\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tconst user = getUser( template.author );\n\t\t\t\t\treturn {\n\t\t\t\t\t\ttype: 'user',\n\t\t\t\t\t\ticon: authorIcon,\n\t\t\t\t\t\timageUrl: user?.avatar_urls?.[ 48 ],\n\t\t\t\t\t\ttext: authorText,\n\t\t\t\t\t\tisCustomized: false,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ postType, postId ]\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\tButton,\n\tTooltip,\n\tFlex,\n} from '@wordpress/components';\nimport { __, _x } from '@wordpress/i18n';\nimport { useState, useMemo, useId, useEffect } from '@wordpress/element';\nimport {\n\tBlockPreview,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';\nimport { Icon, lockSmall } from '@wordpress/icons';\nimport { usePrevious } from '@wordpress/compose';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { privateApis as editorPrivateApis } from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { parse } from '@wordpress/blocks';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { Async } from '../async';\nimport Page from '../page';\nimport {\n\tLAYOUT_GRID,\n\tLAYOUT_TABLE,\n\tLAYOUT_LIST,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tPATTERN_SYNC_TYPES,\n\tPATTERN_DEFAULT_CATEGORY,\n\tOPERATOR_IS,\n} from '../../utils/constants';\nimport usePatternSettings from './use-pattern-settings';\nimport { unlock } from '../../lock-unlock';\nimport usePatterns from './use-patterns';\nimport PatternsHeader from './header';\nimport { useLink } from '../routes/link';\nimport { useAddedBy } from '../page-templates/hooks';\nimport { useEditPostAction } from '../dataviews-actions';\nimport { defaultGetTitle } from './search-items';\n\nconst { ExperimentalBlockEditorProvider, useGlobalStyle } = unlock(\n\tblockEditorPrivateApis\n);\nconst { usePostActions } = unlock( editorPrivateApis );\nconst { useLocation } = unlock( routerPrivateApis );\n\nconst EMPTY_ARRAY = [];\nconst defaultLayouts = {\n\t[ LAYOUT_TABLE ]: {\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tstyles: {\n\t\t\t\tpreview: {\n\t\t\t\t\twidth: '1%',\n\t\t\t\t},\n\t\t\t\tauthor: {\n\t\t\t\t\twidth: '1%',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t[ LAYOUT_GRID ]: {\n\t\tlayout: {\n\t\t\tmediaField: 'preview',\n\t\t\tprimaryField: 'title',\n\t\t\tbadgeFields: [ 'sync-status' ],\n\t\t},\n\t},\n};\nconst DEFAULT_VIEW = {\n\ttype: LAYOUT_GRID,\n\tsearch: '',\n\tpage: 1,\n\tperPage: 20,\n\tlayout: defaultLayouts[ LAYOUT_GRID ].layout,\n\tfields: [ 'title', 'sync-status' ],\n\tfilters: [],\n};\n\nconst SYNC_FILTERS = [\n\t{\n\t\tvalue: PATTERN_SYNC_TYPES.full,\n\t\tlabel: _x( 'Synced', 'pattern (singular)' ),\n\t\tdescription: __( 'Patterns that are kept in sync across the site.' ),\n\t},\n\t{\n\t\tvalue: PATTERN_SYNC_TYPES.unsynced,\n\t\tlabel: _x( 'Not synced', 'pattern (singular)' ),\n\t\tdescription: __(\n\t\t\t'Patterns that can be changed freely without affecting the site.'\n\t\t),\n\t},\n];\n\nfunction PreviewWrapper( { item, onClick, ariaDescribedBy, children } ) {\n\treturn (\n\t\t<button\n\t\t\tclassName=\"page-patterns-preview-field__button\"\n\t\t\ttype=\"button\"\n\t\t\tonClick={ item.type !== PATTERN_TYPES.theme ? onClick : undefined }\n\t\t\taria-label={ item.title }\n\t\t\taria-describedby={ ariaDescribedBy }\n\t\t\taria-disabled={ item.type === PATTERN_TYPES.theme }\n\t\t>\n\t\t\t{ children }\n\t\t</button>\n\t);\n}\n\nfunction Preview( { item, viewType } ) {\n\tconst descriptionId = useId();\n\tconst description = item.description || item?.excerpt?.raw;\n\tconst isUserPattern = item.type === PATTERN_TYPES.user;\n\tconst isTemplatePart = item.type === TEMPLATE_PART_POST_TYPE;\n\tconst [ backgroundColor ] = useGlobalStyle( 'color.background' );\n\tconst { onClick } = useLink( {\n\t\tpostType: item.type,\n\t\tpostId: isUserPattern || isTemplatePart ? item.id : item.name,\n\t\tcanvas: 'edit',\n\t} );\n\tconst blocks = useMemo( () => {\n\t\treturn (\n\t\t\titem.blocks ??\n\t\t\tparse( item.content.raw, {\n\t\t\t\t__unstableSkipMigrationLogs: true,\n\t\t\t} )\n\t\t);\n\t}, [ item?.content?.raw, item.blocks ] );\n\tconst isEmpty = ! blocks?.length;\n\n\treturn (\n\t\t<div\n\t\t\tclassName={ `page-patterns-preview-field is-viewtype-${ viewType }` }\n\t\t\tstyle={ { backgroundColor } }\n\t\t>\n\t\t\t<PreviewWrapper\n\t\t\t\titem={ item }\n\t\t\t\tonClick={ onClick }\n\t\t\t\tariaDescribedBy={ !! description ? descriptionId : undefined }\n\t\t\t>\n\t\t\t\t{ isEmpty && isTemplatePart && __( 'Empty template part' ) }\n\t\t\t\t{ isEmpty && ! isTemplatePart && __( 'Empty pattern' ) }\n\t\t\t\t{ ! isEmpty && (\n\t\t\t\t\t<Async>\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={ item.viewportWidth }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Async>\n\t\t\t\t) }\n\t\t\t</PreviewWrapper>\n\t\t\t{ !! description && (\n\t\t\t\t<div hidden id={ descriptionId }>\n\t\t\t\t\t{ description }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nfunction Author( { item, viewType } ) {\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\tconst { text, icon, imageUrl } = useAddedBy( item.type, item.id );\n\tconst withIcon = viewType !== LAYOUT_LIST;\n\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ withIcon && imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ withIcon && ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction Title( { item } ) {\n\tconst isUserPattern = item.type === PATTERN_TYPES.user;\n\tconst isTemplatePart = item.type === TEMPLATE_PART_POST_TYPE;\n\tconst { onClick } = useLink( {\n\t\tpostType: item.type,\n\t\tpostId: isUserPattern || isTemplatePart ? item.id : item.name,\n\t\tcanvas: 'edit',\n\t} );\n\tconst title = decodeEntities( defaultGetTitle( item ) );\n\treturn (\n\t\t<HStack alignment=\"center\" justify=\"flex-start\" spacing={ 2 }>\n\t\t\t<Flex\n\t\t\t\tas=\"div\"\n\t\t\t\tgap={ 0 }\n\t\t\t\tjustify=\"left\"\n\t\t\t\tclassName=\"edit-site-patterns__pattern-title\"\n\t\t\t>\n\t\t\t\t{ item.type === PATTERN_TYPES.theme ? (\n\t\t\t\t\ttitle\n\t\t\t\t) : (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"link\"\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\t// Required for the grid's roving tab index system.\n\t\t\t\t\t\t// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.\n\t\t\t\t\t\ttabIndex=\"-1\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Button>\n\t\t\t\t) }\n\t\t\t</Flex>\n\t\t\t{ item.type === PATTERN_TYPES.theme && (\n\t\t\t\t<Tooltip\n\t\t\t\t\tplacement=\"top\"\n\t\t\t\t\ttext={ __( 'This pattern cannot be edited.' ) }\n\t\t\t\t>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"edit-site-patterns__pattern-lock-icon\"\n\t\t\t\t\t\ticon={ lockSmall }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t</Tooltip>\n\t\t\t) }\n\t\t</HStack>\n\t);\n}\n\nexport default function DataviewsPatterns() {\n\tconst {\n\t\tparams: { postType, categoryId: categoryIdFromURL },\n\t} = useLocation();\n\tconst type = postType || PATTERN_TYPES.user;\n\tconst categoryId = categoryIdFromURL || PATTERN_DEFAULT_CATEGORY;\n\tconst [ view, setView ] = useState( DEFAULT_VIEW );\n\tconst previousCategoryId = usePrevious( categoryId );\n\tconst viewSyncStatus = view.filters?.find(\n\t\t( { field } ) => field === 'sync-status'\n\t)?.value;\n\tconst { patterns, isResolving } = usePatterns( type, categoryId, {\n\t\tsearch: view.search,\n\t\tsyncStatus: viewSyncStatus,\n\t} );\n\n\tconst { records } = useEntityRecords( 'postType', TEMPLATE_PART_POST_TYPE, {\n\t\tper_page: -1,\n\t} );\n\tconst authors = useMemo( () => {\n\t\tif ( ! records ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\tconst authorsSet = new Set();\n\t\trecords.forEach( ( template ) => {\n\t\t\tauthorsSet.add( template.author_text );\n\t\t} );\n\t\treturn Array.from( authorsSet ).map( ( author ) => ( {\n\t\t\tvalue: author,\n\t\t\tlabel: author,\n\t\t} ) );\n\t}, [ records ] );\n\n\tconst fields = useMemo( () => {\n\t\tconst _fields = [\n\t\t\t{\n\t\t\t\tlabel: __( 'Preview' ),\n\t\t\t\tid: 'preview',\n\t\t\t\trender: ( { item } ) => (\n\t\t\t\t\t<Preview item={ item } viewType={ view.type } />\n\t\t\t\t),\n\t\t\t\tenableSorting: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Title' ),\n\t\t\t\tid: 'title',\n\t\t\t\tgetValue: ( { item } ) => item.title?.raw || item.title,\n\t\t\t\trender: ( { item } ) => <Title item={ item } />,\n\t\t\t\tenableHiding: false,\n\t\t\t},\n\t\t];\n\n\t\tif ( type === PATTERN_TYPES.user ) {\n\t\t\t_fields.push( {\n\t\t\t\tlabel: __( 'Sync status' ),\n\t\t\t\tid: 'sync-status',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\tconst syncStatus =\n\t\t\t\t\t\t'wp_pattern_sync_status' in item\n\t\t\t\t\t\t\t? item.wp_pattern_sync_status ||\n\t\t\t\t\t\t\t PATTERN_SYNC_TYPES.full\n\t\t\t\t\t\t\t: PATTERN_SYNC_TYPES.unsynced;\n\t\t\t\t\t// User patterns can have their sync statuses checked directly.\n\t\t\t\t\t// Non-user patterns are all unsynced for the time being.\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={ `edit-site-patterns__field-sync-status-${ syncStatus }` }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSYNC_FILTERS.find(\n\t\t\t\t\t\t\t\t\t( { value } ) => value === syncStatus\n\t\t\t\t\t\t\t\t).label\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\telements: SYNC_FILTERS,\n\t\t\t\tfilterBy: {\n\t\t\t\t\toperators: [ OPERATOR_IS ],\n\t\t\t\t\tisPrimary: true,\n\t\t\t\t},\n\t\t\t\tenableSorting: false,\n\t\t\t} );\n\t\t} else if ( type === TEMPLATE_PART_POST_TYPE ) {\n\t\t\t_fields.push( {\n\t\t\t\tlabel: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\tgetValue: ( { item } ) => item.author_text,\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\treturn <Author viewType={ view.type } item={ item } />;\n\t\t\t\t},\n\t\t\t\telements: authors,\n\t\t\t\tfilterBy: {\n\t\t\t\t\tisPrimary: true,\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\treturn _fields;\n\t}, [ view.type, type, authors ] );\n\n\t// Reset the page number when the category changes.\n\tuseEffect( () => {\n\t\tif ( previousCategoryId !== categoryId ) {\n\t\t\tsetView( ( prevView ) => ( { ...prevView, page: 1 } ) );\n\t\t}\n\t}, [ categoryId, previousCategoryId ] );\n\tconst { data, paginationInfo } = useMemo( () => {\n\t\t// Search is managed server-side as well as filters for patterns.\n\t\t// However, the author filter in template parts is done client-side.\n\t\tconst viewWithoutFilters = { ...view };\n\t\tdelete viewWithoutFilters.search;\n\t\tif ( type !== TEMPLATE_PART_POST_TYPE ) {\n\t\t\tviewWithoutFilters.filters = [];\n\t\t}\n\t\treturn filterSortAndPaginate( patterns, viewWithoutFilters, fields );\n\t}, [ patterns, view, fields, type ] );\n\n\tconst templatePartActions = usePostActions( {\n\t\tpostType: TEMPLATE_PART_POST_TYPE,\n\t\tcontext: 'list',\n\t} );\n\tconst patternActions = usePostActions( {\n\t\tpostType: PATTERN_TYPES.user,\n\t\tcontext: 'list',\n\t} );\n\tconst editAction = useEditPostAction();\n\n\tconst actions = useMemo( () => {\n\t\tif ( type === TEMPLATE_PART_POST_TYPE ) {\n\t\t\treturn [ editAction, ...templatePartActions ].filter( Boolean );\n\t\t}\n\t\treturn [ editAction, ...patternActions ].filter( Boolean );\n\t}, [ editAction, type, templatePartActions, patternActions ] );\n\tconst id = useId();\n\tconst settings = usePatternSettings();\n\t// Wrap everything in a block editor provider.\n\t// This ensures 'styles' that are needed for the previews are synced\n\t// from the site editor store to the block editor store.\n\treturn (\n\t\t<ExperimentalBlockEditorProvider settings={ settings }>\n\t\t\t<Page\n\t\t\t\ttitle={ __( 'Patterns content' ) }\n\t\t\t\tclassName=\"edit-site-page-patterns-dataviews\"\n\t\t\t\thideTitleFromUI\n\t\t\t>\n\t\t\t\t<PatternsHeader\n\t\t\t\t\tcategoryId={ categoryId }\n\t\t\t\t\ttype={ type }\n\t\t\t\t\ttitleId={ `${ id }-title` }\n\t\t\t\t\tdescriptionId={ `${ id }-description` }\n\t\t\t\t/>\n\t\t\t\t<DataViews\n\t\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\t\tfields={ fields }\n\t\t\t\t\tactions={ actions }\n\t\t\t\t\tdata={ data || EMPTY_ARRAY }\n\t\t\t\t\tgetItemId={ ( item ) => item.name ?? item.id }\n\t\t\t\t\tisLoading={ isResolving }\n\t\t\t\t\tview={ view }\n\t\t\t\t\tonChangeView={ setView }\n\t\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t\t/>\n\t\t\t</Page>\n\t\t</ExperimentalBlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst home = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M12 4L4 7.9V20h16V7.9L12 4zm6.5 14.5H14V13h-4v5.5H5.5V8.8L12 5.7l6.5 3.1v9.7z\" />\n\t</SVG>\n);\n\nexport default home;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst verse = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17.8 2l-.9.3c-.1 0-3.6 1-5.2 2.1C10 5.5 9.3 6.5 8.9 7.1c-.6.9-1.7 4.7-1.7 6.3l-.9 2.3c-.2.4 0 .8.4 1 .1 0 .2.1.3.1.3 0 .6-.2.7-.5l.6-1.5c.3 0 .7-.1 1.2-.2.7-.1 1.4-.3 2.2-.5.8-.2 1.6-.5 2.4-.8.7-.3 1.4-.7 1.9-1.2s.8-1.2 1-1.9c.2-.7.3-1.6.4-2.4.1-.8.1-1.7.2-2.5 0-.8.1-1.5.2-2.1V2zm-1.9 5.6c-.1.8-.2 1.5-.3 2.1-.2.6-.4 1-.6 1.3-.3.3-.8.6-1.4.9-.7.3-1.4.5-2.2.8-.6.2-1.3.3-1.8.4L15 7.5c.3-.3.6-.7 1-1.1 0 .4 0 .8-.1 1.2zM6 20h8v-1.5H6V20z\" />\n\t</SVG>\n);\n\nexport default verse;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst pin = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"m21.5 9.1-6.6-6.6-4.2 5.6c-1.2-.1-2.4.1-3.6.7-.1 0-.1.1-.2.1-.5.3-.9.6-1.2.9l3.7 3.7-5.7 5.7v1.1h1.1l5.7-5.7 3.7 3.7c.4-.4.7-.8.9-1.2.1-.1.1-.2.2-.3.6-1.1.8-2.4.6-3.6l5.6-4.1zm-7.3 3.5.1.9c.1.9 0 1.8-.4 2.6l-6-6c.8-.4 1.7-.5 2.6-.4l.9.1L15 4.9 19.1 9l-4.9 3.6z\" />\n\t</SVG>\n);\n\nexport default pin;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst archive = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M11.934 7.406a1 1 0 0 0 .914.594H19a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V6a.5.5 0 0 1 .5-.5h5.764a.5.5 0 0 1 .447.276l.723 1.63Zm1.064-1.216a.5.5 0 0 0 .462.31H19a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.764a2 2 0 0 1 1.789 1.106l.445 1.084ZM8.5 10.5h7V12h-7v-1.5Zm7 3.5h-7v1.5h7V14Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default archive;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst notFound = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path d=\"M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm.5 12c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v10zm-11-7.6h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-.9 3.5H6.3l1.2-1.7v1.7zm5.6-3.2c-.4-.2-.8-.4-1.2-.4-.5 0-.9.1-1.2.4-.4.2-.6.6-.8 1-.2.4-.3.9-.3 1.5s.1 1.1.3 1.6c.2.4.5.8.8 1 .4.2.8.4 1.2.4.5 0 .9-.1 1.2-.4.4-.2.6-.6.8-1 .2-.4.3-1 .3-1.6 0-.6-.1-1.1-.3-1.5-.1-.5-.4-.8-.8-1zm0 3.6c-.1.3-.3.5-.5.7-.2.1-.4.2-.7.2-.3 0-.5-.1-.7-.2-.2-.1-.4-.4-.5-.7-.1-.3-.2-.7-.2-1.2 0-.7.1-1.2.4-1.5.3-.3.6-.5 1-.5s.7.2 1 .5c.3.3.4.8.4 1.5-.1.5-.1.9-.2 1.2zm5-3.9h-.7l-3.1 4.3h2.8V15h1v-1.3h.7v-.8h-.7V9.4zm-1 3.5H16l1.2-1.7v1.7z\" />\n\t</SVG>\n);\n\nexport default notFound;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst list = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z\" />\n\t</SVG>\n);\n\nexport default list;\n","/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\n\nconst blockMeta = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\td=\"M8.95 11.25H4v1.5h4.95v4.5H13V18c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2v-3c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75h-2.55v-7.5H13V9c0 1.1.9 2 2 2h3c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3c-1.1 0-2 .9-2 2v.75H8.95v4.5ZM14.5 15v3c0 .3.2.5.5.5h3c.3 0 .5-.2.5-.5v-3c0-.3-.2-.5-.5-.5h-3c-.3 0-.5.2-.5.5Zm0-6V6c0-.3.2-.5.5-.5h3c.3 0 .5.2.5.5v3c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5Z\"\n\t\t\tclipRule=\"evenodd\"\n\t\t/>\n\t</SVG>\n);\n\nexport default blockMeta;\n","/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/primitives';\n\nconst calendar = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"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.5 16c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5V7h15v12zM9 10H7v2h2v-2zm0 4H7v2h2v-2zm4-4h-2v2h2v-2zm4 0h-2v2h2v-2zm-4 4h-2v2h2v-2zm4 0h-2v2h2v-2z\" />\n\t</SVG>\n);\n\nexport default calendar;\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=\"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z\" />\n\t</SVG>\n);\n\nexport default tag;\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=\"m7 6.5 4 2.5-4 2.5z\" />\n\t\t<Path\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"m5 3c-1.10457 0-2 .89543-2 2v14c0 1.1046.89543 2 2 2h14c1.1046 0 2-.8954 2-2v-14c0-1.10457-.8954-2-2-2zm14 1.5h-14c-.27614 0-.5.22386-.5.5v10.7072l3.62953-2.6465c.25108-.1831.58905-.1924.84981-.0234l2.92666 1.8969 3.5712-3.4719c.2911-.2831.7545-.2831 1.0456 0l2.9772 2.8945v-9.3568c0-.27614-.2239-.5-.5-.5zm-14.5 14.5v-1.4364l4.09643-2.987 2.99567 1.9417c.2936.1903.6798.1523.9307-.0917l3.4772-3.3806 3.4772 3.3806.0228-.0234v2.5968c0 .2761-.2239.5-.5.5h-14c-.27614 0-.5-.2239-.5-.5z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default media;\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 { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { store as editorStore } from '@wordpress/editor';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useMemo, useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { blockMeta, post, archive } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst EMPTY_OBJECT = {};\n\n/**\n * @typedef IHasNameAndId\n * @property {string|number} id The entity's id.\n * @property {string} name The entity's name.\n */\n\nconst getValueFromObjectPath = ( object, path ) => {\n\tlet value = object;\n\tpath.split( '.' ).forEach( ( fieldName ) => {\n\t\tvalue = value?.[ fieldName ];\n\t} );\n\treturn value;\n};\n\n/**\n * Helper util to map records to add a `name` prop from a\n * provided path, in order to handle all entities in the same\n * fashion(implementing`IHasNameAndId` interface).\n *\n * @param {Object[]} entities The array of entities.\n * @param {string} path The path to map a `name` property from the entity.\n * @return {IHasNameAndId[]} An array of enitities that now implement the `IHasNameAndId` interface.\n */\nexport const mapToIHasNameAndId = ( entities, path ) => {\n\treturn ( entities || [] ).map( ( entity ) => ( {\n\t\t...entity,\n\t\tname: decodeEntities( getValueFromObjectPath( entity, path ) ),\n\t} ) );\n};\n\n/**\n * @typedef {Object} EntitiesInfo\n * @property {boolean} hasEntities If an entity has available records(posts, terms, etc..).\n * @property {number[]} existingEntitiesIds An array of the existing entities ids.\n */\n\nexport const useExistingTemplates = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( coreStore ).getEntityRecords(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tper_page: -1,\n\t\t\t\t}\n\t\t\t),\n\t\t[]\n\t);\n};\n\nexport const useDefaultTemplateTypes = () => {\n\treturn useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplateTypes(),\n\t\t[]\n\t);\n};\n\nconst usePublicPostTypes = () => {\n\tconst postTypes = useSelect(\n\t\t( select ) => select( coreStore ).getPostTypes( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\tconst excludedPostTypes = [ 'attachment' ];\n\t\treturn postTypes?.filter(\n\t\t\t( { viewable, slug } ) =>\n\t\t\t\tviewable && ! excludedPostTypes.includes( slug )\n\t\t);\n\t}, [ postTypes ] );\n};\n\nconst usePublicTaxonomies = () => {\n\tconst taxonomies = useSelect(\n\t\t( select ) => select( coreStore ).getTaxonomies( { per_page: -1 } ),\n\t\t[]\n\t);\n\treturn useMemo( () => {\n\t\treturn taxonomies?.filter(\n\t\t\t( { visibility } ) => visibility?.publicly_queryable\n\t\t);\n\t}, [ taxonomies ] );\n};\n\nexport function usePostTypeArchiveMenuItems() {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst postTypesWithArchives = useMemo(\n\t\t() => publicPostTypes?.filter( ( postType ) => postType.has_archive ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst existingTemplates = useExistingTemplates();\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst postTypeLabels = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { labels } ) => {\n\t\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\t\taccumulator[ singularName ] =\n\t\t\t\t\t( accumulator[ singularName ] || 0 ) + 1;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst needsUniqueIdentifier = useCallback(\n\t\t( { labels, slug } ) => {\n\t\t\tconst singularName = labels.singular_name.toLowerCase();\n\t\t\treturn postTypeLabels[ singularName ] > 1 && singularName !== slug;\n\t\t},\n\t\t[ postTypeLabels ]\n\t);\n\treturn useMemo(\n\t\t() =>\n\t\t\tpostTypesWithArchives\n\t\t\t\t?.filter(\n\t\t\t\t\t( postType ) =>\n\t\t\t\t\t\t! ( existingTemplates || [] ).some(\n\t\t\t\t\t\t\t( existingTemplate ) =>\n\t\t\t\t\t\t\t\texistingTemplate.slug ===\n\t\t\t\t\t\t\t\t'archive-' + postType.slug\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.map( ( postType ) => {\n\t\t\t\t\tlet title;\n\t\t\t\t\tif ( needsUniqueIdentifier( postType ) ) {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the post type e.g: \"Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t__( 'Archive: %1$s (%2$s)' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name,\n\t\t\t\t\t\t\tpostType.slug\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttitle = sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Archive: %s' ),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\treturn {\n\t\t\t\t\t\tslug: 'archive-' + postType.slug,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t\t'Displays an archive with the latest posts of type: %s.'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tpostType.labels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon: postType.icon?.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t? postType.icon.slice( 10 )\n\t\t\t\t\t\t\t: archive,\n\t\t\t\t\t\ttemplatePrefix: 'archive',\n\t\t\t\t\t};\n\t\t\t\t} ) || [],\n\t\t[ postTypesWithArchives, existingTemplates, needsUniqueIdentifier ]\n\t);\n}\n\nexport const usePostTypeMenuItems = ( onClickMenuItem ) => {\n\tconst publicPostTypes = usePublicPostTypes();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst templateLabels = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { labels } ) => {\n\t\t\t\tconst templateName = (\n\t\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t\t).toLowerCase();\n\t\t\t\taccumulator[ templateName ] =\n\t\t\t\t\t( accumulator[ templateName ] || 0 ) + 1;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst needsUniqueIdentifier = useCallback(\n\t\t( { labels, slug } ) => {\n\t\t\tconst templateName = (\n\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t).toLowerCase();\n\t\t\treturn templateLabels[ templateName ] > 1 && templateName !== slug;\n\t\t},\n\t\t[ templateLabels ]\n\t);\n\n\t// `page`is a special case in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicPostTypes?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( slug !== 'page' ) {\n\t\t\t\t\tsuffix = `single-${ suffix }`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicPostTypes ]\n\t);\n\tconst postTypesInfo = useEntitiesInfo( 'postType', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicPostTypes || [] ).reduce(\n\t\t( accumulator, postType ) => {\n\t\t\tconst { slug, labels, icon } = postType;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier( postType );\n\t\t\tlet menuItemTitle =\n\t\t\t\tlabels.template_name ||\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t__( 'Single item: %s' ),\n\t\t\t\t\tlabels.singular_name\n\t\t\t\t);\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = labels.template_name\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the template e.g: \"Single Item: Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t__( '%1$s (%2$s)' ),\n\t\t\t\t\t\t\tlabels.template_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the post type e.g: \"Post\"; %2s: Slug of the post type e.g: \"book\".\n\t\t\t\t\t\t\t__( 'Single item: %1$s (%2$s)' ),\n\t\t\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t );\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t\t\t\t\t__( 'Displays a single item: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\t// `icon` is the `menu_icon` property of a post type. We\n\t\t\t\t\t\t// only handle `dashicons` for now, even if the `menu_icon`\n\t\t\t\t\t\t// also supports urls and svg as values.\n\t\t\t\t\t\ticon: icon?.startsWith( 'dashicons-' )\n\t\t\t\t\t\t\t? icon.slice( 10 )\n\t\t\t\t\t\t\t: post,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t };\n\t\t\tconst hasEntities = postTypesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'postType',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\trecordNamePath: 'title.rendered',\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,title,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'relevance' : 'modified',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\tpostTypesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = `${ templatePrefixes[ slug ] }-${ suggestion.slug }`;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default post types\n\t// and one for the rest.\n\tconst postTypesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, postType ) => {\n\t\t\t\t\tconst { slug } = postType;\n\t\t\t\t\tlet key = 'postTypesMenuItems';\n\t\t\t\t\tif ( slug === 'page' ) {\n\t\t\t\t\t\tkey = 'defaultPostTypesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( postType );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultPostTypesMenuItems: [], postTypesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn postTypesMenuItems;\n};\n\nexport const useTaxonomiesMenuItems = ( onClickMenuItem ) => {\n\tconst publicTaxonomies = usePublicTaxonomies();\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\t// `category` and `post_tag` are special cases in template hierarchy.\n\tconst templatePrefixes = useMemo(\n\t\t() =>\n\t\t\tpublicTaxonomies?.reduce( ( accumulator, { slug } ) => {\n\t\t\t\tlet suffix = slug;\n\t\t\t\tif ( ! [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\t\t\tsuffix = `taxonomy-${ suffix }`;\n\t\t\t\t}\n\t\t\t\tif ( slug === 'post_tag' ) {\n\t\t\t\t\tsuffix = `tag`;\n\t\t\t\t}\n\t\t\t\taccumulator[ slug ] = suffix;\n\t\t\t\treturn accumulator;\n\t\t\t}, {} ),\n\t\t[ publicTaxonomies ]\n\t);\n\t// We need to keep track of naming conflicts. If a conflict\n\t// occurs, we need to add slug.\n\tconst taxonomyLabels = publicTaxonomies?.reduce(\n\t\t( accumulator, { labels } ) => {\n\t\t\tconst templateName = (\n\t\t\t\tlabels.template_name || labels.singular_name\n\t\t\t).toLowerCase();\n\t\t\taccumulator[ templateName ] =\n\t\t\t\t( accumulator[ templateName ] || 0 ) + 1;\n\t\t\treturn accumulator;\n\t\t},\n\t\t{}\n\t);\n\tconst needsUniqueIdentifier = ( labels, slug ) => {\n\t\tif ( [ 'category', 'post_tag' ].includes( slug ) ) {\n\t\t\treturn false;\n\t\t}\n\t\tconst templateName = (\n\t\t\tlabels.template_name || labels.singular_name\n\t\t).toLowerCase();\n\t\treturn taxonomyLabels[ templateName ] > 1 && templateName !== slug;\n\t};\n\tconst taxonomiesInfo = useEntitiesInfo( 'taxonomy', templatePrefixes );\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst menuItems = ( publicTaxonomies || [] ).reduce(\n\t\t( accumulator, taxonomy ) => {\n\t\t\tconst { slug, labels } = taxonomy;\n\t\t\t// We need to check if the general template is part of the\n\t\t\t// defaultTemplateTypes. If it is, just use that info and\n\t\t\t// augment it with the specific template functionality.\n\t\t\tconst generalTemplateSlug = templatePrefixes[ slug ];\n\t\t\tconst defaultTemplateType = defaultTemplateTypes?.find(\n\t\t\t\t( { slug: _slug } ) => _slug === generalTemplateSlug\n\t\t\t);\n\t\t\tconst hasGeneralTemplate =\n\t\t\t\texistingTemplateSlugs?.includes( generalTemplateSlug );\n\t\t\tconst _needsUniqueIdentifier = needsUniqueIdentifier(\n\t\t\t\tlabels,\n\t\t\t\tslug\n\t\t\t);\n\t\t\tlet menuItemTitle = labels.template_name || labels.singular_name;\n\t\t\tif ( _needsUniqueIdentifier ) {\n\t\t\t\tmenuItemTitle = labels.template_name\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the template e.g: \"Products by Category\"; %2s: Slug of the taxonomy e.g: \"product_cat\".\n\t\t\t\t\t\t\t__( '%1$s (%2$s)' ),\n\t\t\t\t\t\t\tlabels.template_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %1s: Name of the taxonomy e.g: \"Category\"; %2s: Slug of the taxonomy e.g: \"product_cat\".\n\t\t\t\t\t\t\t__( '%1$s (%2$s)' ),\n\t\t\t\t\t\t\tlabels.singular_name,\n\t\t\t\t\t\t\tslug\n\t\t\t\t\t );\n\t\t\t}\n\t\t\tconst menuItem = defaultTemplateType\n\t\t\t\t? {\n\t\t\t\t\t\t...defaultTemplateType,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tslug: generalTemplateSlug,\n\t\t\t\t\t\ttitle: menuItemTitle,\n\t\t\t\t\t\tdescription: sprintf(\n\t\t\t\t\t\t\t// translators: %s: Name of the taxonomy e.g: \"Product Categories\".\n\t\t\t\t\t\t\t__( 'Displays taxonomy: %s.' ),\n\t\t\t\t\t\t\tlabels.singular_name\n\t\t\t\t\t\t),\n\t\t\t\t\t\ticon: blockMeta,\n\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t };\n\t\t\tconst hasEntities = taxonomiesInfo?.[ slug ]?.hasEntities;\n\t\t\t// We have a different template creation flow only if they have entities.\n\t\t\tif ( hasEntities ) {\n\t\t\t\tmenuItem.onClick = ( template ) => {\n\t\t\t\t\tonClickMenuItem( {\n\t\t\t\t\t\ttype: 'taxonomy',\n\t\t\t\t\t\tslug,\n\t\t\t\t\t\tconfig: {\n\t\t\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\t\t\torderBy: search ? 'name' : 'count',\n\t\t\t\t\t\t\t\t\texclude:\n\t\t\t\t\t\t\t\t\t\ttaxonomiesInfo[ slug ]\n\t\t\t\t\t\t\t\t\t\t\t.existingEntitiesIds,\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\t\t\tconst templateSlug = `${ templatePrefixes[ slug ] }-${ suggestion.slug }`;\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\t\t\ttemplatePrefix: templatePrefixes[ slug ],\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\tlabels,\n\t\t\t\t\t\thasGeneralTemplate,\n\t\t\t\t\t\ttemplate,\n\t\t\t\t\t} );\n\t\t\t\t};\n\t\t\t}\n\t\t\t// We don't need to add the menu item if there are no\n\t\t\t// entities and the general template exists.\n\t\t\tif ( ! hasGeneralTemplate || hasEntities ) {\n\t\t\t\taccumulator.push( menuItem );\n\t\t\t}\n\t\t\treturn accumulator;\n\t\t},\n\t\t[]\n\t);\n\t// Split menu items into two groups: one for the default taxonomies\n\t// and one for the rest.\n\tconst taxonomiesMenuItems = useMemo(\n\t\t() =>\n\t\t\tmenuItems.reduce(\n\t\t\t\t( accumulator, taxonomy ) => {\n\t\t\t\t\tconst { slug } = taxonomy;\n\t\t\t\t\tlet key = 'taxonomiesMenuItems';\n\t\t\t\t\tif ( [ 'category', 'tag' ].includes( slug ) ) {\n\t\t\t\t\t\tkey = 'defaultTaxonomiesMenuItems';\n\t\t\t\t\t}\n\t\t\t\t\taccumulator[ key ].push( taxonomy );\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{ defaultTaxonomiesMenuItems: [], taxonomiesMenuItems: [] }\n\t\t\t),\n\t\t[ menuItems ]\n\t);\n\treturn taxonomiesMenuItems;\n};\n\nconst USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX = { user: 'author' };\nconst USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS = { user: { who: 'authors' } };\nexport function useAuthorMenuItem( onClickMenuItem ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst authorInfo = useEntitiesInfo(\n\t\t'root',\n\t\tUSE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX,\n\t\tUSE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS\n\t);\n\tlet authorMenuItem = defaultTemplateTypes?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( ! authorMenuItem ) {\n\t\tauthorMenuItem = {\n\t\t\tdescription: __(\n\t\t\t\t'Displays latest posts written by a single author.'\n\t\t\t),\n\t\t\tslug: 'author',\n\t\t\ttitle: 'Author',\n\t\t};\n\t}\n\tconst hasGeneralTemplate = !! existingTemplates?.find(\n\t\t( { slug } ) => slug === 'author'\n\t);\n\tif ( authorInfo.user?.hasEntities ) {\n\t\tauthorMenuItem = { ...authorMenuItem, templatePrefix: 'author' };\n\t\tauthorMenuItem.onClick = ( template ) => {\n\t\t\tonClickMenuItem( {\n\t\t\t\ttype: 'root',\n\t\t\t\tslug: 'user',\n\t\t\t\tconfig: {\n\t\t\t\t\tqueryArgs: ( { search } ) => {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t_fields: 'id,name,slug,link',\n\t\t\t\t\t\t\torderBy: search ? 'name' : 'registered_date',\n\t\t\t\t\t\t\texclude: authorInfo.user.existingEntitiesIds,\n\t\t\t\t\t\t\twho: 'authors',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t\tgetSpecificTemplate: ( suggestion ) => {\n\t\t\t\t\t\tconst templateSlug = `author-${ suggestion.slug }`;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttitle: templateSlug,\n\t\t\t\t\t\t\tslug: templateSlug,\n\t\t\t\t\t\t\ttemplatePrefix: 'author',\n\t\t\t\t\t\t};\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tlabels: {\n\t\t\t\t\tsingular_name: __( 'Author' ),\n\t\t\t\t\tsearch_items: __( 'Search Authors' ),\n\t\t\t\t\tnot_found: __( 'No authors found.' ),\n\t\t\t\t\tall_items: __( 'All Authors' ),\n\t\t\t\t},\n\t\t\t\thasGeneralTemplate,\n\t\t\t\ttemplate,\n\t\t\t} );\n\t\t};\n\t}\n\tif ( ! hasGeneralTemplate || authorInfo.user?.hasEntities ) {\n\t\treturn authorMenuItem;\n\t}\n}\n\n/**\n * Helper hook that filters all the existing templates by the given\n * object with the entity's slug as key and the template prefix as value.\n *\n * Example:\n * `existingTemplates` is: [ { slug: 'tag-apple' }, { slug: 'page-about' }, { slug: 'tag' } ]\n * `templatePrefixes` is: { post_tag: 'tag' }\n * It will return: { post_tag: ['apple'] }\n *\n * Note: We append the `-` to the given template prefix in this function for our checks.\n *\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @return {Record<string,string[]>} An object with the entity's slug as key and an array with the existing template slugs as value.\n */\nconst useExistingTemplateSlugs = ( templatePrefixes ) => {\n\tconst existingTemplates = useExistingTemplates();\n\tconst existingSlugs = useMemo( () => {\n\t\treturn Object.entries( templatePrefixes || {} ).reduce(\n\t\t\t( accumulator, [ slug, prefix ] ) => {\n\t\t\t\tconst slugsWithTemplates = ( existingTemplates || [] ).reduce(\n\t\t\t\t\t( _accumulator, existingTemplate ) => {\n\t\t\t\t\t\tconst _prefix = `${ prefix }-`;\n\t\t\t\t\t\tif ( existingTemplate.slug.startsWith( _prefix ) ) {\n\t\t\t\t\t\t\t_accumulator.push(\n\t\t\t\t\t\t\t\texistingTemplate.slug.substring(\n\t\t\t\t\t\t\t\t\t_prefix.length\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\treturn _accumulator;\n\t\t\t\t\t},\n\t\t\t\t\t[]\n\t\t\t\t);\n\t\t\t\tif ( slugsWithTemplates.length ) {\n\t\t\t\t\taccumulator[ slug ] = slugsWithTemplates;\n\t\t\t\t}\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t}, [ templatePrefixes, existingTemplates ] );\n\treturn existingSlugs;\n};\n\n/**\n * Helper hook that finds the existing records with an associated template,\n * as they need to be excluded from the template suggestions.\n *\n * @param {string} entityName The entity's name.\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the existing records as value.\n */\nconst useTemplatesToExclude = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = {}\n) => {\n\tconst slugsToExcludePerEntity =\n\t\tuseExistingTemplateSlugs( templatePrefixes );\n\tconst recordsToExcludePerEntity = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.entries( slugsToExcludePerEntity || {} ).reduce(\n\t\t\t\t( accumulator, [ slug, slugsWithTemplates ] ) => {\n\t\t\t\t\tconst entitiesWithTemplates = select(\n\t\t\t\t\t\tcoreStore\n\t\t\t\t\t).getEntityRecords( entityName, slug, {\n\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\tslug: slugsWithTemplates,\n\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t} );\n\t\t\t\t\tif ( entitiesWithTemplates?.length ) {\n\t\t\t\t\t\taccumulator[ slug ] = entitiesWithTemplates;\n\t\t\t\t\t}\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[ slugsToExcludePerEntity ]\n\t);\n\treturn recordsToExcludePerEntity;\n};\n\n/**\n * Helper hook that returns information about an entity having\n * records that we can create a specific template for.\n *\n * For example we can search for `terms` in `taxonomy` entity or\n * `posts` in `postType` entity.\n *\n * First we need to find the existing records with an associated template,\n * to query afterwards for any remaining record, by excluding them.\n *\n * @param {string} entityName The entity's name.\n * @param {Record<string,string>} templatePrefixes An object with the entity's slug as key and the template prefix as value.\n * @param {Record<string,Object>} additionalQueryParameters An object with the entity's slug as key and additional query parameters as value.\n * @return {Record<string,EntitiesInfo>} An object with the entity's slug as key and the EntitiesInfo as value.\n */\nconst useEntitiesInfo = (\n\tentityName,\n\ttemplatePrefixes,\n\tadditionalQueryParameters = EMPTY_OBJECT\n) => {\n\tconst recordsToExcludePerEntity = useTemplatesToExclude(\n\t\tentityName,\n\t\ttemplatePrefixes,\n\t\tadditionalQueryParameters\n\t);\n\tconst entitiesHasRecords = useSelect(\n\t\t( select ) => {\n\t\t\treturn Object.keys( templatePrefixes || {} ).reduce(\n\t\t\t\t( accumulator, slug ) => {\n\t\t\t\t\tconst existingEntitiesIds =\n\t\t\t\t\t\trecordsToExcludePerEntity?.[ slug ]?.map(\n\t\t\t\t\t\t\t( { id } ) => id\n\t\t\t\t\t\t) || [];\n\t\t\t\t\taccumulator[ slug ] = !! select(\n\t\t\t\t\t\tcoreStore\n\t\t\t\t\t).getEntityRecords( entityName, slug, {\n\t\t\t\t\t\tper_page: 1,\n\t\t\t\t\t\t_fields: 'id',\n\t\t\t\t\t\tcontext: 'view',\n\t\t\t\t\t\texclude: existingEntitiesIds,\n\t\t\t\t\t\t...additionalQueryParameters[ slug ],\n\t\t\t\t\t} )?.length;\n\t\t\t\t\treturn accumulator;\n\t\t\t\t},\n\t\t\t\t{}\n\t\t\t);\n\t\t},\n\t\t[\n\t\t\ttemplatePrefixes,\n\t\t\trecordsToExcludePerEntity,\n\t\t\tentityName,\n\t\t\tadditionalQueryParameters,\n\t\t]\n\t);\n\tconst entitiesInfo = useMemo( () => {\n\t\treturn Object.keys( templatePrefixes || {} ).reduce(\n\t\t\t( accumulator, slug ) => {\n\t\t\t\tconst existingEntitiesIds =\n\t\t\t\t\trecordsToExcludePerEntity?.[ slug ]?.map(\n\t\t\t\t\t\t( { id } ) => id\n\t\t\t\t\t) || [];\n\t\t\t\taccumulator[ slug ] = {\n\t\t\t\t\thasEntities: entitiesHasRecords[ slug ],\n\t\t\t\t\texistingEntitiesIds,\n\t\t\t\t};\n\t\t\t\treturn accumulator;\n\t\t\t},\n\t\t\t{}\n\t\t);\n\t}, [ templatePrefixes, recordsToExcludePerEntity, entitiesHasRecords ] );\n\treturn entitiesInfo;\n};\n","/**\n * WordPress dependencies\n */\nimport { useState, useMemo, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tFlex,\n\tFlexItem,\n\tSearchControl,\n\tTextHighlight,\n\tprivateApis as componentsPrivateApis,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useDebouncedInput } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { mapToIHasNameAndId } from './utils';\n\nconst {\n\tCompositeV2: Composite,\n\tCompositeItemV2: CompositeItem,\n\tuseCompositeStoreV2: useCompositeStore,\n} = unlock( componentsPrivateApis );\n\nconst EMPTY_ARRAY = [];\n\nfunction SuggestionListItem( {\n\tsuggestion,\n\tsearch,\n\tonSelect,\n\tentityForSuggestions,\n} ) {\n\tconst baseCssClass =\n\t\t'edit-site-custom-template-modal__suggestions_list__list-item';\n\treturn (\n\t\t<CompositeItem\n\t\t\trender={\n\t\t\t\t<Button\n\t\t\t\t\trole=\"option\"\n\t\t\t\t\tclassName={ baseCssClass }\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tonSelect(\n\t\t\t\t\t\t\tentityForSuggestions.config.getSpecificTemplate(\n\t\t\t\t\t\t\t\tsuggestion\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\t<Text\n\t\t\t\tsize=\"body\"\n\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\tweight={ 500 }\n\t\t\t\tclassName={ `${ baseCssClass }__title` }\n\t\t\t>\n\t\t\t\t<TextHighlight\n\t\t\t\t\ttext={ decodeEntities( suggestion.name ) }\n\t\t\t\t\thighlight={ search }\n\t\t\t\t/>\n\t\t\t</Text>\n\t\t\t{ suggestion.link && (\n\t\t\t\t<Text\n\t\t\t\t\tsize=\"body\"\n\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\tclassName={ `${ baseCssClass }__info` }\n\t\t\t\t>\n\t\t\t\t\t{ suggestion.link }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</CompositeItem>\n\t);\n}\n\nfunction useSearchSuggestions( entityForSuggestions, search ) {\n\tconst { config } = entityForSuggestions;\n\tconst query = useMemo(\n\t\t() => ( {\n\t\t\torder: 'asc',\n\t\t\tcontext: 'view',\n\t\t\tsearch,\n\t\t\tper_page: search ? 20 : 10,\n\t\t\t...config.queryArgs( search ),\n\t\t} ),\n\t\t[ search, config ]\n\t);\n\tconst { records: searchResults, hasResolved: searchHasResolved } =\n\t\tuseEntityRecords(\n\t\t\tentityForSuggestions.type,\n\t\t\tentityForSuggestions.slug,\n\t\t\tquery\n\t\t);\n\tconst [ suggestions, setSuggestions ] = useState( EMPTY_ARRAY );\n\tuseEffect( () => {\n\t\tif ( ! searchHasResolved ) {\n\t\t\treturn;\n\t\t}\n\t\tlet newSuggestions = EMPTY_ARRAY;\n\t\tif ( searchResults?.length ) {\n\t\t\tnewSuggestions = searchResults;\n\t\t\tif ( config.recordNamePath ) {\n\t\t\t\tnewSuggestions = mapToIHasNameAndId(\n\t\t\t\t\tnewSuggestions,\n\t\t\t\t\tconfig.recordNamePath\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t// Update suggestions only when the query has resolved, so as to keep\n\t\t// the previous results in the UI.\n\t\tsetSuggestions( newSuggestions );\n\t}, [ searchResults, searchHasResolved ] );\n\treturn suggestions;\n}\n\nfunction SuggestionList( { entityForSuggestions, onSelect } ) {\n\tconst composite = useCompositeStore( { orientation: 'vertical' } );\n\tconst [ search, setSearch, debouncedSearch ] = useDebouncedInput();\n\tconst suggestions = useSearchSuggestions(\n\t\tentityForSuggestions,\n\t\tdebouncedSearch\n\t);\n\tconst { labels } = entityForSuggestions;\n\tconst [ showSearchControl, setShowSearchControl ] = useState( false );\n\tif ( ! showSearchControl && suggestions?.length > 9 ) {\n\t\tsetShowSearchControl( true );\n\t}\n\treturn (\n\t\t<>\n\t\t\t{ showSearchControl && (\n\t\t\t\t<SearchControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tonChange={ setSearch }\n\t\t\t\t\tvalue={ search }\n\t\t\t\t\tlabel={ labels.search_items }\n\t\t\t\t\tplaceholder={ labels.search_items }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ !! suggestions?.length && (\n\t\t\t\t<Composite\n\t\t\t\t\tstore={ composite }\n\t\t\t\t\trole=\"listbox\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__suggestions_list\"\n\t\t\t\t\taria-label={ __( 'Suggestions list' ) }\n\t\t\t\t>\n\t\t\t\t\t{ suggestions.map( ( suggestion ) => (\n\t\t\t\t\t\t<SuggestionListItem\n\t\t\t\t\t\t\tkey={ suggestion.slug }\n\t\t\t\t\t\t\tsuggestion={ suggestion }\n\t\t\t\t\t\t\tsearch={ debouncedSearch }\n\t\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</Composite>\n\t\t\t) }\n\t\t\t{ debouncedSearch && ! suggestions?.length && (\n\t\t\t\t<Text\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"edit-site-custom-template-modal__no-results\"\n\t\t\t\t>\n\t\t\t\t\t{ labels.not_found }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction AddCustomTemplateModalContent( { onSelect, entityForSuggestions } ) {\n\tconst [ showSearchEntities, setShowSearchEntities ] = useState(\n\t\tentityForSuggestions.hasGeneralTemplate\n\t);\n\treturn (\n\t\t<VStack\n\t\t\tspacing={ 4 }\n\t\t\tclassName=\"edit-site-custom-template-modal__contents-wrapper\"\n\t\t\talignment=\"left\"\n\t\t>\n\t\t\t{ ! showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select whether to create a single template for all items or a specific one.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<Flex\n\t\t\t\t\t\tclassName=\"edit-site-custom-template-modal__contents\"\n\t\t\t\t\t\tgap=\"4\"\n\t\t\t\t\t\talign=\"initial\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\n\t\t\t\t\t\t\t\t} = entityForSuggestions.template;\n\t\t\t\t\t\t\t\tonSelect( {\n\t\t\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\t\tdescription,\n\t\t\t\t\t\t\t\t\ttemplatePrefix,\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<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.all_items }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\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// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For all items' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t\t<FlexItem\n\t\t\t\t\t\t\tisBlock\n\t\t\t\t\t\t\tas={ Button }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tsetShowSearchEntities( true );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ entityForSuggestions.labels.singular_name }\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\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// translators: The user is given the choice to set up a template for all items of a post type or taxonomy, or just a specific one.\n\t\t\t\t\t\t\t\t\t__( 'For a specific item' )\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t</FlexItem>\n\t\t\t\t\t</Flex>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t{ showSearchEntities && (\n\t\t\t\t<>\n\t\t\t\t\t<Text as=\"p\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'This template will be used only for the specific item chosen.'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Text>\n\t\t\t\t\t<SuggestionList\n\t\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t\t\tonSelect={ onSelect }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</VStack>\n\t);\n}\n\nexport default AddCustomTemplateModalContent;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","/**\n * Locale character mapping rules.\n */\ninterface Locale {\n regexp: RegExp;\n map: Record<string, string>;\n}\n\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nconst SUPPORTED_LOCALE: Record<string, Locale> = {\n tr: {\n regexp: /\\u0130|\\u0049|\\u0049\\u0307/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n az: {\n regexp: /\\u0130/g,\n map: {\n İ: \"\\u0069\",\n I: \"\\u0131\",\n İ: \"\\u0069\",\n },\n },\n lt: {\n regexp: /\\u0049|\\u004A|\\u012E|\\u00CC|\\u00CD|\\u0128/g,\n map: {\n I: \"\\u0069\\u0307\",\n J: \"\\u006A\\u0307\",\n Į: \"\\u012F\\u0307\",\n Ì: \"\\u0069\\u0307\\u0300\",\n Í: \"\\u0069\\u0307\\u0301\",\n Ĩ: \"\\u0069\\u0307\\u0303\",\n },\n },\n};\n\n/**\n * Localized lower case.\n */\nexport function localeLowerCase(str: string, locale: string) {\n const lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang) return lowerCase(str.replace(lang.regexp, (m) => lang.map[m]));\n return lowerCase(str);\n}\n\n/**\n * Lower case as a function.\n */\nexport function lowerCase(str: string) {\n return str.toLowerCase();\n}\n","import { lowerCase } from \"lower-case\";\n\nexport interface Options {\n splitRegexp?: RegExp | RegExp[];\n stripRegexp?: RegExp | RegExp[];\n delimiter?: string;\n transform?: (part: string, index: number, parts: string[]) => string;\n}\n\n// Support camel case (\"camelCase\" -> \"camel Case\" and \"CAMELCase\" -> \"CAMEL Case\").\nconst DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];\n\n// Remove all non-word characters.\nconst DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;\n\n/**\n * Normalize the string into something other libraries can manipulate easier.\n */\nexport function noCase(input: string, options: Options = {}) {\n const {\n splitRegexp = DEFAULT_SPLIT_REGEXP,\n stripRegexp = DEFAULT_STRIP_REGEXP,\n transform = lowerCase,\n delimiter = \" \",\n } = options;\n\n let result = replace(\n replace(input, splitRegexp, \"$1\\0$2\"),\n stripRegexp,\n \"\\0\"\n );\n let start = 0;\n let end = result.length;\n\n // Trim the delimiter from around the output string.\n while (result.charAt(start) === \"\\0\") start++;\n while (result.charAt(end - 1) === \"\\0\") end--;\n\n // Transform each token independently.\n return result.slice(start, end).split(\"\\0\").map(transform).join(delimiter);\n}\n\n/**\n * Replace `re` in the input string with the replacement value.\n */\nfunction replace(input: string, re: RegExp | RegExp[], value: string) {\n if (re instanceof RegExp) return input.replace(re, value);\n return re.reduce((input, re) => input.replace(re, value), input);\n}\n","import { noCase, Options } from \"no-case\";\n\nexport { Options };\n\nexport function dotCase(input: string, options: Options = {}) {\n return noCase(input, {\n delimiter: \".\",\n ...options,\n });\n}\n","/**\n * External dependencies\n */\nimport { paramCase as kebabCase } from 'change-case';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport {\n\tButton,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\n\nfunction AddCustomGenericTemplateModalContent( { onClose, createTemplate } ) {\n\tconst [ title, setTitle ] = useState( '' );\n\tconst defaultTitle = __( 'Custom Template' );\n\tconst [ isBusy, setIsBusy ] = useState( false );\n\tasync function onCreateTemplate( event ) {\n\t\tevent.preventDefault();\n\t\tif ( isBusy ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsBusy( true );\n\t\ttry {\n\t\t\tawait createTemplate(\n\t\t\t\t{\n\t\t\t\t\tslug:\n\t\t\t\t\t\t'wp-custom-template-' +\n\t\t\t\t\t\tkebabCase( title || defaultTitle ),\n\t\t\t\t\ttitle: title || defaultTitle,\n\t\t\t\t},\n\t\t\t\tfalse\n\t\t\t);\n\t\t} finally {\n\t\t\tsetIsBusy( false );\n\t\t}\n\t}\n\treturn (\n\t\t<form onSubmit={ onCreateTemplate }>\n\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t<TextControl\n\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\tplaceholder={ defaultTitle }\n\t\t\t\t\tdisabled={ isBusy }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'Describe the template, e.g. \"Post with sidebar\". A custom template can be manually applied to any post or page.'\n\t\t\t\t\t) }\n\t\t\t\t/>\n\t\t\t\t<HStack\n\t\t\t\t\tclassName=\"edit-site-custom-generic-template__modal-actions\"\n\t\t\t\t\tjustify=\"right\"\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\tisBusy={ isBusy }\n\t\t\t\t\t\taria-disabled={ isBusy }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nexport default AddCustomGenericTemplateModalContent;\n","import { dotCase, Options } from \"dot-case\";\n\nexport { Options };\n\nexport function paramCase(input: string, options: Options = {}) {\n return dotCase(input, {\n delimiter: \"-\",\n ...options,\n });\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tButton,\n\tModal,\n\t__experimentalGrid as Grid,\n\t__experimentalText as Text,\n\t__experimentalVStack as VStack,\n\tFlex,\n\tIcon,\n} from '@wordpress/components';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { useState, memo } from '@wordpress/element';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useViewportMatch } from '@wordpress/compose';\nimport {\n\tarchive,\n\tblockMeta,\n\tcalendar,\n\tcategory,\n\tcommentAuthorAvatar,\n\tedit,\n\thome,\n\tlayout,\n\tlist,\n\tmedia,\n\tnotFound,\n\tpage,\n\tpin,\n\tverse,\n\tsearch,\n\ttag,\n} from '@wordpress/icons';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\n/**\n * Internal dependencies\n */\nimport AddCustomTemplateModalContent from './add-custom-template-modal-content';\nimport {\n\tuseExistingTemplates,\n\tuseDefaultTemplateTypes,\n\tuseTaxonomiesMenuItems,\n\tusePostTypeMenuItems,\n\tuseAuthorMenuItem,\n\tusePostTypeArchiveMenuItems,\n} from './utils';\nimport AddCustomGenericTemplateModalContent from './add-custom-generic-template-modal-content';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst DEFAULT_TEMPLATE_SLUGS = [\n\t'front-page',\n\t'home',\n\t'single',\n\t'page',\n\t'index',\n\t'archive',\n\t'author',\n\t'category',\n\t'date',\n\t'tag',\n\t'search',\n\t'404',\n];\n\nconst TEMPLATE_ICONS = {\n\t'front-page': home,\n\thome: verse,\n\tsingle: pin,\n\tpage,\n\tarchive,\n\tsearch,\n\t404: notFound,\n\tindex: list,\n\tcategory,\n\tauthor: commentAuthorAvatar,\n\ttaxonomy: blockMeta,\n\tdate: calendar,\n\ttag,\n\tattachment: media,\n};\n\nfunction TemplateListItem( {\n\ttitle,\n\tdirection,\n\tclassName,\n\tdescription,\n\ticon,\n\tonClick,\n\tchildren,\n} ) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={ className }\n\t\t\tonClick={ onClick }\n\t\t\tlabel={ description }\n\t\t\tshowTooltip={ !! description }\n\t\t>\n\t\t\t<Flex\n\t\t\t\tas=\"span\"\n\t\t\t\tspacing={ 2 }\n\t\t\t\talign=\"center\"\n\t\t\t\tjustify=\"center\"\n\t\t\t\tstyle={ { width: '100%' } }\n\t\t\t\tdirection={ direction }\n\t\t\t>\n\t\t\t\t<div className=\"edit-site-add-new-template__template-icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t\t<VStack\n\t\t\t\t\tclassName=\"edit-site-add-new-template__template-name\"\n\t\t\t\t\talignment=\"center\"\n\t\t\t\t\tspacing={ 0 }\n\t\t\t\t>\n\t\t\t\t\t<Text\n\t\t\t\t\t\talign=\"center\"\n\t\t\t\t\t\tweight={ 500 }\n\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Text>\n\t\t\t\t\t{ children }\n\t\t\t\t</VStack>\n\t\t\t</Flex>\n\t\t</Button>\n\t);\n}\n\nconst modalContentMap = {\n\ttemplatesList: 1,\n\tcustomTemplate: 2,\n\tcustomGenericTemplate: 3,\n};\n\nfunction NewTemplateModal( { onClose } ) {\n\tconst [ modalContent, setModalContent ] = useState(\n\t\tmodalContentMap.templatesList\n\t);\n\tconst [ entityForSuggestions, setEntityForSuggestions ] = useState( {} );\n\tconst [ isSubmitting, setIsSubmitting ] = useState( false );\n\tconst missingTemplates = useMissingTemplates( setEntityForSuggestions, () =>\n\t\tsetModalContent( modalContentMap.customTemplate )\n\t);\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst { createErrorNotice, createSuccessNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst isMobile = useViewportMatch( 'medium', '<' );\n\n\tconst { homeUrl } = useSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetUnstableBase, // Site index.\n\t\t} = select( coreStore );\n\n\t\treturn {\n\t\t\thomeUrl: getUnstableBase()?.home,\n\t\t};\n\t}, [] );\n\n\tconst TEMPLATE_SHORT_DESCRIPTIONS = {\n\t\t'front-page': homeUrl,\n\t\tdate: sprintf(\n\t\t\t// translators: %s: The homepage url.\n\t\t\t__( 'E.g. %s' ),\n\t\t\thomeUrl + '/' + new Date().getFullYear()\n\t\t),\n\t};\n\n\tasync function createTemplate( template, isWPSuggestion = true ) {\n\t\tif ( isSubmitting ) {\n\t\t\treturn;\n\t\t}\n\t\tsetIsSubmitting( true );\n\t\ttry {\n\t\t\tconst { title, description, slug } = template;\n\t\t\tconst newTemplate = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tTEMPLATE_POST_TYPE,\n\t\t\t\t{\n\t\t\t\t\tdescription,\n\t\t\t\t\t// Slugs need to be strings, so this is for template `404`\n\t\t\t\t\tslug: slug.toString(),\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\ttitle,\n\t\t\t\t\t// This adds a post meta field in template that is part of `is_custom` value calculation.\n\t\t\t\t\tis_wp_suggestion: isWPSuggestion,\n\t\t\t\t},\n\t\t\t\t{ throwOnError: true }\n\t\t\t);\n\n\t\t\t// Navigate to the created template editor.\n\t\t\thistory.push( {\n\t\t\t\tpostId: newTemplate.id,\n\t\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\t\tcanvas: 'edit',\n\t\t\t} );\n\n\t\t\tcreateSuccessNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t// translators: %s: Title of the created template e.g: \"Category\".\n\t\t\t\t\t__( '\"%s\" successfully created.' ),\n\t\t\t\t\tdecodeEntities( newTemplate.title?.rendered || title )\n\t\t\t\t),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t} catch ( error ) {\n\t\t\tconst errorMessage =\n\t\t\t\terror.message && error.code !== 'unknown_error'\n\t\t\t\t\t? error.message\n\t\t\t\t\t: __( 'An error occurred while creating the template.' );\n\n\t\t\tcreateErrorNotice( errorMessage, {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} finally {\n\t\t\tsetIsSubmitting( false );\n\t\t}\n\t}\n\tconst onModalClose = () => {\n\t\tonClose();\n\t\tsetModalContent( modalContentMap.templatesList );\n\t};\n\n\tlet modalTitle = __( 'Add template' );\n\tif ( modalContent === modalContentMap.customTemplate ) {\n\t\tmodalTitle = sprintf(\n\t\t\t// translators: %s: Name of the post type e.g: \"Post\".\n\t\t\t__( 'Add template: %s' ),\n\t\t\tentityForSuggestions.labels.singular_name\n\t\t);\n\t} else if ( modalContent === modalContentMap.customGenericTemplate ) {\n\t\tmodalTitle = __( 'Create custom template' );\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ modalTitle }\n\t\t\tclassName={ clsx( 'edit-site-add-new-template__modal', {\n\t\t\t\t'edit-site-add-new-template__modal_template_list':\n\t\t\t\t\tmodalContent === modalContentMap.templatesList,\n\t\t\t\t'edit-site-custom-template-modal':\n\t\t\t\t\tmodalContent === modalContentMap.customTemplate,\n\t\t\t} ) }\n\t\t\tonRequestClose={ onModalClose }\n\t\t\toverlayClassName={\n\t\t\t\tmodalContent === modalContentMap.customGenericTemplate\n\t\t\t\t\t? 'edit-site-custom-generic-template__modal'\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t>\n\t\t\t{ modalContent === modalContentMap.templatesList && (\n\t\t\t\t<Grid\n\t\t\t\t\tcolumns={ isMobile ? 2 : 3 }\n\t\t\t\t\tgap={ 4 }\n\t\t\t\t\talign=\"flex-start\"\n\t\t\t\t\tjustify=\"center\"\n\t\t\t\t\tclassName=\"edit-site-add-new-template__template-list__contents\"\n\t\t\t\t>\n\t\t\t\t\t<Flex className=\"edit-site-add-new-template__template-list__prompt\">\n\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t'Select what the new template should apply to:'\n\t\t\t\t\t\t) }\n\t\t\t\t\t</Flex>\n\t\t\t\t\t{ missingTemplates.map( ( template ) => {\n\t\t\t\t\t\tconst { title, slug, onClick } = template;\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<TemplateListItem\n\t\t\t\t\t\t\t\tkey={ slug }\n\t\t\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\t\t\tdirection=\"column\"\n\t\t\t\t\t\t\t\tclassName=\"edit-site-add-new-template__template-button\"\n\t\t\t\t\t\t\t\tdescription={\n\t\t\t\t\t\t\t\t\tTEMPLATE_SHORT_DESCRIPTIONS[ slug ]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ticon={ TEMPLATE_ICONS[ slug ] || layout }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tonClick\n\t\t\t\t\t\t\t\t\t\t? onClick( template )\n\t\t\t\t\t\t\t\t\t\t: createTemplate( template )\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<TemplateListItem\n\t\t\t\t\t\ttitle={ __( 'Custom template' ) }\n\t\t\t\t\t\tdirection=\"row\"\n\t\t\t\t\t\tclassName=\"edit-site-add-new-template__custom-template-button\"\n\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\tsetModalContent(\n\t\t\t\t\t\t\t\tmodalContentMap.customGenericTemplate\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<Text\n\t\t\t\t\t\t\tlineHeight={ 1.53846153846 } // 20px\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __(\n\t\t\t\t\t\t\t\t'A custom template can be manually applied to any post or page.'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</TemplateListItem>\n\t\t\t\t</Grid>\n\t\t\t) }\n\t\t\t{ modalContent === modalContentMap.customTemplate && (\n\t\t\t\t<AddCustomTemplateModalContent\n\t\t\t\t\tonSelect={ createTemplate }\n\t\t\t\t\tentityForSuggestions={ entityForSuggestions }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ modalContent === modalContentMap.customGenericTemplate && (\n\t\t\t\t<AddCustomGenericTemplateModalContent\n\t\t\t\t\tonClose={ onModalClose }\n\t\t\t\t\tcreateTemplate={ createTemplate }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</Modal>\n\t);\n}\n\nfunction NewTemplate() {\n\tconst [ showModal, setShowModal ] = useState( false );\n\n\tconst { postType } = useSelect( ( select ) => {\n\t\tconst { getPostType } = select( coreStore );\n\n\t\treturn {\n\t\t\tpostType: getPostType( TEMPLATE_POST_TYPE ),\n\t\t};\n\t}, [] );\n\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Button\n\t\t\t\tvariant=\"primary\"\n\t\t\t\tonClick={ () => setShowModal( true ) }\n\t\t\t\tlabel={ postType.labels.add_new_item }\n\t\t\t\t__next40pxDefaultSize\n\t\t\t>\n\t\t\t\t{ postType.labels.add_new_item }\n\t\t\t</Button>\n\t\t\t{ showModal && (\n\t\t\t\t<NewTemplateModal onClose={ () => setShowModal( false ) } />\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nfunction useMissingTemplates( setEntityForSuggestions, onClick ) {\n\tconst existingTemplates = useExistingTemplates();\n\tconst defaultTemplateTypes = useDefaultTemplateTypes();\n\tconst existingTemplateSlugs = ( existingTemplates || [] ).map(\n\t\t( { slug } ) => slug\n\t);\n\tconst missingDefaultTemplates = ( defaultTemplateTypes || [] ).filter(\n\t\t( template ) =>\n\t\t\tDEFAULT_TEMPLATE_SLUGS.includes( template.slug ) &&\n\t\t\t! existingTemplateSlugs.includes( template.slug )\n\t);\n\tconst onClickMenuItem = ( _entityForSuggestions ) => {\n\t\tonClick?.();\n\t\tsetEntityForSuggestions( _entityForSuggestions );\n\t};\n\t// We need to replace existing default template types with\n\t// the create specific template functionality. The original\n\t// info (title, description, etc.) is preserved in the\n\t// used hooks.\n\tconst enhancedMissingDefaultTemplateTypes = [ ...missingDefaultTemplates ];\n\tconst { defaultTaxonomiesMenuItems, taxonomiesMenuItems } =\n\t\tuseTaxonomiesMenuItems( onClickMenuItem );\n\tconst { defaultPostTypesMenuItems, postTypesMenuItems } =\n\t\tusePostTypeMenuItems( onClickMenuItem );\n\n\tconst authorMenuItem = useAuthorMenuItem( onClickMenuItem );\n\t[\n\t\t...defaultTaxonomiesMenuItems,\n\t\t...defaultPostTypesMenuItems,\n\t\tauthorMenuItem,\n\t].forEach( ( menuItem ) => {\n\t\tif ( ! menuItem ) {\n\t\t\treturn;\n\t\t}\n\t\tconst matchIndex = enhancedMissingDefaultTemplateTypes.findIndex(\n\t\t\t( template ) => template.slug === menuItem.slug\n\t\t);\n\t\t// Some default template types might have been filtered above from\n\t\t// `missingDefaultTemplates` because they only check for the general\n\t\t// template. So here we either replace or append the item, augmented\n\t\t// with the check if it has available specific item to create a\n\t\t// template for.\n\t\tif ( matchIndex > -1 ) {\n\t\t\tenhancedMissingDefaultTemplateTypes[ matchIndex ] = menuItem;\n\t\t} else {\n\t\t\tenhancedMissingDefaultTemplateTypes.push( menuItem );\n\t\t}\n\t} );\n\t// Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.\n\tenhancedMissingDefaultTemplateTypes?.sort( ( template1, template2 ) => {\n\t\treturn (\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) -\n\t\t\tDEFAULT_TEMPLATE_SLUGS.indexOf( template2.slug )\n\t\t);\n\t} );\n\tconst missingTemplates = [\n\t\t...enhancedMissingDefaultTemplateTypes,\n\t\t...usePostTypeArchiveMenuItems(),\n\t\t...postTypesMenuItems,\n\t\t...taxonomiesMenuItems,\n\t];\n\treturn missingTemplates;\n}\n\nexport default memo( NewTemplate );\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, __experimentalHStack as HStack } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState, useMemo, useCallback, useEffect } from '@wordpress/element';\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { parse } from '@wordpress/blocks';\nimport {\n\tBlockPreview,\n\tprivateApis as blockEditorPrivateApis,\n} from '@wordpress/block-editor';\nimport { DataViews, filterSortAndPaginate } from '@wordpress/dataviews';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport {\n\tprivateApis as editorPrivateApis,\n\tEditorProvider,\n} from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport { Async } from '../async';\nimport Page from '../page';\nimport { default as Link, useLink } from '../routes/link';\nimport AddNewTemplate from '../add-new-template';\nimport { useAddedBy } from './hooks';\nimport {\n\tTEMPLATE_POST_TYPE,\n\tOPERATOR_IS_ANY,\n\tLAYOUT_GRID,\n\tLAYOUT_TABLE,\n\tLAYOUT_LIST,\n} from '../../utils/constants';\n\nimport usePatternSettings from '../page-patterns/use-pattern-settings';\nimport { unlock } from '../../lock-unlock';\nimport { useEditPostAction } from '../dataviews-actions';\n\nconst { usePostActions } = unlock( editorPrivateApis );\n\nconst { useGlobalStyle } = unlock( blockEditorPrivateApis );\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nconst EMPTY_ARRAY = [];\n\nconst defaultLayouts = {\n\t[ LAYOUT_TABLE ]: {\n\t\tfields: [ 'template', 'author' ],\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tcombinedFields: [\n\t\t\t\t{\n\t\t\t\t\tid: 'template',\n\t\t\t\t\tlabel: __( 'Template' ),\n\t\t\t\t\tchildren: [ 'title', 'description' ],\n\t\t\t\t\tdirection: 'vertical',\n\t\t\t\t},\n\t\t\t],\n\t\t\tstyles: {\n\t\t\t\ttemplate: {\n\t\t\t\t\tmaxWidth: 400,\n\t\t\t\t\tminWidth: 320,\n\t\t\t\t},\n\t\t\t\tpreview: {\n\t\t\t\t\tminWidth: 120,\n\t\t\t\t\tmaxWidth: 120,\n\t\t\t\t},\n\t\t\t\tauthor: {\n\t\t\t\t\twidth: '1%',\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t[ LAYOUT_GRID ]: {\n\t\tfields: [ 'title', 'description', 'author' ],\n\t\tlayout: {\n\t\t\tmediaField: 'preview',\n\t\t\tprimaryField: 'title',\n\t\t\tcolumnFields: [ 'description' ],\n\t\t},\n\t},\n\t[ LAYOUT_LIST ]: {\n\t\tfields: [ 'title', 'description', 'author' ],\n\t\tlayout: {\n\t\t\tprimaryField: 'title',\n\t\t\tmediaField: 'preview',\n\t\t},\n\t},\n};\n\nconst DEFAULT_VIEW = {\n\ttype: LAYOUT_GRID,\n\tsearch: '',\n\tpage: 1,\n\tperPage: 20,\n\tsort: {\n\t\tfield: 'title',\n\t\tdirection: 'asc',\n\t},\n\tfields: defaultLayouts[ LAYOUT_GRID ].fields,\n\tlayout: defaultLayouts[ LAYOUT_GRID ].layout,\n\tfilters: [],\n};\n\nfunction Title( { item, viewType } ) {\n\tif ( viewType === LAYOUT_LIST ) {\n\t\treturn decodeEntities( item.title?.rendered ) || __( '(no title)' );\n\t}\n\tconst linkProps = {\n\t\tparams: {\n\t\t\tpostId: item.id,\n\t\t\tpostType: item.type,\n\t\t\tcanvas: 'edit',\n\t\t},\n\t};\n\treturn (\n\t\t<Link { ...linkProps }>\n\t\t\t{ decodeEntities( item.title?.rendered ) || __( '(no title)' ) }\n\t\t</Link>\n\t);\n}\n\nfunction AuthorField( { item } ) {\n\tconst [ isImageLoaded, setIsImageLoaded ] = useState( false );\n\tconst { text, icon, imageUrl } = useAddedBy( item.type, item.id );\n\n\treturn (\n\t\t<HStack alignment=\"left\" spacing={ 0 }>\n\t\t\t{ imageUrl && (\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx( 'page-templates-author-field__avatar', {\n\t\t\t\t\t\t'is-loaded': isImageLoaded,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t<img\n\t\t\t\t\t\tonLoad={ () => setIsImageLoaded( true ) }\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\tsrc={ imageUrl }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t{ ! imageUrl && (\n\t\t\t\t<div className=\"page-templates-author-field__icon\">\n\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<span className=\"page-templates-author-field__name\">{ text }</span>\n\t\t</HStack>\n\t);\n}\n\nfunction Preview( { item, viewType } ) {\n\tconst settings = usePatternSettings();\n\tconst [ backgroundColor = 'white' ] = useGlobalStyle( 'color.background' );\n\tconst blocks = useMemo( () => {\n\t\treturn parse( item.content.raw );\n\t}, [ item.content.raw ] );\n\tconst { onClick } = useLink( {\n\t\tpostId: item.id,\n\t\tpostType: item.type,\n\t\tcanvas: 'edit',\n\t} );\n\n\tconst isEmpty = ! blocks?.length;\n\t// Wrap everything in a block editor provider to ensure 'styles' that are needed\n\t// for the previews are synced between the site editor store and the block editor store.\n\t// Additionally we need to have the `__experimentalBlockPatterns` setting in order to\n\t// render patterns inside the previews.\n\t// TODO: Same approach is used in the patterns list and it becomes obvious that some of\n\t// the block editor settings are needed in context where we don't have the block editor.\n\t// Explore how we can solve this in a better way.\n\treturn (\n\t\t<EditorProvider post={ item } settings={ settings }>\n\t\t\t<div\n\t\t\t\tclassName={ `page-templates-preview-field is-viewtype-${ viewType }` }\n\t\t\t\tstyle={ { backgroundColor } }\n\t\t\t>\n\t\t\t\t{ viewType === LAYOUT_LIST && ! isEmpty && (\n\t\t\t\t\t<Async>\n\t\t\t\t\t\t<BlockPreview blocks={ blocks } />\n\t\t\t\t\t</Async>\n\t\t\t\t) }\n\t\t\t\t{ viewType !== LAYOUT_LIST && (\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"page-templates-preview-field__button\"\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={ onClick }\n\t\t\t\t\t\taria-label={ item.title?.rendered || item.title }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ isEmpty && __( 'Empty template' ) }\n\t\t\t\t\t\t{ ! isEmpty && (\n\t\t\t\t\t\t\t<Async>\n\t\t\t\t\t\t\t\t<BlockPreview blocks={ blocks } />\n\t\t\t\t\t\t\t</Async>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</EditorProvider>\n\t);\n}\n\nexport default function PageTemplates() {\n\tconst { params } = useLocation();\n\tconst { activeView = 'all', layout, postId } = params;\n\tconst [ selection, setSelection ] = useState( [ postId ] );\n\n\tconst defaultView = useMemo( () => {\n\t\tconst usedType = layout ?? DEFAULT_VIEW.type;\n\t\treturn {\n\t\t\t...DEFAULT_VIEW,\n\t\t\ttype: usedType,\n\t\t\tlayout: defaultLayouts[ usedType ].layout,\n\t\t\tfields: defaultLayouts[ usedType ].fields,\n\t\t\tfilters:\n\t\t\t\tactiveView !== 'all'\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'author',\n\t\t\t\t\t\t\t\toperator: 'isAny',\n\t\t\t\t\t\t\t\tvalue: [ activeView ],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t ]\n\t\t\t\t\t: [],\n\t\t};\n\t}, [ layout, activeView ] );\n\tconst [ view, setView ] = useState( defaultView );\n\tuseEffect( () => {\n\t\tsetView( ( currentView ) => ( {\n\t\t\t...currentView,\n\t\t\tfilters:\n\t\t\t\tactiveView !== 'all'\n\t\t\t\t\t? [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfield: 'author',\n\t\t\t\t\t\t\t\toperator: OPERATOR_IS_ANY,\n\t\t\t\t\t\t\t\tvalue: [ activeView ],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t ]\n\t\t\t\t\t: [],\n\t\t} ) );\n\t}, [ activeView ] );\n\n\tconst { records, isResolving: isLoadingData } = useEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_POST_TYPE,\n\t\t{\n\t\t\tper_page: -1,\n\t\t}\n\t);\n\tconst history = useHistory();\n\tconst onChangeSelection = useCallback(\n\t\t( items ) => {\n\t\t\tsetSelection( items );\n\t\t\tif ( view?.type === LAYOUT_LIST ) {\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tpostId: items.length === 1 ? items[ 0 ] : undefined,\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\t[ history, params, view?.type ]\n\t);\n\n\tconst authors = useMemo( () => {\n\t\tif ( ! records ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\tconst authorsSet = new Set();\n\t\trecords.forEach( ( template ) => {\n\t\t\tauthorsSet.add( template.author_text );\n\t\t} );\n\t\treturn Array.from( authorsSet ).map( ( author ) => ( {\n\t\t\tvalue: author,\n\t\t\tlabel: author,\n\t\t} ) );\n\t}, [ records ] );\n\n\tconst fields = useMemo(\n\t\t() => [\n\t\t\t{\n\t\t\t\tlabel: __( 'Preview' ),\n\t\t\t\tid: 'preview',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\treturn <Preview item={ item } viewType={ view.type } />;\n\t\t\t\t},\n\t\t\t\tenableSorting: false,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Template' ),\n\t\t\t\tid: 'title',\n\t\t\t\tgetValue: ( { item } ) => item.title?.rendered,\n\t\t\t\trender: ( { item } ) => (\n\t\t\t\t\t<Title item={ item } viewType={ view.type } />\n\t\t\t\t),\n\t\t\t\tenableHiding: false,\n\t\t\t\tenableGlobalSearch: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Description' ),\n\t\t\t\tid: 'description',\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\titem.description && (\n\t\t\t\t\t\t\t<span className=\"page-templates-description\">\n\t\t\t\t\t\t\t\t{ decodeEntities( item.description ) }\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tenableSorting: false,\n\t\t\t\tenableGlobalSearch: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tlabel: __( 'Author' ),\n\t\t\t\tid: 'author',\n\t\t\t\tgetValue: ( { item } ) => item.author_text,\n\t\t\t\trender: ( { item } ) => {\n\t\t\t\t\treturn <AuthorField viewType={ view.type } item={ item } />;\n\t\t\t\t},\n\t\t\t\telements: authors,\n\t\t\t},\n\t\t],\n\t\t[ authors, view.type ]\n\t);\n\n\tconst { data, paginationInfo } = useMemo( () => {\n\t\treturn filterSortAndPaginate( records, view, fields );\n\t}, [ records, view, fields ] );\n\n\tconst postTypeActions = usePostActions( {\n\t\tpostType: TEMPLATE_POST_TYPE,\n\t\tcontext: 'list',\n\t} );\n\tconst editAction = useEditPostAction();\n\tconst actions = useMemo(\n\t\t() => [ editAction, ...postTypeActions ],\n\t\t[ postTypeActions, editAction ]\n\t);\n\n\tconst onChangeView = useCallback(\n\t\t( newView ) => {\n\t\t\tif ( newView.type !== view.type ) {\n\t\t\t\thistory.push( {\n\t\t\t\t\t...params,\n\t\t\t\t\tlayout: newView.type,\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\tsetView( newView );\n\t\t},\n\t\t[ view.type, setView, history, params ]\n\t);\n\n\treturn (\n\t\t<Page\n\t\t\tclassName=\"edit-site-page-templates\"\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tactions={ <AddNewTemplate /> }\n\t\t>\n\t\t\t<DataViews\n\t\t\t\tpaginationInfo={ paginationInfo }\n\t\t\t\tfields={ fields }\n\t\t\t\tactions={ actions }\n\t\t\t\tdata={ data }\n\t\t\t\tisLoading={ isLoadingData }\n\t\t\t\tview={ view }\n\t\t\t\tonChangeView={ onChangeView }\n\t\t\t\tonChangeSelection={ onChangeSelection }\n\t\t\t\tselection={ selection }\n\t\t\t\tdefaultLayouts={ defaultLayouts }\n\t\t\t/>\n\t\t</Page>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { Button } from '@wordpress/components';\n\nexport default function SidebarButton( props ) {\n\treturn (\n\t\t<Button\n\t\t\t{ ...props }\n\t\t\tclassName={ clsx( 'edit-site-sidebar-button', props.className ) }\n\t\t/>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalHeading as Heading,\n\t__experimentalVStack as VStack,\n} from '@wordpress/components';\nimport { isRTL, __, sprintf } from '@wordpress/i18n';\nimport { chevronRight, chevronLeft } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport SidebarButton from '../sidebar-button';\nimport {\n\tisPreviewingTheme,\n\tcurrentlyPreviewingTheme,\n} from '../../utils/is-previewing-theme';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory, useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreen( {\n\tisRoot,\n\ttitle,\n\tactions,\n\tmeta,\n\tcontent,\n\tfooter,\n\tdescription,\n\tbackPath: backPathProp,\n} ) {\n\tconst { dashboardLink, dashboardLinkText, previewingThemeName } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\t\t\tconst currentlyPreviewingThemeId = currentlyPreviewingTheme();\n\t\t\treturn {\n\t\t\t\tdashboardLink: getSettings().__experimentalDashboardLink,\n\t\t\t\tdashboardLinkText:\n\t\t\t\t\tgetSettings().__experimentalDashboardLinkText,\n\t\t\t\t// Do not call `getTheme` with null, it will cause a request to\n\t\t\t\t// the server.\n\t\t\t\tpreviewingThemeName: currentlyPreviewingThemeId\n\t\t\t\t\t? select( coreStore ).getTheme( currentlyPreviewingThemeId )\n\t\t\t\t\t\t\t?.name?.rendered\n\t\t\t\t\t: undefined,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst location = useLocation();\n\tconst history = useHistory();\n\tconst { navigate } = useContext( SidebarNavigationContext );\n\tconst backPath = backPathProp ?? location.state?.backPath;\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\n\treturn (\n\t\t<>\n\t\t\t<VStack\n\t\t\t\tclassName={ clsx( 'edit-site-sidebar-navigation-screen__main', {\n\t\t\t\t\t'has-footer': !! footer,\n\t\t\t\t} ) }\n\t\t\t\tspacing={ 0 }\n\t\t\t\tjustify=\"flex-start\"\n\t\t\t>\n\t\t\t\t<HStack\n\t\t\t\t\tspacing={ 3 }\n\t\t\t\t\talignment=\"flex-start\"\n\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title-icon\"\n\t\t\t\t>\n\t\t\t\t\t{ ! isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\thistory.push( backPath );\n\t\t\t\t\t\t\t\tnavigate( 'back' );\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={ __( 'Back' ) }\n\t\t\t\t\t\t\tshowTooltip={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ isRoot && (\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\tdashboardLinkText || __( 'Go to the Dashboard' )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thref={ dashboardLink || 'index.php' }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t<Heading\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen__title\"\n\t\t\t\t\t\tcolor={ '#e0e0e0' /* $gray-200 */ }\n\t\t\t\t\t\tlevel={ 1 }\n\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! isPreviewingTheme()\n\t\t\t\t\t\t\t? title\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t\t'Previewing %1$s: %2$s',\n\t\t\t\t\t\t\t\t\tpreviewingThemeName,\n\t\t\t\t\t\t\t\t\ttitle\n\t\t\t\t\t\t\t ) }\n\t\t\t\t\t</Heading>\n\t\t\t\t\t{ actions && (\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__actions\">\n\t\t\t\t\t\t\t{ actions }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</HStack>\n\t\t\t\t{ meta && (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__meta\">\n\t\t\t\t\t\t\t{ meta }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</>\n\t\t\t\t) }\n\n\t\t\t\t<div className=\"edit-site-sidebar-navigation-screen__content\">\n\t\t\t\t\t{ description && (\n\t\t\t\t\t\t<p className=\"edit-site-sidebar-navigation-screen__description\">\n\t\t\t\t\t\t\t{ description }\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) }\n\t\t\t\t\t{ content }\n\t\t\t\t</div>\n\t\t\t</VStack>\n\t\t\t{ footer && (\n\t\t\t\t<footer className=\"edit-site-sidebar-navigation-screen__footer\">\n\t\t\t\t\t{ footer }\n\t\t\t\t</footer>\n\t\t\t) }\n\t\t</>\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 { 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 * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItem as Item,\n\t__experimentalHStack as HStack,\n\tFlexBlock,\n} from '@wordpress/components';\nimport { isRTL } from '@wordpress/i18n';\nimport { chevronRightSmall, chevronLeftSmall, Icon } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { SidebarNavigationContext } from '../sidebar';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationItem( {\n\tclassName,\n\ticon,\n\twithChevron = false,\n\tsuffix,\n\tuid,\n\tparams,\n\tonClick,\n\tchildren,\n\t...props\n} ) {\n\tconst history = useHistory();\n\tconst { navigate } = useContext( SidebarNavigationContext );\n\t// If there is no custom click handler, create one that navigates to `params`.\n\tfunction handleClick( e ) {\n\t\tif ( onClick ) {\n\t\t\tonClick( e );\n\t\t\tnavigate( 'forward' );\n\t\t} else if ( params ) {\n\t\t\te.preventDefault();\n\t\t\thistory.push( params );\n\t\t\tnavigate( 'forward', `[id=\"${ uid }\"]` );\n\t\t}\n\t}\n\n\treturn (\n\t\t<Item\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-item',\n\t\t\t\t{ 'with-suffix': ! withChevron && suffix },\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\tonClick={ handleClick }\n\t\t\tid={ uid }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<HStack justify=\"flex-start\">\n\t\t\t\t{ icon && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tstyle={ { fill: 'currentcolor' } }\n\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t<FlexBlock>{ children }</FlexBlock>\n\t\t\t\t{ withChevron && (\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ isRTL() ? chevronLeftSmall : chevronRightSmall }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-item__drilldown-indicator\"\n\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ! withChevron && suffix }\n\t\t\t</HStack>\n\t\t</Item>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelLabel( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__label\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __experimentalHStack as HStack } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelRow( {\n\tlabel,\n\tchildren,\n\tclassName,\n\t...extraProps\n} ) {\n\treturn (\n\t\t<HStack\n\t\t\tkey={ label }\n\t\t\tspacing={ 5 }\n\t\t\talignment=\"left\"\n\t\t\tclassName={ clsx(\n\t\t\t\t'edit-site-sidebar-navigation-details-screen-panel__row',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\t{ ...extraProps }\n\t\t>\n\t\t\t{ children }\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalText as Text } from '@wordpress/components';\n\nexport default function SidebarNavigationScreenDetailsPanelValue( {\n\tchildren,\n} ) {\n\treturn (\n\t\t<Text className=\"edit-site-sidebar-navigation-details-screen-panel__value\">\n\t\t\t{ children }\n\t\t</Text>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { humanTimeDiff } from '@wordpress/date';\nimport { createInterpolateElement } from '@wordpress/element';\nimport { addQueryArgs } from '@wordpress/url';\nimport {\n\tIcon,\n\t__experimentalItemGroup as ItemGroup,\n} from '@wordpress/components';\nimport { backup } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport {\n\tSidebarNavigationScreenDetailsPanelRow,\n\tSidebarNavigationScreenDetailsPanelLabel,\n\tSidebarNavigationScreenDetailsPanelValue,\n} from '../sidebar-navigation-screen-details-panel';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\n\nexport default function SidebarNavigationScreenDetailsFooter( {\n\trecord,\n\t...otherProps\n} ) {\n\t/*\n\t * There might be other items in the future,\n\t * but for now it's just modified date.\n\t * Later we might render a list of items and isolate\n\t * the following logic.\n\t */\n\tconst hrefProps = {};\n\tconst lastRevisionId =\n\t\trecord?._links?.[ 'predecessor-version' ]?.[ 0 ]?.id ?? null;\n\tconst revisionsCount =\n\t\trecord?._links?.[ 'version-history' ]?.[ 0 ]?.count ?? 0;\n\t// Enable the revisions link if there is a last revision and there are more than one revisions.\n\tif ( lastRevisionId && revisionsCount > 1 ) {\n\t\threfProps.href = addQueryArgs( 'revision.php', {\n\t\t\trevision: record?._links[ 'predecessor-version' ][ 0 ].id,\n\t\t} );\n\t\threfProps.as = 'a';\n\t}\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-details-footer\">\n\t\t\t<SidebarNavigationItem\n\t\t\t\taria-label={ __( 'Revisions' ) }\n\t\t\t\t{ ...hrefProps }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t<SidebarNavigationScreenDetailsPanelRow justify=\"space-between\">\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t\t{ __( 'Last modified' ) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelLabel>\n\t\t\t\t\t<SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t\t{ createInterpolateElement(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t/* translators: %s: is the relative time when the post was last modified. */\n\t\t\t\t\t\t\t\t__( '<time>%s</time>' ),\n\t\t\t\t\t\t\t\thumanTimeDiff( record.modified )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttime: <time dateTime={ record.modified } />,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t) }\n\t\t\t\t\t</SidebarNavigationScreenDetailsPanelValue>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-navigation-screen-details-footer__icon\"\n\t\t\t\t\t\ticon={ backup }\n\t\t\t\t\t/>\n\t\t\t\t</SidebarNavigationScreenDetailsPanelRow>\n\t\t\t</SidebarNavigationItem>\n\t\t</ItemGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { edit, seen } from '@wordpress/icons';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useViewportMatch } from '@wordpress/compose';\nimport { useCallback } from '@wordpress/element';\nimport { store as editorStore } from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport SidebarButton from '../sidebar-button';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport StyleBook from '../style-book';\nimport useGlobalStylesRevisions from '../global-styles/screen-revisions/use-global-styles-revisions';\nimport SidebarNavigationScreenDetailsFooter from '../sidebar-navigation-screen-details-footer';\nimport SidebarNavigationScreenGlobalStylesContent from './content';\n\nexport function SidebarNavigationItemGlobalStyles( props ) {\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setCanvasMode } = unlock( useDispatch( editSiteStore ) );\n\n\tconst hasGlobalStyleVariations = useSelect(\n\t\t( select ) =>\n\t\t\t!! select(\n\t\t\t\tcoreStore\n\t\t\t).__experimentalGetCurrentThemeGlobalStylesVariations()?.length,\n\t\t[]\n\t);\n\tif ( hasGlobalStyleVariations ) {\n\t\treturn (\n\t\t\t<SidebarNavigationItem\n\t\t\t\t{ ...props }\n\t\t\t\tparams={ { path: '/wp_global_styles' } }\n\t\t\t\tuid=\"global-styles-navigation-item\"\n\t\t\t/>\n\t\t);\n\t}\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...props }\n\t\t\tonClick={ () => {\n\t\t\t\t// Switch to edit mode.\n\t\t\t\tsetCanvasMode( 'edit' );\n\t\t\t\t// Open global styles sidebar.\n\t\t\t\topenGeneralSidebar( 'edit-site/global-styles' );\n\t\t\t} }\n\t\t/>\n\t);\n}\n\nexport default function SidebarNavigationScreenGlobalStyles( { backPath } ) {\n\tconst { revisions, isLoading: isLoadingRevisions } =\n\t\tuseGlobalStylesRevisions();\n\tconst { openGeneralSidebar } = useDispatch( editSiteStore );\n\tconst { setIsListViewOpened } = useDispatch( editorStore );\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst { setCanvasMode, setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\tconst { isViewMode, isStyleBookOpened, revisionsCount } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getCanvasMode, getEditorCanvasContainerView } = unlock(\n\t\t\t\tselect( editSiteStore )\n\t\t\t);\n\t\t\tconst { getEntityRecord, __experimentalGetCurrentGlobalStylesId } =\n\t\t\t\tselect( coreStore );\n\t\t\tconst globalStylesId = __experimentalGetCurrentGlobalStylesId();\n\t\t\tconst globalStyles = globalStylesId\n\t\t\t\t? getEntityRecord( 'root', 'globalStyles', globalStylesId )\n\t\t\t\t: undefined;\n\t\t\treturn {\n\t\t\t\tisViewMode: 'view' === getCanvasMode(),\n\t\t\t\tisStyleBookOpened:\n\t\t\t\t\t'style-book' === getEditorCanvasContainerView(),\n\t\t\t\trevisionsCount:\n\t\t\t\t\tglobalStyles?._links?.[ 'version-history' ]?.[ 0 ]?.count ??\n\t\t\t\t\t0,\n\t\t\t};\n\t\t},\n\t\t[]\n\t);\n\tconst { set: setPreference } = useDispatch( preferencesStore );\n\n\tconst openGlobalStyles = useCallback( async () => {\n\t\treturn Promise.all( [\n\t\t\tsetPreference( 'core', 'distractionFree', false ),\n\t\t\tsetCanvasMode( 'edit' ),\n\t\t\topenGeneralSidebar( 'edit-site/global-styles' ),\n\t\t] );\n\t}, [ setCanvasMode, openGeneralSidebar, setPreference ] );\n\n\tconst openStyleBook = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the Style Book once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. This ensures that\n\t\t// the Style Book is not prematurely closed.\n\t\tsetEditorCanvasContainerView( 'style-book' );\n\t\tsetIsListViewOpened( false );\n\t}, [\n\t\topenGlobalStyles,\n\t\tsetEditorCanvasContainerView,\n\t\tsetIsListViewOpened,\n\t] );\n\n\tconst openRevisions = useCallback( async () => {\n\t\tawait openGlobalStyles();\n\t\t// Open the global styles revisions once the canvas mode is set to edit,\n\t\t// and the global styles sidebar is open. The global styles UI is responsible\n\t\t// for redirecting to the revisions screen once the editor canvas container\n\t\t// has been set to 'global-styles-revisions'.\n\t\tsetEditorCanvasContainerView( 'global-styles-revisions' );\n\t}, [ openGlobalStyles, setEditorCanvasContainerView ] );\n\n\t// If there are no revisions, do not render a footer.\n\tconst hasRevisions = revisionsCount > 0;\n\tconst modifiedDateTime = revisions?.[ 0 ]?.modified;\n\tconst shouldShowGlobalStylesFooter =\n\t\thasRevisions && ! isLoadingRevisions && modifiedDateTime;\n\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationScreen\n\t\t\t\ttitle={ __( 'Styles' ) }\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Choose a different style combination for the theme styles.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\tcontent={ <SidebarNavigationScreenGlobalStylesContent /> }\n\t\t\t\tfooter={\n\t\t\t\t\tshouldShowGlobalStylesFooter && (\n\t\t\t\t\t\t<SidebarNavigationScreenDetailsFooter\n\t\t\t\t\t\t\trecord={ revisions?.[ 0 ] }\n\t\t\t\t\t\t\tonClick={ openRevisions }\n\t\t\t\t\t\t/>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t\tactions={\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ ! isMobileViewport && (\n\t\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\t\ticon={ seen }\n\t\t\t\t\t\t\t\tlabel={ __( 'Style Book' ) }\n\t\t\t\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\t\t\t\tsetEditorCanvasContainerView(\n\t\t\t\t\t\t\t\t\t\t! isStyleBookOpened\n\t\t\t\t\t\t\t\t\t\t\t? 'style-book'\n\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\tisPressed={ isStyleBookOpened }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t<SidebarButton\n\t\t\t\t\t\t\ticon={ edit }\n\t\t\t\t\t\t\tlabel={ __( 'Edit styles' ) }\n\t\t\t\t\t\t\tonClick={ async () => await openGlobalStyles() }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isStyleBookOpened && ! isMobileViewport && isViewMode && (\n\t\t\t\t<StyleBook\n\t\t\t\t\tenableResizing={ false }\n\t\t\t\t\tisSelected={ () => false }\n\t\t\t\t\tonClick={ openStyleBook }\n\t\t\t\t\tonSelect={ openStyleBook }\n\t\t\t\t\tshowCloseButton={ false }\n\t\t\t\t\tshowTabs={ false }\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 navigation = (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14.5c-3.6 0-6.5-2.9-6.5-6.5S8.4 5.5 12 5.5s6.5 2.9 6.5 6.5-2.9 6.5-6.5 6.5zM9 16l4.5-3L15 8.4l-4.5 3L9 16z\" />\n\t</SVG>\n);\n\nexport default navigation;\n","/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { layout, symbol, navigation, styles, page } from '@wordpress/icons';\nimport { useDispatch } from '@wordpress/data';\nimport { useEffect } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { SidebarNavigationItemGlobalStyles } from '../sidebar-navigation-screen-global-styles';\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n\tPATTERN_TYPES,\n} from '../../utils/constants';\n\nexport default function SidebarNavigationScreenMain() {\n\tconst { setEditorCanvasContainerView } = unlock(\n\t\tuseDispatch( editSiteStore )\n\t);\n\n\t// Clear the editor canvas container view when accessing the main navigation screen.\n\tuseEffect( () => {\n\t\tsetEditorCanvasContainerView( undefined );\n\t}, [ setEditorCanvasContainerView ] );\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot\n\t\t\ttitle={ __( 'Design' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Customize the appearance of your website using the block editor.'\n\t\t\t) }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t<ItemGroup>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"navigation-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Navigation' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItemGlobalStyles\n\t\t\t\t\t\t\tuid=\"styles-navigation-item\"\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ styles }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Styles' ) }\n\t\t\t\t\t\t</SidebarNavigationItemGlobalStyles>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"page-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: 'page' } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ page }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Pages' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"template-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: TEMPLATE_POST_TYPE } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ layout }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Templates' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t\t<SidebarNavigationItem\n\t\t\t\t\t\t\tuid=\"patterns-navigation-item\"\n\t\t\t\t\t\t\tparams={ { postType: PATTERN_TYPES.user } }\n\t\t\t\t\t\t\twithChevron\n\t\t\t\t\t\t\ticon={ symbol }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Patterns' ) }\n\t\t\t\t\t\t</SidebarNavigationItem>\n\t\t\t\t\t</ItemGroup>\n\t\t\t\t</>\n\t\t\t}\n\t\t/>\n\t);\n}\n","// This requested is preloaded in `gutenberg_preload_navigation_posts`.\n// As unbounded queries are limited to 100 by `fetchAllMiddleware`\n// on apiFetch this query is limited to 100.\n// These parameters must be kept aligned with those in\n// lib/compat/wordpress-6.3/navigation-block-preloading.php\n// and\n// block-library/src/navigation/constants.js\nexport const PRELOADED_NAVIGATION_MENUS_QUERY = {\n\tper_page: 100,\n\tstatus: [ 'publish', 'draft' ],\n\torder: 'desc',\n\torderby: 'date',\n};\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tTextControl,\n\tModal,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\n\nconst notEmptyString = ( testString ) => testString?.trim()?.length > 0;\n\nexport default function RenameModal( { menuTitle, onClose, onSave } ) {\n\tconst [ editedMenuTitle, setEditedMenuTitle ] = useState( menuTitle );\n\n\tconst titleHasChanged = editedMenuTitle !== menuTitle;\n\n\tconst isEditedMenuTitleValid =\n\t\ttitleHasChanged && notEmptyString( editedMenuTitle );\n\n\treturn (\n\t\t<Modal\n\t\t\ttitle={ __( 'Rename' ) }\n\t\t\tonRequestClose={ onClose }\n\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\tsize=\"small\"\n\t\t>\n\t\t\t<form className=\"sidebar-navigation__rename-modal-form\">\n\t\t\t\t<VStack spacing=\"3\">\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tvalue={ editedMenuTitle }\n\t\t\t\t\t\tplaceholder={ __( 'Navigation title' ) }\n\t\t\t\t\t\tonChange={ setEditedMenuTitle }\n\t\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\t/>\n\t\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t\t</Button>\n\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\taccessibleWhenDisabled\n\t\t\t\t\t\t\tdisabled={ ! isEditedMenuTitleValid }\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\tonClick={ ( e ) => {\n\t\t\t\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\t\t\t\tif ( ! isEditedMenuTitleValid ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonSave( { title: editedMenuTitle } );\n\n\t\t\t\t\t\t\t\t// Immediate close avoids ability to hit save multiple times.\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</HStack>\n\t\t\t\t</VStack>\n\t\t\t</form>\n\t\t</Modal>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\n\nexport default function DeleteConfirmDialog( { onClose, onConfirm } ) {\n\treturn (\n\t\t<ConfirmDialog\n\t\t\tisOpen\n\t\t\tonConfirm={ () => {\n\t\t\t\tonConfirm();\n\n\t\t\t\t// Immediate close avoids ability to hit delete multiple times.\n\t\t\t\tonClose();\n\t\t\t} }\n\t\t\tonCancel={ onClose }\n\t\t\tconfirmButtonText={ __( 'Delete' ) }\n\t\t\tsize=\"medium\"\n\t\t>\n\t\t\t{ __( 'Are you sure you want to delete this Navigation Menu?' ) }\n\t\t</ConfirmDialog>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { useState } from '@wordpress/element';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport RenameModal from './rename-modal';\nimport DeleteConfirmDialog from './delete-confirm-dialog';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst POPOVER_PROPS = {\n\tposition: 'bottom right',\n};\n\nexport default function ScreenNavigationMoreMenu( props ) {\n\tconst { onDelete, onSave, onDuplicate, menuTitle, menuId } = props;\n\n\tconst [ renameModalOpen, setRenameModalOpen ] = useState( false );\n\tconst [ deleteConfirmDialogOpen, setDeleteConfirmDialogOpen ] =\n\t\tuseState( false );\n\n\tconst history = useHistory();\n\n\tconst closeModals = () => {\n\t\tsetRenameModalOpen( false );\n\t\tsetDeleteConfirmDialogOpen( false );\n\t};\n\tconst openRenameModal = () => setRenameModalOpen( true );\n\tconst openDeleteConfirmDialog = () => setDeleteConfirmDialogOpen( true );\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownMenu\n\t\t\t\tclassName=\"sidebar-navigation__more-menu\"\n\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\ticon={ moreVertical }\n\t\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\t>\n\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenRenameModal();\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\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{ __( 'Rename' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\thistory.push( {\n\t\t\t\t\t\t\t\t\t\tpostId: menuId,\n\t\t\t\t\t\t\t\t\t\tpostType: 'wp_navigation',\n\t\t\t\t\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t\t\t\t\t} );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Edit' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tonDuplicate();\n\t\t\t\t\t\t\t\t\tonClose();\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{ __( 'Duplicate' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\topenDeleteConfirmDialog();\n\n\t\t\t\t\t\t\t\t\t// Close the dropdown after opening the modal.\n\t\t\t\t\t\t\t\t\tonClose();\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{ __( 'Delete' ) }\n\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</DropdownMenu>\n\t\t\t{ deleteConfirmDialogOpen && (\n\t\t\t\t<DeleteConfirmDialog\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tonConfirm={ onDelete }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ renameModalOpen && (\n\t\t\t\t<RenameModal\n\t\t\t\t\tonClose={ closeModals }\n\t\t\t\t\tmenuTitle={ menuTitle }\n\t\t\t\t\tonSave={ onSave }\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 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 */\n\nimport { chevronUp, chevronDown, moreVertical } from '@wordpress/icons';\nimport { DropdownMenu, MenuItem, MenuGroup } from '@wordpress/components';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { useCallback } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { BlockTitle, store as blockEditorStore } from '@wordpress/block-editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\nconst POPOVER_PROPS = {\n\tclassName: 'block-editor-block-settings-menu__popover',\n\tplacement: 'bottom-start',\n};\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nexport default function LeafMoreMenu( props ) {\n\tconst history = useHistory();\n\tconst { block } = props;\n\tconst { clientId } = block;\n\tconst { moveBlocksDown, moveBlocksUp, removeBlocks } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst removeLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Remove %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst goToLabel = sprintf(\n\t\t/* translators: %s: block name */\n\t\t__( 'Go to %s' ),\n\t\tBlockTitle( { clientId, maximumLength: 25 } )\n\t);\n\n\tconst rootClientId = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getBlockRootClientId } = select( blockEditorStore );\n\n\t\t\treturn getBlockRootClientId( clientId );\n\t\t},\n\t\t[ clientId ]\n\t);\n\n\tconst onGoToPage = useCallback(\n\t\t( selectedBlock ) => {\n\t\t\tconst { attributes, name } = selectedBlock;\n\t\t\tif (\n\t\t\t\tattributes.kind === 'post-type' &&\n\t\t\t\tattributes.id &&\n\t\t\t\tattributes.type &&\n\t\t\t\thistory\n\t\t\t) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: attributes.type,\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t\tif ( name === 'core/page-list-item' && attributes.id && history ) {\n\t\t\t\tconst { params } = history.getLocationWithParams();\n\t\t\t\thistory.push(\n\t\t\t\t\t{\n\t\t\t\t\t\tpostType: 'page',\n\t\t\t\t\t\tpostId: attributes.id,\n\t\t\t\t\t\tcanvas: 'edit',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tbackPath: params,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ history ]\n\t);\n\n\treturn (\n\t\t<DropdownMenu\n\t\t\ticon={ moreVertical }\n\t\t\tlabel={ __( 'Options' ) }\n\t\t\tclassName=\"block-editor-block-settings-menu\"\n\t\t\tpopoverProps={ POPOVER_PROPS }\n\t\t\tnoIcons\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ ( { onClose } ) => (\n\t\t\t\t<>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronUp }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksUp( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move up' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tmoveBlocksDown( [ clientId ], rootClientId );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Move down' ) }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t{ block.attributes?.type === 'page' &&\n\t\t\t\t\t\t\tblock.attributes?.id && (\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tonGoToPage( block );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ goToLabel }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\tremoveBlocks( [ clientId ], false );\n\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ removeLabel }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t</MenuGroup>\n\t\t\t\t</>\n\t\t\t) }\n\t\t</DropdownMenu>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tprivateApis as blockEditorPrivateApis,\n\tstore as blockEditorStore,\n\tBlockList,\n} from '@wordpress/block-editor';\nimport { useDispatch, useSelect } from '@wordpress/data';\nimport { createBlock } from '@wordpress/blocks';\nimport { useCallback } from '@wordpress/element';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport LeafMoreMenu from './leaf-more-menu';\n\nconst { PrivateListView } = unlock( blockEditorPrivateApis );\n\n// Needs to be kept in sync with the query used at packages/block-library/src/page-list/edit.js.\nconst MAX_PAGE_COUNT = 100;\nconst PAGES_QUERY = [\n\t'postType',\n\t'page',\n\t{\n\t\tper_page: MAX_PAGE_COUNT,\n\t\t_fields: [ 'id', 'link', 'menu_order', 'parent', 'title', 'type' ],\n\t\t// TODO: When https://core.trac.wordpress.org/ticket/39037 REST API support for multiple orderby\n\t\t// values is resolved, update 'orderby' to [ 'menu_order', 'post_title' ] to provide a consistent\n\t\t// sort.\n\t\torderby: 'menu_order',\n\t\torder: 'asc',\n\t},\n];\n\nexport default function NavigationMenuContent( { rootClientId } ) {\n\tconst { listViewRootClientId, isLoading } = useSelect(\n\t\t( select ) => {\n\t\t\tconst {\n\t\t\t\tareInnerBlocksControlled,\n\t\t\t\tgetBlockName,\n\t\t\t\tgetBlockCount,\n\t\t\t\tgetBlockOrder,\n\t\t\t} = select( blockEditorStore );\n\t\t\tconst { isResolving } = select( coreStore );\n\n\t\t\tconst blockClientIds = getBlockOrder( rootClientId );\n\n\t\t\tconst hasOnlyPageListBlock =\n\t\t\t\tblockClientIds.length === 1 &&\n\t\t\t\tgetBlockName( blockClientIds[ 0 ] ) === 'core/page-list';\n\t\t\tconst pageListHasBlocks =\n\t\t\t\thasOnlyPageListBlock &&\n\t\t\t\tgetBlockCount( blockClientIds[ 0 ] ) > 0;\n\n\t\t\tconst isLoadingPages = isResolving(\n\t\t\t\t'getEntityRecords',\n\t\t\t\tPAGES_QUERY\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tlistViewRootClientId: pageListHasBlocks\n\t\t\t\t\t? blockClientIds[ 0 ]\n\t\t\t\t\t: rootClientId,\n\t\t\t\t// This is a small hack to wait for the navigation block\n\t\t\t\t// to actually load its inner blocks.\n\t\t\t\tisLoading:\n\t\t\t\t\t! areInnerBlocksControlled( rootClientId ) ||\n\t\t\t\t\tisLoadingPages,\n\t\t\t};\n\t\t},\n\t\t[ rootClientId ]\n\t);\n\tconst { replaceBlock, __unstableMarkNextChangeAsNotPersistent } =\n\t\tuseDispatch( blockEditorStore );\n\n\tconst offCanvasOnselect = useCallback(\n\t\t( block ) => {\n\t\t\tif (\n\t\t\t\tblock.name === 'core/navigation-link' &&\n\t\t\t\t! block.attributes.url\n\t\t\t) {\n\t\t\t\t__unstableMarkNextChangeAsNotPersistent();\n\t\t\t\treplaceBlock(\n\t\t\t\t\tblock.clientId,\n\t\t\t\t\tcreateBlock( 'core/navigation-link', block.attributes )\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\t\t[ __unstableMarkNextChangeAsNotPersistent, replaceBlock ]\n\t);\n\n\t// The hidden block is needed because it makes block edit side effects trigger.\n\t// For example a navigation page list load its items has an effect on edit to load its items.\n\treturn (\n\t\t<>\n\t\t\t{ ! isLoading && (\n\t\t\t\t<PrivateListView\n\t\t\t\t\trootClientId={ listViewRootClientId }\n\t\t\t\t\tonSelect={ offCanvasOnselect }\n\t\t\t\t\tblockSettingsMenu={ LeafMoreMenu }\n\t\t\t\t\tshowAppender={ false }\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__helper-block-editor\">\n\t\t\t\t<BlockList />\n\t\t\t</div>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { BlockEditorProvider } from '@wordpress/block-editor';\nimport { createBlock } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport { store as editSiteStore } from '../../store';\nimport NavigationMenuContent from '../sidebar-navigation-screen-navigation-menus/navigation-menu-content';\n\nconst noop = () => {};\n\nexport default function NavigationMenuEditor( { navigationMenuId } ) {\n\tconst { storedSettings } = useSelect( ( select ) => {\n\t\tconst { getSettings } = unlock( select( editSiteStore ) );\n\n\t\treturn {\n\t\t\tstoredSettings: getSettings(),\n\t\t};\n\t}, [] );\n\n\tconst blocks = useMemo( () => {\n\t\tif ( ! navigationMenuId ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [ createBlock( 'core/navigation', { ref: navigationMenuId } ) ];\n\t}, [ navigationMenuId ] );\n\n\tif ( ! navigationMenuId || ! blocks?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BlockEditorProvider\n\t\t\tsettings={ storedSettings }\n\t\t\tvalue={ blocks }\n\t\t\tonChange={ noop }\n\t\t\tonInput={ noop }\n\t\t>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-navigation-menus__content\">\n\t\t\t\t<NavigationMenuContent rootClientId={ blocks[ 0 ].clientId } />\n\t\t\t</div>\n\t\t</BlockEditorProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nexport default function buildNavigationLabel( title, id, status ) {\n\tif ( ! title?.rendered ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title?.rendered );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title?.rendered ),\n\t\tstatus\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { decodeEntities } from '@wordpress/html-entities';\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport NavigationMenuEditor from './navigation-menu-editor';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\n\nexport default function SingleNavigationMenu( {\n\tnavigationMenu,\n\tbackPath,\n\thandleDelete,\n\thandleDuplicate,\n\thandleSave,\n} ) {\n\tconst menuTitle = navigationMenu?.title?.rendered;\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper\n\t\t\tactions={\n\t\t\t\t<>\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ handleDelete }\n\t\t\t\t\t\tonSave={ handleSave }\n\t\t\t\t\t\tonDuplicate={ handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t}\n\t\t\tbackPath={ backPath }\n\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\tnavigationMenu?.title,\n\t\t\t\tnavigationMenu?.id,\n\t\t\t\tnavigationMenu?.status\n\t\t\t) }\n\t\t\tdescription={ __(\n\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t) }\n\t\t>\n\t\t\t<NavigationMenuEditor navigationMenuId={ navigationMenu?.id } />\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecord, store as coreStore } from '@wordpress/core-data';\nimport { Spinner } from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { SidebarNavigationScreenWrapper } from '../sidebar-navigation-screen-navigation-menus';\nimport ScreenNavigationMoreMenu from './more-menu';\nimport SingleNavigationMenu from './single-navigation-menu';\nimport useNavigationMenuHandlers from './use-navigation-menu-handlers';\nimport buildNavigationLabel from '../sidebar-navigation-screen-navigation-menus/build-navigation-label';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport const postType = `wp_navigation`;\n\nexport default function SidebarNavigationScreenNavigationMenu( { backPath } ) {\n\tconst {\n\t\tparams: { postId },\n\t} = useLocation();\n\n\tconst { record: navigationMenu, isResolving } = useEntityRecord(\n\t\t'postType',\n\t\tpostType,\n\t\tpostId\n\t);\n\n\tconst { isSaving, isDeleting } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { isSavingEntityRecord, isDeletingEntityRecord } =\n\t\t\t\tselect( coreStore );\n\n\t\t\treturn {\n\t\t\t\tisSaving: isSavingEntityRecord( 'postType', postType, postId ),\n\t\t\t\tisDeleting: isDeletingEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\tpostType,\n\t\t\t\t\tpostId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ postId ]\n\t);\n\n\tconst isLoading = isResolving || isSaving || isDeleting;\n\n\tconst menuTitle = navigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst _handleDelete = () => handleDelete( navigationMenu );\n\tconst _handleSave = ( edits ) => handleSave( navigationMenu, edits );\n\tconst _handleDuplicate = () => handleDuplicate( navigationMenu );\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __(\n\t\t\t\t\t'Navigation Menus are a curated collection of blocks that allow visitors to get around your site.'\n\t\t\t\t) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! navigationMenu ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'Navigation Menu missing.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( ! navigationMenu?.content?.raw ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tactions={\n\t\t\t\t\t<ScreenNavigationMoreMenu\n\t\t\t\t\t\tmenuId={ navigationMenu?.id }\n\t\t\t\t\t\tmenuTitle={ decodeEntities( menuTitle ) }\n\t\t\t\t\t\tonDelete={ _handleDelete }\n\t\t\t\t\t\tonSave={ _handleSave }\n\t\t\t\t\t\tonDuplicate={ _handleDuplicate }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tbackPath={ backPath }\n\t\t\t\ttitle={ buildNavigationLabel(\n\t\t\t\t\tnavigationMenu?.title,\n\t\t\t\t\tnavigationMenu?.id,\n\t\t\t\t\tnavigationMenu?.status\n\t\t\t\t) }\n\t\t\t\tdescription={ __( 'This Navigation Menu is empty.' ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SingleNavigationMenu\n\t\t\tnavigationMenu={ navigationMenu }\n\t\t\tbackPath={ backPath }\n\t\t\thandleDelete={ _handleDelete }\n\t\t\thandleSave={ _handleSave }\n\t\t\thandleDuplicate={ _handleDuplicate }\n\t\t/>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { store as coreStore } from '@wordpress/core-data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport { postType } from '.';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction useDeleteNavigationMenu() {\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\tconst history = useHistory();\n\n\tconst handleDelete = async ( navigationMenu ) => {\n\t\tconst postId = navigationMenu?.id;\n\t\ttry {\n\t\t\tawait deleteEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\t{\n\t\t\t\t\tforce: true,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice(\n\t\t\t\t__( 'Navigation Menu successfully deleted.' ),\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t\thistory.push( { postType: 'wp_navigation' } );\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to delete Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDelete;\n}\n\nfunction useSaveNavigationMenu() {\n\tconst { getEditedEntityRecord } = useSelect( ( select ) => {\n\t\tconst { getEditedEntityRecord: getEditedEntityRecordSelector } =\n\t\t\tselect( coreStore );\n\n\t\treturn {\n\t\t\tgetEditedEntityRecord: getEditedEntityRecordSelector,\n\t\t};\n\t}, [] );\n\n\tconst {\n\t\teditEntityRecord,\n\t\t__experimentalSaveSpecifiedEntityEdits: saveSpecifiedEntityEdits,\n\t} = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleSave = async ( navigationMenu, edits ) => {\n\t\tif ( ! edits ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst postId = navigationMenu?.id;\n\t\t// Prepare for revert in case of error.\n\t\tconst originalRecord = getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\tNAVIGATION_POST_TYPE,\n\t\t\tpostId\n\t\t);\n\n\t\t// Apply the edits.\n\t\teditEntityRecord( 'postType', postType, postId, edits );\n\n\t\tconst recordPropertiesToSave = Object.keys( edits );\n\n\t\t// Attempt to persist.\n\t\ttry {\n\t\t\tawait saveSpecifiedEntityEdits(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\tpostId,\n\t\t\t\trecordPropertiesToSave,\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\t\t\tcreateSuccessNotice( __( 'Renamed Navigation Menu' ), {\n\t\t\t\ttype: 'snackbar',\n\t\t\t} );\n\t\t} catch ( error ) {\n\t\t\t// Revert to original in case of error.\n\t\t\teditEntityRecord( 'postType', postType, postId, originalRecord );\n\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be renamed. */\n\t\t\t\t\t__( `Unable to rename Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleSave;\n}\n\nfunction useDuplicateNavigationMenu() {\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\n\tconst { createSuccessNotice, createErrorNotice } =\n\t\tuseDispatch( noticesStore );\n\n\tconst handleDuplicate = async ( navigationMenu ) => {\n\t\tconst menuTitle =\n\t\t\tnavigationMenu?.title?.rendered || navigationMenu?.slug;\n\n\t\ttry {\n\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t'postType',\n\t\t\t\tpostType,\n\t\t\t\t{\n\t\t\t\t\ttitle: sprintf(\n\t\t\t\t\t\t/* translators: %s: Navigation menu title */\n\t\t\t\t\t\t__( '%s (Copy)' ),\n\t\t\t\t\t\tmenuTitle\n\t\t\t\t\t),\n\t\t\t\t\tcontent: navigationMenu?.content?.raw,\n\t\t\t\t\tstatus: 'publish',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tthrowOnError: true,\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tif ( savedRecord ) {\n\t\t\t\tcreateSuccessNotice( __( 'Duplicated Navigation Menu' ), {\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t} );\n\t\t\t\thistory.push( { postType, postId: savedRecord.id } );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tcreateErrorNotice(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: %s: error message describing why the navigation menu could not be deleted. */\n\t\t\t\t\t__( `Unable to duplicate Navigation Menu (%s).` ),\n\t\t\t\t\terror?.message\n\t\t\t\t),\n\n\t\t\t\t{\n\t\t\t\t\ttype: 'snackbar',\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t};\n\n\treturn handleDuplicate;\n}\n\nexport default function useNavigationMenuHandlers() {\n\treturn {\n\t\thandleDelete: useDeleteNavigationMenu(),\n\t\thandleSave: useSaveNavigationMenu(),\n\t\thandleDuplicate: useDuplicateNavigationMenu(),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useEntityRecords, store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\n\nimport { decodeEntities } from '@wordpress/html-entities';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\tSpinner,\n} from '@wordpress/components';\nimport { navigation } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { PRELOADED_NAVIGATION_MENUS_QUERY } from './constants';\nimport { useLink } from '../routes/link';\nimport SingleNavigationMenu from '../sidebar-navigation-screen-navigation-menu/single-navigation-menu';\nimport useNavigationMenuHandlers from '../sidebar-navigation-screen-navigation-menu/use-navigation-menu-handlers';\nimport { unlock } from '../../lock-unlock';\nimport { NAVIGATION_POST_TYPE } from '../../utils/constants';\n\n// Copied from packages/block-library/src/navigation/edit/navigation-menu-selector.js.\nfunction buildMenuLabel( title, id, status ) {\n\tif ( ! title ) {\n\t\t/* translators: %s is the index of the menu in the list of menus. */\n\t\treturn sprintf( __( '(no title %s)' ), id );\n\t}\n\n\tif ( status === 'publish' ) {\n\t\treturn decodeEntities( title );\n\t}\n\n\treturn sprintf(\n\t\t// translators: %1s: title of the menu; %2s: status of the menu (draft, pending, etc.).\n\t\t__( '%1$s (%2$s)' ),\n\t\tdecodeEntities( title ),\n\t\tstatus\n\t);\n}\n\n// Save a boolean to prevent us creating a fallback more than once per session.\nlet hasCreatedFallback = false;\n\nexport default function SidebarNavigationScreenNavigationMenus( { backPath } ) {\n\tconst {\n\t\trecords: navigationMenus,\n\t\tisResolving: isResolvingNavigationMenus,\n\t\thasResolved: hasResolvedNavigationMenus,\n\t} = useEntityRecords(\n\t\t'postType',\n\t\tNAVIGATION_POST_TYPE,\n\t\tPRELOADED_NAVIGATION_MENUS_QUERY\n\t);\n\n\tconst isLoading =\n\t\tisResolvingNavigationMenus && ! hasResolvedNavigationMenus;\n\n\tconst { getNavigationFallbackId } = unlock( useSelect( coreStore ) );\n\n\tconst firstNavigationMenu = navigationMenus?.[ 0 ];\n\n\t// Save a boolean to prevent us creating a fallback more than once per session.\n\tif ( firstNavigationMenu ) {\n\t\thasCreatedFallback = true;\n\t}\n\n\t// If there is no navigation menu found\n\t// then trigger fallback algorithm to create one.\n\tif (\n\t\t! firstNavigationMenu &&\n\t\t! isResolvingNavigationMenus &&\n\t\thasResolvedNavigationMenus &&\n\t\t! hasCreatedFallback\n\t) {\n\t\tgetNavigationFallbackId();\n\t}\n\n\tconst { handleSave, handleDelete, handleDuplicate } =\n\t\tuseNavigationMenuHandlers();\n\n\tconst hasNavigationMenus = !! navigationMenus?.length;\n\n\tif ( isLoading ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t\t<Spinner className=\"edit-site-sidebar-navigation-screen-navigation-menus__loading\" />\n\t\t\t</SidebarNavigationScreenWrapper>\n\t\t);\n\t}\n\n\tif ( ! isLoading && ! hasNavigationMenus ) {\n\t\treturn (\n\t\t\t<SidebarNavigationScreenWrapper\n\t\t\t\tdescription={ __( 'No Navigation Menus found.' ) }\n\t\t\t\tbackPath={ backPath }\n\t\t\t/>\n\t\t);\n\t}\n\n\t// if single menu then render it\n\tif ( navigationMenus?.length === 1 ) {\n\t\treturn (\n\t\t\t<SingleNavigationMenu\n\t\t\t\tnavigationMenu={ firstNavigationMenu }\n\t\t\t\tbackPath={ backPath }\n\t\t\t\thandleDelete={ () => handleDelete( firstNavigationMenu ) }\n\t\t\t\thandleDuplicate={ () => handleDuplicate( firstNavigationMenu ) }\n\t\t\t\thandleSave={ ( edits ) =>\n\t\t\t\t\thandleSave( firstNavigationMenu, edits )\n\t\t\t\t}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<SidebarNavigationScreenWrapper backPath={ backPath }>\n\t\t\t<ItemGroup>\n\t\t\t\t{ navigationMenus?.map( ( { id, title, status }, index ) => (\n\t\t\t\t\t<NavMenuItem\n\t\t\t\t\t\tpostId={ id }\n\t\t\t\t\t\tkey={ id }\n\t\t\t\t\t\twithChevron\n\t\t\t\t\t\ticon={ navigation }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ buildMenuLabel( title?.rendered, index + 1, status ) }\n\t\t\t\t\t</NavMenuItem>\n\t\t\t\t) ) }\n\t\t\t</ItemGroup>\n\t\t</SidebarNavigationScreenWrapper>\n\t);\n}\n\nexport function SidebarNavigationScreenWrapper( {\n\tchildren,\n\tactions,\n\ttitle,\n\tdescription,\n\tbackPath,\n} ) {\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ title || __( 'Navigation' ) }\n\t\t\tactions={ actions }\n\t\t\tdescription={ description || __( 'Manage your Navigation Menus.' ) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={ children }\n\t\t/>\n\t);\n}\n\nconst NavMenuItem = ( { postId, ...props } ) => {\n\tconst linkInfo = useLink( {\n\t\tpostId,\n\t\tpostType: 'wp_navigation',\n\t} );\n\treturn <SidebarNavigationItem { ...linkInfo } { ...props } />;\n};\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __experimentalHStack as HStack } from '@wordpress/components';\nimport { VIEW_LAYOUTS } from '@wordpress/dataviews';\n\n/**\n * Internal dependencies\n */\nimport { useLink } from '../routes/link';\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { unlock } from '../../lock-unlock';\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function DataViewItem( {\n\ttitle,\n\tslug,\n\tcustomViewId,\n\ttype,\n\ticon,\n\tisActive,\n\tisCustom,\n\tsuffix,\n} ) {\n\tconst {\n\t\tparams: { postType, layout },\n\t} = useLocation();\n\n\tconst iconToUse =\n\t\ticon || VIEW_LAYOUTS.find( ( v ) => v.type === type ).icon;\n\n\tlet activeView = isCustom ? customViewId : slug;\n\tif ( activeView === 'all' ) {\n\t\tactiveView = undefined;\n\t}\n\tconst linkInfo = useLink( {\n\t\tpostType,\n\t\tlayout,\n\t\tactiveView,\n\t\tisCustom: isCustom ? 'true' : undefined,\n\t} );\n\treturn (\n\t\t<HStack\n\t\t\tjustify=\"flex-start\"\n\t\t\tclassName={ clsx( 'edit-site-sidebar-dataviews-dataview-item', {\n\t\t\t\t'is-selected': isActive,\n\t\t\t} ) }\n\t\t>\n\t\t\t<SidebarNavigationItem\n\t\t\t\ticon={ iconToUse }\n\t\t\t\t{ ...linkInfo }\n\t\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t\t>\n\t\t\t\t{ title }\n\t\t\t</SidebarNavigationItem>\n\t\t\t{ suffix }\n\t\t</HStack>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { useMemo } from '@wordpress/element';\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\n\n/**\n * Internal dependencies\n */\nimport DataViewItem from '../sidebar-dataviews/dataview-item';\nimport { useAddedBy } from '../page-templates/hooks';\nimport { layout } from '@wordpress/icons';\nimport { TEMPLATE_POST_TYPE } from '../../utils/constants';\n\nconst EMPTY_ARRAY = [];\n\nfunction TemplateDataviewItem( { template, isActive } ) {\n\tconst { text, icon } = useAddedBy( template.type, template.id );\n\treturn (\n\t\t<DataViewItem\n\t\t\tkey={ text }\n\t\t\tslug={ text }\n\t\t\ttitle={ text }\n\t\t\ticon={ icon }\n\t\t\tisActive={ isActive }\n\t\t\tisCustom={ false }\n\t\t/>\n\t);\n}\n\nexport default function DataviewsTemplatesSidebarContent( {\n\tactiveView,\n\ttitle,\n} ) {\n\tconst { records } = useEntityRecords( 'postType', TEMPLATE_POST_TYPE, {\n\t\tper_page: -1,\n\t} );\n\tconst firstItemPerAuthorText = useMemo( () => {\n\t\tconst firstItemPerAuthor = records?.reduce( ( acc, template ) => {\n\t\t\tconst author = template.author_text;\n\t\t\tif ( author && ! acc[ author ] ) {\n\t\t\t\tacc[ author ] = template;\n\t\t\t}\n\t\t\treturn acc;\n\t\t}, {} );\n\t\treturn (\n\t\t\t( firstItemPerAuthor && Object.values( firstItemPerAuthor ) ) ??\n\t\t\tEMPTY_ARRAY\n\t\t);\n\t}, [ records ] );\n\n\treturn (\n\t\t<ItemGroup>\n\t\t\t<DataViewItem\n\t\t\t\tslug=\"all\"\n\t\t\t\ttitle={ title }\n\t\t\t\ticon={ layout }\n\t\t\t\tisActive={ activeView === 'all' }\n\t\t\t\tisCustom={ false }\n\t\t\t/>\n\t\t\t{ firstItemPerAuthorText.map( ( template ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<TemplateDataviewItem\n\t\t\t\t\t\tkey={ template.author_text }\n\t\t\t\t\t\ttemplate={ template }\n\t\t\t\t\t\tisActive={ activeView === template.author_text }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</ItemGroup>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport { unlock } from '../../lock-unlock';\nimport DataviewsTemplatesSidebarContent from './content';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function SidebarNavigationScreenTemplatesBrowse( { backPath } ) {\n\tconst {\n\t\tparams: { activeView = 'all' },\n\t} = useLocation();\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\ttitle={ __( 'Templates' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Create new templates, or reset any customizations made to the templates supplied by your theme.'\n\t\t\t) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={\n\t\t\t\t<DataviewsTemplatesSidebarContent\n\t\t\t\t\tactiveView={ activeView }\n\t\t\t\t\ttitle={ __( 'All templates' ) }\n\t\t\t\t/>\n\t\t\t}\n\t\t/>\n\t);\n}\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\n\t\t\tfillRule=\"evenodd\"\n\t\t\tclipRule=\"evenodd\"\n\t\t\td=\"M12.848 8a1 1 0 0 1-.914-.594l-.723-1.63a.5.5 0 0 0-.447-.276H5a.5.5 0 0 0-.5.5v11.5a.5.5 0 0 0 .5.5h14a.5.5 0 0 0 .5-.5v-9A.5.5 0 0 0 19 8h-6.152Zm.612-1.5a.5.5 0 0 1-.462-.31l-.445-1.084A2 2 0 0 0 10.763 4H5a2 2 0 0 0-2 2v11.5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-5.54Z\"\n\t\t/>\n\t</SVG>\n);\n\nexport default file;\n","/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useLink } from '../routes/link';\nimport {\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n} from '../../utils/constants';\n\nexport default function CategoryItem( {\n\tcount,\n\ticon,\n\tid,\n\tisActive,\n\tlabel,\n\ttype,\n} ) {\n\tconst linkInfo = useLink( {\n\t\tcategoryId:\n\t\t\tid !== TEMPLATE_PART_ALL_AREAS_CATEGORY &&\n\t\t\tid !== PATTERN_DEFAULT_CATEGORY\n\t\t\t\t? id\n\t\t\t\t: undefined,\n\t\tpostType:\n\t\t\ttype === TEMPLATE_PART_POST_TYPE\n\t\t\t\t? TEMPLATE_PART_POST_TYPE\n\t\t\t\t: PATTERN_TYPES.user,\n\t} );\n\n\tif ( ! count ) {\n\t\treturn;\n\t}\n\n\treturn (\n\t\t<SidebarNavigationItem\n\t\t\t{ ...linkInfo }\n\t\t\ticon={ icon }\n\t\t\tsuffix={ <span>{ count }</span> }\n\t\t\taria-current={ isActive ? 'true' : undefined }\n\t\t>\n\t\t\t{ label }\n\t\t</SidebarNavigationItem>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useEntityRecords } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { store as editorStore } from '@wordpress/editor';\n\n/**\n * Internal dependencies\n */\nimport {\n\tTEMPLATE_PART_AREA_DEFAULT_CATEGORY,\n\tTEMPLATE_PART_POST_TYPE,\n} from '../../utils/constants';\n\nconst useTemplatePartsGroupedByArea = ( items ) => {\n\tconst allItems = items || [];\n\n\tconst templatePartAreas = useSelect(\n\t\t( select ) =>\n\t\t\tselect( editorStore ).__experimentalGetDefaultTemplatePartAreas(),\n\t\t[]\n\t);\n\n\t// Create map of template areas ensuring that default areas are displayed before\n\t// any custom registered template part areas.\n\tconst knownAreas = {\n\t\theader: {},\n\t\tfooter: {},\n\t\tsidebar: {},\n\t\tuncategorized: {},\n\t};\n\n\ttemplatePartAreas.forEach(\n\t\t( templatePartArea ) =>\n\t\t\t( knownAreas[ templatePartArea.area ] = {\n\t\t\t\t...templatePartArea,\n\t\t\t\ttemplateParts: [],\n\t\t\t} )\n\t);\n\n\tconst groupedByArea = allItems.reduce( ( accumulator, item ) => {\n\t\tconst key = accumulator[ item.area ]\n\t\t\t? item.area\n\t\t\t: TEMPLATE_PART_AREA_DEFAULT_CATEGORY;\n\t\taccumulator[ key ].templateParts.push( item );\n\t\treturn accumulator;\n\t}, knownAreas );\n\n\treturn groupedByArea;\n};\n\nexport default function useTemplatePartAreas() {\n\tconst { records: templateParts, isResolving: isLoading } = useEntityRecords(\n\t\t'postType',\n\t\tTEMPLATE_PART_POST_TYPE,\n\t\t{ per_page: -1 }\n\t);\n\n\treturn {\n\t\thasTemplateParts: templateParts ? !! templateParts.length : false,\n\t\tisLoading,\n\t\ttemplatePartAreas: useTemplatePartsGroupedByArea( templateParts ),\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalItem as Item,\n} from '@wordpress/components';\nimport { getTemplatePartIcon } from '@wordpress/editor';\nimport { __ } from '@wordpress/i18n';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useSelect } from '@wordpress/data';\nimport { file } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport CategoryItem from './category-item';\nimport {\n\tPATTERN_DEFAULT_CATEGORY,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_PART_ALL_AREAS_CATEGORY,\n} from '../../utils/constants';\nimport usePatternCategories from './use-pattern-categories';\nimport useTemplatePartAreas from './use-template-part-areas';\nimport { unlock } from '../../lock-unlock';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nfunction CategoriesGroup( {\n\ttemplatePartAreas,\n\tpatternCategories,\n\tcurrentCategory,\n\tcurrentType,\n} ) {\n\tconst [ allPatterns, ...otherPatterns ] = patternCategories;\n\n\treturn (\n\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t<CategoryItem\n\t\t\t\tkey=\"all\"\n\t\t\t\tcount={ Object.values( templatePartAreas )\n\t\t\t\t\t.map( ( { templateParts } ) => templateParts?.length || 0 )\n\t\t\t\t\t.reduce( ( acc, val ) => acc + val, 0 ) }\n\t\t\t\ticon={ getTemplatePartIcon() } /* no name, so it provides the fallback icon */\n\t\t\t\tlabel={ __( 'All template parts' ) }\n\t\t\t\tid={ TEMPLATE_PART_ALL_AREAS_CATEGORY }\n\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\tisActive={\n\t\t\t\t\tcurrentCategory === TEMPLATE_PART_ALL_AREAS_CATEGORY &&\n\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ Object.entries( templatePartAreas ).map(\n\t\t\t\t( [ area, { label, templateParts } ] ) => (\n\t\t\t\t\t<CategoryItem\n\t\t\t\t\t\tkey={ area }\n\t\t\t\t\t\tcount={ templateParts?.length }\n\t\t\t\t\t\ticon={ getTemplatePartIcon( area ) }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tid={ area }\n\t\t\t\t\t\ttype={ TEMPLATE_PART_POST_TYPE }\n\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\tcurrentCategory === area &&\n\t\t\t\t\t\t\tcurrentType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t)\n\t\t\t) }\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-patterns__divider\" />\n\t\t\t{ allPatterns && (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ allPatterns.name }\n\t\t\t\t\tcount={ allPatterns.count }\n\t\t\t\t\tlabel={ allPatterns.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ allPatterns.name }\n\t\t\t\t\ttype={ PATTERN_TYPES.user }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ allPatterns.name }` &&\n\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) }\n\t\t\t{ otherPatterns.map( ( category ) => (\n\t\t\t\t<CategoryItem\n\t\t\t\t\tkey={ category.name }\n\t\t\t\t\tcount={ category.count }\n\t\t\t\t\tlabel={ category.label }\n\t\t\t\t\ticon={ file }\n\t\t\t\t\tid={ category.name }\n\t\t\t\t\ttype={ PATTERN_TYPES.user }\n\t\t\t\t\tisActive={\n\t\t\t\t\t\tcurrentCategory === `${ category.name }` &&\n\t\t\t\t\t\tcurrentType === PATTERN_TYPES.user\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) ) }\n\t\t</ItemGroup>\n\t);\n}\n\nexport default function SidebarNavigationScreenPatterns( { backPath } ) {\n\tconst {\n\t\tparams: { postType, categoryId },\n\t} = useLocation();\n\tconst currentType = postType || PATTERN_TYPES.user;\n\tconst currentCategory =\n\t\tcategoryId ||\n\t\t( currentType === PATTERN_TYPES.user\n\t\t\t? PATTERN_DEFAULT_CATEGORY\n\t\t\t: TEMPLATE_PART_ALL_AREAS_CATEGORY );\n\n\tconst { templatePartAreas, hasTemplateParts, isLoading } =\n\t\tuseTemplatePartAreas();\n\tconst { patternCategories, hasPatterns } = usePatternCategories();\n\tconst isBlockBasedTheme = useSelect(\n\t\t( select ) => select( coreStore ).getCurrentTheme()?.is_block_theme,\n\t\t[]\n\t);\n\n\treturn (\n\t\t<SidebarNavigationScreen\n\t\t\tisRoot={ ! isBlockBasedTheme }\n\t\t\ttitle={ __( 'Patterns' ) }\n\t\t\tdescription={ __(\n\t\t\t\t'Manage what patterns are available when editing the site.'\n\t\t\t) }\n\t\t\tbackPath={ backPath }\n\t\t\tcontent={\n\t\t\t\t<>\n\t\t\t\t\t{ isLoading && __( 'Loading items…' ) }\n\t\t\t\t\t{ ! isLoading && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ ! hasTemplateParts && ! hasPatterns && (\n\t\t\t\t\t\t\t\t<ItemGroup className=\"edit-site-sidebar-navigation-screen-patterns__group\">\n\t\t\t\t\t\t\t\t\t<Item>{ __( 'No items found' ) }</Item>\n\t\t\t\t\t\t\t\t</ItemGroup>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t<CategoriesGroup\n\t\t\t\t\t\t\t\ttemplatePartAreas={ templatePartAreas }\n\t\t\t\t\t\t\t\tpatternCategories={ patternCategories }\n\t\t\t\t\t\t\t\tcurrentCategory={ currentCategory }\n\t\t\t\t\t\t\t\tcurrentType={ currentType }\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 * WordPress dependencies\n */\nimport {\n\tModal,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n} from '@wordpress/components';\nimport { __ } from '@wordpress/i18n';\nimport { useDispatch, resolveSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { useState } from '@wordpress/element';\nimport { plus } from '@wordpress/icons';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport SidebarNavigationItem from '../sidebar-navigation-item';\nimport { useDefaultViews } from './default-views';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nfunction AddNewItemModalContent( { type, setIsAdding } ) {\n\tconst history = useHistory();\n\tconst { saveEntityRecord } = useDispatch( coreStore );\n\tconst [ title, setTitle ] = useState( '' );\n\tconst [ isSaving, setIsSaving ] = useState( false );\n\tconst DEFAULT_VIEWS = useDefaultViews( { postType: type } );\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tsetIsSaving( true );\n\t\t\t\tconst { getEntityRecords } = resolveSelect( coreStore );\n\t\t\t\tlet dataViewTaxonomyId;\n\t\t\t\tconst dataViewTypeRecords = await getEntityRecords(\n\t\t\t\t\t'taxonomy',\n\t\t\t\t\t'wp_dataviews_type',\n\t\t\t\t\t{ slug: type }\n\t\t\t\t);\n\t\t\t\tif ( dataViewTypeRecords && dataViewTypeRecords.length > 0 ) {\n\t\t\t\t\tdataViewTaxonomyId = dataViewTypeRecords[ 0 ].id;\n\t\t\t\t} else {\n\t\t\t\t\tconst record = await saveEntityRecord(\n\t\t\t\t\t\t'taxonomy',\n\t\t\t\t\t\t'wp_dataviews_type',\n\t\t\t\t\t\t{ name: type }\n\t\t\t\t\t);\n\t\t\t\t\tif ( record && record.id ) {\n\t\t\t\t\t\tdataViewTaxonomyId = record.id;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst savedRecord = await saveEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_dataviews',\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t\tstatus: 'publish',\n\t\t\t\t\t\twp_dataviews_type: dataViewTaxonomyId,\n\t\t\t\t\t\tcontent: JSON.stringify(\n\t\t\t\t\t\t\tDEFAULT_VIEWS[ type ][ 0 ].view\n\t\t\t\t\t\t),\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tconst {\n\t\t\t\t\tparams: { postType },\n\t\t\t\t} = history.getLocationWithParams();\n\t\t\t\thistory.push( {\n\t\t\t\t\tpostType,\n\t\t\t\t\tactiveView: savedRecord.id,\n\t\t\t\t\tisCustom: 'true',\n\t\t\t\t} );\n\t\t\t\tsetIsSaving( false );\n\t\t\t\tsetIsAdding( false );\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\tplaceholder={ __( 'My view' ) }\n\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t/>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsAdding( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title || isSaving }\n\t\t\t\t\t\tisBusy={ isSaving }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Create' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nexport default function AddNewItem( { type } ) {\n\tconst [ isAdding, setIsAdding ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<SidebarNavigationItem\n\t\t\t\ticon={ plus }\n\t\t\t\tonClick={ () => {\n\t\t\t\t\tsetIsAdding( true );\n\t\t\t\t} }\n\t\t\t\tclassName=\"dataviews__siderbar-content-add-new-item\"\n\t\t\t>\n\t\t\t\t{ __( 'New view' ) }\n\t\t\t</SidebarNavigationItem>\n\t\t\t{ isAdding && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Add new view' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsAdding( false );\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<AddNewItemModalContent\n\t\t\t\t\t\ttype={ type }\n\t\t\t\t\t\tsetIsAdding={ setIsAdding }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\nimport {\n\t__experimentalItemGroup as ItemGroup,\n\t__experimentalHeading as Heading,\n\tDropdownMenu,\n\tMenuGroup,\n\tMenuItem,\n\tTextControl,\n\t__experimentalHStack as HStack,\n\t__experimentalVStack as VStack,\n\tButton,\n\tModal,\n} from '@wordpress/components';\nimport { useMemo, useState } from '@wordpress/element';\nimport { moreVertical } from '@wordpress/icons';\nimport { __ } from '@wordpress/i18n';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport DataViewItem from './dataview-item';\nimport AddNewItem from './add-new-view';\nimport { unlock } from '../../lock-unlock';\n\nconst { useHistory } = unlock( routerPrivateApis );\n\nconst EMPTY_ARRAY = [];\n\nfunction RenameItemModalContent( { dataviewId, currentTitle, setIsRenaming } ) {\n\tconst { editEntityRecord } = useDispatch( coreStore );\n\tconst [ title, setTitle ] = useState( currentTitle );\n\treturn (\n\t\t<form\n\t\t\tonSubmit={ async ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tawait editEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_dataviews',\n\t\t\t\t\tdataviewId,\n\t\t\t\t\t{\n\t\t\t\t\t\ttitle,\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tsetIsRenaming( false );\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing=\"5\">\n\t\t\t\t<TextControl\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tlabel={ __( 'Name' ) }\n\t\t\t\t\tvalue={ title }\n\t\t\t\t\tonChange={ setTitle }\n\t\t\t\t\tplaceholder={ __( 'My view' ) }\n\t\t\t\t\tclassName=\"patterns-create-modal__name-input\"\n\t\t\t\t/>\n\t\t\t\t<HStack justify=\"right\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tsetIsRenaming( false );\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Cancel' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\taria-disabled={ ! title }\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Save' ) }\n\t\t\t\t\t</Button>\n\t\t\t\t</HStack>\n\t\t\t</VStack>\n\t\t</form>\n\t);\n}\n\nfunction CustomDataViewItem( { dataviewId, isActive } ) {\n\tconst history = useHistory();\n\tconst { dataview } = useSelect(\n\t\t( select ) => {\n\t\t\tconst { getEditedEntityRecord } = select( coreStore );\n\t\t\treturn {\n\t\t\t\tdataview: getEditedEntityRecord(\n\t\t\t\t\t'postType',\n\t\t\t\t\t'wp_dataviews',\n\t\t\t\t\tdataviewId\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t[ dataviewId ]\n\t);\n\tconst { deleteEntityRecord } = useDispatch( coreStore );\n\tconst type = useMemo( () => {\n\t\tconst viewContent = JSON.parse( dataview.content );\n\t\treturn viewContent.type;\n\t}, [ dataview.content ] );\n\tconst [ isRenaming, setIsRenaming ] = useState( false );\n\treturn (\n\t\t<>\n\t\t\t<DataViewItem\n\t\t\t\ttitle={ dataview.title }\n\t\t\t\ttype={ type }\n\t\t\t\tisActive={ isActive }\n\t\t\t\tisCustom\n\t\t\t\tcustomViewId={ dataviewId }\n\t\t\t\tsuffix={\n\t\t\t\t\t<DropdownMenu\n\t\t\t\t\t\ticon={ moreVertical }\n\t\t\t\t\t\tlabel={ __( 'Actions' ) }\n\t\t\t\t\t\tclassName=\"edit-site-sidebar-dataviews-dataview-item__dropdown-menu\"\n\t\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t\tcolor: 'inherit',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tsize: 'small',\n\t\t\t\t\t\t} }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ( { onClose } ) => (\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tsetIsRenaming( true );\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Rename' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\tonClick={ async () => {\n\t\t\t\t\t\t\t\t\t\tawait deleteEntityRecord(\n\t\t\t\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\t\t\t\t'wp_dataviews',\n\t\t\t\t\t\t\t\t\t\t\tdataview.id,\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tforce: true,\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\tif ( isActive ) {\n\t\t\t\t\t\t\t\t\t\t\tconst {\n\t\t\t\t\t\t\t\t\t\t\t\tparams: { postType },\n\t\t\t\t\t\t\t\t\t\t\t} = history.getLocationWithParams();\n\t\t\t\t\t\t\t\t\t\t\thistory.replace( { postType } );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tonClose();\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\tisDestructive\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Delete' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</DropdownMenu>\n\t\t\t\t}\n\t\t\t/>\n\t\t\t{ isRenaming && (\n\t\t\t\t<Modal\n\t\t\t\t\ttitle={ __( 'Rename' ) }\n\t\t\t\t\tonRequestClose={ () => {\n\t\t\t\t\t\tsetIsRenaming( false );\n\t\t\t\t\t} }\n\t\t\t\t\tfocusOnMount=\"firstContentElement\"\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t>\n\t\t\t\t\t<RenameItemModalContent\n\t\t\t\t\t\tdataviewId={ dataviewId }\n\t\t\t\t\t\tsetIsRenaming={ setIsRenaming }\n\t\t\t\t\t\tcurrentTitle={ dataview.title }\n\t\t\t\t\t/>\n\t\t\t\t</Modal>\n\t\t\t) }\n\t\t</>\n\t);\n}\n\nexport function useCustomDataViews( type ) {\n\tconst customDataViews = useSelect( ( select ) => {\n\t\tconst { getEntityRecords } = select( coreStore );\n\t\tconst dataViewTypeRecords = getEntityRecords(\n\t\t\t'taxonomy',\n\t\t\t'wp_dataviews_type',\n\t\t\t{ slug: type }\n\t\t);\n\t\tif ( ! dataViewTypeRecords || dataViewTypeRecords.length === 0 ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\tconst dataViews = getEntityRecords( 'postType', 'wp_dataviews', {\n\t\t\twp_dataviews_type: dataViewTypeRecords[ 0 ].id,\n\t\t\torderby: 'date',\n\t\t\torder: 'asc',\n\t\t} );\n\t\tif ( ! dataViews ) {\n\t\t\treturn EMPTY_ARRAY;\n\t\t}\n\t\treturn dataViews;\n\t} );\n\treturn customDataViews;\n}\n\nexport default function CustomDataViewsList( { type, activeView, isCustom } ) {\n\tconst customDataViews = useCustomDataViews( type );\n\treturn (\n\t\t<>\n\t\t\t<div className=\"edit-site-sidebar-navigation-screen-dataviews__group-header\">\n\t\t\t\t<Heading level={ 2 }>{ __( 'Custom Views' ) }</Heading>\n\t\t\t</div>\n\t\t\t<ItemGroup>\n\t\t\t\t{ customDataViews.map( ( customViewRecord ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<CustomDataViewItem\n\t\t\t\t\t\t\tkey={ customViewRecord.id }\n\t\t\t\t\t\t\tdataviewId={ customViewRecord.id }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\tisCustom &&\n\t\t\t\t\t\t\t\tNumber( activeView ) === customViewRecord.id\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\t<AddNewItem type={ type } />\n\t\t\t</ItemGroup>\n\t\t</>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { __experimentalItemGroup as ItemGroup } from '@wordpress/components';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useRef, useEffect } from '@wordpress/element';\nimport { usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { useDefaultViews } from './default-views';\nimport { unlock } from '../../lock-unlock';\nimport DataViewItem from './dataview-item';\nimport CustomDataViewsList from './custom-dataviews-list';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\n/**\n * Hook to switch to table layout when switching to the trash view.\n * When going out of the trash view, it switches back to the previous layout if\n * there was an automatic switch to table layout.\n */\nfunction useSwitchToTableOnTrash() {\n\tconst {\n\t\tparams: { activeView, layout, ...restParams },\n\t} = useLocation();\n\tconst history = useHistory();\n\tconst viewToSwitchOutOfTrash = useRef( undefined );\n\tconst previousActiveView = usePrevious( activeView );\n\tuseEffect( () => {\n\t\tif ( activeView === 'trash' && previousActiveView !== 'trash' ) {\n\t\t\tviewToSwitchOutOfTrash.current = layout || 'list';\n\t\t\thistory.push( { ...restParams, layout: 'table', activeView } );\n\t\t} else if (\n\t\t\tpreviousActiveView === 'trash' &&\n\t\t\tactiveView !== 'trash' &&\n\t\t\tviewToSwitchOutOfTrash.current\n\t\t) {\n\t\t\thistory.push( {\n\t\t\t\t...restParams,\n\t\t\t\tlayout: viewToSwitchOutOfTrash.current,\n\t\t\t\tactiveView,\n\t\t\t} );\n\t\t\tviewToSwitchOutOfTrash.current = undefined;\n\t\t}\n\t}, [ previousActiveView, activeView, layout, history, restParams ] );\n}\n\nexport default function DataViewsSidebarContent() {\n\tconst {\n\t\tparams: { postType, activeView = 'all', isCustom = 'false' },\n\t} = useLocation();\n\tuseSwitchToTableOnTrash();\n\tconst DEFAULT_VIEWS = useDefaultViews( { postType } );\n\tif ( ! postType ) {\n\t\treturn null;\n\t}\n\tconst isCustomBoolean = isCustom === 'true';\n\n\treturn (\n\t\t<>\n\t\t\t<ItemGroup>\n\t\t\t\t{ DEFAULT_VIEWS[ postType ].map( ( dataview ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<DataViewItem\n\t\t\t\t\t\t\tkey={ dataview.slug }\n\t\t\t\t\t\t\tslug={ dataview.slug }\n\t\t\t\t\t\t\ttitle={ dataview.title }\n\t\t\t\t\t\t\ticon={ dataview.icon }\n\t\t\t\t\t\t\ttype={ dataview.view.type }\n\t\t\t\t\t\t\tisActive={\n\t\t\t\t\t\t\t\t! isCustomBoolean &&\n\t\t\t\t\t\t\t\tdataview.slug === activeView\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tisCustom={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</ItemGroup>\n\t\t\t{ window?.__experimentalCustomViews && (\n\t\t\t\t<CustomDataViewsList\n\t\t\t\t\tactiveView={ activeView }\n\t\t\t\t\ttype={ postType }\n\t\t\t\t\tisCustom\n\t\t\t\t/>\n\t\t\t) }\n\t\t</>\n\t);\n}\n","/**\n * External dependencies\n */\nimport type { Dispatch, SetStateAction } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { TextControl } from '@wordpress/components';\nimport { useCallback, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { Form, Field, NormalizedField } from '../../types';\nimport { normalizeFields } from '../../normalize-fields';\n\ntype DataFormProps< Item > = {\n\tdata: Item;\n\tfields: Field< Item >[];\n\tform: Form;\n\tonChange: Dispatch< SetStateAction< Item > >;\n};\n\ntype DataFormControlProps< Item > = {\n\tdata: Item;\n\tfield: NormalizedField< Item >;\n\tonChange: Dispatch< SetStateAction< Item > >;\n};\n\nfunction DataFormTextControl< Item >( {\n\tdata,\n\tfield,\n\tonChange,\n}: DataFormControlProps< Item > ) {\n\tconst { id, label, placeholder } = field;\n\tconst value = field.getValue( { item: data } );\n\n\tconst onChangeControl = useCallback(\n\t\t( newValue: string ) =>\n\t\t\tonChange( ( prevItem: Item ) => ( {\n\t\t\t\t...prevItem,\n\t\t\t\t[ id ]: newValue,\n\t\t\t} ) ),\n\t\t[ id, onChange ]\n\t);\n\n\treturn (\n\t\t<TextControl\n\t\t\tlabel={ label }\n\t\t\tplaceholder={ placeholder }\n\t\t\tvalue={ value ?? '' }\n\t\t\tonChange={ onChangeControl }\n\t\t\t__next40pxDefaultSize\n\t\t/>\n\t);\n}\n\nconst controls: {\n\t[ key: string ]: < Item >(\n\t\tprops: DataFormControlProps< Item >\n\t) => JSX.Element;\n} = {\n\ttext: DataFormTextControl,\n};\n\nfunction getControlForField< Item >( field: NormalizedField< Item > ) {\n\tif ( ! field.type ) {\n\t\treturn null;\n\t}\n\n\tif ( ! Object.keys( controls ).includes( field.type ) ) {\n\t\treturn null;\n\t}\n\n\treturn controls[ field.type ];\n}\n\nexport default function DataForm< Item >( {\n\tdata,\n\tfields,\n\tform,\n\tonChange,\n}: DataFormProps< Item > ) {\n\tconst visibleFields = useMemo(\n\t\t() =>\n\t\t\tnormalizeFields(\n\t\t\t\tfields.filter(\n\t\t\t\t\t( { id } ) => !! form.visibleFields?.includes( id )\n\t\t\t\t)\n\t\t\t),\n\t\t[ fields, form.visibleFields ]\n\t);\n\n\treturn visibleFields.map( ( field ) => {\n\t\tconst DataFormControl = getControlForField( field );\n\t\treturn DataFormControl ? (\n\t\t\t<DataFormControl\n\t\t\t\tkey={ field.id }\n\t\t\t\tdata={ data }\n\t\t\t\tfield={ field }\n\t\t\t\tonChange={ onChange }\n\t\t\t/>\n\t\t) : null;\n\t} );\n}\n","/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { DataForm } from '@wordpress/dataviews';\nimport { useDispatch, useSelect, useRegistry } from '@wordpress/data';\nimport { store as coreDataStore } from '@wordpress/core-data';\nimport { Button } from '@wordpress/components';\nimport { useState, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Page from '../page';\nimport usePostFields from '../post-fields';\n\nfunction PostEditForm( { postType, postId } ) {\n\tconst ids = useMemo( () => postId.split( ',' ), [ postId ] );\n\tconst { initialEdits } = useSelect(\n\t\t( select ) => {\n\t\t\tif ( ids.length !== 1 ) {\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tinitialEdits:\n\t\t\t\t\tids.length === 1\n\t\t\t\t\t\t? select( coreDataStore ).getEntityRecord(\n\t\t\t\t\t\t\t\t'postType',\n\t\t\t\t\t\t\t\tpostType,\n\t\t\t\t\t\t\t\tids[ 0 ]\n\t\t\t\t\t\t )\n\t\t\t\t\t\t: null,\n\t\t\t};\n\t\t},\n\t\t[ postType, ids ]\n\t);\n\tconst registry = useRegistry();\n\tconst { saveEntityRecord } = useDispatch( coreDataStore );\n\tconst { fields } = usePostFields();\n\tconst form = {\n\t\tvisibleFields: [ 'title' ],\n\t};\n\tconst [ edits, setEdits ] = useState( {} );\n\tconst itemWithEdits = useMemo( () => {\n\t\treturn {\n\t\t\t...initialEdits,\n\t\t\t...edits,\n\t\t};\n\t}, [ initialEdits, edits ] );\n\tconst onSubmit = async ( event ) => {\n\t\tevent.preventDefault();\n\t\tconst { getEntityRecord } = registry.resolveSelect( coreDataStore );\n\t\tfor ( const id of ids ) {\n\t\t\tconst item = await getEntityRecord( 'postType', postType, id );\n\t\t\tsaveEntityRecord( 'postType', postType, {\n\t\t\t\t...item,\n\t\t\t\t...edits,\n\t\t\t} );\n\t\t}\n\t\tsetEdits( {} );\n\t};\n\n\treturn (\n\t\t<form onSubmit={ onSubmit }>\n\t\t\t<DataForm\n\t\t\t\tdata={ itemWithEdits }\n\t\t\t\tfields={ fields }\n\t\t\t\tform={ form }\n\t\t\t\tonChange={ setEdits }\n\t\t\t/>\n\t\t\t<Button variant=\"primary\" type=\"submit\">\n\t\t\t\t{ __( 'Update' ) }\n\t\t\t</Button>\n\t\t</form>\n\t);\n}\n\nexport function PostEdit( { postType, postId } ) {\n\treturn (\n\t\t<Page\n\t\t\tclassName={ clsx( 'edit-site-post-edit', {\n\t\t\t\t'is-empty': ! postId,\n\t\t\t} ) }\n\t\t\tlabel={ __( 'Post Edit' ) }\n\t\t>\n\t\t\t{ postId && (\n\t\t\t\t<PostEditForm postType={ postType } postId={ postId } />\n\t\t\t) }\n\t\t\t{ ! postId && <p>{ __( 'Select a page to edit' ) }</p> }\n\t\t</Page>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { __ } from '@wordpress/i18n';\nimport { useEffect } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Editor from '../editor';\nimport PostList from '../post-list';\nimport PagePatterns from '../page-patterns';\nimport PageTemplates from '../page-templates';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenGlobalStyles from '../sidebar-navigation-screen-global-styles';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport SidebarNavigationScreenNavigationMenus from '../sidebar-navigation-screen-navigation-menus';\nimport SidebarNavigationScreenTemplatesBrowse from '../sidebar-navigation-screen-templates-browse';\nimport SidebarNavigationScreenPatterns from '../sidebar-navigation-screen-patterns';\nimport SidebarNavigationScreenNavigationMenu from '../sidebar-navigation-screen-navigation-menu';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport {\n\tNAVIGATION_POST_TYPE,\n\tPATTERN_TYPES,\n\tTEMPLATE_PART_POST_TYPE,\n\tTEMPLATE_POST_TYPE,\n} from '../../utils/constants';\nimport { PostEdit } from '../post-edit';\n\nconst { useLocation, useHistory } = unlock( routerPrivateApis );\n\nfunction useRedirectOldPaths() {\n\tconst history = useHistory();\n\tconst { params } = useLocation();\n\tuseEffect( () => {\n\t\tconst { postType, path, categoryType, ...rest } = params;\n\n\t\tif ( path === '/wp_template_part/all' ) {\n\t\t\thistory.replace( { postType: TEMPLATE_PART_POST_TYPE } );\n\t\t}\n\n\t\tif ( path === '/page' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: 'page',\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/wp_template' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: TEMPLATE_POST_TYPE,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/patterns' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType:\n\t\t\t\t\tcategoryType === TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t? TEMPLATE_PART_POST_TYPE\n\t\t\t\t\t\t: PATTERN_TYPES.user,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\n\t\tif ( path === '/navigation' ) {\n\t\t\thistory.replace( {\n\t\t\t\tpostType: NAVIGATION_POST_TYPE,\n\t\t\t\t...rest,\n\t\t\t} );\n\t\t}\n\t}, [ history, params ] );\n}\n\nexport default function useLayoutAreas() {\n\tconst { params } = useLocation();\n\tconst { postType, postId, path, layout, isCustom, canvas, quickEdit } =\n\t\tparams;\n\tconst hasEditCanvasMode = canvas === 'edit';\n\tuseRedirectOldPaths();\n\n\t// Page list\n\tif ( postType === 'page' ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\tconst showQuickEdit = quickEdit && ! isListLayout;\n\t\treturn {\n\t\t\tkey: 'pages',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ __( 'Pages' ) }\n\t\t\t\t\t\tbackPath={ {} }\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PostList postType={ postType } />,\n\t\t\t\tpreview: ! showQuickEdit &&\n\t\t\t\t\t( isListLayout || hasEditCanvasMode ) && <Editor />,\n\t\t\t\tmobile: hasEditCanvasMode ? (\n\t\t\t\t\t<Editor />\n\t\t\t\t) : (\n\t\t\t\t\t<PostList postType={ postType } />\n\t\t\t\t),\n\t\t\t\tedit: showQuickEdit && (\n\t\t\t\t\t<PostEdit postType={ postType } postId={ postId } />\n\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t\tedit: showQuickEdit ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Templates\n\tif ( postType === TEMPLATE_POST_TYPE ) {\n\t\tconst isListLayout = isCustom !== 'true' && layout === 'list';\n\t\treturn {\n\t\t\tkey: 'templates',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenTemplatesBrowse backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tcontent: <PageTemplates />,\n\t\t\t\tpreview: ( isListLayout || hasEditCanvasMode ) && <Editor />,\n\t\t\t\tmobile: hasEditCanvasMode ? <Editor /> : <PageTemplates />,\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Patterns\n\tif (\n\t\t[ TEMPLATE_PART_POST_TYPE, PATTERN_TYPES.user ].includes( postType )\n\t) {\n\t\treturn {\n\t\t\tkey: 'patterns',\n\t\t\tareas: {\n\t\t\t\tsidebar: <SidebarNavigationScreenPatterns backPath={ {} } />,\n\t\t\t\tcontent: <PagePatterns />,\n\t\t\t\tmobile: hasEditCanvasMode ? <Editor /> : <PagePatterns />,\n\t\t\t\tpreview: hasEditCanvasMode && <Editor />,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Styles\n\tif ( path === '/wp_global_styles' ) {\n\t\treturn {\n\t\t\tkey: 'styles',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenGlobalStyles backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor />,\n\t\t\t\tmobile: hasEditCanvasMode && <Editor />,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Navigation\n\tif ( postType === NAVIGATION_POST_TYPE ) {\n\t\tif ( postId ) {\n\t\t\treturn {\n\t\t\t\tkey: 'navigation',\n\t\t\t\tareas: {\n\t\t\t\t\tsidebar: (\n\t\t\t\t\t\t<SidebarNavigationScreenNavigationMenu\n\t\t\t\t\t\t\tbackPath={ { postType: NAVIGATION_POST_TYPE } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\t\tpreview: <Editor />,\n\t\t\t\t\tmobile: hasEditCanvasMode && <Editor />,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\tkey: 'navigation',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreenNavigationMenus backPath={ {} } />\n\t\t\t\t),\n\t\t\t\tpreview: <Editor />,\n\t\t\t\tmobile: hasEditCanvasMode && <Editor />,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tkey: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor />,\n\t\t\tmobile: hasEditCanvasMode && <Editor />,\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport { useSelect } from '@wordpress/data';\nimport { privateApis as commandsPrivateApis } from '@wordpress/commands';\nimport { store as blockEditorStore } from '@wordpress/block-editor';\n\n/**\n * Internal dependencies\n */\nimport { store as editSiteStore } from '../../store';\nimport { unlock } from '../../lock-unlock';\nimport { useHasEditorCanvasContainer } from '../../components/editor-canvas-container';\n\nconst { useCommandContext } = unlock( commandsPrivateApis );\n\n/**\n * React hook used to set the correct command context based on the current state.\n */\nexport default function useSetCommandContext() {\n\tconst { hasBlockSelected, canvasMode } = useSelect( ( select ) => {\n\t\tconst { getCanvasMode } = unlock( select( editSiteStore ) );\n\t\tconst { getBlockSelectionStart } = select( blockEditorStore );\n\t\treturn {\n\t\t\tcanvasMode: getCanvasMode(),\n\t\t\thasBlockSelected: getBlockSelectionStart(),\n\t\t};\n\t}, [] );\n\n\tconst hasEditorCanvasContainer = useHasEditorCanvasContainer();\n\n\t// Sets the right context for the command palette\n\tlet commandContext = 'site-editor';\n\tif ( canvasMode === 'edit' ) {\n\t\tcommandContext = 'entity-edit';\n\t}\n\tif ( hasBlockSelected ) {\n\t\tcommandContext = 'block-selection-edit';\n\t}\n\tif ( hasEditorCanvasContainer ) {\n\t\t/*\n\t\t * The editor canvas overlay will likely be deprecated in the future, so for now we clear the command context\n\t\t * to remove the suggested commands that may not make sense with Style Book or Style Revisions open.\n\t\t * See https://github.com/WordPress/gutenberg/issues/62216.\n\t\t */\n\t\tcommandContext = '';\n\t}\n\tuseCommandContext( commandContext );\n}\n","/**\n * WordPress dependencies\n */\nimport { SlotFillProvider } from '@wordpress/components';\nimport {\n\tUnsavedChangesWarning,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as noticesStore } from '@wordpress/notices';\nimport { useDispatch } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { PluginArea } from '@wordpress/plugins';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport Layout from '../layout';\nimport { unlock } from '../../lock-unlock';\nimport { useCommonCommands } from '../../hooks/commands/use-common-commands';\nimport { useEditModeCommands } from '../../hooks/commands/use-edit-mode-commands';\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport useLayoutAreas from '../layout/router';\nimport useSetCommandContext from '../../hooks/commands/use-set-command-context';\n\nconst { RouterProvider } = unlock( routerPrivateApis );\nconst { GlobalStylesProvider } = unlock( editorPrivateApis );\n\nfunction AppLayout() {\n\t// This ensures the edited entity id and type are initialized properly.\n\tuseInitEditedEntityFromURL();\n\tuseEditModeCommands();\n\tuseCommonCommands();\n\tuseSetCommandContext();\n\tconst route = useLayoutAreas();\n\n\treturn <Layout route={ route } />;\n}\n\nexport default function App() {\n\tconst { createErrorNotice } = useDispatch( noticesStore );\n\n\tfunction onPluginAreaError( name ) {\n\t\tcreateErrorNotice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: plugin name */\n\t\t\t\t__(\n\t\t\t\t\t'The \"%s\" plugin has encountered an error and cannot be rendered.'\n\t\t\t\t),\n\t\t\t\tname\n\t\t\t)\n\t\t);\n\t}\n\n\treturn (\n\t\t<SlotFillProvider>\n\t\t\t<GlobalStylesProvider>\n\t\t\t\t<UnsavedChangesWarning />\n\t\t\t\t<RouterProvider>\n\t\t\t\t\t<AppLayout />\n\t\t\t\t\t<PluginArea onError={ onPluginAreaError } />\n\t\t\t\t</RouterProvider>\n\t\t\t</GlobalStylesProvider>\n\t\t</SlotFillProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tPluginMoreMenuItem as EditorPluginMoreMenuItem,\n\tPluginSidebar as EditorPluginSidebar,\n\tPluginSidebarMoreMenuItem as EditorPluginSidebarMoreMenuItem,\n} from '@wordpress/editor';\nimport { getPath } from '@wordpress/url';\nimport deprecated from '@wordpress/deprecated';\n\nconst isSiteEditor = getPath( window.location.href )?.includes(\n\t'site-editor.php'\n);\n\nconst deprecateSlot = ( name ) => {\n\tdeprecated( `wp.editPost.${ name }`, {\n\t\tsince: '6.6',\n\t\talternative: `wp.editor.${ name }`,\n\t} );\n};\n\n/* eslint-disable jsdoc/require-param */\n/**\n * @see PluginMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginMoreMenuItem( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginMoreMenuItem' );\n\treturn <EditorPluginMoreMenuItem { ...props } />;\n}\n\n/**\n * @see PluginSidebar in @wordpress/editor package.\n */\nexport function PluginSidebar( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebar' );\n\treturn <EditorPluginSidebar { ...props } />;\n}\n\n/**\n * @see PluginSidebarMoreMenuItem in @wordpress/editor package.\n */\nexport function PluginSidebarMoreMenuItem( props ) {\n\tif ( ! isSiteEditor ) {\n\t\treturn null;\n\t}\n\tdeprecateSlot( 'PluginSidebarMoreMenuItem' );\n\treturn <EditorPluginSidebarMoreMenuItem { ...props } />;\n}\n/* eslint-enable jsdoc/require-param */\n","/**\n * WordPress dependencies\n */\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\nimport { useSelect } from '@wordpress/data';\nimport { store as coreStore } from '@wordpress/core-data';\n\n/**\n * Internal dependencies\n */\nimport { unlock } from '../../lock-unlock';\nimport Editor from '../editor';\nimport SidebarNavigationScreen from '../sidebar-navigation-screen';\nimport SidebarNavigationScreenMain from '../sidebar-navigation-screen-main';\nimport DataViewsSidebarContent from '../sidebar-dataviews';\nimport PostList from '../post-list';\n\nconst { useLocation } = unlock( routerPrivateApis );\n\nexport default function useLayoutAreas() {\n\tconst { params = {} } = useLocation();\n\tconst { postType, layout, canvas } = params;\n\tconst labels = useSelect(\n\t\t( select ) => {\n\t\t\treturn select( coreStore ).getPostType( postType )?.labels;\n\t\t},\n\t\t[ postType ]\n\t);\n\n\t// Posts list.\n\tif ( [ 'post' ].includes( postType ) ) {\n\t\tconst isListLayout = layout === 'list' || ! layout;\n\t\treturn {\n\t\t\tkey: 'posts-list',\n\t\t\tareas: {\n\t\t\t\tsidebar: (\n\t\t\t\t\t<SidebarNavigationScreen\n\t\t\t\t\t\ttitle={ labels?.name }\n\t\t\t\t\t\tisRoot\n\t\t\t\t\t\tcontent={ <DataViewsSidebarContent /> }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tcontent: <PostList postType={ postType } />,\n\t\t\t\tpreview: ( isListLayout || canvas === 'edit' ) && (\n\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t),\n\t\t\t\tmobile:\n\t\t\t\t\tcanvas === 'edit' ? (\n\t\t\t\t\t\t<Editor isPostsList />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<PostList postType={ postType } />\n\t\t\t\t\t),\n\t\t\t},\n\t\t\twidths: {\n\t\t\t\tcontent: isListLayout ? 380 : undefined,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Fallback shows the home page preview\n\treturn {\n\t\tkey: 'default',\n\t\tareas: {\n\t\t\tsidebar: <SidebarNavigationScreenMain />,\n\t\t\tpreview: <Editor isPostsList />,\n\t\t\tmobile: canvas === 'edit' && <Editor isPostsList />,\n\t\t},\n\t};\n}\n","/**\n * WordPress dependencies\n */\nimport {\n\tUnsavedChangesWarning,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { privateApis as routerPrivateApis } from '@wordpress/router';\n\n/**\n * Internal dependencies\n */\nimport useInitEditedEntityFromURL from '../sync-state-with-url/use-init-edited-entity-from-url';\nimport Layout from '../layout';\nimport useLayoutAreas from './router';\nimport { unlock } from '../../lock-unlock';\n\nconst { RouterProvider } = unlock( routerPrivateApis );\nconst { GlobalStylesProvider } = unlock( editorPrivateApis );\n\nfunction PostsLayout() {\n\t// This ensures the edited entity id and type are initialized properly.\n\tuseInitEditedEntityFromURL();\n\tconst route = useLayoutAreas();\n\treturn <Layout route={ route } />;\n}\n\nexport default function PostsApp() {\n\treturn (\n\t\t<GlobalStylesProvider>\n\t\t\t<UnsavedChangesWarning />\n\t\t\t<RouterProvider>\n\t\t\t\t<PostsLayout />\n\t\t\t</RouterProvider>\n\t\t</GlobalStylesProvider>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\n\n/**\n * Internal dependencies\n */\nimport PostsApp from './components/posts-app';\n\n/**\n * Initializes the \"Posts Dashboard\"\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializePostsDashboard( id, settings ) {\n\tif ( ! globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\treturn;\n\t}\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<PostsApp />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n","/**\n * WordPress dependencies\n */\nimport { store as blocksStore } from '@wordpress/blocks';\nimport {\n\tregisterCoreBlocks,\n\t__experimentalGetCoreBlocks,\n\t__experimentalRegisterExperimentalCoreBlocks,\n} from '@wordpress/block-library';\nimport { dispatch } from '@wordpress/data';\nimport deprecated from '@wordpress/deprecated';\nimport { createRoot, StrictMode } from '@wordpress/element';\nimport {\n\tstore as editorStore,\n\tprivateApis as editorPrivateApis,\n} from '@wordpress/editor';\nimport { store as preferencesStore } from '@wordpress/preferences';\nimport {\n\tregisterLegacyWidgetBlock,\n\tregisterWidgetGroupBlock,\n} from '@wordpress/widgets';\n\n/**\n * Internal dependencies\n */\nimport './hooks';\nimport { store as editSiteStore } from './store';\nimport { unlock } from './lock-unlock';\nimport App from './components/app';\n\nconst {\n\tregisterDefaultActions,\n\tregisterCoreBlockBindingsSources,\n\tbootstrapBlockBindingsSourcesFromServer,\n} = unlock( editorPrivateApis );\n\n/**\n * Initializes the site editor screen.\n *\n * @param {string} id ID of the root element to render the screen in.\n * @param {Object} settings Editor settings.\n */\nexport function initializeEditor( id, settings ) {\n\tconst target = document.getElementById( id );\n\tconst root = createRoot( target );\n\n\tdispatch( blocksStore ).reapplyBlockTypeFilters();\n\tconst coreBlocks = __experimentalGetCoreBlocks().filter(\n\t\t( { name } ) => name !== 'core/freeform'\n\t);\n\tregisterCoreBlocks( coreBlocks );\n\tbootstrapBlockBindingsSourcesFromServer( settings?.blockBindingsSources );\n\tregisterCoreBlockBindingsSources();\n\tdispatch( blocksStore ).setFreeformFallbackBlockName( 'core/html' );\n\tregisterLegacyWidgetBlock( { inserter: false } );\n\tregisterWidgetGroupBlock( { inserter: false } );\n\tif ( globalThis.IS_GUTENBERG_PLUGIN ) {\n\t\t__experimentalRegisterExperimentalCoreBlocks( {\n\t\t\tenableFSEBlocks: true,\n\t\t} );\n\t}\n\tregisterDefaultActions();\n\n\t// We dispatch actions and update the store synchronously before rendering\n\t// so that we won't trigger unnecessary re-renders with useEffect.\n\tdispatch( preferencesStore ).setDefaults( 'core/edit-site', {\n\t\twelcomeGuide: true,\n\t\twelcomeGuideStyles: true,\n\t\twelcomeGuidePage: true,\n\t\twelcomeGuideTemplate: true,\n\t} );\n\n\tdispatch( preferencesStore ).setDefaults( 'core', {\n\t\tallowRightClickOverrides: true,\n\t\tdistractionFree: false,\n\t\teditorMode: 'visual',\n\t\tfixedToolbar: false,\n\t\tfocusMode: false,\n\t\tinactivePanels: [],\n\t\tkeepCaretInsideBlock: false,\n\t\topenPanels: [ 'post-status' ],\n\t\tshowBlockBreadcrumbs: true,\n\t\tshowListViewByDefault: false,\n\t} );\n\n\tdispatch( editSiteStore ).updateSettings( settings );\n\n\t// Keep the defaultTemplateTypes in the core/editor settings too,\n\t// so that they can be selected with core/editor selectors in any editor.\n\t// This is needed because edit-site doesn't initialize with EditorProvider,\n\t// which internally uses updateEditorSettings as well.\n\tdispatch( editorStore ).updateEditorSettings( {\n\t\tdefaultTemplateTypes: settings.defaultTemplateTypes,\n\t\tdefaultTemplatePartAreas: settings.defaultTemplatePartAreas,\n\t} );\n\n\t// Prevent the default browser action for files dropped outside of dropzones.\n\twindow.addEventListener( 'dragover', ( e ) => e.preventDefault(), false );\n\twindow.addEventListener( 'drop', ( e ) => e.preventDefault(), false );\n\n\troot.render(\n\t\t<StrictMode>\n\t\t\t<App />\n\t\t</StrictMode>\n\t);\n\n\treturn root;\n}\n\nexport function reinitializeEditor() {\n\tdeprecated( 'wp.editSite.reinitializeEditor', {\n\t\tsince: '6.2',\n\t\tversion: '6.3',\n\t} );\n}\n\nexport { default as PluginTemplateSettingPanel } from './components/plugin-template-setting-panel';\nexport { store } from './store';\nexport * from './deprecated';\n\n// Temporary: While the posts dashboard is being iterated on\n// it's being built in the same package as the site editor.\nexport { initializePostsDashboard } from './posts';\n"],"names":["leafPrototypes","getProto","characterMap","chars","Object","keys","join","allAccents","RegExp","firstAccent","matcher","match","removeAccents","string","replace","module","exports","has","remove","e","k","is","a","b","l","useState","m","useEffect","n","useLayoutEffect","p","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","useSyncExternalStore","t","o","i","Error","code","call","length","require","TYPED_OK","Uint8Array","Uint16Array","Int32Array","_has","obj","key","prototype","hasOwnProperty","assign","sources","Array","slice","arguments","source","shift","TypeError","shrinkBuf","buf","size","subarray","fnTyped","arraySet","dest","src","src_offs","len","dest_offs","set","flattenChunks","chunks","pos","chunk","result","fnUntyped","concat","apply","setTyped","on","Buf8","Buf16","Buf32","utils","STR_APPLY_OK","STR_APPLY_UIA_OK","String","fromCharCode","__","_utf8len","q","buf2binstring","string2buf","str","c2","m_pos","str_len","buf_len","charCodeAt","binstring2buf","buf2string","max","out","c_len","utf16buf","utf8border","adler","s1","s2","Z_NO_FLUSH","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_FINISH","Z_BLOCK","Z_TREES","Z_OK","Z_STREAM_END","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED","crcTable","table","makeTable","crc","end","this","text","time","xflags","os","extra","extra_len","name","comment","hcrc","done","strm","start","state","_in","last","_out","beg","dmax","wsize","whave","wnext","s_window","hold","bits","lcode","dcode","lmask","dmask","here","op","dist","from","from_source","input","output","next_in","avail_in","next_out","avail_out","lencode","distcode","lenbits","distbits","top","dolen","mode","msg","sane","adler32","crc32","inflate_fast","inflate_table","LENS","DISTS","HEAD","TYPE","BAD","ENOUGH_LENS","ENOUGH_DISTS","zswap32","InflateState","wrap","havedict","flags","check","total","head","wbits","offset","ncode","nlen","ndist","have","next","lens","work","lendyn","distdyn","back","was","inflateResetKeep","total_in","total_out","inflateReset","inflateReset2","windowBits","inflateInit2","ret","lenfix","distfix","virgin","fixedtables","sym","updatewindow","copy","inflateInit","inflate","flush","put","left","here_bits","here_op","here_val","last_bits","last_op","last_val","opts","hbuf","order","inf_leave","data_type","inflateEnd","inflateGetHeader","inflateSetDictionary","dictionary","dictLength","inflateInfo","MAXBITS","lbase","lext","dbase","dext","type","lens_index","codes","table_index","incr","fill","low","mask","min","root","curr","drop","used","huff","base","base_index","count","offs","extra_index","zlib_inflate","strings","ZStream","GZheader","toString","Inflate","options","chunkSize","to","opt","raw","err","ended","status","header","inflator","push","data","_mode","next_out_utf8","tail","utf8str","allowBufError","onEnd","onData","inflateRaw","ungzip","BROTLI_READ_SIZE","kBitMask","Uint32Array","BrotliBitReader","buf_","input_","reset","READ_SIZE","IBUF_MASK","buf_ptr_","val_","pos_","bit_pos_","bit_end_pos_","eos_","readMoreInput","dst","bytes_read","read","fillBitWindow","readBits","n_bits","val","lookup","lookupOffsets","BrotliInput","BrotliOutput","BrotliDictionary","HuffmanCode","BrotliBuildHuffmanTable","Context","Prefix","Transform","kDefaultCodeLength","kCodeLengthRepeatCode","kNumLiteralCodes","kNumInsertAndCopyCodes","kNumBlockLengthCodes","kLiteralContextBits","kDistanceContextBits","HUFFMAN_TABLE_BITS","HUFFMAN_TABLE_MASK","HUFFMAN_MAX_TABLE_SIZE","CODE_LENGTH_CODES","kCodeLengthCodeOrder","NUM_DISTANCE_SHORT_CODES","kDistanceShortCodeIndexOffset","kDistanceShortCodeValueOffset","Int8Array","kMaxHuffmanTableSize","DecodeWindowBits","br","DecodeVarLenUint8","nbits","MetaBlockLength","meta_block_length","input_end","is_uncompressed","is_metadata","DecodeMetaBlockLength","size_nibbles","size_bytes","next_byte","next_nibble","ReadSymbol","index","ReadHuffmanCode","alphabet_size","tables","simple_code_or_skip","table_size","code_lengths","max_bits_counter","max_bits","symbols","num_symbols","code_length_code_lengths","space","num_codes","v","code_len_idx","symbol","prev_code_len","repeat","repeat_code_len","code_len","old_repeat","repeat_delta","extra_bits","new_len","x","ReadHuffmanCodeLengths","ReadBlockLength","kBlockLengthPrefixCode","TranslateShortCodes","ringbuffer","MoveToFront","HuffmanTreeGroup","num_htrees","htrees","DecodeContextMap","context_map_size","context_map","max_run_length_prefix","reps","v_len","mtf","InverseMoveToFrontTransform","DecodeBlockType","max_block_type","trees","tree_type","block_types","ringbuffers","indexes","block_type","type_code","CopyUncompressedBlockToOutput","ringbuffer_mask","nbytes","rb_size","rb_pos","br_pos","write","JumpToByteBoundary","new_bit_pos","BrotliDecompressedSize","buffer","BrotliDecompress","max_backward_distance","ringbuffer_size","ringbuffer_end","block_type_trees","block_len_trees","window_bits","max_distance","dist_rb","dist_rb_idx","prev_byte1","prev_byte2","hgroup","kRingBufferWriteAheadSlack","maxDictionaryWordLength","distance_postfix_bits","num_direct_distance_codes","distance_postfix_mask","num_distance_codes","num_literal_htrees","num_dist_htrees","context_mode","htree_command","meta_block_remaining_len","block_length","num_block_types","block_type_rb","block_type_rb_index","context_modes","dist_context_map","context_map_slice","literal_htree_index","dist_context_map_slice","dist_htree_index","context_lookup_offset1","context_lookup_offset2","tmp","_o1","_o2","decode","cmd_code","range_idx","insert_code","copy_code","insert_length","copy_length","distance_code","distance","j","copy_dst","postfix","kInsertRangeLut","kCopyRangeLut","kInsertLengthPrefixCode","kCopyLengthPrefixCode","minDictionaryWordLength","offsetsByLength","word_id","sizeBitsByLength","transform_idx","kNumTransforms","transformDictionaryWord","_x","BrotliDecompressBuffer","output_size","output_buffer","init","base64","toByteArray","MAX_LENGTH","GetNextKey","step","ReplicateValue","NextTableBitSize","root_bits","root_table","code_lengths_size","table_bits","total_size","sorted","start_table","byteLength","b64","getLens","validLen","placeHoldersLen","arr","Arr","_byteLength","curByte","revLookup","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","encodeChunk","indexOf","num","PrefixCodeRange","kUppercaseFirst","kUppercaseAll","prefix","transform","suffix","kTransforms","ToUpperCase","idx","word","uppercase","skip","start_idx","prefix_pos","suffix_pos","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","__esModule","getPrototypeOf","then","ns","create","def","current","getOwnPropertyNames","forEach","definition","defineProperty","enumerable","get","prop","Symbol","toStringTag","grad","turn","rad","Math","PI","pow","round","isFinite","s","h","floor","y","exec","parseInt","substr","Number","object","N","M","H","$","parsed","trim","rgba","isValid","brightness","isDark","isLight","toHex","toRgb","toRgbString","toHsl","toHslString","toHsv","invert","w","saturate","desaturate","grayscale","lighten","darken","rotate","hue","alpha","isEqual","S","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","useGlobalSetting","useGlobalStyle","blockEditorPrivateApis","useStylesPreviewColors","textColor","backgroundColor","headingColor","linkColor","buttonBackgroundColor","coreColors","themeColors","customColors","paletteColors","textColorObject","filter","color","buttonBackgroundColorObject","highlightedColors","cloneDeep","JSON","parse","stringify","setNestedValue","path","reduce","acc","isInteger","extend","luminance","contrast","isReadable","level","cleanEmptyObject","GlobalStylesContext","STYLE_PROPERTY","__EXPERIMENTAL_STYLE_PROPERTY","blockGap","STYLE_PATH_TO_CSS_VAR_INFIX","STYLE_PATH_TO_PRESET_BLOCK_ATTRIBUTE","SUPPORTED_STYLES","getValueFromObjectPath","fieldName","flatBorderProperties","sides","getFallbackBorderStyleChange","side","border","globalBorderStyle","style","width","PushChangesToGlobalStylesControl","attributes","setAttributes","user","userConfig","setUserConfig","useContext","changes","supports","element","supportedPanels","useSelect","select","blocksStore","getSupportedStyles","useSupportedStyles","blockUserConfig","styles","blocks","useMemo","flatMap","presetAttributeKey","presetAttributeValue","linkChanges","hoverPath","hoverValue","includes","borderChanges","currentPath","splice","presetColor","userStyle","customColor","getBorderStyleChanges","borderColor","change","useChangesToPush","__unstableMarkNextChangeAsNotPersistent","useDispatch","blockEditorStore","createSuccessNotice","noticesStore","pushChanges","useCallback","blockStyles","newBlockStyles","newUserConfig","newBlockAttributes","gradient","fontSize","fontFamily","undoIgnore","sprintf","getBlockType","title","actions","label","onClick","_jsxs","BaseControl","className","help","children","_jsx","VisualLabel","Button","__next40pxDefaultSize","variant","accessibleWhenDisabled","disabled","PushChangesToGlobalStyles","props","blockEditingMode","useBlockEditingMode","isBlockBasedTheme","coreStore","getCurrentTheme","is_block_theme","supportsStyles","some","feature","hasBlockSupport","InspectorAdvancedControls","withPushChangesToGlobalStyles","createHigherOrderComponent","BlockEdit","_Fragment","isSelected","addFilter","combineReducers","settings","action","editedPost","postType","id","context","saveViewPanel","isOpen","canvasMode","editorCanvasContainerView","view","NAVIGATION_POST_TYPE","TEMPLATE_POST_TYPE","TEMPLATE_PART_POST_TYPE","TEMPLATE_ORIGINS","custom","theme","plugin","TEMPLATE_PART_AREA_DEFAULT_CATEGORY","TEMPLATE_PART_ALL_AREAS_CATEGORY","PATTERN_TYPES","PATTERN_DEFAULT_CATEGORY","PATTERN_USER_CATEGORY","EXCLUDED_PATTERN_SOURCES","PATTERN_SYNC_TYPES","patternPrivateApis","FOCUSABLE_ENTITIES","POST_TYPE_LABELS","LAYOUT_GRID","LAYOUT_TABLE","LAYOUT_LIST","OPERATOR_IS","OPERATOR_IS_ANY","OPERATOR_IS_NONE","interfaceStore","editorPrivateApis","toggleFeature","featureName","registry","deprecated","since","alternative","dispatch","preferencesStore","toggle","__experimentalSetPreviewDeviceType","deviceType","version","hint","editorStore","setDeviceType","setTemplate","addTemplate","template","async","newTemplate","saveEntityRecord","content","editEntityRecord","removeTemplate","removeTemplates","setTemplatePart","templatePartId","setNavigationMenu","navigationMenuId","setEditedEntity","postId","setHomeTemplateId","setEditedPostContext","setPage","setNavigationPanelActiveMenu","openNavigationPanelToMenu","setIsNavigationPanelOpened","setIsInserterOpened","setIsListViewOpened","updateSettings","setIsSaveViewOpened","revertTemplate","openGeneralSidebar","enableComplementaryArea","closeGeneralSidebar","disableComplementaryArea","switchEditorMode","setHasPageContentFocus","hasPageContentFocus","clearSelectedBlock","toggleDistractionFree","setCanvasMode","isMediumOrBigger","matchMedia","matches","switchCanvasMode","batch","__unstableSetEditorMode","isPublishSidebarOpened","isEditMode","closePublishSidebar","startViewTransition","documentElement","classList","add","finished","finally","setEditorCanvasContainerView","EMPTY_ARRAY","isFeatureActive","createRegistrySelector","_","__experimentalGetPreviewDeviceType","getDeviceType","getCanUserCreateMedia","coreDataStore","canUser","getReusableBlocks","Platform","OS","getEntityRecords","per_page","getSettings","getHomeTemplateId","getEditedPostType","getEditedPostId","getEditedPostContext","getPage","isInserterOpened","__experimentalGetInsertionPoint","getInsertionPoint","isListViewOpened","isSaveViewOpened","getBlocksAndTemplateParts","templateParts","getBlocksByName","getBlocksByClientId","getCurrentTemplateTemplateParts","createSelector","templatePartsById","newTemplateParts","part","stack","innerBlocks","block","unshift","isTemplatePart","slug","templatePart","getFilteredTemplatePartBlocks","getEditorMode","getCurrentTemplateNavigationPanelSubMenu","getNavigationPanelActiveMenu","isNavigationOpened","isPage","getCanvasMode","getEditorCanvasContainerView","storeConfig","reducer","selectors","store","createReduxStore","register","registerPrivateSelectors","privateSelectors","registerPrivateActions","privateActions","isArray","CopyButton","ref","useCopyToClipboard","ErrorBoundaryWarning","message","error","Warning","ErrorBoundary","Component","constructor","super","componentDidCatch","doAction","getDerivedStateFromError","render","SVG","xmlns","viewBox","Path","isRequestingSite","siteIconUrl","getEntityRecord","siteData","site_icon_url","icon","alt","Icon","wordpress","clsx","SidebarNavigationContext","createContext","createNavState","direction","focusSelector","navigate","SidebarContentWrapper","navState","wrapperRef","useRef","navAnimation","setNavAnimation","el","elementToFocus","querySelector","firstTabbable","focus","tabbable","find","focusSidebarElement","wrapperCls","SidebarContent","routeKey","Provider","useHistory","routerPrivateApis","SiteHub","memo","forwardRef","isTransparent","dashboardLink","homeUrl","siteTitle","editSiteStore","getSite","getUnstableBase","_site","__experimentalDashboardLink","home","url","filterURLForDisplay","open","openCommandCenter","commandsStore","HStack","justify","spacing","href","borderRadius","SiteIcon","target","decodeEntities","expanded","search","shortcut","displayShortcut","primary","SiteHubMobile","history","HANDLE_STYLES_OVERRIDE","position","userSelect","cursor","height","right","bottom","FRAME_MIN_WIDTH","FRAME_TARGET_ASPECT_RATIO","INITIAL_FRAME_SIZE","calculateNewHeight","initialAspectRatio","lerpFactor","intermediateAspectRatio","lerp","amount","ResizableFrame","isFullWidth","isOversized","setIsOversized","isReady","defaultSize","innerContentStyle","disableMotion","useReducedMotion","frameSize","setFrameSize","startingWidth","setStartingWidth","isResizing","setIsResizing","shouldShowHandle","setShouldShowHandle","resizeRatio","setResizeRatio","FRAME_TRANSITION","duration","frameRef","resizableHandleHelpId","useInstanceId","defaultAspectRatio","frameAnimationVariants","default","flexGrow","fullWidth","currentResizeHandleVariant","ResizableBox","as","motion","div","initial","variants","animate","onAnimationComplete","whileHover","scale","transition","ease","enable","topRight","bottomRight","bottomLeft","topLeft","handleClasses","handleStyles","minWidth","maxWidth","maxHeight","onFocus","onBlur","onMouseOver","onMouseOut","handleComponent","Tooltip","button","role","hidden","opacity","visible","active","scaleY","resizable","offsetWidth","onKeyDown","event","preventDefault","delta","shiftKey","newWidth","exit","whileFocus","onResizeStart","handleResizeStart","_event","_direction","onResize","handleResize","_ref","normalizedDelta","deltaAbs","abs","maxDoubledDelta","deltaToDouble","doubleSegment","updatedWidth","onResizeStop","handleResizeStop","ownerDocument","showHandle","registerShortcut","keyboardShortcutsStore","category","description","keyCombination","modifier","character","__experimentalGetDirtyEntityRecords","isSavingEntityRecord","hasNonPostEntityChanges","useShortcut","dirtyEntityRecords","hasDirtyEntities","isSaving","record","kind","_hasNonPostEntityChanges","isViewMode","useEditedEntityRecord","isLoaded","getEditedEntityRecord","hasFinishedResolution","__experimentalGetTemplateInfo","getTemplateInfo","usedPostType","usedPostId","_record","_isLoaded","templateInfo","getTitle","getDescription","MAX_LOADING_TIME","useIsSiteEditorLoading","hasLoadedPost","loaded","setLoaded","inLoadingPause","hasResolvingSelectors","timeout","setTimeout","clearTimeout","updateQueue","makeQueue","raf","fn","schedule","writeQueue","onStartQueue","onStart","onFrameQueue","onFrame","onFinishQueue","onFinish","timeouts","handler","ms","now","cancel","findIndex","pendingCount","findTimeout","delete","sync","batchedUpdates","throttle","lastArgs","queuedFn","throttled","args","nativeRaf","requestAnimationFrame","use","impl","performance","Date","catch","console","frameLoop","advance","warn","update","ts","queue","loop","prevTs","eachSafely","Set","arg","values","each","noop","fun","und","ctx","iterator","items","clear","flushCalls","isSSR","navigator","test","userAgent","createStringInterpolator$1","colors$1","skipAnimation","willAdvance","globals","freeze","__proto__","createStringInterpolator","colors","startQueue","currentFrame","prevFrame","priority","idle","animation","flushStartQueue","startSafely","sort","prevIndex","startUnsafely","other","dt","nextFrame","NUMBER","PERCENTAGE","rgb","hsl","hsla","hex3","hex4","hex6","hex8","hue2rgb","hslToRgb","parse255","int","parse360","parseFloat","parse1","parsePercentage","colorToRgba","int32Color","normalizeColor","createInterpolator","range","extrapolate","config","outputRange","inputRange","extrapolateLeft","extrapolateRight","easing","findRange","inputMin","inputMax","outputMin","outputMax","map","Infinity","interpolate","_extends","bind","$get","for","$observers","hasFluidValue","Boolean","getFluidValue","getFluidObservers","callFluidObservers","observers","observer","eventObserved","callFluidObserver","FluidValue","setFluidGetter","setHidden","observerAdded","removeFluidObserver","observerRemoved","writable","configurable","numberRegex","colorRegex","unitRegex","rgbaRegex","cssVariableRegex","variableToRgba","token","fallback","parseCSSVariable","getComputedStyle","getPropertyValue","startsWith","namedColorRegex","rgbaRound","p1","p2","p3","p4","keyframes","outputRanges","interpolators","_output$find","missingUnit","once","func","called","warnInterpolate","isAnimatedString","emptyDeps","$node","getAnimated","owner","setAnimated","node","defineHidden","getPayload","Animated","payload","AnimatedValue","_value","elapsedTime","lastPosition","lastVelocity","v0","durationProgress","getValue","setValue","AnimatedString","_string","_toString","goal","TreeContext","dependencies","AnimatedObject","animated","_makePayload","_addToPayload","AnimatedArray","makeAnimated","getAnimatedType","parentNode","withAnimated","host","hasInstance","isReactComponent","givenProps","givenRef","instanceRef","updateRef","deps","createAnimatedStyle","getAnimatedState","forceUpdate","isMounted","useIsMounted","random","callback","instance","applyAnimatedValues","PropsObserver","observerRef","effect","dep","usedProps","getComponentProps","cacheKey","getDisplayName","displayName","callProp","matchProp","resolveProp","getDefaultProp","noopTransform","getDefaultProps","DEFAULT_PROPS","defaults","RESERVED_PROPS","pause","reverse","immediate","delay","onProps","onChange","onPause","onResume","onRest","onResolve","trail","expires","enter","leave","onDestroyed","callId","parentId","inferTo","forward","getForwardProps","computeGoal","isAsyncTo","c1","c3","c4","c5","bounceOut","n1","d1","easings","linear","easeInQuad","easeOutQuad","easeInOutQuad","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","defaultProps","Promise","resolve","reject","_props$cancel","paused","resumeQueue","resume","delayed","pauseQueue","cancelId","getCombinedResult","results","cancelled","getCancelledResult","every","getNoopResult","getFinishedResult","runAsync","asyncTo","prevTo","promise","prevPromise","asyncId","preventBail","bail","bailPromise","bailIfEnded","bailSignal","bailResult","arg1","arg2","BailSignal","skipAnimationSignal","SkipAniamtionSignal","stopAsync","animating","stop","all","item","isFrameValue","FrameValue","nextId$1","_priority","_onPriorityChange","toJSON","_attach","_detach","_onChange","parent","$P","hasAnimated","isAnimating","isPaused","setActiveBit","IS_ANIMATING","setPausedBit","SpringValue","_state","_pendingCalls","_lastCallId","_lastToId","_memoizedDuration","isDelayed","anim","elapsed","exp","bounceFactor","canBounce","isGrowing","isMoving","isBouncing","numSteps","ceil","isNaN","currVal","finalVal","_stop","_focus","_set","_update","finish","_onStart","_start","_prepareNode","isLoop","mergeActiveFn","sendEvent","isFrozen","checkFinished","_resume","_merge","nextProps","createLoopUpdate","hasToProp","hasFromProp","prevFrom","hasFromChanged","hasToChanged","hasAsyncTo","newConfig","defaultConfig","mergeConfig","isAnimatable","nodeType","goalType","started","hasValueChanged","ACTIVE_EVENTS","oldNode","loopRet","overrides","createUpdate","findDefined","_target$animation$typ","_target$animation","_target$defaultProps$","_target$defaultProps","BATCHED_EVENTS","nextId","Controller","springs","_flush","_initialProps","_lastAsyncId","_active","_changed","_started","_item","_events","Map","_onFrame","spring","prepareKeys","ctrl","flushUpdate","flushUpdateQueue","promises","prepareSprings","createSpring","_excluded$3","SpringContext","excluded","sourceKeys","_objectWithoutPropertiesLoose","inherited","getResult","inputs","committed","prevCache","cache","useCache","prev","areInputsEqual","useMemoOne","_context","Consumer","TransitionPhase","Interpolation","calc","_get","_dt","checkIdle","becomeIdle","highest","isIdle","self","isCustomPropRE","dangerousStyleValue","isUnitlessNumber","attributeCache","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","prefixes","charAt","toUpperCase","substring","prefixKey","domTransforms","pxTransforms","degTransforms","addUnit","unit","isValueIdentity","AnimatedStyle","z","transforms","xyz","deg","FluidTransform","identity","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","components","_applyAnimatedValues","_createAnimatedStyle","_getComponentProps","hostConfig","createHost","setAttribute","isFilterElement","nodeName","scrollTop","scrollLeft","names","hasAttribute","toLowerCase","textContent","setProperty","triggerAnimationOnChange","previous","prevRect","offsetTop","offsetLeft","getBoundingClientRect","controller","finishedMoving","transformOrigin","destination","isPreviewingTheme","getQueryArg","location","currentlyPreviewingTheme","useLocation","SaveButton","showTooltip","showReviewMessage","params","saveDirtyEntities","useEntitiesSavedStatesIsDirty","isSaveViewOpen","previewingThemeName","isResolving","isActivatingTheme","currentlyPreviewingThemeId","getTheme","rendered","isOnlyCurrentEntityDirty","_n","isBusy","SaveHub","isDisabled","_isSaving","alignment","EntitiesSavedStatesExtensible","NavigableRegion","privateApis","EntitiesSavedStatesForPreview","onClose","_currentTheme$name$re","_previewingTheme$name","isDirtyProps","activateSaveLabel","isDirty","currentTheme","setCurrentTheme","addQueryArgs","wp_theme_preview","apiFetch","activeThemes","useActualCurrentTheme","previewingTheme","additionalPrompt","activateTheme","startResolution","finishResolution","activationURL","WP_BLOCK_THEME_ACTIVATE_NONCE","fetch","getLocationWithParams","useActivateTheme","close","onSave","saveEnabled","saveLabel","_EntitiesSavedStates","renderDialog","EntitiesSavedStates","SavePanel","Modal","onRequestClose","__experimentalHideHeader","contentLabel","activateSaveEnabled","ariaLabel","useCommands","coreCommandsPrivateApis","ANIMATION_DURATION","Layout","route","currentCanvasMode","canvas","canvasInUrl","currentCanvasInUrl","currentUrlParams","useSyncCanvasModeWithURL","isMobileViewport","useViewportMatch","toggleRef","previousShortcut","nextShortcut","getAllShortcutKeyCombinations","navigateRegionsProps","useNavigateRegions","canvasResizer","canvasSize","useResizeObserver","fullResizer","isEditorLoading","isResizableFrameOversized","setIsResizableFrameOversized","areas","widths","animationRef","useMovingAnimation","gradientValue","previousCanvaMode","usePrevious","CommandMenu","KeyboardShortcutsRegister","KeyboardShortcutsGlobal","mobile","AnimatePresence","sidebar","EditorSnackbars","edit","preview","background","useGlobalStylesReset","useGlobalStylesOpenStylesCommands","isLoading","commands","useGlobalStylesToggleWelcomeGuideCommands","useGlobalStylesResetCommands","canReset","onReset","isRTL","rotateRight","rotateLeft","useGlobalStylesOpenCssCommands","canEditCSS","__experimentalGetCurrentGlobalStylesId","globalStylesId","globalStyles","_links","brush","useGlobalStylesOpenRevisionsCommands","hasRevisions","backup","fillRule","clipRule","useLink","shouldReplace","currentArgs","getQueryArgs","currentUrlWithoutArgs","removeQueryArgs","Link","usePageContentFocusCommands","templateId","currentPostType","_isPage","getCurrentPostType","getCurrentTemplateId","editTemplate","setRenderingMode","layout","page","useManipulateDocumentCommands","isEditingPage","has_theme_file","isTemplateRevertable","isTemplateRemovable","trash","postTypesWithoutParentTemplate","authorizedPostTypes","useInitEditedEntityFromURL","hasLoadedAllDependencies","homepageId","postsPageId","frontPageTemplateId","templates","_homepageId","show_on_front","page_on_front","_postsPageId","page_for_posts","_frontPageTemplateId","frontPageTemplate","resolvedTemplateId","getDefaultTemplateId","__experimentalGetTemplateForLink","resolveTemplateForPostTypeAndId","postTypeToResolve","postIdToResolve","editedEntity","link","currentTemplateSlug","currentTemplate","slugToCheck","useResolveEditedEntityAndContext","WelcomeGuideImage","nonAnimatedSrc","animatedSrc","srcSet","media","WelcomeGuideEditor","isActive","Guide","finishButtonText","pages","image","createInterpolateElement","StylesIconImage","WelcomeGuideStyles","isStylesOpen","getActiveComplementaryArea","welcomeLabel","ExternalLink","WelcomeGuidePage","isVisible","isPageActive","isEditorActive","heading","autoPlay","muted","WelcomeGuideTemplate","isTemplateActive","WelcomeGuide","useGlobalStylesOutput","GlobalStylesRenderer","_currentStoreSettings","currentStoreSettings","nonGlobalStyles","isGlobalStyles","__experimentalFeatures","useGlobalStylesRenderer","Theme","componentsPrivateApis","CanvasLoader","_highlightedColors$0$","fallbackIndicatorColor","indicatorColor","_selectorsByStatus$re","_selectorsByStatus$fi","selectorsByStatus","countSelectorsByStatus","resolving","accent","ProgressBar","useBlockEditorSettings","Fill","Slot","createSlotFill","PluginTemplateSettingPanel","IconWithCurrentColor","GenericNavigationButton","Item","FlexItem","NavigationButtonAsItem","NavigatorButton","useHasDimensionsPanel","useHasTypographyPanel","useHasColorPanel","useSettingsForBlockElement","rawSettings","hasTypographyPanel","hasColorPanel","hasLayoutPanel","ItemGroup","typography","shadowIcon","formatFontFamily","regex","formatItem","split","formatFontFaceName","getFamilyPreviewStyle","family","fontFace","fontStyle","normalFaces","face","normalWeights","fontFaces","weights","extractFontWeights","nearestWeight","numbers","getVariationClassName","variation","getNewIndexFromPresets","presets","slugPrefix","nameRegex","highestPresetValue","currentHighest","preset","getFontFamilyFromSetting","fontFamilies","setting","fontFamilyVariable","fontFamilySlug","mergeBaseAndUserConfigs","PreviewTypography","bodyFontFamilies","headingFontFamilies","themeJson","bodyFontFamilySetting","bodyFontFamily","headingFontFamilySetting","elements","headingFontFamily","getFontFamilies","bodyPreviewStyle","headingPreviewStyle","textAlign","HighlightedColors","normalizedColorSwatchSize","ratio","scaledSwatchSize","THROTTLE_OPTIONS","leading","trailing","PreviewIframe","isFocused","withHoverView","isHovered","setIsHovered","containerResizeListener","throttledWidth","setThrottledWidthState","ratioState","setRatioState","setThrottledWidth","useThrottle","newRatio","ratioDiff","editorStyles","css","Iframe","onMouseEnter","onMouseLeave","tabIndex","EditorStyles","child","firstFrameVariants","hover","midFrameVariants","secondFrameVariants","PreviewStyles","headingFontWeight","overflow","TypographyExample","VStack","padding","boxSizing","customCSS","hasVariations","__experimentalGetCurrentThemeGlobalStylesVariations","Card","CardBody","CardMedia","chevronLeft","chevronRight","RootMenu","CardDivider","Spacer","paddingTop","paddingX","marginBottom","useBlockVariations","getBlockStyles","variations","getFilteredBlockStyles","VariationsPanel","coreBlockStyles","isBordered","isSeparated","isDefault","encodeURIComponent","onBack","View","paddingY","NavigatorToParentButton","Heading","useHasBorderPanel","useBlockHasGlobalStyles","blockName","hasBorderPanel","hasDimensionsPanel","hasVariationsPanel","BlockMenuItem","navigationButtonLabel","BlockIcon","MemoizedBlockList","filterValue","sortedBlockTypes","blockItems","getBlockTypes","core","coreItems","noncore","nonCoreItems","groupByType","useSortedBlockTypes","debouncedSpeak","useDebounce","speak","isMatchingSearchTerm","filteredBlockTypes","blockType","blockTypesListRef","childElementCount","resultsFoundMessage","setFilterValue","deferredFilterValue","useDeferredValue","ScreenHeader","SearchControl","__nextHasNoMarginBottom","placeholder","BlockPreviewPanel","_blockExample$viewpor","blockExample","example","getBlockFromExample","viewportWidth","previewHeight","minHeight","marginX","BlockPreview","additionalStyles","BACKGROUND_BLOCK_DEFAULT_VALUES","backgroundSize","applyFallbackStyle","hasColorOrWidth","useHasFiltersPanel","useHasImageSettingsPanel","useHasBackgroundPanel","BackgroundPanel","StylesBackgroundPanel","BorderPanel","StylesBorderPanel","ColorPanel","StylesColorPanel","TypographyPanel","StylesTypographyPanel","DimensionsPanel","StylesDimensionsPanel","FiltersPanel","StylesFiltersPanel","ImageSettingsPanel","AdvancedPanel","StylesAdvancedPanel","useGlobalStyleLinks","prefixParts","shouldDecodeEncode","inheritedStyle","setStyle","userSettings","setSettings","__experimentalSkipSerialization","spacingType","dimensions","aspectRatio","blockVariations","hasBackgroundPanel","hasFiltersPanel","hasImageSettingsPanel","currentBlockStyle","inheritedStyleWithLayout","styleWithLayout","Subtitle","inheritedValue","defaultValues","themeFileURIs","newStyle","updatedStyle","includeLayoutControls","radius","newBorder","hasSplitBorders","applyAllFallbackStyles","updatedBorder","newSetting","lightbox","PanelBody","initialOpen","ElementItem","parentMenu","extraStyles","textDecoration","fallbackBackgroundColor","StylesPreviewTypography","areGlobalStyleConfigsEqual","removePropertiesFromObject","properties","hasThemeVariation","useCurrentMergeThemeStyleVariationsWithUserConfig","variationsFromTheme","userVariation","propertiesAsString","userVariationWithoutProperties","variationsWithPropertiesAndBase","isVariationWithProperties","variationsByProperties","filterObjectByProperties","newObject","newFilter","variationWithProperties","Variation","isPill","setIsFocused","merged","selectVariation","keyCode","ENTER","TypographyVariations","gap","propertiesToFilter","typographyVariations","Grid","FONT_FAMILIES_URL","FONT_COLLECTIONS_URL","fetchInstallFontFamily","method","body","response","font_family_settings","fetchInstallFontFace","fontFamilyId","font_face_settings","fetchGetFontFamilyBySlug","fontFamilyPost","_embedded","font_faces","fetchUninstallFontFamily","ALLOWED_FILE_EXTENSIONS","FONT_WEIGHTS","FONT_STYLES","normal","italic","File","kebabCase","setUIValuesNeeded","font","extraValues","getFontFaceVariantName","mergeFontFaces","existing","incoming","mergeFontFamilies","incomingFontFaces","restIncoming","mergedFontFaces","loadFontFaceInBrowser","addTo","dataSource","arrayBuffer","newFont","FontFace","weight","loadedFace","load","fonts","contentDocument","unloadFontFaceInBrowser","removeFrom","unloadFontFace","getDisplaySrcFromFontFace","decodeURIComponent","encodeURI","makeFontFamilyFormData","formData","FormData","familyWithValidParameters","fontFamilySettings","append","makeFontFacesFormData","faceIndex","file","files","fileId","batchInstallFontFaces","fontFacesData","responses","faceData","reason","errors","successes","checkFontFaceInstalled","collection","collectionFontFace","toggleFont","initialfonts","isFontActivated","activatedFont","isFaceActivated","newFontFaces","toggleFontVariant","toggleEntireFontFamily","FontLibraryContext","useEntityRecord","isInstalling","setIsInstalling","refreshKey","setRefreshKey","notice","setNotice","refreshLibrary","records","libraryPosts","isResolvingLibrary","useEntityRecords","_embed","libraryFonts","setFontFamilies","saveFontFamilies","updatedGlobalStyles","modalTabOpen","setModalTabOpen","libraryFontSelected","setLibraryFontSelected","themeFonts","localeCompare","customFonts","baseCustomFonts","loadedFontUrls","getAvailableFontsOutline","availableFontFamilies","availableFontFaces","getActivatedFontsOutline","cleanFontsForSave","_familyDbId","_faceDbId","loadFontsInBrowser","collections","setFontCollections","fetchFontCollections","getFontCollections","handleSetLibraryFontSelected","fontSelected","getFontFacesActivated","loadFontFaceAsset","installFonts","fontFamiliesToInstall","fontFamiliesToActivate","installationErrors","fontFamilyToInstall","isANewFontFamily","installedFontFamily","alreadyInstalledFontFaces","fontFaceToInstall","successfullyInstalledFontFaces","unsuccessfullyInstalledFontFaces","unique","activeFonts","fontsToAdd","fontsToActivate","activateCustomFontFamilies","installError","uninstallFontFamily","fontFamilyToUninstall","uninstalledFontFamily","deleted","_fontFamilies$font$so","newCustomFonts","deactivateFontFamily","toggleActivateFont","_fontFamilies$font$so2","newFonts","getFontCollection","font_families","fetchFontCollection","updatedCollections","fake","getDisplayFontFace","customPreviewUrl","isIntersecting","setIsIntersecting","isAssetLoaded","setIsAssetLoaded","previewUrl","getPreviewUrl","isPreviewImage","textDemoStyle","IntersectionObserver","entry","observe","disconnect","loadAsset","loading","Text","variantsText","navigatorPath","variantsCount","useNavigator","goTo","Flex","FontDemo","isInstalled","handleToggleActivation","checkboxId","align","CheckboxControl","checked","htmlFor","getNumericFontWeight","sortFontFaces","faces","ConfirmDeleteDialog","setIsOpen","ConfirmDialog","cancelButtonText","confirmButtonText","onCancel","handleCancelUninstall","onConfirm","goBack","_libraryFontSelected$","isConfirmDeleteOpen","setIsConfirmDeleteOpen","baseFontFamilies","fontFamiliesHasChanges","edits","themeFontsSlugs","baseThemeFonts","customFontFamilyId","canUserDelete","shouldDisplayDeleteButton","getFontCardVariantsText","variantsInstalled","variantsActive","activeFontsCount","selectedFontsCount","isIndeterminate","isSelectAllChecked","hasFonts","NavigatorProvider","initialPath","NavigatorScreen","Notice","onRemove","FontCard","margin","toggleSelectAll","_fontFamilies$library","initialFonts","indeterminate","getFontFacesToDisplay","LibraryFontVariant","isDestructive","handleUninstallClick","isFontFontFaceInOutline","outline","handleConfirm","localStorage","setItem","dispatchEvent","Event","handleToggleVariant","selected","DEFAULT_CATEGORY","LOCAL_STORAGE_ITEM","_selectedCollection$c","requiresPermission","getGoogleFontsPermissionFromStorage","getItem","selectedFont","setSelectedFont","fontsToInstall","setFontsToInstall","filters","setFilters","renderConfirmDialog","setRenderConfirmDialog","selectedCollection","handleStorage","addEventListener","removeEventListener","revokeAccess","resetFilters","collectionFonts","_selectedCollection$f","collectionCategories","categories","filteredFonts","filterFonts","windowHeight","innerHeight","pageSize","totalPages","itemsStart","itemsLimit","debouncedUpdateSearchInput","debounce","newFontsToInstall","fontToInstallOutline","getFontsOutline","GoogleFontsConfirmDialog","ActionsComponent","DropdownMenu","moreVertical","popoverProps","controls","hideLabelFromVision","SelectControl","CollectionFontVariant","Request","ok","blob","filename","pop","downloadFontFaceAssets","tooltipPosition","CurrentPageControl","newPage","globalThis","detail","__mayPropagate","stopPropagation","valueOf","EventManager","listeners","listener","useCapture","bin","startDate","getTime","Parser","dict","dataview","tag","increment","currentPosition","padStart","trace","uint32","fixed","int16","uint16","legacyFixed","major","minor","uint24","uint128","byte","longdatetime","int64","fword","ufword","Offset16","Offset32","F2DOT14","verifyLength","readBytes","signed","ParsedData","parser","pGetter","startGetter","struct","getOwnPropertyDescriptor","SimpleTable","lazy$1","property","SFNT","createTable","numTables","searchRange","entrySelector","rangeShift","directory","TableRecord","checksum","gzipDecode","WOFF$1","signature","flavor","totalSfntSize","majorVersion","minorVersion","metaOffset","metaLength","metaOrigLength","privOffset","privLength","WoffTableDirectoryEntry","buildWoffLazyLookups","compLength","origLength","origChecksum","woff","unpacked","onerror","DataView","brotliDecode","WOFF2$1","totalCompressedSize","Woff2TableDirectoryEntry","decoded","dictOffset","transformLength","woff2","buildWoff2LazyLookups","tagNumber","hasTransforms","transformVersion","tableClasses","tableClassesLoaded","Type","loadTableClasses","checkLoaded","cmap$1","head$1","hhea$1","hmtx$1","maxp$1","name$1","OS2$1","post$1","BASE$1","GDEF$1","GSUB$1","GPOS$1","SVG$1","fvar$1","cvt$1","fpgm$1","gasp$1","glyf$1","loca$1","prep$1","CFF$1","CFF2$1","VORG$1","EBLC$1","EBDT$1","EBSC$1","CBLC$1","CBDT$1","sbix$1","COLR$1","CPAL$1","DSIG$1","hdmx$1","kern$1","LTSH$1","MERG$1","meta$1","PCLT$1","VDMX$1","vhea$1","vmtx$1","TTF","OTF","WOFF","WOFF2","ar1","ar2","Font","metrics","__src","skipStyleSheet","format","errorOnStyle","lastIndexOf","ext","ttf","otf","eot","svg","fon","ttc","getFontCSSFormat","rules","styleRules","entries","appendChild","setupFontFace","loadFont","statusText","checkFetchResponseStatus","fromDataBuffer","evt","filenameOrUrL","fontData","LEAD_BYTES","getUint8","validFontFormat","parseBasicData","onload","opentype","getGlyphId","char","cmap","glyphid","supportsVariation","measureText","__unloaded","bbox","removeChild","OS2","ascender","sTypoAscender","descender","sTypoDescender","unload","styleElement","removeElement","onunload","_unloaded","Subtable","plaformID","encodingID","Format0","platformID","language","glyphIdArray","charCode","glyphID","getSupportedCharCodes","Format2","subHeaderKeys","subHeaderCount","subHeaderOffset","SubHeader","glyphIndexOffset","high","subHeaderKey","subHeaders","subheader","first","firstCode","entryCount","preservePropNames","lastCode","idDelta","idRangeOffset","Format4","segCountX2","segCount","endCodePosition","startCodePosition","idDeltaPosition","idRangePosition","glyphIdArrayPosition","glyphIdArrayLength","tableStart","buildSegments","startCode","endCode","idRangeOffsetPointer","glyphIDs","segments","unicode","fromCodePoint","segment","Format6","Format8","is32","numGroups","SequentialMapGroup$1","groups","startcharCode","endcharCode","startGlyphID","Format10","startCharCode","numChars","endCharCode","Format12","SequentialMapGroup","group","Format13","ConstantMapGroup","Format14","subTableStart","numVarSelectorRecords","VariationSelector","varSelector","uvs","getSupportedVariations","varSelectors","defaultUVSOffset","nonDefaultUVSOffset","EncodingRecord","createSubTable","encodingRecords","getSubTable","tableID","getSupportedEncodings","encodingId","recordID","fontRevision","checkSumAdjustment","magicNumber","unitsPerEm","created","modified","xMin","yMin","xMax","yMax","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","hhea","lineGap","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfHMetrics","LongHorMetric","advanceWidth","lsb","hmtx","numGlyphs","maxp","metricsStart","lsbStart","maxPoints","maxContours","maxCompositePoints","maxCompositeContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","LangTagRecord","NameRecord","nameTable","languageID","nameID","stringStart","bytes","decodeString","stringOffset","nameRecords","langTagCount","langTagRecords","xAvgCharWidth","usWeightClass","usWidthClass","fsType","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","sFamilyClass","panose","ulUnicodeRange1","ulUnicodeRange2","ulUnicodeRange3","ulUnicodeRange4","achVendID","fsSelection","usFirstCharIndex","usLastCharIndex","sTypoLineGap","usWinAscent","usWinDescent","ulCodePageRange1","ulCodePageRange2","sxHeight","sCapHeight","usDefaultChar","usBreakChar","usMaxContext","usLowerOpticalPointSize","usUpperOpticalPointSize","macStrings","post","italicAngle","underlinePosition","underlineThickness","isFixedPitch","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","namesOffset","glyphNameOffsets","bytelength","int8","getGlyphName","AxisTable","baseTagListOffset","baseScriptListOffset","BaseTagListTable","BaseScriptListTable","baseTagCount","baselineTags","baseScriptCount","recordStart","BaseScriptRecord","baseScriptListTableStart","baseScriptTag","baseScriptOffset","BaseScriptTable","baseValuesOffset","defaultMinMaxOffset","baseLangSysCount","baseLangSysRecords","BaseLangSysRecord","BaseValuesTable","MinMaxTable","baseScriptTableStart","baseLangSysTag","minMaxOffset","defaultBaselineIndex","baseCoordCount","baseCoords","getTable","BaseCoordTable","minCoord","maxCoord","featMinMaxCount","FeatMinMaxRecord","featureTableTag","baseCoordFormat","coordinate","referenceGlyph","baseCoordPoint","deviceTable","BASE","horizAxisOffset","vertAxisOffset","itemVarStoreOffset","ClassDefinition","classFormat","glyphCount","classValueArray","classRangeCount","classRangeRecords","ClassRangeRecord","endGlyphID","class","CoverageTable","coverageFormat","glyphArray","rangeCount","rangeRecords","CoverageRangeRecord","startCoverageIndex","ItemVariationStoreTable","variationRegionListOffset","itemVariationDataCount","itemVariationDataOffsets","AttachList","coverageOffset","attachPointOffsets","getPoint","pointID","AttachPoint","pointCount","pointIndices","LigCaretList","ligGlyphCount","ligGlyphOffsets","getLigGlyph","ligGlyphID","LigGlyph","caretCount","caretValueOffsets","getCaretValue","caretID","CaretValue","caretValueFormat","caretValuePointIndex","deviceOffset","MarkGlyphSetsTable","markGlyphSetTableFormat","markGlyphSetCount","coverageOffsets","getMarkGlyphSet","markGlyphSetID","GDEF","glyphClassDefOffset","attachListOffset","ligCaretListOffset","markAttachClassDefOffset","markGlyphSetsDefOffset","ScriptList","static","scriptCount","scriptRecords","ScriptRecord","scriptTag","scriptOffset","ScriptTable","defaultLangSys","langSysCount","langSysRecords","LangSysRecord","langSysTag","langSysOffset","LangSysTable","lookupOrder","requiredFeatureIndex","featureIndexCount","featureIndices","FeatureList","featureCount","featureRecords","FeatureRecord","featureTag","featureOffset","FeatureTable","featureParams","lookupIndexCount","lookupListIndices","getFeatureParams","Size","CharacterVariant","StylisticSet","featUiLabelNameId","featUiTooltipTextNameId","sampleTextNameId","numNamedParameters","firstParamUiLabelNameId","charCount","designSize","subfamilyIdentifier","subfamilyNameID","smallEnd","largeEnd","UINameID","undoCoverageOffsetParsing","getCoverageTable","LookupType$1","substFormat","SubstLookupRecord","glyphSequenceIndex","lookupListIndex","LookupType1$1","deltaGlyphID","LookupType2$1","sequenceCount","sequenceOffsets","getSequence","SequenceTable","substituteGlyphIDs","LookupType3$1","alternateSetCount","alternateSetOffsets","getAlternateSet","AlternateSetTable","alternateGlyphIDs","LookupType4$1","ligatureSetCount","ligatureSetOffsets","getLigatureSet","LigatureSetTable","ligatureCount","ligatureOffsets","getLigature","LigatureTable","ligatureGlyph","componentCount","componentGlyphIDs","LookupType5$1","subRuleSetCount","subRuleSetOffsets","classDefOffset","subClassSetCount","subClassSetOffsets","substitutionCount","substLookupRecords","getSubRuleSet","SubRuleSetTable","getSubClassSet","SubClassSetTable","subRuleCount","subRuleOffsets","getSubRule","SubRuleTable","inputSequence","subClassRuleCount","subClassRuleOffsets","getSubClass","SubClassRuleTable","LookupType6$1","chainSubRuleSetCount","chainSubRuleSetOffsets","backtrackClassDefOffset","inputClassDefOffset","lookaheadClassDefOffset","chainSubClassSetCount","chainSubClassSetOffsets","backtrackGlyphCount","backtrackCoverageOffsets","inputGlyphCount","inputCoverageOffsets","lookaheadGlyphCount","lookaheadCoverageOffsets","seqLookupCount","seqLookupRecords","SequenceLookupRecord","getChainSubRuleSet","ChainSubRuleSetTable","getChainSubClassSet","ChainSubClassSetTable","getCoverageFromOffset","chainSubRuleCount","chainSubRuleOffsets","ChainSubRuleTable","backtrackSequence","lookAheadSequence","lookAheadGlyphCount","SubstCount","chainSubClassRuleCount","chainSubClassRuleOffsets","ChainSubClassRuleTable","sequenceIndex","LookupType7$1","extensionLookupType","extensionOffset","LookupType8$1","GSUBtables","buildSubtable","subtable","LookupType","LookupType1","log","LookupType2","LookupType3","LookupType4","LookupType5","LookupType6","LookupType7","LookupType8","LookupType9","GPOStables","LookupList","lookupCount","lookups","LookupTable","ctType","lookupType","lookupFlag","subTableCount","subtableOffsets","markFilteringSet","rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet","markAttachmentType","builder","CommonLayoutTable","scriptListOffset","featureListOffset","lookupListOffset","featureVariationsOffset","no_content","EMPTY","FeatureVariations","getSupportedScripts","scriptList","getScriptTable","ensureScriptTable","getSupportedLangSys","scriptTable","hasDefault","supported","getDefaultLangSysTable","defaultForScript","getLangSysTable","getFeatures","langSysTable","getFeature","indexOrTag","featureList","getLookups","featureTable","getLookup","lookupIndex","lookupOffset","lookupList","GSUB","GPOS","SVGDocumentList","numEntries","documentRecords","SVGDocumentRecord","getDocument","documentID","svgDocOffset","svgDocLength","getDocumentForGlyph","offsetToSVGDocumentList","documentList","VariationAxisRecord","minValue","defaultValue","maxValue","axisNameID","InstanceRecord","axisCount","coordinates","postScriptNameID","fvar","axesArrayOffset","axisSize","instanceCount","instanceSize","axisStart","instanceStart","instances","getSupportedAxes","axes","getAxis","cvt","fpgm","GASPRange","rangeMaxPPEM","rangeGaspBehavior","gasp","numRanges","glyf","getGlyphData","loca","x2","getGlyphDataOffsetAndLength","offsets","prep","CFF","CFF2","VertOriginYMetric","glyphIndex","vertOriginY","VORG","defaultVertOriginY","numVertOriginYMetrics","BitmapSize","indexSubTableArrayOffset","indexTablesSize","numberofIndexSubTables","colorRef","hori","SbitLineMetrics","vert","startGlyphIndex","endGlyphIndex","ppemX","ppemY","bitDepth","BitmapScale","substitutePpemX","substitutePpemY","widthMax","caretSlopeNumerator","caretSlopeDenominator","minOriginSB","minAdvanceSB","maxBeforeBL","minAfterBL","pad1","pad2","EBLC","numSizes","EBDT","EBSC","CBLC","CBDT","sbix","numStrikes","BaseGlyphRecord","gID","firstLayerIndex","numLayers","LayerRecord","paletteIndex","COLR","numBaseGlyphRecords","baseGlyphRecordsOffset","layerRecordsOffset","numLayerRecords","getBaseGlyphRecord","firstID","lastID","mid","middle","midID","getLayers","ColorRecord","PaletteTypeArray","numPalettes","paletteTypes","PaletteLabelsArray","paletteLabels","PaletteEntryLabelArray","paletteEntryLabels","CPAL","numPaletteEntries","numColorRecords","offsetFirstColorRecord","colorRecordIndices","offsetPaletteTypeArray","offsetPaletteLabelArray","offsetPaletteEntryLabelArray","SignatureRecord","SignatureBlockFormat1","signatureLength","DSIG","numSignatures","signatureRecords","getData","signatureID","DeviceRecord","pixelSize","hdmx","numRecords","sizeDeviceRecord","int32","KernSubTable","coverage","nPairs","Pair","horizontal","minimum","crossstream","override","kern","nTables","LTSH","yPels","MERG","mergeClassCount","mergeDataOffset","classDefCount","offsetToClassDefOffsets","DataMap","dataOffset","dataLength","currentField","meta","dataMapsCount","dataMaps","PCLT","RatioRange","bCharSet","xRatio","yStartRatio","yEndRatio","VDMXGroup","recs","startsz","endsz","vTable","yPelHeight","VDMX","numRecs","numRatios","ratRanges","VDMXGroups","vhea","ascent","vertTypoAscender","descent","vertTypoDescender","vertTypoLineGap","advanceHeightMax","minTopSideBearing","minBottomSideBearing","yMaxExtent","reserved","numOfLongVerMetrics","LongVertMetric","advanceHeight","topSideBearing","vmtx","lazy","tsbStart","isUploading","setIsUploading","handleFilesUpload","uniqueFilenames","selectedFiles","hasInvalidFiles","checkFilesPromises","isFont","readFileAsArrayBuffer","isFontFile","fileExtension","allowedFiles","loadFiles","fontFacesLoaded","fontFaceData","getFontFaceMetadata","fontFile","handleInstall","reader","FileReader","readAsArrayBuffer","fontObj","fontName","isItalic","weightAxis","fontFamiliesObject","makeFamiliesFromFaces","DropZone","onFilesDrop","__unstableHTML","FormFileUpload","accept","multiple","openFileDialog","Tabs","DEFAULT_TAB","UPLOAD_TAB","defaultTabId","canUserCreate","tabs","tabsFromCollections","isFullScreen","onSelect","TabList","Tab","tabId","contents","UploadFonts","InstalledFonts","FontCollection","TabPanel","focusable","previewStyle","handleClick","FontFamilies","hasInstalledFonts","FontLibraryModal","FontFamilyItem","FontLibraryProvider","cloneElement","fontLibraryEnabled","getEditorSettings","TypographyElements","FontSizesCount","headingLevel","TypographyPreview","letterSpacing","caption","setHeadingLevel","ToggleGroupControl","isBlock","ToggleGroupControlOption","_font$fontFamily","fluid","minimumFontSize","maximumFontSize","computedFontSize","getComputedFluidTypographyValue","toggleOpen","handleRemoveFontSize","handleCancel","handleRename","newName","setNewName","focusOnMount","onSubmit","InputControl","autoComplete","DEFAULT_UNITS","baseControlProps","useBaseControlProps","fallbackValue","units","useCustomUnits","availableUnits","valueQuantity","valueUnit","parseQuantityAndUnitFromRawValue","isValueUnitRelative","UnitControl","newValue","RangeControl","initialPosition","withInputField","DropdownMenuV2","DropdownMenuItemV2","DropdownMenuItem","DropdownMenuItemLabelV2","DropdownMenuItemLabel","_fontSizes$origin","_fontSize$fluid","isDeleteConfirmOpen","setIsDeleteConfirmOpen","isRenameDialogOpen","setIsRenameDialogOpen","origin","fontSizes","setFontSizes","sizes","isFluid","isCustomFluid","updateFontSize","newFontSizes","toggleDeleteConfirm","toggleRenameDialog","ConfirmDeleteFontSizeDialog","RenameFontSizeDialog","marginTop","trigger","FontSizePreview","SizeControl","ToggleControl","FontSizeGroup","handleAddFontSize","handleResetFontSizes","isResetDialogOpen","setIsResetDialogOpen","toggleResetDialog","resetDialogText","ConfirmResetFontSizesDialog","plus","FlexBlock","themeFontSizes","setThemeFontSizes","baseThemeFontSizes","defaultFontSizes","setDefaultFontSizes","baseDefaultFontSizes","customFontSizes","setCustomFontSizes","defaultFontSizesEnabled","newFontSize","hasSameSizeValues","arr1","arr2","baseSizes","EMPTY_COLORS","defaultColors","defaultPaletteEnabled","randomizeThemeColors","setThemeColors","useColorRandomizer","__experimentalEnableColorRandomizer","randomRotationValue","newColors","colorObject","newColor","colord","screenPath","paletteButtonText","ZStack","isLayered","ColorIndicatorWrapper","ColorIndicator","colorValue","shuffle","Palette","PresetColors","StylesPreviewColors","ColorVariations","colorVariations","mobilePopoverProps","placement","ColorPalettePanel","baseThemeColors","setDefaultColors","baseDefaultColors","setCustomColors","PaletteEdit","canOnlyChangeValues","paletteLabel","paletteLabelHeadingLevel","GradientPalettePanel","themeGradients","setThemeGradients","baseThemeGradients","defaultGradients","setDefaultGradients","baseDefaultGradients","customGradients","setCustomGradients","customDuotone","defaultDuotone","themeDuotone","defaultDuotoneEnabled","duotonePalette","gradients","paletteLabelLevel","DuotonePicker","disableCustomDuotone","disableCustomColors","clearable","defaultShadow","ShadowsPanel","defaultShadows","defaultShadowsEnabled","themeShadows","customShadows","setCustomShadows","ShadowList","shadows","canCreate","onCreate","shadow","handleAddShadow","newIndex","ShadowItem","CUSTOM_VALUE_SETTINGS","px","vw","vh","em","rm","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","vmin","svmin","lvmin","dvmin","vmax","svmax","lvmax","dvmax","customShadowMenuItems","presetShadowMenuItems","ShadowsEditPanel","setShadows","baseShadows","selectedShadow","setSelectedShadow","baseSelectedShadow","isConfirmDialogVisible","setIsConfirmDialogVisible","isRenameModalVisible","setIsRenameModalVisible","shadowName","setShadowName","updatedShadows","onMenuClick","ShadowsPreview","ShadowEditor","handleShadowDelete","handleShadowRename","shadowStyle","boxShadow","shadowParts","getShadowParts","onChangeShadowPart","canRemove","onRemoveShadowPart","shadowObj","shadowValue","blur","spread","inset","lengthsRegex","lengths","insets","hasInset","colorString","colorMatches","shadowStringToObject","onShadowChange","newShadow","shadowString","shadowObjectToString","Dropdown","renderToggle","onToggle","toggleProps","removeButtonProps","renderContent","DropdownContentWrapper","paddingSize","ShadowPopover","ColorPalette","enableAlpha","__experimentalIsRenderedInSidebar","ShadowInputControl","hasNegativeRange","_CUSTOM_VALUE_SETTING","_CUSTOM_VALUE_SETTING2","_CUSTOM_VALUE_SETTING3","isCustomInput","setIsCustomInput","parsedQuantity","parsedUnit","isPressed","isNumeric","ScreenShadows","ScreenShadowsEdit","DEFAULT_CONTROLS","contentSize","wideSize","childLayout","updatedSettings","definitions","defaultControls","BACKGROUND_DEFAULT_VALUES","StyleVariationsContainer","currentUserStyles","setCurrentUserStyles","userStyles","fullStyleVariations","themeVariations","_variation$settings","variationBlockStyles","SidebarNavigationScreenGlobalStylesContent","storedSettings","BlockEditorProvider","onInput","useZoomOut","isBorderless","EditorContentSlotFill","ResizableEditor","getEditorCanvasContainerTitleAndIcon","seen","useHasEditorCanvasContainer","fills","useSlotFills","privateKey","closeButtonLabel","enableResizing","showListViewByDefault","isClosed","setIsClosed","focusOnMountRef","useFocusOnMount","sectionFocusReturnRef","useFocusReturn","onCloseContainer","childrenWithProps","Children","shouldShowCloseButton","ESCAPE","defaultPrevented","closeSmall","ExperimentalBlockEditorProvider","useGlobalStylesOutputWithConfig","CompositeV2","Composite","CompositeItemV2","CompositeItem","useCompositeStoreV2","useCompositeStore","isObjectEmpty","getExamples","createBlock","inserter","StyleBookBody","examples","buttonModeProps","SPACE","readonly","buttonModeStyles","Examples","compositeStore","orientation","Example","originalSettings","focusMode","__unstableIsPreviewMode","renderedBlocks","Disabled","BlockList","renderAppender","showCloseButton","showTabs","resizeObserver","getCategories","baseConfig","mergedConfig","EditorCanvasContainer","tab","__unstableBlockStyleVariationOverridesWithConfig","renderedBlocksArray","SITE_EDITOR_AUTHORS_QUERY","_fields","capabilities","DEFAULT_QUERY","useGlobalStylesRevisions","query","_query","authors","currentUser","revisions","isLoadingGlobalStylesRevisions","revisionsCount","_globalStyles$_links$","getCurrentUser","getUsers","getRevisions","_currentUser","_isDirty","_revisionsCount","globalStylesRevisions","hasUnsavedChanges","_modifiedRevisions","revision","author","isLatest","unsavedRevision","avatar_urls","getGlobalStylesChanges","ChangesSummary","previousRevision","maxResults","userRevisions","selectedRevisionId","canApplyRevision","onApplyRevision","currentThemeName","stylesheet","dateNowInMs","getDate","datetimeAbbreviated","formats","isUnsaved","revisionAuthor","authorDisplayName","authorAvatar","areStylesEqual","isReset","modifiedDate","displayDate","dateI18n","humanTimeDiff","revisionLabel","formattedModifiedDate","getRevisionLabel","dateTime","Pagination","currentPage","numPages","changePage","totalItems","buttonVariant","currentEditorGlobalStyles","getBlocks","setCurrentPage","currentRevisions","setCurrentRevisions","currentlySelectedRevision","setCurrentlySelectedRevision","isLoadingRevisionWithUnsavedChanges","setIsLoadingRevisionWithUnsavedChanges","selectedRevisionMatchesEditorStyles","onCloseRevisions","restoreRevision","firstRevision","currentlySelectedRevisionId","shouldSelectFirstItem","isLoadButtonEnabled","Spinner","StyleBook","Revisions","RevisionsButtons","GlobalStylesMenuSlot","GlobalStylesMenuFill","GlobalStylesActionMenu","loadCustomCSS","MenuGroup","MenuItem","GlobalStylesNavigationScreen","BlockStylesNavigationScreens","ScreenBlock","ContextScreens","blockStyleVariations","ScreenColorPalette","GlobalStylesStyleBook","GlobalStylesBlockLink","selectedBlockName","selectedBlockClientId","getSelectedBlockClientId","getBlockName","clientId","blockHasGlobalStyles","newPath","skipFocus","GlobalStylesEditorCanvasContainerLink","isRevisionsOpen","ScreenRoot","ScreenStyleVariations","ScreenBlockList","ScreenTypography","FontSizes","FontSize","ScreenTypographyElement","ScreenColors","ScreenLayout","ScreenCSS","ScreenRevisions","ComplementaryArea","ComplementaryAreaMoreMenuItem","DefaultSidebar","identifier","closeLabel","headerClassName","panelClassName","isActiveByDefault","scope","smallScreenTitle","GlobalStylesSidebar","shouldClearCanvasContainerView","isStyleBookOpened","isRevisionsOpened","isRevisionsStyleBookOpened","canvasContainerView","_isVisualEditorMode","_isEditCanvasMode","_showListViewByDefault","toggleStyleBook","toggleRevisions","GlobalStylesUI","SiteExport","createErrorNotice","download","headers","Accept","contentDispositionMatches","fileName","downloadBlob","errorResponse","json","errorMessage","info","WelcomeGuideMenuItem","ToolsMoreMenuGroup","PreferencesModal","MoreMenu","_POST_TYPE_LABELS$edi","isInitialLocationRef","formattedTitle","useTitle","Editor","BackButton","BlockKeyboardShortcuts","blockLibraryPrivateApis","EditSiteEditor","isPostsList","editedPostType","editedPostId","contextPostType","contextPostId","supportsGlobalStyles","showIconLabels","editorCanvasView","currentPostIsTrashed","getCurrentPostAttribute","useEditorTitle","_isPreviewingTheme","hasDefaultEditorCanvasView","iframeProps","viewModeIframeProps","onClickCapture","useEditorIframeProps","postWithTemplate","loadingProgressId","onNavigateToEntityRecord","useNavigateToEntityRecord","shouldUseTemplateAsDefaultRenderingMode","defaultRenderingMode","onNavigateToPreviousEntityRecord","previousLocation","isFocusMode","didComeFromEditorCanvas","useNavigateToPreviousEntityRecord","richEditingEnabled","supportsTemplateMode","useSpecificEditorSettings","onActionPerformed","actionId","newItem","_title","EditorKeyboardShortcutsRegister","enableRegionNavigation","customSaveButton","customSavePanel","forceDisableBlockTools","extraSidebarPanels","SiteEditorMoreMenu","OPERATOR_IS_NOT","OPERATOR_IS_ALL","OPERATOR_IS_NOT_ALL","ALL_OPERATORS","OPERATORS","SORTING_DIRECTIONS","sortArrows","asc","desc","sortValues","sortLabels","onChangeView","fields","paginationInfo","selection","onChangeSelection","setOpenedFilter","openedFilter","getItemId","density","DropdownMenuGroupV2","DropdownMenuGroup","DropdownMenuSeparatorV2","DropdownMenuSeparator","useHasAPossibleBulkAction","supportsBulk","isEligible","useSomeItemHasAPossibleBulkAction","ActionWithModal","selectedItems","setActionWithModal","onMenuOpenChange","eligibleItems","RenderModal","hideModalHeader","onCloseModal","overlayClassName","closeModal","BulkActionItem","useRegistry","shouldShowModal","hideOnClick","ActionsMenuGroup","elligibleActions","_BulkActions","DataViewsContext","bulkActions","isMenuOpen","actionWithModal","selectableItems","numberSelectableItems","areAllSelected","onOpenChange","BulkActions","hasPossibleBulkAction","ButtonTrigger","DropdownMenuItemTrigger","ActionModal","modalHeader","ActionTrigger","isModalOpen","setIsModalOpen","actionTriggerProps","ActionsDropdownMenuGroup","ItemActions","isCompact","primaryActions","eligibleActions","_eligibleActions","isPrimary","CompactItemActions","SNACKBAR_VARIANTS","ToolbarButton","ActionButton","actionInProgress","setActionInProgress","selectedEligibleItems","renderToolbarContent","actionsToShow","ToolbarGroup","ToolbarContent","buttons","_BulkActionsToolbar","isReducedMotion","Toolbar","BulkActionsToolbar","NULL_ITEM","getEnabledItem","FOCUS_SILENTLY","isItem","exclude","__defProp","__defProps","defineProperties","__getOwnPropDescs","getOwnPropertyDescriptors","__getOwnPropSymbols","getOwnPropertySymbols","__hasOwnProp","__propIsEnum","propertyIsEnumerable","__defNormalProp","__objRest","hasOwn","chain","fns","normalizeString","normalize","invariant","condition","disabledFromProps","removeUndefinedValues","_a","activeDescendant","activeElement","tagName","getAttribute","getElementById","contains","isButton","buttonInputTypes","msMatchesSelector","webkitMatchesSelector","isTextInput","HTMLInputElement","selectionStart","isTextArea","getPopupRole","getPopupItemRole","popupRole","menu","listbox","tree","getScrollingElement","clientHeight","scrollHeight","overflowY","clientWidth","scrollWidth","overflowX","parentElement","scrollingElement","setSelectionRange","isApple","platform","isSafari","vendor","isPortalEvent","currentTarget","isSelfTarget","fireBlurEvent","eventInit","FocusEvent","defaultAllowed","bubbleInit","bubbles","fireClickEvent","MouseEvent","isFocusEventOutside","container","containerElement","relatedTarget","queueBeforeEvent","callImmediately","cancelAnimationFrame","capture","addGlobalEventListener","frame","frames","_React","useReactId","useId","useReactInsertionEffect","useInsertionEffect","useSafeLayoutEffect","useEvent","useMergeRefs","refs","setRef","defaultId","reactId","setId","useTagName","refOrElement","stringOrUndefined","type2","setTagName","useUpdateEffect","mounted","useBooleanEvent","booleanOrCallback","useWrapElement","wrapElement","mouseMoving","previousScreenX","previousScreenY","setMouseMoving","movementX","screenX","movementY","screenY","hasMouseMovement","resetMouseMoving","forwardRef2","Role","memo2","propsAreEqual","rest","mergedRef","isValidElement","isValidElementWithRef","getRefProperty","renderProps","overrideValue","baseValue","mergeProps","jsx","createHook","useProps","useRole","createStoreContext","providers","scopedProviders","scopedContext","useContext2","ContextProvider","reduceRight","useScopedContext","onlyScoped","scoped","useProviderContext","ScopedContextProvider","useCollectionContext","useCompositeContext","useCompositeProviderContext","CompositeContextProvider","CompositeScopedContextProvider","CompositeItemContext","CompositeRowContext","clearChars","itemTextStartsWith","itemText","useCompositeTypeahead","_b","typeahead","onKeyDownCaptureProp","onKeyDownCapture","cleanupTimeoutRef","activeId","getState","ctrlKey","altKey","metaKey","isValidTypeaheadEvent","enabledItems","getEnabledItems","isSelfTargetOrItem","activeItem","shouldInsertNullItem","flipItems","getSameInitialItems","item2","move","CompositeTypeahead","isFocusable","htmlElement","offsetHeight","getClientRects","closest","hasFocus","hasFocusWithin","CSS","escape","getMouseDestination","Node","ELEMENT_NODE","useCompositeHover","focusOnHover","blurOnHoverEnd","isMouseMoving","onMouseMoveProp","onMouseMove","focusOnHoverProp","baseElement","setActiveId","onMouseLeaveProp","blurOnHoverEndProp","_a2","nextElement","hoveringInside","movingToAnotherItem","CompositeHover","getInternal","internals","__unstableInternals","createStore","initialState","stores","prevStateBatch","lastUpdate","destroy","updatedKeys","setups","batchListeners","disposables","WeakMap","listenerKeys","sub","setState","fromStores","nextValue","argument","currentValue","isUpdater","isLazyValue","prevState","thisUpdate","run","uKeys","queueMicrotask","snapshot","finalStore","setup","initialized","maybeDestroy","desyncs","storeState","state2","teardowns","setup2","cleanups","subscribe","pick","paths","omit","omit2","mergeStore","store2","nextState","noopSubscribe","useStoreState","keyOrSelector","storeSubscribe","selector","useStoreProps","setKey","propsRef","useLiveRef","value2","setValue2","useCompositeStoreProps","useCollectionStoreProps","useDialogStoreProps","disclosure","useDisclosureStoreProps","createCollectionStore","syncState","defaultItems","itemsMap","renderedItems","syncPrivateStore","__unstablePrivateStore","getPrivateStore","privateStore","sortItems","sortedItems","pairs","isOrderDifferent","indexA","indexB","elementA","elementB","compareDocumentPosition","DOCUMENT_POSITION_PRECEDING","isElementPreceding","sortBasedOnDOMPosition","firstRun","firstItem","lastItem","getCommonParent","mergeItem","setItems","canDeleteFromMap","prevItem","items2","nextItems","nextItem","registerItem","getItems","renderItem","flatten2DArray","array","flattened","row","reverseArray","excludeId","getItemsInRow","rowId","rows","currentRow","getMaxRowLength","maxLength","normalizeRows","focusShift","previousItem","verticalizeItems","verticalized","isSafariOnMobile","maxTouchPoints","createComboboxStore","defaultActiveId","composite","includesBaseElement","moves","rtl","virtualFocus","focusLoop","focusWrap","activeId2","getNextId","hasNullItem","allItems","isGrid","activeIndex","nextItemsInRow","nextEnabledItemsInRow","nextItem2","oppositeOrientation","getOppositeOrientation","canLoop","canWrap","setBaseElement","down","shouldShift","verticalItems","up","createCompositeStore","popover","otherPopover","dialog","defaultOpen","contentElement","disclosureElement","setOpen","show","hide","open2","stopAnimation","setContentElement","setDisclosureElement","createDisclosureStore","createDialogStore","currentPlacement","anchorElement","popoverElement","arrowElement","setAnchorElement","setPopoverElement","setArrowElement","createPopoverStore","selectedValue","defaultSelectedValue","multiSelectable","combobox","resetValueOnSelect","resetValueOnHide","activeValue","setSelectedValue","selectedValue2","useComboboxStore","setStore","useState2","usePopoverStoreProps","useComboboxStoreProps","useDisclosureProviderContext","DialogContextProvider","DialogScopedContextProvider","usePopoverProviderContext","PopoverContextProvider","PopoverScopedContextProvider","useComboboxScopedContext","useComboboxProviderContext","ComboboxContextProvider","ComboboxScopedContextProvider","ComboboxItemValueContext","ComboboxItemCheckedContext","ComboboxProvider","useComboboxLabel","comboboxId","ComboboxLabel","usePopoverAnchor","FocusableContext","isSafariBrowser","alwaysFocusVisibleInputTypes","isNativeCheckboxOrRadio","getTabIndex","trulyDisabled","nativeTabbable","supportsDisabled","tabIndexProp","useDisableEvent","onEvent","isKeyboardModality","onGlobalMouseDown","onGlobalKeyDown","useFocusable","autoFocus","onFocusVisible","labels","getLabels","onMouseUp","focusVisible","setFocusVisible","onKeyPressCapture","onMouseDownCapture","onMouseDownProp","onMouseDown","receivedFocus","focusIfNeeded","handleFocusVisible","onFocusCaptureProp","onFocusCapture","applyFocusVisible","readOnly","isContentEditable","isAlwaysFocusVisible","dataset","isAlwaysFocusVisibleDelayed","onBlurProp","autoFocusOnShow","autoFocusRef","isNativeTabbable","supportsDisabledAttribute","styleProp","pointerEvents","contentEditable","useKeyboardEventProxy","onKeyboardEvent","previousElementRef","isPropagationStopped","isModifierKey","isPrintableKey","KeyboardEvent","fireKeyboardEvent","useComposite","focusOnMove","moveOnKeyPress","scheduleFocus","scheduled","setScheduled","preventScroll","useScheduleFocus","itemElement","scrollIntoView","inline","previousElement","onKeyUpCapture","virtualFocus2","previousActiveElement","isSilentlyFocused","silentlyFocused","onFocusProp","onBlurCaptureProp","onBlurCapture","nextActiveElement","nextActiveElementIsItem","onKeyDownProp","moveOnKeyPressProp","isConnected","isVertical","isHorizontal","grid","keyMap","ArrowUp","findFirstEnabledItem","groupItemsByRows","findFirstEnabledItemInTheLastRow","ArrowRight","ArrowDown","ArrowLeft","Home","End","PageUp","PageDown","isFirstItemAutoSelected","autoSelect","hasCompletionString","useCombobox","autoSelectProp","getAutoSelectId","showOnChange","setValueOnChange","showOnMouseDown","showOnClick","blurActiveItemOnClick","setValueOnClick","showOnKeyDown","showOnKeyPress","valueUpdated","forceValueUpdate","useReducer","canAutoSelectRef","composingRef","canInline","setCanInline","useUpdateLayoutEffect","storeValue","onCompositeItemMove","scrollingElementRef","getAutoSelectIdProp","autoSelectIdRef","onWheel","onScroll","passive","canAutoSelect","contentElement2","MutationObserver","attributeFilter","userAutoSelectId","autoSelectId","onBlur2","onChangeProp","showOnChangeProp","setValueOnChangeProp","selectionEnd","nativeEvent","isInputEvent","isComposing","textInserted","inputType","caretAtEnd","isSameValue","flushSync","onCompositionEndProp","onCompositionEnd","blurActiveItemOnClickProp","setValueOnClickProp","showOnClickProp","showOnKeyPressProp","ariaAutoComplete","isAriaAutoCompleteValue","isActiveItem","isFalsyBooleanCallback","Combobox","afterTimeout","timeoutMs","cb","timeoutId","parseCSSTime","times","longestTime","currentTimeString","multiplier","endsWith","currentTime","isHidden","alwaysVisible","useDisclosureContent","setTransition","otherElement","previousAnimated","animated2","stopAnimationSync","transitionDuration","animationDuration","transitionDelay","animationDelay","transitionDuration2","animationDuration2","transitionDelay2","animationDelay2","display","DisclosureContentImpl","useComboboxList","unmountOnHide","attributeName","attribute","useAttribute","ComboboxList","isNativeClick","isTrusted","useCommand","clickOnEnter","clickOnSpace","isNativeButton","setIsNativeButton","setActive","activeRef","isDuplicate","metadataProps","onLoadedMetadataCapture","useMetadataProps","isEnter","isSpace","shouldPreventEnter","shouldPreventSpace","nativeClick","click","onKeyUpProp","onKeyUp","useCollectionItem","shouldRegisterItem","element2","getItemOffset","pageUp","findNextPageItemId","nextPageOffset","pageOffset","getNextPageOffset","prevDifference","previousId","difference","absDifference","useCompositeItem","rowIdProp","preventScrollOnKeyDown","getItemProp","ariaSetSizeProp","ariaPosInSetProp","hasFocusedComposite","baseElement2","targetIsAnotherItem","focusSilently","preventScrollOnKeyDownProp","canHomeEnd","providerValue","roleProp","setRole","ariaSelected","requiresAriaSelected","supportsAriaSelected","ariaSetSize","ariaPosInSet","itemsInRow","isTabbable","useComboboxItem","selectValueOnClick","onClickProp","selectValueOnClickProp","hideOnClickProp","isDownloading","isAppleDevice","isOpeningInNewTab","prevValue","itemValue","moveEvent","ComboboxItem","normalizeValue","useComboboxItemValue","itemContext","stateValue","userValue","splitValue","ComboboxItemValue","radioCheck","Circle","cx","cy","normalizeSearchInput","getCurrentValue","filterDefinition","currentFilter","singleSelection","getNewValue","ListBox","operators","field","Ariakit","_view$filters","_view$filters2","newFilters","_filter","operator","searchValue","setSearchValue","deferredSearchValue","normalizedSearch","_view$filters3","_view$filters4","VisuallyHidden","SearchWidget","Widget","FilterText","activeElements","filterInView","filterTextWrappers","Name","Value","OperatorSelector","operatorOptions","FilterSummary","addFilterRef","commonProps","hasValues","canResetOrRemove","contentClassName","inactiveFilters","ResetFilter","sanitizeOperators","filterBy","AddFilter","filterComponents","ResetFilters","DataViewsSelectionCheckbox","primaryField","selectionLabel","itemId","DropdownMenuRadioItemV2","DropdownMenuRadioItem","WithDropDownMenuSeparators","toArray","Fragment","_HeaderMenu","fieldId","onHide","combinedField","combinedFields","isHidable","enableHiding","isSortable","enableSorting","isSorted","canAddFilter","isChecked","funnel","arrowLeft","_view$fields$slice","arrowRight","_view$fields$slice2","unseen","viewFields","BulkSelectionCheckbox","TableColumn","column","TableColumnField","TableColumnCombined","TableRow","hasBulkActions","isTouchDevice","handleMouseEnter","handleMouseLeave","onTouchStart","getSelection","SingleSelectionCheckbox","_view$layout$styles$c","GridItem","mediaField","visibleFields","badgeFields","columnFields","hasBulkAction","renderedMediaField","renderedPrimaryField","CompositeRowV2","CompositeRow","ListItem","itemRef","labelId","descriptionId","behavior","primaryAction","_primaryActions","primaryActionLabel","VIEW_LAYOUTS","component","headerMenuRefs","headerMenuToFocusRef","nextHeaderMenuToFocus","setNextHeaderMenuToFocus","tableNoticeId","hasData","_view$layout$styles$c2","ColumnHeaderMenu","blockTable","accumulator","gridStyle","gridTemplateColumns","ViewList","baseId","selectedItem","findLast","getItemDomId","isActiveIdInList","formatListBulletsRTL","formatListBullets","DataViewsLayout","ViewComponent","_view$page","setSearch","debouncedSearch","useDebouncedInput","_view$search","onChangeViewRef","viewRef","searchLabel","DropdownMenuCheckboxItemV2","DropdownMenuCheckboxItem","ViewTypeMenu","defaultLayouts","list","availableLayouts","PAGE_SIZE_VALUES","PageSizeMenu","perPage","FieldsVisibilityMenu","mandatoryFields","_view$layout$combined","getMandatoryFields","hidableFields","SortMenu","sortableFields","currentSortedField","sortedDirection","DataViewsViewConfig","activeView","cog","normalizeFields","viewportBreaks","xhuge","huge","xlarge","large","DensityPicker","setDensity","viewport","isXHuge","isHuge","isXlarge","isLarge","isMobile","useViewPortBreakpoint","_density","breakValues","densityToUse","rangeValue","inverseDensity","getRangeValue","lineSolid","inverseValue","defaultGetItemId","DataViews","selectionProperty","selectionState","setSelectionState","isUncontrolled","_selection","DataViewsSearch","DataViewsFilters","DataViewsBulkActions","DataviewsPagination","DataViewsBulkActionsToolbar","Header","subTitle","truncate","Page","hideTitleFromUI","classes","DEFAULT_POST_BASE","useDefaultViews","getPostType","all_items","published","drafts","pending","notAllowed","AddNewPostModal","isCreatingPost","setIsCreatingPost","setTitle","resolveSelect","singular_name","postTypeObject","serialize","synchronizeBlocksWithTemplate","throwOnError","TextControl","useEditPostAction","currentSize","media_details","mediaUrl","source_url","alt_text","STATUSES","getFormattedDate","dateToDisplay","FeaturedImage","viewType","hasMedia","featured_media","Media","renderButton","PostStatusField","PostAuthorField","imageUrl","getUser","isImageLoaded","setIsImageLoaded","onLoad","authorIcon","isLoadingAuthors","frontPageId","siteSettings","_STATUSES$find$label","date","span","usePostActions","DEFAULT_STATUSES","PostList","_postId$split","_records$map","_usePrevious","setView","isCustom","DEFAULT_VIEWS","selectedDefaultView","defaultView","editedViewRecord","customView","storedView","setCustomView","viewToSet","setDefaultViewAndUpdateUrl","useView","quickEdit","setSelection","_params$isCustom","queryArgs","author_exclude","orderby","isLoadingMainEntities","ids","postIdWasDeleted","canCreateRecord","postTypeActions","editAction","showAddPostModal","setShowAddPostModal","isLoadingFields","usePostFields","add_new_item","openModal","handleNewPage","__experimentalQuickEditDataViews","drawerRight","filterSortAndPaginate","filteredData","enableGlobalSearch","_field","fieldValue","fieldToSort","_fieldToSort$getValue","_fieldToSort$getValue2","valueA","valueB","blockPreviewQueue","createQueue","Async","shouldRender","setShouldRender","filterOutDuplicatesByName","currentItem","usePatternSettings","_storedSettings$__exp","settingsBlockPatterns","__experimentalAdditionalBlockPatterns","__experimentalBlockPatterns","restBlockPatterns","getBlockPatterns","blockPatterns","restStoredSettings","extractWords","getNormalizedSearchTerms","defaultGetName","defaultGetTitle","defaultGetDescription","excerpt","defaultGetKeywords","keywords","defaultHasCategory","searchItems","searchInput","normalizedSearchTerms","onlyFilterByCategory","categoryId","searchRankConfig","threshold","rankedItems","getItemSearchRank","rank","rank1","rank2","searchTerm","getName","getKeywords","hasCategory","normalizedSearchInput","normalizedTitle","terms","unmatchedTerms","unprocessedTerms","term","unprocessedTerm","removeMatchingTerms","EMPTY_PATTERN_LIST","selectTemplateParts","_getEntityRecords","isResolvingSelector","__experimentalGetDefaultTemplatePartAreas","templatePartAreas","area","patterns","templatePartHasCategory","selectThemePatterns","_settings$__experimen","pattern","__unstableSkipMigrationLogs","selectPatterns","syncStatus","themePatterns","isResolvingThemePatterns","userPatterns","isResolvingUserPatterns","userPatternCategories","selectUserPatterns","wp_pattern_sync_status","full","unsynced","currentCategory","wp_pattern_category","catId","cat","getUserPatternCategories","patternPosts","userCategory","usePatterns","CreatePatternModal","useAddPatternCategory","editPatternsPrivateApis","CreateTemplatePartModal","AddNewPattern","showPatternModal","setShowPatternModal","showTemplatePartModal","setShowTemplatePartModal","createPatternFromFile","patternsStore","patternUploadInputRef","addNewPatternLabel","addNewTemplatePartLabel","canCreatePattern","canCreateTemplatePart","handleError","symbolFilled","upload","categoryMap","findOrCreateTerm","onSuccess","onError","currentCategoryId","usePatternCategories","defaultCategories","blockPatternCategories","__experimentalAdditionalBlockPatternCategories","__experimentalBlockPatternCategories","getBlockPatternCategories","useDefaultPatternCategories","_getSettings$__experi","useThemePatterns","patternCategories","categoriesWithCounts","uncategorized","sortedCategories","hasPatterns","RenamePatternCategoryModal","patternsPrivateApis","RenameCategoryMenuItem","RenameModal","normalizedCategory","existingCategories","DeleteCategoryMenuItem","deleteEntityRecord","invalidateResolution","force","PatternsHeader","titleId","patternCategory","templatePartArea","useAddedBy","getMedia","originalSource","original_source","authorText","author_text","themeIcon","isCustomized","pluginIcon","globeIcon","site_logo","DEFAULT_VIEW","SYNC_FILTERS","PreviewWrapper","ariaDescribedBy","Preview","isUserPattern","_item$blocks","isEmpty","Author","withIcon","Title","lockSmall","DataviewsPatterns","categoryIdFromURL","previousCategoryId","viewSyncStatus","authorsSet","prevView","viewWithoutFilters","templatePartActions","patternActions","_item$name","EMPTY_OBJECT","useExistingTemplates","useDefaultTemplateTypes","__experimentalGetDefaultTemplateTypes","usePublicPostTypes","postTypes","getPostTypes","excludedPostTypes","viewable","usePostTypeArchiveMenuItems","publicPostTypes","postTypesWithArchives","has_archive","existingTemplates","postTypeLabels","singularName","needsUniqueIdentifier","existingTemplate","archive","templatePrefix","USE_AUTHOR_MENU_ITEM_TEMPLATE_PREFIX","USE_AUTHOR_MENU_ITEM_QUERY_PARAMETERS","who","useEntitiesInfo","entityName","templatePrefixes","additionalQueryParameters","recordsToExcludePerEntity","useTemplatesToExclude","slugsToExcludePerEntity","existingSlugs","slugsWithTemplates","_accumulator","_prefix","useExistingTemplateSlugs","entitiesWithTemplates","entitiesHasRecords","existingEntitiesIds","hasEntities","SuggestionListItem","suggestion","entityForSuggestions","baseCssClass","getSpecificTemplate","TextHighlight","highlight","SuggestionList","suggestions","searchResults","hasResolved","searchHasResolved","setSuggestions","newSuggestions","mapToIHasNameAndId","entities","recordNamePath","entity","useSearchSuggestions","showSearchControl","setShowSearchControl","search_items","not_found","showSearchEntities","setShowSearchEntities","hasGeneralTemplate","__assign","lowerCase","SuppressedError","DEFAULT_SPLIT_REGEXP","DEFAULT_STRIP_REGEXP","re","dotCase","splitRegexp","stripRegexp","delimiter","noCase","createTemplate","defaultTitle","setIsBusy","DEFAULT_TEMPLATE_SLUGS","TEMPLATE_ICONS","verse","single","pin","notFound","commentAuthorAvatar","taxonomy","blockMeta","calendar","attachment","TemplateListItem","modalContentMap","NewTemplateModal","modalContent","setModalContent","setEntityForSuggestions","isSubmitting","setIsSubmitting","missingTemplates","defaultTemplateTypes","existingTemplateSlugs","onClickMenuItem","_entityForSuggestions","enhancedMissingDefaultTemplateTypes","defaultTaxonomiesMenuItems","taxonomiesMenuItems","publicTaxonomies","usePublicTaxonomies","taxonomies","getTaxonomies","visibility","publicly_queryable","taxonomyLabels","templateName","template_name","taxonomiesInfo","menuItems","generalTemplateSlug","defaultTemplateType","_slug","_needsUniqueIdentifier","menuItemTitle","menuItem","orderBy","templateSlug","useTaxonomiesMenuItems","defaultPostTypesMenuItems","postTypesMenuItems","templateLabels","postTypesInfo","usePostTypeMenuItems","authorMenuItem","authorInfo","useAuthorMenuItem","matchIndex","template1","template2","useMissingTemplates","TEMPLATE_SHORT_DESCRIPTIONS","getFullYear","isWPSuggestion","is_wp_suggestion","onModalClose","modalTitle","AddCustomTemplateModalContent","AddCustomGenericTemplateModalContent","showModal","setShowModal","linkProps","AuthorField","EditorProvider","PageTemplates","usedType","currentView","isLoadingData","newView","AddNewTemplate","SidebarButton","SidebarNavigationScreen","isRoot","footer","backPath","backPathProp","dashboardLinkText","__experimentalDashboardLinkText","SidebarNavigationItem","withChevron","uid","chevronLeftSmall","chevronRightSmall","SidebarNavigationScreenDetailsPanelLabel","SidebarNavigationScreenDetailsPanelRow","extraProps","SidebarNavigationScreenDetailsPanelValue","SidebarNavigationScreenDetailsFooter","otherProps","_record$_links$predec","_record$_links$versio","hrefProps","lastRevisionId","SidebarNavigationItemGlobalStyles","SidebarNavigationScreenGlobalStyles","isLoadingRevisions","setPreference","openGlobalStyles","openStyleBook","openRevisions","modifiedDateTime","shouldShowGlobalStylesFooter","SidebarNavigationScreenMain","navigation","PRELOADED_NAVIGATION_MENUS_QUERY","notEmptyString","testString","menuTitle","editedMenuTitle","setEditedMenuTitle","isEditedMenuTitleValid","DeleteConfirmDialog","POPOVER_PROPS","ScreenNavigationMoreMenu","onDelete","onDuplicate","menuId","renameModalOpen","setRenameModalOpen","deleteConfirmDialogOpen","setDeleteConfirmDialogOpen","closeModals","LeafMoreMenu","moveBlocksDown","moveBlocksUp","removeBlocks","removeLabel","BlockTitle","maximumLength","goToLabel","rootClientId","getBlockRootClientId","onGoToPage","selectedBlock","noIcons","chevronUp","chevronDown","PrivateListView","PAGES_QUERY","NavigationMenuContent","listViewRootClientId","areInnerBlocksControlled","getBlockCount","getBlockOrder","blockClientIds","pageListHasBlocks","isLoadingPages","replaceBlock","offCanvasOnselect","blockSettingsMenu","showAppender","NavigationMenuEditor","buildNavigationLabel","SingleNavigationMenu","navigationMenu","handleDelete","handleDuplicate","handleSave","SidebarNavigationScreenWrapper","SidebarNavigationScreenNavigationMenu","isDeleting","isDeletingEntityRecord","useNavigationMenuHandlers","_handleDelete","_handleSave","_handleDuplicate","useDeleteNavigationMenu","useSaveNavigationMenu","getEditedEntityRecordSelector","__experimentalSaveSpecifiedEntityEdits","saveSpecifiedEntityEdits","originalRecord","recordPropertiesToSave","useDuplicateNavigationMenu","savedRecord","buildMenuLabel","hasCreatedFallback","SidebarNavigationScreenNavigationMenus","navigationMenus","isResolvingNavigationMenus","hasResolvedNavigationMenus","getNavigationFallbackId","firstNavigationMenu","hasNavigationMenus","NavMenuItem","linkInfo","DataViewItem","customViewId","iconToUse","TemplateDataviewItem","DataviewsTemplatesSidebarContent","firstItemPerAuthorText","firstItemPerAuthor","SidebarNavigationScreenTemplatesBrowse","CategoryItem","useTemplatePartsGroupedByArea","knownAreas","CategoriesGroup","currentType","allPatterns","otherPatterns","getTemplatePartIcon","SidebarNavigationScreenPatterns","hasTemplateParts","useTemplatePartAreas","AddNewItemModalContent","setIsAdding","setIsSaving","dataViewTaxonomyId","dataViewTypeRecords","wp_dataviews_type","AddNewItem","isAdding","RenameItemModalContent","dataviewId","currentTitle","setIsRenaming","CustomDataViewItem","isRenaming","CustomDataViewsList","customDataViews","useCustomDataViews","customViewRecord","DataViewsSidebarContent","restParams","viewToSwitchOutOfTrash","previousActiveView","useSwitchToTableOnTrash","isCustomBoolean","__experimentalCustomViews","onChangeControl","DataForm","form","DataFormControl","getControlForField","PostEditForm","initialEdits","setEdits","itemWithEdits","PostEdit","useCommandContext","commandsPrivateApis","RouterProvider","GlobalStylesProvider","AppLayout","useCommandLoader","hook","external","useCommonCommands","hasBlockSelected","getBlockSelectionStart","commandContext","useSetCommandContext","hasEditCanvasMode","categoryType","useRedirectOldPaths","isListLayout","showQuickEdit","PagePatterns","useLayoutAreas","App","SlotFillProvider","UnsavedChangesWarning","PluginArea","isSiteEditor","getPath","deprecateSlot","PluginMoreMenuItem","EditorPluginMoreMenuItem","PluginSidebar","EditorPluginSidebar","PluginSidebarMoreMenuItem","EditorPluginSidebarMoreMenuItem","PostsLayout","PostsApp","initializePostsDashboard","createRoot","reapplyBlockTypeFilters","coreBlocks","__experimentalGetCoreBlocks","registerCoreBlocks","setFreeformFallbackBlockName","registerLegacyWidgetBlock","registerWidgetGroupBlock","__experimentalRegisterExperimentalCoreBlocks","enableFSEBlocks","setDefaults","welcomeGuide","welcomeGuideStyles","welcomeGuidePage","welcomeGuideTemplate","allowRightClickOverrides","distractionFree","editorMode","fixedToolbar","inactivePanels","keepCaretInsideBlock","openPanels","showBlockBreadcrumbs","StrictMode","registerDefaultActions","registerCoreBlockBindingsSources","bootstrapBlockBindingsSourcesFromServer","initializeEditor","blockBindingsSources","updateEditorSettings","defaultTemplatePartAreas","reinitializeEditor"],"sourceRoot":""}